import {
AnnotationService
} from "./chunk-NO2C2JJZ.js";
import {
defineStore,
mapState
} from "./chunk-EZG7MI55.js";
import {
hn,
wn
} from "./chunk-4PXRF7LI.js";
import {
$7,
J7,
V7,
_7,
z7
} from "./chunk-VSHHOTB7.js";
import {
arrow_down_default,
arrow_left_default,
circle_check_default,
circle_close_default,
close_default,
loading_default,
warning_default,
warning_filled_default
} from "./chunk-GQENOT3W.js";
import {
Comment,
Fragment,
Teleport,
Text,
Transition,
cloneVNode,
computed,
createApp,
createBaseVNode,
createBlock,
createCommentVNode,
createElementBlock,
createSlots,
createStaticVNode,
createTextVNode,
createVNode,
defineComponent,
getCurrentInstance,
getCurrentScope,
h,
inject,
isRef,
markRaw,
mergeProps,
nextTick,
normalizeClass,
normalizeStyle,
onActivated,
onBeforeMount,
onBeforeUnmount,
onDeactivated,
onMounted,
onScopeDispose,
onUnmounted,
onUpdated,
openBlock,
provide,
reactive,
readonly,
ref,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
shallowRef,
toDisplayString,
toHandlerKey,
toRaw,
toRef,
toRefs,
unref,
useSlots,
vModelCheckbox,
vModelRadio,
vModelText,
vShow,
warn,
watch,
watchEffect,
withCtx,
withDirectives,
withKeys,
withModifiers
} from "./chunk-HM42ZP2D.js";
import "./chunk-EWTE5DHJ.js";
// node_modules/@abi-software/flatmapvuer/dist/flatmapvuer.js
import * as Ds from "https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.2.13/+esm";
var it = (e, t, { checkForDefaultPrevented: n = true } = {}) => (i) => {
const a = e == null ? void 0 : e(i);
if (n === false || !a)
return t == null ? void 0 : t(i);
};
var la;
var re = typeof window < "u";
var uu = (e) => typeof e == "string";
var Ns = () => {
};
var ri = re && ((la = window == null ? void 0 : window.navigator) == null ? void 0 : la.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Ti(e) {
return typeof e == "function" ? e() : unref(e);
}
function cu(e) {
return e;
}
function Vn(e) {
return getCurrentScope() ? (onScopeDispose(e), true) : false;
}
function du(e, t = true) {
getCurrentInstance() ? onMounted(e) : t ? e() : nextTick(e);
}
function ua(e, t, n = {}) {
const {
immediate: o = true
} = n, i = ref(false);
let a = null;
function s() {
a && (clearTimeout(a), a = null);
}
function r() {
i.value = false, s();
}
function l(...u) {
s(), i.value = true, a = setTimeout(() => {
i.value = false, a = null, e(...u);
}, Ti(t));
}
return o && (i.value = true, re && l()), Vn(r), {
isPending: readonly(i),
start: l,
stop: r
};
}
function st(e) {
var t;
const n = Ti(e);
return (t = n == null ? void 0 : n.$el) != null ? t : n;
}
var Io = re ? window : void 0;
function ze(...e) {
let t, n, o, i;
if (uu(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = Io) : [t, n, o, i] = e, !t)
return Ns;
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
const a = [], s = () => {
a.forEach((c) => c()), a.length = 0;
}, r = (c, d, f, m) => (c.addEventListener(d, f, m), () => c.removeEventListener(d, f, m)), l = watch(() => [st(t), Ti(i)], ([c, d]) => {
s(), c && a.push(...n.flatMap((f) => o.map((m) => r(c, f, m, d))));
}, { immediate: true, flush: "post" }), u = () => {
l(), s();
};
return Vn(u), u;
}
var ca = false;
function fu(e, t, n = {}) {
const { window: o = Io, ignore: i = [], capture: a = true, detectIframe: s = false } = n;
if (!o)
return;
ri && !ca && (ca = true, Array.from(o.document.body.children).forEach((f) => f.addEventListener("click", Ns)));
let r = true;
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 = st(m);
return p && (f.target === p || f.composedPath().includes(p));
}
}), c = [
ze(o, "click", (f) => {
const m = st(e);
if (!(!m || m === f.target || f.composedPath().includes(m))) {
if (f.detail === 0 && (r = !l(f)), !r) {
r = true;
return;
}
t(f);
}
}, { passive: true, capture: a }),
ze(o, "pointerdown", (f) => {
const m = st(e);
m && (r = !f.composedPath().includes(m) && !l(f));
}, { passive: true }),
s && ze(o, "blur", (f) => {
var m;
const p = st(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 Bs(e, t = false) {
const n = ref(), o = () => n.value = !!e();
return o(), du(o, t), n;
}
var da = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
var fa = "__vueuse_ssr_handlers__";
da[fa] = da[fa] || {};
var pa = Object.getOwnPropertySymbols;
var pu = Object.prototype.hasOwnProperty;
var hu = Object.prototype.propertyIsEnumerable;
var vu = (e, t) => {
var n = {};
for (var o in e)
pu.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
if (e != null && pa)
for (var o of pa(e))
t.indexOf(o) < 0 && hu.call(e, o) && (n[o] = e[o]);
return n;
};
function bt(e, t, n = {}) {
const o = n, { window: i = Io } = o, a = vu(o, ["window"]);
let s;
const r = Bs(() => i && "ResizeObserver" in i), l = () => {
s && (s.disconnect(), s = void 0);
}, u = watch(() => st(e), (d) => {
l(), r.value && i && d && (s = new ResizeObserver(t), s.observe(d, a));
}, { immediate: true, flush: "post" }), c = () => {
l(), u();
};
return Vn(c), {
isSupported: r,
stop: c
};
}
var ha = Object.getOwnPropertySymbols;
var mu = Object.prototype.hasOwnProperty;
var gu = Object.prototype.propertyIsEnumerable;
var yu = (e, t) => {
var n = {};
for (var o in e)
mu.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
if (e != null && ha)
for (var o of ha(e))
t.indexOf(o) < 0 && gu.call(e, o) && (n[o] = e[o]);
return n;
};
function bu(e, t, n = {}) {
const o = n, { window: i = Io } = o, a = yu(o, ["window"]);
let s;
const r = Bs(() => i && "MutationObserver" in i), l = () => {
s && (s.disconnect(), s = void 0);
}, u = watch(() => st(e), (d) => {
l(), r.value && i && d && (s = new MutationObserver(t), s.observe(d, a));
}, { immediate: true }), c = () => {
l(), u();
};
return Vn(c), {
isSupported: r,
stop: c
};
}
var va;
(function(e) {
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(va || (va = {}));
var wu = Object.defineProperty;
var ma = Object.getOwnPropertySymbols;
var Su = Object.prototype.hasOwnProperty;
var Cu = Object.prototype.propertyIsEnumerable;
var ga = (e, t, n) => t in e ? wu(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
var Eu = (e, t) => {
for (var n in t || (t = {}))
Su.call(t, n) && ga(e, n, t[n]);
if (ma)
for (var n of ma(t))
Cu.call(t, n) && ga(e, n, t[n]);
return e;
};
var Iu = {
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]
};
Eu({
linear: cu
}, Iu);
Object.freeze({});
Object.freeze([]);
var Lt = () => {
};
var ku = Object.prototype.hasOwnProperty;
var ya = (e, t) => ku.call(e, t);
var Ie = Array.isArray;
var Se = (e) => typeof e == "function";
var He = (e) => typeof e == "string";
var ke = (e) => e !== null && typeof e == "object";
var Tu = Object.prototype.toString;
var Au = (e) => Tu.call(e);
var Uo = (e) => Au(e).slice(8, -1);
var Vs = (e) => {
const t = /* @__PURE__ */ Object.create(null);
return (n) => t[n] || (t[n] = e(n));
};
var Ou = /-(\w)/g;
var Mu = Vs(
(e) => e.replace(Ou, (t, n) => n ? n.toUpperCase() : "")
);
var Pu = /\B([A-Z])/g;
var _u = Vs(
(e) => e.replace(Pu, "-$1").toLowerCase()
);
var zs = typeof global == "object" && global && global.Object === Object && global;
var Lu = typeof self == "object" && self && self.Object === Object && self;
var tt = zs || Lu || Function("return this")();
var Qe = tt.Symbol;
var Hs = Object.prototype;
var xu = Hs.hasOwnProperty;
var Fu = Hs.toString;
var En = Qe ? Qe.toStringTag : void 0;
function Ru(e) {
var t = xu.call(e, En), n = e[En];
try {
e[En] = void 0;
var o = true;
} catch {
}
var i = Fu.call(e);
return o && (t ? e[En] = n : delete e[En]), i;
}
var $u = Object.prototype;
var Du = $u.toString;
function Nu(e) {
return Du.call(e);
}
var Bu = "[object Null]";
var Vu = "[object Undefined]";
var ba = Qe ? Qe.toStringTag : void 0;
function cn(e) {
return e == null ? e === void 0 ? Vu : Bu : ba && ba in Object(e) ? Ru(e) : Nu(e);
}
function en(e) {
return e != null && typeof e == "object";
}
var zu = "[object Symbol]";
function ko(e) {
return typeof e == "symbol" || en(e) && cn(e) == zu;
}
function Hu(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 je = Array.isArray;
var ju = 1 / 0;
var wa = Qe ? Qe.prototype : void 0;
var Sa = wa ? wa.toString : void 0;
function js(e) {
if (typeof e == "string")
return e;
if (je(e))
return Hu(e, js) + "";
if (ko(e))
return Sa ? Sa.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -ju ? "-0" : t;
}
var Ku = /\s/;
function Uu(e) {
for (var t = e.length; t-- && Ku.test(e.charAt(t)); )
;
return t;
}
var Wu = /^\s+/;
function qu(e) {
return e && e.slice(0, Uu(e) + 1).replace(Wu, "");
}
function It(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
var Ca = NaN;
var Gu = /^[-+]0x[0-9a-f]+$/i;
var Ju = /^0b[01]+$/i;
var Yu = /^0o[0-7]+$/i;
var Zu = parseInt;
function Ea(e) {
if (typeof e == "number")
return e;
if (ko(e))
return Ca;
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 = qu(e);
var n = Ju.test(e);
return n || Yu.test(e) ? Zu(e.slice(2), n ? 2 : 8) : Gu.test(e) ? Ca : +e;
}
function Ks(e) {
return e;
}
var Qu = "[object AsyncFunction]";
var Xu = "[object Function]";
var ec = "[object GeneratorFunction]";
var tc = "[object Proxy]";
function Us(e) {
if (!It(e))
return false;
var t = cn(e);
return t == Xu || t == ec || t == Qu || t == tc;
}
var Wo = tt["__core-js_shared__"];
var Ia = function() {
var e = /[^.]+$/.exec(Wo && Wo.keys && Wo.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}();
function nc(e) {
return !!Ia && Ia in e;
}
var oc = Function.prototype;
var ic = oc.toString;
function Bt(e) {
if (e != null) {
try {
return ic.call(e);
} catch {
}
try {
return e + "";
} catch {
}
}
return "";
}
var ac = /[\\^$.*+?()[\]{}|]/g;
var sc = /^\[object .+?Constructor\]$/;
var rc = Function.prototype;
var lc = Object.prototype;
var uc = rc.toString;
var cc = lc.hasOwnProperty;
var dc = RegExp(
"^" + uc.call(cc).replace(ac, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function fc(e) {
if (!It(e) || nc(e))
return false;
var t = Us(e) ? dc : sc;
return t.test(Bt(e));
}
function pc(e, t) {
return e == null ? void 0 : e[t];
}
function Vt(e, t) {
var n = pc(e, t);
return fc(n) ? n : void 0;
}
var li = Vt(tt, "WeakMap");
function hc(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 vc = 800;
var mc = 16;
var gc = Date.now;
function yc(e) {
var t = 0, n = 0;
return function() {
var o = gc(), i = mc - (o - n);
if (n = o, i > 0) {
if (++t >= vc)
return arguments[0];
} else
t = 0;
return e.apply(void 0, arguments);
};
}
function bc(e) {
return function() {
return e;
};
}
var go = function() {
try {
var e = Vt(Object, "defineProperty");
return e({}, "", {}), e;
} catch {
}
}();
var wc = go ? function(e, t) {
return go(e, "toString", {
configurable: true,
enumerable: false,
value: bc(t),
writable: true
});
} : Ks;
var Sc = yc(wc);
function Cc(e, t, n, o) {
e.length;
for (var i = n + 1; i--; )
if (t(e[i], i, e))
return i;
return -1;
}
var Ec = 9007199254740991;
var Ic = /^(?:0|[1-9]\d*)$/;
function Ai(e, t) {
var n = typeof e;
return t = t ?? Ec, !!t && (n == "number" || n != "symbol" && Ic.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function kc(e, t, n) {
t == "__proto__" && go ? go(e, t, {
configurable: true,
enumerable: true,
value: n,
writable: true
}) : e[t] = n;
}
function Oi(e, t) {
return e === t || e !== e && t !== t;
}
var Tc = Object.prototype;
var Ac = Tc.hasOwnProperty;
function Oc(e, t, n) {
var o = e[t];
(!(Ac.call(e, t) && Oi(o, n)) || n === void 0 && !(t in e)) && kc(e, t, n);
}
var ka = Math.max;
function Mc(e, t, n) {
return t = ka(t === void 0 ? e.length - 1 : t, 0), function() {
for (var o = arguments, i = -1, a = ka(o.length - t, 0), s = Array(a); ++i < a; )
s[i] = o[t + i];
i = -1;
for (var r = Array(t + 1); ++i < t; )
r[i] = o[i];
return r[t] = n(s), hc(e, this, r);
};
}
var Pc = 9007199254740991;
function Mi(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Pc;
}
function _c(e) {
return e != null && Mi(e.length) && !Us(e);
}
var Lc = Object.prototype;
function xc(e) {
var t = e && e.constructor, n = typeof t == "function" && t.prototype || Lc;
return e === n;
}
function Fc(e, t) {
for (var n = -1, o = Array(e); ++n < e; )
o[n] = t(n);
return o;
}
var Rc = "[object Arguments]";
function Ta(e) {
return en(e) && cn(e) == Rc;
}
var Ws = Object.prototype;
var $c = Ws.hasOwnProperty;
var Dc = Ws.propertyIsEnumerable;
var Pi = Ta(/* @__PURE__ */ function() {
return arguments;
}()) ? Ta : function(e) {
return en(e) && $c.call(e, "callee") && !Dc.call(e, "callee");
};
function Nc() {
return false;
}
var qs = typeof exports == "object" && exports && !exports.nodeType && exports;
var Aa = qs && typeof module == "object" && module && !module.nodeType && module;
var Bc = Aa && Aa.exports === qs;
var Oa = Bc ? tt.Buffer : void 0;
var Vc = Oa ? Oa.isBuffer : void 0;
var ui = Vc || Nc;
var zc = "[object Arguments]";
var Hc = "[object Array]";
var jc = "[object Boolean]";
var Kc = "[object Date]";
var Uc = "[object Error]";
var Wc = "[object Function]";
var qc = "[object Map]";
var Gc = "[object Number]";
var Jc = "[object Object]";
var Yc = "[object RegExp]";
var Zc = "[object Set]";
var Qc = "[object String]";
var Xc = "[object WeakMap]";
var ed = "[object ArrayBuffer]";
var td = "[object DataView]";
var nd = "[object Float32Array]";
var od = "[object Float64Array]";
var id = "[object Int8Array]";
var ad = "[object Int16Array]";
var sd = "[object Int32Array]";
var rd = "[object Uint8Array]";
var ld = "[object Uint8ClampedArray]";
var ud = "[object Uint16Array]";
var cd = "[object Uint32Array]";
var ae = {};
ae[nd] = ae[od] = ae[id] = ae[ad] = ae[sd] = ae[rd] = ae[ld] = ae[ud] = ae[cd] = true;
ae[zc] = ae[Hc] = ae[ed] = ae[jc] = ae[td] = ae[Kc] = ae[Uc] = ae[Wc] = ae[qc] = ae[Gc] = ae[Jc] = ae[Yc] = ae[Zc] = ae[Qc] = ae[Xc] = false;
function dd(e) {
return en(e) && Mi(e.length) && !!ae[cn(e)];
}
function fd(e) {
return function(t) {
return e(t);
};
}
var Gs = typeof exports == "object" && exports && !exports.nodeType && exports;
var An = Gs && typeof module == "object" && module && !module.nodeType && module;
var pd = An && An.exports === Gs;
var qo = pd && zs.process;
var Ma = function() {
try {
var e = An && An.require && An.require("util").types;
return e || qo && qo.binding && qo.binding("util");
} catch {
}
}();
var Pa = Ma && Ma.isTypedArray;
var Js = Pa ? fd(Pa) : dd;
var hd = Object.prototype;
var vd = hd.hasOwnProperty;
function md(e, t) {
var n = je(e), o = !n && Pi(e), i = !n && !o && ui(e), a = !n && !o && !i && Js(e), s = n || o || i || a, r = s ? Fc(e.length, String) : [], l = r.length;
for (var u in e)
vd.call(e, u) && !(s && // 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))) && r.push(u);
return r;
}
function gd(e, t) {
return function(n) {
return e(t(n));
};
}
var yd = gd(Object.keys, Object);
var bd = Object.prototype;
var wd = bd.hasOwnProperty;
function Sd(e) {
if (!xc(e))
return yd(e);
var t = [];
for (var n in Object(e))
wd.call(e, n) && n != "constructor" && t.push(n);
return t;
}
function Ys(e) {
return _c(e) ? md(e) : Sd(e);
}
var Cd = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var Ed = /^\w*$/;
function _i(e, t) {
if (je(e))
return false;
var n = typeof e;
return n == "number" || n == "symbol" || n == "boolean" || e == null || ko(e) ? true : Ed.test(e) || !Cd.test(e) || t != null && e in Object(t);
}
var _n = Vt(Object, "create");
function Id() {
this.__data__ = _n ? _n(null) : {}, this.size = 0;
}
function kd(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
var Td = "__lodash_hash_undefined__";
var Ad = Object.prototype;
var Od = Ad.hasOwnProperty;
function Md(e) {
var t = this.__data__;
if (_n) {
var n = t[e];
return n === Td ? void 0 : n;
}
return Od.call(t, e) ? t[e] : void 0;
}
var Pd = Object.prototype;
var _d = Pd.hasOwnProperty;
function Ld(e) {
var t = this.__data__;
return _n ? t[e] !== void 0 : _d.call(t, e);
}
var xd = "__lodash_hash_undefined__";
function Fd(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = _n && t === void 0 ? xd : 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 = Id;
Rt.prototype.delete = kd;
Rt.prototype.get = Md;
Rt.prototype.has = Ld;
Rt.prototype.set = Fd;
function Rd() {
this.__data__ = [], this.size = 0;
}
function To(e, t) {
for (var n = e.length; n--; )
if (Oi(e[n][0], t))
return n;
return -1;
}
var $d = Array.prototype;
var Dd = $d.splice;
function Nd(e) {
var t = this.__data__, n = To(t, e);
if (n < 0)
return false;
var o = t.length - 1;
return n == o ? t.pop() : Dd.call(t, n, 1), --this.size, true;
}
function Bd(e) {
var t = this.__data__, n = To(t, e);
return n < 0 ? void 0 : t[n][1];
}
function Vd(e) {
return To(this.__data__, e) > -1;
}
function zd(e, t) {
var n = this.__data__, o = To(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 = Rd;
ft.prototype.delete = Nd;
ft.prototype.get = Bd;
ft.prototype.has = Vd;
ft.prototype.set = zd;
var Ln = Vt(tt, "Map");
function Hd() {
this.size = 0, this.__data__ = {
hash: new Rt(),
map: new (Ln || ft)(),
string: new Rt()
};
}
function jd(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function Ao(e, t) {
var n = e.__data__;
return jd(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function Kd(e) {
var t = Ao(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
function Ud(e) {
return Ao(this, e).get(e);
}
function Wd(e) {
return Ao(this, e).has(e);
}
function qd(e, t) {
var n = Ao(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 = Hd;
pt.prototype.delete = Kd;
pt.prototype.get = Ud;
pt.prototype.has = Wd;
pt.prototype.set = qd;
var Gd = "Expected a function";
function Li(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new TypeError(Gd);
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 s = e.apply(this, o);
return n.cache = a.set(i, s) || a, s;
};
return n.cache = new (Li.Cache || pt)(), n;
}
Li.Cache = pt;
var Jd = 500;
function Yd(e) {
var t = Li(e, function(o) {
return n.size === Jd && n.clear(), o;
}), n = t.cache;
return t;
}
var Zd = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var Qd = /\\(\\)?/g;
var Xd = Yd(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""), e.replace(Zd, function(n, o, i, a) {
t.push(i ? a.replace(Qd, "$1") : o || n);
}), t;
});
function ef(e) {
return e == null ? "" : js(e);
}
function Oo(e, t) {
return je(e) ? e : _i(e, t) ? [e] : Xd(ef(e));
}
var tf = 1 / 0;
function zn(e) {
if (typeof e == "string" || ko(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -tf ? "-0" : t;
}
function xi(e, t) {
t = Oo(t, e);
for (var n = 0, o = t.length; e != null && n < o; )
e = e[zn(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 Zs(e, t) {
for (var n = -1, o = t.length, i = e.length; ++n < o; )
e[i + n] = t[n];
return e;
}
var _a = Qe ? Qe.isConcatSpreadable : void 0;
function nf(e) {
return je(e) || Pi(e) || !!(_a && e && e[_a]);
}
function of(e, t, n, o, i) {
var a = -1, s = e.length;
for (n || (n = nf), i || (i = []); ++a < s; ) {
var r = e[a];
n(r) ? Zs(i, r) : i[i.length] = r;
}
return i;
}
function af(e) {
var t = e == null ? 0 : e.length;
return t ? of(e) : [];
}
function sf(e) {
return Sc(Mc(e, void 0, af), e + "");
}
function St() {
if (!arguments.length)
return [];
var e = arguments[0];
return je(e) ? e : [e];
}
function rf() {
this.__data__ = new ft(), this.size = 0;
}
function lf(e) {
var t = this.__data__, n = t.delete(e);
return this.size = t.size, n;
}
function uf(e) {
return this.__data__.get(e);
}
function cf(e) {
return this.__data__.has(e);
}
var df = 200;
function ff(e, t) {
var n = this.__data__;
if (n instanceof ft) {
var o = n.__data__;
if (!Ln || o.length < df - 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 rt(e) {
var t = this.__data__ = new ft(e);
this.size = t.size;
}
rt.prototype.clear = rf;
rt.prototype.delete = lf;
rt.prototype.get = uf;
rt.prototype.has = cf;
rt.prototype.set = ff;
function pf(e, t) {
for (var n = -1, o = e == null ? 0 : e.length, i = 0, a = []; ++n < o; ) {
var s = e[n];
t(s, n, e) && (a[i++] = s);
}
return a;
}
function hf() {
return [];
}
var vf = Object.prototype;
var mf = vf.propertyIsEnumerable;
var La = Object.getOwnPropertySymbols;
var gf = La ? function(e) {
return e == null ? [] : (e = Object(e), pf(La(e), function(t) {
return mf.call(e, t);
}));
} : hf;
function yf(e, t, n) {
var o = t(e);
return je(e) ? o : Zs(o, n(e));
}
function xa(e) {
return yf(e, Ys, gf);
}
var ci = Vt(tt, "DataView");
var di = Vt(tt, "Promise");
var fi = Vt(tt, "Set");
var Fa = "[object Map]";
var bf = "[object Object]";
var Ra = "[object Promise]";
var $a = "[object Set]";
var Da = "[object WeakMap]";
var Na = "[object DataView]";
var wf = Bt(ci);
var Sf = Bt(Ln);
var Cf = Bt(di);
var Ef = Bt(fi);
var If = Bt(li);
var wt = cn;
(ci && wt(new ci(new ArrayBuffer(1))) != Na || Ln && wt(new Ln()) != Fa || di && wt(di.resolve()) != Ra || fi && wt(new fi()) != $a || li && wt(new li()) != Da) && (wt = function(e) {
var t = cn(e), n = t == bf ? e.constructor : void 0, o = n ? Bt(n) : "";
if (o)
switch (o) {
case wf:
return Na;
case Sf:
return Fa;
case Cf:
return Ra;
case Ef:
return $a;
case If:
return Da;
}
return t;
});
var Ba = tt.Uint8Array;
var kf = "__lodash_hash_undefined__";
function Tf(e) {
return this.__data__.set(e, kf), this;
}
function Af(e) {
return this.__data__.has(e);
}
function yo(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.__data__ = new pt(); ++t < n; )
this.add(e[t]);
}
yo.prototype.add = yo.prototype.push = Tf;
yo.prototype.has = Af;
function Of(e, t) {
for (var n = -1, o = e == null ? 0 : e.length; ++n < o; )
if (t(e[n], n, e))
return true;
return false;
}
function Mf(e, t) {
return e.has(t);
}
var Pf = 1;
var _f = 2;
function Qs(e, t, n, o, i, a) {
var s = n & Pf, r = e.length, l = t.length;
if (r != l && !(s && l > r))
return false;
var u = a.get(e), c = a.get(t);
if (u && c)
return u == t && c == e;
var d = -1, f = true, m = n & _f ? new yo() : void 0;
for (a.set(e, t), a.set(t, e); ++d < r; ) {
var p = e[d], h2 = t[d];
if (o)
var g = s ? o(h2, p, d, t, e, a) : o(p, h2, d, e, t, a);
if (g !== void 0) {
if (g)
continue;
f = false;
break;
}
if (m) {
if (!Of(t, function(y, w) {
if (!Mf(m, w) && (p === y || i(p, y, n, o, a)))
return m.push(w);
})) {
f = false;
break;
}
} else if (!(p === h2 || i(p, h2, n, o, a))) {
f = false;
break;
}
}
return a.delete(e), a.delete(t), f;
}
function Lf(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(o, i) {
n[++t] = [i, o];
}), n;
}
function xf(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(o) {
n[++t] = o;
}), n;
}
var Ff = 1;
var Rf = 2;
var $f = "[object Boolean]";
var Df = "[object Date]";
var Nf = "[object Error]";
var Bf = "[object Map]";
var Vf = "[object Number]";
var zf = "[object RegExp]";
var Hf = "[object Set]";
var jf = "[object String]";
var Kf = "[object Symbol]";
var Uf = "[object ArrayBuffer]";
var Wf = "[object DataView]";
var Va = Qe ? Qe.prototype : void 0;
var Go = Va ? Va.valueOf : void 0;
function qf(e, t, n, o, i, a, s) {
switch (n) {
case Wf:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return false;
e = e.buffer, t = t.buffer;
case Uf:
return !(e.byteLength != t.byteLength || !a(new Ba(e), new Ba(t)));
case $f:
case Df:
case Vf:
return Oi(+e, +t);
case Nf:
return e.name == t.name && e.message == t.message;
case zf:
case jf:
return e == t + "";
case Bf:
var r = Lf;
case Hf:
var l = o & Ff;
if (r || (r = xf), e.size != t.size && !l)
return false;
var u = s.get(e);
if (u)
return u == t;
o |= Rf, s.set(e, t);
var c = Qs(r(e), r(t), o, i, a, s);
return s.delete(e), c;
case Kf:
if (Go)
return Go.call(e) == Go.call(t);
}
return false;
}
var Gf = 1;
var Jf = Object.prototype;
var Yf = Jf.hasOwnProperty;
function Zf(e, t, n, o, i, a) {
var s = n & Gf, r = xa(e), l = r.length, u = xa(t), c = u.length;
if (l != c && !s)
return false;
for (var d = l; d--; ) {
var f = r[d];
if (!(s ? f in t : Yf.call(t, f)))
return false;
}
var m = a.get(e), p = a.get(t);
if (m && p)
return m == t && p == e;
var h2 = true;
a.set(e, t), a.set(t, e);
for (var g = s; ++d < l; ) {
f = r[d];
var y = e[f], w = t[f];
if (o)
var M = s ? o(w, y, f, t, e, a) : o(y, w, f, e, t, a);
if (!(M === void 0 ? y === w || i(y, w, n, o, a) : M)) {
h2 = false;
break;
}
g || (g = f == "constructor");
}
if (h2 && !g) {
var T = e.constructor, E = t.constructor;
T != E && "constructor" in e && "constructor" in t && !(typeof T == "function" && T instanceof T && typeof E == "function" && E instanceof E) && (h2 = false);
}
return a.delete(e), a.delete(t), h2;
}
var Qf = 1;
var za = "[object Arguments]";
var Ha = "[object Array]";
var to = "[object Object]";
var Xf = Object.prototype;
var ja = Xf.hasOwnProperty;
function ep(e, t, n, o, i, a) {
var s = je(e), r = je(t), l = s ? Ha : wt(e), u = r ? Ha : wt(t);
l = l == za ? to : l, u = u == za ? to : u;
var c = l == to, d = u == to, f = l == u;
if (f && ui(e)) {
if (!ui(t))
return false;
s = true, c = false;
}
if (f && !c)
return a || (a = new rt()), s || Js(e) ? Qs(e, t, n, o, i, a) : qf(e, t, l, n, o, i, a);
if (!(n & Qf)) {
var m = c && ja.call(e, "__wrapped__"), p = d && ja.call(t, "__wrapped__");
if (m || p) {
var h2 = m ? e.value() : e, g = p ? t.value() : t;
return a || (a = new rt()), i(h2, g, n, o, a);
}
}
return f ? (a || (a = new rt()), Zf(e, t, n, o, i, a)) : false;
}
function Mo(e, t, n, o, i) {
return e === t ? true : e == null || t == null || !en(e) && !en(t) ? e !== e && t !== t : ep(e, t, n, o, Mo, i);
}
var tp = 1;
var np = 2;
function op(e, t, n, o) {
var i = n.length, a = i;
if (e == null)
return !a;
for (e = Object(e); i--; ) {
var s = n[i];
if (s[2] ? s[1] !== e[s[0]] : !(s[0] in e))
return false;
}
for (; ++i < a; ) {
s = n[i];
var r = s[0], l = e[r], u = s[1];
if (s[2]) {
if (l === void 0 && !(r in e))
return false;
} else {
var c = new rt(), d;
if (!(d === void 0 ? Mo(u, l, tp | np, o, c) : d))
return false;
}
}
return true;
}
function Xs(e) {
return e === e && !It(e);
}
function ip(e) {
for (var t = Ys(e), n = t.length; n--; ) {
var o = t[n], i = e[o];
t[n] = [o, i, Xs(i)];
}
return t;
}
function er(e, t) {
return function(n) {
return n == null ? false : n[e] === t && (t !== void 0 || e in Object(n));
};
}
function ap(e) {
var t = ip(e);
return t.length == 1 && t[0][2] ? er(t[0][0], t[0][1]) : function(n) {
return n === e || op(n, e, t);
};
}
function sp(e, t) {
return e != null && t in Object(e);
}
function rp(e, t, n) {
t = Oo(t, e);
for (var o = -1, i = t.length, a = false; ++o < i; ) {
var s = zn(t[o]);
if (!(a = e != null && n(e, s)))
break;
e = e[s];
}
return a || ++o != i ? a : (i = e == null ? 0 : e.length, !!i && Mi(i) && Ai(s, i) && (je(e) || Pi(e)));
}
function tr(e, t) {
return e != null && rp(e, t, sp);
}
var lp = 1;
var up = 2;
function cp(e, t) {
return _i(e) && Xs(t) ? er(zn(e), t) : function(n) {
var o = at(n, e);
return o === void 0 && o === t ? tr(n, e) : Mo(t, o, lp | up);
};
}
function dp(e) {
return function(t) {
return t == null ? void 0 : t[e];
};
}
function fp(e) {
return function(t) {
return xi(t, e);
};
}
function pp(e) {
return _i(e) ? dp(zn(e)) : fp(e);
}
function hp(e) {
return typeof e == "function" ? e : e == null ? Ks : typeof e == "object" ? je(e) ? cp(e[0], e[1]) : ap(e) : pp(e);
}
var Jo = function() {
return tt.Date.now();
};
var vp = "Expected a function";
var mp = Math.max;
var gp = Math.min;
function yp(e, t, n) {
var o, i, a, s, r, l, u = 0, c = false, d = false, f = true;
if (typeof e != "function")
throw new TypeError(vp);
t = Ea(t) || 0, It(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? mp(Ea(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
function m(A) {
var O = o, D = i;
return o = i = void 0, u = A, s = e.apply(D, O), s;
}
function p(A) {
return u = A, r = setTimeout(y, t), c ? m(A) : s;
}
function h2(A) {
var O = A - l, D = A - u, N = t - O;
return d ? gp(N, a - D) : N;
}
function g(A) {
var O = A - l, D = A - u;
return l === void 0 || O >= t || O < 0 || d && D >= a;
}
function y() {
var A = Jo();
if (g(A))
return w(A);
r = setTimeout(y, h2(A));
}
function w(A) {
return r = void 0, f && o ? m(A) : (o = i = void 0, s);
}
function M() {
r !== void 0 && clearTimeout(r), u = 0, o = l = i = r = void 0;
}
function T() {
return r === void 0 ? s : w(Jo());
}
function E() {
var A = Jo(), O = g(A);
if (o = arguments, i = this, l = A, O) {
if (r === void 0)
return p(l);
if (d)
return clearTimeout(r), r = setTimeout(y, t), m(l);
}
return r === void 0 && (r = setTimeout(y, t)), s;
}
return E.cancel = M, E.flush = T, E;
}
function bp(e, t, n) {
var o = e == null ? 0 : e.length;
if (!o)
return -1;
var i = o - 1;
return Cc(e, hp(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 bo(e, t) {
return Mo(e, t);
}
function Po(e) {
return e == null;
}
function nr(e) {
return e === void 0;
}
function wp(e, t, n, o) {
if (!It(e))
return e;
t = Oo(t, e);
for (var i = -1, a = t.length, s = a - 1, r = e; r != null && ++i < a; ) {
var l = zn(t[i]), u = n;
if (l === "__proto__" || l === "constructor" || l === "prototype")
return e;
if (i != s) {
var c = r[l];
u = void 0, u === void 0 && (u = It(c) ? c : Ai(t[i + 1]) ? [] : {});
}
Oc(r, l, u), r = r[l];
}
return e;
}
function Sp(e, t, n) {
for (var o = -1, i = t.length, a = {}; ++o < i; ) {
var s = t[o], r = xi(e, s);
n(r, s) && wp(a, Oo(s, e), r);
}
return a;
}
function Cp(e, t) {
return Sp(e, t, function(n, o) {
return tr(e, o);
});
}
var or = sf(function(e, t) {
return e == null ? {} : Cp(e, t);
});
var Ct = (e) => e === void 0;
var ct = (e) => typeof e == "boolean";
var ve = (e) => typeof e == "number";
var xt = (e) => typeof Element > "u" ? false : e instanceof Element;
var xn = (e) => Po(e);
var Ep = (e) => He(e) ? !Number.isNaN(Number(e)) : false;
var Ip = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
var Ka = (e) => Object.keys(e);
var ir = class extends Error {
constructor(t) {
super(t), this.name = "ElementPlusError";
}
};
function ar(e, t) {
throw new ir(`[${e}] ${t}`);
}
function Oe(e, t) {
if (true) {
const n = He(e) ? new ir(`[${e}] ${t}`) : e;
console.warn(n);
}
}
var kp = "utils/dom/style";
var sr = (e = "") => e.split(" ").filter((t) => !!t.trim());
var Ua = (e, t) => {
if (!e || !t)
return false;
if (t.includes(" "))
throw new Error("className should not contain space.");
return e.classList.contains(t);
};
var hi = (e, t) => {
!e || !t.trim() || e.classList.add(...sr(t));
};
var Fn = (e, t) => {
!e || !t.trim() || e.classList.remove(...sr(t));
};
var Zt = (e, t) => {
var n;
if (!re || !e || !t)
return "";
let o = Mu(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 (ve(e) || Ep(e))
return `${e}${t}`;
if (He(e))
return e;
Oe(kp, "binding value must be a string or number");
}
var no;
var Tp = (e) => {
var t;
if (!re)
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 Ap(e, t) {
if (!re)
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, s = e.scrollTop, r = s + e.clientHeight;
i < s ? e.scrollTop = i : a > r && (e.scrollTop = a - e.clientHeight);
}
var rr = "__epPropKey";
var U = (e) => e;
var Op = (e) => ke(e) && !!e[rr];
var _o = (e, t) => {
if (!ke(e) || Op(e))
return e;
const { values: n, required: o, default: i, type: a, validator: s } = e, l = {
type: a,
required: !!o,
validator: n || s ? (u) => {
let c = false, d = [];
if (n && (d = Array.from(n), ya(e, "default") && d.push(i), c || (c = d.includes(u))), s && (c || (c = s(u))), !c && d.length > 0) {
const f = [...new Set(d)].map((m) => JSON.stringify(m)).join(", ");
warn(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`);
}
return c;
} : void 0,
[rr]: true
};
return ya(e, "default") && (l.default = i), l;
};
var Q = (e) => pi(Object.entries(e).map(([t, n]) => [
t,
_o(n, t)
]));
var tn = U([
String,
Object,
Function
]);
var Mp = {
Close: close_default
};
var Pp = {
validating: loading_default,
success: circle_check_default,
error: circle_close_default
};
var 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;
};
var _p = (e, t) => (e.install = (n) => {
n.directive(t, e);
}, e);
var zt = (e) => (e.install = Lt, e);
var Lp = (...e) => (t) => {
e.forEach((n) => {
Se(n) ? n(t) : n.value = t;
});
};
var Rn = {
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"
};
var we = "update:modelValue";
var Fi = "change";
var lr = ["", "default", "small", "large"];
var co = ((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))(co || {});
var xp = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);
var In = (e) => e;
var Xt = ({ from: e, replacement: t, scope: n, version: o, ref: i, type: a = "API" }, s) => {
watch(() => unref(s), (r) => {
r && Oe(n, `[${a}] ${e} is about to be deprecated in version ${o}, please use ${t} instead.
For more detail, please visit: ${i}
`);
}, {
immediate: true
});
};
var Fp = (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(), h2 = p.left, g = p.top, y = p.width, w = p.height, M = document.documentElement.clientWidth, T = document.documentElement.clientHeight, E = -h2 + f, A = -g + m, O = M - h2 - y + f, D = T - g - w + m, N = (I) => {
let K = f + I.clientX - c, J = m + I.clientY - d;
o != null && o.value || (K = Math.min(Math.max(K, E), O), J = Math.min(Math.max(J, A), D)), i = {
offsetX: K,
offsetY: J
}, e.value && (e.value.style.transform = `translate(${$t(K)}, ${$t(J)})`);
}, j = () => {
document.removeEventListener("mousemove", N), document.removeEventListener("mouseup", j);
};
document.addEventListener("mousemove", N), document.addEventListener("mouseup", j);
}, s = () => {
t.value && e.value && t.value.addEventListener("mousedown", a);
}, r = () => {
t.value && e.value && t.value.removeEventListener("mousedown", a);
}, l = () => {
i = {
offsetX: 0,
offsetY: 0
}, e.value && (e.value.style.transform = "none");
};
return onMounted(() => {
watchEffect(() => {
n.value ? s() : r();
});
}), onBeforeUnmount(() => {
r();
}), {
resetPosition: l
};
};
var Rp = {
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}"
}
}
};
var $p = (e) => (t, n) => Dp(t, n, unref(e));
var Dp = (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}}`}`;
});
var Np = (e) => {
const t = computed(() => unref(e).name), n = isRef(e) ? e : ref(e);
return {
lang: t,
locale: n,
t: $p(e)
};
};
var ur = Symbol("localeContextKey");
var Ri = (e) => {
const t = e || inject(ur, ref());
return Np(computed(() => t.value || Rp));
};
var On = "el";
var Bp = "is-";
var Pt = (e, t, n, o, i) => {
let a = `${e}-${t}`;
return n && (a += `-${n}`), o && (a += `__${o}`), i && (a += `--${i}`), a;
};
var cr = Symbol("namespaceContextKey");
var $i = (e) => {
const t = e || (getCurrentInstance() ? inject(cr, ref(On)) : ref(On));
return computed(() => unref(t) || On);
};
var ee = (e, t) => {
const n = $i(t);
return {
namespace: n,
b: (h2 = "") => Pt(n.value, e, h2, "", ""),
e: (h2) => h2 ? Pt(n.value, e, "", h2, "") : "",
m: (h2) => h2 ? Pt(n.value, e, "", "", h2) : "",
be: (h2, g) => h2 && g ? Pt(n.value, e, h2, g, "") : "",
em: (h2, g) => h2 && g ? Pt(n.value, e, "", h2, g) : "",
bm: (h2, g) => h2 && g ? Pt(n.value, e, h2, "", g) : "",
bem: (h2, g, y) => h2 && g && y ? Pt(n.value, e, h2, g, y) : "",
is: (h2, ...g) => {
const y = g.length >= 1 ? g[0] : true;
return h2 && y ? `${Bp}${h2}` : "";
},
cssVar: (h2) => {
const g = {};
for (const y in h2)
h2[y] && (g[`--${n.value}-${y}`] = h2[y]);
return g;
},
cssVarName: (h2) => `--${n.value}-${h2}`,
cssVarBlock: (h2) => {
const g = {};
for (const y in h2)
h2[y] && (g[`--${n.value}-${e}-${y}`] = h2[y]);
return g;
},
cssVarBlockName: (h2) => `--${n.value}-${e}-${h2}`
};
};
var Vp = (e, t = {}) => {
isRef(e) || ar("[useLockscreen]", "You need to pass a ref param to this function");
const n = t.ns || ee("popup"), o = computed(() => n.bm("parent", "hidden"));
if (!re || Ua(document.body, o.value))
return;
let i = 0, a = false, s = "0";
const r = () => {
setTimeout(() => {
Fn(document == null ? void 0 : document.body, o.value), a && document && (document.body.style.width = s);
}, 200);
};
watch(e, (l) => {
if (!l) {
r();
return;
}
a = !Ua(document.body, o.value), a && (s = document.body.style.width), i = Tp(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);
}), onScopeDispose(() => r());
};
var zp = _o({
type: U(Boolean),
default: null
});
var Hp = _o({
type: U(Function)
});
var jp = (e) => {
const t = `update:${e}`, n = `onUpdate:${e}`, o = [t], i = {
[e]: zp,
[n]: Hp
};
return {
useModelToggle: ({
indicator: s,
toggleReason: r,
shouldHideWhenRouteChanges: l,
shouldProceed: u,
onShow: c,
onHide: d
}) => {
const f = getCurrentInstance(), { emit: m } = f, p = f.props, h2 = computed(() => Se(p[n])), g = computed(() => p[e] === null), y = (O) => {
s.value !== true && (s.value = true, r && (r.value = O), Se(c) && c(O));
}, w = (O) => {
s.value !== false && (s.value = false, r && (r.value = O), Se(d) && d(O));
}, M = (O) => {
if (p.disabled === true || Se(u) && !u())
return;
const D = h2.value && re;
D && m(t, true), (g.value || !D) && y(O);
}, T = (O) => {
if (p.disabled === true || !re)
return;
const D = h2.value && re;
D && m(t, false), (g.value || !D) && w(O);
}, E = (O) => {
ct(O) && (p.disabled && O ? h2.value && m(t, false) : s.value !== O && (O ? y() : w()));
}, A = () => {
s.value ? T() : M();
};
return watch(() => p[e], E), l && f.appContext.config.globalProperties.$route !== void 0 && watch(() => ({
...f.proxy.$route
}), () => {
l.value && s.value && T();
}), onMounted(() => {
E(p[e]);
}), {
hide: T,
show: M,
toggle: A,
hasUpdateHandler: h2
};
},
useModelToggleProps: i,
useModelToggleEmits: o
};
};
var dr = (e) => {
const t = getCurrentInstance();
return computed(() => {
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";
var De = "bottom";
var Ne = "right";
var Ae = "left";
var Di = "auto";
var Hn = [Te, De, Ne, Ae];
var nn = "start";
var $n = "end";
var Kp = "clippingParents";
var fr = "viewport";
var kn = "popper";
var Up = "reference";
var Wa = Hn.reduce(function(e, t) {
return e.concat([t + "-" + nn, t + "-" + $n]);
}, []);
var Lo = [].concat(Hn, [Di]).reduce(function(e, t) {
return e.concat([t, t + "-" + nn, t + "-" + $n]);
}, []);
var Wp = "beforeRead";
var qp = "read";
var Gp = "afterRead";
var Jp = "beforeMain";
var Yp = "main";
var Zp = "afterMain";
var Qp = "beforeWrite";
var Xp = "write";
var eh = "afterWrite";
var th = [Wp, qp, Gp, Jp, Yp, Zp, Qp, Xp, eh];
function Xe(e) {
return e ? (e.nodeName || "").toLowerCase() : null;
}
function Ke(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 = Ke(e).Element;
return e instanceof t || e instanceof Element;
}
function $e(e) {
var t = Ke(e).HTMLElement;
return e instanceof t || e instanceof HTMLElement;
}
function Ni(e) {
if (typeof ShadowRoot > "u") return false;
var t = Ke(e).ShadowRoot;
return e instanceof t || e instanceof ShadowRoot;
}
function nh(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) || !Xe(a) || (Object.assign(a.style, o), Object.keys(i).forEach(function(s) {
var r = i[s];
r === false ? a.removeAttribute(s) : a.setAttribute(s, r === true ? "" : r);
}));
});
}
function oh(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] || {}, s = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), r = s.reduce(function(l, u) {
return l[u] = "", l;
}, {});
!$e(i) || !Xe(i) || (Object.assign(i.style, r), Object.keys(a).forEach(function(l) {
i.removeAttribute(l);
}));
});
};
}
var pr = { name: "applyStyles", enabled: true, phase: "write", fn: nh, effect: oh, requires: ["computeStyles"] };
function Ze(e) {
return e.split("-")[0];
}
var Ft = Math.max;
var wo = Math.min;
var an = Math.round;
function sn(e, t) {
t === void 0 && (t = false);
var n = e.getBoundingClientRect(), o = 1, i = 1;
if ($e(e) && t) {
var a = e.offsetHeight, s = e.offsetWidth;
s > 0 && (o = an(n.width) / s || 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 = sn(e), n = e.offsetWidth, o = e.offsetHeight;
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: o };
}
function hr(e, t) {
var n = t.getRootNode && t.getRootNode();
if (e.contains(t)) return true;
if (n && Ni(n)) {
var o = t;
do {
if (o && e.isSameNode(o)) return true;
o = o.parentNode || o.host;
} while (o);
}
return false;
}
function dt(e) {
return Ke(e).getComputedStyle(e);
}
function ih(e) {
return ["table", "td", "th"].indexOf(Xe(e)) >= 0;
}
function kt(e) {
return ((on(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function xo(e) {
return Xe(e) === "html" ? e : e.assignedSlot || e.parentNode || (Ni(e) ? e.host : null) || kt(e);
}
function qa(e) {
return !$e(e) || dt(e).position === "fixed" ? null : e.offsetParent;
}
function ah(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 = xo(e);
for (Ni(i) && (i = i.host); $e(i) && ["html", "body"].indexOf(Xe(i)) < 0; ) {
var a = dt(i);
if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return i;
i = i.parentNode;
}
return null;
}
function jn(e) {
for (var t = Ke(e), n = qa(e); n && ih(n) && dt(n).position === "static"; ) n = qa(n);
return n && (Xe(n) === "html" || Xe(n) === "body" && dt(n).position === "static") ? t : n || ah(e) || t;
}
function Vi(e) {
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
}
function Mn(e, t, n) {
return Ft(e, wo(t, n));
}
function sh(e, t, n) {
var o = Mn(e, t, n);
return o > n ? n : o;
}
function vr() {
return { top: 0, right: 0, bottom: 0, left: 0 };
}
function mr(e) {
return Object.assign({}, vr(), e);
}
function gr(e, t) {
return t.reduce(function(n, o) {
return n[o] = e, n;
}, {});
}
var rh = function(e, t) {
return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, mr(typeof e != "number" ? e : gr(e, Hn));
};
function lh(e) {
var t, n = e.state, o = e.name, i = e.options, a = n.elements.arrow, s = n.modifiersData.popperOffsets, r = Ze(n.placement), l = Vi(r), u = [Ae, Ne].indexOf(r) >= 0, c = u ? "height" : "width";
if (!(!a || !s)) {
var d = rh(i.padding, n), f = Bi(a), m = l === "y" ? Te : Ae, p = l === "y" ? De : Ne, h2 = n.rects.reference[c] + n.rects.reference[l] - s[l] - n.rects.popper[c], g = s[l] - n.rects.reference[l], y = jn(a), w = y ? l === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, M = h2 / 2 - g / 2, T = d[m], E = w - f[c] - d[p], A = w / 2 - f[c] / 2 + M, O = Mn(T, A, E), D = l;
n.modifiersData[o] = (t = {}, t[D] = O, t.centerOffset = O - A, t);
}
}
function uh(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) || !hr(t.elements.popper, i) || (t.elements.arrow = i));
}
var ch = { name: "arrow", enabled: true, phase: "main", fn: lh, effect: uh, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function rn(e) {
return e.split("-")[1];
}
var dh = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function fh(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 Ga(e) {
var t, n = e.popper, o = e.popperRect, i = e.placement, a = e.variation, s = e.offsets, r = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = s.x, m = f === void 0 ? 0 : f, p = s.y, h2 = p === void 0 ? 0 : p, g = typeof c == "function" ? c({ x: m, y: h2 }) : { x: m, y: h2 };
m = g.x, h2 = g.y;
var y = s.hasOwnProperty("x"), w = s.hasOwnProperty("y"), M = Ae, T = Te, E = window;
if (u) {
var A = jn(n), O = "clientHeight", D = "clientWidth";
if (A === Ke(n) && (A = kt(n), dt(A).position !== "static" && r === "absolute" && (O = "scrollHeight", D = "scrollWidth")), A = A, i === Te || (i === Ae || i === Ne) && a === $n) {
T = De;
var N = d && A === E && E.visualViewport ? E.visualViewport.height : A[O];
h2 -= N - o.height, h2 *= l ? 1 : -1;
}
if (i === Ae || (i === Te || i === De) && a === $n) {
M = Ne;
var j = d && A === E && E.visualViewport ? E.visualViewport.width : A[D];
m -= j - o.width, m *= l ? 1 : -1;
}
}
var I = Object.assign({ position: r }, u && dh), K = c === true ? fh({ x: m, y: h2 }) : { x: m, y: h2 };
if (m = K.x, h2 = K.y, l) {
var J;
return Object.assign({}, I, (J = {}, J[T] = w ? "0" : "", J[M] = y ? "0" : "", J.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + m + "px, " + h2 + "px)" : "translate3d(" + m + "px, " + h2 + "px, 0)", J));
}
return Object.assign({}, I, (t = {}, t[T] = w ? h2 + "px" : "", t[M] = y ? m + "px" : "", t.transform = "", t));
}
function ph(e) {
var t = e.state, n = e.options, o = n.gpuAcceleration, i = o === void 0 ? true : o, a = n.adaptive, s = a === void 0 ? true : a, r = n.roundOffsets, l = r === void 0 ? true : r, u = { placement: Ze(t.placement), variation: rn(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, Ga(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: s, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ga(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
}
var yr = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: ph, data: {} };
var oo = { passive: true };
function hh(e) {
var t = e.state, n = e.instance, o = e.options, i = o.scroll, a = i === void 0 ? true : i, s = o.resize, r = s === void 0 ? true : s, l = Ke(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
return a && u.forEach(function(c) {
c.addEventListener("scroll", n.update, oo);
}), r && l.addEventListener("resize", n.update, oo), function() {
a && u.forEach(function(c) {
c.removeEventListener("scroll", n.update, oo);
}), r && l.removeEventListener("resize", n.update, oo);
};
}
var br = { name: "eventListeners", enabled: true, phase: "write", fn: function() {
}, effect: hh, data: {} };
var vh = { left: "right", right: "left", bottom: "top", top: "bottom" };
function fo(e) {
return e.replace(/left|right|bottom|top/g, function(t) {
return vh[t];
});
}
var mh = { start: "end", end: "start" };
function Ja(e) {
return e.replace(/start|end/g, function(t) {
return mh[t];
});
}
function zi(e) {
var t = Ke(e), n = t.pageXOffset, o = t.pageYOffset;
return { scrollLeft: n, scrollTop: o };
}
function Hi(e) {
return sn(kt(e)).left + zi(e).scrollLeft;
}
function gh(e) {
var t = Ke(e), n = kt(e), o = t.visualViewport, i = n.clientWidth, a = n.clientHeight, s = 0, r = 0;
return o && (i = o.width, a = o.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (s = o.offsetLeft, r = o.offsetTop)), { width: i, height: a, x: s + Hi(e), y: r };
}
function yh(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), s = Ft(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), r = -o.scrollLeft + Hi(e), l = -o.scrollTop;
return dt(i || n).direction === "rtl" && (r += Ft(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: s, x: r, 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 wr(e) {
return ["html", "body", "#document"].indexOf(Xe(e)) >= 0 ? e.ownerDocument.body : $e(e) && ji(e) ? e : wr(xo(e));
}
function Pn(e, t) {
var n;
t === void 0 && (t = []);
var o = wr(e), i = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ke(o), s = i ? [a].concat(a.visualViewport || [], ji(o) ? o : []) : o, r = t.concat(s);
return i ? r : r.concat(Pn(xo(s)));
}
function vi(e) {
return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
}
function bh(e) {
var t = sn(e);
return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
}
function Ya(e, t) {
return t === fr ? vi(gh(e)) : on(t) ? bh(t) : vi(yh(kt(e)));
}
function wh(e) {
var t = Pn(xo(e)), n = ["absolute", "fixed"].indexOf(dt(e).position) >= 0, o = n && $e(e) ? jn(e) : e;
return on(o) ? t.filter(function(i) {
return on(i) && hr(i, o) && Xe(i) !== "body";
}) : [];
}
function Sh(e, t, n) {
var o = t === "clippingParents" ? wh(e) : [].concat(t), i = [].concat(o, [n]), a = i[0], s = i.reduce(function(r, l) {
var u = Ya(e, l);
return r.top = Ft(u.top, r.top), r.right = wo(u.right, r.right), r.bottom = wo(u.bottom, r.bottom), r.left = Ft(u.left, r.left), r;
}, Ya(e, a));
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
}
function Sr(e) {
var t = e.reference, n = e.element, o = e.placement, i = o ? Ze(o) : null, a = o ? rn(o) : null, s = t.x + t.width / 2 - n.width / 2, r = t.y + t.height / 2 - n.height / 2, l;
switch (i) {
case Te:
l = { x: s, y: t.y - n.height };
break;
case De:
l = { x: s, y: t.y + t.height };
break;
case Ne:
l = { x: t.x + t.width, y: r };
break;
case Ae:
l = { x: t.x - n.width, y: r };
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 $n:
l[u] = l[u] + (t[c] / 2 - n[c] / 2);
break;
}
}
return l;
}
function Dn(e, t) {
t === void 0 && (t = {});
var n = t, o = n.placement, i = o === void 0 ? e.placement : o, a = n.boundary, s = a === void 0 ? Kp : a, r = n.rootBoundary, l = r === void 0 ? fr : r, u = n.elementContext, c = u === void 0 ? kn : u, d = n.altBoundary, f = d === void 0 ? false : d, m = n.padding, p = m === void 0 ? 0 : m, h2 = mr(typeof p != "number" ? p : gr(p, Hn)), g = c === kn ? Up : kn, y = e.rects.popper, w = e.elements[f ? g : c], M = Sh(on(w) ? w : w.contextElement || kt(e.elements.popper), s, l), T = sn(e.elements.reference), E = Sr({ reference: T, element: y, strategy: "absolute", placement: i }), A = vi(Object.assign({}, y, E)), O = c === kn ? A : T, D = { top: M.top - O.top + h2.top, bottom: O.bottom - M.bottom + h2.bottom, left: M.left - O.left + h2.left, right: O.right - M.right + h2.right }, N = e.modifiersData.offset;
if (c === kn && N) {
var j = N[i];
Object.keys(D).forEach(function(I) {
var K = [Ne, De].indexOf(I) >= 0 ? 1 : -1, J = [Te, De].indexOf(I) >= 0 ? "y" : "x";
D[I] += j[J] * K;
});
}
return D;
}
function Ch(e, t) {
t === void 0 && (t = {});
var n = t, o = n.placement, i = n.boundary, a = n.rootBoundary, s = n.padding, r = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Lo : l, c = rn(o), d = c ? r ? Wa : Wa.filter(function(p) {
return rn(p) === c;
}) : Hn, f = d.filter(function(p) {
return u.indexOf(p) >= 0;
});
f.length === 0 && (f = d);
var m = f.reduce(function(p, h2) {
return p[h2] = Dn(e, { placement: h2, boundary: i, rootBoundary: a, padding: s })[Ze(h2)], p;
}, {});
return Object.keys(m).sort(function(p, h2) {
return m[p] - m[h2];
});
}
function Eh(e) {
if (Ze(e) === Di) return [];
var t = fo(e);
return [Ja(e), t, Ja(t)];
}
function Ih(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 ? true : i, s = n.altAxis, r = s === void 0 ? true : s, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, m = n.flipVariations, p = m === void 0 ? true : m, h2 = n.allowedAutoPlacements, g = t.options.placement, y = Ze(g), w = y === g, M = l || (w || !p ? [fo(g)] : Eh(g)), T = [g].concat(M).reduce(function(We, Ce) {
return We.concat(Ze(Ce) === Di ? Ch(t, { placement: Ce, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: h2 }) : Ce);
}, []), E = t.rects.reference, A = t.rects.popper, O = /* @__PURE__ */ new Map(), D = true, N = T[0], j = 0; j < T.length; j++) {
var I = T[j], K = Ze(I), J = rn(I) === nn, de = [Te, De].indexOf(K) >= 0, Y = de ? "width" : "height", $ = Dn(t, { placement: I, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), te = de ? J ? Ne : Ae : J ? De : Te;
E[Y] > A[Y] && (te = fo(te));
var xe = fo(te), ye = [];
if (a && ye.push($[K] <= 0), r && ye.push($[te] <= 0, $[xe] <= 0), ye.every(function(We) {
return We;
})) {
N = I, D = false;
break;
}
O.set(I, ye);
}
if (D) for (var be = p ? 3 : 1, Pe = function(We) {
var Ce = T.find(function(ue) {
var Tt = O.get(ue);
if (Tt) return Tt.slice(0, We).every(function(ht) {
return ht;
});
});
if (Ce) return N = Ce, "break";
}, Ue = be; Ue > 0; Ue--) {
var jt = Pe(Ue);
if (jt === "break") break;
}
t.placement !== N && (t.modifiersData[o]._skip = true, t.placement = N, t.reset = true);
}
}
var kh = { name: "flip", enabled: true, phase: "main", fn: Ih, requiresIfExists: ["offset"], data: { _skip: false } };
function Za(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 Qa(e) {
return [Te, Ne, De, Ae].some(function(t) {
return e[t] >= 0;
});
}
function Th(e) {
var t = e.state, n = e.name, o = t.rects.reference, i = t.rects.popper, a = t.modifiersData.preventOverflow, s = Dn(t, { elementContext: "reference" }), r = Dn(t, { altBoundary: true }), l = Za(s, o), u = Za(r, i, a), c = Qa(l), d = Qa(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 Ah = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: Th };
function Oh(e, t, n) {
var o = Ze(e), i = [Ae, Te].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, s = a[0], r = a[1];
return s = s || 0, r = (r || 0) * i, [Ae, Ne].indexOf(o) >= 0 ? { x: r, y: s } : { x: s, y: r };
}
function Mh(e) {
var t = e.state, n = e.options, o = e.name, i = n.offset, a = i === void 0 ? [0, 0] : i, s = Lo.reduce(function(c, d) {
return c[d] = Oh(d, t.rects, a), c;
}, {}), r = s[t.placement], l = r.x, u = r.y;
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[o] = s;
}
var Ph = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: Mh };
function _h(e) {
var t = e.state, n = e.name;
t.modifiersData[n] = Sr({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
}
var Cr = { name: "popperOffsets", enabled: true, phase: "read", fn: _h, data: {} };
function Lh(e) {
return e === "x" ? "y" : "x";
}
function xh(e) {
var t = e.state, n = e.options, o = e.name, i = n.mainAxis, a = i === void 0 ? true : i, s = n.altAxis, r = s === void 0 ? false : s, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, m = f === void 0 ? true : f, p = n.tetherOffset, h2 = p === void 0 ? 0 : p, g = Dn(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), y = Ze(t.placement), w = rn(t.placement), M = !w, T = Vi(y), E = Lh(T), A = t.modifiersData.popperOffsets, O = t.rects.reference, D = t.rects.popper, N = typeof h2 == "function" ? h2(Object.assign({}, t.rects, { placement: t.placement })) : h2, j = typeof N == "number" ? { mainAxis: N, altAxis: N } : Object.assign({ mainAxis: 0, altAxis: 0 }, N), I = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, K = { x: 0, y: 0 };
if (A) {
if (a) {
var J, de = T === "y" ? Te : Ae, Y = T === "y" ? De : Ne, $ = T === "y" ? "height" : "width", te = A[T], xe = te + g[de], ye = te - g[Y], be = m ? -D[$] / 2 : 0, Pe = w === nn ? O[$] : D[$], Ue = w === nn ? -D[$] : -O[$], jt = t.elements.arrow, We = m && jt ? Bi(jt) : { width: 0, height: 0 }, Ce = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : vr(), ue = Ce[de], Tt = Ce[Y], ht = Mn(0, O[$], We[$]), qn = M ? O[$] / 2 - be - ht - ue - j.mainAxis : Pe - ht - ue - j.mainAxis, Gn = M ? -O[$] / 2 + be + ht + Tt + j.mainAxis : Ue + ht + Tt + j.mainAxis, hn2 = t.elements.arrow && jn(t.elements.arrow), zo = hn2 ? T === "y" ? hn2.clientTop || 0 : hn2.clientLeft || 0 : 0, Jn = (J = I == null ? void 0 : I[T]) != null ? J : 0, Ho = te + qn - Jn - zo, jo = te + Gn - Jn, At = Mn(m ? wo(xe, Ho) : xe, te, m ? Ft(ye, jo) : ye);
A[T] = At, K[T] = At - te;
}
if (r) {
var vn, Kt = T === "x" ? Te : Ae, Yn = T === "x" ? De : Ne, nt = A[E], Ut = E === "y" ? "height" : "width", mn = nt + g[Kt], Zn = nt - g[Yn], Ot = [Te, Ae].indexOf(y) !== -1, gn = (vn = I == null ? void 0 : I[E]) != null ? vn : 0, yn = Ot ? mn : nt - O[Ut] - D[Ut] - gn + j.altAxis, bn = Ot ? nt + O[Ut] + D[Ut] - gn - j.altAxis : Zn, wn2 = m && Ot ? sh(yn, nt, bn) : Mn(m ? yn : mn, nt, m ? bn : Zn);
A[E] = wn2, K[E] = wn2 - nt;
}
t.modifiersData[o] = K;
}
}
var Fh = { name: "preventOverflow", enabled: true, phase: "main", fn: xh, requiresIfExists: ["offset"] };
function Rh(e) {
return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
}
function $h(e) {
return e === Ke(e) || !$e(e) ? zi(e) : Rh(e);
}
function Dh(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 Nh(e, t, n) {
n === void 0 && (n = false);
var o = $e(t), i = $e(t) && Dh(t), a = kt(t), s = sn(e, i), r = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
return (o || !o && !n) && ((Xe(t) !== "body" || ji(a)) && (r = $h(t)), $e(t) ? (l = sn(t, true), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = Hi(a))), { x: s.left + r.scrollLeft - l.x, y: s.top + r.scrollTop - l.y, width: s.width, height: s.height };
}
function Bh(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 s = [].concat(a.requires || [], a.requiresIfExists || []);
s.forEach(function(r) {
if (!n.has(r)) {
var l = t.get(r);
l && i(l);
}
}), o.push(a);
}
return e.forEach(function(a) {
n.has(a.name) || i(a);
}), o;
}
function Vh(e) {
var t = Bh(e);
return th.reduce(function(n, o) {
return n.concat(t.filter(function(i) {
return i.phase === o;
}));
}, []);
}
function zh(e) {
var t;
return function() {
return t || (t = new Promise(function(n) {
Promise.resolve().then(function() {
t = void 0, n(e());
});
})), t;
};
}
function Hh(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 Xa = { placement: "bottom", modifiers: [], strategy: "absolute" };
function es() {
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 ? Xa : i;
return function(s, r, l) {
l === void 0 && (l = a);
var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Xa, a), modifiersData: {}, elements: { reference: s, popper: r }, attributes: {}, styles: {} }, c = [], d = false, f = { state: u, setOptions: function(h2) {
var g = typeof h2 == "function" ? h2(u.options) : h2;
p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: on(s) ? Pn(s) : s.contextElement ? Pn(s.contextElement) : [], popper: Pn(r) };
var y = Vh(Hh([].concat(o, u.options.modifiers)));
return u.orderedModifiers = y.filter(function(w) {
return w.enabled;
}), m(), f.update();
}, forceUpdate: function() {
if (!d) {
var h2 = u.elements, g = h2.reference, y = h2.popper;
if (es(g, y)) {
u.rects = { reference: Nh(g, jn(y), u.options.strategy === "fixed"), popper: Bi(y) }, u.reset = false, u.placement = u.options.placement, u.orderedModifiers.forEach(function(D) {
return u.modifiersData[D.name] = Object.assign({}, D.data);
});
for (var w = 0; w < u.orderedModifiers.length; w++) {
if (u.reset === true) {
u.reset = false, w = -1;
continue;
}
var M = u.orderedModifiers[w], T = M.fn, E = M.options, A = E === void 0 ? {} : E, O = M.name;
typeof T == "function" && (u = T({ state: u, options: A, name: O, instance: f }) || u);
}
}
}
}, update: zh(function() {
return new Promise(function(h2) {
f.forceUpdate(), h2(u);
});
}), destroy: function() {
p(), d = true;
} };
if (!es(s, r)) return f;
f.setOptions(l).then(function(h2) {
!d && l.onFirstUpdate && l.onFirstUpdate(h2);
});
function m() {
u.orderedModifiers.forEach(function(h2) {
var g = h2.name, y = h2.options, w = y === void 0 ? {} : y, M = h2.effect;
if (typeof M == "function") {
var T = M({ state: u, name: g, instance: f, options: w }), E = function() {
};
c.push(T || E);
}
});
}
function p() {
c.forEach(function(h2) {
return h2();
}), c = [];
}
return f;
};
}
Ki();
var jh = [br, Cr, yr, pr];
Ki({ defaultModifiers: jh });
var Kh = [br, Cr, yr, pr, Ph, kh, Fh, ch, Ah];
var Uh = Ki({ defaultModifiers: Kh });
var Wh = (e, t, n = {}) => {
const o = {
name: "updateState",
enabled: true,
phase: "write",
fn: ({ state: l }) => {
const u = qh(l);
Object.assign(s.value, u);
},
requires: ["computeStyles"]
}, i = computed(() => {
const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = unref(n);
return {
onFirstUpdate: l,
placement: u || "bottom",
strategy: c || "absolute",
modifiers: [
...d || [],
o,
{ name: "applyStyles", enabled: false }
]
};
}), a = shallowRef(), s = ref({
styles: {
popper: {
position: unref(i).strategy,
left: "0",
top: "0"
},
arrow: {
position: "absolute"
}
},
attributes: {}
}), r = () => {
a.value && (a.value.destroy(), a.value = void 0);
};
return watch(i, (l) => {
const u = unref(a);
u && u.setOptions(l);
}, {
deep: true
}), watch([e, t], ([l, u]) => {
r(), !(!l || !u) && (a.value = Uh(l, u, unref(i)));
}), onBeforeUnmount(() => {
r();
}), {
state: computed(() => {
var l;
return { ...((l = unref(a)) == null ? void 0 : l.state) || {} };
}),
styles: computed(() => unref(s).styles),
attributes: computed(() => unref(s).attributes),
update: () => {
var l;
return (l = unref(a)) == null ? void 0 : l.update();
},
forceUpdate: () => {
var l;
return (l = unref(a)) == null ? void 0 : l.forceUpdate();
},
instanceRef: computed(() => unref(a))
};
};
function qh(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
};
}
var Er = (e) => {
if (!e)
return { onClick: Lt, onMousedown: Lt, onMouseup: Lt };
let t = false, n = false;
return { onClick: (s) => {
t && n && e(s), t = n = false;
}, onMousedown: (s) => {
t = s.target === s.currentTarget;
}, onMouseup: (s) => {
n = s.target === s.currentTarget;
} };
};
function ts() {
let e;
const t = (o, i) => {
n(), e = window.setTimeout(o, i);
}, n = () => window.clearTimeout(e);
return Vn(() => n()), {
registerTimeout: t,
cancelTimeout: n
};
}
var mi = {
prefix: Math.floor(Math.random() * 1e4),
current: 0
};
var Gh = Symbol("elIdInjection");
var Ir = () => getCurrentInstance() ? inject(Gh, mi) : mi;
var Dt = (e) => {
const t = Ir();
!re && t === mi && 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 computed(() => unref(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
};
var Qt = [];
var ns = (e) => {
const t = e;
t.key === Rn.esc && Qt.forEach((n) => n(t));
};
var Jh = (e) => {
onMounted(() => {
Qt.length === 0 && document.addEventListener("keydown", ns), re && Qt.push(e);
}), onBeforeUnmount(() => {
Qt = Qt.filter((t) => t !== e), Qt.length === 0 && re && document.removeEventListener("keydown", ns);
});
};
var os;
var kr = () => {
const e = $i(), t = Ir(), n = computed(() => `${e.value}-popper-container-${t.prefix}`), o = computed(() => `#${n.value}`);
return {
id: n,
selector: o
};
};
var Yh = (e) => {
const t = document.createElement("div");
return t.id = e, document.body.appendChild(t), t;
};
var Zh = () => {
const { id: e, selector: t } = kr();
return onBeforeMount(() => {
re && (!os || !document.body.querySelector(t.value)) && (os = Yh(e.value));
}), {
id: e,
selector: t
};
};
var Qh = Q({
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
}
});
var Xh = ({
showAfter: e,
hideAfter: t,
autoClose: n,
open: o,
close: i
}) => {
const { registerTimeout: a } = ts(), {
registerTimeout: s,
cancelTimeout: r
} = ts();
return {
onOpen: (c) => {
a(() => {
o(c);
const d = unref(n);
ve(d) && d > 0 && s(() => {
i(c);
}, d);
}, unref(e));
},
onClose: (c) => {
r(), a(() => {
i(c);
}, unref(t));
}
};
};
var Tr = Symbol("elForwardRef");
var ev = (e) => {
provide(Tr, {
setForwardRef: (n) => {
e.value = n;
}
});
};
var tv = (e) => ({
mounted(t) {
e(t);
},
updated(t) {
e(t);
},
unmounted() {
e(null);
}
});
var is = {
current: 0
};
var as = ref(0);
var Ar = 2e3;
var ss = Symbol("elZIndexContextKey");
var Or = Symbol("zIndexContextKey");
var Ui = (e) => {
const t = getCurrentInstance() ? inject(ss, is) : is, n = e || (getCurrentInstance() ? inject(Or, void 0) : void 0), o = computed(() => {
const s = unref(n);
return ve(s) ? s : Ar;
}), i = computed(() => o.value + as.value), a = () => (t.current++, as.value = t.current, i.value);
return !re && !inject(ss) && 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
};
};
var dn = _o({
type: String,
values: lr,
required: false
});
var Mr = Symbol("size");
var nv = () => {
const e = inject(Mr, {});
return computed(() => unref(e.size) || "");
};
function ov(e, {
beforeFocus: t,
afterFocus: n,
beforeBlur: o,
afterBlur: i
} = {}) {
const a = getCurrentInstance(), { emit: s } = a, r = shallowRef(), l = ref(false), u = (f) => {
Se(t) && t(f) || l.value || (l.value = true, s("focus", f), n == null || n());
}, c = (f) => {
var m;
Se(o) && o(f) || f.relatedTarget && ((m = r.value) != null && m.contains(f.relatedTarget)) || (l.value = false, s("blur", f), i == null || i());
}, d = () => {
var f, m;
(f = r.value) != null && f.contains(document.activeElement) && r.value !== document.activeElement || (m = e.value) == null || m.focus();
};
return watch(r, (f) => {
f && f.setAttribute("tabindex", "-1");
}), ze(r, "focus", u, true), ze(r, "blur", c, true), ze(r, "click", d, true), false, {
isFocused: l,
wrapperRef: r,
handleFocus: u,
handleBlur: c
};
}
function iv({
afterComposition: e,
emit: t
}) {
const n = ref(false), o = (r) => {
t == null || t("compositionstart", r), n.value = true;
}, i = (r) => {
var l;
t == null || t("compositionupdate", r);
const u = (l = r.target) == null ? void 0 : l.value, c = u[u.length - 1] || "";
n.value = !xp(c);
}, a = (r) => {
t == null || t("compositionend", r), n.value && (n.value = false, nextTick(() => e(r)));
};
return {
isComposing: n,
handleComposition: (r) => {
r.type === "compositionend" ? a(r) : i(r);
},
handleCompositionStart: o,
handleCompositionUpdate: i,
handleCompositionEnd: a
};
}
var Pr = Symbol("emptyValuesContextKey");
var av = "use-empty-values";
var sv = ["", void 0, null];
var rv = void 0;
var lv = Q({
emptyValues: Array,
valueOnClear: {
type: [String, Number, Boolean, Function],
default: void 0,
validator: (e) => Se(e) ? !e() : !e
}
});
var uv = (e, t) => {
const n = getCurrentInstance() ? inject(Pr, ref({})) : ref({}), o = computed(() => e.emptyValues || n.value.emptyValues || sv), i = computed(() => 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 : rv), a = (s) => o.value.includes(s);
return o.value.includes(i.value) || Oe(av, "value-on-clear should be a value of empty-values"), {
emptyValues: o,
valueOnClear: i,
isEmptyValue: a
};
};
var cv = Q({
ariaLabel: String,
ariaOrientation: {
type: String,
values: ["horizontal", "vertical", "undefined"]
},
ariaControls: String
});
var Ht = (e) => or(cv, e);
var _r = Symbol();
var So = ref();
function Fo(e, t = void 0) {
const n = getCurrentInstance() ? inject(_r, So) : So;
return e ? computed(() => {
var o, i;
return (i = (o = n.value) == null ? void 0 : o[e]) != null ? i : t;
}) : n;
}
function dv(e, t) {
const n = Fo(), o = ee(e, computed(() => {
var r;
return ((r = n.value) == null ? void 0 : r.namespace) || On;
})), i = Ri(computed(() => {
var r;
return (r = n.value) == null ? void 0 : r.locale;
})), a = Ui(computed(() => {
var r;
return ((r = n.value) == null ? void 0 : r.zIndex) || Ar;
})), s = computed(() => {
var r;
return unref(t) || ((r = n.value) == null ? void 0 : r.size) || "";
});
return fv(computed(() => unref(n) || {})), {
ns: o,
locale: i,
zIndex: a,
size: s
};
}
var fv = (e, t, n = false) => {
var o;
const i = !!getCurrentInstance(), a = i ? Fo() : void 0, s = (o = void 0) != null ? o : i ? provide : void 0;
if (!s) {
Oe("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
return;
}
const r = computed(() => {
const l = unref(e);
return a != null && a.value ? pv(a.value, l) : l;
});
return s(_r, r), s(ur, computed(() => r.value.locale)), s(cr, computed(() => r.value.namespace)), s(Or, computed(() => r.value.zIndex)), s(Mr, {
size: computed(() => r.value.size || "")
}), s(Pr, computed(() => ({
emptyValues: r.value.emptyValues,
valueOnClear: r.value.valueOnClear
}))), (n || !So.value) && (So.value = r.value), r;
};
var pv = (e, t) => {
const n = [.../* @__PURE__ */ new Set([...Ka(e), ...Ka(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;
};
var hv = Q({
size: {
type: U([Number, String])
},
color: {
type: String
}
});
var vv = defineComponent({
name: "ElIcon",
inheritAttrs: false
});
var mv = defineComponent({
...vv,
props: hv,
setup(e) {
const t = e, n = ee("icon"), o = computed(() => {
const { size: i, color: a } = t;
return !i && !a ? {} : {
fontSize: Ct(i) ? void 0 : $t(i),
"--color": a
};
});
return (i, a) => (openBlock(), createElementBlock("i", mergeProps({
class: unref(n).b(),
style: unref(o)
}, i.$attrs), [
renderSlot(i.$slots, "default")
], 16));
}
});
var gv = X(mv, [["__file", "icon.vue"]]);
var et = Me(gv);
var Wi = Symbol("formContextKey");
var Co = Symbol("formItemContextKey");
var ln = (e, t = {}) => {
const n = ref(void 0), o = t.prop ? n : dr("size"), i = t.global ? n : nv(), a = t.form ? { size: void 0 } : inject(Wi, void 0), s = t.formItem ? { size: void 0 } : inject(Co, void 0);
return computed(() => o.value || unref(e) || (s == null ? void 0 : s.size) || (a == null ? void 0 : a.size) || i.value || "");
};
var Ro = (e) => {
const t = dr("disabled"), n = inject(Wi, void 0);
return computed(() => t.value || unref(e) || (n == null ? void 0 : n.disabled) || false);
};
var fn = () => {
const e = inject(Wi, void 0), t = inject(Co, void 0);
return {
form: e,
formItem: t
};
};
var $o = (e, {
formItemContext: t,
disableIdGeneration: n,
disableIdManagement: o
}) => {
n || (n = ref(false)), o || (o = ref(false));
const i = ref();
let a;
const s = computed(() => {
var r;
return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((r = t.inputIds) == null ? void 0 : r.length) <= 1);
});
return onMounted(() => {
a = watch([toRef(e, "id"), n], ([r, l]) => {
const u = r ?? (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: true });
}), onUnmounted(() => {
a && a(), t != null && t.removeInputId && i.value && t.removeInputId(i.value);
}), {
isLabeledByFormItem: s,
inputId: i
};
};
var qt = 4;
var yv = {
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"
}
};
var bv = ({
move: e,
size: t,
bar: n
}) => ({
[n.size]: t,
transform: `translate${n.axis}(${e}%)`
});
var qi = Symbol("scrollbarContextKey");
var wv = Q({
vertical: Boolean,
size: String,
move: Number,
ratio: {
type: Number,
required: true
},
always: Boolean
});
var Sv = "Thumb";
var Cv = defineComponent({
__name: "thumb",
props: wv,
setup(e) {
const t = e, n = inject(qi), o = ee("scrollbar");
n || ar(Sv, "can not inject scrollbar context");
const i = ref(), a = ref(), s = ref({}), r = ref(false);
let l = false, u = false, c = re ? document.onselectstart : null;
const d = computed(() => yv[t.vertical ? "vertical" : "horizontal"]), f = computed(() => bv({
size: t.size,
move: t.move,
bar: d.value
})), m = computed(() => i.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), p = (A) => {
var O;
if (A.stopPropagation(), A.ctrlKey || [1, 2].includes(A.button))
return;
(O = window.getSelection()) == null || O.removeAllRanges(), g(A);
const D = A.currentTarget;
D && (s.value[d.value.axis] = D[d.value.offset] - (A[d.value.client] - D.getBoundingClientRect()[d.value.direction]));
}, h2 = (A) => {
if (!a.value || !i.value || !n.wrapElement)
return;
const O = Math.abs(A.target.getBoundingClientRect()[d.value.direction] - A[d.value.client]), D = a.value[d.value.offset] / 2, N = (O - D) * 100 * m.value / i.value[d.value.offset];
n.wrapElement[d.value.scroll] = N * n.wrapElement[d.value.scrollSize] / 100;
}, g = (A) => {
A.stopImmediatePropagation(), l = true, document.addEventListener("mousemove", y), document.addEventListener("mouseup", w), c = document.onselectstart, document.onselectstart = () => false;
}, y = (A) => {
if (!i.value || !a.value || l === false)
return;
const O = s.value[d.value.axis];
if (!O)
return;
const D = (i.value.getBoundingClientRect()[d.value.direction] - A[d.value.client]) * -1, N = a.value[d.value.offset] - O, j = (D - N) * 100 * m.value / i.value[d.value.offset];
n.wrapElement[d.value.scroll] = j * n.wrapElement[d.value.scrollSize] / 100;
}, w = () => {
l = false, s.value[d.value.axis] = 0, document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", w), E(), u && (r.value = false);
}, M = () => {
u = false, r.value = !!t.size;
}, T = () => {
u = true, r.value = l;
};
onBeforeUnmount(() => {
E(), document.removeEventListener("mouseup", w);
});
const E = () => {
document.onselectstart !== c && (document.onselectstart = c);
};
return ze(toRef(n, "scrollbarElement"), "mousemove", M), ze(toRef(n, "scrollbarElement"), "mouseleave", T), (A, O) => (openBlock(), createBlock(Transition, {
name: unref(o).b("fade"),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
ref_key: "instance",
ref: i,
class: normalizeClass([unref(o).e("bar"), unref(o).is(unref(d).key)]),
onMousedown: h2
}, [
createBaseVNode("div", {
ref_key: "thumb",
ref: a,
class: normalizeClass(unref(o).e("thumb")),
style: normalizeStyle(unref(f)),
onMousedown: p
}, null, 38)
], 34), [
[vShow, A.always || r.value]
])
]),
_: 1
}, 8, ["name"]));
}
});
var rs = X(Cv, [["__file", "thumb.vue"]]);
var Ev = Q({
always: {
type: Boolean,
default: true
},
minSize: {
type: Number,
required: true
}
});
var Iv = defineComponent({
__name: "bar",
props: Ev,
setup(e, { expose: t }) {
const n = e, o = inject(qi), i = ref(0), a = ref(0), s = ref(""), r = ref(""), l = ref(1), u = ref(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, h2 = m ** 2 / f.scrollHeight, g = p ** 2 / f.scrollWidth, y = Math.max(h2, n.minSize), w = Math.max(g, n.minSize);
l.value = h2 / (m - h2) / (y / (m - y)), u.value = g / (p - g) / (w / (p - w)), r.value = y + qt < m ? `${y}px` : "", s.value = w + qt < p ? `${w}px` : "";
}
}), (f, m) => (openBlock(), createElementBlock(Fragment, null, [
createVNode(rs, {
move: i.value,
ratio: u.value,
size: s.value,
always: f.always
}, null, 8, ["move", "ratio", "size", "always"]),
createVNode(rs, {
move: a.value,
ratio: l.value,
size: r.value,
vertical: "",
always: f.always
}, null, 8, ["move", "ratio", "size", "always"])
], 64));
}
});
var kv = X(Iv, [["__file", "bar.vue"]]);
var Tv = Q({
height: {
type: [String, Number],
default: ""
},
maxHeight: {
type: [String, Number],
default: ""
},
native: {
type: Boolean,
default: false
},
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"])
});
var Av = {
scroll: ({
scrollTop: e,
scrollLeft: t
}) => [e, t].every(ve)
};
var gi = "ElScrollbar";
var Ov = defineComponent({
name: gi
});
var Mv = defineComponent({
...Ov,
props: Tv,
emits: Av,
setup(e, { expose: t, emit: n }) {
const o = e, i = ee("scrollbar");
let a, s, r = 0, l = 0;
const u = ref(), c = ref(), d = ref(), f = ref(), m = computed(() => {
const E = {};
return o.height && (E.height = $t(o.height)), o.maxHeight && (E.maxHeight = $t(o.maxHeight)), [o.wrapStyle, E];
}), p = computed(() => [
o.wrapClass,
i.e("wrap"),
{ [i.em("wrap", "hidden-default")]: !o.native }
]), h2 = computed(() => [i.e("view"), o.viewClass]), g = () => {
var E;
c.value && ((E = f.value) == null || E.handleScroll(c.value), r = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", {
scrollTop: c.value.scrollTop,
scrollLeft: c.value.scrollLeft
}));
};
function y(E, A) {
ke(E) ? c.value.scrollTo(E) : ve(E) && ve(A) && c.value.scrollTo(E, A);
}
const w = (E) => {
if (!ve(E)) {
Oe(gi, "value must be a number");
return;
}
c.value.scrollTop = E;
}, M = (E) => {
if (!ve(E)) {
Oe(gi, "value must be a number");
return;
}
c.value.scrollLeft = E;
}, T = () => {
var E;
(E = f.value) == null || E.update();
};
return watch(() => o.noresize, (E) => {
E ? (a == null || a(), s == null || s()) : ({ stop: a } = bt(d, T), s = ze("resize", T));
}, { immediate: true }), watch(() => [o.maxHeight, o.height], () => {
o.native || nextTick(() => {
var E;
T(), c.value && ((E = f.value) == null || E.handleScroll(c.value));
});
}), provide(qi, reactive({
scrollbarElement: u,
wrapElement: c
})), onActivated(() => {
c.value && (c.value.scrollTop = r, c.value.scrollLeft = l);
}), onMounted(() => {
o.native || nextTick(() => {
T();
});
}), onUpdated(() => T()), t({
wrapRef: c,
update: T,
scrollTo: y,
setScrollTop: w,
setScrollLeft: M,
handleScroll: g
}), (E, A) => (openBlock(), createElementBlock("div", {
ref_key: "scrollbarRef",
ref: u,
class: normalizeClass(unref(i).b())
}, [
createBaseVNode("div", {
ref_key: "wrapRef",
ref: c,
class: normalizeClass(unref(p)),
style: normalizeStyle(unref(m)),
tabindex: E.tabindex,
onScroll: g
}, [
(openBlock(), createBlock(resolveDynamicComponent(E.tag), {
id: E.id,
ref_key: "resizeRef",
ref: d,
class: normalizeClass(unref(h2)),
style: normalizeStyle(E.viewStyle),
role: E.role,
"aria-label": E.ariaLabel,
"aria-orientation": E.ariaOrientation
}, {
default: withCtx(() => [
renderSlot(E.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
], 46, ["tabindex"]),
E.native ? createCommentVNode("v-if", true) : (openBlock(), createBlock(kv, {
key: 0,
ref_key: "barRef",
ref: f,
always: E.always,
"min-size": E.minSize
}, null, 8, ["always", "min-size"]))
], 2));
}
});
var Pv = X(Mv, [["__file", "scrollbar.vue"]]);
var _v = Me(Pv);
var Gi = Symbol("popper");
var Lr = Symbol("popperContent");
var Lv = [
"dialog",
"grid",
"group",
"listbox",
"menu",
"navigation",
"tooltip",
"tree"
];
var xr = Q({
role: {
type: String,
values: Lv,
default: "tooltip"
}
});
var xv = defineComponent({
name: "ElPopper",
inheritAttrs: false
});
var Fv = defineComponent({
...xv,
props: xr,
setup(e, { expose: t }) {
const n = e, o = ref(), i = ref(), a = ref(), s = ref(), r = computed(() => n.role), l = {
triggerRef: o,
popperInstanceRef: i,
contentRef: a,
referenceRef: s,
role: r
};
return t(l), provide(Gi, l), (u, c) => renderSlot(u.$slots, "default");
}
});
var Rv = X(Fv, [["__file", "popper.vue"]]);
var Fr = Q({
arrowOffset: {
type: Number,
default: 5
}
});
var $v = defineComponent({
name: "ElPopperArrow",
inheritAttrs: false
});
var Dv = defineComponent({
...$v,
props: Fr,
setup(e, { expose: t }) {
const n = e, o = ee("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: s } = inject(Lr, void 0);
return watch(() => n.arrowOffset, (r) => {
i.value = r;
}), onBeforeUnmount(() => {
a.value = void 0;
}), t({
arrowRef: a
}), (r, l) => (openBlock(), createElementBlock("span", {
ref_key: "arrowRef",
ref: a,
class: normalizeClass(unref(o).e("arrow")),
style: normalizeStyle(unref(s)),
"data-popper-arrow": ""
}, null, 6));
}
});
var Nv = X(Dv, [["__file", "arrow.vue"]]);
var Yo = "ElOnlyChild";
var Bv = defineComponent({
name: Yo,
setup(e, {
slots: t,
attrs: n
}) {
var o;
const i = inject(Tr), a = tv((o = i == null ? void 0 : i.setForwardRef) != null ? o : Lt);
return () => {
var s;
const r = (s = t.default) == null ? void 0 : s.call(t, n);
if (!r)
return null;
if (r.length > 1)
return Oe(Yo, "requires exact only one valid child."), null;
const l = Rr(r);
return l ? withDirectives(cloneVNode(l, n), [[a]]) : (Oe(Yo, "no valid child node found"), null);
};
}
});
function Rr(e) {
if (!e)
return null;
const t = e;
for (const n of t) {
if (ke(n))
switch (n.type) {
case Comment:
continue;
case Text:
case "svg":
return ls(n);
case Fragment:
return Rr(n.children);
default:
return n;
}
return ls(n);
}
return null;
}
function ls(e) {
const t = ee("only-child");
return createVNode("span", {
class: t.e("content")
}, [e]);
}
var $r = 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
});
var Vv = defineComponent({
name: "ElPopperTrigger",
inheritAttrs: false
});
var zv = defineComponent({
...Vv,
props: $r,
setup(e, { expose: t }) {
const n = e, { role: o, triggerRef: i } = inject(Gi, void 0);
ev(i);
const a = computed(() => r.value ? n.id : void 0), s = computed(() => {
if (o && o.value === "tooltip")
return n.open && n.id ? n.id : void 0;
}), r = computed(() => {
if (o && o.value !== "tooltip")
return o.value;
}), l = computed(() => r.value ? `${n.open}` : void 0);
let u;
const c = [
"onMouseenter",
"onMouseleave",
"onClick",
"onKeydown",
"onFocus",
"onBlur",
"onContextmenu"
];
return onMounted(() => {
watch(() => n.virtualRef, (d) => {
d && (i.value = st(d));
}, {
immediate: true
}), watch(i, (d, f) => {
u == null || u(), u = void 0, xt(d) && (c.forEach((m) => {
var p;
const h2 = n[m];
h2 && (d.addEventListener(m.slice(2).toLowerCase(), h2), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, m.slice(2).toLowerCase(), h2));
}), u = watch([a, s, r, l], (m) => {
[
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((p, h2) => {
Po(m[h2]) ? d.removeAttribute(p) : d.setAttribute(p, m[h2]);
});
}, { immediate: true })), xt(f) && [
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((m) => f.removeAttribute(m));
}, {
immediate: true
});
}), onBeforeUnmount(() => {
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 ? createCommentVNode("v-if", true) : (openBlock(), createBlock(unref(Bv), mergeProps({ key: 0 }, d.$attrs, {
"aria-controls": unref(a),
"aria-describedby": unref(s),
"aria-expanded": unref(l),
"aria-haspopup": unref(r)
}), {
default: withCtx(() => [
renderSlot(d.$slots, "default")
]),
_: 3
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
}
});
var Hv = X(zv, [["__file", "trigger.vue"]]);
var Zo = "focus-trap.focus-after-trapped";
var Qo = "focus-trap.focus-after-released";
var jv = "focus-trap.focusout-prevented";
var us = {
cancelable: true,
bubbles: false
};
var Kv = {
cancelable: true,
bubbles: false
};
var cs = "focusAfterTrapped";
var ds = "focusAfterReleased";
var Dr = Symbol("elFocusTrap");
var Ji = ref();
var Do = ref(0);
var Yi = ref(0);
var io = 0;
var Nr = (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;
};
var fs = (e, t) => {
for (const n of e)
if (!Uv(n, t))
return n;
};
var Uv = (e, t) => {
if (false)
return false;
if (getComputedStyle(e).visibility === "hidden")
return true;
for (; e; ) {
if (t && e === t)
return false;
if (getComputedStyle(e).display === "none")
return true;
e = e.parentElement;
}
return false;
};
var Wv = (e) => {
const t = Nr(e), n = fs(t, e), o = fs(t.reverse(), e);
return [n, o];
};
var qv = (e) => e instanceof HTMLInputElement && "select" in e;
var gt = (e, t) => {
if (e && e.focus) {
const n = document.activeElement;
e.focus({ preventScroll: true }), Yi.value = window.performance.now(), e !== n && qv(e) && t && e.select();
}
};
function ps(e, t) {
const n = [...e], o = e.indexOf(t);
return o !== -1 && n.splice(o, 1), n;
}
var Gv = () => {
let e = [];
return {
push: (o) => {
const i = e[0];
i && o !== i && i.pause(), e = ps(e, o), e.unshift(o);
},
remove: (o) => {
var i, a;
e = ps(e, o), (a = (i = e[0]) == null ? void 0 : i.resume) == null || a.call(i);
}
};
};
var Jv = (e, t = false) => {
const n = document.activeElement;
for (const o of e)
if (gt(o, t), document.activeElement !== n)
return;
};
var hs = Gv();
var Yv = () => Do.value > Yi.value;
var ao = () => {
Ji.value = "pointer", Do.value = window.performance.now();
};
var vs = () => {
Ji.value = "keyboard", Do.value = window.performance.now();
};
var Zv = () => (onMounted(() => {
io === 0 && (document.addEventListener("mousedown", ao), document.addEventListener("touchstart", ao), document.addEventListener("keydown", vs)), io++;
}), onBeforeUnmount(() => {
io--, io <= 0 && (document.removeEventListener("mousedown", ao), document.removeEventListener("touchstart", ao), document.removeEventListener("keydown", vs));
}), {
focusReason: Ji,
lastUserFocusTimestamp: Do,
lastAutomatedFocusTimestamp: Yi
});
var so = (e) => new CustomEvent(jv, {
...Kv,
detail: e
});
var Qv = defineComponent({
name: "ElFocusTrap",
inheritAttrs: false,
props: {
loop: Boolean,
trapped: Boolean,
focusTrapEl: Object,
focusStartEl: {
type: [Object, String],
default: "first"
}
},
emits: [
cs,
ds,
"focusin",
"focusout",
"focusout-prevented",
"release-requested"
],
setup(e, { emit: t }) {
const n = ref();
let o, i;
const { focusReason: a } = Zv();
Jh((p) => {
e.trapped && !s.paused && t("release-requested", p);
});
const s = {
paused: false,
pause() {
this.paused = true;
},
resume() {
this.paused = false;
}
}, r = (p) => {
if (!e.loop && !e.trapped || s.paused)
return;
const { key: h2, altKey: g, ctrlKey: y, metaKey: w, currentTarget: M, shiftKey: T } = p, { loop: E } = e, A = h2 === Rn.tab && !g && !y && !w, O = document.activeElement;
if (A && O) {
const D = M, [N, j] = Wv(D);
if (N && j) {
if (!T && O === j) {
const K = so({
focusReason: a.value
});
t("focusout-prevented", K), K.defaultPrevented || (p.preventDefault(), E && gt(N, true));
} else if (T && [N, D].includes(O)) {
const K = so({
focusReason: a.value
});
t("focusout-prevented", K), K.defaultPrevented || (p.preventDefault(), E && gt(j, true));
}
} else if (O === D) {
const K = so({
focusReason: a.value
});
t("focusout-prevented", K), K.defaultPrevented || p.preventDefault();
}
}
};
provide(Dr, {
focusTrapRef: n,
onKeydown: r
}), watch(() => e.focusTrapEl, (p) => {
p && (n.value = p);
}, { immediate: true }), watch([n], ([p], [h2]) => {
p && (p.addEventListener("keydown", r), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), h2 && (h2.removeEventListener("keydown", r), h2.removeEventListener("focusin", c), h2.removeEventListener("focusout", d));
});
const l = (p) => {
t(cs, p);
}, u = (p) => t(ds, p), c = (p) => {
const h2 = unref(n);
if (!h2)
return;
const g = p.target, y = p.relatedTarget, w = g && h2.contains(g);
e.trapped || y && h2.contains(y) || (o = y), w && t("focusin", p), !s.paused && e.trapped && (w ? i = g : gt(i, true));
}, d = (p) => {
const h2 = unref(n);
if (!(s.paused || !h2))
if (e.trapped) {
const g = p.relatedTarget;
!Po(g) && !h2.contains(g) && setTimeout(() => {
if (!s.paused && e.trapped) {
const y = so({
focusReason: a.value
});
t("focusout-prevented", y), y.defaultPrevented || gt(i, true);
}
}, 0);
} else {
const g = p.target;
g && h2.contains(g) || t("focusout", p);
}
};
async function f() {
await nextTick();
const p = unref(n);
if (p) {
hs.push(s);
const h2 = p.contains(document.activeElement) ? o : document.activeElement;
if (o = h2, !p.contains(h2)) {
const y = new Event(Zo, us);
p.addEventListener(Zo, l), p.dispatchEvent(y), y.defaultPrevented || nextTick(() => {
let w = e.focusStartEl;
He(w) || (gt(w), document.activeElement !== w && (w = "first")), w === "first" && Jv(Nr(p), true), (document.activeElement === h2 || w === "container") && gt(p);
});
}
}
}
function m() {
const p = unref(n);
if (p) {
p.removeEventListener(Zo, l);
const h2 = new CustomEvent(Qo, {
...us,
detail: {
focusReason: a.value
}
});
p.addEventListener(Qo, u), p.dispatchEvent(h2), !h2.defaultPrevented && (a.value == "keyboard" || !Yv() || p.contains(document.activeElement)) && gt(o ?? document.body), p.removeEventListener(Qo, u), hs.remove(s);
}
}
return onMounted(() => {
e.trapped && f(), watch(() => e.trapped, (p) => {
p ? f() : m();
});
}), onBeforeUnmount(() => {
e.trapped && m(), n.value && (n.value.removeEventListener("keydown", r), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0);
}), {
onKeydown: r
};
}
});
function Xv(e, t, n, o, i, a) {
return renderSlot(e.$slots, "default", { handleKeydown: e.onKeydown });
}
var Br = X(Qv, [["render", Xv], ["__file", "focus-trap.vue"]]);
var em = ["fixed", "absolute"];
var tm = Q({
boundariesPadding: {
type: Number,
default: 0
},
fallbackPlacements: {
type: U(Array),
default: void 0
},
gpuAcceleration: {
type: Boolean,
default: true
},
offset: {
type: Number,
default: 12
},
placement: {
type: String,
values: Lo,
default: "bottom"
},
popperOptions: {
type: U(Object),
default: () => ({})
},
strategy: {
type: String,
values: em,
default: "absolute"
}
});
var Vr = Q({
...tm,
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: true
},
pure: Boolean,
focusOnShow: {
type: Boolean,
default: false
},
trapping: {
type: Boolean,
default: false
},
popperClass: {
type: U([String, Array, Object])
},
popperStyle: {
type: U([String, Array, Object])
},
referenceEl: {
type: U(Object)
},
triggerTargetEl: {
type: U(Object)
},
stopPopperMouseEvent: {
type: Boolean,
default: true
},
virtualTriggering: Boolean,
zIndex: Number,
...Ht(["ariaLabel"])
});
var nm = {
mouseenter: (e) => e instanceof MouseEvent,
mouseleave: (e) => e instanceof MouseEvent,
focus: () => true,
blur: () => true,
close: () => true
};
var om = (e, t = []) => {
const { placement: n, strategy: o, popperOptions: i } = e, a = {
placement: n,
strategy: o,
...i,
modifiers: [...am(e), ...t]
};
return sm(a, i == null ? void 0 : i.modifiers), a;
};
var im = (e) => {
if (re)
return st(e);
};
function am(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 sm(e, t) {
t && (e.modifiers = [...e.modifiers, ...t ?? []]);
}
var rm = 0;
var lm = (e) => {
const { popperInstanceRef: t, contentRef: n, triggerRef: o, role: i } = inject(Gi, void 0), a = ref(), s = ref(), r = computed(() => ({
name: "eventListeners",
enabled: !!e.visible
})), l = computed(() => {
var y;
const w = unref(a), M = (y = unref(s)) != null ? y : rm;
return {
name: "arrow",
enabled: !nr(w),
options: {
element: w,
padding: M
}
};
}), u = computed(() => ({
onFirstUpdate: () => {
p();
},
...om(e, [
unref(l),
unref(r)
])
})), c = computed(() => im(e.referenceEl) || unref(o)), { attributes: d, state: f, styles: m, update: p, forceUpdate: h2, instanceRef: g } = Wh(c, n, u);
return watch(g, (y) => t.value = y), onMounted(() => {
watch(() => {
var y;
return (y = unref(c)) == null ? void 0 : y.getBoundingClientRect();
}, () => {
p();
});
}), {
attributes: d,
arrowRef: a,
contentRef: n,
instanceRef: g,
state: f,
styles: m,
role: i,
forceUpdate: h2,
update: p
};
};
var um = (e, {
attributes: t,
styles: n,
role: o
}) => {
const { nextZIndex: i } = Ui(), a = ee("popper"), s = computed(() => unref(t).popper), r = ref(ve(e.zIndex) ? e.zIndex : i()), l = computed(() => [
a.b(),
a.is("pure", e.pure),
a.is(e.effect),
e.popperClass
]), u = computed(() => [
{ zIndex: unref(r) },
unref(n).popper,
e.popperStyle || {}
]), c = computed(() => o.value === "dialog" ? "false" : void 0), d = computed(() => unref(n).arrow || {});
return {
ariaModal: c,
arrowStyle: d,
contentAttrs: s,
contentClass: l,
contentStyle: u,
contentZIndex: r,
updateZIndex: () => {
r.value = ve(e.zIndex) ? e.zIndex : i();
}
};
};
var cm = (e, t) => {
const n = ref(false), o = ref();
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 = true);
},
onFocusoutPrevented: (u) => {
e.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = false);
},
onReleaseRequested: () => {
n.value = false, t("close");
}
};
};
var dm = defineComponent({
name: "ElPopperContent"
});
var fm = defineComponent({
...dm,
props: Vr,
emits: nm,
setup(e, { expose: t, emit: n }) {
const o = e, {
focusStartRef: i,
trapped: a,
onFocusAfterReleased: s,
onFocusAfterTrapped: r,
onFocusInTrap: l,
onFocusoutPrevented: u,
onReleaseRequested: c
} = cm(o, n), { attributes: d, arrowRef: f, contentRef: m, styles: p, instanceRef: h2, role: g, update: y } = lm(o), {
ariaModal: w,
arrowStyle: M,
contentAttrs: T,
contentClass: E,
contentStyle: A,
updateZIndex: O
} = um(o, {
styles: p,
attributes: d,
role: g
}), D = inject(Co, void 0), N = ref();
provide(Lr, {
arrowStyle: M,
arrowRef: f,
arrowOffset: N
}), D && provide(Co, {
...D,
addInputId: Lt,
removeInputId: Lt
});
let j;
const I = (J = true) => {
y(), J && O();
}, K = () => {
I(false), o.visible && o.focusOnShow ? a.value = true : o.visible === false && (a.value = false);
};
return onMounted(() => {
watch(() => o.triggerTargetEl, (J, de) => {
j == null || j(), j = void 0;
const Y = unref(J || m.value), $ = unref(de || m.value);
xt(Y) && (j = watch([g, () => o.ariaLabel, w, () => o.id], (te) => {
["role", "aria-label", "aria-modal", "id"].forEach((xe, ye) => {
Po(te[ye]) ? Y.removeAttribute(xe) : Y.setAttribute(xe, te[ye]);
});
}, { immediate: true })), $ !== Y && xt($) && ["role", "aria-label", "aria-modal", "id"].forEach((te) => {
$.removeAttribute(te);
});
}, { immediate: true }), watch(() => o.visible, K, { immediate: true });
}), onBeforeUnmount(() => {
j == null || j(), j = void 0;
}), t({
popperContentRef: m,
popperInstanceRef: h2,
updatePopper: I,
contentStyle: A
}), (J, de) => (openBlock(), createElementBlock("div", mergeProps({
ref_key: "contentRef",
ref: m
}, unref(T), {
style: unref(A),
class: unref(E),
tabindex: "-1",
onMouseenter: (Y) => J.$emit("mouseenter", Y),
onMouseleave: (Y) => J.$emit("mouseleave", Y)
}), [
createVNode(unref(Br), {
trapped: unref(a),
"trap-on-focus-in": true,
"focus-trap-el": unref(m),
"focus-start-el": unref(i),
onFocusAfterTrapped: unref(r),
onFocusAfterReleased: unref(s),
onFocusin: unref(l),
onFocusoutPrevented: unref(u),
onReleaseRequested: unref(c)
}, {
default: withCtx(() => [
renderSlot(J.$slots, "default")
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
], 16, ["onMouseenter", "onMouseleave"]));
}
});
var pm = X(fm, [["__file", "content.vue"]]);
var hm = Me(Rv);
var Zi = Symbol("elTooltip");
var Le = Q({
...Qh,
...Vr,
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: true
},
disabled: Boolean,
...Ht(["ariaLabel"])
});
var Nn = Q({
...$r,
disabled: Boolean,
trigger: {
type: U([String, Array]),
default: "hover"
},
triggerKeys: {
type: U(Array),
default: () => [Rn.enter, Rn.space]
}
});
var {
useModelToggleProps: vm,
useModelToggleEmits: mm,
useModelToggle: gm
} = jp("visible");
var ym = Q({
...xr,
...vm,
...Le,
...Nn,
...Fr,
showArrow: {
type: Boolean,
default: true
}
});
var bm = [
...mm,
"before-show",
"before-hide",
"show",
"hide",
"open",
"close"
];
var wm = (e, t) => Ie(e) ? e.includes(t) : e === t;
var Gt = (e, t, n) => (o) => {
wm(unref(e), t) && n(o);
};
var Sm = defineComponent({
name: "ElTooltipTrigger"
});
var Cm = defineComponent({
...Sm,
props: Nn,
setup(e, { expose: t }) {
const n = e, o = ee("tooltip"), { controlled: i, id: a, open: s, onOpen: r, onClose: l, onToggle: u } = inject(Zi, void 0), c = ref(null), d = () => {
if (unref(i) || n.disabled)
return true;
}, f = toRef(n, "trigger"), m = it(d, Gt(f, "hover", r)), p = it(d, Gt(f, "hover", l)), h2 = it(d, Gt(f, "click", (T) => {
T.button === 0 && u(T);
})), g = it(d, Gt(f, "focus", r)), y = it(d, Gt(f, "focus", l)), w = it(d, Gt(f, "contextmenu", (T) => {
T.preventDefault(), u(T);
})), M = it(d, (T) => {
const { code: E } = T;
n.triggerKeys.includes(E) && (T.preventDefault(), u(T));
});
return t({
triggerRef: c
}), (T, E) => (openBlock(), createBlock(unref(Hv), {
id: unref(a),
"virtual-ref": T.virtualRef,
open: unref(s),
"virtual-triggering": T.virtualTriggering,
class: normalizeClass(unref(o).e("trigger")),
onBlur: unref(y),
onClick: unref(h2),
onContextmenu: unref(w),
onFocus: unref(g),
onMouseenter: unref(m),
onMouseleave: unref(p),
onKeydown: unref(M)
}, {
default: withCtx(() => [
renderSlot(T.$slots, "default")
]),
_: 3
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
}
});
var Em = X(Cm, [["__file", "trigger.vue"]]);
var Im = Q({
to: {
type: U([String, Object]),
required: true
},
disabled: Boolean
});
var km = defineComponent({
__name: "teleport",
props: Im,
setup(e) {
return (t, n) => t.disabled ? renderSlot(t.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, {
key: 1,
to: t.to
}, [
renderSlot(t.$slots, "default")
], 8, ["to"]));
}
});
var Tm = X(km, [["__file", "teleport.vue"]]);
var zr = Me(Tm);
var Am = defineComponent({
name: "ElTooltipContent",
inheritAttrs: false
});
var Om = defineComponent({
...Am,
props: Le,
setup(e, { expose: t }) {
const n = e, { selector: o } = kr(), i = ee("tooltip"), a = ref(null);
let s;
const {
controlled: r,
id: l,
open: u,
trigger: c,
onClose: d,
onOpen: f,
onShow: m,
onHide: p,
onBeforeShow: h2,
onBeforeHide: g
} = inject(Zi, void 0), y = computed(() => n.transition || `${i.namespace.value}-fade-in-linear`), w = computed(() => false ? true : n.persistent);
onBeforeUnmount(() => {
s == null || s();
});
const M = computed(() => unref(w) ? true : unref(u)), T = computed(() => n.disabled ? false : unref(u)), E = computed(() => n.appendTo || o.value), A = computed(() => {
var $;
return ($ = n.style) != null ? $ : {};
}), O = ref(true), D = () => {
p(), O.value = true;
}, N = () => {
if (unref(r))
return true;
}, j = it(N, () => {
n.enterable && unref(c) === "hover" && f();
}), I = it(N, () => {
unref(c) === "hover" && d();
}), K = () => {
var $, te;
(te = ($ = a.value) == null ? void 0 : $.updatePopper) == null || te.call($), h2 == null || h2();
}, J = () => {
g == null || g();
}, de = () => {
m(), s = fu(computed(() => {
var $;
return ($ = a.value) == null ? void 0 : $.popperContentRef;
}), () => {
if (unref(r))
return;
unref(c) !== "hover" && d();
});
}, Y = () => {
n.virtualTriggering || d();
};
return watch(() => unref(u), ($) => {
$ ? O.value = false : s == null || s();
}, {
flush: "post"
}), watch(() => n.content, () => {
var $, te;
(te = ($ = a.value) == null ? void 0 : $.updatePopper) == null || te.call($);
}), t({
contentRef: a
}), ($, te) => (openBlock(), createBlock(unref(zr), {
disabled: !$.teleported,
to: unref(E)
}, {
default: withCtx(() => [
createVNode(Transition, {
name: unref(y),
onAfterLeave: D,
onBeforeEnter: K,
onAfterEnter: de,
onBeforeLeave: J
}, {
default: withCtx(() => [
unref(M) ? withDirectives((openBlock(), createBlock(unref(pm), mergeProps({
key: 0,
id: unref(l),
ref_key: "contentRef",
ref: a
}, $.$attrs, {
"aria-label": $.ariaLabel,
"aria-hidden": O.value,
"boundaries-padding": $.boundariesPadding,
"fallback-placements": $.fallbackPlacements,
"gpu-acceleration": $.gpuAcceleration,
offset: $.offset,
placement: $.placement,
"popper-options": $.popperOptions,
strategy: $.strategy,
effect: $.effect,
enterable: $.enterable,
pure: $.pure,
"popper-class": $.popperClass,
"popper-style": [$.popperStyle, unref(A)],
"reference-el": $.referenceEl,
"trigger-target-el": $.triggerTargetEl,
visible: unref(T),
"z-index": $.zIndex,
onMouseenter: unref(j),
onMouseleave: unref(I),
onBlur: Y,
onClose: unref(d)
}), {
default: withCtx(() => [
renderSlot($.$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"])), [
[vShow, unref(T)]
]) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["name"])
]),
_: 3
}, 8, ["disabled", "to"]));
}
});
var Mm = X(Om, [["__file", "content.vue"]]);
var Pm = defineComponent({
name: "ElTooltip"
});
var _m = defineComponent({
...Pm,
props: ym,
emits: bm,
setup(e, { expose: t, emit: n }) {
const o = e;
Zh();
const i = Dt(), a = ref(), s = ref(), r = () => {
var y;
const w = unref(a);
w && ((y = w.popperInstanceRef) == null || y.update());
}, l = ref(false), u = ref(), { show: c, hide: d, hasUpdateHandler: f } = gm({
indicator: l,
toggleReason: u
}), { onOpen: m, onClose: p } = Xh({
showAfter: toRef(o, "showAfter"),
hideAfter: toRef(o, "hideAfter"),
autoClose: toRef(o, "autoClose"),
open: c,
close: d
}), h2 = computed(() => ct(o.visible) && !f.value);
provide(Zi, {
controlled: h2,
id: i,
open: readonly(l),
trigger: toRef(o, "trigger"),
onOpen: (y) => {
m(y);
},
onClose: (y) => {
p(y);
},
onToggle: (y) => {
unref(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: r
}), watch(() => o.disabled, (y) => {
y && l.value && (l.value = false);
});
const g = (y) => {
var w, M;
const T = (M = (w = s.value) == null ? void 0 : w.contentRef) == null ? void 0 : M.popperContentRef, E = (y == null ? void 0 : y.relatedTarget) || document.activeElement;
return T && T.contains(E);
};
return onDeactivated(() => l.value && d()), t({
popperRef: a,
contentRef: s,
isFocusInsideContent: g,
updatePopper: r,
onOpen: m,
onClose: p,
hide: d
}), (y, w) => (openBlock(), createBlock(unref(hm), {
ref_key: "popperRef",
ref: a,
role: y.role
}, {
default: withCtx(() => [
createVNode(Em, {
disabled: y.disabled,
trigger: y.trigger,
"trigger-keys": y.triggerKeys,
"virtual-ref": y.virtualRef,
"virtual-triggering": y.virtualTriggering
}, {
default: withCtx(() => [
y.$slots.default ? renderSlot(y.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
createVNode(Mm, {
ref_key: "contentRef",
ref: s,
"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: withCtx(() => [
renderSlot(y.$slots, "content", {}, () => [
y.rawContent ? (openBlock(), createElementBlock("span", {
key: 0,
innerHTML: y.content
}, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(y.content), 1))
]),
y.showArrow ? (openBlock(), createBlock(unref(Nv), {
key: 0,
"arrow-offset": y.arrowOffset
}, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true)
]),
_: 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 Lm = X(_m, [["__file", "tooltip.vue"]]);
var Hr = Me(Lm);
var jr = Symbol("buttonGroupContextKey");
var xm = (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"
}, computed(() => e.type === "text"));
const n = inject(jr, void 0), o = Fo("button"), { form: i } = fn(), a = ln(computed(() => n == null ? void 0 : n.size)), s = Ro(), r = ref(), l = useSlots(), u = computed(() => e.type || (n == null ? void 0 : n.type) || ""), c = computed(() => {
var p, h2, g;
return (g = (h2 = e.autoInsertSpace) != null ? h2 : (p = o.value) == null ? void 0 : p.autoInsertSpace) != null ? g : false;
}), d = computed(() => e.tag === "button" ? {
ariaDisabled: s.value || e.loading,
disabled: s.value || e.loading,
autofocus: e.autofocus,
type: e.nativeType
} : {}), f = computed(() => {
var p;
const h2 = (p = l.default) == null ? void 0 : p.call(l);
if (c.value && (h2 == null ? void 0 : h2.length) === 1) {
const g = h2[0];
if ((g == null ? void 0 : g.type) === Text) {
const y = g.children;
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(y.trim());
}
}
return false;
});
return {
_disabled: s,
_size: a,
_type: u,
_ref: r,
_props: d,
shouldAddSpace: f,
handleClick: (p) => {
if (s.value || e.loading) {
p.stopPropagation();
return;
}
e.nativeType === "reset" && (i == null || i.resetFields()), t("click", p);
}
};
};
var Fm = [
"default",
"primary",
"success",
"warning",
"info",
"danger",
"text",
""
];
var Rm = ["button", "submit", "reset"];
var yi = Q({
size: dn,
disabled: Boolean,
type: {
type: String,
values: Fm,
default: ""
},
icon: {
type: tn
},
nativeType: {
type: String,
values: Rm,
default: "button"
},
loading: Boolean,
loadingIcon: {
type: tn,
default: () => loading_default
},
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"
}
});
var $m = {
click: (e) => e instanceof MouseEvent
};
function me(e, t) {
Dm(e) && (e = "100%");
var n = Nm(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 ro(e) {
return Math.min(1, Math.max(0, e));
}
function Dm(e) {
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function Nm(e) {
return typeof e == "string" && e.indexOf("%") !== -1;
}
function Kr(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 _t(e) {
return e.length === 1 ? "0" + e : String(e);
}
function Bm(e, t, n) {
return {
r: me(e, 255) * 255,
g: me(t, 255) * 255,
b: me(n, 255) * 255
};
}
function ms(e, t, n) {
e = me(e, 255), t = me(t, 255), n = me(n, 255);
var o = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, s = 0, r = (o + i) / 2;
if (o === i)
s = 0, a = 0;
else {
var l = o - i;
switch (s = r > 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, l: r };
}
function Xo(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 Vm(e, t, n) {
var o, i, a;
if (e = me(e, 360), t = me(t, 100), n = me(n, 100), t === 0)
i = n, a = n, o = n;
else {
var s = n < 0.5 ? n * (1 + t) : n + t - n * t, r = 2 * n - s;
o = Xo(r, s, e + 1 / 3), i = Xo(r, s, e), a = Xo(r, s, e - 1 / 3);
}
return { r: o * 255, g: i * 255, b: a * 255 };
}
function gs(e, t, n) {
e = me(e, 255), t = me(t, 255), n = me(n, 255);
var o = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, s = o, r = o - i, l = o === 0 ? 0 : r / o;
if (o === i)
a = 0;
else {
switch (o) {
case e:
a = (t - n) / r + (t < n ? 6 : 0);
break;
case t:
a = (n - e) / r + 2;
break;
case n:
a = (e - t) / r + 4;
break;
}
a /= 6;
}
return { h: a, s: l, v: s };
}
function zm(e, t, n) {
e = me(e, 360) * 6, t = me(t, 100), n = me(n, 100);
var o = Math.floor(e), i = e - o, a = n * (1 - t), s = n * (1 - i * t), r = n * (1 - (1 - i) * t), l = o % 6, u = [n, s, a, a, r, n][l], c = [r, n, n, s, a, a][l], d = [a, a, r, n, n, s][l];
return { r: u * 255, g: c * 255, b: d * 255 };
}
function ys(e, t, n, o) {
var i = [
_t(Math.round(e).toString(16)),
_t(Math.round(t).toString(16)),
_t(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 Hm(e, t, n, o, i) {
var a = [
_t(Math.round(e).toString(16)),
_t(Math.round(t).toString(16)),
_t(Math.round(n).toString(16)),
_t(jm(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 jm(e) {
return Math.round(parseFloat(e) * 255).toString(16);
}
function bs(e) {
return _e(e) / 255;
}
function _e(e) {
return parseInt(e, 16);
}
function Km(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 Um(e) {
var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, i = null, a = null, s = false, r = false;
return typeof e == "string" && (e = Gm(e)), typeof e == "object" && (ot(e.r) && ot(e.g) && ot(e.b) ? (t = Bm(e.r, e.g, e.b), s = true, r = 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 = zm(e.h, o, i), s = true, r = "hsv") : ot(e.h) && ot(e.s) && ot(e.l) && (o = lo(e.s), a = lo(e.l), t = Vm(e.h, o, a), s = true, r = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Kr(n), {
ok: s,
format: e.format || r,
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 Wm = "[-\\+]?\\d+%?";
var qm = "[-\\+]?\\d*\\.\\d+%?";
var Et = "(?:".concat(qm, ")|(?:").concat(Wm, ")");
var ei = "[\\s|\\(]+(".concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")\\s*\\)?");
var ti = "[\\s|\\(]+(".concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")\\s*\\)?");
var Ve = {
CSS_UNIT: new RegExp(Et),
rgb: new RegExp("rgb" + ei),
rgba: new RegExp("rgba" + ti),
hsl: new RegExp("hsl" + ei),
hsla: new RegExp("hsla" + ti),
hsv: new RegExp("hsv" + ei),
hsva: new RegExp("hsva" + ti),
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 Gm(e) {
if (e = e.trim().toLowerCase(), e.length === 0)
return false;
var t = false;
if (bi[e])
e = bi[e], t = true;
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: _e(n[1]),
g: _e(n[2]),
b: _e(n[3]),
a: bs(n[4]),
format: t ? "name" : "hex8"
} : (n = Ve.hex6.exec(e), n ? {
r: _e(n[1]),
g: _e(n[2]),
b: _e(n[3]),
format: t ? "name" : "hex"
} : (n = Ve.hex4.exec(e), n ? {
r: _e(n[1] + n[1]),
g: _e(n[2] + n[2]),
b: _e(n[3] + n[3]),
a: bs(n[4] + n[4]),
format: t ? "name" : "hex8"
} : (n = Ve.hex3.exec(e), n ? {
r: _e(n[1] + n[1]),
g: _e(n[2] + n[2]),
b: _e(n[3] + n[3]),
format: t ? "name" : "hex"
} : false)))))))));
}
function ot(e) {
return !!Ve.CSS_UNIT.exec(String(e));
}
var Jm = (
/** @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 = Km(t)), this.originalInput = t;
var i = Um(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, s = t.g / 255, r = t.b / 255;
return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), r <= 0.03928 ? i = r / 12.92 : i = Math.pow((r + 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 = Kr(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 = gs(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 = gs(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 = ms(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 = ms(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 = false), ys(this.r, this.g, this.b, t);
}, e.prototype.toHexString = function(t) {
return t === void 0 && (t = false), "#" + this.toHex(t);
}, e.prototype.toHex8 = function(t) {
return t === void 0 && (t = false), Hm(this.r, this.g, this.b, this.a, t);
}, e.prototype.toHex8String = function(t) {
return t === void 0 && (t = false), "#" + this.toHex8(t);
}, e.prototype.toHexShortString = function(t) {
return t === void 0 && (t = false), 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(me(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(me(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 false;
for (var t = "#" + ys(this.r, this.g, this.b, false), n = 0, o = Object.entries(bi); n < o.length; n++) {
var i = o[n], a = i[0], s = i[1];
if (t === s)
return a;
}
return false;
}, e.prototype.toString = function(t) {
var n = !!t;
t = t ?? this.format;
var o = false, 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(true)), t === "hex4" && (o = this.toHex8String(true)), 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 = ro(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 = ro(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 = ro(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 = ro(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, s = {
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(s);
}, 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, s = [], r = 1 / t; t--; )
s.push(new e({ h: o, s: i, v: a })), a = (a + r) % 1;
return s;
}, 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, s = 1; s < t; s++)
i.push(new e({ h: (o + s * a) % 360, s: n.s, l: n.l }));
return i;
}, e.prototype.equals = function(t) {
return this.toRgbString() === new e(t).toRgbString();
}, e;
}()
);
function mt(e, t = 20) {
return e.mix("#141414", t).toString();
}
function Ym(e) {
const t = Ro(), n = ee("button");
return computed(() => {
let o = {}, i = e.color;
if (i) {
const a = i.match(/var\((.*?)\)/);
a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
const s = new Jm(i), r = e.dark ? s.tint(20).toString() : mt(s, 20);
if (e.plain)
o = n.cssVarBlock({
"bg-color": e.dark ? mt(s, 90) : s.tint(90).toString(),
"text-color": i,
"border-color": e.dark ? mt(s, 50) : s.tint(50).toString(),
"hover-text-color": `var(${n.cssVarName("color-white")})`,
"hover-bg-color": i,
"hover-border-color": i,
"active-bg-color": r,
"active-text-color": `var(${n.cssVarName("color-white")})`,
"active-border-color": r
}), t.value && (o[n.cssVarBlockName("disabled-bg-color")] = e.dark ? mt(s, 90) : s.tint(90).toString(), o[n.cssVarBlockName("disabled-text-color")] = e.dark ? mt(s, 50) : s.tint(50).toString(), o[n.cssVarBlockName("disabled-border-color")] = e.dark ? mt(s, 80) : s.tint(80).toString());
else {
const l = e.dark ? mt(s, 30) : s.tint(30).toString(), u = s.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": r,
"active-border-color": r
}), t.value) {
const c = e.dark ? mt(s, 50) : s.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;
});
}
var Zm = defineComponent({
name: "ElButton"
});
var Qm = defineComponent({
...Zm,
props: yi,
emits: $m,
setup(e, { expose: t, emit: n }) {
const o = e, i = Ym(o), a = ee("button"), { _ref: s, _size: r, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = xm(o, n), m = computed(() => [
a.b(),
a.m(l.value),
a.m(r.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: s,
size: r,
type: l,
disabled: u,
shouldAddSpace: d
}), (p, h2) => (openBlock(), createBlock(resolveDynamicComponent(p.tag), mergeProps({
ref_key: "_ref",
ref: s
}, unref(c), {
class: unref(m),
style: unref(i),
onClick: unref(f)
}), {
default: withCtx(() => [
p.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
p.$slots.loading ? renderSlot(p.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(et), {
key: 1,
class: normalizeClass(unref(a).is("loading"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(p.loadingIcon)))
]),
_: 1
}, 8, ["class"]))
], 64)) : p.icon || p.$slots.icon ? (openBlock(), createBlock(unref(et), { key: 1 }, {
default: withCtx(() => [
p.icon ? (openBlock(), createBlock(resolveDynamicComponent(p.icon), { key: 0 })) : renderSlot(p.$slots, "icon", { key: 1 })
]),
_: 3
})) : createCommentVNode("v-if", true),
p.$slots.default ? (openBlock(), createElementBlock("span", {
key: 2,
class: normalizeClass({ [unref(a).em("text", "expand")]: unref(d) })
}, [
renderSlot(p.$slots, "default")
], 2)) : createCommentVNode("v-if", true)
]),
_: 3
}, 16, ["class", "style", "onClick"]));
}
});
var Xm = X(Qm, [["__file", "button.vue"]]);
var eg = {
size: yi.size,
type: yi.type
};
var tg = defineComponent({
name: "ElButtonGroup"
});
var ng = defineComponent({
...tg,
props: eg,
setup(e) {
const t = e;
provide(jr, reactive({
size: toRef(t, "size"),
type: toRef(t, "type")
}));
const n = ee("button");
return (o, i) => (openBlock(), createElementBlock("div", {
class: normalizeClass(unref(n).b("group"))
}, [
renderSlot(o.$slots, "default")
], 2));
}
});
var Ur = X(ng, [["__file", "button-group.vue"]]);
var Wr = Me(Xm, {
ButtonGroup: Ur
});
zt(Ur);
var og = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function ig(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var yt = /* @__PURE__ */ new Map();
if (re) {
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 ws(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, s = o.target, r = i == null ? void 0 : i.target, l = !t || !t.instance, u = !s || !r, c = e.contains(s) || e.contains(r), d = e === s, f = n.length && n.some((p) => p == null ? void 0 : p.contains(s)) || n.length && n.includes(r), m = a && (a.contains(s) || a.contains(r));
l || u || c || d || f || m || t.value(o, i);
};
}
var ag = {
beforeMount(e, t) {
yt.has(e) || yt.set(e, []), yt.get(e).push({
documentHandler: ws(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: ws(e, t),
bindingFn: t.value
};
o >= 0 ? n.splice(o, 1, i) : n.push(i);
},
unmounted(e) {
yt.delete(e);
}
};
var qr = {
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: true
},
...Ht(["ariaControls"])
};
var Gr = {
[we]: (e) => He(e) || ve(e) || ct(e),
change: (e) => He(e) || ve(e) || ct(e)
};
var pn = Symbol("checkboxGroupContextKey");
var sg = ({
model: e,
isChecked: t
}) => {
const n = inject(pn, void 0), o = computed(() => {
var a, s;
const r = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, l = (s = n == null ? void 0 : n.min) == null ? void 0 : s.value;
return !Ct(r) && e.value.length >= r && !t.value || !Ct(l) && e.value.length <= l && t.value;
});
return {
isDisabled: Ro(computed(() => (n == null ? void 0 : n.disabled.value) || o.value)),
isLimitDisabled: o
};
};
var rg = (e, {
model: t,
isLimitExceeded: n,
hasOwnLabel: o,
isDisabled: i,
isLabeledByFormItem: a
}) => {
const s = inject(pn, void 0), { formItem: r } = fn(), { emit: l } = getCurrentInstance();
function u(p) {
var h2, g, y, w;
return [true, e.trueValue, e.trueLabel].includes(p) ? (g = (h2 = e.trueValue) != null ? h2 : e.trueLabel) != null ? g : true : (w = (y = e.falseValue) != null ? y : e.falseLabel) != null ? w : false;
}
function c(p, h2) {
l("change", u(p), h2);
}
function d(p) {
if (n.value)
return;
const h2 = p.target;
l("change", u(h2.checked), p);
}
async function f(p) {
n.value || !o.value && !i.value && a.value && (p.composedPath().some((y) => y.tagName === "LABEL") || (t.value = u([false, e.falseValue, e.falseLabel].includes(t.value)), await nextTick(), c(t.value, p)));
}
const m = computed(() => (s == null ? void 0 : s.validateEvent) || e.validateEvent);
return watch(() => e.modelValue, () => {
m.value && (r == null || r.validate("change").catch((p) => Oe(p)));
}), {
handleChange: d,
onClickRoot: f
};
};
var lg = (e) => {
const t = ref(false), { emit: n } = getCurrentInstance(), o = inject(pn, void 0), i = computed(() => Ct(o) === false), a = ref(false), s = computed({
get() {
var r, l;
return i.value ? (r = o == null ? void 0 : o.modelValue) == null ? void 0 : r.value : (l = e.modelValue) != null ? l : t.value;
},
set(r) {
var l, u;
i.value && Ie(r) ? (a.value = ((l = o == null ? void 0 : o.max) == null ? void 0 : l.value) !== void 0 && r.length > (o == null ? void 0 : o.max.value) && r.length > s.value.length, a.value === false && ((u = o == null ? void 0 : o.changeEvent) == null || u.call(o, r))) : (n(we, r), t.value = r);
}
});
return {
model: s,
isGroup: i,
isLimitExceeded: a
};
};
var ug = (e, t, { model: n }) => {
const o = inject(pn, void 0), i = ref(false), a = computed(() => xn(e.value) ? e.label : e.value), s = computed(() => {
const c = n.value;
return ct(c) ? c : Ie(c) ? ke(a.value) ? c.map(toRaw).some((d) => bo(d, a.value)) : c.map(toRaw).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c;
}), r = ln(computed(() => {
var c;
return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value;
}), {
prop: true
}), l = ln(computed(() => {
var c;
return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value;
})), u = computed(() => !!t.default || !xn(a.value));
return {
checkboxButtonSize: r,
isChecked: s,
isFocused: i,
checkboxSize: l,
hasOwnLabel: u,
actualValue: a
};
};
var Jr = (e, t) => {
const { formItem: n } = fn(), { model: o, isGroup: i, isLimitExceeded: a } = lg(e), {
isFocused: s,
isChecked: r,
checkboxButtonSize: l,
checkboxSize: u,
hasOwnLabel: c,
actualValue: d
} = ug(e, t, { model: o }), { isDisabled: f } = sg({ model: o, isChecked: r }), { inputId: m, isLabeledByFormItem: p } = $o(e, {
formItemContext: n,
disableIdGeneration: c,
disableIdManagement: i
}), { handleChange: h2, onClickRoot: g } = rg(e, {
model: o,
isLimitExceeded: a,
hasOwnLabel: c,
isDisabled: f,
isLabeledByFormItem: p
});
return (() => {
function w() {
var M, T;
Ie(o.value) && !o.value.includes(d.value) ? o.value.push(d.value) : o.value = (T = (M = e.trueValue) != null ? M : e.trueLabel) != null ? T : true;
}
e.checked && w();
})(), 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"
}, computed(() => i.value && xn(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"
}, computed(() => !!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"
}, computed(() => !!e.falseLabel)), {
inputId: m,
isLabeledByFormItem: p,
isChecked: r,
isDisabled: f,
isFocused: s,
checkboxButtonSize: l,
checkboxSize: u,
hasOwnLabel: c,
model: o,
actualValue: d,
handleChange: h2,
onClickRoot: g
};
};
var cg = defineComponent({
name: "ElCheckbox"
});
var dg = defineComponent({
...cg,
props: qr,
emits: Gr,
setup(e) {
const t = e, n = useSlots(), {
inputId: o,
isLabeledByFormItem: i,
isChecked: a,
isDisabled: s,
isFocused: r,
checkboxSize: l,
hasOwnLabel: u,
model: c,
actualValue: d,
handleChange: f,
onClickRoot: m
} = Jr(t, n), p = ee("checkbox"), h2 = computed(() => [
p.b(),
p.m(l.value),
p.is("disabled", s.value),
p.is("bordered", t.border),
p.is("checked", a.value)
]), g = computed(() => [
p.e("input"),
p.is("disabled", s.value),
p.is("checked", a.value),
p.is("indeterminate", t.indeterminate),
p.is("focus", r.value)
]);
return (y, w) => (openBlock(), createBlock(resolveDynamicComponent(!unref(u) && unref(i) ? "span" : "label"), {
class: normalizeClass(unref(h2)),
"aria-controls": y.indeterminate ? y.ariaControls : null,
onClick: unref(m)
}, {
default: withCtx(() => {
var M, T, E, A;
return [
createBaseVNode("span", {
class: normalizeClass(unref(g))
}, [
y.trueValue || y.falseValue || y.trueLabel || y.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
key: 0,
id: unref(o),
"onUpdate:modelValue": (O) => isRef(c) ? c.value = O : null,
class: normalizeClass(unref(p).e("original")),
type: "checkbox",
indeterminate: y.indeterminate,
name: y.name,
tabindex: y.tabindex,
disabled: unref(s),
"true-value": (T = (M = y.trueValue) != null ? M : y.trueLabel) != null ? T : true,
"false-value": (A = (E = y.falseValue) != null ? E : y.falseLabel) != null ? A : false,
onChange: unref(f),
onFocus: (O) => r.value = true,
onBlur: (O) => r.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(c)]
]) : withDirectives((openBlock(), createElementBlock("input", {
key: 1,
id: unref(o),
"onUpdate:modelValue": (O) => isRef(c) ? c.value = O : null,
class: normalizeClass(unref(p).e("original")),
type: "checkbox",
indeterminate: y.indeterminate,
disabled: unref(s),
value: unref(d),
name: y.name,
tabindex: y.tabindex,
onChange: unref(f),
onFocus: (O) => r.value = true,
onBlur: (O) => r.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(c)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(p).e("inner"))
}, null, 2)
], 2),
unref(u) ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(p).e("label"))
}, [
renderSlot(y.$slots, "default"),
y.$slots.default ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createTextVNode(toDisplayString(y.label), 1)
], 64))
], 2)) : createCommentVNode("v-if", true)
];
}),
_: 3
}, 8, ["class", "aria-controls", "onClick"]));
}
});
var fg = X(dg, [["__file", "checkbox.vue"]]);
var pg = defineComponent({
name: "ElCheckboxButton"
});
var hg = defineComponent({
...pg,
props: qr,
emits: Gr,
setup(e) {
const t = e, n = useSlots(), {
isFocused: o,
isChecked: i,
isDisabled: a,
checkboxButtonSize: s,
model: r,
actualValue: l,
handleChange: u
} = Jr(t, n), c = inject(pn, void 0), d = ee("checkbox"), f = computed(() => {
var p, h2, g, y;
const w = (h2 = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? h2 : "";
return {
backgroundColor: w,
borderColor: w,
color: (y = (g = c == null ? void 0 : c.textColor) == null ? void 0 : g.value) != null ? y : "",
boxShadow: w ? `-1px 0 0 0 ${w}` : void 0
};
}), m = computed(() => [
d.b("button"),
d.bm("button", s.value),
d.is("disabled", a.value),
d.is("checked", i.value),
d.is("focus", o.value)
]);
return (p, h2) => {
var g, y, w, M;
return openBlock(), createElementBlock("label", {
class: normalizeClass(unref(m))
}, [
p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
key: 0,
"onUpdate:modelValue": (T) => isRef(r) ? r.value = T : null,
class: normalizeClass(unref(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: unref(a),
"true-value": (y = (g = p.trueValue) != null ? g : p.trueLabel) != null ? y : true,
"false-value": (M = (w = p.falseValue) != null ? w : p.falseLabel) != null ? M : false,
onChange: unref(u),
onFocus: (T) => o.value = true,
onBlur: (T) => o.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(r)]
]) : withDirectives((openBlock(), createElementBlock("input", {
key: 1,
"onUpdate:modelValue": (T) => isRef(r) ? r.value = T : null,
class: normalizeClass(unref(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: unref(a),
value: unref(l),
onChange: unref(u),
onFocus: (T) => o.value = true,
onBlur: (T) => o.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(r)]
]),
p.$slots.default || p.label ? (openBlock(), createElementBlock("span", {
key: 2,
class: normalizeClass(unref(d).be("button", "inner")),
style: normalizeStyle(unref(i) ? unref(f) : void 0)
}, [
renderSlot(p.$slots, "default", {}, () => [
createTextVNode(toDisplayString(p.label), 1)
])
], 6)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var Yr = X(hg, [["__file", "checkbox-button.vue"]]);
var vg = 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: true
},
...Ht(["ariaLabel"])
});
var mg = {
[we]: (e) => Ie(e),
change: (e) => Ie(e)
};
var gg = defineComponent({
name: "ElCheckboxGroup"
});
var yg = defineComponent({
...gg,
props: vg,
emits: mg,
setup(e, { emit: t }) {
const n = e, o = ee("checkbox"), { formItem: i } = fn(), { inputId: a, isLabeledByFormItem: s } = $o(n, {
formItemContext: i
}), r = async (u) => {
t(we, u), await nextTick(), t("change", u);
}, l = computed({
get() {
return n.modelValue;
},
set(u) {
r(u);
}
});
return provide(pn, {
...or(toRefs(n), [
"size",
"min",
"max",
"disabled",
"validateEvent",
"fill",
"textColor"
]),
modelValue: l,
changeEvent: r
}), watch(() => n.modelValue, () => {
n.validateEvent && (i == null || i.validate("change").catch((u) => Oe(u)));
}), (u, c) => {
var d;
return openBlock(), createBlock(resolveDynamicComponent(u.tag), {
id: unref(a),
class: normalizeClass(unref(o).b("group")),
role: "group",
"aria-label": unref(s) ? void 0 : u.ariaLabel || "checkbox-group",
"aria-labelledby": unref(s) ? (d = unref(i)) == null ? void 0 : d.labelId : void 0
}, {
default: withCtx(() => [
renderSlot(u.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
};
}
});
var Zr = X(yg, [["__file", "checkbox-group.vue"]]);
var Qr = Me(fg, {
CheckboxButton: Yr,
CheckboxGroup: Zr
});
zt(Yr);
var Xr = zt(Zr);
var el = 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
}
});
var bg = Q({
...el,
border: Boolean
});
var tl = {
[we]: (e) => He(e) || ve(e) || ct(e),
[Fi]: (e) => He(e) || ve(e) || ct(e)
};
var nl = Symbol("radioGroupKey");
var ol = (e, t) => {
const n = ref(), o = inject(nl, void 0), i = computed(() => !!o), a = computed(() => xn(e.value) ? e.label : e.value), s = computed({
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;
}
}), r = ln(computed(() => o == null ? void 0 : o.size)), l = Ro(computed(() => o == null ? void 0 : o.disabled)), u = ref(false), c = computed(() => l.value || i.value && s.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"
}, computed(() => i.value && xn(e.value))), {
radioRef: n,
isGroup: i,
radioGroup: o,
focus: u,
size: r,
disabled: l,
tabIndex: c,
modelValue: s,
actualValue: a
};
};
var wg = defineComponent({
name: "ElRadio"
});
var Sg = defineComponent({
...wg,
props: bg,
emits: tl,
setup(e, { emit: t }) {
const n = e, o = ee("radio"), { radioRef: i, radioGroup: a, focus: s, size: r, disabled: l, modelValue: u, actualValue: c } = ol(n, t);
function d() {
nextTick(() => t("change", u.value));
}
return (f, m) => {
var p;
return openBlock(), createElementBlock("label", {
class: normalizeClass([
unref(o).b(),
unref(o).is("disabled", unref(l)),
unref(o).is("focus", unref(s)),
unref(o).is("bordered", f.border),
unref(o).is("checked", unref(u) === unref(c)),
unref(o).m(unref(r))
])
}, [
createBaseVNode("span", {
class: normalizeClass([
unref(o).e("input"),
unref(o).is("disabled", unref(l)),
unref(o).is("checked", unref(u) === unref(c))
])
}, [
withDirectives(createBaseVNode("input", {
ref_key: "radioRef",
ref: i,
"onUpdate:modelValue": (h2) => isRef(u) ? u.value = h2 : null,
class: normalizeClass(unref(o).e("original")),
value: unref(c),
name: f.name || ((p = unref(a)) == null ? void 0 : p.name),
disabled: unref(l),
checked: unref(u) === unref(c),
type: "radio",
onFocus: (h2) => s.value = true,
onBlur: (h2) => s.value = false,
onChange: d,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
[vModelRadio, unref(u)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(o).e("inner"))
}, null, 2)
], 2),
createBaseVNode("span", {
class: normalizeClass(unref(o).e("label")),
onKeydown: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(f.$slots, "default", {}, () => [
createTextVNode(toDisplayString(f.label), 1)
])
], 42, ["onKeydown"])
], 2);
};
}
});
var Cg = X(Sg, [["__file", "radio.vue"]]);
var Eg = Q({
...el
});
var Ig = defineComponent({
name: "ElRadioButton"
});
var kg = defineComponent({
...Ig,
props: Eg,
setup(e) {
const t = e, n = ee("radio"), { radioRef: o, focus: i, size: a, disabled: s, modelValue: r, radioGroup: l, actualValue: u } = ol(t), c = computed(() => ({
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 openBlock(), createElementBlock("label", {
class: normalizeClass([
unref(n).b("button"),
unref(n).is("active", unref(r) === unref(u)),
unref(n).is("disabled", unref(s)),
unref(n).is("focus", unref(i)),
unref(n).bm("button", unref(a))
])
}, [
withDirectives(createBaseVNode("input", {
ref_key: "radioRef",
ref: o,
"onUpdate:modelValue": (p) => isRef(r) ? r.value = p : null,
class: normalizeClass(unref(n).be("button", "original-radio")),
value: unref(u),
type: "radio",
name: d.name || ((m = unref(l)) == null ? void 0 : m.name),
disabled: unref(s),
onFocus: (p) => i.value = true,
onBlur: (p) => i.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
[vModelRadio, unref(r)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(n).be("button", "inner")),
style: normalizeStyle(unref(r) === unref(u) ? unref(c) : {}),
onKeydown: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(d.$slots, "default", {}, () => [
createTextVNode(toDisplayString(d.label), 1)
])
], 46, ["onKeydown"])
], 2);
};
}
});
var il = X(kg, [["__file", "radio-button.vue"]]);
var Tg = 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: true
},
...Ht(["ariaLabel"])
});
var Ag = tl;
var Og = defineComponent({
name: "ElRadioGroup"
});
var Mg = defineComponent({
...Og,
props: Tg,
emits: Ag,
setup(e, { emit: t }) {
const n = e, o = ee("radio"), i = Dt(), a = ref(), { formItem: s } = fn(), { inputId: r, isLabeledByFormItem: l } = $o(n, {
formItemContext: s
}), u = (d) => {
t(we, d), nextTick(() => t("change", d));
};
onMounted(() => {
const d = a.value.querySelectorAll("[type=radio]"), f = d[0];
!Array.from(d).some((m) => m.checked) && f && (f.tabIndex = 0);
});
const c = computed(() => n.name || i.value);
return provide(nl, reactive({
...toRefs(n),
changeEvent: u,
name: c
})), watch(() => n.modelValue, () => {
n.validateEvent && (s == null || s.validate("change").catch((d) => Oe(d)));
}), (d, f) => (openBlock(), createElementBlock("div", {
id: unref(r),
ref_key: "radioGroupRef",
ref: a,
class: normalizeClass(unref(o).b("group")),
role: "radiogroup",
"aria-label": unref(l) ? void 0 : d.ariaLabel || "radio-group",
"aria-labelledby": unref(l) ? unref(s).labelId : void 0
}, [
renderSlot(d.$slots, "default")
], 10, ["id", "aria-label", "aria-labelledby"]));
}
});
var al = X(Mg, [["__file", "radio-group.vue"]]);
var sl = Me(Cg, {
RadioButton: il,
RadioGroup: al
});
var rl = zt(al);
zt(il);
var 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: lr
},
effect: {
type: String,
values: ["dark", "light", "plain"],
default: "light"
},
round: Boolean
});
var Pg = {
close: (e) => e instanceof MouseEvent,
click: (e) => e instanceof MouseEvent
};
var _g = defineComponent({
name: "ElTag"
});
var Lg = defineComponent({
..._g,
props: wi,
emits: Pg,
setup(e, { emit: t }) {
const n = e, o = ln(), i = ee("tag"), a = computed(() => {
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)
];
}), s = (u) => {
t("close", u);
}, r = (u) => {
t("click", u);
}, l = (u) => {
u.component.subTree.component.bum = null;
};
return (u, c) => u.disableTransitions ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(a)),
style: normalizeStyle({ backgroundColor: u.color }),
onClick: r
}, [
createBaseVNode("span", {
class: normalizeClass(unref(i).e("content"))
}, [
renderSlot(u.$slots, "default")
], 2),
u.closable ? (openBlock(), createBlock(unref(et), {
key: 0,
class: normalizeClass(unref(i).e("close")),
onClick: withModifiers(s, ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 6)) : (openBlock(), createBlock(Transition, {
key: 1,
name: `${unref(i).namespace.value}-zoom-in-center`,
appear: "",
onVnodeMounted: l
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(unref(a)),
style: normalizeStyle({ backgroundColor: u.color }),
onClick: r
}, [
createBaseVNode("span", {
class: normalizeClass(unref(i).e("content"))
}, [
renderSlot(u.$slots, "default")
], 2),
u.closable ? (openBlock(), createBlock(unref(et), {
key: 0,
class: normalizeClass(unref(i).e("close")),
onClick: withModifiers(s, ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 6)
]),
_: 3
}, 8, ["name"]));
}
});
var xg = X(Lg, [["__file", "tag.vue"]]);
var Fg = Me(xg);
var ll = Symbol("rowContextKey");
var Rg = [
"start",
"center",
"end",
"space-around",
"space-between",
"space-evenly"
];
var $g = ["top", "middle", "bottom"];
var Dg = Q({
tag: {
type: String,
default: "div"
},
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
values: Rg,
default: "start"
},
align: {
type: String,
values: $g
}
});
var Ng = defineComponent({
name: "ElRow"
});
var Bg = defineComponent({
...Ng,
props: Dg,
setup(e) {
const t = e, n = ee("row"), o = computed(() => t.gutter);
provide(ll, {
gutter: o
});
const i = computed(() => {
const s = {};
return t.gutter && (s.marginRight = s.marginLeft = `-${t.gutter / 2}px`), s;
}), a = computed(() => [
n.b(),
n.is(`justify-${t.justify}`, t.justify !== "start"),
n.is(`align-${t.align}`, !!t.align)
]);
return (s, r) => (openBlock(), createBlock(resolveDynamicComponent(s.tag), {
class: normalizeClass(unref(a)),
style: normalizeStyle(unref(i))
}, {
default: withCtx(() => [
renderSlot(s.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var Vg = X(Bg, [["__file", "row.vue"]]);
var Kn = Me(Vg);
var zg = 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: () => In({})
},
sm: {
type: U([Number, Object]),
default: () => In({})
},
md: {
type: U([Number, Object]),
default: () => In({})
},
lg: {
type: U([Number, Object]),
default: () => In({})
},
xl: {
type: U([Number, Object]),
default: () => In({})
}
});
var Hg = defineComponent({
name: "ElCol"
});
var jg = defineComponent({
...Hg,
props: zg,
setup(e) {
const t = e, { gutter: n } = inject(ll, { gutter: computed(() => 0) }), o = ee("col"), i = computed(() => {
const s = {};
return n.value && (s.paddingLeft = s.paddingRight = `${n.value / 2}px`), s;
}), a = computed(() => {
const s = [];
return ["span", "offset", "pull", "push"].forEach((u) => {
const c = t[u];
ve(c) && (u === "span" ? s.push(o.b(`${t[u]}`)) : c > 0 && s.push(o.b(`${u}-${t[u]}`)));
}), ["xs", "sm", "md", "lg", "xl"].forEach((u) => {
ve(t[u]) ? s.push(o.b(`${u}-${t[u]}`)) : ke(t[u]) && Object.entries(t[u]).forEach(([c, d]) => {
s.push(c !== "span" ? o.b(`${u}-${c}-${d}`) : o.b(`${u}-${d}`));
});
}), n.value && s.push(o.is("guttered")), [o.b(), s];
});
return (s, r) => (openBlock(), createBlock(resolveDynamicComponent(s.tag), {
class: normalizeClass(unref(a)),
style: normalizeStyle(unref(i))
}, {
default: withCtx(() => [
renderSlot(s.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var Kg = X(jg, [["__file", "col.vue"]]);
var Un = Me(Kg);
var Ug = Q({
mask: {
type: Boolean,
default: true
},
customMaskEvent: Boolean,
overlayClass: {
type: U([
String,
Array,
Object
])
},
zIndex: {
type: U([String, Number])
}
});
var Wg = {
click: (e) => e instanceof MouseEvent
};
var qg = "overlay";
var Gg = defineComponent({
name: "ElOverlay",
props: Ug,
emits: Wg,
setup(e, { slots: t, emit: n }) {
const o = ee(qg), i = (l) => {
n("click", l);
}, { onClick: a, onMousedown: s, onMouseup: r } = Er(e.customMaskEvent ? void 0 : i);
return () => e.mask ? createVNode("div", {
class: [o.b(), e.overlayClass],
style: {
zIndex: e.zIndex
},
onClick: a,
onMousedown: s,
onMouseup: r
}, [renderSlot(t, "default")], co.STYLE | co.CLASS | co.PROPS, ["onClick", "onMouseup", "onMousedown"]) : h("div", {
class: e.overlayClass,
style: {
zIndex: e.zIndex,
position: "fixed",
top: "0px",
right: "0px",
bottom: "0px",
left: "0px"
}
}, [renderSlot(t, "default")]);
}
});
var Jg = Gg;
var ul = Symbol("dialogInjectionKey");
var cl = Q({
center: Boolean,
alignCenter: Boolean,
closeIcon: {
type: tn
},
draggable: Boolean,
overflow: Boolean,
fullscreen: Boolean,
showClose: {
type: Boolean,
default: true
},
title: {
type: String,
default: ""
},
ariaLevel: {
type: String,
default: "2"
}
});
var Yg = {
close: () => true
};
var Zg = defineComponent({ name: "ElDialogContent" });
var Qg = defineComponent({
...Zg,
props: cl,
emits: Yg,
setup(e, { expose: t }) {
const n = e, { t: o } = Ri(), { Close: i } = Mp, { dialogRef: a, headerRef: s, bodyId: r, ns: l, style: u } = inject(ul), { focusTrapRef: c } = inject(Dr), d = computed(() => [
l.b(),
l.is("fullscreen", n.fullscreen),
l.is("draggable", n.draggable),
l.is("align-center", n.alignCenter),
{ [l.m("center")]: n.center }
]), f = Lp(c, a), m = computed(() => n.draggable), p = computed(() => n.overflow), { resetPosition: h2 } = Fp(a, s, m, p);
return t({
resetPosition: h2
}), (g, y) => (openBlock(), createElementBlock("div", {
ref: unref(f),
class: normalizeClass(unref(d)),
style: normalizeStyle(unref(u)),
tabindex: "-1"
}, [
createBaseVNode("header", {
ref_key: "headerRef",
ref: s,
class: normalizeClass([unref(l).e("header"), { "show-close": g.showClose }])
}, [
renderSlot(g.$slots, "header", {}, () => [
createBaseVNode("span", {
role: "heading",
"aria-level": g.ariaLevel,
class: normalizeClass(unref(l).e("title"))
}, toDisplayString(g.title), 11, ["aria-level"])
]),
g.showClose ? (openBlock(), createElementBlock("button", {
key: 0,
"aria-label": unref(o)("el.dialog.close"),
class: normalizeClass(unref(l).e("headerbtn")),
type: "button",
onClick: (w) => g.$emit("close")
}, [
createVNode(unref(et), {
class: normalizeClass(unref(l).e("close"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(g.closeIcon || unref(i))))
]),
_: 1
}, 8, ["class"])
], 10, ["aria-label", "onClick"])) : createCommentVNode("v-if", true)
], 2),
createBaseVNode("div", {
id: unref(r),
class: normalizeClass(unref(l).e("body"))
}, [
renderSlot(g.$slots, "default")
], 10, ["id"]),
g.$slots.footer ? (openBlock(), createElementBlock("footer", {
key: 0,
class: normalizeClass(unref(l).e("footer"))
}, [
renderSlot(g.$slots, "footer")
], 2)) : createCommentVNode("v-if", true)
], 6));
}
});
var Xg = X(Qg, [["__file", "dialog-content.vue"]]);
var ey = Q({
...cl,
appendToBody: Boolean,
appendTo: {
type: U([String, Object]),
default: "body"
},
beforeClose: {
type: U(Function)
},
destroyOnClose: Boolean,
closeOnClickModal: {
type: Boolean,
default: true
},
closeOnPressEscape: {
type: Boolean,
default: true
},
lockScroll: {
type: Boolean,
default: true
},
modal: {
type: Boolean,
default: true
},
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"
}
});
var ty = {
open: () => true,
opened: () => true,
close: () => true,
closed: () => true,
[we]: (e) => ct(e),
openAutoFocus: () => true,
closeAutoFocus: () => true
};
var ny = (e, t) => {
var n;
const i = getCurrentInstance().emit, { nextZIndex: a } = Ui();
let s = "";
const r = Dt(), l = Dt(), u = ref(false), c = ref(false), d = ref(false), f = ref((n = e.zIndex) != null ? n : a());
let m, p;
const h2 = Fo("namespace", On), g = computed(() => {
const Y = {}, $ = `--${h2.value}-dialog`;
return e.fullscreen || (e.top && (Y[`${$}-margin-top`] = e.top), e.width && (Y[`${$}-width`] = $t(e.width))), Y;
}), y = computed(() => e.alignCenter ? { display: "flex" } : {});
function w() {
i("opened");
}
function M() {
i("closed"), i(we, false), e.destroyOnClose && (d.value = false);
}
function T() {
i("close");
}
function E() {
p == null || p(), m == null || m(), e.openDelay && e.openDelay > 0 ? { stop: m } = ua(() => N(), e.openDelay) : N();
}
function A() {
m == null || m(), p == null || p(), e.closeDelay && e.closeDelay > 0 ? { stop: p } = ua(() => j(), e.closeDelay) : j();
}
function O() {
function Y($) {
$ || (c.value = true, u.value = false);
}
e.beforeClose ? e.beforeClose(Y) : A();
}
function D() {
e.closeOnClickModal && O();
}
function N() {
re && (u.value = true);
}
function j() {
u.value = false;
}
function I() {
i("openAutoFocus");
}
function K() {
i("closeAutoFocus");
}
function J(Y) {
var $;
(($ = Y.detail) == null ? void 0 : $.focusReason) === "pointer" && Y.preventDefault();
}
e.lockScroll && Vp(u);
function de() {
e.closeOnPressEscape && O();
}
return watch(() => e.modelValue, (Y) => {
Y ? (c.value = false, E(), d.value = true, f.value = nr(e.zIndex) ? a() : f.value++, nextTick(() => {
i("open"), t.value && (t.value.scrollTop = 0);
})) : u.value && A();
}), watch(() => e.fullscreen, (Y) => {
t.value && (Y ? (s = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = s);
}), onMounted(() => {
e.modelValue && (u.value = true, d.value = true, E());
}), {
afterEnter: w,
afterLeave: M,
beforeLeave: T,
handleClose: O,
onModalClick: D,
close: A,
doClose: j,
onOpenAutoFocus: I,
onCloseAutoFocus: K,
onCloseRequested: de,
onFocusoutPrevented: J,
titleId: r,
bodyId: l,
closed: c,
style: g,
overlayDialogStyle: y,
rendered: d,
visible: u,
zIndex: f
};
};
var oy = defineComponent({
name: "ElDialog",
inheritAttrs: false
});
var iy = defineComponent({
...oy,
props: ey,
emits: ty,
setup(e, { expose: t }) {
const n = e, o = useSlots();
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"
}, computed(() => !!o.title));
const i = ee("dialog"), a = ref(), s = ref(), r = ref(), {
visible: l,
titleId: u,
bodyId: c,
style: d,
overlayDialogStyle: f,
rendered: m,
zIndex: p,
afterEnter: h2,
afterLeave: g,
beforeLeave: y,
handleClose: w,
onModalClick: M,
onOpenAutoFocus: T,
onCloseAutoFocus: E,
onCloseRequested: A,
onFocusoutPrevented: O
} = ny(n, a);
provide(ul, {
dialogRef: a,
headerRef: s,
bodyId: c,
ns: i,
rendered: m,
style: d
});
const D = Er(M), N = computed(() => n.draggable && !n.fullscreen);
return t({
visible: l,
dialogContentRef: r,
resetPosition: () => {
var I;
(I = r.value) == null || I.resetPosition();
}
}), (I, K) => (openBlock(), createBlock(unref(zr), {
to: I.appendTo,
disabled: I.appendTo !== "body" ? false : !I.appendToBody
}, {
default: withCtx(() => [
createVNode(Transition, {
name: "dialog-fade",
onAfterEnter: unref(h2),
onAfterLeave: unref(g),
onBeforeLeave: unref(y),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createVNode(unref(Jg), {
"custom-mask-event": "",
mask: I.modal,
"overlay-class": I.modalClass,
"z-index": unref(p)
}, {
default: withCtx(() => [
createBaseVNode("div", {
role: "dialog",
"aria-modal": "true",
"aria-label": I.title || void 0,
"aria-labelledby": I.title ? void 0 : unref(u),
"aria-describedby": unref(c),
class: normalizeClass(`${unref(i).namespace.value}-overlay-dialog`),
style: normalizeStyle(unref(f)),
onClick: unref(D).onClick,
onMousedown: unref(D).onMousedown,
onMouseup: unref(D).onMouseup
}, [
createVNode(unref(Br), {
loop: "",
trapped: unref(l),
"focus-start-el": "container",
onFocusAfterTrapped: unref(T),
onFocusAfterReleased: unref(E),
onFocusoutPrevented: unref(O),
onReleaseRequested: unref(A)
}, {
default: withCtx(() => [
unref(m) ? (openBlock(), createBlock(Xg, mergeProps({
key: 0,
ref_key: "dialogContentRef",
ref: r
}, I.$attrs, {
center: I.center,
"align-center": I.alignCenter,
"close-icon": I.closeIcon,
draggable: unref(N),
overflow: I.overflow,
fullscreen: I.fullscreen,
"show-close": I.showClose,
title: I.title,
"aria-level": I.headerAriaLevel,
onClose: unref(w)
}), createSlots({
header: withCtx(() => [
I.$slots.title ? renderSlot(I.$slots, "title", { key: 1 }) : renderSlot(I.$slots, "header", {
key: 0,
close: unref(w),
titleId: unref(u),
titleClass: unref(i).e("title")
})
]),
default: withCtx(() => [
renderSlot(I.$slots, "default")
]),
_: 2
}, [
I.$slots.footer ? {
name: "footer",
fn: withCtx(() => [
renderSlot(I.$slots, "footer")
])
} : void 0
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
]),
_: 3
}, 8, ["mask", "overlay-class", "z-index"]), [
[vShow, unref(l)]
])
]),
_: 3
}, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
]),
_: 3
}, 8, ["to", "disabled"]));
}
});
var ay = X(iy, [["__file", "dialog.vue"]]);
var sy = Me(ay);
var ry = defineComponent({
inheritAttrs: false
});
function ly(e, t, n, o, i, a) {
return renderSlot(e.$slots, "default");
}
var uy = X(ry, [["render", ly], ["__file", "collection.vue"]]);
var cy = defineComponent({
name: "ElCollectionItem",
inheritAttrs: false
});
function dy(e, t, n, o, i, a) {
return renderSlot(e.$slots, "default");
}
var fy = X(cy, [["render", dy], ["__file", "collection-item.vue"]]);
var py = "data-el-collection-item";
var hy = (e) => {
const t = `El${e}Collection`, n = `${t}Item`, o = Symbol(t), i = Symbol(n), a = {
...uy,
name: t,
setup() {
const r = ref(null), l = /* @__PURE__ */ new Map();
provide(o, {
itemMap: l,
getItems: () => {
const c = unref(r);
if (!c)
return [];
const d = Array.from(c.querySelectorAll(`[${py}]`));
return [...l.values()].sort((m, p) => d.indexOf(m.ref) - d.indexOf(p.ref));
},
collectionRef: r
});
}
}, s = {
...fy,
name: n,
setup(r, { attrs: l }) {
const u = ref(null), c = inject(o, void 0);
provide(i, {
collectionItemRef: u
}), onMounted(() => {
const d = unref(u);
d && c.itemMap.set(d, {
ref: d,
...l
});
}), onBeforeUnmount(() => {
const d = unref(u);
c.itemMap.delete(d);
});
}
};
return {
COLLECTION_INJECTION_KEY: o,
COLLECTION_ITEM_INJECTION_KEY: i,
ElCollection: a,
ElCollectionItem: s
};
};
var ni = Q({
trigger: Nn.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: true
},
loop: {
type: Boolean,
default: true
},
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) }
});
hy("Dropdown");
var dl = Symbol("ElSelectGroup");
var No = Symbol("ElSelect");
function vy(e, t) {
const n = inject(No), o = inject(dl, { disabled: false }), i = computed(() => c(St(n.props.modelValue), e.value)), a = computed(() => {
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 false;
}), s = computed(() => e.label || (ke(e.value) ? "" : e.value)), r = computed(() => e.value || e.label || ""), l = computed(() => e.disabled || t.groupDisabled || a.value), u = getCurrentInstance(), c = (m = [], p) => {
if (ke(e.value)) {
const h2 = n.props.valueKey;
return m && m.some((g) => toRaw(at(g, h2)) === at(p, h2));
} 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(Ip(m), "i");
t.visible = p.test(s.value) || e.created;
};
return watch(() => s.value, () => {
!e.created && !n.props.remote && n.setSelected();
}), watch(() => e.value, (m, p) => {
const { remote: h2, valueKey: g } = n.props;
if (m !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !h2) {
if (g && ke(m) && ke(p) && m[g] === p[g])
return;
n.setSelected();
}
}), watch(() => o.disabled, () => {
t.groupDisabled = o.disabled;
}, { immediate: true }), {
select: n,
currentLabel: s,
currentValue: r,
itemSelected: i,
isDisabled: l,
hoverItem: d,
updateOption: f
};
}
var my = defineComponent({
name: "ElOption",
componentName: "ElOption",
props: {
value: {
required: true,
type: [String, Number, Boolean, Object]
},
label: [String, Number],
created: Boolean,
disabled: Boolean
},
setup(e) {
const t = ee("select"), n = Dt(), o = computed(() => [
t.be("dropdown", "item"),
t.is("disabled", unref(r)),
t.is("selected", unref(s)),
t.is("hovering", unref(f))
]), i = reactive({
index: -1,
groupDisabled: false,
visible: true,
hover: false
}), {
currentLabel: a,
itemSelected: s,
isDisabled: r,
select: l,
hoverItem: u,
updateOption: c
} = vy(e, i), { visible: d, hover: f } = toRefs(i), m = getCurrentInstance().proxy;
l.onOptionCreate(m), onBeforeUnmount(() => {
const h2 = m.value, { selected: g } = l.states, w = (l.props.multiple ? g : [g]).some((M) => M.value === m.value);
nextTick(() => {
l.states.cachedOptions.get(h2) === m && !w && l.states.cachedOptions.delete(h2);
}), l.onOptionDestroy(h2, m);
});
function p() {
r.value || l.handleOptionSelect(m);
}
return {
ns: t,
id: n,
containerKls: o,
currentLabel: a,
itemSelected: s,
isDisabled: r,
select: l,
hoverItem: u,
updateOption: c,
visible: d,
hover: f,
selectOptionClick: p,
states: i
};
}
});
function gy(e, t, n, o, i, a) {
return withDirectives((openBlock(), createElementBlock("li", {
id: e.id,
class: normalizeClass(e.containerKls),
role: "option",
"aria-disabled": e.isDisabled || void 0,
"aria-selected": e.itemSelected,
onMouseenter: e.hoverItem,
onClick: withModifiers(e.selectOptionClick, ["stop"])
}, [
renderSlot(e.$slots, "default", {}, () => [
createBaseVNode("span", null, toDisplayString(e.currentLabel), 1)
])
], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
[vShow, e.visible]
]);
}
var Qi = X(my, [["render", gy], ["__file", "option.vue"]]);
var yy = defineComponent({
name: "ElSelectDropdown",
componentName: "ElSelectDropdown",
setup() {
const e = inject(No), t = ee("select"), n = computed(() => e.props.popperClass), o = computed(() => e.props.multiple), i = computed(() => e.props.fitInputWidth), a = ref("");
function s() {
var r;
a.value = `${(r = e.selectRef) == null ? void 0 : r.offsetWidth}px`;
}
return onMounted(() => {
s(), bt(e.selectRef, s);
}), {
ns: t,
minWidth: a,
popperClass: n,
isMultiple: o,
isFitInputWidth: i
};
}
});
function by(e, t, n, o, i, a) {
return openBlock(), createElementBlock("div", {
class: normalizeClass([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
style: normalizeStyle({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
}, [
e.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(e.ns.be("dropdown", "header"))
}, [
renderSlot(e.$slots, "header")
], 2)) : createCommentVNode("v-if", true),
renderSlot(e.$slots, "default"),
e.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(e.ns.be("dropdown", "footer"))
}, [
renderSlot(e.$slots, "footer")
], 2)) : createCommentVNode("v-if", true)
], 6);
}
var wy = X(yy, [["render", by], ["__file", "select-dropdown.vue"]]);
var Sy = 11;
var Cy = (e, t) => {
const { t: n } = Ri(), o = Dt(), i = ee("select"), a = ee("input"), s = reactive({
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: false,
menuVisibleOnFocus: false,
isBeforeHide: false
}), r = ref(null), l = ref(null), u = ref(null), c = ref(null), d = ref(null), f = ref(null), m = ref(null), p = ref(null), h2 = ref(null), g = ref(null), y = ref(null), w = ref(null), {
isComposing: M,
handleCompositionStart: T,
handleCompositionUpdate: E,
handleCompositionEnd: A
} = iv({
afterComposition: (C) => bn(C)
}), { wrapperRef: O, isFocused: D } = ov(d, {
beforeFocus() {
return $.value;
},
afterFocus() {
e.automaticDropdown && !N.value && (N.value = true, s.menuVisibleOnFocus = true);
},
beforeBlur(C) {
var F, G;
return ((F = u.value) == null ? void 0 : F.isFocusInsideContent(C)) || ((G = c.value) == null ? void 0 : G.isFocusInsideContent(C));
},
afterBlur() {
N.value = false, s.menuVisibleOnFocus = false;
}
}), N = ref(false), j = ref(), { form: I, formItem: K } = fn(), { inputId: J } = $o(e, {
formItemContext: K
}), { valueOnClear: de, isEmptyValue: Y } = uv(e), $ = computed(() => e.disabled || (I == null ? void 0 : I.disabled)), te = computed(() => Ie(e.modelValue) ? e.modelValue.length > 0 : !Y(e.modelValue)), xe = computed(() => e.clearable && !$.value && s.inputHovering && te.value), ye = computed(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), be = computed(() => i.is("reverse", ye.value && N.value)), Pe = computed(() => (K == null ? void 0 : K.validateState) || ""), Ue = computed(() => Pp[Pe.value]), jt = computed(() => e.remote ? 300 : 0), We = computed(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !s.inputValue && s.options.size === 0 ? false : e.filterable && s.inputValue && s.options.size > 0 && Ce.value === 0 ? e.noMatchText || n("el.select.noMatch") : s.options.size === 0 ? e.noDataText || n("el.select.noData") : null), Ce = computed(() => ue.value.filter((C) => C.visible).length), ue = computed(() => {
const C = Array.from(s.options.values()), F = [];
return s.optionValues.forEach((G) => {
const oe = C.findIndex((vt) => vt.value === G);
oe > -1 && F.push(C[oe]);
}), F.length >= C.length ? F : C;
}), Tt = computed(() => Array.from(s.cachedOptions.values())), ht = computed(() => {
const C = ue.value.filter((F) => !F.created).some((F) => F.currentLabel === s.inputValue);
return e.filterable && e.allowCreate && s.inputValue !== "" && !C;
}), qn = () => {
e.filterable && Se(e.filterMethod) || e.filterable && e.remote && Se(e.remoteMethod) || ue.value.forEach((C) => {
var F;
(F = C.updateOption) == null || F.call(C, s.inputValue);
});
}, Gn = ln(), hn2 = computed(() => ["small"].includes(Gn.value) ? "small" : "default"), zo = computed({
get() {
return N.value && We.value !== false;
},
set(C) {
N.value = C;
}
}), Jn = computed(() => {
if (e.multiple && !Ct(e.modelValue))
return St(e.modelValue).length === 0 && !s.inputValue;
const C = Ie(e.modelValue) ? e.modelValue[0] : e.modelValue;
return e.filterable || Ct(C) ? !s.inputValue : true;
}), Ho = computed(() => {
var C;
const F = (C = e.placeholder) != null ? C : n("el.select.placeholder");
return e.multiple || !te.value ? F : s.selectedLabel;
}), jo = computed(() => ri ? null : "mouseenter");
watch(() => e.modelValue, (C, F) => {
e.multiple && e.filterable && !e.reserveKeyword && (s.inputValue = "", At("")), Kt(), !bo(C, F) && e.validateEvent && (K == null || K.validate("change").catch((G) => Oe(G)));
}, {
flush: "post",
deep: true
}), watch(() => N.value, (C) => {
C ? At(s.inputValue) : (s.inputValue = "", s.previousQuery = null, s.isBeforeHide = true), t("visible-change", C);
}), watch(() => s.options.entries(), () => {
var C;
if (!re)
return;
const F = ((C = r.value) == null ? void 0 : C.querySelectorAll("input")) || [];
(!e.filterable && !e.defaultFirstOption && !Ct(e.modelValue) || !Array.from(F).includes(document.activeElement)) && Kt(), e.defaultFirstOption && (e.filterable || e.remote) && Ce.value && vn();
}, {
flush: "post"
}), watch(() => s.hoveringIndex, (C) => {
ve(C) && C > -1 ? j.value = ue.value[C] || {} : j.value = {}, ue.value.forEach((F) => {
F.hover = j.value === F;
});
}), watchEffect(() => {
s.isBeforeHide || qn();
});
const At = (C) => {
s.previousQuery === C || M.value || (s.previousQuery = C, e.filterable && Se(e.filterMethod) ? e.filterMethod(C) : e.filterable && e.remote && Se(e.remoteMethod) && e.remoteMethod(C), e.defaultFirstOption && (e.filterable || e.remote) && Ce.value ? nextTick(vn) : nextTick(nt));
}, vn = () => {
const C = ue.value.filter((oe) => oe.visible && !oe.disabled && !oe.states.groupDisabled), F = C.find((oe) => oe.created), G = C[0];
s.hoveringIndex = oa(ue.value, F || G);
}, Kt = () => {
if (e.multiple)
s.selectedLabel = "";
else {
const F = Ie(e.modelValue) ? e.modelValue[0] : e.modelValue, G = Yn(F);
s.selectedLabel = G.currentLabel, s.selected = [G];
return;
}
const C = [];
Ct(e.modelValue) || St(e.modelValue).forEach((F) => {
C.push(Yn(F));
}), s.selected = C;
}, Yn = (C) => {
let F;
const G = Uo(C).toLowerCase() === "object", oe = Uo(C).toLowerCase() === "null", vt = Uo(C).toLowerCase() === "undefined";
for (let Mt = s.cachedOptions.size - 1; Mt >= 0; Mt--) {
const qe = Tt.value[Mt];
if (G ? at(qe.value, e.valueKey) === at(C, e.valueKey) : qe.value === C) {
F = {
value: C,
currentLabel: qe.currentLabel,
get isDisabled() {
return qe.isDisabled;
}
};
break;
}
}
if (F)
return F;
const Wt = G ? C.label : !oe && !vt ? C : "";
return {
value: C,
currentLabel: Wt
};
}, nt = () => {
s.hoveringIndex = ue.value.findIndex((C) => s.selected.some((F) => Ko(F) === Ko(C)));
}, Ut = () => {
s.selectionWidth = l.value.getBoundingClientRect().width;
}, mn = () => {
s.calculatorWidth = f.value.getBoundingClientRect().width;
}, Zn = () => {
s.collapseItemWidth = y.value.getBoundingClientRect().width;
}, Ot = () => {
var C, F;
(F = (C = u.value) == null ? void 0 : C.updatePopper) == null || F.call(C);
}, gn = () => {
var C, F;
(F = (C = c.value) == null ? void 0 : C.updatePopper) == null || F.call(C);
}, yn = () => {
s.inputValue.length > 0 && !N.value && (N.value = true), At(s.inputValue);
}, bn = (C) => {
if (s.inputValue = C.target.value, e.remote)
wn2();
else
return yn();
}, wn2 = yp(() => {
yn();
}, jt.value), Sn = (C) => {
bo(e.modelValue, C) || t(Fi, C);
}, bl = (C) => bp(C, (F) => !s.disabledOptions.has(F)), wl = (C) => {
if (e.multiple && C.code !== Rn.delete && C.target.value.length <= 0) {
const F = St(e.modelValue).slice(), G = bl(F);
if (G < 0)
return;
const oe = F[G];
F.splice(G, 1), t(we, F), Sn(F), t("remove-tag", oe);
}
}, Sl = (C, F) => {
const G = s.selected.indexOf(F);
if (G > -1 && !$.value) {
const oe = St(e.modelValue).slice();
oe.splice(G, 1), t(we, oe), Sn(oe), t("remove-tag", F.value);
}
C.stopPropagation(), Xn();
}, ta = (C) => {
C.stopPropagation();
const F = e.multiple ? [] : de.value;
if (e.multiple)
for (const G of s.selected)
G.isDisabled && F.push(G.value);
t(we, F), Sn(F), s.hoveringIndex = -1, N.value = false, t("clear"), Xn();
}, na = (C) => {
var F;
if (e.multiple) {
const G = St((F = e.modelValue) != null ? F : []).slice(), oe = oa(G, C.value);
oe > -1 ? G.splice(oe, 1) : (e.multipleLimit <= 0 || G.length < e.multipleLimit) && G.push(C.value), t(we, G), Sn(G), C.created && At(""), e.filterable && !e.reserveKeyword && (s.inputValue = "");
} else
t(we, C.value), Sn(C.value), N.value = false;
Xn(), !N.value && nextTick(() => {
Qn(C);
});
}, oa = (C = [], F) => {
if (!ke(F))
return C.indexOf(F);
const G = e.valueKey;
let oe = -1;
return C.some((vt, Wt) => toRaw(at(vt, G)) === at(F, G) ? (oe = Wt, true) : false), oe;
}, Qn = (C) => {
var F, G, oe, vt, Wt;
const eo = Ie(C) ? C[0] : C;
let Mt = null;
if (eo != null && eo.value) {
const qe = ue.value.filter((ra) => ra.value === eo.value);
qe.length > 0 && (Mt = qe[0].$el);
}
if (u.value && Mt) {
const qe = (vt = (oe = (G = (F = u.value) == null ? void 0 : F.popperRef) == null ? void 0 : G.contentRef) == null ? void 0 : oe.querySelector) == null ? void 0 : vt.call(oe, `.${i.be("dropdown", "wrap")}`);
qe && Ap(qe, Mt);
}
(Wt = w.value) == null || Wt.handleScroll();
}, Cl = (C) => {
s.options.set(C.value, C), s.cachedOptions.set(C.value, C), C.disabled && s.disabledOptions.set(C.value, C);
}, El = (C, F) => {
s.options.get(C) === F && s.options.delete(C);
}, Il = computed(() => {
var C, F;
return (F = (C = u.value) == null ? void 0 : C.popperRef) == null ? void 0 : F.contentRef;
}), kl = () => {
s.isBeforeHide = false, nextTick(() => Qn(s.selected));
}, Xn = () => {
var C;
(C = d.value) == null || C.focus();
}, ia = () => {
var C;
(C = d.value) == null || C.blur();
}, Tl = (C) => {
ta(C);
}, Al = () => {
N.value = false, D.value && ia();
}, Ol = () => {
s.inputValue.length > 0 ? s.inputValue = "" : N.value = false;
}, aa = () => {
$.value || (ri && (s.inputHovering = true), s.menuVisibleOnFocus ? s.menuVisibleOnFocus = false : N.value = !N.value);
}, Ml = () => {
N.value ? ue.value[s.hoveringIndex] && na(ue.value[s.hoveringIndex]) : aa();
}, Ko = (C) => ke(C.value) ? at(C.value, e.valueKey) : C.value, Pl = computed(() => ue.value.filter((C) => C.visible).every((C) => C.disabled)), _l = computed(() => e.multiple ? e.collapseTags ? s.selected.slice(0, e.maxCollapseTags) : s.selected : []), Ll = computed(() => e.multiple ? e.collapseTags ? s.selected.slice(e.maxCollapseTags) : [] : []), sa = (C) => {
if (!N.value) {
N.value = true;
return;
}
if (!(s.options.size === 0 || s.filteredOptionsCount === 0 || M.value) && !Pl.value) {
C === "next" ? (s.hoveringIndex++, s.hoveringIndex === s.options.size && (s.hoveringIndex = 0)) : C === "prev" && (s.hoveringIndex--, s.hoveringIndex < 0 && (s.hoveringIndex = s.options.size - 1));
const F = ue.value[s.hoveringIndex];
(F.disabled === true || F.states.groupDisabled === true || !F.visible) && sa(C), nextTick(() => Qn(j.value));
}
}, xl = () => {
if (!l.value)
return 0;
const C = window.getComputedStyle(l.value);
return Number.parseFloat(C.gap || "6px");
}, Fl = computed(() => {
const C = xl();
return { maxWidth: `${y.value && e.maxCollapseTags === 1 ? s.selectionWidth - s.collapseItemWidth - C : s.selectionWidth}px` };
}), Rl = computed(() => ({ maxWidth: `${s.selectionWidth}px` })), $l = computed(() => ({
width: `${Math.max(s.calculatorWidth, Sy)}px`
}));
return bt(l, Ut), bt(f, mn), bt(h2, Ot), bt(O, Ot), bt(g, gn), bt(y, Zn), onMounted(() => {
Kt();
}), {
inputId: J,
contentId: o,
nsSelect: i,
nsInput: a,
states: s,
isFocused: D,
expanded: N,
optionsArray: ue,
hoverOption: j,
selectSize: Gn,
filteredOptionsCount: Ce,
resetCalculatorWidth: mn,
updateTooltip: Ot,
updateTagTooltip: gn,
debouncedOnInputChange: wn2,
onInput: bn,
deletePrevTag: wl,
deleteTag: Sl,
deleteSelected: ta,
handleOptionSelect: na,
scrollToOption: Qn,
hasModelValue: te,
shouldShowPlaceholder: Jn,
currentPlaceholder: Ho,
mouseEnterEventName: jo,
showClose: xe,
iconComponent: ye,
iconReverse: be,
validateState: Pe,
validateIcon: Ue,
showNewOption: ht,
updateOptions: qn,
collapseTagSize: hn2,
setSelected: Kt,
selectDisabled: $,
emptyText: We,
handleCompositionStart: T,
handleCompositionUpdate: E,
handleCompositionEnd: A,
onOptionCreate: Cl,
onOptionDestroy: El,
handleMenuEnter: kl,
focus: Xn,
blur: ia,
handleClearClick: Tl,
handleClickOutside: Al,
handleEsc: Ol,
toggleMenu: aa,
selectOption: Ml,
getValueKey: Ko,
navigateOptions: sa,
dropdownMenuVisible: zo,
showTagList: _l,
collapseTagList: Ll,
tagStyle: Fl,
collapseTagStyle: Rl,
inputStyle: $l,
popperRef: Il,
inputRef: d,
tooltipRef: u,
tagTooltipRef: c,
calculatorRef: f,
prefixRef: m,
suffixRef: p,
selectRef: r,
wrapperRef: O,
selectionRef: l,
scrollbarRef: w,
menuRef: h2,
tagMenuRef: g,
collapseItemRef: y
};
};
var Ey = defineComponent({
name: "ElOptions",
setup(e, { slots: t }) {
const n = inject(No);
let o = [];
return () => {
var i, a;
const s = (i = t.default) == null ? void 0 : i.call(t), r = [];
function l(u) {
Ie(u) && u.forEach((c) => {
var d, f, m, p;
const h2 = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name;
h2 === "ElOptionGroup" ? l(!He(c.children) && !Ie(c.children) && Se((f = c.children) == null ? void 0 : f.default) ? (m = c.children) == null ? void 0 : m.default() : c.children) : h2 === "ElOption" ? r.push((p = c.props) == null ? void 0 : p.value) : Ie(c.children) && l(c.children);
});
}
return s.length && l((a = s[0]) == null ? void 0 : a.children), bo(r, o) || (o = r, n && (n.states.optionValues = r)), s;
};
}
});
var Iy = 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: true
},
valueKey: {
type: String,
default: "value"
},
collapseTags: Boolean,
collapseTagsTooltip: Boolean,
maxCollapseTags: {
type: Number,
default: 1
},
teleported: Le.teleported,
persistent: {
type: Boolean,
default: true
},
clearIcon: {
type: tn,
default: circle_close_default
},
fitInputWidth: Boolean,
suffixIcon: {
type: tn,
default: arrow_down_default
},
tagType: { ...wi.type, default: "info" },
tagEffect: { ...wi.effect, default: "light" },
validateEvent: {
type: Boolean,
default: true
},
remoteShowSuffix: Boolean,
placement: {
type: U(String),
values: Lo,
default: "bottom-start"
},
fallbackPlacements: {
type: U(Array),
default: ["bottom-start", "top-start", "right", "left"]
},
appendTo: String,
...lv,
...Ht(["ariaLabel"])
});
var Ss = "ElSelect";
var ky = defineComponent({
name: Ss,
componentName: Ss,
components: {
ElSelectMenu: wy,
ElOption: Qi,
ElOptions: Ey,
ElTag: Fg,
ElScrollbar: _v,
ElTooltip: Hr,
ElIcon: et
},
directives: { ClickOutside: ag },
props: Iy,
emits: [
we,
Fi,
"remove-tag",
"clear",
"visible-change",
"focus",
"blur"
],
setup(e, { emit: t }) {
const n = computed(() => {
const { modelValue: a, multiple: s } = e, r = s ? [] : void 0;
return Ie(a) ? s ? a : r : s ? r : a;
}), o = reactive({
...toRefs(e),
modelValue: n
}), i = Cy(o, t);
return provide(No, reactive({
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 Ty(e, t, n, o, i, a) {
const s = resolveComponent("el-tag"), r = resolveComponent("el-tooltip"), l = resolveComponent("el-icon"), u = resolveComponent("el-option"), c = resolveComponent("el-options"), d = resolveComponent("el-scrollbar"), f = resolveComponent("el-select-menu"), m = resolveDirective("click-outside");
return withDirectives((openBlock(), createElementBlock("div", {
ref: "selectRef",
class: normalizeClass([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
[toHandlerKey(e.mouseEnterEventName)]: (p) => e.states.inputHovering = true,
onMouseleave: (p) => e.states.inputHovering = false
}, [
createVNode(r, {
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": false,
"gpu-acceleration": false,
persistent: e.persistent,
"append-to": e.appendTo,
onBeforeShow: e.handleMenuEnter,
onHide: (p) => e.states.isBeforeHide = false
}, {
default: withCtx(() => {
var p;
return [
createBaseVNode("div", {
ref: "wrapperRef",
class: normalizeClass([
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: withModifiers(e.toggleMenu, ["prevent"])
}, [
e.$slots.prefix ? (openBlock(), createElementBlock("div", {
key: 0,
ref: "prefixRef",
class: normalizeClass(e.nsSelect.e("prefix"))
}, [
renderSlot(e.$slots, "prefix")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
ref: "selectionRef",
class: normalizeClass([
e.nsSelect.e("selection"),
e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
])
}, [
e.multiple ? renderSlot(e.$slots, "tag", { key: 0 }, () => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.showTagList, (h2) => (openBlock(), createElementBlock("div", {
key: e.getValueKey(h2),
class: normalizeClass(e.nsSelect.e("selected-item"))
}, [
createVNode(s, {
closable: !e.selectDisabled && !h2.isDisabled,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: normalizeStyle(e.tagStyle),
onClose: (g) => e.deleteTag(g, h2)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(e.nsSelect.e("tags-text"))
}, [
renderSlot(e.$slots, "label", {
label: h2.currentLabel,
value: h2.value
}, () => [
createTextVNode(toDisplayString(h2.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
], 2))), 128)),
e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (openBlock(), createBlock(r, {
key: 0,
ref: "tagTooltipRef",
disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
"fallback-placements": ["bottom", "top", "right", "left"],
effect: e.effect,
placement: "bottom",
teleported: e.teleported
}, {
default: withCtx(() => [
createBaseVNode("div", {
ref: "collapseItemRef",
class: normalizeClass(e.nsSelect.e("selected-item"))
}, [
createVNode(s, {
closable: false,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: normalizeStyle(e.collapseTagStyle)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(e.nsSelect.e("tags-text"))
}, " + " + toDisplayString(e.states.selected.length - e.maxCollapseTags), 3)
]),
_: 1
}, 8, ["size", "type", "effect", "style"])
], 2)
]),
content: withCtx(() => [
createBaseVNode("div", {
ref: "tagMenuRef",
class: normalizeClass(e.nsSelect.e("selection"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.collapseTagList, (h2) => (openBlock(), createElementBlock("div", {
key: e.getValueKey(h2),
class: normalizeClass(e.nsSelect.e("selected-item"))
}, [
createVNode(s, {
class: "in-tooltip",
closable: !e.selectDisabled && !h2.isDisabled,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
onClose: (g) => e.deleteTag(g, h2)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(e.nsSelect.e("tags-text"))
}, [
renderSlot(e.$slots, "label", {
label: h2.currentLabel,
value: h2.value
}, () => [
createTextVNode(toDisplayString(h2.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "onClose"])
], 2))), 128))
], 2)
]),
_: 3
}, 8, ["disabled", "effect", "teleported"])) : createCommentVNode("v-if", true)
]) : createCommentVNode("v-if", true),
e.selectDisabled ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([
e.nsSelect.e("selected-item"),
e.nsSelect.e("input-wrapper"),
e.nsSelect.is("hidden", !e.filterable)
])
}, [
withDirectives(createBaseVNode("input", {
id: e.inputId,
ref: "inputRef",
"onUpdate:modelValue": (h2) => e.states.inputValue = h2,
type: "text",
name: e.name,
class: normalizeClass([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
disabled: e.selectDisabled,
autocomplete: e.autocomplete,
style: normalizeStyle(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: [
withKeys(withModifiers((h2) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
withKeys(withModifiers((h2) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
withKeys(withModifiers(e.handleEsc, ["stop", "prevent"]), ["esc"]),
withKeys(withModifiers(e.selectOption, ["stop", "prevent"]), ["enter"]),
withKeys(withModifiers(e.deletePrevTag, ["stop"]), ["delete"])
],
onCompositionstart: e.handleCompositionStart,
onCompositionupdate: e.handleCompositionUpdate,
onCompositionend: e.handleCompositionEnd,
onInput: e.onInput,
onClick: withModifiers(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"]), [
[vModelText, e.states.inputValue]
]),
e.filterable ? (openBlock(), createElementBlock("span", {
key: 0,
ref: "calculatorRef",
"aria-hidden": "true",
class: normalizeClass(e.nsSelect.e("input-calculator")),
textContent: toDisplayString(e.states.inputValue)
}, null, 10, ["textContent"])) : createCommentVNode("v-if", true)
], 2)),
e.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass([
e.nsSelect.e("selected-item"),
e.nsSelect.e("placeholder"),
e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
])
}, [
e.hasModelValue ? renderSlot(e.$slots, "label", {
key: 0,
label: e.currentPlaceholder,
value: e.modelValue
}, () => [
createBaseVNode("span", null, toDisplayString(e.currentPlaceholder), 1)
]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(e.currentPlaceholder), 1))
], 2)) : createCommentVNode("v-if", true)
], 2),
createBaseVNode("div", {
ref: "suffixRef",
class: normalizeClass(e.nsSelect.e("suffix"))
}, [
e.iconComponent && !e.showClose ? (openBlock(), createBlock(l, {
key: 0,
class: normalizeClass([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(e.iconComponent)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
e.showClose && e.clearIcon ? (openBlock(), createBlock(l, {
key: 1,
class: normalizeClass([
e.nsSelect.e("caret"),
e.nsSelect.e("icon"),
e.nsSelect.e("clear")
]),
onClick: e.handleClearClick
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(e.clearIcon)))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
e.validateState && e.validateIcon ? (openBlock(), createBlock(l, {
key: 2,
class: normalizeClass([e.nsInput.e("icon"), e.nsInput.e("validateIcon")])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(e.validateIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)
], 10, ["onClick"])
];
}),
content: withCtx(() => [
createVNode(f, { ref: "menuRef" }, {
default: withCtx(() => [
e.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(e.nsSelect.be("dropdown", "header")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(e.$slots, "header")
], 10, ["onClick"])) : createCommentVNode("v-if", true),
withDirectives(createVNode(d, {
id: e.contentId,
ref: "scrollbarRef",
tag: "ul",
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
"view-class": e.nsSelect.be("dropdown", "list"),
class: normalizeClass([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
role: "listbox",
"aria-label": e.ariaLabel,
"aria-orientation": "vertical"
}, {
default: withCtx(() => [
e.showNewOption ? (openBlock(), createBlock(u, {
key: 0,
value: e.states.inputValue,
created: true
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
createVNode(c, null, {
default: withCtx(() => [
renderSlot(e.$slots, "default")
]),
_: 3
})
]),
_: 3
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
[vShow, e.states.options.size > 0 && !e.loading]
]),
e.$slots.loading && e.loading ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(e.nsSelect.be("dropdown", "loading"))
}, [
renderSlot(e.$slots, "loading")
], 2)) : e.loading || e.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass(e.nsSelect.be("dropdown", "empty"))
}, [
renderSlot(e.$slots, "empty", {}, () => [
createBaseVNode("span", null, toDisplayString(e.emptyText), 1)
])
], 2)) : createCommentVNode("v-if", true),
e.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 3,
class: normalizeClass(e.nsSelect.be("dropdown", "footer")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(e.$slots, "footer")
], 10, ["onClick"])) : createCommentVNode("v-if", true)
]),
_: 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 Ay = X(ky, [["render", Ty], ["__file", "select.vue"]]);
var Oy = defineComponent({
name: "ElOptionGroup",
componentName: "ElOptionGroup",
props: {
label: String,
disabled: Boolean
},
setup(e) {
const t = ee("select"), n = ref(null), o = getCurrentInstance(), i = ref([]);
provide(dl, reactive({
...toRefs(e)
}));
const a = computed(() => i.value.some((u) => u.visible === true)), s = (u) => {
var c, d;
return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy);
}, r = (u) => {
const c = St(u), d = [];
return c.forEach((f) => {
var m, p;
s(f) ? d.push(f.component.proxy) : (m = f.children) != null && m.length ? d.push(...r(f.children)) : (p = f.component) != null && p.subTree && d.push(...r(f.component.subTree));
}), d;
}, l = () => {
i.value = r(o.subTree);
};
return onMounted(() => {
l();
}), bu(n, l, {
attributes: true,
subtree: true,
childList: true
}), {
groupRef: n,
visible: a,
ns: t
};
}
});
function My(e, t, n, o, i, a) {
return withDirectives((openBlock(), createElementBlock("ul", {
ref: "groupRef",
class: normalizeClass(e.ns.be("group", "wrap"))
}, [
createBaseVNode("li", {
class: normalizeClass(e.ns.be("group", "title"))
}, toDisplayString(e.label), 3),
createBaseVNode("li", null, [
createBaseVNode("ul", {
class: normalizeClass(e.ns.b("group"))
}, [
renderSlot(e.$slots, "default")
], 2)
])
], 2)), [
[vShow, e.visible]
]);
}
var fl = X(Oy, [["render", My], ["__file", "option-group.vue"]]);
var Bo = Me(Ay, {
Option: Qi,
OptionGroup: fl
});
var Xi = zt(Qi);
zt(fl);
var Py = Q({
trigger: Nn.trigger,
placement: ni.placement,
disabled: Nn.disabled,
visible: Le.visible,
transition: Le.transition,
popperOptions: ni.popperOptions,
tabindex: ni.tabindex,
content: Le.content,
popperStyle: Le.popperStyle,
popperClass: Le.popperClass,
enterable: {
...Le.enterable,
default: true
},
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: true
},
persistent: {
type: Boolean,
default: true
},
"onUpdate:visible": {
type: Function
}
});
var _y = {
"update:visible": (e) => ct(e),
"before-enter": () => true,
"before-leave": () => true,
"after-enter": () => true,
"after-leave": () => true
};
var Ly = "onUpdate:visible";
var xy = defineComponent({
name: "ElPopover"
});
var Fy = defineComponent({
...xy,
props: Py,
emits: _y,
setup(e, { expose: t, emit: n }) {
const o = e, i = computed(() => o[Ly]), a = ee("popover"), s = ref(), r = computed(() => {
var g;
return (g = unref(s)) == null ? void 0 : g.popperRef;
}), l = computed(() => [
{
width: $t(o.width)
},
o.popperStyle
]), u = computed(() => [a.b(), o.popperClass, { [a.m("plain")]: !!o.content }]), c = computed(() => o.transition === `${a.namespace.value}-fade-in-linear`), d = () => {
var g;
(g = s.value) == null || g.hide();
}, f = () => {
n("before-enter");
}, m = () => {
n("before-leave");
}, p = () => {
n("after-enter");
}, h2 = () => {
n("update:visible", false), n("after-leave");
};
return t({
popperRef: r,
hide: d
}), (g, y) => (openBlock(), createBlock(unref(Hr), mergeProps({
ref_key: "tooltipRef",
ref: s
}, 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": unref(u),
"popper-style": unref(l),
teleported: g.teleported,
persistent: g.persistent,
"gpu-acceleration": unref(c),
"onUpdate:visible": unref(i),
onBeforeShow: f,
onBeforeHide: m,
onShow: p,
onHide: h2
}), {
content: withCtx(() => [
g.title ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(a).e("title")),
role: "title"
}, toDisplayString(g.title), 3)) : createCommentVNode("v-if", true),
renderSlot(g.$slots, "default", {}, () => [
createTextVNode(toDisplayString(g.content), 1)
])
]),
default: withCtx(() => [
g.$slots.reference ? renderSlot(g.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
]),
_: 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 Ry = X(Fy, [["__file", "popover.vue"]]);
var Cs = (e, t) => {
const n = t.arg || t.value, o = n == null ? void 0 : n.popperRef;
o && (o.triggerRef = e);
};
var $y = {
mounted(e, t) {
Cs(e, t);
},
updated(e, t) {
Cs(e, t);
}
};
var Dy = "popover";
var pl = _p($y, Dy);
var Vo = Me(Ry, {
directive: pl
});
function Ny(e) {
let t;
const n = ref(false), o = reactive({
...e,
originalPosition: "",
originalOverflow: "",
visible: false
});
function i(f) {
o.text = f;
}
function a() {
const f = o.parent, m = d.ns;
if (!f.vLoadingAddClassList) {
let p = f.getAttribute("loading-number");
p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (Fn(f, m.bm("parent", "relative")), f.removeAttribute("loading-number")), Fn(f, m.bm("parent", "hidden"));
}
s(), c.unmount();
}
function s() {
var f, m;
(m = (f = d.$el) == null ? void 0 : f.parentNode) == null || m.removeChild(d.$el);
}
function r() {
var f;
e.beforeClose && !e.beforeClose() || (n.value = true, clearTimeout(t), t = setTimeout(l, 400), o.visible = false, (f = e.closed) == null || f.call(e));
}
function l() {
if (!n.value)
return;
const f = o.parent;
n.value = false, f.vLoadingAddClassList = void 0, a();
}
const u = defineComponent({
name: "ElLoading",
setup(f, { expose: m }) {
const { ns: p, zIndex: h2 } = dv("loading");
return m({
ns: p,
zIndex: h2
}), () => {
const g = o.spinner || o.svg, y = h("svg", {
class: "circular",
viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50",
...g ? { innerHTML: g } : {}
}, [
h("circle", {
class: "path",
cx: "25",
cy: "25",
r: "20",
fill: "none"
})
]), w = o.text ? h("p", { class: p.b("text") }, [o.text]) : void 0;
return h(Transition, {
name: p.b("fade"),
onAfterLeave: l
}, {
default: withCtx(() => [
withDirectives(createVNode("div", {
style: {
backgroundColor: o.background || ""
},
class: [
p.b("mask"),
o.customClass,
o.fullscreen ? "is-fullscreen" : ""
]
}, [
h("div", {
class: p.b("spinner")
}, [y, w])
]), [[vShow, o.visible]])
])
});
};
}
}), c = createApp(u), d = c.mount(document.createElement("div"));
return {
...toRefs(o),
setText: i,
removeElLoadingChild: s,
close: r,
handleAfterLeave: l,
vm: d,
get $el() {
return d.$el;
}
};
}
var uo;
var Si = function(e = {}) {
if (!re)
return;
const t = By(e);
if (t.fullscreen && uo)
return uo;
const n = Ny({
...t,
closed: () => {
var i;
(i = t.closed) == null || i.call(t), t.fullscreen && (uo = void 0);
}
});
Vy(t, t.parent, n), Es(t, t.parent, n), t.parent.vLoadingAddClassList = () => Es(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), nextTick(() => n.visible.value = t.visible), t.fullscreen && (uo = n), n;
};
var By = (e) => {
var t, n, o, i;
let a;
return He(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 || false,
text: e.text || "",
fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : true),
lock: (o = e.lock) != null ? o : false,
customClass: e.customClass || "",
visible: (i = e.visible) != null ? i : true,
beforeClose: e.beforeClose,
closed: e.closed,
target: a
};
};
var Vy = 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 nextTick();
for (const a of ["top", "left"]) {
const s = a === "top" ? "scrollTop" : "scrollLeft";
i[a] = `${e.target.getBoundingClientRect()[a] + document.body[s] + document.documentElement[s] - 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, s] of Object.entries(i))
n.$el.style[a] = s;
};
var Es = (e, t, n) => {
const o = n.vm.ns || n.vm._.exposed.ns;
["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Fn(t, o.bm("parent", "relative")) : hi(t, o.bm("parent", "relative")), e.fullscreen && e.lock ? hi(t, o.bm("parent", "hidden")) : Fn(t, o.bm("parent", "hidden"));
};
var po = Symbol("ElLoading");
var Is = (e, t) => {
var n, o, i, a;
const s = t.instance, r = (f) => ke(t.value) ? t.value[f] : void 0, l = (f) => {
const m = He(f) && (s == null ? void 0 : s[f]) || f;
return m && ref(m);
}, u = (f) => l(r(f) || e.getAttribute(`element-loading-${_u(f)}`)), c = (n = r("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 = r("target")) != null ? o : c ? void 0 : e,
body: (i = r("body")) != null ? i : t.modifiers.body,
lock: (a = r("lock")) != null ? a : t.modifiers.lock
};
e[po] = {
options: d,
instance: Si(d)
};
};
var zy = (e, t) => {
for (const n of Object.keys(t))
isRef(t[n]) && (t[n].value = e[n]);
};
var Ci = {
mounted(e, t) {
t.value && Is(e, t);
},
updated(e, t) {
const n = e[po];
t.oldValue !== t.value && (t.value && !t.oldValue ? Is(e, t) : t.value && t.oldValue ? ke(t.value) && zy(t.value, n.options) : n == null || n.instance.close());
},
unmounted(e) {
var t;
(t = e[po]) == null || t.instance.close(), e[po] = null;
}
};
var Hy = {
install(e) {
e.directive("loading", Ci), e.config.globalProperties.$loading = Si;
},
directive: Ci,
service: Si
};
var Wn = (e, t) => {
const n = e.__vccOpts || e;
for (const [o, i] of t)
n[o] = i;
return n;
};
var jy = {
name: "SelectionsGroup",
components: {
Checkbox: Qr,
CheckboxGroup: Xr,
Col: Un,
Icon: et,
Row: Kn,
ElIconWarning: warning_default
},
methods: {
/**
* Function to toggle paths to default.
* Also called when the associated button is pressed.
*/
reset: function() {
this.checkAll = true, this.checkedItems = [], this.selections.forEach((e) => {
!("enabled" in e) || e.enabled === true ? this.checkedItems.push(e[this.identifierKey]) : this.checkAll = false;
});
},
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 s = "";
n && (s = n.checked ? "checked" : "unchecked"), this.checkboxActionData = {
selectionsTitle: a ? a.innerText : "",
property: n && t !== "all" ? n.value : "",
label: o ? o.innerText : "",
checked: s
};
} 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 = false;
this.checkAll && (o = true, 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 === true ? { 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: false
}
},
computed: {
isIndeterminate: function() {
return !(this.checkedItems.length === 0 || this.checkAll);
}
},
data: function() {
return {
checkedItems: [],
checkAll: true,
checkboxActionData: {
selectionsTitle: "",
property: "",
label: "",
checked: ""
}
};
},
mounted: function() {
this.reset();
}
};
var Ky = { class: "selections-container" };
var Uy = { class: "checkall-display-text" };
var Wy = { style: { "word-break": "keep-all" } };
var qy = { class: "checkbox-group-inner" };
var Gy = ["onMouseenter", "onMouseleave"];
function Jy(e, t, n, o, i, a) {
const s = warning_default, r = et, l = Vo, u = Un, c = Qr, d = Kn, f = Xr;
return openBlock(), createElementBlock("div", Ky, [
createVNode(d, null, {
default: withCtx(() => [
createVNode(u, { span: 12 }, {
default: withCtx(() => [
createBaseVNode("span", Uy, toDisplayString(n.title), 1),
n.helpMessage ? (openBlock(), createBlock(l, {
key: 0,
width: "250",
trigger: "hover",
teleported: false,
"popper-class": "popover-origin-help"
}, createSlots({
default: withCtx(() => [
createBaseVNode("span", Wy, toDisplayString(n.helpMessage), 1)
]),
_: 2
}, [
n.helpMessage ? {
name: "reference",
fn: withCtx(() => [
createVNode(r, { class: "info" }, {
default: withCtx(() => [
createVNode(s)
]),
_: 1
})
]),
key: "0"
} : void 0
]), 1024)) : createCommentVNode("", true)
]),
_: 1
}),
createVNode(u, { span: 12 }, {
default: withCtx(() => [
n.selections && n.selections.length > 1 && !n.showAsLegend ? (openBlock(), createBlock(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: withCtx(() => t[2] || (t[2] = [
createTextVNode("Display all")
])),
_: 1
}, 8, ["indeterminate", "modelValue", "onChange", "onClick"])) : createCommentVNode("", true)
]),
_: 1
})
]),
_: 1
}),
createVNode(f, {
class: normalizeClass({ "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: withCtx(() => [
createBaseVNode("div", qy, [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.selections, (m) => (openBlock(), createBlock(d, {
key: m[n.identifierKey],
label: m[n.identifierKey]
}, {
default: withCtx(() => [
createBaseVNode("div", {
class: "checkbox-container",
onMouseenter: (p) => a.checkboxMouseEnterEmit(m[n.identifierKey], true),
onMouseleave: (p) => a.checkboxMouseEnterEmit(m[n.identifierKey], false)
}, [
createVNode(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 === true
}, {
default: withCtx(() => [
createVNode(d, { class: "checkbox-row" }, {
default: withCtx(() => [
a.hasLineStyles(m) ? (openBlock(), createBlock(u, {
key: 0,
span: 4
}, {
default: withCtx(() => [
createBaseVNode("div", {
class: "path-visual",
style: normalizeStyle(a.getLineStyles(m))
}, null, 4)
]),
_: 2
}, 1024)) : createCommentVNode("", true),
createVNode(u, { span: 20 }, {
default: withCtx(() => [
createBaseVNode("div", {
style: normalizeStyle(a.getBackgroundStyles(m))
}, toDisplayString(m[n.labelKey]), 5)
]),
_: 2
}, 1024)
]),
_: 2
}, 1024)
]),
_: 2
}, 1032, ["label", "value", "onChange", "onClick", "checked"])
], 40, Gy)
]),
_: 2
}, 1032, ["label"]))), 128))
])
]),
_: 1
}, 8, ["class", "modelValue", "onChange"])
]);
}
var hl = Wn(jy, [["render", Jy], ["__scopeId", "data-v-35fb97d0"]]);
var Yy = '';
var Zy = {
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: false
}
},
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 = Yy.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"];
}
}
};
var Qy = { class: "legend-group" };
var Xy = ["label"];
var eb = {
key: 0,
class: "legend-item"
};
var tb = { class: "label" };
function nb(e, t, n, o, i, a) {
return openBlock(), createElementBlock("div", Qy, [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.legends, (s) => (openBlock(), createElementBlock("div", {
class: "legend-container",
key: s[n.identifierKey],
label: s[n.identifierKey]
}, [
a.legendStyle(s) ? (openBlock(), createElementBlock("div", eb, [
a.clipPathLegends.includes(a.legendStyle(s)) ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(a.legendStyle(s)),
style: normalizeStyle(a.customClipPathStyle(s, true))
}, [
createBaseVNode("div", {
class: normalizeClass(a.legendStyle(s)),
style: normalizeStyle(a.customClipPathStyle(s, false))
}, null, 6)
], 6)) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(a.legendStyle(s)),
style: normalizeStyle(a.customStyle(s))
}, null, 6)),
createBaseVNode("div", tb, toDisplayString(a.capitalise(s[n.identifierKey])), 1)
])) : createCommentVNode("", true)
], 8, Xy))), 128))
]);
}
var ob = Wn(Zy, [["render", nb], ["__scopeId", "data-v-0c2b00a9"]]);
var ib = {
name: "SvgLegends"
};
var ab = { class: "legends-container" };
var sb = {
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 rb(e, t, n, o, i, a) {
return openBlock(), createElementBlock("div", ab, [
(openBlock(), createElementBlock("svg", sb, t[0] || (t[0] = [
createStaticVNode(' Tissue region Brain nuclei Ganglia Ganglionated nerve plexus ', 9)
]))),
t[1] || (t[1] = createBaseVNode("svg", {
width: "72px",
height: "72px",
viewBox: "0 0 24 24",
fill: "yellow"
}, null, -1))
]);
}
var lb = Wn(ib, [["render", rb], ["__scopeId", "data-v-88079d87"]]);
var ub = ``;
var Tn = function(e) {
return e ? [...new Set(e.map((t) => JSON.stringify(t)))].map(
(t) => JSON.parse(t)
) : [];
};
var oi = [];
var Ei = async function(e, t) {
const n = t.filter(
(a) => oi.some((s) => s.taxon === a)
), o = oi.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((s) => {
let { entity: r, label: l } = s;
l === "Mammalia" && (l = "Mammalia not otherwise specified");
const u = { taxon: r, label: l };
o.push(u), oi.push(u);
}), o;
} else
return o;
};
var ii = function(e, t) {
if (!e || !t) return false;
let n = JSON.stringify(e), o = JSON.stringify(t);
return n.indexOf(o) !== -1;
};
var 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;
};
var cb = function() {
this.initialise = function(e) {
this.flatmapAPI = e, this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], this.controller = void 0, this.uberons = [], this.lookUp = [], this.connectivitySource = "map", this.noMapConnectivity = false;
}, 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((s) => {
const { label: r } = s;
o.push(r);
});
} 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: s, label: r } = a;
o[s] = r, this.uberons.push({
id: s,
name: r
});
}), 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 = Tn(i), s = [], r = false;
return a.forEach((l) => {
r = false, ii(t, l) && (r = true), o && ii(o, l) && (r = true), ii(n, l) && (r = true), r || s.push(l);
}), s;
}, 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 = true) {
return this.connectivitySource = n, new Promise((i) => {
(n === "map" ? this.queryMapConnectivity(e.provenance.uuid, t) : e.queryKnowledge(t)).then((s) => {
if (this.checkConnectivityExists(s)) {
n === "map" && (this.noMapConnectivity = false);
let r = s;
o ? this.processConnectivity(e, r).then((l) => {
s.references && (this.rawURLs = [...s.references]), i(l);
}) : i(r);
} else n === "map" ? (this.connectivitySource = "sckan", this.noMapConnectivity = true, e.queryKnowledge(t).then((r) => {
if (this.checkConnectivityExists(r)) {
let l = r;
o ? this.processConnectivity(e, l).then((u) => {
r.references && (this.rawURLs = [...r.references]), i(u);
}) : i(l);
} else
i(false);
}).catch(() => i(false))) : i(false);
}).catch((s) => {
s.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${t}.`), i(false);
});
});
}, 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 = true) {
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((s) => {
fetch(`${this.flatmapAPI}knowledge/query/`, a).then((r) => r.json()).then((r) => {
if (this.connectivityExists(r)) {
let l = JSON.parse(r.values[0][0]);
o ? this.processConnectivity(e, l).then((u) => {
s(u);
}) : s(l);
} else
s(false);
}).catch((r) => {
r.name === "AbortError" || console.error("Error:", r), s(false);
});
});
}, 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] : false;
}, 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(
(s) => o.indexOf(s.id) !== -1
).sort(Jt), this.componentsWithDatasets = this.uberons.filter(
(s) => i.indexOf(s.id) !== -1
).sort(Jt), this.destinationsWithDatasets = this.uberons.filter(
(s) => a.indexOf(s.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 = Tn(o), u.forEach((c) => {
c in t["node-phenotypes"] && i.push(...t["node-phenotypes"][c]);
}), i = Tn(i);
} else
i = Tn(t.axons), t.somas && t.somas.length > 0 && o.push(...t.somas), t.dendrites && t.dendrites.length > 0 && o.push(...t.dendrites), o = Tn(o), a = t.somas;
const s = this.findComponents(t, i, o, a), r = this.findAllIdsFromConnectivity(t);
this.createLabelLookup(e, r).then((l) => {
this.origins = o.map(
(u) => this.createLabelFromNeuralNode(u, l)
).sort(Jt), this.components = s.map(
(u) => this.createLabelFromNeuralNode(u, l)
).sort(Jt), this.destinations = i.map(
(u) => this.createLabelFromNeuralNode(u, l)
).sort(Jt), this.flattenAndFindDatasets(o, s, i), n({
ids: {
dendrites: o,
components: s,
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 db(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((s) => s.id);
}
return [];
}
async function fb(e, t, n) {
const i = `select knowledge from knowledge
where source="${ea(e)}" and
knowledge like "%${t}%" order by source desc`;
return (await n.queryKnowledge(i)).map((l) => JSON.parse(l)).map((l) => l.id);
}
function ea(e) {
return pb(e.provenance);
}
function pb(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 hb(e, t) {
const n = ea(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 r = (await t.queryKnowledge(o)).map((l) => JSON.parse(l));
return sessionStorage.setItem("flatmap-knowledge", JSON.stringify(r)), sessionStorage.setItem("flatmap-knowledge-source", n), vb(), r;
}
return JSON.parse(i);
}
function vb() {
const n = (/* @__PURE__ */ new Date()).getTime() + 864e5;
sessionStorage.setItem("flatmap-knowledge-expiry", n);
}
function mb() {
[
"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 && mb();
}
var ai = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
var gb = '';
var ml = { exports: {} };
(function(e, t) {
(function(n, o) {
e.exports = o();
})(typeof window < "u" ? window : og, 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, h2 = c.length;
if (m)
for (; p < h2; p++)
d(c[p]);
else
d(c);
}
function s(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 r(c, d) {
Object.keys(d).forEach(function(f) {
c.style[f] = d[f];
});
}
var l = function(c, d) {
var f = 0;
function m() {
var h2 = [];
this.add = function(w) {
h2.push(w);
};
var g, y;
this.call = function(w) {
for (g = 0, y = h2.length; g < y; g++)
h2[g].call(this, w);
}, this.remove = function(w) {
var M = [];
for (g = 0, y = h2.length; g < y; g++)
h2[g] !== w && M.push(h2[g]);
h2 = M;
}, this.length = function() {
return h2.length;
};
}
function p(h2, g) {
if (h2) {
if (h2.resizedAttached) {
h2.resizedAttached.add(g);
return;
}
h2.resizedAttached = new m(), h2.resizedAttached.add(g), h2.resizeSensor = document.createElement("div"), h2.resizeSensor.dir = "ltr", h2.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%"
}, w = {
position: "absolute",
left: "0px",
top: "0px",
transition: "0s"
};
r(h2.resizeSensor, y);
var M = document.createElement("div");
M.className = "resize-sensor-expand", r(M, y);
var T = document.createElement("div");
r(T, w), M.appendChild(T);
var E = document.createElement("div");
E.className = "resize-sensor-shrink", r(E, y);
var A = document.createElement("div");
r(A, w), r(A, { width: "200%", height: "200%" }), E.appendChild(A), h2.resizeSensor.appendChild(M), h2.resizeSensor.appendChild(E), h2.appendChild(h2.resizeSensor);
var O = window.getComputedStyle(h2), D = O ? O.getPropertyValue("position") : null;
D !== "absolute" && D !== "relative" && D !== "fixed" && D !== "sticky" && (h2.style.position = "relative");
var N = false, j = 0, I = s(h2), K = 0, J = 0, de = true;
f = 0;
var Y = function() {
var be = h2.offsetWidth, Pe = h2.offsetHeight;
T.style.width = be + 10 + "px", T.style.height = Pe + 10 + "px", M.scrollLeft = be + 10, M.scrollTop = Pe + 10, E.scrollLeft = be + 10, E.scrollTop = Pe + 10;
}, $ = function() {
if (de) {
var be = h2.offsetWidth === 0 && h2.offsetHeight === 0;
if (be) {
f || (f = o(function() {
f = 0, $();
}));
return;
} else
de = false;
}
Y();
};
h2.resizeSensor.resetSensor = $;
var te = function() {
j = 0, N && (K = I.width, J = I.height, h2.resizedAttached && h2.resizedAttached.call(I));
}, xe = function() {
I = s(h2), N = I.width !== K || I.height !== J, N && !j && (j = o(te)), $();
}, ye = function(be, Pe, Ue) {
be.attachEvent ? be.attachEvent("on" + Pe, Ue) : be.addEventListener(Pe, Ue);
};
ye(M, "scroll", xe), ye(E, "scroll", xe), f = o(function() {
f = 0, $();
});
}
}
a(c, function(h2) {
p(h2, d);
}), this.detach = function(h2) {
f || (i(f), f = 0), l.detach(c, h2);
}, 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: true,
subtree: true
});
});
}
return l;
});
})(ml);
var yb = ml.exports;
var bb = ig(yb);
var wb = defineStore("main", {
state: () => ({
userProfile: {
token: ""
}
}),
getters: {
userToken(e) {
return e.userProfile.token;
}
},
actions: {
setUserToken(e) {
this.userProfile.token = e;
}
}
});
function Sb(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);
});
} };
}
var Ii = new Sb();
var Cb = "cannot be found on the map.";
var Eb = (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;
};
var gl = (e, t) => {
const n = [];
let o = e.organs ? e.organs : e.ftus;
const i = o ? o.filter(
(a, s) => o.findIndex((r) => r.label === a.label) === s
) : void 0;
return i && i.forEach((a) => {
const s = {
label: a.label,
models: a.models,
key: `${t}.${a.label}`
}, r = gl(a, s.key);
r.length > 0 && (s.children = r), n.push(s);
}), n;
};
var Ib = {
name: "FlatmapVuer",
components: {
Button: Wr,
Col: Un,
Loading: Hy,
Radio: sl,
Icon: et,
RadioGroup: rl,
Row: Kn,
Select: Bo,
Dialog: sy,
MapSvgIcon: wn,
MapSvgSpriteColor: hn,
Tooltip: z7,
TreeControls: V7,
SelectionsGroup: hl,
SvgLegends: lb,
ElIconWarningFilled: warning_filled_default,
ElIconArrowDown: arrow_down_default,
ElIconArrowLeft: arrow_left_default,
DrawToolbar: $7
},
beforeCreate: function() {
this.setStateRequired = false;
},
setup(e) {
let t = inject("$annotator");
return t || (t = markRaw(new AnnotationService(`${e.flatmapAPI}annotator`)), provide("$annotator", t)), { annotator: t };
},
methods: {
enableFeatureResetOnClick: function(e) {
this.mapImp && this.mapImp.enableFeatureResetOnClick(e);
},
/**
*
* @param filter format should follow #makeStyleFilter (flatmap-viewer)
*/
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], false);
} else
this.closeTooltip();
},
/**
* @public
* Function to confirm a newly drawn feature.
*/
confirmDrawnFeature: function() {
this.isValidDrawnCreated && (this.checkAndCreatePopups([this.drawnCreatedEvent], false), 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 = false, 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 = false) : 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 = true, this.mapImp.commitAnnotationEvent(this.annotationEntry[0]), e.body.comment === "Position Updated" ? this.annotationEntry[0].positionUpdated = false : 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 = true);
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 = false, !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 = gl(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 = true;
t && (i = t.checkAll ? true : 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(false), this.initMapState = markRaw({
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: false
}), t && e.fitBounds(t, {
animate: false
}), 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, s;
if (this.mapImp) {
let r = [], 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), h2 = (s = f == null ? void 0 : f.ids) == null ? void 0 : s.axons.flat(1 / 0);
let g = [];
d.includes("origins") && g.push(...m), d.includes("components") && g.push(...p), d.includes("destinations") && g.push(...h2), d.includes("all") && g.push(...m, ...p, ...h2), l = [...new Set(g)];
}
u.forEach((d) => {
this.mapImp.nodePathModels(d).forEach((m) => {
const h2 = this.mapImp.pathModelNodes(m).map((y) => this.mapImp.featureProperties(y).models);
l.filter((y) => h2.includes(y)).length && !r.includes(m) && r.push(m);
});
});
} else c.length && (l.length ? c.forEach((d) => {
const m = this.mapImp.pathModelNodes(d).map((h2) => this.mapImp.featureProperties(h2).models);
l.filter((h2) => m.includes(h2)).length && !r.includes(d) && r.push(d);
}) : r = c);
return r = [.../* @__PURE__ */ new Set([...r, ...e])], r;
}
},
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 = true : this.mapFilters.alert.with = false : e.key === "withoutAlert" && (e.value ? this.mapFilters.alert.without = true : this.mapFilters.alert.without = false), 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 = true, this.mapFilters.alert.with = true) : (this.mapFilters.alert.without = false, this.mapFilters.alert.with = false), 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, true, true);
},
/**
* @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: true });
} 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 = false : this.rollbackAnnotationEvent(), this.annotationEntry = [];
else if (t.type === "modeChanged")
t.feature.mode === "direct_select" && (this.doubleClickedFeature = true), 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 = {};
},
/**
* @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") {
const o = t.label, i = [t.models], a = this.entry, s = this.biologicalSex, r = t.alert;
let l;
t.taxons && (typeof t.taxons != "object" ? l = JSON.parse(t.taxons) : l = t.taxons);
let u = [{
dataset: t.dataset,
biologicalSex: s,
taxonomy: a,
resource: i,
label: o,
feature: t,
userData: n,
eventType: e,
provenanceTaxonomy: l,
alert: r
}];
if (e === "click") {
const c = Object.keys(t).includes("id");
if (!c) {
u = [];
const f = t.mapUUID, m = /* @__PURE__ */ new Set();
for (let [p, h2] of Object.entries(t))
if (p !== "mapUUID") {
const g = h2.id, y = h2.label, w = [h2.models];
let M;
if (h2.taxons && (typeof h2.taxons != "object" ? M = JSON.parse(h2.taxons) : M = h2.taxons), m.has(g)) continue;
m.add(g), u.push({
dataset: h2.dataset,
biologicalSex: s,
taxonomy: a,
resource: w,
label: y,
feature: h2,
userData: n,
eventType: e,
provenanceTaxonomy: M,
alert: h2.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(([h2]) => ["featureId", "models"].includes(h2)).map(([h2, g]) => [h2 === "featureId" ? "id" : h2, g])
)
);
}
}
}
} else e === "mouseenter" && this.viewingMode !== "Neuron Connection" && (this.currentHover = t.models ? t.models : "");
t && t.type !== "marker" && e === "click" && // Disable popup when drawing
!this.activeDrawTool && this.checkAndCreatePopups(u), this.$emit("resource-selected", u);
} else
this.$emit("pan-zoom-callback", t);
};
},
/**
* 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) {
this.connectivityDataSource = t.source, (e === "Neuron Connection" || e === "Annotation") && (this.connectivityDataSource = t.featureId);
},
/**
* @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(ai(a)), i + 1 < e.length) {
const s = document.createElement("hr");
n.appendChild(s);
}
}), this.mapImp.showPopup(
t,
n,
{
className: "custom-popup flatmap-tooltip-popup",
positionAtLastClick: false,
preserveSelection: true
}
);
},
/**
* 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 = [], s = [];
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
s.push(f);
}), a.length) {
let f = a[0].featureId;
this.mapImp.annotations.forEach((m) => {
const p = m["anatomical-nodes"];
if (p) {
const h2 = p.join("");
a.every(
(y) => h2.indexOf(y.id) !== -1
) && (f = m.featureId, i.push(f));
}
}), this.createTooltipForConnectivity(a, f);
} else
this.removeActiveTooltips();
this.emitConnectivityError(s);
const r = o.reduce((f, m) => {
const p = this.mapImp.pathways.paths[m], h2 = p ? p.connectivity : null;
if (h2) {
const g = h2.flat(1 / 0);
f.push(...g);
}
return f;
}, []), l = [...new Set(r)], 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 db(e) : n = await fb(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: Cb
}
});
},
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 : false;
},
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 = true) {
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 = false, this.activeDrawTool && this.createConnectivityBody(), this.displayTooltip(
o[0].feature.id,
Eb(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 s = (n = e[0].feature) == null ? void 0 : n.featureId, r = this.mapImp.annotations.get(s), l = r == null ? void 0 : r["anatomical-nodes"], u = r == null ? void 0 : r.models;
let c, d = a;
const f = r == null ? void 0 : r.models;
l != null && l.length && (c = l.find(
(E) => JSON.parse(E)[0] === u
)), c ? d = JSON.parse(c) : f && (d = [f, []]);
const m = d.flat(1 / 0), p = [...new Set(m)], g = (await _7(this.flatmapAPI, p)).reduce((E, A) => {
const O = A[0], D = JSON.parse(A[1]);
return D.source === this.mapImp.knowledgeSource && E.push({ id: O, label: D.label }), E;
}, []), y = [];
for (let E = 0; E < p.length; E++) {
const A = g.find((O) => O.id === p[E]);
A && y.push(A.label);
}
const w = ai(y.join(", ")), M = {
facet: JSON.stringify(d),
facetPropPath: `flatmap.connectivity.source.${this.connectionType.toLowerCase()}`,
tagLabel: w,
// used tagLabel here instead of label since the label and value are different
term: this.connectionType
};
this.connectivityFilters.some((E) => E.facet === M.facet && E.facetPropPath === M.facetPropPath) || this.connectivityFilters.push(M), 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 {
hb(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: false })), 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 = ea(this.mapImp), n.mapId = this.mapImp.provenance.id, n.mapuuid = this.mapImp.provenance.uuid), n.ready = true, 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: true }, 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 = true);
},
/**
* @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, s = this.$refs[i || a];
if (s) {
const { parentElement: r, nextElementSibling: l } = s.$el, u = (c) => c && (c.classList.contains("pathway-container") || c.classList.contains("pathway-location"));
(u(r) || u(l)) && (this.requiresDrawer ? this.drawerOpen = true : 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", true), e && !this.helpModeDialog ? (this.inHelp = true, this.hoverVisibilities.forEach((i) => {
i.value = true;
})) : e && this.helpModeDialog && t > this.helpModeActiveIndex ? this.helpModeActiveIndex > -1 ? (this.closeFlatmapHelpPopup(), setTimeout(() => {
this.inHelp = false, this.hoverVisibilities.forEach((i) => {
i.value = false;
}), this.showTooltip(this.helpModeActiveIndex, 200);
}, 300)) : this.helpModeActiveIndex === -1 && this.openFlatmapHelpPopup() : (this.inHelp = false, this.hoverVisibilities.forEach((i) => {
i.value = false;
}), 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 = true, 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 = false;
}, 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;
else {
const i = Array.isArray(e) ? e[0] : e;
i && (n = this.mapImp.modelFeatureIds(i)[0]), this.activeDrawTool || (o.positionAtLastClick = true);
}
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 = true, 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, s = this.mapImp.bounds.toArray();
this.mapImp.zoomToFeatures(e, { noZoomIn: true }), this.showPathwaysDrawer(false), s != null && s.length && setTimeout(() => {
a.fitBounds(s, {
offset: [n, o],
zoom: i,
animate: true
});
});
}
},
/**
* @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 = false);
},
/**
* @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, true, true);
}
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 = true, this.setFlightPath3D(false));
},
/**
* @public
* Function to create Flatmap
* by providing the ``state``.
* @arg {Object} `state`
*/
createFlatmap: function(e) {
if (!this.mapImp && !this.loading) {
this.loading = true;
let t = false;
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 s = this._stateToBeSet ? this._stateToBeSet : e;
this.onFlatmapReady(s), this.$nextTick(() => this.restoreMapState(s));
});
} 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 [s, r] of Object.entries(a))
if (e.includes(s)) {
o.has(s) || o.set(s, /* @__PURE__ */ new Map());
const l = o.get(s), u = (c) => {
const d = c;
l.has(d) || l.set(d, /* @__PURE__ */ new Set()), l.get(d).add(`${a.source}`);
};
Array.isArray(r) ? r.forEach(u) : u(r);
}
}
let i = {
alert: {
with: [...t],
without: [...n]
}
};
for (const [a, s] of o.entries()) {
i[a] = {};
for (const [r, l] of s.entries())
i[a][r] = [...l.values()];
}
return i;
},
getFilterOptions: async function(e, t) {
const n = t || this.getFlatmapKnowledge(), o = this.pathways;
return await J7(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 = markRaw(new bb(this.$refs.display, this.mapResize)), ((t = this.mapImp.options) == null ? void 0 : t.style) === "functional" && (this.isFC = true), 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 = false, 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 = true) {
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 = "", true;
{
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 s = 0; s < i.results.length; s++) {
a = i.results[s].featureId;
const r = this.mapImp.annotation(a);
if (a && (r != null && r.label)) break;
}
if (a) {
const s = this.mapImp.featureProperties(a), r = {
resource: [s.models],
feature: s,
label: s.label,
provenanceTaxonomy: s.taxons,
alert: s.alert
};
this.checkAndCreatePopups([r], n), this.mapImp.showPopup(a, ai(s.label), {
className: "custom-popup",
positionAtLastClick: false,
preserveSelection: true
});
}
}
return this.searchTerm = e, true;
} else this.mapImp.clearSearchResults();
}
}
return false;
},
/**
* @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: true
},
/**
* 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: true
},
/**
* The option to show tooltips for help mode.
*/
helpMode: {
type: Boolean,
default: false
},
/**
* 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: false
},
/**
* The last item of help mode.
*/
helpModeLastItem: {
type: Boolean,
default: false
},
/**
* 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: true
},
/**
* The option to display minimap at the top-right corner of the map.
*/
displayMinimap: {
type: Boolean,
default: false
},
/**
* The option to show warning. Example for legacy or beta maps.
*/
displayWarning: {
type: Boolean,
default: false
},
/**
* Flag to determine rather open map UI should be
* presented or not.
*/
enableOpenMapUI: {
type: Boolean,
default: false
},
/**
* 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: false
},
/**
* Flag to determine whether this is legacy map or not.
* ``displayWarning`` should be shown for legacy map.
*/
isLegacy: {
type: Boolean,
default: false
},
/**
* The option to show the latest changes.
*/
displayLatestChanges: {
type: Boolean,
default: false
},
/**
* 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: false
},
/**
* The option to show connectivity information in sidebar
*/
connectivityInfoSidebar: {
type: Boolean,
default: false
},
/**
* The option to show annotation in sidebar
*/
annotationSidebar: {
type: Boolean,
default: false
},
/**
* The option to show local settings UI
* (background colour, flight path, viewing mode, etc.)
*/
showLocalSettings: {
type: Boolean,
default: true
},
/**
* The option to show open new map button
*/
showOpenMapButton: {
type: Boolean,
default: true
},
/**
* The option to show pathway drawer
*/
showPathwayFilter: {
type: Boolean,
default: true
},
/**
* Allow to add and display extra legends to drawer
*/
externalLegends: {
type: Array,
default: []
}
},
provide() {
return {
flatmapAPI: this.flatmapAPI,
sparcAPI: this.sparcAPI,
userApiKey: this.userToken
};
},
data: function() {
return {
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: false,
serverURL: void 0,
layers: [],
pathways: [],
initMapState: markRaw({}),
sckanDisplay: [
{
label: "Display Path with SCKAN",
key: "VALID"
}
],
systems: [],
taxonConnectivity: [],
pathwaysMaxHeight: 1e3,
tooltipWait: markRaw([]),
hoverVisibilities: [
{ value: false, ref: "markerPopover" },
// 0
{ value: false, ref: "zoomInPopover" },
// 1
{ value: false, ref: "zoomOutPopover" },
// 2
{ value: false, ref: "zoomFitPopover" },
// 3
{ value: false, ref: "openMapPopover" },
// 4
{ value: false, ref: "settingsPopover" },
// 5
{ value: false, ref: "checkBoxPopover" },
// 6
{ value: false, ref: "warningPopover" },
// 7
{ value: false, ref: "whatsNewPopover" },
// 8
{ value: false, ref: "featuredMarkerPopover" },
// 9
{ value: false, refs: "toolbarPopover", ref: "editPopover" },
// 10
{ value: false, refs: "toolbarPopover", ref: "deletePopover" },
// 11
{ value: false, refs: "toolbarPopover", ref: "pointPopover" },
// 12
{ value: false, refs: "toolbarPopover", ref: "lineStringPopover" },
// 13
{ value: false, refs: "toolbarPopover", ref: "polygonPopover" },
// 14
{ value: false, refs: "toolbarPopover", ref: "connectionPopover" }
// 15
],
helpModeActiveIndex: this.helpModeInitialIndex,
yellowstar: gb,
isFC: false,
inHelp: false,
currentBackground: "white",
availableBackground: ["white", "lightskyblue", "black"],
loading: false,
flatmapMarker: ub,
tooltipEntry: [],
connectivityDataSource: "",
connectivityTooltipVisible: false,
drawerOpen: false,
flightPath3DRadio: false,
displayFlightPathOption: false,
colourRadio: true,
outlinesRadio: true,
minimapResizeShow: false,
minimapSmall: false,
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: false,
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: false,
drawnCreatedEvent: {},
previousEditEvent: {},
previousDeletedEvent: {},
connectionEntry: {},
existDrawnFeatures: [],
// Store all exist drawn features
doubleClickedFeature: false,
containsAlert: false,
alertOptions: [
{
label: "Display Path With Alerts",
key: "alert",
enabled: true
},
{
label: "Display Path Without Alerts",
key: "withoutAlert",
enabled: true
}
],
mapFilters: markRaw({
alert: {
with: true,
without: true
}
}),
searchTerm: "",
taxonLeaveDelay: void 0,
connectivityFilters: [],
flatmapLegends: []
};
},
computed: {
...mapState(wb, ["userToken"]),
isValidDrawnCreated: function() {
return Object.keys(this.drawnCreatedEvent).length > 0;
},
requiresDrawer: function() {
var e, t, n, o;
if (this.loading)
return this.drawerOpen = false, false;
if (this.isFC) {
if (((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)
return this.drawerOpen = true, true;
} else
return this.drawerOpen = true, true;
return this.drawerOpen = false, false;
},
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 = true);
},
immediate: true,
deep: true
},
viewingMode: function(e) {
this.clearAnnotationFeature(), e === "Annotation" && (this.loading = true, this.annotator.authenticate(this.userToken).then((t) => {
t.name && t.email && t.canUpdate ? (this.authorisedUser = t, this.offlineAnnotationEnabled = false) : (this.authorisedUser = void 0, this.offlineAnnotationEnabled = true), this.emitOfflineAnnotationUpdate(), this.setFeatureAnnotated(), this.addAnnotationFeature(), this.loading = false;
}));
},
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", s);
}, a = (r) => {
if (!["Escape", "Enter"].includes(r.key)) return;
const l = e === "Point" && t.length === 1 || e === "LineString" && t.length >= 2 || e === "Polygon" && t.length >= 3;
(r.key === "Escape" || r.key === "Enter" && !l) && (this.activeDrawTool = void 0), i();
}, s = (r) => {
const l = o.getBoundingClientRect(), u = r.clientX - l.left, c = r.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", s));
}
},
created: function() {
this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = markRaw(new Ds.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef));
},
mounted: function() {
this.openMapRef = shallowRef(this.$refs.openMapRef), this.backgroundIconRef = shallowRef(this.$refs.backgroundIconRef), this.tooltipWait.length = this.hoverVisibilities.length, this.flatmapQueries = markRaw(new cb()), this.flatmapQueries.initialise(this.flatmapAPI), this.state ? this.setStateRequired && this.setState(this.state) : this.renderAtMounted && this.createFlatmap(), vl();
}
};
var kb = {
class: "flatmap-container",
ref: "flatmapContainer",
"element-loading-text": "Loading...",
"element-loading-background": "rgba(0, 0, 0, 0.3)"
};
var Tb = { style: { height: "100%", width: "100%", position: "relative", "overflow-y": "none" } };
var Ab = {
style: { height: "100%", width: "100%" },
ref: "display"
};
var Ob = { class: "beta-popovers" };
var Mb = {
key: 2,
class: "warning-text"
};
var Pb = { class: "bottom-right-control" };
var _b = ["innerHTML"];
var Lb = { style: { "margin-bottom": "2px" } };
var xb = {
key: 0,
class: "viewing-mode-title"
};
var Fb = ["onClick"];
var Rb = ["onClick"];
function $b(e, t, n, o, i, a) {
const s = resolveComponent("map-svg-sprite-color"), r = warning_filled_default, l = et, u = Vo, c = arrow_down_default, d = resolveComponent("DrawToolbar"), f = resolveComponent("map-svg-icon"), m = ob, p = resolveComponent("tree-controls"), h2 = hl, g = arrow_left_default, y = Wr, w = Kn, M = Un, T = Xi, E = Bo, A = sl, O = rl, D = resolveComponent("Tooltip"), N = pl, j = Ci;
return withDirectives((openBlock(), createElementBlock("div", kb, [
createVNode(s),
createBaseVNode("div", Tb, [
createBaseVNode("div", Ab, null, 512),
withDirectives(createBaseVNode("div", Ob, [
createBaseVNode("div", null, [
createVNode(u, {
placement: "right",
"popper-class": "warning-popper flatmap-popper",
teleported: false,
visible: e.hoverVisibilities[7].value,
ref: "warningPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "warning-icon",
onMouseover: t[7] || (t[7] = (I) => a.showTooltip(7)),
onMouseout: t[8] || (t[8] = (I) => a.hideTooltip(7))
}, [
n.displayWarning || n.isLegacy ? (openBlock(), createBlock(l, { key: 0 }, {
default: withCtx(() => [
createVNode(r)
]),
_: 1
})) : createCommentVNode("", true),
n.isLegacy ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
t[33] || (t[33] = createBaseVNode("span", { class: "warning-text" }, "Legacy Map", -1)),
createBaseVNode("div", {
class: "latest-map-text",
onClick: t[6] || (t[6] = (...I) => a.viewLatestMap && a.viewLatestMap(...I))
}, " Click here for the latest map ")
], 64)) : n.displayWarning ? (openBlock(), createElementBlock("span", Mb, "Beta")) : createCommentVNode("", true)
], 32)
]),
default: withCtx(() => [
n.isLegacy ? (openBlock(), createElementBlock("p", {
key: 0,
onMouseover: t[0] || (t[0] = (I) => a.showTooltip(7)),
onMouseout: t[1] || (t[1] = (I) => a.hideTooltip(7))
}, " This is a legacy map, you may view the latest map instead. ", 32)) : e.isFC ? (openBlock(), createElementBlock("p", {
key: 1,
onMouseover: t[2] || (t[2] = (I) => a.showTooltip(7)),
onMouseout: t[3] || (t[3] = (I) => a.hideTooltip(7))
}, t[31] || (t[31] = [
createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),
createBaseVNode("a", {
href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
target: "_blank"
}, " ApiNATOMY ", -1),
createTextVNode(" models available in "),
createBaseVNode("a", {
href: "https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",
target: "_blank"
}, " SCKAN ", -1),
createTextVNode(". ")
]), 32)) : (openBlock(), createElementBlock("p", {
key: 2,
onMouseover: t[4] || (t[4] = (I) => a.showTooltip(7)),
onMouseout: t[5] || (t[5] = (I) => a.hideTooltip(7))
}, t[32] || (t[32] = [
createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),
createBaseVNode("a", {
href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
target: "_blank"
}, " ApiNATOMY ", -1),
createTextVNode(" models available in "),
createBaseVNode("a", {
href: "https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",
target: "_blank"
}, " SCKAN ", -1),
createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")
]), 32))
]),
_: 1
}, 8, ["visible"])
]),
n.displayLatestChanges ? (openBlock(), createBlock(u, {
key: 0,
placement: "right",
teleported: false,
trigger: "manual",
"popper-class": "warning-popper flatmap-popper",
visible: e.hoverVisibilities[8].value,
ref: "whatsNewPopover"
}, {
reference: withCtx(() => [
n.displayLatestChanges ? (openBlock(), createElementBlock("div", {
key: 0,
class: "latest-changesicon",
onMouseover: t[9] || (t[9] = (I) => a.showTooltip(8)),
onMouseout: t[10] || (t[10] = (I) => a.hideTooltip(8))
}, [
createVNode(l, null, {
default: withCtx(() => [
createVNode(r)
]),
_: 1
}),
t[34] || (t[34] = createBaseVNode("span", { class: "warning-text" }, "What's new?", -1))
], 32)) : createCommentVNode("", true)
]),
default: withCtx(() => t[35] || (t[35] = [
createBaseVNode("b", null, "Connectivity References", -1),
createBaseVNode("p", null, " Connectivity references have been improved and available in various formats. ", -1),
createBaseVNode("b", null, "Improved state storing", -1),
createBaseVNode("p", null, " Current selection and visibility filters are now stored when creating a permalink. ", -1)
])),
_: 1
}, 8, ["visible"])) : createCommentVNode("", true)
], 512), [
[vShow, !n.disableUI]
]),
withDirectives(createVNode(l, {
class: normalizeClass(["minimap-resize", { enlarge: e.minimapSmall, shrink: !e.minimapSmall }]),
ref: "minimapResize",
onClick: a.closeMinimap
}, {
default: withCtx(() => [
createVNode(c)
]),
_: 1
}, 8, ["class", "onClick"]), [
[vShow, e.minimapResizeShow]
]),
e.viewingMode === "Annotation" && (e.authorisedUser || e.offlineAnnotationEnabled) && !n.disableUI ? (openBlock(), createBlock(d, {
key: 0,
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"])) : createCommentVNode("", true),
withDirectives(createBaseVNode("div", Pb, [
createVNode(u, {
content: "Zoom in",
placement: "left",
teleported: false,
trigger: "manual",
width: "70",
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[1].value,
ref: "zoomInPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "icon-button-container",
onClick: t[11] || (t[11] = (I) => a.zoomIn()),
onMouseover: t[12] || (t[12] = (I) => a.showTooltip(1)),
onMouseout: t[13] || (t[13] = (I) => a.hideTooltip(1))
}, [
createVNode(f, {
class: "icon-button zoomIn",
icon: "zoomIn"
})
], 32)
]),
_: 1
}, 8, ["visible"]),
createVNode(u, {
content: "Zoom out",
placement: "top-end",
teleported: false,
trigger: "manual",
width: "70",
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[2].value,
ref: "zoomOutPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "icon-button-container",
onClick: t[14] || (t[14] = (I) => a.zoomOut()),
onMouseover: t[15] || (t[15] = (I) => a.showTooltip(2)),
onMouseout: t[16] || (t[16] = (I) => a.hideTooltip(2))
}, [
createVNode(f, {
class: "icon-button zoomOut",
icon: "zoomOut"
})
], 32)
]),
_: 1
}, 8, ["visible"]),
createVNode(u, {
content: "Reset",
placement: "top",
teleported: false,
trigger: "manual",
width: "70",
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[3].value,
ref: "zoomFitPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "icon-button-container",
onClick: t[17] || (t[17] = (I) => a.resetView()),
onMouseover: t[18] || (t[18] = (I) => a.showTooltip(3)),
onMouseout: t[19] || (t[19] = (I) => a.hideTooltip(3))
}, [
createVNode(f, {
class: "icon-button fitWindow",
icon: "fitWindow"
})
], 32)
]),
default: withCtx(() => [
t[36] || (t[36] = createBaseVNode("div", null, [
createTextVNode(" Fit to "),
createBaseVNode("br"),
createTextVNode(" window ")
], -1))
]),
_: 1
}, 8, ["visible"])
], 512), [
[vShow, !n.disableUI]
]),
createVNode(u, {
content: "Change pathway visibility",
placement: "right",
teleported: false,
trigger: "manual",
offset: -18,
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[6].value,
ref: "checkBoxPopover"
}, {
reference: withCtx(() => [
withDirectives(createBaseVNode("div", {
class: normalizeClass(["pathway-location", { open: e.drawerOpen, close: !e.drawerOpen }])
}, [
withDirectives((openBlock(), createElementBlock("div", {
class: normalizeClass(["pathway-container", { open: e.drawerOpen, close: !e.drawerOpen }]),
style: normalizeStyle({ "max-height": e.pathwaysMaxHeight + "px" })
}, [
createVNode(u, {
content: "Location of the featured dataset",
placement: "bottom",
teleported: true,
trigger: "manual",
width: "max-content",
offset: -10,
"popper-class": "flatmap-popper flatmap-teleport-popper",
visible: e.hoverVisibilities[9].value && n.showStarInLegend,
ref: "featuredMarkerPopover"
}, {
reference: withCtx(() => [
withDirectives((openBlock(), createElementBlock("div", {
onMouseover: t[20] || (t[20] = (I) => a.showTooltip(9)),
onMouseout: t[21] || (t[21] = (I) => a.hideTooltip(9))
}, [
a.legendEntry.length ? (openBlock(), createBlock(m, {
key: 0,
identifierKey: "prompt",
colourKey: "colour",
styleKey: "style",
legends: a.legendEntry,
showStarInLegend: true,
class: "svg-legends-container"
}, null, 8, ["legends"])) : createCommentVNode("", true)
], 32)), [
[N, void 0, "featuredMarkerPopover"]
])
]),
_: 1
}, 8, ["visible"]),
createVNode(u, {
content: "Find these markers for data. The number inside the markers is the number of datasets available for each marker.",
placement: "right",
teleported: false,
width: "200",
trigger: "manual",
"popper-class": "flatmap-popper flatmap-marker-popper",
visible: e.hoverVisibilities[0].value,
ref: "markerPopover"
}, {
reference: withCtx(() => [
withDirectives(createBaseVNode("div", {
class: "flatmap-marker-help",
innerHTML: e.flatmapMarker
}, null, 8, _b), [
[vShow, e.hoverVisibilities[0].value],
[N, void 0, "markerPopover"]
])
]),
_: 1
}, 8, ["visible"]),
e.isFC && e.systems && e.systems.length > 0 ? (openBlock(), createBlock(p, {
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"])) : createCommentVNode("", true),
e.containsAlert && e.alertOptions && n.showPathwayFilter ? (openBlock(), createBlock(h2, {
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"])) : createCommentVNode("", true),
e.pathways && e.pathways.length > 0 ? (openBlock(), createBlock(h2, {
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"])) : createCommentVNode("", true),
e.taxonConnectivity && e.taxonConnectivity.length > 0 && n.showPathwayFilter ? (openBlock(), createBlock(h2, {
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"])) : createCommentVNode("", true)
], 6)), [
[N, void 0, "checkBoxPopover"]
]),
createBaseVNode("div", {
onClick: t[22] || (t[22] = (...I) => a.toggleDrawer && a.toggleDrawer(...I)),
class: normalizeClass(["drawer-button", { open: e.drawerOpen, close: !e.drawerOpen }])
}, [
createVNode(l, null, {
default: withCtx(() => [
createVNode(g)
]),
_: 1
})
], 2)
], 2), [
[vShow, !n.disableUI && a.requiresDrawer]
])
]),
_: 1
}, 8, ["visible"]),
e.openMapRef ? (openBlock(), createBlock(u, {
key: 1,
ref: "open-map-popover",
"virtual-ref": e.openMapRef,
placement: "top-start",
width: "136",
teleported: false,
trigger: "click",
"popper-class": "open-map-popper non-selectable",
"virtual-triggering": ""
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.openMapOptions, (I) => (openBlock(), createBlock(w, {
key: I.key
}, {
default: withCtx(() => [
createVNode(y, {
type: "primary",
plain: "",
onClick: (K) => e.$emit("open-map", I.key)
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(I.display), 1)
]),
_: 2
}, 1032, ["onClick"])
]),
_: 2
}, 1024))), 128))
]),
_: 1
}, 8, ["virtual-ref"])) : createCommentVNode("", true),
createVNode(u, {
ref: "backgroundPopover",
"virtual-ref": e.backgroundIconRef,
placement: "top-start",
width: "320",
teleported: false,
trigger: "click",
"popper-class": "background-popper h-auto",
"virtual-triggering": ""
}, {
default: withCtx(() => [
createBaseVNode("div", null, [
createVNode(w, { class: "backgroundText" }, {
default: withCtx(() => t[37] || (t[37] = [
createTextVNode("Viewing Mode")
])),
_: 1
}),
createVNode(w, { class: "backgroundControl" }, {
default: withCtx(() => [
createBaseVNode("div", Lb, [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.viewingModes, (I, K, J) => (openBlock(), createElementBlock(Fragment, { key: K }, [
K === e.viewingMode ? (openBlock(), createElementBlock("span", xb, [
createBaseVNode("b", null, toDisplayString(K), 1)
])) : (openBlock(), createElementBlock("span", {
key: 1,
class: "viewing-mode-unselected",
onClick: (de) => a.changeViewingMode(K)
}, toDisplayString(K), 9, Fb))
], 64))), 128))
]),
createVNode(w, { class: "viewing-mode-description" }, {
default: withCtx(() => [
createTextVNode(toDisplayString(a.modeDescription), 1)
]),
_: 1
}),
e.viewingMode === "Annotation" && e.offlineAnnotationEnabled ? (openBlock(), createBlock(w, {
key: 0,
class: "viewing-mode-description"
}, {
default: withCtx(() => t[38] || (t[38] = [
createTextVNode(" (Anonymous annotate) ")
])),
_: 1
})) : createCommentVNode("", true)
]),
_: 1
}),
e.viewingMode === "Annotation" && e.authorisedUser ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createVNode(w, { class: "backgroundText" }, {
default: withCtx(() => t[39] || (t[39] = [
createTextVNode("Annotations From")
])),
_: 1
}),
createVNode(w, { class: "backgroundControl" }, {
default: withCtx(() => [
createVNode(E, {
teleported: false,
modelValue: e.annotationFrom,
"onUpdate:modelValue": t[23] || (t[23] = (I) => e.annotationFrom = I),
placeholder: "Select",
class: "select-box",
"popper-class": "flatmap_dropdown",
onChange: a.setAnnotationFrom
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.annotatedSource, (I) => (openBlock(), createBlock(T, {
key: I,
label: I,
value: I
}, {
default: withCtx(() => [
createVNode(w, null, {
default: withCtx(() => [
createVNode(M, { span: 12 }, {
default: withCtx(() => [
createTextVNode(toDisplayString(I), 1)
]),
_: 2
}, 1024)
]),
_: 2
}, 1024)
]),
_: 2
}, 1032, ["label", "value"]))), 128))
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
})
], 64)) : createCommentVNode("", true),
e.displayFlightPathOption ? (openBlock(), createBlock(w, {
key: 1,
class: "backgroundSpacer"
})) : createCommentVNode("", true),
e.displayFlightPathOption ? (openBlock(), createBlock(w, {
key: 2,
class: "backgroundText"
}, {
default: withCtx(() => t[40] || (t[40] = [
createTextVNode("Flight path display")
])),
_: 1
})) : createCommentVNode("", true),
e.displayFlightPathOption ? (openBlock(), createBlock(w, {
key: 3,
class: "backgroundControl"
}, {
default: withCtx(() => [
createVNode(O, {
modelValue: e.flightPath3DRadio,
"onUpdate:modelValue": t[24] || (t[24] = (I) => e.flightPath3DRadio = I),
class: "flatmap-radio",
onChange: a.setFlightPath3D
}, {
default: withCtx(() => [
createVNode(A, { value: false }, {
default: withCtx(() => t[41] || (t[41] = [
createTextVNode("2D")
])),
_: 1
}),
createVNode(A, { value: true }, {
default: withCtx(() => t[42] || (t[42] = [
createTextVNode("3D")
])),
_: 1
})
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
})) : createCommentVNode("", true),
createVNode(w, { class: "backgroundSpacer" }),
createVNode(w, { class: "backgroundText" }, {
default: withCtx(() => t[43] || (t[43] = [
createTextVNode("Organs display")
])),
_: 1
}),
createVNode(w, { class: "backgroundControl" }, {
default: withCtx(() => [
createVNode(O, {
modelValue: e.colourRadio,
"onUpdate:modelValue": t[25] || (t[25] = (I) => e.colourRadio = I),
class: "flatmap-radio",
onChange: a.setColour
}, {
default: withCtx(() => [
createVNode(A, { value: true }, {
default: withCtx(() => t[44] || (t[44] = [
createTextVNode("Colour")
])),
_: 1
}),
createVNode(A, { value: false }, {
default: withCtx(() => t[45] || (t[45] = [
createTextVNode("Greyscale")
])),
_: 1
})
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
}),
createVNode(w, { class: "backgroundSpacer" }),
createVNode(w, { class: "backgroundText" }, {
default: withCtx(() => t[46] || (t[46] = [
createTextVNode("Outlines display")
])),
_: 1
}),
createVNode(w, { class: "backgroundControl" }, {
default: withCtx(() => [
createVNode(O, {
modelValue: e.outlinesRadio,
"onUpdate:modelValue": t[26] || (t[26] = (I) => e.outlinesRadio = I),
class: "flatmap-radio",
onChange: a.setOutlines
}, {
default: withCtx(() => [
createVNode(A, { value: true }, {
default: withCtx(() => t[47] || (t[47] = [
createTextVNode("Show")
])),
_: 1
}),
createVNode(A, { value: false }, {
default: withCtx(() => t[48] || (t[48] = [
createTextVNode("Hide")
])),
_: 1
})
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
}),
createVNode(w, { class: "backgroundSpacer" }),
createVNode(w, { class: "backgroundText" }, {
default: withCtx(() => t[49] || (t[49] = [
createTextVNode("Change background")
])),
_: 1
}),
createVNode(w, { class: "backgroundControl" }, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.availableBackground, (I) => (openBlock(), createElementBlock("div", {
key: I,
class: normalizeClass([
"backgroundChoice",
I,
I == e.currentBackground ? "active" : ""
]),
onClick: (K) => a.backgroundChangeCallback(I)
}, null, 10, Rb))), 128))
]),
_: 1
})
])
]),
_: 1
}, 8, ["virtual-ref"]),
withDirectives(createBaseVNode("div", {
class: normalizeClass(["settings-group", { open: e.drawerOpen, close: !e.drawerOpen }])
}, [
n.showOpenMapButton ? (openBlock(), createBlock(w, { key: 0 }, {
default: withCtx(() => [
createVNode(u, {
visible: e.hoverVisibilities[4].value,
content: "Open new map",
placement: "right",
teleported: false,
"popper-class": "flatmap-popper",
ref: "openMapPopover"
}, {
reference: withCtx(() => [
n.enableOpenMapUI && n.openMapOptions.length > 0 ? (openBlock(), createElementBlock("div", {
key: 0,
ref: "openMapRef",
class: "icon-button-container",
onMouseover: t[27] || (t[27] = (I) => a.showTooltip(4)),
onMouseout: t[28] || (t[28] = (I) => a.hideTooltip(4))
}, [
createVNode(f, {
icon: "openMap",
class: "icon-button open-map-button"
})
], 544)) : createCommentVNode("", true)
]),
_: 1
}, 8, ["visible"])
]),
_: 1
})) : createCommentVNode("", true),
n.showLocalSettings ? (openBlock(), createBlock(w, { key: 1 }, {
default: withCtx(() => [
createVNode(u, {
content: "Change settings",
placement: "right",
visible: e.hoverVisibilities[5].value,
teleported: false,
trigger: "manual",
"popper-class": "flatmap-popper",
ref: "settingsPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
ref: "backgroundIconRef",
class: "icon-button-container",
onMouseover: t[29] || (t[29] = (I) => a.showTooltip(5)),
onMouseout: t[30] || (t[30] = (I) => a.hideTooltip(5))
}, [
createVNode(f, {
icon: "changeBckgd",
class: "icon-button"
})
], 544)
]),
_: 1
}, 8, ["visible"])
]),
_: 1
})) : createCommentVNode("", true)
], 2), [
[vShow, !n.disableUI]
]),
e.tooltipDisplay ? (openBlock(), createBlock(D, {
key: 2,
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"])) : createCommentVNode("", true)
])
])), [
[j, e.loading]
]);
}
var yl = Wn(Ib, [["render", $b], ["__scopeId", "data-v-a3c7afab"]]);
var ks = {
"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"
};
var Db = {
name: "MultiFlatmapVuer",
components: {
Col: Un,
Row: Kn,
Option: Xi,
Select: Bo,
Popover: Vo,
FlatmapVuer: yl
},
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 new Promise((e) => {
this.requireInitialisation ? (this.requireInitialisation = false, fetch(this.flatmapAPI).then((t) => t.json()).then((t) => {
Object.keys(this.availableSpecies).forEach((o) => {
const i = this.availableSpecies[o].uuid;
if (i && 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 = true, e(), this.resolveList.forEach((o) => {
o();
});
})) : 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 = markRaw(new Ds.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: true,
displayWarning: true
}, {
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 ks ? ks[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", true);
},
/**
* @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: false
},
/**
* The option to show tooltips for help mode.
*/
helpMode: {
type: Boolean,
default: false
},
/**
* 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: false
},
/**
* The last item of help mode.
*/
helpModeLastItem: {
type: Boolean,
default: false
},
/**
* The option to display minimap at the top-right corner of the map.
*/
displayMinimap: {
type: Boolean,
default: false
},
/**
* The option to show star in legend area.
*/
showStarInLegend: {
type: Boolean,
default: false
},
/**
* Flag to determine rather open map UI should be
* presented or not.
*/
enableOpenMapUI: {
type: Boolean,
default: false
},
/**
* 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: 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
}
};
}
},
/**
* 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: false
},
/**
* The option to show connectivity information in sidebar
*/
connectivityInfoSidebar: {
type: Boolean,
default: false
},
/**
* The option to show connectivity information in sidebar
*/
annotationSidebar: {
type: Boolean,
default: false
},
/**
* The option to show local settings UI
* (background colour, flight path, viewing mode, etc.)
*/
showLocalSettings: {
type: Boolean,
default: true
},
/**
* The option to show open new map button
*/
showOpenMapButton: {
type: Boolean,
default: true
},
/**
* The option to show pathway drawer
*/
showPathwayFilter: {
type: Boolean,
default: true
},
/**
* Allow to add and display extra legends to drawer
*/
externalLegends: {
type: Array,
default: []
}
},
data: function() {
return {
activeSpecies: void 0,
speciesList: {},
requireInitialisation: true,
resolveList: markRaw([]),
initialised: false,
mapManagerRef: void 0
};
},
watch: {
state: {
handler: function(e) {
this.setState(e);
},
immediate: true,
deep: true
}
}
};
var Nb = {
class: "multi-container",
ref: "multiContainer"
};
var Bb = {
key: 0,
style: { position: "absolute", "z-index": "100" }
};
var Vb = { class: "select-box-icon" };
function zb(e, t, n, o, i, a) {
const s = Xi, r = Bo, l = Vo, u = yl;
return openBlock(), createElementBlock("div", Nb, [
n.disableUI ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", Bb, [
t[2] || (t[2] = createBaseVNode("div", { class: "species-display-text" }, "Species", -1)),
createVNode(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: false,
ref: "selectPopover"
}, {
reference: withCtx(() => [
createVNode(r, {
id: "flatmap-select",
teleported: false,
modelValue: e.activeSpecies,
"onUpdate:modelValue": t[0] || (t[0] = (c) => e.activeSpecies = c),
placeholder: "Select",
class: "select-box",
"popper-class": "flatmap-dropdown",
onChange: a.setSpecies
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.speciesList, (c, d) => (openBlock(), createBlock(s, {
key: d,
label: d,
value: d
}, {
default: withCtx(() => [
createBaseVNode("span", Vb, [
createBaseVNode("i", {
class: normalizeClass(c.iconClass)
}, null, 2)
]),
createTextVNode(" " + toDisplayString(d), 1)
]),
_: 2
}, 1032, ["label", "value"]))), 128))
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
}, 8, ["visible"])
])),
(openBlock(true), createElementBlock(Fragment, null, renderList(e.speciesList, (c, d) => withDirectives((openBlock(), createBlock(u, {
key: d,
entry: c.taxo,
uuid: c.uuid,
biologicalSex: c.biologicalSex,
displayWarning: c.displayWarning,
displayLatestChanges: c.displayLatestChanges,
isLegacy: c.isLegacy,
ref_for: true,
ref: d,
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] = (f) => e.$emit("open-map", f)),
onPathwaySelectionChanged: a.onSelectionsDataChanged,
minZoom: n.minZoom,
helpMode: e.activeSpecies == d && 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"])), [
[vShow, e.activeSpecies == d]
])), 128))
], 512);
}
var Gb = Wn(Db, [["render", zb], ["__scopeId", "data-v-f44289b1"]]);
export {
yl as FlatmapVuer,
Gb as MultiFlatmapVuer
};
/*! Bundled license information:
@abi-software/flatmapvuer/dist/flatmapvuer.js:
(**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**)
*/
//# sourceMappingURL=@abi-software_flatmapvuer.js.map