var VL = Object.defineProperty; var jL = (e, t, n) => t in e ? VL(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var Lx = (e, t, n) => jL(e, typeof t != "symbol" ? t + "" : t, n); import { getCurrentScope as g0, onScopeDispose as jp, unref as y, getCurrentInstance as rt, onMounted as at, nextTick as Ue, watch as ce, ref as z, defineComponent as K, openBlock as E, createElementBlock as L, createElementVNode as B, warn as m0, computed as $, inject as xe, isRef as Gn, shallowRef as On, onBeforeUnmount as Tt, onBeforeMount as y0, provide as tt, mergeProps as Lt, renderSlot as oe, toRef as $t, onUnmounted as vb, useAttrs as Hp, useSlots as Xr, createCommentVNode as Z, Fragment as De, normalizeClass as V, createBlock as Q, withCtx as R, resolveDynamicComponent as vt, withModifiers as Je, createVNode as W, toDisplayString as me, normalizeStyle as Ze, Transition as pr, withDirectives as Ne, vShow as ft, reactive as Kt, onActivated as gb, onUpdated as Up, cloneVNode as b0, Text as Vs, Comment as w0, Teleport as x0, readonly as Tc, onDeactivated as k0, renderList as xt, createTextVNode as Ae, withKeys as yn, createSlots as mb, toRaw as Ga, toRefs as Vr, watchEffect as qp, resolveComponent as Xe, resolveDirective as yb, toHandlerKey as bb, vModelText as C0, h as jt, createApp as S0, vModelCheckbox as Ts, toHandlers as HL, pushScopeId as Tr, popScopeId as Or, createStaticVNode as UL, defineAsyncComponent as Oc, Suspense as qL, vModelRadio as e$, onBeforeUpdate as WL, normalizeProps as GL, guardReactiveProps as KL, markRaw as pa } from "vue"; import { defineStore as E0, mapStores as Zl } from "pinia"; const gi = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (o) => { const a = e == null ? void 0 : e(o); if (n === !1 || !a) return t == null ? void 0 : t(o); }; var Rx; const rr = typeof window < "u", YL = (e) => typeof e == "string", t$ = () => { }, I1 = rr && ((Rx = window == null ? void 0 : window.navigator) == null ? void 0 : Rx.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function n$(e) { return typeof e == "function" ? e() : y(e); } function XL(e) { return e; } function $0(e) { return g0() ? (jp(e), !0) : !1; } function ZL(e, t = !0) { rt() ? at(e) : t ? e() : Ue(e); } function Ei(e) { var t; const n = n$(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const _0 = rr ? window : void 0; function ga(...e) { let t, n, r, o; if (YL(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = _0) : [t, n, r, o] = e, !t) return t$; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = ce(() => [Ei(t), n$(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return $0(u), u; } let Dx = !1; function r$(e, t, n = {}) { const { window: r = _0, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; I1 && !Dx && (Dx = !0, Array.from(r.document.body.children).forEach((f) => f.addEventListener("click", t$))); let s = !0; const l = (f) => o.some((h) => { if (typeof h == "string") return Array.from(r.document.querySelectorAll(h)).some((p) => p === f.target || f.composedPath().includes(p)); { const p = Ei(h); return p && (f.target === p || f.composedPath().includes(p)); } }), c = [ ga(r, "click", (f) => { const h = Ei(e); if (!(!h || h === f.target || f.composedPath().includes(h))) { if (f.detail === 0 && (s = !l(f)), !s) { s = !0; return; } t(f); } }, { passive: !0, capture: a }), ga(r, "pointerdown", (f) => { const h = Ei(e); h && (s = !f.composedPath().includes(h) && !l(f)); }, { passive: !0 }), i && ga(r, "blur", (f) => { var h; const p = Ei(e); ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && t(f); }) ].filter(Boolean); return () => c.forEach((f) => f()); } function o$(e, t = !1) { const n = z(), r = () => n.value = !!e(); return r(), ZL(r, t), n; } const Mx = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Nx = "__vueuse_ssr_handlers__"; Mx[Nx] = Mx[Nx] || {}; var Bx = Object.getOwnPropertySymbols, JL = Object.prototype.hasOwnProperty, QL = Object.prototype.propertyIsEnumerable, eR = (e, t) => { var n = {}; for (var r in e) JL.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && Bx) for (var r of Bx(e)) t.indexOf(r) < 0 && QL.call(e, r) && (n[r] = e[r]); return n; }; function bi(e, t, n = {}) { const r = n, { window: o = _0 } = r, a = eR(r, ["window"]); let i; const s = o$(() => o && "ResizeObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = ce(() => Ei(e), (d) => { l(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return $0(c), { isSupported: s, stop: c }; } var zx = Object.getOwnPropertySymbols, tR = Object.prototype.hasOwnProperty, nR = Object.prototype.propertyIsEnumerable, rR = (e, t) => { var n = {}; for (var r in e) tR.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && zx) for (var r of zx(e)) t.indexOf(r) < 0 && nR.call(e, r) && (n[r] = e[r]); return n; }; function oR(e, t, n = {}) { const r = n, { window: o = _0 } = r, a = rR(r, ["window"]); let i; const s = o$(() => o && "MutationObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = ce(() => Ei(e), (d) => { l(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: !0 }), c = () => { l(), u(); }; return $0(c), { isSupported: s, stop: c }; } var Vx; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(Vx || (Vx = {})); var aR = Object.defineProperty, jx = Object.getOwnPropertySymbols, iR = Object.prototype.hasOwnProperty, sR = Object.prototype.propertyIsEnumerable, Hx = (e, t, n) => t in e ? aR(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, lR = (e, t) => { for (var n in t || (t = {})) iR.call(t, n) && Hx(e, n, t[n]); if (jx) for (var n of jx(t)) sR.call(t, n) && Hx(e, n, t[n]); return e; }; const uR = { 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] }; lR({ linear: XL }, uR); const cR = () => rr && /firefox/i.test(window.navigator.userAgent); /** * @vue/shared v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ process.env.NODE_ENV !== "production" && Object.freeze({}); process.env.NODE_ENV !== "production" && Object.freeze([]); const Ku = () => { }, dR = Object.prototype.hasOwnProperty, Ux = (e, t) => dR.call(e, t), Bo = Array.isArray, mr = (e) => typeof e == "function", Dr = (e) => typeof e == "string", yr = (e) => e !== null && typeof e == "object", qx = (e) => (yr(e) || mr(e)) && mr(e.then) && mr(e.catch), pR = Object.prototype.toString, fR = (e) => pR.call(e), gm = (e) => fR(e).slice(8, -1), a$ = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, hR = /-(\w)/g, vR = a$((e) => e.replace(hR, (t, n) => n ? n.toUpperCase() : "")), gR = /\B([A-Z])/g, mR = a$( (e) => e.replace(gR, "-$1").toLowerCase() ); var i$ = typeof global == "object" && global && global.Object === Object && global, yR = typeof self == "object" && self && self.Object === Object && self, oi = i$ || yR || Function("return this")(), Ka = oi.Symbol, s$ = Object.prototype, bR = s$.hasOwnProperty, wR = s$.toString, od = Ka ? Ka.toStringTag : void 0; function xR(e) { var t = bR.call(e, od), n = e[od]; try { e[od] = void 0; var r = !0; } catch { } var o = wR.call(e); return r && (t ? e[od] = n : delete e[od]), o; } var kR = Object.prototype, CR = kR.toString; function SR(e) { return CR.call(e); } var ER = "[object Null]", $R = "[object Undefined]", Wx = Ka ? Ka.toStringTag : void 0; function Fc(e) { return e == null ? e === void 0 ? $R : ER : Wx && Wx in Object(e) ? xR(e) : SR(e); } function Yu(e) { return e != null && typeof e == "object"; } var _R = "[object Symbol]"; function T0(e) { return typeof e == "symbol" || Yu(e) && Fc(e) == _R; } function TR(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; ) o[n] = t(e[n], n, e); return o; } var wa = Array.isArray, OR = 1 / 0, Gx = Ka ? Ka.prototype : void 0, Kx = Gx ? Gx.toString : void 0; function l$(e) { if (typeof e == "string") return e; if (wa(e)) return TR(e, l$) + ""; if (T0(e)) return Kx ? Kx.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -OR ? "-0" : t; } var FR = /\s/; function IR(e) { for (var t = e.length; t-- && FR.test(e.charAt(t)); ) ; return t; } var AR = /^\s+/; function PR(e) { return e && e.slice(0, IR(e) + 1).replace(AR, ""); } function Os(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var Yx = NaN, LR = /^[-+]0x[0-9a-f]+$/i, RR = /^0b[01]+$/i, DR = /^0o[0-7]+$/i, MR = parseInt; function Xx(e) { if (typeof e == "number") return e; if (T0(e)) return Yx; if (Os(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Os(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = PR(e); var n = RR.test(e); return n || DR.test(e) ? MR(e.slice(2), n ? 2 : 8) : LR.test(e) ? Yx : +e; } function u$(e) { return e; } var NR = "[object AsyncFunction]", BR = "[object Function]", zR = "[object GeneratorFunction]", VR = "[object Proxy]"; function c$(e) { if (!Os(e)) return !1; var t = Fc(e); return t == BR || t == zR || t == NR || t == VR; } var mm = oi["__core-js_shared__"], Zx = function() { var e = /[^.]+$/.exec(mm && mm.keys && mm.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function jR(e) { return !!Zx && Zx in e; } var HR = Function.prototype, UR = HR.toString; function Jl(e) { if (e != null) { try { return UR.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var qR = /[\\^$.*+?()[\]{}|]/g, WR = /^\[object .+?Constructor\]$/, GR = Function.prototype, KR = Object.prototype, YR = GR.toString, XR = KR.hasOwnProperty, ZR = RegExp( "^" + YR.call(XR).replace(qR, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function JR(e) { if (!Os(e) || jR(e)) return !1; var t = c$(e) ? ZR : WR; return t.test(Jl(e)); } function QR(e, t) { return e == null ? void 0 : e[t]; } function Ql(e, t) { var n = QR(e, t); return JR(n) ? n : void 0; } var A1 = Ql(oi, "WeakMap"); function eD(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 tD = 800, nD = 16, rD = Date.now; function oD(e) { var t = 0, n = 0; return function() { var r = rD(), o = nD - (r - n); if (n = r, o > 0) { if (++t >= tD) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function aD(e) { return function() { return e; }; } var bv = function() { try { var e = Ql(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), iD = bv ? function(e, t) { return bv(e, "toString", { configurable: !0, enumerable: !1, value: aD(t), writable: !0 }); } : u$, sD = oD(iD); function lD(e, t, n, r) { e.length; for (var o = n + 1; o--; ) if (t(e[o], o, e)) return o; return -1; } var uD = 9007199254740991, cD = /^(?:0|[1-9]\d*)$/; function wb(e, t) { var n = typeof e; return t = t ?? uD, !!t && (n == "number" || n != "symbol" && cD.test(e)) && e > -1 && e % 1 == 0 && e < t; } function dD(e, t, n) { t == "__proto__" && bv ? bv(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function xb(e, t) { return e === t || e !== e && t !== t; } var pD = Object.prototype, fD = pD.hasOwnProperty; function hD(e, t, n) { var r = e[t]; (!(fD.call(e, t) && xb(r, n)) || n === void 0 && !(t in e)) && dD(e, t, n); } var Jx = Math.max; function vD(e, t, n) { return t = Jx(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = Jx(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), eD(e, this, s); }; } var gD = 9007199254740991; function kb(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= gD; } function mD(e) { return e != null && kb(e.length) && !c$(e); } var yD = Object.prototype; function bD(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || yD; return e === n; } function wD(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var xD = "[object Arguments]"; function Qx(e) { return Yu(e) && Fc(e) == xD; } var d$ = Object.prototype, kD = d$.hasOwnProperty, CD = d$.propertyIsEnumerable, Cb = Qx(/* @__PURE__ */ function() { return arguments; }()) ? Qx : function(e) { return Yu(e) && kD.call(e, "callee") && !CD.call(e, "callee"); }; function SD() { return !1; } var p$ = typeof exports == "object" && exports && !exports.nodeType && exports, ek = p$ && typeof module == "object" && module && !module.nodeType && module, ED = ek && ek.exports === p$, tk = ED ? oi.Buffer : void 0, $D = tk ? tk.isBuffer : void 0, P1 = $D || SD, _D = "[object Arguments]", TD = "[object Array]", OD = "[object Boolean]", FD = "[object Date]", ID = "[object Error]", AD = "[object Function]", PD = "[object Map]", LD = "[object Number]", RD = "[object Object]", DD = "[object RegExp]", MD = "[object Set]", ND = "[object String]", BD = "[object WeakMap]", zD = "[object ArrayBuffer]", VD = "[object DataView]", jD = "[object Float32Array]", HD = "[object Float64Array]", UD = "[object Int8Array]", qD = "[object Int16Array]", WD = "[object Int32Array]", GD = "[object Uint8Array]", KD = "[object Uint8ClampedArray]", YD = "[object Uint16Array]", XD = "[object Uint32Array]", xn = {}; xn[jD] = xn[HD] = xn[UD] = xn[qD] = xn[WD] = xn[GD] = xn[KD] = xn[YD] = xn[XD] = !0; xn[_D] = xn[TD] = xn[zD] = xn[OD] = xn[VD] = xn[FD] = xn[ID] = xn[AD] = xn[PD] = xn[LD] = xn[RD] = xn[DD] = xn[MD] = xn[ND] = xn[BD] = !1; function ZD(e) { return Yu(e) && kb(e.length) && !!xn[Fc(e)]; } function JD(e) { return function(t) { return e(t); }; } var f$ = typeof exports == "object" && exports && !exports.nodeType && exports, Rd = f$ && typeof module == "object" && module && !module.nodeType && module, QD = Rd && Rd.exports === f$, ym = QD && i$.process, nk = function() { try { var e = Rd && Rd.require && Rd.require("util").types; return e || ym && ym.binding && ym.binding("util"); } catch { } }(), rk = nk && nk.isTypedArray, h$ = rk ? JD(rk) : ZD, eM = Object.prototype, tM = eM.hasOwnProperty; function nM(e, t) { var n = wa(e), r = !n && Cb(e), o = !n && !r && P1(e), a = !n && !r && !o && h$(e), i = n || r || o || a, s = i ? wD(e.length, String) : [], l = s.length; for (var u in e) tM.call(e, u) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. o && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. wb(u, l))) && s.push(u); return s; } function rM(e, t) { return function(n) { return e(t(n)); }; } var oM = rM(Object.keys, Object), aM = Object.prototype, iM = aM.hasOwnProperty; function sM(e) { if (!bD(e)) return oM(e); var t = []; for (var n in Object(e)) iM.call(e, n) && n != "constructor" && t.push(n); return t; } function v$(e) { return mD(e) ? nM(e) : sM(e); } var lM = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, uM = /^\w*$/; function Sb(e, t) { if (wa(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || T0(e) ? !0 : uM.test(e) || !lM.test(e) || t != null && e in Object(t); } var Jd = Ql(Object, "create"); function cM() { this.__data__ = Jd ? Jd(null) : {}, this.size = 0; } function dM(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var pM = "__lodash_hash_undefined__", fM = Object.prototype, hM = fM.hasOwnProperty; function vM(e) { var t = this.__data__; if (Jd) { var n = t[e]; return n === pM ? void 0 : n; } return hM.call(t, e) ? t[e] : void 0; } var gM = Object.prototype, mM = gM.hasOwnProperty; function yM(e) { var t = this.__data__; return Jd ? t[e] !== void 0 : mM.call(t, e); } var bM = "__lodash_hash_undefined__"; function wM(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Jd && t === void 0 ? bM : t, this; } function Il(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Il.prototype.clear = cM; Il.prototype.delete = dM; Il.prototype.get = vM; Il.prototype.has = yM; Il.prototype.set = wM; function xM() { this.__data__ = [], this.size = 0; } function O0(e, t) { for (var n = e.length; n--; ) if (xb(e[n][0], t)) return n; return -1; } var kM = Array.prototype, CM = kM.splice; function SM(e) { var t = this.__data__, n = O0(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : CM.call(t, n, 1), --this.size, !0; } function EM(e) { var t = this.__data__, n = O0(t, e); return n < 0 ? void 0 : t[n][1]; } function $M(e) { return O0(this.__data__, e) > -1; } function _M(e, t) { var n = this.__data__, r = O0(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Bi(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Bi.prototype.clear = xM; Bi.prototype.delete = SM; Bi.prototype.get = EM; Bi.prototype.has = $M; Bi.prototype.set = _M; var Qd = Ql(oi, "Map"); function TM() { this.size = 0, this.__data__ = { hash: new Il(), map: new (Qd || Bi)(), string: new Il() }; } function OM(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function F0(e, t) { var n = e.__data__; return OM(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function FM(e) { var t = F0(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function IM(e) { return F0(this, e).get(e); } function AM(e) { return F0(this, e).has(e); } function PM(e, t) { var n = F0(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function zi(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } zi.prototype.clear = TM; zi.prototype.delete = FM; zi.prototype.get = IM; zi.prototype.has = AM; zi.prototype.set = PM; var LM = "Expected a function"; function Eb(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(LM); var n = function() { var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache; if (a.has(o)) return a.get(o); var i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (Eb.Cache || zi)(), n; } Eb.Cache = zi; var RM = 500; function DM(e) { var t = Eb(e, function(r) { return n.size === RM && n.clear(), r; }), n = t.cache; return t; } var MM = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, NM = /\\(\\)?/g, BM = DM(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(MM, function(n, r, o, a) { t.push(o ? a.replace(NM, "$1") : r || n); }), t; }); function zM(e) { return e == null ? "" : l$(e); } function I0(e, t) { return wa(e) ? e : Sb(e, t) ? [e] : BM(zM(e)); } var VM = 1 / 0; function Wp(e) { if (typeof e == "string" || T0(e)) return e; var t = e + ""; return t == "0" && 1 / e == -VM ? "-0" : t; } function $b(e, t) { t = I0(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Wp(t[n++])]; return n && n == r ? e : void 0; } function xi(e, t, n) { var r = e == null ? void 0 : $b(e, t); return r === void 0 ? n : r; } function g$(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var ok = Ka ? Ka.isConcatSpreadable : void 0; function jM(e) { return wa(e) || Cb(e) || !!(ok && e && e[ok]); } function HM(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = jM), o || (o = []); ++a < i; ) { var s = e[a]; n(s) ? g$(o, s) : o[o.length] = s; } return o; } function UM(e) { var t = e == null ? 0 : e.length; return t ? HM(e) : []; } function qM(e) { return sD(vD(e, void 0, UM), e + ""); } function vs() { if (!arguments.length) return []; var e = arguments[0]; return wa(e) ? e : [e]; } function WM() { this.__data__ = new Bi(), this.size = 0; } function GM(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function KM(e) { return this.__data__.get(e); } function YM(e) { return this.__data__.has(e); } var XM = 200; function ZM(e, t) { var n = this.__data__; if (n instanceof Bi) { var r = n.__data__; if (!Qd || r.length < XM - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new zi(r); } return n.set(e, t), this.size = n.size, this; } function Ti(e) { var t = this.__data__ = new Bi(e); this.size = t.size; } Ti.prototype.clear = WM; Ti.prototype.delete = GM; Ti.prototype.get = KM; Ti.prototype.has = YM; Ti.prototype.set = ZM; function JM(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (a[o++] = i); } return a; } function QM() { return []; } var eN = Object.prototype, tN = eN.propertyIsEnumerable, ak = Object.getOwnPropertySymbols, nN = ak ? function(e) { return e == null ? [] : (e = Object(e), JM(ak(e), function(t) { return tN.call(e, t); })); } : QM; function rN(e, t, n) { var r = t(e); return wa(e) ? r : g$(r, n(e)); } function ik(e) { return rN(e, v$, nN); } var L1 = Ql(oi, "DataView"), R1 = Ql(oi, "Promise"), D1 = Ql(oi, "Set"), sk = "[object Map]", oN = "[object Object]", lk = "[object Promise]", uk = "[object Set]", ck = "[object WeakMap]", dk = "[object DataView]", aN = Jl(L1), iN = Jl(Qd), sN = Jl(R1), lN = Jl(D1), uN = Jl(A1), ps = Fc; (L1 && ps(new L1(new ArrayBuffer(1))) != dk || Qd && ps(new Qd()) != sk || R1 && ps(R1.resolve()) != lk || D1 && ps(new D1()) != uk || A1 && ps(new A1()) != ck) && (ps = function(e) { var t = Fc(e), n = t == oN ? e.constructor : void 0, r = n ? Jl(n) : ""; if (r) switch (r) { case aN: return dk; case iN: return sk; case sN: return lk; case lN: return uk; case uN: return ck; } return t; }); var pk = oi.Uint8Array, cN = "__lodash_hash_undefined__"; function dN(e) { return this.__data__.set(e, cN), this; } function pN(e) { return this.__data__.has(e); } function wv(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new zi(); ++t < n; ) this.add(e[t]); } wv.prototype.add = wv.prototype.push = dN; wv.prototype.has = pN; function fN(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r; ) if (t(e[n], n, e)) return !0; return !1; } function hN(e, t) { return e.has(t); } var vN = 1, gN = 2; function m$(e, t, n, r, o, a) { var i = n & vN, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & gN ? new wv() : void 0; for (a.set(e, t), a.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, a) : r(p, v, d, e, t, a); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!fN(t, function(g, b) { if (!hN(h, b) && (p === g || o(p, g, n, r, a))) return h.push(b); })) { f = !1; break; } } else if (!(p === v || o(p, v, n, r, a))) { f = !1; break; } } return a.delete(e), a.delete(t), f; } function mN(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function yN(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var bN = 1, wN = 2, xN = "[object Boolean]", kN = "[object Date]", CN = "[object Error]", SN = "[object Map]", EN = "[object Number]", $N = "[object RegExp]", _N = "[object Set]", TN = "[object String]", ON = "[object Symbol]", FN = "[object ArrayBuffer]", IN = "[object DataView]", fk = Ka ? Ka.prototype : void 0, bm = fk ? fk.valueOf : void 0; function AN(e, t, n, r, o, a, i) { switch (n) { case IN: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case FN: return !(e.byteLength != t.byteLength || !a(new pk(e), new pk(t))); case xN: case kN: case EN: return xb(+e, +t); case CN: return e.name == t.name && e.message == t.message; case $N: case TN: return e == t + ""; case SN: var s = mN; case _N: var l = r & bN; if (s || (s = yN), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= wN, i.set(e, t); var c = m$(s(e), s(t), r, o, a, i); return i.delete(e), c; case ON: if (bm) return bm.call(e) == bm.call(t); } return !1; } var PN = 1, LN = Object.prototype, RN = LN.hasOwnProperty; function DN(e, t, n, r, o, a) { var i = n & PN, s = ik(e), l = s.length, u = ik(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : RN.call(t, f))) return !1; } var h = a.get(e), p = a.get(t); if (h && p) return h == t && p == e; var v = !0; a.set(e, t), a.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], b = t[f]; if (r) var C = i ? r(b, g, f, t, e, a) : r(g, b, f, e, t, a); if (!(C === void 0 ? g === b || o(g, b, n, r, a) : C)) { v = !1; break; } m || (m = f == "constructor"); } if (v && !m) { var x = e.constructor, w = t.constructor; x != w && "constructor" in e && "constructor" in t && !(typeof x == "function" && x instanceof x && typeof w == "function" && w instanceof w) && (v = !1); } return a.delete(e), a.delete(t), v; } var MN = 1, hk = "[object Arguments]", vk = "[object Array]", Vf = "[object Object]", NN = Object.prototype, gk = NN.hasOwnProperty; function BN(e, t, n, r, o, a) { var i = wa(e), s = wa(t), l = i ? vk : ps(e), u = s ? vk : ps(t); l = l == hk ? Vf : l, u = u == hk ? Vf : u; var c = l == Vf, d = u == Vf, f = l == u; if (f && P1(e)) { if (!P1(t)) return !1; i = !0, c = !1; } if (f && !c) return a || (a = new Ti()), i || h$(e) ? m$(e, t, n, r, o, a) : AN(e, t, l, n, r, o, a); if (!(n & MN)) { var h = c && gk.call(e, "__wrapped__"), p = d && gk.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return a || (a = new Ti()), o(v, m, n, r, a); } } return f ? (a || (a = new Ti()), DN(e, t, n, r, o, a)) : !1; } function A0(e, t, n, r, o) { return e === t ? !0 : e == null || t == null || !Yu(e) && !Yu(t) ? e !== e && t !== t : BN(e, t, n, r, A0, o); } var zN = 1, VN = 2; function jN(e, t, n, r) { var o = n.length, a = o; if (e == null) return !a; for (e = Object(e); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++o < a; ) { i = n[o]; var s = i[0], l = e[s], u = i[1]; if (i[2]) { if (l === void 0 && !(s in e)) return !1; } else { var c = new Ti(), d; if (!(d === void 0 ? A0(u, l, zN | VN, r, c) : d)) return !1; } } return !0; } function y$(e) { return e === e && !Os(e); } function HN(e) { for (var t = v$(e), n = t.length; n--; ) { var r = t[n], o = e[r]; t[n] = [r, o, y$(o)]; } return t; } function b$(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function UN(e) { var t = HN(e); return t.length == 1 && t[0][2] ? b$(t[0][0], t[0][1]) : function(n) { return n === e || jN(n, e, t); }; } function qN(e, t) { return e != null && t in Object(e); } function WN(e, t, n) { t = I0(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = Wp(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && kb(o) && wb(i, o) && (wa(e) || Cb(e))); } function w$(e, t) { return e != null && WN(e, t, qN); } var GN = 1, KN = 2; function YN(e, t) { return Sb(e) && y$(t) ? b$(Wp(e), t) : function(n) { var r = xi(n, e); return r === void 0 && r === t ? w$(n, e) : A0(t, r, GN | KN); }; } function XN(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function ZN(e) { return function(t) { return $b(t, e); }; } function JN(e) { return Sb(e) ? XN(Wp(e)) : ZN(e); } function QN(e) { return typeof e == "function" ? e : e == null ? u$ : typeof e == "object" ? wa(e) ? YN(e[0], e[1]) : UN(e) : JN(e); } var wm = function() { return oi.Date.now(); }, eB = "Expected a function", tB = Math.max, nB = Math.min; function x$(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(eB); t = Xx(t) || 0, Os(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? tB(Xx(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f); function h(k) { var S = r, _ = o; return r = o = void 0, u = k, i = e.apply(_, S), i; } function p(k) { return u = k, s = setTimeout(g, t), c ? h(k) : i; } function v(k) { var S = k - l, _ = k - u, O = t - S; return d ? nB(O, a - _) : O; } function m(k) { var S = k - l, _ = k - u; return l === void 0 || S >= t || S < 0 || d && _ >= a; } function g() { var k = wm(); if (m(k)) return b(k); s = setTimeout(g, v(k)); } function b(k) { return s = void 0, f && r ? h(k) : (r = o = void 0, i); } function C() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function x() { return s === void 0 ? i : b(wm()); } function w() { var k = wm(), S = m(k); if (r = arguments, o = this, l = k, S) { if (s === void 0) return p(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return w.cancel = C, w.flush = x, w; } function rB(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var o = r - 1; return lD(e, QN(t), o); } function xv(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var o = e[t]; r[o[0]] = o[1]; } return r; } function M1(e, t) { return A0(e, t); } function P0(e) { return e == null; } function oB(e) { return e === void 0; } function aB(e, t, n, r) { if (!Os(e)) return e; t = I0(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = Wp(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = Os(c) ? c : wb(t[o + 1]) ? [] : {}); } hD(s, l, u), s = s[l]; } return e; } function iB(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = $b(e, i); n(s, i) && aB(a, I0(i, e), s); } return a; } function sB(e, t) { return iB(e, t, function(n, r) { return w$(e, r); }); } var lB = qM(function(e, t) { return e == null ? {} : sB(e, t); }); const _d = (e) => e === void 0, bl = (e) => typeof e == "boolean", cr = (e) => typeof e == "number", wl = (e) => typeof Element > "u" ? !1 : e instanceof Element, uB = (e) => Dr(e) ? !Number.isNaN(Number(e)) : !1, cB = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), mk = (e) => Object.keys(e); class k$ extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function _b(e, t) { throw new k$(`[${e}] ${t}`); } function xr(e, t) { if (process.env.NODE_ENV !== "production") { const n = Dr(e) ? new k$(`[${e}] ${t}`) : e; console.warn(n); } } const dB = "utils/dom/style", C$ = (e = "") => e.split(" ").filter((t) => !!t.trim()), yk = (e, t) => { !e || !t.trim() || e.classList.add(...C$(t)); }, kv = (e, t) => { !e || !t.trim() || e.classList.remove(...C$(t)); }, ad = (e, t) => { var n; if (!rr || !e || !t) return ""; let r = vR(t); r === "float" && (r = "cssFloat"); try { const o = e.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return a ? a[r] : ""; } catch { return e.style[r]; } }; function ep(e, t = "px") { if (!e) return ""; if (cr(e) || uB(e)) return `${e}${t}`; if (Dr(e)) return e; xr(dB, "binding value must be a string or number"); } function pB(e, t) { if (!rr) return; if (!t) { e.scrollTop = 0; return; } const n = []; let r = t.offsetParent; for (; r !== null && e !== r && e.contains(r); ) n.push(r), r = r.offsetParent; const o = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var fB = /* @__PURE__ */ K({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z" }) ])); } }), Tb = fB, hB = /* @__PURE__ */ K({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0" }) ])); } }), S$ = hB, vB = /* @__PURE__ */ K({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), B("path", { fill: "currentColor", d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z" }) ])); } }), gB = vB, mB = /* @__PURE__ */ K({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z" }), B("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }) ])); } }), Ob = mB, yB = /* @__PURE__ */ K({ name: "Close", __name: "close", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z" }) ])); } }), bk = yB, bB = /* @__PURE__ */ K({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z" }), B("path", { fill: "currentColor", d: "M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64" }) ])); } }), wk = bB, wB = /* @__PURE__ */ K({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z" }), B("path", { fill: "currentColor", d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z" }) ])); } }), xB = wB, kB = /* @__PURE__ */ K({ name: "InfoFilled", __name: "info-filled", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z" }) ])); } }), CB = kB, SB = /* @__PURE__ */ K({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z" }) ])); } }), L0 = SB, EB = /* @__PURE__ */ K({ name: "View", __name: "view", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160" }) ])); } }), $B = EB; const E$ = "__epPropKey", Ct = (e) => e, _B = (e) => yr(e) && !!e[E$], R0 = (e, t) => { if (!yr(e) || _B(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, l = { type: a, required: !!r, validator: n || i ? (u) => { let c = !1, d = []; if (n && (d = Array.from(n), Ux(e, "default") && d.push(o), c || (c = d.includes(u))), i && (c || (c = i(u))), !c && d.length > 0) { const f = [...new Set(d)].map((h) => JSON.stringify(h)).join(", "); m0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`); } return c; } : void 0, [E$]: !0 }; return Ux(e, "default") && (l.default = o), l; }, un = (e) => xv(Object.entries(e).map(([t, n]) => [ t, R0(n, t) ])), ma = Ct([ String, Object, Function ]), $$ = { validating: L0, success: gB, error: Ob }, Zr = (e, t) => { if (e.install = (n) => { for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e[n] = r; return e; }, TB = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), eu = (e) => (e.install = Ku, e), tp = { 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" }, Rr = "update:modelValue", Al = "change", Xu = "input", Fb = ["", "default", "small", "large"], OB = (e) => ["", ...Fb].includes(e), FB = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Au = (e) => e, IB = ["class", "style"], AB = /^on[A-Z]/, _$ = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = $(() => ((n == null ? void 0 : n.value) || []).concat(IB)), o = rt(); return o ? $(() => { var a; return xv(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && AB.test(i)))); }) : (xr("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), $(() => ({}))); }, PB = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { ce(() => y(i), (s) => { s && xr(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var LB = { name: "en", el: { breadcrumb: { label: "Breadcrumb" }, colorpicker: { confirm: "OK", clear: "Clear", defaultLabel: "color picker", description: "current color is {color}. press enter to select a new color.", alphaLabel: "pick alpha value" }, datepicker: { now: "Now", today: "Today", cancel: "Cancel", clear: "Clear", confirm: "OK", dateTablePrompt: "Use the arrow keys and enter to select the day of the month", monthTablePrompt: "Use the arrow keys and enter to select the month", yearTablePrompt: "Use the arrow keys and enter to select the year", selectedDate: "Selected date", selectDate: "Select date", selectTime: "Select time", startDate: "Start Date", startTime: "Start Time", endDate: "End Date", endTime: "End Time", prevYear: "Previous Year", nextYear: "Next Year", prevMonth: "Previous Month", nextMonth: "Next Month", year: "", month1: "January", month2: "February", month3: "March", month4: "April", month5: "May", month6: "June", month7: "July", month8: "August", month9: "September", month10: "October", month11: "November", month12: "December", week: "week", weeks: { sun: "Sun", mon: "Mon", tue: "Tue", wed: "Wed", thu: "Thu", fri: "Fri", sat: "Sat" }, weeksFull: { sun: "Sunday", mon: "Monday", tue: "Tuesday", wed: "Wednesday", thu: "Thursday", fri: "Friday", sat: "Saturday" }, months: { jan: "Jan", feb: "Feb", mar: "Mar", apr: "Apr", may: "May", jun: "Jun", jul: "Jul", aug: "Aug", sep: "Sep", oct: "Oct", nov: "Nov", dec: "Dec" } }, inputNumber: { decrease: "decrease number", increase: "increase number" }, select: { loading: "Loading", noMatch: "No matching data", noData: "No data", placeholder: "Select" }, mention: { loading: "Loading" }, dropdown: { toggleDropdown: "Toggle Dropdown" }, cascader: { noMatch: "No matching data", loading: "Loading", placeholder: "Select", noData: "No data" }, pagination: { goto: "Go to", pagesize: "/page", total: "Total {total}", pageClassifier: "", page: "Page", prev: "Go to previous page", next: "Go to next page", currentPage: "page {pager}", prevPages: "Previous {pager} pages", nextPages: "Next {pager} pages", deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details" }, dialog: { close: "Close this dialog" }, drawer: { close: "Close this dialog" }, messagebox: { title: "Message", confirm: "OK", cancel: "Cancel", error: "Illegal input", close: "Close this dialog" }, upload: { deleteTip: "press delete to remove", delete: "Delete", preview: "Preview", continue: "Continue" }, slider: { defaultLabel: "slider between {min} and {max}", defaultRangeStartLabel: "pick start value", defaultRangeEndLabel: "pick end value" }, table: { emptyText: "No Data", confirmFilter: "Confirm", resetFilter: "Reset", clearFilter: "All", sumText: "Sum" }, tour: { next: "Next", previous: "Previous", finish: "Finish" }, tree: { emptyText: "No Data" }, transfer: { noMatch: "No matching data", noData: "No data", titles: ["List 1", "List 2"], filterPlaceholder: "Enter keyword", noCheckedFormat: "{total} items", hasCheckedFormat: "{checked}/{total} checked" }, image: { error: "FAILED" }, pageHeader: { title: "Back" }, popconfirm: { confirmButtonText: "Yes", cancelButtonText: "No" }, carousel: { leftArrow: "Carousel arrow left", rightArrow: "Carousel arrow right", indicator: "Carousel switch to index {index}" } } }; const RB = (e) => (t, n) => DB(t, n, y(e)), DB = (e, t, n) => xi(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), MB = (e) => { const t = $(() => y(e).name), n = Gn(e) ? e : z(e); return { lang: t, locale: n, t: RB(e) }; }, T$ = Symbol("localeContextKey"), O$ = (e) => { const t = e || xe(T$, z()); return MB($(() => t.value || LB)); }, Bh = "el", NB = "is-", el = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, F$ = Symbol("namespaceContextKey"), Ib = (e) => { const t = e || (rt() ? xe(F$, z(Bh)) : z(Bh)); return $(() => y(t) || Bh); }, nn = (e, t) => { const n = Ib(t); return { namespace: n, b: (v = "") => el(n.value, e, v, "", ""), e: (v) => v ? el(n.value, e, "", v, "") : "", m: (v) => v ? el(n.value, e, "", "", v) : "", be: (v, m) => v && m ? el(n.value, e, v, m, "") : "", em: (v, m) => v && m ? el(n.value, e, "", v, m) : "", bm: (v, m) => v && m ? el(n.value, e, v, "", m) : "", bem: (v, m, g) => v && m && g ? el(n.value, e, v, m, g) : "", is: (v, ...m) => { const g = m.length >= 1 ? m[0] : !0; return v && g ? `${NB}${v}` : ""; }, cssVar: (v) => { const m = {}; for (const g in v) v[g] && (m[`--${n.value}-${g}`] = v[g]); return m; }, cssVarName: (v) => `--${n.value}-${v}`, cssVarBlock: (v) => { const m = {}; for (const g in v) v[g] && (m[`--${n.value}-${e}-${g}`] = v[g]); return m; }, cssVarBlockName: (v) => `--${n.value}-${e}-${v}` }; }, BB = R0({ type: Ct(Boolean), default: null }), zB = R0({ type: Ct(Function) }), VB = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: BB, [n]: zB }; return { useModelToggle: ({ indicator: i, toggleReason: s, shouldHideWhenRouteChanges: l, shouldProceed: u, onShow: c, onHide: d }) => { const f = rt(), { emit: h } = f, p = f.props, v = $(() => mr(p[n])), m = $(() => p[e] === null), g = (S) => { i.value !== !0 && (i.value = !0, s && (s.value = S), mr(c) && c(S)); }, b = (S) => { i.value !== !1 && (i.value = !1, s && (s.value = S), mr(d) && d(S)); }, C = (S) => { if (p.disabled === !0 || mr(u) && !u()) return; const _ = v.value && rr; _ && h(t, !0), (m.value || !_) && g(S); }, x = (S) => { if (p.disabled === !0 || !rr) return; const _ = v.value && rr; _ && h(t, !1), (m.value || !_) && b(S); }, w = (S) => { bl(S) && (p.disabled && S ? v.value && h(t, !1) : i.value !== S && (S ? g() : b())); }, k = () => { i.value ? x() : C(); }; return ce(() => p[e], w), l && f.appContext.config.globalProperties.$route !== void 0 && ce(() => ({ ...f.proxy.$route }), () => { l.value && i.value && x(); }), at(() => { w(p[e]); }), { hide: x, show: C, toggle: k, hasUpdateHandler: v }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, I$ = (e) => { const t = rt(); return $(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var ao = "top", qo = "bottom", Wo = "right", io = "left", Ab = "auto", Gp = [ao, qo, Wo, io], Zu = "start", np = "end", jB = "clippingParents", A$ = "viewport", id = "popper", HB = "reference", xk = Gp.reduce(function(e, t) { return e.concat([t + "-" + Zu, t + "-" + np]); }, []), D0 = [].concat(Gp, [Ab]).reduce(function(e, t) { return e.concat([t, t + "-" + Zu, t + "-" + np]); }, []), UB = "beforeRead", qB = "read", WB = "afterRead", GB = "beforeMain", KB = "main", YB = "afterMain", XB = "beforeWrite", ZB = "write", JB = "afterWrite", QB = [UB, qB, WB, GB, KB, YB, XB, ZB, JB]; function Ya(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Ca(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Ju(e) { var t = Ca(e).Element; return e instanceof t || e instanceof Element; } function Vo(e) { var t = Ca(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function Pb(e) { if (typeof ShadowRoot > "u") return !1; var t = Ca(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function e7(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n]; !Vo(a) || !Ya(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function t7(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(r) { var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !Vo(o) || !Ya(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var P$ = { name: "applyStyles", enabled: !0, phase: "write", fn: e7, effect: t7, requires: ["computeStyles"] }; function Va(e) { return e.split("-")[0]; } var xl = Math.max, Cv = Math.min, Qu = Math.round; function ec(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (Vo(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Qu(n.width) / i || 1), a > 0 && (o = Qu(n.height) / a || 1); } return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o }; } function Lb(e) { var t = ec(e), n = e.offsetWidth, r = e.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: r }; } function L$(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && Pb(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Ii(e) { return Ca(e).getComputedStyle(e); } function n7(e) { return ["table", "td", "th"].indexOf(Ya(e)) >= 0; } function js(e) { return ((Ju(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function M0(e) { return Ya(e) === "html" ? e : e.assignedSlot || e.parentNode || (Pb(e) ? e.host : null) || js(e); } function kk(e) { return !Vo(e) || Ii(e).position === "fixed" ? null : e.offsetParent; } function r7(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Vo(e)) { var r = Ii(e); if (r.position === "fixed") return null; } var o = M0(e); for (Pb(o) && (o = o.host); Vo(o) && ["html", "body"].indexOf(Ya(o)) < 0; ) { var a = Ii(o); 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 o; o = o.parentNode; } return null; } function Kp(e) { for (var t = Ca(e), n = kk(e); n && n7(n) && Ii(n).position === "static"; ) n = kk(n); return n && (Ya(n) === "html" || Ya(n) === "body" && Ii(n).position === "static") ? t : n || r7(e) || t; } function Rb(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Dd(e, t, n) { return xl(e, Cv(t, n)); } function o7(e, t, n) { var r = Dd(e, t, n); return r > n ? n : r; } function R$() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function D$(e) { return Object.assign({}, R$(), e); } function M$(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var a7 = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, D$(typeof e != "number" ? e : M$(e, Gp)); }; function i7(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Va(n.placement), l = Rb(s), u = [io, Wo].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = a7(o.padding, n), f = Lb(a), h = l === "y" ? ao : io, p = l === "y" ? qo : Wo, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Kp(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, C = v / 2 - m / 2, x = d[h], w = b - f[c] - d[p], k = b / 2 - f[c] / 2 + C, S = Dd(x, k, w), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - k, t); } } function s7(e) { var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r; o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !L$(t.elements.popper, o) || (t.elements.arrow = o)); } var l7 = { name: "arrow", enabled: !0, phase: "main", fn: i7, effect: s7, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function tc(e) { return e.split("-")[1]; } var u7 = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function c7(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: Qu(t * o) / o || 0, y: Qu(n * o) / o || 0 }; } function Ck(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), C = io, x = ao, w = window; if (u) { var k = Kp(n), S = "clientHeight", _ = "clientWidth"; if (k === Ca(n) && (k = js(n), Ii(k).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), k = k, o === ao || (o === io || o === Wo) && a === np) { x = qo; var O = d && k === w && w.visualViewport ? w.visualViewport.height : k[S]; v -= O - r.height, v *= l ? 1 : -1; } if (o === io || (o === ao || o === qo) && a === np) { C = Wo; var F = d && k === w && w.visualViewport ? w.visualViewport.width : k[_]; h -= F - r.width, h *= l ? 1 : -1; } } var I = Object.assign({ position: s }, u && u7), P = c === !0 ? c7({ x: h, y: v }) : { x: h, y: v }; if (h = P.x, v = P.y, l) { var M; return Object.assign({}, I, (M = {}, M[x] = b ? "0" : "", M[C] = g ? "0" : "", M.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", M)); } return Object.assign({}, I, (t = {}, t[x] = b ? v + "px" : "", t[C] = g ? h + "px" : "", t.transform = "", t)); } function d7(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: Va(t.placement), variation: tc(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ck(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ck(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var N$ = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: d7, data: {} }, jf = { passive: !0 }; function p7(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Ca(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, jf); }), s && l.addEventListener("resize", n.update, jf), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, jf); }), s && l.removeEventListener("resize", n.update, jf); }; } var B$ = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: p7, data: {} }, f7 = { left: "right", right: "left", bottom: "top", top: "bottom" }; function zh(e) { return e.replace(/left|right|bottom|top/g, function(t) { return f7[t]; }); } var h7 = { start: "end", end: "start" }; function Sk(e) { return e.replace(/start|end/g, function(t) { return h7[t]; }); } function Db(e) { var t = Ca(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function Mb(e) { return ec(js(e)).left + Db(e).scrollLeft; } function v7(e) { var t = Ca(e), n = js(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + Mb(e), y: s }; } function g7(e) { var t, n = js(e), r = Db(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = xl(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = xl(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + Mb(e), l = -r.scrollTop; return Ii(o || n).direction === "rtl" && (s += xl(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function Nb(e) { var t = Ii(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function z$(e) { return ["html", "body", "#document"].indexOf(Ya(e)) >= 0 ? e.ownerDocument.body : Vo(e) && Nb(e) ? e : z$(M0(e)); } function Md(e, t) { var n; t === void 0 && (t = []); var r = z$(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ca(r), i = o ? [a].concat(a.visualViewport || [], Nb(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(Md(M0(i))); } function N1(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function m7(e) { var t = ec(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 Ek(e, t) { return t === A$ ? N1(v7(e)) : Ju(t) ? m7(t) : N1(g7(js(e))); } function y7(e) { var t = Md(M0(e)), n = ["absolute", "fixed"].indexOf(Ii(e).position) >= 0, r = n && Vo(e) ? Kp(e) : e; return Ju(r) ? t.filter(function(o) { return Ju(o) && L$(o, r) && Ya(o) !== "body"; }) : []; } function b7(e, t, n) { var r = t === "clippingParents" ? y7(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = Ek(e, l); return s.top = xl(u.top, s.top), s.right = Cv(u.right, s.right), s.bottom = Cv(u.bottom, s.bottom), s.left = xl(u.left, s.left), s; }, Ek(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function V$(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? Va(r) : null, a = r ? tc(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case ao: l = { x: i, y: t.y - n.height }; break; case qo: l = { x: i, y: t.y + t.height }; break; case Wo: l = { x: t.x + t.width, y: s }; break; case io: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? Rb(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case Zu: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case np: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function rp(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? jB : a, s = n.rootBoundary, l = s === void 0 ? A$ : s, u = n.elementContext, c = u === void 0 ? id : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = D$(typeof p != "number" ? p : M$(p, Gp)), m = c === id ? HB : id, g = e.rects.popper, b = e.elements[f ? m : c], C = b7(Ju(b) ? b : b.contextElement || js(e.elements.popper), i, l), x = ec(e.elements.reference), w = V$({ reference: x, element: g, strategy: "absolute", placement: o }), k = N1(Object.assign({}, g, w)), S = c === id ? k : x, _ = { top: C.top - S.top + v.top, bottom: S.bottom - C.bottom + v.bottom, left: C.left - S.left + v.left, right: S.right - C.right + v.right }, O = e.modifiersData.offset; if (c === id && O) { var F = O[o]; Object.keys(_).forEach(function(I) { var P = [Wo, qo].indexOf(I) >= 0 ? 1 : -1, M = [ao, qo].indexOf(I) >= 0 ? "y" : "x"; _[I] += F[M] * P; }); } return _; } function w7(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? D0 : l, c = tc(r), d = c ? s ? xk : xk.filter(function(p) { return tc(p) === c; }) : Gp, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = rp(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[Va(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function x7(e) { if (Va(e) === Ab) return []; var t = zh(e); return [Sk(e), t, Sk(t)]; } function k7(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = Va(m), b = g === m, C = l || (b || !p ? [zh(m)] : x7(m)), x = [m].concat(C).reduce(function(we, be) { return we.concat(Va(be) === Ab ? w7(t, { placement: be, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : be); }, []), w = t.rects.reference, k = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, O = x[0], F = 0; F < x.length; F++) { var I = x[F], P = Va(I), M = tc(I) === Zu, N = [ao, qo].indexOf(P) >= 0, j = N ? "width" : "height", A = rp(t, { placement: I, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), U = N ? M ? Wo : io : M ? qo : ao; w[j] > k[j] && (U = zh(U)); var q = zh(U), Y = []; if (a && Y.push(A[P] <= 0), s && Y.push(A[U] <= 0, A[q] <= 0), Y.every(function(we) { return we; })) { O = I, _ = !1; break; } S.set(I, Y); } if (_) for (var ie = p ? 3 : 1, re = function(we) { var be = x.find(function(de) { var ae = S.get(de); if (ae) return ae.slice(0, we).every(function(ee) { return ee; }); }); if (be) return O = be, "break"; }, le = ie; le > 0; le--) { var he = re(le); if (he === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var C7 = { name: "flip", enabled: !0, phase: "main", fn: k7, requiresIfExists: ["offset"], data: { _skip: !1 } }; function $k(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 _k(e) { return [ao, Wo, qo, io].some(function(t) { return e[t] >= 0; }); } function S7(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = rp(t, { elementContext: "reference" }), s = rp(t, { altBoundary: !0 }), l = $k(i, r), u = $k(s, o, a), c = _k(l), d = _k(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 E7 = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: S7 }; function $7(e, t, n) { var r = Va(e), o = [io, ao].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [io, Wo].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function _7(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = D0.reduce(function(c, d) { return c[d] = $7(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var T7 = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: _7 }; function O7(e) { var t = e.state, n = e.name; t.modifiersData[n] = V$({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var j$ = { name: "popperOffsets", enabled: !0, phase: "read", fn: O7, data: {} }; function F7(e) { return e === "x" ? "y" : "x"; } function I7(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = rp(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = Va(t.placement), b = tc(t.placement), C = !b, x = Rb(g), w = F7(x), k = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), I = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, P = { x: 0, y: 0 }; if (k) { if (a) { var M, N = x === "y" ? ao : io, j = x === "y" ? qo : Wo, A = x === "y" ? "height" : "width", U = k[x], q = U + m[N], Y = U - m[j], ie = h ? -_[A] / 2 : 0, re = b === Zu ? S[A] : _[A], le = b === Zu ? -_[A] : -S[A], he = t.elements.arrow, we = h && he ? Lb(he) : { width: 0, height: 0 }, be = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : R$(), de = be[N], ae = be[j], ee = Dd(0, S[A], we[A]), se = C ? S[A] / 2 - ie - ee - de - F.mainAxis : re - ee - de - F.mainAxis, pe = C ? -S[A] / 2 + ie + ee + ae + F.mainAxis : le + ee + ae + F.mainAxis, Se = t.elements.arrow && Kp(t.elements.arrow), Le = Se ? x === "y" ? Se.clientTop || 0 : Se.clientLeft || 0 : 0, je = (M = I == null ? void 0 : I[x]) != null ? M : 0, _e = U + se - je - Le, ze = U + pe - je, Ie = Dd(h ? Cv(q, _e) : q, U, h ? xl(Y, ze) : Y); k[x] = Ie, P[x] = Ie - U; } if (s) { var He, qe = x === "x" ? ao : io, et = x === "x" ? qo : Wo, Ve = k[w], nt = w === "y" ? "height" : "width", ot = Ve + m[qe], pt = Ve - m[et], T = [ao, io].indexOf(g) !== -1, G = (He = I == null ? void 0 : I[w]) != null ? He : 0, fe = T ? ot : Ve - S[nt] - _[nt] - G + F.altAxis, ge = T ? Ve + S[nt] + _[nt] - G - F.altAxis : pt, ve = h && T ? o7(fe, Ve, ge) : Dd(h ? fe : ot, Ve, h ? ge : pt); k[w] = ve, P[w] = ve - Ve; } t.modifiersData[r] = P; } } var A7 = { name: "preventOverflow", enabled: !0, phase: "main", fn: I7, requiresIfExists: ["offset"] }; function P7(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function L7(e) { return e === Ca(e) || !Vo(e) ? Db(e) : P7(e); } function R7(e) { var t = e.getBoundingClientRect(), n = Qu(t.width) / e.offsetWidth || 1, r = Qu(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function D7(e, t, n) { n === void 0 && (n = !1); var r = Vo(t), o = Vo(t) && R7(t), a = js(t), i = ec(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Ya(t) !== "body" || Nb(a)) && (s = L7(t)), Vo(t) ? (l = ec(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = Mb(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function M7(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(a) { t.set(a.name, a); }); function o(a) { n.add(a.name); var i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function N7(e) { var t = M7(e); return QB.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function B7(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function z7(e) { var t = e.reduce(function(n, r) { var o = n[r.name]; return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var Tk = { placement: "bottom", modifiers: [], strategy: "absolute" }; function Ok() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function Bb(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? Tk : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Tk, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: Ju(i) ? Md(i) : i.contextElement ? Md(i.contextElement) : [], popper: Md(s) }; var g = N7(z7([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (Ok(m, g)) { u.rects = { reference: D7(m, Kp(g), u.options.strategy === "fixed"), popper: Lb(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var C = u.orderedModifiers[b], x = C.fn, w = C.options, k = w === void 0 ? {} : w, S = C.name; typeof x == "function" && (u = x({ state: u, options: k, name: S, instance: f }) || u); } } } }, update: B7(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!Ok(i, s)) return f; f.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, C = v.effect; if (typeof C == "function") { var x = C({ state: u, name: m, instance: f, options: b }), w = function() { }; c.push(x || w); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } Bb(); var V7 = [B$, j$, N$, P$]; Bb({ defaultModifiers: V7 }); var j7 = [B$, j$, N$, P$, T7, C7, A7, l7, E7], H7 = Bb({ defaultModifiers: j7 }); const U7 = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = q7(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = $(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = On(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return ce(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), ce([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = H7(l, u, y(o))); }), Tt(() => { s(); }), { state: $(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: $(() => y(i).styles), attributes: $(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: $(() => y(a)) }; }; function q7(e) { const t = Object.keys(e.elements), n = xv(t.map((o) => [o, e.styles[o] || {}])), r = xv(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } function Fk() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return $0(() => n()), { registerTimeout: t, cancelTimeout: n }; } const B1 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, W7 = Symbol("elIdInjection"), H$ = () => rt() ? xe(W7, B1) : B1, Yp = (e) => { const t = H$(); !rr && t === B1 && xr("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 = Ib(); return $(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Pu = []; const Ik = (e) => { const t = e; t.key === tp.esc && Pu.forEach((n) => n(t)); }, G7 = (e) => { at(() => { Pu.length === 0 && document.addEventListener("keydown", Ik), rr && Pu.push(e); }), Tt(() => { Pu = Pu.filter((t) => t !== e), Pu.length === 0 && rr && document.removeEventListener("keydown", Ik); }); }; let Ak; const U$ = () => { const e = Ib(), t = H$(), n = $(() => `${e.value}-popper-container-${t.prefix}`), r = $(() => `#${n.value}`); return { id: n, selector: r }; }, K7 = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Y7 = () => { const { id: e, selector: t } = U$(); return y0(() => { rr && (process.env.NODE_ENV === "test" || !Ak || !document.body.querySelector(t.value)) && (Ak = K7(e.value)); }), { id: e, selector: t }; }, X7 = un({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), Z7 = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = Fk(), { registerTimeout: i, cancelTimeout: s } = Fk(); return { onOpen: (c) => { a(() => { r(c); const d = y(n); cr(d) && d > 0 && i(() => { o(c); }, d); }, y(e)); }, onClose: (c) => { s(), a(() => { o(c); }, y(t)); } }; }, q$ = Symbol("elForwardRef"), J7 = (e) => { tt(q$, { setForwardRef: (n) => { e.value = n; } }); }, Q7 = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), Pk = { current: 0 }, Lk = z(0), W$ = 2e3, Rk = Symbol("elZIndexContextKey"), G$ = Symbol("zIndexContextKey"), K$ = (e) => { const t = rt() ? xe(Rk, Pk) : Pk, n = e || (rt() ? xe(G$, void 0) : void 0), r = $(() => { const i = y(n); return cr(i) ? i : W$; }), o = $(() => r.value + Lk.value), a = () => (t.current++, Lk.value = t.current, o.value); return !rr && !xe(Rk) && xr("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: r, currentZIndex: o, nextZIndex: a }; }; function ez(e) { let t; function n() { if (e.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e.value; if (o == null || a == null) return; const s = i.slice(0, Math.max(0, o)), l = i.slice(Math.max(0, a)); t = { selectionStart: o, selectionEnd: a, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t; if (a == null || i == null || s == null) return; let l = o.length; if (o.endsWith(i)) l = o.length - i.length; else if (o.startsWith(a)) l = a.length; else { const u = a[s - 1], c = o.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const zb = R0({ type: String, values: Fb, required: !1 }), Y$ = Symbol("size"), tz = () => { const e = xe(Y$, {}); return $(() => y(e.size) || ""); }; function X$(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = rt(), { emit: i } = a, s = On(), l = z(!1), u = (f) => { mr(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; mr(r) && r(f) || f.relatedTarget && ((h = s.value) != null && h.contains(f.relatedTarget)) || (l.value = !1, i("blur", f), o == null || o()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return ce(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), ga(s, "focus", u, !0), ga(s, "blur", c, !0), ga(s, "click", d, !0), process.env.NODE_ENV === "test" && at(() => { const f = wl(e.value) ? e.value : document.querySelector("input,textarea"); f && (ga(f, "focus", u, !0), ga(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function Z$({ afterComposition: e, emit: t }) { const n = z(!1), r = (s) => { t == null || t("compositionstart", s), n.value = !0; }, o = (s) => { var l; t == null || t("compositionupdate", s); const u = (l = s.target) == null ? void 0 : l.value, c = u[u.length - 1] || ""; n.value = !FB(c); }, a = (s) => { t == null || t("compositionend", s), n.value && (n.value = !1, Ue(() => e(s))); }; return { isComposing: n, handleComposition: (s) => { s.type === "compositionend" ? a(s) : o(s); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } const J$ = Symbol("emptyValuesContextKey"), nz = "use-empty-values", rz = ["", void 0, null], oz = void 0, az = un({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => mr(e) ? !e() : !e } }), iz = (e, t) => { const n = rt() ? xe(J$, z({})) : z({}), r = $(() => e.emptyValues || n.value.emptyValues || rz), o = $(() => mr(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : mr(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : oz), a = (i) => r.value.includes(i); return r.value.includes(o.value) || xr(nz, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: o, isEmptyValue: a }; }, sz = un({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), tu = (e) => lB(sz, e), Q$ = Symbol(), Sv = z(); function Vb(e, t = void 0) { const n = rt() ? xe(Q$, Sv) : Sv; return e ? $(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function lz(e, t) { const n = Vb(), r = nn(e, $(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Bh; })), o = O$($(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = K$($(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || W$; })), i = $(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return uz($(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const uz = (e, t, n = !1) => { var r; const o = !!rt(), a = o ? Vb() : void 0, i = (r = void 0) != null ? r : o ? tt : void 0; if (!i) { xr("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = $(() => { const l = y(e); return a != null && a.value ? cz(a.value, l) : l; }); return i(Q$, s), i(T$, $(() => s.value.locale)), i(F$, $(() => s.value.namespace)), i(G$, $(() => s.value.zIndex)), i(Y$, { size: $(() => s.value.size || "") }), i(J$, $(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Sv.value) && (Sv.value = s.value), s; }, cz = (e, t) => { const n = [.../* @__PURE__ */ new Set([...mk(e), ...mk(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var Ut = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const dz = un({ size: { type: Ct([Number, String]) }, color: { type: String } }), pz = K({ name: "ElIcon", inheritAttrs: !1 }), fz = /* @__PURE__ */ K({ ...pz, props: dz, setup(e) { const t = e, n = nn("icon"), r = $(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: _d(o) ? void 0 : ep(o), "--color": a }; }); return (o, a) => (E(), L("i", Lt({ class: y(n).b(), style: y(r) }, o.$attrs), [ oe(o.$slots, "default") ], 16)); } }); var hz = /* @__PURE__ */ Ut(fz, [["__file", "icon.vue"]]); const tr = Zr(hz), jb = Symbol("formContextKey"), Ev = Symbol("formItemContextKey"), Xp = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : I$("size"), o = t.global ? n : tz(), a = t.form ? { size: void 0 } : xe(jb, void 0), i = t.formItem ? { size: void 0 } : xe(Ev, void 0); return $(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, Zp = (e) => { const t = I$("disabled"), n = xe(jb, void 0); return $(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, N0 = () => { const e = xe(jb, void 0), t = xe(Ev, void 0); return { form: e, formItem: t }; }, Hb = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = z(!1)), r || (r = z(!1)); const o = z(); let a; const i = $(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return at(() => { a = ce([$t(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : Yp().value); u !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !l && u && t.addInputId(u)), o.value = u); }, { immediate: !0 }); }), vb(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; let ra; const vz = ` height:0 !important; visibility:hidden !important; ${cR() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, gz = [ "letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing" ]; function mz(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), o = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: gz.map((i) => `${i}:${t.getPropertyValue(i)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n }; } function Dk(e, t = 1, n) { var r; ra || (ra = document.createElement("textarea"), document.body.appendChild(ra)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = mz(e); ra.setAttribute("style", `${s};${vz}`), ra.value = e.value || e.placeholder || ""; let l = ra.scrollHeight; const u = {}; i === "border-box" ? l = l + a : i === "content-box" && (l = l - o), ra.value = ""; const c = ra.scrollHeight - o; if (cr(t)) { let d = c * t; i === "border-box" && (d = d + o + a), l = Math.max(d, l), u.minHeight = `${d}px`; } if (cr(n)) { let d = c * n; i === "border-box" && (d = d + o + a), l = Math.min(d, l); } return u.height = `${l}px`, (r = ra.parentNode) == null || r.removeChild(ra), ra = void 0, u; } const yz = un({ id: { type: String, default: void 0 }, size: zb, disabled: Boolean, modelValue: { type: Ct([ String, Number, Object ]), default: "" }, maxlength: { type: [String, Number] }, minlength: { type: [String, Number] }, type: { type: String, default: "text" }, resize: { type: String, values: ["none", "both", "horizontal", "vertical"] }, autosize: { type: Ct([Boolean, Object]), default: !1 }, autocomplete: { type: String, default: "off" }, formatter: { type: Function }, parser: { type: Function }, placeholder: { type: String }, form: { type: String }, readonly: Boolean, clearable: Boolean, showPassword: Boolean, showWordLimit: Boolean, suffixIcon: { type: ma }, prefixIcon: { type: ma }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: Ct([Object, Array, String]), default: () => Au({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...tu(["ariaLabel"]) }), bz = { [Rr]: (e) => Dr(e), input: (e) => Dr(e), change: (e) => Dr(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, mouseleave: (e) => e instanceof MouseEvent, mouseenter: (e) => e instanceof MouseEvent, keydown: (e) => e instanceof Event, compositionstart: (e) => e instanceof CompositionEvent, compositionupdate: (e) => e instanceof CompositionEvent, compositionend: (e) => e instanceof CompositionEvent }, wz = K({ name: "ElInput", inheritAttrs: !1 }), xz = /* @__PURE__ */ K({ ...wz, props: yz, emits: bz, setup(e, { expose: t, emit: n }) { const r = e, o = Hp(), a = Xr(), i = $(() => { const G = {}; return r.containerRole === "combobox" && (G["aria-haspopup"] = o["aria-haspopup"], G["aria-owns"] = o["aria-owns"], G["aria-expanded"] = o["aria-expanded"]), G; }), s = $(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", he.value), { [v.b("group")]: a.prepend || a.append, [v.m("prefix")]: a.prefix || r.prefixIcon, [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: Y.value && ie.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), l = $(() => [ v.e("wrapper"), v.is("focus", O.value) ]), u = _$({ excludeKeys: $(() => Object.keys(i.value)) }), { form: c, formItem: d } = N0(), { inputId: f } = Hb(r, { formItemContext: d }), h = Xp(), p = Zp(), v = nn("input"), m = nn("textarea"), g = On(), b = On(), C = z(!1), x = z(!1), w = z(), k = On(r.inputStyle), S = $(() => g.value || b.value), { wrapperRef: _, isFocused: O, handleFocus: F, handleBlur: I } = X$(S, { beforeFocus() { return p.value; }, afterBlur() { var G; r.validateEvent && ((G = d == null ? void 0 : d.validate) == null || G.call(d, "blur").catch((fe) => xr(fe))); } }), P = $(() => { var G; return (G = c == null ? void 0 : c.statusIcon) != null ? G : !1; }), M = $(() => (d == null ? void 0 : d.validateState) || ""), N = $(() => M.value && $$[M.value]), j = $(() => x.value ? $B : xB), A = $(() => [ o.style ]), U = $(() => [ r.inputStyle, k.value, { resize: r.resize } ]), q = $(() => P0(r.modelValue) ? "" : String(r.modelValue)), Y = $(() => r.clearable && !p.value && !r.readonly && !!q.value && (O.value || C.value)), ie = $(() => r.showPassword && !p.value && !r.readonly && !!q.value && (!!q.value || O.value)), re = $(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), le = $(() => q.value.length), he = $(() => !!re.value && le.value > Number(r.maxlength)), we = $(() => !!a.suffix || !!r.suffixIcon || Y.value || r.showPassword || re.value || !!M.value && P.value), [be, de] = ez(g); bi(b, (G) => { if (se(), !re.value || r.resize !== "both") return; const fe = G[0], { width: ge } = fe.contentRect; w.value = { right: `calc(100% - ${ge + 15 + 6}px)` }; }); const ae = () => { const { type: G, autosize: fe } = r; if (!(!rr || G !== "textarea" || !b.value)) if (fe) { const ge = yr(fe) ? fe.minRows : void 0, ve = yr(fe) ? fe.maxRows : void 0, Fe = Dk(b.value, ge, ve); k.value = { overflowY: "hidden", ...Fe }, Ue(() => { b.value.offsetHeight, k.value = Fe; }); } else k.value = { minHeight: Dk(b.value).minHeight }; }, se = ((G) => { let fe = !1; return () => { var ge; if (fe || !r.autosize) return; ((ge = b.value) == null ? void 0 : ge.offsetParent) === null || (G(), fe = !0); }; })(ae), pe = () => { const G = S.value, fe = r.formatter ? r.formatter(q.value) : q.value; !G || G.value === fe || (G.value = fe); }, Se = async (G) => { be(); let { value: fe } = G.target; if (r.formatter && (fe = r.parser ? r.parser(fe) : fe), !je.value) { if (fe === q.value) { pe(); return; } n(Rr, fe), n("input", fe), await Ue(), pe(), de(); } }, Le = (G) => { n("change", G.target.value); }, { isComposing: je, handleCompositionStart: _e, handleCompositionUpdate: ze, handleCompositionEnd: Ie } = Z$({ emit: n, afterComposition: Se }), He = () => { x.value = !x.value, qe(); }, qe = async () => { var G; await Ue(), (G = S.value) == null || G.focus(); }, et = () => { var G; return (G = S.value) == null ? void 0 : G.blur(); }, Ve = (G) => { C.value = !1, n("mouseleave", G); }, nt = (G) => { C.value = !0, n("mouseenter", G); }, ot = (G) => { n("keydown", G); }, pt = () => { var G; (G = S.value) == null || G.select(); }, T = () => { n(Rr, ""), n("change", ""), n("clear"), n("input", ""); }; return ce(() => r.modelValue, () => { var G; Ue(() => ae()), r.validateEvent && ((G = d == null ? void 0 : d.validate) == null || G.call(d, "change").catch((fe) => xr(fe))); }), ce(q, () => pe()), ce(() => r.type, async () => { await Ue(), pe(), ae(); }), at(() => { !r.formatter && r.parser && xr("ElInput", "If you set the parser, you also need to set the formatter."), pe(), Ue(ae); }), t({ input: g, textarea: b, ref: S, textareaStyle: U, autosize: $t(r, "autosize"), isComposing: je, focus: qe, blur: et, select: pt, clear: T, resizeTextarea: ae }), (G, fe) => (E(), L("div", Lt(y(i), { class: [ y(s), { [y(v).bm("group", "append")]: G.$slots.append, [y(v).bm("group", "prepend")]: G.$slots.prepend } ], style: y(A), role: G.containerRole, onMouseenter: nt, onMouseleave: Ve }), [ Z(" input "), G.type !== "textarea" ? (E(), L(De, { key: 0 }, [ Z(" prepend slot "), G.$slots.prepend ? (E(), L("div", { key: 0, class: V(y(v).be("group", "prepend")) }, [ oe(G.$slots, "prepend") ], 2)) : Z("v-if", !0), B("div", { ref_key: "wrapperRef", ref: _, class: V(y(l)) }, [ Z(" prefix slot "), G.$slots.prefix || G.prefixIcon ? (E(), L("span", { key: 0, class: V(y(v).e("prefix")) }, [ B("span", { class: V(y(v).e("prefix-inner")) }, [ oe(G.$slots, "prefix"), G.prefixIcon ? (E(), Q(y(tr), { key: 0, class: V(y(v).e("icon")) }, { default: R(() => [ (E(), Q(vt(G.prefixIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 2)) : Z("v-if", !0), B("input", Lt({ id: y(f), ref_key: "input", ref: g, class: y(v).e("inner") }, y(u), { minlength: G.minlength, maxlength: G.maxlength, type: G.showPassword ? x.value ? "text" : "password" : G.type, disabled: y(p), readonly: G.readonly, autocomplete: G.autocomplete, tabindex: G.tabindex, "aria-label": G.ariaLabel, placeholder: G.placeholder, style: G.inputStyle, form: G.form, autofocus: G.autofocus, onCompositionstart: y(_e), onCompositionupdate: y(ze), onCompositionend: y(Ie), onInput: Se, onChange: Le, onKeydown: ot }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), Z(" suffix slot "), y(we) ? (E(), L("span", { key: 1, class: V(y(v).e("suffix")) }, [ B("span", { class: V(y(v).e("suffix-inner")) }, [ !y(Y) || !y(ie) || !y(re) ? (E(), L(De, { key: 0 }, [ oe(G.$slots, "suffix"), G.suffixIcon ? (E(), Q(y(tr), { key: 0, class: V(y(v).e("icon")) }, { default: R(() => [ (E(), Q(vt(G.suffixIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 64)) : Z("v-if", !0), y(Y) ? (E(), Q(y(tr), { key: 1, class: V([y(v).e("icon"), y(v).e("clear")]), onMousedown: Je(y(Ku), ["prevent"]), onClick: T }, { default: R(() => [ W(y(Ob)) ]), _: 1 }, 8, ["class", "onMousedown"])) : Z("v-if", !0), y(ie) ? (E(), Q(y(tr), { key: 2, class: V([y(v).e("icon"), y(v).e("password")]), onClick: He }, { default: R(() => [ (E(), Q(vt(y(j)))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), y(re) ? (E(), L("span", { key: 3, class: V(y(v).e("count")) }, [ B("span", { class: V(y(v).e("count-inner")) }, me(y(le)) + " / " + me(G.maxlength), 3) ], 2)) : Z("v-if", !0), y(M) && y(N) && y(P) ? (E(), Q(y(tr), { key: 4, class: V([ y(v).e("icon"), y(v).e("validateIcon"), y(v).is("loading", y(M) === "validating") ]) }, { default: R(() => [ (E(), Q(vt(y(N)))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 2)) : Z("v-if", !0) ], 2), Z(" append slot "), G.$slots.append ? (E(), L("div", { key: 1, class: V(y(v).be("group", "append")) }, [ oe(G.$slots, "append") ], 2)) : Z("v-if", !0) ], 64)) : (E(), L(De, { key: 1 }, [ Z(" textarea "), B("textarea", Lt({ id: y(f), ref_key: "textarea", ref: b, class: [y(m).e("inner"), y(v).is("focus", y(O))] }, y(u), { minlength: G.minlength, maxlength: G.maxlength, tabindex: G.tabindex, disabled: y(p), readonly: G.readonly, autocomplete: G.autocomplete, style: y(U), "aria-label": G.ariaLabel, placeholder: G.placeholder, form: G.form, autofocus: G.autofocus, rows: G.rows, onCompositionstart: y(_e), onCompositionupdate: y(ze), onCompositionend: y(Ie), onInput: Se, onFocus: y(F), onBlur: y(I), onChange: Le, onKeydown: ot }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), y(re) ? (E(), L("span", { key: 0, style: Ze(w.value), class: V(y(v).e("count")) }, me(y(le)) + " / " + me(G.maxlength), 7)) : Z("v-if", !0) ], 64)) ], 16, ["role"])); } }); var kz = /* @__PURE__ */ Ut(xz, [["__file", "input.vue"]]); const B0 = Zr(kz), bu = 4, Cz = { 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" } }, Sz = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), Ub = Symbol("scrollbarContextKey"), Ez = un({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), $z = "Thumb", _z = /* @__PURE__ */ K({ __name: "thumb", props: Ez, setup(e) { const t = e, n = xe(Ub), r = nn("scrollbar"); n || _b($z, "can not inject scrollbar context"); const o = z(), a = z(), i = z({}), s = z(!1); let l = !1, u = !1, c = rr ? document.onselectstart : null; const d = $(() => Cz[t.vertical ? "vertical" : "horizontal"]), f = $(() => Sz({ size: t.size, move: t.move, bar: d.value })), h = $(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), p = (k) => { var S; if (k.stopPropagation(), k.ctrlKey || [1, 2].includes(k.button)) return; (S = window.getSelection()) == null || S.removeAllRanges(), m(k); const _ = k.currentTarget; _ && (i.value[d.value.axis] = _[d.value.offset] - (k[d.value.client] - _.getBoundingClientRect()[d.value.direction])); }, v = (k) => { if (!a.value || !o.value || !n.wrapElement) return; const S = Math.abs(k.target.getBoundingClientRect()[d.value.direction] - k[d.value.client]), _ = a.value[d.value.offset] / 2, O = (S - _) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (k) => { k.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1; }, g = (k) => { if (!o.value || !a.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (o.value.getBoundingClientRect()[d.value.direction] - k[d.value.client]) * -1, O = a.value[d.value.offset] - S, F = (_ - O) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), w(), u && (s.value = !1); }, C = () => { u = !1, s.value = !!t.size; }, x = () => { u = !0, s.value = l; }; Tt(() => { w(), document.removeEventListener("mouseup", b); }); const w = () => { document.onselectstart !== c && (document.onselectstart = c); }; return ga($t(n, "scrollbarElement"), "mousemove", C), ga($t(n, "scrollbarElement"), "mouseleave", x), (k, S) => (E(), Q(pr, { name: y(r).b("fade"), persisted: "" }, { default: R(() => [ Ne(B("div", { ref_key: "instance", ref: o, class: V([y(r).e("bar"), y(r).is(y(d).key)]), onMousedown: v }, [ B("div", { ref_key: "thumb", ref: a, class: V(y(r).e("thumb")), style: Ze(y(f)), onMousedown: p }, null, 38) ], 34), [ [ft, k.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var Mk = /* @__PURE__ */ Ut(_z, [["__file", "thumb.vue"]]); const Tz = un({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), Oz = /* @__PURE__ */ K({ __name: "bar", props: Tz, setup(e, { expose: t }) { const n = e, r = xe(Ub), o = z(0), a = z(0), i = z(""), s = z(""), l = z(1), u = z(1); return t({ handleScroll: (f) => { if (f) { const h = f.offsetHeight - bu, p = f.offsetWidth - bu; a.value = f.scrollTop * 100 / h * l.value, o.value = f.scrollLeft * 100 / p * u.value; } }, update: () => { const f = r == null ? void 0 : r.wrapElement; if (!f) return; const h = f.offsetHeight - bu, p = f.offsetWidth - bu, v = h ** 2 / f.scrollHeight, m = p ** 2 / f.scrollWidth, g = Math.max(v, n.minSize), b = Math.max(m, n.minSize); l.value = v / (h - v) / (g / (h - g)), u.value = m / (p - m) / (b / (p - b)), s.value = g + bu < h ? `${g}px` : "", i.value = b + bu < p ? `${b}px` : ""; } }), (f, h) => (E(), L(De, null, [ W(Mk, { move: o.value, ratio: u.value, size: i.value, always: f.always }, null, 8, ["move", "ratio", "size", "always"]), W(Mk, { move: a.value, ratio: l.value, size: s.value, vertical: "", always: f.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var Fz = /* @__PURE__ */ Ut(Oz, [["__file", "bar.vue"]]); const Iz = un({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: Ct([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, ...tu(["ariaLabel", "ariaOrientation"]) }), Az = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(cr) }, z1 = "ElScrollbar", Pz = K({ name: z1 }), Lz = /* @__PURE__ */ K({ ...Pz, props: Iz, emits: Az, setup(e, { expose: t, emit: n }) { const r = e, o = nn("scrollbar"); let a, i, s = 0, l = 0; const u = z(), c = z(), d = z(), f = z(), h = $(() => { const w = {}; return r.height && (w.height = ep(r.height)), r.maxHeight && (w.maxHeight = ep(r.maxHeight)), [r.wrapStyle, w]; }), p = $(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = $(() => [o.e("view"), r.viewClass]), m = () => { var w; c.value && ((w = f.value) == null || w.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(w, k) { yr(w) ? c.value.scrollTo(w) : cr(w) && cr(k) && c.value.scrollTo(w, k); } const b = (w) => { if (!cr(w)) { xr(z1, "value must be a number"); return; } c.value.scrollTop = w; }, C = (w) => { if (!cr(w)) { xr(z1, "value must be a number"); return; } c.value.scrollLeft = w; }, x = () => { var w; (w = f.value) == null || w.update(); }; return ce(() => r.noresize, (w) => { w ? (a == null || a(), i == null || i()) : ({ stop: a } = bi(d, x), i = ga("resize", x)); }, { immediate: !0 }), ce(() => [r.maxHeight, r.height], () => { r.native || Ue(() => { var w; x(), c.value && ((w = f.value) == null || w.handleScroll(c.value)); }); }), tt(Ub, Kt({ scrollbarElement: u, wrapElement: c })), gb(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), at(() => { r.native || Ue(() => { x(); }); }), Up(() => x()), t({ wrapRef: c, update: x, scrollTo: g, setScrollTop: b, setScrollLeft: C, handleScroll: m }), (w, k) => (E(), L("div", { ref_key: "scrollbarRef", ref: u, class: V(y(o).b()) }, [ B("div", { ref_key: "wrapRef", ref: c, class: V(y(p)), style: Ze(y(h)), tabindex: w.tabindex, onScroll: m }, [ (E(), Q(vt(w.tag), { id: w.id, ref_key: "resizeRef", ref: d, class: V(y(v)), style: Ze(w.viewStyle), role: w.role, "aria-label": w.ariaLabel, "aria-orientation": w.ariaOrientation }, { default: R(() => [ oe(w.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), w.native ? Z("v-if", !0) : (E(), Q(Fz, { key: 0, ref_key: "barRef", ref: f, always: w.always, "min-size": w.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var Rz = /* @__PURE__ */ Ut(Lz, [["__file", "scrollbar.vue"]]); const e_ = Zr(Rz), qb = Symbol("popper"), t_ = Symbol("popperContent"), Dz = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], n_ = un({ role: { type: String, values: Dz, default: "tooltip" } }), Mz = K({ name: "ElPopper", inheritAttrs: !1 }), Nz = /* @__PURE__ */ K({ ...Mz, props: n_, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = $(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), tt(qb, l), (u, c) => oe(u.$slots, "default"); } }); var Bz = /* @__PURE__ */ Ut(Nz, [["__file", "popper.vue"]]); const r_ = un({ arrowOffset: { type: Number, default: 5 } }), zz = K({ name: "ElPopperArrow", inheritAttrs: !1 }), Vz = /* @__PURE__ */ K({ ...zz, props: r_, setup(e, { expose: t }) { const n = e, r = nn("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = xe(t_, void 0); return ce(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (E(), L("span", { ref_key: "arrowRef", ref: a, class: V(y(r).e("arrow")), style: Ze(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var jz = /* @__PURE__ */ Ut(Vz, [["__file", "arrow.vue"]]); const xm = "ElOnlyChild", Hz = K({ name: xm, setup(e, { slots: t, attrs: n }) { var r; const o = xe(q$), a = Q7((r = o == null ? void 0 : o.setForwardRef) != null ? r : Ku); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return xr(xm, "requires exact only one valid child."), null; const l = o_(s); return l ? Ne(b0(l, n), [[a]]) : (xr(xm, "no valid child node found"), null); }; } }); function o_(e) { if (!e) return null; const t = e; for (const n of t) { if (yr(n)) switch (n.type) { case w0: continue; case Vs: case "svg": return Nk(n); case De: return o_(n.children); default: return n; } return Nk(n); } return null; } function Nk(e) { const t = nn("only-child"); return W("span", { class: t.e("content") }, [e]); } const a_ = un({ virtualRef: { type: Ct(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Ct(Function) }, onMouseleave: { type: Ct(Function) }, onClick: { type: Ct(Function) }, onKeydown: { type: Ct(Function) }, onFocus: { type: Ct(Function) }, onBlur: { type: Ct(Function) }, onContextmenu: { type: Ct(Function) }, id: String, open: Boolean }), Uz = K({ name: "ElPopperTrigger", inheritAttrs: !1 }), qz = /* @__PURE__ */ K({ ...Uz, props: a_, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = xe(qb, void 0); J7(o); const a = $(() => s.value ? n.id : void 0), i = $(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = $(() => { if (r && r.value !== "tooltip") return r.value; }), l = $(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return at(() => { ce(() => n.virtualRef, (d) => { d && (o.value = Ei(d)); }, { immediate: !0 }), ce(o, (d, f) => { u == null || u(), u = void 0, wl(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = ce([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { P0(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), wl(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && wl(o.value)) { const d = o.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, f) => d.virtualTriggering ? Z("v-if", !0) : (E(), Q(y(Hz), Lt({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: R(() => [ oe(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var Wz = /* @__PURE__ */ Ut(qz, [["__file", "trigger.vue"]]); const km = "focus-trap.focus-after-trapped", Cm = "focus-trap.focus-after-released", Gz = "focus-trap.focusout-prevented", Bk = { cancelable: !0, bubbles: !1 }, Kz = { cancelable: !0, bubbles: !1 }, zk = "focusAfterTrapped", Vk = "focusAfterReleased", Yz = Symbol("elFocusTrap"), Wb = z(), z0 = z(0), Gb = z(0); let Hf = 0; const i_ = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const o = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, jk = (e, t) => { for (const n of e) if (!Xz(n, t)) return n; }, Xz = (e, t) => { if (process.env.NODE_ENV === "test") return !1; if (getComputedStyle(e).visibility === "hidden") return !0; for (; e; ) { if (t && e === t) return !1; if (getComputedStyle(e).display === "none") return !0; e = e.parentElement; } return !1; }, Zz = (e) => { const t = i_(e), n = jk(t, e), r = jk(t.reverse(), e); return [n, r]; }, Jz = (e) => e instanceof HTMLInputElement && "select" in e, os = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), Gb.value = window.performance.now(), e !== n && Jz(e) && t && e.select(); } }; function Hk(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const Qz = () => { let e = []; return { push: (r) => { const o = e[0]; o && r !== o && o.pause(), e = Hk(e, r), e.unshift(r); }, remove: (r) => { var o, a; e = Hk(e, r), (a = (o = e[0]) == null ? void 0 : o.resume) == null || a.call(o); } }; }, eV = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (os(r, t), document.activeElement !== n) return; }, Uk = Qz(), tV = () => z0.value > Gb.value, Uf = () => { Wb.value = "pointer", z0.value = window.performance.now(); }, qk = () => { Wb.value = "keyboard", z0.value = window.performance.now(); }, nV = () => (at(() => { Hf === 0 && (document.addEventListener("mousedown", Uf), document.addEventListener("touchstart", Uf), document.addEventListener("keydown", qk)), Hf++; }), Tt(() => { Hf--, Hf <= 0 && (document.removeEventListener("mousedown", Uf), document.removeEventListener("touchstart", Uf), document.removeEventListener("keydown", qk)); }), { focusReason: Wb, lastUserFocusTimestamp: z0, lastAutomatedFocusTimestamp: Gb }), qf = (e) => new CustomEvent(Gz, { ...Kz, detail: e }), rV = K({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ zk, Vk, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = nV(); G7((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: C, shiftKey: x } = p, { loop: w } = e, k = v === tp.tab && !m && !g && !b, S = document.activeElement; if (k && S) { const _ = C, [O, F] = Zz(_); if (O && F) { if (!x && S === F) { const P = qf({ focusReason: a.value }); t("focusout-prevented", P), P.defaultPrevented || (p.preventDefault(), w && os(O, !0)); } else if (x && [O, _].includes(S)) { const P = qf({ focusReason: a.value }); t("focusout-prevented", P), P.defaultPrevented || (p.preventDefault(), w && os(F, !0)); } } else if (S === _) { const P = qf({ focusReason: a.value }); t("focusout-prevented", P), P.defaultPrevented || p.preventDefault(); } } }; tt(Yz, { focusTrapRef: n, onKeydown: s }), ce(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), ce([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(zk, p); }, u = (p) => t(Vk, p), c = (p) => { const v = y(n); if (!v) return; const m = p.target, g = p.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e.trapped && (b ? o = m : os(o, !0)); }, d = (p) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !P0(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = qf({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || os(o, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = y(n); if (p) { Uk.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const g = new Event(km, Bk); p.addEventListener(km, l), p.dispatchEvent(g), g.defaultPrevented || Ue(() => { let b = e.focusStartEl; Dr(b) || (os(b), document.activeElement !== b && (b = "first")), b === "first" && eV(i_(p), !0), (document.activeElement === v || b === "container") && os(p); }); } } } function h() { const p = y(n); if (p) { p.removeEventListener(km, l); const v = new CustomEvent(Cm, { ...Bk, detail: { focusReason: a.value } }); p.addEventListener(Cm, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !tV() || p.contains(document.activeElement)) && os(r ?? document.body), p.removeEventListener(Cm, u), Uk.remove(i); } } return at(() => { e.trapped && f(), ce(() => e.trapped, (p) => { p ? f() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function oV(e, t, n, r, o, a) { return oe(e.$slots, "default", { handleKeydown: e.onKeydown }); } var aV = /* @__PURE__ */ Ut(rV, [["render", oV], ["__file", "focus-trap.vue"]]); const iV = ["fixed", "absolute"], sV = un({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Ct(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: D0, default: "bottom" }, popperOptions: { type: Ct(Object), default: () => ({}) }, strategy: { type: String, values: iV, default: "absolute" } }), s_ = un({ ...sV, id: String, style: { type: Ct([String, Array, Object]) }, className: { type: Ct([String, Array, Object]) }, effect: { type: Ct(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Ct([String, Array, Object]) }, popperStyle: { type: Ct([String, Array, Object]) }, referenceEl: { type: Ct(Object) }, triggerTargetEl: { type: Ct(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...tu(["ariaLabel"]) }), lV = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, uV = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...dV(e), ...t] }; return pV(a, o == null ? void 0 : o.modifiers), a; }, cV = (e) => { if (rr) return Ei(e); }; function dV(e) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = 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: r } }, { name: "computeStyles", options: { gpuAcceleration: n } } ]; } function pV(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const fV = 0, hV = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = xe(qb, void 0), a = z(), i = z(), s = $(() => ({ name: "eventListeners", enabled: !!e.visible })), l = $(() => { var g; const b = y(a), C = (g = y(i)) != null ? g : fV; return { name: "arrow", enabled: !oB(b), options: { element: b, padding: C } }; }), u = $(() => ({ onFirstUpdate: () => { p(); }, ...uV(e, [ y(l), y(s) ]) })), c = $(() => cV(e.referenceEl) || y(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = U7(c, n, u); return ce(m, (g) => t.value = g), at(() => { ce(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: f, styles: h, role: o, forceUpdate: v, update: p }; }, vV = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = K$(), a = nn("popper"), i = $(() => y(t).popper), s = z(cr(e.zIndex) ? e.zIndex : o()), l = $(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = $(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = $(() => r.value === "dialog" ? "false" : void 0), d = $(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = cr(e.zIndex) ? e.zIndex : o(); } }; }, gV = (e, t) => { const n = z(!1), r = z(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (u) => { var c; ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (u) => { e.visible && !n.value && (u.target && (r.value = u.target), n.value = !0); }, onFocusoutPrevented: (u) => { e.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, mV = K({ name: "ElPopperContent" }), yV = /* @__PURE__ */ K({ ...mV, props: s_, emits: lV, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = gV(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = hV(r), { ariaModal: b, arrowStyle: C, contentAttrs: x, contentClass: w, contentStyle: k, updateZIndex: S } = vV(r, { styles: p, attributes: d, role: m }), _ = xe(Ev, void 0), O = z(); tt(t_, { arrowStyle: C, arrowRef: f, arrowOffset: O }), _ && tt(Ev, { ..._, addInputId: Ku, removeInputId: Ku }); let F; const I = (M = !0) => { g(), M && S(); }, P = () => { I(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return at(() => { ce(() => r.triggerTargetEl, (M, N) => { F == null || F(), F = void 0; const j = y(M || h.value), A = y(N || h.value); wl(j) && (F = ce([m, () => r.ariaLabel, b, () => r.id], (U) => { ["role", "aria-label", "aria-modal", "id"].forEach((q, Y) => { P0(U[Y]) ? j.removeAttribute(q) : j.setAttribute(q, U[Y]); }); }, { immediate: !0 })), A !== j && wl(A) && ["role", "aria-label", "aria-modal", "id"].forEach((U) => { A.removeAttribute(U); }); }, { immediate: !0 }), ce(() => r.visible, P, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: I, contentStyle: k }), (M, N) => (E(), L("div", Lt({ ref_key: "contentRef", ref: h }, y(x), { style: y(k), class: y(w), tabindex: "-1", onMouseenter: (j) => M.$emit("mouseenter", j), onMouseleave: (j) => M.$emit("mouseleave", j) }), [ W(y(aV), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: R(() => [ oe(M.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var bV = /* @__PURE__ */ Ut(yV, [["__file", "content.vue"]]); const wV = Zr(Bz), Kb = Symbol("elTooltip"), eo = un({ ...X7, ...s_, appendTo: { type: Ct([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Ct(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...tu(["ariaLabel"]) }), op = un({ ...a_, disabled: Boolean, trigger: { type: Ct([String, Array]), default: "hover" }, triggerKeys: { type: Ct(Array), default: () => [tp.enter, tp.space] } }), { useModelToggleProps: xV, useModelToggleEmits: kV, useModelToggle: CV } = VB("visible"), SV = un({ ...n_, ...xV, ...eo, ...op, ...r_, showArrow: { type: Boolean, default: !0 } }), EV = [ ...kV, "before-show", "before-hide", "show", "hide", "open", "close" ], $V = (e, t) => Bo(e) ? e.includes(t) : e === t, wu = (e, t, n) => (r) => { $V(y(e), t) && n(r); }, _V = K({ name: "ElTooltipTrigger" }), TV = /* @__PURE__ */ K({ ..._V, props: op, setup(e, { expose: t }) { const n = e, r = nn("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = xe(Kb, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, f = $t(n, "trigger"), h = gi(d, wu(f, "hover", s)), p = gi(d, wu(f, "hover", l)), v = gi(d, wu(f, "click", (x) => { x.button === 0 && u(x); })), m = gi(d, wu(f, "focus", s)), g = gi(d, wu(f, "focus", l)), b = gi(d, wu(f, "contextmenu", (x) => { x.preventDefault(), u(x); })), C = gi(d, (x) => { const { code: w } = x; n.triggerKeys.includes(w) && (x.preventDefault(), u(x)); }); return t({ triggerRef: c }), (x, w) => (E(), Q(y(Wz), { id: y(a), "virtual-ref": x.virtualRef, open: y(i), "virtual-triggering": x.virtualTriggering, class: V(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(p), onKeydown: y(C) }, { default: R(() => [ oe(x.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var OV = /* @__PURE__ */ Ut(TV, [["__file", "trigger.vue"]]); const FV = un({ to: { type: Ct([String, Object]), required: !0 }, disabled: Boolean }), IV = /* @__PURE__ */ K({ __name: "teleport", props: FV, setup(e) { return (t, n) => t.disabled ? oe(t.$slots, "default", { key: 0 }) : (E(), Q(x0, { key: 1, to: t.to }, [ oe(t.$slots, "default") ], 8, ["to"])); } }); var AV = /* @__PURE__ */ Ut(IV, [["__file", "teleport.vue"]]); const PV = Zr(AV), LV = K({ name: "ElTooltipContent", inheritAttrs: !1 }), RV = /* @__PURE__ */ K({ ...LV, props: eo, setup(e, { expose: t }) { const n = e, { selector: r } = U$(), o = nn("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = xe(Kb, void 0), g = $(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = $(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const C = $(() => y(b) ? !0 : y(u)), x = $(() => n.disabled ? !1 : y(u)), w = $(() => n.appendTo || r.value), k = $(() => { var A; return (A = n.style) != null ? A : {}; }), S = z(!0), _ = () => { p(), S.value = !0; }, O = () => { if (y(s)) return !0; }, F = gi(O, () => { n.enterable && y(c) === "hover" && f(); }), I = gi(O, () => { y(c) === "hover" && d(); }), P = () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A), v == null || v(); }, M = () => { m == null || m(); }, N = () => { h(), i = r$($(() => { var A; return (A = a.value) == null ? void 0 : A.popperContentRef; }), () => { if (y(s)) return; y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return ce(() => y(u), (A) => { A ? S.value = !1 : i == null || i(); }, { flush: "post" }), ce(() => n.content, () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A); }), t({ contentRef: a }), (A, U) => (E(), Q(y(PV), { disabled: !A.teleported, to: y(w) }, { default: R(() => [ W(pr, { name: y(g), onAfterLeave: _, onBeforeEnter: P, onAfterEnter: N, onBeforeLeave: M }, { default: R(() => [ y(C) ? Ne((E(), Q(y(bV), Lt({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, A.$attrs, { "aria-label": A.ariaLabel, "aria-hidden": S.value, "boundaries-padding": A.boundariesPadding, "fallback-placements": A.fallbackPlacements, "gpu-acceleration": A.gpuAcceleration, offset: A.offset, placement: A.placement, "popper-options": A.popperOptions, strategy: A.strategy, effect: A.effect, enterable: A.enterable, pure: A.pure, "popper-class": A.popperClass, "popper-style": [A.popperStyle, y(k)], "reference-el": A.referenceEl, "trigger-target-el": A.triggerTargetEl, visible: y(x), "z-index": A.zIndex, onMouseenter: y(F), onMouseleave: y(I), onBlur: j, onClose: y(d) }), { default: R(() => [ oe(A.$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"])), [ [ft, y(x)] ]) : Z("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var DV = /* @__PURE__ */ Ut(RV, [["__file", "content.vue"]]); const MV = K({ name: "ElTooltip" }), NV = /* @__PURE__ */ K({ ...MV, props: SV, emits: EV, setup(e, { expose: t, emit: n }) { const r = e; Y7(); const o = Yp(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: f } = CV({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = Z7({ showAfter: $t(r, "showAfter"), hideAfter: $t(r, "hideAfter"), autoClose: $t(r, "autoClose"), open: c, close: d }), v = $(() => bl(r.visible) && !f.value); tt(Kb, { controlled: v, id: o, open: Tc(l), trigger: $t(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { y(l) ? p(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), ce(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, C; const x = (C = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : C.popperContentRef, w = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return x && x.contains(w); }; return k0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, b) => (E(), Q(y(wV), { ref_key: "popperRef", ref: a, role: g.role }, { default: R(() => [ W(OV, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: R(() => [ g.$slots.default ? oe(g.$slots, "default", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), W(DV, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: R(() => [ oe(g.$slots, "content", {}, () => [ g.rawContent ? (E(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (E(), L("span", { key: 1 }, me(g.content), 1)) ]), g.showArrow ? (E(), Q(y(jz), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : Z("v-if", !0) ]), _: 3 }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"]) ]), _: 3 }, 8, ["role"])); } }); var BV = /* @__PURE__ */ Ut(NV, [["__file", "tooltip.vue"]]); const Yb = Zr(BV), zV = un({ valueKey: { type: String, default: "value" }, modelValue: { type: [String, Number], default: "" }, debounce: { type: Number, default: 300 }, placement: { type: Ct(String), values: [ "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end" ], default: "bottom-start" }, fetchSuggestions: { type: Ct([Function, Array]), default: Ku }, popperClass: { type: String, default: "" }, triggerOnFocus: { type: Boolean, default: !0 }, selectWhenUnmatched: { type: Boolean, default: !1 }, hideLoading: { type: Boolean, default: !1 }, teleported: eo.teleported, highlightFirstItem: { type: Boolean, default: !1 }, fitInputWidth: { type: Boolean, default: !1 }, clearable: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, name: String, ...tu(["ariaLabel"]) }), VV = { [Rr]: (e) => Dr(e), [Xu]: (e) => Dr(e), [Al]: (e) => Dr(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, select: (e) => yr(e) }, l_ = "ElAutocomplete", jV = K({ name: l_, inheritAttrs: !1 }), HV = /* @__PURE__ */ K({ ...jV, props: zV, emits: VV, setup(e, { expose: t, emit: n }) { const r = e, o = _$(), a = Hp(), i = Zp(), s = nn("autocomplete"), l = z(), u = z(), c = z(), d = z(); let f = !1, h = !1; const p = z([]), v = z(-1), m = z(""), g = z(!1), b = z(!1), C = z(!1), x = Yp(), w = $(() => a.style), k = $(() => (p.value.length > 0 || C.value) && g.value), S = $(() => !r.hideLoading && C.value), _ = $(() => l.value ? Array.from(l.value.$el.querySelectorAll("input")) : []), O = () => { k.value && (m.value = `${l.value.$el.offsetWidth}px`); }, F = () => { v.value = -1; }, I = async (ae) => { if (b.value) return; const ee = (se) => { C.value = !1, !b.value && (Bo(se) ? (p.value = se, v.value = r.highlightFirstItem ? 0 : -1) : _b(l_, "autocomplete suggestions must be an array")); }; if (C.value = !0, Bo(r.fetchSuggestions)) ee(r.fetchSuggestions); else { const se = await r.fetchSuggestions(ae, ee); Bo(se) && ee(se); } }, P = x$(I, r.debounce), M = (ae) => { const ee = !!ae; if (n(Xu, ae), n(Rr, ae), b.value = !1, g.value || (g.value = ee), !r.triggerOnFocus && !ae) { b.value = !0, p.value = []; return; } P(ae); }, N = (ae) => { var ee; i.value || (((ee = ae.target) == null ? void 0 : ee.tagName) !== "INPUT" || _.value.includes(document.activeElement)) && (g.value = !0); }, j = (ae) => { n(Al, ae); }, A = (ae) => { h ? h = !1 : (g.value = !0, n("focus", ae), r.triggerOnFocus && !f && P(String(r.modelValue))); }, U = (ae) => { setTimeout(() => { var ee; if ((ee = c.value) != null && ee.isFocusInsideContent()) { h = !0; return; } g.value && re(), n("blur", ae); }); }, q = () => { g.value = !1, n(Rr, ""), n("clear"); }, Y = async () => { k.value && v.value >= 0 && v.value < p.value.length ? we(p.value[v.value]) : r.selectWhenUnmatched && (n("select", { value: r.modelValue }), p.value = [], v.value = -1); }, ie = (ae) => { k.value && (ae.preventDefault(), ae.stopPropagation(), re()); }, re = () => { g.value = !1; }, le = () => { var ae; (ae = l.value) == null || ae.focus(); }, he = () => { var ae; (ae = l.value) == null || ae.blur(); }, we = async (ae) => { n(Xu, ae[r.valueKey]), n(Rr, ae[r.valueKey]), n("select", ae), p.value = [], v.value = -1; }, be = (ae) => { if (!k.value || C.value) return; if (ae < 0) { v.value = -1; return; } ae >= p.value.length && (ae = p.value.length - 1); const ee = u.value.querySelector(`.${s.be("suggestion", "wrap")}`), pe = ee.querySelectorAll(`.${s.be("suggestion", "list")} li`)[ae], Se = ee.scrollTop, { offsetTop: Le, scrollHeight: je } = pe; Le + je > Se + ee.clientHeight && (ee.scrollTop += je), Le < Se && (ee.scrollTop -= je), v.value = ae, l.value.ref.setAttribute("aria-activedescendant", `${x.value}-item-${v.value}`); }, de = r$(d, () => { k.value && re(); }); return Tt(() => { de == null || de(); }), at(() => { l.value.ref.setAttribute("role", "textbox"), l.value.ref.setAttribute("aria-autocomplete", "list"), l.value.ref.setAttribute("aria-controls", "id"), l.value.ref.setAttribute("aria-activedescendant", `${x.value}-item-${v.value}`), f = l.value.ref.hasAttribute("readonly"); }), t({ highlightedIndex: v, activated: g, loading: C, inputRef: l, popperRef: c, suggestions: p, handleSelect: we, handleKeyEnter: Y, focus: le, blur: he, close: re, highlight: be, getData: I }), (ae, ee) => (E(), Q(y(Yb), { ref_key: "popperRef", ref: c, visible: y(k), placement: ae.placement, "fallback-placements": ["bottom-start", "top-start"], "popper-class": [y(s).e("popper"), ae.popperClass], teleported: ae.teleported, "gpu-acceleration": !1, pure: "", "manual-mode": "", effect: "light", trigger: "click", transition: `${y(s).namespace.value}-zoom-in-top`, persistent: "", role: "listbox", onBeforeShow: O, onHide: F }, { content: R(() => [ B("div", { ref_key: "regionRef", ref: u, class: V([y(s).b("suggestion"), y(s).is("loading", y(S))]), style: Ze({ [ae.fitInputWidth ? "width" : "minWidth"]: m.value, outline: "none" }), role: "region" }, [ W(y(e_), { id: y(x), tag: "ul", "wrap-class": y(s).be("suggestion", "wrap"), "view-class": y(s).be("suggestion", "list"), role: "listbox" }, { default: R(() => [ y(S) ? (E(), L("li", { key: 0 }, [ oe(ae.$slots, "loading", {}, () => [ W(y(tr), { class: V(y(s).is("loading")) }, { default: R(() => [ W(y(L0)) ]), _: 1 }, 8, ["class"]) ]) ])) : (E(!0), L(De, { key: 1 }, xt(p.value, (se, pe) => (E(), L("li", { id: `${y(x)}-item-${pe}`, key: pe, class: V({ highlighted: v.value === pe }), role: "option", "aria-selected": v.value === pe, onClick: (Se) => we(se) }, [ oe(ae.$slots, "default", { item: se }, () => [ Ae(me(se[ae.valueKey]), 1) ]) ], 10, ["id", "aria-selected", "onClick"]))), 128)) ]), _: 3 }, 8, ["id", "wrap-class", "view-class"]) ], 6) ]), default: R(() => [ B("div", { ref_key: "listboxRef", ref: d, class: V([y(s).b(), ae.$attrs.class]), style: Ze(y(w)), role: "combobox", "aria-haspopup": "listbox", "aria-expanded": y(k), "aria-owns": y(x) }, [ W(y(B0), Lt({ ref_key: "inputRef", ref: l }, y(o), { clearable: ae.clearable, disabled: y(i), name: ae.name, "model-value": ae.modelValue, "aria-label": ae.ariaLabel, onInput: M, onChange: j, onFocus: A, onBlur: U, onClear: q, onKeydown: [ yn(Je((se) => be(v.value - 1), ["prevent"]), ["up"]), yn(Je((se) => be(v.value + 1), ["prevent"]), ["down"]), yn(Y, ["enter"]), yn(re, ["tab"]), yn(ie, ["esc"]) ], onMousedown: N }), mb({ _: 2 }, [ ae.$slots.prepend ? { name: "prepend", fn: R(() => [ oe(ae.$slots, "prepend") ]) } : void 0, ae.$slots.append ? { name: "append", fn: R(() => [ oe(ae.$slots, "append") ]) } : void 0, ae.$slots.prefix ? { name: "prefix", fn: R(() => [ oe(ae.$slots, "prefix") ]) } : void 0, ae.$slots.suffix ? { name: "suffix", fn: R(() => [ oe(ae.$slots, "suffix") ]) } : void 0 ]), 1040, ["clearable", "disabled", "name", "model-value", "aria-label", "onKeydown"]) ], 14, ["aria-expanded", "aria-owns"]) ]), _: 3 }, 8, ["visible", "placement", "popper-class", "teleported", "transition"])); } }); var UV = /* @__PURE__ */ Ut(HV, [["__file", "autocomplete.vue"]]); const u_ = Zr(UV), c_ = Symbol("buttonGroupContextKey"), qV = (e, t) => { PB({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, $(() => e.type === "text")); const n = xe(c_, void 0), r = Vb("button"), { form: o } = N0(), a = Xp($(() => n == null ? void 0 : n.size)), i = Zp(), s = z(), l = Xr(), u = $(() => e.type || (n == null ? void 0 : n.type) || ""), c = $(() => { var p, v, m; return (m = (v = e.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? m : !1; }), d = $(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = $(() => { var p; const v = (p = l.default) == null ? void 0 : p.call(l); if (c.value && (v == null ? void 0 : v.length) === 1) { const m = v[0]; if ((m == null ? void 0 : m.type) === Vs) { const g = m.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(g.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (p) => { if (i.value || e.loading) { p.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", p); } }; }, WV = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], GV = ["button", "submit", "reset"], V1 = un({ size: zb, disabled: Boolean, type: { type: String, values: WV, default: "" }, icon: { type: ma }, nativeType: { type: String, values: GV, default: "button" }, loading: Boolean, loadingIcon: { type: ma, default: () => L0 }, 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: Ct([String, Object]), default: "button" } }), KV = { click: (e) => e instanceof MouseEvent }; function kr(e, t) { YV(e) && (e = "100%"); var n = XV(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 Wf(e) { return Math.min(1, Math.max(0, e)); } function YV(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function XV(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function d_(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Gf(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function dl(e) { return e.length === 1 ? "0" + e : String(e); } function ZV(e, t, n) { return { r: kr(e, 255) * 255, g: kr(t, 255) * 255, b: kr(n, 255) * 255 }; } function Wk(e, t, n) { e = kr(e, 255), t = kr(t, 255), n = kr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 0.5 ? l / (2 - r - o) : l / (r + o), r) { 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: i, l: s }; } function Sm(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 JV(e, t, n) { var r, o, a; if (e = kr(e, 360), t = kr(t, 100), n = kr(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = Sm(s, i, e + 1 / 3), o = Sm(s, i, e), a = Sm(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function Gk(e, t, n) { e = kr(e, 255), t = kr(t, 255), n = kr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function QV(e, t, n) { e = kr(e, 360) * 6, t = kr(t, 100), n = kr(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function Kk(e, t, n, r) { var o = [ dl(Math.round(e).toString(16)), dl(Math.round(t).toString(16)), dl(Math.round(n).toString(16)) ]; return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join(""); } function ej(e, t, n, r, o) { var a = [ dl(Math.round(e).toString(16)), dl(Math.round(t).toString(16)), dl(Math.round(n).toString(16)), dl(tj(r)) ]; return o && 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 tj(e) { return Math.round(parseFloat(e) * 255).toString(16); } function Yk(e) { return xo(e) / 255; } function xo(e) { return parseInt(e, 16); } function nj(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var j1 = { 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 rj(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = ij(e)), typeof e == "object" && (ui(e.r) && ui(e.g) && ui(e.b) ? (t = ZV(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ui(e.h) && ui(e.s) && ui(e.v) ? (r = Gf(e.s), o = Gf(e.v), t = QV(e.h, r, o), i = !0, s = "hsv") : ui(e.h) && ui(e.s) && ui(e.l) && (r = Gf(e.s), a = Gf(e.l), t = JV(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = d_(n), { ok: i, format: e.format || s, r: Math.min(255, Math.max(t.r, 0)), g: Math.min(255, Math.max(t.g, 0)), b: Math.min(255, Math.max(t.b, 0)), a: n }; } var oj = "[-\\+]?\\d+%?", aj = "[-\\+]?\\d*\\.\\d+%?", bs = "(?:".concat(aj, ")|(?:").concat(oj, ")"), Em = "[\\s|\\(]+(".concat(bs, ")[,|\\s]+(").concat(bs, ")[,|\\s]+(").concat(bs, ")\\s*\\)?"), $m = "[\\s|\\(]+(".concat(bs, ")[,|\\s]+(").concat(bs, ")[,|\\s]+(").concat(bs, ")[,|\\s]+(").concat(bs, ")\\s*\\)?"), ia = { CSS_UNIT: new RegExp(bs), rgb: new RegExp("rgb" + Em), rgba: new RegExp("rgba" + $m), hsl: new RegExp("hsl" + Em), hsla: new RegExp("hsla" + $m), hsv: new RegExp("hsv" + Em), hsva: new RegExp("hsva" + $m), 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 ij(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (j1[e]) e = j1[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = ia.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = ia.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ia.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = ia.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ia.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = ia.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ia.hex8.exec(e), n ? { r: xo(n[1]), g: xo(n[2]), b: xo(n[3]), a: Yk(n[4]), format: t ? "name" : "hex8" } : (n = ia.hex6.exec(e), n ? { r: xo(n[1]), g: xo(n[2]), b: xo(n[3]), format: t ? "name" : "hex" } : (n = ia.hex4.exec(e), n ? { r: xo(n[1] + n[1]), g: xo(n[2] + n[2]), b: xo(n[3] + n[3]), a: Yk(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = ia.hex3.exec(e), n ? { r: xo(n[1] + n[1]), g: xo(n[2] + n[2]), b: xo(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function ui(e) { return !!ia.CSS_UNIT.exec(String(e)); } var sj = ( /** @class */ function() { function e(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e) return t; typeof t == "number" && (t = nj(t)), this.originalInput = t; var o = rj(t); this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.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 = o.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, r, o, a = t.r / 255, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = d_(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 = Gk(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 = Gk(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = Wk(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 = Wk(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), Kk(this.r, this.g, this.b, t); }, e.prototype.toHexString = function(t) { return t === void 0 && (t = !1), "#" + this.toHex(t); }, e.prototype.toHex8 = function(t) { return t === void 0 && (t = !1), ej(this.r, this.g, this.b, this.a, t); }, e.prototype.toHex8String = function(t) { return t === void 0 && (t = !1), "#" + this.toHex8(t); }, e.prototype.toHexShortString = function(t) { return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e.prototype.toRgbString = function() { var t = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b); return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")"); }, e.prototype.toPercentageRgb = function() { var t = function(n) { return "".concat(Math.round(kr(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(kr(n, 255) * 100); }; return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")"); }, e.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return !1; for (var t = "#" + Kk(this.r, this.g, this.b, !1), n = 0, r = Object.entries(j1); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) return a; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name"); return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || 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 = Wf(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 = Wf(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 = Wf(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 = Wf(n.s), new e(n); }, e.prototype.greyscale = function() { return this.desaturate(100); }, e.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e(n); }, e.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, i = { r: (o.r - r.r) * a + r.r, g: (o.g - r.g) * a + r.g, b: (o.b - r.b) * a + r.b, a: (o.a - r.a) * a + r.a }; return new e(i); }, e.prototype.analogous = function(t, n) { t === void 0 && (t = 6), n === void 0 && (n = 30); var r = this.toHsl(), o = 360 / n, a = [this]; for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; ) r.h = (r.h + o) % 360, a.push(new e(r)); 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(), r = n.h, o = n.s, a = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o, a: o }); }, 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(), r = n.h, o = [this], a = 360 / t, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Xi(e, t = 20) { return e.mix("#141414", t).toString(); } function lj(e) { const t = Zp(), n = nn("button"); return $(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new sj(o), s = e.dark ? i.tint(20).toString() : Xi(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Xi(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? Xi(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? Xi(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Xi(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Xi(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Xi(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? Xi(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c; } } } return r; }); } const uj = K({ name: "ElButton" }), cj = /* @__PURE__ */ K({ ...uj, props: V1, emits: KV, setup(e, { expose: t, emit: n }) { const r = e, o = lj(r), a = nn("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = qV(r, n), h = $(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.value), a.is("loading", r.loading), a.is("plain", r.plain), a.is("round", r.round), a.is("circle", r.circle), a.is("text", r.text), a.is("link", r.link), a.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (E(), Q(vt(p.tag), Lt({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(f) }), { default: R(() => [ p.loading ? (E(), L(De, { key: 0 }, [ p.$slots.loading ? oe(p.$slots, "loading", { key: 0 }) : (E(), Q(y(tr), { key: 1, class: V(y(a).is("loading")) }, { default: R(() => [ (E(), Q(vt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (E(), Q(y(tr), { key: 1 }, { default: R(() => [ p.icon ? (E(), Q(vt(p.icon), { key: 0 })) : oe(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : Z("v-if", !0), p.$slots.default ? (E(), L("span", { key: 2, class: V({ [y(a).em("text", "expand")]: y(d) }) }, [ oe(p.$slots, "default") ], 2)) : Z("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var dj = /* @__PURE__ */ Ut(cj, [["__file", "button.vue"]]); const pj = { size: V1.size, type: V1.type }, fj = K({ name: "ElButtonGroup" }), hj = /* @__PURE__ */ K({ ...fj, props: pj, setup(e) { const t = e; tt(c_, Kt({ size: $t(t, "size"), type: $t(t, "type") })); const n = nn("button"); return (r, o) => (E(), L("div", { class: V(y(n).b("group")) }, [ oe(r.$slots, "default") ], 2)); } }); var p_ = /* @__PURE__ */ Ut(hj, [["__file", "button-group.vue"]]); const Xb = Zr(dj, { ButtonGroup: p_ }); eu(p_); var vj = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function f_(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const as = /* @__PURE__ */ new Map(); if (rr) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of as.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function Xk(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : wl(t.arg) && n.push(t.arg), function(r, o) { const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h = a && (a.contains(i) || a.contains(s)); l || u || c || d || f || h || t.value(r, o); }; } const gj = { beforeMount(e, t) { as.has(e) || as.set(e, []), as.get(e).push({ documentHandler: Xk(e, t), bindingFn: t.value }); }, updated(e, t) { as.has(e) || as.set(e, []); const n = as.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: Xk(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e) { as.delete(e); } }, H1 = un({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: Fb }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), mj = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, yj = K({ name: "ElTag" }), bj = /* @__PURE__ */ K({ ...yj, props: H1, emits: mj, setup(e, { emit: t }) { const n = e, r = Xp(), o = nn("tag"), a = $(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ o.b(), o.is("closable", f), o.m(u || "primary"), o.m(r.value), o.m(d), o.is("hit", c), o.is("round", h) ]; }), i = (u) => { t("close", u); }, s = (u) => { t("click", u); }, l = (u) => { u.component.subTree.component.bum = null; }; return (u, c) => u.disableTransitions ? (E(), L("span", { key: 0, class: V(y(a)), style: Ze({ backgroundColor: u.color }), onClick: s }, [ B("span", { class: V(y(o).e("content")) }, [ oe(u.$slots, "default") ], 2), u.closable ? (E(), Q(y(tr), { key: 0, class: V(y(o).e("close")), onClick: Je(i, ["stop"]) }, { default: R(() => [ W(y(bk)) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0) ], 6)) : (E(), Q(pr, { key: 1, name: `${y(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: R(() => [ B("span", { class: V(y(a)), style: Ze({ backgroundColor: u.color }), onClick: s }, [ B("span", { class: V(y(o).e("content")) }, [ oe(u.$slots, "default") ], 2), u.closable ? (E(), Q(y(tr), { key: 0, class: V(y(o).e("close")), onClick: Je(i, ["stop"]) }, { default: R(() => [ W(y(bk)) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var wj = /* @__PURE__ */ Ut(bj, [["__file", "tag.vue"]]); const xj = Zr(wj), h_ = Symbol("rowContextKey"), kj = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], Cj = ["top", "middle", "bottom"], Sj = un({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: kj, default: "start" }, align: { type: String, values: Cj } }), Ej = K({ name: "ElRow" }), $j = /* @__PURE__ */ K({ ...Ej, props: Sj, setup(e) { const t = e, n = nn("row"), r = $(() => t.gutter); tt(h_, { gutter: r }); const o = $(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = $(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (E(), Q(vt(i.tag), { class: V(y(a)), style: Ze(y(o)) }, { default: R(() => [ oe(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var _j = /* @__PURE__ */ Ut($j, [["__file", "row.vue"]]); const V0 = Zr(_j), Tj = un({ 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: Ct([Number, Object]), default: () => Au({}) }, sm: { type: Ct([Number, Object]), default: () => Au({}) }, md: { type: Ct([Number, Object]), default: () => Au({}) }, lg: { type: Ct([Number, Object]), default: () => Au({}) }, xl: { type: Ct([Number, Object]), default: () => Au({}) } }), Oj = K({ name: "ElCol" }), Fj = /* @__PURE__ */ K({ ...Oj, props: Tj, setup(e) { const t = e, { gutter: n } = xe(h_, { gutter: $(() => 0) }), r = nn("col"), o = $(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = $(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((u) => { const c = t[u]; cr(c) && (u === "span" ? i.push(r.b(`${t[u]}`)) : c > 0 && i.push(r.b(`${u}-${t[u]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((u) => { cr(t[u]) ? i.push(r.b(`${u}-${t[u]}`)) : yr(t[u]) && Object.entries(t[u]).forEach(([c, d]) => { i.push(c !== "span" ? r.b(`${u}-${c}-${d}`) : r.b(`${u}-${d}`)); }); }), n.value && i.push(r.is("guttered")), [r.b(), i]; }); return (i, s) => (E(), Q(vt(i.tag), { class: V(y(a)), style: Ze(y(o)) }, { default: R(() => [ oe(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var Ij = /* @__PURE__ */ Ut(Fj, [["__file", "col.vue"]]); const v_ = Zr(Ij), Aj = K({ name: "ElContainer" }), Pj = /* @__PURE__ */ K({ ...Aj, props: { direction: { type: String } }, setup(e) { const t = e, n = Xr(), r = nn("container"), o = $(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((i) => { const s = i.type.name; return s === "ElHeader" || s === "ElFooter"; }) : !1); return (a, i) => (E(), L("section", { class: V([y(r).b(), y(r).is("vertical", y(o))]) }, [ oe(a.$slots, "default") ], 2)); } }); var Lj = /* @__PURE__ */ Ut(Pj, [["__file", "container.vue"]]); const Rj = K({ name: "ElAside" }), Dj = /* @__PURE__ */ K({ ...Rj, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = nn("aside"), r = $(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (E(), L("aside", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var g_ = /* @__PURE__ */ Ut(Dj, [["__file", "aside.vue"]]); const Mj = K({ name: "ElFooter" }), Nj = /* @__PURE__ */ K({ ...Mj, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = nn("footer"), r = $(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (E(), L("footer", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var m_ = /* @__PURE__ */ Ut(Nj, [["__file", "footer.vue"]]); const Bj = K({ name: "ElHeader" }), zj = /* @__PURE__ */ K({ ...Bj, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = nn("header"), r = $(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (E(), L("header", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var y_ = /* @__PURE__ */ Ut(zj, [["__file", "header.vue"]]); const Vj = K({ name: "ElMain" }), jj = /* @__PURE__ */ K({ ...Vj, setup(e) { const t = nn("main"); return (n, r) => (E(), L("main", { class: V(y(t).b()) }, [ oe(n.$slots, "default") ], 2)); } }); var b_ = /* @__PURE__ */ Ut(jj, [["__file", "main.vue"]]); const w_ = Zr(Lj, { Aside: g_, Footer: m_, Header: y_, Main: b_ }); eu(g_); eu(m_); const x_ = eu(y_), k_ = eu(b_), Hj = /* @__PURE__ */ K({ inheritAttrs: !1 }); function Uj(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var qj = /* @__PURE__ */ Ut(Hj, [["render", Uj], ["__file", "collection.vue"]]); const Wj = /* @__PURE__ */ K({ name: "ElCollectionItem", inheritAttrs: !1 }); function Gj(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var Kj = /* @__PURE__ */ Ut(Wj, [["render", Gj], ["__file", "collection-item.vue"]]); const Yj = "data-el-collection-item", Xj = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...qj, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); tt(r, { itemMap: l, getItems: () => { const c = y(s); if (!c) return []; const d = Array.from(c.querySelectorAll(`[${Yj}]`)); return [...l.values()].sort((h, p) => d.indexOf(h.ref) - d.indexOf(p.ref)); }, collectionRef: s }); } }, i = { ...Kj, name: n, setup(s, { attrs: l }) { const u = z(null), c = xe(r, void 0); tt(o, { collectionItemRef: u }), at(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, _m = un({ trigger: op.trigger, effect: { ...eo.effect, default: "light" }, type: { type: Ct(String) }, placement: { type: Ct(String), default: "bottom" }, popperOptions: { type: Ct(Object), default: () => ({}) }, id: String, size: { type: String, default: "" }, splitButton: Boolean, hideOnClick: { type: Boolean, default: !0 }, loop: { type: Boolean, default: !0 }, showTimeout: { type: Number, default: 150 }, hideTimeout: { type: Number, default: 150 }, tabindex: { type: Ct([Number, String]), default: 0 }, maxHeight: { type: Ct([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Ct(Object) }, teleported: eo.teleported }); un({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: ma } }); un({ onKeydown: { type: Ct(Function) } }); Xj("Dropdown"); const C_ = Symbol("ElSelectGroup"), j0 = Symbol("ElSelect"); function Zj(e, t) { const n = xe(j0), r = xe(C_, { disabled: !1 }), o = $(() => c(vs(n.props.modelValue), e.value)), a = $(() => { var h; if (n.props.multiple) { const p = vs((h = n.props.modelValue) != null ? h : []); return !o.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = $(() => e.label || (yr(e.value) ? "" : e.value)), s = $(() => e.value || e.label || ""), l = $(() => e.disabled || t.groupDisabled || a.value), u = rt(), c = (h = [], p) => { if (yr(e.value)) { const v = n.props.valueKey; return h && h.some((m) => Ga(xi(m, v)) === xi(p, v)); } else return h && h.includes(p); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, f = (h) => { const p = new RegExp(cB(h), "i"); t.visible = p.test(i.value) || e.created; }; return ce(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), ce(() => e.value, (h, p) => { const { remote: v, valueKey: m } = n.props; if (h !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && yr(h) && yr(p) && h[m] === p[m]) return; n.setSelected(); } }), ce(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: l, hoverItem: d, updateOption: f }; } const Jj = K({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = nn("select"), n = Yp(), r = $(() => [ t.be("dropdown", "item"), t.is("disabled", y(s)), t.is("selected", y(i)), t.is("hovering", y(f)) ]), o = Kt({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = Zj(e, o), { visible: d, hover: f } = Vr(o), h = rt().proxy; l.onOptionCreate(h), Tt(() => { const v = h.value, { selected: m } = l.states, b = (l.props.multiple ? m : [m]).some((C) => C.value === h.value); Ue(() => { l.states.cachedOptions.get(v) === h && !b && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: o }; } }); function Qj(e, t, n, r, o, a) { return Ne((E(), L("li", { id: e.id, class: V(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Je(e.selectOptionClick, ["stop"]) }, [ oe(e.$slots, "default", {}, () => [ B("span", null, me(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ft, e.visible] ]); } var Zb = /* @__PURE__ */ Ut(Jj, [["render", Qj], ["__file", "option.vue"]]); const eH = K({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = xe(j0), t = nn("select"), n = $(() => e.props.popperClass), r = $(() => e.props.multiple), o = $(() => e.props.fitInputWidth), a = z(""); function i() { var s; a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return at(() => { i(), bi(e.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function tH(e, t, n, r, o, a) { return E(), L("div", { class: V([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Ze({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? (E(), L("div", { key: 0, class: V(e.ns.be("dropdown", "header")) }, [ oe(e.$slots, "header") ], 2)) : Z("v-if", !0), oe(e.$slots, "default"), e.$slots.footer ? (E(), L("div", { key: 1, class: V(e.ns.be("dropdown", "footer")) }, [ oe(e.$slots, "footer") ], 2)) : Z("v-if", !0) ], 6); } var nH = /* @__PURE__ */ Ut(eH, [["render", tH], ["__file", "select-dropdown.vue"]]); const rH = 11, oH = (e, t) => { const { t: n } = O$(), r = Yp(), o = nn("select"), a = nn("input"), i = Kt({ inputValue: "", options: /* @__PURE__ */ new Map(), cachedOptions: /* @__PURE__ */ new Map(), disabledOptions: /* @__PURE__ */ new Map(), optionValues: [], selected: [], selectionWidth: 0, calculatorWidth: 0, collapseItemWidth: 0, selectedLabel: "", hoveringIndex: -1, previousQuery: null, inputHovering: !1, menuVisibleOnFocus: !1, isBeforeHide: !1 }), s = z(null), l = z(null), u = z(null), c = z(null), d = z(null), f = z(null), h = z(null), p = z(null), v = z(null), m = z(null), g = z(null), b = z(null), { isComposing: C, handleCompositionStart: x, handleCompositionUpdate: w, handleCompositionEnd: k } = Z$({ afterComposition: (D) => ge(D) }), { wrapperRef: S, isFocused: _ } = X$(d, { beforeFocus() { return A.value; }, afterFocus() { e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(D) { var ne, Oe; return ((ne = u.value) == null ? void 0 : ne.isFocusInsideContent(D)) || ((Oe = c.value) == null ? void 0 : Oe.isFocusInsideContent(D)); }, afterBlur() { O.value = !1, i.menuVisibleOnFocus = !1; } }), O = z(!1), F = z(), { form: I, formItem: P } = N0(), { inputId: M } = Hb(e, { formItemContext: P }), { valueOnClear: N, isEmptyValue: j } = iz(e), A = $(() => e.disabled || (I == null ? void 0 : I.disabled)), U = $(() => Bo(e.modelValue) ? e.modelValue.length > 0 : !j(e.modelValue)), q = $(() => e.clearable && !A.value && i.inputHovering && U.value), Y = $(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), ie = $(() => o.is("reverse", Y.value && O.value)), re = $(() => (P == null ? void 0 : P.validateState) || ""), le = $(() => $$[re.value]), he = $(() => e.remote ? 300 : 0), we = $(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !i.inputValue && i.options.size === 0 ? !1 : e.filterable && i.inputValue && i.options.size > 0 && be.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), be = $(() => de.value.filter((D) => D.visible).length), de = $(() => { const D = Array.from(i.options.values()), ne = []; return i.optionValues.forEach((Oe) => { const We = D.findIndex((Zt) => Zt.value === Oe); We > -1 && ne.push(D[We]); }), ne.length >= D.length ? ne : D; }), ae = $(() => Array.from(i.cachedOptions.values())), ee = $(() => { const D = de.value.filter((ne) => !ne.created).some((ne) => ne.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !D; }), se = () => { e.filterable && mr(e.filterMethod) || e.filterable && e.remote && mr(e.remoteMethod) || de.value.forEach((D) => { var ne; (ne = D.updateOption) == null || ne.call(D, i.inputValue); }); }, pe = Xp(), Se = $(() => ["small"].includes(pe.value) ? "small" : "default"), Le = $({ get() { return O.value && we.value !== !1; }, set(D) { O.value = D; } }), je = $(() => { if (e.multiple && !_d(e.modelValue)) return vs(e.modelValue).length === 0 && !i.inputValue; const D = Bo(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || _d(D) ? !i.inputValue : !0; }), _e = $(() => { var D; const ne = (D = e.placeholder) != null ? D : n("el.select.placeholder"); return e.multiple || !U.value ? ne : i.selectedLabel; }), ze = $(() => I1 ? null : "mouseenter"); ce(() => e.modelValue, (D, ne) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ie("")), qe(), !M1(D, ne) && e.validateEvent && (P == null || P.validate("change").catch((Oe) => xr(Oe))); }, { flush: "post", deep: !0 }), ce(() => O.value, (D) => { D ? Ie(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", D); }), ce(() => i.options.entries(), () => { var D; if (!rr) return; const ne = ((D = s.value) == null ? void 0 : D.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !_d(e.modelValue) || !Array.from(ne).includes(document.activeElement)) && qe(), e.defaultFirstOption && (e.filterable || e.remote) && be.value && He(); }, { flush: "post" }), ce(() => i.hoveringIndex, (D) => { cr(D) && D > -1 ? F.value = de.value[D] || {} : F.value = {}, de.value.forEach((ne) => { ne.hover = F.value === ne; }); }), qp(() => { i.isBeforeHide || se(); }); const Ie = (D) => { i.previousQuery === D || C.value || (i.previousQuery = D, e.filterable && mr(e.filterMethod) ? e.filterMethod(D) : e.filterable && e.remote && mr(e.remoteMethod) && e.remoteMethod(D), e.defaultFirstOption && (e.filterable || e.remote) && be.value ? Ue(He) : Ue(Ve)); }, He = () => { const D = de.value.filter((We) => We.visible && !We.disabled && !We.states.groupDisabled), ne = D.find((We) => We.created), Oe = D[0]; i.hoveringIndex = Te(de.value, ne || Oe); }, qe = () => { if (e.multiple) i.selectedLabel = ""; else { const ne = Bo(e.modelValue) ? e.modelValue[0] : e.modelValue, Oe = et(ne); i.selectedLabel = Oe.currentLabel, i.selected = [Oe]; return; } const D = []; _d(e.modelValue) || vs(e.modelValue).forEach((ne) => { D.push(et(ne)); }), i.selected = D; }, et = (D) => { let ne; const Oe = gm(D).toLowerCase() === "object", We = gm(D).toLowerCase() === "null", Zt = gm(D).toLowerCase() === "undefined"; for (let on = i.cachedOptions.size - 1; on >= 0; on--) { const Jt = ae.value[on]; if (Oe ? xi(Jt.value, e.valueKey) === xi(D, e.valueKey) : Jt.value === D) { ne = { value: D, currentLabel: Jt.currentLabel, get isDisabled() { return Jt.isDisabled; } }; break; } } if (ne) return ne; const _n = Oe ? D.label : !We && !Zt ? D : ""; return { value: D, currentLabel: _n }; }, Ve = () => { i.hoveringIndex = de.value.findIndex((D) => i.selected.some((ne) => wn(ne) === wn(D))); }, nt = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, ot = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, pt = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, T = () => { var D, ne; (ne = (D = u.value) == null ? void 0 : D.updatePopper) == null || ne.call(D); }, G = () => { var D, ne; (ne = (D = c.value) == null ? void 0 : D.updatePopper) == null || ne.call(D); }, fe = () => { i.inputValue.length > 0 && !O.value && (O.value = !0), Ie(i.inputValue); }, ge = (D) => { if (i.inputValue = D.target.value, e.remote) ve(); else return fe(); }, ve = x$(() => { fe(); }, he.value), Fe = (D) => { M1(e.modelValue, D) || t(Al, D); }, Ce = (D) => rB(D, (ne) => !i.disabledOptions.has(ne)), Re = (D) => { if (e.multiple && D.code !== tp.delete && D.target.value.length <= 0) { const ne = vs(e.modelValue).slice(), Oe = Ce(ne); if (Oe < 0) return; const We = ne[Oe]; ne.splice(Oe, 1), t(Rr, ne), Fe(ne), t("remove-tag", We); } }, lt = (D, ne) => { const Oe = i.selected.indexOf(ne); if (Oe > -1 && !A.value) { const We = vs(e.modelValue).slice(); We.splice(Oe, 1), t(Rr, We), Fe(We), t("remove-tag", ne.value); } D.stopPropagation(), Nt(); }, ut = (D) => { D.stopPropagation(); const ne = e.multiple ? [] : N.value; if (e.multiple) for (const Oe of i.selected) Oe.isDisabled && ne.push(Oe.value); t(Rr, ne), Fe(ne), i.hoveringIndex = -1, O.value = !1, t("clear"), Nt(); }, ue = (D) => { var ne; if (e.multiple) { const Oe = vs((ne = e.modelValue) != null ? ne : []).slice(), We = Te(Oe, D.value); We > -1 ? Oe.splice(We, 1) : (e.multipleLimit <= 0 || Oe.length < e.multipleLimit) && Oe.push(D.value), t(Rr, Oe), Fe(Oe), D.created && Ie(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Rr, D.value), Fe(D.value), O.value = !1; Nt(), !O.value && Ue(() => { ke(D); }); }, Te = (D = [], ne) => { if (!yr(ne)) return D.indexOf(ne); const Oe = e.valueKey; let We = -1; return D.some((Zt, _n) => Ga(xi(Zt, Oe)) === xi(ne, Oe) ? (We = _n, !0) : !1), We; }, ke = (D) => { var ne, Oe, We, Zt, _n; const Tn = Bo(D) ? D[0] : D; let on = null; if (Tn != null && Tn.value) { const Jt = de.value.filter((Po) => Po.value === Tn.value); Jt.length > 0 && (on = Jt[0].$el); } if (u.value && on) { const Jt = (Zt = (We = (Oe = (ne = u.value) == null ? void 0 : ne.popperRef) == null ? void 0 : Oe.contentRef) == null ? void 0 : We.querySelector) == null ? void 0 : Zt.call(We, `.${o.be("dropdown", "wrap")}`); Jt && pB(Jt, on); } (_n = b.value) == null || _n.handleScroll(); }, Be = (D) => { i.options.set(D.value, D), i.cachedOptions.set(D.value, D), D.disabled && i.disabledOptions.set(D.value, D); }, Dt = (D, ne) => { i.options.get(D) === ne && i.options.delete(D); }, Ft = $(() => { var D, ne; return (ne = (D = u.value) == null ? void 0 : D.popperRef) == null ? void 0 : ne.contentRef; }), zt = () => { i.isBeforeHide = !1, Ue(() => ke(i.selected)); }, Nt = () => { var D; (D = d.value) == null || D.focus(); }, Yt = () => { var D; (D = d.value) == null || D.blur(); }, Ln = (D) => { ut(D); }, pn = () => { O.value = !1, _.value && Yt(); }, fn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1; }, Fn = () => { A.value || (I1 && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value); }, Rn = () => { O.value ? de.value[i.hoveringIndex] && ue(de.value[i.hoveringIndex]) : Fn(); }, wn = (D) => yr(D.value) ? xi(D.value, e.valueKey) : D.value, sr = $(() => de.value.filter((D) => D.visible).every((D) => D.disabled)), Xn = $(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), Zn = $(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Xt = (D) => { if (!O.value) { O.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || C.value) && !sr.value) { D === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : D === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ne = de.value[i.hoveringIndex]; (ne.disabled === !0 || ne.states.groupDisabled === !0 || !ne.visible) && Xt(D), Ue(() => ke(F.value)); } }, hn = () => { if (!l.value) return 0; const D = window.getComputedStyle(l.value); return Number.parseFloat(D.gap || "6px"); }, $n = $(() => { const D = hn(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - D : i.selectionWidth}px` }; }), lr = $(() => ({ maxWidth: `${i.selectionWidth}px` })), Ao = $(() => ({ width: `${Math.max(i.calculatorWidth, rH)}px` })); return bi(l, nt), bi(f, ot), bi(v, T), bi(S, T), bi(m, G), bi(g, pt), at(() => { qe(); }), { inputId: M, contentId: r, nsSelect: o, nsInput: a, states: i, isFocused: _, expanded: O, optionsArray: de, hoverOption: F, selectSize: pe, filteredOptionsCount: be, resetCalculatorWidth: ot, updateTooltip: T, updateTagTooltip: G, debouncedOnInputChange: ve, onInput: ge, deletePrevTag: Re, deleteTag: lt, deleteSelected: ut, handleOptionSelect: ue, scrollToOption: ke, hasModelValue: U, shouldShowPlaceholder: je, currentPlaceholder: _e, mouseEnterEventName: ze, showClose: q, iconComponent: Y, iconReverse: ie, validateState: re, validateIcon: le, showNewOption: ee, updateOptions: se, collapseTagSize: Se, setSelected: qe, selectDisabled: A, emptyText: we, handleCompositionStart: x, handleCompositionUpdate: w, handleCompositionEnd: k, onOptionCreate: Be, onOptionDestroy: Dt, handleMenuEnter: zt, focus: Nt, blur: Yt, handleClearClick: Ln, handleClickOutside: pn, handleEsc: fn, toggleMenu: Fn, selectOption: Rn, getValueKey: wn, navigateOptions: Xt, dropdownMenuVisible: Le, showTagList: Xn, collapseTagList: Zn, tagStyle: $n, collapseTagStyle: lr, inputStyle: Ao, popperRef: Ft, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var aH = K({ name: "ElOptions", setup(e, { slots: t }) { const n = xe(j0); let r = []; return () => { var o, a; const i = (o = t.default) == null ? void 0 : o.call(t), s = []; function l(u) { Bo(u) && u.forEach((c) => { var d, f, h, p; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!Dr(c.children) && !Bo(c.children) && mr((f = c.children) == null ? void 0 : f.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : Bo(c.children) && l(c.children); }); } return i.length && l((a = i[0]) == null ? void 0 : a.children), M1(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const iH = un({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: zb, effect: { type: Ct(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: Ct(Object), default: () => ({}) }, remote: Boolean, loadingText: String, noMatchText: String, noDataText: String, remoteMethod: Function, filterMethod: Function, multiple: Boolean, multipleLimit: { type: Number, default: 0 }, placeholder: { type: String }, defaultFirstOption: Boolean, reserveKeyword: { type: Boolean, default: !0 }, valueKey: { type: String, default: "value" }, collapseTags: Boolean, collapseTagsTooltip: Boolean, maxCollapseTags: { type: Number, default: 1 }, teleported: eo.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: ma, default: Ob }, fitInputWidth: Boolean, suffixIcon: { type: ma, default: Tb }, tagType: { ...H1.type, default: "info" }, tagEffect: { ...H1.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: Ct(String), values: D0, default: "bottom-start" }, fallbackPlacements: { type: Ct(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...az, ...tu(["ariaLabel"]) }), Zk = "ElSelect", sH = K({ name: Zk, componentName: Zk, components: { ElSelectMenu: nH, ElOption: Zb, ElOptions: aH, ElTag: xj, ElScrollbar: e_, ElTooltip: Yb, ElIcon: tr }, directives: { ClickOutside: gj }, props: iH, emits: [ Rr, Al, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = $(() => { const { modelValue: a, multiple: i } = e, s = i ? [] : void 0; return Bo(a) ? i ? a : s : i ? s : a; }), r = Kt({ ...Vr(e), modelValue: n }), o = oH(r, t); return tt(j0, Kt({ props: r, states: o.states, optionsArray: o.optionsArray, handleOptionSelect: o.handleOptionSelect, onOptionCreate: o.onOptionCreate, onOptionDestroy: o.onOptionDestroy, selectRef: o.selectRef, setSelected: o.setSelected })), { ...o, modelValue: n }; } }); function lH(e, t, n, r, o, a) { const i = Xe("el-tag"), s = Xe("el-tooltip"), l = Xe("el-icon"), u = Xe("el-option"), c = Xe("el-options"), d = Xe("el-scrollbar"), f = Xe("el-select-menu"), h = yb("click-outside"); return Ne((E(), L("div", { ref: "selectRef", class: V([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [bb(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ W(s, { ref: "tooltipRef", visible: e.dropdownMenuVisible, placement: e.placement, teleported: e.teleported, "popper-class": [e.nsSelect.e("popper"), e.popperClass], "popper-options": e.popperOptions, "fallback-placements": e.fallbackPlacements, effect: e.effect, pure: "", trigger: "click", transition: `${e.nsSelect.namespace.value}-zoom-in-top`, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, persistent: e.persistent, "append-to": e.appendTo, onBeforeShow: e.handleMenuEnter, onHide: (p) => e.states.isBeforeHide = !1 }, { default: R(() => { var p; return [ B("div", { ref: "wrapperRef", class: V([ 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: Je(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (E(), L("div", { key: 0, ref: "prefixRef", class: V(e.nsSelect.e("prefix")) }, [ oe(e.$slots, "prefix") ], 2)) : Z("v-if", !0), B("div", { ref: "selectionRef", class: V([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? oe(e.$slots, "tag", { key: 0 }, () => [ (E(!0), L(De, null, xt(e.showTagList, (v) => (E(), L("div", { key: e.getValueKey(v), class: V(e.nsSelect.e("selected-item")) }, [ W(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ze(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, [ oe(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Ae(me(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (E(), Q(s, { key: 0, ref: "tagTooltipRef", disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e.effect, placement: "bottom", teleported: e.teleported }, { default: R(() => [ B("div", { ref: "collapseItemRef", class: V(e.nsSelect.e("selected-item")) }, [ W(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ze(e.collapseTagStyle) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, " + " + me(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: R(() => [ B("div", { ref: "tagMenuRef", class: V(e.nsSelect.e("selection")) }, [ (E(!0), L(De, null, xt(e.collapseTagList, (v) => (E(), L("div", { key: e.getValueKey(v), class: V(e.nsSelect.e("selected-item")) }, [ W(i, { class: "in-tooltip", closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", onClose: (m) => e.deleteTag(m, v) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, [ oe(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Ae(me(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : Z("v-if", !0) ]) : Z("v-if", !0), e.selectDisabled ? Z("v-if", !0) : (E(), L("div", { key: 1, class: V([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Ne(B("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: V([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Ze(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: [ yn(Je((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), yn(Je((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), yn(Je(e.handleEsc, ["stop", "prevent"]), ["esc"]), yn(Je(e.selectOption, ["stop", "prevent"]), ["enter"]), yn(Je(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Je(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"]), [ [C0, e.states.inputValue] ]), e.filterable ? (E(), L("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: V(e.nsSelect.e("input-calculator")), textContent: me(e.states.inputValue) }, null, 10, ["textContent"])) : Z("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (E(), L("div", { key: 2, class: V([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? oe(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ B("span", null, me(e.currentPlaceholder), 1) ]) : (E(), L("span", { key: 1 }, me(e.currentPlaceholder), 1)) ], 2)) : Z("v-if", !0) ], 2), B("div", { ref: "suffixRef", class: V(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (E(), Q(l, { key: 0, class: V([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: R(() => [ (E(), Q(vt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), e.showClose && e.clearIcon ? (E(), Q(l, { key: 1, class: V([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: R(() => [ (E(), Q(vt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0), e.validateState && e.validateIcon ? (E(), Q(l, { key: 2, class: V([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: R(() => [ (E(), Q(vt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: R(() => [ W(f, { ref: "menuRef" }, { default: R(() => [ e.$slots.header ? (E(), L("div", { key: 0, class: V(e.nsSelect.be("dropdown", "header")), onClick: Je(() => { }, ["stop"]) }, [ oe(e.$slots, "header") ], 10, ["onClick"])) : Z("v-if", !0), Ne(W(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: V([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: R(() => [ e.showNewOption ? (E(), Q(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : Z("v-if", !0), W(c, null, { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ft, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (E(), L("div", { key: 1, class: V(e.nsSelect.be("dropdown", "loading")) }, [ oe(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (E(), L("div", { key: 2, class: V(e.nsSelect.be("dropdown", "empty")) }, [ oe(e.$slots, "empty", {}, () => [ B("span", null, me(e.emptyText), 1) ]) ], 2)) : Z("v-if", !0), e.$slots.footer ? (E(), L("div", { key: 3, class: V(e.nsSelect.be("dropdown", "footer")), onClick: Je(() => { }, ["stop"]) }, [ oe(e.$slots, "footer") ], 10, ["onClick"])) : Z("v-if", !0) ]), _: 3 }, 512) ]), _: 3 }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"]) ], 16, ["onMouseleave"])), [ [h, e.handleClickOutside, e.popperRef] ]); } var uH = /* @__PURE__ */ Ut(sH, [["render", lH], ["__file", "select.vue"]]); const cH = K({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = nn("select"), n = z(null), r = rt(), o = z([]); tt(C_, Kt({ ...Vr(e) })); const a = $(() => o.value.some((u) => u.visible === !0)), i = (u) => { var c, d; return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy); }, s = (u) => { const c = vs(u), d = []; return c.forEach((f) => { var h, p; i(f) ? d.push(f.component.proxy) : (h = f.children) != null && h.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree)); }), d; }, l = () => { o.value = s(r.subTree); }; return at(() => { l(); }), oR(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: a, ns: t }; } }); function dH(e, t, n, r, o, a) { return Ne((E(), L("ul", { ref: "groupRef", class: V(e.ns.be("group", "wrap")) }, [ B("li", { class: V(e.ns.be("group", "title")) }, me(e.label), 3), B("li", null, [ B("ul", { class: V(e.ns.b("group")) }, [ oe(e.$slots, "default") ], 2) ]) ], 2)), [ [ft, e.visible] ]); } var S_ = /* @__PURE__ */ Ut(cH, [["render", dH], ["__file", "option-group.vue"]]); const E_ = Zr(uH, { Option: Zb, OptionGroup: S_ }), $_ = eu(Zb); eu(S_); const pH = un({ trigger: op.trigger, placement: _m.placement, disabled: op.disabled, visible: eo.visible, transition: eo.transition, popperOptions: _m.popperOptions, tabindex: _m.tabindex, content: eo.content, popperStyle: eo.popperStyle, popperClass: eo.popperClass, enterable: { ...eo.enterable, default: !0 }, effect: { ...eo.effect, default: "light" }, teleported: eo.teleported, title: String, width: { type: [String, Number], default: 150 }, offset: { type: Number, default: void 0 }, showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 }, showArrow: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, "onUpdate:visible": { type: Function } }), fH = { "update:visible": (e) => bl(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, hH = "onUpdate:visible", vH = K({ name: "ElPopover" }), gH = /* @__PURE__ */ K({ ...vH, props: pH, emits: fH, setup(e, { expose: t, emit: n }) { const r = e, o = $(() => r[hH]), a = nn("popover"), i = z(), s = $(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = $(() => [ { width: ep(r.width) }, r.popperStyle ]), u = $(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = $(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (E(), Q(y(Yb), Lt({ ref_key: "tooltipRef", ref: i }, m.$attrs, { trigger: m.trigger, placement: m.placement, disabled: m.disabled, visible: m.visible, transition: m.transition, "popper-options": m.popperOptions, tabindex: m.tabindex, content: m.content, offset: m.offset, "show-after": m.showAfter, "hide-after": m.hideAfter, "auto-close": m.autoClose, "show-arrow": m.showArrow, "aria-label": m.title, effect: m.effect, enterable: m.enterable, "popper-class": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: R(() => [ m.title ? (E(), L("div", { key: 0, class: V(y(a).e("title")), role: "title" }, me(m.title), 3)) : Z("v-if", !0), oe(m.$slots, "default", {}, () => [ Ae(me(m.content), 1) ]) ]), default: R(() => [ m.$slots.reference ? oe(m.$slots, "reference", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"])); } }); var mH = /* @__PURE__ */ Ut(gH, [["__file", "popover.vue"]]); const Jk = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var yH = { mounted(e, t) { Jk(e, t); }, updated(e, t) { Jk(e, t); } }; const bH = "popover", wH = TB(yH, bH), H0 = Zr(mH, { directive: wH }), xH = un({ modelValue: { type: [Boolean, String, Number], default: !1 }, disabled: Boolean, loading: Boolean, size: { type: String, validator: OB }, width: { type: [String, Number], default: "" }, inlinePrompt: Boolean, inactiveActionIcon: { type: ma }, activeActionIcon: { type: ma }, activeIcon: { type: ma }, inactiveIcon: { type: ma }, activeText: { type: String, default: "" }, inactiveText: { type: String, default: "" }, activeValue: { type: [Boolean, String, Number], default: !0 }, inactiveValue: { type: [Boolean, String, Number], default: !1 }, name: { type: String, default: "" }, validateEvent: { type: Boolean, default: !0 }, beforeChange: { type: Ct(Function) }, id: String, tabindex: { type: [String, Number] }, ...tu(["ariaLabel"]) }), kH = { [Rr]: (e) => bl(e) || Dr(e) || cr(e), [Al]: (e) => bl(e) || Dr(e) || cr(e), [Xu]: (e) => bl(e) || Dr(e) || cr(e) }, U1 = "ElSwitch", CH = K({ name: U1 }), SH = /* @__PURE__ */ K({ ...CH, props: xH, emits: kH, setup(e, { expose: t, emit: n }) { const r = e, { formItem: o } = N0(), a = Xp(), i = nn("switch"), { inputId: s } = Hb(r, { formItemContext: o }), l = Zp($(() => r.loading)), u = z(r.modelValue !== !1), c = z(), d = z(), f = $(() => [ i.b(), i.m(a.value), i.is("disabled", l.value), i.is("checked", g.value) ]), h = $(() => [ i.e("label"), i.em("label", "left"), i.is("active", !g.value) ]), p = $(() => [ i.e("label"), i.em("label", "right"), i.is("active", g.value) ]), v = $(() => ({ width: ep(r.width) })); ce(() => r.modelValue, () => { u.value = !0; }); const m = $(() => u.value ? r.modelValue : !1), g = $(() => m.value === r.activeValue); [r.activeValue, r.inactiveValue].includes(m.value) || (n(Rr, r.inactiveValue), n(Al, r.inactiveValue), n(Xu, r.inactiveValue)), ce(g, (w) => { var k; c.value.checked = w, r.validateEvent && ((k = o == null ? void 0 : o.validate) == null || k.call(o, "change").catch((S) => xr(S))); }); const b = () => { const w = g.value ? r.inactiveValue : r.activeValue; n(Rr, w), n(Al, w), n(Xu, w), Ue(() => { c.value.checked = g.value; }); }, C = () => { if (l.value) return; const { beforeChange: w } = r; if (!w) { b(); return; } const k = w(); [ qx(k), bl(k) ].includes(!0) || _b(U1, "beforeChange must return type `Promise` or `boolean`"), qx(k) ? k.then((_) => { _ && b(); }).catch((_) => { xr(U1, `some error occurred: ${_}`); }) : k && b(); }, x = () => { var w, k; (k = (w = c.value) == null ? void 0 : w.focus) == null || k.call(w); }; return at(() => { c.value.checked = g.value; }), t({ focus: x, checked: g }), (w, k) => (E(), L("div", { class: V(y(f)), onClick: Je(C, ["prevent"]) }, [ B("input", { id: y(s), ref_key: "input", ref: c, class: V(y(i).e("input")), type: "checkbox", role: "switch", "aria-checked": y(g), "aria-disabled": y(l), "aria-label": w.ariaLabel, name: w.name, "true-value": w.activeValue, "false-value": w.inactiveValue, disabled: y(l), tabindex: w.tabindex, onChange: b, onKeydown: yn(C, ["enter"]) }, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]), !w.inlinePrompt && (w.inactiveIcon || w.inactiveText) ? (E(), L("span", { key: 0, class: V(y(h)) }, [ w.inactiveIcon ? (E(), Q(y(tr), { key: 0 }, { default: R(() => [ (E(), Q(vt(w.inactiveIcon))) ]), _: 1 })) : Z("v-if", !0), !w.inactiveIcon && w.inactiveText ? (E(), L("span", { key: 1, "aria-hidden": y(g) }, me(w.inactiveText), 9, ["aria-hidden"])) : Z("v-if", !0) ], 2)) : Z("v-if", !0), B("span", { ref_key: "core", ref: d, class: V(y(i).e("core")), style: Ze(y(v)) }, [ w.inlinePrompt ? (E(), L("div", { key: 0, class: V(y(i).e("inner")) }, [ w.activeIcon || w.inactiveIcon ? (E(), Q(y(tr), { key: 0, class: V(y(i).is("icon")) }, { default: R(() => [ (E(), Q(vt(y(g) ? w.activeIcon : w.inactiveIcon))) ]), _: 1 }, 8, ["class"])) : w.activeText || w.inactiveText ? (E(), L("span", { key: 1, class: V(y(i).is("text")), "aria-hidden": !y(g) }, me(y(g) ? w.activeText : w.inactiveText), 11, ["aria-hidden"])) : Z("v-if", !0) ], 2)) : Z("v-if", !0), B("div", { class: V(y(i).e("action")) }, [ w.loading ? (E(), Q(y(tr), { key: 0, class: V(y(i).is("loading")) }, { default: R(() => [ W(y(L0)) ]), _: 1 }, 8, ["class"])) : y(g) ? oe(w.$slots, "active-action", { key: 1 }, () => [ w.activeActionIcon ? (E(), Q(y(tr), { key: 0 }, { default: R(() => [ (E(), Q(vt(w.activeActionIcon))) ]), _: 1 })) : Z("v-if", !0) ]) : y(g) ? Z("v-if", !0) : oe(w.$slots, "inactive-action", { key: 2 }, () => [ w.inactiveActionIcon ? (E(), Q(y(tr), { key: 0 }, { default: R(() => [ (E(), Q(vt(w.inactiveActionIcon))) ]), _: 1 })) : Z("v-if", !0) ]) ], 2) ], 6), !w.inlinePrompt && (w.activeIcon || w.activeText) ? (E(), L("span", { key: 1, class: V(y(p)) }, [ w.activeIcon ? (E(), Q(y(tr), { key: 0 }, { default: R(() => [ (E(), Q(vt(w.activeIcon))) ]), _: 1 })) : Z("v-if", !0), !w.activeIcon && w.activeText ? (E(), L("span", { key: 1, "aria-hidden": !y(g) }, me(w.activeText), 9, ["aria-hidden"])) : Z("v-if", !0) ], 2)) : Z("v-if", !0) ], 10, ["onClick"])); } }); var EH = /* @__PURE__ */ Ut(SH, [["__file", "switch.vue"]]); const __ = Zr(EH); function $H(e) { let t; const n = z(!1), r = Kt({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(f) { r.text = f; } function a() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (kv(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), kv(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, a(); } const u = K({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = lz("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = jt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ jt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? jt("p", { class: p.b("text") }, [r.text]) : void 0; return jt(pr, { name: p.b("fade"), onAfterLeave: l }, { default: R(() => [ Ne(W("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ jt("div", { class: p.b("spinner") }, [g, b]) ]), [[ft, r.visible]]) ]) }); }; } }), c = S0(u), d = c.mount(document.createElement("div")); return { ...Vr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Kf; const q1 = function(e = {}) { if (!rr) return; const t = _H(e); if (t.fullscreen && Kf) return Kf; const n = $H({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (Kf = void 0); } }); TH(t, t.parent, n), Qk(t, t.parent, n), t.parent.vLoadingAddClassList = () => Qk(t, t.parent, n); let r = t.parent.getAttribute("loading-number"); return r ? r = `${Number.parseInt(r) + 1}` : r = "1", t.parent.setAttribute("loading-number", r), t.parent.appendChild(n.$el), Ue(() => n.visible.value = t.visible), t.fullscreen && (Kf = n), n; }, _H = (e) => { var t, n, r, o; let a; return Dr(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, { parent: a === document.body || e.body ? document.body : a, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (o = e.visible) != null ? o : !0, beforeClose: e.beforeClose, closed: e.closed, target: a }; }, TH = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = ad(document.body, "position"), n.originalOverflow.value = ad(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = ad(document.body, "position"), await Ue(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(ad(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = ad(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, Qk = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? kv(t, r.bm("parent", "relative")) : yk(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? yk(t, r.bm("parent", "hidden")) : kv(t, r.bm("parent", "hidden")); }, Vh = Symbol("ElLoading"), eC = (e, t) => { var n, r, o, a; const i = t.instance, s = (f) => yr(t.value) ? t.value[f] : void 0, l = (f) => { const h = Dr(f) && (i == null ? void 0 : i[f]) || f; return h && z(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${mR(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[Vh] = { options: d, instance: q1(d) }; }, OH = (e, t) => { for (const n of Object.keys(t)) Gn(t[n]) && (t[n].value = e[n]); }, nc = { mounted(e, t) { t.value && eC(e, t); }, updated(e, t) { const n = e[Vh]; t.oldValue !== t.value && (t.value && !t.oldValue ? eC(e, t) : t.value && t.oldValue ? yr(t.value) && OH(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Vh]) == null || t.instance.close(), e[Vh] = null; } }, T_ = { install(e) { e.directive("loading", nc), e.config.globalProperties.$loading = q1; }, directive: nc, service: q1 }; var FH = Object.defineProperty, IH = (e, t, n) => t in e ? FH(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Da = (e, t, n) => IH(e, typeof t != "symbol" ? t + "" : t, n); const mi = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const o = e == null ? void 0 : e(r); if (n === !1 || !o) return t == null ? void 0 : t(r); }; var tC; const Un = typeof window < "u", AH = (e) => typeof e == "string", O_ = () => { }, W1 = Un && ((tC = window == null ? void 0 : window.navigator) == null ? void 0 : tC.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function F_(e) { return typeof e == "function" ? e() : y(e); } function PH(e) { return e; } function U0(e) { return g0() ? (jp(e), !0) : !1; } function LH(e, t = !0) { rt() ? at(e) : t ? e() : Ue(e); } function $i(e) { var t; const n = F_(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const q0 = Un ? window : void 0; function Mo(...e) { let t, n, r, o; if (AH(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = q0) : [t, n, r, o] = e, !t) return O_; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = ce(() => [$i(t), F_(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return U0(u), u; } let nC = !1; function RH(e, t, n = {}) { const { window: r = q0, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; W1 && !nC && (nC = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", O_))); let s = !0; const l = (c) => o.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = $i(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Mo(r, "click", (c) => { const d = $i(e); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !l(c)), !s) { s = !0; return; } t(c); } }, { passive: !0, capture: a }), Mo(r, "pointerdown", (c) => { const d = $i(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Mo(r, "blur", (c) => { var d; const f = $i(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } function I_(e, t = !1) { const n = z(), r = () => n.value = !!e(); return r(), LH(r, t), n; } const rC = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, oC = "__vueuse_ssr_handlers__"; rC[oC] = rC[oC] || {}; var aC = Object.getOwnPropertySymbols, DH = Object.prototype.hasOwnProperty, MH = Object.prototype.propertyIsEnumerable, NH = (e, t) => { var n = {}; for (var r in e) DH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && aC) for (var r of aC(e)) t.indexOf(r) < 0 && MH.call(e, r) && (n[r] = e[r]); return n; }; function wi(e, t, n = {}) { const r = n, { window: o = q0 } = r, a = NH(r, ["window"]); let i; const s = I_(() => o && "ResizeObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = ce(() => $i(e), (d) => { l(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return U0(c), { isSupported: s, stop: c }; } var iC = Object.getOwnPropertySymbols, BH = Object.prototype.hasOwnProperty, zH = Object.prototype.propertyIsEnumerable, VH = (e, t) => { var n = {}; for (var r in e) BH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && iC) for (var r of iC(e)) t.indexOf(r) < 0 && zH.call(e, r) && (n[r] = e[r]); return n; }; function jH(e, t, n = {}) { const r = n, { window: o = q0 } = r, a = VH(r, ["window"]); let i; const s = I_(() => o && "MutationObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = ce(() => $i(e), (d) => { l(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: !0 }), c = () => { l(), u(); }; return U0(c), { isSupported: s, stop: c }; } var sC; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(sC || (sC = {})); var HH = Object.defineProperty, lC = Object.getOwnPropertySymbols, UH = Object.prototype.hasOwnProperty, qH = Object.prototype.propertyIsEnumerable, uC = (e, t, n) => t in e ? HH(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, WH = (e, t) => { for (var n in t || (t = {})) UH.call(t, n) && uC(e, n, t[n]); if (lC) for (var n of lC(t)) qH.call(t, n) && uC(e, n, t[n]); return e; }; const GH = { 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] }; WH({ linear: PH }, GH); const KH = () => Un && /firefox/i.test(window.navigator.userAgent), Jb = (e) => { let t, n; return e.type === "touchend" ? (n = e.changedTouches[0].clientY, t = e.changedTouches[0].clientX) : e.type.startsWith("touch") ? (n = e.touches[0].clientY, t = e.touches[0].clientX) : (n = e.clientY, t = e.clientX), { clientX: t, clientY: n }; }; /** * @vue/shared v3.4.27 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ process.env.NODE_ENV !== "production" && Object.freeze({}); process.env.NODE_ENV !== "production" && Object.freeze([]); const ap = () => { }, YH = Object.prototype.hasOwnProperty, Pl = (e, t) => YH.call(e, t), oo = Array.isArray, Kr = (e) => typeof e == "function", Mr = (e) => typeof e == "string", br = (e) => e !== null && typeof e == "object", XH = Object.prototype.toString, ZH = (e) => XH.call(e), Tm = (e) => ZH(e).slice(8, -1), A_ = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, JH = /-(\w)/g, QH = A_((e) => e.replace(JH, (t, n) => n ? n.toUpperCase() : "")), eU = /\B([A-Z])/g, tU = A_( (e) => e.replace(eU, "-$1").toLowerCase() ); var P_ = typeof global == "object" && global && global.Object === Object && global, nU = typeof self == "object" && self && self.Object === Object && self, ai = P_ || nU || Function("return this")(), Xa = ai.Symbol, L_ = Object.prototype, rU = L_.hasOwnProperty, oU = L_.toString, sd = Xa ? Xa.toStringTag : void 0; function aU(e) { var t = rU.call(e, sd), n = e[sd]; try { e[sd] = void 0; var r = !0; } catch { } var o = oU.call(e); return r && (t ? e[sd] = n : delete e[sd]), o; } var iU = Object.prototype, sU = iU.toString; function lU(e) { return sU.call(e); } var uU = "[object Null]", cU = "[object Undefined]", cC = Xa ? Xa.toStringTag : void 0; function Ic(e) { return e == null ? e === void 0 ? cU : uU : cC && cC in Object(e) ? aU(e) : lU(e); } function rc(e) { return e != null && typeof e == "object"; } var dU = "[object Symbol]"; function W0(e) { return typeof e == "symbol" || rc(e) && Ic(e) == dU; } function pU(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; ) o[n] = t(e[n], n, e); return o; } var xa = Array.isArray, fU = 1 / 0, dC = Xa ? Xa.prototype : void 0, pC = dC ? dC.toString : void 0; function R_(e) { if (typeof e == "string") return e; if (xa(e)) return pU(e, R_) + ""; if (W0(e)) return pC ? pC.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -fU ? "-0" : t; } var hU = /\s/; function vU(e) { for (var t = e.length; t-- && hU.test(e.charAt(t)); ) ; return t; } var gU = /^\s+/; function mU(e) { return e && e.slice(0, vU(e) + 1).replace(gU, ""); } function Fs(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var fC = NaN, yU = /^[-+]0x[0-9a-f]+$/i, bU = /^0b[01]+$/i, wU = /^0o[0-7]+$/i, xU = parseInt; function hC(e) { if (typeof e == "number") return e; if (W0(e)) return fC; if (Fs(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Fs(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = mU(e); var n = bU.test(e); return n || wU.test(e) ? xU(e.slice(2), n ? 2 : 8) : yU.test(e) ? fC : +e; } function D_(e) { return e; } var kU = "[object AsyncFunction]", CU = "[object Function]", SU = "[object GeneratorFunction]", EU = "[object Proxy]"; function M_(e) { if (!Fs(e)) return !1; var t = Ic(e); return t == CU || t == SU || t == kU || t == EU; } var Om = ai["__core-js_shared__"], vC = function() { var e = /[^.]+$/.exec(Om && Om.keys && Om.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function $U(e) { return !!vC && vC in e; } var _U = Function.prototype, TU = _U.toString; function nu(e) { if (e != null) { try { return TU.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var OU = /[\\^$.*+?()[\]{}|]/g, FU = /^\[object .+?Constructor\]$/, IU = Function.prototype, AU = Object.prototype, PU = IU.toString, LU = AU.hasOwnProperty, RU = RegExp( "^" + PU.call(LU).replace(OU, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function DU(e) { if (!Fs(e) || $U(e)) return !1; var t = M_(e) ? RU : FU; return t.test(nu(e)); } function MU(e, t) { return e == null ? void 0 : e[t]; } function ru(e, t) { var n = MU(e, t); return DU(n) ? n : void 0; } var G1 = ru(ai, "WeakMap"); function NU(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 BU = 800, zU = 16, VU = Date.now; function jU(e) { var t = 0, n = 0; return function() { var r = VU(), o = zU - (r - n); if (n = r, o > 0) { if (++t >= BU) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function HU(e) { return function() { return e; }; } var $v = function() { try { var e = ru(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), UU = $v ? function(e, t) { return $v(e, "toString", { configurable: !0, enumerable: !1, value: HU(t), writable: !0 }); } : D_, qU = jU(UU); function WU(e, t, n, r) { e.length; for (var o = n + 1; o--; ) if (t(e[o], o, e)) return o; return -1; } var GU = 9007199254740991, KU = /^(?:0|[1-9]\d*)$/; function Qb(e, t) { var n = typeof e; return t = t ?? GU, !!t && (n == "number" || n != "symbol" && KU.test(e)) && e > -1 && e % 1 == 0 && e < t; } function YU(e, t, n) { t == "__proto__" && $v ? $v(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function e2(e, t) { return e === t || e !== e && t !== t; } var XU = Object.prototype, ZU = XU.hasOwnProperty; function JU(e, t, n) { var r = e[t]; (!(ZU.call(e, t) && e2(r, n)) || n === void 0 && !(t in e)) && YU(e, t, n); } var gC = Math.max; function QU(e, t, n) { return t = gC(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = gC(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), NU(e, this, s); }; } var eq = 9007199254740991; function t2(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= eq; } function tq(e) { return e != null && t2(e.length) && !M_(e); } var nq = Object.prototype; function rq(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || nq; return e === n; } function oq(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var aq = "[object Arguments]"; function mC(e) { return rc(e) && Ic(e) == aq; } var N_ = Object.prototype, iq = N_.hasOwnProperty, sq = N_.propertyIsEnumerable, n2 = mC(/* @__PURE__ */ function() { return arguments; }()) ? mC : function(e) { return rc(e) && iq.call(e, "callee") && !sq.call(e, "callee"); }; function lq() { return !1; } var B_ = typeof exports == "object" && exports && !exports.nodeType && exports, yC = B_ && typeof module == "object" && module && !module.nodeType && module, uq = yC && yC.exports === B_, bC = uq ? ai.Buffer : void 0, cq = bC ? bC.isBuffer : void 0, K1 = cq || lq, dq = "[object Arguments]", pq = "[object Array]", fq = "[object Boolean]", hq = "[object Date]", vq = "[object Error]", gq = "[object Function]", mq = "[object Map]", yq = "[object Number]", bq = "[object Object]", wq = "[object RegExp]", xq = "[object Set]", kq = "[object String]", Cq = "[object WeakMap]", Sq = "[object ArrayBuffer]", Eq = "[object DataView]", $q = "[object Float32Array]", _q = "[object Float64Array]", Tq = "[object Int8Array]", Oq = "[object Int16Array]", Fq = "[object Int32Array]", Iq = "[object Uint8Array]", Aq = "[object Uint8ClampedArray]", Pq = "[object Uint16Array]", Lq = "[object Uint32Array]", kn = {}; kn[$q] = kn[_q] = kn[Tq] = kn[Oq] = kn[Fq] = kn[Iq] = kn[Aq] = kn[Pq] = kn[Lq] = !0; kn[dq] = kn[pq] = kn[Sq] = kn[fq] = kn[Eq] = kn[hq] = kn[vq] = kn[gq] = kn[mq] = kn[yq] = kn[bq] = kn[wq] = kn[xq] = kn[kq] = kn[Cq] = !1; function Rq(e) { return rc(e) && t2(e.length) && !!kn[Ic(e)]; } function Dq(e) { return function(t) { return e(t); }; } var z_ = typeof exports == "object" && exports && !exports.nodeType && exports, Nd = z_ && typeof module == "object" && module && !module.nodeType && module, Mq = Nd && Nd.exports === z_, Fm = Mq && P_.process, wC = function() { try { var e = Nd && Nd.require && Nd.require("util").types; return e || Fm && Fm.binding && Fm.binding("util"); } catch { } }(), xC = wC && wC.isTypedArray, V_ = xC ? Dq(xC) : Rq, Nq = Object.prototype, Bq = Nq.hasOwnProperty; function zq(e, t) { var n = xa(e), r = !n && n2(e), o = !n && !r && K1(e), a = !n && !r && !o && V_(e), i = n || r || o || a, s = i ? oq(e.length, String) : [], l = s.length; for (var u in e) Bq.call(e, u) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. o && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. Qb(u, l))) && s.push(u); return s; } function Vq(e, t) { return function(n) { return e(t(n)); }; } var jq = Vq(Object.keys, Object), Hq = Object.prototype, Uq = Hq.hasOwnProperty; function qq(e) { if (!rq(e)) return jq(e); var t = []; for (var n in Object(e)) Uq.call(e, n) && n != "constructor" && t.push(n); return t; } function j_(e) { return tq(e) ? zq(e) : qq(e); } var Wq = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Gq = /^\w*$/; function r2(e, t) { if (xa(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || W0(e) ? !0 : Gq.test(e) || !Wq.test(e) || t != null && e in Object(t); } var ip = ru(Object, "create"); function Kq() { this.__data__ = ip ? ip(null) : {}, this.size = 0; } function Yq(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Xq = "__lodash_hash_undefined__", Zq = Object.prototype, Jq = Zq.hasOwnProperty; function Qq(e) { var t = this.__data__; if (ip) { var n = t[e]; return n === Xq ? void 0 : n; } return Jq.call(t, e) ? t[e] : void 0; } var eW = Object.prototype, tW = eW.hasOwnProperty; function nW(e) { var t = this.__data__; return ip ? t[e] !== void 0 : tW.call(t, e); } var rW = "__lodash_hash_undefined__"; function oW(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = ip && t === void 0 ? rW : t, this; } function Ll(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Ll.prototype.clear = Kq; Ll.prototype.delete = Yq; Ll.prototype.get = Qq; Ll.prototype.has = nW; Ll.prototype.set = oW; function aW() { this.__data__ = [], this.size = 0; } function G0(e, t) { for (var n = e.length; n--; ) if (e2(e[n][0], t)) return n; return -1; } var iW = Array.prototype, sW = iW.splice; function lW(e) { var t = this.__data__, n = G0(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : sW.call(t, n, 1), --this.size, !0; } function uW(e) { var t = this.__data__, n = G0(t, e); return n < 0 ? void 0 : t[n][1]; } function cW(e) { return G0(this.__data__, e) > -1; } function dW(e, t) { var n = this.__data__, r = G0(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Vi(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Vi.prototype.clear = aW; Vi.prototype.delete = lW; Vi.prototype.get = uW; Vi.prototype.has = cW; Vi.prototype.set = dW; var sp = ru(ai, "Map"); function pW() { this.size = 0, this.__data__ = { hash: new Ll(), map: new (sp || Vi)(), string: new Ll() }; } function fW(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function K0(e, t) { var n = e.__data__; return fW(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function hW(e) { var t = K0(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function vW(e) { return K0(this, e).get(e); } function gW(e) { return K0(this, e).has(e); } function mW(e, t) { var n = K0(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function ji(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } ji.prototype.clear = pW; ji.prototype.delete = hW; ji.prototype.get = vW; ji.prototype.has = gW; ji.prototype.set = mW; var yW = "Expected a function"; function o2(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(yW); var n = function() { var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache; if (a.has(o)) return a.get(o); var i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (o2.Cache || ji)(), n; } o2.Cache = ji; var bW = 500; function wW(e) { var t = o2(e, function(r) { return n.size === bW && n.clear(), r; }), n = t.cache; return t; } var xW = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, kW = /\\(\\)?/g, CW = wW(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(xW, function(n, r, o, a) { t.push(o ? a.replace(kW, "$1") : r || n); }), t; }); function SW(e) { return e == null ? "" : R_(e); } function Y0(e, t) { return xa(e) ? e : r2(e, t) ? [e] : CW(SW(e)); } var EW = 1 / 0; function Jp(e) { if (typeof e == "string" || W0(e)) return e; var t = e + ""; return t == "0" && 1 / e == -EW ? "-0" : t; } function a2(e, t) { t = Y0(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Jp(t[n++])]; return n && n == r ? e : void 0; } function ki(e, t, n) { var r = e == null ? void 0 : a2(e, t); return r === void 0 ? n : r; } function H_(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var kC = Xa ? Xa.isConcatSpreadable : void 0; function $W(e) { return xa(e) || n2(e) || !!(kC && e && e[kC]); } function _W(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = $W), o || (o = []); ++a < i; ) { var s = e[a]; n(s) ? H_(o, s) : o[o.length] = s; } return o; } function TW(e) { var t = e == null ? 0 : e.length; return t ? _W(e) : []; } function OW(e) { return qU(QU(e, void 0, TW), e + ""); } function gs() { if (!arguments.length) return []; var e = arguments[0]; return xa(e) ? e : [e]; } function FW() { this.__data__ = new Vi(), this.size = 0; } function IW(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function AW(e) { return this.__data__.get(e); } function PW(e) { return this.__data__.has(e); } var LW = 200; function RW(e, t) { var n = this.__data__; if (n instanceof Vi) { var r = n.__data__; if (!sp || r.length < LW - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new ji(r); } return n.set(e, t), this.size = n.size, this; } function Oi(e) { var t = this.__data__ = new Vi(e); this.size = t.size; } Oi.prototype.clear = FW; Oi.prototype.delete = IW; Oi.prototype.get = AW; Oi.prototype.has = PW; Oi.prototype.set = RW; function DW(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (a[o++] = i); } return a; } function MW() { return []; } var NW = Object.prototype, BW = NW.propertyIsEnumerable, CC = Object.getOwnPropertySymbols, zW = CC ? function(e) { return e == null ? [] : (e = Object(e), DW(CC(e), function(t) { return BW.call(e, t); })); } : MW; function VW(e, t, n) { var r = t(e); return xa(e) ? r : H_(r, n(e)); } function SC(e) { return VW(e, j_, zW); } var Y1 = ru(ai, "DataView"), X1 = ru(ai, "Promise"), Z1 = ru(ai, "Set"), EC = "[object Map]", jW = "[object Object]", $C = "[object Promise]", _C = "[object Set]", TC = "[object WeakMap]", OC = "[object DataView]", HW = nu(Y1), UW = nu(sp), qW = nu(X1), WW = nu(Z1), GW = nu(G1), fs = Ic; (Y1 && fs(new Y1(new ArrayBuffer(1))) != OC || sp && fs(new sp()) != EC || X1 && fs(X1.resolve()) != $C || Z1 && fs(new Z1()) != _C || G1 && fs(new G1()) != TC) && (fs = function(e) { var t = Ic(e), n = t == jW ? e.constructor : void 0, r = n ? nu(n) : ""; if (r) switch (r) { case HW: return OC; case UW: return EC; case qW: return $C; case WW: return _C; case GW: return TC; } return t; }); var FC = ai.Uint8Array, KW = "__lodash_hash_undefined__"; function YW(e) { return this.__data__.set(e, KW), this; } function XW(e) { return this.__data__.has(e); } function _v(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new ji(); ++t < n; ) this.add(e[t]); } _v.prototype.add = _v.prototype.push = YW; _v.prototype.has = XW; function ZW(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r; ) if (t(e[n], n, e)) return !0; return !1; } function JW(e, t) { return e.has(t); } var QW = 1, eG = 2; function U_(e, t, n, r, o, a) { var i = n & QW, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & eG ? new _v() : void 0; for (a.set(e, t), a.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, a) : r(p, v, d, e, t, a); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!ZW(t, function(g, b) { if (!JW(h, b) && (p === g || o(p, g, n, r, a))) return h.push(b); })) { f = !1; break; } } else if (!(p === v || o(p, v, n, r, a))) { f = !1; break; } } return a.delete(e), a.delete(t), f; } function tG(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function nG(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var rG = 1, oG = 2, aG = "[object Boolean]", iG = "[object Date]", sG = "[object Error]", lG = "[object Map]", uG = "[object Number]", cG = "[object RegExp]", dG = "[object Set]", pG = "[object String]", fG = "[object Symbol]", hG = "[object ArrayBuffer]", vG = "[object DataView]", IC = Xa ? Xa.prototype : void 0, Im = IC ? IC.valueOf : void 0; function gG(e, t, n, r, o, a, i) { switch (n) { case vG: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case hG: return !(e.byteLength != t.byteLength || !a(new FC(e), new FC(t))); case aG: case iG: case uG: return e2(+e, +t); case sG: return e.name == t.name && e.message == t.message; case cG: case pG: return e == t + ""; case lG: var s = tG; case dG: var l = r & rG; if (s || (s = nG), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= oG, i.set(e, t); var c = U_(s(e), s(t), r, o, a, i); return i.delete(e), c; case fG: if (Im) return Im.call(e) == Im.call(t); } return !1; } var mG = 1, yG = Object.prototype, bG = yG.hasOwnProperty; function wG(e, t, n, r, o, a) { var i = n & mG, s = SC(e), l = s.length, u = SC(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : bG.call(t, f))) return !1; } var h = a.get(e), p = a.get(t); if (h && p) return h == t && p == e; var v = !0; a.set(e, t), a.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], b = t[f]; if (r) var C = i ? r(b, g, f, t, e, a) : r(g, b, f, e, t, a); if (!(C === void 0 ? g === b || o(g, b, n, r, a) : C)) { v = !1; break; } m || (m = f == "constructor"); } if (v && !m) { var x = e.constructor, w = t.constructor; x != w && "constructor" in e && "constructor" in t && !(typeof x == "function" && x instanceof x && typeof w == "function" && w instanceof w) && (v = !1); } return a.delete(e), a.delete(t), v; } var xG = 1, AC = "[object Arguments]", PC = "[object Array]", Yf = "[object Object]", kG = Object.prototype, LC = kG.hasOwnProperty; function CG(e, t, n, r, o, a) { var i = xa(e), s = xa(t), l = i ? PC : fs(e), u = s ? PC : fs(t); l = l == AC ? Yf : l, u = u == AC ? Yf : u; var c = l == Yf, d = u == Yf, f = l == u; if (f && K1(e)) { if (!K1(t)) return !1; i = !0, c = !1; } if (f && !c) return a || (a = new Oi()), i || V_(e) ? U_(e, t, n, r, o, a) : gG(e, t, l, n, r, o, a); if (!(n & xG)) { var h = c && LC.call(e, "__wrapped__"), p = d && LC.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return a || (a = new Oi()), o(v, m, n, r, a); } } return f ? (a || (a = new Oi()), wG(e, t, n, r, o, a)) : !1; } function X0(e, t, n, r, o) { return e === t ? !0 : e == null || t == null || !rc(e) && !rc(t) ? e !== e && t !== t : CG(e, t, n, r, X0, o); } var SG = 1, EG = 2; function $G(e, t, n, r) { var o = n.length, a = o; if (e == null) return !a; for (e = Object(e); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++o < a; ) { i = n[o]; var s = i[0], l = e[s], u = i[1]; if (i[2]) { if (l === void 0 && !(s in e)) return !1; } else { var c = new Oi(), d; if (!(d === void 0 ? X0(u, l, SG | EG, r, c) : d)) return !1; } } return !0; } function q_(e) { return e === e && !Fs(e); } function _G(e) { for (var t = j_(e), n = t.length; n--; ) { var r = t[n], o = e[r]; t[n] = [r, o, q_(o)]; } return t; } function W_(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function TG(e) { var t = _G(e); return t.length == 1 && t[0][2] ? W_(t[0][0], t[0][1]) : function(n) { return n === e || $G(n, e, t); }; } function OG(e, t) { return e != null && t in Object(e); } function FG(e, t, n) { t = Y0(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = Jp(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && t2(o) && Qb(i, o) && (xa(e) || n2(e))); } function G_(e, t) { return e != null && FG(e, t, OG); } var IG = 1, AG = 2; function PG(e, t) { return r2(e) && q_(t) ? W_(Jp(e), t) : function(n) { var r = ki(n, e); return r === void 0 && r === t ? G_(n, e) : X0(t, r, IG | AG); }; } function LG(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function RG(e) { return function(t) { return a2(t, e); }; } function DG(e) { return r2(e) ? LG(Jp(e)) : RG(e); } function MG(e) { return typeof e == "function" ? e : e == null ? D_ : typeof e == "object" ? xa(e) ? PG(e[0], e[1]) : TG(e) : DG(e); } var Am = function() { return ai.Date.now(); }, NG = "Expected a function", BG = Math.max, zG = Math.min; function K_(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(NG); t = hC(t) || 0, Fs(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? BG(hC(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f); function h(k) { var S = r, _ = o; return r = o = void 0, u = k, i = e.apply(_, S), i; } function p(k) { return u = k, s = setTimeout(g, t), c ? h(k) : i; } function v(k) { var S = k - l, _ = k - u, O = t - S; return d ? zG(O, a - _) : O; } function m(k) { var S = k - l, _ = k - u; return l === void 0 || S >= t || S < 0 || d && _ >= a; } function g() { var k = Am(); if (m(k)) return b(k); s = setTimeout(g, v(k)); } function b(k) { return s = void 0, f && r ? h(k) : (r = o = void 0, i); } function C() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function x() { return s === void 0 ? i : b(Am()); } function w() { var k = Am(), S = m(k); if (r = arguments, o = this, l = k, S) { if (s === void 0) return p(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return w.cancel = C, w.flush = x, w; } function VG(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var o = r - 1; return WU(e, MG(t), o); } function Tv(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var o = e[t]; r[o[0]] = o[1]; } return r; } function Ov(e, t) { return X0(e, t); } function Es(e) { return e == null; } function jG(e) { return e === void 0; } function HG(e, t, n, r) { if (!Fs(e)) return e; t = Y0(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = Jp(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = Fs(c) ? c : Qb(t[o + 1]) ? [] : {}); } JU(s, l, u), s = s[l]; } return e; } function UG(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = a2(e, i); n(s, i) && HG(a, Y0(i, e), s); } return a; } function qG(e, t) { return UG(e, t, function(n, r) { return G_(e, r); }); } var Y_ = OW(function(e, t) { return e == null ? {} : qG(e, t); }); const ws = (e) => e === void 0, oc = (e) => typeof e == "boolean", wr = (e) => typeof e == "number", kl = (e) => typeof Element > "u" ? !1 : e instanceof Element, Fv = (e) => Es(e), WG = (e) => Mr(e) ? !Number.isNaN(Number(e)) : !1, GG = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), RC = (e) => Object.keys(e); let X_ = class extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } }; function KG(e, t) { throw new X_(`[${e}] ${t}`); } function qn(e, t) { if (process.env.NODE_ENV !== "production") { const n = Mr(e) ? new X_(`[${e}] ${t}`) : e; console.warn(n); } } const YG = "utils/dom/style", Z_ = (e = "") => e.split(" ").filter((t) => !!t.trim()), J1 = (e, t) => { !e || !t.trim() || e.classList.add(...Z_(t)); }, Cl = (e, t) => { !e || !t.trim() || e.classList.remove(...Z_(t)); }, ld = (e, t) => { var n; if (!Un || !e || !t) return ""; let r = QH(t); r === "float" && (r = "cssFloat"); try { const o = e.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return a ? a[r] : ""; } catch { return e.style[r]; } }; function ac(e, t = "px") { if (!e) return ""; if (wr(e) || WG(e)) return `${e}${t}`; if (Mr(e)) return e; qn(YG, "binding value must be a string or number"); } function XG(e, t) { if (!Un) return; if (!t) { e.scrollTop = 0; return; } const n = []; let r = t.offsetParent; for (; r !== null && e !== r && e.contains(r); ) n.push(r), r = r.offsetParent; const o = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var ZG = /* @__PURE__ */ K({ name: "Aim", __name: "aim", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), B("path", { fill: "currentColor", d: "M512 96a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V128a32 32 0 0 1 32-32m0 576a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V704a32 32 0 0 1 32-32M96 512a32 32 0 0 1 32-32h192a32 32 0 0 1 0 64H128a32 32 0 0 1-32-32m576 0a32 32 0 0 1 32-32h192a32 32 0 1 1 0 64H704a32 32 0 0 1-32-32" }) ])); } }), JG = ZG, QG = /* @__PURE__ */ K({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z" }) ])); } }), Z0 = QG, eK = /* @__PURE__ */ K({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0" }) ])); } }), J_ = eK, tK = /* @__PURE__ */ K({ name: "CaretRight", __name: "caret-right", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M384 192v640l384-320.064z" }) ])); } }), nK = tK, rK = /* @__PURE__ */ K({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), B("path", { fill: "currentColor", d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z" }) ])); } }), oK = rK, aK = /* @__PURE__ */ K({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z" }), B("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }) ])); } }), i2 = aK, iK = /* @__PURE__ */ K({ name: "Close", __name: "close", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z" }) ])); } }), Iv = iK, sK = /* @__PURE__ */ K({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z" }), B("path", { fill: "currentColor", d: "M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64" }) ])); } }), lK = sK, uK = /* @__PURE__ */ K({ name: "Delete", __name: "delete", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32" }) ])); } }), cK = uK, dK = /* @__PURE__ */ K({ name: "Edit", __name: "edit", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z" }), B("path", { fill: "currentColor", d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z" }) ])); } }), pK = dK, fK = /* @__PURE__ */ K({ name: "Finished", __name: "finished", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z" }) ])); } }), hK = fK, vK = /* @__PURE__ */ K({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z" }), B("path", { fill: "currentColor", d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z" }) ])); } }), gK = vK, mK = /* @__PURE__ */ K({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z" }) ])); } }), s2 = mK, yK = /* @__PURE__ */ K({ name: "Lock", __name: "lock", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96" }), B("path", { fill: "currentColor", d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64" }) ])); } }), bK = yK, wK = /* @__PURE__ */ K({ name: "Unlock", __name: "unlock", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96" }), B("path", { fill: "currentColor", d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z" }) ])); } }), xK = wK, kK = /* @__PURE__ */ K({ name: "View", __name: "view", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160" }) ])); } }), CK = kK, SK = /* @__PURE__ */ K({ name: "Warning", __name: "warning", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32" }) ])); } }), EK = SK, $K = /* @__PURE__ */ K({ name: "ZoomIn", __name: "zoom-in", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z" }) ])); } }), _K = $K, TK = /* @__PURE__ */ K({ name: "ZoomOut", __name: "zoom-out", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64" }) ])); } }), OK = TK; const Q_ = "__epPropKey", wt = (e) => e, FK = (e) => br(e) && !!e[Q_], J0 = (e, t) => { if (!br(e) || FK(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, s = { type: a, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), Pl(e, "default") && c.push(o), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", "); m0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [Q_]: !0 }; return Pl(e, "default") && (s.default = o), s; }, rn = (e) => Tv(Object.entries(e).map(([t, n]) => [ t, J0(n, t) ])), Is = wt([ String, Object, Function ]), e8 = { validating: s2, success: oK, error: i2 }, fr = (e, t) => { if (e.install = (n) => { for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e[n] = r; return e; }, IK = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Hi = (e) => (e.install = ap, e), er = { 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" }, vr = "update:modelValue", l2 = "change", t8 = ["", "default", "small", "large"], AK = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Lu = (e) => e, PK = ["class", "style"], LK = /^on[A-Z]/, RK = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = $(() => ((n == null ? void 0 : n.value) || []).concat(PK)), o = rt(); return o ? $(() => { var a; return Tv(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && LK.test(i)))); }) : (qn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), $(() => ({}))); }, jh = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { ce(() => y(i), (s) => { s && qn(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var DK = { name: "en", el: { breadcrumb: { label: "Breadcrumb" }, colorpicker: { confirm: "OK", clear: "Clear", defaultLabel: "color picker", description: "current color is {color}. press enter to select a new color.", alphaLabel: "pick alpha value" }, datepicker: { now: "Now", today: "Today", cancel: "Cancel", clear: "Clear", confirm: "OK", dateTablePrompt: "Use the arrow keys and enter to select the day of the month", monthTablePrompt: "Use the arrow keys and enter to select the month", yearTablePrompt: "Use the arrow keys and enter to select the year", selectedDate: "Selected date", selectDate: "Select date", selectTime: "Select time", startDate: "Start Date", startTime: "Start Time", endDate: "End Date", endTime: "End Time", prevYear: "Previous Year", nextYear: "Next Year", prevMonth: "Previous Month", nextMonth: "Next Month", year: "", month1: "January", month2: "February", month3: "March", month4: "April", month5: "May", month6: "June", month7: "July", month8: "August", month9: "September", month10: "October", month11: "November", month12: "December", week: "week", weeks: { sun: "Sun", mon: "Mon", tue: "Tue", wed: "Wed", thu: "Thu", fri: "Fri", sat: "Sat" }, weeksFull: { sun: "Sunday", mon: "Monday", tue: "Tuesday", wed: "Wednesday", thu: "Thursday", fri: "Friday", sat: "Saturday" }, months: { jan: "Jan", feb: "Feb", mar: "Mar", apr: "Apr", may: "May", jun: "Jun", jul: "Jul", aug: "Aug", sep: "Sep", oct: "Oct", nov: "Nov", dec: "Dec" } }, inputNumber: { decrease: "decrease number", increase: "increase number" }, select: { loading: "Loading", noMatch: "No matching data", noData: "No data", placeholder: "Select" }, mention: { loading: "Loading" }, dropdown: { toggleDropdown: "Toggle Dropdown" }, cascader: { noMatch: "No matching data", loading: "Loading", placeholder: "Select", noData: "No data" }, pagination: { goto: "Go to", pagesize: "/page", total: "Total {total}", pageClassifier: "", page: "Page", prev: "Go to previous page", next: "Go to next page", currentPage: "page {pager}", prevPages: "Previous {pager} pages", nextPages: "Next {pager} pages", deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details" }, dialog: { close: "Close this dialog" }, drawer: { close: "Close this dialog" }, messagebox: { title: "Message", confirm: "OK", cancel: "Cancel", error: "Illegal input", close: "Close this dialog" }, upload: { deleteTip: "press delete to remove", delete: "Delete", preview: "Preview", continue: "Continue" }, slider: { defaultLabel: "slider between {min} and {max}", defaultRangeStartLabel: "pick start value", defaultRangeEndLabel: "pick end value" }, table: { emptyText: "No Data", confirmFilter: "Confirm", resetFilter: "Reset", clearFilter: "All", sumText: "Sum" }, tour: { next: "Next", previous: "Previous", finish: "Finish" }, tree: { emptyText: "No Data" }, transfer: { noMatch: "No matching data", noData: "No data", titles: ["List 1", "List 2"], filterPlaceholder: "Enter keyword", noCheckedFormat: "{total} items", hasCheckedFormat: "{checked}/{total} checked" }, image: { error: "FAILED" }, pageHeader: { title: "Back" }, popconfirm: { confirmButtonText: "Yes", cancelButtonText: "No" }, carousel: { leftArrow: "Carousel arrow left", rightArrow: "Carousel arrow right", indicator: "Carousel switch to index {index}" } } }; const MK = (e) => (t, n) => NK(t, n, y(e)), NK = (e, t, n) => ki(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), BK = (e) => { const t = $(() => y(e).name), n = Gn(e) ? e : z(e); return { lang: t, locale: n, t: MK(e) }; }, n8 = Symbol("localeContextKey"), Qp = (e) => { const t = e || xe(n8, z()); return BK($(() => t.value || DK)); }, Hh = "el", zK = "is-", tl = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, r8 = Symbol("namespaceContextKey"), u2 = (e) => { const t = e || (rt() ? xe(r8, z(Hh)) : z(Hh)); return $(() => y(t) || Hh); }, It = (e, t) => { const n = u2(t); return { namespace: n, b: (r = "") => tl(n.value, e, r, "", ""), e: (r) => r ? tl(n.value, e, "", r, "") : "", m: (r) => r ? tl(n.value, e, "", "", r) : "", be: (r, o) => r && o ? tl(n.value, e, r, o, "") : "", em: (r, o) => r && o ? tl(n.value, e, "", r, o) : "", bm: (r, o) => r && o ? tl(n.value, e, r, "", o) : "", bem: (r, o, a) => r && o && a ? tl(n.value, e, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : !0; return r && a ? `${zK}${r}` : ""; }, cssVar: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${a}`] = r[a]); return o; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${e}-${a}`] = r[a]); return o; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, VK = J0({ type: wt(Boolean), default: null }), jK = J0({ type: wt(Function) }), HK = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: VK, [n]: jK }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = rt(), { emit: f } = d, h = d.props, p = $(() => Kr(h[n])), v = $(() => h[e] === null), m = (k) => { a.value !== !0 && (a.value = !0, i && (i.value = k), Kr(u) && u(k)); }, g = (k) => { a.value !== !1 && (a.value = !1, i && (i.value = k), Kr(c) && c(k)); }, b = (k) => { if (h.disabled === !0 || Kr(l) && !l()) return; const S = p.value && Un; S && f(t, !0), (v.value || !S) && m(k); }, C = (k) => { if (h.disabled === !0 || !Un) return; const S = p.value && Un; S && f(t, !1), (v.value || !S) && g(k); }, x = (k) => { oc(k) && (h.disabled && k ? p.value && f(t, !1) : a.value !== k && (k ? m() : g())); }, w = () => { a.value ? C() : b(); }; return ce(() => h[e], x), s && d.appContext.config.globalProperties.$route !== void 0 && ce(() => ({ ...d.proxy.$route }), () => { s.value && a.value && C(); }), at(() => { x(h[e]); }), { hide: C, show: b, toggle: w, hasUpdateHandler: p }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, o8 = (e) => { const t = rt(); return $(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var so = "top", Go = "bottom", Ko = "right", lo = "left", c2 = "auto", ef = [so, Go, Ko, lo], ic = "start", lp = "end", UK = "clippingParents", a8 = "viewport", ud = "popper", qK = "reference", DC = ef.reduce(function(e, t) { return e.concat([t + "-" + ic, t + "-" + lp]); }, []), Q0 = [].concat(ef, [c2]).reduce(function(e, t) { return e.concat([t, t + "-" + ic, t + "-" + lp]); }, []), WK = "beforeRead", GK = "read", KK = "afterRead", YK = "beforeMain", XK = "main", ZK = "afterMain", JK = "beforeWrite", QK = "write", eY = "afterWrite", tY = [WK, GK, KK, YK, XK, ZK, JK, QK, eY]; function Za(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Sa(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function sc(e) { var t = Sa(e).Element; return e instanceof t || e instanceof Element; } function jo(e) { var t = Sa(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function d2(e) { if (typeof ShadowRoot > "u") return !1; var t = Sa(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function nY(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n]; !jo(a) || !Za(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function rY(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(r) { var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !jo(o) || !Za(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var i8 = { name: "applyStyles", enabled: !0, phase: "write", fn: nY, effect: rY, requires: ["computeStyles"] }; function ja(e) { return e.split("-")[0]; } var Sl = Math.max, Av = Math.min, lc = Math.round; function uc(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (jo(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = lc(n.width) / i || 1), a > 0 && (o = lc(n.height) / a || 1); } return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o }; } function p2(e) { var t = uc(e), n = e.offsetWidth, r = e.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: r }; } function s8(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && d2(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Ai(e) { return Sa(e).getComputedStyle(e); } function oY(e) { return ["table", "td", "th"].indexOf(Za(e)) >= 0; } function Hs(e) { return ((sc(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function eg(e) { return Za(e) === "html" ? e : e.assignedSlot || e.parentNode || (d2(e) ? e.host : null) || Hs(e); } function MC(e) { return !jo(e) || Ai(e).position === "fixed" ? null : e.offsetParent; } function aY(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && jo(e)) { var r = Ai(e); if (r.position === "fixed") return null; } var o = eg(e); for (d2(o) && (o = o.host); jo(o) && ["html", "body"].indexOf(Za(o)) < 0; ) { var a = Ai(o); 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 o; o = o.parentNode; } return null; } function tf(e) { for (var t = Sa(e), n = MC(e); n && oY(n) && Ai(n).position === "static"; ) n = MC(n); return n && (Za(n) === "html" || Za(n) === "body" && Ai(n).position === "static") ? t : n || aY(e) || t; } function f2(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Bd(e, t, n) { return Sl(e, Av(t, n)); } function iY(e, t, n) { var r = Bd(e, t, n); return r > n ? n : r; } function l8() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function u8(e) { return Object.assign({}, l8(), e); } function c8(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var sY = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, u8(typeof e != "number" ? e : c8(e, ef)); }; function lY(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = ja(n.placement), l = f2(s), u = [lo, Ko].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = sY(o.padding, n), f = p2(a), h = l === "y" ? so : lo, p = l === "y" ? Go : Ko, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = tf(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, C = v / 2 - m / 2, x = d[h], w = b - f[c] - d[p], k = b / 2 - f[c] / 2 + C, S = Bd(x, k, w), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - k, t); } } function uY(e) { var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r; o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !s8(t.elements.popper, o) || (t.elements.arrow = o)); } var cY = { name: "arrow", enabled: !0, phase: "main", fn: lY, effect: uY, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function cc(e) { return e.split("-")[1]; } var dY = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function pY(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: lc(t * o) / o || 0, y: lc(n * o) / o || 0 }; } function NC(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), C = lo, x = so, w = window; if (u) { var k = tf(n), S = "clientHeight", _ = "clientWidth"; if (k === Sa(n) && (k = Hs(n), Ai(k).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), k = k, o === so || (o === lo || o === Ko) && a === lp) { x = Go; var O = d && k === w && w.visualViewport ? w.visualViewport.height : k[S]; v -= O - r.height, v *= l ? 1 : -1; } if (o === lo || (o === so || o === Go) && a === lp) { C = Ko; var F = d && k === w && w.visualViewport ? w.visualViewport.width : k[_]; h -= F - r.width, h *= l ? 1 : -1; } } var I = Object.assign({ position: s }, u && dY), P = c === !0 ? pY({ x: h, y: v }) : { x: h, y: v }; if (h = P.x, v = P.y, l) { var M; return Object.assign({}, I, (M = {}, M[x] = b ? "0" : "", M[C] = g ? "0" : "", M.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", M)); } return Object.assign({}, I, (t = {}, t[x] = b ? v + "px" : "", t[C] = g ? h + "px" : "", t.transform = "", t)); } function fY(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: ja(t.placement), variation: cc(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, NC(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, NC(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var d8 = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: fY, data: {} }, Xf = { passive: !0 }; function hY(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Sa(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, Xf); }), s && l.addEventListener("resize", n.update, Xf), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, Xf); }), s && l.removeEventListener("resize", n.update, Xf); }; } var p8 = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: hY, data: {} }, vY = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Uh(e) { return e.replace(/left|right|bottom|top/g, function(t) { return vY[t]; }); } var gY = { start: "end", end: "start" }; function BC(e) { return e.replace(/start|end/g, function(t) { return gY[t]; }); } function h2(e) { var t = Sa(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function v2(e) { return uc(Hs(e)).left + h2(e).scrollLeft; } function mY(e) { var t = Sa(e), n = Hs(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + v2(e), y: s }; } function yY(e) { var t, n = Hs(e), r = h2(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = Sl(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = Sl(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + v2(e), l = -r.scrollTop; return Ai(o || n).direction === "rtl" && (s += Sl(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function g2(e) { var t = Ai(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function f8(e) { return ["html", "body", "#document"].indexOf(Za(e)) >= 0 ? e.ownerDocument.body : jo(e) && g2(e) ? e : f8(eg(e)); } function zd(e, t) { var n; t === void 0 && (t = []); var r = f8(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Sa(r), i = o ? [a].concat(a.visualViewport || [], g2(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(zd(eg(i))); } function Q1(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function bY(e) { var t = uc(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 zC(e, t) { return t === a8 ? Q1(mY(e)) : sc(t) ? bY(t) : Q1(yY(Hs(e))); } function wY(e) { var t = zd(eg(e)), n = ["absolute", "fixed"].indexOf(Ai(e).position) >= 0, r = n && jo(e) ? tf(e) : e; return sc(r) ? t.filter(function(o) { return sc(o) && s8(o, r) && Za(o) !== "body"; }) : []; } function xY(e, t, n) { var r = t === "clippingParents" ? wY(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = zC(e, l); return s.top = Sl(u.top, s.top), s.right = Av(u.right, s.right), s.bottom = Av(u.bottom, s.bottom), s.left = Sl(u.left, s.left), s; }, zC(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function h8(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? ja(r) : null, a = r ? cc(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case so: l = { x: i, y: t.y - n.height }; break; case Go: l = { x: i, y: t.y + t.height }; break; case Ko: l = { x: t.x + t.width, y: s }; break; case lo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? f2(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case ic: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case lp: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function up(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? UK : a, s = n.rootBoundary, l = s === void 0 ? a8 : s, u = n.elementContext, c = u === void 0 ? ud : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = u8(typeof p != "number" ? p : c8(p, ef)), m = c === ud ? qK : ud, g = e.rects.popper, b = e.elements[f ? m : c], C = xY(sc(b) ? b : b.contextElement || Hs(e.elements.popper), i, l), x = uc(e.elements.reference), w = h8({ reference: x, element: g, strategy: "absolute", placement: o }), k = Q1(Object.assign({}, g, w)), S = c === ud ? k : x, _ = { top: C.top - S.top + v.top, bottom: S.bottom - C.bottom + v.bottom, left: C.left - S.left + v.left, right: S.right - C.right + v.right }, O = e.modifiersData.offset; if (c === ud && O) { var F = O[o]; Object.keys(_).forEach(function(I) { var P = [Ko, Go].indexOf(I) >= 0 ? 1 : -1, M = [so, Go].indexOf(I) >= 0 ? "y" : "x"; _[I] += F[M] * P; }); } return _; } function kY(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Q0 : l, c = cc(r), d = c ? s ? DC : DC.filter(function(p) { return cc(p) === c; }) : ef, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = up(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[ja(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function CY(e) { if (ja(e) === c2) return []; var t = Uh(e); return [BC(e), t, BC(t)]; } function SY(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = ja(m), b = g === m, C = l || (b || !p ? [Uh(m)] : CY(m)), x = [m].concat(C).reduce(function(we, be) { return we.concat(ja(be) === c2 ? kY(t, { placement: be, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : be); }, []), w = t.rects.reference, k = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, O = x[0], F = 0; F < x.length; F++) { var I = x[F], P = ja(I), M = cc(I) === ic, N = [so, Go].indexOf(P) >= 0, j = N ? "width" : "height", A = up(t, { placement: I, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), U = N ? M ? Ko : lo : M ? Go : so; w[j] > k[j] && (U = Uh(U)); var q = Uh(U), Y = []; if (a && Y.push(A[P] <= 0), s && Y.push(A[U] <= 0, A[q] <= 0), Y.every(function(we) { return we; })) { O = I, _ = !1; break; } S.set(I, Y); } if (_) for (var ie = p ? 3 : 1, re = function(we) { var be = x.find(function(de) { var ae = S.get(de); if (ae) return ae.slice(0, we).every(function(ee) { return ee; }); }); if (be) return O = be, "break"; }, le = ie; le > 0; le--) { var he = re(le); if (he === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var EY = { name: "flip", enabled: !0, phase: "main", fn: SY, requiresIfExists: ["offset"], data: { _skip: !1 } }; function VC(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 jC(e) { return [so, Ko, Go, lo].some(function(t) { return e[t] >= 0; }); } function $Y(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = up(t, { elementContext: "reference" }), s = up(t, { altBoundary: !0 }), l = VC(i, r), u = VC(s, o, a), c = jC(l), d = jC(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 _Y = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: $Y }; function TY(e, t, n) { var r = ja(e), o = [lo, so].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [lo, Ko].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function OY(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = Q0.reduce(function(c, d) { return c[d] = TY(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var FY = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: OY }; function IY(e) { var t = e.state, n = e.name; t.modifiersData[n] = h8({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var v8 = { name: "popperOffsets", enabled: !0, phase: "read", fn: IY, data: {} }; function AY(e) { return e === "x" ? "y" : "x"; } function PY(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = up(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = ja(t.placement), b = cc(t.placement), C = !b, x = f2(g), w = AY(x), k = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), I = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, P = { x: 0, y: 0 }; if (k) { if (a) { var M, N = x === "y" ? so : lo, j = x === "y" ? Go : Ko, A = x === "y" ? "height" : "width", U = k[x], q = U + m[N], Y = U - m[j], ie = h ? -_[A] / 2 : 0, re = b === ic ? S[A] : _[A], le = b === ic ? -_[A] : -S[A], he = t.elements.arrow, we = h && he ? p2(he) : { width: 0, height: 0 }, be = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : l8(), de = be[N], ae = be[j], ee = Bd(0, S[A], we[A]), se = C ? S[A] / 2 - ie - ee - de - F.mainAxis : re - ee - de - F.mainAxis, pe = C ? -S[A] / 2 + ie + ee + ae + F.mainAxis : le + ee + ae + F.mainAxis, Se = t.elements.arrow && tf(t.elements.arrow), Le = Se ? x === "y" ? Se.clientTop || 0 : Se.clientLeft || 0 : 0, je = (M = I == null ? void 0 : I[x]) != null ? M : 0, _e = U + se - je - Le, ze = U + pe - je, Ie = Bd(h ? Av(q, _e) : q, U, h ? Sl(Y, ze) : Y); k[x] = Ie, P[x] = Ie - U; } if (s) { var He, qe = x === "x" ? so : lo, et = x === "x" ? Go : Ko, Ve = k[w], nt = w === "y" ? "height" : "width", ot = Ve + m[qe], pt = Ve - m[et], T = [so, lo].indexOf(g) !== -1, G = (He = I == null ? void 0 : I[w]) != null ? He : 0, fe = T ? ot : Ve - S[nt] - _[nt] - G + F.altAxis, ge = T ? Ve + S[nt] + _[nt] - G - F.altAxis : pt, ve = h && T ? iY(fe, Ve, ge) : Bd(h ? fe : ot, Ve, h ? ge : pt); k[w] = ve, P[w] = ve - Ve; } t.modifiersData[r] = P; } } var LY = { name: "preventOverflow", enabled: !0, phase: "main", fn: PY, requiresIfExists: ["offset"] }; function RY(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function DY(e) { return e === Sa(e) || !jo(e) ? h2(e) : RY(e); } function MY(e) { var t = e.getBoundingClientRect(), n = lc(t.width) / e.offsetWidth || 1, r = lc(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function NY(e, t, n) { n === void 0 && (n = !1); var r = jo(t), o = jo(t) && MY(t), a = Hs(t), i = uc(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Za(t) !== "body" || g2(a)) && (s = DY(t)), jo(t) ? (l = uc(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = v2(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function BY(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(a) { t.set(a.name, a); }); function o(a) { n.add(a.name); var i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function zY(e) { var t = BY(e); return tY.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function VY(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function jY(e) { var t = e.reduce(function(n, r) { var o = n[r.name]; return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var HC = { placement: "bottom", modifiers: [], strategy: "absolute" }; function UC() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function m2(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? HC : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, HC, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: sc(i) ? zd(i) : i.contextElement ? zd(i.contextElement) : [], popper: zd(s) }; var g = zY(jY([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (UC(m, g)) { u.rects = { reference: NY(m, tf(g), u.options.strategy === "fixed"), popper: p2(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var C = u.orderedModifiers[b], x = C.fn, w = C.options, k = w === void 0 ? {} : w, S = C.name; typeof x == "function" && (u = x({ state: u, options: k, name: S, instance: f }) || u); } } } }, update: VY(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!UC(i, s)) return f; f.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, C = v.effect; if (typeof C == "function") { var x = C({ state: u, name: m, instance: f, options: b }), w = function() { }; c.push(x || w); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } m2(); var HY = [p8, v8, d8, i8]; m2({ defaultModifiers: HY }); var UY = [p8, v8, d8, i8, FY, EY, LY, cY, _Y], qY = m2({ defaultModifiers: UY }); const WY = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = GY(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = $(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = On(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return ce(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), ce([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = qY(l, u, y(o))); }), Tt(() => { s(); }), { state: $(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: $(() => y(i).styles), attributes: $(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: $(() => y(a)) }; }; function GY(e) { const t = Object.keys(e.elements), n = Tv(t.map((o) => [o, e.styles[o] || {}])), r = Tv(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } function qC() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return U0(() => n()), { registerTimeout: t, cancelTimeout: n }; } const ey = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, KY = Symbol("elIdInjection"), g8 = () => rt() ? xe(KY, ey) : ey, tg = (e) => { const t = g8(); !Un && t === ey && qn("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 = u2(); return $(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Ru = []; const WC = (e) => { const t = e; t.key === er.esc && Ru.forEach((n) => n(t)); }, YY = (e) => { at(() => { Ru.length === 0 && document.addEventListener("keydown", WC), Un && Ru.push(e); }), Tt(() => { Ru = Ru.filter((t) => t !== e), Ru.length === 0 && Un && document.removeEventListener("keydown", WC); }); }; let GC; const m8 = () => { const e = u2(), t = g8(), n = $(() => `${e.value}-popper-container-${t.prefix}`), r = $(() => `#${n.value}`); return { id: n, selector: r }; }, XY = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, ZY = () => { const { id: e, selector: t } = m8(); return y0(() => { Un && (process.env.NODE_ENV === "test" || !GC || !document.body.querySelector(t.value)) && (GC = XY(e.value)); }), { id: e, selector: t }; }, JY = rn({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), QY = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = qC(), { registerTimeout: i, cancelTimeout: s } = qC(); return { onOpen: (l) => { a(() => { r(l); const u = y(n); wr(u) && u > 0 && i(() => { o(l); }, u); }, y(e)); }, onClose: (l) => { s(), a(() => { o(l); }, y(t)); } }; }, y8 = Symbol("elForwardRef"), eX = (e) => { tt(y8, { setForwardRef: (t) => { e.value = t; } }); }, tX = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), KC = { current: 0 }, YC = z(0), b8 = 2e3, XC = Symbol("elZIndexContextKey"), w8 = Symbol("zIndexContextKey"), x8 = (e) => { const t = rt() ? xe(XC, KC) : KC, n = e || (rt() ? xe(w8, void 0) : void 0), r = $(() => { const i = y(n); return wr(i) ? i : b8; }), o = $(() => r.value + YC.value), a = () => (t.current++, YC.value = t.current, o.value); return !Un && !xe(XC) && qn("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: r, currentZIndex: o, nextZIndex: a }; }; function nX(e) { let t; function n() { if (e.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e.value; if (o == null || a == null) return; const s = i.slice(0, Math.max(0, o)), l = i.slice(Math.max(0, a)); t = { selectionStart: o, selectionEnd: a, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t; if (a == null || i == null || s == null) return; let l = o.length; if (o.endsWith(i)) l = o.length - i.length; else if (o.startsWith(a)) l = a.length; else { const u = a[s - 1], c = o.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Ac = J0({ type: String, values: t8, required: !1 }), k8 = Symbol("size"), rX = () => { const e = xe(k8, {}); return $(() => y(e.size) || ""); }; function y2(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = rt(), { emit: i } = a, s = On(), l = z(!1), u = (f) => { Kr(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; Kr(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (l.value = !1, i("blur", f), o == null || o()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return ce(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Mo(s, "focus", u, !0), Mo(s, "blur", c, !0), Mo(s, "click", d, !0), process.env.NODE_ENV === "test" && at(() => { const f = kl(e.value) ? e.value : document.querySelector("input,textarea"); f && (Mo(f, "focus", u, !0), Mo(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function C8({ afterComposition: e, emit: t }) { const n = z(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, o = (i) => { var s; t == null || t("compositionupdate", i); const l = (s = i.target) == null ? void 0 : s.value, u = l[l.length - 1] || ""; n.value = !AK(u); }, a = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Ue(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? a(i) : o(i); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } const S8 = Symbol("emptyValuesContextKey"), oX = "use-empty-values", aX = ["", void 0, null], iX = void 0, sX = rn({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Kr(e) ? !e() : !e } }), lX = (e, t) => { const n = rt() ? xe(S8, z({})) : z({}), r = $(() => e.emptyValues || n.value.emptyValues || aX), o = $(() => Kr(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Kr(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : iX), a = (i) => r.value.includes(i); return r.value.includes(o.value) || qn(oX, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: o, isEmptyValue: a }; }, uX = rn({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), Us = (e) => Y_(uX, e), E8 = Symbol(), Pv = z(); function b2(e, t = void 0) { const n = rt() ? xe(E8, Pv) : Pv; return e ? $(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function cX(e, t) { const n = b2(), r = It(e, $(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Hh; })), o = Qp($(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = x8($(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || b8; })), i = $(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return dX($(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const dX = (e, t, n = !1) => { var r; const o = !!rt(), a = o ? b2() : void 0, i = (r = void 0) != null ? r : o ? tt : void 0; if (!i) { qn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = $(() => { const l = y(e); return a != null && a.value ? pX(a.value, l) : l; }); return i(E8, s), i(n8, $(() => s.value.locale)), i(r8, $(() => s.value.namespace)), i(w8, $(() => s.value.zIndex)), i(k8, { size: $(() => s.value.size || "") }), i(S8, $(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Pv.value) && (Pv.value = s.value), s; }, pX = (e, t) => { const n = [.../* @__PURE__ */ new Set([...RC(e), ...RC(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var Ot = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const fX = rn({ size: { type: wt([Number, String]) }, color: { type: String } }), hX = K({ name: "ElIcon", inheritAttrs: !1 }), vX = /* @__PURE__ */ K({ ...hX, props: fX, setup(e) { const t = e, n = It("icon"), r = $(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: ws(o) ? void 0 : ac(o), "--color": a }; }); return (o, a) => (E(), L("i", Lt({ class: y(n).b(), style: y(r) }, o.$attrs), [ oe(o.$slots, "default") ], 16)); } }); var gX = /* @__PURE__ */ Ot(vX, [["__file", "icon.vue"]]); const gr = fr(gX), w2 = Symbol("formContextKey"), cp = Symbol("formItemContextKey"), Rl = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : o8("size"), o = t.global ? n : rX(), a = t.form ? { size: void 0 } : xe(w2, void 0), i = t.formItem ? { size: void 0 } : xe(cp, void 0); return $(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, nf = (e) => { const t = o8("disabled"), n = xe(w2, void 0); return $(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, ou = () => { const e = xe(w2, void 0), t = xe(cp, void 0); return { form: e, formItem: t }; }, rf = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = z(!1)), r || (r = z(!1)); const o = z(); let a; const i = $(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return at(() => { a = ce([$t(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : tg().value); u !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !l && u && t.addInputId(u)), o.value = u); }, { immediate: !0 }); }), vb(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; let oa; const mX = ` height:0 !important; visibility:hidden !important; ${KH() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, yX = [ "letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing" ]; function bX(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), o = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: yX.map((a) => `${a}:${t.getPropertyValue(a)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n }; } function ZC(e, t = 1, n) { var r; oa || (oa = document.createElement("textarea"), document.body.appendChild(oa)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = bX(e); oa.setAttribute("style", `${s};${mX}`), oa.value = e.value || e.placeholder || ""; let l = oa.scrollHeight; const u = {}; i === "border-box" ? l = l + a : i === "content-box" && (l = l - o), oa.value = ""; const c = oa.scrollHeight - o; if (wr(t)) { let d = c * t; i === "border-box" && (d = d + o + a), l = Math.max(d, l), u.minHeight = `${d}px`; } if (wr(n)) { let d = c * n; i === "border-box" && (d = d + o + a), l = Math.min(d, l); } return u.height = `${l}px`, (r = oa.parentNode) == null || r.removeChild(oa), oa = void 0, u; } const wX = rn({ id: { type: String, default: void 0 }, size: Ac, disabled: Boolean, modelValue: { type: wt([ String, Number, Object ]), default: "" }, maxlength: { type: [String, Number] }, minlength: { type: [String, Number] }, type: { type: String, default: "text" }, resize: { type: String, values: ["none", "both", "horizontal", "vertical"] }, autosize: { type: wt([Boolean, Object]), default: !1 }, autocomplete: { type: String, default: "off" }, formatter: { type: Function }, parser: { type: Function }, placeholder: { type: String }, form: { type: String }, readonly: Boolean, clearable: Boolean, showPassword: Boolean, showWordLimit: Boolean, suffixIcon: { type: Is }, prefixIcon: { type: Is }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: wt([Object, Array, String]), default: () => Lu({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...Us(["ariaLabel"]) }), xX = { [vr]: (e) => Mr(e), input: (e) => Mr(e), change: (e) => Mr(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, mouseleave: (e) => e instanceof MouseEvent, mouseenter: (e) => e instanceof MouseEvent, keydown: (e) => e instanceof Event, compositionstart: (e) => e instanceof CompositionEvent, compositionupdate: (e) => e instanceof CompositionEvent, compositionend: (e) => e instanceof CompositionEvent }, kX = K({ name: "ElInput", inheritAttrs: !1 }), CX = /* @__PURE__ */ K({ ...kX, props: wX, emits: xX, setup(e, { expose: t, emit: n }) { const r = e, o = Hp(), a = Xr(), i = $(() => { const T = {}; return r.containerRole === "combobox" && (T["aria-haspopup"] = o["aria-haspopup"], T["aria-owns"] = o["aria-owns"], T["aria-expanded"] = o["aria-expanded"]), T; }), s = $(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", he.value), { [v.b("group")]: a.prepend || a.append, [v.m("prefix")]: a.prefix || r.prefixIcon, [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: Y.value && ie.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), l = $(() => [ v.e("wrapper"), v.is("focus", O.value) ]), u = RK({ excludeKeys: $(() => Object.keys(i.value)) }), { form: c, formItem: d } = ou(), { inputId: f } = rf(r, { formItemContext: d }), h = Rl(), p = nf(), v = It("input"), m = It("textarea"), g = On(), b = On(), C = z(!1), x = z(!1), w = z(), k = On(r.inputStyle), S = $(() => g.value || b.value), { wrapperRef: _, isFocused: O, handleFocus: F, handleBlur: I } = y2(S, { beforeFocus() { return p.value; }, afterBlur() { var T; r.validateEvent && ((T = d == null ? void 0 : d.validate) == null || T.call(d, "blur").catch((G) => qn(G))); } }), P = $(() => { var T; return (T = c == null ? void 0 : c.statusIcon) != null ? T : !1; }), M = $(() => (d == null ? void 0 : d.validateState) || ""), N = $(() => M.value && e8[M.value]), j = $(() => x.value ? CK : gK), A = $(() => [ o.style ]), U = $(() => [ r.inputStyle, k.value, { resize: r.resize } ]), q = $(() => Es(r.modelValue) ? "" : String(r.modelValue)), Y = $(() => r.clearable && !p.value && !r.readonly && !!q.value && (O.value || C.value)), ie = $(() => r.showPassword && !p.value && !r.readonly && !!q.value && (!!q.value || O.value)), re = $(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), le = $(() => q.value.length), he = $(() => !!re.value && le.value > Number(r.maxlength)), we = $(() => !!a.suffix || !!r.suffixIcon || Y.value || r.showPassword || re.value || !!M.value && P.value), [be, de] = nX(g); wi(b, (T) => { if (ee(), !re.value || r.resize !== "both") return; const G = T[0], { width: fe } = G.contentRect; w.value = { right: `calc(100% - ${fe + 15 + 6}px)` }; }); const ae = () => { const { type: T, autosize: G } = r; if (!(!Un || T !== "textarea" || !b.value)) if (G) { const fe = br(G) ? G.minRows : void 0, ge = br(G) ? G.maxRows : void 0, ve = ZC(b.value, fe, ge); k.value = { overflowY: "hidden", ...ve }, Ue(() => { b.value.offsetHeight, k.value = ve; }); } else k.value = { minHeight: ZC(b.value).minHeight }; }, ee = /* @__PURE__ */ ((T) => { let G = !1; return () => { var fe; G || !r.autosize || ((fe = b.value) == null ? void 0 : fe.offsetParent) === null || (T(), G = !0); }; })(ae), se = () => { const T = S.value, G = r.formatter ? r.formatter(q.value) : q.value; !T || T.value === G || (T.value = G); }, pe = async (T) => { be(); let { value: G } = T.target; if (r.formatter && (G = r.parser ? r.parser(G) : G), !Le.value) { if (G === q.value) { se(); return; } n(vr, G), n("input", G), await Ue(), se(), de(); } }, Se = (T) => { n("change", T.target.value); }, { isComposing: Le, handleCompositionStart: je, handleCompositionUpdate: _e, handleCompositionEnd: ze } = C8({ emit: n, afterComposition: pe }), Ie = () => { x.value = !x.value, He(); }, He = async () => { var T; await Ue(), (T = S.value) == null || T.focus(); }, qe = () => { var T; return (T = S.value) == null ? void 0 : T.blur(); }, et = (T) => { C.value = !1, n("mouseleave", T); }, Ve = (T) => { C.value = !0, n("mouseenter", T); }, nt = (T) => { n("keydown", T); }, ot = () => { var T; (T = S.value) == null || T.select(); }, pt = () => { n(vr, ""), n("change", ""), n("clear"), n("input", ""); }; return ce(() => r.modelValue, () => { var T; Ue(() => ae()), r.validateEvent && ((T = d == null ? void 0 : d.validate) == null || T.call(d, "change").catch((G) => qn(G))); }), ce(q, () => se()), ce(() => r.type, async () => { await Ue(), se(), ae(); }), at(() => { !r.formatter && r.parser && qn("ElInput", "If you set the parser, you also need to set the formatter."), se(), Ue(ae); }), t({ input: g, textarea: b, ref: S, textareaStyle: U, autosize: $t(r, "autosize"), isComposing: Le, focus: He, blur: qe, select: ot, clear: pt, resizeTextarea: ae }), (T, G) => (E(), L("div", Lt(y(i), { class: [ y(s), { [y(v).bm("group", "append")]: T.$slots.append, [y(v).bm("group", "prepend")]: T.$slots.prepend } ], style: y(A), role: T.containerRole, onMouseenter: Ve, onMouseleave: et }), [ Z(" input "), T.type !== "textarea" ? (E(), L(De, { key: 0 }, [ Z(" prepend slot "), T.$slots.prepend ? (E(), L("div", { key: 0, class: V(y(v).be("group", "prepend")) }, [ oe(T.$slots, "prepend") ], 2)) : Z("v-if", !0), B("div", { ref_key: "wrapperRef", ref: _, class: V(y(l)) }, [ Z(" prefix slot "), T.$slots.prefix || T.prefixIcon ? (E(), L("span", { key: 0, class: V(y(v).e("prefix")) }, [ B("span", { class: V(y(v).e("prefix-inner")) }, [ oe(T.$slots, "prefix"), T.prefixIcon ? (E(), Q(y(gr), { key: 0, class: V(y(v).e("icon")) }, { default: R(() => [ (E(), Q(vt(T.prefixIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 2)) : Z("v-if", !0), B("input", Lt({ id: y(f), ref_key: "input", ref: g, class: y(v).e("inner") }, y(u), { minlength: T.minlength, maxlength: T.maxlength, type: T.showPassword ? x.value ? "text" : "password" : T.type, disabled: y(p), readonly: T.readonly, autocomplete: T.autocomplete, tabindex: T.tabindex, "aria-label": T.ariaLabel, placeholder: T.placeholder, style: T.inputStyle, form: T.form, autofocus: T.autofocus, onCompositionstart: y(je), onCompositionupdate: y(_e), onCompositionend: y(ze), onInput: pe, onChange: Se, onKeydown: nt }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), Z(" suffix slot "), y(we) ? (E(), L("span", { key: 1, class: V(y(v).e("suffix")) }, [ B("span", { class: V(y(v).e("suffix-inner")) }, [ !y(Y) || !y(ie) || !y(re) ? (E(), L(De, { key: 0 }, [ oe(T.$slots, "suffix"), T.suffixIcon ? (E(), Q(y(gr), { key: 0, class: V(y(v).e("icon")) }, { default: R(() => [ (E(), Q(vt(T.suffixIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 64)) : Z("v-if", !0), y(Y) ? (E(), Q(y(gr), { key: 1, class: V([y(v).e("icon"), y(v).e("clear")]), onMousedown: Je(y(ap), ["prevent"]), onClick: pt }, { default: R(() => [ W(y(i2)) ]), _: 1 }, 8, ["class", "onMousedown"])) : Z("v-if", !0), y(ie) ? (E(), Q(y(gr), { key: 2, class: V([y(v).e("icon"), y(v).e("password")]), onClick: Ie }, { default: R(() => [ (E(), Q(vt(y(j)))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), y(re) ? (E(), L("span", { key: 3, class: V(y(v).e("count")) }, [ B("span", { class: V(y(v).e("count-inner")) }, me(y(le)) + " / " + me(T.maxlength), 3) ], 2)) : Z("v-if", !0), y(M) && y(N) && y(P) ? (E(), Q(y(gr), { key: 4, class: V([ y(v).e("icon"), y(v).e("validateIcon"), y(v).is("loading", y(M) === "validating") ]) }, { default: R(() => [ (E(), Q(vt(y(N)))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 2)) : Z("v-if", !0) ], 2), Z(" append slot "), T.$slots.append ? (E(), L("div", { key: 1, class: V(y(v).be("group", "append")) }, [ oe(T.$slots, "append") ], 2)) : Z("v-if", !0) ], 64)) : (E(), L(De, { key: 1 }, [ Z(" textarea "), B("textarea", Lt({ id: y(f), ref_key: "textarea", ref: b, class: [y(m).e("inner"), y(v).is("focus", y(O))] }, y(u), { minlength: T.minlength, maxlength: T.maxlength, tabindex: T.tabindex, disabled: y(p), readonly: T.readonly, autocomplete: T.autocomplete, style: y(U), "aria-label": T.ariaLabel, placeholder: T.placeholder, form: T.form, autofocus: T.autofocus, rows: T.rows, onCompositionstart: y(je), onCompositionupdate: y(_e), onCompositionend: y(ze), onInput: pe, onFocus: y(F), onBlur: y(I), onChange: Se, onKeydown: nt }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), y(re) ? (E(), L("span", { key: 0, style: Ze(w.value), class: V(y(v).e("count")) }, me(y(le)) + " / " + me(T.maxlength), 7)) : Z("v-if", !0) ], 64)) ], 16, ["role"])); } }); var SX = /* @__PURE__ */ Ot(CX, [["__file", "input.vue"]]); const of = fr(SX), xu = 4, EX = { 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" } }, $X = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), x2 = Symbol("scrollbarContextKey"), _X = rn({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), TX = "Thumb", OX = /* @__PURE__ */ K({ __name: "thumb", props: _X, setup(e) { const t = e, n = xe(x2), r = It("scrollbar"); n || KG(TX, "can not inject scrollbar context"); const o = z(), a = z(), i = z({}), s = z(!1); let l = !1, u = !1, c = Un ? document.onselectstart : null; const d = $(() => EX[t.vertical ? "vertical" : "horizontal"]), f = $(() => $X({ size: t.size, move: t.move, bar: d.value })), h = $(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), p = (k) => { var S; if (k.stopPropagation(), k.ctrlKey || [1, 2].includes(k.button)) return; (S = window.getSelection()) == null || S.removeAllRanges(), m(k); const _ = k.currentTarget; _ && (i.value[d.value.axis] = _[d.value.offset] - (k[d.value.client] - _.getBoundingClientRect()[d.value.direction])); }, v = (k) => { if (!a.value || !o.value || !n.wrapElement) return; const S = Math.abs(k.target.getBoundingClientRect()[d.value.direction] - k[d.value.client]), _ = a.value[d.value.offset] / 2, O = (S - _) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (k) => { k.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1; }, g = (k) => { if (!o.value || !a.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (o.value.getBoundingClientRect()[d.value.direction] - k[d.value.client]) * -1, O = a.value[d.value.offset] - S, F = (_ - O) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), w(), u && (s.value = !1); }, C = () => { u = !1, s.value = !!t.size; }, x = () => { u = !0, s.value = l; }; Tt(() => { w(), document.removeEventListener("mouseup", b); }); const w = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Mo($t(n, "scrollbarElement"), "mousemove", C), Mo($t(n, "scrollbarElement"), "mouseleave", x), (k, S) => (E(), Q(pr, { name: y(r).b("fade"), persisted: "" }, { default: R(() => [ Ne(B("div", { ref_key: "instance", ref: o, class: V([y(r).e("bar"), y(r).is(y(d).key)]), onMousedown: v }, [ B("div", { ref_key: "thumb", ref: a, class: V(y(r).e("thumb")), style: Ze(y(f)), onMousedown: p }, null, 38) ], 34), [ [ft, k.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var JC = /* @__PURE__ */ Ot(OX, [["__file", "thumb.vue"]]); const FX = rn({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), IX = /* @__PURE__ */ K({ __name: "bar", props: FX, setup(e, { expose: t }) { const n = e, r = xe(x2), o = z(0), a = z(0), i = z(""), s = z(""), l = z(1), u = z(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - xu, f = c.offsetWidth - xu; a.value = c.scrollTop * 100 / d * l.value, o.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - xu, f = c.offsetWidth - xu, h = d ** 2 / c.scrollHeight, p = f ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(p, n.minSize); l.value = h / (d - h) / (v / (d - v)), u.value = p / (f - p) / (m / (f - m)), s.value = v + xu < d ? `${v}px` : "", i.value = m + xu < f ? `${m}px` : ""; } }), (c, d) => (E(), L(De, null, [ W(JC, { move: o.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), W(JC, { move: a.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var AX = /* @__PURE__ */ Ot(IX, [["__file", "bar.vue"]]); const PX = rn({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: wt([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, ...Us(["ariaLabel", "ariaOrientation"]) }), LX = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(wr) }, ty = "ElScrollbar", RX = K({ name: ty }), DX = /* @__PURE__ */ K({ ...RX, props: PX, emits: LX, setup(e, { expose: t, emit: n }) { const r = e, o = It("scrollbar"); let a, i, s = 0, l = 0; const u = z(), c = z(), d = z(), f = z(), h = $(() => { const w = {}; return r.height && (w.height = ac(r.height)), r.maxHeight && (w.maxHeight = ac(r.maxHeight)), [r.wrapStyle, w]; }), p = $(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = $(() => [o.e("view"), r.viewClass]), m = () => { var w; c.value && ((w = f.value) == null || w.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(w, k) { br(w) ? c.value.scrollTo(w) : wr(w) && wr(k) && c.value.scrollTo(w, k); } const b = (w) => { if (!wr(w)) { qn(ty, "value must be a number"); return; } c.value.scrollTop = w; }, C = (w) => { if (!wr(w)) { qn(ty, "value must be a number"); return; } c.value.scrollLeft = w; }, x = () => { var w; (w = f.value) == null || w.update(); }; return ce(() => r.noresize, (w) => { w ? (a == null || a(), i == null || i()) : ({ stop: a } = wi(d, x), i = Mo("resize", x)); }, { immediate: !0 }), ce(() => [r.maxHeight, r.height], () => { r.native || Ue(() => { var w; x(), c.value && ((w = f.value) == null || w.handleScroll(c.value)); }); }), tt(x2, Kt({ scrollbarElement: u, wrapElement: c })), gb(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), at(() => { r.native || Ue(() => { x(); }); }), Up(() => x()), t({ wrapRef: c, update: x, scrollTo: g, setScrollTop: b, setScrollLeft: C, handleScroll: m }), (w, k) => (E(), L("div", { ref_key: "scrollbarRef", ref: u, class: V(y(o).b()) }, [ B("div", { ref_key: "wrapRef", ref: c, class: V(y(p)), style: Ze(y(h)), tabindex: w.tabindex, onScroll: m }, [ (E(), Q(vt(w.tag), { id: w.id, ref_key: "resizeRef", ref: d, class: V(y(v)), style: Ze(w.viewStyle), role: w.role, "aria-label": w.ariaLabel, "aria-orientation": w.ariaOrientation }, { default: R(() => [ oe(w.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), w.native ? Z("v-if", !0) : (E(), Q(AX, { key: 0, ref_key: "barRef", ref: f, always: w.always, "min-size": w.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var MX = /* @__PURE__ */ Ot(DX, [["__file", "scrollbar.vue"]]); const NX = fr(MX), k2 = Symbol("popper"), $8 = Symbol("popperContent"), BX = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], _8 = rn({ role: { type: String, values: BX, default: "tooltip" } }), zX = K({ name: "ElPopper", inheritAttrs: !1 }), VX = /* @__PURE__ */ K({ ...zX, props: _8, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = $(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), tt(k2, l), (u, c) => oe(u.$slots, "default"); } }); var jX = /* @__PURE__ */ Ot(VX, [["__file", "popper.vue"]]); const T8 = rn({ arrowOffset: { type: Number, default: 5 } }), HX = K({ name: "ElPopperArrow", inheritAttrs: !1 }), UX = /* @__PURE__ */ K({ ...HX, props: T8, setup(e, { expose: t }) { const n = e, r = It("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = xe($8, void 0); return ce(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (E(), L("span", { ref_key: "arrowRef", ref: a, class: V(y(r).e("arrow")), style: Ze(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var qX = /* @__PURE__ */ Ot(UX, [["__file", "arrow.vue"]]); const Pm = "ElOnlyChild", WX = K({ name: Pm, setup(e, { slots: t, attrs: n }) { var r; const o = xe(y8), a = tX((r = o == null ? void 0 : o.setForwardRef) != null ? r : ap); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return qn(Pm, "requires exact only one valid child."), null; const l = O8(s); return l ? Ne(b0(l, n), [[a]]) : (qn(Pm, "no valid child node found"), null); }; } }); function O8(e) { if (!e) return null; const t = e; for (const n of t) { if (br(n)) switch (n.type) { case w0: continue; case Vs: case "svg": return QC(n); case De: return O8(n.children); default: return n; } return QC(n); } return null; } function QC(e) { const t = It("only-child"); return W("span", { class: t.e("content") }, [e]); } const F8 = rn({ virtualRef: { type: wt(Object) }, virtualTriggering: Boolean, onMouseenter: { type: wt(Function) }, onMouseleave: { type: wt(Function) }, onClick: { type: wt(Function) }, onKeydown: { type: wt(Function) }, onFocus: { type: wt(Function) }, onBlur: { type: wt(Function) }, onContextmenu: { type: wt(Function) }, id: String, open: Boolean }), GX = K({ name: "ElPopperTrigger", inheritAttrs: !1 }), KX = /* @__PURE__ */ K({ ...GX, props: F8, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = xe(k2, void 0); eX(o); const a = $(() => s.value ? n.id : void 0), i = $(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = $(() => { if (r && r.value !== "tooltip") return r.value; }), l = $(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return at(() => { ce(() => n.virtualRef, (d) => { d && (o.value = $i(d)); }, { immediate: !0 }), ce(o, (d, f) => { u == null || u(), u = void 0, kl(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = ce([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { Es(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), kl(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && kl(o.value)) { const d = o.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, f) => d.virtualTriggering ? Z("v-if", !0) : (E(), Q(y(WX), Lt({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: R(() => [ oe(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var YX = /* @__PURE__ */ Ot(KX, [["__file", "trigger.vue"]]); const Lm = "focus-trap.focus-after-trapped", Rm = "focus-trap.focus-after-released", XX = "focus-trap.focusout-prevented", e5 = { cancelable: !0, bubbles: !1 }, ZX = { cancelable: !0, bubbles: !1 }, t5 = "focusAfterTrapped", n5 = "focusAfterReleased", JX = Symbol("elFocusTrap"), C2 = z(), ng = z(0), S2 = z(0); let Zf = 0; const I8 = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const o = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, r5 = (e, t) => { for (const n of e) if (!QX(n, t)) return n; }, QX = (e, t) => { if (process.env.NODE_ENV === "test") return !1; if (getComputedStyle(e).visibility === "hidden") return !0; for (; e; ) { if (t && e === t) return !1; if (getComputedStyle(e).display === "none") return !0; e = e.parentElement; } return !1; }, eZ = (e) => { const t = I8(e), n = r5(t, e), r = r5(t.reverse(), e); return [n, r]; }, tZ = (e) => e instanceof HTMLInputElement && "select" in e, is = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), S2.value = window.performance.now(), e !== n && tZ(e) && t && e.select(); } }; function o5(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const nZ = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = o5(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = o5(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, rZ = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (is(r, t), document.activeElement !== n) return; }, a5 = nZ(), oZ = () => ng.value > S2.value, Jf = () => { C2.value = "pointer", ng.value = window.performance.now(); }, i5 = () => { C2.value = "keyboard", ng.value = window.performance.now(); }, aZ = () => (at(() => { Zf === 0 && (document.addEventListener("mousedown", Jf), document.addEventListener("touchstart", Jf), document.addEventListener("keydown", i5)), Zf++; }), Tt(() => { Zf--, Zf <= 0 && (document.removeEventListener("mousedown", Jf), document.removeEventListener("touchstart", Jf), document.removeEventListener("keydown", i5)); }), { focusReason: C2, lastUserFocusTimestamp: ng, lastAutomatedFocusTimestamp: S2 }), Qf = (e) => new CustomEvent(XX, { ...ZX, detail: e }), iZ = K({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ t5, n5, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = aZ(); YY((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: C, shiftKey: x } = p, { loop: w } = e, k = v === er.tab && !m && !g && !b, S = document.activeElement; if (k && S) { const _ = C, [O, F] = eZ(_); if (O && F) { if (!x && S === F) { const I = Qf({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), w && is(O, !0)); } else if (x && [O, _].includes(S)) { const I = Qf({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), w && is(F, !0)); } } else if (S === _) { const I = Qf({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || p.preventDefault(); } } }; tt(JX, { focusTrapRef: n, onKeydown: s }), ce(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), ce([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(t5, p); }, u = (p) => t(n5, p), c = (p) => { const v = y(n); if (!v) return; const m = p.target, g = p.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e.trapped && (b ? o = m : is(o, !0)); }, d = (p) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !Es(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Qf({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || is(o, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = y(n); if (p) { a5.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(Lm, e5); p.addEventListener(Lm, l), p.dispatchEvent(m), m.defaultPrevented || Ue(() => { let g = e.focusStartEl; Mr(g) || (is(g), document.activeElement !== g && (g = "first")), g === "first" && rZ(I8(p), !0), (document.activeElement === v || g === "container") && is(p); }); } } } function h() { const p = y(n); if (p) { p.removeEventListener(Lm, l); const v = new CustomEvent(Rm, { ...e5, detail: { focusReason: a.value } }); p.addEventListener(Rm, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !oZ() || p.contains(document.activeElement)) && is(r ?? document.body), p.removeEventListener(Rm, u), a5.remove(i); } } return at(() => { e.trapped && f(), ce(() => e.trapped, (p) => { p ? f() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function sZ(e, t, n, r, o, a) { return oe(e.$slots, "default", { handleKeydown: e.onKeydown }); } var lZ = /* @__PURE__ */ Ot(iZ, [["render", sZ], ["__file", "focus-trap.vue"]]); const uZ = ["fixed", "absolute"], cZ = rn({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: wt(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: Q0, default: "bottom" }, popperOptions: { type: wt(Object), default: () => ({}) }, strategy: { type: String, values: uZ, default: "absolute" } }), A8 = rn({ ...cZ, id: String, style: { type: wt([String, Array, Object]) }, className: { type: wt([String, Array, Object]) }, effect: { type: wt(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: wt([String, Array, Object]) }, popperStyle: { type: wt([String, Array, Object]) }, referenceEl: { type: wt(Object) }, triggerTargetEl: { type: wt(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...Us(["ariaLabel"]) }), dZ = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, pZ = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...hZ(e), ...t] }; return vZ(a, o == null ? void 0 : o.modifiers), a; }, fZ = (e) => { if (Un) return $i(e); }; function hZ(e) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = 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: r } }, { name: "computeStyles", options: { gpuAcceleration: n } } ]; } function vZ(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const gZ = 0, mZ = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = xe(k2, void 0), a = z(), i = z(), s = $(() => ({ name: "eventListeners", enabled: !!e.visible })), l = $(() => { var g; const b = y(a), C = (g = y(i)) != null ? g : gZ; return { name: "arrow", enabled: !jG(b), options: { element: b, padding: C } }; }), u = $(() => ({ onFirstUpdate: () => { p(); }, ...pZ(e, [ y(l), y(s) ]) })), c = $(() => fZ(e.referenceEl) || y(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = WY(c, n, u); return ce(m, (g) => t.value = g), at(() => { ce(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: f, styles: h, role: o, forceUpdate: v, update: p }; }, yZ = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = x8(), a = It("popper"), i = $(() => y(t).popper), s = z(wr(e.zIndex) ? e.zIndex : o()), l = $(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = $(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = $(() => r.value === "dialog" ? "false" : void 0), d = $(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = wr(e.zIndex) ? e.zIndex : o(); } }; }, bZ = (e, t) => { const n = z(!1), r = z(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (o) => { var a; ((a = o.detail) == null ? void 0 : a.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (o) => { e.visible && !n.value && (o.target && (r.value = o.target), n.value = !0); }, onFocusoutPrevented: (o) => { e.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, wZ = K({ name: "ElPopperContent" }), xZ = /* @__PURE__ */ K({ ...wZ, props: A8, emits: dZ, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = bZ(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = mZ(r), { ariaModal: b, arrowStyle: C, contentAttrs: x, contentClass: w, contentStyle: k, updateZIndex: S } = yZ(r, { styles: p, attributes: d, role: m }), _ = xe(cp, void 0), O = z(); tt($8, { arrowStyle: C, arrowRef: f, arrowOffset: O }), _ && tt(cp, { ..._, addInputId: ap, removeInputId: ap }); let F; const I = (M = !0) => { g(), M && S(); }, P = () => { I(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return at(() => { ce(() => r.triggerTargetEl, (M, N) => { F == null || F(), F = void 0; const j = y(M || h.value), A = y(N || h.value); kl(j) && (F = ce([m, () => r.ariaLabel, b, () => r.id], (U) => { ["role", "aria-label", "aria-modal", "id"].forEach((q, Y) => { Es(U[Y]) ? j.removeAttribute(q) : j.setAttribute(q, U[Y]); }); }, { immediate: !0 })), A !== j && kl(A) && ["role", "aria-label", "aria-modal", "id"].forEach((U) => { A.removeAttribute(U); }); }, { immediate: !0 }), ce(() => r.visible, P, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: I, contentStyle: k }), (M, N) => (E(), L("div", Lt({ ref_key: "contentRef", ref: h }, y(x), { style: y(k), class: y(w), tabindex: "-1", onMouseenter: (j) => M.$emit("mouseenter", j), onMouseleave: (j) => M.$emit("mouseleave", j) }), [ W(y(lZ), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: R(() => [ oe(M.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var kZ = /* @__PURE__ */ Ot(xZ, [["__file", "content.vue"]]); const CZ = fr(jX), E2 = Symbol("elTooltip"), to = rn({ ...JY, ...A8, appendTo: { type: wt([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: wt(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...Us(["ariaLabel"]) }), dp = rn({ ...F8, disabled: Boolean, trigger: { type: wt([String, Array]), default: "hover" }, triggerKeys: { type: wt(Array), default: () => [er.enter, er.space] } }), { useModelToggleProps: SZ, useModelToggleEmits: EZ, useModelToggle: $Z } = HK("visible"), _Z = rn({ ..._8, ...SZ, ...to, ...dp, ...T8, showArrow: { type: Boolean, default: !0 } }), TZ = [ ...EZ, "before-show", "before-hide", "show", "hide", "open", "close" ], OZ = (e, t) => oo(e) ? e.includes(t) : e === t, ku = (e, t, n) => (r) => { OZ(y(e), t) && n(r); }, FZ = K({ name: "ElTooltipTrigger" }), IZ = /* @__PURE__ */ K({ ...FZ, props: dp, setup(e, { expose: t }) { const n = e, r = It("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = xe(E2, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, f = $t(n, "trigger"), h = mi(d, ku(f, "hover", s)), p = mi(d, ku(f, "hover", l)), v = mi(d, ku(f, "click", (x) => { x.button === 0 && u(x); })), m = mi(d, ku(f, "focus", s)), g = mi(d, ku(f, "focus", l)), b = mi(d, ku(f, "contextmenu", (x) => { x.preventDefault(), u(x); })), C = mi(d, (x) => { const { code: w } = x; n.triggerKeys.includes(w) && (x.preventDefault(), u(x)); }); return t({ triggerRef: c }), (x, w) => (E(), Q(y(YX), { id: y(a), "virtual-ref": x.virtualRef, open: y(i), "virtual-triggering": x.virtualTriggering, class: V(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(p), onKeydown: y(C) }, { default: R(() => [ oe(x.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var AZ = /* @__PURE__ */ Ot(IZ, [["__file", "trigger.vue"]]); const PZ = rn({ to: { type: wt([String, Object]), required: !0 }, disabled: Boolean }), LZ = /* @__PURE__ */ K({ __name: "teleport", props: PZ, setup(e) { return (t, n) => t.disabled ? oe(t.$slots, "default", { key: 0 }) : (E(), Q(x0, { key: 1, to: t.to }, [ oe(t.$slots, "default") ], 8, ["to"])); } }); var RZ = /* @__PURE__ */ Ot(LZ, [["__file", "teleport.vue"]]); const DZ = fr(RZ), MZ = K({ name: "ElTooltipContent", inheritAttrs: !1 }), NZ = /* @__PURE__ */ K({ ...MZ, props: to, setup(e, { expose: t }) { const n = e, { selector: r } = m8(), o = It("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = xe(E2, void 0), g = $(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = $(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const C = $(() => y(b) ? !0 : y(u)), x = $(() => n.disabled ? !1 : y(u)), w = $(() => n.appendTo || r.value), k = $(() => { var A; return (A = n.style) != null ? A : {}; }), S = z(!0), _ = () => { p(), S.value = !0; }, O = () => { if (y(s)) return !0; }, F = mi(O, () => { n.enterable && y(c) === "hover" && f(); }), I = mi(O, () => { y(c) === "hover" && d(); }), P = () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A), v == null || v(); }, M = () => { m == null || m(); }, N = () => { h(), i = RH($(() => { var A; return (A = a.value) == null ? void 0 : A.popperContentRef; }), () => { y(s) || y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return ce(() => y(u), (A) => { A ? S.value = !1 : i == null || i(); }, { flush: "post" }), ce(() => n.content, () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A); }), t({ contentRef: a }), (A, U) => (E(), Q(y(DZ), { disabled: !A.teleported, to: y(w) }, { default: R(() => [ W(pr, { name: y(g), onAfterLeave: _, onBeforeEnter: P, onAfterEnter: N, onBeforeLeave: M }, { default: R(() => [ y(C) ? Ne((E(), Q(y(kZ), Lt({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, A.$attrs, { "aria-label": A.ariaLabel, "aria-hidden": S.value, "boundaries-padding": A.boundariesPadding, "fallback-placements": A.fallbackPlacements, "gpu-acceleration": A.gpuAcceleration, offset: A.offset, placement: A.placement, "popper-options": A.popperOptions, strategy: A.strategy, effect: A.effect, enterable: A.enterable, pure: A.pure, "popper-class": A.popperClass, "popper-style": [A.popperStyle, y(k)], "reference-el": A.referenceEl, "trigger-target-el": A.triggerTargetEl, visible: y(x), "z-index": A.zIndex, onMouseenter: y(F), onMouseleave: y(I), onBlur: j, onClose: y(d) }), { default: R(() => [ oe(A.$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"])), [ [ft, y(x)] ]) : Z("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var BZ = /* @__PURE__ */ Ot(NZ, [["__file", "content.vue"]]); const zZ = K({ name: "ElTooltip" }), VZ = /* @__PURE__ */ K({ ...zZ, props: _Z, emits: TZ, setup(e, { expose: t, emit: n }) { const r = e; ZY(); const o = tg(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: f } = $Z({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = QY({ showAfter: $t(r, "showAfter"), hideAfter: $t(r, "hideAfter"), autoClose: $t(r, "autoClose"), open: c, close: d }), v = $(() => oc(r.visible) && !f.value); tt(E2, { controlled: v, id: o, open: Tc(l), trigger: $t(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { y(l) ? p(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), ce(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, C; const x = (C = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : C.popperContentRef, w = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return x && x.contains(w); }; return k0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, b) => (E(), Q(y(CZ), { ref_key: "popperRef", ref: a, role: g.role }, { default: R(() => [ W(AZ, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: R(() => [ g.$slots.default ? oe(g.$slots, "default", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), W(BZ, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: R(() => [ oe(g.$slots, "content", {}, () => [ g.rawContent ? (E(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (E(), L("span", { key: 1 }, me(g.content), 1)) ]), g.showArrow ? (E(), Q(y(qX), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : Z("v-if", !0) ]), _: 3 }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"]) ]), _: 3 }, 8, ["role"])); } }); var jZ = /* @__PURE__ */ Ot(VZ, [["__file", "tooltip.vue"]]); const af = fr(jZ), P8 = Symbol("buttonGroupContextKey"), HZ = (e, t) => { jh({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, $(() => e.type === "text")); const n = xe(P8, void 0), r = b2("button"), { form: o } = ou(), a = Rl($(() => n == null ? void 0 : n.size)), i = nf(), s = z(), l = Xr(), u = $(() => e.type || (n == null ? void 0 : n.type) || ""), c = $(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = $(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = $(() => { var h; const p = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Vs) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h); } }; }, UZ = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], qZ = ["button", "submit", "reset"], ny = rn({ size: Ac, disabled: Boolean, type: { type: String, values: UZ, default: "" }, icon: { type: Is }, nativeType: { type: String, values: qZ, default: "button" }, loading: Boolean, loadingIcon: { type: Is, default: () => s2 }, 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: wt([String, Object]), default: "button" } }), WZ = { click: (e) => e instanceof MouseEvent }; function Cr(e, t) { GZ(e) && (e = "100%"); var n = KZ(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 eh(e) { return Math.min(1, Math.max(0, e)); } function GZ(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function KZ(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function L8(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function th(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function pl(e) { return e.length === 1 ? "0" + e : String(e); } function YZ(e, t, n) { return { r: Cr(e, 255) * 255, g: Cr(t, 255) * 255, b: Cr(n, 255) * 255 }; } function s5(e, t, n) { e = Cr(e, 255), t = Cr(t, 255), n = Cr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 0.5 ? l / (2 - r - o) : l / (r + o), r) { 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: i, l: s }; } function Dm(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 XZ(e, t, n) { var r, o, a; if (e = Cr(e, 360), t = Cr(t, 100), n = Cr(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = Dm(s, i, e + 1 / 3), o = Dm(s, i, e), a = Dm(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function l5(e, t, n) { e = Cr(e, 255), t = Cr(t, 255), n = Cr(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function ZZ(e, t, n) { e = Cr(e, 360) * 6, t = Cr(t, 100), n = Cr(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function u5(e, t, n, r) { var o = [ pl(Math.round(e).toString(16)), pl(Math.round(t).toString(16)), pl(Math.round(n).toString(16)) ]; return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join(""); } function JZ(e, t, n, r, o) { var a = [ pl(Math.round(e).toString(16)), pl(Math.round(t).toString(16)), pl(Math.round(n).toString(16)), pl(QZ(r)) ]; return o && 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 QZ(e) { return Math.round(parseFloat(e) * 255).toString(16); } function c5(e) { return ko(e) / 255; } function ko(e) { return parseInt(e, 16); } function eJ(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var ry = { 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 tJ(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = oJ(e)), typeof e == "object" && (ci(e.r) && ci(e.g) && ci(e.b) ? (t = YZ(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ci(e.h) && ci(e.s) && ci(e.v) ? (r = th(e.s), o = th(e.v), t = ZZ(e.h, r, o), i = !0, s = "hsv") : ci(e.h) && ci(e.s) && ci(e.l) && (r = th(e.s), a = th(e.l), t = XZ(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = L8(n), { ok: i, format: e.format || s, r: Math.min(255, Math.max(t.r, 0)), g: Math.min(255, Math.max(t.g, 0)), b: Math.min(255, Math.max(t.b, 0)), a: n }; } var nJ = "[-\\+]?\\d+%?", rJ = "[-\\+]?\\d*\\.\\d+%?", xs = "(?:".concat(rJ, ")|(?:").concat(nJ, ")"), Mm = "[\\s|\\(]+(".concat(xs, ")[,|\\s]+(").concat(xs, ")[,|\\s]+(").concat(xs, ")\\s*\\)?"), Nm = "[\\s|\\(]+(".concat(xs, ")[,|\\s]+(").concat(xs, ")[,|\\s]+(").concat(xs, ")[,|\\s]+(").concat(xs, ")\\s*\\)?"), sa = { CSS_UNIT: new RegExp(xs), rgb: new RegExp("rgb" + Mm), rgba: new RegExp("rgba" + Nm), hsl: new RegExp("hsl" + Mm), hsla: new RegExp("hsla" + Nm), hsv: new RegExp("hsv" + Mm), hsva: new RegExp("hsva" + Nm), 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 oJ(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (ry[e]) e = ry[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = sa.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = sa.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = sa.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = sa.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = sa.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = sa.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = sa.hex8.exec(e), n ? { r: ko(n[1]), g: ko(n[2]), b: ko(n[3]), a: c5(n[4]), format: t ? "name" : "hex8" } : (n = sa.hex6.exec(e), n ? { r: ko(n[1]), g: ko(n[2]), b: ko(n[3]), format: t ? "name" : "hex" } : (n = sa.hex4.exec(e), n ? { r: ko(n[1] + n[1]), g: ko(n[2] + n[2]), b: ko(n[3] + n[3]), a: c5(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = sa.hex3.exec(e), n ? { r: ko(n[1] + n[1]), g: ko(n[2] + n[2]), b: ko(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function ci(e) { return !!sa.CSS_UNIT.exec(String(e)); } var aJ = ( /** @class */ function() { function e(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e) return t; typeof t == "number" && (t = eJ(t)), this.originalInput = t; var o = tJ(t); this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.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 = o.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, r, o, a = t.r / 255, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = L8(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 = l5(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 = l5(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = s5(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 = s5(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), u5(this.r, this.g, this.b, t); }, e.prototype.toHexString = function(t) { return t === void 0 && (t = !1), "#" + this.toHex(t); }, e.prototype.toHex8 = function(t) { return t === void 0 && (t = !1), JZ(this.r, this.g, this.b, this.a, t); }, e.prototype.toHex8String = function(t) { return t === void 0 && (t = !1), "#" + this.toHex8(t); }, e.prototype.toHexShortString = function(t) { return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e.prototype.toRgbString = function() { var t = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b); return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")"); }, e.prototype.toPercentageRgb = function() { var t = function(n) { return "".concat(Math.round(Cr(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(Cr(n, 255) * 100); }; return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")"); }, e.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return !1; for (var t = "#" + u5(this.r, this.g, this.b, !1), n = 0, r = Object.entries(ry); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) return a; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name"); return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || 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 = eh(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 = eh(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 = eh(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 = eh(n.s), new e(n); }, e.prototype.greyscale = function() { return this.desaturate(100); }, e.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e(n); }, e.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, i = { r: (o.r - r.r) * a + r.r, g: (o.g - r.g) * a + r.g, b: (o.b - r.b) * a + r.b, a: (o.a - r.a) * a + r.a }; return new e(i); }, e.prototype.analogous = function(t, n) { t === void 0 && (t = 6), n === void 0 && (n = 30); var r = this.toHsl(), o = 360 / n, a = [this]; for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; ) r.h = (r.h + o) % 360, a.push(new e(r)); 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(), r = n.h, o = n.s, a = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o, a: o }); }, 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(), r = n.h, o = [this], a = 360 / t, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Zi(e, t = 20) { return e.mix("#141414", t).toString(); } function iJ(e) { const t = nf(), n = It("button"); return $(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new aJ(o), s = e.dark ? i.tint(20).toString() : Zi(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Zi(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? Zi(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? Zi(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Zi(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Zi(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Zi(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? Zi(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c; } } } return r; }); } const sJ = K({ name: "ElButton" }), lJ = /* @__PURE__ */ K({ ...sJ, props: ny, emits: WZ, setup(e, { expose: t, emit: n }) { const r = e, o = iJ(r), a = It("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = HZ(r, n), h = $(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.value), a.is("loading", r.loading), a.is("plain", r.plain), a.is("round", r.round), a.is("circle", r.circle), a.is("text", r.text), a.is("link", r.link), a.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (E(), Q(vt(p.tag), Lt({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(f) }), { default: R(() => [ p.loading ? (E(), L(De, { key: 0 }, [ p.$slots.loading ? oe(p.$slots, "loading", { key: 0 }) : (E(), Q(y(gr), { key: 1, class: V(y(a).is("loading")) }, { default: R(() => [ (E(), Q(vt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (E(), Q(y(gr), { key: 1 }, { default: R(() => [ p.icon ? (E(), Q(vt(p.icon), { key: 0 })) : oe(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : Z("v-if", !0), p.$slots.default ? (E(), L("span", { key: 2, class: V({ [y(a).em("text", "expand")]: y(d) }) }, [ oe(p.$slots, "default") ], 2)) : Z("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var uJ = /* @__PURE__ */ Ot(lJ, [["__file", "button.vue"]]); const cJ = { size: ny.size, type: ny.type }, dJ = K({ name: "ElButtonGroup" }), pJ = /* @__PURE__ */ K({ ...dJ, props: cJ, setup(e) { const t = e; tt(P8, Kt({ size: $t(t, "size"), type: $t(t, "type") })); const n = It("button"); return (r, o) => (E(), L("div", { class: V(y(n).b("group")) }, [ oe(r.$slots, "default") ], 2)); } }); var R8 = /* @__PURE__ */ Ot(pJ, [["__file", "button-group.vue"]]); const ka = fr(uJ, { ButtonGroup: R8 }); Hi(R8); const ss = /* @__PURE__ */ new Map(); if (Un) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of ss.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function d5(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : kl(t.arg) && n.push(t.arg), function(r, o) { const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h = a && (a.contains(i) || a.contains(s)); l || u || c || d || f || h || t.value(r, o); }; } const D8 = { beforeMount(e, t) { ss.has(e) || ss.set(e, []), ss.get(e).push({ documentHandler: d5(e, t), bindingFn: t.value }); }, updated(e, t) { ss.has(e) || ss.set(e, []); const n = ss.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: d5(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e) { ss.delete(e); } }, fJ = rn({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: wt([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), hJ = K({ name: "ElCard" }), vJ = /* @__PURE__ */ K({ ...hJ, props: fJ, setup(e) { const t = It("card"); return (n, r) => (E(), L("div", { class: V([y(t).b(), y(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (E(), L("div", { key: 0, class: V(y(t).e("header")) }, [ oe(n.$slots, "header", {}, () => [ Ae(me(n.header), 1) ]) ], 2)) : Z("v-if", !0), B("div", { class: V([y(t).e("body"), n.bodyClass]), style: Ze(n.bodyStyle) }, [ oe(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (E(), L("div", { key: 1, class: V(y(t).e("footer")) }, [ oe(n.$slots, "footer", {}, () => [ Ae(me(n.footer), 1) ]) ], 2)) : Z("v-if", !0) ], 2)); } }); var gJ = /* @__PURE__ */ Ot(vJ, [["__file", "card.vue"]]); const mJ = fr(gJ), M8 = { 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: Ac, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...Us(["ariaControls"]) }, N8 = { [vr]: (e) => Mr(e) || wr(e) || oc(e), change: (e) => Mr(e) || wr(e) || oc(e) }, Pc = Symbol("checkboxGroupContextKey"), yJ = ({ model: e, isChecked: t }) => { const n = xe(Pc, void 0), r = $(() => { var o, a; const i = (o = n == null ? void 0 : n.max) == null ? void 0 : o.value, s = (a = n == null ? void 0 : n.min) == null ? void 0 : a.value; return !ws(i) && e.value.length >= i && !t.value || !ws(s) && e.value.length <= s && t.value; }); return { isDisabled: nf($(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, bJ = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const i = xe(Pc, void 0), { formItem: s } = ou(), { emit: l } = rt(); function u(p) { var v, m, g, b; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (b = (g = e.falseValue) != null ? g : e.falseLabel) != null ? b : !1; } function c(p, v) { l("change", u(p), v); } function d(p) { if (n.value) return; const v = p.target; l("change", u(v.checked), p); } async function f(p) { n.value || !r.value && !o.value && a.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ue(), c(t.value, p))); } const h = $(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return ce(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => qn(p))); }), { handleChange: d, onClickRoot: f }; }, wJ = (e) => { const t = z(!1), { emit: n } = rt(), r = xe(Pc, void 0), o = $(() => ws(r) === !1), a = z(!1), i = $({ get() { var s, l; return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (l = e.modelValue) != null ? l : t.value; }, set(s) { var l, u; o.value && oo(s) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > i.value.length, a.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(vr, s), t.value = s); } }); return { model: i, isGroup: o, isLimitExceeded: a }; }, xJ = (e, t, { model: n }) => { const r = xe(Pc, void 0), o = z(!1), a = $(() => Fv(e.value) ? e.label : e.value), i = $(() => { const c = n.value; return oc(c) ? c : oo(c) ? br(a.value) ? c.map(Ga).some((d) => Ov(d, a.value)) : c.map(Ga).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = Rl($(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = Rl($(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = $(() => !!t.default || !Fv(a.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: o, checkboxSize: l, hasOwnLabel: u, actualValue: a }; }, B8 = (e, t) => { const { formItem: n } = ou(), { model: r, isGroup: o, isLimitExceeded: a } = wJ(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = xJ(e, t, { model: r }), { isDisabled: f } = yJ({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = rf(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: o }), { handleChange: v, onClickRoot: m } = bJ(e, { model: r, isLimitExceeded: a, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var b, C; oo(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (C = (b = e.trueValue) != null ? b : e.trueLabel) != null ? C : !0; } e.checked && g(); })(), jh({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, $(() => o.value && Fv(e.value))), jh({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, $(() => !!e.trueLabel)), jh({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, $(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: p, isChecked: s, isDisabled: f, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, kJ = K({ name: "ElCheckbox" }), CJ = /* @__PURE__ */ K({ ...kJ, props: M8, emits: N8, setup(e) { const t = e, n = Xr(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = B8(t, n), p = It("checkbox"), v = $(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", a.value) ]), m = $(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", a.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, b) => (E(), Q(vt(!y(u) && y(o) ? "span" : "label"), { class: V(y(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: y(h) }, { default: R(() => { var C, x, w, k; return [ B("span", { class: V(y(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Ne((E(), L("input", { key: 0, id: y(r), "onUpdate:modelValue": (S) => Gn(c) ? c.value = S : null, class: V(y(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: y(i), "true-value": (x = (C = g.trueValue) != null ? C : g.trueLabel) != null ? x : !0, "false-value": (k = (w = g.falseValue) != null ? w : g.falseLabel) != null ? k : !1, onChange: y(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(c)] ]) : Ne((E(), L("input", { key: 1, id: y(r), "onUpdate:modelValue": (S) => Gn(c) ? c.value = S : null, class: V(y(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: y(i), value: y(d), name: g.name, tabindex: g.tabindex, onChange: y(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(c)] ]), B("span", { class: V(y(p).e("inner")) }, null, 2) ], 2), y(u) ? (E(), L("span", { key: 0, class: V(y(p).e("label")) }, [ oe(g.$slots, "default"), g.$slots.default ? Z("v-if", !0) : (E(), L(De, { key: 0 }, [ Ae(me(g.label), 1) ], 64)) ], 2)) : Z("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var SJ = /* @__PURE__ */ Ot(CJ, [["__file", "checkbox.vue"]]); const EJ = K({ name: "ElCheckboxButton" }), $J = /* @__PURE__ */ K({ ...EJ, props: M8, emits: N8, setup(e) { const t = e, n = Xr(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = B8(t, n), c = xe(Pc, void 0), d = It("checkbox"), f = $(() => { var p, v, m, g; const b = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: b, borderColor: b, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: b ? `-1px 0 0 0 ${b}` : void 0 }; }), h = $(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", a.value), d.is("checked", o.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, b, C; return E(), L("label", { class: V(y(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? Ne((E(), L("input", { key: 0, "onUpdate:modelValue": (x) => Gn(s) ? s.value = x : null, class: V(y(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: y(a), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (C = (b = p.falseValue) != null ? b : p.falseLabel) != null ? C : !1, onChange: y(u), onFocus: (x) => r.value = !0, onBlur: (x) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(s)] ]) : Ne((E(), L("input", { key: 1, "onUpdate:modelValue": (x) => Gn(s) ? s.value = x : null, class: V(y(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: y(a), value: y(l), onChange: y(u), onFocus: (x) => r.value = !0, onBlur: (x) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(s)] ]), p.$slots.default || p.label ? (E(), L("span", { key: 2, class: V(y(d).be("button", "inner")), style: Ze(y(o) ? y(f) : void 0) }, [ oe(p.$slots, "default", {}, () => [ Ae(me(p.label), 1) ]) ], 6)) : Z("v-if", !0) ], 2); }; } }); var z8 = /* @__PURE__ */ Ot($J, [["__file", "checkbox-button.vue"]]); const _J = rn({ modelValue: { type: wt(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Ac, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...Us(["ariaLabel"]) }), TJ = { [vr]: (e) => oo(e), change: (e) => oo(e) }, OJ = K({ name: "ElCheckboxGroup" }), FJ = /* @__PURE__ */ K({ ...OJ, props: _J, emits: TJ, setup(e, { emit: t }) { const n = e, r = It("checkbox"), { formItem: o } = ou(), { inputId: a, isLabeledByFormItem: i } = rf(n, { formItemContext: o }), s = async (u) => { t(vr, u), await Ue(), t("change", u); }, l = $({ get() { return n.modelValue; }, set(u) { s(u); } }); return tt(Pc, { ...Y_(Vr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), ce(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((u) => qn(u))); }), (u, c) => { var d; return E(), Q(vt(u.tag), { id: y(a), class: V(y(r).b("group")), role: "group", "aria-label": y(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": y(i) ? (d = y(o)) == null ? void 0 : d.labelId : void 0 }, { default: R(() => [ oe(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var V8 = /* @__PURE__ */ Ot(FJ, [["__file", "checkbox-group.vue"]]); const IJ = fr(SJ, { CheckboxButton: z8, CheckboxGroup: V8 }); Hi(z8); Hi(V8); const oy = rn({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: t8 }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), AJ = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, PJ = K({ name: "ElTag" }), LJ = /* @__PURE__ */ K({ ...PJ, props: oy, emits: AJ, setup(e, { emit: t }) { const n = e, r = Rl(), o = It("tag"), a = $(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ o.b(), o.is("closable", f), o.m(u || "primary"), o.m(r.value), o.m(d), o.is("hit", c), o.is("round", h) ]; }), i = (u) => { t("close", u); }, s = (u) => { t("click", u); }, l = (u) => { u.component.subTree.component.bum = null; }; return (u, c) => u.disableTransitions ? (E(), L("span", { key: 0, class: V(y(a)), style: Ze({ backgroundColor: u.color }), onClick: s }, [ B("span", { class: V(y(o).e("content")) }, [ oe(u.$slots, "default") ], 2), u.closable ? (E(), Q(y(gr), { key: 0, class: V(y(o).e("close")), onClick: Je(i, ["stop"]) }, { default: R(() => [ W(y(Iv)) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0) ], 6)) : (E(), Q(pr, { key: 1, name: `${y(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: R(() => [ B("span", { class: V(y(a)), style: Ze({ backgroundColor: u.color }), onClick: s }, [ B("span", { class: V(y(o).e("content")) }, [ oe(u.$slots, "default") ], 2), u.closable ? (E(), Q(y(gr), { key: 0, class: V(y(o).e("close")), onClick: Je(i, ["stop"]) }, { default: R(() => [ W(y(Iv)) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var RJ = /* @__PURE__ */ Ot(LJ, [["__file", "tag.vue"]]); const DJ = fr(RJ), j8 = Symbol("rowContextKey"), MJ = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], NJ = ["top", "middle", "bottom"], BJ = rn({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: MJ, default: "start" }, align: { type: String, values: NJ } }), zJ = K({ name: "ElRow" }), VJ = /* @__PURE__ */ K({ ...zJ, props: BJ, setup(e) { const t = e, n = It("row"), r = $(() => t.gutter); tt(j8, { gutter: r }); const o = $(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = $(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (E(), Q(vt(i.tag), { class: V(y(a)), style: Ze(y(o)) }, { default: R(() => [ oe(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var jJ = /* @__PURE__ */ Ot(VJ, [["__file", "row.vue"]]); const rg = fr(jJ), HJ = rn({ 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: wt([Number, Object]), default: () => Lu({}) }, sm: { type: wt([Number, Object]), default: () => Lu({}) }, md: { type: wt([Number, Object]), default: () => Lu({}) }, lg: { type: wt([Number, Object]), default: () => Lu({}) }, xl: { type: wt([Number, Object]), default: () => Lu({}) } }), UJ = K({ name: "ElCol" }), qJ = /* @__PURE__ */ K({ ...UJ, props: HJ, setup(e) { const t = e, { gutter: n } = xe(j8, { gutter: $(() => 0) }), r = It("col"), o = $(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = $(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; wr(l) && (s === "span" ? i.push(r.b(`${t[s]}`)) : l > 0 && i.push(r.b(`${s}-${t[s]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((s) => { wr(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : br(t[s]) && Object.entries(t[s]).forEach(([l, u]) => { i.push(l !== "span" ? r.b(`${s}-${l}-${u}`) : r.b(`${s}-${u}`)); }); }), n.value && i.push(r.is("guttered")), [r.b(), i]; }); return (i, s) => (E(), Q(vt(i.tag), { class: V(y(a)), style: Ze(y(o)) }, { default: R(() => [ oe(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var WJ = /* @__PURE__ */ Ot(qJ, [["__file", "col.vue"]]); const sf = fr(WJ), GJ = K({ name: "ElCollapseTransition" }), KJ = /* @__PURE__ */ K({ ...GJ, setup(e) { const t = It("collapse-transition"), n = (o) => { o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom; }, r = { beforeEnter(o) { o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.style.height && (o.dataset.elExistsHeight = o.style.height), o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0; }, enter(o) { requestAnimationFrame(() => { o.dataset.oldOverflow = o.style.overflow, o.dataset.elExistsHeight ? o.style.maxHeight = o.dataset.elExistsHeight : o.scrollHeight !== 0 ? o.style.maxHeight = `${o.scrollHeight}px` : o.style.maxHeight = 0, o.style.paddingTop = o.dataset.oldPaddingTop, o.style.paddingBottom = o.dataset.oldPaddingBottom, o.style.overflow = "hidden"; }); }, afterEnter(o) { o.style.maxHeight = "", o.style.overflow = o.dataset.oldOverflow; }, enterCancelled(o) { n(o); }, beforeLeave(o) { o.dataset || (o.dataset = {}), o.dataset.oldPaddingTop = o.style.paddingTop, o.dataset.oldPaddingBottom = o.style.paddingBottom, o.dataset.oldOverflow = o.style.overflow, o.style.maxHeight = `${o.scrollHeight}px`, o.style.overflow = "hidden"; }, leave(o) { o.scrollHeight !== 0 && (o.style.maxHeight = 0, o.style.paddingTop = 0, o.style.paddingBottom = 0); }, afterLeave(o) { n(o); }, leaveCancelled(o) { n(o); } }; return (o, a) => (E(), Q(pr, Lt({ name: y(t).b() }, HL(r)), { default: R(() => [ oe(o.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var YJ = /* @__PURE__ */ Ot(KJ, [["__file", "collapse-transition.vue"]]); const XJ = fr(YJ), ZJ = rn({ color: { type: wt(Object), required: !0 }, vertical: { type: Boolean, default: !1 } }); let Bm = !1; function pp(e, t) { if (!Un) return; const n = function(a) { var i; (i = t.drag) == null || i.call(t, a); }, r = function(a) { var i; document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, Bm = !1, (i = t.end) == null || i.call(t, a); }, o = function(a) { var i; Bm || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), Bm = !0, (i = t.start) == null || i.call(t, a)); }; e.addEventListener("mousedown", o), e.addEventListener("touchstart", o, { passive: !1 }); } const JJ = (e) => { const t = rt(), { t: n } = Qp(), r = On(), o = On(), a = $(() => e.color.get("alpha")), i = $(() => n("el.colorpicker.alphaLabel")); function s(d) { var f; d.target !== r.value && l(d), (f = r.value) == null || f.focus(); } function l(d) { if (!o.value || !r.value) return; const f = t.vnode.el.getBoundingClientRect(), { clientX: h, clientY: p } = Jb(d); if (e.vertical) { let v = p - f.top; v = Math.max(r.value.offsetHeight / 2, v), v = Math.min(v, f.height - r.value.offsetHeight / 2), e.color.set("alpha", Math.round((v - r.value.offsetHeight / 2) / (f.height - r.value.offsetHeight) * 100)); } else { let v = h - f.left; v = Math.max(r.value.offsetWidth / 2, v), v = Math.min(v, f.width - r.value.offsetWidth / 2), e.color.set("alpha", Math.round((v - r.value.offsetWidth / 2) / (f.width - r.value.offsetWidth) * 100)); } } function u(d) { const { code: f, shiftKey: h } = d, p = h ? 10 : 1; switch (f) { case er.left: case er.down: d.preventDefault(), d.stopPropagation(), c(-p); break; case er.right: case er.up: d.preventDefault(), d.stopPropagation(), c(p); break; } } function c(d) { let f = a.value + d; f = f < 0 ? 0 : f > 100 ? 100 : f, e.color.set("alpha", f); } return { thumb: r, bar: o, alpha: a, alphaLabel: i, handleDrag: l, handleClick: s, handleKeydown: u }; }, QJ = (e, { bar: t, thumb: n, handleDrag: r }) => { const o = rt(), a = It("color-alpha-slider"), i = z(0), s = z(0), l = z(); function u() { if (!n.value || e.vertical) return 0; const b = o.vnode.el, C = e.color.get("alpha"); return b ? Math.round(C * (b.offsetWidth - n.value.offsetWidth / 2) / 100) : 0; } function c() { if (!n.value) return 0; const b = o.vnode.el; if (!e.vertical) return 0; const C = e.color.get("alpha"); return b ? Math.round(C * (b.offsetHeight - n.value.offsetHeight / 2) / 100) : 0; } function d() { if (e.color && e.color.value) { const { r: b, g: C, b: x } = e.color.toRgb(); return `linear-gradient(to right, rgba(${b}, ${C}, ${x}, 0) 0%, rgba(${b}, ${C}, ${x}, 1) 100%)`; } return ""; } function f() { i.value = u(), s.value = c(), l.value = d(); } at(() => { if (!t.value || !n.value) return; const b = { drag: (C) => { r(C); }, end: (C) => { r(C); } }; pp(t.value, b), pp(n.value, b), f(); }), ce(() => e.color.get("alpha"), () => f()), ce(() => e.color.value, () => f()); const h = $(() => [a.b(), a.is("vertical", e.vertical)]), p = $(() => a.e("bar")), v = $(() => a.e("thumb")), m = $(() => ({ background: l.value })), g = $(() => ({ left: ac(i.value), top: ac(s.value) })); return { rootKls: h, barKls: p, barStyle: m, thumbKls: v, thumbStyle: g, update: f }; }, eQ = "ElColorAlphaSlider", tQ = K({ name: eQ }), nQ = /* @__PURE__ */ K({ ...tQ, props: ZJ, setup(e, { expose: t }) { const n = e, { alpha: r, alphaLabel: o, bar: a, thumb: i, handleDrag: s, handleClick: l, handleKeydown: u } = JJ(n), { rootKls: c, barKls: d, barStyle: f, thumbKls: h, thumbStyle: p, update: v } = QJ(n, { bar: a, thumb: i, handleDrag: s }); return t({ update: v, bar: a, thumb: i }), (m, g) => (E(), L("div", { class: V(y(c)) }, [ B("div", { ref_key: "bar", ref: a, class: V(y(d)), style: Ze(y(f)), onClick: y(l) }, null, 14, ["onClick"]), B("div", { ref_key: "thumb", ref: i, class: V(y(h)), style: Ze(y(p)), "aria-label": y(o), "aria-valuenow": y(r), "aria-orientation": m.vertical ? "vertical" : "horizontal", "aria-valuemin": "0", "aria-valuemax": "100", role: "slider", tabindex: "0", onKeydown: y(u) }, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"]) ], 2)); } }); var rQ = /* @__PURE__ */ Ot(nQ, [["__file", "alpha-slider.vue"]]); const oQ = K({ name: "ElColorHueSlider", props: { color: { type: Object, required: !0 }, vertical: Boolean }, setup(e) { const t = It("color-hue-slider"), n = rt(), r = z(), o = z(), a = z(0), i = z(0), s = $(() => e.color.get("hue")); ce(() => s.value, () => { f(); }); function l(h) { h.target !== r.value && u(h); } function u(h) { if (!o.value || !r.value) return; const p = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = Jb(h); let g; if (e.vertical) { let b = m - p.top; b = Math.min(b, p.height - r.value.offsetHeight / 2), b = Math.max(r.value.offsetHeight / 2, b), g = Math.round((b - r.value.offsetHeight / 2) / (p.height - r.value.offsetHeight) * 360); } else { let b = v - p.left; b = Math.min(b, p.width - r.value.offsetWidth / 2), b = Math.max(r.value.offsetWidth / 2, b), g = Math.round((b - r.value.offsetWidth / 2) / (p.width - r.value.offsetWidth) * 360); } e.color.set("hue", g); } function c() { if (!r.value) return 0; const h = n.vnode.el; if (e.vertical) return 0; const p = e.color.get("hue"); return h ? Math.round(p * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0; } function d() { if (!r.value) return 0; const h = n.vnode.el; if (!e.vertical) return 0; const p = e.color.get("hue"); return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0; } function f() { a.value = c(), i.value = d(); } return at(() => { if (!o.value || !r.value) return; const h = { drag: (p) => { u(p); }, end: (p) => { u(p); } }; pp(o.value, h), pp(r.value, h), f(); }), { bar: o, thumb: r, thumbLeft: a, thumbTop: i, hueValue: s, handleClick: l, update: f, ns: t }; } }); function aQ(e, t, n, r, o, a) { return E(), L("div", { class: V([e.ns.b(), e.ns.is("vertical", e.vertical)]) }, [ B("div", { ref: "bar", class: V(e.ns.e("bar")), onClick: e.handleClick }, null, 10, ["onClick"]), B("div", { ref: "thumb", class: V(e.ns.e("thumb")), style: Ze({ left: e.thumbLeft + "px", top: e.thumbTop + "px" }) }, null, 6) ], 2); } var iQ = /* @__PURE__ */ Ot(oQ, [["render", aQ], ["__file", "hue-slider.vue"]]); const sQ = rn({ modelValue: String, id: String, showAlpha: Boolean, colorFormat: String, disabled: Boolean, size: Ac, popperClass: { type: String, default: "" }, tabindex: { type: [String, Number], default: 0 }, teleported: to.teleported, predefine: { type: wt(Array) }, validateEvent: { type: Boolean, default: !0 }, ...Us(["ariaLabel"]) }), lQ = { [vr]: (e) => Mr(e) || Es(e), [l2]: (e) => Mr(e) || Es(e), activeChange: (e) => Mr(e) || Es(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent }, H8 = Symbol("colorPickerContextKey"), p5 = function(e, t, n) { return [ e, t * n / ((e = (2 - t) * n) < 1 ? e : 2 - e) || 0, e / 2 ]; }, uQ = function(e) { return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1; }, cQ = function(e) { return typeof e == "string" && e.includes("%"); }, ju = function(e, t) { uQ(e) && (e = "100%"); const n = cQ(e); return e = Math.min(t, Math.max(0, Number.parseFloat(`${e}`))), n && (e = Number.parseInt(`${e * t}`, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / Number.parseFloat(t); }, f5 = { 10: "A", 11: "B", 12: "C", 13: "D", 14: "E", 15: "F" }, qh = (e) => { e = Math.min(Math.round(e), 255); const t = Math.floor(e / 16), n = e % 16; return `${f5[t] || t}${f5[n] || n}`; }, h5 = function({ r: e, g: t, b: n }) { return Number.isNaN(+e) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${qh(e)}${qh(t)}${qh(n)}`; }, zm = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 }, nl = function(e) { return e.length === 2 ? (zm[e[0].toUpperCase()] || +e[0]) * 16 + (zm[e[1].toUpperCase()] || +e[1]) : zm[e[1].toUpperCase()] || +e[1]; }, dQ = function(e, t, n) { t = t / 100, n = n / 100; let r = t; const o = Math.max(n, 0.01); n *= 2, t *= n <= 1 ? n : 2 - n, r *= o <= 1 ? o : 2 - o; const a = (n + t) / 2, i = n === 0 ? 2 * r / (o + r) : 2 * t / (n + t); return { h: e, s: i * 100, v: a * 100 }; }, v5 = (e, t, n) => { e = ju(e, 255), t = ju(t, 255), n = ju(n, 255); const r = Math.max(e, t, n), o = Math.min(e, t, n); let a; const i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: { a = (t - n) / s + (t < n ? 6 : 0); break; } case t: { a = (n - e) / s + 2; break; } case n: { a = (e - t) / s + 4; break; } } a /= 6; } return { h: a * 360, s: l * 100, v: i * 100 }; }, cd = function(e, t, n) { e = ju(e, 360) * 6, t = ju(t, 100), n = ju(n, 100); const r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: Math.round(u * 255), g: Math.round(c * 255), b: Math.round(d * 255) }; }; class Vd { constructor(t = {}) { this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = ""; for (const n in t) Pl(t, n) && (this[n] = t[n]); t.value ? this.fromString(t.value) : this.doOnChange(); } set(t, n) { if (arguments.length === 1 && typeof t == "object") { for (const r in t) Pl(t, r) && this.set(r, t[r]); return; } this[`_${t}`] = n, this.doOnChange(); } get(t) { return t === "alpha" ? Math.floor(this[`_${t}`]) : this[`_${t}`]; } toRgb() { return cd(this._hue, this._saturation, this._value); } fromString(t) { if (!t) { this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange(); return; } const n = (r, o, a) => { this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, o)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange(); }; if (t.includes("hsl")) { const r = t.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: o, s: a, v: i } = dQ(r[0], r[1], r[2]); n(o, a, i); } } else if (t.includes("hsv")) { const r = t.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10)); r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3 && n(r[0], r[1], r[2]); } else if (t.includes("rgb")) { const r = t.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((o) => o !== "").map((o, a) => a > 2 ? Number.parseFloat(o) : Number.parseInt(o, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: o, s: a, v: i } = v5(r[0], r[1], r[2]); n(o, a, i); } } else if (t.includes("#")) { const r = t.replace("#", "").trim(); if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r)) return; let o, a, i; r.length === 3 ? (o = nl(r[0] + r[0]), a = nl(r[1] + r[1]), i = nl(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (o = nl(r.slice(0, 2)), a = nl(r.slice(2, 4)), i = nl(r.slice(4, 6))), r.length === 8 ? this._alpha = nl(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100); const { h: s, s: l, v: u } = v5(o, a, i); n(s, l, u); } } compare(t) { return Math.abs(t._hue - this._hue) < 2 && Math.abs(t._saturation - this._saturation) < 1 && Math.abs(t._value - this._value) < 1 && Math.abs(t._alpha - this._alpha) < 1; } doOnChange() { const { _hue: t, _saturation: n, _value: r, _alpha: o, format: a } = this; if (this.enableAlpha) switch (a) { case "hsl": { const i = p5(t, n / 100, r / 100); this.value = `hsla(${t}, ${Math.round(i[1] * 100)}%, ${Math.round(i[2] * 100)}%, ${this.get("alpha") / 100})`; break; } case "hsv": { this.value = `hsva(${t}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`; break; } case "hex": { this.value = `${h5(cd(t, n, r))}${qh(o * 255 / 100)}`; break; } default: { const { r: i, g: s, b: l } = cd(t, n, r); this.value = `rgba(${i}, ${s}, ${l}, ${this.get("alpha") / 100})`; } } else switch (a) { case "hsl": { const i = p5(t, n / 100, r / 100); this.value = `hsl(${t}, ${Math.round(i[1] * 100)}%, ${Math.round(i[2] * 100)}%)`; break; } case "hsv": { this.value = `hsv(${t}, ${Math.round(n)}%, ${Math.round(r)}%)`; break; } case "rgb": { const { r: i, g: s, b: l } = cd(t, n, r); this.value = `rgb(${i}, ${s}, ${l})`; break; } default: this.value = h5(cd(t, n, r)); } } } const pQ = K({ props: { colors: { type: Array, required: !0 }, color: { type: Object, required: !0 }, enableAlpha: { type: Boolean, required: !0 } }, setup(e) { const t = It("color-predefine"), { currentColor: n } = xe(H8), r = z(a(e.colors, e.color)); ce(() => n.value, (i) => { const s = new Vd(); s.fromString(i), r.value.forEach((l) => { l.selected = s.compare(l); }); }), qp(() => { r.value = a(e.colors, e.color); }); function o(i) { e.color.fromString(e.colors[i]); } function a(i, s) { return i.map((l) => { const u = new Vd(); return u.enableAlpha = e.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u; }); } return { rgbaColors: r, handleSelect: o, ns: t }; } }); function fQ(e, t, n, r, o, a) { return E(), L("div", { class: V(e.ns.b()) }, [ B("div", { class: V(e.ns.e("colors")) }, [ (E(!0), L(De, null, xt(e.rgbaColors, (i, s) => (E(), L("div", { key: e.colors[s], class: V([ e.ns.e("color-selector"), e.ns.is("alpha", i._alpha < 100), { selected: i.selected } ]), onClick: (l) => e.handleSelect(s) }, [ B("div", { style: Ze({ backgroundColor: i.value }) }, null, 4) ], 10, ["onClick"]))), 128)) ], 2) ], 2); } var hQ = /* @__PURE__ */ Ot(pQ, [["render", fQ], ["__file", "predefine.vue"]]); const vQ = K({ name: "ElSlPanel", props: { color: { type: Object, required: !0 } }, setup(e) { const t = It("color-svpanel"), n = rt(), r = z(0), o = z(0), a = z("hsl(0, 100%, 50%)"), i = $(() => { const u = e.color.get("hue"), c = e.color.get("value"); return { hue: u, value: c }; }); function s() { const u = e.color.get("saturation"), c = e.color.get("value"), d = n.vnode.el, { clientWidth: f, clientHeight: h } = d; o.value = u * f / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${e.color.get("hue")}, 100%, 50%)`; } function l(u) { const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: f } = Jb(u); let h = d - c.left, p = f - c.top; h = Math.max(0, h), h = Math.min(h, c.width), p = Math.max(0, p), p = Math.min(p, c.height), o.value = h, r.value = p, e.color.set({ saturation: h / c.width * 100, value: 100 - p / c.height * 100 }); } return ce(() => i.value, () => { s(); }), at(() => { pp(n.vnode.el, { drag: (u) => { l(u); }, end: (u) => { l(u); } }), s(); }), { cursorTop: r, cursorLeft: o, background: a, colorValue: i, handleDrag: l, update: s, ns: t }; } }); function gQ(e, t, n, r, o, a) { return E(), L("div", { class: V(e.ns.b()), style: Ze({ backgroundColor: e.background }) }, [ B("div", { class: V(e.ns.e("white")) }, null, 2), B("div", { class: V(e.ns.e("black")) }, null, 2), B("div", { class: V(e.ns.e("cursor")), style: Ze({ top: e.cursorTop + "px", left: e.cursorLeft + "px" }) }, [ B("div") ], 6) ], 6); } var mQ = /* @__PURE__ */ Ot(vQ, [["render", gQ], ["__file", "sv-panel.vue"]]); const yQ = K({ name: "ElColorPicker" }), bQ = /* @__PURE__ */ K({ ...yQ, props: sQ, emits: lQ, setup(e, { expose: t, emit: n }) { const r = e, { t: o } = Qp(), a = It("color"), { formItem: i } = ou(), s = Rl(), l = nf(), { inputId: u, isLabeledByFormItem: c } = rf(r, { formItemContext: i }), d = z(), f = z(), h = z(), p = z(), v = z(), m = z(), { isFocused: g, handleFocus: b, handleBlur: C } = y2(v, { beforeFocus() { return l.value; }, beforeBlur(se) { var pe; return (pe = p.value) == null ? void 0 : pe.isFocusInsideContent(se); }, afterBlur() { j(!1), Y(); } }); let x = !0; const w = Kt(new Vd({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue })), k = z(!1), S = z(!1), _ = z(""), O = $(() => !r.modelValue && !S.value ? "transparent" : N(w, r.showAlpha)), F = $(() => !r.modelValue && !S.value ? "" : w.value), I = $(() => c.value ? void 0 : r.ariaLabel || o("el.colorpicker.defaultLabel")), P = $(() => c.value ? i == null ? void 0 : i.labelId : void 0), M = $(() => [ a.b("picker"), a.is("disabled", l.value), a.bm("picker", s.value), a.is("focused", g.value) ]); function N(se, pe) { if (!(se instanceof Vd)) throw new TypeError("color should be instance of _color Class"); const { r: Se, g: Le, b: je } = se.toRgb(); return pe ? `rgba(${Se}, ${Le}, ${je}, ${se.get("alpha") / 100})` : `rgb(${Se}, ${Le}, ${je})`; } function j(se) { k.value = se; } const A = K_(j, 100, { leading: !0 }); function U() { l.value || j(!0); } function q() { A(!1), Y(); } function Y() { Ue(() => { r.modelValue ? w.fromString(r.modelValue) : (w.value = "", Ue(() => { S.value = !1; })); }); } function ie() { l.value || A(!k.value); } function re() { w.fromString(_.value); } function le() { const se = w.value; n(vr, se), n("change", se), r.validateEvent && (i == null || i.validate("change").catch((pe) => qn(pe))), A(!1), Ue(() => { const pe = new Vd({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue }); w.compare(pe) || Y(); }); } function he() { A(!1), n(vr, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((se) => qn(se))), Y(); } function we() { k.value && (q(), g.value && ae()); } function be(se) { se.preventDefault(), se.stopPropagation(), j(!1), Y(); } function de(se) { switch (se.code) { case er.enter: case er.space: se.preventDefault(), se.stopPropagation(), U(), m.value.focus(); break; case er.esc: be(se); break; } } function ae() { v.value.focus(); } function ee() { v.value.blur(); } return at(() => { r.modelValue && (_.value = F.value); }), ce(() => r.modelValue, (se) => { se ? se && se !== w.value && (x = !1, w.fromString(se)) : S.value = !1; }), ce(() => [r.colorFormat, r.showAlpha], () => { w.enableAlpha = r.showAlpha, w.format = r.colorFormat || w.format, w.doOnChange(), n(vr, w.value); }), ce(() => F.value, (se) => { _.value = se, x && n("activeChange", se), x = !0; }), ce(() => w.value, () => { !r.modelValue && !S.value && (S.value = !0); }), ce(() => k.value, () => { Ue(() => { var se, pe, Se; (se = d.value) == null || se.update(), (pe = f.value) == null || pe.update(), (Se = h.value) == null || Se.update(); }); }), tt(H8, { currentColor: F }), t({ color: w, show: U, hide: q, focus: ae, blur: ee }), (se, pe) => (E(), Q(y(af), { ref_key: "popper", ref: p, visible: k.value, "show-arrow": !1, "fallback-placements": ["bottom", "top", "right", "left"], offset: 0, "gpu-acceleration": !1, "popper-class": [y(a).be("picker", "panel"), y(a).b("dropdown"), se.popperClass], "stop-popper-mouse-event": !1, effect: "light", trigger: "click", teleported: se.teleported, transition: `${y(a).namespace.value}-zoom-in-top`, persistent: "", onHide: (Se) => j(!1) }, { content: R(() => [ Ne((E(), L("div", { onKeydown: yn(be, ["esc"]) }, [ B("div", { class: V(y(a).be("dropdown", "main-wrapper")) }, [ W(iQ, { ref_key: "hue", ref: d, class: "hue-slider", color: y(w), vertical: "" }, null, 8, ["color"]), W(mQ, { ref_key: "sv", ref: f, color: y(w) }, null, 8, ["color"]) ], 2), se.showAlpha ? (E(), Q(rQ, { key: 0, ref_key: "alpha", ref: h, color: y(w) }, null, 8, ["color"])) : Z("v-if", !0), se.predefine ? (E(), Q(hQ, { key: 1, ref: "predefine", "enable-alpha": se.showAlpha, color: y(w), colors: se.predefine }, null, 8, ["enable-alpha", "color", "colors"])) : Z("v-if", !0), B("div", { class: V(y(a).be("dropdown", "btns")) }, [ B("span", { class: V(y(a).be("dropdown", "value")) }, [ W(y(of), { ref_key: "inputRef", ref: m, modelValue: _.value, "onUpdate:modelValue": (Se) => _.value = Se, "validate-event": !1, size: "small", onKeyup: yn(re, ["enter"]), onBlur: re }, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]) ], 2), W(y(ka), { class: V(y(a).be("dropdown", "link-btn")), text: "", size: "small", onClick: he }, { default: R(() => [ Ae(me(y(o)("el.colorpicker.clear")), 1) ]), _: 1 }, 8, ["class"]), W(y(ka), { plain: "", size: "small", class: V(y(a).be("dropdown", "btn")), onClick: le }, { default: R(() => [ Ae(me(y(o)("el.colorpicker.confirm")), 1) ]), _: 1 }, 8, ["class"]) ], 2) ], 40, ["onKeydown"])), [ [y(D8), we] ]) ]), default: R(() => [ B("div", Lt({ id: y(u), ref_key: "triggerRef", ref: v }, se.$attrs, { class: y(M), role: "button", "aria-label": y(I), "aria-labelledby": y(P), "aria-description": y(o)("el.colorpicker.description", { color: se.modelValue || "" }), "aria-disabled": y(l), tabindex: y(l) ? -1 : se.tabindex, onKeydown: de, onFocus: y(b), onBlur: y(C) }), [ y(l) ? (E(), L("div", { key: 0, class: V(y(a).be("picker", "mask")) }, null, 2)) : Z("v-if", !0), B("div", { class: V(y(a).be("picker", "trigger")), onClick: ie }, [ B("span", { class: V([y(a).be("picker", "color"), y(a).is("alpha", se.showAlpha)]) }, [ B("span", { class: V(y(a).be("picker", "color-inner")), style: Ze({ backgroundColor: y(O) }) }, [ Ne(W(y(gr), { class: V([y(a).be("picker", "icon"), y(a).is("icon-arrow-down")]) }, { default: R(() => [ W(y(Z0)) ]), _: 1 }, 8, ["class"]), [ [ft, se.modelValue || S.value] ]), Ne(W(y(gr), { class: V([y(a).be("picker", "empty"), y(a).is("icon-close")]) }, { default: R(() => [ W(y(Iv)) ]), _: 1 }, 8, ["class"]), [ [ft, !se.modelValue && !S.value] ]) ], 6) ], 2) ], 2) ], 16, ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex", "onFocus", "onBlur"]) ]), _: 1 }, 8, ["visible", "popper-class", "teleported", "transition", "onHide"])); } }); var wQ = /* @__PURE__ */ Ot(bQ, [["__file", "color-picker.vue"]]); const xQ = fr(wQ), kQ = K({ name: "ElContainer" }), CQ = /* @__PURE__ */ K({ ...kQ, props: { direction: { type: String } }, setup(e) { const t = e, n = Xr(), r = It("container"), o = $(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((a) => { const i = a.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (a, i) => (E(), L("section", { class: V([y(r).b(), y(r).is("vertical", y(o))]) }, [ oe(a.$slots, "default") ], 2)); } }); var SQ = /* @__PURE__ */ Ot(CQ, [["__file", "container.vue"]]); const EQ = K({ name: "ElAside" }), $Q = /* @__PURE__ */ K({ ...EQ, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = It("aside"), r = $(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (E(), L("aside", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var U8 = /* @__PURE__ */ Ot($Q, [["__file", "aside.vue"]]); const _Q = K({ name: "ElFooter" }), TQ = /* @__PURE__ */ K({ ..._Q, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = It("footer"), r = $(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (E(), L("footer", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var q8 = /* @__PURE__ */ Ot(TQ, [["__file", "footer.vue"]]); const OQ = K({ name: "ElHeader" }), FQ = /* @__PURE__ */ K({ ...OQ, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = It("header"), r = $(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (E(), L("header", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var W8 = /* @__PURE__ */ Ot(FQ, [["__file", "header.vue"]]); const IQ = K({ name: "ElMain" }), AQ = /* @__PURE__ */ K({ ...IQ, setup(e) { const t = It("main"); return (n, r) => (E(), L("main", { class: V(y(t).b()) }, [ oe(n.$slots, "default") ], 2)); } }); var G8 = /* @__PURE__ */ Ot(AQ, [["__file", "main.vue"]]); const K8 = fr(SQ, { Aside: U8, Footer: q8, Header: W8, Main: G8 }); Hi(U8); Hi(q8); const Y8 = Hi(W8), $2 = Hi(G8), PQ = /* @__PURE__ */ K({ inheritAttrs: !1 }); function LQ(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var RQ = /* @__PURE__ */ Ot(PQ, [["render", LQ], ["__file", "collection.vue"]]); const DQ = /* @__PURE__ */ K({ name: "ElCollectionItem", inheritAttrs: !1 }); function MQ(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var NQ = /* @__PURE__ */ Ot(DQ, [["render", MQ], ["__file", "collection-item.vue"]]); const BQ = "data-el-collection-item", zQ = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...RQ, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); tt(r, { itemMap: l, getItems: () => { const u = y(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${BQ}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...NQ, name: n, setup(s, { attrs: l }) { const u = z(null), c = xe(r, void 0); tt(o, { collectionItemRef: u }), at(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, Vm = rn({ trigger: dp.trigger, effect: { ...to.effect, default: "light" }, type: { type: wt(String) }, placement: { type: wt(String), default: "bottom" }, popperOptions: { type: wt(Object), default: () => ({}) }, id: String, size: { type: String, default: "" }, splitButton: Boolean, hideOnClick: { type: Boolean, default: !0 }, loop: { type: Boolean, default: !0 }, showTimeout: { type: Number, default: 150 }, hideTimeout: { type: Number, default: 150 }, tabindex: { type: wt([Number, String]), default: 0 }, maxHeight: { type: wt([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: wt(Object) }, teleported: to.teleported }); rn({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: Is } }); rn({ onKeydown: { type: wt(Function) } }); zQ("Dropdown"); const X8 = Symbol("ElSelectGroup"), lf = Symbol("ElSelect"); function VQ(e, t) { const n = xe(lf), r = xe(X8, { disabled: !1 }), o = $(() => c(gs(n.props.modelValue), e.value)), a = $(() => { var h; if (n.props.multiple) { const p = gs((h = n.props.modelValue) != null ? h : []); return !o.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = $(() => e.label || (br(e.value) ? "" : e.value)), s = $(() => e.value || e.label || ""), l = $(() => e.disabled || t.groupDisabled || a.value), u = rt(), c = (h = [], p) => { if (br(e.value)) { const v = n.props.valueKey; return h && h.some((m) => Ga(ki(m, v)) === ki(p, v)); } else return h && h.includes(p); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, f = (h) => { const p = new RegExp(GG(h), "i"); t.visible = p.test(i.value) || e.created; }; return ce(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), ce(() => e.value, (h, p) => { const { remote: v, valueKey: m } = n.props; if (h !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && br(h) && br(p) && h[m] === p[m]) return; n.setSelected(); } }), ce(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: l, hoverItem: d, updateOption: f }; } const jQ = K({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = It("select"), n = tg(), r = $(() => [ t.be("dropdown", "item"), t.is("disabled", y(s)), t.is("selected", y(i)), t.is("hovering", y(f)) ]), o = Kt({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = VQ(e, o), { visible: d, hover: f } = Vr(o), h = rt().proxy; l.onOptionCreate(h), Tt(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((b) => b.value === h.value); Ue(() => { l.states.cachedOptions.get(v) === h && !g && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: o }; } }); function HQ(e, t, n, r, o, a) { return Ne((E(), L("li", { id: e.id, class: V(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Je(e.selectOptionClick, ["stop"]) }, [ oe(e.$slots, "default", {}, () => [ B("span", null, me(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ft, e.visible] ]); } var _2 = /* @__PURE__ */ Ot(jQ, [["render", HQ], ["__file", "option.vue"]]); const UQ = K({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = xe(lf), t = It("select"), n = $(() => e.props.popperClass), r = $(() => e.props.multiple), o = $(() => e.props.fitInputWidth), a = z(""); function i() { var s; a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return at(() => { i(), wi(e.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function qQ(e, t, n, r, o, a) { return E(), L("div", { class: V([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Ze({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? (E(), L("div", { key: 0, class: V(e.ns.be("dropdown", "header")) }, [ oe(e.$slots, "header") ], 2)) : Z("v-if", !0), oe(e.$slots, "default"), e.$slots.footer ? (E(), L("div", { key: 1, class: V(e.ns.be("dropdown", "footer")) }, [ oe(e.$slots, "footer") ], 2)) : Z("v-if", !0) ], 6); } var WQ = /* @__PURE__ */ Ot(UQ, [["render", qQ], ["__file", "select-dropdown.vue"]]); const GQ = 11, KQ = (e, t) => { const { t: n } = Qp(), r = tg(), o = It("select"), a = It("input"), i = Kt({ inputValue: "", options: /* @__PURE__ */ new Map(), cachedOptions: /* @__PURE__ */ new Map(), disabledOptions: /* @__PURE__ */ new Map(), optionValues: [], selected: [], selectionWidth: 0, calculatorWidth: 0, collapseItemWidth: 0, selectedLabel: "", hoveringIndex: -1, previousQuery: null, inputHovering: !1, menuVisibleOnFocus: !1, isBeforeHide: !1 }), s = z(null), l = z(null), u = z(null), c = z(null), d = z(null), f = z(null), h = z(null), p = z(null), v = z(null), m = z(null), g = z(null), b = z(null), { isComposing: C, handleCompositionStart: x, handleCompositionUpdate: w, handleCompositionEnd: k } = C8({ afterComposition: (D) => ge(D) }), { wrapperRef: S, isFocused: _ } = y2(d, { beforeFocus() { return A.value; }, afterFocus() { e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(D) { var ne, Oe; return ((ne = u.value) == null ? void 0 : ne.isFocusInsideContent(D)) || ((Oe = c.value) == null ? void 0 : Oe.isFocusInsideContent(D)); }, afterBlur() { O.value = !1, i.menuVisibleOnFocus = !1; } }), O = z(!1), F = z(), { form: I, formItem: P } = ou(), { inputId: M } = rf(e, { formItemContext: P }), { valueOnClear: N, isEmptyValue: j } = lX(e), A = $(() => e.disabled || (I == null ? void 0 : I.disabled)), U = $(() => oo(e.modelValue) ? e.modelValue.length > 0 : !j(e.modelValue)), q = $(() => e.clearable && !A.value && i.inputHovering && U.value), Y = $(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), ie = $(() => o.is("reverse", Y.value && O.value)), re = $(() => (P == null ? void 0 : P.validateState) || ""), le = $(() => e8[re.value]), he = $(() => e.remote ? 300 : 0), we = $(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !i.inputValue && i.options.size === 0 ? !1 : e.filterable && i.inputValue && i.options.size > 0 && be.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), be = $(() => de.value.filter((D) => D.visible).length), de = $(() => { const D = Array.from(i.options.values()), ne = []; return i.optionValues.forEach((Oe) => { const We = D.findIndex((Zt) => Zt.value === Oe); We > -1 && ne.push(D[We]); }), ne.length >= D.length ? ne : D; }), ae = $(() => Array.from(i.cachedOptions.values())), ee = $(() => { const D = de.value.filter((ne) => !ne.created).some((ne) => ne.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !D; }), se = () => { e.filterable && Kr(e.filterMethod) || e.filterable && e.remote && Kr(e.remoteMethod) || de.value.forEach((D) => { var ne; (ne = D.updateOption) == null || ne.call(D, i.inputValue); }); }, pe = Rl(), Se = $(() => ["small"].includes(pe.value) ? "small" : "default"), Le = $({ get() { return O.value && we.value !== !1; }, set(D) { O.value = D; } }), je = $(() => { if (e.multiple && !ws(e.modelValue)) return gs(e.modelValue).length === 0 && !i.inputValue; const D = oo(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || ws(D) ? !i.inputValue : !0; }), _e = $(() => { var D; const ne = (D = e.placeholder) != null ? D : n("el.select.placeholder"); return e.multiple || !U.value ? ne : i.selectedLabel; }), ze = $(() => W1 ? null : "mouseenter"); ce(() => e.modelValue, (D, ne) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ie("")), qe(), !Ov(D, ne) && e.validateEvent && (P == null || P.validate("change").catch((Oe) => qn(Oe))); }, { flush: "post", deep: !0 }), ce(() => O.value, (D) => { D ? Ie(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", D); }), ce(() => i.options.entries(), () => { var D; if (!Un) return; const ne = ((D = s.value) == null ? void 0 : D.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !ws(e.modelValue) || !Array.from(ne).includes(document.activeElement)) && qe(), e.defaultFirstOption && (e.filterable || e.remote) && be.value && He(); }, { flush: "post" }), ce(() => i.hoveringIndex, (D) => { wr(D) && D > -1 ? F.value = de.value[D] || {} : F.value = {}, de.value.forEach((ne) => { ne.hover = F.value === ne; }); }), qp(() => { i.isBeforeHide || se(); }); const Ie = (D) => { i.previousQuery === D || C.value || (i.previousQuery = D, e.filterable && Kr(e.filterMethod) ? e.filterMethod(D) : e.filterable && e.remote && Kr(e.remoteMethod) && e.remoteMethod(D), e.defaultFirstOption && (e.filterable || e.remote) && be.value ? Ue(He) : Ue(Ve)); }, He = () => { const D = de.value.filter((We) => We.visible && !We.disabled && !We.states.groupDisabled), ne = D.find((We) => We.created), Oe = D[0]; i.hoveringIndex = Te(de.value, ne || Oe); }, qe = () => { if (e.multiple) i.selectedLabel = ""; else { const ne = oo(e.modelValue) ? e.modelValue[0] : e.modelValue, Oe = et(ne); i.selectedLabel = Oe.currentLabel, i.selected = [Oe]; return; } const D = []; ws(e.modelValue) || gs(e.modelValue).forEach((ne) => { D.push(et(ne)); }), i.selected = D; }, et = (D) => { let ne; const Oe = Tm(D).toLowerCase() === "object", We = Tm(D).toLowerCase() === "null", Zt = Tm(D).toLowerCase() === "undefined"; for (let Tn = i.cachedOptions.size - 1; Tn >= 0; Tn--) { const on = ae.value[Tn]; if (Oe ? ki(on.value, e.valueKey) === ki(D, e.valueKey) : on.value === D) { ne = { value: D, currentLabel: on.currentLabel, get isDisabled() { return on.isDisabled; } }; break; } } if (ne) return ne; const _n = Oe ? D.label : !We && !Zt ? D : ""; return { value: D, currentLabel: _n }; }, Ve = () => { i.hoveringIndex = de.value.findIndex((D) => i.selected.some((ne) => wn(ne) === wn(D))); }, nt = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, ot = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, pt = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, T = () => { var D, ne; (ne = (D = u.value) == null ? void 0 : D.updatePopper) == null || ne.call(D); }, G = () => { var D, ne; (ne = (D = c.value) == null ? void 0 : D.updatePopper) == null || ne.call(D); }, fe = () => { i.inputValue.length > 0 && !O.value && (O.value = !0), Ie(i.inputValue); }, ge = (D) => { if (i.inputValue = D.target.value, e.remote) ve(); else return fe(); }, ve = K_(() => { fe(); }, he.value), Fe = (D) => { Ov(e.modelValue, D) || t(l2, D); }, Ce = (D) => VG(D, (ne) => !i.disabledOptions.has(ne)), Re = (D) => { if (e.multiple && D.code !== er.delete && D.target.value.length <= 0) { const ne = gs(e.modelValue).slice(), Oe = Ce(ne); if (Oe < 0) return; const We = ne[Oe]; ne.splice(Oe, 1), t(vr, ne), Fe(ne), t("remove-tag", We); } }, lt = (D, ne) => { const Oe = i.selected.indexOf(ne); if (Oe > -1 && !A.value) { const We = gs(e.modelValue).slice(); We.splice(Oe, 1), t(vr, We), Fe(We), t("remove-tag", ne.value); } D.stopPropagation(), Nt(); }, ut = (D) => { D.stopPropagation(); const ne = e.multiple ? [] : N.value; if (e.multiple) for (const Oe of i.selected) Oe.isDisabled && ne.push(Oe.value); t(vr, ne), Fe(ne), i.hoveringIndex = -1, O.value = !1, t("clear"), Nt(); }, ue = (D) => { var ne; if (e.multiple) { const Oe = gs((ne = e.modelValue) != null ? ne : []).slice(), We = Te(Oe, D.value); We > -1 ? Oe.splice(We, 1) : (e.multipleLimit <= 0 || Oe.length < e.multipleLimit) && Oe.push(D.value), t(vr, Oe), Fe(Oe), D.created && Ie(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(vr, D.value), Fe(D.value), O.value = !1; Nt(), !O.value && Ue(() => { ke(D); }); }, Te = (D = [], ne) => { if (!br(ne)) return D.indexOf(ne); const Oe = e.valueKey; let We = -1; return D.some((Zt, _n) => Ga(ki(Zt, Oe)) === ki(ne, Oe) ? (We = _n, !0) : !1), We; }, ke = (D) => { var ne, Oe, We, Zt, _n; const Tn = oo(D) ? D[0] : D; let on = null; if (Tn != null && Tn.value) { const Jt = de.value.filter((Po) => Po.value === Tn.value); Jt.length > 0 && (on = Jt[0].$el); } if (u.value && on) { const Jt = (Zt = (We = (Oe = (ne = u.value) == null ? void 0 : ne.popperRef) == null ? void 0 : Oe.contentRef) == null ? void 0 : We.querySelector) == null ? void 0 : Zt.call(We, `.${o.be("dropdown", "wrap")}`); Jt && XG(Jt, on); } (_n = b.value) == null || _n.handleScroll(); }, Be = (D) => { i.options.set(D.value, D), i.cachedOptions.set(D.value, D), D.disabled && i.disabledOptions.set(D.value, D); }, Dt = (D, ne) => { i.options.get(D) === ne && i.options.delete(D); }, Ft = $(() => { var D, ne; return (ne = (D = u.value) == null ? void 0 : D.popperRef) == null ? void 0 : ne.contentRef; }), zt = () => { i.isBeforeHide = !1, Ue(() => ke(i.selected)); }, Nt = () => { var D; (D = d.value) == null || D.focus(); }, Yt = () => { var D; (D = d.value) == null || D.blur(); }, Ln = (D) => { ut(D); }, pn = () => { O.value = !1, _.value && Yt(); }, fn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1; }, Fn = () => { A.value || (W1 && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value); }, Rn = () => { O.value ? de.value[i.hoveringIndex] && ue(de.value[i.hoveringIndex]) : Fn(); }, wn = (D) => br(D.value) ? ki(D.value, e.valueKey) : D.value, sr = $(() => de.value.filter((D) => D.visible).every((D) => D.disabled)), Xn = $(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), Zn = $(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Xt = (D) => { if (!O.value) { O.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || C.value) && !sr.value) { D === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : D === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ne = de.value[i.hoveringIndex]; (ne.disabled === !0 || ne.states.groupDisabled === !0 || !ne.visible) && Xt(D), Ue(() => ke(F.value)); } }, hn = () => { if (!l.value) return 0; const D = window.getComputedStyle(l.value); return Number.parseFloat(D.gap || "6px"); }, $n = $(() => { const D = hn(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - D : i.selectionWidth}px` }; }), lr = $(() => ({ maxWidth: `${i.selectionWidth}px` })), Ao = $(() => ({ width: `${Math.max(i.calculatorWidth, GQ)}px` })); return wi(l, nt), wi(f, ot), wi(v, T), wi(S, T), wi(m, G), wi(g, pt), at(() => { qe(); }), { inputId: M, contentId: r, nsSelect: o, nsInput: a, states: i, isFocused: _, expanded: O, optionsArray: de, hoverOption: F, selectSize: pe, filteredOptionsCount: be, resetCalculatorWidth: ot, updateTooltip: T, updateTagTooltip: G, debouncedOnInputChange: ve, onInput: ge, deletePrevTag: Re, deleteTag: lt, deleteSelected: ut, handleOptionSelect: ue, scrollToOption: ke, hasModelValue: U, shouldShowPlaceholder: je, currentPlaceholder: _e, mouseEnterEventName: ze, showClose: q, iconComponent: Y, iconReverse: ie, validateState: re, validateIcon: le, showNewOption: ee, updateOptions: se, collapseTagSize: Se, setSelected: qe, selectDisabled: A, emptyText: we, handleCompositionStart: x, handleCompositionUpdate: w, handleCompositionEnd: k, onOptionCreate: Be, onOptionDestroy: Dt, handleMenuEnter: zt, focus: Nt, blur: Yt, handleClearClick: Ln, handleClickOutside: pn, handleEsc: fn, toggleMenu: Fn, selectOption: Rn, getValueKey: wn, navigateOptions: Xt, dropdownMenuVisible: Le, showTagList: Xn, collapseTagList: Zn, tagStyle: $n, collapseTagStyle: lr, inputStyle: Ao, popperRef: Ft, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var YQ = K({ name: "ElOptions", setup(e, { slots: t }) { const n = xe(lf); let r = []; return () => { var o, a; const i = (o = t.default) == null ? void 0 : o.call(t), s = []; function l(u) { oo(u) && u.forEach((c) => { var d, f, h, p; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!Mr(c.children) && !oo(c.children) && Kr((f = c.children) == null ? void 0 : f.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : oo(c.children) && l(c.children); }); } return i.length && l((a = i[0]) == null ? void 0 : a.children), Ov(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const XQ = rn({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Ac, effect: { type: wt(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: wt(Object), default: () => ({}) }, remote: Boolean, loadingText: String, noMatchText: String, noDataText: String, remoteMethod: Function, filterMethod: Function, multiple: Boolean, multipleLimit: { type: Number, default: 0 }, placeholder: { type: String }, defaultFirstOption: Boolean, reserveKeyword: { type: Boolean, default: !0 }, valueKey: { type: String, default: "value" }, collapseTags: Boolean, collapseTagsTooltip: Boolean, maxCollapseTags: { type: Number, default: 1 }, teleported: to.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: Is, default: i2 }, fitInputWidth: Boolean, suffixIcon: { type: Is, default: Z0 }, tagType: { ...oy.type, default: "info" }, tagEffect: { ...oy.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: wt(String), values: Q0, default: "bottom-start" }, fallbackPlacements: { type: wt(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...sX, ...Us(["ariaLabel"]) }), g5 = "ElSelect", ZQ = K({ name: g5, componentName: g5, components: { ElSelectMenu: WQ, ElOption: _2, ElOptions: YQ, ElTag: DJ, ElScrollbar: NX, ElTooltip: af, ElIcon: gr }, directives: { ClickOutside: D8 }, props: XQ, emits: [ vr, l2, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = $(() => { const { modelValue: a, multiple: i } = e, s = i ? [] : void 0; return oo(a) ? i ? a : s : i ? s : a; }), r = Kt({ ...Vr(e), modelValue: n }), o = KQ(r, t); return tt(lf, Kt({ props: r, states: o.states, optionsArray: o.optionsArray, handleOptionSelect: o.handleOptionSelect, onOptionCreate: o.onOptionCreate, onOptionDestroy: o.onOptionDestroy, selectRef: o.selectRef, setSelected: o.setSelected })), { ...o, modelValue: n }; } }); function JQ(e, t, n, r, o, a) { const i = Xe("el-tag"), s = Xe("el-tooltip"), l = Xe("el-icon"), u = Xe("el-option"), c = Xe("el-options"), d = Xe("el-scrollbar"), f = Xe("el-select-menu"), h = yb("click-outside"); return Ne((E(), L("div", { ref: "selectRef", class: V([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [bb(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ W(s, { ref: "tooltipRef", visible: e.dropdownMenuVisible, placement: e.placement, teleported: e.teleported, "popper-class": [e.nsSelect.e("popper"), e.popperClass], "popper-options": e.popperOptions, "fallback-placements": e.fallbackPlacements, effect: e.effect, pure: "", trigger: "click", transition: `${e.nsSelect.namespace.value}-zoom-in-top`, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, persistent: e.persistent, "append-to": e.appendTo, onBeforeShow: e.handleMenuEnter, onHide: (p) => e.states.isBeforeHide = !1 }, { default: R(() => { var p; return [ B("div", { ref: "wrapperRef", class: V([ 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: Je(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (E(), L("div", { key: 0, ref: "prefixRef", class: V(e.nsSelect.e("prefix")) }, [ oe(e.$slots, "prefix") ], 2)) : Z("v-if", !0), B("div", { ref: "selectionRef", class: V([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? oe(e.$slots, "tag", { key: 0 }, () => [ (E(!0), L(De, null, xt(e.showTagList, (v) => (E(), L("div", { key: e.getValueKey(v), class: V(e.nsSelect.e("selected-item")) }, [ W(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ze(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, [ oe(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Ae(me(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (E(), Q(s, { key: 0, ref: "tagTooltipRef", disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e.effect, placement: "bottom", teleported: e.teleported }, { default: R(() => [ B("div", { ref: "collapseItemRef", class: V(e.nsSelect.e("selected-item")) }, [ W(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ze(e.collapseTagStyle) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, " + " + me(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: R(() => [ B("div", { ref: "tagMenuRef", class: V(e.nsSelect.e("selection")) }, [ (E(!0), L(De, null, xt(e.collapseTagList, (v) => (E(), L("div", { key: e.getValueKey(v), class: V(e.nsSelect.e("selected-item")) }, [ W(i, { class: "in-tooltip", closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", onClose: (m) => e.deleteTag(m, v) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, [ oe(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Ae(me(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : Z("v-if", !0) ]) : Z("v-if", !0), e.selectDisabled ? Z("v-if", !0) : (E(), L("div", { key: 1, class: V([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Ne(B("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: V([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Ze(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: [ yn(Je((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), yn(Je((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), yn(Je(e.handleEsc, ["stop", "prevent"]), ["esc"]), yn(Je(e.selectOption, ["stop", "prevent"]), ["enter"]), yn(Je(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Je(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"]), [ [C0, e.states.inputValue] ]), e.filterable ? (E(), L("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: V(e.nsSelect.e("input-calculator")), textContent: me(e.states.inputValue) }, null, 10, ["textContent"])) : Z("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (E(), L("div", { key: 2, class: V([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? oe(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ B("span", null, me(e.currentPlaceholder), 1) ]) : (E(), L("span", { key: 1 }, me(e.currentPlaceholder), 1)) ], 2)) : Z("v-if", !0) ], 2), B("div", { ref: "suffixRef", class: V(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (E(), Q(l, { key: 0, class: V([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: R(() => [ (E(), Q(vt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), e.showClose && e.clearIcon ? (E(), Q(l, { key: 1, class: V([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: R(() => [ (E(), Q(vt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0), e.validateState && e.validateIcon ? (E(), Q(l, { key: 2, class: V([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: R(() => [ (E(), Q(vt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: R(() => [ W(f, { ref: "menuRef" }, { default: R(() => [ e.$slots.header ? (E(), L("div", { key: 0, class: V(e.nsSelect.be("dropdown", "header")), onClick: Je(() => { }, ["stop"]) }, [ oe(e.$slots, "header") ], 10, ["onClick"])) : Z("v-if", !0), Ne(W(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: V([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: R(() => [ e.showNewOption ? (E(), Q(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : Z("v-if", !0), W(c, null, { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ft, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (E(), L("div", { key: 1, class: V(e.nsSelect.be("dropdown", "loading")) }, [ oe(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (E(), L("div", { key: 2, class: V(e.nsSelect.be("dropdown", "empty")) }, [ oe(e.$slots, "empty", {}, () => [ B("span", null, me(e.emptyText), 1) ]) ], 2)) : Z("v-if", !0), e.$slots.footer ? (E(), L("div", { key: 3, class: V(e.nsSelect.be("dropdown", "footer")), onClick: Je(() => { }, ["stop"]) }, [ oe(e.$slots, "footer") ], 10, ["onClick"])) : Z("v-if", !0) ]), _: 3 }, 512) ]), _: 3 }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"]) ], 16, ["onMouseleave"])), [ [h, e.handleClickOutside, e.popperRef] ]); } var QQ = /* @__PURE__ */ Ot(ZQ, [["render", JQ], ["__file", "select.vue"]]); const eee = K({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = It("select"), n = z(null), r = rt(), o = z([]); tt(X8, Kt({ ...Vr(e) })); const a = $(() => o.value.some((u) => u.visible === !0)), i = (u) => { var c, d; return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy); }, s = (u) => { const c = gs(u), d = []; return c.forEach((f) => { var h, p; i(f) ? d.push(f.component.proxy) : (h = f.children) != null && h.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree)); }), d; }, l = () => { o.value = s(r.subTree); }; return at(() => { l(); }), jH(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: a, ns: t }; } }); function tee(e, t, n, r, o, a) { return Ne((E(), L("ul", { ref: "groupRef", class: V(e.ns.be("group", "wrap")) }, [ B("li", { class: V(e.ns.be("group", "title")) }, me(e.label), 3), B("li", null, [ B("ul", { class: V(e.ns.b("group")) }, [ oe(e.$slots, "default") ], 2) ]) ], 2)), [ [ft, e.visible] ]); } var Z8 = /* @__PURE__ */ Ot(eee, [["render", tee], ["__file", "option-group.vue"]]); const nee = fr(QQ, { Option: _2, OptionGroup: Z8 }), ree = Hi(_2); Hi(Z8); const oee = rn({ trigger: dp.trigger, placement: Vm.placement, disabled: dp.disabled, visible: to.visible, transition: to.transition, popperOptions: Vm.popperOptions, tabindex: Vm.tabindex, content: to.content, popperStyle: to.popperStyle, popperClass: to.popperClass, enterable: { ...to.enterable, default: !0 }, effect: { ...to.effect, default: "light" }, teleported: to.teleported, title: String, width: { type: [String, Number], default: 150 }, offset: { type: Number, default: void 0 }, showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 }, showArrow: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, "onUpdate:visible": { type: Function } }), aee = { "update:visible": (e) => oc(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, iee = "onUpdate:visible", see = K({ name: "ElPopover" }), lee = /* @__PURE__ */ K({ ...see, props: oee, emits: aee, setup(e, { expose: t, emit: n }) { const r = e, o = $(() => r[iee]), a = It("popover"), i = z(), s = $(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = $(() => [ { width: ac(r.width) }, r.popperStyle ]), u = $(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = $(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (E(), Q(y(af), Lt({ ref_key: "tooltipRef", ref: i }, m.$attrs, { trigger: m.trigger, placement: m.placement, disabled: m.disabled, visible: m.visible, transition: m.transition, "popper-options": m.popperOptions, tabindex: m.tabindex, content: m.content, offset: m.offset, "show-after": m.showAfter, "hide-after": m.hideAfter, "auto-close": m.autoClose, "show-arrow": m.showArrow, "aria-label": m.title, effect: m.effect, enterable: m.enterable, "popper-class": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: R(() => [ m.title ? (E(), L("div", { key: 0, class: V(y(a).e("title")), role: "title" }, me(m.title), 3)) : Z("v-if", !0), oe(m.$slots, "default", {}, () => [ Ae(me(m.content), 1) ]) ]), default: R(() => [ m.$slots.reference ? oe(m.$slots, "reference", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"])); } }); var uee = /* @__PURE__ */ Ot(lee, [["__file", "popover.vue"]]); const m5 = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var cee = { mounted(e, t) { m5(e, t); }, updated(e, t) { m5(e, t); } }; const dee = "popover", pee = IK(cee, dee), og = fr(uee, { directive: pee }), Hu = "$treeNodeId", y5 = function(e, t) { !t || t[Hu] || Object.defineProperty(t, Hu, { value: e.id, enumerable: !1, configurable: !1, writable: !1 }); }, T2 = function(e, t) { return e ? t[e] : t[Hu]; }, ay = (e, t, n) => { const r = e.value.currentNode; n(); const o = e.value.currentNode; r !== o && t("current-change", o ? o.data : null, o); }, iy = (e) => { let t = !0, n = !0, r = !0; for (let o = 0, a = e.length; o < a; o++) { const i = e[o]; (i.checked !== !0 || i.indeterminate) && (t = !1, i.disabled || (r = !1)), (i.checked !== !1 || i.indeterminate) && (n = !1); } return { all: t, none: n, allWithoutDisable: r, half: !t && !n }; }, Td = function(e) { if (e.childNodes.length === 0 || e.loading) return; const { all: t, none: n, half: r } = iy(e.childNodes); t ? (e.checked = !0, e.indeterminate = !1) : r ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1); const o = e.parent; !o || o.level === 0 || e.store.checkStrictly || Td(o); }, nh = function(e, t) { const n = e.store.props, r = e.data || {}, o = n[t]; if (typeof o == "function") return o(r, e); if (typeof o == "string") return r[o]; if (typeof o > "u") { const a = r[t]; return a === void 0 ? "" : a; } }; let fee = 0, sy = class Wh { constructor(t) { this.id = fee++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1; for (const n in t) Pl(t, n) && (this[n] = t[n]); this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1); } initialize() { const t = this.store; if (!t) throw new Error("[Node]store is required!"); t.registerNode(this); const n = t.props; if (n && typeof n.isLeaf < "u") { const a = nh(this, "isLeaf"); typeof a == "boolean" && (this.isLeafByUser = a); } if (t.lazy !== !0 && this.data ? (this.setData(this.data), t.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && t.lazy && t.defaultExpandAll && !this.isLeafByUser && this.expand(), Array.isArray(this.data) || y5(this, this.data), !this.data) return; const r = t.defaultExpandedKeys, o = t.key; o && r && r.includes(this.key) && this.expand(null, t.autoExpandParent), o && t.currentNodeKey !== void 0 && this.key === t.currentNodeKey && (t.currentNode = this, t.currentNode.isCurrent = !0), t.lazy && t._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0); } setData(t) { Array.isArray(t) || y5(this, t), this.data = t, this.childNodes = []; let n; this.level === 0 && Array.isArray(this.data) ? n = this.data : n = nh(this, "children") || []; for (let r = 0, o = n.length; r < o; r++) this.insertChild({ data: n[r] }); } get label() { return nh(this, "label"); } get key() { const t = this.store.key; return this.data ? this.data[t] : null; } get disabled() { return nh(this, "disabled"); } get nextSibling() { const t = this.parent; if (t) { const n = t.childNodes.indexOf(this); if (n > -1) return t.childNodes[n + 1]; } return null; } get previousSibling() { const t = this.parent; if (t) { const n = t.childNodes.indexOf(this); if (n > -1) return n > 0 ? t.childNodes[n - 1] : null; } return null; } contains(t, n = !0) { return (this.childNodes || []).some((r) => r === t || n && r.contains(t)); } remove() { const t = this.parent; t && t.removeChild(this); } insertChild(t, n, r) { if (!t) throw new Error("InsertChild error: child is required."); if (!(t instanceof Wh)) { if (!r) { const o = this.getChildren(!0); o.includes(t.data) || (typeof n > "u" || n < 0 ? o.push(t.data) : o.splice(n, 0, t.data)); } Object.assign(t, { parent: this, store: this.store }), t = Kt(new Wh(t)), t instanceof Wh && t.initialize(); } t.level = this.level + 1, typeof n > "u" || n < 0 ? this.childNodes.push(t) : this.childNodes.splice(n, 0, t), this.updateLeafState(); } insertBefore(t, n) { let r; n && (r = this.childNodes.indexOf(n)), this.insertChild(t, r); } insertAfter(t, n) { let r; n && (r = this.childNodes.indexOf(n), r !== -1 && (r += 1)), this.insertChild(t, r); } removeChild(t) { const n = this.getChildren() || [], r = n.indexOf(t.data); r > -1 && n.splice(r, 1); const o = this.childNodes.indexOf(t); o > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(o, 1)), this.updateLeafState(); } removeChildByData(t) { let n = null; for (let r = 0; r < this.childNodes.length; r++) if (this.childNodes[r].data === t) { n = this.childNodes[r]; break; } n && this.removeChild(n); } expand(t, n) { const r = () => { if (n) { let o = this.parent; for (; o.level > 0; ) o.expanded = !0, o = o.parent; } this.expanded = !0, t && t(), this.childNodes.forEach((o) => { o.canFocus = !0; }); }; this.shouldLoadData() ? this.loadData((o) => { Array.isArray(o) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || Td(this), r()); }) : r(); } doCreateChildren(t, n = {}) { t.forEach((r) => { this.insertChild(Object.assign({ data: r }, n), void 0, !0); }); } collapse() { this.expanded = !1, this.childNodes.forEach((t) => { t.canFocus = !1; }); } shouldLoadData() { return this.store.lazy === !0 && this.store.load && !this.loaded; } updateLeafState() { if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") { this.isLeaf = this.isLeafByUser; return; } const t = this.childNodes; if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) { this.isLeaf = !t || t.length === 0; return; } this.isLeaf = !1; } setChecked(t, n, r, o) { if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: i, allWithoutDisable: s } = iy(this.childNodes); !this.isLeaf && !i && s && (this.checked = !1, t = !1); const l = () => { if (n) { const u = this.childNodes; for (let f = 0, h = u.length; f < h; f++) { const p = u[f]; o = o || t !== !1; const v = p.disabled ? p.checked : o; p.setChecked(v, n, !0, o); } const { half: c, all: d } = iy(u); d || (this.checked = d, this.indeterminate = c); } }; if (this.shouldLoadData()) { this.loadData(() => { l(), Td(this); }, { checked: t !== !1 }); return; } else l(); } const a = this.parent; !a || a.level === 0 || r || Td(a); } getChildren(t = !1) { if (this.level === 0) return this.data; const n = this.data; if (!n) return null; const r = this.store.props; let o = "children"; return r && (o = r.children || "children"), n[o] === void 0 && (n[o] = null), t && !n[o] && (n[o] = []), n[o]; } updateChildren() { const t = this.getChildren() || [], n = this.childNodes.map((a) => a.data), r = {}, o = []; t.forEach((a, i) => { const s = a[Hu]; s && n.findIndex((l) => l[Hu] === s) >= 0 ? r[s] = { index: i, data: a } : o.push({ index: i, data: a }); }), this.store.lazy || n.forEach((a) => { r[a[Hu]] || this.removeChildByData(a); }), o.forEach(({ index: a, data: i }) => { this.insertChild({ data: i }, a); }), this.updateLeafState(); } loadData(t, n = {}) { if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(n).length)) { this.loading = !0; const r = (a) => { this.childNodes = [], this.doCreateChildren(a, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, a); }, o = () => { this.loading = !1; }; this.store.load(this, r, o); } else t && t.call(this); } eachNode(t) { const n = [this]; for (; n.length; ) { const r = n.shift(); n.unshift(...r.childNodes), t(r); } } reInitChecked() { this.store.checkStrictly || Td(this); } }, hee = class { constructor(t) { this.currentNode = null, this.currentNodeKey = null; for (const n in t) Pl(t, n) && (this[n] = t[n]); this.nodesMap = {}; } initialize() { if (this.root = new sy({ data: this.data, store: this }), this.root.initialize(), this.lazy && this.load) { const t = this.load; t(this.root, (n) => { this.root.doCreateChildren(n), this._initDefaultCheckedNodes(); }); } else this._initDefaultCheckedNodes(); } filter(t) { const n = this.filterNodeMethod, r = this.lazy, o = function(a) { const i = a.root ? a.root.childNodes : a.childNodes; if (i.forEach((s) => { s.visible = n.call(s, t, s.data, s), o(s); }), !a.visible && i.length) { let s = !0; s = !i.some((l) => l.visible), a.root ? a.root.visible = s === !1 : a.visible = s === !1; } t && a.visible && !a.isLeaf && (!r || a.loaded) && a.expand(); }; o(this); } setData(t) { t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes()) : this.root.updateChildren(); } getNode(t) { if (t instanceof sy) return t; const n = br(t) ? T2(this.key, t) : t; return this.nodesMap[n] || null; } insertBefore(t, n) { const r = this.getNode(n); r.parent.insertBefore({ data: t }, r); } insertAfter(t, n) { const r = this.getNode(n); r.parent.insertAfter({ data: t }, r); } remove(t) { const n = this.getNode(t); n && n.parent && (n === this.currentNode && (this.currentNode = null), n.parent.removeChild(n)); } append(t, n) { const r = Fv(n) ? this.root : this.getNode(n); r && r.insertChild({ data: t }); } _initDefaultCheckedNodes() { const t = this.defaultCheckedKeys || [], n = this.nodesMap; t.forEach((r) => { const o = n[r]; o && o.setChecked(!0, !this.checkStrictly); }); } _initDefaultCheckedNode(t) { (this.defaultCheckedKeys || []).includes(t.key) && t.setChecked(!0, !this.checkStrictly); } setDefaultCheckedKey(t) { t !== this.defaultCheckedKeys && (this.defaultCheckedKeys = t, this._initDefaultCheckedNodes()); } registerNode(t) { const n = this.key; !t || !t.data || (n ? t.key !== void 0 && (this.nodesMap[t.key] = t) : this.nodesMap[t.id] = t); } deregisterNode(t) { !this.key || !t || !t.data || (t.childNodes.forEach((n) => { this.deregisterNode(n); }), delete this.nodesMap[t.key]); } getCheckedNodes(t = !1, n = !1) { const r = [], o = function(a) { (a.root ? a.root.childNodes : a.childNodes).forEach((i) => { (i.checked || n && i.indeterminate) && (!t || t && i.isLeaf) && r.push(i.data), o(i); }); }; return o(this), r; } getCheckedKeys(t = !1) { return this.getCheckedNodes(t).map((n) => (n || {})[this.key]); } getHalfCheckedNodes() { const t = [], n = function(r) { (r.root ? r.root.childNodes : r.childNodes).forEach((o) => { o.indeterminate && t.push(o.data), n(o); }); }; return n(this), t; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]); } _getAllNodes() { const t = [], n = this.nodesMap; for (const r in n) Pl(n, r) && t.push(n[r]); return t; } updateChildren(t, n) { const r = this.nodesMap[t]; if (!r) return; const o = r.childNodes; for (let a = o.length - 1; a >= 0; a--) { const i = o[a]; this.remove(i.data); } for (let a = 0, i = n.length; a < i; a++) { const s = n[a]; this.append(s, r.data); } } _setCheckedKeys(t, n = !1, r) { const o = this._getAllNodes().sort((l, u) => l.level - u.level), a = /* @__PURE__ */ Object.create(null), i = Object.keys(r); o.forEach((l) => l.setChecked(!1, !1)); const s = (l) => { l.childNodes.forEach((u) => { var c; a[u.data[t]] = !0, (c = u.childNodes) != null && c.length && s(u); }); }; for (let l = 0, u = o.length; l < u; l++) { const c = o[l], d = c.data[t].toString(); if (!i.includes(d)) { c.checked && !a[d] && c.setChecked(!1, !1); continue; } if (c.childNodes.length && s(c), c.isLeaf || this.checkStrictly) { c.setChecked(!0, !1); continue; } if (c.setChecked(!0, !0), n) { c.setChecked(!1, !1); const f = function(h) { h.childNodes.forEach((p) => { p.isLeaf || p.setChecked(!1, !1), f(p); }); }; f(c); } } } setCheckedNodes(t, n = !1) { const r = this.key, o = {}; t.forEach((a) => { o[(a || {})[r]] = !0; }), this._setCheckedKeys(r, n, o); } setCheckedKeys(t, n = !1) { this.defaultCheckedKeys = t; const r = this.key, o = {}; t.forEach((a) => { o[a] = !0; }), this._setCheckedKeys(r, n, o); } setDefaultExpandedKeys(t) { t = t || [], this.defaultExpandedKeys = t, t.forEach((n) => { const r = this.getNode(n); r && r.expand(null, this.autoExpandParent); }); } setChecked(t, n, r) { const o = this.getNode(t); o && o.setChecked(!!n, r); } getCurrentNode() { return this.currentNode; } setCurrentNode(t) { const n = this.currentNode; n && (n.isCurrent = !1), this.currentNode = t, this.currentNode.isCurrent = !0; } setUserCurrentNode(t, n = !0) { const r = t[this.key], o = this.nodesMap[r]; this.setCurrentNode(o), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0); } setCurrentNodeKey(t, n = !0) { if (t == null) { this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null; return; } const r = this.getNode(t); r && (this.setCurrentNode(r), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0)); } }; const vee = K({ name: "ElTreeNodeContent", props: { node: { type: Object, required: !0 }, renderContent: Function }, setup(e) { const t = It("tree"), n = xe("NodeInstance"), r = xe("RootTree"); return () => { const o = e.node, { data: a, store: i } = o; return e.renderContent ? e.renderContent(jt, { _self: n, node: o, data: a, store: i }) : oe(r.ctx.slots, "default", { node: o, data: a }, () => [ jt("span", { class: t.be("node", "label") }, [o.label]) ]); }; } }); var gee = /* @__PURE__ */ Ot(vee, [["__file", "tree-node-content.vue"]]); function J8(e) { const t = xe("TreeNodeMap", null), n = { treeNodeExpand: (r) => { e.node !== r && e.node.collapse(); }, children: [] }; return t && t.children.push(n), tt("TreeNodeMap", n), { broadcastExpanded: (r) => { if (e.accordion) for (const o of n.children) o.treeNodeExpand(r); } }; } const Q8 = Symbol("dragEvents"); function mee({ props: e, ctx: t, el$: n, dropIndicator$: r, store: o }) { const a = It("tree"), i = z({ showDropIndicator: !1, draggingNode: null, dropNode: null, allowDrop: !0, dropType: null }); return tt(Q8, { treeNodeDragStart: ({ event: s, treeNode: l }) => { if (typeof e.allowDrag == "function" && !e.allowDrag(l.node)) return s.preventDefault(), !1; s.dataTransfer.effectAllowed = "move"; try { s.dataTransfer.setData("text/plain", ""); } catch { } i.value.draggingNode = l, t.emit("node-drag-start", l.node, s); }, treeNodeDragOver: ({ event: s, treeNode: l }) => { const u = l, c = i.value.dropNode; c && c.node.id !== u.node.id && Cl(c.$el, a.is("drop-inner")); const d = i.value.draggingNode; if (!d || !u) return; let f = !0, h = !0, p = !0, v = !0; typeof e.allowDrop == "function" && (f = e.allowDrop(d.node, u.node, "prev"), v = h = e.allowDrop(d.node, u.node, "inner"), p = e.allowDrop(d.node, u.node, "next")), s.dataTransfer.dropEffect = h || f || p ? "move" : "none", (f || h || p) && (c == null ? void 0 : c.node.id) !== u.node.id && (c && t.emit("node-drag-leave", d.node, c.node, s), t.emit("node-drag-enter", d.node, u.node, s)), f || h || p ? i.value.dropNode = u : i.value.dropNode = null, u.node.nextSibling === d.node && (p = !1), u.node.previousSibling === d.node && (f = !1), u.node.contains(d.node, !1) && (h = !1), (d.node === u.node || d.node.contains(u.node)) && (f = !1, h = !1, p = !1); const m = u.$el.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect(); let b; const C = f ? h ? 0.25 : p ? 0.45 : 1 : -1, x = p ? h ? 0.75 : f ? 0.55 : 0 : 1; let w = -9999; const k = s.clientY - m.top; k < m.height * C ? b = "before" : k > m.height * x ? b = "after" : h ? b = "inner" : b = "none"; const S = u.$el.querySelector(`.${a.be("node", "expand-icon")}`).getBoundingClientRect(), _ = r.value; b === "before" ? w = S.top - g.top : b === "after" && (w = S.bottom - g.top), _.style.top = `${w}px`, _.style.left = `${S.right - g.left}px`, b === "inner" ? J1(u.$el, a.is("drop-inner")) : Cl(u.$el, a.is("drop-inner")), i.value.showDropIndicator = b === "before" || b === "after", i.value.allowDrop = i.value.showDropIndicator || v, i.value.dropType = b, t.emit("node-drag-over", d.node, u.node, s); }, treeNodeDragEnd: (s) => { const { draggingNode: l, dropType: u, dropNode: c } = i.value; if (s.preventDefault(), s.dataTransfer && (s.dataTransfer.dropEffect = "move"), l && c) { const d = { data: l.node.data }; u !== "none" && l.node.remove(), u === "before" ? c.node.parent.insertBefore(d, c.node) : u === "after" ? c.node.parent.insertAfter(d, c.node) : u === "inner" && c.node.insertChild(d), u !== "none" && (o.value.registerNode(d), o.value.key && l.node.eachNode((f) => { var h; (h = o.value.nodesMap[f.data[o.value.key]]) == null || h.setChecked(f.checked, !o.value.checkStrictly); })), Cl(c.$el, a.is("drop-inner")), t.emit("node-drag-end", l.node, c.node, u, s), u !== "none" && t.emit("node-drop", l.node, c.node, u, s); } l && !c && t.emit("node-drag-end", l.node, null, u, s), i.value.showDropIndicator = !1, i.value.draggingNode = null, i.value.dropNode = null, i.value.allowDrop = !0; } }), { dragState: i }; } const yee = K({ name: "ElTreeNode", components: { ElCollapseTransition: XJ, ElCheckbox: IJ, NodeContent: gee, ElIcon: gr, Loading: s2 }, props: { node: { type: sy, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: !1 } }, emits: ["node-expand"], setup(e, t) { const n = It("tree"), { broadcastExpanded: r } = J8(e), o = xe("RootTree"), a = z(!1), i = z(!1), s = z(null), l = z(null), u = z(null), c = xe(Q8), d = rt(); tt("NodeInstance", d), o || qn("Tree", "Can not find node's tree."), e.node.expanded && (a.value = !0, i.value = !0); const f = o.props.props.children || "children"; ce(() => { const x = e.node.data[f]; return x && [...x]; }, () => { e.node.updateChildren(); }), ce(() => e.node.indeterminate, (x) => { v(e.node.checked, x); }), ce(() => e.node.checked, (x) => { v(x, e.node.indeterminate); }), ce(() => e.node.childNodes.length, () => e.node.reInitChecked()), ce(() => e.node.expanded, (x) => { Ue(() => a.value = x), x && (i.value = !0); }); const h = (x) => T2(o.props.nodeKey, x.data), p = (x) => { const w = e.props.class; if (!w) return {}; let k; if (Kr(w)) { const { data: S } = x; k = w(S, x); } else k = w; return Mr(k) ? { [k]: !0 } : k; }, v = (x, w) => { (s.value !== x || l.value !== w) && o.ctx.emit("check-change", e.node.data, x, w), s.value = x, l.value = w; }, m = (x) => { ay(o.store, o.ctx.emit, () => o.store.value.setCurrentNode(e.node)), o.currentNode.value = e.node, o.props.expandOnClickNode && b(), o.props.checkOnClickNode && !e.node.disabled && C(null, { target: { checked: !e.node.checked } }), o.ctx.emit("node-click", e.node.data, e.node, d, x); }, g = (x) => { o.instance.vnode.props.onNodeContextmenu && (x.stopPropagation(), x.preventDefault()), o.ctx.emit("node-contextmenu", x, e.node.data, e.node, d); }, b = () => { e.node.isLeaf || (a.value ? (o.ctx.emit("node-collapse", e.node.data, e.node, d), e.node.collapse()) : e.node.expand(() => { t.emit("node-expand", e.node.data, e.node, d); })); }, C = (x, w) => { e.node.setChecked(w.target.checked, !o.props.checkStrictly), Ue(() => { const k = o.store.value; o.ctx.emit("check", e.node.data, { checkedNodes: k.getCheckedNodes(), checkedKeys: k.getCheckedKeys(), halfCheckedNodes: k.getHalfCheckedNodes(), halfCheckedKeys: k.getHalfCheckedKeys() }); }); }; return { ns: n, node$: u, tree: o, expanded: a, childNodeRendered: i, oldChecked: s, oldIndeterminate: l, getNodeKey: h, getNodeClass: p, handleSelectChange: v, handleClick: m, handleContextMenu: g, handleExpandIconClick: b, handleCheckChange: C, handleChildNodeExpand: (x, w, k) => { r(w), o.ctx.emit("node-expand", x, w, k); }, handleDragStart: (x) => { o.props.draggable && c.treeNodeDragStart({ event: x, treeNode: e }); }, handleDragOver: (x) => { x.preventDefault(), o.props.draggable && c.treeNodeDragOver({ event: x, treeNode: { $el: u.value, node: e.node } }); }, handleDrop: (x) => { x.preventDefault(); }, handleDragEnd: (x) => { o.props.draggable && c.treeNodeDragEnd(x); }, CaretRight: nK }; } }); function bee(e, t, n, r, o, a) { const i = Xe("el-icon"), s = Xe("el-checkbox"), l = Xe("loading"), u = Xe("node-content"), c = Xe("el-tree-node"), d = Xe("el-collapse-transition"); return Ne((E(), L("div", { ref: "node$", class: V([ e.ns.b("node"), e.ns.is("expanded", e.expanded), e.ns.is("current", e.node.isCurrent), e.ns.is("hidden", !e.node.visible), e.ns.is("focusable", !e.node.disabled), e.ns.is("checked", !e.node.disabled && e.node.checked), e.getNodeClass(e.node) ]), role: "treeitem", tabindex: "-1", "aria-expanded": e.expanded, "aria-disabled": e.node.disabled, "aria-checked": e.node.checked, draggable: e.tree.props.draggable, "data-key": e.getNodeKey(e.node), onClick: Je(e.handleClick, ["stop"]), onContextmenu: e.handleContextMenu, onDragstart: Je(e.handleDragStart, ["stop"]), onDragover: Je(e.handleDragOver, ["stop"]), onDragend: Je(e.handleDragEnd, ["stop"]), onDrop: Je(e.handleDrop, ["stop"]) }, [ B("div", { class: V(e.ns.be("node", "content")), style: Ze({ paddingLeft: (e.node.level - 1) * e.tree.props.indent + "px" }) }, [ e.tree.props.icon || e.CaretRight ? (E(), Q(i, { key: 0, class: V([ e.ns.be("node", "expand-icon"), e.ns.is("leaf", e.node.isLeaf), { expanded: !e.node.isLeaf && e.expanded } ]), onClick: Je(e.handleExpandIconClick, ["stop"]) }, { default: R(() => [ (E(), Q(vt(e.tree.props.icon || e.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0), e.showCheckbox ? (E(), Q(s, { key: 1, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: !!e.node.disabled, onClick: Je(() => { }, ["stop"]), onChange: e.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : Z("v-if", !0), e.node.loading ? (E(), Q(i, { key: 2, class: V([e.ns.be("node", "loading-icon"), e.ns.is("loading")]) }, { default: R(() => [ W(l) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), W(u, { node: e.node, "render-content": e.renderContent }, null, 8, ["node", "render-content"]) ], 6), W(d, null, { default: R(() => [ !e.renderAfterExpand || e.childNodeRendered ? Ne((E(), L("div", { key: 0, class: V(e.ns.be("node", "children")), role: "group", "aria-expanded": e.expanded }, [ (E(!0), L(De, null, xt(e.node.childNodes, (f) => (E(), Q(c, { key: e.getNodeKey(f), "render-content": e.renderContent, "render-after-expand": e.renderAfterExpand, "show-checkbox": e.showCheckbox, node: f, accordion: e.accordion, props: e.props, onNodeExpand: e.handleChildNodeExpand }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))), 128)) ], 10, ["aria-expanded"])), [ [ft, e.expanded] ]) : Z("v-if", !0) ]), _: 1 }) ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [ [ft, e.node.visible] ]); } var wee = /* @__PURE__ */ Ot(yee, [["render", bee], ["__file", "tree-node.vue"]]); function xee({ el$: e }, t) { const n = It("tree"), r = On([]), o = On([]); at(() => { a(); }), Up(() => { r.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), o.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); }), ce(o, (i) => { i.forEach((s) => { s.setAttribute("tabindex", "-1"); }); }), Mo(e, "keydown", (i) => { const s = i.target; if (!s.className.includes(n.b("node"))) return; const l = i.code; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)); const u = r.value.indexOf(s); let c; if ([er.up, er.down].includes(l)) { if (i.preventDefault(), l === er.up) { c = u === -1 ? 0 : u !== 0 ? u - 1 : r.value.length - 1; const f = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c--, c === f) { c = -1; break; } c < 0 && (c = r.value.length - 1); } } else { c = u === -1 ? 0 : u < r.value.length - 1 ? u + 1 : 0; const f = c; for (; !t.value.getNode(r.value[c].dataset.key).canFocus; ) { if (c++, c === f) { c = -1; break; } c >= r.value.length && (c = 0); } } c !== -1 && r.value[c].focus(); } [er.left, er.right].includes(l) && (i.preventDefault(), s.click()); const d = s.querySelector('[type="checkbox"]'); [er.enter, er.space].includes(l) && d && (i.preventDefault(), d.click()); }); const a = () => { var i; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), o.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); const s = e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`); if (s.length) { s[0].setAttribute("tabindex", "0"); return; } (i = r.value[0]) == null || i.setAttribute("tabindex", "0"); }; } const kee = K({ name: "ElTree", components: { ElTreeNode: wee }, props: { data: { type: Array, default: () => [] }, emptyText: { type: String }, renderAfterExpand: { type: Boolean, default: !0 }, nodeKey: String, checkStrictly: Boolean, defaultExpandAll: Boolean, expandOnClickNode: { type: Boolean, default: !0 }, checkOnClickNode: Boolean, checkDescendants: { type: Boolean, default: !1 }, autoExpandParent: { type: Boolean, default: !0 }, defaultCheckedKeys: Array, defaultExpandedKeys: Array, currentNodeKey: [String, Number], renderContent: Function, showCheckbox: { type: Boolean, default: !1 }, draggable: { type: Boolean, default: !1 }, allowDrag: Function, allowDrop: Function, props: { type: Object, default: () => ({ children: "children", label: "label", disabled: "disabled" }) }, lazy: { type: Boolean, default: !1 }, highlightCurrent: Boolean, load: Function, filterNodeMethod: Function, accordion: Boolean, indent: { type: Number, default: 18 }, icon: { type: Is } }, emits: [ "check-change", "current-change", "node-click", "node-contextmenu", "node-collapse", "node-expand", "check", "node-drag-start", "node-drag-end", "node-drop", "node-drag-leave", "node-drag-enter", "node-drag-over" ], setup(e, t) { const { t: n } = Qp(), r = It("tree"), o = xe(lf, null), a = z(new hee({ key: e.nodeKey, data: e.data, lazy: e.lazy, props: e.props, load: e.load, currentNodeKey: e.currentNodeKey, checkStrictly: e.checkStrictly, checkDescendants: e.checkDescendants, defaultCheckedKeys: e.defaultCheckedKeys, defaultExpandedKeys: e.defaultExpandedKeys, autoExpandParent: e.autoExpandParent, defaultExpandAll: e.defaultExpandAll, filterNodeMethod: e.filterNodeMethod })); a.value.initialize(); const i = z(a.value.root), s = z(null), l = z(null), u = z(null), { broadcastExpanded: c } = J8(e), { dragState: d } = mee({ props: e, ctx: t, el$: l, dropIndicator$: u, store: a }); xee({ el$: l }, a); const f = $(() => { const { childNodes: q } = i.value, Y = o ? o.hasFilteredOptions !== 0 : !1; return (!q || q.length === 0 || q.every(({ visible: ie }) => !ie)) && !Y; }); ce(() => e.currentNodeKey, (q) => { a.value.setCurrentNodeKey(q); }), ce(() => e.defaultCheckedKeys, (q) => { a.value.setDefaultCheckedKey(q); }), ce(() => e.defaultExpandedKeys, (q) => { a.value.setDefaultExpandedKeys(q); }), ce(() => e.data, (q) => { a.value.setData(q); }, { deep: !0 }), ce(() => e.checkStrictly, (q) => { a.value.checkStrictly = q; }); const h = (q) => { if (!e.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); a.value.filter(q); }, p = (q) => T2(e.nodeKey, q.data), v = (q) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const Y = a.value.getNode(q); if (!Y) return []; const ie = [Y.data]; let re = Y.parent; for (; re && re !== i.value; ) ie.push(re.data), re = re.parent; return ie.reverse(); }, m = (q, Y) => a.value.getCheckedNodes(q, Y), g = (q) => a.value.getCheckedKeys(q), b = () => { const q = a.value.getCurrentNode(); return q ? q.data : null; }, C = () => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const q = b(); return q ? q[e.nodeKey] : null; }, x = (q, Y) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); a.value.setCheckedNodes(q, Y); }, w = (q, Y) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); a.value.setCheckedKeys(q, Y); }, k = (q, Y, ie) => { a.value.setChecked(q, Y, ie); }, S = () => a.value.getHalfCheckedNodes(), _ = () => a.value.getHalfCheckedKeys(), O = (q, Y = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); ay(a, t.emit, () => { c(q), a.value.setUserCurrentNode(q, Y); }); }, F = (q, Y = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); ay(a, t.emit, () => { c(), a.value.setCurrentNodeKey(q, Y); }); }, I = (q) => a.value.getNode(q), P = (q) => { a.value.remove(q); }, M = (q, Y) => { a.value.append(q, Y); }, N = (q, Y) => { a.value.insertBefore(q, Y); }, j = (q, Y) => { a.value.insertAfter(q, Y); }, A = (q, Y, ie) => { c(Y), t.emit("node-expand", q, Y, ie); }, U = (q, Y) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); a.value.updateChildren(q, Y); }; return tt("RootTree", { ctx: t, props: e, store: a, root: i, currentNode: s, instance: rt() }), tt(cp, void 0), { ns: r, store: a, root: i, currentNode: s, dragState: d, el$: l, dropIndicator$: u, isEmpty: f, filter: h, getNodeKey: p, getNodePath: v, getCheckedNodes: m, getCheckedKeys: g, getCurrentNode: b, getCurrentKey: C, setCheckedNodes: x, setCheckedKeys: w, setChecked: k, getHalfCheckedNodes: S, getHalfCheckedKeys: _, setCurrentNode: O, setCurrentKey: F, t: n, getNode: I, remove: P, append: M, insertBefore: N, insertAfter: j, handleNodeExpand: A, updateKeyChildren: U }; } }); function Cee(e, t, n, r, o, a) { const i = Xe("el-tree-node"); return E(), L("div", { ref: "el$", class: V([ e.ns.b(), e.ns.is("dragging", !!e.dragState.draggingNode), e.ns.is("drop-not-allow", !e.dragState.allowDrop), e.ns.is("drop-inner", e.dragState.dropType === "inner"), { [e.ns.m("highlight-current")]: e.highlightCurrent } ]), role: "tree" }, [ (E(!0), L(De, null, xt(e.root.childNodes, (s) => (E(), Q(i, { key: e.getNodeKey(s), node: s, props: e.props, accordion: e.accordion, "render-after-expand": e.renderAfterExpand, "show-checkbox": e.showCheckbox, "render-content": e.renderContent, onNodeExpand: e.handleNodeExpand }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]))), 128)), e.isEmpty ? (E(), L("div", { key: 0, class: V(e.ns.e("empty-block")) }, [ oe(e.$slots, "empty", {}, () => { var s; return [ B("span", { class: V(e.ns.e("empty-text")) }, me((s = e.emptyText) != null ? s : e.t("el.tree.emptyText")), 3) ]; }) ], 2)) : Z("v-if", !0), Ne(B("div", { ref: "dropIndicator$", class: V(e.ns.e("drop-indicator")) }, null, 2), [ [ft, e.dragState.showDropIndicator] ]) ], 2); } var See = /* @__PURE__ */ Ot(kee, [["render", Cee], ["__file", "tree.vue"]]); const Eee = fr(See); function $ee(e) { let t; const n = z(!1), r = Kt({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(f) { r.text = f; } function a() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (Cl(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), Cl(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, a(); } const u = K({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = cX("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = jt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ jt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? jt("p", { class: p.b("text") }, [r.text]) : void 0; return jt(pr, { name: p.b("fade"), onAfterLeave: l }, { default: R(() => [ Ne(W("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ jt("div", { class: p.b("spinner") }, [g, b]) ]), [[ft, r.visible]]) ]) }); }; } }), c = S0(u), d = c.mount(document.createElement("div")); return { ...Vr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let rh; const _ee = function(e = {}) { if (!Un) return; const t = Tee(e); if (t.fullscreen && rh) return rh; const n = $ee({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (rh = void 0); } }); Oee(t, t.parent, n), b5(t, t.parent, n), t.parent.vLoadingAddClassList = () => b5(t, t.parent, n); let r = t.parent.getAttribute("loading-number"); return r ? r = `${Number.parseInt(r) + 1}` : r = "1", t.parent.setAttribute("loading-number", r), t.parent.appendChild(n.$el), Ue(() => n.visible.value = t.visible), t.fullscreen && (rh = n), n; }, Tee = (e) => { var t, n, r, o; let a; return Mr(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, { parent: a === document.body || e.body ? document.body : a, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (o = e.visible) != null ? o : !0, beforeClose: e.beforeClose, closed: e.closed, target: a }; }, Oee = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = ld(document.body, "position"), n.originalOverflow.value = ld(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = ld(document.body, "position"), await Ue(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(ld(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = ld(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, b5 = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Cl(t, r.bm("parent", "relative")) : J1(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? J1(t, r.bm("parent", "hidden")) : Cl(t, r.bm("parent", "hidden")); }, Gh = Symbol("ElLoading"), w5 = (e, t) => { var n, r, o, a; const i = t.instance, s = (f) => br(t.value) ? t.value[f] : void 0, l = (f) => { const h = Mr(f) && (i == null ? void 0 : i[f]) || f; return h && z(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${tU(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[Gh] = { options: d, instance: _ee(d) }; }, Fee = (e, t) => { for (const n of Object.keys(t)) Gn(t[n]) && (t[n].value = e[n]); }, O2 = { mounted(e, t) { t.value && w5(e, t); }, updated(e, t) { const n = e[Gh]; t.oldValue !== t.value && (t.value && !t.oldValue ? w5(e, t) : t.value && t.oldValue ? br(t.value) && Fee(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Gh]) == null || t.instance.close(), e[Gh] = null; } }, Ea = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, Iee = "Copy to clipboard", Aee = "Copied!", Pee = "#8300bf", Lee = { name: "CopyToClipboard", props: { content: { type: String, default: "" }, label: { type: String, default: Iee }, /** * `theme: light` will show white button, * to use when the button is over other readable text content. * Default button is transparent. */ theme: { type: String, default: "" } }, data: function() { return { textLabel: this.label, autoHideTimeout: 0, iconColor: Pee, tooltipContainer: null }; }, mounted() { const e = document.querySelector(".mapcontent"); e ? this.tooltipContainer = e : this.tooltipContainer = document.body; }, methods: { copyToClipboard: async function() { let e = !0; this.autoHideTimeout = 600; try { const t = this.content.replaceAll(` `, ""), n = document.createElement("div"); n.innerHTML = this.content; const r = n.textContent || n.innerText || "", o = new Blob([t], { type: "text/html" }), a = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({ "text/html": o, "text/plain": a }); await navigator.clipboard.write([i]); } catch (t) { console.error( "Error when trying to use navigator.clipboard.write()", t ), e = !1; } e ? this.textLabel = Aee : this.textLabel = "Error trying to copy to clipboard!"; }, resetSettings: function() { this.autoHideTimeout = 0, this.textLabel = this.label; } } }, Ree = { class: "visually-hidden" }; function Dee(e, t, n, r, o, a) { const i = lK, s = gr, l = ka, u = af; return E(), Q(u, { content: e.textLabel, placement: "bottom", "hide-after": e.autoHideTimeout, effect: "clipboard-tooltip", onHide: a.resetSettings, teleported: !0, "append-to": e.tooltipContainer }, { default: R(() => [ W(l, { class: V(["copy-clipboard-button", n.theme]), size: "small", onClick: a.copyToClipboard }, { default: R(() => [ W(s, { color: e.iconColor }, { default: R(() => [ W(i) ]), _: 1 }, 8, ["color"]), B("span", Ree, me(e.textLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content", "hide-after", "onHide", "append-to"]); } const Lc = /* @__PURE__ */ Ea(Lee, [["render", Dee], ["__scopeId", "data-v-08b3bab3"]]), Mee = { name: "AnnotationPopup", props: { annotationEntry: { type: Object } }, inject: ["$annotator", "userApiKey"], data: function() { return { displayPair: { "Feature ID": "featureId", Label: "label", Ontology: "models", Name: "name", Resource: "resourceId" }, editing: !1, evidencePrefixes: [ { value: "DOI:", label: "DOI:" }, { value: "PMID:", label: "PMID:" }, { value: "", label: "Other:" } ], evidencePrefix: "DOI:", evidence: [], authenticated: !1, newEvidence: "", comment: "", prevSubs: [], showSubmissions: !0, errorMessage: "", creator: void 0, copyContent: "" }; }, computed: { isEditable: function() { return this.annotationEntry.resourceId && this.annotationEntry.featureId; }, isPositionUpdated: function() { return this.annotationEntry.resourceId && this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated; }, isDeleted: function() { return this.annotationEntry.resourceId && this.annotationEntry.type === "deleted"; }, ontologyLink: function() { const e = this.annotationEntry.models; if (e && e.startsWith("UBERON")) return `http://purl.obolibrary.org/obo/${this.annotationEntry.models.replace(":", "_")}`; }, updatedCopyContent: function() { return this.getUpdateCopyContent(); } }, methods: { processEvidences: function(e) { var t; const n = []; return (t = e == null ? void 0 : e.body) != null && t.evidence && e.body.evidence.forEach((r) => { if (typeof r == "object") n.push(r); else { const o = {}; if (r.includes("https://doi.org/")) { const a = r.replace("https://doi.org/", "DOI:"); o[a] = r; } else if (r.includes("https://pubmed.ncbi.nlm.nih.gov/")) { const a = r.replace("https://pubmed.ncbi.nlm.nih.gov/", "PMID:"); o[a] = r; } Object.keys(o).length > 0 ? n.push(o) : n.push(r); } }), n; }, evidenceEntered: function(e) { e && (this.evidence.push(this.evidencePrefix + e), this.newEvidence = ""); }, formatTime: function(e) { const t = { year: "numeric", month: "long", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }; return new Date(e).toLocaleDateString(void 0, t); }, updatePrevSubmissions: function() { var e; this.$annotator && this.authenticated && this.annotationEntry.resourceId && this.annotationEntry.featureId && ((e = this.$annotator) == null || e.itemAnnotations( this.userApiKey, this.annotationEntry.resourceId, this.annotationEntry.featureId ).then((t) => { this.prevSubs = t; }).catch((t) => { console.log(t); })); }, submit: function() { var e; if (this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated ? this.comment = this.comment ? `Position Updated: ${this.comment}` : "Position Updated" : this.annotationEntry.type === "deleted" && (this.comment = this.comment ? `Feature Deleted: ${this.comment}` : "Feature Deleted"), (this.evidence.length > 0 || this.comment) && this.annotationEntry.resourceId && this.annotationEntry.featureId) { const t = []; this.evidence.forEach((r) => { if (r.includes("DOI:")) { const o = r.replace("DOI:", "https://doi.org/"); t.push(new URL(o)); } else if (r.includes("PMID:")) { const o = r.replace( "PMID:", "https://pubmed.ncbi.nlm.nih.gov/" ); t.push(new URL(o)); } else t.push(r); }); const n = { resource: this.annotationEntry.resourceId, item: Object.assign( { id: this.annotationEntry.featureId }, Object.fromEntries( Object.entries(this.annotationEntry).filter( ([r]) => ["label", "models"].includes(r) ) ) ), body: { evidence: t, comment: this.comment }, feature: this.annotationEntry.feature }; Object.assign(n.body, this.annotationEntry.body), this.annotationEntry.type === "deleted" && (n.feature = void 0), this.creator && (n.creator = this.creator), (e = this.$annotator) == null || e.addAnnotation(this.userApiKey, n).then(() => { this.$emit("annotation", n), this.errorMessage = "", this.resetSubmission(), this.updatePrevSubmissions(); }).catch(() => { this.errorMessage = "There is a problem with the submission, please try again later"; }); } }, removeEvidence: function(e) { this.evidence.splice(e, 1); }, resetSubmission: function() { this.editing = !1, this.evidence = [], this.newFeature = "", this.comment = ""; }, getUpdateCopyContent: function() { if (!this.annotationEntry) return ""; const e = []; if (this.annotationEntry.featureId && e.push(`
Feature ID:${this.annotationEntry.featureId}
`), this.annotationEntry.label && e.push(`
Label:${this.annotationEntry.label}
`), this.annotationEntry.models && (e.push(`
Ontology:${this.annotationEntry.models}
`), this.ontologyLink && e.push(`
Ontology Link:${this.ontologyLink}
`)), this.annotationEntry.resourceId && e.push(`
Resource:${this.annotationEntry.resourceId}
`), this.prevSubs.length) { let t = `
Annotations:

`; this.prevSubs.map((n, r) => { if (t += `
Created:${this.formatTime(n.created)}

`, t += `
Creator:${n.creator.name}

`, t += `
Email:${n.creator.email}

`, n.body.evidence.length) { let o = ""; n.body.evidence.forEach((a, i) => { o += `${typeof a == "object" ? Object.values(a)[0] : a}`, i !== n.body.evidence.length - 1 && (o += ", "); }), t += `
Evidence:${o}

`; } t += `
Comment:${n.body.comment}

`; }), e.push(`
${t}
`); } return e.join(`
`); } }, watch: { annotationEntry: { handler: function(e, t) { e !== t && (this.resetSubmission(), this.updatePrevSubmissions()); }, immediate: !1, deep: !1 } }, mounted: function() { var e; (e = this.$annotator) == null || e.authenticate(this.userApiKey).then((t) => { t.name && t.email && t.canUpdate ? (this.creator = t, t.orcid || (this.creator.orcid = "0000-0000-0000-0000"), this.authenticated = !0, this.updatePrevSubmissions()) : this.errorMessage = ""; }); } }, au = (e) => (Tr("data-v-56354500"), e = e(), Or(), e), Nee = { class: "block" }, Bee = /* @__PURE__ */ au(() => /* @__PURE__ */ B("div", { class: "title" }, "Feature Annotations", -1)), zee = { class: "title-buttons" }, Vee = { key: 0 }, jee = ["href"], Hee = /* @__PURE__ */ au(() => /* @__PURE__ */ B("strong", { class: "sub-title" }, "Previous submissions:", -1)), Uee = /* @__PURE__ */ au(() => /* @__PURE__ */ B("strong", null, "Evidence: ", -1)), qee = ["href"], Wee = { key: 1 }, Gee = { key: 2 }, Kee = /* @__PURE__ */ au(() => /* @__PURE__ */ B("strong", null, "Comment: ", -1)), Yee = /* @__PURE__ */ au(() => /* @__PURE__ */ B("strong", { class: "sub-title" }, "Suggest changes:", -1)), Xee = /* @__PURE__ */ au(() => /* @__PURE__ */ B("strong", null, "Evidence:", -1)), Zee = /* @__PURE__ */ au(() => /* @__PURE__ */ B("strong", null, "Comment:", -1)), Jee = { class: "sub-title" }; function Qee(e, t, n, r, o, a) { const i = Lc, s = rg, l = J_, u = gr, c = Z0, d = pK, f = cK, h = hK, p = sf, v = Iv, m = ree, g = nee, b = of, C = ka, x = $2; return E(), Q(x, { class: "main" }, { default: R(() => [ B("div", Nee, [ W(s, { class: "info-field" }, { default: R(() => [ Bee, B("div", zee, [ W(i, { content: a.updatedCopyContent }, null, 8, ["content"]) ]) ]), _: 1 }), n.annotationEntry ? (E(), L(De, { key: 0 }, [ (E(!0), L(De, null, xt(e.displayPair, (w, k) => Ne((E(), Q(s, { class: "dialog-text", key: w }, { default: R(() => [ B("strong", null, me(k) + ": ", 1), Ae("  "), k !== "Ontology" ? (E(), L("span", Vee, me(n.annotationEntry[w]), 1)) : (E(), L("a", { key: 1, href: a.ontologyLink, target: "_blank" }, me(n.annotationEntry[w]), 9, jee)) ]), _: 2 }, 1024)), [ [ft, n.annotationEntry[w]] ])), 128)), e.prevSubs.length > 0 ? (E(), L(De, { key: 0 }, [ Ne(B("div", { class: "hide", onClick: t[0] || (t[0] = (w) => e.showSubmissions = !1) }, [ Ae(" Hide previous submissions "), W(u, null, { default: R(() => [ W(l) ]), _: 1 }) ], 512), [ [ft, e.showSubmissions] ]), Ne(B("div", { class: "hide", onClick: t[1] || (t[1] = (w) => e.showSubmissions = !0) }, [ Ae(" Show previous " + me(e.prevSubs.length) + " submission(s) ", 1), W(u, null, { default: R(() => [ W(c) ]), _: 1 }) ], 512), [ [ft, !e.showSubmissions] ]), e.showSubmissions ? (E(), L(De, { key: 0 }, [ W(s, { class: "dialog-spacer" }), W(s, { class: "dialog-text" }, { default: R(() => [ Hee ]), _: 1 }), (E(!0), L(De, null, xt(e.prevSubs, (w, k) => (E(), L("div", { class: "entry", key: k }, [ W(s, { class: "dialog-text" }, { default: R(() => [ B("strong", null, me(a.formatTime(w.created)), 1), Ae(" " + me(w.creator.name), 1) ]), _: 2 }, 1024), W(s, { class: "dialog-text" }, { default: R(() => [ Uee, (E(!0), L(De, null, xt(a.processEvidences(w), (S, _) => (E(), Q(s, { key: S, class: "dialog-text" }, { default: R(() => [ typeof S == "object" ? (E(), L("a", { key: 0, href: Object.values(S)[0], target: "_blank" }, me(Object.keys(S)[0]), 9, qee)) : (E(), L("span", Wee, me(S), 1)), _ !== w.body.evidence.length - 1 ? (E(), L("span", Gee, ", ")) : Z("", !0) ]), _: 2 }, 1024))), 128)) ]), _: 2 }, 1024), W(s, { class: "dialog-text" }, { default: R(() => [ Kee, Ae(" " + me(w.body.comment), 1) ]), _: 2 }, 1024) ]))), 128)) ], 64)) : Z("", !0) ], 64)) : Z("", !0), e.authenticated ? (E(), L(De, { key: 1 }, [ a.isEditable ? (E(), L(De, { key: 0 }, [ W(s, { class: "dialog-spacer" }), e.editing ? (E(), L(De, { key: 1 }, [ W(s, { class: "dialog-text" }, { default: R(() => [ Yee ]), _: 1 }), a.isDeleted ? Z("", !0) : (E(), L(De, { key: 0 }, [ W(s, { class: "dialog-text" }, { default: R(() => [ Xee ]), _: 1 }), (E(!0), L(De, null, xt(e.evidence, (w, k) => (E(), Q(s, { key: w }, { default: R(() => [ W(p, { span: 20 }, { default: R(() => [ Ae(me(e.evidence[k]), 1) ]), _: 2 }, 1024), W(p, { span: 4 }, { default: R(() => [ W(u, { class: "standard-icon" }, { default: R(() => [ W(v, { onClick: (S) => a.removeEvidence(k) }, null, 8, ["onClick"]) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1024))), 128)), W(s, null, { default: R(() => [ W(b, { size: "small", placeholder: "Enter", modelValue: e.newEvidence, "onUpdate:modelValue": t[4] || (t[4] = (w) => e.newEvidence = w), onChange: t[5] || (t[5] = (w) => a.evidenceEntered(w)) }, { prepend: R(() => [ W(g, { teleported: !1, modelValue: e.evidencePrefix, "onUpdate:modelValue": t[3] || (t[3] = (w) => e.evidencePrefix = w), placeholder: "Other:", class: "select-box", "popper-class": "flatmap_dropdown" }, { default: R(() => [ (E(!0), L(De, null, xt(e.evidencePrefixes, (w) => (E(), Q(m, { key: w.label, value: w.value }, { default: R(() => [ W(s, null, { default: R(() => [ W(p, { span: 12 }, { default: R(() => [ Ae(me(w.label), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }) ], 64)), W(s, null, { default: R(() => [ Zee ]), _: 1 }), W(s, { class: "dialog-text" }, { default: R(() => [ W(b, { type: "textarea", autosize: { minRows: 2, maxRows: 4 }, placeholder: "Enter", modelValue: e.comment, "onUpdate:modelValue": t[6] || (t[6] = (w) => e.comment = w) }, null, 8, ["modelValue"]) ]), _: 1 }), W(s, { class: "dialog-text" }, { default: R(() => [ W(C, { class: "button", type: "primary", plain: "", onClick: a.submit }, { default: R(() => [ Ae(" Submit ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ], 64)) : (E(), Q(s, { key: 0 }, { default: R(() => [ W(u, { class: "standard-icon" }, { default: R(() => [ W(d, { onClick: t[2] || (t[2] = (w) => e.editing = !0) }) ]), _: 1 }), a.isDeleted ? (E(), Q(u, { key: 0, class: "standard-icon" }, { default: R(() => [ W(f, { onClick: a.submit }, null, 8, ["onClick"]) ]), _: 1 })) : a.isPositionUpdated ? (E(), Q(u, { key: 1, class: "standard-icon" }, { default: R(() => [ W(h, { onClick: a.submit }, null, 8, ["onClick"]) ]), _: 1 })) : Z("", !0) ]), _: 1 })), e.errorMessage ? (E(), Q(s, { key: 2, class: "dialog-text" }, { default: R(() => [ B("strong", Jee, me(e.errorMessage), 1) ]), _: 1 })) : Z("", !0) ], 64)) : Z("", !0) ], 64)) : Z("", !0) ], 64)) : Z("", !0) ]) ]), _: 1 }); } const e6 = /* @__PURE__ */ Ea(Mee, [["render", Qee], ["__scopeId", "data-v-56354500"]]), ete = { name: "CreateTooltipContent", components: { Button: ka, Col: sf, Container: K8, Header: Y8, Input: of, Main: $2 }, props: { createData: { type: Object } }, watch: { "createData.shape": { handler: function(e, t) { this.group = e, t !== void 0 && this.$emit("cancel-create"); }, immediate: !0 } }, computed: { confirmText: function() { return this.createData.editingIndex > -1 ? "Edit" : "Confirm"; } }, data: function() { return { group: "default", region: "", showPoint: !1 }; }, methods: { confirm: function() { this.$emit( "confirm-create", { region: "__annotation/" + this.region, group: this.group, shape: this.createData.shape, editingIndex: this.createData.editingIndex } ), this.group = this.createData.shape; }, cancel: function() { this.$emit("cancel-create"); } } }, tte = (e) => (Tr("data-v-d61c5879"), e = e(), Or(), e), nte = /* @__PURE__ */ tte(() => /* @__PURE__ */ B("span", { class: "create-text" }, " Primitives will be created in the __annotation region ", -1)); function rte(e, t, n, r, o, a) { const i = Y8, s = sf, l = rg, u = of, c = ka, d = $2, f = K8; return E(), Q(f, { class: "create-container" }, { default: R(() => [ W(i, { height: "30px", class: "header" }, { default: R(() => [ B("div", null, "Create " + me(n.createData.shape), 1) ]), _: 1 }), W(d, { class: "slides-block" }, { default: R(() => [ nte, Ne(W(l, { class: "row" }, { default: R(() => [ W(s, { offset: 0, span: 8 }, { default: R(() => [ Ae(" Position: ") ]), _: 1 }), W(s, { offset: 0, span: 16 }, { default: R(() => [ (E(!0), L(De, null, xt(n.createData.points, ({ value: h, i: p }) => (E(), Q(l, { key: p, class: "value" }, { default: R(() => [ Ae(me(p), 1) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 }, 512), [ [ft, e.showPoint] ]), W(l, { class: "row" }, { default: R(() => [ W(s, { offset: 0, span: 8 }, { default: R(() => [ Ae(" Region: ") ]), _: 1 }), W(s, { offset: 0, span: 16 }, { default: R(() => [ W(u, { modelValue: e.region, "onUpdate:modelValue": t[0] || (t[0] = (h) => e.region = h), placeholder: "__annotation", size: "small" }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }), W(l, { class: "row" }, { default: R(() => [ W(s, { offset: 0, span: 8 }, { default: R(() => [ Ae(" Group: ") ]), _: 1 }), W(s, { offset: 0, span: 16 }, { default: R(() => [ W(u, { modelValue: e.group, "onUpdate:modelValue": t[1] || (t[1] = (h) => e.group = h), placeholder: n.createData.shape, size: "small" }, null, 8, ["modelValue", "placeholder"]) ]), _: 1 }) ]), _: 1 }), W(l, null, { default: R(() => [ W(s, { offset: 0, span: 12 }, { default: R(() => [ W(c, { type: "primary", plain: "", onClick: a.confirm }, { default: R(() => [ Ae(me(a.confirmText), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }), W(s, { offset: 0, span: 12 }, { default: R(() => [ W(c, { type: "primary", plain: "", onClick: a.cancel }, { default: R(() => [ Ae(" Cancel ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }); } const ote = /* @__PURE__ */ Ea(ete, [["render", rte], ["__scopeId", "data-v-d61c5879"]]); function or(e) { "@babel/helpers - typeof"; return or = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { return typeof t; } : function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, or(e); } function F2(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function ate(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } function I2(e, t, n) { return t && ate(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function t6(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function ca(e, t) { return ite(e) || ste(e, t) || n6(e, t) || lte(); } function ite(e) { if (Array.isArray(e)) return e; } function ste(e, t) { var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n != null) { var r = [], o = !0, a = !1, i, s; try { for (n = n.call(e); !(o = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); o = !0) ; } catch (l) { a = !0, s = l; } finally { try { !o && n.return != null && n.return(); } finally { if (a) throw s; } } return r; } } function n6(e, t) { if (e) { if (typeof e == "string") return x5(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return x5(e, t); } } function x5(e, t) { (t == null || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r; } function lte() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function r6(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (!n) { if (Array.isArray(e) || (n = n6(e)) || t) { n && (e = n); var r = 0, o = function() { }; return { s: o, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }, e: function(l) { throw l; }, f: o }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var a = !0, i = !1, s; return { s: function() { n = n.call(e); }, n: function() { var l = n.next(); return a = l.done, l; }, e: function(l) { i = !0, s = l; }, f: function() { try { !a && n.return != null && n.return(); } finally { if (i) throw s; } } }; } var Jn = typeof window > "u" ? null : window, k5 = Jn ? Jn.navigator : null; Jn && Jn.document; var ute = or(""), o6 = or({}), cte = or(function() { }), dte = typeof HTMLElement > "u" ? "undefined" : or(HTMLElement), uf = function(e) { return e && e.instanceString && An(e.instanceString) ? e.instanceString() : null; }, ht = function(e) { return e != null && or(e) == ute; }, An = function(e) { return e != null && or(e) === cte; }, cn = function(e) { return !Eo(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, Ht = function(e) { return e != null && or(e) === o6 && !cn(e) && e.constructor === Object; }, pte = function(e) { return e != null && or(e) === o6; }, Ke = function(e) { return e != null && or(e) === or(1) && !isNaN(e); }, fte = function(e) { return Ke(e) && Math.floor(e) === e; }, Lv = function(e) { if (dte !== "undefined") return e != null && e instanceof HTMLElement; }, Eo = function(e) { return cf(e) || a6(e); }, cf = function(e) { return uf(e) === "collection" && e._private.single; }, a6 = function(e) { return uf(e) === "collection" && !e._private.single; }, A2 = function(e) { return uf(e) === "core"; }, i6 = function(e) { return uf(e) === "stylesheet"; }, hte = function(e) { return uf(e) === "event"; }, As = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, vte = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, gte = function(e) { return Ht(e) && Ke(e.x1) && Ke(e.x2) && Ke(e.y1) && Ke(e.y2); }, mte = function(e) { return pte(e) && An(e.then); }, yte = function() { return k5 && k5.userAgent.match(/msie|trident|edge/i); }, fp = function(e, t) { t || (t = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var r = [], o = 0; o < arguments.length; o++) r.push(arguments[o]); return r.join("$"); }); var n = function r() { var o = this, a = arguments, i, s = t.apply(o, a), l = r.cache; return (i = l[s]) || (i = l[s] = e.apply(o, a)), i; }; return n.cache = {}, n; }, P2 = fp(function(e) { return e.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase(); }); }), ag = fp(function(e) { return e.replace(/(-\w)/g, function(t) { return t[1].toUpperCase(); }); }), s6 = fp(function(e, t) { return e + t[0].toUpperCase() + t.substring(1); }, function(e, t) { return e + "$" + t; }), C5 = function(e) { return As(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, nr = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", bte = "rgb[a]?\\((" + nr + "[%]?)\\s*,\\s*(" + nr + "[%]?)\\s*,\\s*(" + nr + "[%]?)(?:\\s*,\\s*(" + nr + "))?\\)", wte = "rgb[a]?\\((?:" + nr + "[%]?)\\s*,\\s*(?:" + nr + "[%]?)\\s*,\\s*(?:" + nr + "[%]?)(?:\\s*,\\s*(?:" + nr + "))?\\)", xte = "hsl[a]?\\((" + nr + ")\\s*,\\s*(" + nr + "[%])\\s*,\\s*(" + nr + "[%])(?:\\s*,\\s*(" + nr + "))?\\)", kte = "hsl[a]?\\((?:" + nr + ")\\s*,\\s*(?:" + nr + "[%])\\s*,\\s*(?:" + nr + "[%])(?:\\s*,\\s*(?:" + nr + "))?\\)", Cte = "\\#[0-9a-fA-F]{3}", Ste = "\\#[0-9a-fA-F]{6}", l6 = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; }, Ete = function(e, t) { return -1 * l6(e, t); }, kt = Object.assign != null ? Object.assign.bind(Object) : function(e) { for (var t = arguments, n = 1; n < t.length; n++) { var r = t[n]; if (r != null) for (var o = Object.keys(r), a = 0; a < o.length; a++) { var i = o[a]; e[i] = r[i]; } } return e; }, $te = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var t = e.length === 4, n, r, o, a = 16; return t ? (n = parseInt(e[1] + e[1], a), r = parseInt(e[2] + e[2], a), o = parseInt(e[3] + e[3], a)) : (n = parseInt(e[1] + e[2], a), r = parseInt(e[3] + e[4], a), o = parseInt(e[5] + e[6], a)), [n, r, o]; } }, _te = function(e) { var t, n, r, o, a, i, s, l; function u(h, p, v) { return v < 0 && (v += 1), v > 1 && (v -= 1), v < 1 / 6 ? h + (p - h) * 6 * v : v < 1 / 2 ? p : v < 2 / 3 ? h + (p - h) * (2 / 3 - v) * 6 : h; } var c = new RegExp("^" + xte + "$").exec(e); if (c) { if (n = parseInt(c[1]), n < 0 ? n = (360 - -1 * n % 360) % 360 : n > 360 && (n = n % 360), n /= 360, r = parseFloat(c[2]), r < 0 || r > 100 || (r = r / 100, o = parseFloat(c[3]), o < 0 || o > 100) || (o = o / 100, a = c[4], a !== void 0 && (a = parseFloat(a), a < 0 || a > 1))) return; if (r === 0) i = s = l = Math.round(o * 255); else { var d = o < 0.5 ? o * (1 + r) : o + r - o * r, f = 2 * o - d; i = Math.round(255 * u(f, d, n + 1 / 3)), s = Math.round(255 * u(f, d, n)), l = Math.round(255 * u(f, d, n - 1 / 3)); } t = [i, s, l, a]; } return t; }, Tte = function(e) { var t, n = new RegExp("^" + bte + "$").exec(e); if (n) { t = []; for (var r = [], o = 1; o <= 3; o++) { var a = n[o]; if (a[a.length - 1] === "%" && (r[o] = !0), a = parseFloat(a), r[o] && (a = a / 100 * 255), a < 0 || a > 255) return; t.push(Math.floor(a)); } var i = r[1] || r[2] || r[3], s = r[1] && r[2] && r[3]; if (i && !s) return; var l = n[4]; if (l !== void 0) { if (l = parseFloat(l), l < 0 || l > 1) return; t.push(l); } } return t; }, Ote = function(e) { return Ite[e.toLowerCase()]; }, Fte = function(e) { return (cn(e) ? e : null) || Ote(e) || $te(e) || Tte(e) || _te(e); }, Ite = { // special colour names transparent: [0, 0, 0, 0], // NB alpha === 0 // regular colours aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], grey: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }, u6 = function(e) { for (var t = e.map, n = e.keys, r = n.length, o = 0; o < r; o++) { var a = n[o]; if (Ht(a)) throw Error("Tried to set map with object key"); o < n.length - 1 ? (t[a] == null && (t[a] = {}), t = t[a]) : t[a] = e.value; } }, c6 = function(e) { for (var t = e.map, n = e.keys, r = n.length, o = 0; o < r; o++) { var a = n[o]; if (Ht(a)) throw Error("Tried to get map with object key"); if (t = t[a], t == null) return t; } return t; }; function Ate(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var Dl = Ate, Od = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Pte(e, t) { return t = { exports: {} }, e(t, t.exports), t.exports; } var Lte = typeof Od == "object" && Od && Od.Object === Object && Od, Rte = Lte, Dte = typeof self == "object" && self && self.Object === Object && self, Mte = Rte || Dte || Function("return this")(), ig = Mte, Nte = function() { return ig.Date.now(); }, jm = Nte, Bte = /\s/; function zte(e) { for (var t = e.length; t-- && Bte.test(e.charAt(t)); ) ; return t; } var Vte = zte, jte = /^\s+/; function Hte(e) { return e && e.slice(0, Vte(e) + 1).replace(jte, ""); } var Ute = Hte, qte = ig.Symbol, dc = qte, d6 = Object.prototype, Wte = d6.hasOwnProperty, Gte = d6.toString, dd = dc ? dc.toStringTag : void 0; function Kte(e) { var t = Wte.call(e, dd), n = e[dd]; try { e[dd] = void 0; var r = !0; } catch { } var o = Gte.call(e); return r && (t ? e[dd] = n : delete e[dd]), o; } var Yte = Kte, Xte = Object.prototype, Zte = Xte.toString; function Jte(e) { return Zte.call(e); } var Qte = Jte, ene = "[object Null]", tne = "[object Undefined]", S5 = dc ? dc.toStringTag : void 0; function nne(e) { return e == null ? e === void 0 ? tne : ene : S5 && S5 in Object(e) ? Yte(e) : Qte(e); } var p6 = nne; function rne(e) { return e != null && typeof e == "object"; } var one = rne, ane = "[object Symbol]"; function ine(e) { return typeof e == "symbol" || one(e) && p6(e) == ane; } var df = ine, E5 = NaN, sne = /^[-+]0x[0-9a-f]+$/i, lne = /^0b[01]+$/i, une = /^0o[0-7]+$/i, cne = parseInt; function dne(e) { if (typeof e == "number") return e; if (df(e)) return E5; if (Dl(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Dl(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = Ute(e); var n = lne.test(e); return n || une.test(e) ? cne(e.slice(2), n ? 2 : 8) : sne.test(e) ? E5 : +e; } var $5 = dne, pne = "Expected a function", fne = Math.max, hne = Math.min; function vne(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(pne); t = $5(t) || 0, Dl(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? fne($5(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f); function h(k) { var S = r, _ = o; return r = o = void 0, u = k, i = e.apply(_, S), i; } function p(k) { return u = k, s = setTimeout(g, t), c ? h(k) : i; } function v(k) { var S = k - l, _ = k - u, O = t - S; return d ? hne(O, a - _) : O; } function m(k) { var S = k - l, _ = k - u; return l === void 0 || S >= t || S < 0 || d && _ >= a; } function g() { var k = jm(); if (m(k)) return b(k); s = setTimeout(g, v(k)); } function b(k) { return s = void 0, f && r ? h(k) : (r = o = void 0, i); } function C() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function x() { return s === void 0 ? i : b(jm()); } function w() { var k = jm(), S = m(k); if (r = arguments, o = this, l = k, S) { if (s === void 0) return p(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return w.cancel = C, w.flush = x, w; } var sg = vne, Hm = Jn ? Jn.performance : null, f6 = Hm && Hm.now ? function() { return Hm.now(); } : function() { return Date.now(); }, gne = function() { if (Jn) { if (Jn.requestAnimationFrame) return function(e) { Jn.requestAnimationFrame(e); }; if (Jn.mozRequestAnimationFrame) return function(e) { Jn.mozRequestAnimationFrame(e); }; if (Jn.webkitRequestAnimationFrame) return function(e) { Jn.webkitRequestAnimationFrame(e); }; if (Jn.msRequestAnimationFrame) return function(e) { Jn.msRequestAnimationFrame(e); }; } return function(e) { e && setTimeout(function() { e(f6()); }, 1e3 / 60); }; }(), Rv = function(e) { return gne(e); }, Pi = f6, Bu = 9261, h6 = 65599, Fd = 5381, v6 = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Bu, n = t, r; r = e.next(), !r.done; ) n = n * h6 + r.value | 0; return n; }, hp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Bu; return t * h6 + e | 0; }, vp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Fd; return (t << 5) + t + e | 0; }, mne = function(e, t) { return e * 2097152 + t; }, Ji = function(e) { return e[0] * 2097152 + e[1]; }, oh = function(e, t) { return [hp(e[0], t[0]), vp(e[1], t[1])]; }, yne = function(e, t) { var n = { value: 0, done: !1 }, r = 0, o = e.length, a = { next: function() { return r < o ? n.value = e[r++] : n.done = !0, n; } }; return v6(a, t); }, Ml = function(e, t) { var n = { value: 0, done: !1 }, r = 0, o = e.length, a = { next: function() { return r < o ? n.value = e.charCodeAt(r++) : n.done = !0, n; } }; return v6(a, t); }, g6 = function() { return bne(arguments); }, bne = function(e) { for (var t, n = 0; n < e.length; n++) { var r = e[n]; n === 0 ? t = Ml(r) : t = Ml(r, t); } return t; }, _5 = !0, wne = console.warn != null, xne = console.trace != null, L2 = Number.MAX_SAFE_INTEGER || 9007199254740991, m6 = function() { return !0; }, Dv = function() { return !1; }, T5 = function() { return 0; }, R2 = function() { }, Nn = function(e) { throw new Error(e); }, y6 = function(e) { if (e !== void 0) _5 = !!e; else return _5; }, tn = function(e) { y6() && (wne ? console.warn(e) : (console.log(e), xne && console.trace())); }, kne = function(e) { return kt({}, e); }, Na = function(e) { return e == null ? e : cn(e) ? e.slice() : Ht(e) ? kne(e) : e; }, Cne = function(e) { return e.slice(); }, b6 = function(e, t) { for ( // loop :) t = e = ""; // b - result , a - numeric letiable e++ < 36; // t += e * 51 & 52 ? ( // return a random number or 4 (e ^ 15 ? ( // generate a random number from 0 to 15 8 ^ Math.random() * (e ^ 20 ? 16 : 4) ) : 4).toString(16) ) : "-" ) ; return t; }, Sne = {}, w6 = function() { return Sne; }, Fr = function(e) { var t = Object.keys(e); return function(n) { for (var r = {}, o = 0; o < t.length; o++) { var a = t[o], i = n == null ? void 0 : n[a]; r[a] = i === void 0 ? e[a] : i; } return r; }; }, Ps = function(e, t, n) { for (var r = e.length - 1; r >= 0; r--) e[r] === t && e.splice(r, 1); }, D2 = function(e) { e.splice(0, e.length); }, Ene = function(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.push(r); } }, ha = function(e, t, n) { return n && (t = s6(n, t)), e[t]; }, ms = function(e, t, n, r) { n && (t = s6(n, t)), e[t] = r; }, $ne = /* @__PURE__ */ function() { function e() { F2(this, e), this._obj = {}; } return I2(e, [{ key: "set", value: function(t, n) { return this._obj[t] = n, this; } }, { key: "delete", value: function(t) { return this._obj[t] = void 0, this; } }, { key: "clear", value: function() { this._obj = {}; } }, { key: "has", value: function(t) { return this._obj[t] !== void 0; } }, { key: "get", value: function(t) { return this._obj[t]; } }]), e; }(), Ba = typeof Map < "u" ? Map : $ne, _ne = "undefined", Tne = /* @__PURE__ */ function() { function e(t) { if (F2(this, e), this._obj = /* @__PURE__ */ Object.create(null), this.size = 0, t != null) { var n; t.instanceString != null && t.instanceString() === this.instanceString() ? n = t.toArray() : n = t; for (var r = 0; r < n.length; r++) this.add(n[r]); } } return I2(e, [{ key: "instanceString", value: function() { return "set"; } }, { key: "add", value: function(t) { var n = this._obj; n[t] !== 1 && (n[t] = 1, this.size++); } }, { key: "delete", value: function(t) { var n = this._obj; n[t] === 1 && (n[t] = 0, this.size--); } }, { key: "clear", value: function() { this._obj = /* @__PURE__ */ Object.create(null); } }, { key: "has", value: function(t) { return this._obj[t] === 1; } }, { key: "toArray", value: function() { var t = this; return Object.keys(this._obj).filter(function(n) { return t.has(n); }); } }, { key: "forEach", value: function(t, n) { return this.toArray().forEach(t, n); } }]), e; }(), Rc = (typeof Set > "u" ? "undefined" : or(Set)) !== _ne ? Set : Tne, lg = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; if (e === void 0 || t === void 0 || !A2(e)) { Nn("An element must have a core reference and parameters set"); return; } var r = t.group; if (r == null && (t.data && t.data.source != null && t.data.target != null ? r = "edges" : r = "nodes"), r !== "nodes" && r !== "edges") { Nn("An element must be of type `nodes` or `edges`; you specified `" + r + "`"); return; } this.length = 1, this[0] = this; var o = this._private = { cy: e, single: !0, // indicates this is an element data: t.data || {}, // data object position: t.position || { x: 0, y: 0 }, // (x, y) position pair autoWidth: void 0, // width and height of nodes calculated by the renderer when set to special 'auto' value autoHeight: void 0, autoPadding: void 0, compoundBoundsClean: !1, // whether the compound dimensions need to be recalculated the next time dimensions are read listeners: [], // array of bound listeners group: r, // string; 'nodes' or 'edges' style: {}, // properties as set by the style rstyle: {}, // properties for style sent from the renderer to the core styleCxts: [], // applied style contexts from the styler styleKeys: {}, // per-group keys of style property values removed: !0, // whether it's inside the vis; true if removed (set true here since we call restore) selected: !!t.selected, // whether it's selected selectable: t.selectable === void 0 ? !0 : !!t.selectable, // whether it's selectable locked: !!t.locked, // whether the element is locked (cannot be moved) grabbed: !1, // whether the element is grabbed by the mouse; renderer sets this privately grabbable: t.grabbable === void 0 ? !0 : !!t.grabbable, // whether the element can be grabbed pannable: t.pannable === void 0 ? r === "edges" : !!t.pannable, // whether the element has passthrough panning enabled active: !1, // whether the element is active from user interaction classes: new Rc(), // map ( className => true ) animation: { // object for currently-running animations current: [], queue: [] }, rscratch: {}, // object in which the renderer can store information scratch: t.scratch || {}, // scratch objects edges: [], // array of connected edges children: [], // array of children parent: t.parent && t.parent.isNode() ? t.parent : null, // parent ref traversalCache: {}, // cache of output of traversal functions backgrounding: !1, // whether background images are loading bbCache: null, // cache of the current bounding box bbCacheShift: { x: 0, y: 0 }, // shift applied to cached bb to be applied on next get bodyBounds: null, // bounds cache of element body, w/o overlay overlayBounds: null, // bounds cache of element body, including overlay labelBounds: { // bounds cache of labels all: null, source: null, target: null, main: null }, arrowBounds: { // bounds cache of edge arrows source: null, target: null, "mid-source": null, "mid-target": null } }; if (o.position.x == null && (o.position.x = 0), o.position.y == null && (o.position.y = 0), t.renderedPosition) { var a = t.renderedPosition, i = e.pan(), s = e.zoom(); o.position = { x: (a.x - i.x) / s, y: (a.y - i.y) / s }; } var l = []; cn(t.classes) ? l = t.classes : ht(t.classes) && (l = t.classes.split(/\s+/)); for (var u = 0, c = l.length; u < c; u++) { var d = l[u]; !d || d === "" || o.classes.add(d); } this.createEmitter(); var f = t.style || t.css; f && (tn("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."), this.style(f)), (n === void 0 || n) && this.restore(); }, O5 = function(e) { return e = { bfs: e.bfs || !e.dfs, dfs: e.dfs || !e.bfs }, function(t, n, r) { var o; Ht(t) && !Eo(t) && (o = t, t = o.roots || o.root, n = o.visit, r = o.directed), r = arguments.length === 2 && !An(n) ? n : r, n = An(n) ? n : function() { }; for (var a = this._private.cy, i = t = ht(t) ? this.filter(t) : t, s = [], l = [], u = {}, c = {}, d = {}, f = 0, h, p = this.byGroup(), v = p.nodes, m = p.edges, g = 0; g < i.length; g++) { var b = i[g], C = b.id(); b.isNode() && (s.unshift(b), e.bfs && (d[C] = !0, l.push(b)), c[C] = 0); } for (var x = function() { var F = e.bfs ? s.shift() : s.pop(), I = F.id(); if (e.dfs) { if (d[I]) return "continue"; d[I] = !0, l.push(F); } var P = c[I], M = u[I], N = M != null ? M.source() : null, j = M != null ? M.target() : null, A = M == null ? void 0 : F.same(N) ? j[0] : N[0], U = void 0; if (U = n(F, M, A, f++, P), U === !0) return h = F, "break"; if (U === !1) return "break"; for (var q = F.connectedEdges().filter(function(he) { return (!r || he.source().same(F)) && m.has(he); }), Y = 0; Y < q.length; Y++) { var ie = q[Y], re = ie.connectedNodes().filter(function(he) { return !he.same(F) && v.has(he); }), le = re.id(); re.length !== 0 && !d[le] && (re = re[0], s.push(re), e.bfs && (d[le] = !0, l.push(re)), u[le] = ie, c[le] = c[I] + 1); } }; s.length !== 0; ) { var w = x(); if (w !== "continue" && w === "break") break; } for (var k = a.collection(), S = 0; S < l.length; S++) { var _ = l[S], O = u[_.id()]; O != null && k.push(O), k.push(_); } return { path: a.collection(k), found: a.collection(h) }; }; }, gp = { breadthFirstSearch: O5({ bfs: !0 }), depthFirstSearch: O5({ dfs: !0 }) }; gp.bfs = gp.breadthFirstSearch; gp.dfs = gp.depthFirstSearch; var One = Pte(function(e, t) { (function() { var n, r, o, a, i, s, l, u, c, d, f, h, p, v, m; o = Math.floor, d = Math.min, r = function(g, b) { return g < b ? -1 : g > b ? 1 : 0; }, c = function(g, b, C, x, w) { var k; if (C == null && (C = 0), w == null && (w = r), C < 0) throw new Error("lo must be non-negative"); for (x == null && (x = g.length); C < x; ) k = o((C + x) / 2), w(b, g[k]) < 0 ? x = k : C = k + 1; return [].splice.apply(g, [C, C - C].concat(b)), b; }, s = function(g, b, C) { return C == null && (C = r), g.push(b), v(g, 0, g.length - 1, C); }, i = function(g, b) { var C, x; return b == null && (b = r), C = g.pop(), g.length ? (x = g[0], g[0] = C, m(g, 0, b)) : x = C, x; }, u = function(g, b, C) { var x; return C == null && (C = r), x = g[0], g[0] = b, m(g, 0, C), x; }, l = function(g, b, C) { var x; return C == null && (C = r), g.length && C(g[0], b) < 0 && (x = [g[0], b], b = x[0], g[0] = x[1], m(g, 0, C)), b; }, a = function(g, b) { var C, x, w, k, S, _; for (b == null && (b = r), k = (function() { _ = []; for (var O = 0, F = o(g.length / 2); 0 <= F ? O < F : O > F; 0 <= F ? O++ : O--) _.push(O); return _; }).apply(this).reverse(), S = [], x = 0, w = k.length; x < w; x++) C = k[x], S.push(m(g, C, b)); return S; }, p = function(g, b, C) { var x; if (C == null && (C = r), x = g.indexOf(b), x !== -1) return v(g, 0, x, C), m(g, x, C); }, f = function(g, b, C) { var x, w, k, S, _; if (C == null && (C = r), w = g.slice(0, b), !w.length) return w; for (a(w, C), _ = g.slice(b), k = 0, S = _.length; k < S; k++) x = _[k], l(w, x, C); return w.sort(C).reverse(); }, h = function(g, b, C) { var x, w, k, S, _, O, F, I, P; if (C == null && (C = r), b * 10 <= g.length) { if (k = g.slice(0, b).sort(C), !k.length) return k; for (w = k[k.length - 1], F = g.slice(b), S = 0, O = F.length; S < O; S++) x = F[S], C(x, w) < 0 && (c(k, x, 0, null, C), k.pop(), w = k[k.length - 1]); return k; } for (a(g, C), P = [], _ = 0, I = d(b, g.length); 0 <= I ? _ < I : _ > I; 0 <= I ? ++_ : --_) P.push(i(g, C)); return P; }, v = function(g, b, C, x) { var w, k, S; for (x == null && (x = r), w = g[C]; C > b; ) { if (S = C - 1 >> 1, k = g[S], x(w, k) < 0) { g[C] = k, C = S; continue; } break; } return g[C] = w; }, m = function(g, b, C) { var x, w, k, S, _; for (C == null && (C = r), w = g.length, _ = b, k = g[b], x = 2 * b + 1; x < w; ) S = x + 1, S < w && !(C(g[x], g[S]) < 0) && (x = S), g[b] = g[x], b = x, x = 2 * b + 1; return g[b] = k, v(g, _, b, C); }, n = function() { g.push = s, g.pop = i, g.replace = u, g.pushpop = l, g.heapify = a, g.updateItem = p, g.nlargest = f, g.nsmallest = h; function g(b) { this.cmp = b ?? r, this.nodes = []; } return g.prototype.push = function(b) { return s(this.nodes, b, this.cmp); }, g.prototype.pop = function() { return i(this.nodes, this.cmp); }, g.prototype.peek = function() { return this.nodes[0]; }, g.prototype.contains = function(b) { return this.nodes.indexOf(b) !== -1; }, g.prototype.replace = function(b) { return u(this.nodes, b, this.cmp); }, g.prototype.pushpop = function(b) { return l(this.nodes, b, this.cmp); }, g.prototype.heapify = function() { return a(this.nodes, this.cmp); }, g.prototype.updateItem = function(b) { return p(this.nodes, b, this.cmp); }, g.prototype.clear = function() { return this.nodes = []; }, g.prototype.empty = function() { return this.nodes.length === 0; }, g.prototype.size = function() { return this.nodes.length; }, g.prototype.clone = function() { var b; return b = new g(), b.nodes = this.nodes.slice(0), b; }, g.prototype.toArray = function() { return this.nodes.slice(0); }, g.prototype.insert = g.prototype.push, g.prototype.top = g.prototype.peek, g.prototype.front = g.prototype.peek, g.prototype.has = g.prototype.contains, g.prototype.copy = g.prototype.clone, g; }(), function(g, b) { return e.exports = b(); }(this, function() { return n; }); }).call(Od); }), pf = One, Fne = Fr({ root: null, weight: function(e) { return 1; }, directed: !1 }), Ine = { dijkstra: function(e) { if (!Ht(e)) { var t = arguments; e = { root: t[0], weight: t[1], directed: t[2] }; } var n = Fne(e), r = n.root, o = n.weight, a = n.directed, i = this, s = o, l = ht(r) ? this.filter(r)[0] : r[0], u = {}, c = {}, d = {}, f = this.byGroup(), h = f.nodes, p = f.edges; p.unmergeBy(function(N) { return N.isLoop(); }); for (var v = function(N) { return u[N.id()]; }, m = function(N, j) { u[N.id()] = j, g.updateItem(N); }, g = new pf(function(N, j) { return v(N) - v(j); }), b = 0; b < h.length; b++) { var C = h[b]; u[C.id()] = C.same(l) ? 0 : 1 / 0, g.push(C); } for (var x = function(N, j) { for (var A = (a ? N.edgesTo(j) : N.edgesWith(j)).intersect(p), U = 1 / 0, q, Y = 0; Y < A.length; Y++) { var ie = A[Y], re = s(ie); (re < U || !q) && (U = re, q = ie); } return { edge: q, dist: U }; }; g.size() > 0; ) { var w = g.pop(), k = v(w), S = w.id(); if (d[S] = k, k !== 1 / 0) for (var _ = w.neighborhood().intersect(h), O = 0; O < _.length; O++) { var F = _[O], I = F.id(), P = x(w, F), M = k + P.dist; M < v(F) && (m(F, M), c[I] = { node: w, edge: P.edge }); } } return { distanceTo: function(N) { var j = ht(N) ? h.filter(N)[0] : N[0]; return d[j.id()]; }, pathTo: function(N) { var j = ht(N) ? h.filter(N)[0] : N[0], A = [], U = j, q = U.id(); if (j.length > 0) for (A.unshift(j); c[q]; ) { var Y = c[q]; A.unshift(Y.edge), A.unshift(Y.node), U = Y.node, q = U.id(); } return i.spawn(A); } }; } }, Ane = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e) { e = e || function(b) { return 1; }; for (var t = this.byGroup(), n = t.nodes, r = t.edges, o = n.length, a = new Array(o), i = n, s = function(b) { for (var C = 0; C < a.length; C++) { var x = a[C]; if (x.has(b)) return C; } }, l = 0; l < o; l++) a[l] = this.spawn(n[l]); for (var u = r.sort(function(b, C) { return e(b) - e(C); }), c = 0; c < u.length; c++) { var d = u[c], f = d.source()[0], h = d.target()[0], p = s(f), v = s(h), m = a[p], g = a[v]; p !== v && (i.merge(d), m.merge(g), a.splice(v, 1)); } return i; } }, Pne = Fr({ root: null, goal: null, weight: function(e) { return 1; }, heuristic: function(e) { return 0; }, directed: !1 }), Lne = { // Implemented from pseudocode from wikipedia aStar: function(e) { var t = this.cy(), n = Pne(e), r = n.root, o = n.goal, a = n.heuristic, i = n.directed, s = n.weight; r = t.collection(r)[0], o = t.collection(o)[0]; var l = r.id(), u = o.id(), c = {}, d = {}, f = {}, h = new pf(function(Y, ie) { return d[Y.id()] - d[ie.id()]; }), p = new Rc(), v = {}, m = {}, g = function(Y, ie) { h.push(Y), p.add(ie); }, b, C, x = function() { b = h.pop(), C = b.id(), p.delete(C); }, w = function(Y) { return p.has(Y); }; g(r, l), c[l] = 0, d[l] = a(r); for (var k = 0; h.size() > 0; ) { if (x(), k++, C === u) { for (var S = [], _ = o, O = u, F = m[O]; S.unshift(_), F != null && S.unshift(F), _ = v[O], _ != null; ) O = _.id(), F = m[O]; return { found: !0, distance: c[C], path: this.spawn(S), steps: k }; } f[C] = !0; for (var I = b._private.edges, P = 0; P < I.length; P++) { var M = I[P]; if (this.hasElementWithId(M.id()) && !(i && M.data("source") !== C)) { var N = M.source(), j = M.target(), A = N.id() !== C ? N : j, U = A.id(); if (this.hasElementWithId(U) && !f[U]) { var q = c[C] + s(M); if (!w(U)) { c[U] = q, d[U] = q + a(A), g(A, U), v[U] = b, m[U] = M; continue; } q < c[U] && (c[U] = q, d[U] = q + a(A), v[U] = b, m[U] = M); } } } } return { found: !1, distance: void 0, path: void 0, steps: k }; } }, Rne = Fr({ weight: function(e) { return 1; }, directed: !1 }), Dne = { // Implemented from pseudocode from wikipedia floydWarshall: function(e) { for (var t = this.cy(), n = Rne(e), r = n.weight, o = n.directed, a = r, i = this.byGroup(), s = i.nodes, l = i.edges, u = s.length, c = u * u, d = function(re) { return s.indexOf(re); }, f = function(re) { return s[re]; }, h = new Array(c), p = 0; p < c; p++) { var v = p % u, m = (p - v) / u; m === v ? h[p] = 0 : h[p] = 1 / 0; } for (var g = new Array(c), b = new Array(c), C = 0; C < l.length; C++) { var x = l[C], w = x.source()[0], k = x.target()[0]; if (w !== k) { var S = d(w), _ = d(k), O = S * u + _, F = a(x); if (h[O] > F && (h[O] = F, g[O] = _, b[O] = x), !o) { var I = _ * u + S; !o && h[I] > F && (h[I] = F, g[I] = S, b[I] = x); } } } for (var P = 0; P < u; P++) for (var M = 0; M < u; M++) for (var N = M * u + P, j = 0; j < u; j++) { var A = M * u + j, U = P * u + j; h[N] + h[U] < h[A] && (h[A] = h[N] + h[U], g[A] = g[N]); } var q = function(re) { return (ht(re) ? t.filter(re) : re)[0]; }, Y = function(re) { return d(q(re)); }, ie = { distance: function(re, le) { var he = Y(re), we = Y(le); return h[he * u + we]; }, path: function(re, le) { var he = Y(re), we = Y(le), be = f(he); if (he === we) return be.collection(); if (g[he * u + we] == null) return t.collection(); var de = t.collection(), ae = he, ee; for (de.merge(be); he !== we; ) ae = he, he = g[he * u + we], ee = b[ae * u + he], de.merge(ee), de.merge(f(he)); return de; } }; return ie; } // floydWarshall }, Mne = Fr({ weight: function(e) { return 1; }, directed: !1, root: null }), Nne = { // Implemented from pseudocode from wikipedia bellmanFord: function(e) { var t = this, n = Mne(e), r = n.weight, o = n.directed, a = n.root, i = r, s = this, l = this.cy(), u = this.byGroup(), c = u.edges, d = u.nodes, f = d.length, h = new Ba(), p = !1, v = []; a = l.collection(a)[0], c.unmergeBy(function(Ie) { return Ie.isLoop(); }); for (var m = c.length, g = function(Ie) { var He = h.get(Ie.id()); return He || (He = {}, h.set(Ie.id(), He)), He; }, b = function(Ie) { return (ht(Ie) ? l.$(Ie) : Ie)[0]; }, C = function(Ie) { return g(b(Ie)).dist; }, x = function(Ie) { for (var He = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : a, qe = b(Ie), et = [], Ve = qe; ; ) { if (Ve == null) return t.spawn(); var nt = g(Ve), ot = nt.edge, pt = nt.pred; if (et.unshift(Ve[0]), Ve.same(He) && et.length > 0) break; ot != null && et.unshift(ot), Ve = pt; } return s.spawn(et); }, w = 0; w < f; w++) { var k = d[w], S = g(k); k.same(a) ? S.dist = 0 : S.dist = 1 / 0, S.pred = null, S.edge = null; } for (var _ = !1, O = function(Ie, He, qe, et, Ve, nt) { var ot = et.dist + nt; ot < Ve.dist && !qe.same(et.edge) && (Ve.dist = ot, Ve.pred = Ie, Ve.edge = qe, _ = !0); }, F = 1; F < f; F++) { _ = !1; for (var I = 0; I < m; I++) { var P = c[I], M = P.source(), N = P.target(), j = i(P), A = g(M), U = g(N); O(M, N, P, A, U, j), o || O(N, M, P, U, A, j); } if (!_) break; } if (_) for (var q = [], Y = 0; Y < m; Y++) { var ie = c[Y], re = ie.source(), le = ie.target(), he = i(ie), we = g(re).dist, be = g(le).dist; if (we + he < be || !o && be + he < we) if (p || (tn("Graph contains a negative weight cycle for Bellman-Ford"), p = !0), e.findNegativeWeightCycles !== !1) { var de = []; we + he < be && de.push(re), !o && be + he < we && de.push(le); for (var ae = de.length, ee = 0; ee < ae; ee++) { var se = de[ee], pe = [se]; pe.push(g(se).edge); for (var Se = g(se).pred; pe.indexOf(Se) === -1; ) pe.push(Se), pe.push(g(Se).edge), Se = g(Se).pred; pe = pe.slice(pe.indexOf(Se)); for (var Le = pe[0].id(), je = 0, _e = 2; _e < pe.length; _e += 2) pe[_e].id() < Le && (Le = pe[_e].id(), je = _e); pe = pe.slice(je).concat(pe.slice(0, je)), pe.push(pe[0]); var ze = pe.map(function(Ie) { return Ie.id(); }).join(","); q.indexOf(ze) === -1 && (v.push(s.spawn(pe)), q.push(ze)); } } else break; } return { distanceTo: C, pathTo: x, hasNegativeWeightCycle: p, negativeWeightCycles: v }; } // bellmanFord }, Bne = Math.sqrt(2), zne = function(e, t, n) { n.length === 0 && Nn("Karger-Stein must be run on a connected (sub)graph"); for (var r = n[e], o = r[1], a = r[2], i = t[o], s = t[a], l = n, u = l.length - 1; u >= 0; u--) { var c = l[u], d = c[1], f = c[2]; (t[d] === i && t[f] === s || t[d] === s && t[f] === i) && l.splice(u, 1); } for (var h = 0; h < l.length; h++) { var p = l[h]; p[1] === s ? (l[h] = p.slice(), l[h][1] = i) : p[2] === s && (l[h] = p.slice(), l[h][2] = i); } for (var v = 0; v < t.length; v++) t[v] === s && (t[v] = i); return l; }, Um = function(e, t, n, r) { for (; n > r; ) { var o = Math.floor(Math.random() * t.length); t = zne(o, e, t), n--; } return t; }, Vne = { // Computes the minimum cut of an undirected graph // Returns the correct answer with high probability kargerStein: function() { var e = this, t = this.byGroup(), n = t.nodes, r = t.edges; r.unmergeBy(function(U) { return U.isLoop(); }); var o = n.length, a = r.length, i = Math.ceil(Math.pow(Math.log(o) / Math.LN2, 2)), s = Math.floor(o / Bne); if (o < 2) { Nn("At least 2 nodes are required for Karger-Stein algorithm"); return; } for (var l = [], u = 0; u < a; u++) { var c = r[u]; l.push([u, n.indexOf(c.source()), n.indexOf(c.target())]); } for (var d = 1 / 0, f = [], h = new Array(o), p = new Array(o), v = new Array(o), m = function(U, q) { for (var Y = 0; Y < o; Y++) q[Y] = U[Y]; }, g = 0; g <= i; g++) { for (var b = 0; b < o; b++) p[b] = b; var C = Um(p, l.slice(), o, s), x = C.slice(); m(p, v); var w = Um(p, C, s, 2), k = Um(v, x, s, 2); w.length <= k.length && w.length < d ? (d = w.length, f = w, m(p, h)) : k.length <= w.length && k.length < d && (d = k.length, f = k, m(v, h)); } for (var S = this.spawn(f.map(function(U) { return r[U[0]]; })), _ = this.spawn(), O = this.spawn(), F = h[0], I = 0; I < h.length; I++) { var P = h[I], M = n[I]; P === F ? _.merge(M) : O.merge(M); } var N = function(U) { var q = e.spawn(); return U.forEach(function(Y) { q.merge(Y), Y.connectedEdges().forEach(function(ie) { e.contains(ie) && !S.contains(ie) && q.merge(ie); }); }), q; }, j = [N(_), N(O)], A = { cut: S, components: j, // n.b. partitions are included to be compatible with the old api spec // (could be removed in a future major version) partition1: _, partition2: O }; return A; } }, jne = function(e) { return { x: e.x, y: e.y }; }, ug = function(e, t, n) { return { x: e.x * t + n.x, y: e.y * t + n.y }; }, x6 = function(e, t, n) { return { x: (e.x - n.x) / t, y: (e.y - n.y) / t }; }, zu = function(e) { return { x: e[0], y: e[1] }; }, Hne = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = 1 / 0, o = t; o < n; o++) { var a = e[o]; isFinite(a) && (r = Math.min(a, r)); } return r; }, Une = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = -1 / 0, o = t; o < n; o++) { var a = e[o]; isFinite(a) && (r = Math.max(a, r)); } return r; }, qne = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = 0, o = 0, a = t; a < n; a++) { var i = e[a]; isFinite(i) && (r += i, o++); } return r / o; }, Wne = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0; r ? e = e.slice(t, n) : (n < e.length && e.splice(n, e.length - n), t > 0 && e.splice(0, t)); for (var i = 0, s = e.length - 1; s >= 0; s--) { var l = e[s]; a ? isFinite(l) || (e[s] = -1 / 0, i++) : e.splice(s, 1); } o && e.sort(function(d, f) { return d - f; }); var u = e.length, c = Math.floor(u / 2); return u % 2 !== 0 ? e[c + 1 + i] : (e[c - 1 + i] + e[c + i]) / 2; }, Gne = function(e) { return Math.PI * e / 180; }, ah = function(e, t) { return Math.atan2(t, e) - Math.PI / 2; }, M2 = Math.log2 || function(e) { return Math.log(e) / Math.log(2); }, k6 = function(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; }, Nl = function(e, t) { return Math.sqrt(sl(e, t)); }, sl = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return n * n + r * r; }, Kne = function(e) { for (var t = e.length, n = 0, r = 0; r < t; r++) n += e[r]; for (var o = 0; o < t; o++) e[o] = e[o] / n; return e; }, ur = function(e, t, n, r) { return (1 - r) * (1 - r) * e + 2 * (1 - r) * r * t + r * r * n; }, Uu = function(e, t, n, r) { return { x: ur(e.x, t.x, n.x, r), y: ur(e.y, t.y, n.y, r) }; }, Yne = function(e, t, n, r) { var o = { x: t.x - e.x, y: t.y - e.y }, a = Nl(e, t), i = { x: o.x / a, y: o.y / a }; return n = n ?? 0, r = r ?? n * a, { x: e.x + i.x * r, y: e.y + i.y * r }; }, mp = function(e, t, n) { return Math.max(e, Math.min(n, t)); }, yo = function(e) { if (e == null) return { x1: 1 / 0, y1: 1 / 0, x2: -1 / 0, y2: -1 / 0, w: 0, h: 0 }; if (e.x1 != null && e.y1 != null) { if (e.x2 != null && e.y2 != null && e.x2 >= e.x1 && e.y2 >= e.y1) return { x1: e.x1, y1: e.y1, x2: e.x2, y2: e.y2, w: e.x2 - e.x1, h: e.y2 - e.y1 }; if (e.w != null && e.h != null && e.w >= 0 && e.h >= 0) return { x1: e.x1, y1: e.y1, x2: e.x1 + e.w, y2: e.y1 + e.h, w: e.w, h: e.h }; } }, Xne = function(e) { return { x1: e.x1, x2: e.x2, w: e.w, y1: e.y1, y2: e.y2, h: e.h }; }, Zne = function(e) { e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; }, Jne = function(e, t, n) { return { x1: e.x1 + t, x2: e.x2 + t, y1: e.y1 + n, y2: e.y2 + n, w: e.w, h: e.h }; }, C6 = function(e, t) { e.x1 = Math.min(e.x1, t.x1), e.x2 = Math.max(e.x2, t.x2), e.w = e.x2 - e.x1, e.y1 = Math.min(e.y1, t.y1), e.y2 = Math.max(e.y2, t.y2), e.h = e.y2 - e.y1; }, Qne = function(e, t, n) { e.x1 = Math.min(e.x1, t), e.x2 = Math.max(e.x2, t), e.w = e.x2 - e.x1, e.y1 = Math.min(e.y1, n), e.y2 = Math.max(e.y2, n), e.h = e.y2 - e.y1; }, Kh = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return e.x1 -= t, e.x2 += t, e.y1 -= t, e.y2 += t, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, Yh = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], n, r, o, a; if (t.length === 1) n = r = o = a = t[0]; else if (t.length === 2) n = o = t[0], a = r = t[1]; else if (t.length === 4) { var i = ca(t, 4); n = i[0], r = i[1], o = i[2], a = i[3]; } return e.x1 -= a, e.x2 += r, e.y1 -= n, e.y2 += o, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, F5 = function(e, t) { e.x1 = t.x1, e.y1 = t.y1, e.x2 = t.x2, e.y2 = t.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1; }, N2 = function(e, t) { return !(e.x1 > t.x2 || t.x1 > e.x2 || e.x2 < t.x1 || t.x2 < e.x1 || e.y2 < t.y1 || t.y2 < e.y1 || e.y1 > t.y2 || t.y1 > e.y2); }, pc = function(e, t, n) { return e.x1 <= t && t <= e.x2 && e.y1 <= n && n <= e.y2; }, ere = function(e, t) { return pc(e, t.x, t.y); }, S6 = function(e, t) { return pc(e, t.x1, t.y1) && pc(e, t.x2, t.y2); }, E6 = function(e, t, n, r, o, a, i) { var s = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "auto", l = s === "auto" ? Bl(o, a) : s, u = o / 2, c = a / 2; l = Math.min(l, u, c); var d = l !== u, f = l !== c, h; if (d) { var p = n - u + l - i, v = r - c - i, m = n + u - l + i, g = v; if (h = ks(e, t, n, r, p, v, m, g, !1), h.length > 0) return h; } if (f) { var b = n + u + i, C = r - c + l - i, x = b, w = r + c - l + i; if (h = ks(e, t, n, r, b, C, x, w, !1), h.length > 0) return h; } if (d) { var k = n - u + l - i, S = r + c + i, _ = n + u - l + i, O = S; if (h = ks(e, t, n, r, k, S, _, O, !1), h.length > 0) return h; } if (f) { var F = n - u - i, I = r - c + l - i, P = F, M = r + c - l + i; if (h = ks(e, t, n, r, F, I, P, M, !1), h.length > 0) return h; } var N; { var j = n - u + l, A = r - c + l; if (N = Id(e, t, n, r, j, A, l + i), N.length > 0 && N[0] <= j && N[1] <= A) return [N[0], N[1]]; } { var U = n + u - l, q = r - c + l; if (N = Id(e, t, n, r, U, q, l + i), N.length > 0 && N[0] >= U && N[1] <= q) return [N[0], N[1]]; } { var Y = n + u - l, ie = r + c - l; if (N = Id(e, t, n, r, Y, ie, l + i), N.length > 0 && N[0] >= Y && N[1] >= ie) return [N[0], N[1]]; } { var re = n - u + l, le = r + c - l; if (N = Id(e, t, n, r, re, le, l + i), N.length > 0 && N[0] <= re && N[1] >= le) return [N[0], N[1]]; } return []; }, tre = function(e, t, n, r, o, a, i) { var s = i, l = Math.min(n, o), u = Math.max(n, o), c = Math.min(r, a), d = Math.max(r, a); return l - s <= e && e <= u + s && c - s <= t && t <= d + s; }, nre = function(e, t, n, r, o, a, i, s, l) { var u = { x1: Math.min(n, i, o) - l, x2: Math.max(n, i, o) + l, y1: Math.min(r, s, a) - l, y2: Math.max(r, s, a) + l }; return !(e < u.x1 || e > u.x2 || t < u.y1 || t > u.y2); }, rre = function(e, t, n, r) { n -= r; var o = t * t - 4 * e * n; if (o < 0) return []; var a = Math.sqrt(o), i = 2 * e, s = (-t + a) / i, l = (-t - a) / i; return [s, l]; }, ore = function(e, t, n, r, o) { var a = 1e-5; e === 0 && (e = a), t /= e, n /= e, r /= e; var i, s, l, u, c, d, f, h; if (s = (3 * n - t * t) / 9, l = -(27 * r) + t * (9 * n - 2 * (t * t)), l /= 54, i = s * s * s + l * l, o[1] = 0, f = t / 3, i > 0) { c = l + Math.sqrt(i), c = c < 0 ? -Math.pow(-c, 1 / 3) : Math.pow(c, 1 / 3), d = l - Math.sqrt(i), d = d < 0 ? -Math.pow(-d, 1 / 3) : Math.pow(d, 1 / 3), o[0] = -f + c + d, f += (c + d) / 2, o[4] = o[2] = -f, f = Math.sqrt(3) * (-d + c) / 2, o[3] = f, o[5] = -f; return; } if (o[5] = o[3] = 0, i === 0) { h = l < 0 ? -Math.pow(-l, 1 / 3) : Math.pow(l, 1 / 3), o[0] = -f + 2 * h, o[4] = o[2] = -(h + f); return; } s = -s, u = s * s * s, u = Math.acos(l / Math.sqrt(u)), h = 2 * Math.sqrt(s), o[0] = -f + h * Math.cos(u / 3), o[2] = -f + h * Math.cos((u + 2 * Math.PI) / 3), o[4] = -f + h * Math.cos((u + 4 * Math.PI) / 3); }, are = function(e, t, n, r, o, a, i, s) { var l = 1 * n * n - 4 * n * o + 2 * n * i + 4 * o * o - 4 * o * i + i * i + r * r - 4 * r * a + 2 * r * s + 4 * a * a - 4 * a * s + s * s, u = 1 * 9 * n * o - 3 * n * n - 3 * n * i - 6 * o * o + 3 * o * i + 9 * r * a - 3 * r * r - 3 * r * s - 6 * a * a + 3 * a * s, c = 1 * 3 * n * n - 6 * n * o + n * i - n * e + 2 * o * o + 2 * o * e - i * e + 3 * r * r - 6 * r * a + r * s - r * t + 2 * a * a + 2 * a * t - s * t, d = 1 * n * o - n * n + n * e - o * e + r * a - r * r + r * t - a * t, f = []; ore(l, u, c, d, f); for (var h = 1e-7, p = [], v = 0; v < 6; v += 2) Math.abs(f[v + 1]) < h && f[v] >= 0 && f[v] <= 1 && p.push(f[v]); p.push(1), p.push(0); for (var m = -1, g, b, C, x = 0; x < p.length; x++) g = Math.pow(1 - p[x], 2) * n + 2 * (1 - p[x]) * p[x] * o + p[x] * p[x] * i, b = Math.pow(1 - p[x], 2) * r + 2 * (1 - p[x]) * p[x] * a + p[x] * p[x] * s, C = Math.pow(g - e, 2) + Math.pow(b - t, 2), m >= 0 ? C < m && (m = C) : m = C; return m; }, ire = function(e, t, n, r, o, a) { var i = [e - n, t - r], s = [o - n, a - r], l = s[0] * s[0] + s[1] * s[1], u = i[0] * i[0] + i[1] * i[1], c = i[0] * s[0] + i[1] * s[1], d = c * c / l; return c < 0 ? u : d > l ? (e - o) * (e - o) + (t - a) * (t - a) : u - d; }, ro = function(e, t, n) { for (var r, o, a, i, s, l = 0, u = 0; u < n.length / 2; u++) if (r = n[u * 2], o = n[u * 2 + 1], u + 1 < n.length / 2 ? (a = n[(u + 1) * 2], i = n[(u + 1) * 2 + 1]) : (a = n[(u + 1 - n.length / 2) * 2], i = n[(u + 1 - n.length / 2) * 2 + 1]), !(r == e && a == e)) if (r >= e && e >= a || r <= e && e <= a) s = (e - r) / (a - r) * (i - o) + o, s > t && l++; else continue; return l % 2 !== 0; }, Li = function(e, t, n, r, o, a, i, s, l) { var u = new Array(n.length), c; s[0] != null ? (c = Math.atan(s[1] / s[0]), s[0] < 0 ? c = c + Math.PI / 2 : c = -c - Math.PI / 2) : c = s; for (var d = Math.cos(-c), f = Math.sin(-c), h = 0; h < u.length / 2; h++) u[h * 2] = a / 2 * (n[h * 2] * d - n[h * 2 + 1] * f), u[h * 2 + 1] = i / 2 * (n[h * 2 + 1] * d + n[h * 2] * f), u[h * 2] += r, u[h * 2 + 1] += o; var p; if (l > 0) { var v = Nv(u, -l); p = Mv(v); } else p = u; return ro(e, t, p); }, sre = function(e, t, n, r, o, a, i, s) { for (var l = new Array(n.length * 2), u = 0; u < s.length; u++) { var c = s[u]; l[u * 4 + 0] = c.startX, l[u * 4 + 1] = c.startY, l[u * 4 + 2] = c.stopX, l[u * 4 + 3] = c.stopY; var d = Math.pow(c.cx - e, 2) + Math.pow(c.cy - t, 2); if (d <= Math.pow(c.radius, 2)) return !0; } return ro(e, t, l); }, Mv = function(e) { for (var t = new Array(e.length / 2), n, r, o, a, i, s, l, u, c = 0; c < e.length / 4; c++) { n = e[c * 4], r = e[c * 4 + 1], o = e[c * 4 + 2], a = e[c * 4 + 3], c < e.length / 4 - 1 ? (i = e[(c + 1) * 4], s = e[(c + 1) * 4 + 1], l = e[(c + 1) * 4 + 2], u = e[(c + 1) * 4 + 3]) : (i = e[0], s = e[1], l = e[2], u = e[3]); var d = ks(n, r, o, a, i, s, l, u, !0); t[c * 2] = d[0], t[c * 2 + 1] = d[1]; } return t; }, Nv = function(e, t) { for (var n = new Array(e.length * 2), r, o, a, i, s = 0; s < e.length / 2; s++) { r = e[s * 2], o = e[s * 2 + 1], s < e.length / 2 - 1 ? (a = e[(s + 1) * 2], i = e[(s + 1) * 2 + 1]) : (a = e[0], i = e[1]); var l = i - o, u = -(a - r), c = Math.sqrt(l * l + u * u), d = l / c, f = u / c; n[s * 4] = r + d * t, n[s * 4 + 1] = o + f * t, n[s * 4 + 2] = a + d * t, n[s * 4 + 3] = i + f * t; } return n; }, lre = function(e, t, n, r, o, a) { var i = n - e, s = r - t; i /= o, s /= a; var l = Math.sqrt(i * i + s * s), u = l - 1; if (u < 0) return []; var c = u / l; return [(n - e) * c + e, (r - t) * c + t]; }, fl = function(e, t, n, r, o, a, i) { return e -= o, t -= a, e /= n / 2 + i, t /= r / 2 + i, e * e + t * t <= 1; }, Id = function(e, t, n, r, o, a, i) { var s = [n - e, r - t], l = [e - o, t - a], u = s[0] * s[0] + s[1] * s[1], c = 2 * (l[0] * s[0] + l[1] * s[1]), d = l[0] * l[0] + l[1] * l[1] - i * i, f = c * c - 4 * u * d; if (f < 0) return []; var h = (-c + Math.sqrt(f)) / (2 * u), p = (-c - Math.sqrt(f)) / (2 * u), v = Math.min(h, p), m = Math.max(h, p), g = []; if (v >= 0 && v <= 1 && g.push(v), m >= 0 && m <= 1 && g.push(m), g.length === 0) return []; var b = g[0] * s[0] + e, C = g[0] * s[1] + t; if (g.length > 1) { if (g[0] == g[1]) return [b, C]; var x = g[1] * s[0] + e, w = g[1] * s[1] + t; return [b, C, x, w]; } else return [b, C]; }, qm = function(e, t, n) { return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n; }, ks = function(e, t, n, r, o, a, i, s, l) { var u = e - o, c = n - e, d = i - o, f = t - a, h = r - t, p = s - a, v = d * f - p * u, m = c * f - h * u, g = p * c - d * h; if (g !== 0) { var b = v / g, C = m / g, x = 1e-3, w = 0 - x, k = 1 + x; return w <= b && b <= k && w <= C && C <= k ? [e + b * c, t + b * h] : l ? [e + b * c, t + b * h] : []; } else return v === 0 || m === 0 ? qm(e, n, i) === i ? [i, s] : qm(e, n, o) === o ? [o, a] : qm(o, i, n) === n ? [n, r] : [] : []; }, yp = function(e, t, n, r, o, a, i, s) { var l = [], u, c = new Array(n.length), d = !0; a == null && (d = !1); var f; if (d) { for (var h = 0; h < c.length / 2; h++) c[h * 2] = n[h * 2] * a + r, c[h * 2 + 1] = n[h * 2 + 1] * i + o; if (s > 0) { var p = Nv(c, -s); f = Mv(p); } else f = c; } else f = n; for (var v, m, g, b, C = 0; C < f.length / 2; C++) v = f[C * 2], m = f[C * 2 + 1], C < f.length / 2 - 1 ? (g = f[(C + 1) * 2], b = f[(C + 1) * 2 + 1]) : (g = f[0], b = f[1]), u = ks(e, t, r, o, v, m, g, b), u.length !== 0 && l.push(u[0], u[1]); return l; }, ure = function(e, t, n, r, o, a, i, s, l) { var u = [], c, d = new Array(n.length * 2); l.forEach(function(g, b) { b === 0 ? (d[d.length - 2] = g.startX, d[d.length - 1] = g.startY) : (d[b * 4 - 2] = g.startX, d[b * 4 - 1] = g.startY), d[b * 4] = g.stopX, d[b * 4 + 1] = g.stopY, c = Id(e, t, r, o, g.cx, g.cy, g.radius), c.length !== 0 && u.push(c[0], c[1]); }); for (var f = 0; f < d.length / 4; f++) c = ks(e, t, r, o, d[f * 4], d[f * 4 + 1], d[f * 4 + 2], d[f * 4 + 3], !1), c.length !== 0 && u.push(c[0], c[1]); if (u.length > 2) { for (var h = [u[0], u[1]], p = Math.pow(h[0] - e, 2) + Math.pow(h[1] - t, 2), v = 1; v < u.length / 2; v++) { var m = Math.pow(u[v * 2] - e, 2) + Math.pow(u[v * 2 + 1] - t, 2); m <= p && (h[0] = u[v * 2], h[1] = u[v * 2 + 1], p = m); } return h; } return u; }, ih = function(e, t, n) { var r = [e[0] - t[0], e[1] - t[1]], o = Math.sqrt(r[0] * r[0] + r[1] * r[1]), a = (o - n) / o; return a < 0 && (a = 1e-5), [t[0] + a * r[0], t[1] + a * r[1]]; }, Gr = function(e, t) { var n = ly(e, t); return n = $6(n), n; }, $6 = function(e) { for (var t, n, r = e.length / 2, o = 1 / 0, a = 1 / 0, i = -1 / 0, s = -1 / 0, l = 0; l < r; l++) t = e[2 * l], n = e[2 * l + 1], o = Math.min(o, t), i = Math.max(i, t), a = Math.min(a, n), s = Math.max(s, n); for (var u = 2 / (i - o), c = 2 / (s - a), d = 0; d < r; d++) t = e[2 * d] = e[2 * d] * u, n = e[2 * d + 1] = e[2 * d + 1] * c, o = Math.min(o, t), i = Math.max(i, t), a = Math.min(a, n), s = Math.max(s, n); if (a < -1) for (var f = 0; f < r; f++) n = e[2 * f + 1] = e[2 * f + 1] + (-1 - a); return e; }, ly = function(e, t) { var n = 1 / e * 2 * Math.PI, r = e % 2 === 0 ? Math.PI / 2 + n / 2 : Math.PI / 2; r += t; for (var o = new Array(e * 2), a, i = 0; i < e; i++) a = i * n + r, o[2 * i] = Math.cos(a), o[2 * i + 1] = Math.sin(-a); return o; }, Bl = function(e, t) { return Math.min(e / 4, t / 4, 8); }, _6 = function(e, t) { return Math.min(e / 10, t / 10, 8); }, B2 = function() { return 8; }, cre = function(e, t, n) { return [e - 2 * t + n, 2 * (t - e), e]; }, uy = function(e, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e), ctrlPtOffsetPct: 0.05 }; }, dre = Fr({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e) { return 1; } }), pre = { pageRank: function(e) { for (var t = dre(e), n = t.dampingFactor, r = t.precision, o = t.iterations, a = t.weight, i = this._private.cy, s = this.byGroup(), l = s.nodes, u = s.edges, c = l.length, d = c * c, f = u.length, h = new Array(d), p = new Array(c), v = (1 - n) / c, m = 0; m < c; m++) { for (var g = 0; g < c; g++) { var b = m * c + g; h[b] = 0; } p[m] = 0; } for (var C = 0; C < f; C++) { var x = u[C], w = x.data("source"), k = x.data("target"); if (w !== k) { var S = l.indexOfId(w), _ = l.indexOfId(k), O = a(x), F = _ * c + S; h[F] += O, p[S] += O; } } for (var I = 1 / c + v, P = 0; P < c; P++) if (p[P] === 0) for (var M = 0; M < c; M++) { var N = M * c + P; h[N] = I; } else for (var j = 0; j < c; j++) { var A = j * c + P; h[A] = h[A] / p[P] + v; } for (var U = new Array(c), q = new Array(c), Y, ie = 0; ie < c; ie++) U[ie] = 1; for (var re = 0; re < o; re++) { for (var le = 0; le < c; le++) q[le] = 0; for (var he = 0; he < c; he++) for (var we = 0; we < c; we++) { var be = he * c + we; q[he] += h[be] * U[we]; } Kne(q), Y = U, U = q, q = Y; for (var de = 0, ae = 0; ae < c; ae++) { var ee = Y[ae] - U[ae]; de += ee * ee; } if (de < r) break; } var se = { rank: function(pe) { return pe = i.collection(pe)[0], U[l.indexOf(pe)]; } }; return se; } // pageRank }, I5 = Fr({ root: null, weight: function(e) { return 1; }, directed: !1, alpha: 0 }), qu = { degreeCentralityNormalized: function(e) { e = I5(e); var t = this.cy(), n = this.nodes(), r = n.length; if (e.directed) { for (var o = {}, a = {}, i = 0, s = 0, l = 0; l < r; l++) { var u = n[l], c = u.id(); e.root = u; var d = this.degreeCentrality(e); i < d.indegree && (i = d.indegree), s < d.outdegree && (s = d.outdegree), o[c] = d.indegree, a[c] = d.outdegree; } return { indegree: function(g) { return i == 0 ? 0 : (ht(g) && (g = t.filter(g)), o[g.id()] / i); }, outdegree: function(g) { return s === 0 ? 0 : (ht(g) && (g = t.filter(g)), a[g.id()] / s); } }; } else { for (var f = {}, h = 0, p = 0; p < r; p++) { var v = n[p]; e.root = v; var m = this.degreeCentrality(e); h < m.degree && (h = m.degree), f[v.id()] = m.degree; } return { degree: function(g) { return h === 0 ? 0 : (ht(g) && (g = t.filter(g)), f[g.id()] / h); } }; } }, // degreeCentralityNormalized // Implemented from the algorithm in Opsahl's paper // "Node centrality in weighted networks: Generalizing degree and shortest paths" // check the heading 2 "Degree" degreeCentrality: function(e) { e = I5(e); var t = this.cy(), n = this, r = e, o = r.root, a = r.weight, i = r.directed, s = r.alpha; if (o = t.collection(o)[0], i) { for (var l = o.connectedEdges(), u = l.filter(function(w) { return w.target().same(o) && n.has(w); }), c = l.filter(function(w) { return w.source().same(o) && n.has(w); }), d = u.length, f = c.length, h = 0, p = 0, v = 0; v < u.length; v++) h += a(u[v]); for (var m = 0; m < c.length; m++) p += a(c[m]); return { indegree: Math.pow(d, 1 - s) * Math.pow(h, s), outdegree: Math.pow(f, 1 - s) * Math.pow(p, s) }; } else { for (var g = o.connectedEdges().intersection(n), b = g.length, C = 0, x = 0; x < g.length; x++) C += a(g[x]); return { degree: Math.pow(b, 1 - s) * Math.pow(C, s) }; } } // degreeCentrality }; qu.dc = qu.degreeCentrality; qu.dcn = qu.degreeCentralityNormalised = qu.degreeCentralityNormalized; var A5 = Fr({ harmonic: !0, weight: function() { return 1; }, directed: !1, root: null }), Wu = { closenessCentralityNormalized: function(e) { for (var t = A5(e), n = t.harmonic, r = t.weight, o = t.directed, a = this.cy(), i = {}, s = 0, l = this.nodes(), u = this.floydWarshall({ weight: r, directed: o }), c = 0; c < l.length; c++) { for (var d = 0, f = l[c], h = 0; h < l.length; h++) if (c !== h) { var p = u.distance(f, l[h]); n ? d += 1 / p : d += p; } n || (d = 1 / d), s < d && (s = d), i[f.id()] = d; } return { closeness: function(v) { return s == 0 ? 0 : (ht(v) ? v = a.filter(v)[0].id() : v = v.id(), i[v] / s); } }; }, // Implemented from pseudocode from wikipedia closenessCentrality: function(e) { var t = A5(e), n = t.root, r = t.weight, o = t.directed, a = t.harmonic; n = this.filter(n)[0]; for (var i = this.dijkstra({ root: n, weight: r, directed: o }), s = 0, l = this.nodes(), u = 0; u < l.length; u++) { var c = l[u]; if (!c.same(n)) { var d = i.distanceTo(c); a ? s += 1 / d : s += d; } } return a ? s : 1 / s; } // closenessCentrality }; Wu.cc = Wu.closenessCentrality; Wu.ccn = Wu.closenessCentralityNormalised = Wu.closenessCentralityNormalized; var fre = Fr({ weight: null, directed: !1 }), cy = { // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes betweennessCentrality: function(e) { for (var t = fre(e), n = t.directed, r = t.weight, o = r != null, a = this.cy(), i = this.nodes(), s = {}, l = {}, u = 0, c = { set: function(g, b) { l[g] = b, b > u && (u = b); }, get: function(g) { return l[g]; } }, d = 0; d < i.length; d++) { var f = i[d], h = f.id(); n ? s[h] = f.outgoers().nodes() : s[h] = f.openNeighborhood().nodes(), c.set(h, 0); } for (var p = function(g) { for (var b = i[g].id(), C = [], x = {}, w = {}, k = {}, S = new pf(function(he, we) { return k[he] - k[we]; }), _ = 0; _ < i.length; _++) { var O = i[_].id(); x[O] = [], w[O] = 0, k[O] = 1 / 0; } for (w[b] = 1, k[b] = 0, S.push(b); !S.empty(); ) { var F = S.pop(); if (C.push(F), o) for (var I = 0; I < s[F].length; I++) { var P = s[F][I], M = a.getElementById(F), N = void 0; M.edgesTo(P).length > 0 ? N = M.edgesTo(P)[0] : N = P.edgesTo(M)[0]; var j = r(N); P = P.id(), k[P] > k[F] + j && (k[P] = k[F] + j, S.nodes.indexOf(P) < 0 ? S.push(P) : S.updateItem(P), w[P] = 0, x[P] = []), k[P] == k[F] + j && (w[P] = w[P] + w[F], x[P].push(F)); } else for (var A = 0; A < s[F].length; A++) { var U = s[F][A].id(); k[U] == 1 / 0 && (S.push(U), k[U] = k[F] + 1), k[U] == k[F] + 1 && (w[U] = w[U] + w[F], x[U].push(F)); } } for (var q = {}, Y = 0; Y < i.length; Y++) q[i[Y].id()] = 0; for (; C.length > 0; ) { for (var ie = C.pop(), re = 0; re < x[ie].length; re++) { var le = x[ie][re]; q[le] = q[le] + w[le] / w[ie] * (1 + q[ie]); } ie != i[g].id() && c.set(ie, c.get(ie) + q[ie]); } }, v = 0; v < i.length; v++) p(v); var m = { betweenness: function(g) { var b = a.collection(g).id(); return c.get(b); }, betweennessNormalized: function(g) { if (u == 0) return 0; var b = a.collection(g).id(); return c.get(b) / u; } }; return m.betweennessNormalised = m.betweennessNormalized, m; } // betweennessCentrality }; cy.bc = cy.betweennessCentrality; var hre = Fr({ expandFactor: 2, // affects time of computation and cluster granularity to some extent: M * M inflateFactor: 2, // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) multFactor: 1, // optional self loops for each node. Use a neutral value to improve cluster computations. maxIterations: 20, // maximum number of iterations of the MCL algorithm in a single run attributes: [ // attributes/features used to group nodes, ie. similarity values between nodes function(e) { return 1; } ] }), vre = function(e) { return hre(e); }, gre = function(e, t) { for (var n = 0, r = 0; r < t.length; r++) n += t[r](e); return n; }, mre = function(e, t, n) { for (var r = 0; r < t; r++) e[r * t + r] = n; }, T6 = function(e, t) { for (var n, r = 0; r < t; r++) { n = 0; for (var o = 0; o < t; o++) n += e[o * t + r]; for (var a = 0; a < t; a++) e[a * t + r] = e[a * t + r] / n; } }, yre = function(e, t, n) { for (var r = new Array(n * n), o = 0; o < n; o++) { for (var a = 0; a < n; a++) r[o * n + a] = 0; for (var i = 0; i < n; i++) for (var s = 0; s < n; s++) r[o * n + s] += e[o * n + i] * t[i * n + s]; } return r; }, bre = function(e, t, n) { for (var r = e.slice(0), o = 1; o < n; o++) e = yre(e, r, t); return e; }, wre = function(e, t, n) { for (var r = new Array(t * t), o = 0; o < t * t; o++) r[o] = Math.pow(e[o], n); return T6(r, t), r; }, xre = function(e, t, n, r) { for (var o = 0; o < n; o++) { var a = Math.round(e[o] * Math.pow(10, r)) / Math.pow(10, r), i = Math.round(t[o] * Math.pow(10, r)) / Math.pow(10, r); if (a !== i) return !1; } return !0; }, kre = function(e, t, n, r) { for (var o = [], a = 0; a < t; a++) { for (var i = [], s = 0; s < t; s++) Math.round(e[a * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]); i.length !== 0 && o.push(r.collection(i)); } return o; }, Cre = function(e, t) { for (var n = 0; n < e.length; n++) if (!t[n] || e[n].id() !== t[n].id()) return !1; return !0; }, Sre = function(e) { for (var t = 0; t < e.length; t++) for (var n = 0; n < e.length; n++) t != n && Cre(e[t], e[n]) && e.splice(n, 1); return e; }, P5 = function(e) { for (var t = this.nodes(), n = this.edges(), r = this.cy(), o = vre(e), a = {}, i = 0; i < t.length; i++) a[t[i].id()] = i; for (var s = t.length, l = s * s, u = new Array(l), c, d = 0; d < l; d++) u[d] = 0; for (var f = 0; f < n.length; f++) { var h = n[f], p = a[h.source().id()], v = a[h.target().id()], m = gre(h, o.attributes); u[p * s + v] += m, u[v * s + p] += m; } mre(u, s, o.multFactor), T6(u, s); for (var g = !0, b = 0; g && b < o.maxIterations; ) g = !1, c = bre(u, s, o.expandFactor), u = wre(c, s, o.inflateFactor), xre(u, c, l, 4) || (g = !0), b++; var C = kre(u, s, t, r); return C = Sre(C), C; }, Ere = { markovClustering: P5, mcl: P5 }, $re = function(e) { return e; }, O6 = function(e, t) { return Math.abs(t - e); }, L5 = function(e, t, n) { return e + O6(t, n); }, R5 = function(e, t, n) { return e + Math.pow(n - t, 2); }, _re = function(e) { return Math.sqrt(e); }, Tre = function(e, t, n) { return Math.max(e, O6(t, n)); }, pd = function(e, t, n, r, o) { for (var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : $re, i = r, s, l, u = 0; u < e; u++) s = t(u), l = n(u), i = o(i, s, l); return a(i); }, fc = { euclidean: function(e, t, n) { return e >= 2 ? pd(e, t, n, 0, R5, _re) : pd(e, t, n, 0, L5); }, squaredEuclidean: function(e, t, n) { return pd(e, t, n, 0, R5); }, manhattan: function(e, t, n) { return pd(e, t, n, 0, L5); }, max: function(e, t, n) { return pd(e, t, n, -1 / 0, Tre); } }; fc["squared-euclidean"] = fc.squaredEuclidean; fc.squaredeuclidean = fc.squaredEuclidean; function cg(e, t, n, r, o, a) { var i; return An(e) ? i = e : i = fc[e] || fc.euclidean, t === 0 && An(e) ? i(o, a) : i(t, n, r, o, a); } var Ore = Fr({ k: 2, m: 2, sensitivityThreshold: 1e-4, distance: "euclidean", maxIterations: 10, attributes: [], testMode: !1, testCentroids: null }), z2 = function(e) { return Ore(e); }, Bv = function(e, t, n, r, o) { var a = o !== "kMedoids", i = a ? function(c) { return n[c]; } : function(c) { return r[c](n); }, s = function(c) { return r[c](t); }, l = n, u = t; return cg(e, r.length, i, s, l, u); }, Wm = function(e, t, n) { for (var r = n.length, o = new Array(r), a = new Array(r), i = new Array(t), s = null, l = 0; l < r; l++) o[l] = e.min(n[l]).value, a[l] = e.max(n[l]).value; for (var u = 0; u < t; u++) { s = []; for (var c = 0; c < r; c++) s[c] = Math.random() * (a[c] - o[c]) + o[c]; i[u] = s; } return i; }, F6 = function(e, t, n, r, o) { for (var a = 1 / 0, i = 0, s = 0; s < t.length; s++) { var l = Bv(n, e, t[s], r, o); l < a && (a = l, i = s); } return i; }, I6 = function(e, t, n) { for (var r = [], o = null, a = 0; a < t.length; a++) o = t[a], n[o.id()] === e && r.push(o); return r; }, Fre = function(e, t, n) { return Math.abs(t - e) <= n; }, Ire = function(e, t, n) { for (var r = 0; r < e.length; r++) for (var o = 0; o < e[r].length; o++) { var a = Math.abs(e[r][o] - t[r][o]); if (a > n) return !1; } return !0; }, Are = function(e, t, n) { for (var r = 0; r < n; r++) if (e === t[r]) return !0; return !1; }, D5 = function(e, t) { var n = new Array(t); if (e.length < 50) for (var r = 0; r < t; r++) { for (var o = e[Math.floor(Math.random() * e.length)]; Are(o, n, r); ) o = e[Math.floor(Math.random() * e.length)]; n[r] = o; } else for (var a = 0; a < t; a++) n[a] = e[Math.floor(Math.random() * e.length)]; return n; }, M5 = function(e, t, n) { for (var r = 0, o = 0; o < t.length; o++) r += Bv("manhattan", t[o], e, n, "kMedoids"); return r; }, Pre = function(e) { var t = this.cy(), n = this.nodes(), r = null, o = z2(e), a = new Array(o.k), i = {}, s; o.testMode ? typeof o.testCentroids == "number" ? (o.testCentroids, s = Wm(n, o.k, o.attributes)) : or(o.testCentroids) === "object" ? s = o.testCentroids : s = Wm(n, o.k, o.attributes) : s = Wm(n, o.k, o.attributes); for (var l = !0, u = 0; l && u < o.maxIterations; ) { for (var c = 0; c < n.length; c++) r = n[c], i[r.id()] = F6(r, s, o.distance, o.attributes, "kMeans"); l = !1; for (var d = 0; d < o.k; d++) { var f = I6(d, n, i); if (f.length !== 0) { for (var h = o.attributes.length, p = s[d], v = new Array(h), m = new Array(h), g = 0; g < h; g++) { m[g] = 0; for (var b = 0; b < f.length; b++) r = f[b], m[g] += o.attributes[g](r); v[g] = m[g] / f.length, Fre(v[g], p[g], o.sensitivityThreshold) || (l = !0); } s[d] = v, a[d] = t.collection(f); } } u++; } return a; }, Lre = function(e) { var t = this.cy(), n = this.nodes(), r = null, o = z2(e), a = new Array(o.k), i, s = {}, l, u = new Array(o.k); o.testMode ? typeof o.testCentroids == "number" || (or(o.testCentroids) === "object" ? i = o.testCentroids : i = D5(n, o.k)) : i = D5(n, o.k); for (var c = !0, d = 0; c && d < o.maxIterations; ) { for (var f = 0; f < n.length; f++) r = n[f], s[r.id()] = F6(r, i, o.distance, o.attributes, "kMedoids"); c = !1; for (var h = 0; h < i.length; h++) { var p = I6(h, n, s); if (p.length !== 0) { u[h] = M5(i[h], p, o.attributes); for (var v = 0; v < p.length; v++) l = M5(p[v], p, o.attributes), l < u[h] && (u[h] = l, i[h] = p[v], c = !0); a[h] = t.collection(p); } } d++; } return a; }, Rre = function(e, t, n, r, o) { for (var a, i, s = 0; s < t.length; s++) for (var l = 0; l < e.length; l++) r[s][l] = Math.pow(n[s][l], o.m); for (var u = 0; u < e.length; u++) for (var c = 0; c < o.attributes.length; c++) { a = 0, i = 0; for (var d = 0; d < t.length; d++) a += r[d][u] * o.attributes[c](t[d]), i += r[d][u]; e[u][c] = a / i; } }, Dre = function(e, t, n, r, o) { for (var a = 0; a < e.length; a++) t[a] = e[a].slice(); for (var i, s, l, u = 2 / (o.m - 1), c = 0; c < n.length; c++) for (var d = 0; d < r.length; d++) { i = 0; for (var f = 0; f < n.length; f++) s = Bv(o.distance, r[d], n[c], o.attributes, "cmeans"), l = Bv(o.distance, r[d], n[f], o.attributes, "cmeans"), i += Math.pow(s / l, u); e[d][c] = 1 / i; } }, Mre = function(e, t, n, r) { for (var o = new Array(n.k), a = 0; a < o.length; a++) o[a] = []; for (var i, s, l = 0; l < t.length; l++) { i = -1 / 0, s = -1; for (var u = 0; u < t[0].length; u++) t[l][u] > i && (i = t[l][u], s = u); o[s].push(e[l]); } for (var c = 0; c < o.length; c++) o[c] = r.collection(o[c]); return o; }, N5 = function(e) { var t = this.cy(), n = this.nodes(), r = z2(e), o, a, i, s, l; s = new Array(n.length); for (var u = 0; u < n.length; u++) s[u] = new Array(r.k); i = new Array(n.length); for (var c = 0; c < n.length; c++) i[c] = new Array(r.k); for (var d = 0; d < n.length; d++) { for (var f = 0, h = 0; h < r.k; h++) i[d][h] = Math.random(), f += i[d][h]; for (var p = 0; p < r.k; p++) i[d][p] = i[d][p] / f; } a = new Array(r.k); for (var v = 0; v < r.k; v++) a[v] = new Array(r.attributes.length); l = new Array(n.length); for (var m = 0; m < n.length; m++) l[m] = new Array(r.k); for (var g = !0, b = 0; g && b < r.maxIterations; ) g = !1, Rre(a, n, i, l, r), Dre(i, s, a, n, r), Ire(i, s, r.sensitivityThreshold) || (g = !0), b++; return o = Mre(n, i, r, t), { clusters: o, degreeOfMembership: i }; }, Nre = { kMeans: Pre, kMedoids: Lre, fuzzyCMeans: N5, fcm: N5 }, Bre = Fr({ distance: "euclidean", // distance metric to compare nodes linkage: "min", // linkage criterion : how to determine the distance between clusters of nodes mode: "threshold", // mode:'threshold' => clusters must be threshold distance apart threshold: 1 / 0, // the distance threshold // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters addDendrogram: !1, // whether to add the dendrogram to the graph for viz dendrogramDepth: 0, // depth at which dendrogram branches are merged into the returned clusters attributes: [] // array of attr functions }), zre = { single: "min", complete: "max" }, Vre = function(e) { var t = Bre(e), n = zre[t.linkage]; return n != null && (t.linkage = n), t; }, B5 = function(e, t, n, r, o) { for (var a = 0, i = 1 / 0, s, l = o.attributes, u = function(S, _) { return cg(o.distance, l.length, function(O) { return l[O](S); }, function(O) { return l[O](_); }, S, _); }, c = 0; c < e.length; c++) { var d = e[c].key, f = n[d][r[d]]; f < i && (a = d, i = f); } if (o.mode === "threshold" && i >= o.threshold || o.mode === "dendrogram" && e.length === 1) return !1; var h = t[a], p = t[r[a]], v; o.mode === "dendrogram" ? v = { left: h, right: p, key: h.key } : v = { value: h.value.concat(p.value), key: h.key }, e[h.index] = v, e.splice(p.index, 1), t[h.key] = v; for (var m = 0; m < e.length; m++) { var g = e[m]; h.key === g.key ? s = 1 / 0 : o.linkage === "min" ? (s = n[h.key][g.key], n[h.key][g.key] > n[p.key][g.key] && (s = n[p.key][g.key])) : o.linkage === "max" ? (s = n[h.key][g.key], n[h.key][g.key] < n[p.key][g.key] && (s = n[p.key][g.key])) : o.linkage === "mean" ? s = (n[h.key][g.key] * h.size + n[p.key][g.key] * p.size) / (h.size + p.size) : o.mode === "dendrogram" ? s = u(g.value, h.value) : s = u(g.value[0], h.value[0]), n[h.key][g.key] = n[g.key][h.key] = s; } for (var b = 0; b < e.length; b++) { var C = e[b].key; if (r[C] === h.key || r[C] === p.key) { for (var x = C, w = 0; w < e.length; w++) { var k = e[w].key; n[C][k] < n[C][x] && (x = k); } r[C] = x; } e[b].index = b; } return h.key = p.key = h.index = p.index = null, !0; }, sh = function e(t, n, r) { t && (t.value ? n.push(t.value) : (t.left && e(t.left, n), t.right && e(t.right, n))); }, jre = function e(t, n) { if (!t) return ""; if (t.left && t.right) { var r = e(t.left, n), o = e(t.right, n), a = n.add({ group: "nodes", data: { id: r + "," + o } }); return n.add({ group: "edges", data: { source: r, target: a.id() } }), n.add({ group: "edges", data: { source: o, target: a.id() } }), a.id(); } else if (t.value) return t.value.id(); }, Hre = function e(t, n, r) { if (!t) return []; var o = [], a = [], i = []; return n === 0 ? (t.left && sh(t.left, o), t.right && sh(t.right, a), i = o.concat(a), [r.collection(i)]) : n === 1 ? t.value ? [r.collection(t.value)] : (t.left && sh(t.left, o), t.right && sh(t.right, a), [r.collection(o), r.collection(a)]) : t.value ? [r.collection(t.value)] : (t.left && (o = e(t.left, n - 1, r)), t.right && (a = e(t.right, n - 1, r)), o.concat(a)); }, z5 = function(e) { for (var t = this.cy(), n = this.nodes(), r = Vre(e), o = r.attributes, a = function(g, b) { return cg(r.distance, o.length, function(C) { return o[C](g); }, function(C) { return o[C](b); }, g, b); }, i = [], s = [], l = [], u = [], c = 0; c < n.length; c++) { var d = { value: r.mode === "dendrogram" ? n[c] : [n[c]], key: c, index: c }; i[c] = d, u[c] = d, s[c] = [], l[c] = 0; } for (var f = 0; f < i.length; f++) for (var h = 0; h <= f; h++) { var p = void 0; r.mode === "dendrogram" ? p = f === h ? 1 / 0 : a(i[f].value, i[h].value) : p = f === h ? 1 / 0 : a(i[f].value[0], i[h].value[0]), s[f][h] = p, s[h][f] = p, p < s[f][l[f]] && (l[f] = h); } for (var v = B5(i, u, s, l, r); v; ) v = B5(i, u, s, l, r); var m; return r.mode === "dendrogram" ? (m = Hre(i[0], r.dendrogramDepth, t), r.addDendrogram && jre(i[0], t)) : (m = new Array(i.length), i.forEach(function(g, b) { g.key = g.index = null, m[b] = t.collection(g.value); })), m; }, Ure = { hierarchicalClustering: z5, hca: z5 }, qre = Fr({ distance: "euclidean", // distance metric to compare attributes between two nodes preference: "median", // suitability of a data point to serve as an exemplar damping: 0.8, // damping factor between [0.5, 1) maxIterations: 1e3, // max number of iterations to run minIterations: 100, // min number of iterations to run in order for clustering to stop attributes: [ // functions to quantify the similarity between any two points // e.g. node => node.data('weight') ] }), Wre = function(e) { var t = e.damping, n = e.preference; 0.5 <= t && t < 1 || Nn("Damping must range on [0.5, 1). Got: ".concat(t)); var r = ["median", "mean", "min", "max"]; return r.some(function(o) { return o === n; }) || Ke(n) || Nn("Preference must be one of [".concat(r.map(function(o) { return "'".concat(o, "'"); }).join(", "), "] or a number. Got: ").concat(n)), qre(e); }, Gre = function(e, t, n, r) { var o = function(a, i) { return r[i](a); }; return -cg(e, r.length, function(a) { return o(t, a); }, function(a) { return o(n, a); }, t, n); }, Kre = function(e, t) { var n = null; return t === "median" ? n = Wne(e) : t === "mean" ? n = qne(e) : t === "min" ? n = Hne(e) : t === "max" ? n = Une(e) : n = t, n; }, Yre = function(e, t, n) { for (var r = [], o = 0; o < e; o++) t[o * e + o] + n[o * e + o] > 0 && r.push(o); return r; }, V5 = function(e, t, n) { for (var r = [], o = 0; o < e; o++) { for (var a = -1, i = -1 / 0, s = 0; s < n.length; s++) { var l = n[s]; t[o * e + l] > i && (a = l, i = t[o * e + l]); } a > 0 && r.push(a); } for (var u = 0; u < n.length; u++) r[n[u]] = n[u]; return r; }, Xre = function(e, t, n) { for (var r = V5(e, t, n), o = 0; o < n.length; o++) { for (var a = [], i = 0; i < r.length; i++) r[i] === n[o] && a.push(i); for (var s = -1, l = -1 / 0, u = 0; u < a.length; u++) { for (var c = 0, d = 0; d < a.length; d++) c += t[a[d] * e + a[u]]; c > l && (s = u, l = c); } n[o] = a[s]; } return r = V5(e, t, n), r; }, j5 = function(e) { for (var t = this.cy(), n = this.nodes(), r = Wre(e), o = {}, a = 0; a < n.length; a++) o[n[a].id()] = a; var i, s, l, u, c, d; i = n.length, s = i * i, l = new Array(s); for (var f = 0; f < s; f++) l[f] = -1 / 0; for (var h = 0; h < i; h++) for (var p = 0; p < i; p++) h !== p && (l[h * i + p] = Gre(r.distance, n[h], n[p], r.attributes)); u = Kre(l, r.preference); for (var v = 0; v < i; v++) l[v * i + v] = u; c = new Array(s); for (var m = 0; m < s; m++) c[m] = 0; d = new Array(s); for (var g = 0; g < s; g++) d[g] = 0; for (var b = new Array(i), C = new Array(i), x = new Array(i), w = 0; w < i; w++) b[w] = 0, C[w] = 0, x[w] = 0; for (var k = new Array(i * r.minIterations), S = 0; S < k.length; S++) k[S] = 0; var _; for (_ = 0; _ < r.maxIterations; _++) { for (var O = 0; O < i; O++) { for (var F = -1 / 0, I = -1 / 0, P = -1, M = 0, N = 0; N < i; N++) b[N] = c[O * i + N], M = d[O * i + N] + l[O * i + N], M >= F ? (I = F, F = M, P = N) : M > I && (I = M); for (var j = 0; j < i; j++) c[O * i + j] = (1 - r.damping) * (l[O * i + j] - F) + r.damping * b[j]; c[O * i + P] = (1 - r.damping) * (l[O * i + P] - I) + r.damping * b[P]; } for (var A = 0; A < i; A++) { for (var U = 0, q = 0; q < i; q++) b[q] = d[q * i + A], C[q] = Math.max(0, c[q * i + A]), U += C[q]; U -= C[A], C[A] = c[A * i + A], U += C[A]; for (var Y = 0; Y < i; Y++) d[Y * i + A] = (1 - r.damping) * Math.min(0, U - C[Y]) + r.damping * b[Y]; d[A * i + A] = (1 - r.damping) * (U - C[A]) + r.damping * b[A]; } for (var ie = 0, re = 0; re < i; re++) { var le = d[re * i + re] + c[re * i + re] > 0 ? 1 : 0; k[_ % r.minIterations * i + re] = le, ie += le; } if (ie > 0 && (_ >= r.minIterations - 1 || _ == r.maxIterations - 1)) { for (var he = 0, we = 0; we < i; we++) { x[we] = 0; for (var be = 0; be < r.minIterations; be++) x[we] += k[be * i + we]; (x[we] === 0 || x[we] === r.minIterations) && he++; } if (he === i) break; } } for (var de = Yre(i, c, d), ae = Xre(i, l, de), ee = {}, se = 0; se < de.length; se++) ee[de[se]] = []; for (var pe = 0; pe < n.length; pe++) { var Se = o[n[pe].id()], Le = ae[Se]; Le != null && ee[Le].push(n[pe]); } for (var je = new Array(de.length), _e = 0; _e < de.length; _e++) je[_e] = t.collection(ee[de[_e]]); return je; }, Zre = { affinityPropagation: j5, ap: j5 }, Jre = Fr({ root: void 0, directed: !1 }), Qre = { hierholzer: function(e) { if (!Ht(e)) { var t = arguments; e = { root: t[0], directed: t[1] }; } var n = Jre(e), r = n.root, o = n.directed, a = this, i = !1, s, l, u; r && (u = ht(r) ? this.filter(r)[0].id() : r[0].id()); var c = {}, d = {}; o ? a.forEach(function(g) { var b = g.id(); if (g.isNode()) { var C = g.indegree(!0), x = g.outdegree(!0), w = C - x, k = x - C; w == 1 ? s ? i = !0 : s = b : k == 1 ? l ? i = !0 : l = b : (k > 1 || w > 1) && (i = !0), c[b] = [], g.outgoers().forEach(function(S) { S.isEdge() && c[b].push(S.id()); }); } else d[b] = [void 0, g.target().id()]; }) : a.forEach(function(g) { var b = g.id(); if (g.isNode()) { var C = g.degree(!0); C % 2 && (s ? l ? i = !0 : l = b : s = b), c[b] = [], g.connectedEdges().forEach(function(x) { return c[b].push(x.id()); }); } else d[b] = [g.source().id(), g.target().id()]; }); var f = { found: !1, trail: void 0 }; if (i) return f; if (l && s) if (o) { if (u && l != u) return f; u = l; } else { if (u && l != u && s != u) return f; u || (u = l); } else u || (u = a[0].id()); var h = function(g) { for (var b = g, C = [g], x, w, k; c[b].length; ) x = c[b].shift(), w = d[x][0], k = d[x][1], b != k ? (c[k] = c[k].filter(function(S) { return S != x; }), b = k) : !o && b != w && (c[w] = c[w].filter(function(S) { return S != x; }), b = w), C.unshift(x), C.unshift(b); return C; }, p = [], v = []; for (v = h(u); v.length != 1; ) c[v[0]].length == 0 ? (p.unshift(a.getElementById(v.shift())), p.unshift(a.getElementById(v.shift()))) : v = h(v.shift()).concat(v); p.unshift(a.getElementById(v.shift())); for (var m in c) if (c[m].length) return f; return f.found = !0, f.trail = this.spawn(p, !0), f; } }, lh = function() { var e = this, t = {}, n = 0, r = 0, o = [], a = [], i = {}, s = function(c, d) { for (var f = a.length - 1, h = [], p = e.spawn(); a[f].x != c || a[f].y != d; ) h.push(a.pop().edge), f--; h.push(a.pop().edge), h.forEach(function(v) { var m = v.connectedNodes().intersection(e); p.merge(v), m.forEach(function(g) { var b = g.id(), C = g.connectedEdges().intersection(e); p.merge(g), t[b].cutVertex ? p.merge(C.filter(function(x) { return x.isLoop(); })) : p.merge(C); }); }), o.push(p); }, l = function c(d, f, h) { d === h && (r += 1), t[f] = { id: n, low: n++, cutVertex: !1 }; var p = e.getElementById(f).connectedEdges().intersection(e); if (p.size() === 0) o.push(e.spawn(e.getElementById(f))); else { var v, m, g, b; p.forEach(function(C) { v = C.source().id(), m = C.target().id(), g = v === f ? m : v, g !== h && (b = C.id(), i[b] || (i[b] = !0, a.push({ x: f, y: g, edge: C })), g in t ? t[f].low = Math.min(t[f].low, t[g].id) : (c(d, g, f), t[f].low = Math.min(t[f].low, t[g].low), t[f].id <= t[g].low && (t[f].cutVertex = !0, s(f, g)))); }); } }; e.forEach(function(c) { if (c.isNode()) { var d = c.id(); d in t || (r = 0, l(d, d), t[d].cutVertex = r > 1); } }); var u = Object.keys(t).filter(function(c) { return t[c].cutVertex; }).map(function(c) { return e.getElementById(c); }); return { cut: e.spawn(u), components: o }; }, eoe = { hopcroftTarjanBiconnected: lh, htbc: lh, htb: lh, hopcroftTarjanBiconnectedComponents: lh }, uh = function() { var e = this, t = {}, n = 0, r = [], o = [], a = e.spawn(e), i = function s(l) { o.push(l), t[l] = { index: n, low: n++, explored: !1 }; var u = e.getElementById(l).connectedEdges().intersection(e); if (u.forEach(function(p) { var v = p.target().id(); v !== l && (v in t || s(v), t[v].explored || (t[l].low = Math.min(t[l].low, t[v].low))); }), t[l].index === t[l].low) { for (var c = e.spawn(); ; ) { var d = o.pop(); if (c.merge(e.getElementById(d)), t[d].low = t[l].index, t[d].explored = !0, d === l) break; } var f = c.edgesWith(c), h = c.merge(f); r.push(h), a = a.difference(h); } }; return e.forEach(function(s) { if (s.isNode()) { var l = s.id(); l in t || i(l); } }), { cut: a, components: r }; }, toe = { tarjanStronglyConnected: uh, tsc: uh, tscc: uh, tarjanStronglyConnectedComponents: uh }, A6 = {}; [gp, Ine, Ane, Lne, Dne, Nne, Vne, pre, qu, Wu, cy, Ere, Nre, Ure, Zre, Qre, eoe, toe].forEach(function(e) { kt(A6, e); }); /*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) */ var P6 = 0, L6 = 1, R6 = 2, Ri = function e(t) { if (!(this instanceof e)) return new e(t); this.id = "Thenable/1.0.7", this.state = P6, this.fulfillValue = void 0, this.rejectReason = void 0, this.onFulfilled = [], this.onRejected = [], this.proxy = { then: this.then.bind(this) }, typeof t == "function" && t.call(this, this.fulfill.bind(this), this.reject.bind(this)); }; Ri.prototype = { /* promise resolving methods */ fulfill: function(e) { return H5(this, L6, "fulfillValue", e); }, reject: function(e) { return H5(this, R6, "rejectReason", e); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function(e, t) { var n = this, r = new Ri(); return n.onFulfilled.push(q5(e, r, "fulfill")), n.onRejected.push(q5(t, r, "reject")), D6(n), r.proxy; } }; var H5 = function(e, t, n, r) { return e.state === P6 && (e.state = t, e[n] = r, D6(e)), e; }, D6 = function(e) { e.state === L6 ? U5(e, "onFulfilled", e.fulfillValue) : e.state === R6 && U5(e, "onRejected", e.rejectReason); }, U5 = function(e, t, n) { if (e[t].length !== 0) { var r = e[t]; e[t] = []; var o = function() { for (var a = 0; a < r.length; a++) r[a](n); }; typeof setImmediate == "function" ? setImmediate(o) : setTimeout(o, 0); } }, q5 = function(e, t, n) { return function(r) { if (typeof e != "function") t[n].call(t, r); else { var o; try { o = e(r); } catch (a) { t.reject(a); return; } noe(t, o); } }; }, noe = function e(t, n) { if (t === n || t.proxy === n) { t.reject(new TypeError("cannot resolve promise with itself")); return; } var r; if (or(n) === "object" && n !== null || typeof n == "function") try { r = n.then; } catch (a) { t.reject(a); return; } if (typeof r == "function") { var o = !1; try { r.call( n, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function(a) { o || (o = !0, a === n ? t.reject(new TypeError("circular thenable chain")) : e(t, a)); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function(a) { o || (o = !0, t.reject(a)); } ); } catch (a) { o || t.reject(a); } return; } t.fulfill(n); }; Ri.all = function(e) { return new Ri(function(t, n) { for (var r = new Array(e.length), o = 0, a = function(s, l) { r[s] = l, o++, o === e.length && t(r); }, i = 0; i < e.length; i++) (function(s) { var l = e[s], u = l != null && l.then != null; if (u) l.then(function(d) { a(s, d); }, function(d) { n(d); }); else { var c = l; a(s, c); } })(i); }); }; Ri.resolve = function(e) { return new Ri(function(t, n) { t(e); }); }; Ri.reject = function(e) { return new Ri(function(t, n) { n(e); }); }; var Dc = typeof Promise < "u" ? Promise : Ri, dy = function(e, t, n) { var r = A2(e), o = !r, a = this._private = kt({ duration: 1e3 }, t, n); if (a.target = e, a.style = a.style || a.css, a.started = !1, a.playing = !1, a.hooked = !1, a.applying = !1, a.progress = 0, a.completes = [], a.frames = [], a.complete && An(a.complete) && a.completes.push(a.complete), o) { var i = e.position(); a.startPosition = a.startPosition || { x: i.x, y: i.y }, a.startStyle = a.startStyle || e.cy().style().getAnimationStartStyle(e, a.style); } if (r) { var s = e.pan(); a.startPan = { x: s.x, y: s.y }, a.startZoom = e.zoom(); } this.length = 1, this[0] = this; }, zl = dy.prototype; kt(zl, { instanceString: function() { return "animation"; }, hook: function() { var e = this._private; if (!e.hooked) { var t, n = e.target._private.animation; e.queue ? t = n.queue : t = n.current, t.push(this), Eo(e.target) && e.target.cy().addToAnimationPool(e.target), e.hooked = !0; } return this; }, play: function() { var e = this._private; return e.progress === 1 && (e.progress = 0), e.playing = !0, e.started = !1, e.stopped = !1, this.hook(), this; }, playing: function() { return this._private.playing; }, apply: function() { var e = this._private; return e.applying = !0, e.started = !1, e.stopped = !1, this.hook(), this; }, applying: function() { return this._private.applying; }, pause: function() { var e = this._private; return e.playing = !1, e.started = !1, this; }, stop: function() { var e = this._private; return e.playing = !1, e.started = !1, e.stopped = !0, this; }, rewind: function() { return this.progress(0); }, fastforward: function() { return this.progress(1); }, time: function(e) { var t = this._private; return e === void 0 ? t.progress * t.duration : this.progress(e / t.duration); }, progress: function(e) { var t = this._private, n = t.playing; return e === void 0 ? t.progress : (n && this.pause(), t.progress = e, t.started = !1, n && this.play(), this); }, completed: function() { return this._private.progress === 1; }, reverse: function() { var e = this._private, t = e.playing; t && this.pause(), e.progress = 1 - e.progress, e.started = !1; var n = function(s, l) { var u = e[s]; u != null && (e[s] = e[l], e[l] = u); }; if (n("zoom", "startZoom"), n("pan", "startPan"), n("position", "startPosition"), e.style) for (var r = 0; r < e.style.length; r++) { var o = e.style[r], a = o.name, i = e.startStyle[a]; e.startStyle[a] = o, e.style[r] = i; } return t && this.play(), this; }, promise: function(e) { var t = this._private, n; switch (e) { case "frame": n = t.frames; break; default: case "complete": case "completed": n = t.completes; } return new Dc(function(r, o) { n.push(function() { r(); }); }); } }); zl.complete = zl.completed; zl.run = zl.play; zl.running = zl.playing; var roe = { animated: function() { return function() { var e = this, t = e.length !== void 0, n = t ? e : [e], r = this._private.cy || this; if (!r.styleEnabled()) return !1; var o = n[0]; if (o) return o._private.animation.current.length > 0; }; }, // animated clearQueue: function() { return function() { var e = this, t = e.length !== void 0, n = t ? e : [e], r = this._private.cy || this; if (!r.styleEnabled()) return this; for (var o = 0; o < n.length; o++) { var a = n[o]; a._private.animation.queue = []; } return this; }; }, // clearQueue delay: function() { return function(e, t) { var n = this._private.cy || this; return n.styleEnabled() ? this.animate({ delay: e, duration: e, complete: t }) : this; }; }, // delay delayAnimation: function() { return function(e, t) { var n = this._private.cy || this; return n.styleEnabled() ? this.animation({ delay: e, duration: e, complete: t }) : this; }; }, // delay animation: function() { return function(e, t) { var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this, i = !r, s = !i; if (!a.styleEnabled()) return this; var l = a.style(); e = kt({}, e, t); var u = Object.keys(e).length === 0; if (u) return new dy(o[0], e); switch (e.duration === void 0 && (e.duration = 400), e.duration) { case "slow": e.duration = 600; break; case "fast": e.duration = 200; break; } if (s && (e.style = l.getPropsList(e.style || e.css), e.css = void 0), s && e.renderedPosition != null) { var c = e.renderedPosition, d = a.pan(), f = a.zoom(); e.position = x6(c, f, d); } if (i && e.panBy != null) { var h = e.panBy, p = a.pan(); e.pan = { x: p.x + h.x, y: p.y + h.y }; } var v = e.center || e.centre; if (i && v != null) { var m = a.getCenterPan(v.eles, e.zoom); m != null && (e.pan = m); } if (i && e.fit != null) { var g = e.fit, b = a.getFitViewport(g.eles || g.boundingBox, g.padding); b != null && (e.pan = b.pan, e.zoom = b.zoom); } if (i && Ht(e.zoom)) { var C = a.getZoomedViewport(e.zoom); C != null ? (C.zoomed && (e.zoom = C.zoom), C.panned && (e.pan = C.pan)) : e.zoom = null; } return new dy(o[0], e); }; }, // animate animate: function() { return function(e, t) { var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this; if (!a.styleEnabled()) return this; t && (e = kt({}, e, t)); for (var i = 0; i < o.length; i++) { var s = o[i], l = s.animated() && (e.queue === void 0 || e.queue), u = s.animation(e, l ? { queue: !0 } : void 0); u.play(); } return this; }; }, // animate stop: function() { return function(e, t) { var n = this, r = n.length !== void 0, o = r ? n : [n], a = this._private.cy || this; if (!a.styleEnabled()) return this; for (var i = 0; i < o.length; i++) { for (var s = o[i], l = s._private, u = l.animation.current, c = 0; c < u.length; c++) { var d = u[c], f = d._private; t && (f.duration = 0); } e && (l.animation.queue = []), t || (l.animation.current = []); } return a.notify("draw"), this; }; } // stop }, ooe = Array.isArray, dg = ooe, aoe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ioe = /^\w*$/; function soe(e, t) { if (dg(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || df(e) ? !0 : ioe.test(e) || !aoe.test(e) || t != null && e in Object(t); } var loe = soe, uoe = "[object AsyncFunction]", coe = "[object Function]", doe = "[object GeneratorFunction]", poe = "[object Proxy]"; function foe(e) { if (!Dl(e)) return !1; var t = p6(e); return t == coe || t == doe || t == uoe || t == poe; } var hoe = foe, voe = ig["__core-js_shared__"], Gm = voe, W5 = function() { var e = /[^.]+$/.exec(Gm && Gm.keys && Gm.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function goe(e) { return !!W5 && W5 in e; } var moe = goe, yoe = Function.prototype, boe = yoe.toString; function woe(e) { if (e != null) { try { return boe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var xoe = woe, koe = /[\\^$.*+?()[\]{}|]/g, Coe = /^\[object .+?Constructor\]$/, Soe = Function.prototype, Eoe = Object.prototype, $oe = Soe.toString, _oe = Eoe.hasOwnProperty, Toe = RegExp( "^" + $oe.call(_oe).replace(koe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Ooe(e) { if (!Dl(e) || moe(e)) return !1; var t = hoe(e) ? Toe : Coe; return t.test(xoe(e)); } var Foe = Ooe; function Ioe(e, t) { return e == null ? void 0 : e[t]; } var Aoe = Ioe; function Poe(e, t) { var n = Aoe(e, t); return Foe(n) ? n : void 0; } var V2 = Poe, Loe = V2(Object, "create"), bp = Loe; function Roe() { this.__data__ = bp ? bp(null) : {}, this.size = 0; } var Doe = Roe; function Moe(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Noe = Moe, Boe = "__lodash_hash_undefined__", zoe = Object.prototype, Voe = zoe.hasOwnProperty; function joe(e) { var t = this.__data__; if (bp) { var n = t[e]; return n === Boe ? void 0 : n; } return Voe.call(t, e) ? t[e] : void 0; } var Hoe = joe, Uoe = Object.prototype, qoe = Uoe.hasOwnProperty; function Woe(e) { var t = this.__data__; return bp ? t[e] !== void 0 : qoe.call(t, e); } var Goe = Woe, Koe = "__lodash_hash_undefined__"; function Yoe(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = bp && t === void 0 ? Koe : t, this; } var Xoe = Yoe; function Mc(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Mc.prototype.clear = Doe; Mc.prototype.delete = Noe; Mc.prototype.get = Hoe; Mc.prototype.has = Goe; Mc.prototype.set = Xoe; var G5 = Mc; function Zoe() { this.__data__ = [], this.size = 0; } var Joe = Zoe; function Qoe(e, t) { return e === t || e !== e && t !== t; } var M6 = Qoe; function eae(e, t) { for (var n = e.length; n--; ) if (M6(e[n][0], t)) return n; return -1; } var pg = eae, tae = Array.prototype, nae = tae.splice; function rae(e) { var t = this.__data__, n = pg(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : nae.call(t, n, 1), --this.size, !0; } var oae = rae; function aae(e) { var t = this.__data__, n = pg(t, e); return n < 0 ? void 0 : t[n][1]; } var iae = aae; function sae(e) { return pg(this.__data__, e) > -1; } var lae = sae; function uae(e, t) { var n = this.__data__, r = pg(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } var cae = uae; function Nc(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Nc.prototype.clear = Joe; Nc.prototype.delete = oae; Nc.prototype.get = iae; Nc.prototype.has = lae; Nc.prototype.set = cae; var dae = Nc, pae = V2(ig, "Map"), fae = pae; function hae() { this.size = 0, this.__data__ = { hash: new G5(), map: new (fae || dae)(), string: new G5() }; } var vae = hae; function gae(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } var mae = gae; function yae(e, t) { var n = e.__data__; return mae(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var fg = yae; function bae(e) { var t = fg(this, e).delete(e); return this.size -= t ? 1 : 0, t; } var wae = bae; function xae(e) { return fg(this, e).get(e); } var kae = xae; function Cae(e) { return fg(this, e).has(e); } var Sae = Cae; function Eae(e, t) { var n = fg(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } var $ae = Eae; function Bc(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Bc.prototype.clear = vae; Bc.prototype.delete = wae; Bc.prototype.get = kae; Bc.prototype.has = Sae; Bc.prototype.set = $ae; var N6 = Bc, _ae = "Expected a function"; function j2(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(_ae); var n = function() { var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache; if (a.has(o)) return a.get(o); var i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (j2.Cache || N6)(), n; } j2.Cache = N6; var Tae = j2, Oae = 500; function Fae(e) { var t = Tae(e, function(r) { return n.size === Oae && n.clear(), r; }), n = t.cache; return t; } var Iae = Fae, Aae = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Pae = /\\(\\)?/g, Lae = Iae(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(Aae, function(n, r, o, a) { t.push(o ? a.replace(Pae, "$1") : r || n); }), t; }), B6 = Lae; function Rae(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; ) o[n] = t(e[n], n, e); return o; } var z6 = Rae, Dae = 1 / 0, K5 = dc ? dc.prototype : void 0, Y5 = K5 ? K5.toString : void 0; function V6(e) { if (typeof e == "string") return e; if (dg(e)) return z6(e, V6) + ""; if (df(e)) return Y5 ? Y5.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Dae ? "-0" : t; } var Mae = V6; function Nae(e) { return e == null ? "" : Mae(e); } var j6 = Nae; function Bae(e, t) { return dg(e) ? e : loe(e, t) ? [e] : B6(j6(e)); } var H6 = Bae, zae = 1 / 0; function Vae(e) { if (typeof e == "string" || df(e)) return e; var t = e + ""; return t == "0" && 1 / e == -zae ? "-0" : t; } var H2 = Vae; function jae(e, t) { t = H6(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[H2(t[n++])]; return n && n == r ? e : void 0; } var Hae = jae; function Uae(e, t, n) { var r = e == null ? void 0 : Hae(e, t); return r === void 0 ? n : r; } var qae = Uae, Wae = function() { try { var e = V2(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), X5 = Wae; function Gae(e, t, n) { t == "__proto__" && X5 ? X5(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } var Kae = Gae, Yae = Object.prototype, Xae = Yae.hasOwnProperty; function Zae(e, t, n) { var r = e[t]; (!(Xae.call(e, t) && M6(r, n)) || n === void 0 && !(t in e)) && Kae(e, t, n); } var Jae = Zae, Qae = 9007199254740991, eie = /^(?:0|[1-9]\d*)$/; function tie(e, t) { var n = typeof e; return t = t ?? Qae, !!t && (n == "number" || n != "symbol" && eie.test(e)) && e > -1 && e % 1 == 0 && e < t; } var nie = tie; function rie(e, t, n, r) { if (!Dl(e)) return e; t = H6(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = H2(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = r ? r(c, l, s) : void 0, u === void 0 && (u = Dl(c) ? c : nie(t[o + 1]) ? [] : {}); } Jae(s, l, u), s = s[l]; } return e; } var oie = rie; function aie(e, t, n) { return e == null ? e : oie(e, t, n); } var iie = aie; function sie(e, t) { var n = -1, r = e.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; return t; } var lie = sie; function uie(e) { return dg(e) ? z6(e, H2) : df(e) ? [e] : lie(B6(j6(e))); } var cie = uie, die = { // access data field data: function(e) { var t = { field: "data", bindingEvent: "data", allowBinding: !1, allowSetting: !1, allowGetting: !1, settingEvent: "data", settingTriggersEvent: !1, triggerFnName: "trigger", immutableKeys: {}, // key => true if immutable updateStyle: !1, beforeGet: function(n) { }, beforeSet: function(n, r) { }, onSet: function(n) { }, canSet: function(n) { return !0; } }; return e = kt({}, t, e), function(n, r) { var o = e, a = this, i = a.length !== void 0, s = i ? a : [a], l = i ? a[0] : a; if (ht(n)) { var u = n.indexOf(".") !== -1, c = u && cie(n); if (o.allowGetting && r === void 0) { var d; return l && (o.beforeGet(l), c && l._private[o.field][n] === void 0 ? d = qae(l._private[o.field], c) : d = l._private[o.field][n]), d; } else if (o.allowSetting && r !== void 0) { var f = !o.immutableKeys[n]; if (f) { var h = t6({}, n, r); o.beforeSet(a, h); for (var p = 0, v = s.length; p < v; p++) { var m = s[p]; o.canSet(m) && (c && l._private[o.field][n] === void 0 ? iie(m._private[o.field], c, r) : m._private[o.field][n] = r); } o.updateStyle && a.updateStyle(), o.onSet(a), o.settingTriggersEvent && a[o.triggerFnName](o.settingEvent); } } } else if (o.allowSetting && Ht(n)) { var g = n, b, C, x = Object.keys(g); o.beforeSet(a, g); for (var w = 0; w < x.length; w++) { b = x[w], C = g[b]; var k = !o.immutableKeys[b]; if (k) for (var S = 0; S < s.length; S++) { var _ = s[S]; o.canSet(_) && (_._private[o.field][b] = C); } } o.updateStyle && a.updateStyle(), o.onSet(a), o.settingTriggersEvent && a[o.triggerFnName](o.settingEvent); } else if (o.allowBinding && An(n)) { var O = n; a.on(o.bindingEvent, O); } else if (o.allowGetting && n === void 0) { var F; return l && (o.beforeGet(l), F = l._private[o.field]), F; } return a; }; }, // data // remove data field removeData: function(e) { var t = { field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !1, immutableKeys: {} // key => true if immutable }; return e = kt({}, t, e), function(n) { var r = e, o = this, a = o.length !== void 0, i = a ? o : [o]; if (ht(n)) { for (var s = n.split(/\s+/), l = s.length, u = 0; u < l; u++) { var c = s[u]; if (!As(c)) { var d = !r.immutableKeys[c]; if (d) for (var f = 0, h = i.length; f < h; f++) i[f]._private[r.field][c] = void 0; } } r.triggerEvent && o[r.triggerFnName](r.event); } else if (n === void 0) { for (var p = 0, v = i.length; p < v; p++) for (var m = i[p]._private[r.field], g = Object.keys(m), b = 0; b < g.length; b++) { var C = g[b], x = !r.immutableKeys[C]; x && (m[C] = void 0); } r.triggerEvent && o[r.triggerFnName](r.event); } return o; }; } // removeData }, pie = { eventAliasesOn: function(e) { var t = e; t.addListener = t.listen = t.bind = t.on, t.unlisten = t.unbind = t.off = t.removeListener, t.trigger = t.emit, t.pon = t.promiseOn = function(n, r) { var o = this, a = Array.prototype.slice.call(arguments, 0); return new Dc(function(i, s) { var l = function(d) { o.off.apply(o, c), i(d); }, u = a.concat([l]), c = u.concat([]); o.on.apply(o, u); }); }; } }, en = {}; [roe, die, pie].forEach(function(e) { kt(en, e); }); var fie = { animate: en.animate(), animation: en.animation(), animated: en.animated(), clearQueue: en.clearQueue(), delay: en.delay(), delayAnimation: en.delayAnimation(), stop: en.stop() }, Xh = { classes: function(e) { var t = this; if (e === void 0) { var n = []; return t[0]._private.classes.forEach(function(h) { return n.push(h); }), n; } else cn(e) || (e = (e || "").match(/\S+/g) || []); for (var r = [], o = new Rc(e), a = 0; a < t.length; a++) { for (var i = t[a], s = i._private, l = s.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], f = l.has(d); if (!f) { u = !0; break; } } u || (u = l.size !== e.length), u && (s.classes = o, r.push(i)); } return r.length > 0 && this.spawn(r).updateStyle().emit("class"), t; }, addClass: function(e) { return this.toggleClass(e, !0); }, hasClass: function(e) { var t = this[0]; return t != null && t._private.classes.has(e); }, toggleClass: function(e, t) { cn(e) || (e = e.match(/\S+/g) || []); for (var n = this, r = t === void 0, o = [], a = 0, i = n.length; a < i; a++) for (var s = n[a], l = s._private.classes, u = !1, c = 0; c < e.length; c++) { var d = e[c], f = l.has(d), h = !1; t || r && !f ? (l.add(d), h = !0) : (!t || r && f) && (l.delete(d), h = !0), !u && h && (o.push(s), u = !0); } return o.length > 0 && this.spawn(o).updateStyle().emit("class"), n; }, removeClass: function(e) { return this.toggleClass(e, !1); }, flashClass: function(e, t) { var n = this; if (t == null) t = 250; else if (t === 0) return n; return n.addClass(e), setTimeout(function() { n.removeClass(e); }, t), n; } }; Xh.className = Xh.classNames = Xh.classes; var Vt = { metaChar: "[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]", // chars we need to escape in let names, etc comparatorOp: "=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=", // binary comparison op (used in data selectors) boolOp: "\\?|\\!|\\^", // boolean (unary) operators (used in data selectors) string: `"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`, // string literals (used in data selectors) -- doublequotes | singlequotes number: nr, // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 meta: "degree|indegree|outdegree", // allowed metadata fields (i.e. allowed functions to use from Collection) separator: "\\s*,\\s*", // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass descendant: "\\s+", child: "\\s+>\\s+", subject: "\\$", group: "node|edge|\\*", directedEdge: "\\s+->\\s+", undirectedEdge: "\\s+<->\\s+" }; Vt.variable = "(?:[\\w-.]|(?:\\\\" + Vt.metaChar + "))+"; Vt.className = "(?:[\\w-]|(?:\\\\" + Vt.metaChar + "))+"; Vt.value = Vt.string + "|" + Vt.number; Vt.id = Vt.variable; (function() { var e, t, n; for (e = Vt.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], Vt.comparatorOp += "|@" + t; for (e = Vt.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], !(t.indexOf("!") >= 0) && t !== "=" && (Vt.comparatorOp += "|\\!" + t); })(); var an = function() { return { checks: [] }; }, it = { /** E.g. node */ GROUP: 0, /** A collection of elements */ COLLECTION: 1, /** A filter(ele) function */ FILTER: 2, /** E.g. [foo > 1] */ DATA_COMPARE: 3, /** E.g. [foo] */ DATA_EXIST: 4, /** E.g. [?foo] */ DATA_BOOL: 5, /** E.g. [[degree > 2]] */ META_COMPARE: 6, /** E.g. :selected */ STATE: 7, /** E.g. #foo */ ID: 8, /** E.g. .foo */ CLASS: 9, /** E.g. #foo <-> #bar */ UNDIRECTED_EDGE: 10, /** E.g. #foo -> #bar */ DIRECTED_EDGE: 11, /** E.g. $#foo -> #bar */ NODE_SOURCE: 12, /** E.g. #foo -> $#bar */ NODE_TARGET: 13, /** E.g. $#foo <-> #bar */ NODE_NEIGHBOR: 14, /** E.g. #foo > #bar */ CHILD: 15, /** E.g. #foo #bar */ DESCENDANT: 16, /** E.g. $#foo > #bar */ PARENT: 17, /** E.g. $#foo #bar */ ANCESTOR: 18, /** E.g. #foo > $bar > #baz */ COMPOUND_SPLIT: 19, /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ TRUE: 20 }, py = [{ selector: ":selected", matches: function(e) { return e.selected(); } }, { selector: ":unselected", matches: function(e) { return !e.selected(); } }, { selector: ":selectable", matches: function(e) { return e.selectable(); } }, { selector: ":unselectable", matches: function(e) { return !e.selectable(); } }, { selector: ":locked", matches: function(e) { return e.locked(); } }, { selector: ":unlocked", matches: function(e) { return !e.locked(); } }, { selector: ":visible", matches: function(e) { return e.visible(); } }, { selector: ":hidden", matches: function(e) { return !e.visible(); } }, { selector: ":transparent", matches: function(e) { return e.transparent(); } }, { selector: ":grabbed", matches: function(e) { return e.grabbed(); } }, { selector: ":free", matches: function(e) { return !e.grabbed(); } }, { selector: ":removed", matches: function(e) { return e.removed(); } }, { selector: ":inside", matches: function(e) { return !e.removed(); } }, { selector: ":grabbable", matches: function(e) { return e.grabbable(); } }, { selector: ":ungrabbable", matches: function(e) { return !e.grabbable(); } }, { selector: ":animated", matches: function(e) { return e.animated(); } }, { selector: ":unanimated", matches: function(e) { return !e.animated(); } }, { selector: ":parent", matches: function(e) { return e.isParent(); } }, { selector: ":childless", matches: function(e) { return e.isChildless(); } }, { selector: ":child", matches: function(e) { return e.isChild(); } }, { selector: ":orphan", matches: function(e) { return e.isOrphan(); } }, { selector: ":nonorphan", matches: function(e) { return e.isChild(); } }, { selector: ":compound", matches: function(e) { return e.isNode() ? e.isParent() : e.source().isParent() || e.target().isParent(); } }, { selector: ":loop", matches: function(e) { return e.isLoop(); } }, { selector: ":simple", matches: function(e) { return e.isSimple(); } }, { selector: ":active", matches: function(e) { return e.active(); } }, { selector: ":inactive", matches: function(e) { return !e.active(); } }, { selector: ":backgrounding", matches: function(e) { return e.backgrounding(); } }, { selector: ":nonbackgrounding", matches: function(e) { return !e.backgrounding(); } }].sort(function(e, t) { return Ete(e.selector, t.selector); }), hie = function() { for (var e = {}, t, n = 0; n < py.length; n++) t = py[n], e[t.selector] = t.matches; return e; }(), vie = function(e, t) { return hie[e](t); }, gie = "(" + py.map(function(e) { return e.selector; }).join("|") + ")", Cu = function(e) { return e.replace(new RegExp("\\\\(" + Vt.metaChar + ")", "g"), function(t, n) { return n; }); }, Qi = function(e, t, n) { e[e.length - 1] = n; }, fy = [{ name: "group", // just used for identifying when debugging query: !0, regex: "(" + Vt.group + ")", populate: function(e, t, n) { var r = ca(n, 1), o = r[0]; t.checks.push({ type: it.GROUP, value: o === "*" ? o : o + "s" }); } }, { name: "state", query: !0, regex: gie, populate: function(e, t, n) { var r = ca(n, 1), o = r[0]; t.checks.push({ type: it.STATE, value: o }); } }, { name: "id", query: !0, regex: "\\#(" + Vt.id + ")", populate: function(e, t, n) { var r = ca(n, 1), o = r[0]; t.checks.push({ type: it.ID, value: Cu(o) }); } }, { name: "className", query: !0, regex: "\\.(" + Vt.className + ")", populate: function(e, t, n) { var r = ca(n, 1), o = r[0]; t.checks.push({ type: it.CLASS, value: Cu(o) }); } }, { name: "dataExists", query: !0, regex: "\\[\\s*(" + Vt.variable + ")\\s*\\]", populate: function(e, t, n) { var r = ca(n, 1), o = r[0]; t.checks.push({ type: it.DATA_EXIST, field: Cu(o) }); } }, { name: "dataCompare", query: !0, regex: "\\[\\s*(" + Vt.variable + ")\\s*(" + Vt.comparatorOp + ")\\s*(" + Vt.value + ")\\s*\\]", populate: function(e, t, n) { var r = ca(n, 3), o = r[0], a = r[1], i = r[2], s = new RegExp("^" + Vt.string + "$").exec(i) != null; s ? i = i.substring(1, i.length - 1) : i = parseFloat(i), t.checks.push({ type: it.DATA_COMPARE, field: Cu(o), operator: a, value: i }); } }, { name: "dataBool", query: !0, regex: "\\[\\s*(" + Vt.boolOp + ")\\s*(" + Vt.variable + ")\\s*\\]", populate: function(e, t, n) { var r = ca(n, 2), o = r[0], a = r[1]; t.checks.push({ type: it.DATA_BOOL, field: Cu(a), operator: o }); } }, { name: "metaCompare", query: !0, regex: "\\[\\[\\s*(" + Vt.meta + ")\\s*(" + Vt.comparatorOp + ")\\s*(" + Vt.number + ")\\s*\\]\\]", populate: function(e, t, n) { var r = ca(n, 3), o = r[0], a = r[1], i = r[2]; t.checks.push({ type: it.META_COMPARE, field: Cu(o), operator: a, value: parseFloat(i) }); } }, { name: "nextQuery", separator: !0, regex: Vt.separator, populate: function(e, t) { var n = e.currentSubject, r = e.edgeCount, o = e.compoundCount, a = e[e.length - 1]; n != null && (a.subject = n, e.currentSubject = null), a.edgeCount = r, a.compoundCount = o, e.edgeCount = 0, e.compoundCount = 0; var i = e[e.length++] = an(); return i; } }, { name: "directedEdge", separator: !0, regex: Vt.directedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = an(), r = t, o = an(); return n.checks.push({ type: it.DIRECTED_EDGE, source: r, target: o }), Qi(e, t, n), e.edgeCount++, o; } else { var a = an(), i = t, s = an(); return a.checks.push({ type: it.NODE_SOURCE, source: i, target: s }), Qi(e, t, a), e.edgeCount++, s; } } }, { name: "undirectedEdge", separator: !0, regex: Vt.undirectedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = an(), r = t, o = an(); return n.checks.push({ type: it.UNDIRECTED_EDGE, nodes: [r, o] }), Qi(e, t, n), e.edgeCount++, o; } else { var a = an(), i = t, s = an(); return a.checks.push({ type: it.NODE_NEIGHBOR, node: i, neighbor: s }), Qi(e, t, a), s; } } }, { name: "child", separator: !0, regex: Vt.child, populate: function(e, t) { if (e.currentSubject == null) { var n = an(), r = an(), o = e[e.length - 1]; return n.checks.push({ type: it.CHILD, parent: o, child: r }), Qi(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var a = an(), i = e[e.length - 1], s = an(), l = an(), u = an(), c = an(); return a.checks.push({ type: it.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: it.TRUE }], c.checks.push({ type: it.TRUE }), s.checks.push({ type: it.PARENT, // type is swapped on right side queries parent: c, child: u // empty for now }), Qi(e, i, a), e.currentSubject = l, e.compoundCount++, u; } else { var d = an(), f = an(), h = [{ type: it.PARENT, parent: d, child: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "descendant", separator: !0, regex: Vt.descendant, populate: function(e, t) { if (e.currentSubject == null) { var n = an(), r = an(), o = e[e.length - 1]; return n.checks.push({ type: it.DESCENDANT, ancestor: o, descendant: r }), Qi(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var a = an(), i = e[e.length - 1], s = an(), l = an(), u = an(), c = an(); return a.checks.push({ type: it.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: it.TRUE }], c.checks.push({ type: it.TRUE }), s.checks.push({ type: it.ANCESTOR, // type is swapped on right side queries ancestor: c, descendant: u // empty for now }), Qi(e, i, a), e.currentSubject = l, e.compoundCount++, u; } else { var d = an(), f = an(), h = [{ type: it.ANCESTOR, ancestor: d, descendant: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "subject", modifier: !0, regex: Vt.subject, populate: function(e, t) { if (e.currentSubject != null && e.currentSubject !== t) return tn("Redefinition of subject in selector `" + e.toString() + "`"), !1; e.currentSubject = t; var n = e[e.length - 1], r = n.checks[0], o = r == null ? null : r.type; o === it.DIRECTED_EDGE ? r.type = it.NODE_TARGET : o === it.UNDIRECTED_EDGE && (r.type = it.NODE_NEIGHBOR, r.node = r.nodes[1], r.neighbor = r.nodes[0], r.nodes = null); } }]; fy.forEach(function(e) { return e.regexObj = new RegExp("^" + e.regex); }); var mie = function(e) { for (var t, n, r, o = 0; o < fy.length; o++) { var a = fy[o], i = a.name, s = e.match(a.regexObj); if (s != null) { n = s, t = a, r = i; var l = s[0]; e = e.substring(l.length); break; } } return { expr: t, match: n, name: r, remaining: e }; }, yie = function(e) { var t = e.match(/^\s+/); if (t) { var n = t[0]; e = e.substring(n.length); } return e; }, bie = function(e) { var t = this, n = t.inputText = e, r = t[0] = an(); for (t.length = 1, n = yie(n); ; ) { var o = mie(n); if (o.expr == null) return tn("The selector `" + e + "`is invalid"), !1; var a = o.match.slice(1), i = o.expr.populate(t, r, a); if (i === !1) return !1; if (i != null && (r = i), n = o.remaining, n.match(/^\s*$/)) break; } var s = t[t.length - 1]; t.currentSubject != null && (s.subject = t.currentSubject), s.edgeCount = t.edgeCount, s.compoundCount = t.compoundCount; for (var l = 0; l < t.length; l++) { var u = t[l]; if (u.compoundCount > 0 && u.edgeCount > 0) return tn("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1; if (u.edgeCount > 1) return tn("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1; u.edgeCount === 1 && tn("The selector `" + e + "` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes."); } return !0; }, wie = function() { if (this.toStringCache != null) return this.toStringCache; for (var e = function(l) { return l ?? ""; }, t = function(l) { return ht(l) ? '"' + l + '"' : e(l); }, n = function(l) { return " " + l + " "; }, r = function(l, u) { var c = l.type, d = l.value; switch (c) { case it.GROUP: { var f = e(d); return f.substring(0, f.length - 1); } case it.DATA_COMPARE: { var h = l.field, p = l.operator; return "[" + h + n(e(p)) + t(d) + "]"; } case it.DATA_BOOL: { var v = l.operator, m = l.field; return "[" + e(v) + m + "]"; } case it.DATA_EXIST: { var g = l.field; return "[" + g + "]"; } case it.META_COMPARE: { var b = l.operator, C = l.field; return "[[" + C + n(e(b)) + t(d) + "]]"; } case it.STATE: return d; case it.ID: return "#" + d; case it.CLASS: return "." + d; case it.PARENT: case it.CHILD: return o(l.parent, u) + n(">") + o(l.child, u); case it.ANCESTOR: case it.DESCENDANT: return o(l.ancestor, u) + " " + o(l.descendant, u); case it.COMPOUND_SPLIT: { var x = o(l.left, u), w = o(l.subject, u), k = o(l.right, u); return x + (x.length > 0 ? " " : "") + w + k; } case it.TRUE: return ""; } }, o = function(l, u) { return l.checks.reduce(function(c, d, f) { return c + (u === l && f === 0 ? "$" : "") + r(d, u); }, ""); }, a = "", i = 0; i < this.length; i++) { var s = this[i]; a += o(s, s.subject), this.length > 1 && i < this.length - 1 && (a += ", "); } return this.toStringCache = a, a; }, xie = { parse: bie, toString: wie }, U6 = function(e, t, n) { var r, o = ht(e), a = Ke(e), i = ht(n), s, l, u = !1, c = !1, d = !1; switch (t.indexOf("!") >= 0 && (t = t.replace("!", ""), c = !0), t.indexOf("@") >= 0 && (t = t.replace("@", ""), u = !0), (o || i || u) && (s = !o && !a ? "" : "" + e, l = "" + n), u && (e = s = s.toLowerCase(), n = l = l.toLowerCase()), t) { case "*=": r = s.indexOf(l) >= 0; break; case "$=": r = s.indexOf(l, s.length - l.length) >= 0; break; case "^=": r = s.indexOf(l) === 0; break; case "=": r = e === n; break; case ">": d = !0, r = e > n; break; case ">=": d = !0, r = e >= n; break; case "<": d = !0, r = e < n; break; case "<=": d = !0, r = e <= n; break; default: r = !1; break; } return c && (e != null || !d) && (r = !r), r; }, kie = function(e, t) { switch (t) { case "?": return !!e; case "!": return !e; case "^": return e === void 0; } }, Cie = function(e) { return e !== void 0; }, U2 = function(e, t) { return e.data(t); }, Sie = function(e, t) { return e[t](); }, Bn = [], Sn = function(e, t) { return e.checks.every(function(n) { return Bn[n.type](n, t); }); }; Bn[it.GROUP] = function(e, t) { var n = e.value; return n === "*" || n === t.group(); }; Bn[it.STATE] = function(e, t) { var n = e.value; return vie(n, t); }; Bn[it.ID] = function(e, t) { var n = e.value; return t.id() === n; }; Bn[it.CLASS] = function(e, t) { var n = e.value; return t.hasClass(n); }; Bn[it.META_COMPARE] = function(e, t) { var n = e.field, r = e.operator, o = e.value; return U6(Sie(t, n), r, o); }; Bn[it.DATA_COMPARE] = function(e, t) { var n = e.field, r = e.operator, o = e.value; return U6(U2(t, n), r, o); }; Bn[it.DATA_BOOL] = function(e, t) { var n = e.field, r = e.operator; return kie(U2(t, n), r); }; Bn[it.DATA_EXIST] = function(e, t) { var n = e.field; return e.operator, Cie(U2(t, n)); }; Bn[it.UNDIRECTED_EDGE] = function(e, t) { var n = e.nodes[0], r = e.nodes[1], o = t.source(), a = t.target(); return Sn(n, o) && Sn(r, a) || Sn(r, o) && Sn(n, a); }; Bn[it.NODE_NEIGHBOR] = function(e, t) { return Sn(e.node, t) && t.neighborhood().some(function(n) { return n.isNode() && Sn(e.neighbor, n); }); }; Bn[it.DIRECTED_EDGE] = function(e, t) { return Sn(e.source, t.source()) && Sn(e.target, t.target()); }; Bn[it.NODE_SOURCE] = function(e, t) { return Sn(e.source, t) && t.outgoers().some(function(n) { return n.isNode() && Sn(e.target, n); }); }; Bn[it.NODE_TARGET] = function(e, t) { return Sn(e.target, t) && t.incomers().some(function(n) { return n.isNode() && Sn(e.source, n); }); }; Bn[it.CHILD] = function(e, t) { return Sn(e.child, t) && Sn(e.parent, t.parent()); }; Bn[it.PARENT] = function(e, t) { return Sn(e.parent, t) && t.children().some(function(n) { return Sn(e.child, n); }); }; Bn[it.DESCENDANT] = function(e, t) { return Sn(e.descendant, t) && t.ancestors().some(function(n) { return Sn(e.ancestor, n); }); }; Bn[it.ANCESTOR] = function(e, t) { return Sn(e.ancestor, t) && t.descendants().some(function(n) { return Sn(e.descendant, n); }); }; Bn[it.COMPOUND_SPLIT] = function(e, t) { return Sn(e.subject, t) && Sn(e.left, t) && Sn(e.right, t); }; Bn[it.TRUE] = function() { return !0; }; Bn[it.COLLECTION] = function(e, t) { var n = e.value; return n.has(t); }; Bn[it.FILTER] = function(e, t) { var n = e.value; return n(t); }; var Eie = function(e) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === it.ID) return e.getElementById(t[0].checks[0].value).collection(); var n = function(r) { for (var o = 0; o < t.length; o++) { var a = t[o]; if (Sn(a, r)) return !0; } return !1; }; return t.text() == null && (n = function() { return !0; }), e.filter(n); }, $ie = function(e) { for (var t = this, n = 0; n < t.length; n++) { var r = t[n]; if (Sn(r, e)) return !0; } return !1; }, _ie = { matches: $ie, filter: Eie }, Ls = function(e) { this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || ht(e) && e.match(/^\s*$/) || (Eo(e) ? this.addQuery({ checks: [{ type: it.COLLECTION, value: e.collection() }] }) : An(e) ? this.addQuery({ checks: [{ type: it.FILTER, value: e }] }) : ht(e) ? this.parse(e) || (this.invalid = !0) : Nn("A selector must be created from a string; found ")); }, Rs = Ls.prototype; [xie, _ie].forEach(function(e) { return kt(Rs, e); }); Rs.text = function() { return this.inputText; }; Rs.size = function() { return this.length; }; Rs.eq = function(e) { return this[e]; }; Rs.sameText = function(e) { return !this.invalid && !e.invalid && this.text() === e.text(); }; Rs.addQuery = function(e) { this[this.length++] = e; }; Rs.selector = Rs.toString; var $s = { allAre: function(e) { var t = new Ls(e); return this.every(function(n) { return t.matches(n); }); }, is: function(e) { var t = new Ls(e); return this.some(function(n) { return t.matches(n); }); }, some: function(e, t) { for (var n = 0; n < this.length; n++) { var r = t ? e.apply(t, [this[n], n, this]) : e(this[n], n, this); if (r) return !0; } return !1; }, every: function(e, t) { for (var n = 0; n < this.length; n++) { var r = t ? e.apply(t, [this[n], n, this]) : e(this[n], n, this); if (!r) return !1; } return !0; }, same: function(e) { if (this === e) return !0; e = this.cy().collection(e); var t = this.length, n = e.length; return t !== n ? !1 : t === 1 ? this[0] === e[0] : this.every(function(r) { return e.hasElementWithId(r.id()); }); }, anySame: function(e) { return e = this.cy().collection(e), this.some(function(t) { return e.hasElementWithId(t.id()); }); }, allAreNeighbors: function(e) { e = this.cy().collection(e); var t = this.neighborhood(); return e.every(function(n) { return t.hasElementWithId(n.id()); }); }, contains: function(e) { e = this.cy().collection(e); var t = this; return e.every(function(n) { return t.hasElementWithId(n.id()); }); } }; $s.allAreNeighbours = $s.allAreNeighbors; $s.has = $s.contains; $s.equal = $s.equals = $s.same; var zo = function(e, t) { return function(n, r, o, a) { var i = n, s = this, l; if (i == null ? l = "" : Eo(i) && i.length === 1 && (l = i.id()), s.length === 1 && l) { var u = s[0]._private, c = u.traversalCache = u.traversalCache || {}, d = c[t] = c[t] || [], f = Ml(l), h = d[f]; return h || (d[f] = e.call(s, n, r, o, a)); } else return e.call(s, n, r, o, a); }; }, hc = { parent: function(e) { var t = []; if (this.length === 1) { var n = this[0]._private.parent; if (n) return n; } for (var r = 0; r < this.length; r++) { var o = this[r], a = o._private.parent; a && t.push(a); } return this.spawn(t, !0).filter(e); }, parents: function(e) { for (var t = [], n = this.parent(); n.nonempty(); ) { for (var r = 0; r < n.length; r++) { var o = n[r]; t.push(o); } n = n.parent(); } return this.spawn(t, !0).filter(e); }, commonAncestors: function(e) { for (var t, n = 0; n < this.length; n++) { var r = this[n], o = r.parents(); t = t || o, t = t.intersect(o); } return t.filter(e); }, orphans: function(e) { return this.stdFilter(function(t) { return t.isOrphan(); }).filter(e); }, nonorphans: function(e) { return this.stdFilter(function(t) { return t.isChild(); }).filter(e); }, children: zo(function(e) { for (var t = [], n = 0; n < this.length; n++) for (var r = this[n], o = r._private.children, a = 0; a < o.length; a++) t.push(o[a]); return this.spawn(t, !0).filter(e); }, "children"), siblings: function(e) { return this.parent().children().not(this).filter(e); }, isParent: function() { var e = this[0]; if (e) return e.isNode() && e._private.children.length !== 0; }, isChildless: function() { var e = this[0]; if (e) return e.isNode() && e._private.children.length === 0; }, isChild: function() { var e = this[0]; if (e) return e.isNode() && e._private.parent != null; }, isOrphan: function() { var e = this[0]; if (e) return e.isNode() && e._private.parent == null; }, descendants: function(e) { var t = []; function n(r) { for (var o = 0; o < r.length; o++) { var a = r[o]; t.push(a), a.children().nonempty() && n(a.children()); } } return n(this.children()), this.spawn(t, !0).filter(e); } }; function q2(e, t, n, r) { for (var o = [], a = new Rc(), i = e.cy(), s = i.hasCompoundNodes(), l = 0; l < e.length; l++) { var u = e[l]; n ? o.push(u) : s && r(o, a, u); } for (; o.length > 0; ) { var c = o.shift(); t(c), a.add(c.id()), s && r(o, a, c); } return e; } function q6(e, t, n) { if (n.isParent()) for (var r = n._private.children, o = 0; o < r.length; o++) { var a = r[o]; t.has(a.id()) || e.push(a); } } hc.forEachDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return q2(this, e, t, q6); }; function W6(e, t, n) { if (n.isChild()) { var r = n._private.parent; t.has(r.id()) || e.push(r); } } hc.forEachUp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return q2(this, e, t, W6); }; function Tie(e, t, n) { W6(e, t, n), q6(e, t, n); } hc.forEachUpAndDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return q2(this, e, t, Tie); }; hc.ancestors = hc.parents; var wp, G6; wp = G6 = { data: en.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), removeData: en.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), scratch: en.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: en.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), rscratch: en.data({ field: "rscratch", allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !0 }), removeRscratch: en.removeData({ field: "rscratch", triggerEvent: !1 }), id: function() { var e = this[0]; if (e) return e._private.data.id; } }; wp.attr = wp.data; wp.removeAttr = wp.removeData; var Oie = G6, hg = {}; function Km(e) { return function(t) { var n = this; if (t === void 0 && (t = !0), n.length !== 0) if (n.isNode() && !n.removed()) { for (var r = 0, o = n[0], a = o._private.edges, i = 0; i < a.length; i++) { var s = a[i]; !t && s.isLoop() || (r += e(o, s)); } return r; } else return; }; } kt(hg, { degree: Km(function(e, t) { return t.source().same(t.target()) ? 2 : 1; }), indegree: Km(function(e, t) { return t.target().same(e) ? 1 : 0; }), outdegree: Km(function(e, t) { return t.source().same(e) ? 1 : 0; }) }); function Su(e, t) { return function(n) { for (var r, o = this.nodes(), a = 0; a < o.length; a++) { var i = o[a], s = i[e](n); s !== void 0 && (r === void 0 || t(s, r)) && (r = s); } return r; }; } kt(hg, { minDegree: Su("degree", function(e, t) { return e < t; }), maxDegree: Su("degree", function(e, t) { return e > t; }), minIndegree: Su("indegree", function(e, t) { return e < t; }), maxIndegree: Su("indegree", function(e, t) { return e > t; }), minOutdegree: Su("outdegree", function(e, t) { return e < t; }), maxOutdegree: Su("outdegree", function(e, t) { return e > t; }) }); kt(hg, { totalDegree: function(e) { for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++) t += n[r].degree(e); return t; } }); var ya, K6, Y6 = function(e, t, n) { for (var r = 0; r < e.length; r++) { var o = e[r]; if (!o.locked()) { var a = o._private.position, i = { x: t.x != null ? t.x - a.x : 0, y: t.y != null ? t.y - a.y : 0 }; o.isParent() && !(i.x === 0 && i.y === 0) && o.children().shift(i, n), o.dirtyBoundingBoxCache(); } } }, Z5 = { field: "position", bindingEvent: "position", allowBinding: !0, allowSetting: !0, settingEvent: "position", settingTriggersEvent: !0, triggerFnName: "emitAndNotify", allowGetting: !0, validKeys: ["x", "y"], beforeGet: function(e) { e.updateCompoundBounds(); }, beforeSet: function(e, t) { Y6(e, t, !1); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); }, canSet: function(e) { return !e.locked(); } }; ya = K6 = { position: en.data(Z5), // position but no notification to renderer silentPosition: en.data(kt({}, Z5, { allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !1, beforeSet: function(e, t) { Y6(e, t, !0); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); } })), positions: function(e, t) { if (Ht(e)) t ? this.silentPosition(e) : this.position(e); else if (An(e)) { var n = e, r = this.cy(); r.startBatch(); for (var o = 0; o < this.length; o++) { var a = this[o], i = void 0; (i = n(a, o)) && (t ? a.silentPosition(i) : a.position(i)); } r.endBatch(); } return this; }, silentPositions: function(e) { return this.positions(e, !0); }, shift: function(e, t, n) { var r; if (Ht(e) ? (r = { x: Ke(e.x) ? e.x : 0, y: Ke(e.y) ? e.y : 0 }, n = t) : ht(e) && Ke(t) && (r = { x: 0, y: 0 }, r[e] = t), r != null) { var o = this.cy(); o.startBatch(); for (var a = 0; a < this.length; a++) { var i = this[a]; if (!(o.hasCompoundNodes() && i.isChild() && i.ancestors().anySame(this))) { var s = i.position(), l = { x: s.x + r.x, y: s.y + r.y }; n ? i.silentPosition(l) : i.position(l); } } o.endBatch(); } return this; }, silentShift: function(e, t) { return Ht(e) ? this.shift(e, !0) : ht(e) && Ke(t) && this.shift(e, t, !0), this; }, // get/set the rendered (i.e. on screen) positon of the element renderedPosition: function(e, t) { var n = this[0], r = this.cy(), o = r.zoom(), a = r.pan(), i = Ht(e) ? e : void 0, s = i !== void 0 || t !== void 0 && ht(e); if (n && n.isNode()) if (s) for (var l = 0; l < this.length; l++) { var u = this[l]; t !== void 0 ? u.position(e, (t - a[e]) / o) : i !== void 0 && u.position(x6(i, o, a)); } else { var c = n.position(); return i = ug(c, o, a), e === void 0 ? i : i[e]; } else if (!s) return; return this; }, // get/set the position relative to the parent relativePosition: function(e, t) { var n = this[0], r = this.cy(), o = Ht(e) ? e : void 0, a = o !== void 0 || t !== void 0 && ht(e), i = r.hasCompoundNodes(); if (n && n.isNode()) if (a) for (var s = 0; s < this.length; s++) { var l = this[s], u = i ? l.parent() : null, c = u && u.length > 0, d = c; c && (u = u[0]); var f = d ? u.position() : { x: 0, y: 0 }; t !== void 0 ? l.position(e, t + f[e]) : o !== void 0 && l.position({ x: o.x + f.x, y: o.y + f.y }); } else { var h = n.position(), p = i ? n.parent() : null, v = p && p.length > 0, m = v; v && (p = p[0]); var g = m ? p.position() : { x: 0, y: 0 }; return o = { x: h.x - g.x, y: h.y - g.y }, e === void 0 ? o : o[e]; } else if (!a) return; return this; } }; ya.modelPosition = ya.point = ya.position; ya.modelPositions = ya.points = ya.positions; ya.renderedPoint = ya.renderedPosition; ya.relativePoint = ya.relativePosition; var Fie = K6, Gu, qs; Gu = qs = {}; qs.renderedBoundingBox = function(e) { var t = this.boundingBox(e), n = this.cy(), r = n.zoom(), o = n.pan(), a = t.x1 * r + o.x, i = t.x2 * r + o.x, s = t.y1 * r + o.y, l = t.y2 * r + o.y; return { x1: a, x2: i, y1: s, y2: l, w: i - a, h: l - s }; }; qs.dirtyCompoundBoundsCache = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, t = this.cy(); return !t.styleEnabled() || !t.hasCompoundNodes() ? this : (this.forEachUp(function(n) { if (n.isParent()) { var r = n._private; r.compoundBoundsClean = !1, r.bbCache = null, e || n.emitAndNotify("bounds"); } }), this); }; qs.updateCompoundBounds = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, t = this.cy(); if (!t.styleEnabled() || !t.hasCompoundNodes()) return this; if (!e && t.batching()) return this; function n(i) { if (!i.isParent()) return; var s = i._private, l = i.children(), u = i.pstyle("compound-sizing-wrt-labels").value === "include", c = { width: { val: i.pstyle("min-width").pfValue, left: i.pstyle("min-width-bias-left"), right: i.pstyle("min-width-bias-right") }, height: { val: i.pstyle("min-height").pfValue, top: i.pstyle("min-height-bias-top"), bottom: i.pstyle("min-height-bias-bottom") } }, d = l.boundingBox({ includeLabels: u, includeOverlays: !1, // updating the compound bounds happens outside of the regular // cache cycle (i.e. before fired events) useCache: !1 }), f = s.position; (d.w === 0 || d.h === 0) && (d = { w: i.pstyle("width").pfValue, h: i.pstyle("height").pfValue }, d.x1 = f.x - d.w / 2, d.x2 = f.x + d.w / 2, d.y1 = f.y - d.h / 2, d.y2 = f.y + d.h / 2); function h(O, F, I) { var P = 0, M = 0, N = F + I; return O > 0 && N > 0 && (P = F / N * O, M = I / N * O), { biasDiff: P, biasComplementDiff: M }; } function p(O, F, I, P) { if (I.units === "%") switch (P) { case "width": return O > 0 ? I.pfValue * O : 0; case "height": return F > 0 ? I.pfValue * F : 0; case "average": return O > 0 && F > 0 ? I.pfValue * (O + F) / 2 : 0; case "min": return O > 0 && F > 0 ? O > F ? I.pfValue * F : I.pfValue * O : 0; case "max": return O > 0 && F > 0 ? O > F ? I.pfValue * O : I.pfValue * F : 0; default: return 0; } else return I.units === "px" ? I.pfValue : 0; } var v = c.width.left.value; c.width.left.units === "px" && c.width.val > 0 && (v = v * 100 / c.width.val); var m = c.width.right.value; c.width.right.units === "px" && c.width.val > 0 && (m = m * 100 / c.width.val); var g = c.height.top.value; c.height.top.units === "px" && c.height.val > 0 && (g = g * 100 / c.height.val); var b = c.height.bottom.value; c.height.bottom.units === "px" && c.height.val > 0 && (b = b * 100 / c.height.val); var C = h(c.width.val - d.w, v, m), x = C.biasDiff, w = C.biasComplementDiff, k = h(c.height.val - d.h, g, b), S = k.biasDiff, _ = k.biasComplementDiff; s.autoPadding = p(d.w, d.h, i.pstyle("padding"), i.pstyle("padding-relative-to").value), s.autoWidth = Math.max(d.w, c.width.val), f.x = (-x + d.x1 + d.x2 + w) / 2, s.autoHeight = Math.max(d.h, c.height.val), f.y = (-S + d.y1 + d.y2 + _) / 2; } for (var r = 0; r < this.length; r++) { var o = this[r], a = o._private; (!a.compoundBoundsClean || e) && (n(o), t.batching() || (a.compoundBoundsClean = !0)); } return this; }; var Do = function(e) { return e === 1 / 0 || e === -1 / 0 ? 0 : e; }, fa = function(e, t, n, r, o) { r - t === 0 || o - n === 0 || t == null || n == null || r == null || o == null || (e.x1 = t < e.x1 ? t : e.x1, e.x2 = r > e.x2 ? r : e.x2, e.y1 = n < e.y1 ? n : e.y1, e.y2 = o > e.y2 ? o : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1); }, ll = function(e, t) { return t == null ? e : fa(e, t.x1, t.y1, t.x2, t.y2); }, fd = function(e, t, n) { return ha(e, t, n); }, ch = function(e, t, n) { if (!t.cy().headless()) { var r = t._private, o = r.rstyle, a = o.arrowWidth / 2, i = t.pstyle(n + "-arrow-shape").value, s, l; if (i !== "none") { n === "source" ? (s = o.srcX, l = o.srcY) : n === "target" ? (s = o.tgtX, l = o.tgtY) : (s = o.midX, l = o.midY); var u = r.arrowBounds = r.arrowBounds || {}, c = u[n] = u[n] || {}; c.x1 = s - a, c.y1 = l - a, c.x2 = s + a, c.y2 = l + a, c.w = c.x2 - c.x1, c.h = c.y2 - c.y1, Kh(c, 1), fa(e, c.x1, c.y1, c.x2, c.y2); } } }, Ym = function(e, t, n) { if (!t.cy().headless()) { var r; n ? r = n + "-" : r = ""; var o = t._private, a = o.rstyle, i = t.pstyle(r + "label").strValue; if (i) { var s = t.pstyle("text-halign"), l = t.pstyle("text-valign"), u = fd(a, "labelWidth", n), c = fd(a, "labelHeight", n), d = fd(a, "labelX", n), f = fd(a, "labelY", n), h = t.pstyle(r + "text-margin-x").pfValue, p = t.pstyle(r + "text-margin-y").pfValue, v = t.isEdge(), m = t.pstyle(r + "text-rotation"), g = t.pstyle("text-outline-width").pfValue, b = t.pstyle("text-border-width").pfValue, C = b / 2, x = t.pstyle("text-background-padding").pfValue, w = 2, k = c, S = u, _ = S / 2, O = k / 2, F, I, P, M; if (v) F = d - _, I = d + _, P = f - O, M = f + O; else { switch (s.value) { case "left": F = d - S, I = d; break; case "center": F = d - _, I = d + _; break; case "right": F = d, I = d + S; break; } switch (l.value) { case "top": P = f - k, M = f; break; case "center": P = f - O, M = f + O; break; case "bottom": P = f, M = f + k; break; } } F += h - Math.max(g, C) - x - w, I += h + Math.max(g, C) + x + w, P += p - Math.max(g, C) - x - w, M += p + Math.max(g, C) + x + w; var N = n || "main", j = o.labelBounds, A = j[N] = j[N] || {}; A.x1 = F, A.y1 = P, A.x2 = I, A.y2 = M, A.w = I - F, A.h = M - P; var U = v && m.strValue === "autorotate", q = m.pfValue != null && m.pfValue !== 0; if (U || q) { var Y = U ? fd(o.rstyle, "labelAngle", n) : m.pfValue, ie = Math.cos(Y), re = Math.sin(Y), le = (F + I) / 2, he = (P + M) / 2; if (!v) { switch (s.value) { case "left": le = I; break; case "right": le = F; break; } switch (l.value) { case "top": he = M; break; case "bottom": he = P; break; } } var we = function(Se, Le) { return Se = Se - le, Le = Le - he, { x: Se * ie - Le * re + le, y: Se * re + Le * ie + he }; }, be = we(F, P), de = we(F, M), ae = we(I, P), ee = we(I, M); F = Math.min(be.x, de.x, ae.x, ee.x), I = Math.max(be.x, de.x, ae.x, ee.x), P = Math.min(be.y, de.y, ae.y, ee.y), M = Math.max(be.y, de.y, ae.y, ee.y); } var se = N + "Rot", pe = j[se] = j[se] || {}; pe.x1 = F, pe.y1 = P, pe.x2 = I, pe.y2 = M, pe.w = I - F, pe.h = M - P, fa(e, F, P, I, M), fa(o.labelBounds.all, F, P, I, M); } return e; } }, Iie = function(e, t) { if (!t.cy().headless()) { var n = t.pstyle("outline-opacity").value, r = t.pstyle("outline-width").value; if (n > 0 && r > 0) { var o = t.pstyle("outline-offset").value, a = t.pstyle("shape").value, i = r + o, s = (e.w + i * 2) / e.w, l = (e.h + i * 2) / e.h, u = 0, c = 0; ["diamond", "pentagon", "round-triangle"].includes(a) ? (s = (e.w + i * 2.4) / e.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(a) ? s = (e.w + i * 2.4) / e.w : a === "star" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.6) / e.h, c = -i / 3.8) : a === "triangle" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.4) / e.h, c = -i / 1.4) : a === "vee" && (s = (e.w + i * 4.4) / e.w, l = (e.h + i * 3.8) / e.h, c = -i * 0.5); var d = e.h * l - e.h, f = e.w * s - e.w; if (Yh(e, [Math.ceil(d / 2), Math.ceil(f / 2)]), u != 0 || c !== 0) { var h = Jne(e, u, c); C6(e, h); } } } }, Aie = function(e, t) { var n = e._private.cy, r = n.styleEnabled(), o = n.headless(), a = yo(), i = e._private, s = e.isNode(), l = e.isEdge(), u, c, d, f, h, p, v = i.rstyle, m = s && r ? e.pstyle("bounds-expansion").pfValue : [0], g = function(_e) { return _e.pstyle("display").value !== "none"; }, b = !r || g(e) && (!l || g(e.source()) && g(e.target())); if (b) { var C = 0, x = 0; r && t.includeOverlays && (C = e.pstyle("overlay-opacity").value, C !== 0 && (x = e.pstyle("overlay-padding").value)); var w = 0, k = 0; r && t.includeUnderlays && (w = e.pstyle("underlay-opacity").value, w !== 0 && (k = e.pstyle("underlay-padding").value)); var S = Math.max(x, k), _ = 0, O = 0; if (r && (_ = e.pstyle("width").pfValue, O = _ / 2), s && t.includeNodes) { var F = e.position(); h = F.x, p = F.y; var I = e.outerWidth(), P = I / 2, M = e.outerHeight(), N = M / 2; u = h - P, c = h + P, d = p - N, f = p + N, fa(a, u, d, c, f), r && t.includeOutlines && Iie(a, e); } else if (l && t.includeEdges) if (r && !o) { var j = e.pstyle("curve-style").strValue; if (u = Math.min(v.srcX, v.midX, v.tgtX), c = Math.max(v.srcX, v.midX, v.tgtX), d = Math.min(v.srcY, v.midY, v.tgtY), f = Math.max(v.srcY, v.midY, v.tgtY), u -= O, c += O, d -= O, f += O, fa(a, u, d, c, f), j === "haystack") { var A = v.haystackPts; if (A && A.length === 2) { if (u = A[0].x, d = A[0].y, c = A[1].x, f = A[1].y, u > c) { var U = u; u = c, c = U; } if (d > f) { var q = d; d = f, f = q; } fa(a, u - O, d - O, c + O, f + O); } } else if (j === "bezier" || j === "unbundled-bezier" || j.endsWith("segments") || j.endsWith("taxi")) { var Y; switch (j) { case "bezier": case "unbundled-bezier": Y = v.bezierPts; break; case "segments": case "taxi": case "round-segments": case "round-taxi": Y = v.linePts; break; } if (Y != null) for (var ie = 0; ie < Y.length; ie++) { var re = Y[ie]; u = re.x - O, c = re.x + O, d = re.y - O, f = re.y + O, fa(a, u, d, c, f); } } } else { var le = e.source(), he = le.position(), we = e.target(), be = we.position(); if (u = he.x, c = be.x, d = he.y, f = be.y, u > c) { var de = u; u = c, c = de; } if (d > f) { var ae = d; d = f, f = ae; } u -= O, c += O, d -= O, f += O, fa(a, u, d, c, f); } if (r && t.includeEdges && l && (ch(a, e, "mid-source"), ch(a, e, "mid-target"), ch(a, e, "source"), ch(a, e, "target")), r) { var ee = e.pstyle("ghost").value === "yes"; if (ee) { var se = e.pstyle("ghost-offset-x").pfValue, pe = e.pstyle("ghost-offset-y").pfValue; fa(a, a.x1 + se, a.y1 + pe, a.x2 + se, a.y2 + pe); } } var Se = i.bodyBounds = i.bodyBounds || {}; F5(Se, a), Yh(Se, m), Kh(Se, 1), r && (u = a.x1, c = a.x2, d = a.y1, f = a.y2, fa(a, u - S, d - S, c + S, f + S)); var Le = i.overlayBounds = i.overlayBounds || {}; F5(Le, a), Yh(Le, m), Kh(Le, 1); var je = i.labelBounds = i.labelBounds || {}; je.all != null ? Zne(je.all) : je.all = yo(), r && t.includeLabels && (t.includeMainLabels && Ym(a, e, null), l && (t.includeSourceLabels && Ym(a, e, "source"), t.includeTargetLabels && Ym(a, e, "target"))); } return a.x1 = Do(a.x1), a.y1 = Do(a.y1), a.x2 = Do(a.x2), a.y2 = Do(a.y2), a.w = Do(a.x2 - a.x1), a.h = Do(a.y2 - a.y1), a.w > 0 && a.h > 0 && b && (Yh(a, m), Kh(a, 1)), a; }, X6 = function(e) { var t = 0, n = function(o) { return (o ? 1 : 0) << t++; }, r = 0; return r += n(e.incudeNodes), r += n(e.includeEdges), r += n(e.includeLabels), r += n(e.includeMainLabels), r += n(e.includeSourceLabels), r += n(e.includeTargetLabels), r += n(e.includeOverlays), r += n(e.includeOutlines), r; }, Z6 = function(e) { if (e.isEdge()) { var t = e.source().position(), n = e.target().position(), r = function(o) { return Math.round(o); }; return yne([r(t.x), r(t.y), r(n.x), r(n.y)]); } else return 0; }, J5 = function(e, t) { var n = e._private, r, o = e.isEdge(), a = t == null ? Q5 : X6(t), i = a === Q5, s = Z6(e), l = n.bbCachePosKey === s, u = t.useCache && l, c = function(h) { return h._private.bbCache == null || h._private.styleDirty; }, d = !u || c(e) || o && c(e.source()) || c(e.target()); if (d ? (l || e.recalculateRenderedStyle(u), r = Aie(e, xp), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) { var f = e.isNode(); r = yo(), (t.includeNodes && f || t.includeEdges && !f) && (t.includeOverlays ? ll(r, n.overlayBounds) : ll(r, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!o || t.includeSourceLabels && t.includeTargetLabels) ? ll(r, n.labelBounds.all) : (t.includeMainLabels && ll(r, n.labelBounds.mainRot), t.includeSourceLabels && ll(r, n.labelBounds.sourceRot), t.includeTargetLabels && ll(r, n.labelBounds.targetRot))), r.w = r.x2 - r.x1, r.h = r.y2 - r.y1; } return r; }, xp = { includeNodes: !0, includeEdges: !0, includeLabels: !0, includeMainLabels: !0, includeSourceLabels: !0, includeTargetLabels: !0, includeOverlays: !0, includeUnderlays: !0, includeOutlines: !0, useCache: !0 }, Q5 = X6(xp), e3 = Fr(xp); qs.boundingBox = function(e) { var t; if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (e === void 0 || e.useCache === void 0 || e.useCache === !0)) e === void 0 ? e = xp : e = e3(e), t = J5(this[0], e); else { t = yo(), e = e || xp; var n = e3(e), r = this, o = r.cy(), a = o.styleEnabled(); if (a) for (var i = 0; i < r.length; i++) { var s = r[i], l = s._private, u = Z6(s), c = l.bbCachePosKey === u, d = n.useCache && c && !l.styleDirty; s.recalculateRenderedStyle(d); } this.updateCompoundBounds(!e.useCache); for (var f = 0; f < r.length; f++) { var h = r[f]; ll(t, J5(h, n)); } } return t.x1 = Do(t.x1), t.y1 = Do(t.y1), t.x2 = Do(t.x2), t.y2 = Do(t.y2), t.w = Do(t.x2 - t.x1), t.h = Do(t.y2 - t.y1), t; }; qs.dirtyBoundingBoxCache = function() { for (var e = 0; e < this.length; e++) { var t = this[e]._private; t.bbCache = null, t.bbCachePosKey = null, t.bodyBounds = null, t.overlayBounds = null, t.labelBounds.all = null, t.labelBounds.source = null, t.labelBounds.target = null, t.labelBounds.main = null, t.labelBounds.sourceRot = null, t.labelBounds.targetRot = null, t.labelBounds.mainRot = null, t.arrowBounds.source = null, t.arrowBounds.target = null, t.arrowBounds["mid-source"] = null, t.arrowBounds["mid-target"] = null; } return this.emitAndNotify("bounds"), this; }; qs.boundingBoxAt = function(e) { var t = this.nodes(), n = this.cy(), r = n.hasCompoundNodes(), o = n.collection(); if (r && (o = t.filter(function(u) { return u.isParent(); }), t = t.not(o)), Ht(e)) { var a = e; e = function() { return a; }; } var i = function(u, c) { return u._private.bbAtOldPos = e(u, c); }, s = function(u) { return u._private.bbAtOldPos; }; n.startBatch(), t.forEach(i).silentPositions(e), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(!0)); var l = Xne(this.boundingBox({ useCache: !1 })); return t.silentPositions(s), r && (o.dirtyCompoundBoundsCache(), o.dirtyBoundingBoxCache(), o.updateCompoundBounds(!0)), n.endBatch(), l; }; Gu.boundingbox = Gu.bb = Gu.boundingBox; Gu.renderedBoundingbox = Gu.renderedBoundingBox; var Pie = qs, Ad, ff; Ad = ff = {}; var J6 = function(e) { e.uppercaseName = C5(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = C5(e.outerName), Ad[e.name] = function() { var t = this[0], n = t._private, r = n.cy, o = r._private.styleEnabled; if (t) if (o) { if (t.isParent()) return t.updateCompoundBounds(), n[e.autoName] || 0; var a = t.pstyle(e.name); switch (a.strValue) { case "label": return t.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0; default: return a.pfValue; } } else return 1; }, Ad["outer" + e.uppercaseName] = function() { var t = this[0], n = t._private, r = n.cy, o = r._private.styleEnabled; if (t) if (o) { var a = t[e.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding(); return a + i + s; } else return 1; }, Ad["rendered" + e.uppercaseName] = function() { var t = this[0]; if (t) { var n = t[e.name](); return n * this.cy().zoom(); } }, Ad["rendered" + e.uppercaseOuterName] = function() { var t = this[0]; if (t) { var n = t[e.outerName](); return n * this.cy().zoom(); } }; }; J6({ name: "width" }); J6({ name: "height" }); ff.padding = function() { var e = this[0], t = e._private; return e.isParent() ? (e.updateCompoundBounds(), t.autoPadding !== void 0 ? t.autoPadding : e.pstyle("padding").pfValue) : e.pstyle("padding").pfValue; }; ff.paddedHeight = function() { var e = this[0]; return e.height() + 2 * e.padding(); }; ff.paddedWidth = function() { var e = this[0]; return e.width() + 2 * e.padding(); }; var Lie = ff, Rie = function(e, t) { if (e.isEdge()) return t(e); }, Die = function(e, t) { if (e.isEdge()) { var n = e.cy(); return ug(t(e), n.zoom(), n.pan()); } }, Mie = function(e, t) { if (e.isEdge()) { var n = e.cy(), r = n.pan(), o = n.zoom(); return t(e).map(function(a) { return ug(a, o, r); }); } }, Nie = function(e) { return e.renderer().getControlPoints(e); }, Bie = function(e) { return e.renderer().getSegmentPoints(e); }, zie = function(e) { return e.renderer().getSourceEndpoint(e); }, Vie = function(e) { return e.renderer().getTargetEndpoint(e); }, jie = function(e) { return e.renderer().getEdgeMidpoint(e); }, t3 = { controlPoints: { get: Nie, mult: !0 }, segmentPoints: { get: Bie, mult: !0 }, sourceEndpoint: { get: zie }, targetEndpoint: { get: Vie }, midpoint: { get: jie } }, Hie = function(e) { return "rendered" + e[0].toUpperCase() + e.substr(1); }, Uie = Object.keys(t3).reduce(function(e, t) { var n = t3[t], r = Hie(t); return e[t] = function() { return Rie(this, n.get); }, n.mult ? e[r] = function() { return Mie(this, n.get); } : e[r] = function() { return Die(this, n.get); }, e; }, {}), qie = kt({}, Fie, Pie, Lie, Uie); /*! Event object based on jQuery events, MIT license https://jquery.org/license/ https://tldrlegal.com/license/mit-license https://github.com/jquery/jquery/blob/master/src/event.js */ var Q6 = function(e, t) { this.recycle(e, t); }; function hd() { return !1; } function dh() { return !0; } Q6.prototype = { instanceString: function() { return "event"; }, recycle: function(e, t) { if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = hd, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? dh : hd) : e != null && e.type ? t = e : this.type = e, t != null && (this.originalEvent = t.originalEvent, this.type = t.type != null ? t.type : this.type, this.cy = t.cy, this.target = t.target, this.position = t.position, this.renderedPosition = t.renderedPosition, this.namespace = t.namespace, this.layout = t.layout), this.cy != null && this.position != null && this.renderedPosition == null) { var n = this.position, r = this.cy.zoom(), o = this.cy.pan(); this.renderedPosition = { x: n.x * r + o.x, y: n.y * r + o.y }; } this.timeStamp = e && e.timeStamp || Date.now(); }, preventDefault: function() { this.isDefaultPrevented = dh; var e = this.originalEvent; e && e.preventDefault && e.preventDefault(); }, stopPropagation: function() { this.isPropagationStopped = dh; var e = this.originalEvent; e && e.stopPropagation && e.stopPropagation(); }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = dh, this.stopPropagation(); }, isDefaultPrevented: hd, isPropagationStopped: hd, isImmediatePropagationStopped: hd }; var eT = /^([^.]+)(\.(?:[^.]+))?$/, Wie = ".*", tT = { qualifierCompare: function(e, t) { return e === t; }, eventMatches: function() { return !0; }, addEventFields: function() { }, callbackContext: function(e) { return e; }, beforeEmit: function() { }, afterEmit: function() { }, bubble: function() { return !1; }, parent: function() { return null; }, context: null }, n3 = Object.keys(tT), Gie = {}; function vg() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Gie, t = arguments.length > 1 ? arguments[1] : void 0, n = 0; n < n3.length; n++) { var r = n3[n]; this[r] = e[r] || tT[r]; } this.context = t || this.context, this.listeners = [], this.emitting = 0; } var Ds = vg.prototype, nT = function(e, t, n, r, o, a, i) { An(r) && (o = r, r = null), i && (a == null ? a = i : a = kt({}, a, i)); for (var s = cn(n) ? n : n.split(/\s+/), l = 0; l < s.length; l++) { var u = s[l]; if (!As(u)) { var c = u.match(eT); if (c) { var d = c[1], f = c[2] ? c[2] : null, h = t(e, u, d, f, r, o, a); if (h === !1) break; } } } }, r3 = function(e, t) { return e.addEventFields(e.context, t), new Q6(t.type, t); }, Kie = function(e, t, n) { if (hte(n)) { t(e, n); return; } else if (Ht(n)) { t(e, r3(e, n)); return; } for (var r = cn(n) ? n : n.split(/\s+/), o = 0; o < r.length; o++) { var a = r[o]; if (!As(a)) { var i = a.match(eT); if (i) { var s = i[1], l = i[2] ? i[2] : null, u = r3(e, { type: s, namespace: l, target: e.context }); t(e, u); } } } }; Ds.on = Ds.addListener = function(e, t, n, r, o) { return nT(this, function(a, i, s, l, u, c, d) { An(c) && a.listeners.push({ event: i, // full event string callback: c, // callback to run type: s, // the event type (e.g. 'click') namespace: l, // the event namespace (e.g. ".foo") qualifier: u, // a restriction on whether to match this emitter conf: d // additional configuration }); }, e, t, n, r, o), this; }; Ds.one = function(e, t, n, r) { return this.on(e, t, n, r, { one: !0 }); }; Ds.removeListener = Ds.off = function(e, t, n, r) { var o = this; this.emitting !== 0 && (this.listeners = Cne(this.listeners)); for (var a = this.listeners, i = function(l) { var u = a[l]; nT(o, function(c, d, f, h, p, v) { if ((u.type === f || e === "*") && (!h && u.namespace !== ".*" || u.namespace === h) && (!p || c.qualifierCompare(u.qualifier, p)) && (!v || u.callback === v)) return a.splice(l, 1), !1; }, e, t, n, r); }, s = a.length - 1; s >= 0; s--) i(s); return this; }; Ds.removeAllListeners = function() { return this.removeListener("*"); }; Ds.emit = Ds.trigger = function(e, t, n) { var r = this.listeners, o = r.length; return this.emitting++, cn(t) || (t = [t]), Kie(this, function(a, i) { n != null && (r = [{ event: i.event, type: i.type, namespace: i.namespace, callback: n }], o = r.length); for (var s = function(u) { var c = r[u]; if (c.type === i.type && (!c.namespace || c.namespace === i.namespace || c.namespace === Wie) && a.eventMatches(a.context, c, i)) { var d = [i]; t != null && Ene(d, t), a.beforeEmit(a.context, c, i), c.conf && c.conf.one && (a.listeners = a.listeners.filter(function(p) { return p !== c; })); var f = a.callbackContext(a.context, c, i), h = c.callback.apply(f, d); a.afterEmit(a.context, c, i), h === !1 && (i.stopPropagation(), i.preventDefault()); } }, l = 0; l < o; l++) s(l); a.bubble(a.context) && !i.isPropagationStopped() && a.parent(a.context).emit(i, t); }, e), this.emitting--, this; }; var Yie = { qualifierCompare: function(e, t) { return e == null || t == null ? e == null && t == null : e.sameText(t); }, eventMatches: function(e, t, n) { var r = t.qualifier; return r != null ? e !== n.target && cf(n.target) && r.matches(n.target) : !0; }, addEventFields: function(e, t) { t.cy = e.cy(), t.target = e; }, callbackContext: function(e, t, n) { return t.qualifier != null ? n.target : e; }, beforeEmit: function(e, t) { t.conf && t.conf.once && t.conf.onceCollection.removeListener(t.event, t.qualifier, t.callback); }, bubble: function() { return !0; }, parent: function(e) { return e.isChild() ? e.parent() : e.cy(); } }, ph = function(e) { return ht(e) ? new Ls(e) : e; }, rT = { createEmitter: function() { for (var e = 0; e < this.length; e++) { var t = this[e], n = t._private; n.emitter || (n.emitter = new vg(Yie, t)); } return this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { for (var r = ph(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().on(e, r, n); } return this; }, removeListener: function(e, t, n) { for (var r = ph(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().removeListener(e, r, n); } return this; }, removeAllListeners: function() { for (var e = 0; e < this.length; e++) { var t = this[e]; t.emitter().removeAllListeners(); } return this; }, one: function(e, t, n) { for (var r = ph(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().one(e, r, n); } return this; }, once: function(e, t, n) { for (var r = ph(t), o = 0; o < this.length; o++) { var a = this[o]; a.emitter().on(e, r, n, { once: !0, onceCollection: this }); } }, emit: function(e, t) { for (var n = 0; n < this.length; n++) { var r = this[n]; r.emitter().emit(e, t); } return this; }, emitAndNotify: function(e, t) { if (this.length !== 0) return this.cy().notify(e, this), this.emit(e, t), this; } }; en.eventAliasesOn(rT); var oT = { nodes: function(e) { return this.filter(function(t) { return t.isNode(); }).filter(e); }, edges: function(e) { return this.filter(function(t) { return t.isEdge(); }).filter(e); }, // internal helper to get nodes and edges as separate collections with single iteration over elements byGroup: function() { for (var e = this.spawn(), t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n]; r.isNode() ? e.push(r) : t.push(r); } return { nodes: e, edges: t }; }, filter: function(e, t) { if (e === void 0) return this; if (ht(e) || Eo(e)) return new Ls(e).filter(this); if (An(e)) { for (var n = this.spawn(), r = this, o = 0; o < r.length; o++) { var a = r[o], i = t ? e.apply(t, [a, o, r]) : e(a, o, r); i && n.push(a); } return n; } return this.spawn(); }, not: function(e) { if (e) { ht(e) && (e = this.filter(e)); for (var t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n], o = e.has(r); o || t.push(r); } return t; } else return this; }, absoluteComplement: function() { var e = this.cy(); return e.mutableElements().not(this); }, intersect: function(e) { if (ht(e)) { var t = e; return this.filter(t); } for (var n = this.spawn(), r = this, o = e, a = this.length < e.length, i = a ? r : o, s = a ? o : r, l = 0; l < i.length; l++) { var u = i[l]; s.has(u) && n.push(u); } return n; }, xor: function(e) { var t = this._private.cy; ht(e) && (e = t.$(e)); var n = this.spawn(), r = this, o = e, a = function(i, s) { for (var l = 0; l < i.length; l++) { var u = i[l], c = u._private.data.id, d = s.hasElementWithId(c); d || n.push(u); } }; return a(r, o), a(o, r), n; }, diff: function(e) { var t = this._private.cy; ht(e) && (e = t.$(e)); var n = this.spawn(), r = this.spawn(), o = this.spawn(), a = this, i = e, s = function(l, u, c) { for (var d = 0; d < l.length; d++) { var f = l[d], h = f._private.data.id, p = u.hasElementWithId(h); p ? o.merge(f) : c.push(f); } }; return s(a, i, n), s(i, a, r), { left: n, right: r, both: o }; }, add: function(e) { var t = this._private.cy; if (!e) return this; if (ht(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = this.spawnSelf(), o = 0; o < e.length; o++) { var a = e[o], i = !this.has(a); i && r.push(a); } return r; }, // in place merge on calling collection merge: function(e) { var t = this._private, n = t.cy; if (!e) return this; if (e && ht(e)) { var r = e; e = n.mutableElements().filter(r); } for (var o = t.map, a = 0; a < e.length; a++) { var i = e[a], s = i._private.data.id, l = !o.has(s); if (l) { var u = this.length++; this[u] = i, o.set(s, { ele: i, index: u }); } } return this; }, unmergeAt: function(e) { var t = this[e], n = t.id(), r = this._private, o = r.map; this[e] = void 0, o.delete(n); var a = e === this.length - 1; if (this.length > 1 && !a) { var i = this.length - 1, s = this[i], l = s._private.data.id; this[i] = void 0, this[e] = s, o.set(l, { ele: s, index: e }); } return this.length--, this; }, // remove single ele in place in calling collection unmergeOne: function(e) { e = e[0]; var t = this._private, n = e._private.data.id, r = t.map, o = r.get(n); if (!o) return this; var a = o.index; return this.unmergeAt(a), this; }, // remove eles in place on calling collection unmerge: function(e) { var t = this._private.cy; if (!e) return this; if (e && ht(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = 0; r < e.length; r++) this.unmergeOne(e[r]); return this; }, unmergeBy: function(e) { for (var t = this.length - 1; t >= 0; t--) { var n = this[t]; e(n) && this.unmergeAt(t); } return this; }, map: function(e, t) { for (var n = [], r = this, o = 0; o < r.length; o++) { var a = r[o], i = t ? e.apply(t, [a, o, r]) : e(a, o, r); n.push(i); } return n; }, reduce: function(e, t) { for (var n = t, r = this, o = 0; o < r.length; o++) n = e(n, r[o], o, r); return n; }, max: function(e, t) { for (var n = -1 / 0, r, o = this, a = 0; a < o.length; a++) { var i = o[a], s = t ? e.apply(t, [i, a, o]) : e(i, a, o); s > n && (n = s, r = i); } return { value: n, ele: r }; }, min: function(e, t) { for (var n = 1 / 0, r, o = this, a = 0; a < o.length; a++) { var i = o[a], s = t ? e.apply(t, [i, a, o]) : e(i, a, o); s < n && (n = s, r = i); } return { value: n, ele: r }; } }, Gt = oT; Gt.u = Gt["|"] = Gt["+"] = Gt.union = Gt.or = Gt.add; Gt["\\"] = Gt["!"] = Gt["-"] = Gt.difference = Gt.relativeComplement = Gt.subtract = Gt.not; Gt.n = Gt["&"] = Gt["."] = Gt.and = Gt.intersection = Gt.intersect; Gt["^"] = Gt["(+)"] = Gt["(-)"] = Gt.symmetricDifference = Gt.symdiff = Gt.xor; Gt.fnFilter = Gt.filterFn = Gt.stdFilter = Gt.filter; Gt.complement = Gt.abscomp = Gt.absoluteComplement; var Xie = { isNode: function() { return this.group() === "nodes"; }, isEdge: function() { return this.group() === "edges"; }, isLoop: function() { return this.isEdge() && this.source()[0] === this.target()[0]; }, isSimple: function() { return this.isEdge() && this.source()[0] !== this.target()[0]; }, group: function() { var e = this[0]; if (e) return e._private.group; } }, aT = function(e, t) { var n = e.cy(), r = n.hasCompoundNodes(); function o(u) { var c = u.pstyle("z-compound-depth"); return c.value === "auto" ? r ? u.zDepth() : 0 : c.value === "bottom" ? -1 : c.value === "top" ? L2 : 0; } var a = o(e) - o(t); if (a !== 0) return a; function i(u) { var c = u.pstyle("z-index-compare"); return c.value === "auto" && u.isNode() ? 1 : 0; } var s = i(e) - i(t); if (s !== 0) return s; var l = e.pstyle("z-index").value - t.pstyle("z-index").value; return l !== 0 ? l : e.poolIndex() - t.poolIndex(); }, zv = { forEach: function(e, t) { if (An(e)) for (var n = this.length, r = 0; r < n; r++) { var o = this[r], a = t ? e.apply(t, [o, r, this]) : e(o, r, this); if (a === !1) break; } return this; }, toArray: function() { for (var e = [], t = 0; t < this.length; t++) e.push(this[t]); return e; }, slice: function(e, t) { var n = [], r = this.length; t == null && (t = r), e == null && (e = 0), e < 0 && (e = r + e), t < 0 && (t = r + t); for (var o = e; o >= 0 && o < t && o < r; o++) n.push(this[o]); return this.spawn(n); }, size: function() { return this.length; }, eq: function(e) { return this[e] || this.spawn(); }, first: function() { return this[0] || this.spawn(); }, last: function() { return this[this.length - 1] || this.spawn(); }, empty: function() { return this.length === 0; }, nonempty: function() { return !this.empty(); }, sort: function(e) { if (!An(e)) return this; var t = this.toArray().sort(e); return this.spawn(t); }, sortByZIndex: function() { return this.sort(aT); }, zDepth: function() { var e = this[0]; if (e) { var t = e._private, n = t.group; if (n === "nodes") { var r = t.data.parent ? e.parents().size() : 0; return e.isParent() ? r : L2 - 1; } else { var o = t.source, a = t.target, i = o.zDepth(), s = a.zDepth(); return Math.max(i, s, 0); } } } }; zv.each = zv.forEach; var Zie = function() { var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : or(Symbol)) != e && or(Symbol.iterator) != e; t && (zv[Symbol.iterator] = function() { var n = this, r = { value: void 0, done: !1 }, o = 0, a = this.length; return t6({ next: function() { return o < a ? r.value = n[o++] : (r.value = void 0, r.done = !0), r; } }, Symbol.iterator, function() { return this; }); }); }; Zie(); var Jie = Fr({ nodeDimensionsIncludeLabels: !1 }), Zh = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e) { e = Jie(e); var t; if (!this.takesUpSpace()) t = { w: 0, h: 0 }; else if (e.nodeDimensionsIncludeLabels) { var n = this.boundingBox(); t = { w: n.w, h: n.h }; } else t = { w: this.outerWidth(), h: this.outerHeight() }; return (t.w === 0 || t.h === 0) && (t.w = t.h = 1), t; }, // using standard layout options, apply position function (w/ or w/o animation) layoutPositions: function(e, t, n) { var r = this.nodes().filter(function(x) { return !x.isParent(); }), o = this.cy(), a = t.eles, i = function(x) { return x.id(); }, s = fp(n, i); e.emit({ type: "layoutstart", layout: e }), e.animations = []; var l = function(x, w, k) { var S = { x: w.x1 + w.w / 2, y: w.y1 + w.h / 2 }, _ = { // scale from center of bounding box (not necessarily 0,0) x: (k.x - S.x) * x, y: (k.y - S.y) * x }; return { x: S.x + _.x, y: S.y + _.y }; }, u = t.spacingFactor && t.spacingFactor !== 1, c = function() { if (!u) return null; for (var x = yo(), w = 0; w < r.length; w++) { var k = r[w], S = s(k, w); Qne(x, S.x, S.y); } return x; }, d = c(), f = fp(function(x, w) { var k = s(x, w); if (u) { var S = Math.abs(t.spacingFactor); k = l(S, d, k); } return t.transform != null && (k = t.transform(x, k)), k; }, i); if (t.animate) { for (var h = 0; h < r.length; h++) { var p = r[h], v = f(p, h), m = t.animateFilter == null || t.animateFilter(p, h); if (m) { var g = p.animation({ position: v, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(g); } else p.position(v); } if (t.fit) { var b = o.animation({ fit: { boundingBox: a.boundingBoxAt(f), padding: t.padding }, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(b); } else if (t.zoom !== void 0 && t.pan !== void 0) { var C = o.animation({ zoom: t.zoom, pan: t.pan, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(C); } e.animations.forEach(function(x) { return x.play(); }), e.one("layoutready", t.ready), e.emit({ type: "layoutready", layout: e }), Dc.all(e.animations.map(function(x) { return x.promise(); })).then(function() { e.one("layoutstop", t.stop), e.emit({ type: "layoutstop", layout: e }); }); } else r.positions(f), t.fit && o.fit(t.eles, t.padding), t.zoom != null && o.zoom(t.zoom), t.pan && o.pan(t.pan), e.one("layoutready", t.ready), e.emit({ type: "layoutready", layout: e }), e.one("layoutstop", t.stop), e.emit({ type: "layoutstop", layout: e }); return this; }, layout: function(e) { var t = this.cy(); return t.makeLayout(kt({}, e, { eles: this })); } }; Zh.createLayout = Zh.makeLayout = Zh.layout; function iT(e, t, n) { var r = n._private, o = r.styleCache = r.styleCache || [], a; return (a = o[e]) != null || (a = o[e] = t(n)), a; } function gg(e, t) { return e = Ml(e), function(n) { return iT(e, t, n); }; } function mg(e, t) { e = Ml(e); var n = function(r) { return t.call(r); }; return function() { var r = this[0]; if (r) return iT(e, n, r); }; } var Sr = { recalculateRenderedStyle: function(e) { var t = this.cy(), n = t.renderer(), r = t.styleEnabled(); return n && r && n.recalculateRenderedStyle(this, e), this; }, dirtyStyleCache: function() { var e = this.cy(), t = function(r) { return r._private.styleCache = null; }; if (e.hasCompoundNodes()) { var n; n = this.spawnSelf().merge(this.descendants()).merge(this.parents()), n.merge(n.connectedEdges()), n.forEach(t); } else this.forEach(function(r) { t(r), r.connectedEdges().forEach(t); }); return this; }, // fully updates (recalculates) the style for the elements updateStyle: function(e) { var t = this._private.cy; if (!t.styleEnabled()) return this; if (t.batching()) { var n = t._private.batchStyleEles; return n.merge(this), this; } var r = t.hasCompoundNodes(), o = this; e = !!(e || e === void 0), r && (o = this.spawnSelf().merge(this.descendants()).merge(this.parents())); var a = o; return e ? a.emitAndNotify("style") : a.emit("style"), o.forEach(function(i) { return i._private.styleDirty = !0; }), this; }, // private: clears dirty flag and recalculates style cleanStyle: function() { var e = this.cy(); if (e.styleEnabled()) for (var t = 0; t < this.length; t++) { var n = this[t]; n._private.styleDirty && (n._private.styleDirty = !1, e.style().apply(n)); } }, // get the internal parsed style object for the specified property parsedStyle: function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this[0], r = n.cy(); if (r.styleEnabled() && n) { this.cleanStyle(); var o = n._private.style[e]; return o ?? (t ? r.style().getDefaultProperty(e) : null); } }, numericStyle: function(e) { var t = this[0]; if (t.cy().styleEnabled() && t) { var n = t.pstyle(e); return n.pfValue !== void 0 ? n.pfValue : n.value; } }, numericStyleUnits: function(e) { var t = this[0]; if (t.cy().styleEnabled() && t) return t.pstyle(e).units; }, // get the specified css property as a rendered value (i.e. on-screen value) // or get the whole rendered style if no property specified (NB doesn't allow setting) renderedStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = this[0]; if (n) return t.style().getRenderedStyle(n, e); }, // read the calculated css style of the element or override the style (via a bypass) style: function(e, t) { var n = this.cy(); if (!n.styleEnabled()) return this; var r = !1, o = n.style(); if (Ht(e)) { var a = e; o.applyBypass(this, a, r), this.emitAndNotify("style"); } else if (ht(e)) if (t === void 0) { var i = this[0]; return i ? o.getStylePropertyValue(i, e) : void 0; } else o.applyBypass(this, e, t, r), this.emitAndNotify("style"); else if (e === void 0) { var s = this[0]; return s ? o.getRawStyle(s) : void 0; } return this; }, removeStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = !1, r = t.style(), o = this; if (e === void 0) for (var a = 0; a < o.length; a++) { var i = o[a]; r.removeAllBypasses(i, n); } else { e = e.split(/\s+/); for (var s = 0; s < o.length; s++) { var l = o[s]; r.removeBypasses(l, e, n); } } return this.emitAndNotify("style"), this; }, show: function() { return this.css("display", "element"), this; }, hide: function() { return this.css("display", "none"), this; }, effectiveOpacity: function() { var e = this.cy(); if (!e.styleEnabled()) return 1; var t = e.hasCompoundNodes(), n = this[0]; if (n) { var r = n._private, o = n.pstyle("opacity").value; if (!t) return o; var a = r.data.parent ? n.parents() : null; if (a) for (var i = 0; i < a.length; i++) { var s = a[i], l = s.pstyle("opacity").value; o = l * o; } return o; } }, transparent: function() { var e = this.cy(); if (!e.styleEnabled()) return !1; var t = this[0], n = t.cy().hasCompoundNodes(); if (t) return n ? t.effectiveOpacity() === 0 : t.pstyle("opacity").value === 0; }, backgrounding: function() { var e = this.cy(); if (!e.styleEnabled()) return !1; var t = this[0]; return !!t._private.backgrounding; } }; function Xm(e, t) { var n = e._private, r = n.data.parent ? e.parents() : null; if (r) for (var o = 0; o < r.length; o++) { var a = r[o]; if (!t(a)) return !1; } return !0; } function W2(e) { var t = e.ok, n = e.edgeOkViaNode || e.ok, r = e.parentOk || e.ok; return function() { var o = this.cy(); if (!o.styleEnabled()) return !0; var a = this[0], i = o.hasCompoundNodes(); if (a) { var s = a._private; if (!t(a)) return !1; if (a.isNode()) return !i || Xm(a, r); var l = s.source, u = s.target; return n(l) && (!i || Xm(l, n)) && (l === u || n(u) && (!i || Xm(u, n))); } }; } var zc = gg("eleTakesUpSpace", function(e) { return e.pstyle("display").value === "element" && e.width() !== 0 && (e.isNode() ? e.height() !== 0 : !0); }); Sr.takesUpSpace = mg("takesUpSpace", W2({ ok: zc })); var Qie = gg("eleInteractive", function(e) { return e.pstyle("events").value === "yes" && e.pstyle("visibility").value === "visible" && zc(e); }), ese = gg("parentInteractive", function(e) { return e.pstyle("visibility").value === "visible" && zc(e); }); Sr.interactive = mg("interactive", W2({ ok: Qie, parentOk: ese, edgeOkViaNode: zc })); Sr.noninteractive = function() { var e = this[0]; if (e) return !e.interactive(); }; var tse = gg("eleVisible", function(e) { return e.pstyle("visibility").value === "visible" && e.pstyle("opacity").pfValue !== 0 && zc(e); }), nse = zc; Sr.visible = mg("visible", W2({ ok: tse, edgeOkViaNode: nse })); Sr.hidden = function() { var e = this[0]; if (e) return !e.visible(); }; Sr.isBundledBezier = mg("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; }); Sr.bypass = Sr.css = Sr.style; Sr.renderedCss = Sr.renderedStyle; Sr.removeBypass = Sr.removeCss = Sr.removeStyle; Sr.pstyle = Sr.parsedStyle; var _s = {}; function o3(e) { return function() { var t = arguments, n = []; if (t.length === 2) { var r = t[0], o = t[1]; this.on(e.event, r, o); } else if (t.length === 1 && An(t[0])) { var a = t[0]; this.on(e.event, a); } else if (t.length === 0 || t.length === 1 && cn(t[0])) { for (var i = t.length === 1 ? t[0] : null, s = 0; s < this.length; s++) { var l = this[s], u = !e.ableField || l._private[e.ableField], c = l._private[e.field] != e.value; if (e.overrideAble) { var d = e.overrideAble(l); if (d !== void 0 && (u = d, !d)) return this; } u && (l._private[e.field] = e.value, c && n.push(l)); } var f = this.spawn(n); f.updateStyle(), f.emit(e.event), i && f.emit(i); } return this; }; } function Vc(e) { _s[e.field] = function() { var t = this[0]; if (t) { if (e.overrideField) { var n = e.overrideField(t); if (n !== void 0) return n; } return t._private[e.field]; } }, _s[e.on] = o3({ event: e.on, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !0 }), _s[e.off] = o3({ event: e.off, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !1 }); } Vc({ field: "locked", overrideField: function(e) { return e.cy().autolock() ? !0 : void 0; }, on: "lock", off: "unlock" }); Vc({ field: "grabbable", overrideField: function(e) { return e.cy().autoungrabify() || e.pannable() ? !1 : void 0; }, on: "grabify", off: "ungrabify" }); Vc({ field: "selected", ableField: "selectable", overrideAble: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "select", off: "unselect" }); Vc({ field: "selectable", overrideField: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "selectify", off: "unselectify" }); _s.deselect = _s.unselect; _s.grabbed = function() { var e = this[0]; if (e) return e._private.grabbed; }; Vc({ field: "active", on: "activate", off: "unactivate" }); Vc({ field: "pannable", on: "panify", off: "unpanify" }); _s.inactive = function() { var e = this[0]; if (e) return !e._private.active; }; var Br = {}, a3 = function(e) { return function(t) { for (var n = this, r = [], o = 0; o < n.length; o++) { var a = n[o]; if (a.isNode()) { for (var i = !1, s = a.connectedEdges(), l = 0; l < s.length; l++) { var u = s[l], c = u.source(), d = u.target(); if (e.noIncomingEdges && d === a && c !== a || e.noOutgoingEdges && c === a && d !== a) { i = !0; break; } } i || r.push(a); } } return this.spawn(r, !0).filter(t); }; }, i3 = function(e) { return function(t) { for (var n = this, r = [], o = 0; o < n.length; o++) { var a = n[o]; if (a.isNode()) for (var i = a.connectedEdges(), s = 0; s < i.length; s++) { var l = i[s], u = l.source(), c = l.target(); e.outgoing && u === a ? (r.push(l), r.push(c)) : e.incoming && c === a && (r.push(l), r.push(u)); } } return this.spawn(r, !0).filter(t); }; }, s3 = function(e) { return function(t) { for (var n = this, r = [], o = {}; ; ) { var a = e.outgoing ? n.outgoers() : n.incomers(); if (a.length === 0) break; for (var i = !1, s = 0; s < a.length; s++) { var l = a[s], u = l.id(); o[u] || (o[u] = !0, r.push(l), i = !0); } if (!i) break; n = a; } return this.spawn(r, !0).filter(t); }; }; Br.clearTraversalCache = function() { for (var e = 0; e < this.length; e++) this[e]._private.traversalCache = null; }; kt(Br, { // get the root nodes in the DAG roots: a3({ noIncomingEdges: !0 }), // get the leaf nodes in the DAG leaves: a3({ noOutgoingEdges: !0 }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: zo(i3({ outgoing: !0 }), "outgoers"), // aka DAG descendants successors: s3({ outgoing: !0 }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: zo(i3({ incoming: !0 }), "incomers"), // aka DAG ancestors predecessors: s3({ incoming: !0 }) }); kt(Br, { neighborhood: zo(function(e) { for (var t = [], n = this.nodes(), r = 0; r < n.length; r++) for (var o = n[r], a = o.connectedEdges(), i = 0; i < a.length; i++) { var s = a[i], l = s.source(), u = s.target(), c = o === l ? u : l; c.length > 0 && t.push(c[0]), t.push(s[0]); } return this.spawn(t, !0).filter(e); }, "neighborhood"), closedNeighborhood: function(e) { return this.neighborhood().add(this).filter(e); }, openNeighborhood: function(e) { return this.neighborhood(e); } }); Br.neighbourhood = Br.neighborhood; Br.closedNeighbourhood = Br.closedNeighborhood; Br.openNeighbourhood = Br.openNeighborhood; kt(Br, { source: zo(function(e) { var t = this[0], n; return t && (n = t._private.source || t.cy().collection()), n && e ? n.filter(e) : n; }, "source"), target: zo(function(e) { var t = this[0], n; return t && (n = t._private.target || t.cy().collection()), n && e ? n.filter(e) : n; }, "target"), sources: l3({ attr: "source" }), targets: l3({ attr: "target" }) }); function l3(e) { return function(t) { for (var n = [], r = 0; r < this.length; r++) { var o = this[r], a = o._private[e.attr]; a && n.push(a); } return this.spawn(n, !0).filter(t); }; } kt(Br, { edgesWith: zo(u3(), "edgesWith"), edgesTo: zo(u3({ thisIsSrc: !0 }), "edgesTo") }); function u3(e) { return function(t) { var n = [], r = this._private.cy, o = e || {}; ht(t) && (t = r.$(t)); for (var a = 0; a < t.length; a++) for (var i = t[a]._private.edges, s = 0; s < i.length; s++) { var l = i[s], u = l._private.data, c = this.hasElementWithId(u.source) && t.hasElementWithId(u.target), d = t.hasElementWithId(u.source) && this.hasElementWithId(u.target), f = c || d; f && ((o.thisIsSrc || o.thisIsTgt) && (o.thisIsSrc && !c || o.thisIsTgt && !d) || n.push(l)); } return this.spawn(n, !0); }; } kt(Br, { connectedEdges: zo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var o = n[r]; if (o.isNode()) for (var a = o._private.edges, i = 0; i < a.length; i++) { var s = a[i]; t.push(s); } } return this.spawn(t, !0).filter(e); }, "connectedEdges"), connectedNodes: zo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var o = n[r]; o.isEdge() && (t.push(o.source()[0]), t.push(o.target()[0])); } return this.spawn(t, !0).filter(e); }, "connectedNodes"), parallelEdges: zo(c3(), "parallelEdges"), codirectedEdges: zo(c3({ codirected: !0 }), "codirectedEdges") }); function c3(e) { var t = { codirected: !1 }; return e = kt({}, t, e), function(n) { for (var r = [], o = this.edges(), a = e, i = 0; i < o.length; i++) for (var s = o[i], l = s._private, u = l.source, c = u._private.data.id, d = l.data.target, f = u._private.edges, h = 0; h < f.length; h++) { var p = f[h], v = p._private.data, m = v.target, g = v.source, b = m === d && g === c, C = c === m && d === g; (a.codirected && b || !a.codirected && (b || C)) && r.push(p); } return this.spawn(r, !0).filter(n); }; } kt(Br, { components: function(e) { var t = this, n = t.cy(), r = n.collection(), o = e == null ? t.nodes() : e.nodes(), a = []; e != null && o.empty() && (o = e.sources()); var i = function(l, u) { r.merge(l), o.unmerge(l), u.merge(l); }; if (o.empty()) return t.spawn(); var s = function() { var l = n.collection(); a.push(l); var u = o[0]; i(u, l), t.bfs({ directed: !1, roots: u, visit: function(c) { return i(c, l); } }), l.forEach(function(c) { c.connectedEdges().forEach(function(d) { t.has(d) && l.has(d.source()) && l.has(d.target()) && l.merge(d); }); }); }; do s(); while (o.length > 0); return a; }, component: function() { var e = this[0]; return e.cy().mutableElements().components(e)[0]; } }); Br.componentsOf = Br.components; var Er = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1; if (e === void 0) { Nn("A collection must have a reference to the core"); return; } var o = new Ba(), a = !1; if (!t) t = []; else if (t.length > 0 && Ht(t[0]) && !cf(t[0])) { a = !0; for (var i = [], s = new Rc(), l = 0, u = t.length; l < u; l++) { var c = t[l]; c.data == null && (c.data = {}); var d = c.data; if (d.id == null) d.id = b6(); else if (e.hasElementWithId(d.id) || s.has(d.id)) continue; var f = new lg(e, c, !1); i.push(f), s.add(d.id); } t = i; } this.length = 0; for (var h = 0, p = t.length; h < p; h++) { var v = t[h][0]; if (v != null) { var m = v._private.data.id; (!n || !o.has(m)) && (n && o.set(m, { index: this.length, ele: v }), this[this.length] = v, this.length++); } } this._private = { eles: this, cy: e, get map() { return this.lazyMap == null && this.rebuildMap(), this.lazyMap; }, set map(g) { this.lazyMap = g; }, rebuildMap: function() { for (var g = this.lazyMap = new Ba(), b = this.eles, C = 0; C < b.length; C++) { var x = b[C]; g.set(x.id(), { index: C, ele: x }); } } }, n && (this._private.map = o), a && !r && this.restore(); }, bn = lg.prototype = Er.prototype = Object.create(Array.prototype); bn.instanceString = function() { return "collection"; }; bn.spawn = function(e, t) { return new Er(this.cy(), e, t); }; bn.spawnSelf = function() { return this.spawn(this); }; bn.cy = function() { return this._private.cy; }; bn.renderer = function() { return this._private.cy.renderer(); }; bn.element = function() { return this[0]; }; bn.collection = function() { return a6(this) ? this : new Er(this._private.cy, [this]); }; bn.unique = function() { return new Er(this._private.cy, this, !0); }; bn.hasElementWithId = function(e) { return e = "" + e, this._private.map.has(e); }; bn.getElementById = function(e) { e = "" + e; var t = this._private.cy, n = this._private.map.get(e); return n ? n.ele : new Er(t); }; bn.$id = bn.getElementById; bn.poolIndex = function() { var e = this._private.cy, t = e._private.elements, n = this[0]._private.data.id; return t._private.map.get(n).index; }; bn.indexOf = function(e) { var t = e[0]._private.data.id; return this._private.map.get(t).index; }; bn.indexOfId = function(e) { return e = "" + e, this._private.map.get(e).index; }; bn.json = function(e) { var t = this.element(), n = this.cy(); if (t == null && e) return this; if (t != null) { var r = t._private; if (Ht(e)) { if (n.startBatch(), e.data) { t.data(e.data); var o = r.data; if (t.isEdge()) { var a = !1, i = {}, s = e.data.source, l = e.data.target; s != null && s != o.source && (i.source = "" + s, a = !0), l != null && l != o.target && (i.target = "" + l, a = !0), a && (t = t.move(i)); } else { var u = "parent" in e.data, c = e.data.parent; u && (c != null || o.parent != null) && c != o.parent && (c === void 0 && (c = null), c != null && (c = "" + c), t = t.move({ parent: c })); } } e.position && t.position(e.position); var d = function(p, v, m) { var g = e[p]; g != null && g !== r[p] && (g ? t[v]() : t[m]()); }; return d("removed", "remove", "restore"), d("selected", "select", "unselect"), d("selectable", "selectify", "unselectify"), d("locked", "lock", "unlock"), d("grabbable", "grabify", "ungrabify"), d("pannable", "panify", "unpanify"), e.classes != null && t.classes(e.classes), n.endBatch(), this; } else if (e === void 0) { var f = { data: Na(r.data), position: Na(r.position), group: r.group, removed: r.removed, selected: r.selected, selectable: r.selectable, locked: r.locked, grabbable: r.grabbable, pannable: r.pannable, classes: null }; f.classes = ""; var h = 0; return r.classes.forEach(function(p) { return f.classes += h++ === 0 ? p : " " + p; }), f; } } }; bn.jsons = function() { for (var e = [], t = 0; t < this.length; t++) { var n = this[t], r = n.json(); e.push(r); } return e; }; bn.clone = function() { for (var e = this.cy(), t = [], n = 0; n < this.length; n++) { var r = this[n], o = r.json(), a = new lg(e, o, !1); t.push(a); } return new Er(e, t); }; bn.copy = bn.clone; bn.restore = function() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this, r = n.cy(), o = r._private, a = [], i = [], s, l = 0, u = n.length; l < u; l++) { var c = n[l]; t && !c.removed() || (c.isNode() ? a.push(c) : i.push(c)); } s = a.concat(i); var d, f = function() { s.splice(d, 1), d--; }; for (d = 0; d < s.length; d++) { var h = s[d], p = h._private, v = p.data; if (h.clearTraversalCache(), !(!t && !p.removed)) { if (v.id === void 0) v.id = b6(); else if (Ke(v.id)) v.id = "" + v.id; else if (As(v.id) || !ht(v.id)) { Nn("Can not create element with invalid string ID `" + v.id + "`"), f(); continue; } else if (r.hasElementWithId(v.id)) { Nn("Can not create second element with ID `" + v.id + "`"), f(); continue; } } var m = v.id; if (h.isNode()) { var g = p.position; g.x == null && (g.x = 0), g.y == null && (g.y = 0); } if (h.isEdge()) { for (var b = h, C = ["source", "target"], x = C.length, w = !1, k = 0; k < x; k++) { var S = C[k], _ = v[S]; Ke(_) && (_ = v[S] = "" + v[S]), _ == null || _ === "" ? (Nn("Can not create edge `" + m + "` with unspecified " + S), w = !0) : r.hasElementWithId(_) || (Nn("Can not create edge `" + m + "` with nonexistant " + S + " `" + _ + "`"), w = !0); } if (w) { f(); continue; } var O = r.getElementById(v.source), F = r.getElementById(v.target); O.same(F) ? O._private.edges.push(b) : (O._private.edges.push(b), F._private.edges.push(b)), b._private.source = O, b._private.target = F; } p.map = new Ba(), p.map.set(m, { ele: h, index: 0 }), p.removed = !1, t && r.addToPool(h); } for (var I = 0; I < a.length; I++) { var P = a[I], M = P._private.data; Ke(M.parent) && (M.parent = "" + M.parent); var N = M.parent, j = N != null; if (j || P._private.parent) { var A = P._private.parent ? r.collection().merge(P._private.parent) : r.getElementById(N); if (A.empty()) M.parent = void 0; else if (A[0].removed()) tn("Node added with missing parent, reference to parent removed"), M.parent = void 0, P._private.parent = null; else { for (var U = !1, q = A; !q.empty(); ) { if (P.same(q)) { U = !0, M.parent = void 0; break; } q = q.parent(); } U || (A[0]._private.children.push(P), P._private.parent = A[0], o.hasCompoundNodes = !0); } } } if (s.length > 0) { for (var Y = s.length === n.length ? n : new Er(r, s), ie = 0; ie < Y.length; ie++) { var re = Y[ie]; re.isNode() || (re.parallelEdges().clearTraversalCache(), re.source().clearTraversalCache(), re.target().clearTraversalCache()); } var le; o.hasCompoundNodes ? le = r.collection().merge(Y).merge(Y.connectedNodes()).merge(Y.parent()) : le = Y, le.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e), e ? Y.emitAndNotify("add") : t && Y.emit("add"); } return n; }; bn.removed = function() { var e = this[0]; return e && e._private.removed; }; bn.inside = function() { var e = this[0]; return e && !e._private.removed; }; bn.remove = function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = this, r = [], o = {}, a = n._private.cy; function i(N) { for (var j = N._private.edges, A = 0; A < j.length; A++) l(j[A]); } function s(N) { for (var j = N._private.children, A = 0; A < j.length; A++) l(j[A]); } function l(N) { var j = o[N.id()]; t && N.removed() || j || (o[N.id()] = !0, N.isNode() ? (r.push(N), i(N), s(N)) : r.unshift(N)); } for (var u = 0, c = n.length; u < c; u++) { var d = n[u]; l(d); } function f(N, j) { var A = N._private.edges; Ps(A, j), N.clearTraversalCache(); } function h(N) { N.clearTraversalCache(); } var p = []; p.ids = {}; function v(N, j) { j = j[0], N = N[0]; var A = N._private.children, U = N.id(); Ps(A, j), j._private.parent = null, p.ids[U] || (p.ids[U] = !0, p.push(N)); } n.dirtyCompoundBoundsCache(), t && a.removeFromPool(r); for (var m = 0; m < r.length; m++) { var g = r[m]; if (g.isEdge()) { var b = g.source()[0], C = g.target()[0]; f(b, g), f(C, g); for (var x = g.parallelEdges(), w = 0; w < x.length; w++) { var k = x[w]; h(k), k.isBundledBezier() && k.dirtyBoundingBoxCache(); } } else { var S = g.parent(); S.length !== 0 && v(S, g); } t && (g._private.removed = !0); } var _ = a._private.elements; a._private.hasCompoundNodes = !1; for (var O = 0; O < _.length; O++) { var F = _[O]; if (F.isParent()) { a._private.hasCompoundNodes = !0; break; } } var I = new Er(this.cy(), r); I.size() > 0 && (e ? I.emitAndNotify("remove") : t && I.emit("remove")); for (var P = 0; P < p.length; P++) { var M = p[P]; (!t || !M.removed()) && M.updateStyle(); } return I; }; bn.move = function(e) { var t = this._private.cy, n = this, r = !1, o = !1, a = function(h) { return h == null ? h : "" + h; }; if (e.source !== void 0 || e.target !== void 0) { var i = a(e.source), s = a(e.target), l = i != null && t.hasElementWithId(i), u = s != null && t.hasElementWithId(s); (l || u) && (t.batch(function() { n.remove(r, o), n.emitAndNotify("moveout"); for (var h = 0; h < n.length; h++) { var p = n[h], v = p._private.data; p.isEdge() && (l && (v.source = i), u && (v.target = s)); } n.restore(r, o); }), n.emitAndNotify("move")); } else if (e.parent !== void 0) { var c = a(e.parent), d = c === null || t.hasElementWithId(c); if (d) { var f = c === null ? void 0 : c; t.batch(function() { var h = n.remove(r, o); h.emitAndNotify("moveout"); for (var p = 0; p < n.length; p++) { var v = n[p], m = v._private.data; v.isNode() && (m.parent = f); } h.restore(r, o); }), n.emitAndNotify("move"); } } return this; }; [A6, fie, Xh, $s, hc, Oie, hg, qie, rT, oT, Xie, zv, Zh, Sr, _s, Br].forEach(function(e) { kt(bn, e); }); var rse = { add: function(e) { var t, n = this; if (Eo(e)) { var r = e; if (r._private.cy === n) t = r.restore(); else { for (var o = [], a = 0; a < r.length; a++) { var i = r[a]; o.push(i.json()); } t = new Er(n, o); } } else if (cn(e)) { var s = e; t = new Er(n, s); } else if (Ht(e) && (cn(e.nodes) || cn(e.edges))) { for (var l = e, u = [], c = ["nodes", "edges"], d = 0, f = c.length; d < f; d++) { var h = c[d], p = l[h]; if (cn(p)) for (var v = 0, m = p.length; v < m; v++) { var g = kt({ group: h }, p[v]); u.push(g); } } t = new Er(n, u); } else { var b = e; t = new lg(n, b).collection(); } return t; }, remove: function(e) { if (!Eo(e) && ht(e)) { var t = e; e = this.$(t); } return e.remove(); } }; /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ function ose(e, t, n, r) { var o = 4, a = 1e-3, i = 1e-7, s = 10, l = 11, u = 1 / (l - 1), c = typeof Float32Array < "u"; if (arguments.length !== 4) return !1; for (var d = 0; d < 4; ++d) if (typeof arguments[d] != "number" || isNaN(arguments[d]) || !isFinite(arguments[d])) return !1; e = Math.min(e, 1), n = Math.min(n, 1), e = Math.max(e, 0), n = Math.max(n, 0); var f = c ? new Float32Array(l) : new Array(l); function h(F, I) { return 1 - 3 * I + 3 * F; } function p(F, I) { return 3 * I - 6 * F; } function v(F) { return 3 * F; } function m(F, I, P) { return ((h(I, P) * F + p(I, P)) * F + v(I)) * F; } function g(F, I, P) { return 3 * h(I, P) * F * F + 2 * p(I, P) * F + v(I); } function b(F, I) { for (var P = 0; P < o; ++P) { var M = g(I, e, n); if (M === 0) return I; var N = m(I, e, n) - F; I -= N / M; } return I; } function C() { for (var F = 0; F < l; ++F) f[F] = m(F * u, e, n); } function x(F, I, P) { var M, N, j = 0; do N = I + (P - I) / 2, M = m(N, e, n) - F, M > 0 ? P = N : I = N; while (Math.abs(M) > i && ++j < s); return N; } function w(F) { for (var I = 0, P = 1, M = l - 1; P !== M && f[P] <= F; ++P) I += u; --P; var N = (F - f[P]) / (f[P + 1] - f[P]), j = I + N * u, A = g(j, e, n); return A >= a ? b(F, j) : A === 0 ? j : x(F, I, I + u); } var k = !1; function S() { k = !0, (e !== t || n !== r) && C(); } var _ = function(F) { return k || S(), e === t && n === r ? F : F === 0 ? 0 : F === 1 ? 1 : m(w(F), t, r); }; _.getControlPoints = function() { return [{ x: e, y: t }, { x: n, y: r }]; }; var O = "generateBezier(" + [e, t, n, r] + ")"; return _.toString = function() { return O; }, _; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ var ase = /* @__PURE__ */ function() { function e(r) { return -r.tension * r.x - r.friction * r.v; } function t(r, o, a) { var i = { x: r.x + a.dx * o, v: r.v + a.dv * o, tension: r.tension, friction: r.friction }; return { dx: i.v, dv: e(i) }; } function n(r, o) { var a = { dx: r.v, dv: e(r) }, i = t(r, o * 0.5, a), s = t(r, o * 0.5, i), l = t(r, o, s), u = 1 / 6 * (a.dx + 2 * (i.dx + s.dx) + l.dx), c = 1 / 6 * (a.dv + 2 * (i.dv + s.dv) + l.dv); return r.x = r.x + u * o, r.v = r.v + c * o, r; } return function r(o, a, i) { var s = { x: -1, v: 0, tension: null, friction: null }, l = [0], u = 0, c = 1 / 1e4, d = 16 / 1e3, f, h, p; for (o = parseFloat(o) || 500, a = parseFloat(a) || 20, i = i || null, s.tension = o, s.friction = a, f = i !== null, f ? (u = r(o, a), h = u / i * d) : h = d; p = n(p || s, h), l.push(1 + p.x), u += 16, Math.abs(p.x) > c && Math.abs(p.v) > c; ) ; return f ? function(v) { return l[v * (l.length - 1) | 0]; } : u; }; }(), gn = function(e, t, n, r) { var o = ose(e, t, n, r); return function(a, i, s) { return a + (i - a) * o(s); }; }, Jh = { linear: function(e, t, n) { return e + (t - e) * n; }, // default easings ease: gn(0.25, 0.1, 0.25, 1), "ease-in": gn(0.42, 0, 1, 1), "ease-out": gn(0, 0, 0.58, 1), "ease-in-out": gn(0.42, 0, 0.58, 1), // sine "ease-in-sine": gn(0.47, 0, 0.745, 0.715), "ease-out-sine": gn(0.39, 0.575, 0.565, 1), "ease-in-out-sine": gn(0.445, 0.05, 0.55, 0.95), // quad "ease-in-quad": gn(0.55, 0.085, 0.68, 0.53), "ease-out-quad": gn(0.25, 0.46, 0.45, 0.94), "ease-in-out-quad": gn(0.455, 0.03, 0.515, 0.955), // cubic "ease-in-cubic": gn(0.55, 0.055, 0.675, 0.19), "ease-out-cubic": gn(0.215, 0.61, 0.355, 1), "ease-in-out-cubic": gn(0.645, 0.045, 0.355, 1), // quart "ease-in-quart": gn(0.895, 0.03, 0.685, 0.22), "ease-out-quart": gn(0.165, 0.84, 0.44, 1), "ease-in-out-quart": gn(0.77, 0, 0.175, 1), // quint "ease-in-quint": gn(0.755, 0.05, 0.855, 0.06), "ease-out-quint": gn(0.23, 1, 0.32, 1), "ease-in-out-quint": gn(0.86, 0, 0.07, 1), // expo "ease-in-expo": gn(0.95, 0.05, 0.795, 0.035), "ease-out-expo": gn(0.19, 1, 0.22, 1), "ease-in-out-expo": gn(1, 0, 0, 1), // circ "ease-in-circ": gn(0.6, 0.04, 0.98, 0.335), "ease-out-circ": gn(0.075, 0.82, 0.165, 1), "ease-in-out-circ": gn(0.785, 0.135, 0.15, 0.86), // user param easings... spring: function(e, t, n) { if (n === 0) return Jh.linear; var r = ase(e, t, n); return function(o, a, i) { return o + (a - o) * r(i); }; }, "cubic-bezier": gn }; function d3(e, t, n, r, o) { if (r === 1 || t === n) return n; var a = o(t, n, r); return e == null || ((e.roundValue || e.color) && (a = Math.round(a)), e.min !== void 0 && (a = Math.max(a, e.min)), e.max !== void 0 && (a = Math.min(a, e.max))), a; } function p3(e, t) { return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e; } function Eu(e, t, n, r, o) { var a = o != null ? o.type : null; n < 0 ? n = 0 : n > 1 && (n = 1); var i = p3(e, o), s = p3(t, o); if (Ke(i) && Ke(s)) return d3(a, i, s, n, r); if (cn(i) && cn(s)) { for (var l = [], u = 0; u < s.length; u++) { var c = i[u], d = s[u]; if (c != null && d != null) { var f = d3(a, c, d, n, r); l.push(f); } else l.push(d); } return l; } } function ise(e, t, n, r) { var o = !r, a = e._private, i = t._private, s = i.easing, l = i.startTime, u = r ? e : e.cy(), c = u.style(); if (!i.easingImpl) if (s == null) i.easingImpl = Jh.linear; else { var d; if (ht(s)) { var f = c.parse("transition-timing-function", s); d = f.value; } else d = s; var h, p; ht(d) ? (h = d, p = []) : (h = d[1], p = d.slice(2).map(function(Y) { return +Y; })), p.length > 0 ? (h === "spring" && p.push(i.duration), i.easingImpl = Jh[h].apply(null, p)) : i.easingImpl = Jh[h]; } var v = i.easingImpl, m; if (i.duration === 0 ? m = 1 : m = (n - l) / i.duration, i.applying && (m = i.progress), m < 0 ? m = 0 : m > 1 && (m = 1), i.delay == null) { var g = i.startPosition, b = i.position; if (b && o && !e.locked()) { var C = {}; vd(g.x, b.x) && (C.x = Eu(g.x, b.x, m, v)), vd(g.y, b.y) && (C.y = Eu(g.y, b.y, m, v)), e.position(C); } var x = i.startPan, w = i.pan, k = a.pan, S = w != null && r; S && (vd(x.x, w.x) && (k.x = Eu(x.x, w.x, m, v)), vd(x.y, w.y) && (k.y = Eu(x.y, w.y, m, v)), e.emit("pan")); var _ = i.startZoom, O = i.zoom, F = O != null && r; F && (vd(_, O) && (a.zoom = mp(a.minZoom, Eu(_, O, m, v), a.maxZoom)), e.emit("zoom")), (S || F) && e.emit("viewport"); var I = i.style; if (I && I.length > 0 && o) { for (var P = 0; P < I.length; P++) { var M = I[P], N = M.name, j = M, A = i.startStyle[N], U = c.properties[A.name], q = Eu(A, j, m, v, U); c.overrideBypass(e, N, q); } e.emit("style"); } } return i.progress = m, m; } function vd(e, t) { return e == null || t == null ? !1 : Ke(e) && Ke(t) ? !0 : !!(e && t); } function sse(e, t, n, r) { var o = t._private; o.started = !0, o.startTime = n - o.progress * o.duration; } function f3(e, t) { var n = t._private.aniEles, r = []; function o(c, d) { var f = c._private, h = f.animation.current, p = f.animation.queue, v = !1; if (h.length === 0) { var m = p.shift(); m && h.push(m); } for (var g = function(w) { for (var k = w.length - 1; k >= 0; k--) { var S = w[k]; S(); } w.splice(0, w.length); }, b = h.length - 1; b >= 0; b--) { var C = h[b], x = C._private; if (x.stopped) { h.splice(b, 1), x.hooked = !1, x.playing = !1, x.started = !1, g(x.frames); continue; } !x.playing && !x.applying || (x.playing && x.applying && (x.applying = !1), x.started || sse(c, C, e), ise(c, C, e, d), x.applying && (x.applying = !1), g(x.frames), x.step != null && x.step(e), C.completed() && (h.splice(b, 1), x.hooked = !1, x.playing = !1, x.started = !1, g(x.completes)), v = !0); } return !d && h.length === 0 && p.length === 0 && r.push(c), v; } for (var a = !1, i = 0; i < n.length; i++) { var s = n[i], l = o(s); a = a || l; } var u = o(t, !0); (a || u) && (n.length > 0 ? t.notify("draw", n) : t.notify("draw")), n.unmerge(r), t.emit("step"); } var lse = { // pull in animation functions animate: en.animate(), animation: en.animation(), animated: en.animated(), clearQueue: en.clearQueue(), delay: en.delay(), delayAnimation: en.delayAnimation(), stop: en.stop(), addToAnimationPool: function(e) { var t = this; t.styleEnabled() && t._private.aniEles.merge(e); }, stopAnimationLoop: function() { this._private.animationsRunning = !1; }, startAnimationLoop: function() { var e = this; if (e._private.animationsRunning = !0, !e.styleEnabled()) return; function t() { e._private.animationsRunning && Rv(function(r) { f3(r, e), t(); }); } var n = e.renderer(); n && n.beforeRender ? n.beforeRender(function(r, o) { f3(o, e); }, n.beforeRenderPriorities.animations) : t(); } }, use = { qualifierCompare: function(e, t) { return e == null || t == null ? e == null && t == null : e.sameText(t); }, eventMatches: function(e, t, n) { var r = t.qualifier; return r != null ? e !== n.target && cf(n.target) && r.matches(n.target) : !0; }, addEventFields: function(e, t) { t.cy = e, t.target = e; }, callbackContext: function(e, t, n) { return t.qualifier != null ? n.target : e; } }, fh = function(e) { return ht(e) ? new Ls(e) : e; }, sT = { createEmitter: function() { var e = this._private; return e.emitter || (e.emitter = new vg(use, this)), this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { return this.emitter().on(e, fh(t), n), this; }, removeListener: function(e, t, n) { return this.emitter().removeListener(e, fh(t), n), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, one: function(e, t, n) { return this.emitter().one(e, fh(t), n), this; }, once: function(e, t, n) { return this.emitter().one(e, fh(t), n), this; }, emit: function(e, t) { return this.emitter().emit(e, t), this; }, emitAndNotify: function(e, t) { return this.emit(e), this.notify(e, t), this; } }; en.eventAliasesOn(sT); var hy = { png: function(e) { var t = this._private.renderer; return e = e || {}, t.png(e); }, jpg: function(e) { var t = this._private.renderer; return e = e || {}, e.bg = e.bg || "#fff", t.jpg(e); } }; hy.jpeg = hy.jpg; var Qh = { layout: function(e) { var t = this; if (e == null) { Nn("Layout options must be specified to make a layout"); return; } if (e.name == null) { Nn("A `name` must be specified to make a layout"); return; } var n = e.name, r = t.extension("layout", n); if (r == null) { Nn("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?"); return; } var o; ht(e.eles) ? o = t.$(e.eles) : o = e.eles != null ? e.eles : t.$(); var a = new r(kt({}, e, { cy: t, eles: o })); return a; } }; Qh.createLayout = Qh.makeLayout = Qh.layout; var cse = { notify: function(e, t) { var n = this._private; if (this.batching()) { n.batchNotifications = n.batchNotifications || {}; var r = n.batchNotifications[e] = n.batchNotifications[e] || this.collection(); t != null && r.merge(t); return; } if (n.notificationsEnabled) { var o = this.renderer(); this.destroyed() || !o || o.notify(e, t); } }, notifications: function(e) { var t = this._private; return e === void 0 ? t.notificationsEnabled : (t.notificationsEnabled = !!e, this); }, noNotifications: function(e) { this.notifications(!1), e(), this.notifications(!0); }, batching: function() { return this._private.batchCount > 0; }, startBatch: function() { var e = this._private; return e.batchCount == null && (e.batchCount = 0), e.batchCount === 0 && (e.batchStyleEles = this.collection(), e.batchNotifications = {}), e.batchCount++, this; }, endBatch: function() { var e = this._private; if (e.batchCount === 0) return this; if (e.batchCount--, e.batchCount === 0) { e.batchStyleEles.updateStyle(); var t = this.renderer(); Object.keys(e.batchNotifications).forEach(function(n) { var r = e.batchNotifications[n]; r.empty() ? t.notify(n) : t.notify(n, r); }); } return this; }, batch: function(e) { return this.startBatch(), e(), this.endBatch(), this; }, // for backwards compatibility batchData: function(e) { var t = this; return this.batch(function() { for (var n = Object.keys(e), r = 0; r < n.length; r++) { var o = n[r], a = e[o], i = t.getElementById(o); i.data(a); } }); } }, dse = Fr({ hideEdgesOnViewport: !1, textureOnViewport: !1, motionBlur: !1, motionBlurOpacity: 0.05, pixelRatio: void 0, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: !1, showFps: !1 }), vy = { renderTo: function(e, t, n, r) { var o = this._private.renderer; return o.renderTo(e, t, n, r), this; }, renderer: function() { return this._private.renderer; }, forceRender: function() { return this.notify("draw"), this; }, resize: function() { return this.invalidateSize(), this.emitAndNotify("resize"), this; }, initRenderer: function(e) { var t = this, n = t.extension("renderer", e.name); if (n == null) { Nn("Can not initialise: No such renderer `".concat(e.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); return; } e.wheelSensitivity !== void 0 && tn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); var r = dse(e); r.cy = t, t._private.renderer = new n(r), this.notify("init"); }, destroyRenderer: function() { var e = this; e.notify("destroy"); var t = e.container(); if (t) for (t._cyreg = null; t.childNodes.length > 0; ) t.removeChild(t.childNodes[0]); e._private.renderer = null, e.mutableElements().forEach(function(n) { var r = n._private; r.rscratch = {}, r.rstyle = {}, r.animation.current = [], r.animation.queue = []; }); }, onRender: function(e) { return this.on("render", e); }, offRender: function(e) { return this.off("render", e); } }; vy.invalidateDimensions = vy.resize; var ev = { // get a collection // - empty collection on no args // - collection of elements in the graph on selector arg // - guarantee a returned collection when elements or collection specified collection: function(e, t) { return ht(e) ? this.$(e) : Eo(e) ? e.collection() : cn(e) ? (t || (t = {}), new Er(this, e, t.unique, t.removed)) : new Er(this); }, nodes: function(e) { var t = this.$(function(n) { return n.isNode(); }); return e ? t.filter(e) : t; }, edges: function(e) { var t = this.$(function(n) { return n.isEdge(); }); return e ? t.filter(e) : t; }, // search the graph like jQuery $: function(e) { var t = this._private.elements; return e ? t.filter(e) : t.spawnSelf(); }, mutableElements: function() { return this._private.elements; } }; ev.elements = ev.filter = ev.$; var jr = {}, jd = "t", pse = "f"; jr.apply = function(e) { for (var t = this, n = t._private, r = n.cy, o = r.collection(), a = 0; a < e.length; a++) { var i = e[a], s = t.getContextMeta(i); if (!s.empty) { var l = t.getContextStyle(s), u = t.applyContextStyle(s, l, i); i._private.appliedInitStyle ? t.updateTransitions(i, u.diffProps) : i._private.appliedInitStyle = !0; var c = t.updateStyleHints(i); c && o.push(i); } } return o; }; jr.getPropertiesDiff = function(e, t) { var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, o = e + "-" + t, a = r[o]; if (a) return a; for (var i = [], s = {}, l = 0; l < n.length; l++) { var u = n[l], c = e[l] === jd, d = t[l] === jd, f = c !== d, h = u.mappedProperties.length > 0; if (f || d && h) { var p = void 0; f && h || f ? p = u.properties : h && (p = u.mappedProperties); for (var v = 0; v < p.length; v++) { for (var m = p[v], g = m.name, b = !1, C = l + 1; C < n.length; C++) { var x = n[C], w = t[C] === jd; if (w && (b = x.properties[m.name] != null, b)) break; } !s[g] && !b && (s[g] = !0, i.push(g)); } } } return r[o] = i, i; }; jr.getContextMeta = function(e) { for (var t = this, n = "", r, o = e._private.styleCxtKey || "", a = 0; a < t.length; a++) { var i = t[a], s = i.selector && i.selector.matches(e); s ? n += jd : n += pse; } return r = t.getPropertiesDiff(o, n), e._private.styleCxtKey = n, { key: n, diffPropNames: r, empty: r.length === 0 }; }; jr.getContextStyle = function(e) { var t = e.key, n = this, r = this._private.contextStyles = this._private.contextStyles || {}; if (r[t]) return r[t]; for (var o = { _private: { key: t } }, a = 0; a < n.length; a++) { var i = n[a], s = t[a] === jd; if (s) for (var l = 0; l < i.properties.length; l++) { var u = i.properties[l]; o[u.name] = u; } } return r[t] = o, o; }; jr.applyContextStyle = function(e, t, n) { for (var r = this, o = e.diffPropNames, a = {}, i = r.types, s = 0; s < o.length; s++) { var l = o[s], u = t[l], c = n.pstyle(l); if (!u) if (c) c.bypass ? u = { name: l, deleteBypassed: !0 } : u = { name: l, delete: !0 }; else continue; if (c !== u) { if (u.mapped === i.fn && c != null && c.mapping != null && c.mapping.value === u.value) { var d = c.mapping, f = d.fnValue = u.value(n); if (f === d.prevFnValue) continue; } var h = a[l] = { prev: c }; r.applyParsedProperty(n, u), h.next = n.pstyle(l), h.next && h.next.bypass && (h.next = h.next.bypassed); } } return { diffProps: a }; }; jr.updateStyleHints = function(e) { var t = e._private, n = this, r = n.propertyGroupNames, o = n.propertyGroupKeys, a = function(pe, Se, Le) { return n.getPropertiesHash(pe, Se, Le); }, i = t.styleKey; if (e.removed()) return !1; var s = t.group === "nodes", l = e._private.style; r = Object.keys(l); for (var u = 0; u < o.length; u++) { var c = o[u]; t.styleKeys[c] = [Bu, Fd]; } for (var d = function(pe, Se) { return t.styleKeys[Se][0] = hp(pe, t.styleKeys[Se][0]); }, f = function(pe, Se) { return t.styleKeys[Se][1] = vp(pe, t.styleKeys[Se][1]); }, h = function(pe, Se) { d(pe, Se), f(pe, Se); }, p = function(pe, Se) { for (var Le = 0; Le < pe.length; Le++) { var je = pe.charCodeAt(Le); d(je, Se), f(je, Se); } }, v = 2e9, m = function(pe) { return -128 < pe && pe < 128 && Math.floor(pe) !== pe ? v - (pe * 1024 | 0) : pe; }, g = 0; g < r.length; g++) { var b = r[g], C = l[b]; if (C != null) { var x = this.properties[b], w = x.type, k = x.groupKey, S = void 0; x.hashOverride != null ? S = x.hashOverride(e, C) : C.pfValue != null && (S = C.pfValue); var _ = x.enums == null ? C.value : null, O = S != null, F = _ != null, I = O || F, P = C.units; if (w.number && I && !w.multiple) { var M = O ? S : _; h(m(M), k), !O && P != null && p(P, k); } else p(C.strValue, k); } } for (var N = [Bu, Fd], j = 0; j < o.length; j++) { var A = o[j], U = t.styleKeys[A]; N[0] = hp(U[0], N[0]), N[1] = vp(U[1], N[1]); } t.styleKey = mne(N[0], N[1]); var q = t.styleKeys; t.labelDimsKey = Ji(q.labelDimensions); var Y = a(e, ["label"], q.labelDimensions); if (t.labelKey = Ji(Y), t.labelStyleKey = Ji(oh(q.commonLabel, Y)), !s) { var ie = a(e, ["source-label"], q.labelDimensions); t.sourceLabelKey = Ji(ie), t.sourceLabelStyleKey = Ji(oh(q.commonLabel, ie)); var re = a(e, ["target-label"], q.labelDimensions); t.targetLabelKey = Ji(re), t.targetLabelStyleKey = Ji(oh(q.commonLabel, re)); } if (s) { var le = t.styleKeys, he = le.nodeBody, we = le.nodeBorder, be = le.nodeOutline, de = le.backgroundImage, ae = le.compound, ee = le.pie, se = [he, we, be, de, ae, ee].filter(function(pe) { return pe != null; }).reduce(oh, [Bu, Fd]); t.nodeKey = Ji(se), t.hasPie = ee != null && ee[0] !== Bu && ee[1] !== Fd; } return i !== t.styleKey; }; jr.clearStyleHints = function(e) { var t = e._private; t.styleCxtKey = "", t.styleKeys = {}, t.styleKey = null, t.labelKey = null, t.labelStyleKey = null, t.sourceLabelKey = null, t.sourceLabelStyleKey = null, t.targetLabelKey = null, t.targetLabelStyleKey = null, t.nodeKey = null, t.hasPie = null; }; jr.applyParsedProperty = function(e, t) { var n = this, r = t, o = e._private.style, a, i = n.types, s = n.properties[r.name].type, l = r.bypass, u = o[r.name], c = u && u.bypass, d = e._private, f = "mapping", h = function(le) { return le == null ? null : le.pfValue != null ? le.pfValue : le.value; }, p = function() { var le = h(u), he = h(r); n.checkTriggers(e, r.name, le, he); }; if (t.name === "curve-style" && e.isEdge() && // loops must be bundled beziers (t.value !== "bezier" && e.isLoop() || // edges connected to compound nodes can not be haystacks t.value === "haystack" && (e.source().isParent() || e.target().isParent())) && (r = t = this.parse(t.name, "bezier", l)), r.delete) return o[r.name] = void 0, p(), !0; if (r.deleteBypassed) return u ? u.bypass ? (u.bypassed = void 0, p(), !0) : !1 : (p(), !0); if (r.deleteBypass) return u ? u.bypass ? (o[r.name] = u.bypassed, p(), !0) : !1 : (p(), !0); var v = function() { tn("Do not assign mappings to elements without corresponding data (i.e. ele `" + e.id() + "` has no mapping for property `" + r.name + "` with data field `" + r.field + "`); try a `[" + r.field + "]` selector to limit scope to elements with `" + r.field + "` defined"); }; switch (r.mapped) { case i.mapData: { for (var m = r.field.split("."), g = d.data, b = 0; b < m.length && g; b++) { var C = m[b]; g = g[C]; } if (g == null) return v(), !1; var x; if (Ke(g)) { var w = r.fieldMax - r.fieldMin; w === 0 ? x = 0 : x = (g - r.fieldMin) / w; } else return tn("Do not use continuous mappers without specifying numeric data (i.e. `" + r.field + ": " + g + "` for `" + e.id() + "` is non-numeric)"), !1; if (x < 0 ? x = 0 : x > 1 && (x = 1), s.color) { var k = r.valueMin[0], S = r.valueMax[0], _ = r.valueMin[1], O = r.valueMax[1], F = r.valueMin[2], I = r.valueMax[2], P = r.valueMin[3] == null ? 1 : r.valueMin[3], M = r.valueMax[3] == null ? 1 : r.valueMax[3], N = [Math.round(k + (S - k) * x), Math.round(_ + (O - _) * x), Math.round(F + (I - F) * x), Math.round(P + (M - P) * x)]; a = { // colours are simple, so just create the flat property instead of expensive string parsing bypass: r.bypass, // we're a bypass if the mapping property is a bypass name: r.name, value: N, strValue: "rgb(" + N[0] + ", " + N[1] + ", " + N[2] + ")" }; } else if (s.number) { var j = r.valueMin + (r.valueMax - r.valueMin) * x; a = this.parse(r.name, j, r.bypass, f); } else return !1; if (!a) return v(), !1; a.mapping = r, r = a; break; } case i.data: { for (var A = r.field.split("."), U = d.data, q = 0; q < A.length && U; q++) { var Y = A[q]; U = U[Y]; } if (U != null && (a = this.parse(r.name, U, r.bypass, f)), !a) return v(), !1; a.mapping = r, r = a; break; } case i.fn: { var ie = r.value, re = r.fnValue != null ? r.fnValue : ie(e); if (r.prevFnValue = re, re == null) return tn("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e.id() + "` is null)"), !1; if (a = this.parse(r.name, re, r.bypass, f), !a) return tn("Custom function mappers may not return invalid values for the property type (i.e. `" + r.name + "` for ele `" + e.id() + "` is invalid)"), !1; a.mapping = Na(r), r = a; break; } case void 0: break; default: return !1; } return l ? (c ? r.bypassed = u.bypassed : r.bypassed = u, o[r.name] = r) : c ? u.bypassed = r : o[r.name] = r, p(), !0; }; jr.cleanElements = function(e, t) { for (var n = 0; n < e.length; n++) { var r = e[n]; if (this.clearStyleHints(r), r.dirtyCompoundBoundsCache(), r.dirtyBoundingBoxCache(), !t) r._private.style = {}; else for (var o = r._private.style, a = Object.keys(o), i = 0; i < a.length; i++) { var s = a[i], l = o[s]; l != null && (l.bypass ? l.bypassed = null : o[s] = null); } } }; jr.update = function() { var e = this._private.cy, t = e.mutableElements(); t.updateStyle(); }; jr.updateTransitions = function(e, t) { var n = this, r = e._private, o = e.pstyle("transition-property").value, a = e.pstyle("transition-duration").pfValue, i = e.pstyle("transition-delay").pfValue; if (o.length > 0 && a > 0) { for (var s = {}, l = !1, u = 0; u < o.length; u++) { var c = o[u], d = e.pstyle(c), f = t[c]; if (f) { var h = f.prev, p = h, v = f.next != null ? f.next : d, m = !1, g = void 0, b = 1e-6; p && (Ke(p.pfValue) && Ke(v.pfValue) ? (m = v.pfValue - p.pfValue, g = p.pfValue + b * m) : Ke(p.value) && Ke(v.value) ? (m = v.value - p.value, g = p.value + b * m) : cn(p.value) && cn(v.value) && (m = p.value[0] !== v.value[0] || p.value[1] !== v.value[1] || p.value[2] !== v.value[2], g = p.strValue), m && (s[c] = v.strValue, this.applyBypass(e, c, g), l = !0)); } } if (!l) return; r.transitioning = !0, new Dc(function(C) { i > 0 ? e.delayAnimation(i).play().promise().then(C) : C(); }).then(function() { return e.animation({ style: s, duration: a, easing: e.pstyle("transition-timing-function").value, queue: !1 }).play().promise(); }).then(function() { n.removeBypasses(e, o), e.emitAndNotify("style"), r.transitioning = !1; }); } else r.transitioning && (this.removeBypasses(e, o), e.emitAndNotify("style"), r.transitioning = !1); }; jr.checkTrigger = function(e, t, n, r, o, a) { var i = this.properties[t], s = o(i); s != null && s(n, r) && a(i); }; jr.checkZOrderTrigger = function(e, t, n, r) { var o = this; this.checkTrigger(e, t, n, r, function(a) { return a.triggersZOrder; }, function() { o._private.cy.notify("zorder", e); }); }; jr.checkBoundsTrigger = function(e, t, n, r) { this.checkTrigger(e, t, n, r, function(o) { return o.triggersBounds; }, function(o) { e.dirtyCompoundBoundsCache(), e.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected o.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e.parallelEdges().forEach(function(a) { a.isBundledBezier() && a.dirtyBoundingBoxCache(); }), o.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e.connectedEdges().forEach(function(a) { a.dirtyBoundingBoxCache(); }); }); }; jr.checkTriggers = function(e, t, n, r) { e.dirtyStyleCache(), this.checkZOrderTrigger(e, t, n, r), this.checkBoundsTrigger(e, t, n, r); }; var hf = {}; hf.applyBypass = function(e, t, n, r) { var o = this, a = [], i = !0; if (t === "*" || t === "**") { if (n !== void 0) for (var s = 0; s < o.properties.length; s++) { var l = o.properties[s], u = l.name, c = this.parse(u, n, !0); c && a.push(c); } } else if (ht(t)) { var d = this.parse(t, n, !0); d && a.push(d); } else if (Ht(t)) { var f = t; r = n; for (var h = Object.keys(f), p = 0; p < h.length; p++) { var v = h[p], m = f[v]; if (m === void 0 && (m = f[ag(v)]), m !== void 0) { var g = this.parse(v, m, !0); g && a.push(g); } } } else return !1; if (a.length === 0) return !1; for (var b = !1, C = 0; C < e.length; C++) { for (var x = e[C], w = {}, k = void 0, S = 0; S < a.length; S++) { var _ = a[S]; if (r) { var O = x.pstyle(_.name); k = w[_.name] = { prev: O }; } b = this.applyParsedProperty(x, Na(_)) || b, r && (k.next = x.pstyle(_.name)); } b && this.updateStyleHints(x), r && this.updateTransitions(x, w, i); } return b; }; hf.overrideBypass = function(e, t, n) { t = P2(t); for (var r = 0; r < e.length; r++) { var o = e[r], a = o._private.style[t], i = this.properties[t].type, s = i.color, l = i.mutiple, u = a ? a.pfValue != null ? a.pfValue : a.value : null; !a || !a.bypass ? this.applyBypass(o, t, n) : (a.value = n, a.pfValue != null && (a.pfValue = n), s ? a.strValue = "rgb(" + n.join(",") + ")" : l ? a.strValue = n.join(" ") : a.strValue = "" + n, this.updateStyleHints(o)), this.checkTriggers(o, t, u, n); } }; hf.removeAllBypasses = function(e, t) { return this.removeBypasses(e, this.propertyNames, t); }; hf.removeBypasses = function(e, t, n) { for (var r = !0, o = 0; o < e.length; o++) { for (var a = e[o], i = {}, s = 0; s < t.length; s++) { var l = t[s], u = this.properties[l], c = a.pstyle(u.name); if (!(!c || !c.bypass)) { var d = "", f = this.parse(l, d, !0), h = i[u.name] = { prev: c }; this.applyParsedProperty(a, f), h.next = a.pstyle(u.name); } } this.updateStyleHints(a), n && this.updateTransitions(a, i, r); } }; var G2 = {}; G2.getEmSizeInPixels = function() { var e = this.containerCss("font-size"); return e != null ? parseFloat(e) : 1; }; G2.containerCss = function(e) { var t = this._private.cy, n = t.container(), r = t.window(); if (r && n && r.getComputedStyle) return r.getComputedStyle(n).getPropertyValue(e); }; var Ja = {}; Ja.getRenderedStyle = function(e, t) { return t ? this.getStylePropertyValue(e, t, !0) : this.getRawStyle(e, !0); }; Ja.getRawStyle = function(e, t) { var n = this; if (e = e[0], e) { for (var r = {}, o = 0; o < n.properties.length; o++) { var a = n.properties[o], i = n.getStylePropertyValue(e, a.name, t); i != null && (r[a.name] = i, r[ag(a.name)] = i); } return r; } }; Ja.getIndexedStyle = function(e, t, n, r) { var o = e.pstyle(t)[n][r]; return o ?? e.cy().style().getDefaultProperty(t)[n][0]; }; Ja.getStylePropertyValue = function(e, t, n) { var r = this; if (e = e[0], e) { var o = r.properties[t]; o.alias && (o = o.pointsTo); var a = o.type, i = e.pstyle(o.name); if (i) { var s = i.value, l = i.units, u = i.strValue; if (n && a.number && s != null && Ke(s)) { var c = e.cy().zoom(), d = function(v) { return v * c; }, f = function(v, m) { return d(v) + m; }, h = cn(s), p = h ? l.every(function(v) { return v != null; }) : l != null; return p ? h ? s.map(function(v, m) { return f(v, l[m]); }).join(" ") : f(s, l) : h ? s.map(function(v) { return ht(v) ? v : "" + d(v); }).join(" ") : "" + d(s); } else if (u != null) return u; } return null; } }; Ja.getAnimationStartStyle = function(e, t) { for (var n = {}, r = 0; r < t.length; r++) { var o = t[r], a = o.name, i = e.pstyle(a); i !== void 0 && (Ht(i) ? i = this.parse(a, i.strValue) : i = this.parse(a, i)), i && (n[a] = i); } return n; }; Ja.getPropsList = function(e) { var t = this, n = [], r = e, o = t.properties; if (r) for (var a = Object.keys(r), i = 0; i < a.length; i++) { var s = a[i], l = r[s], u = o[s] || o[P2(s)], c = this.parse(u.name, l); c && n.push(c); } return n; }; Ja.getNonDefaultPropertiesHash = function(e, t, n) { var r = n.slice(), o, a, i, s, l, u; for (l = 0; l < t.length; l++) if (o = t[l], a = e.pstyle(o, !1), a != null) if (a.pfValue != null) r[0] = hp(s, r[0]), r[1] = vp(s, r[1]); else for (i = a.strValue, u = 0; u < i.length; u++) s = i.charCodeAt(u), r[0] = hp(s, r[0]), r[1] = vp(s, r[1]); return r; }; Ja.getPropertiesHash = Ja.getNonDefaultPropertiesHash; var yg = {}; yg.appendFromJson = function(e) { for (var t = this, n = 0; n < e.length; n++) { var r = e[n], o = r.selector, a = r.style || r.css, i = Object.keys(a); t.selector(o); for (var s = 0; s < i.length; s++) { var l = i[s], u = a[l]; t.css(l, u); } } return t; }; yg.fromJson = function(e) { var t = this; return t.resetToDefault(), t.appendFromJson(e), t; }; yg.json = function() { for (var e = [], t = this.defaultLength; t < this.length; t++) { for (var n = this[t], r = n.selector, o = n.properties, a = {}, i = 0; i < o.length; i++) { var s = o[i]; a[s.name] = s.strValue; } e.push({ selector: r ? r.toString() : "core", style: a }); } return e; }; var K2 = {}; K2.appendFromString = function(e) { var t = this, n = this, r = "" + e, o, a, i; r = r.replace(/[/][*](\s|.)+?[*][/]/g, ""); function s() { r.length > o.length ? r = r.substr(o.length) : r = ""; } function l() { a.length > i.length ? a = a.substr(i.length) : a = ""; } for (; ; ) { var u = r.match(/^\s*$/); if (u) break; var c = r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!c) { tn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + r); break; } o = c[0]; var d = c[1]; if (d !== "core") { var f = new Ls(d); if (f.invalid) { tn("Skipping parsing of block: Invalid selector found in string stylesheet: " + d), s(); continue; } } var h = c[2], p = !1; a = h; for (var v = []; ; ) { var m = a.match(/^\s*$/); if (m) break; var g = a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!g) { tn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + h), p = !0; break; } i = g[0]; var b = g[1], C = g[2], x = t.properties[b]; if (!x) { tn("Skipping property: Invalid property name in: " + i), l(); continue; } var w = n.parse(b, C); if (!w) { tn("Skipping property: Invalid property definition in: " + i), l(); continue; } v.push({ name: b, val: C }), l(); } if (p) { s(); break; } n.selector(d); for (var k = 0; k < v.length; k++) { var S = v[k]; n.css(S.name, S.val); } s(); } return n; }; K2.fromString = function(e) { var t = this; return t.resetToDefault(), t.appendFromString(e), t; }; var hr = {}; (function() { var e = nr, t = wte, n = kte, r = Cte, o = Ste, a = function(ee) { return "^" + ee + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, i = function(ee) { var se = e + "|\\w+|" + t + "|" + n + "|" + r + "|" + o; return "^" + ee + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e + ")\\s*\\,\\s*(" + e + ")\\s*,\\s*(" + se + ")\\s*\\,\\s*(" + se + ")\\)$"; }, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; hr.types = { time: { number: !0, min: 0, units: "s|ms", implicitUnits: "ms" }, percent: { number: !0, min: 0, max: 100, units: "%", implicitUnits: "%" }, percentages: { number: !0, min: 0, max: 100, units: "%", implicitUnits: "%", multiple: !0 }, zeroOneNumber: { number: !0, min: 0, max: 1, unitless: !0 }, zeroOneNumbers: { number: !0, min: 0, max: 1, unitless: !0, multiple: !0 }, nOneOneNumber: { number: !0, min: -1, max: 1, unitless: !0 }, nonNegativeInt: { number: !0, min: 0, integer: !0, unitless: !0 }, nonNegativeNumber: { number: !0, min: 0, unitless: !0 }, position: { enums: ["parent", "origin"] }, nodeSize: { number: !0, min: 0, enums: ["label"] }, number: { number: !0, unitless: !0 }, numbers: { number: !0, unitless: !0, multiple: !0 }, positiveNumber: { number: !0, unitless: !0, min: 0, strictMin: !0 }, size: { number: !0, min: 0 }, bidirectionalSize: { number: !0 }, // allows negative bidirectionalSizeMaybePercent: { number: !0, allowPercent: !0 }, // allows negative bidirectionalSizes: { number: !0, multiple: !0 }, // allows negative sizeMaybePercent: { number: !0, min: 0, allowPercent: !0 }, axisDirection: { enums: ["horizontal", "leftward", "rightward", "vertical", "upward", "downward", "auto"] }, paddingRelativeTo: { enums: ["width", "height", "average", "min", "max"] }, bgWH: { number: !0, min: 0, allowPercent: !0, enums: ["auto"], multiple: !0 }, bgPos: { number: !0, allowPercent: !0, multiple: !0 }, bgRelativeTo: { enums: ["inner", "include-padding"], multiple: !0 }, bgRepeat: { enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"], multiple: !0 }, bgFit: { enums: ["none", "contain", "cover"], multiple: !0 }, bgCrossOrigin: { enums: ["anonymous", "use-credentials", "null"], multiple: !0 }, bgClip: { enums: ["none", "node"], multiple: !0 }, bgContainment: { enums: ["inside", "over"], multiple: !0 }, color: { color: !0 }, colors: { color: !0, multiple: !0 }, fill: { enums: ["solid", "linear-gradient", "radial-gradient"] }, bool: { enums: ["yes", "no"] }, bools: { enums: ["yes", "no"], multiple: !0 }, lineStyle: { enums: ["solid", "dotted", "dashed"] }, lineCap: { enums: ["butt", "round", "square"] }, linePosition: { enums: ["center", "inside", "outside"] }, lineJoin: { enums: ["round", "bevel", "miter"] }, borderStyle: { enums: ["solid", "dotted", "dashed", "double"] }, curveStyle: { enums: ["bezier", "unbundled-bezier", "haystack", "segments", "straight", "straight-triangle", "taxi", "round-segments", "round-taxi"] }, radiusType: { enums: ["arc-radius", "influence-radius"], multiple: !0 }, fontFamily: { regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' }, fontStyle: { enums: ["italic", "normal", "oblique"] }, fontWeight: { enums: ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "800", "900", 100, 200, 300, 400, 500, 600, 700, 800, 900] }, textDecoration: { enums: ["none", "underline", "overline", "line-through"] }, textTransform: { enums: ["none", "uppercase", "lowercase"] }, textWrap: { enums: ["none", "wrap", "ellipsis"] }, textOverflowWrap: { enums: ["whitespace", "anywhere"] }, textBackgroundShape: { enums: ["rectangle", "roundrectangle", "round-rectangle"] }, nodeShape: { enums: ["rectangle", "roundrectangle", "round-rectangle", "cutrectangle", "cut-rectangle", "bottomroundrectangle", "bottom-round-rectangle", "barrel", "ellipse", "triangle", "round-triangle", "square", "pentagon", "round-pentagon", "hexagon", "round-hexagon", "concavehexagon", "concave-hexagon", "heptagon", "round-heptagon", "octagon", "round-octagon", "tag", "round-tag", "star", "diamond", "round-diamond", "vee", "rhomboid", "right-rhomboid", "polygon"] }, overlayShape: { enums: ["roundrectangle", "round-rectangle", "ellipse"] }, cornerRadius: { number: !0, min: 0, units: "px|em", implicitUnits: "px", enums: ["auto"] }, compoundIncludeLabels: { enums: ["include", "exclude"] }, arrowShape: { enums: ["tee", "triangle", "triangle-tee", "circle-triangle", "triangle-cross", "triangle-backcurve", "vee", "square", "circle", "diamond", "chevron", "none"] }, arrowFill: { enums: ["filled", "hollow"] }, arrowWidth: { number: !0, units: "%|px|em", implicitUnits: "px", enums: ["match-line"] }, display: { enums: ["element", "none"] }, visibility: { enums: ["hidden", "visible"] }, zCompoundDepth: { enums: ["bottom", "orphan", "auto", "top"] }, zIndexCompare: { enums: ["auto", "manual"] }, valign: { enums: ["top", "center", "bottom"] }, halign: { enums: ["left", "center", "right"] }, justification: { enums: ["left", "center", "right", "auto"] }, text: { string: !0 }, data: { mapping: !0, regex: a("data") }, layoutData: { mapping: !0, regex: a("layoutData") }, scratch: { mapping: !0, regex: a("scratch") }, mapData: { mapping: !0, regex: i("mapData") }, mapLayoutData: { mapping: !0, regex: i("mapLayoutData") }, mapScratch: { mapping: !0, regex: i("mapScratch") }, fn: { mapping: !0, fn: !0 }, url: { regexes: s, singleRegexMatchValue: !0 }, urls: { regexes: s, singleRegexMatchValue: !0, multiple: !0 }, propList: { propList: !0 }, angle: { number: !0, units: "deg|rad", implicitUnits: "rad" }, textRotation: { number: !0, units: "deg|rad", implicitUnits: "rad", enums: ["none", "autorotate"] }, polygonPointList: { number: !0, multiple: !0, evenMultiple: !0, min: -1, max: 1, unitless: !0 }, edgeDistances: { enums: ["intersection", "node-position", "endpoints"] }, edgeEndpoint: { number: !0, multiple: !0, units: "%|px|em|deg|rad", implicitUnits: "px", enums: ["inside-to-node", "outside-to-node", "outside-to-node-or-label", "outside-to-line", "outside-to-line-or-label"], singleEnum: !0, validate: function(ee, se) { switch (ee.length) { case 2: return se[0] !== "deg" && se[0] !== "rad" && se[1] !== "deg" && se[1] !== "rad"; case 1: return ht(ee[0]) || se[0] === "deg" || se[0] === "rad"; default: return !1; } } }, easing: { regexes: ["^(spring)\\s*\\(\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*\\)$", "^(cubic-bezier)\\s*\\(\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*,\\s*(" + e + ")\\s*\\)$"], enums: ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "ease-in-sine", "ease-out-sine", "ease-in-out-sine", "ease-in-quad", "ease-out-quad", "ease-in-out-quad", "ease-in-cubic", "ease-out-cubic", "ease-in-out-cubic", "ease-in-quart", "ease-out-quart", "ease-in-out-quart", "ease-in-quint", "ease-out-quint", "ease-in-out-quint", "ease-in-expo", "ease-out-expo", "ease-in-out-expo", "ease-in-circ", "ease-out-circ", "ease-in-out-circ"] }, gradientDirection: { enums: [ "to-bottom", "to-top", "to-left", "to-right", "to-bottom-right", "to-bottom-left", "to-top-right", "to-top-left", "to-right-bottom", "to-left-bottom", "to-right-top", "to-left-top" // different order ] }, boundsExpansion: { number: !0, multiple: !0, min: 0, validate: function(ee) { var se = ee.length; return se === 1 || se === 2 || se === 4; } } }; var l = { zeroNonZero: function(ee, se) { return (ee == null || se == null) && ee !== se || ee == 0 && se != 0 ? !0 : ee != 0 && se == 0; }, any: function(ee, se) { return ee != se; }, emptyNonEmpty: function(ee, se) { var pe = As(ee), Se = As(se); return pe && !Se || !pe && Se; } }, u = hr.types, c = [{ name: "label", type: u.text, triggersBounds: l.any, triggersZOrder: l.emptyNonEmpty }, { name: "text-rotation", type: u.textRotation, triggersBounds: l.any }, { name: "text-margin-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "text-margin-y", type: u.bidirectionalSize, triggersBounds: l.any }], d = [{ name: "source-label", type: u.text, triggersBounds: l.any }, { name: "source-text-rotation", type: u.textRotation, triggersBounds: l.any }, { name: "source-text-margin-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "source-text-margin-y", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "source-text-offset", type: u.size, triggersBounds: l.any }], f = [{ name: "target-label", type: u.text, triggersBounds: l.any }, { name: "target-text-rotation", type: u.textRotation, triggersBounds: l.any }, { name: "target-text-margin-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "target-text-margin-y", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "target-text-offset", type: u.size, triggersBounds: l.any }], h = [{ name: "font-family", type: u.fontFamily, triggersBounds: l.any }, { name: "font-style", type: u.fontStyle, triggersBounds: l.any }, { name: "font-weight", type: u.fontWeight, triggersBounds: l.any }, { name: "font-size", type: u.size, triggersBounds: l.any }, { name: "text-transform", type: u.textTransform, triggersBounds: l.any }, { name: "text-wrap", type: u.textWrap, triggersBounds: l.any }, { name: "text-overflow-wrap", type: u.textOverflowWrap, triggersBounds: l.any }, { name: "text-max-width", type: u.size, triggersBounds: l.any }, { name: "text-outline-width", type: u.size, triggersBounds: l.any }, { name: "line-height", type: u.positiveNumber, triggersBounds: l.any }], p = [{ name: "text-valign", type: u.valign, triggersBounds: l.any }, { name: "text-halign", type: u.halign, triggersBounds: l.any }, { name: "color", type: u.color }, { name: "text-outline-color", type: u.color }, { name: "text-outline-opacity", type: u.zeroOneNumber }, { name: "text-background-color", type: u.color }, { name: "text-background-opacity", type: u.zeroOneNumber }, { name: "text-background-padding", type: u.size, triggersBounds: l.any }, { name: "text-border-opacity", type: u.zeroOneNumber }, { name: "text-border-color", type: u.color }, { name: "text-border-width", type: u.size, triggersBounds: l.any }, { name: "text-border-style", type: u.borderStyle, triggersBounds: l.any }, { name: "text-background-shape", type: u.textBackgroundShape, triggersBounds: l.any }, { name: "text-justification", type: u.justification }], v = [{ name: "events", type: u.bool, triggersZOrder: l.any }, { name: "text-events", type: u.bool, triggersZOrder: l.any }], m = [{ name: "display", type: u.display, triggersZOrder: l.any, triggersBounds: l.any, triggersBoundsOfConnectedEdges: !0 }, { name: "visibility", type: u.visibility, triggersZOrder: l.any }, { name: "opacity", type: u.zeroOneNumber, triggersZOrder: l.zeroNonZero }, { name: "text-opacity", type: u.zeroOneNumber }, { name: "min-zoomed-font-size", type: u.size }, { name: "z-compound-depth", type: u.zCompoundDepth, triggersZOrder: l.any }, { name: "z-index-compare", type: u.zIndexCompare, triggersZOrder: l.any }, { name: "z-index", type: u.number, triggersZOrder: l.any }], g = [{ name: "overlay-padding", type: u.size, triggersBounds: l.any }, { name: "overlay-color", type: u.color }, { name: "overlay-opacity", type: u.zeroOneNumber, triggersBounds: l.zeroNonZero }, { name: "overlay-shape", type: u.overlayShape, triggersBounds: l.any }, { name: "overlay-corner-radius", type: u.cornerRadius }], b = [{ name: "underlay-padding", type: u.size, triggersBounds: l.any }, { name: "underlay-color", type: u.color }, { name: "underlay-opacity", type: u.zeroOneNumber, triggersBounds: l.zeroNonZero }, { name: "underlay-shape", type: u.overlayShape, triggersBounds: l.any }, { name: "underlay-corner-radius", type: u.cornerRadius }], C = [{ name: "transition-property", type: u.propList }, { name: "transition-duration", type: u.time }, { name: "transition-delay", type: u.time }, { name: "transition-timing-function", type: u.easing }], x = function(ee, se) { return se.value === "label" ? -ee.poolIndex() : se.pfValue; }, w = [{ name: "height", type: u.nodeSize, triggersBounds: l.any, hashOverride: x }, { name: "width", type: u.nodeSize, triggersBounds: l.any, hashOverride: x }, { name: "shape", type: u.nodeShape, triggersBounds: l.any }, { name: "shape-polygon-points", type: u.polygonPointList, triggersBounds: l.any }, { name: "corner-radius", type: u.cornerRadius }, { name: "background-color", type: u.color }, { name: "background-fill", type: u.fill }, { name: "background-opacity", type: u.zeroOneNumber }, { name: "background-blacken", type: u.nOneOneNumber }, { name: "background-gradient-stop-colors", type: u.colors }, { name: "background-gradient-stop-positions", type: u.percentages }, { name: "background-gradient-direction", type: u.gradientDirection }, { name: "padding", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "padding-relative-to", type: u.paddingRelativeTo, triggersBounds: l.any }, { name: "bounds-expansion", type: u.boundsExpansion, triggersBounds: l.any }], k = [{ name: "border-color", type: u.color }, { name: "border-opacity", type: u.zeroOneNumber }, { name: "border-width", type: u.size, triggersBounds: l.any }, { name: "border-style", type: u.borderStyle }, { name: "border-cap", type: u.lineCap }, { name: "border-join", type: u.lineJoin }, { name: "border-dash-pattern", type: u.numbers }, { name: "border-dash-offset", type: u.number }, { name: "border-position", type: u.linePosition }], S = [{ name: "outline-color", type: u.color }, { name: "outline-opacity", type: u.zeroOneNumber }, { name: "outline-width", type: u.size, triggersBounds: l.any }, { name: "outline-style", type: u.borderStyle }, { name: "outline-offset", type: u.size, triggersBounds: l.any }], _ = [{ name: "background-image", type: u.urls }, { name: "background-image-crossorigin", type: u.bgCrossOrigin }, { name: "background-image-opacity", type: u.zeroOneNumbers }, { name: "background-image-containment", type: u.bgContainment }, { name: "background-image-smoothing", type: u.bools }, { name: "background-position-x", type: u.bgPos }, { name: "background-position-y", type: u.bgPos }, { name: "background-width-relative-to", type: u.bgRelativeTo }, { name: "background-height-relative-to", type: u.bgRelativeTo }, { name: "background-repeat", type: u.bgRepeat }, { name: "background-fit", type: u.bgFit }, { name: "background-clip", type: u.bgClip }, { name: "background-width", type: u.bgWH }, { name: "background-height", type: u.bgWH }, { name: "background-offset-x", type: u.bgPos }, { name: "background-offset-y", type: u.bgPos }], O = [{ name: "position", type: u.position, triggersBounds: l.any }, { name: "compound-sizing-wrt-labels", type: u.compoundIncludeLabels, triggersBounds: l.any }, { name: "min-width", type: u.size, triggersBounds: l.any }, { name: "min-width-bias-left", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "min-width-bias-right", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "min-height", type: u.size, triggersBounds: l.any }, { name: "min-height-bias-top", type: u.sizeMaybePercent, triggersBounds: l.any }, { name: "min-height-bias-bottom", type: u.sizeMaybePercent, triggersBounds: l.any }], F = [{ name: "line-style", type: u.lineStyle }, { name: "line-color", type: u.color }, { name: "line-fill", type: u.fill }, { name: "line-cap", type: u.lineCap }, { name: "line-opacity", type: u.zeroOneNumber }, { name: "line-dash-pattern", type: u.numbers }, { name: "line-dash-offset", type: u.number }, { name: "line-outline-width", type: u.size }, { name: "line-outline-color", type: u.color }, { name: "line-gradient-stop-colors", type: u.colors }, { name: "line-gradient-stop-positions", type: u.percentages }, { name: "curve-style", type: u.curveStyle, triggersBounds: l.any, triggersBoundsOfParallelBeziers: !0 }, { name: "haystack-radius", type: u.zeroOneNumber, triggersBounds: l.any }, { name: "source-endpoint", type: u.edgeEndpoint, triggersBounds: l.any }, { name: "target-endpoint", type: u.edgeEndpoint, triggersBounds: l.any }, { name: "control-point-step-size", type: u.size, triggersBounds: l.any }, { name: "control-point-distances", type: u.bidirectionalSizes, triggersBounds: l.any }, { name: "control-point-weights", type: u.numbers, triggersBounds: l.any }, { name: "segment-distances", type: u.bidirectionalSizes, triggersBounds: l.any }, { name: "segment-weights", type: u.numbers, triggersBounds: l.any }, { name: "segment-radii", type: u.numbers, triggersBounds: l.any }, { name: "radius-type", type: u.radiusType, triggersBounds: l.any }, { name: "taxi-turn", type: u.bidirectionalSizeMaybePercent, triggersBounds: l.any }, { name: "taxi-turn-min-distance", type: u.size, triggersBounds: l.any }, { name: "taxi-direction", type: u.axisDirection, triggersBounds: l.any }, { name: "taxi-radius", type: u.number, triggersBounds: l.any }, { name: "edge-distances", type: u.edgeDistances, triggersBounds: l.any }, { name: "arrow-scale", type: u.positiveNumber, triggersBounds: l.any }, { name: "loop-direction", type: u.angle, triggersBounds: l.any }, { name: "loop-sweep", type: u.angle, triggersBounds: l.any }, { name: "source-distance-from-node", type: u.size, triggersBounds: l.any }, { name: "target-distance-from-node", type: u.size, triggersBounds: l.any }], I = [{ name: "ghost", type: u.bool, triggersBounds: l.any }, { name: "ghost-offset-x", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "ghost-offset-y", type: u.bidirectionalSize, triggersBounds: l.any }, { name: "ghost-opacity", type: u.zeroOneNumber }], P = [{ name: "selection-box-color", type: u.color }, { name: "selection-box-opacity", type: u.zeroOneNumber }, { name: "selection-box-border-color", type: u.color }, { name: "selection-box-border-width", type: u.size }, { name: "active-bg-color", type: u.color }, { name: "active-bg-opacity", type: u.zeroOneNumber }, { name: "active-bg-size", type: u.size }, { name: "outside-texture-bg-color", type: u.color }, { name: "outside-texture-bg-opacity", type: u.zeroOneNumber }], M = []; hr.pieBackgroundN = 16, M.push({ name: "pie-size", type: u.sizeMaybePercent }); for (var N = 1; N <= hr.pieBackgroundN; N++) M.push({ name: "pie-" + N + "-background-color", type: u.color }), M.push({ name: "pie-" + N + "-background-size", type: u.percent }), M.push({ name: "pie-" + N + "-background-opacity", type: u.zeroOneNumber }); var j = [], A = hr.arrowPrefixes = ["source", "mid-source", "target", "mid-target"]; [{ name: "arrow-shape", type: u.arrowShape, triggersBounds: l.any }, { name: "arrow-color", type: u.color }, { name: "arrow-fill", type: u.arrowFill }, { name: "arrow-width", type: u.arrowWidth }].forEach(function(ee) { A.forEach(function(se) { var pe = se + "-" + ee.name, Se = ee.type, Le = ee.triggersBounds; j.push({ name: pe, type: Se, triggersBounds: Le }); }); }, {}); var U = hr.properties = [].concat(v, C, m, g, b, I, p, h, c, d, f, w, k, S, _, M, O, F, j, P), q = hr.propertyGroups = { // common to all eles behavior: v, transition: C, visibility: m, overlay: g, underlay: b, ghost: I, // labels commonLabel: p, labelDimensions: h, mainLabel: c, sourceLabel: d, targetLabel: f, // node props nodeBody: w, nodeBorder: k, nodeOutline: S, backgroundImage: _, pie: M, compound: O, // edge props edgeLine: F, edgeArrow: j, core: P }, Y = hr.propertyGroupNames = {}, ie = hr.propertyGroupKeys = Object.keys(q); ie.forEach(function(ee) { Y[ee] = q[ee].map(function(se) { return se.name; }), q[ee].forEach(function(se) { return se.groupKey = ee; }); }); var re = hr.aliases = [{ name: "content", pointsTo: "label" }, { name: "control-point-distance", pointsTo: "control-point-distances" }, { name: "control-point-weight", pointsTo: "control-point-weights" }, { name: "segment-distance", pointsTo: "segment-distances" }, { name: "segment-weight", pointsTo: "segment-weights" }, { name: "segment-radius", pointsTo: "segment-radii" }, { name: "edge-text-rotation", pointsTo: "text-rotation" }, { name: "padding-left", pointsTo: "padding" }, { name: "padding-right", pointsTo: "padding" }, { name: "padding-top", pointsTo: "padding" }, { name: "padding-bottom", pointsTo: "padding" }]; hr.propertyNames = U.map(function(ee) { return ee.name; }); for (var le = 0; le < U.length; le++) { var he = U[le]; U[he.name] = he; } for (var we = 0; we < re.length; we++) { var be = re[we], de = U[be.pointsTo], ae = { name: be.name, alias: !0, pointsTo: de }; U.push(ae), U[be.name] = ae; } })(); hr.getDefaultProperty = function(e) { return this.getDefaultProperties()[e]; }; hr.getDefaultProperties = function() { var e = this._private; if (e.defaultProperties != null) return e.defaultProperties; for (var t = kt({ // core props "selection-box-color": "#ddd", "selection-box-opacity": 0.65, "selection-box-border-color": "#aaa", "selection-box-border-width": 1, "active-bg-color": "black", "active-bg-opacity": 0.15, "active-bg-size": 30, "outside-texture-bg-color": "#000", "outside-texture-bg-opacity": 0.125, // common node/edge props events: "yes", "text-events": "no", "text-valign": "top", "text-halign": "center", "text-justification": "auto", "line-height": 1, color: "#000", "text-outline-color": "#000", "text-outline-width": 0, "text-outline-opacity": 1, "text-opacity": 1, "text-decoration": "none", "text-transform": "none", "text-wrap": "none", "text-overflow-wrap": "whitespace", "text-max-width": 9999, "text-background-color": "#000", "text-background-opacity": 0, "text-background-shape": "rectangle", "text-background-padding": 0, "text-border-opacity": 0, "text-border-width": 0, "text-border-style": "solid", "text-border-color": "#000", "font-family": "Helvetica Neue, Helvetica, sans-serif", "font-style": "normal", "font-weight": "normal", "font-size": 16, "min-zoomed-font-size": 0, "text-rotation": "none", "source-text-rotation": "none", "target-text-rotation": "none", visibility: "visible", display: "element", opacity: 1, "z-compound-depth": "auto", "z-index-compare": "auto", "z-index": 0, label: "", "text-margin-x": 0, "text-margin-y": 0, "source-label": "", "source-text-offset": 0, "source-text-margin-x": 0, "source-text-margin-y": 0, "target-label": "", "target-text-offset": 0, "target-text-margin-x": 0, "target-text-margin-y": 0, "overlay-opacity": 0, "overlay-color": "#000", "overlay-padding": 10, "overlay-shape": "round-rectangle", "overlay-corner-radius": "auto", "underlay-opacity": 0, "underlay-color": "#000", "underlay-padding": 10, "underlay-shape": "round-rectangle", "underlay-corner-radius": "auto", "transition-property": "none", "transition-duration": 0, "transition-delay": 0, "transition-timing-function": "linear", // node props "background-blacken": 0, "background-color": "#999", "background-fill": "solid", "background-opacity": 1, "background-image": "none", "background-image-crossorigin": "anonymous", "background-image-opacity": 1, "background-image-containment": "inside", "background-image-smoothing": "yes", "background-position-x": "50%", "background-position-y": "50%", "background-offset-x": 0, "background-offset-y": 0, "background-width-relative-to": "include-padding", "background-height-relative-to": "include-padding", "background-repeat": "no-repeat", "background-fit": "none", "background-clip": "node", "background-width": "auto", "background-height": "auto", "border-color": "#000", "border-opacity": 1, "border-width": 0, "border-style": "solid", "border-dash-pattern": [4, 2], "border-dash-offset": 0, "border-cap": "butt", "border-join": "miter", "border-position": "center", "outline-color": "#999", "outline-opacity": 1, "outline-width": 0, "outline-offset": 0, "outline-style": "solid", height: 30, width: 30, shape: "ellipse", "shape-polygon-points": "-1, -1, 1, -1, 1, 1, -1, 1", "corner-radius": "auto", "bounds-expansion": 0, // node gradient "background-gradient-direction": "to-bottom", "background-gradient-stop-colors": "#999", "background-gradient-stop-positions": "0%", // ghost props ghost: "no", "ghost-offset-y": 0, "ghost-offset-x": 0, "ghost-opacity": 0, // compound props padding: 0, "padding-relative-to": "width", position: "origin", "compound-sizing-wrt-labels": "include", "min-width": 0, "min-width-bias-left": 0, "min-width-bias-right": 0, "min-height": 0, "min-height-bias-top": 0, "min-height-bias-bottom": 0 }, { // node pie bg "pie-size": "100%" }, [{ name: "pie-{{i}}-background-color", value: "black" }, { name: "pie-{{i}}-background-size", value: "0%" }, { name: "pie-{{i}}-background-opacity", value: 1 }].reduce(function(l, u) { for (var c = 1; c <= hr.pieBackgroundN; c++) { var d = u.name.replace("{{i}}", c), f = u.value; l[d] = f; } return l; }, {}), { // edge props "line-style": "solid", "line-color": "#999", "line-fill": "solid", "line-cap": "butt", "line-opacity": 1, "line-outline-width": 0, "line-outline-color": "#000", "line-gradient-stop-colors": "#999", "line-gradient-stop-positions": "0%", "control-point-step-size": 40, "control-point-weights": 0.5, "segment-weights": 0.5, "segment-distances": 20, "segment-radii": 15, "radius-type": "arc-radius", "taxi-turn": "50%", "taxi-radius": 15, "taxi-turn-min-distance": 10, "taxi-direction": "auto", "edge-distances": "intersection", "curve-style": "haystack", "haystack-radius": 0, "arrow-scale": 1, "loop-direction": "-45deg", "loop-sweep": "-90deg", "source-distance-from-node": 0, "target-distance-from-node": 0, "source-endpoint": "outside-to-node", "target-endpoint": "outside-to-node", "line-dash-pattern": [6, 3], "line-dash-offset": 0 }, [{ name: "arrow-shape", value: "none" }, { name: "arrow-color", value: "#999" }, { name: "arrow-fill", value: "filled" }, { name: "arrow-width", value: 1 }].reduce(function(l, u) { return hr.arrowPrefixes.forEach(function(c) { var d = c + "-" + u.name, f = u.value; l[d] = f; }), l; }, {})), n = {}, r = 0; r < this.properties.length; r++) { var o = this.properties[r]; if (!o.pointsTo) { var a = o.name, i = t[a], s = this.parse(a, i); n[a] = s; } } return e.defaultProperties = n, e.defaultProperties; }; hr.addDefaultStylesheet = function() { this.selector(":parent").css({ shape: "rectangle", padding: 10, "background-color": "#eee", "border-color": "#ccc", "border-width": 1 }).selector("edge").css({ width: 3 }).selector(":loop").css({ "curve-style": "bezier" }).selector("edge:compound").css({ "curve-style": "bezier", "source-endpoint": "outside-to-line", "target-endpoint": "outside-to-line" }).selector(":selected").css({ "background-color": "#0169D9", "line-color": "#0169D9", "source-arrow-color": "#0169D9", "target-arrow-color": "#0169D9", "mid-source-arrow-color": "#0169D9", "mid-target-arrow-color": "#0169D9" }).selector(":parent:selected").css({ "background-color": "#CCE1F9", "border-color": "#aec8e5" }).selector(":active").css({ "overlay-color": "black", "overlay-padding": 10, "overlay-opacity": 0.25 }), this.defaultLength = this.length; }; var bg = {}; bg.parse = function(e, t, n, r) { var o = this; if (An(t)) return o.parseImplWarn(e, t, n, r); var a = r === "mapping" || r === !0 || r === !1 || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, l = g6(e, s, i, a), u = o.propCache = o.propCache || [], c; return (c = u[l]) || (c = u[l] = o.parseImplWarn(e, t, n, r)), (n || r === "mapping") && (c = Na(c), c && (c.value = Na(c.value))), c; }; bg.parseImplWarn = function(e, t, n, r) { var o = this.parseImpl(e, t, n, r); return !o && t != null && tn("The style property `".concat(e, ": ").concat(t, "` is invalid")), o && (o.name === "width" || o.name === "height") && t === "label" && tn("The style value of `label` is deprecated for `" + o.name + "`"), o; }; bg.parseImpl = function(e, t, n, r) { var o = this; e = P2(e); var a = o.properties[e], i = t, s = o.types; if (!a || t === void 0) return null; a.alias && (a = a.pointsTo, e = a.name); var l = ht(t); l && (t = t.trim()); var u = a.type; if (!u) return null; if (n && (t === "" || t === null)) return { name: e, value: t, bypass: !0, deleteBypass: !0 }; if (An(t)) return { name: e, value: t, strValue: "fn", mapped: s.fn, bypass: n }; var c, d; if (!(!l || r || t.length < 7 || t[1] !== "a")) { if (t.length >= 7 && t[0] === "d" && (c = new RegExp(s.data.regex).exec(t))) { if (n) return !1; var f = s.data; return { name: e, value: c, strValue: "" + t, mapped: f, field: c[1], bypass: n }; } else if (t.length >= 10 && t[0] === "m" && (d = new RegExp(s.mapData.regex).exec(t))) { if (n || u.multiple) return !1; var h = s.mapData; if (!(u.color || u.number)) return !1; var p = this.parse(e, d[4]); if (!p || p.mapped) return !1; var v = this.parse(e, d[5]); if (!v || v.mapped) return !1; if (p.pfValue === v.pfValue || p.strValue === v.strValue) return tn("`" + e + ": " + t + "` is not a valid mapper because the output range is zero; converting to `" + e + ": " + p.strValue + "`"), this.parse(e, p.strValue); if (u.color) { var m = p.value, g = v.value, b = m[0] === g[0] && m[1] === g[1] && m[2] === g[2] && // optional alpha (m[3] === g[3] || (m[3] == null || m[3] === 1) && (g[3] == null || g[3] === 1)); if (b) return !1; } return { name: e, value: d, strValue: "" + t, mapped: h, field: d[1], fieldMin: parseFloat(d[2]), // min & max are numeric fieldMax: parseFloat(d[3]), valueMin: p.value, valueMax: v.value, bypass: n }; } } if (u.multiple && r !== "multiple") { var C; if (l ? C = t.split(/\s+/) : cn(t) ? C = t : C = [t], u.evenMultiple && C.length % 2 !== 0) return null; for (var x = [], w = [], k = [], S = "", _ = !1, O = 0; O < C.length; O++) { var F = o.parse(e, C[O], n, "multiple"); _ = _ || ht(F.value), x.push(F.value), k.push(F.pfValue != null ? F.pfValue : F.value), w.push(F.units), S += (O > 0 ? " " : "") + F.strValue; } return u.validate && !u.validate(x, w) ? null : u.singleEnum && _ ? x.length === 1 && ht(x[0]) ? { name: e, value: x[0], strValue: x[0], bypass: n } : null : { name: e, value: x, pfValue: k, strValue: S, bypass: n, units: w }; } var I = function() { for (var ee = 0; ee < u.enums.length; ee++) { var se = u.enums[ee]; if (se === t) return { name: e, value: t, strValue: "" + t, bypass: n }; } return null; }; if (u.number) { var P, M = "px"; if (u.units && (P = u.units), u.implicitUnits && (M = u.implicitUnits), !u.unitless) if (l) { var N = "px|em" + (u.allowPercent ? "|\\%" : ""); P && (N = P); var j = t.match("^(" + nr + ")(" + N + ")?$"); j && (t = j[1], P = j[2] || M); } else (!P || u.implicitUnits) && (P = M); if (t = parseFloat(t), isNaN(t) && u.enums === void 0) return null; if (isNaN(t) && u.enums !== void 0) return t = i, I(); if (u.integer && !fte(t) || u.min !== void 0 && (t < u.min || u.strictMin && t === u.min) || u.max !== void 0 && (t > u.max || u.strictMax && t === u.max)) return null; var A = { name: e, value: t, strValue: "" + t + (P || ""), units: P, bypass: n }; return u.unitless || P !== "px" && P !== "em" ? A.pfValue = t : A.pfValue = P === "px" || !P ? t : this.getEmSizeInPixels() * t, (P === "ms" || P === "s") && (A.pfValue = P === "ms" ? t : 1e3 * t), (P === "deg" || P === "rad") && (A.pfValue = P === "rad" ? t : Gne(t)), P === "%" && (A.pfValue = t / 100), A; } else if (u.propList) { var U = [], q = "" + t; if (q !== "none") { for (var Y = q.split(/\s*,\s*|\s+/), ie = 0; ie < Y.length; ie++) { var re = Y[ie].trim(); o.properties[re] ? U.push(re) : tn("`" + re + "` is not a valid property name"); } if (U.length === 0) return null; } return { name: e, value: U, strValue: U.length === 0 ? "none" : U.join(" "), bypass: n }; } else if (u.color) { var le = Fte(t); return le ? { name: e, value: le, pfValue: le, strValue: "rgb(" + le[0] + "," + le[1] + "," + le[2] + ")", // n.b. no spaces b/c of multiple support bypass: n } : null; } else if (u.regex || u.regexes) { if (u.enums) { var he = I(); if (he) return he; } for (var we = u.regexes ? u.regexes : [u.regex], be = 0; be < we.length; be++) { var de = new RegExp(we[be]), ae = de.exec(t); if (ae) return { name: e, value: u.singleRegexMatchValue ? ae[1] : ae, strValue: "" + t, bypass: n }; } return null; } else return u.string ? { name: e, value: "" + t, strValue: "" + t, bypass: n } : u.enums ? I() : null; }; var Nr = function e(t) { if (!(this instanceof e)) return new e(t); if (!A2(t)) { Nn("A style must have a core reference"); return; } this._private = { cy: t, coreStyle: {} }, this.length = 0, this.resetToDefault(); }, zr = Nr.prototype; zr.instanceString = function() { return "style"; }; zr.clear = function() { for (var e = this._private, t = e.cy, n = t.elements(), r = 0; r < this.length; r++) this[r] = void 0; return this.length = 0, e.contextStyles = {}, e.propDiffs = {}, this.cleanElements(n, !0), n.forEach(function(o) { var a = o[0]._private; a.styleDirty = !0, a.appliedInitStyle = !1; }), this; }; zr.resetToDefault = function() { return this.clear(), this.addDefaultStylesheet(), this; }; zr.core = function(e) { return this._private.coreStyle[e] || this.getDefaultProperty(e); }; zr.selector = function(e) { var t = e === "core" ? null : new Ls(e), n = this.length++; return this[n] = { selector: t, properties: [], mappedProperties: [], index: n }, this; }; zr.css = function() { var e = this, t = arguments; if (t.length === 1) for (var n = t[0], r = 0; r < e.properties.length; r++) { var o = e.properties[r], a = n[o.name]; a === void 0 && (a = n[ag(o.name)]), a !== void 0 && this.cssRule(o.name, a); } else t.length === 2 && this.cssRule(t[0], t[1]); return this; }; zr.style = zr.css; zr.cssRule = function(e, t) { var n = this.parse(e, t); if (n) { var r = this.length - 1; this[r].properties.push(n), this[r].properties[n.name] = n, n.name.match(/pie-(\d+)-background-size/) && n.value && (this._private.hasPie = !0), n.mapped && this[r].mappedProperties.push(n); var o = !this[r].selector; o && (this._private.coreStyle[n.name] = n); } return this; }; zr.append = function(e) { return i6(e) ? e.appendToStyle(this) : cn(e) ? this.appendFromJson(e) : ht(e) && this.appendFromString(e), this; }; Nr.fromJson = function(e, t) { var n = new Nr(e); return n.fromJson(t), n; }; Nr.fromString = function(e, t) { return new Nr(e).fromString(t); }; [jr, hf, G2, Ja, yg, K2, hr, bg].forEach(function(e) { kt(zr, e); }); Nr.types = zr.types; Nr.properties = zr.properties; Nr.propertyGroups = zr.propertyGroups; Nr.propertyGroupNames = zr.propertyGroupNames; Nr.propertyGroupKeys = zr.propertyGroupKeys; var fse = { style: function(e) { if (e) { var t = this.setStyle(e); t.update(); } return this._private.style; }, setStyle: function(e) { var t = this._private; return i6(e) ? t.style = e.generateStyle(this) : cn(e) ? t.style = Nr.fromJson(this, e) : ht(e) ? t.style = Nr.fromString(this, e) : t.style = Nr(this), t.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function() { this.mutableElements().updateStyle(); } }, hse = "single", Vl = { autolock: function(e) { if (e !== void 0) this._private.autolock = !!e; else return this._private.autolock; return this; }, autoungrabify: function(e) { if (e !== void 0) this._private.autoungrabify = !!e; else return this._private.autoungrabify; return this; }, autounselectify: function(e) { if (e !== void 0) this._private.autounselectify = !!e; else return this._private.autounselectify; return this; }, selectionType: function(e) { var t = this._private; if (t.selectionType == null && (t.selectionType = hse), e !== void 0) (e === "additive" || e === "single") && (t.selectionType = e); else return t.selectionType; return this; }, panningEnabled: function(e) { if (e !== void 0) this._private.panningEnabled = !!e; else return this._private.panningEnabled; return this; }, userPanningEnabled: function(e) { if (e !== void 0) this._private.userPanningEnabled = !!e; else return this._private.userPanningEnabled; return this; }, zoomingEnabled: function(e) { if (e !== void 0) this._private.zoomingEnabled = !!e; else return this._private.zoomingEnabled; return this; }, userZoomingEnabled: function(e) { if (e !== void 0) this._private.userZoomingEnabled = !!e; else return this._private.userZoomingEnabled; return this; }, boxSelectionEnabled: function(e) { if (e !== void 0) this._private.boxSelectionEnabled = !!e; else return this._private.boxSelectionEnabled; return this; }, pan: function() { var e = arguments, t = this._private.pan, n, r, o, a, i; switch (e.length) { case 0: return t; case 1: if (ht(e[0])) return n = e[0], t[n]; if (Ht(e[0])) { if (!this._private.panningEnabled) return this; o = e[0], a = o.x, i = o.y, Ke(a) && (t.x = a), Ke(i) && (t.y = i), this.emit("pan viewport"); } break; case 2: if (!this._private.panningEnabled) return this; n = e[0], r = e[1], (n === "x" || n === "y") && Ke(r) && (t[n] = r), this.emit("pan viewport"); break; } return this.notify("viewport"), this; }, panBy: function(e, t) { var n = arguments, r = this._private.pan, o, a, i, s, l; if (!this._private.panningEnabled) return this; switch (n.length) { case 1: Ht(e) && (i = n[0], s = i.x, l = i.y, Ke(s) && (r.x += s), Ke(l) && (r.y += l), this.emit("pan viewport")); break; case 2: o = e, a = t, (o === "x" || o === "y") && Ke(a) && (r[o] += a), this.emit("pan viewport"); break; } return this.notify("viewport"), this; }, fit: function(e, t) { var n = this.getFitViewport(e, t); if (n) { var r = this._private; r.zoom = n.zoom, r.pan = n.pan, this.emit("pan zoom viewport"), this.notify("viewport"); } return this; }, getFitViewport: function(e, t) { if (Ke(e) && t === void 0 && (t = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { var n; if (ht(e)) { var r = e; e = this.$(r); } else if (gte(e)) { var o = e; n = { x1: o.x1, y1: o.y1, x2: o.x2, y2: o.y2 }, n.w = n.x2 - n.x1, n.h = n.y2 - n.y1; } else Eo(e) || (e = this.mutableElements()); if (!(Eo(e) && e.empty())) { n = n || e.boundingBox(); var a = this.width(), i = this.height(), s; if (t = Ke(t) ? t : 0, !isNaN(a) && !isNaN(i) && a > 0 && i > 0 && !isNaN(n.w) && !isNaN(n.h) && n.w > 0 && n.h > 0) { s = Math.min((a - 2 * t) / n.w, (i - 2 * t) / n.h), s = s > this._private.maxZoom ? this._private.maxZoom : s, s = s < this._private.minZoom ? this._private.minZoom : s; var l = { // now pan to middle x: (a - s * (n.x1 + n.x2)) / 2, y: (i - s * (n.y1 + n.y2)) / 2 }; return { zoom: s, pan: l }; } } } }, zoomRange: function(e, t) { var n = this._private; if (t == null) { var r = e; e = r.min, t = r.max; } return Ke(e) && Ke(t) && e <= t ? (n.minZoom = e, n.maxZoom = t) : Ke(e) && t === void 0 && e <= n.maxZoom ? n.minZoom = e : Ke(t) && e === void 0 && t >= n.minZoom && (n.maxZoom = t), this; }, minZoom: function(e) { return e === void 0 ? this._private.minZoom : this.zoomRange({ min: e }); }, maxZoom: function(e) { return e === void 0 ? this._private.maxZoom : this.zoomRange({ max: e }); }, getZoomedViewport: function(e) { var t = this._private, n = t.pan, r = t.zoom, o, a, i = !1; if (t.zoomingEnabled || (i = !0), Ke(e) ? a = e : Ht(e) && (a = e.level, e.position != null ? o = ug(e.position, r, n) : e.renderedPosition != null && (o = e.renderedPosition), o != null && !t.panningEnabled && (i = !0)), a = a > t.maxZoom ? t.maxZoom : a, a = a < t.minZoom ? t.minZoom : a, i || !Ke(a) || a === r || o != null && (!Ke(o.x) || !Ke(o.y))) return null; if (o != null) { var s = n, l = r, u = a, c = { x: -u / l * (o.x - s.x) + o.x, y: -u / l * (o.y - s.y) + o.y }; return { zoomed: !0, panned: !0, zoom: u, pan: c }; } else return { zoomed: !0, panned: !1, zoom: a, pan: n }; }, zoom: function(e) { if (e === void 0) return this._private.zoom; var t = this.getZoomedViewport(e), n = this._private; return t == null || !t.zoomed ? this : (n.zoom = t.zoom, t.panned && (n.pan.x = t.pan.x, n.pan.y = t.pan.y), this.emit("zoom" + (t.panned ? " pan" : "") + " viewport"), this.notify("viewport"), this); }, viewport: function(e) { var t = this._private, n = !0, r = !0, o = [], a = !1, i = !1; if (!e) return this; if (Ke(e.zoom) || (n = !1), Ht(e.pan) || (r = !1), !n && !r) return this; if (n) { var s = e.zoom; s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? a = !0 : (t.zoom = s, o.push("zoom")); } if (r && (!a || !e.cancelOnFailedZoom) && t.panningEnabled) { var l = e.pan; Ke(l.x) && (t.pan.x = l.x, i = !1), Ke(l.y) && (t.pan.y = l.y, i = !1), i || o.push("pan"); } return o.length > 0 && (o.push("viewport"), this.emit(o.join(" ")), this.notify("viewport")), this; }, center: function(e) { var t = this.getCenterPan(e); return t && (this._private.pan = t, this.emit("pan viewport"), this.notify("viewport")), this; }, getCenterPan: function(e, t) { if (this._private.panningEnabled) { if (ht(e)) { var n = e; e = this.mutableElements().filter(n); } else Eo(e) || (e = this.mutableElements()); if (e.length !== 0) { var r = e.boundingBox(), o = this.width(), a = this.height(); t = t === void 0 ? this._private.zoom : t; var i = { // middle x: (o - t * (r.x1 + r.x2)) / 2, y: (a - t * (r.y1 + r.y2)) / 2 }; return i; } } }, reset: function() { return !this._private.panningEnabled || !this._private.zoomingEnabled ? this : (this.viewport({ pan: { x: 0, y: 0 }, zoom: 1 }), this); }, invalidateSize: function() { this._private.sizeCache = null; }, size: function() { var e = this._private, t = e.container, n = this; return e.sizeCache = e.sizeCache || (t ? function() { var r = n.window().getComputedStyle(t), o = function(a) { return parseFloat(r.getPropertyValue(a)); }; return { width: t.clientWidth - o("padding-left") - o("padding-right"), height: t.clientHeight - o("padding-top") - o("padding-bottom") }; }() : { // fallback if no container (not 0 b/c can be used for dividing etc) width: 1, height: 1 }); }, width: function() { return this.size().width; }, height: function() { return this.size().height; }, extent: function() { var e = this._private.pan, t = this._private.zoom, n = this.renderedExtent(), r = { x1: (n.x1 - e.x) / t, x2: (n.x2 - e.x) / t, y1: (n.y1 - e.y) / t, y2: (n.y2 - e.y) / t }; return r.w = r.x2 - r.x1, r.h = r.y2 - r.y1, r; }, renderedExtent: function() { var e = this.width(), t = this.height(); return { x1: 0, y1: 0, x2: e, y2: t, w: e, h: t }; }, multiClickDebounceTime: function(e) { if (e) this._private.multiClickDebounceTime = e; else return this._private.multiClickDebounceTime; return this; } }; Vl.centre = Vl.center; Vl.autolockNodes = Vl.autolock; Vl.autoungrabifyNodes = Vl.autoungrabify; var kp = { data: en.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeData: en.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), scratch: en.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: en.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }) }; kp.attr = kp.data; kp.removeAttr = kp.removeData; var Cp = function(e) { var t = this; e = kt({}, e); var n = e.container; n && !Lv(n) && Lv(n[0]) && (n = n[0]); var r = n ? n._cyreg : null; r = r || {}, r && r.cy && (r.cy.destroy(), r = {}); var o = r.readies = r.readies || []; n && (n._cyreg = r), r.cy = t; var a = Jn !== void 0 && n !== void 0 && !e.headless, i = e; i.layout = kt({ name: a ? "grid" : "null" }, i.layout), i.renderer = kt({ name: a ? "canvas" : "null" }, i.renderer); var s = function(f, h, p) { return h !== void 0 ? h : p !== void 0 ? p : f; }, l = this._private = { container: n, // html dom ele container ready: !1, // whether ready has been triggered options: i, // cached options elements: new Er(this), // elements in the graph listeners: [], // list of listeners aniEles: new Er(this), // elements being animated data: i.data || {}, // data for the core scratch: {}, // scratch object for core layout: null, renderer: null, destroyed: !1, // whether destroy was called notificationsEnabled: !0, // whether notifications are sent to the renderer minZoom: 1e-50, maxZoom: 1e50, zoomingEnabled: s(!0, i.zoomingEnabled), userZoomingEnabled: s(!0, i.userZoomingEnabled), panningEnabled: s(!0, i.panningEnabled), userPanningEnabled: s(!0, i.userPanningEnabled), boxSelectionEnabled: s(!0, i.boxSelectionEnabled), autolock: s(!1, i.autolock, i.autolockNodes), autoungrabify: s(!1, i.autoungrabify, i.autoungrabifyNodes), autounselectify: s(!1, i.autounselectify), styleEnabled: i.styleEnabled === void 0 ? a : i.styleEnabled, zoom: Ke(i.zoom) ? i.zoom : 1, pan: { x: Ht(i.pan) && Ke(i.pan.x) ? i.pan.x : 0, y: Ht(i.pan) && Ke(i.pan.y) ? i.pan.y : 0 }, animation: { // object for currently-running animations current: [], queue: [] }, hasCompoundNodes: !1, multiClickDebounceTime: s(250, i.multiClickDebounceTime) }; this.createEmitter(), this.selectionType(i.selectionType), this.zoomRange({ min: i.minZoom, max: i.maxZoom }); var u = function(f, h) { var p = f.some(mte); if (p) return Dc.all(f).then(h); h(f); }; l.styleEnabled && t.setStyle([]); var c = kt({}, i, i.renderer); t.initRenderer(c); var d = function(f, h, p) { t.notifications(!1); var v = t.mutableElements(); v.length > 0 && v.remove(), f != null && (Ht(f) || cn(f)) && t.add(f), t.one("layoutready", function(g) { t.notifications(!0), t.emit(g), t.one("load", h), t.emitAndNotify("load"); }).one("layoutstop", function() { t.one("done", p), t.emit("done"); }); var m = kt({}, t._private.options.layout); m.eles = t.elements(), t.layout(m).run(); }; u([i.style, i.elements], function(f) { var h = f[0], p = f[1]; l.styleEnabled && t.style().append(h), d(p, function() { t.startAnimationLoop(), l.ready = !0, An(i.ready) && t.on("ready", i.ready); for (var v = 0; v < o.length; v++) { var m = o[v]; t.on("ready", m); } r && (r.readies = []), t.emit("ready"); }, i.done); }); }, Vv = Cp.prototype; kt(Vv, { instanceString: function() { return "core"; }, isReady: function() { return this._private.ready; }, destroyed: function() { return this._private.destroyed; }, ready: function(e) { return this.isReady() ? this.emitter().emit("ready", [], e) : this.on("ready", e), this; }, destroy: function() { var e = this; if (!e.destroyed()) return e.stopAnimationLoop(), e.destroyRenderer(), this.emit("destroy"), e._private.destroyed = !0, e; }, hasElementWithId: function(e) { return this._private.elements.hasElementWithId(e); }, getElementById: function(e) { return this._private.elements.getElementById(e); }, hasCompoundNodes: function() { return this._private.hasCompoundNodes; }, headless: function() { return this._private.renderer.isHeadless(); }, styleEnabled: function() { return this._private.styleEnabled; }, addToPool: function(e) { return this._private.elements.merge(e), this; }, removeFromPool: function(e) { return this._private.elements.unmerge(e), this; }, container: function() { return this._private.container || null; }, window: function() { var e = this._private.container; if (e == null) return Jn; var t = this._private.container.ownerDocument; return t === void 0 || t == null ? Jn : t.defaultView || Jn; }, mount: function(e) { if (e != null) { var t = this, n = t._private, r = n.options; return !Lv(e) && Lv(e[0]) && (e = e[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e, n.styleEnabled = !0, t.invalidateSize(), t.initRenderer(kt({}, r, r.renderer, { // allow custom renderer name to be re-used, otherwise use canvas name: r.renderer.name === "null" ? "canvas" : r.renderer.name })), t.startAnimationLoop(), t.style(r.style), t.emit("mount"), t; } }, unmount: function() { var e = this; return e.stopAnimationLoop(), e.destroyRenderer(), e.initRenderer({ name: "null" }), e.emit("unmount"), e; }, options: function() { return Na(this._private.options); }, json: function(e) { var t = this, n = t._private, r = t.mutableElements(), o = function(b) { return t.getElementById(b.id()); }; if (Ht(e)) { if (t.startBatch(), e.elements) { var a = {}, i = function(b, C) { for (var x = [], w = [], k = 0; k < b.length; k++) { var S = b[k]; if (!S.data.id) { tn("cy.json() cannot handle elements without an ID attribute"); continue; } var _ = "" + S.data.id, O = t.getElementById(_); a[_] = !0, O.length !== 0 ? w.push({ ele: O, json: S }) : (C && (S.group = C), x.push(S)); } t.add(x); for (var F = 0; F < w.length; F++) { var I = w[F], P = I.ele, M = I.json; P.json(M); } }; if (cn(e.elements)) i(e.elements); else for (var s = ["nodes", "edges"], l = 0; l < s.length; l++) { var u = s[l], c = e.elements[u]; cn(c) && i(c, u); } var d = t.collection(); r.filter(function(b) { return !a[b.id()]; }).forEach(function(b) { b.isParent() ? d.merge(b) : b.remove(); }), d.forEach(function(b) { return b.children().move({ parent: null }); }), d.forEach(function(b) { return o(b).remove(); }); } e.style && t.style(e.style), e.zoom != null && e.zoom !== n.zoom && t.zoom(e.zoom), e.pan && (e.pan.x !== n.pan.x || e.pan.y !== n.pan.y) && t.pan(e.pan), e.data && t.data(e.data); for (var f = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"], h = 0; h < f.length; h++) { var p = f[h]; e[p] != null && t[p](e[p]); } return t.endBatch(), this; } else { var v = !!e, m = {}; v ? m.elements = this.elements().map(function(b) { return b.json(); }) : (m.elements = {}, r.forEach(function(b) { var C = b.group(); m.elements[C] || (m.elements[C] = []), m.elements[C].push(b.json()); })), this._private.styleEnabled && (m.style = t.style().json()), m.data = Na(t.data()); var g = n.options; return m.zoomingEnabled = n.zoomingEnabled, m.userZoomingEnabled = n.userZoomingEnabled, m.zoom = n.zoom, m.minZoom = n.minZoom, m.maxZoom = n.maxZoom, m.panningEnabled = n.panningEnabled, m.userPanningEnabled = n.userPanningEnabled, m.pan = Na(n.pan), m.boxSelectionEnabled = n.boxSelectionEnabled, m.renderer = Na(g.renderer), m.hideEdgesOnViewport = g.hideEdgesOnViewport, m.textureOnViewport = g.textureOnViewport, m.wheelSensitivity = g.wheelSensitivity, m.motionBlur = g.motionBlur, m.multiClickDebounceTime = g.multiClickDebounceTime, m; } } }); Vv.$id = Vv.getElementById; [rse, lse, sT, hy, Qh, cse, vy, ev, fse, Vl, kp].forEach(function(e) { kt(Vv, e); }); var vse = { fit: !0, // whether to fit the viewport to the graph directed: !1, // whether the tree is directed downwards (or edges can point in any direction if false) padding: 30, // padding on fit circle: !1, // put depths in concentric circles if true, put depths top down if false grid: !1, // whether to create an even grid into which the DAG is placed (circle:false only) spacingFactor: 1.75, // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm roots: void 0, // the roots of the trees depthSort: void 0, // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled, animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }, gse = { maximal: !1, // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also acyclic: !1 // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops }, $u = function(e) { return e.scratch("breadthfirst"); }, h3 = function(e, t) { return e.scratch("breadthfirst", t); }; function lT(e) { this.options = kt({}, vse, gse, e); } lT.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, o = r.nodes().filter(function(_e) { return !_e.isParent(); }), a = r, i = t.directed, s = t.acyclic || t.maximal || t.maximalAdjustments > 0, l = yo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), u; if (Eo(t.roots)) u = t.roots; else if (cn(t.roots)) { for (var c = [], d = 0; d < t.roots.length; d++) { var f = t.roots[d], h = n.getElementById(f); c.push(h); } u = n.collection(c); } else if (ht(t.roots)) u = n.$(t.roots); else if (i) u = o.roots(); else { var p = r.components(); u = n.collection(); for (var v = function(_e) { var ze = p[_e], Ie = ze.maxDegree(!1), He = ze.filter(function(qe) { return qe.degree(!1) === Ie; }); u = u.add(He); }, m = 0; m < p.length; m++) v(m); } var g = [], b = {}, C = function(_e, ze) { g[ze] == null && (g[ze] = []); var Ie = g[ze].length; g[ze].push(_e), h3(_e, { index: Ie, depth: ze }); }, x = function(_e, ze) { var Ie = $u(_e), He = Ie.depth, qe = Ie.index; g[He][qe] = null, C(_e, ze); }; a.bfs({ roots: u, directed: t.directed, visit: function(_e, ze, Ie, He, qe) { var et = _e[0], Ve = et.id(); C(et, qe), b[Ve] = !0; } }); for (var w = [], k = 0; k < o.length; k++) { var S = o[k]; b[S.id()] || w.push(S); } var _ = function(_e) { for (var ze = g[_e], Ie = 0; Ie < ze.length; Ie++) { var He = ze[Ie]; if (He == null) { ze.splice(Ie, 1), Ie--; continue; } h3(He, { depth: _e, index: Ie }); } }, O = function() { for (var _e = 0; _e < g.length; _e++) _(_e); }, F = function(_e, ze) { for (var Ie = $u(_e), He = _e.incomers().filter(function(T) { return T.isNode() && r.has(T); }), qe = -1, et = _e.id(), Ve = 0; Ve < He.length; Ve++) { var nt = He[Ve], ot = $u(nt); qe = Math.max(qe, ot.depth); } if (Ie.depth <= qe) { if (!t.acyclic && ze[et]) return null; var pt = qe + 1; return x(_e, pt), ze[et] = pt, !0; } return !1; }; if (i && s) { var I = [], P = {}, M = function(_e) { return I.push(_e); }, N = function() { return I.shift(); }; for (o.forEach(function(_e) { return I.push(_e); }); I.length > 0; ) { var j = N(), A = F(j, P); if (A) j.outgoers().filter(function(_e) { return _e.isNode() && r.has(_e); }).forEach(M); else if (A === null) { tn("Detected double maximal shift for node `" + j.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); break; } } } O(); var U = 0; if (t.avoidOverlap) for (var q = 0; q < o.length; q++) { var Y = o[q], ie = Y.layoutDimensions(t), re = ie.w, le = ie.h; U = Math.max(U, re, le); } var he = {}, we = function(_e) { if (he[_e.id()]) return he[_e.id()]; for (var ze = $u(_e).depth, Ie = _e.neighborhood(), He = 0, qe = 0, et = 0; et < Ie.length; et++) { var Ve = Ie[et]; if (!(Ve.isEdge() || Ve.isParent() || !o.has(Ve))) { var nt = $u(Ve); if (nt != null) { var ot = nt.index, pt = nt.depth; if (!(ot == null || pt == null)) { var T = g[pt].length; pt < ze && (He += ot / T, qe++); } } } } return qe = Math.max(1, qe), He = He / qe, qe === 0 && (He = 0), he[_e.id()] = He, He; }, be = function(_e, ze) { var Ie = we(_e), He = we(ze), qe = Ie - He; return qe === 0 ? l6(_e.id(), ze.id()) : qe; }; t.depthSort !== void 0 && (be = t.depthSort); for (var de = 0; de < g.length; de++) g[de].sort(be), _(de); for (var ae = [], ee = 0; ee < w.length; ee++) ae.push(w[ee]); g.unshift(ae), O(); for (var se = 0, pe = 0; pe < g.length; pe++) se = Math.max(g[pe].length, se); var Se = { x: l.x1 + l.w / 2, y: l.x1 + l.h / 2 }, Le = g.reduce(function(_e, ze) { return Math.max(_e, ze.length); }, 0), je = function(_e) { var ze = $u(_e), Ie = ze.depth, He = ze.index, qe = g[Ie].length, et = Math.max(l.w / ((t.grid ? Le : qe) + 1), U), Ve = Math.max(l.h / (g.length + 1), U), nt = Math.min(l.w / 2 / g.length, l.h / 2 / g.length); if (nt = Math.max(nt, U), t.circle) { var ot = nt * Ie + nt - (g.length > 0 && g[0].length <= 3 ? nt / 2 : 0), pt = 2 * Math.PI / g[Ie].length * He; return Ie === 0 && g[0].length === 1 && (ot = 1), { x: Se.x + ot * Math.cos(pt), y: Se.y + ot * Math.sin(pt) }; } else { var T = { x: Se.x + (He + 1 - (qe + 1) / 2) * et, y: (Ie + 1) * Ve }; return T; } }; return r.nodes().layoutPositions(this, t, je), this; }; var mse = { fit: !0, // whether to fit the viewport to the graph padding: 30, // the padding on fit boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox and radius if not enough space nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up radius: void 0, // the radius of the circle startAngle: 3 / 2 * Math.PI, // where nodes start in radians sweep: void 0, // how many radians should be between the first and last node (defaults to full circle) clockwise: !0, // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) sort: void 0, // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function uT(e) { this.options = kt({}, mse, e); } uT.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, o = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, a = r.nodes().not(":parent"); t.sort && (a = a.sort(t.sort)); for (var i = yo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), s = { x: i.x1 + i.w / 2, y: i.y1 + i.h / 2 }, l = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / a.length : t.sweep, u = l / Math.max(1, a.length - 1), c, d = 0, f = 0; f < a.length; f++) { var h = a[f], p = h.layoutDimensions(t), v = p.w, m = p.h; d = Math.max(d, v, m); } if (Ke(t.radius) ? c = t.radius : a.length <= 1 ? c = 0 : c = Math.min(i.h, i.w) / 2 - d, a.length > 1 && t.avoidOverlap) { d *= 1.75; var g = Math.cos(u) - Math.cos(0), b = Math.sin(u) - Math.sin(0), C = Math.sqrt(d * d / (g * g + b * b)); c = Math.max(C, c); } var x = function(w, k) { var S = t.startAngle + k * u * (o ? 1 : -1), _ = c * Math.cos(S), O = c * Math.sin(S), F = { x: s.x + _, y: s.y + O }; return F; }; return r.nodes().layoutPositions(this, t, x), this; }; var yse = { fit: !0, // whether to fit the viewport to the graph padding: 30, // the padding on fit startAngle: 3 / 2 * Math.PI, // where nodes start in radians sweep: void 0, // how many radians should be between the first and last node (defaults to full circle) clockwise: !0, // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) equidistant: !1, // whether levels have an equal radial distance betwen them, may cause bounding box overflow minNodeSpacing: 10, // min spacing between outside of nodes (used for radius adjustment) boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm height: void 0, // height of layout area (overrides container height) width: void 0, // width of layout area (overrides container width) spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up concentric: function(e) { return e.degree(); }, levelWidth: function(e) { return e.maxDegree() / 4; }, animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function cT(e) { this.options = kt({}, yse, e); } cT.prototype.run = function() { for (var e = this.options, t = e, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e.cy, o = t.eles, a = o.nodes().not(":parent"), i = yo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: r.width(), h: r.height() }), s = { x: i.x1 + i.w / 2, y: i.y1 + i.h / 2 }, l = [], u = 0, c = 0; c < a.length; c++) { var d = a[c], f = void 0; f = t.concentric(d), l.push({ value: f, node: d }), d._private.scratch.concentric = f; } a.updateStyle(); for (var h = 0; h < a.length; h++) { var p = a[h], v = p.layoutDimensions(t); u = Math.max(u, v.w, v.h); } l.sort(function(_e, ze) { return ze.value - _e.value; }); for (var m = t.levelWidth(a), g = [[]], b = g[0], C = 0; C < l.length; C++) { var x = l[C]; if (b.length > 0) { var w = Math.abs(b[0].value - x.value); w >= m && (b = [], g.push(b)); } b.push(x); } var k = u + t.minNodeSpacing; if (!t.avoidOverlap) { var S = g.length > 0 && g[0].length > 1, _ = Math.min(i.w, i.h) / 2 - k, O = _ / (g.length + S ? 1 : 0); k = Math.min(k, O); } for (var F = 0, I = 0; I < g.length; I++) { var P = g[I], M = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / P.length : t.sweep, N = P.dTheta = M / Math.max(1, P.length - 1); if (P.length > 1 && t.avoidOverlap) { var j = Math.cos(N) - Math.cos(0), A = Math.sin(N) - Math.sin(0), U = Math.sqrt(k * k / (j * j + A * A)); F = Math.max(U, F); } P.r = F, F += k; } if (t.equidistant) { for (var q = 0, Y = 0, ie = 0; ie < g.length; ie++) { var re = g[ie], le = re.r - Y; q = Math.max(q, le); } Y = 0; for (var he = 0; he < g.length; he++) { var we = g[he]; he === 0 && (Y = we.r), we.r = Y, Y += q; } } for (var be = {}, de = 0; de < g.length; de++) for (var ae = g[de], ee = ae.dTheta, se = ae.r, pe = 0; pe < ae.length; pe++) { var Se = ae[pe], Le = t.startAngle + (n ? 1 : -1) * ee * pe, je = { x: s.x + se * Math.cos(Le), y: s.y + se * Math.sin(Le) }; be[Se.node.id()] = je; } return o.nodes().layoutPositions(this, t, function(_e) { var ze = _e.id(); return be[ze]; }), this; }; var Zm, bse = { // Called on `layoutready` ready: function() { }, // Called on `layoutstop` stop: function() { }, // Whether to animate while running the layout // true : Animate continuously as the layout is running // false : Just show the end result // 'end' : Animate with the end result, from the initial positions to the end positions animate: !0, // Easing of the animation for animate:'end' animationEasing: void 0, // The duration of the animation for animate:'end' animationDuration: void 0, // A function that determines whether the node should be animated // All nodes animated by default on animate enabled // Non-animated nodes are positioned immediately when the layout starts animateFilter: function(e, t) { return !0; }, // The layout animates only after this many milliseconds for animate:true // (prevents flashing on fast runs) animationThreshold: 250, // Number of iterations between consecutive screen positions update refresh: 20, // Whether to fit the network view after when done fit: !0, // Padding on fit padding: 30, // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } boundingBox: void 0, // Excludes the label when calculating node bounding boxes for the layout algorithm nodeDimensionsIncludeLabels: !1, // Randomize the initial positions of the nodes (true) or use existing positions (false) randomize: !1, // Extra spacing between components in non-compound graphs componentSpacing: 40, // Node repulsion (non overlapping) multiplier nodeRepulsion: function(e) { return 2048; }, // Node repulsion (overlapping) multiplier nodeOverlap: 4, // Ideal edge (non nested) length idealEdgeLength: function(e) { return 32; }, // Divisor to compute edge forces edgeElasticity: function(e) { return 32; }, // Nesting factor (multiplier) to compute ideal edge length for nested edges nestingFactor: 1.2, // Gravity force (constant) gravity: 1, // Maximum number of iterations to perform numIter: 1e3, // Initial temperature (maximum node displacement) initialTemp: 1e3, // Cooling factor (how the temperature is reduced between consecutive iterations coolingFactor: 0.99, // Lower temperature threshold (below this point the layout will end) minTemp: 1 }; function wg(e) { this.options = kt({}, bse, e), this.options.layout = this; var t = this.options.eles.nodes(), n = this.options.eles.edges(), r = n.filter(function(o) { var a = o.source().data("id"), i = o.target().data("id"), s = t.some(function(u) { return u.data("id") === a; }), l = t.some(function(u) { return u.data("id") === i; }); return !s || !l; }); this.options.eles = this.options.eles.not(r); } wg.prototype.run = function() { var e = this.options, t = e.cy, n = this; n.stopped = !1, (e.animate === !0 || e.animate === !1) && n.emit({ type: "layoutstart", layout: n }), e.debug === !0 ? Zm = !0 : Zm = !1; var r = wse(t, n, e); Zm && Cse(r), e.randomize && Sse(r); var o = Pi(), a = function() { Ese(r, t, e), e.fit === !0 && t.fit(e.padding); }, i = function(d) { return !(n.stopped || d >= e.numIter || ($se(r, e), r.temperature = r.temperature * e.coolingFactor, r.temperature < e.minTemp)); }, s = function() { if (e.animate === !0 || e.animate === !1) a(), n.one("layoutstop", e.stop), n.emit({ type: "layoutstop", layout: n }); else { var d = e.eles.nodes(), f = dT(r, e, d); d.layoutPositions(n, e, f); } }, l = 0, u = !0; if (e.animate === !0) { var c = function d() { for (var f = 0; u && f < e.refresh; ) u = i(l), l++, f++; if (!u) g3(r, e), s(); else { var h = Pi(); h - o >= e.animationThreshold && a(), Rv(d); } }; c(); } else { for (; u; ) u = i(l), l++; g3(r, e), s(); } return this; }; wg.prototype.stop = function() { return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; wg.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; var wse = function(e, t, n) { for (var r = n.eles.edges(), o = n.eles.nodes(), a = yo(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, w: e.width(), h: e.height() }), i = { isCompound: e.hasCompoundNodes(), layoutNodes: [], idToIndex: {}, nodeSize: o.size(), graphSet: [], indexToGraph: [], layoutEdges: [], edgeSize: r.size(), temperature: n.initialTemp, clientWidth: a.w, clientHeight: a.h, boundingBox: a }, s = n.eles.components(), l = {}, u = 0; u < s.length; u++) for (var c = s[u], d = 0; d < c.length; d++) { var f = c[d]; l[f.id()] = u; } for (var u = 0; u < i.nodeSize; u++) { var h = o[u], p = h.layoutDimensions(n), v = {}; v.isLocked = h.locked(), v.id = h.data("id"), v.parentId = h.data("parent"), v.cmptId = l[h.id()], v.children = [], v.positionX = h.position("x"), v.positionY = h.position("y"), v.offsetX = 0, v.offsetY = 0, v.height = p.w, v.width = p.h, v.maxX = v.positionX + v.width / 2, v.minX = v.positionX - v.width / 2, v.maxY = v.positionY + v.height / 2, v.minY = v.positionY - v.height / 2, v.padLeft = parseFloat(h.style("padding")), v.padRight = parseFloat(h.style("padding")), v.padTop = parseFloat(h.style("padding")), v.padBottom = parseFloat(h.style("padding")), v.nodeRepulsion = An(n.nodeRepulsion) ? n.nodeRepulsion(h) : n.nodeRepulsion, i.layoutNodes.push(v), i.idToIndex[v.id] = u; } for (var m = [], g = 0, b = -1, C = [], u = 0; u < i.nodeSize; u++) { var h = i.layoutNodes[u], x = h.parentId; x != null ? i.layoutNodes[i.idToIndex[x]].children.push(h.id) : (m[++b] = h.id, C.push(h.id)); } for (i.graphSet.push(C); g <= b; ) { var w = m[g++], k = i.idToIndex[w], f = i.layoutNodes[k], S = f.children; if (S.length > 0) { i.graphSet.push(S); for (var u = 0; u < S.length; u++) m[++b] = S[u]; } } for (var u = 0; u < i.graphSet.length; u++) for (var _ = i.graphSet[u], d = 0; d < _.length; d++) { var O = i.idToIndex[_[d]]; i.indexToGraph[O] = u; } for (var u = 0; u < i.edgeSize; u++) { var F = r[u], I = {}; I.id = F.data("id"), I.sourceId = F.data("source"), I.targetId = F.data("target"); var P = An(n.idealEdgeLength) ? n.idealEdgeLength(F) : n.idealEdgeLength, M = An(n.edgeElasticity) ? n.edgeElasticity(F) : n.edgeElasticity, N = i.idToIndex[I.sourceId], j = i.idToIndex[I.targetId], A = i.indexToGraph[N], U = i.indexToGraph[j]; if (A != U) { for (var q = xse(I.sourceId, I.targetId, i), Y = i.graphSet[q], ie = 0, v = i.layoutNodes[N]; Y.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], ie++; for (v = i.layoutNodes[j]; Y.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], ie++; P *= ie * n.nestingFactor; } I.idealLength = P, I.elasticity = M, i.layoutEdges.push(I); } return i; }, xse = function(e, t, n) { var r = kse(e, t, 0, n); return 2 > r.count ? 0 : r.graph; }, kse = function e(t, n, r, o) { var a = o.graphSet[r]; if (-1 < a.indexOf(t) && -1 < a.indexOf(n)) return { count: 2, graph: r }; for (var i = 0, s = 0; s < a.length; s++) { var l = a[s], u = o.idToIndex[l], c = o.layoutNodes[u].children; if (c.length !== 0) { var d = o.indexToGraph[o.idToIndex[c[0]]], f = e(t, n, d, o); if (f.count !== 0) if (f.count === 1) { if (i++, i === 2) break; } else return f; } } return { count: i, graph: r }; }, Cse, Sse = function(e, t) { for (var n = e.clientWidth, r = e.clientHeight, o = 0; o < e.nodeSize; o++) { var a = e.layoutNodes[o]; a.children.length === 0 && !a.isLocked && (a.positionX = Math.random() * n, a.positionY = Math.random() * r); } }, dT = function(e, t, n) { var r = e.boundingBox, o = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }; return t.boundingBox && (n.forEach(function(a) { var i = e.layoutNodes[e.idToIndex[a.data("id")]]; o.x1 = Math.min(o.x1, i.positionX), o.x2 = Math.max(o.x2, i.positionX), o.y1 = Math.min(o.y1, i.positionY), o.y2 = Math.max(o.y2, i.positionY); }), o.w = o.x2 - o.x1, o.h = o.y2 - o.y1), function(a, i) { var s = e.layoutNodes[e.idToIndex[a.data("id")]]; if (t.boundingBox) { var l = (s.positionX - o.x1) / o.w, u = (s.positionY - o.y1) / o.h; return { x: r.x1 + l * r.w, y: r.y1 + u * r.h }; } else return { x: s.positionX, y: s.positionY }; }; }, Ese = function(e, t, n) { var r = n.layout, o = n.eles.nodes(), a = dT(e, n, o); o.positions(a), e.ready !== !0 && (e.ready = !0, r.one("layoutready", n.ready), r.emit({ type: "layoutready", layout: this })); }, $se = function(e, t, n) { _se(e, t), Fse(e), Ise(e, t), Ase(e), Pse(e); }, _se = function(e, t) { for (var n = 0; n < e.graphSet.length; n++) for (var r = e.graphSet[n], o = r.length, a = 0; a < o; a++) for (var i = e.layoutNodes[e.idToIndex[r[a]]], s = a + 1; s < o; s++) { var l = e.layoutNodes[e.idToIndex[r[s]]]; Tse(i, l, e, t); } }, v3 = function(e) { return -e + 2 * e * Math.random(); }, Tse = function(e, t, n, r) { var o = e.cmptId, a = t.cmptId; if (!(o !== a && !n.isCompound)) { var i = t.positionX - e.positionX, s = t.positionY - e.positionY, l = 1; i === 0 && s === 0 && (i = v3(l), s = v3(l)); var u = Ose(e, t, i, s); if (u > 0) var m = r.nodeOverlap * u, v = Math.sqrt(i * i + s * s), g = m * i / v, b = m * s / v; else var c = jv(e, i, s), d = jv(t, -1 * i, -1 * s), f = d.x - c.x, h = d.y - c.y, p = f * f + h * h, v = Math.sqrt(p), m = (e.nodeRepulsion + t.nodeRepulsion) / p, g = m * f / v, b = m * h / v; e.isLocked || (e.offsetX -= g, e.offsetY -= b), t.isLocked || (t.offsetX += g, t.offsetY += b); } }, Ose = function(e, t, n, r) { if (n > 0) var o = e.maxX - t.minX; else var o = t.maxX - e.minX; if (r > 0) var a = e.maxY - t.minY; else var a = t.maxY - e.minY; return o >= 0 && a >= 0 ? Math.sqrt(o * o + a * a) : 0; }, jv = function(e, t, n) { var r = e.positionX, o = e.positionY, a = e.height || 1, i = e.width || 1, s = n / t, l = a / i, u = {}; return t === 0 && 0 < n || t === 0 && 0 > n ? (u.x = r, u.y = o + a / 2, u) : 0 < t && -1 * l <= s && s <= l ? (u.x = r + i / 2, u.y = o + i * n / 2 / t, u) : 0 > t && -1 * l <= s && s <= l ? (u.x = r - i / 2, u.y = o - i * n / 2 / t, u) : 0 < n && (s <= -1 * l || s >= l) ? (u.x = r + a * t / 2 / n, u.y = o + a / 2, u) : (0 > n && (s <= -1 * l || s >= l) && (u.x = r - a * t / 2 / n, u.y = o - a / 2), u); }, Fse = function(e, t) { for (var n = 0; n < e.edgeSize; n++) { var r = e.layoutEdges[n], o = e.idToIndex[r.sourceId], a = e.layoutNodes[o], i = e.idToIndex[r.targetId], s = e.layoutNodes[i], l = s.positionX - a.positionX, u = s.positionY - a.positionY; if (!(l === 0 && u === 0)) { var c = jv(a, l, u), d = jv(s, -1 * l, -1 * u), f = d.x - c.x, h = d.y - c.y, p = Math.sqrt(f * f + h * h), v = Math.pow(r.idealLength - p, 2) / r.elasticity; if (p !== 0) var m = v * f / p, g = v * h / p; else var m = 0, g = 0; a.isLocked || (a.offsetX += m, a.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g); } } }, Ise = function(e, t) { if (t.gravity !== 0) for (var n = 1, r = 0; r < e.graphSet.length; r++) { var o = e.graphSet[r], a = o.length; if (r === 0) var l = e.clientHeight / 2, u = e.clientWidth / 2; else var i = e.layoutNodes[e.idToIndex[o[0]]], s = e.layoutNodes[e.idToIndex[i.parentId]], l = s.positionX, u = s.positionY; for (var c = 0; c < a; c++) { var d = e.layoutNodes[e.idToIndex[o[c]]]; if (!d.isLocked) { var f = l - d.positionX, h = u - d.positionY, p = Math.sqrt(f * f + h * h); if (p > n) { var v = t.gravity * f / p, m = t.gravity * h / p; d.offsetX += v, d.offsetY += m; } } } } }, Ase = function(e, t) { var n = [], r = 0, o = -1; for (n.push.apply(n, e.graphSet[0]), o += e.graphSet[0].length; r <= o; ) { var a = n[r++], i = e.idToIndex[a], s = e.layoutNodes[i], l = s.children; if (0 < l.length && !s.isLocked) { for (var u = s.offsetX, c = s.offsetY, d = 0; d < l.length; d++) { var f = e.layoutNodes[e.idToIndex[l[d]]]; f.offsetX += u, f.offsetY += c, n[++o] = l[d]; } s.offsetX = 0, s.offsetY = 0; } } }, Pse = function(e, t) { for (var n = 0; n < e.nodeSize; n++) { var r = e.layoutNodes[n]; 0 < r.children.length && (r.maxX = void 0, r.minX = void 0, r.maxY = void 0, r.minY = void 0); } for (var n = 0; n < e.nodeSize; n++) { var r = e.layoutNodes[n]; if (!(0 < r.children.length || r.isLocked)) { var o = Lse(r.offsetX, r.offsetY, e.temperature); r.positionX += o.x, r.positionY += o.y, r.offsetX = 0, r.offsetY = 0, r.minX = r.positionX - r.width, r.maxX = r.positionX + r.width, r.minY = r.positionY - r.height, r.maxY = r.positionY + r.height, Rse(r, e); } } for (var n = 0; n < e.nodeSize; n++) { var r = e.layoutNodes[n]; 0 < r.children.length && !r.isLocked && (r.positionX = (r.maxX + r.minX) / 2, r.positionY = (r.maxY + r.minY) / 2, r.width = r.maxX - r.minX, r.height = r.maxY - r.minY); } }, Lse = function(e, t, n) { var r = Math.sqrt(e * e + t * t); if (r > n) var o = { x: n * e / r, y: n * t / r }; else var o = { x: e, y: t }; return o; }, Rse = function e(t, n) { var r = t.parentId; if (r != null) { var o = n.layoutNodes[n.idToIndex[r]], a = !1; if ((o.maxX == null || t.maxX + o.padRight > o.maxX) && (o.maxX = t.maxX + o.padRight, a = !0), (o.minX == null || t.minX - o.padLeft < o.minX) && (o.minX = t.minX - o.padLeft, a = !0), (o.maxY == null || t.maxY + o.padBottom > o.maxY) && (o.maxY = t.maxY + o.padBottom, a = !0), (o.minY == null || t.minY - o.padTop < o.minY) && (o.minY = t.minY - o.padTop, a = !0), a) return e(o, n); } }, g3 = function(e, t) { for (var n = e.layoutNodes, r = [], o = 0; o < n.length; o++) { var a = n[o], i = a.cmptId, s = r[i] = r[i] || []; s.push(a); } for (var l = 0, o = 0; o < r.length; o++) { var u = r[o]; if (u) { u.x1 = 1 / 0, u.x2 = -1 / 0, u.y1 = 1 / 0, u.y2 = -1 / 0; for (var c = 0; c < u.length; c++) { var d = u[c]; u.x1 = Math.min(u.x1, d.positionX - d.width / 2), u.x2 = Math.max(u.x2, d.positionX + d.width / 2), u.y1 = Math.min(u.y1, d.positionY - d.height / 2), u.y2 = Math.max(u.y2, d.positionY + d.height / 2); } u.w = u.x2 - u.x1, u.h = u.y2 - u.y1, l += u.w * u.h; } } r.sort(function(g, b) { return b.w * b.h - g.w * g.h; }); for (var f = 0, h = 0, p = 0, v = 0, m = Math.sqrt(l) * e.clientWidth / e.clientHeight, o = 0; o < r.length; o++) { var u = r[o]; if (u) { for (var c = 0; c < u.length; c++) { var d = u[c]; d.isLocked || (d.positionX += f - u.x1, d.positionY += h - u.y1); } f += u.w + t.componentSpacing, p += u.w + t.componentSpacing, v = Math.max(v, u.h), p > m && (h += v + t.componentSpacing, f = 0, p = 0, v = 0); } } }, Dse = { fit: !0, // whether to fit the viewport to the graph padding: 30, // padding used on fit boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: !0, // prevents node overlap, may overflow boundingBox if not enough space avoidOverlapPadding: 10, // extra spacing around nodes when avoidOverlap: true nodeDimensionsIncludeLabels: !1, // Excludes the label when calculating node bounding boxes for the layout algorithm spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up condense: !1, // uses all available space on false, uses minimal space on true rows: void 0, // force num of rows in the grid cols: void 0, // force num of columns in the grid position: function(e) { }, // returns { row, col } for element sort: void 0, // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function pT(e) { this.options = kt({}, Dse, e); } pT.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, o = r.nodes().not(":parent"); t.sort && (o = o.sort(t.sort)); var a = yo(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }); if (a.h === 0 || a.w === 0) r.nodes().layoutPositions(this, t, function(he) { return { x: a.x1, y: a.y1 }; }); else { var i = o.size(), s = Math.sqrt(i * a.h / a.w), l = Math.round(s), u = Math.round(a.w / a.h * s), c = function(he) { if (he == null) return Math.min(l, u); var we = Math.min(l, u); we == l ? l = he : u = he; }, d = function(he) { if (he == null) return Math.max(l, u); var we = Math.max(l, u); we == l ? l = he : u = he; }, f = t.rows, h = t.cols != null ? t.cols : t.columns; if (f != null && h != null) l = f, u = h; else if (f != null && h == null) l = f, u = Math.ceil(i / l); else if (f == null && h != null) u = h, l = Math.ceil(i / u); else if (u * l > i) { var p = c(), v = d(); (p - 1) * v >= i ? c(p - 1) : (v - 1) * p >= i && d(v - 1); } else for (; u * l < i; ) { var m = c(), g = d(); (g + 1) * m >= i ? d(g + 1) : c(m + 1); } var b = a.w / u, C = a.h / l; if (t.condense && (b = 0, C = 0), t.avoidOverlap) for (var x = 0; x < o.length; x++) { var w = o[x], k = w._private.position; (k.x == null || k.y == null) && (k.x = 0, k.y = 0); var S = w.layoutDimensions(t), _ = t.avoidOverlapPadding, O = S.w + _, F = S.h + _; b = Math.max(b, O), C = Math.max(C, F); } for (var I = {}, P = function(he, we) { return !!I["c-" + he + "-" + we]; }, M = function(he, we) { I["c-" + he + "-" + we] = !0; }, N = 0, j = 0, A = function() { j++, j >= u && (j = 0, N++); }, U = {}, q = 0; q < o.length; q++) { var Y = o[q], ie = t.position(Y); if (ie && (ie.row !== void 0 || ie.col !== void 0)) { var re = { row: ie.row, col: ie.col }; if (re.col === void 0) for (re.col = 0; P(re.row, re.col); ) re.col++; else if (re.row === void 0) for (re.row = 0; P(re.row, re.col); ) re.row++; U[Y.id()] = re, M(re.row, re.col); } } var le = function(he, we) { var be, de; if (he.locked() || he.isParent()) return !1; var ae = U[he.id()]; if (ae) be = ae.col * b + b / 2 + a.x1, de = ae.row * C + C / 2 + a.y1; else { for (; P(N, j); ) A(); be = j * b + b / 2 + a.x1, de = N * C + C / 2 + a.y1, M(N, j), A(); } return { x: be, y: de }; }; o.layoutPositions(this, t, le); } return this; }; var Mse = { ready: function() { }, // on layoutready stop: function() { } // on layoutstop }; function Y2(e) { this.options = kt({}, Mse, e); } Y2.prototype.run = function() { var e = this.options, t = e.eles, n = this; return e.cy, n.emit("layoutstart"), t.nodes().positions(function() { return { x: 0, y: 0 }; }), n.one("layoutready", e.ready), n.emit("layoutready"), n.one("layoutstop", e.stop), n.emit("layoutstop"), this; }; Y2.prototype.stop = function() { return this; }; var Nse = { positions: void 0, // map of (node id) => (position obj); or function(node){ return somPos; } zoom: void 0, // the zoom level to set (prob want fit = false if set) pan: void 0, // the pan level to set (prob want fit = false if set) fit: !0, // whether to fit to viewport padding: 30, // padding on fit spacingFactor: void 0, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function fT(e) { this.options = kt({}, Nse, e); } fT.prototype.run = function() { var e = this.options, t = e.eles, n = t.nodes(), r = An(e.positions); function o(a) { if (e.positions == null) return jne(a.position()); if (r) return e.positions(a); var i = e.positions[a._private.data.id]; return i ?? null; } return n.layoutPositions(this, e, function(a, i) { var s = o(a); return a.locked() || s == null ? !1 : s; }), this; }; var Bse = { fit: !0, // whether to fit to viewport padding: 30, // fit padding boundingBox: void 0, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } animate: !1, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: void 0, // easing of animation if enabled animateFilter: function(e, t) { return !0; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: void 0, // callback on layoutready stop: void 0, // callback on layoutstop transform: function(e, t) { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function hT(e) { this.options = kt({}, Bse, e); } hT.prototype.run = function() { var e = this.options, t = e.cy, n = e.eles, r = yo(e.boundingBox ? e.boundingBox : { x1: 0, y1: 0, w: t.width(), h: t.height() }), o = function(a, i) { return { x: r.x1 + Math.round(Math.random() * r.w), y: r.y1 + Math.round(Math.random() * r.h) }; }; return n.nodes().layoutPositions(this, e, o), this; }; var zse = [{ name: "breadthfirst", impl: lT }, { name: "circle", impl: uT }, { name: "concentric", impl: cT }, { name: "cose", impl: wg }, { name: "grid", impl: pT }, { name: "null", impl: Y2 }, { name: "preset", impl: fT }, { name: "random", impl: hT }]; function vT(e) { this.options = e, this.notifications = 0; } var m3 = function() { }, y3 = function() { throw new Error("A headless instance can not render images"); }; vT.prototype = { recalculateRenderedStyle: m3, notify: function() { this.notifications++; }, init: m3, isHeadless: function() { return !0; }, png: y3, jpg: y3 }; var X2 = {}; X2.arrowShapeWidth = 0.3; X2.registerArrowShapes = function() { var e = this.arrowShapes = {}, t = this, n = function(l, u, c, d, f, h, p) { var v = f.x - c / 2 - p, m = f.x + c / 2 + p, g = f.y - c / 2 - p, b = f.y + c / 2 + p, C = v <= l && l <= m && g <= u && u <= b; return C; }, r = function(l, u, c, d, f) { var h = l * Math.cos(d) - u * Math.sin(d), p = l * Math.sin(d) + u * Math.cos(d), v = h * c, m = p * c, g = v + f.x, b = m + f.y; return { x: g, y: b }; }, o = function(l, u, c, d) { for (var f = [], h = 0; h < l.length; h += 2) { var p = l[h], v = l[h + 1]; f.push(r(p, v, u, c, d)); } return f; }, a = function(l) { for (var u = [], c = 0; c < l.length; c++) { var d = l[c]; u.push(d.x, d.y); } return u; }, i = function(l) { return l.pstyle("width").pfValue * l.pstyle("arrow-scale").pfValue * 2; }, s = function(l, u) { ht(u) && (u = e[u]), e[l] = kt({ name: l, points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], collide: function(c, d, f, h, p, v) { var m = a(o(this.points, f + 2 * v, h, p)), g = ro(c, d, m); return g; }, roughCollide: n, draw: function(c, d, f, h) { var p = o(this.points, d, f, h); t.arrowShapeImpl("polygon")(c, p); }, spacing: function(c) { return 0; }, gap: i }, u); }; s("none", { collide: Dv, roughCollide: Dv, draw: R2, spacing: T5, gap: T5 }), s("triangle", { points: [-0.15, -0.3, 0, 0, 0.15, -0.3] }), s("arrow", "triangle"), s("triangle-backcurve", { points: e.triangle.points, controlPoint: [0, -0.15], roughCollide: n, draw: function(l, u, c, d, f) { var h = o(this.points, u, c, d), p = this.controlPoint, v = r(p[0], p[1], u, c, d); t.arrowShapeImpl(this.name)(l, h, v); }, gap: function(l) { return i(l) * 0.8; } }), s("triangle-tee", { points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], collide: function(l, u, c, d, f, h, p) { var v = a(o(this.points, c + 2 * p, d, f)), m = a(o(this.pointsTee, c + 2 * p, d, f)), g = ro(l, u, v) || ro(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = o(this.points, u, c, d), p = o(this.pointsTee, u, c, d); t.arrowShapeImpl(this.name)(l, h, p); } }), s("circle-triangle", { radius: 0.15, pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], collide: function(l, u, c, d, f, h, p) { var v = f, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * p) * this.radius, 2), g = a(o(this.points, c + 2 * p, d, f)); return ro(l, u, g) || m; }, draw: function(l, u, c, d, f) { var h = o(this.pointsTr, u, c, d); t.arrowShapeImpl(this.name)(l, h, d.x, d.y, this.radius * u); }, spacing: function(l) { return t.getArrowWidth(l.pstyle("width").pfValue, l.pstyle("arrow-scale").value) * this.radius; } }), s("triangle-cross", { points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], baseCrossLinePts: [ -0.15, -0.4, // first half of the rectangle -0.15, -0.4, 0.15, -0.4, // second half of the rectangle 0.15, -0.4 ], crossLinePts: function(l, u) { var c = this.baseCrossLinePts.slice(), d = u / l, f = 3, h = 5; return c[f] = c[f] - d, c[h] = c[h] - d, c; }, collide: function(l, u, c, d, f, h, p) { var v = a(o(this.points, c + 2 * p, d, f)), m = a(o(this.crossLinePts(c, h), c + 2 * p, d, f)), g = ro(l, u, v) || ro(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = o(this.points, u, c, d), p = o(this.crossLinePts(u, f), u, c, d); t.arrowShapeImpl(this.name)(l, h, p); } }), s("vee", { points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], gap: function(l) { return i(l) * 0.525; } }), s("circle", { radius: 0.15, collide: function(l, u, c, d, f, h, p) { var v = f, m = Math.pow(v.x - l, 2) + Math.pow(v.y - u, 2) <= Math.pow((c + 2 * p) * this.radius, 2); return m; }, draw: function(l, u, c, d, f) { t.arrowShapeImpl(this.name)(l, d.x, d.y, this.radius * u); }, spacing: function(l) { return t.getArrowWidth(l.pstyle("width").pfValue, l.pstyle("arrow-scale").value) * this.radius; } }), s("tee", { points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], spacing: function(l) { return 1; }, gap: function(l) { return 1; } }), s("square", { points: [-0.15, 0, 0.15, 0, 0.15, -0.3, -0.15, -0.3] }), s("diamond", { points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], gap: function(l) { return l.pstyle("width").pfValue * l.pstyle("arrow-scale").value; } }), s("chevron", { points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], gap: function(l) { return 0.95 * l.pstyle("width").pfValue * l.pstyle("arrow-scale").value; } }); }; var iu = {}; iu.projectIntoViewport = function(e, t) { var n = this.cy, r = this.findContainerClientCoords(), o = r[0], a = r[1], i = r[4], s = n.pan(), l = n.zoom(), u = ((e - o) / i - s.x) / l, c = ((t - a) / i - s.y) / l; return [u, c]; }; iu.findContainerClientCoords = function() { if (this.containerBB) return this.containerBB; var e = this.container, t = e.getBoundingClientRect(), n = this.cy.window().getComputedStyle(e), r = function(m) { return parseFloat(n.getPropertyValue(m)); }, o = { left: r("padding-left"), right: r("padding-right"), top: r("padding-top"), bottom: r("padding-bottom") }, a = { left: r("border-left-width"), right: r("border-right-width"), top: r("border-top-width"), bottom: r("border-bottom-width") }, i = e.clientWidth, s = e.clientHeight, l = o.left + o.right, u = o.top + o.bottom, c = a.left + a.right, d = t.width / (i + c), f = i - l, h = s - u, p = t.left + o.left + a.left, v = t.top + o.top + a.top; return this.containerBB = [p, v, f, h, d]; }; iu.invalidateContainerClientCoordsCache = function() { this.containerBB = null; }; iu.findNearestElement = function(e, t, n, r) { return this.findNearestElements(e, t, n, r)[0]; }; iu.findNearestElements = function(e, t, n, r) { var o = this, a = this, i = a.getCachedZSortedEles(), s = [], l = a.cy.zoom(), u = a.cy.hasCompoundNodes(), c = (r ? 24 : 8) / l, d = (r ? 8 : 2) / l, f = (r ? 8 : 2) / l, h = 1 / 0, p, v; n && (i = i.interactive); function m(S, _) { if (S.isNode()) { if (v) return; v = S, s.push(S); } if (S.isEdge() && (_ == null || _ < h)) if (p) { if (p.pstyle("z-compound-depth").value === S.pstyle("z-compound-depth").value && p.pstyle("z-compound-depth").value === S.pstyle("z-compound-depth").value) { for (var O = 0; O < s.length; O++) if (s[O].isEdge()) { s[O] = S, p = S, h = _ ?? h; break; } } } else s.push(S), p = S, h = _ ?? h; } function g(S) { var _ = S.outerWidth() + 2 * d, O = S.outerHeight() + 2 * d, F = _ / 2, I = O / 2, P = S.position(), M = S.pstyle("corner-radius").value === "auto" ? "auto" : S.pstyle("corner-radius").pfValue, N = S._private.rscratch; if (P.x - F <= e && e <= P.x + F && P.y - I <= t && t <= P.y + I) { var j = a.nodeShapes[o.getNodeShape(S)]; if (j.checkPoint(e, t, 0, _, O, P.x, P.y, M, N)) return m(S, 0), !0; } } function b(S) { var _ = S._private, O = _.rscratch, F = S.pstyle("width").pfValue, I = S.pstyle("arrow-scale").value, P = F / 2 + c, M = P * P, N = P * 2, j = _.source, A = _.target, U; if (O.edgeType === "segments" || O.edgeType === "straight" || O.edgeType === "haystack") { for (var q = O.allpts, Y = 0; Y + 3 < q.length; Y += 2) if (tre(e, t, q[Y], q[Y + 1], q[Y + 2], q[Y + 3], N) && M > (U = ire(e, t, q[Y], q[Y + 1], q[Y + 2], q[Y + 3]))) return m(S, U), !0; } else if (O.edgeType === "bezier" || O.edgeType === "multibezier" || O.edgeType === "self" || O.edgeType === "compound") { for (var q = O.allpts, Y = 0; Y + 5 < O.allpts.length; Y += 4) if (nre(e, t, q[Y], q[Y + 1], q[Y + 2], q[Y + 3], q[Y + 4], q[Y + 5], N) && M > (U = are(e, t, q[Y], q[Y + 1], q[Y + 2], q[Y + 3], q[Y + 4], q[Y + 5]))) return m(S, U), !0; } for (var j = j || _.source, A = A || _.target, ie = o.getArrowWidth(F, I), re = [{ name: "source", x: O.arrowStartX, y: O.arrowStartY, angle: O.srcArrowAngle }, { name: "target", x: O.arrowEndX, y: O.arrowEndY, angle: O.tgtArrowAngle }, { name: "mid-source", x: O.midX, y: O.midY, angle: O.midsrcArrowAngle }, { name: "mid-target", x: O.midX, y: O.midY, angle: O.midtgtArrowAngle }], Y = 0; Y < re.length; Y++) { var le = re[Y], he = a.arrowShapes[S.pstyle(le.name + "-arrow-shape").value], we = S.pstyle("width").pfValue; if (he.roughCollide(e, t, ie, le.angle, { x: le.x, y: le.y }, we, c) && he.collide(e, t, ie, le.angle, { x: le.x, y: le.y }, we, c)) return m(S), !0; } u && s.length > 0 && (g(j), g(A)); } function C(S, _, O) { return ha(S, _, O); } function x(S, _) { var O = S._private, F = f, I; _ ? I = _ + "-" : I = "", S.boundingBox(); var P = O.labelBounds[_ || "main"], M = S.pstyle(I + "label").value, N = S.pstyle("text-events").strValue === "yes"; if (!(!N || !M)) { var j = C(O.rscratch, "labelX", _), A = C(O.rscratch, "labelY", _), U = C(O.rscratch, "labelAngle", _), q = S.pstyle(I + "text-margin-x").pfValue, Y = S.pstyle(I + "text-margin-y").pfValue, ie = P.x1 - F - q, re = P.x2 + F - q, le = P.y1 - F - Y, he = P.y2 + F - Y; if (U) { var we = Math.cos(U), be = Math.sin(U), de = function(Le, je) { return Le = Le - j, je = je - A, { x: Le * we - je * be + j, y: Le * be + je * we + A }; }, ae = de(ie, le), ee = de(ie, he), se = de(re, le), pe = de(re, he), Se = [ // with the margin added after the rotation is applied ae.x + q, ae.y + Y, se.x + q, se.y + Y, pe.x + q, pe.y + Y, ee.x + q, ee.y + Y ]; if (ro(e, t, Se)) return m(S), !0; } else if (pc(P, e, t)) return m(S), !0; } } for (var w = i.length - 1; w >= 0; w--) { var k = i[w]; k.isNode() ? g(k) || x(k) : b(k) || x(k) || x(k, "source") || x(k, "target"); } return s; }; iu.getAllInBox = function(e, t, n, r) { var o = this.getCachedZSortedEles().interactive, a = [], i = Math.min(e, n), s = Math.max(e, n), l = Math.min(t, r), u = Math.max(t, r); e = i, n = s, t = l, r = u; for (var c = yo({ x1: e, y1: t, x2: n, y2: r }), d = 0; d < o.length; d++) { var f = o[d]; if (f.isNode()) { var h = f, p = h.boundingBox({ includeNodes: !0, includeEdges: !1, includeLabels: !1 }); N2(c, p) && !S6(p, c) && a.push(h); } else { var v = f, m = v._private, g = m.rscratch; if (g.startX != null && g.startY != null && !pc(c, g.startX, g.startY) || g.endX != null && g.endY != null && !pc(c, g.endX, g.endY)) continue; if (g.edgeType === "bezier" || g.edgeType === "multibezier" || g.edgeType === "self" || g.edgeType === "compound" || g.edgeType === "segments" || g.edgeType === "haystack") { for (var b = m.rstyle.bezierPts || m.rstyle.linePts || m.rstyle.haystackPts, C = !0, x = 0; x < b.length; x++) if (!ere(c, b[x])) { C = !1; break; } C && a.push(v); } else (g.edgeType === "haystack" || g.edgeType === "straight") && a.push(v); } } return a; }; var Hv = {}; Hv.calculateArrowAngles = function(e) { var t = e._private.rscratch, n = t.edgeType === "haystack", r = t.edgeType === "bezier", o = t.edgeType === "multibezier", a = t.edgeType === "segments", i = t.edgeType === "compound", s = t.edgeType === "self", l, u, c, d, f, h, g, b; if (n ? (c = t.haystackPts[0], d = t.haystackPts[1], f = t.haystackPts[2], h = t.haystackPts[3]) : (c = t.arrowStartX, d = t.arrowStartY, f = t.arrowEndX, h = t.arrowEndY), g = t.midX, b = t.midY, a) l = c - t.segpts[0], u = d - t.segpts[1]; else if (o || i || s || r) { var p = t.allpts, v = ur(p[0], p[2], p[4], 0.1), m = ur(p[1], p[3], p[5], 0.1); l = c - v, u = d - m; } else l = c - g, u = d - b; t.srcArrowAngle = ah(l, u); var g = t.midX, b = t.midY; if (n && (g = (c + f) / 2, b = (d + h) / 2), l = f - c, u = h - d, a) { var p = t.allpts; if (p.length / 2 % 2 === 0) { var C = p.length / 2, x = C - 2; l = p[C] - p[x], u = p[C + 1] - p[x + 1]; } else if (t.isRound) l = t.midVector[1], u = -t.midVector[0]; else { var C = p.length / 2 - 1, x = C - 2; l = p[C] - p[x], u = p[C + 1] - p[x + 1]; } } else if (o || i || s) { var p = t.allpts, w = t.ctrlpts, k, S, _, O; if (w.length / 2 % 2 === 0) { var F = p.length / 2 - 1, I = F + 2, P = I + 2; k = ur(p[F], p[I], p[P], 0), S = ur(p[F + 1], p[I + 1], p[P + 1], 0), _ = ur(p[F], p[I], p[P], 1e-4), O = ur(p[F + 1], p[I + 1], p[P + 1], 1e-4); } else { var I = p.length / 2 - 1, F = I - 2, P = I + 2; k = ur(p[F], p[I], p[P], 0.4999), S = ur(p[F + 1], p[I + 1], p[P + 1], 0.4999), _ = ur(p[F], p[I], p[P], 0.5), O = ur(p[F + 1], p[I + 1], p[P + 1], 0.5); } l = _ - k, u = O - S; } if (t.midtgtArrowAngle = ah(l, u), t.midDispX = l, t.midDispY = u, l *= -1, u *= -1, a) { var p = t.allpts; if (p.length / 2 % 2 !== 0 && !t.isRound) { var C = p.length / 2 - 1, M = C + 2; l = -(p[M] - p[C]), u = -(p[M + 1] - p[C + 1]); } } if (t.midsrcArrowAngle = ah(l, u), a) l = f - t.segpts[t.segpts.length - 2], u = h - t.segpts[t.segpts.length - 1]; else if (o || i || s || r) { var p = t.allpts, N = p.length, v = ur(p[N - 6], p[N - 4], p[N - 2], 0.9), m = ur(p[N - 5], p[N - 3], p[N - 1], 0.9); l = f - v, u = h - m; } else l = f - g, u = h - b; t.tgtArrowAngle = ah(l, u); }; Hv.getArrowWidth = Hv.getArrowHeight = function(e, t) { var n = this.arrowWidthCache = this.arrowWidthCache || {}, r = n[e + ", " + t]; return r || (r = Math.max(Math.pow(e * 13.37, 0.9), 29) * t, n[e + ", " + t] = r, r); }; var gy, my, Pa = {}, Lo = {}, b3, w3, cl, tv, di, rl, ul, Aa, _u, hh, gT, mT, yy, by, x3, k3 = function(e, t, n) { n.x = t.x - e.x, n.y = t.y - e.y, n.len = Math.sqrt(n.x * n.x + n.y * n.y), n.nx = n.x / n.len, n.ny = n.y / n.len, n.ang = Math.atan2(n.ny, n.nx); }, Vse = function(e, t) { t.x = e.x * -1, t.y = e.y * -1, t.nx = e.nx * -1, t.ny = e.ny * -1, t.ang = e.ang > 0 ? -(Math.PI - e.ang) : Math.PI + e.ang; }, jse = function(e, t, n, r, o) { if (e !== x3 ? k3(t, e, Pa) : Vse(Lo, Pa), k3(t, n, Lo), b3 = Pa.nx * Lo.ny - Pa.ny * Lo.nx, w3 = Pa.nx * Lo.nx - Pa.ny * -Lo.ny, di = Math.asin(Math.max(-1, Math.min(1, b3))), Math.abs(di) < 1e-6) { gy = t.x, my = t.y, ul = _u = 0; return; } cl = 1, tv = !1, w3 < 0 ? di < 0 ? di = Math.PI + di : (di = Math.PI - di, cl = -1, tv = !0) : di > 0 && (cl = -1, tv = !0), t.radius !== void 0 ? _u = t.radius : _u = r, rl = di / 2, hh = Math.min(Pa.len / 2, Lo.len / 2), o ? (Aa = Math.abs(Math.cos(rl) * _u / Math.sin(rl)), Aa > hh ? (Aa = hh, ul = Math.abs(Aa * Math.sin(rl) / Math.cos(rl))) : ul = _u) : (Aa = Math.min(hh, _u), ul = Math.abs(Aa * Math.sin(rl) / Math.cos(rl))), yy = t.x + Lo.nx * Aa, by = t.y + Lo.ny * Aa, gy = yy - Lo.ny * ul * cl, my = by + Lo.nx * ul * cl, gT = t.x + Pa.nx * Aa, mT = t.y + Pa.ny * Aa, x3 = t; }; function yT(e, t) { t.radius === 0 ? e.lineTo(t.cx, t.cy) : e.arc(t.cx, t.cy, t.radius, t.startAngle, t.endAngle, t.counterClockwise); } function Z2(e, t, n, r) { var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0; return r === 0 || t.radius === 0 ? { cx: t.x, cy: t.y, radius: 0, startX: t.x, startY: t.y, stopX: t.x, stopY: t.y, startAngle: void 0, endAngle: void 0, counterClockwise: void 0 } : (jse(e, t, n, r, o), { cx: gy, cy: my, radius: ul, startX: gT, startY: mT, stopX: yy, stopY: by, startAngle: Pa.ang + Math.PI / 2 * cl, endAngle: Lo.ang - Math.PI / 2 * cl, counterClockwise: tv }); } var Hr = {}; Hr.findMidptPtsEtc = function(e, t) { var n = t.posPts, r = t.intersectionPts, o = t.vectorNormInverse, a, i = e.pstyle("source-endpoint"), s = e.pstyle("target-endpoint"), l = i.units != null && s.units != null, u = function(x, w, k, S) { var _ = S - w, O = k - x, F = Math.sqrt(O * O + _ * _); return { x: -_ / F, y: O / F }; }, c = e.pstyle("edge-distances").value; switch (c) { case "node-position": a = n; break; case "intersection": a = r; break; case "endpoints": { if (l) { var d = this.manualEndptToPx(e.source()[0], i), f = ca(d, 2), h = f[0], p = f[1], v = this.manualEndptToPx(e.target()[0], s), m = ca(v, 2), g = m[0], b = m[1], C = { x1: h, y1: p, x2: g, y2: b }; o = u(h, p, g, b), a = C; } else tn("Edge ".concat(e.id(), " has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")), a = r; break; } } return { midptPts: a, vectorNormInverse: o }; }; Hr.findHaystackPoints = function(e) { for (var t = 0; t < e.length; t++) { var n = e[t], r = n._private, o = r.rscratch; if (!o.haystack) { var a = Math.random() * 2 * Math.PI; o.source = { x: Math.cos(a), y: Math.sin(a) }, a = Math.random() * 2 * Math.PI, o.target = { x: Math.cos(a), y: Math.sin(a) }; } var i = r.source, s = r.target, l = i.position(), u = s.position(), c = i.width(), d = s.width(), f = i.height(), h = s.height(), p = n.pstyle("haystack-radius").value, v = p / 2; o.haystackPts = o.allpts = [o.source.x * c * v + l.x, o.source.y * f * v + l.y, o.target.x * d * v + u.x, o.target.y * h * v + u.y], o.midX = (o.allpts[0] + o.allpts[2]) / 2, o.midY = (o.allpts[1] + o.allpts[3]) / 2, o.edgeType = "haystack", o.haystack = !0, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n); } }; Hr.findSegmentsPoints = function(e, t) { var n = e._private.rscratch, r = e.pstyle("segment-weights"), o = e.pstyle("segment-distances"), a = e.pstyle("segment-radii"), i = e.pstyle("radius-type"), s = Math.min(r.pfValue.length, o.pfValue.length), l = a.pfValue[a.pfValue.length - 1], u = i.pfValue[i.pfValue.length - 1]; n.edgeType = "segments", n.segpts = [], n.radii = [], n.isArcRadius = []; for (var c = 0; c < s; c++) { var d = r.pfValue[c], f = o.pfValue[c], h = 1 - d, p = d, v = this.findMidptPtsEtc(e, t), m = v.midptPts, g = v.vectorNormInverse, b = { x: m.x1 * h + m.x2 * p, y: m.y1 * h + m.y2 * p }; n.segpts.push(b.x + g.x * f, b.y + g.y * f), n.radii.push(a.pfValue[c] !== void 0 ? a.pfValue[c] : l), n.isArcRadius.push((i.pfValue[c] !== void 0 ? i.pfValue[c] : u) === "arc-radius"); } }; Hr.findLoopPoints = function(e, t, n, r) { var o = e._private.rscratch, a = t.dirCounts, i = t.srcPos, s = e.pstyle("control-point-distances"), l = s ? s.pfValue[0] : void 0, u = e.pstyle("loop-direction").pfValue, c = e.pstyle("loop-sweep").pfValue, d = e.pstyle("control-point-step-size").pfValue; o.edgeType = "self"; var f = n, h = d; r && (f = 0, h = l); var p = u - Math.PI / 2, v = p - c / 2, m = p + c / 2, g = u + "_" + c; f = a[g] === void 0 ? a[g] = 0 : ++a[g], o.ctrlpts = [i.x + Math.cos(v) * 1.4 * h * (f / 3 + 1), i.y + Math.sin(v) * 1.4 * h * (f / 3 + 1), i.x + Math.cos(m) * 1.4 * h * (f / 3 + 1), i.y + Math.sin(m) * 1.4 * h * (f / 3 + 1)]; }; Hr.findCompoundLoopPoints = function(e, t, n, r) { var o = e._private.rscratch; o.edgeType = "compound"; var a = t.srcPos, i = t.tgtPos, s = t.srcW, l = t.srcH, u = t.tgtW, c = t.tgtH, d = e.pstyle("control-point-step-size").pfValue, f = e.pstyle("control-point-distances"), h = f ? f.pfValue[0] : void 0, p = n, v = d; r && (p = 0, v = h); var m = 50, g = { x: a.x - s / 2, y: a.y - l / 2 }, b = { x: i.x - u / 2, y: i.y - c / 2 }, C = { x: Math.min(g.x, b.x), y: Math.min(g.y, b.y) }, x = 0.5, w = Math.max(x, Math.log(s * 0.01)), k = Math.max(x, Math.log(u * 0.01)); o.ctrlpts = [C.x, C.y - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * w, C.x - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * k, C.y]; }; Hr.findStraightEdgePoints = function(e) { e._private.rscratch.edgeType = "straight"; }; Hr.findBezierPoints = function(e, t, n, r, o) { var a = e._private.rscratch, i = e.pstyle("control-point-step-size").pfValue, s = e.pstyle("control-point-distances"), l = e.pstyle("control-point-weights"), u = s && l ? Math.min(s.value.length, l.value.length) : 1, c = s ? s.pfValue[0] : void 0, d = l.value[0], f = r; a.edgeType = f ? "multibezier" : "bezier", a.ctrlpts = []; for (var h = 0; h < u; h++) { var p = (0.5 - t.eles.length / 2 + n) * i * (o ? -1 : 1), v = void 0, m = k6(p); f && (c = s ? s.pfValue[h] : i, d = l.value[h]), r ? v = c : v = c !== void 0 ? m * c : void 0; var g = v !== void 0 ? v : p, b = 1 - d, C = d, x = this.findMidptPtsEtc(e, t), w = x.midptPts, k = x.vectorNormInverse, S = { x: w.x1 * b + w.x2 * C, y: w.y1 * b + w.y2 * C }; a.ctrlpts.push(S.x + k.x * g, S.y + k.y * g); } }; Hr.findTaxiPoints = function(e, t) { var n = e._private.rscratch; n.edgeType = "segments"; var r = "vertical", o = "horizontal", a = "leftward", i = "rightward", s = "downward", l = "upward", u = "auto", c = t.posPts, d = t.srcW, f = t.srcH, h = t.tgtW, p = t.tgtH, v = e.pstyle("edge-distances").value, m = v !== "node-position", g = e.pstyle("taxi-direction").value, b = g, C = e.pstyle("taxi-turn"), x = C.units === "%", w = C.pfValue, k = w < 0, S = e.pstyle("taxi-turn-min-distance").pfValue, _ = m ? (d + h) / 2 : 0, O = m ? (f + p) / 2 : 0, F = c.x2 - c.x1, I = c.y2 - c.y1, P = function(lt, ut) { return lt > 0 ? Math.max(lt - ut, 0) : Math.min(lt + ut, 0); }, M = P(F, _), N = P(I, O), j = !1; b === u ? g = Math.abs(M) > Math.abs(N) ? o : r : b === l || b === s ? (g = r, j = !0) : (b === a || b === i) && (g = o, j = !0); var A = g === r, U = A ? N : M, q = A ? I : F, Y = k6(q), ie = !1; !(j && (x || k)) && (b === s && q < 0 || b === l && q > 0 || b === a && q > 0 || b === i && q < 0) && (Y *= -1, U = Y * Math.abs(U), ie = !0); var re; if (x) { var le = w < 0 ? 1 + w : w; re = le * U; } else { var he = w < 0 ? U : 0; re = he + w * Y; } var we = function(lt) { return Math.abs(lt) < S || Math.abs(lt) >= Math.abs(U); }, be = we(re), de = we(Math.abs(U) - Math.abs(re)), ae = be || de; if (ae && !ie) if (A) { var ee = Math.abs(q) <= f / 2, se = Math.abs(F) <= h / 2; if (ee) { var pe = (c.x1 + c.x2) / 2, Se = c.y1, Le = c.y2; n.segpts = [pe, Se, pe, Le]; } else if (se) { var je = (c.y1 + c.y2) / 2, _e = c.x1, ze = c.x2; n.segpts = [_e, je, ze, je]; } else n.segpts = [c.x1, c.y2]; } else { var Ie = Math.abs(q) <= d / 2, He = Math.abs(I) <= p / 2; if (Ie) { var qe = (c.y1 + c.y2) / 2, et = c.x1, Ve = c.x2; n.segpts = [et, qe, Ve, qe]; } else if (He) { var nt = (c.x1 + c.x2) / 2, ot = c.y1, pt = c.y2; n.segpts = [nt, ot, nt, pt]; } else n.segpts = [c.x2, c.y1]; } else if (A) { var T = c.y1 + re + (m ? f / 2 * Y : 0), G = c.x1, fe = c.x2; n.segpts = [G, T, fe, T]; } else { var ge = c.x1 + re + (m ? d / 2 * Y : 0), ve = c.y1, Fe = c.y2; n.segpts = [ge, ve, ge, Fe]; } if (n.isRound) { var Ce = e.pstyle("taxi-radius").value, Re = e.pstyle("radius-type").value[0] === "arc-radius"; n.radii = new Array(n.segpts.length / 2).fill(Ce), n.isArcRadius = new Array(n.segpts.length / 2).fill(Re); } }; Hr.tryToCorrectInvalidPoints = function(e, t) { var n = e._private.rscratch; if (n.edgeType === "bezier") { var r = t.srcPos, o = t.tgtPos, a = t.srcW, i = t.srcH, s = t.tgtW, l = t.tgtH, u = t.srcShape, c = t.tgtShape, d = t.srcCornerRadius, f = t.tgtCornerRadius, h = t.srcRs, p = t.tgtRs, v = !Ke(n.startX) || !Ke(n.startY), m = !Ke(n.arrowStartX) || !Ke(n.arrowStartY), g = !Ke(n.endX) || !Ke(n.endY), b = !Ke(n.arrowEndX) || !Ke(n.arrowEndY), C = 3, x = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth, w = C * x, k = Nl({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.startX, y: n.startY }), S = k < w, _ = Nl({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.endX, y: n.endY }), O = _ < w, F = !1; if (v || m || S) { F = !0; var I = { // delta x: n.ctrlpts[0] - r.x, y: n.ctrlpts[1] - r.y }, P = Math.sqrt(I.x * I.x + I.y * I.y), M = { // normalised delta x: I.x / P, y: I.y / P }, N = Math.max(a, i), j = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + M.x * 2 * N, y: n.ctrlpts[1] + M.y * 2 * N }, A = u.intersectLine(r.x, r.y, a, i, j.x, j.y, 0, d, h); S ? (n.ctrlpts[0] = n.ctrlpts[0] + M.x * (w - k), n.ctrlpts[1] = n.ctrlpts[1] + M.y * (w - k)) : (n.ctrlpts[0] = A[0] + M.x * w, n.ctrlpts[1] = A[1] + M.y * w); } if (g || b || O) { F = !0; var U = { // delta x: n.ctrlpts[0] - o.x, y: n.ctrlpts[1] - o.y }, q = Math.sqrt(U.x * U.x + U.y * U.y), Y = { // normalised delta x: U.x / q, y: U.y / q }, ie = Math.max(a, i), re = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + Y.x * 2 * ie, y: n.ctrlpts[1] + Y.y * 2 * ie }, le = c.intersectLine(o.x, o.y, s, l, re.x, re.y, 0, f, p); O ? (n.ctrlpts[0] = n.ctrlpts[0] + Y.x * (w - _), n.ctrlpts[1] = n.ctrlpts[1] + Y.y * (w - _)) : (n.ctrlpts[0] = le[0] + Y.x * w, n.ctrlpts[1] = le[1] + Y.y * w); } F && this.findEndpoints(e); } }; Hr.storeAllpts = function(e) { var t = e._private.rscratch; if (t.edgeType === "multibezier" || t.edgeType === "bezier" || t.edgeType === "self" || t.edgeType === "compound") { t.allpts = [], t.allpts.push(t.startX, t.startY); for (var n = 0; n + 1 < t.ctrlpts.length; n += 2) t.allpts.push(t.ctrlpts[n], t.ctrlpts[n + 1]), n + 3 < t.ctrlpts.length && t.allpts.push((t.ctrlpts[n] + t.ctrlpts[n + 2]) / 2, (t.ctrlpts[n + 1] + t.ctrlpts[n + 3]) / 2); t.allpts.push(t.endX, t.endY); var r, o; t.ctrlpts.length / 2 % 2 === 0 ? (r = t.allpts.length / 2 - 1, t.midX = t.allpts[r], t.midY = t.allpts[r + 1]) : (r = t.allpts.length / 2 - 3, o = 0.5, t.midX = ur(t.allpts[r], t.allpts[r + 2], t.allpts[r + 4], o), t.midY = ur(t.allpts[r + 1], t.allpts[r + 3], t.allpts[r + 5], o)); } else if (t.edgeType === "straight") t.allpts = [t.startX, t.startY, t.endX, t.endY], t.midX = (t.startX + t.endX + t.arrowStartX + t.arrowEndX) / 4, t.midY = (t.startY + t.endY + t.arrowStartY + t.arrowEndY) / 4; else if (t.edgeType === "segments") { if (t.allpts = [], t.allpts.push(t.startX, t.startY), t.allpts.push.apply(t.allpts, t.segpts), t.allpts.push(t.endX, t.endY), t.isRound) { t.roundCorners = []; for (var a = 2; a + 3 < t.allpts.length; a += 2) { var i = t.radii[a / 2 - 1], s = t.isArcRadius[a / 2 - 1]; t.roundCorners.push(Z2({ x: t.allpts[a - 2], y: t.allpts[a - 1] }, { x: t.allpts[a], y: t.allpts[a + 1], radius: i }, { x: t.allpts[a + 2], y: t.allpts[a + 3] }, i, s)); } } if (t.segpts.length % 4 === 0) { var l = t.segpts.length / 2, u = l - 2; t.midX = (t.segpts[u] + t.segpts[l]) / 2, t.midY = (t.segpts[u + 1] + t.segpts[l + 1]) / 2; } else { var c = t.segpts.length / 2 - 1; if (!t.isRound) t.midX = t.segpts[c], t.midY = t.segpts[c + 1]; else { var d = { x: t.segpts[c], y: t.segpts[c + 1] }, f = t.roundCorners[c / 2], h = [d.x - f.cx, d.y - f.cy], p = f.radius / Math.sqrt(Math.pow(h[0], 2) + Math.pow(h[1], 2)); h = h.map(function(v) { return v * p; }), t.midX = f.cx + h[0], t.midY = f.cy + h[1], t.midVector = h; } } } }; Hr.checkForInvalidEdgeWarning = function(e) { var t = e[0]._private.rscratch; t.nodesOverlap || Ke(t.startX) && Ke(t.startY) && Ke(t.endX) && Ke(t.endY) ? t.loggedErr = !1 : t.loggedErr || (t.loggedErr = !0, tn("Edge `" + e.id() + "` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.")); }; Hr.findEdgeControlPoints = function(e) { var t = this; if (!(!e || e.length === 0)) { for (var n = this, r = n.cy, o = r.hasCompoundNodes(), a = { map: new Ba(), get: function(k) { var S = this.map.get(k[0]); return S != null ? S.get(k[1]) : null; }, set: function(k, S) { var _ = this.map.get(k[0]); _ == null && (_ = new Ba(), this.map.set(k[0], _)), _.set(k[1], S); } }, i = [], s = [], l = 0; l < e.length; l++) { var u = e[l], c = u._private, d = u.pstyle("curve-style").value; if (!(u.removed() || !u.takesUpSpace())) { if (d === "haystack") { s.push(u); continue; } var f = d === "unbundled-bezier" || d.endsWith("segments") || d === "straight" || d === "straight-triangle" || d.endsWith("taxi"), h = d === "unbundled-bezier" || d === "bezier", p = c.source, v = c.target, m = p.poolIndex(), g = v.poolIndex(), b = [m, g].sort(), C = a.get(b); C == null && (C = { eles: [] }, a.set(b, C), i.push(b)), C.eles.push(u), f && (C.hasUnbundled = !0), h && (C.hasBezier = !0); } } for (var x = function(k) { var S = i[k], _ = a.get(S), O = void 0; if (!_.hasUnbundled) { var F = _.eles[0].parallelEdges().filter(function(fe) { return fe.isBundledBezier(); }); D2(_.eles), F.forEach(function(fe) { return _.eles.push(fe); }), _.eles.sort(function(fe, ge) { return fe.poolIndex() - ge.poolIndex(); }); } var I = _.eles[0], P = I.source(), M = I.target(); if (P.poolIndex() > M.poolIndex()) { var N = P; P = M, M = N; } var j = _.srcPos = P.position(), A = _.tgtPos = M.position(), U = _.srcW = P.outerWidth(), q = _.srcH = P.outerHeight(), Y = _.tgtW = M.outerWidth(), ie = _.tgtH = M.outerHeight(), re = _.srcShape = n.nodeShapes[t.getNodeShape(P)], le = _.tgtShape = n.nodeShapes[t.getNodeShape(M)], he = _.srcCornerRadius = P.pstyle("corner-radius").value === "auto" ? "auto" : P.pstyle("corner-radius").pfValue, we = _.tgtCornerRadius = M.pstyle("corner-radius").value === "auto" ? "auto" : M.pstyle("corner-radius").pfValue, be = _.tgtRs = M._private.rscratch, de = _.srcRs = P._private.rscratch; _.dirCounts = { north: 0, west: 0, south: 0, east: 0, northwest: 0, southwest: 0, northeast: 0, southeast: 0 }; for (var ae = 0; ae < _.eles.length; ae++) { var ee = _.eles[ae], se = ee[0]._private.rscratch, pe = ee.pstyle("curve-style").value, Se = pe === "unbundled-bezier" || pe.endsWith("segments") || pe.endsWith("taxi"), Le = !P.same(ee.source()); if (!_.calculatedIntersection && P !== M && (_.hasBezier || _.hasUnbundled)) { _.calculatedIntersection = !0; var je = re.intersectLine(j.x, j.y, U, q, A.x, A.y, 0, he, de), _e = _.srcIntn = je, ze = le.intersectLine(A.x, A.y, Y, ie, j.x, j.y, 0, we, be), Ie = _.tgtIntn = ze, He = _.intersectionPts = { x1: je[0], x2: ze[0], y1: je[1], y2: ze[1] }, qe = _.posPts = { x1: j.x, x2: A.x, y1: j.y, y2: A.y }, et = ze[1] - je[1], Ve = ze[0] - je[0], nt = Math.sqrt(Ve * Ve + et * et), ot = _.vector = { x: Ve, y: et }, pt = _.vectorNorm = { x: ot.x / nt, y: ot.y / nt }, T = { x: -pt.y, y: pt.x }; _.nodesOverlap = !Ke(nt) || le.checkPoint(je[0], je[1], 0, Y, ie, A.x, A.y, we, be) || re.checkPoint(ze[0], ze[1], 0, U, q, j.x, j.y, he, de), _.vectorNormInverse = T, O = { nodesOverlap: _.nodesOverlap, dirCounts: _.dirCounts, calculatedIntersection: !0, hasBezier: _.hasBezier, hasUnbundled: _.hasUnbundled, eles: _.eles, srcPos: A, tgtPos: j, srcW: Y, srcH: ie, tgtW: U, tgtH: q, srcIntn: Ie, tgtIntn: _e, srcShape: le, tgtShape: re, posPts: { x1: qe.x2, y1: qe.y2, x2: qe.x1, y2: qe.y1 }, intersectionPts: { x1: He.x2, y1: He.y2, x2: He.x1, y2: He.y1 }, vector: { x: -ot.x, y: -ot.y }, vectorNorm: { x: -pt.x, y: -pt.y }, vectorNormInverse: { x: -T.x, y: -T.y } }; } var G = Le ? O : _; se.nodesOverlap = G.nodesOverlap, se.srcIntn = G.srcIntn, se.tgtIntn = G.tgtIntn, se.isRound = pe.startsWith("round"), o && (P.isParent() || P.isChild() || M.isParent() || M.isChild()) && (P.parents().anySame(M) || M.parents().anySame(P) || P.same(M) && P.isParent()) ? t.findCompoundLoopPoints(ee, G, ae, Se) : P === M ? t.findLoopPoints(ee, G, ae, Se) : pe.endsWith("segments") ? t.findSegmentsPoints(ee, G) : pe.endsWith("taxi") ? t.findTaxiPoints(ee, G) : pe === "straight" || !Se && _.eles.length % 2 === 1 && ae === Math.floor(_.eles.length / 2) ? t.findStraightEdgePoints(ee) : t.findBezierPoints(ee, G, ae, Se, Le), t.findEndpoints(ee), t.tryToCorrectInvalidPoints(ee, G), t.checkForInvalidEdgeWarning(ee), t.storeAllpts(ee), t.storeEdgeProjections(ee), t.calculateArrowAngles(ee), t.recalculateEdgeLabelProjections(ee), t.calculateLabelAngles(ee); } }, w = 0; w < i.length; w++) x(w); this.findHaystackPoints(s); } }; function bT(e) { var t = []; if (e != null) { for (var n = 0; n < e.length; n += 2) { var r = e[n], o = e[n + 1]; t.push({ x: r, y: o }); } return t; } } Hr.getSegmentPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "segments") return this.recalculateRenderedStyle(e), bT(t.segpts); }; Hr.getControlPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "bezier" || n === "multibezier" || n === "self" || n === "compound") return this.recalculateRenderedStyle(e), bT(t.ctrlpts); }; Hr.getEdgeMidpoint = function(e) { var t = e[0]._private.rscratch; return this.recalculateRenderedStyle(e), { x: t.midX, y: t.midY }; }; var vf = {}; vf.manualEndptToPx = function(e, t) { var n = this, r = e.position(), o = e.outerWidth(), a = e.outerHeight(), i = e._private.rscratch; if (t.value.length === 2) { var s = [t.pfValue[0], t.pfValue[1]]; return t.units[0] === "%" && (s[0] = s[0] * o), t.units[1] === "%" && (s[1] = s[1] * a), s[0] += r.x, s[1] += r.y, s; } else { var l = t.pfValue[0]; l = -Math.PI / 2 + l; var u = 2 * Math.max(o, a), c = [r.x + Math.cos(l) * u, r.y + Math.sin(l) * u]; return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x, r.y, o, a, c[0], c[1], 0, e.pstyle("corner-radius").value === "auto" ? "auto" : e.pstyle("corner-radius").pfValue, i); } }; vf.findEndpoints = function(e) { var t = this, n, r = e.source()[0], o = e.target()[0], a = r.position(), i = o.position(), s = e.pstyle("target-arrow-shape").value, l = e.pstyle("source-arrow-shape").value, u = e.pstyle("target-distance-from-node").pfValue, c = e.pstyle("source-distance-from-node").pfValue, d = r._private.rscratch, f = o._private.rscratch, h = e.pstyle("curve-style").value, p = e._private.rscratch, v = p.edgeType, m = h === "taxi", g = v === "self" || v === "compound", b = v === "bezier" || v === "multibezier" || g, C = v !== "bezier", x = v === "straight" || v === "segments", w = v === "segments", k = b || C || x, S = g || m, _ = e.pstyle("source-endpoint"), O = S ? "outside-to-node" : _.value, F = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, I = e.pstyle("target-endpoint"), P = S ? "outside-to-node" : I.value, M = o.pstyle("corner-radius").value === "auto" ? "auto" : o.pstyle("corner-radius").pfValue; p.srcManEndpt = _, p.tgtManEndpt = I; var N, j, A, U; if (b) { var q = [p.ctrlpts[0], p.ctrlpts[1]], Y = C ? [p.ctrlpts[p.ctrlpts.length - 2], p.ctrlpts[p.ctrlpts.length - 1]] : q; N = Y, j = q; } else if (x) { var ie = w ? p.segpts.slice(0, 2) : [i.x, i.y], re = w ? p.segpts.slice(p.segpts.length - 2) : [a.x, a.y]; N = re, j = ie; } if (P === "inside-to-node") n = [i.x, i.y]; else if (I.units) n = this.manualEndptToPx(o, I); else if (P === "outside-to-line") n = p.tgtIntn; else if (P === "outside-to-node" || P === "outside-to-node-or-label" ? A = N : (P === "outside-to-line" || P === "outside-to-line-or-label") && (A = [a.x, a.y]), n = t.nodeShapes[this.getNodeShape(o)].intersectLine(i.x, i.y, o.outerWidth(), o.outerHeight(), A[0], A[1], 0, M, f), P === "outside-to-node-or-label" || P === "outside-to-line-or-label") { var le = o._private.rscratch, he = le.labelWidth, we = le.labelHeight, be = le.labelX, de = le.labelY, ae = he / 2, ee = we / 2, se = o.pstyle("text-valign").value; se === "top" ? de -= ee : se === "bottom" && (de += ee); var pe = o.pstyle("text-halign").value; pe === "left" ? be -= ae : pe === "right" && (be += ae); var Se = yp(A[0], A[1], [be - ae, de - ee, be + ae, de - ee, be + ae, de + ee, be - ae, de + ee], i.x, i.y); if (Se.length > 0) { var Le = a, je = sl(Le, zu(n)), _e = sl(Le, zu(Se)), ze = je; if (_e < je && (n = Se, ze = _e), Se.length > 2) { var Ie = sl(Le, { x: Se[2], y: Se[3] }); Ie < ze && (n = [Se[2], Se[3]]); } } } var He = ih(n, N, t.arrowShapes[s].spacing(e) + u), qe = ih(n, N, t.arrowShapes[s].gap(e) + u); if (p.endX = qe[0], p.endY = qe[1], p.arrowEndX = He[0], p.arrowEndY = He[1], O === "inside-to-node") n = [a.x, a.y]; else if (_.units) n = this.manualEndptToPx(r, _); else if (O === "outside-to-line") n = p.srcIntn; else if (O === "outside-to-node" || O === "outside-to-node-or-label" ? U = j : (O === "outside-to-line" || O === "outside-to-line-or-label") && (U = [i.x, i.y]), n = t.nodeShapes[this.getNodeShape(r)].intersectLine(a.x, a.y, r.outerWidth(), r.outerHeight(), U[0], U[1], 0, F, d), O === "outside-to-node-or-label" || O === "outside-to-line-or-label") { var et = r._private.rscratch, Ve = et.labelWidth, nt = et.labelHeight, ot = et.labelX, pt = et.labelY, T = Ve / 2, G = nt / 2, fe = r.pstyle("text-valign").value; fe === "top" ? pt -= G : fe === "bottom" && (pt += G); var ge = r.pstyle("text-halign").value; ge === "left" ? ot -= T : ge === "right" && (ot += T); var ve = yp(U[0], U[1], [ot - T, pt - G, ot + T, pt - G, ot + T, pt + G, ot - T, pt + G], a.x, a.y); if (ve.length > 0) { var Fe = i, Ce = sl(Fe, zu(n)), Re = sl(Fe, zu(ve)), lt = Ce; if (Re < Ce && (n = [ve[0], ve[1]], lt = Re), ve.length > 2) { var ut = sl(Fe, { x: ve[2], y: ve[3] }); ut < lt && (n = [ve[2], ve[3]]); } } } var ue = ih(n, j, t.arrowShapes[l].spacing(e) + c), Te = ih(n, j, t.arrowShapes[l].gap(e) + c); p.startX = Te[0], p.startY = Te[1], p.arrowStartX = ue[0], p.arrowStartY = ue[1], k && (!Ke(p.startX) || !Ke(p.startY) || !Ke(p.endX) || !Ke(p.endY) ? p.badLine = !0 : p.badLine = !1); }; vf.getSourceEndpoint = function(e) { var t = e[0]._private.rscratch; switch (this.recalculateRenderedStyle(e), t.edgeType) { case "haystack": return { x: t.haystackPts[0], y: t.haystackPts[1] }; default: return { x: t.arrowStartX, y: t.arrowStartY }; } }; vf.getTargetEndpoint = function(e) { var t = e[0]._private.rscratch; switch (this.recalculateRenderedStyle(e), t.edgeType) { case "haystack": return { x: t.haystackPts[2], y: t.haystackPts[3] }; default: return { x: t.arrowEndX, y: t.arrowEndY }; } }; var J2 = {}; function Hse(e, t, n) { for (var r = function(l, u, c, d) { return ur(l, u, c, d); }, o = t._private, a = o.rstyle.bezierPts, i = 0; i < e.bezierProjPcts.length; i++) { var s = e.bezierProjPcts[i]; a.push({ x: r(n[0], n[2], n[4], s), y: r(n[1], n[3], n[5], s) }); } } J2.storeEdgeProjections = function(e) { var t = e._private, n = t.rscratch, r = n.edgeType; if (t.rstyle.bezierPts = null, t.rstyle.linePts = null, t.rstyle.haystackPts = null, r === "multibezier" || r === "bezier" || r === "self" || r === "compound") { t.rstyle.bezierPts = []; for (var o = 0; o + 5 < n.allpts.length; o += 4) Hse(this, e, n.allpts.slice(o, o + 6)); } else if (r === "segments") for (var a = t.rstyle.linePts = [], o = 0; o + 1 < n.allpts.length; o += 2) a.push({ x: n.allpts[o], y: n.allpts[o + 1] }); else if (r === "haystack") { var i = n.haystackPts; t.rstyle.haystackPts = [{ x: i[0], y: i[1] }, { x: i[2], y: i[3] }]; } t.rstyle.arrowWidth = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth; }; J2.recalculateEdgeProjections = function(e) { this.findEdgeControlPoints(e); }; var ii = {}; ii.recalculateNodeLabelProjection = function(e) { var t = e.pstyle("label").strValue; if (!As(t)) { var n, r, o = e._private, a = e.width(), i = e.height(), s = e.padding(), l = e.position(), u = e.pstyle("text-halign").strValue, c = e.pstyle("text-valign").strValue, d = o.rscratch, f = o.rstyle; switch (u) { case "left": n = l.x - a / 2 - s; break; case "right": n = l.x + a / 2 + s; break; default: n = l.x; } switch (c) { case "top": r = l.y - i / 2 - s; break; case "bottom": r = l.y + i / 2 + s; break; default: r = l.y; } d.labelX = n, d.labelY = r, f.labelX = n, f.labelY = r, this.calculateLabelAngles(e), this.applyLabelDimensions(e); } }; var wT = function(e, t) { var n = Math.atan(t / e); return e === 0 && n < 0 && (n = n * -1), n; }, xT = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return wT(n, r); }, Use = function(e, t, n, r) { var o = mp(0, r - 1e-3, 1), a = mp(0, r + 1e-3, 1), i = Uu(e, t, n, o), s = Uu(e, t, n, a); return xT(i, s); }; ii.recalculateEdgeLabelProjections = function(e) { var t, n = e._private, r = n.rscratch, o = this, a = { mid: e.pstyle("label").strValue, source: e.pstyle("source-label").strValue, target: e.pstyle("target-label").strValue }; if (a.mid || a.source || a.target) { t = { x: r.midX, y: r.midY }; var i = function(c, d, f) { ms(n.rscratch, c, d, f), ms(n.rstyle, c, d, f); }; i("labelX", null, t.x), i("labelY", null, t.y); var s = wT(r.midDispX, r.midDispY); i("labelAutoAngle", null, s); var l = function c() { if (c.cache) return c.cache; for (var d = [], f = 0; f + 5 < r.allpts.length; f += 4) { var h = { x: r.allpts[f], y: r.allpts[f + 1] }, p = { x: r.allpts[f + 2], y: r.allpts[f + 3] }, v = { x: r.allpts[f + 4], y: r.allpts[f + 5] }; d.push({ p0: h, p1: p, p2: v, startDist: 0, length: 0, segments: [] }); } var m = n.rstyle.bezierPts, g = o.bezierProjPcts.length; function b(S, _, O, F, I) { var P = Nl(_, O), M = S.segments[S.segments.length - 1], N = { p0: _, p1: O, t0: F, t1: I, startDist: M ? M.startDist + M.length : 0, length: P }; S.segments.push(N), S.length += P; } for (var C = 0; C < d.length; C++) { var x = d[C], w = d[C - 1]; w && (x.startDist = w.startDist + w.length), b(x, x.p0, m[C * g], 0, o.bezierProjPcts[0]); for (var k = 0; k < g - 1; k++) b(x, m[C * g + k], m[C * g + k + 1], o.bezierProjPcts[k], o.bezierProjPcts[k + 1]); b(x, m[C * g + g - 1], x.p2, o.bezierProjPcts[g - 1], 1); } return c.cache = d; }, u = function(c) { var d, f = c === "source"; if (a[c]) { var h = e.pstyle(c + "-text-offset").pfValue; switch (r.edgeType) { case "self": case "compound": case "bezier": case "multibezier": { for (var p = l(), v, m = 0, g = 0, b = 0; b < p.length; b++) { for (var C = p[f ? b : p.length - 1 - b], x = 0; x < C.segments.length; x++) { var w = C.segments[f ? x : C.segments.length - 1 - x], k = b === p.length - 1 && x === C.segments.length - 1; if (m = g, g += w.length, g >= h || k) { v = { cp: C, segment: w }; break; } } if (v) break; } var S = v.cp, _ = v.segment, O = (h - m) / _.length, F = _.t1 - _.t0, I = f ? _.t0 + F * O : _.t1 - F * O; I = mp(0, I, 1), t = Uu(S.p0, S.p1, S.p2, I), d = Use(S.p0, S.p1, S.p2, I); break; } case "straight": case "segments": case "haystack": { for (var P = 0, M, N, j, A, U = r.allpts.length, q = 0; q + 3 < U && (f ? (j = { x: r.allpts[q], y: r.allpts[q + 1] }, A = { x: r.allpts[q + 2], y: r.allpts[q + 3] }) : (j = { x: r.allpts[U - 2 - q], y: r.allpts[U - 1 - q] }, A = { x: r.allpts[U - 4 - q], y: r.allpts[U - 3 - q] }), M = Nl(j, A), N = P, P += M, !(P >= h)); q += 2) ; var Y = h - N, ie = Y / M; ie = mp(0, ie, 1), t = Yne(j, A, ie), d = xT(j, A); break; } } i("labelX", c, t.x), i("labelY", c, t.y), i("labelAutoAngle", c, d); } }; u("source"), u("target"), this.applyLabelDimensions(e); } }; ii.applyLabelDimensions = function(e) { this.applyPrefixedLabelDimensions(e), e.isEdge() && (this.applyPrefixedLabelDimensions(e, "source"), this.applyPrefixedLabelDimensions(e, "target")); }; ii.applyPrefixedLabelDimensions = function(e, t) { var n = e._private, r = this.getLabelText(e, t), o = this.calculateLabelDimensions(e, r), a = e.pstyle("line-height").pfValue, i = e.pstyle("text-wrap").strValue, s = ha(n.rscratch, "labelWrapCachedLines", t) || [], l = i !== "wrap" ? 1 : Math.max(s.length, 1), u = o.height / l, c = u * a, d = o.width, f = o.height + (l - 1) * (a - 1) * u; ms(n.rstyle, "labelWidth", t, d), ms(n.rscratch, "labelWidth", t, d), ms(n.rstyle, "labelHeight", t, f), ms(n.rscratch, "labelHeight", t, f), ms(n.rscratch, "labelLineHeight", t, c); }; ii.getLabelText = function(e, t) { var n = e._private, r = t ? t + "-" : "", o = e.pstyle(r + "label").strValue, a = e.pstyle("text-transform").value, i = function(le, he) { return he ? (ms(n.rscratch, le, t, he), he) : ha(n.rscratch, le, t); }; if (!o) return ""; a == "none" || (a == "uppercase" ? o = o.toUpperCase() : a == "lowercase" && (o = o.toLowerCase())); var s = e.pstyle("text-wrap").value; if (s === "wrap") { var l = i("labelKey"); if (l != null && i("labelWrapKey") === l) return i("labelWrapCachedText"); for (var u = "​", c = o.split(` `), d = e.pstyle("text-max-width").pfValue, f = e.pstyle("text-overflow-wrap").value, h = f === "anywhere", p = [], v = /[\s\u200b]+|$/g, m = 0; m < c.length; m++) { var g = c[m], b = this.calculateLabelDimensions(e, g), C = b.width; if (h) { var x = g.split("").join(u); g = x; } if (C > d) { var w = g.matchAll(v), k = "", S = 0, _ = r6(w), O; try { for (_.s(); !(O = _.n()).done; ) { var F = O.value, I = F[0], P = g.substring(S, F.index); S = F.index + I.length; var M = k.length === 0 ? P : k + P + I, N = this.calculateLabelDimensions(e, M), j = N.width; j <= d ? k += P + I : (k && p.push(k), k = P + I); } } catch (le) { _.e(le); } finally { _.f(); } k.match(/^[\s\u200b]+$/) || p.push(k); } else p.push(g); } i("labelWrapCachedLines", p), o = i("labelWrapCachedText", p.join(` `)), i("labelWrapKey", l); } else if (s === "ellipsis") { var A = e.pstyle("text-max-width").pfValue, U = "", q = "…", Y = !1; if (this.calculateLabelDimensions(e, o).width < A) return o; for (var ie = 0; ie < o.length; ie++) { var re = this.calculateLabelDimensions(e, U + o[ie] + q).width; if (re > A) break; U += o[ie], ie === o.length - 1 && (Y = !0); } return Y || (U += q), U; } return o; }; ii.getLabelJustification = function(e) { var t = e.pstyle("text-justification").strValue, n = e.pstyle("text-halign").strValue; if (t === "auto") if (e.isNode()) switch (n) { case "left": return "right"; case "right": return "left"; default: return "center"; } else return "center"; else return t; }; ii.calculateLabelDimensions = function(e, t) { var n = this, r = n.cy.window(), o = r.document, a = Ml(t, e._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[a]; if (s != null) return s; var l = 0, u = e.pstyle("font-style").strValue, c = e.pstyle("font-size").pfValue, d = e.pstyle("font-family").strValue, f = e.pstyle("font-weight").strValue, h = this.labelCalcCanvas, p = this.labelCalcCanvasContext; if (!h) { h = this.labelCalcCanvas = o.createElement("canvas"), p = this.labelCalcCanvasContext = h.getContext("2d"); var v = h.style; v.position = "absolute", v.left = "-9999px", v.top = "-9999px", v.zIndex = "-1", v.visibility = "hidden", v.pointerEvents = "none"; } p.font = "".concat(u, " ").concat(f, " ").concat(c, "px ").concat(d); for (var m = 0, g = 0, b = t.split(` `), C = 0; C < b.length; C++) { var x = b[C], w = p.measureText(x), k = Math.ceil(w.width), S = c; m = Math.max(k, m), g += S; } return m += l, g += l, i[a] = { width: m, height: g }; }; ii.calculateLabelAngle = function(e, t) { var n = e._private, r = n.rscratch, o = e.isEdge(), a = t ? t + "-" : "", i = e.pstyle(a + "text-rotation"), s = i.strValue; return s === "none" ? 0 : o && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue; }; ii.calculateLabelAngles = function(e) { var t = this, n = e.isEdge(), r = e._private, o = r.rscratch; o.labelAngle = t.calculateLabelAngle(e), n && (o.sourceLabelAngle = t.calculateLabelAngle(e, "source"), o.targetLabelAngle = t.calculateLabelAngle(e, "target")); }; var kT = {}, C3 = 28, S3 = !1; kT.getNodeShape = function(e) { var t = this, n = e.pstyle("shape").value; if (n === "cutrectangle" && (e.width() < C3 || e.height() < C3)) return S3 || (tn("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), S3 = !0), "rectangle"; if (e.isParent()) return n === "rectangle" || n === "roundrectangle" || n === "round-rectangle" || n === "cutrectangle" || n === "cut-rectangle" || n === "barrel" ? n : "rectangle"; if (n === "polygon") { var r = e.pstyle("shape-polygon-points").value; return t.nodeShapes.makePolygon(r).name; } return n; }; var xg = {}; xg.registerCalculationListeners = function() { var e = this.cy, t = e.collection(), n = this, r = function(a) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; if (t.merge(a), i) for (var s = 0; s < a.length; s++) { var l = a[s], u = l._private, c = u.rstyle; c.clean = !1, c.cleanConnected = !1; } }; n.binder(e).on("bounds.* dirty.*", function(a) { var i = a.target; r(i); }).on("style.* background.*", function(a) { var i = a.target; r(i, !1); }); var o = function(a) { if (a) { var i = n.onUpdateEleCalcsFns; t.cleanStyle(); for (var s = 0; s < t.length; s++) { var l = t[s], u = l._private.rstyle; l.isNode() && !u.cleanConnected && (r(l.connectedEdges()), u.cleanConnected = !0); } if (i) for (var c = 0; c < i.length; c++) { var d = i[c]; d(a, t); } n.recalculateRenderedStyle(t), t = e.collection(); } }; n.flushRenderedStyleQueue = function() { o(!0); }, n.beforeRender(o, n.beforeRenderPriorities.eleCalcs); }; xg.onUpdateEleCalcs = function(e) { var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; t.push(e); }; xg.recalculateRenderedStyle = function(e, t) { var n = function(C) { return C._private.rstyle.cleanConnected; }, r = [], o = []; if (!this.destroyed) { t === void 0 && (t = !0); for (var a = 0; a < e.length; a++) { var i = e[a], s = i._private, l = s.rstyle; i.isEdge() && (!n(i.source()) || !n(i.target())) && (l.clean = !1), !(t && l.clean || i.removed()) && i.pstyle("display").value !== "none" && (s.group === "nodes" ? o.push(i) : r.push(i), l.clean = !0); } for (var u = 0; u < o.length; u++) { var c = o[u], d = c._private, f = d.rstyle, h = c.position(); this.recalculateNodeLabelProjection(c), f.nodeX = h.x, f.nodeY = h.y, f.nodeW = c.pstyle("width").pfValue, f.nodeH = c.pstyle("height").pfValue; } this.recalculateEdgeProjections(r); for (var p = 0; p < r.length; p++) { var v = r[p], m = v._private, g = m.rstyle, b = m.rscratch; g.srcX = b.arrowStartX, g.srcY = b.arrowStartY, g.tgtX = b.arrowEndX, g.tgtY = b.arrowEndY, g.midX = b.midX, g.midY = b.midY, g.labelAngle = b.labelAngle, g.sourceLabelAngle = b.sourceLabelAngle, g.targetLabelAngle = b.targetLabelAngle; } } }; var kg = {}; kg.updateCachedGrabbedEles = function() { var e = this.cachedZSortedEles; if (e) { e.drag = [], e.nondrag = []; for (var t = [], n = 0; n < e.length; n++) { var r = e[n], o = r._private.rscratch; r.grabbed() && !r.isParent() ? t.push(r) : o.inDragLayer ? e.drag.push(r) : e.nondrag.push(r); } for (var n = 0; n < t.length; n++) { var r = t[n]; e.drag.push(r); } } }; kg.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; kg.getCachedZSortedEles = function(e) { if (e || !this.cachedZSortedEles) { var t = this.cy.mutableElements().toArray(); t.sort(aT), t.interactive = t.filter(function(n) { return n.interactive(); }), this.cachedZSortedEles = t, this.updateCachedGrabbedEles(); } else t = this.cachedZSortedEles; return t; }; var CT = {}; [iu, Hv, Hr, vf, J2, ii, kT, xg, kg].forEach(function(e) { kt(CT, e); }); var ST = {}; ST.getCachedImage = function(e, t, n) { var r = this, o = r.imageCache = r.imageCache || {}, a = o[e]; if (a) return a.image.complete || a.image.addEventListener("load", n), a.image; a = o[e] = o[e] || {}; var i = a.image = new Image(); i.addEventListener("load", n), i.addEventListener("error", function() { i.error = !0; }); var s = "data:", l = e.substring(0, s.length).toLowerCase() === s; return l || (t = t === "null" ? null : t, i.crossOrigin = t), i.src = e, i; }; var jc = {}; jc.registerBinding = function(e, t, n, r) { var o = Array.prototype.slice.apply(arguments, [1]), a = this.binder(e); return a.on.apply(a, o); }; jc.binder = function(e) { var t = this, n = t.cy.window(), r = e === n || e === n.document || e === n.document.body || vte(e); if (t.supportsPassiveEvents == null) { var o = !1; try { var a = Object.defineProperty({}, "passive", { get: function() { return o = !0, !0; } }); n.addEventListener("test", null, a); } catch { } t.supportsPassiveEvents = o; } var i = function(s, l, u) { var c = Array.prototype.slice.call(arguments); return r && t.supportsPassiveEvents && (c[2] = { capture: u ?? !1, passive: !1, once: !1 }), t.bindings.push({ target: e, args: c }), (e.addEventListener || e.on).apply(e, c), this; }; return { on: i, addEventListener: i, addListener: i, bind: i }; }; jc.nodeIsDraggable = function(e) { return e && e.isNode() && !e.locked() && e.grabbable(); }; jc.nodeIsGrabbable = function(e) { return this.nodeIsDraggable(e) && e.interactive(); }; jc.load = function() { var e = this, t = e.cy.window(), n = function(T) { return T.selected(); }, r = function(T, G, fe, ge) { T == null && (T = e.cy); for (var ve = 0; ve < G.length; ve++) { var Fe = G[ve]; T.emit({ originalEvent: fe, type: Fe, position: ge }); } }, o = function(T) { return T.shiftKey || T.metaKey || T.ctrlKey; }, a = function(T, G) { var fe = !0; if (e.cy.hasCompoundNodes() && T && T.pannable()) for (var ge = 0; G && ge < G.length; ge++) { var T = G[ge]; if (T.isNode() && T.isParent() && !T.pannable()) { fe = !1; break; } } else fe = !0; return fe; }, i = function(T) { T[0]._private.grabbed = !0; }, s = function(T) { T[0]._private.grabbed = !1; }, l = function(T) { T[0]._private.rscratch.inDragLayer = !0; }, u = function(T) { T[0]._private.rscratch.inDragLayer = !1; }, c = function(T) { T[0]._private.rscratch.isGrabTarget = !0; }, d = function(T) { T[0]._private.rscratch.isGrabTarget = !1; }, f = function(T, G) { var fe = G.addToList, ge = fe.has(T); !ge && T.grabbable() && !T.locked() && (fe.merge(T), i(T)); }, h = function(T, G) { if (T.cy().hasCompoundNodes() && !(G.inDragLayer == null && G.addToList == null)) { var fe = T.descendants(); G.inDragLayer && (fe.forEach(l), fe.connectedEdges().forEach(l)), G.addToList && f(fe, G); } }, p = function(T, G) { G = G || {}; var fe = T.cy().hasCompoundNodes(); G.inDragLayer && (T.forEach(l), T.neighborhood().stdFilter(function(ge) { return !fe || ge.isEdge(); }).forEach(l)), G.addToList && T.forEach(function(ge) { f(ge, G); }), h(T, G), g(T, { inDragLayer: G.inDragLayer }), e.updateCachedGrabbedEles(); }, v = p, m = function(T) { T && (e.getCachedZSortedEles().forEach(function(G) { s(G), u(G), d(G); }), e.updateCachedGrabbedEles()); }, g = function(T, G) { if (!(G.inDragLayer == null && G.addToList == null) && T.cy().hasCompoundNodes()) { var fe = T.ancestors().orphans(); if (!fe.same(T)) { var ge = fe.descendants().spawnSelf().merge(fe).unmerge(T).unmerge(T.descendants()), ve = ge.connectedEdges(); G.inDragLayer && (ve.forEach(l), ge.forEach(l)), G.addToList && ge.forEach(function(Fe) { f(Fe, G); }); } } }, b = function() { document.activeElement != null && document.activeElement.blur != null && document.activeElement.blur(); }, C = typeof MutationObserver < "u", x = typeof ResizeObserver < "u"; C ? (e.removeObserver = new MutationObserver(function(T) { for (var G = 0; G < T.length; G++) { var fe = T[G], ge = fe.removedNodes; if (ge) for (var ve = 0; ve < ge.length; ve++) { var Fe = ge[ve]; if (Fe === e.container) { e.destroy(); break; } } } }), e.container.parentNode && e.removeObserver.observe(e.container.parentNode, { childList: !0 })) : e.registerBinding(e.container, "DOMNodeRemoved", function(T) { e.destroy(); }); var w = sg(function() { e.cy.resize(); }, 100); C && (e.styleObserver = new MutationObserver(w), e.styleObserver.observe(e.container, { attributes: !0 })), e.registerBinding(t, "resize", w), x && (e.resizeObserver = new ResizeObserver(w), e.resizeObserver.observe(e.container)); var k = function(T, G) { for (; T != null; ) G(T), T = T.parentNode; }, S = function() { e.invalidateContainerClientCoordsCache(); }; k(e.container, function(T) { e.registerBinding(T, "transitionend", S), e.registerBinding(T, "animationend", S), e.registerBinding(T, "scroll", S); }), e.registerBinding(e.container, "contextmenu", function(T) { T.preventDefault(); }); var _ = function() { return e.selection[4] !== 0; }, O = function(T) { for (var G = e.findContainerClientCoords(), fe = G[0], ge = G[1], ve = G[2], Fe = G[3], Ce = T.touches ? T.touches : [T], Re = !1, lt = 0; lt < Ce.length; lt++) { var ut = Ce[lt]; if (fe <= ut.clientX && ut.clientX <= fe + ve && ge <= ut.clientY && ut.clientY <= ge + Fe) { Re = !0; break; } } if (!Re) return !1; for (var ue = e.container, Te = T.target, ke = Te.parentNode, Be = !1; ke; ) { if (ke === ue) { Be = !0; break; } ke = ke.parentNode; } return !!Be; }; e.registerBinding(e.container, "mousedown", function(T) { if (O(T) && !(e.hoverData.which === 1 && T.which !== 1)) { T.preventDefault(), b(), e.hoverData.capture = !0, e.hoverData.which = T.which; var G = e.cy, fe = [T.clientX, T.clientY], ge = e.projectIntoViewport(fe[0], fe[1]), ve = e.selection, Fe = e.findNearestElements(ge[0], ge[1], !0, !1), Ce = Fe[0], Re = e.dragData.possibleDragElements; e.hoverData.mdownPos = ge, e.hoverData.mdownGPos = fe; var lt = function() { e.hoverData.tapholdCancelled = !1, clearTimeout(e.hoverData.tapholdTimeout), e.hoverData.tapholdTimeout = setTimeout(function() { if (!e.hoverData.tapholdCancelled) { var Be = e.hoverData.down; Be ? Be.emit({ originalEvent: T, type: "taphold", position: { x: ge[0], y: ge[1] } }) : G.emit({ originalEvent: T, type: "taphold", position: { x: ge[0], y: ge[1] } }); } }, e.tapholdDuration); }; if (T.which == 3) { e.hoverData.cxtStarted = !0; var ut = { originalEvent: T, type: "cxttapstart", position: { x: ge[0], y: ge[1] } }; Ce ? (Ce.activate(), Ce.emit(ut), e.hoverData.down = Ce) : G.emit(ut), e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e.hoverData.cxtDragged = !1; } else if (T.which == 1) { Ce && Ce.activate(); { if (Ce != null && e.nodeIsGrabbable(Ce)) { var ue = function(Be) { return { originalEvent: T, type: Be, position: { x: ge[0], y: ge[1] } }; }, Te = function(Be) { Be.emit(ue("grab")); }; if (c(Ce), !Ce.selected()) Re = e.dragData.possibleDragElements = G.collection(), v(Ce, { addToList: Re }), Ce.emit(ue("grabon")).emit(ue("grab")); else { Re = e.dragData.possibleDragElements = G.collection(); var ke = G.$(function(Be) { return Be.isNode() && Be.selected() && e.nodeIsGrabbable(Be); }); p(ke, { addToList: Re }), Ce.emit(ue("grabon")), ke.forEach(Te); } e.redrawHint("eles", !0), e.redrawHint("drag", !0); } e.hoverData.down = Ce, e.hoverData.downs = Fe, e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); } r(Ce, ["mousedown", "tapstart", "vmousedown"], T, { x: ge[0], y: ge[1] }), Ce == null ? (ve[4] = 1, e.data.bgActivePosistion = { x: ge[0], y: ge[1] }, e.redrawHint("select", !0), e.redraw()) : Ce.pannable() && (ve[4] = 1), lt(); } ve[0] = ve[2] = ge[0], ve[1] = ve[3] = ge[1]; } }, !1), e.registerBinding(t, "mousemove", function(T) { var G = e.hoverData.capture; if (!(!G && !O(T))) { var fe = !1, ge = e.cy, ve = ge.zoom(), Fe = [T.clientX, T.clientY], Ce = e.projectIntoViewport(Fe[0], Fe[1]), Re = e.hoverData.mdownPos, lt = e.hoverData.mdownGPos, ut = e.selection, ue = null; !e.hoverData.draggingEles && !e.hoverData.dragging && !e.hoverData.selecting && (ue = e.findNearestElement(Ce[0], Ce[1], !0, !1)); var Te = e.hoverData.last, ke = e.hoverData.down, Be = [Ce[0] - ut[2], Ce[1] - ut[3]], Dt = e.dragData.possibleDragElements, Ft; if (lt) { var zt = Fe[0] - lt[0], Nt = zt * zt, Yt = Fe[1] - lt[1], Ln = Yt * Yt, pn = Nt + Ln; e.hoverData.isOverThresholdDrag = Ft = pn >= e.desktopTapThreshold2; } var fn = o(T); Ft && (e.hoverData.tapholdCancelled = !0); var Fn = function() { var lr = e.hoverData.dragDelta = e.hoverData.dragDelta || []; lr.length === 0 ? (lr.push(Be[0]), lr.push(Be[1])) : (lr[0] += Be[0], lr[1] += Be[1]); }; fe = !0, r(ue, ["mousemove", "vmousemove", "tapdrag"], T, { x: Ce[0], y: Ce[1] }); var Rn = function() { e.data.bgActivePosistion = void 0, e.hoverData.selecting || ge.emit({ originalEvent: T, type: "boxstart", position: { x: Ce[0], y: Ce[1] } }), ut[4] = 1, e.hoverData.selecting = !0, e.redrawHint("select", !0), e.redraw(); }; if (e.hoverData.which === 3) { if (Ft) { var wn = { originalEvent: T, type: "cxtdrag", position: { x: Ce[0], y: Ce[1] } }; ke ? ke.emit(wn) : ge.emit(wn), e.hoverData.cxtDragged = !0, (!e.hoverData.cxtOver || ue !== e.hoverData.cxtOver) && (e.hoverData.cxtOver && e.hoverData.cxtOver.emit({ originalEvent: T, type: "cxtdragout", position: { x: Ce[0], y: Ce[1] } }), e.hoverData.cxtOver = ue, ue && ue.emit({ originalEvent: T, type: "cxtdragover", position: { x: Ce[0], y: Ce[1] } })); } } else if (e.hoverData.dragging) { if (fe = !0, ge.panningEnabled() && ge.userPanningEnabled()) { var sr; if (e.hoverData.justStartedPan) { var Xn = e.hoverData.mdownPos; sr = { x: (Ce[0] - Xn[0]) * ve, y: (Ce[1] - Xn[1]) * ve }, e.hoverData.justStartedPan = !1; } else sr = { x: Be[0] * ve, y: Be[1] * ve }; ge.panBy(sr), ge.emit("dragpan"), e.hoverData.dragged = !0; } Ce = e.projectIntoViewport(T.clientX, T.clientY); } else if (ut[4] == 1 && (ke == null || ke.pannable())) { if (Ft) { if (!e.hoverData.dragging && ge.boxSelectionEnabled() && (fn || !ge.panningEnabled() || !ge.userPanningEnabled())) Rn(); else if (!e.hoverData.selecting && ge.panningEnabled() && ge.userPanningEnabled()) { var Zn = a(ke, e.hoverData.downs); Zn && (e.hoverData.dragging = !0, e.hoverData.justStartedPan = !0, ut[4] = 0, e.data.bgActivePosistion = zu(Re), e.redrawHint("select", !0), e.redraw()); } ke && ke.pannable() && ke.active() && ke.unactivate(); } } else { if (ke && ke.pannable() && ke.active() && ke.unactivate(), (!ke || !ke.grabbed()) && ue != Te && (Te && r(Te, ["mouseout", "tapdragout"], T, { x: Ce[0], y: Ce[1] }), ue && r(ue, ["mouseover", "tapdragover"], T, { x: Ce[0], y: Ce[1] }), e.hoverData.last = ue), ke) if (Ft) { if (ge.boxSelectionEnabled() && fn) ke && ke.grabbed() && (m(Dt), ke.emit("freeon"), Dt.emit("free"), e.dragData.didDrag && (ke.emit("dragfreeon"), Dt.emit("dragfree"))), Rn(); else if (ke && ke.grabbed() && e.nodeIsDraggable(ke)) { var Xt = !e.dragData.didDrag; Xt && e.redrawHint("eles", !0), e.dragData.didDrag = !0, e.hoverData.draggingEles || p(Dt, { inDragLayer: !0 }); var hn = { x: 0, y: 0 }; if (Ke(Be[0]) && Ke(Be[1]) && (hn.x += Be[0], hn.y += Be[1], Xt)) { var $n = e.hoverData.dragDelta; $n && Ke($n[0]) && Ke($n[1]) && (hn.x += $n[0], hn.y += $n[1]); } e.hoverData.draggingEles = !0, Dt.silentShift(hn).emit("position drag"), e.redrawHint("drag", !0), e.redraw(); } } else Fn(); fe = !0; } if (ut[2] = Ce[0], ut[3] = Ce[1], fe) return T.stopPropagation && T.stopPropagation(), T.preventDefault && T.preventDefault(), !1; } }, !1); var F, I, P; e.registerBinding(t, "mouseup", function(T) { if (!(e.hoverData.which === 1 && T.which !== 1 && e.hoverData.capture)) { var G = e.hoverData.capture; if (G) { e.hoverData.capture = !1; var fe = e.cy, ge = e.projectIntoViewport(T.clientX, T.clientY), ve = e.selection, Fe = e.findNearestElement(ge[0], ge[1], !0, !1), Ce = e.dragData.possibleDragElements, Re = e.hoverData.down, lt = o(T); if (e.data.bgActivePosistion && (e.redrawHint("select", !0), e.redraw()), e.hoverData.tapholdCancelled = !0, e.data.bgActivePosistion = void 0, Re && Re.unactivate(), e.hoverData.which === 3) { var ut = { originalEvent: T, type: "cxttapend", position: { x: ge[0], y: ge[1] } }; if (Re ? Re.emit(ut) : fe.emit(ut), !e.hoverData.cxtDragged) { var ue = { originalEvent: T, type: "cxttap", position: { x: ge[0], y: ge[1] } }; Re ? Re.emit(ue) : fe.emit(ue); } e.hoverData.cxtDragged = !1, e.hoverData.which = null; } else if (e.hoverData.which === 1) { if (r(Fe, ["mouseup", "tapend", "vmouseup"], T, { x: ge[0], y: ge[1] }), !e.dragData.didDrag && // didn't move a node around !e.hoverData.dragged && // didn't pan !e.hoverData.selecting && // not box selection !e.hoverData.isOverThresholdDrag && (r(Re, ["click", "tap", "vclick"], T, { x: ge[0], y: ge[1] }), I = !1, T.timeStamp - P <= fe.multiClickDebounceTime() ? (F && clearTimeout(F), I = !0, P = null, r(Re, ["dblclick", "dbltap", "vdblclick"], T, { x: ge[0], y: ge[1] })) : (F = setTimeout(function() { I || r(Re, ["oneclick", "onetap", "voneclick"], T, { x: ge[0], y: ge[1] }); }, fe.multiClickDebounceTime()), P = T.timeStamp)), Re == null && !e.dragData.didDrag && !e.hoverData.selecting && !e.hoverData.dragged && !o(T) && (fe.$(n).unselect(["tapunselect"]), Ce.length > 0 && e.redrawHint("eles", !0), e.dragData.possibleDragElements = Ce = fe.collection()), Fe == Re && !e.dragData.didDrag && !e.hoverData.selecting && Fe != null && Fe._private.selectable && (e.hoverData.dragging || (fe.selectionType() === "additive" || lt ? Fe.selected() ? Fe.unselect(["tapunselect"]) : Fe.select(["tapselect"]) : lt || (fe.$(n).unmerge(Fe).unselect(["tapunselect"]), Fe.select(["tapselect"]))), e.redrawHint("eles", !0)), e.hoverData.selecting) { var Te = fe.collection(e.getAllInBox(ve[0], ve[1], ve[2], ve[3])); e.redrawHint("select", !0), Te.length > 0 && e.redrawHint("eles", !0), fe.emit({ type: "boxend", originalEvent: T, position: { x: ge[0], y: ge[1] } }); var ke = function(Dt) { return Dt.selectable() && !Dt.selected(); }; fe.selectionType() === "additive" || lt || fe.$(n).unmerge(Te).unselect(), Te.emit("box").stdFilter(ke).select().emit("boxselect"), e.redraw(); } if (e.hoverData.dragging && (e.hoverData.dragging = !1, e.redrawHint("select", !0), e.redrawHint("eles", !0), e.redraw()), !ve[4]) { e.redrawHint("drag", !0), e.redrawHint("eles", !0); var Be = Re && Re.grabbed(); m(Ce), Be && (Re.emit("freeon"), Ce.emit("free"), e.dragData.didDrag && (Re.emit("dragfreeon"), Ce.emit("dragfree"))); } } ve[4] = 0, e.hoverData.down = null, e.hoverData.cxtStarted = !1, e.hoverData.draggingEles = !1, e.hoverData.selecting = !1, e.hoverData.isOverThresholdDrag = !1, e.dragData.didDrag = !1, e.hoverData.dragged = !1, e.hoverData.dragDelta = [], e.hoverData.mdownPos = null, e.hoverData.mdownGPos = null, e.hoverData.which = null; } } }, !1); var M = function(T) { if (!e.scrollingPage) { var G = e.cy, fe = G.zoom(), ge = G.pan(), ve = e.projectIntoViewport(T.clientX, T.clientY), Fe = [ve[0] * fe + ge.x, ve[1] * fe + ge.y]; if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || _()) { T.preventDefault(); return; } if (G.panningEnabled() && G.userPanningEnabled() && G.zoomingEnabled() && G.userZoomingEnabled()) { T.preventDefault(), e.data.wheelZooming = !0, clearTimeout(e.data.wheelTimeout), e.data.wheelTimeout = setTimeout(function() { e.data.wheelZooming = !1, e.redrawHint("eles", !0), e.redraw(); }, 150); var Ce; T.deltaY != null ? Ce = T.deltaY / -250 : T.wheelDeltaY != null ? Ce = T.wheelDeltaY / 1e3 : Ce = T.wheelDelta / 1e3, Ce = Ce * e.wheelSensitivity; var Re = T.deltaMode === 1; Re && (Ce *= 33); var lt = G.zoom() * Math.pow(10, Ce); T.type === "gesturechange" && (lt = e.gestureStartZoom * T.scale), G.zoom({ level: lt, renderedPosition: { x: Fe[0], y: Fe[1] } }), G.emit(T.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); } } }; e.registerBinding(e.container, "wheel", M, !0), e.registerBinding(t, "scroll", function(T) { e.scrollingPage = !0, clearTimeout(e.scrollingPageTimeout), e.scrollingPageTimeout = setTimeout(function() { e.scrollingPage = !1; }, 250); }, !0), e.registerBinding(e.container, "gesturestart", function(T) { e.gestureStartZoom = e.cy.zoom(), e.hasTouchStarted || T.preventDefault(); }, !0), e.registerBinding(e.container, "gesturechange", function(T) { e.hasTouchStarted || M(T); }, !0), e.registerBinding(e.container, "mouseout", function(T) { var G = e.projectIntoViewport(T.clientX, T.clientY); e.cy.emit({ originalEvent: T, type: "mouseout", position: { x: G[0], y: G[1] } }); }, !1), e.registerBinding(e.container, "mouseover", function(T) { var G = e.projectIntoViewport(T.clientX, T.clientY); e.cy.emit({ originalEvent: T, type: "mouseover", position: { x: G[0], y: G[1] } }); }, !1); var N, j, A, U, q, Y, ie, re, le, he, we, be, de, ae = function(T, G, fe, ge) { return Math.sqrt((fe - T) * (fe - T) + (ge - G) * (ge - G)); }, ee = function(T, G, fe, ge) { return (fe - T) * (fe - T) + (ge - G) * (ge - G); }, se; e.registerBinding(e.container, "touchstart", se = function(T) { if (e.hasTouchStarted = !0, !!O(T)) { b(), e.touchData.capture = !0, e.data.bgActivePosistion = void 0; var G = e.cy, fe = e.touchData.now, ge = e.touchData.earlier; if (T.touches[0]) { var ve = e.projectIntoViewport(T.touches[0].clientX, T.touches[0].clientY); fe[0] = ve[0], fe[1] = ve[1]; } if (T.touches[1]) { var ve = e.projectIntoViewport(T.touches[1].clientX, T.touches[1].clientY); fe[2] = ve[0], fe[3] = ve[1]; } if (T.touches[2]) { var ve = e.projectIntoViewport(T.touches[2].clientX, T.touches[2].clientY); fe[4] = ve[0], fe[5] = ve[1]; } if (T.touches[1]) { e.touchData.singleTouchMoved = !0, m(e.dragData.touchDragEles); var Fe = e.findContainerClientCoords(); le = Fe[0], he = Fe[1], we = Fe[2], be = Fe[3], N = T.touches[0].clientX - le, j = T.touches[0].clientY - he, A = T.touches[1].clientX - le, U = T.touches[1].clientY - he, de = 0 <= N && N <= we && 0 <= A && A <= we && 0 <= j && j <= be && 0 <= U && U <= be; var Ce = G.pan(), Re = G.zoom(); q = ae(N, j, A, U), Y = ee(N, j, A, U), ie = [(N + A) / 2, (j + U) / 2], re = [(ie[0] - Ce.x) / Re, (ie[1] - Ce.y) / Re]; var lt = 200, ut = lt * lt; if (Y < ut && !T.touches[2]) { var ue = e.findNearestElement(fe[0], fe[1], !0, !0), Te = e.findNearestElement(fe[2], fe[3], !0, !0); ue && ue.isNode() ? (ue.activate().emit({ originalEvent: T, type: "cxttapstart", position: { x: fe[0], y: fe[1] } }), e.touchData.start = ue) : Te && Te.isNode() ? (Te.activate().emit({ originalEvent: T, type: "cxttapstart", position: { x: fe[0], y: fe[1] } }), e.touchData.start = Te) : G.emit({ originalEvent: T, type: "cxttapstart", position: { x: fe[0], y: fe[1] } }), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !0, e.touchData.cxtDragged = !1, e.data.bgActivePosistion = void 0, e.redraw(); return; } } if (T.touches[2]) G.boxSelectionEnabled() && T.preventDefault(); else if (!T.touches[1] && T.touches[0]) { var ke = e.findNearestElements(fe[0], fe[1], !0, !0), Be = ke[0]; if (Be != null && (Be.activate(), e.touchData.start = Be, e.touchData.starts = ke, e.nodeIsGrabbable(Be))) { var Dt = e.dragData.touchDragEles = G.collection(), Ft = null; e.redrawHint("eles", !0), e.redrawHint("drag", !0), Be.selected() ? (Ft = G.$(function(pn) { return pn.selected() && e.nodeIsGrabbable(pn); }), p(Ft, { addToList: Dt })) : v(Be, { addToList: Dt }), c(Be); var zt = function(pn) { return { originalEvent: T, type: pn, position: { x: fe[0], y: fe[1] } }; }; Be.emit(zt("grabon")), Ft ? Ft.forEach(function(pn) { pn.emit(zt("grab")); }) : Be.emit(zt("grab")); } r(Be, ["touchstart", "tapstart", "vmousedown"], T, { x: fe[0], y: fe[1] }), Be == null && (e.data.bgActivePosistion = { x: ve[0], y: ve[1] }, e.redrawHint("select", !0), e.redraw()), e.touchData.singleTouchMoved = !1, e.touchData.singleTouchStartTime = +/* @__PURE__ */ new Date(), clearTimeout(e.touchData.tapholdTimeout), e.touchData.tapholdTimeout = setTimeout(function() { e.touchData.singleTouchMoved === !1 && !e.pinching && !e.touchData.selecting && r(e.touchData.start, ["taphold"], T, { x: fe[0], y: fe[1] }); }, e.tapholdDuration); } if (T.touches.length >= 1) { for (var Nt = e.touchData.startPosition = [null, null, null, null, null, null], Yt = 0; Yt < fe.length; Yt++) Nt[Yt] = ge[Yt] = fe[Yt]; var Ln = T.touches[0]; e.touchData.startGPosition = [Ln.clientX, Ln.clientY]; } } }, !1); var pe; e.registerBinding(t, "touchmove", pe = function(T) { var G = e.touchData.capture; if (!(!G && !O(T))) { var fe = e.selection, ge = e.cy, ve = e.touchData.now, Fe = e.touchData.earlier, Ce = ge.zoom(); if (T.touches[0]) { var Re = e.projectIntoViewport(T.touches[0].clientX, T.touches[0].clientY); ve[0] = Re[0], ve[1] = Re[1]; } if (T.touches[1]) { var Re = e.projectIntoViewport(T.touches[1].clientX, T.touches[1].clientY); ve[2] = Re[0], ve[3] = Re[1]; } if (T.touches[2]) { var Re = e.projectIntoViewport(T.touches[2].clientX, T.touches[2].clientY); ve[4] = Re[0], ve[5] = Re[1]; } var lt = e.touchData.startGPosition, ut; if (G && T.touches[0] && lt) { for (var ue = [], Te = 0; Te < ve.length; Te++) ue[Te] = ve[Te] - Fe[Te]; var ke = T.touches[0].clientX - lt[0], Be = ke * ke, Dt = T.touches[0].clientY - lt[1], Ft = Dt * Dt, zt = Be + Ft; ut = zt >= e.touchTapThreshold2; } if (G && e.touchData.cxt) { T.preventDefault(); var Nt = T.touches[0].clientX - le, Yt = T.touches[0].clientY - he, Ln = T.touches[1].clientX - le, pn = T.touches[1].clientY - he, fn = ee(Nt, Yt, Ln, pn), Fn = fn / Y, Rn = 150, wn = Rn * Rn, sr = 1.5, Xn = sr * sr; if (Fn >= Xn || fn >= wn) { e.touchData.cxt = !1, e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Zn = { originalEvent: T, type: "cxttapend", position: { x: ve[0], y: ve[1] } }; e.touchData.start ? (e.touchData.start.unactivate().emit(Zn), e.touchData.start = null) : ge.emit(Zn); } } if (G && e.touchData.cxt) { var Zn = { originalEvent: T, type: "cxtdrag", position: { x: ve[0], y: ve[1] } }; e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.touchData.start ? e.touchData.start.emit(Zn) : ge.emit(Zn), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxtDragged = !0; var Xt = e.findNearestElement(ve[0], ve[1], !0, !0); (!e.touchData.cxtOver || Xt !== e.touchData.cxtOver) && (e.touchData.cxtOver && e.touchData.cxtOver.emit({ originalEvent: T, type: "cxtdragout", position: { x: ve[0], y: ve[1] } }), e.touchData.cxtOver = Xt, Xt && Xt.emit({ originalEvent: T, type: "cxtdragover", position: { x: ve[0], y: ve[1] } })); } else if (G && T.touches[2] && ge.boxSelectionEnabled()) T.preventDefault(), e.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e.touchData.selecting || ge.emit({ originalEvent: T, type: "boxstart", position: { x: ve[0], y: ve[1] } }), e.touchData.selecting = !0, e.touchData.didSelect = !0, fe[4] = 1, !fe || fe.length === 0 || fe[0] === void 0 ? (fe[0] = (ve[0] + ve[2] + ve[4]) / 3, fe[1] = (ve[1] + ve[3] + ve[5]) / 3, fe[2] = (ve[0] + ve[2] + ve[4]) / 3 + 1, fe[3] = (ve[1] + ve[3] + ve[5]) / 3 + 1) : (fe[2] = (ve[0] + ve[2] + ve[4]) / 3, fe[3] = (ve[1] + ve[3] + ve[5]) / 3), e.redrawHint("select", !0), e.redraw(); else if (G && T.touches[1] && !e.touchData.didSelect && ge.zoomingEnabled() && ge.panningEnabled() && ge.userZoomingEnabled() && ge.userPanningEnabled()) { T.preventDefault(), e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var hn = e.dragData.touchDragEles; if (hn) { e.redrawHint("drag", !0); for (var $n = 0; $n < hn.length; $n++) { var lr = hn[$n]._private; lr.grabbed = !1, lr.rscratch.inDragLayer = !1; } } var Ao = e.touchData.start, Nt = T.touches[0].clientX - le, Yt = T.touches[0].clientY - he, Ln = T.touches[1].clientX - le, pn = T.touches[1].clientY - he, D = ae(Nt, Yt, Ln, pn), ne = D / q; if (de) { var Oe = Nt - N, We = Yt - j, Zt = Ln - A, _n = pn - U, Tn = (Oe + Zt) / 2, on = (We + _n) / 2, Jt = ge.zoom(), Po = Jt * ne, Zs = ge.pan(), Df = re[0] * Jt + Zs.x, Mf = re[1] * Jt + Zs.y, Nf = { x: -Po / Jt * (Df - Zs.x - Tn) + Df, y: -Po / Jt * (Mf - Zs.y - on) + Mf }; if (Ao && Ao.active()) { var hn = e.dragData.touchDragEles; m(hn), e.redrawHint("drag", !0), e.redrawHint("eles", !0), Ao.unactivate().emit("freeon"), hn.emit("free"), e.dragData.didDrag && (Ao.emit("dragfreeon"), hn.emit("dragfree")); } ge.viewport({ zoom: Po, pan: Nf, cancelOnFailedZoom: !0 }), ge.emit("pinchzoom"), q = D, N = Nt, j = Yt, A = Ln, U = pn, e.pinching = !0; } if (T.touches[0]) { var Re = e.projectIntoViewport(T.touches[0].clientX, T.touches[0].clientY); ve[0] = Re[0], ve[1] = Re[1]; } if (T.touches[1]) { var Re = e.projectIntoViewport(T.touches[1].clientX, T.touches[1].clientY); ve[2] = Re[0], ve[3] = Re[1]; } if (T.touches[2]) { var Re = e.projectIntoViewport(T.touches[2].clientX, T.touches[2].clientY); ve[4] = Re[0], ve[5] = Re[1]; } } else if (T.touches[0] && !e.touchData.didSelect) { var wo = e.touchData.start, td = e.touchData.last, Xt; if (!e.hoverData.draggingEles && !e.swipePanning && (Xt = e.findNearestElement(ve[0], ve[1], !0, !0)), G && wo != null && T.preventDefault(), G && wo != null && e.nodeIsDraggable(wo)) if (ut) { var hn = e.dragData.touchDragEles, Bf = !e.dragData.didDrag; Bf && p(hn, { inDragLayer: !0 }), e.dragData.didDrag = !0; var Js = { x: 0, y: 0 }; if (Ke(ue[0]) && Ke(ue[1]) && (Js.x += ue[0], Js.y += ue[1], Bf)) { e.redrawHint("eles", !0); var qr = e.touchData.dragDelta; qr && Ke(qr[0]) && Ke(qr[1]) && (Js.x += qr[0], Js.y += qr[1]); } e.hoverData.draggingEles = !0, hn.silentShift(Js).emit("position drag"), e.redrawHint("drag", !0), e.touchData.startPosition[0] == Fe[0] && e.touchData.startPosition[1] == Fe[1] && e.redrawHint("eles", !0), e.redraw(); } else { var qr = e.touchData.dragDelta = e.touchData.dragDelta || []; qr.length === 0 ? (qr.push(ue[0]), qr.push(ue[1])) : (qr[0] += ue[0], qr[1] += ue[1]); } if (r(wo || Xt, ["touchmove", "tapdrag", "vmousemove"], T, { x: ve[0], y: ve[1] }), (!wo || !wo.grabbed()) && Xt != td && (td && td.emit({ originalEvent: T, type: "tapdragout", position: { x: ve[0], y: ve[1] } }), Xt && Xt.emit({ originalEvent: T, type: "tapdragover", position: { x: ve[0], y: ve[1] } })), e.touchData.last = Xt, G) for (var $n = 0; $n < ve.length; $n++) ve[$n] && e.touchData.startPosition[$n] && ut && (e.touchData.singleTouchMoved = !0); if (G && (wo == null || wo.pannable()) && ge.panningEnabled() && ge.userPanningEnabled()) { var cm = a(wo, e.touchData.starts); cm && (T.preventDefault(), e.data.bgActivePosistion || (e.data.bgActivePosistion = zu(e.touchData.startPosition)), e.swipePanning ? (ge.panBy({ x: ue[0] * Ce, y: ue[1] * Ce }), ge.emit("dragpan")) : ut && (e.swipePanning = !0, ge.panBy({ x: ke * Ce, y: Dt * Ce }), ge.emit("dragpan"), wo && (wo.unactivate(), e.redrawHint("select", !0), e.touchData.start = null))); var Re = e.projectIntoViewport(T.touches[0].clientX, T.touches[0].clientY); ve[0] = Re[0], ve[1] = Re[1]; } } for (var Te = 0; Te < ve.length; Te++) Fe[Te] = ve[Te]; G && T.touches.length > 0 && !e.hoverData.draggingEles && !e.swipePanning && e.data.bgActivePosistion != null && (e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.redraw()); } }, !1); var Se; e.registerBinding(t, "touchcancel", Se = function(T) { var G = e.touchData.start; e.touchData.capture = !1, G && G.unactivate(); }); var Le, je, _e, ze; if (e.registerBinding(t, "touchend", Le = function(T) { var G = e.touchData.start, fe = e.touchData.capture; if (fe) T.touches.length === 0 && (e.touchData.capture = !1), T.preventDefault(); else return; var ge = e.selection; e.swipePanning = !1, e.hoverData.draggingEles = !1; var ve = e.cy, Fe = ve.zoom(), Ce = e.touchData.now, Re = e.touchData.earlier; if (T.touches[0]) { var lt = e.projectIntoViewport(T.touches[0].clientX, T.touches[0].clientY); Ce[0] = lt[0], Ce[1] = lt[1]; } if (T.touches[1]) { var lt = e.projectIntoViewport(T.touches[1].clientX, T.touches[1].clientY); Ce[2] = lt[0], Ce[3] = lt[1]; } if (T.touches[2]) { var lt = e.projectIntoViewport(T.touches[2].clientX, T.touches[2].clientY); Ce[4] = lt[0], Ce[5] = lt[1]; } G && G.unactivate(); var ut; if (e.touchData.cxt) { if (ut = { originalEvent: T, type: "cxttapend", position: { x: Ce[0], y: Ce[1] } }, G ? G.emit(ut) : ve.emit(ut), !e.touchData.cxtDragged) { var ue = { originalEvent: T, type: "cxttap", position: { x: Ce[0], y: Ce[1] } }; G ? G.emit(ue) : ve.emit(ue); } e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw(); return; } if (!T.touches[2] && ve.boxSelectionEnabled() && e.touchData.selecting) { e.touchData.selecting = !1; var Te = ve.collection(e.getAllInBox(ge[0], ge[1], ge[2], ge[3])); ge[0] = void 0, ge[1] = void 0, ge[2] = void 0, ge[3] = void 0, ge[4] = 0, e.redrawHint("select", !0), ve.emit({ type: "boxend", originalEvent: T, position: { x: Ce[0], y: Ce[1] } }); var ke = function(Rn) { return Rn.selectable() && !Rn.selected(); }; Te.emit("box").stdFilter(ke).select().emit("boxselect"), Te.nonempty() && e.redrawHint("eles", !0), e.redraw(); } if (G != null && G.unactivate(), T.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); else if (!T.touches[1] && !T.touches[0] && !T.touches[0]) { e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Be = e.dragData.touchDragEles; if (G != null) { var Dt = G._private.grabbed; m(Be), e.redrawHint("drag", !0), e.redrawHint("eles", !0), Dt && (G.emit("freeon"), Be.emit("free"), e.dragData.didDrag && (G.emit("dragfreeon"), Be.emit("dragfree"))), r(G, ["touchend", "tapend", "vmouseup", "tapdragout"], T, { x: Ce[0], y: Ce[1] }), G.unactivate(), e.touchData.start = null; } else { var Ft = e.findNearestElement(Ce[0], Ce[1], !0, !0); r(Ft, ["touchend", "tapend", "vmouseup", "tapdragout"], T, { x: Ce[0], y: Ce[1] }); } var zt = e.touchData.startPosition[0] - Ce[0], Nt = zt * zt, Yt = e.touchData.startPosition[1] - Ce[1], Ln = Yt * Yt, pn = Nt + Ln, fn = pn * Fe * Fe; e.touchData.singleTouchMoved || (G || ve.$(":selected").unselect(["tapunselect"]), r(G, ["tap", "vclick"], T, { x: Ce[0], y: Ce[1] }), je = !1, T.timeStamp - ze <= ve.multiClickDebounceTime() ? (_e && clearTimeout(_e), je = !0, ze = null, r(G, ["dbltap", "vdblclick"], T, { x: Ce[0], y: Ce[1] })) : (_e = setTimeout(function() { je || r(G, ["onetap", "voneclick"], T, { x: Ce[0], y: Ce[1] }); }, ve.multiClickDebounceTime()), ze = T.timeStamp)), G != null && !e.dragData.didDrag && G._private.selectable && fn < e.touchTapThreshold2 && !e.pinching && (ve.selectionType() === "single" ? (ve.$(n).unmerge(G).unselect(["tapunselect"]), G.select(["tapselect"])) : G.selected() ? G.unselect(["tapunselect"]) : G.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0; } for (var Fn = 0; Fn < Ce.length; Fn++) Re[Fn] = Ce[Fn]; e.dragData.didDrag = !1, T.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [null, null, null, null, null, null], e.touchData.startGPosition = null, e.touchData.didSelect = !1), T.touches.length < 2 && (T.touches.length === 1 && (e.touchData.startGPosition = [T.touches[0].clientX, T.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw()); }, !1), typeof TouchEvent > "u") { var Ie = [], He = function(T) { return { clientX: T.clientX, clientY: T.clientY, force: 1, identifier: T.pointerId, pageX: T.pageX, pageY: T.pageY, radiusX: T.width / 2, radiusY: T.height / 2, screenX: T.screenX, screenY: T.screenY, target: T.target }; }, qe = function(T) { return { event: T, touch: He(T) }; }, et = function(T) { Ie.push(qe(T)); }, Ve = function(T) { for (var G = 0; G < Ie.length; G++) { var fe = Ie[G]; if (fe.event.pointerId === T.pointerId) { Ie.splice(G, 1); return; } } }, nt = function(T) { var G = Ie.filter(function(fe) { return fe.event.pointerId === T.pointerId; })[0]; G.event = T, G.touch = He(T); }, ot = function(T) { T.touches = Ie.map(function(G) { return G.touch; }); }, pt = function(T) { return T.pointerType === "mouse" || T.pointerType === 4; }; e.registerBinding(e.container, "pointerdown", function(T) { pt(T) || (T.preventDefault(), et(T), ot(T), se(T)); }), e.registerBinding(e.container, "pointerup", function(T) { pt(T) || (Ve(T), ot(T), Le(T)); }), e.registerBinding(e.container, "pointercancel", function(T) { pt(T) || (Ve(T), ot(T), Se(T)); }), e.registerBinding(e.container, "pointermove", function(T) { pt(T) || (T.preventDefault(), nt(T), ot(T), pe(T)); }); } }; var Ui = {}; Ui.generatePolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, draw: function(n, r, o, a, i, s) { this.renderer.nodeShapeImpl("polygon", n, r, o, a, i, this.points); }, intersectLine: function(n, r, o, a, i, s, l, u) { return yp(i, s, this.points, n, r, o / 2, a / 2, l); }, checkPoint: function(n, r, o, a, i, s, l, u) { return Li(n, r, this.points, s, l, a, i, [0, -1], o); } }; }; Ui.generateEllipse = function() { return this.nodeShapes.ellipse = { renderer: this, name: "ellipse", draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o); }, intersectLine: function(e, t, n, r, o, a, i, s) { return lre(o, a, e, t, n / 2 + i, r / 2 + i); }, checkPoint: function(e, t, n, r, o, a, i, s) { return fl(e, t, r, o, a, i, n); } }; }; Ui.generateRoundPolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, getOrCreateCorners: function(n, r, o, a, i, s, l) { if (s[l] !== void 0 && s[l + "-cx"] === n && s[l + "-cy"] === r) return s[l]; s[l] = new Array(t.length / 2), s[l + "-cx"] = n, s[l + "-cy"] = r; var u = o / 2, c = a / 2; i = i === "auto" ? _6(o, a) : i; for (var d = new Array(t.length / 2), f = 0; f < t.length / 2; f++) d[f] = { x: n + u * t[f * 2], y: r + c * t[f * 2 + 1] }; var h, p, v, m, g = d.length; for (p = d[g - 1], h = 0; h < g; h++) v = d[h % g], m = d[(h + 1) % g], s[l][h] = Z2(p, v, m, i), p = v, v = m; return s[l]; }, draw: function(n, r, o, a, i, s, l) { this.renderer.nodeShapeImpl("round-polygon", n, r, o, a, i, this.points, this.getOrCreateCorners(r, o, a, i, s, l, "drawCorners")); }, intersectLine: function(n, r, o, a, i, s, l, u, c) { return ure(i, s, this.points, n, r, o, a, l, this.getOrCreateCorners(n, r, o, a, u, c, "corners")); }, checkPoint: function(n, r, o, a, i, s, l, u, c) { return sre(n, r, this.points, s, l, a, i, this.getOrCreateCorners(s, l, a, i, u, c, "corners")); } }; }; Ui.generateRoundRectangle = function() { return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = { renderer: this, name: "round-rectangle", points: Gr(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, this.points, a); }, intersectLine: function(e, t, n, r, o, a, i, s) { return E6(o, a, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, o, a, i, s) { var l = r / 2, u = o / 2; s = s === "auto" ? Bl(r, o) : s, s = Math.min(l, u, s); var c = s * 2; return !!(Li(e, t, this.points, a, i, r, o - c, [0, -1], n) || Li(e, t, this.points, a, i, r - c, o, [0, -1], n) || fl(e, t, c, c, a - l + s, i - u + s, n) || fl(e, t, c, c, a + l - s, i - u + s, n) || fl(e, t, c, c, a + l - s, i + u - s, n) || fl(e, t, c, c, a - l + s, i + u - s, n)); } }; }; Ui.generateCutRectangle = function() { return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = { renderer: this, name: "cut-rectangle", cornerLength: B2(), points: Gr(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, null, a); }, generateCutTrianglePts: function(e, t, n, r, o) { var a = o === "auto" ? this.cornerLength : o, i = t / 2, s = e / 2, l = n - s, u = n + s, c = r - i, d = r + i; return { topLeft: [l, c + a, l + a, c, l + a, c + a], topRight: [u - a, c, u, c + a, u - a, c + a], bottomRight: [u, d - a, u - a, d, u - a, d - a], bottomLeft: [l + a, d, l, d - a, l + a, d - a] }; }, intersectLine: function(e, t, n, r, o, a, i, s) { var l = this.generateCutTrianglePts(n + 2 * i, r + 2 * i, e, t, s), u = [].concat.apply([], [l.topLeft.splice(0, 4), l.topRight.splice(0, 4), l.bottomRight.splice(0, 4), l.bottomLeft.splice(0, 4)]); return yp(o, a, u, e, t); }, checkPoint: function(e, t, n, r, o, a, i, s) { var l = s === "auto" ? this.cornerLength : s; if (Li(e, t, this.points, a, i, r, o - 2 * l, [0, -1], n) || Li(e, t, this.points, a, i, r - 2 * l, o, [0, -1], n)) return !0; var u = this.generateCutTrianglePts(r, o, a, i); return ro(e, t, u.topLeft) || ro(e, t, u.topRight) || ro(e, t, u.bottomRight) || ro(e, t, u.bottomLeft); } }; }; Ui.generateBarrel = function() { return this.nodeShapes.barrel = { renderer: this, name: "barrel", points: Gr(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o); }, intersectLine: function(e, t, n, r, o, a, i, s) { var l = 0.15, u = 0.5, c = 0.85, d = this.generateBarrelBezierPts(n + 2 * i, r + 2 * i, e, t), f = function(p) { var v = Uu({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, l), m = Uu({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, u), g = Uu({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, c); return [p[0], p[1], v.x, v.y, m.x, m.y, g.x, g.y, p[4], p[5]]; }, h = [].concat(f(d.topLeft), f(d.topRight), f(d.bottomRight), f(d.bottomLeft)); return yp(o, a, h, e, t); }, generateBarrelBezierPts: function(e, t, n, r) { var o = t / 2, a = e / 2, i = n - a, s = n + a, l = r - o, u = r + o, c = uy(e, t), d = c.heightOffset, f = c.widthOffset, h = c.ctrlPtOffsetPct * e, p = { topLeft: [i, l + d, i + h, l, i + f, l], topRight: [s - f, l, s - h, l, s, l + d], bottomRight: [s, u - d, s - h, u, s - f, u], bottomLeft: [i + f, u, i + h, u, i, u - d] }; return p.topLeft.isTop = !0, p.topRight.isTop = !0, p.bottomLeft.isBottom = !0, p.bottomRight.isBottom = !0, p; }, checkPoint: function(e, t, n, r, o, a, i, s) { var l = uy(r, o), u = l.heightOffset, c = l.widthOffset; if (Li(e, t, this.points, a, i, r, o - 2 * u, [0, -1], n) || Li(e, t, this.points, a, i, r - 2 * c, o, [0, -1], n)) return !0; for (var d = this.generateBarrelBezierPts(r, o, a, i), f = function(k, S, _) { var O = _[4], F = _[2], I = _[0], P = _[5], M = _[1], N = Math.min(O, I), j = Math.max(O, I), A = Math.min(P, M), U = Math.max(P, M); if (N <= k && k <= j && A <= S && S <= U) { var q = cre(O, F, I), Y = rre(q[0], q[1], q[2], k), ie = Y.filter(function(re) { return 0 <= re && re <= 1; }); if (ie.length > 0) return ie[0]; } return null; }, h = Object.keys(d), p = 0; p < h.length; p++) { var v = h[p], m = d[v], g = f(e, t, m); if (g != null) { var b = m[5], C = m[3], x = m[1], w = ur(b, C, x, g); if (m.isTop && w <= t || m.isBottom && t <= w) return !0; } } return !1; } }; }; Ui.generateBottomRoundrectangle = function() { return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { renderer: this, name: "bottom-round-rectangle", points: Gr(4, 0), draw: function(e, t, n, r, o, a) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, o, this.points, a); }, intersectLine: function(e, t, n, r, o, a, i, s) { var l = e - (n / 2 + i), u = t - (r / 2 + i), c = u, d = e + (n / 2 + i), f = ks(o, a, e, t, l, u, d, c, !1); return f.length > 0 ? f : E6(o, a, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, o, a, i, s) { s = s === "auto" ? Bl(r, o) : s; var l = 2 * s; if (Li(e, t, this.points, a, i, r, o - l, [0, -1], n) || Li(e, t, this.points, a, i, r - l, o, [0, -1], n)) return !0; var u = r / 2 + 2 * n, c = o / 2 + 2 * n, d = [a - u, i - c, a - u, i, a + u, i, a + u, i - c]; return !!(ro(e, t, d) || fl(e, t, l, l, a + r / 2 - s, i + o / 2 - s, n) || fl(e, t, l, l, a - r / 2 + s, i + o / 2 - s, n)); } }; }; Ui.registerNodeShapes = function() { var e = this.nodeShapes = {}, t = this; this.generateEllipse(), this.generatePolygon("triangle", Gr(3, 0)), this.generateRoundPolygon("round-triangle", Gr(3, 0)), this.generatePolygon("rectangle", Gr(4, 0)), e.square = e.rectangle, this.generateRoundRectangle(), this.generateCutRectangle(), this.generateBarrel(), this.generateBottomRoundrectangle(); { var n = [0, 1, 1, 0, 0, -1, -1, 0]; this.generatePolygon("diamond", n), this.generateRoundPolygon("round-diamond", n); } this.generatePolygon("pentagon", Gr(5, 0)), this.generateRoundPolygon("round-pentagon", Gr(5, 0)), this.generatePolygon("hexagon", Gr(6, 0)), this.generateRoundPolygon("round-hexagon", Gr(6, 0)), this.generatePolygon("heptagon", Gr(7, 0)), this.generateRoundPolygon("round-heptagon", Gr(7, 0)), this.generatePolygon("octagon", Gr(8, 0)), this.generateRoundPolygon("round-octagon", Gr(8, 0)); var r = new Array(20); { var o = ly(5, 0), a = ly(5, Math.PI / 5), i = 0.5 * (3 - Math.sqrt(5)); i *= 1.57; for (var s = 0; s < a.length / 2; s++) a[s * 2] *= i, a[s * 2 + 1] *= i; for (var s = 0; s < 20 / 4; s++) r[s * 4] = o[s * 2], r[s * 4 + 1] = o[s * 2 + 1], r[s * 4 + 2] = a[s * 2], r[s * 4 + 3] = a[s * 2 + 1]; } r = $6(r), this.generatePolygon("star", r), this.generatePolygon("vee", [-1, -1, 0, -0.333, 1, -1, 0, 1]), this.generatePolygon("rhomboid", [-1, -1, 0.333, -1, 1, 1, -0.333, 1]), this.generatePolygon("right-rhomboid", [-0.333, -1, 1, -1, 0.333, 1, -1, 1]), this.nodeShapes.concavehexagon = this.generatePolygon("concave-hexagon", [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); { var l = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; this.generatePolygon("tag", l), this.generateRoundPolygon("round-tag", l); } e.makePolygon = function(u) { var c = u.join("$"), d = "polygon-" + c, f; return (f = this[d]) ? f : t.generatePolygon(d, u); }; }; var gf = {}; gf.timeToRender = function() { return this.redrawTotalTime / this.redrawCount; }; gf.redraw = function(e) { e = e || w6(); var t = this; t.averageRedrawTime === void 0 && (t.averageRedrawTime = 0), t.lastRedrawTime === void 0 && (t.lastRedrawTime = 0), t.lastDrawTime === void 0 && (t.lastDrawTime = 0), t.requestedFrame = !0, t.renderOptions = e; }; gf.beforeRender = function(e, t) { if (!this.destroyed) { t == null && Nn("Priority is not optional for beforeRender"); var n = this.beforeRenderCallbacks; n.push({ fn: e, priority: t }), n.sort(function(r, o) { return o.priority - r.priority; }); } }; var E3 = function(e, t, n) { for (var r = e.beforeRenderCallbacks, o = 0; o < r.length; o++) r[o].fn(t, n); }; gf.startRenderLoop = function() { var e = this, t = e.cy; if (!e.renderLoopStarted) { e.renderLoopStarted = !0; var n = function r(o) { if (!e.destroyed) { if (!t.batching()) if (e.requestedFrame && !e.skipFrame) { E3(e, !0, o); var a = Pi(); e.render(e.renderOptions); var i = e.lastDrawTime = Pi(); e.averageRedrawTime === void 0 && (e.averageRedrawTime = i - a), e.redrawCount === void 0 && (e.redrawCount = 0), e.redrawCount++, e.redrawTotalTime === void 0 && (e.redrawTotalTime = 0); var s = i - a; e.redrawTotalTime += s, e.lastRedrawTime = s, e.averageRedrawTime = e.averageRedrawTime / 2 + s / 2, e.requestedFrame = !1; } else E3(e, !1, o); e.skipFrame = !1, Rv(r); } }; Rv(n); } }; var qse = function(e) { this.init(e); }, ET = qse, Hc = ET.prototype; Hc.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; Hc.init = function(e) { var t = this; t.options = e, t.cy = e.cy; var n = t.container = e.cy.container(), r = t.cy.window(); if (r) { var o = r.document, a = o.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", l = o.getElementById(i) != null; if (n.className.indexOf(s) < 0 && (n.className = (n.className || "") + " " + s), !l) { var u = o.createElement("style"); u.id = i, u.textContent = "." + s + " { position: relative; }", a.insertBefore(u, a.children[0]); } var c = r.getComputedStyle(n), d = c.getPropertyValue("position"); d === "static" && tn("A Cytoscape container has style position:static and so can not use UI extensions properly"); } t.selection = [void 0, void 0, void 0, void 0, 0], t.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95], t.hoverData = { down: null, last: null, downTime: null, triggerMode: null, dragging: !1, initialPan: [null, null], capture: !1 }, t.dragData = { possibleDragElements: [] }, t.touchData = { start: null, capture: !1, // These 3 fields related to tap, taphold events startPosition: [null, null, null, null, null, null], singleTouchStartTime: null, singleTouchMoved: !0, now: [null, null, null, null, null, null], earlier: [null, null, null, null, null, null] }, t.redraws = 0, t.showFps = e.showFps, t.debug = e.debug, t.hideEdgesOnViewport = e.hideEdgesOnViewport, t.textureOnViewport = e.textureOnViewport, t.wheelSensitivity = e.wheelSensitivity, t.motionBlurEnabled = e.motionBlur, t.forcedPixelRatio = Ke(e.pixelRatio) ? e.pixelRatio : null, t.motionBlur = e.motionBlur, t.motionBlurOpacity = e.motionBlurOpacity, t.motionBlurTransparency = 1 - t.motionBlurOpacity, t.motionBlurPxRatio = 1, t.mbPxRBlurry = 1, t.minMbLowQualFrames = 4, t.fullQualityMb = !1, t.clearedForMotionBlur = [], t.desktopTapThreshold = e.desktopTapThreshold, t.desktopTapThreshold2 = e.desktopTapThreshold * e.desktopTapThreshold, t.touchTapThreshold = e.touchTapThreshold, t.touchTapThreshold2 = e.touchTapThreshold * e.touchTapThreshold, t.tapholdDuration = 500, t.bindings = [], t.beforeRenderCallbacks = [], t.beforeRenderPriorities = { // higher priority execs before lower one animations: 400, eleCalcs: 300, eleTxrDeq: 200, lyrTxrDeq: 150, lyrTxrSkip: 100 }, t.registerNodeShapes(), t.registerArrowShapes(), t.registerCalculationListeners(); }; Hc.notify = function(e, t) { var n = this, r = n.cy; if (!this.destroyed) { if (e === "init") { n.load(); return; } if (e === "destroy") { n.destroy(); return; } (e === "add" || e === "remove" || e === "move" && r.hasCompoundNodes() || e === "load" || e === "zorder" || e === "mount") && n.invalidateCachedZSortedEles(), e === "viewport" && n.redrawHint("select", !0), (e === "load" || e === "resize" || e === "mount") && (n.invalidateContainerClientCoordsCache(), n.matchCanvasSize(n.container)), n.redrawHint("eles", !0), n.redrawHint("drag", !0), this.startRenderLoop(), this.redraw(); } }; Hc.destroy = function() { var e = this; e.destroyed = !0, e.cy.stopAnimationLoop(); for (var t = 0; t < e.bindings.length; t++) { var n = e.bindings[t], r = n, o = r.target; (o.off || o.removeEventListener).apply(o, r.args); } if (e.bindings = [], e.beforeRenderCallbacks = [], e.onUpdateEleCalcsFns = [], e.removeObserver && e.removeObserver.disconnect(), e.styleObserver && e.styleObserver.disconnect(), e.resizeObserver && e.resizeObserver.disconnect(), e.labelCalcDiv) try { document.body.removeChild(e.labelCalcDiv); } catch { } }; Hc.isHeadless = function() { return !1; }; [X2, CT, ST, jc, Ui, gf].forEach(function(e) { kt(Hc, e); }); var Jm = 1e3 / 60, $T = { setupDequeueing: function(e) { return function() { var t = this, n = this.renderer; if (!t.dequeueingSetup) { t.dequeueingSetup = !0; var r = sg(function() { n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw(); }, e.deqRedrawThreshold), o = function(i, s) { var l = Pi(), u = n.averageRedrawTime, c = n.lastRedrawTime, d = [], f = n.cy.extent(), h = n.getPixelRatio(); for (i || n.flushRenderedStyleQueue(); ; ) { var p = Pi(), v = p - l, m = p - s; if (c < Jm) { var g = Jm - (i ? u : 0); if (m >= e.deqFastCost * g) break; } else if (i) { if (v >= e.deqCost * c || v >= e.deqAvgCost * u) break; } else if (m >= e.deqNoDrawCost * Jm) break; var b = e.deq(t, h, f); if (b.length > 0) for (var C = 0; C < b.length; C++) d.push(b[C]); else break; } d.length > 0 && (e.onDeqd(t, d), !i && e.shouldRedraw(t, d, h, f) && r()); }, a = e.priority || R2; n.beforeRender(o, a(t)); } }; } }, Wse = /* @__PURE__ */ function() { function e(t) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Dv; F2(this, e), this.idsByKey = new Ba(), this.keyForId = new Ba(), this.cachesByLvl = new Ba(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n; } return I2(e, [{ key: "getIdsFor", value: function(t) { t == null && Nn("Can not get id list for null key"); var n = this.idsByKey, r = this.idsByKey.get(t); return r || (r = new Rc(), n.set(t, r)), r; } }, { key: "addIdForKey", value: function(t, n) { t != null && this.getIdsFor(t).add(n); } }, { key: "deleteIdForKey", value: function(t, n) { t != null && this.getIdsFor(t).delete(n); } }, { key: "getNumberOfIdsForKey", value: function(t) { return t == null ? 0 : this.getIdsFor(t).size; } }, { key: "updateKeyMappingFor", value: function(t) { var n = t.id(), r = this.keyForId.get(n), o = this.getKey(t); this.deleteIdForKey(r, n), this.addIdForKey(o, n), this.keyForId.set(n, o); } }, { key: "deleteKeyMappingFor", value: function(t) { var n = t.id(), r = this.keyForId.get(n); this.deleteIdForKey(r, n), this.keyForId.delete(n); } }, { key: "keyHasChangedFor", value: function(t) { var n = t.id(), r = this.keyForId.get(n), o = this.getKey(t); return r !== o; } }, { key: "isInvalid", value: function(t) { return this.keyHasChangedFor(t) || this.doesEleInvalidateKey(t); } }, { key: "getCachesAt", value: function(t) { var n = this.cachesByLvl, r = this.lvls, o = n.get(t); return o || (o = new Ba(), n.set(t, o), r.push(t)), o; } }, { key: "getCache", value: function(t, n) { return this.getCachesAt(n).get(t); } }, { key: "get", value: function(t, n) { var r = this.getKey(t), o = this.getCache(r, n); return o != null && this.updateKeyMappingFor(t), o; } }, { key: "getForCachedKey", value: function(t, n) { var r = this.keyForId.get(t.id()), o = this.getCache(r, n); return o; } }, { key: "hasCache", value: function(t, n) { return this.getCachesAt(n).has(t); } }, { key: "has", value: function(t, n) { var r = this.getKey(t); return this.hasCache(r, n); } }, { key: "setCache", value: function(t, n, r) { r.key = t, this.getCachesAt(n).set(t, r); } }, { key: "set", value: function(t, n, r) { var o = this.getKey(t); this.setCache(o, n, r), this.updateKeyMappingFor(t); } }, { key: "deleteCache", value: function(t, n) { this.getCachesAt(n).delete(t); } }, { key: "delete", value: function(t, n) { var r = this.getKey(t); this.deleteCache(r, n); } }, { key: "invalidateKey", value: function(t) { var n = this; this.lvls.forEach(function(r) { return n.deleteCache(t, r); }); } // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) }, { key: "invalidate", value: function(t) { var n = t.id(), r = this.keyForId.get(n); this.deleteKeyMappingFor(t); var o = this.doesEleInvalidateKey(t); return o && this.invalidateKey(r), o || this.getNumberOfIdsForKey(r) === 0; } }]), e; }(), $3 = 25, vh = 50, nv = -4, wy = 3, Gse = 7.99, Kse = 8, Yse = 1024, Xse = 1024, Zse = 1024, Jse = 0.2, Qse = 0.8, ele = 10, tle = 0.15, nle = 0.1, rle = 0.9, ole = 0.9, ale = 100, ile = 1, Vu = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" }, sle = Fr({ getKey: null, doesEleInvalidateKey: Dv, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: m6, allowEdgeTxrCaching: !0, allowParentTxrCaching: !0 }), Pd = function(e, t) { var n = this; n.renderer = e, n.onDequeues = []; var r = sle(t); kt(n, r), n.lookup = new Wse(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing(); }, ar = Pd.prototype; ar.reasons = Vu; ar.getTextureQueue = function(e) { var t = this; return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e] = t.eleImgCaches[e] || []; }; ar.getRetiredTextureQueue = function(e) { var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e] = n[e] || []; return r; }; ar.getElementQueue = function() { var e = this, t = e.eleCacheQueue = e.eleCacheQueue || new pf(function(n, r) { return r.reqs - n.reqs; }); return t; }; ar.getElementKeyToQueue = function() { var e = this, t = e.eleKeyToCacheQueue = e.eleKeyToCacheQueue || {}; return t; }; ar.getElement = function(e, t, n, r, o) { var a = this, i = this.renderer, s = i.cy.zoom(), l = this.lookup; if (!t || t.w === 0 || t.h === 0 || isNaN(t.w) || isNaN(t.h) || !e.visible() || e.removed() || !a.allowEdgeTxrCaching && e.isEdge() || !a.allowParentTxrCaching && e.isParent()) return null; if (r == null && (r = Math.ceil(M2(s * n))), r < nv) r = nv; else if (s >= Gse || r > wy) return null; var u = Math.pow(2, r), c = t.h * u, d = t.w * u, f = i.eleTextBiggerThanMin(e, u); if (!this.isVisible(e, f)) return null; var h = l.get(e, r); if (h && h.invalidated && (h.invalidated = !1, h.texture.invalidatedWidth -= h.width), h) return h; var p; if (c <= $3 ? p = $3 : c <= vh ? p = vh : p = Math.ceil(c / vh) * vh, c > Zse || d > Xse) return null; var v = a.getTextureQueue(p), m = v[v.length - 2], g = function() { return a.recycleTexture(p, d) || a.addTexture(p, d); }; m || (m = v[v.length - 1]), m || (m = g()), m.width - m.usedWidth < d && (m = g()); for (var b = function(j) { return j && j.scaledLabelShown === f; }, C = o && o === Vu.dequeue, x = o && o === Vu.highQuality, w = o && o === Vu.downscale, k, S = r + 1; S <= wy; S++) { var _ = l.get(e, S); if (_) { k = _; break; } } var O = k && k.level === r + 1 ? k : null, F = function() { m.context.drawImage(O.texture.canvas, O.x, 0, O.width, O.height, m.usedWidth, 0, d, c); }; if (m.context.setTransform(1, 0, 0, 1, 0, 0), m.context.clearRect(m.usedWidth, 0, d, p), b(O)) F(); else if (b(k)) if (x) { for (var I = k.level; I > r; I--) O = a.getElement(e, t, n, I, Vu.downscale); F(); } else return a.queueElement(e, k.level - 1), k; else { var P; if (!C && !x && !w) for (var M = r - 1; M >= nv; M--) { var N = l.get(e, M); if (N) { P = N; break; } } if (b(P)) return a.queueElement(e, r), P; m.context.translate(m.usedWidth, 0), m.context.scale(u, u), this.drawElement(m.context, e, t, f, !1), m.context.scale(1 / u, 1 / u), m.context.translate(-m.usedWidth, 0); } return h = { x: m.usedWidth, texture: m, level: r, scale: u, width: d, height: c, scaledLabelShown: f }, m.usedWidth += Math.ceil(d + Kse), m.eleCaches.push(h), l.set(e, r, h), a.checkTextureFullness(m), h; }; ar.invalidateElements = function(e) { for (var t = 0; t < e.length; t++) this.invalidateElement(e[t]); }; ar.invalidateElement = function(e) { var t = this, n = t.lookup, r = [], o = n.isInvalid(e); if (o) { for (var a = nv; a <= wy; a++) { var i = n.getForCachedKey(e, a); i && r.push(i); } var s = n.invalidate(e); if (s) for (var l = 0; l < r.length; l++) { var u = r[l], c = u.texture; c.invalidatedWidth += u.width, u.invalidated = !0, t.checkTextureUtility(c); } t.removeFromQueue(e); } }; ar.checkTextureUtility = function(e) { e.invalidatedWidth >= Jse * e.width && this.retireTexture(e); }; ar.checkTextureFullness = function(e) { var t = this, n = t.getTextureQueue(e.height); e.usedWidth / e.width > Qse && e.fullnessChecks >= ele ? Ps(n, e) : e.fullnessChecks++; }; ar.retireTexture = function(e) { var t = this, n = e.height, r = t.getTextureQueue(n), o = this.lookup; Ps(r, e), e.retired = !0; for (var a = e.eleCaches, i = 0; i < a.length; i++) { var s = a[i]; o.deleteCache(s.key, s.level); } D2(a); var l = t.getRetiredTextureQueue(n); l.push(e); }; ar.addTexture = function(e, t) { var n = this, r = n.getTextureQueue(e), o = {}; return r.push(o), o.eleCaches = [], o.height = e, o.width = Math.max(Yse, t), o.usedWidth = 0, o.invalidatedWidth = 0, o.fullnessChecks = 0, o.canvas = n.renderer.makeOffscreenCanvas(o.width, o.height), o.context = o.canvas.getContext("2d"), o; }; ar.recycleTexture = function(e, t) { for (var n = this, r = n.getTextureQueue(e), o = n.getRetiredTextureQueue(e), a = 0; a < o.length; a++) { var i = o[a]; if (i.width >= t) return i.retired = !1, i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, D2(i.eleCaches), i.context.setTransform(1, 0, 0, 1, 0, 0), i.context.clearRect(0, 0, i.width, i.height), Ps(o, i), r.push(i), i; } }; ar.queueElement = function(e, t) { var n = this, r = n.getElementQueue(), o = n.getElementKeyToQueue(), a = this.getKey(e), i = o[a]; if (i) i.level = Math.max(i.level, t), i.eles.merge(e), i.reqs++, r.updateItem(i); else { var s = { eles: e.spawn().merge(e), level: t, reqs: 1, key: a }; r.push(s), o[a] = s; } }; ar.dequeue = function(e) { for (var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), o = [], a = t.lookup, i = 0; i < ile && n.size() > 0; i++) { var s = n.pop(), l = s.key, u = s.eles[0], c = a.hasCache(u, s.level); if (r[l] = null, !c) { o.push(s); var d = t.getBoundingBox(u); t.getElement(u, d, e, s.level, Vu.dequeue); } } return o; }; ar.removeFromQueue = function(e) { var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), o = this.getKey(e), a = r[o]; a != null && (a.eles.length === 1 ? (a.reqs = L2, n.updateItem(a), n.pop(), r[o] = null) : a.eles.unmerge(e)); }; ar.onDequeue = function(e) { this.onDequeues.push(e); }; ar.offDequeue = function(e) { Ps(this.onDequeues, e); }; ar.setupDequeueing = $T.setupDequeueing({ deqRedrawThreshold: ale, deqCost: tle, deqAvgCost: nle, deqNoDrawCost: rle, deqFastCost: ole, deq: function(e, t, n) { return e.dequeue(t, n); }, onDeqd: function(e, t) { for (var n = 0; n < e.onDequeues.length; n++) { var r = e.onDequeues[n]; r(t); } }, shouldRedraw: function(e, t, n, r) { for (var o = 0; o < t.length; o++) for (var a = t[o].eles, i = 0; i < a.length; i++) { var s = a[i].boundingBox(); if (N2(s, r)) return !0; } return !1; }, priority: function(e) { return e.renderer.beforeRenderPriorities.eleTxrDeq; } }); var lle = 1, Hd = -4, Uv = 2, ule = 3.99, cle = 50, dle = 50, ple = 0.15, fle = 0.1, hle = 0.9, vle = 0.9, gle = 1, _3 = 250, mle = 4e3 * 4e3, yle = !0, _T = function(e) { var t = this, n = t.renderer = e, r = n.cy; t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = Pi() - 2 * _3, t.skipping = !1, t.eleTxrDeqs = r.collection(), t.scheduleElementRefinement = sg(function() { t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs); }, dle), n.beforeRender(function(a, i) { i - t.lastInvalidationTime <= _3 ? t.skipping = !0 : t.skipping = !1; }, n.beforeRenderPriorities.lyrTxrSkip); var o = function(a, i) { return i.reqs - a.reqs; }; t.layersQueue = new pf(o), t.setupDequeueing(); }, Ir = _T.prototype, T3 = 0, ble = Math.pow(2, 53) - 1; Ir.makeLayer = function(e, t) { var n = Math.pow(2, t), r = Math.ceil(e.w * n), o = Math.ceil(e.h * n), a = this.renderer.makeOffscreenCanvas(r, o), i = { id: T3 = ++T3 % ble, bb: e, level: t, width: r, height: o, canvas: a, context: a.getContext("2d"), eles: [], elesQueue: [], reqs: 0 }, s = i.context, l = -i.bb.x1, u = -i.bb.y1; return s.scale(n, n), s.translate(l, u), i; }; Ir.getLayers = function(e, t, n) { var r = this, o = r.renderer, a = o.cy, i = a.zoom(), s = r.firstGet; if (r.firstGet = !1, n == null) { if (n = Math.ceil(M2(i * t)), n < Hd) n = Hd; else if (i >= ule || n > Uv) return null; } r.validateLayersElesOrdering(n, e); var l = r.layersByLevel, u = Math.pow(2, n), c = l[n] = l[n] || [], d, f = r.levelIsComplete(n, e), h, p = function() { var O = function(M) { if (r.validateLayersElesOrdering(M, e), r.levelIsComplete(M, e)) return h = l[M], !0; }, F = function(M) { if (!h) for (var N = n + M; Hd <= N && N <= Uv && !O(N); N += M) ; }; F(1), F(-1); for (var I = c.length - 1; I >= 0; I--) { var P = c[I]; P.invalid && Ps(c, P); } }; if (!f) p(); else return c; var v = function() { if (!d) { d = yo(); for (var O = 0; O < e.length; O++) C6(d, e[O].boundingBox()); } return d; }, m = function(O) { O = O || {}; var F = O.after; v(); var I = d.w * u * (d.h * u); if (I > mle) return null; var P = r.makeLayer(d, n); if (F != null) { var M = c.indexOf(F) + 1; c.splice(M, 0, P); } else (O.insert === void 0 || O.insert) && c.unshift(P); return P; }; if (r.skipping && !s) return null; for (var g = null, b = e.length / lle, C = !s, x = 0; x < e.length; x++) { var w = e[x], k = w._private.rscratch, S = k.imgLayerCaches = k.imgLayerCaches || {}, _ = S[n]; if (_) { g = _; continue; } if ((!g || g.eles.length >= b || !S6(g.bb, w.boundingBox())) && (g = m({ insert: !0, after: g }), !g)) return null; h || C ? r.queueLayer(g, w) : r.drawEleInLayer(g, w, n, t), g.eles.push(w), S[n] = g; } return h || (C ? null : c); }; Ir.getEleLevelForLayerLevel = function(e, t) { return e; }; Ir.drawEleInLayer = function(e, t, n, r) { var o = this, a = this.renderer, i = e.context, s = t.boundingBox(); s.w === 0 || s.h === 0 || !t.visible() || (n = o.getEleLevelForLayerLevel(n, r), a.setImgSmoothing(i, !1), a.drawCachedElement(i, t, null, null, n, yle), a.setImgSmoothing(i, !0)); }; Ir.levelIsComplete = function(e, t) { var n = this, r = n.layersByLevel[e]; if (!r || r.length === 0) return !1; for (var o = 0, a = 0; a < r.length; a++) { var i = r[a]; if (i.reqs > 0 || i.invalid) return !1; o += i.eles.length; } return o === t.length; }; Ir.validateLayersElesOrdering = function(e, t) { var n = this.layersByLevel[e]; if (n) for (var r = 0; r < n.length; r++) { for (var o = n[r], a = -1, i = 0; i < t.length; i++) if (o.eles[0] === t[i]) { a = i; break; } if (a < 0) { this.invalidateLayer(o); continue; } for (var s = a, i = 0; i < o.eles.length; i++) if (o.eles[i] !== t[s + i]) { this.invalidateLayer(o); break; } } }; Ir.updateElementsInLayers = function(e, t) { for (var n = this, r = cf(e[0]), o = 0; o < e.length; o++) for (var a = r ? null : e[o], i = r ? e[o] : e[o].ele, s = i._private.rscratch, l = s.imgLayerCaches = s.imgLayerCaches || {}, u = Hd; u <= Uv; u++) { var c = l[u]; c && (a && n.getEleLevelForLayerLevel(c.level) !== a.level || t(c, i, a)); } }; Ir.haveLayers = function() { for (var e = this, t = !1, n = Hd; n <= Uv; n++) { var r = e.layersByLevel[n]; if (r && r.length > 0) { t = !0; break; } } return t; }; Ir.invalidateElements = function(e) { var t = this; e.length !== 0 && (t.lastInvalidationTime = Pi(), !(e.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e, function(n, r, o) { t.invalidateLayer(n); })); }; Ir.invalidateLayer = function(e) { if (this.lastInvalidationTime = Pi(), !e.invalid) { var t = e.level, n = e.eles, r = this.layersByLevel[t]; Ps(r, e), e.elesQueue = [], e.invalid = !0, e.replacement && (e.replacement.invalid = !0); for (var o = 0; o < n.length; o++) { var a = n[o]._private.rscratch.imgLayerCaches; a && (a[t] = null); } } }; Ir.refineElementTextures = function(e) { var t = this; t.updateElementsInLayers(e, function(n, r, o) { var a = n.replacement; if (a || (a = n.replacement = t.makeLayer(n.bb, n.level), a.replaces = n, a.eles = n.eles), !a.reqs) for (var i = 0; i < a.eles.length; i++) t.queueLayer(a, a.eles[i]); }); }; Ir.enqueueElementRefinement = function(e) { this.eleTxrDeqs.merge(e), this.scheduleElementRefinement(); }; Ir.queueLayer = function(e, t) { var n = this, r = n.layersQueue, o = e.elesQueue, a = o.hasId = o.hasId || {}; if (!e.replacement) { if (t) { if (a[t.id()]) return; o.push(t), a[t.id()] = !0; } e.reqs ? (e.reqs++, r.updateItem(e)) : (e.reqs = 1, r.push(e)); } }; Ir.dequeue = function(e) { for (var t = this, n = t.layersQueue, r = [], o = 0; o < gle && n.size() !== 0; ) { var a = n.peek(); if (a.replacement) { n.pop(); continue; } if (a.replaces && a !== a.replaces.replacement) { n.pop(); continue; } if (a.invalid) { n.pop(); continue; } var i = a.elesQueue.shift(); i && (t.drawEleInLayer(a, i, a.level, e), o++), r.length === 0 && r.push(!0), a.elesQueue.length === 0 && (n.pop(), a.reqs = 0, a.replaces && t.applyLayerReplacement(a), t.requestRedraw()); } return r; }; Ir.applyLayerReplacement = function(e) { var t = this, n = t.layersByLevel[e.level], r = e.replaces, o = n.indexOf(r); if (!(o < 0 || r.invalid)) { n[o] = e; for (var a = 0; a < e.eles.length; a++) { var i = e.eles[a]._private, s = i.imgLayerCaches = i.imgLayerCaches || {}; s && (s[e.level] = e); } t.requestRedraw(); } }; Ir.requestRedraw = sg(function() { var e = this.renderer; e.redrawHint("eles", !0), e.redrawHint("drag", !0), e.redraw(); }, 100); Ir.setupDequeueing = $T.setupDequeueing({ deqRedrawThreshold: cle, deqCost: ple, deqAvgCost: fle, deqNoDrawCost: hle, deqFastCost: vle, deq: function(e, t) { return e.dequeue(t); }, onDeqd: R2, shouldRedraw: m6, priority: function(e) { return e.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var TT = {}, O3; function wle(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.lineTo(r.x, r.y); } } function xle(e, t, n) { for (var r, o = 0; o < t.length; o++) { var a = t[o]; o === 0 && (r = a), e.lineTo(a.x, a.y); } e.quadraticCurveTo(n.x, n.y, r.x, r.y); } function F3(e, t, n) { e.beginPath && e.beginPath(); for (var r = t, o = 0; o < r.length; o++) { var a = r[o]; e.lineTo(a.x, a.y); } var i = n, s = n[0]; e.moveTo(s.x, s.y); for (var o = 1; o < i.length; o++) { var a = i[o]; e.lineTo(a.x, a.y); } e.closePath && e.closePath(); } function kle(e, t, n, r, o) { e.beginPath && e.beginPath(), e.arc(n, r, o, 0, Math.PI * 2, !1); var a = t, i = a[0]; e.moveTo(i.x, i.y); for (var s = 0; s < a.length; s++) { var l = a[s]; e.lineTo(l.x, l.y); } e.closePath && e.closePath(); } function Cle(e, t, n, r) { e.arc(t, n, r, 0, Math.PI * 2, !1); } TT.arrowShapeImpl = function(e) { return (O3 || (O3 = { polygon: wle, "triangle-backcurve": xle, "triangle-tee": F3, "circle-triangle": kle, "triangle-cross": F3, circle: Cle }))[e]; }; var si = {}; si.drawElement = function(e, t, n, r, o, a) { var i = this; t.isNode() ? i.drawNode(e, t, n, r, o, a) : i.drawEdge(e, t, n, r, o, a); }; si.drawElementOverlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeOverlay(e, t) : n.drawEdgeOverlay(e, t); }; si.drawElementUnderlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeUnderlay(e, t) : n.drawEdgeUnderlay(e, t); }; si.drawCachedElementPortion = function(e, t, n, r, o, a, i, s) { var l = this, u = n.getBoundingBox(t); if (!(u.w === 0 || u.h === 0)) { var c = n.getElement(t, u, r, o, a); if (c != null) { var d = s(l, t); if (d === 0) return; var f = i(l, t), h = u.x1, p = u.y1, v = u.w, m = u.h, g, b, C, x, w; if (f !== 0) { var k = n.getRotationPoint(t); C = k.x, x = k.y, e.translate(C, x), e.rotate(f), w = l.getImgSmoothing(e), w || l.setImgSmoothing(e, !0); var S = n.getRotationOffset(t); g = S.x, b = S.y; } else g = h, b = p; var _; d !== 1 && (_ = e.globalAlpha, e.globalAlpha = _ * d), e.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, b, v, m), d !== 1 && (e.globalAlpha = _), f !== 0 && (e.rotate(-f), e.translate(-C, -x), w || l.setImgSmoothing(e, !1)); } else n.drawElement(e, t); } }; var Sle = function() { return 0; }, Ele = function(e, t) { return e.getTextAngle(t, null); }, $le = function(e, t) { return e.getTextAngle(t, "source"); }, _le = function(e, t) { return e.getTextAngle(t, "target"); }, Tle = function(e, t) { return t.effectiveOpacity(); }, Qm = function(e, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; si.drawCachedElement = function(e, t, n, r, o, a) { var i = this, s = i.data, l = s.eleTxrCache, u = s.lblTxrCache, c = s.slbTxrCache, d = s.tlbTxrCache, f = t.boundingBox(), h = a === !0 ? l.reasons.highQuality : null; if (!(f.w === 0 || f.h === 0 || !t.visible()) && (!r || N2(f, r))) { var p = t.isEdge(), v = t.element()._private.rscratch.badLine; i.drawElementUnderlay(e, t), i.drawCachedElementPortion(e, t, l, n, o, h, Sle, Tle), (!p || !v) && i.drawCachedElementPortion(e, t, u, n, o, h, Ele, Qm), p && !v && (i.drawCachedElementPortion(e, t, c, n, o, h, $le, Qm), i.drawCachedElementPortion(e, t, d, n, o, h, _le, Qm)), i.drawElementOverlay(e, t); } }; si.drawElements = function(e, t) { for (var n = this, r = 0; r < t.length; r++) { var o = t[r]; n.drawElement(e, o); } }; si.drawCachedElements = function(e, t, n, r) { for (var o = this, a = 0; a < t.length; a++) { var i = t[a]; o.drawCachedElement(e, i, n, r); } }; si.drawCachedNodes = function(e, t, n, r) { for (var o = this, a = 0; a < t.length; a++) { var i = t[a]; i.isNode() && o.drawCachedElement(e, i, n, r); } }; si.drawLayeredElements = function(e, t, n, r) { var o = this, a = o.data.lyrTxrCache.getLayers(t, n); if (a) for (var i = 0; i < a.length; i++) { var s = a[i], l = s.bb; l.w === 0 || l.h === 0 || e.drawImage(s.canvas, l.x1, l.y1, l.w, l.h); } else o.drawCachedElements(e, t, n, r); }; var qi = {}; qi.drawEdge = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s = t._private.rscratch; if (!(a && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) { var l; n && (l = n, e.translate(-l.x1, -l.y1)); var u = a ? t.pstyle("opacity").value : 1, c = a ? t.pstyle("line-opacity").value : 1, d = t.pstyle("curve-style").value, f = t.pstyle("line-style").value, h = t.pstyle("width").pfValue, p = t.pstyle("line-cap").value, v = t.pstyle("line-outline-width").value, m = t.pstyle("line-outline-color").value, g = u * c, b = u * c, C = function() { var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; d === "straight-triangle" ? (i.eleStrokeStyle(e, t, N), i.drawEdgeTrianglePath(t, e, s.allpts)) : (e.lineWidth = h, e.lineCap = p, i.eleStrokeStyle(e, t, N), i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, x = function() { var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; if (e.lineWidth = h + v, e.lineCap = p, v > 0) i.colorStrokeStyle(e, m[0], m[1], m[2], N); else { e.lineCap = "butt"; return; } d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e, s.allpts) : (i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, w = function() { o && i.drawEdgeOverlay(e, t); }, k = function() { o && i.drawEdgeUnderlay(e, t); }, S = function() { var N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : b; i.drawArrowheads(e, t, N); }, _ = function() { i.drawElementText(e, t, null, r); }; e.lineJoin = "round"; var O = t.pstyle("ghost").value === "yes"; if (O) { var F = t.pstyle("ghost-offset-x").pfValue, I = t.pstyle("ghost-offset-y").pfValue, P = t.pstyle("ghost-opacity").value, M = g * P; e.translate(F, I), C(M), S(M), e.translate(-F, -I); } else x(); k(), C(), S(), w(), _(), n && e.translate(l.x1, l.y1); } }; var OT = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n) { if (n.visible()) { var r = n.pstyle("".concat(e, "-opacity")).value; if (r !== 0) { var o = this, a = o.usePaths(), i = n._private.rscratch, s = n.pstyle("".concat(e, "-padding")).pfValue, l = 2 * s, u = n.pstyle("".concat(e, "-color")).value; t.lineWidth = l, i.edgeType === "self" && !a ? t.lineCap = "butt" : t.lineCap = "round", o.colorStrokeStyle(t, u[0], u[1], u[2], r), o.drawEdgePath(n, t, i.allpts, "solid"); } } }; }; qi.drawEdgeOverlay = OT("overlay"); qi.drawEdgeUnderlay = OT("underlay"); qi.drawEdgePath = function(e, t, n, r) { var o = e._private.rscratch, a = t, i, s = !1, l = this.usePaths(), u = e.pstyle("line-dash-pattern").pfValue, c = e.pstyle("line-dash-offset").pfValue; if (l) { var d = n.join("$"), f = o.pathCacheKey && o.pathCacheKey === d; f ? (i = t = o.pathCache, s = !0) : (i = t = new Path2D(), o.pathCacheKey = d, o.pathCache = i); } if (a.setLineDash) switch (r) { case "dotted": a.setLineDash([1, 1]); break; case "dashed": a.setLineDash(u), a.lineDashOffset = c; break; case "solid": a.setLineDash([]); break; } if (!s && !o.badLine) switch (t.beginPath && t.beginPath(), t.moveTo(n[0], n[1]), o.edgeType) { case "bezier": case "self": case "compound": case "multibezier": for (var h = 2; h + 3 < n.length; h += 4) t.quadraticCurveTo(n[h], n[h + 1], n[h + 2], n[h + 3]); break; case "straight": case "haystack": for (var p = 2; p + 1 < n.length; p += 2) t.lineTo(n[p], n[p + 1]); break; case "segments": if (o.isRound) { var v = r6(o.roundCorners), m; try { for (v.s(); !(m = v.n()).done; ) { var g = m.value; yT(t, g); } } catch (C) { v.e(C); } finally { v.f(); } t.lineTo(n[n.length - 2], n[n.length - 1]); } else for (var b = 2; b + 1 < n.length; b += 2) t.lineTo(n[b], n[b + 1]); break; } t = a, l ? t.stroke(i) : t.stroke(), t.setLineDash && t.setLineDash([]); }; qi.drawEdgeTrianglePath = function(e, t, n) { t.fillStyle = t.strokeStyle; for (var r = e.pstyle("width").pfValue, o = 0; o + 1 < n.length; o += 2) { var a = [n[o + 2] - n[o], n[o + 3] - n[o + 1]], i = Math.sqrt(a[0] * a[0] + a[1] * a[1]), s = [a[1] / i, -a[0] / i], l = [s[0] * r / 2, s[1] * r / 2]; t.beginPath(), t.moveTo(n[o] - l[0], n[o + 1] - l[1]), t.lineTo(n[o] + l[0], n[o + 1] + l[1]), t.lineTo(n[o + 2], n[o + 3]), t.closePath(), t.fill(); } }; qi.drawArrowheads = function(e, t, n) { var r = t._private.rscratch, o = r.edgeType === "haystack"; o || this.drawArrowhead(e, t, "source", r.arrowStartX, r.arrowStartY, r.srcArrowAngle, n), this.drawArrowhead(e, t, "mid-target", r.midX, r.midY, r.midtgtArrowAngle, n), this.drawArrowhead(e, t, "mid-source", r.midX, r.midY, r.midsrcArrowAngle, n), o || this.drawArrowhead(e, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n); }; qi.drawArrowhead = function(e, t, n, r, o, a, i) { if (!(isNaN(r) || r == null || isNaN(o) || o == null || isNaN(a) || a == null)) { var s = this, l = t.pstyle(n + "-arrow-shape").value; if (l !== "none") { var u = t.pstyle(n + "-arrow-fill").value === "hollow" ? "both" : "filled", c = t.pstyle(n + "-arrow-fill").value, d = t.pstyle("width").pfValue, f = t.pstyle(n + "-arrow-width"), h = f.value === "match-line" ? d : f.pfValue; f.units === "%" && (h *= d); var p = t.pstyle("opacity").value; i === void 0 && (i = p); var v = e.globalCompositeOperation; (i !== 1 || c === "hollow") && (e.globalCompositeOperation = "destination-out", s.colorFillStyle(e, 255, 255, 255, 1), s.colorStrokeStyle(e, 255, 255, 255, 1), s.drawArrowShape(t, e, u, d, l, h, r, o, a), e.globalCompositeOperation = v); var m = t.pstyle(n + "-arrow-color").value; s.colorFillStyle(e, m[0], m[1], m[2], i), s.colorStrokeStyle(e, m[0], m[1], m[2], i), s.drawArrowShape(t, e, c, d, l, h, r, o, a); } } }; qi.drawArrowShape = function(e, t, n, r, o, a, i, s, l) { var u = this, c = this.usePaths() && o !== "triangle-cross", d = !1, f, h = t, p = { x: i, y: s }, v = e.pstyle("arrow-scale").value, m = this.getArrowWidth(r, v), g = u.arrowShapes[o]; if (c) { var b = u.arrowPathCache = u.arrowPathCache || [], C = Ml(o), x = b[C]; x != null ? (f = t = x, d = !0) : (f = t = new Path2D(), b[C] = f); } d || (t.beginPath && t.beginPath(), c ? g.draw(t, 1, 0, { x: 0, y: 0 }, 1) : g.draw(t, m, l, p, r), t.closePath && t.closePath()), t = h, c && (t.translate(i, s), t.rotate(l), t.scale(m, m)), (n === "filled" || n === "both") && (c ? t.fill(f) : t.fill()), (n === "hollow" || n === "both") && (t.lineWidth = a / (c ? m : 1), t.lineJoin = "miter", c ? t.stroke(f) : t.stroke()), c && (t.scale(1 / m, 1 / m), t.rotate(-l), t.translate(-i, -s)); }; var Q2 = {}; Q2.safeDrawImage = function(e, t, n, r, o, a, i, s, l, u) { if (!(o <= 0 || a <= 0 || l <= 0 || u <= 0)) try { e.drawImage(t, n, r, o, a, i, s, l, u); } catch (c) { tn(c); } }; Q2.drawInscribedImage = function(e, t, n, r, o) { var a = this, i = n.position(), s = i.x, l = i.y, u = n.cy().style(), c = u.getIndexedStyle.bind(u), d = c(n, "background-fit", "value", r), f = c(n, "background-repeat", "value", r), h = n.width(), p = n.height(), v = n.padding() * 2, m = h + (c(n, "background-width-relative-to", "value", r) === "inner" ? 0 : v), g = p + (c(n, "background-height-relative-to", "value", r) === "inner" ? 0 : v), b = n._private.rscratch, C = c(n, "background-clip", "value", r), x = C === "node", w = c(n, "background-image-opacity", "value", r) * o, k = c(n, "background-image-smoothing", "value", r), S = n.pstyle("corner-radius").value; S !== "auto" && (S = n.pstyle("corner-radius").pfValue); var _ = t.width || t.cachedW, O = t.height || t.cachedH; (_ == null || O == null) && (document.body.appendChild(t), _ = t.cachedW = t.width || t.offsetWidth, O = t.cachedH = t.height || t.offsetHeight, document.body.removeChild(t)); var F = _, I = O; if (c(n, "background-width", "value", r) !== "auto" && (c(n, "background-width", "units", r) === "%" ? F = c(n, "background-width", "pfValue", r) * m : F = c(n, "background-width", "pfValue", r)), c(n, "background-height", "value", r) !== "auto" && (c(n, "background-height", "units", r) === "%" ? I = c(n, "background-height", "pfValue", r) * g : I = c(n, "background-height", "pfValue", r)), !(F === 0 || I === 0)) { if (d === "contain") { var P = Math.min(m / F, g / I); F *= P, I *= P; } else if (d === "cover") { var P = Math.max(m / F, g / I); F *= P, I *= P; } var M = s - m / 2, N = c(n, "background-position-x", "units", r), j = c(n, "background-position-x", "pfValue", r); N === "%" ? M += (m - F) * j : M += j; var A = c(n, "background-offset-x", "units", r), U = c(n, "background-offset-x", "pfValue", r); A === "%" ? M += (m - F) * U : M += U; var q = l - g / 2, Y = c(n, "background-position-y", "units", r), ie = c(n, "background-position-y", "pfValue", r); Y === "%" ? q += (g - I) * ie : q += ie; var re = c(n, "background-offset-y", "units", r), le = c(n, "background-offset-y", "pfValue", r); re === "%" ? q += (g - I) * le : q += le, b.pathCache && (M -= s, q -= l, s = 0, l = 0); var he = e.globalAlpha; e.globalAlpha = w; var we = a.getImgSmoothing(e), be = !1; if (k === "no" && we ? (a.setImgSmoothing(e, !1), be = !0) : k === "yes" && !we && (a.setImgSmoothing(e, !0), be = !0), f === "no-repeat") x && (e.save(), b.pathCache ? e.clip(b.pathCache) : (a.nodeShapes[a.getNodeShape(n)].draw(e, s, l, m, g, S, b), e.clip())), a.safeDrawImage(e, t, 0, 0, _, O, M, q, F, I), x && e.restore(); else { var de = e.createPattern(t, f); e.fillStyle = de, a.nodeShapes[a.getNodeShape(n)].draw(e, s, l, m, g, S, b), e.translate(M, q), e.fill(), e.translate(-M, -q); } e.globalAlpha = he, be && a.setImgSmoothing(e, we); } }; var su = {}; su.eleTextBiggerThanMin = function(e, t) { if (!t) { var n = e.cy().zoom(), r = this.getPixelRatio(), o = Math.ceil(M2(n * r)); t = Math.pow(2, o); } var a = e.pstyle("font-size").pfValue * t, i = e.pstyle("min-zoomed-font-size").pfValue; return !(a < i); }; su.drawElementText = function(e, t, n, r, o) { var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this; if (r == null) { if (a && !i.eleTextBiggerThanMin(t)) return; } else if (r === !1) return; if (t.isNode()) { var s = t.pstyle("label"); if (!s || !s.value) return; var l = i.getLabelJustification(t); e.textAlign = l, e.textBaseline = "bottom"; } else { var u = t.element()._private.rscratch.badLine, c = t.pstyle("label"), d = t.pstyle("source-label"), f = t.pstyle("target-label"); if (u || (!c || !c.value) && (!d || !d.value) && (!f || !f.value)) return; e.textAlign = "center", e.textBaseline = "bottom"; } var h = !n, p; n && (p = n, e.translate(-p.x1, -p.y1)), o == null ? (i.drawText(e, t, null, h, a), t.isEdge() && (i.drawText(e, t, "source", h, a), i.drawText(e, t, "target", h, a))) : i.drawText(e, t, o, h, a), n && e.translate(p.x1, p.y1); }; su.getFontCache = function(e) { var t; this.fontCaches = this.fontCaches || []; for (var n = 0; n < this.fontCaches.length; n++) if (t = this.fontCaches[n], t.context === e) return t; return t = { context: e }, this.fontCaches.push(t), t; }; su.setupTextStyle = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = t.pstyle("font-style").strValue, o = t.pstyle("font-size").pfValue + "px", a = t.pstyle("font-family").strValue, i = t.pstyle("font-weight").strValue, s = n ? t.effectiveOpacity() * t.pstyle("text-opacity").value : 1, l = t.pstyle("text-outline-opacity").value * s, u = t.pstyle("color").value, c = t.pstyle("text-outline-color").value; e.font = r + " " + i + " " + o + " " + a, e.lineJoin = "round", this.colorFillStyle(e, u[0], u[1], u[2], s), this.colorStrokeStyle(e, c[0], c[1], c[2], l); }; function e1(e, t, n, r, o) { var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0; e.beginPath(), e.moveTo(t + a, n), e.lineTo(t + r - a, n), e.quadraticCurveTo(t + r, n, t + r, n + a), e.lineTo(t + r, n + o - a), e.quadraticCurveTo(t + r, n + o, t + r - a, n + o), e.lineTo(t + a, n + o), e.quadraticCurveTo(t, n + o, t, n + o - a), e.lineTo(t, n + a), e.quadraticCurveTo(t, n, t + a, n), e.closePath(), i ? e.stroke() : e.fill(); } su.getTextAngle = function(e, t) { var n, r = e._private, o = r.rscratch, a = t ? t + "-" : "", i = e.pstyle(a + "text-rotation"), s = ha(o, "labelAngle", t); return i.strValue === "autorotate" ? n = e.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n; }; su.drawText = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = t._private, i = a.rscratch, s = o ? t.effectiveOpacity() : 1; if (!(o && (s === 0 || t.pstyle("text-opacity").value === 0))) { n === "main" && (n = null); var l = ha(i, "labelX", n), u = ha(i, "labelY", n), c, d, f = this.getLabelText(t, n); if (f != null && f !== "" && !isNaN(l) && !isNaN(u)) { this.setupTextStyle(e, t, o); var h = n ? n + "-" : "", p = ha(i, "labelWidth", n), v = ha(i, "labelHeight", n), m = t.pstyle(h + "text-margin-x").pfValue, g = t.pstyle(h + "text-margin-y").pfValue, b = t.isEdge(), C = t.pstyle("text-halign").value, x = t.pstyle("text-valign").value; b && (C = "center", x = "center"), l += m, u += g; var w; switch (r ? w = this.getTextAngle(t, n) : w = 0, w !== 0 && (c = l, d = u, e.translate(c, d), e.rotate(w), l = 0, u = 0), x) { case "top": break; case "center": u += v / 2; break; case "bottom": u += v; break; } var k = t.pstyle("text-background-opacity").value, S = t.pstyle("text-border-opacity").value, _ = t.pstyle("text-border-width").pfValue, O = t.pstyle("text-background-padding").pfValue, F = t.pstyle("text-background-shape").strValue, I = F.indexOf("round") === 0, P = 2; if (k > 0 || _ > 0 && S > 0) { var M = l - O; switch (C) { case "left": M -= p; break; case "center": M -= p / 2; break; } var N = u - v - O, j = p + 2 * O, A = v + 2 * O; if (k > 0) { var U = e.fillStyle, q = t.pstyle("text-background-color").value; e.fillStyle = "rgba(" + q[0] + "," + q[1] + "," + q[2] + "," + k * s + ")", I ? e1(e, M, N, j, A, P) : e.fillRect(M, N, j, A), e.fillStyle = U; } if (_ > 0 && S > 0) { var Y = e.strokeStyle, ie = e.lineWidth, re = t.pstyle("text-border-color").value, le = t.pstyle("text-border-style").value; if (e.strokeStyle = "rgba(" + re[0] + "," + re[1] + "," + re[2] + "," + S * s + ")", e.lineWidth = _, e.setLineDash) switch (le) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "double": e.lineWidth = _ / 4, e.setLineDash([]); break; case "solid": e.setLineDash([]); break; } if (I ? e1(e, M, N, j, A, P, "stroke") : e.strokeRect(M, N, j, A), le === "double") { var he = _ / 2; I ? e1(e, M + he, N + he, j - he * 2, A - he * 2, P, "stroke") : e.strokeRect(M + he, N + he, j - he * 2, A - he * 2); } e.setLineDash && e.setLineDash([]), e.lineWidth = ie, e.strokeStyle = Y; } } var we = 2 * t.pstyle("text-outline-width").pfValue; if (we > 0 && (e.lineWidth = we), t.pstyle("text-wrap").value === "wrap") { var be = ha(i, "labelWrapCachedLines", n), de = ha(i, "labelLineHeight", n), ae = p / 2, ee = this.getLabelJustification(t); switch (ee === "auto" || (C === "left" ? ee === "left" ? l += -p : ee === "center" && (l += -ae) : C === "center" ? ee === "left" ? l += -ae : ee === "right" && (l += ae) : C === "right" && (ee === "center" ? l += ae : ee === "right" && (l += p))), x) { case "top": u -= (be.length - 1) * de; break; case "center": case "bottom": u -= (be.length - 1) * de; break; } for (var se = 0; se < be.length; se++) we > 0 && e.strokeText(be[se], l, u), e.fillText(be[se], l, u), u += de; } else we > 0 && e.strokeText(f, l, u), e.fillText(f, l, u); w !== 0 && (e.rotate(-w), e.translate(-c, -d)); } } }; var Uc = {}; Uc.drawNode = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s, l, u = t._private, c = u.rscratch, d = t.position(); if (!(!Ke(d.x) || !Ke(d.y)) && !(a && !t.visible())) { var f = a ? t.effectiveOpacity() : 1, h = i.usePaths(), p, v = !1, m = t.padding(); s = t.width() + 2 * m, l = t.height() + 2 * m; var g; n && (g = n, e.translate(-g.x1, -g.y1)); for (var b = t.pstyle("background-image"), C = b.value, x = new Array(C.length), w = new Array(C.length), k = 0, S = 0; S < C.length; S++) { var _ = C[S], O = x[S] = _ != null && _ !== "none"; if (O) { var F = t.cy().style().getIndexedStyle(t, "background-image-crossorigin", "value", S); k++, w[S] = i.getCachedImage(_, F, function() { u.backgroundTimestamp = Date.now(), t.emitAndNotify("background"); }); } } var I = t.pstyle("background-blacken").value, P = t.pstyle("border-width").pfValue, M = t.pstyle("background-opacity").value * f, N = t.pstyle("border-color").value, j = t.pstyle("border-style").value, A = t.pstyle("border-join").value, U = t.pstyle("border-cap").value, q = t.pstyle("border-position").value, Y = t.pstyle("border-dash-pattern").pfValue, ie = t.pstyle("border-dash-offset").pfValue, re = t.pstyle("border-opacity").value * f, le = t.pstyle("outline-width").pfValue, he = t.pstyle("outline-color").value, we = t.pstyle("outline-style").value, be = t.pstyle("outline-opacity").value * f, de = t.pstyle("outline-offset").value, ae = t.pstyle("corner-radius").value; ae !== "auto" && (ae = t.pstyle("corner-radius").pfValue); var ee = function() { var Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : M; i.eleFillStyle(e, t, Fe); }, se = function() { var Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : re; i.colorStrokeStyle(e, N[0], N[1], N[2], Fe); }, pe = function() { var Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : be; i.colorStrokeStyle(e, he[0], he[1], he[2], Fe); }, Se = function(Fe, Ce, Re, lt) { var ut = i.nodePathCache = i.nodePathCache || [], ue = g6(Re === "polygon" ? Re + "," + lt.join(",") : Re, "" + Ce, "" + Fe, "" + ae), Te = ut[ue], ke, Be = !1; return Te != null ? (ke = Te, Be = !0, c.pathCache = ke) : (ke = new Path2D(), ut[ue] = c.pathCache = ke), { path: ke, cacheHit: Be }; }, Le = t.pstyle("shape").strValue, je = t.pstyle("shape-polygon-points").pfValue; if (h) { e.translate(d.x, d.y); var _e = Se(s, l, Le, je); p = _e.path, v = _e.cacheHit; } var ze = function() { if (!v) { var Fe = d; h && (Fe = { x: 0, y: 0 }), i.nodeShapes[i.getNodeShape(t)].draw(p || e, Fe.x, Fe.y, s, l, ae, c); } h ? e.fill(p) : e.fill(); }, Ie = function() { for (var Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, Ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, Re = u.backgrounding, lt = 0, ut = 0; ut < w.length; ut++) { var ue = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", ut); if (Ce && ue === "over" || !Ce && ue === "inside") { lt++; continue; } x[ut] && w[ut].complete && !w[ut].error && (lt++, i.drawInscribedImage(e, w[ut], t, ut, Fe)); } u.backgrounding = lt !== k, Re !== u.backgrounding && t.updateStyle(!1); }, He = function() { var Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, Ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f; i.hasPie(t) && (i.drawPie(e, t, Ce), Fe && (h || i.nodeShapes[i.getNodeShape(t)].draw(e, d.x, d.y, s, l, ae, c))); }, qe = function() { var Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, Ce = (I > 0 ? I : -I) * Fe, Re = I > 0 ? 0 : 255; I !== 0 && (i.colorFillStyle(e, Re, Re, Re, Ce), h ? e.fill(p) : e.fill()); }, et = function() { if (P > 0) { if (e.lineWidth = P, e.lineCap = U, e.lineJoin = A, e.setLineDash) switch (j) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash(Y), e.lineDashOffset = ie; break; case "solid": case "double": e.setLineDash([]); break; } if (q !== "center") { if (e.save(), e.lineWidth *= 2, q === "inside") h ? e.clip(p) : e.clip(); else { var Fe = new Path2D(); Fe.rect(-s / 2 - P, -l / 2 - P, s + 2 * P, l + 2 * P), Fe.addPath(p), e.clip(Fe, "evenodd"); } h ? e.stroke(p) : e.stroke(), e.restore(); } else h ? e.stroke(p) : e.stroke(); if (j === "double") { e.lineWidth = P / 3; var Ce = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(p) : e.stroke(), e.globalCompositeOperation = Ce; } e.setLineDash && e.setLineDash([]); } }, Ve = function() { if (le > 0) { if (e.lineWidth = le, e.lineCap = "butt", e.setLineDash) switch (we) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "solid": case "double": e.setLineDash([]); break; } var Fe = d; h && (Fe = { x: 0, y: 0 }); var Ce = i.getNodeShape(t), Re = P; q === "inside" && (Re = 0), q === "outside" && (Re *= 2); var lt = (s + Re + (le + de)) / s, ut = (l + Re + (le + de)) / l, ue = s * lt, Te = l * ut, ke = i.nodeShapes[Ce].points, Be; if (h) { var Dt = Se(ue, Te, Ce, ke); Be = Dt.path; } if (Ce === "ellipse") i.drawEllipsePath(Be || e, Fe.x, Fe.y, ue, Te); else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(Ce)) { var Ft = 0, zt = 0, Nt = 0; Ce === "round-diamond" ? Ft = (Re + de + le) * 1.4 : Ce === "round-heptagon" ? (Ft = (Re + de + le) * 1.075, Nt = -(Re / 2 + de + le) / 35) : Ce === "round-hexagon" ? Ft = (Re + de + le) * 1.12 : Ce === "round-pentagon" ? (Ft = (Re + de + le) * 1.13, Nt = -(Re / 2 + de + le) / 15) : Ce === "round-tag" ? (Ft = (Re + de + le) * 1.12, zt = (Re / 2 + le + de) * 0.07) : Ce === "round-triangle" && (Ft = (Re + de + le) * (Math.PI / 2), Nt = -(Re + de / 2 + le) / Math.PI), Ft !== 0 && (lt = (s + Ft) / s, ue = s * lt, ["round-hexagon", "round-tag"].includes(Ce) || (ut = (l + Ft) / l, Te = l * ut)), ae = ae === "auto" ? _6(ue, Te) : ae; for (var Yt = ue / 2, Ln = Te / 2, pn = ae + (Re + le + de) / 2, fn = new Array(ke.length / 2), Fn = new Array(ke.length / 2), Rn = 0; Rn < ke.length / 2; Rn++) fn[Rn] = { x: Fe.x + zt + Yt * ke[Rn * 2], y: Fe.y + Nt + Ln * ke[Rn * 2 + 1] }; var wn, sr, Xn, Zn, Xt = fn.length; for (sr = fn[Xt - 1], wn = 0; wn < Xt; wn++) Xn = fn[wn % Xt], Zn = fn[(wn + 1) % Xt], Fn[wn] = Z2(sr, Xn, Zn, pn), sr = Xn, Xn = Zn; i.drawRoundPolygonPath(Be || e, Fe.x + zt, Fe.y + Nt, s * lt, l * ut, ke, Fn); } else if (["roundrectangle", "round-rectangle"].includes(Ce)) ae = ae === "auto" ? Bl(ue, Te) : ae, i.drawRoundRectanglePath(Be || e, Fe.x, Fe.y, ue, Te, ae + (Re + le + de) / 2); else if (["cutrectangle", "cut-rectangle"].includes(Ce)) ae = ae === "auto" ? B2() : ae, i.drawCutRectanglePath(Be || e, Fe.x, Fe.y, ue, Te, null, ae + (Re + le + de) / 4); else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(Ce)) ae = ae === "auto" ? Bl(ue, Te) : ae, i.drawBottomRoundRectanglePath(Be || e, Fe.x, Fe.y, ue, Te, ae + (Re + le + de) / 2); else if (Ce === "barrel") i.drawBarrelPath(Be || e, Fe.x, Fe.y, ue, Te); else if (Ce.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(Ce)) { var hn = (Re + le + de) / s; ke = Mv(Nv(ke, hn)), i.drawPolygonPath(Be || e, Fe.x, Fe.y, s, l, ke); } else { var $n = (Re + le + de) / s; ke = Mv(Nv(ke, -$n)), i.drawPolygonPath(Be || e, Fe.x, Fe.y, s, l, ke); } if (h ? e.stroke(Be) : e.stroke(), we === "double") { e.lineWidth = Re / 3; var lr = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(Be) : e.stroke(), e.globalCompositeOperation = lr; } e.setLineDash && e.setLineDash([]); } }, nt = function() { o && i.drawNodeOverlay(e, t, d, s, l); }, ot = function() { o && i.drawNodeUnderlay(e, t, d, s, l); }, pt = function() { i.drawElementText(e, t, null, r); }, T = t.pstyle("ghost").value === "yes"; if (T) { var G = t.pstyle("ghost-offset-x").pfValue, fe = t.pstyle("ghost-offset-y").pfValue, ge = t.pstyle("ghost-opacity").value, ve = ge * f; e.translate(G, fe), pe(), Ve(), ee(ge * M), ze(), Ie(ve, !0), se(ge * re), et(), He(I !== 0 || P !== 0), Ie(ve, !1), qe(ve), e.translate(-G, -fe); } h && e.translate(-d.x, -d.y), ot(), h && e.translate(d.x, d.y), pe(), Ve(), ee(), ze(), Ie(f, !0), se(), et(), He(I !== 0 || P !== 0), Ie(f, !1), qe(), h && e.translate(-d.x, -d.y), pt(), nt(), n && e.translate(g.x1, g.y1); } }; var FT = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n, r, o, a) { var i = this; if (n.visible()) { var s = n.pstyle("".concat(e, "-padding")).pfValue, l = n.pstyle("".concat(e, "-opacity")).value, u = n.pstyle("".concat(e, "-color")).value, c = n.pstyle("".concat(e, "-shape")).value, d = n.pstyle("".concat(e, "-corner-radius")).value; if (l > 0) { if (r = r || n.position(), o == null || a == null) { var f = n.padding(); o = n.width() + 2 * f, a = n.height() + 2 * f; } i.colorFillStyle(t, u[0], u[1], u[2], l), i.nodeShapes[c].draw(t, r.x, r.y, o + s * 2, a + s * 2, d), t.fill(); } } }; }; Uc.drawNodeOverlay = FT("overlay"); Uc.drawNodeUnderlay = FT("underlay"); Uc.hasPie = function(e) { return e = e[0], e._private.hasPie; }; Uc.drawPie = function(e, t, n, r) { t = t[0], r = r || t.position(); var o = t.cy().style(), a = t.pstyle("pie-size"), i = r.x, s = r.y, l = t.width(), u = t.height(), c = Math.min(l, u) / 2, d = 0, f = this.usePaths(); f && (i = 0, s = 0), a.units === "%" ? c = c * a.pfValue : a.pfValue !== void 0 && (c = a.pfValue / 2); for (var h = 1; h <= o.pieBackgroundN; h++) { var p = t.pstyle("pie-" + h + "-background-size").value, v = t.pstyle("pie-" + h + "-background-color").value, m = t.pstyle("pie-" + h + "-background-opacity").value * n, g = p / 100; g + d > 1 && (g = 1 - d); var b = 1.5 * Math.PI + 2 * Math.PI * d, C = 2 * Math.PI * g, x = b + C; p === 0 || d >= 1 || d + g > 1 || (e.beginPath(), e.moveTo(i, s), e.arc(i, s, c, b, x), e.closePath(), this.colorFillStyle(e, v[0], v[1], v[2], m), e.fill(), d += g); } }; var Oo = {}, Ole = 100; Oo.getPixelRatio = function() { var e = this.data.contexts[0]; if (this.forcedPixelRatio != null) return this.forcedPixelRatio; var t = this.cy.window(), n = e.backingStorePixelRatio || e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1; return (t.devicePixelRatio || 1) / n; }; Oo.paintCache = function(e) { for (var t = this.paintCaches = this.paintCaches || [], n = !0, r, o = 0; o < t.length; o++) if (r = t[o], r.context === e) { n = !1; break; } return n && (r = { context: e }, t.push(r)), r; }; Oo.createGradientStyleFor = function(e, t, n, r, o) { var a, i = this.usePaths(), s = n.pstyle(t + "-gradient-stop-colors").value, l = n.pstyle(t + "-gradient-stop-positions").pfValue; if (r === "radial-gradient") if (n.isEdge()) { var u = n.sourceEndpoint(), c = n.targetEndpoint(), d = n.midpoint(), f = Nl(u, d), h = Nl(c, d); a = e.createRadialGradient(d.x, d.y, 0, d.x, d.y, Math.max(f, h)); } else { var p = i ? { x: 0, y: 0 } : n.position(), v = n.paddedWidth(), m = n.paddedHeight(); a = e.createRadialGradient(p.x, p.y, 0, p.x, p.y, Math.max(v, m)); } else if (n.isEdge()) { var g = n.sourceEndpoint(), b = n.targetEndpoint(); a = e.createLinearGradient(g.x, g.y, b.x, b.y); } else { var C = i ? { x: 0, y: 0 } : n.position(), x = n.paddedWidth(), w = n.paddedHeight(), k = x / 2, S = w / 2, _ = n.pstyle("background-gradient-direction").value; switch (_) { case "to-bottom": a = e.createLinearGradient(C.x, C.y - S, C.x, C.y + S); break; case "to-top": a = e.createLinearGradient(C.x, C.y + S, C.x, C.y - S); break; case "to-left": a = e.createLinearGradient(C.x + k, C.y, C.x - k, C.y); break; case "to-right": a = e.createLinearGradient(C.x - k, C.y, C.x + k, C.y); break; case "to-bottom-right": case "to-right-bottom": a = e.createLinearGradient(C.x - k, C.y - S, C.x + k, C.y + S); break; case "to-top-right": case "to-right-top": a = e.createLinearGradient(C.x - k, C.y + S, C.x + k, C.y - S); break; case "to-bottom-left": case "to-left-bottom": a = e.createLinearGradient(C.x + k, C.y - S, C.x - k, C.y + S); break; case "to-top-left": case "to-left-top": a = e.createLinearGradient(C.x + k, C.y + S, C.x - k, C.y - S); break; } } if (!a) return null; for (var O = l.length === s.length, F = s.length, I = 0; I < F; I++) a.addColorStop(O ? l[I] : I / (F - 1), "rgba(" + s[I][0] + "," + s[I][1] + "," + s[I][2] + "," + o + ")"); return a; }; Oo.gradientFillStyle = function(e, t, n, r) { var o = this.createGradientStyleFor(e, "background", t, n, r); if (!o) return null; e.fillStyle = o; }; Oo.colorFillStyle = function(e, t, n, r, o) { e.fillStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")"; }; Oo.eleFillStyle = function(e, t, n) { var r = t.pstyle("background-fill").value; if (r === "linear-gradient" || r === "radial-gradient") this.gradientFillStyle(e, t, r, n); else { var o = t.pstyle("background-color").value; this.colorFillStyle(e, o[0], o[1], o[2], n); } }; Oo.gradientStrokeStyle = function(e, t, n, r) { var o = this.createGradientStyleFor(e, "line", t, n, r); if (!o) return null; e.strokeStyle = o; }; Oo.colorStrokeStyle = function(e, t, n, r, o) { e.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + o + ")"; }; Oo.eleStrokeStyle = function(e, t, n) { var r = t.pstyle("line-fill").value; if (r === "linear-gradient" || r === "radial-gradient") this.gradientStrokeStyle(e, t, r, n); else { var o = t.pstyle("line-color").value; this.colorStrokeStyle(e, o[0], o[1], o[2], n); } }; Oo.matchCanvasSize = function(e) { var t = this, n = t.data, r = t.findContainerClientCoords(), o = r[2], a = r[3], i = t.getPixelRatio(), s = t.motionBlurPxRatio; (e === t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE] || e === t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]) && (i = s); var l = o * i, u = a * i, c; if (!(l === t.canvasWidth && u === t.canvasHeight)) { t.fontCaches = null; var d = n.canvasContainer; d.style.width = o + "px", d.style.height = a + "px"; for (var f = 0; f < t.CANVAS_LAYERS; f++) c = n.canvases[f], c.width = l, c.height = u, c.style.width = o + "px", c.style.height = a + "px"; for (var f = 0; f < t.BUFFER_COUNT; f++) c = n.bufferCanvases[f], c.width = l, c.height = u, c.style.width = o + "px", c.style.height = a + "px"; t.textureMult = 1, i <= 1 && (c = n.bufferCanvases[t.TEXTURE_BUFFER], t.textureMult = 2, c.width = l * t.textureMult, c.height = u * t.textureMult), t.canvasWidth = l, t.canvasHeight = u; } }; Oo.renderTo = function(e, t, n, r) { this.render({ forcedContext: e, forcedZoom: t, forcedPan: n, drawAllLayers: !0, forcedPxRatio: r }); }; Oo.render = function(e) { e = e || w6(); var t = e.forcedContext, n = e.drawAllLayers, r = e.drawOnlyNodeLayer, o = e.forcedZoom, a = e.forcedPan, i = this, s = e.forcedPxRatio === void 0 ? this.getPixelRatio() : e.forcedPxRatio, l = i.cy, u = i.data, c = u.canvasNeedsRedraw, d = i.textureOnViewport && !t && (i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming), f = e.motionBlur !== void 0 ? e.motionBlur : i.motionBlur, h = i.motionBlurPxRatio, p = l.hasCompoundNodes(), v = i.hoverData.draggingEles, m = !!(i.hoverData.selecting || i.touchData.selecting); f = f && !t && i.motionBlurEnabled && !m; var g = f; t || (i.prevPxRatio !== s && (i.invalidateContainerClientCoordsCache(), i.matchCanvasSize(i.container), i.redrawHint("eles", !0), i.redrawHint("drag", !0)), i.prevPxRatio = s), !t && i.motionBlurTimeout && clearTimeout(i.motionBlurTimeout), f && (i.mbFrames == null && (i.mbFrames = 0), i.mbFrames++, i.mbFrames < 3 && (g = !1), i.mbFrames > i.minMbLowQualFrames && (i.motionBlurPxRatio = i.mbPxRBlurry)), i.clearingMotionBlur && (i.motionBlurPxRatio = 1), i.textureDrawLastFrame && !d && (c[i.NODE] = !0, c[i.SELECT_BOX] = !0); var b = l.style(), C = l.zoom(), x = o !== void 0 ? o : C, w = l.pan(), k = { x: w.x, y: w.y }, S = { zoom: C, pan: { x: w.x, y: w.y } }, _ = i.prevViewport, O = _ === void 0 || S.zoom !== _.zoom || S.pan.x !== _.pan.x || S.pan.y !== _.pan.y; !O && !(v && !p) && (i.motionBlurPxRatio = 1), a && (k = a), x *= s, k.x *= s, k.y *= s; var F = i.getCachedZSortedEles(); function I(_e, ze, Ie, He, qe) { var et = _e.globalCompositeOperation; _e.globalCompositeOperation = "destination-out", i.colorFillStyle(_e, 255, 255, 255, i.motionBlurTransparency), _e.fillRect(ze, Ie, He, qe), _e.globalCompositeOperation = et; } function P(_e, ze) { var Ie, He, qe, et; !i.clearingMotionBlur && (_e === u.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] || _e === u.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]) ? (Ie = { x: w.x * h, y: w.y * h }, He = C * h, qe = i.canvasWidth * h, et = i.canvasHeight * h) : (Ie = k, He = x, qe = i.canvasWidth, et = i.canvasHeight), _e.setTransform(1, 0, 0, 1, 0, 0), ze === "motionBlur" ? I(_e, 0, 0, qe, et) : !t && (ze === void 0 || ze) && _e.clearRect(0, 0, qe, et), n || (_e.translate(Ie.x, Ie.y), _e.scale(He, He)), a && _e.translate(a.x, a.y), o && _e.scale(o, o); } if (d || (i.textureDrawLastFrame = !1), d) { if (i.textureDrawLastFrame = !0, !i.textureCache) { i.textureCache = {}, i.textureCache.bb = l.mutableElements().boundingBox(), i.textureCache.texture = i.data.bufferCanvases[i.TEXTURE_BUFFER]; var M = i.data.bufferContexts[i.TEXTURE_BUFFER]; M.setTransform(1, 0, 0, 1, 0, 0), M.clearRect(0, 0, i.canvasWidth * i.textureMult, i.canvasHeight * i.textureMult), i.render({ forcedContext: M, drawOnlyNodeLayer: !0, forcedPxRatio: s * i.textureMult }); var S = i.textureCache.viewport = { zoom: l.zoom(), pan: l.pan(), width: i.canvasWidth, height: i.canvasHeight }; S.mpan = { x: (0 - S.pan.x) / S.zoom, y: (0 - S.pan.y) / S.zoom }; } c[i.DRAG] = !1, c[i.NODE] = !1; var N = u.contexts[i.NODE], j = i.textureCache.texture, S = i.textureCache.viewport; N.setTransform(1, 0, 0, 1, 0, 0), f ? I(N, 0, 0, S.width, S.height) : N.clearRect(0, 0, S.width, S.height); var A = b.core("outside-texture-bg-color").value, U = b.core("outside-texture-bg-opacity").value; i.colorFillStyle(N, A[0], A[1], A[2], U), N.fillRect(0, 0, S.width, S.height); var C = l.zoom(); P(N, !1), N.clearRect(S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s), N.drawImage(j, S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s); } else i.textureOnViewport && !t && (i.textureCache = null); var q = l.extent(), Y = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), ie = i.hideEdgesOnViewport && Y, re = []; if (re[i.NODE] = !c[i.NODE] && f && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, re[i.NODE] && (i.clearedForMotionBlur[i.NODE] = !0), re[i.DRAG] = !c[i.DRAG] && f && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, re[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = !0), c[i.NODE] || n || r || re[i.NODE]) { var le = f && !re[i.NODE] && h !== 1, N = t || (le ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] : u.contexts[i.NODE]), he = f && !le ? "motionBlur" : void 0; P(N, he), ie ? i.drawCachedNodes(N, F.nondrag, s, q) : i.drawLayeredElements(N, F.nondrag, s, q), i.debug && i.drawDebugPoints(N, F.nondrag), !n && !f && (c[i.NODE] = !1); } if (!r && (c[i.DRAG] || n || re[i.DRAG])) { var le = f && !re[i.DRAG] && h !== 1, N = t || (le ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG] : u.contexts[i.DRAG]); P(N, f && !le ? "motionBlur" : void 0), ie ? i.drawCachedNodes(N, F.drag, s, q) : i.drawCachedElements(N, F.drag, s, q), i.debug && i.drawDebugPoints(N, F.drag), !n && !f && (c[i.DRAG] = !1); } if (i.showFps || !r && c[i.SELECT_BOX] && !n) { var N = t || u.contexts[i.SELECT_BOX]; if (P(N), i.selection[4] == 1 && (i.hoverData.selecting || i.touchData.selecting)) { var C = i.cy.zoom(), we = b.core("selection-box-border-width").value / C; N.lineWidth = we, N.fillStyle = "rgba(" + b.core("selection-box-color").value[0] + "," + b.core("selection-box-color").value[1] + "," + b.core("selection-box-color").value[2] + "," + b.core("selection-box-opacity").value + ")", N.fillRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]), we > 0 && (N.strokeStyle = "rgba(" + b.core("selection-box-border-color").value[0] + "," + b.core("selection-box-border-color").value[1] + "," + b.core("selection-box-border-color").value[2] + "," + b.core("selection-box-opacity").value + ")", N.strokeRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1])); } if (u.bgActivePosistion && !i.hoverData.selecting) { var C = i.cy.zoom(), be = u.bgActivePosistion; N.fillStyle = "rgba(" + b.core("active-bg-color").value[0] + "," + b.core("active-bg-color").value[1] + "," + b.core("active-bg-color").value[2] + "," + b.core("active-bg-opacity").value + ")", N.beginPath(), N.arc(be.x, be.y, b.core("active-bg-size").pfValue / C, 0, 2 * Math.PI), N.fill(); } var de = i.lastRedrawTime; if (i.showFps && de) { de = Math.round(de); var ae = Math.round(1e3 / de); N.setTransform(1, 0, 0, 1, 0, 0), N.fillStyle = "rgba(255, 0, 0, 0.75)", N.strokeStyle = "rgba(255, 0, 0, 0.75)", N.lineWidth = 1, N.fillText("1 frame = " + de + " ms = " + ae + " fps", 0, 20); var ee = 60; N.strokeRect(0, 30, 250, 20), N.fillRect(0, 30, 250 * Math.min(ae / ee, 1), 20); } n || (c[i.SELECT_BOX] = !1); } if (f && h !== 1) { var se = u.contexts[i.NODE], pe = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE], Se = u.contexts[i.DRAG], Le = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG], je = function(_e, ze, Ie) { _e.setTransform(1, 0, 0, 1, 0, 0), Ie || !g ? _e.clearRect(0, 0, i.canvasWidth, i.canvasHeight) : I(_e, 0, 0, i.canvasWidth, i.canvasHeight); var He = h; _e.drawImage( ze, // img 0, 0, // sx, sy i.canvasWidth * He, i.canvasHeight * He, // sw, sh 0, 0, // x, y i.canvasWidth, i.canvasHeight // w, h ); }; (c[i.NODE] || re[i.NODE]) && (je(se, pe, re[i.NODE]), c[i.NODE] = !1), (c[i.DRAG] || re[i.DRAG]) && (je(Se, Le, re[i.DRAG]), c[i.DRAG] = !1); } i.prevViewport = S, i.clearingMotionBlur && (i.clearingMotionBlur = !1, i.motionBlurCleared = !0, i.motionBlur = !0), f && (i.motionBlurTimeout = setTimeout(function() { i.motionBlurTimeout = null, i.clearedForMotionBlur[i.NODE] = !1, i.clearedForMotionBlur[i.DRAG] = !1, i.motionBlur = !1, i.clearingMotionBlur = !d, i.mbFrames = 0, c[i.NODE] = !0, c[i.DRAG] = !0, i.redraw(); }, Ole)), t || l.emit("render"); }; var Ws = {}; Ws.drawPolygonPath = function(e, t, n, r, o, a) { var i = r / 2, s = o / 2; e.beginPath && e.beginPath(), e.moveTo(t + i * a[0], n + s * a[1]); for (var l = 1; l < a.length / 2; l++) e.lineTo(t + i * a[l * 2], n + s * a[l * 2 + 1]); e.closePath(); }; Ws.drawRoundPolygonPath = function(e, t, n, r, o, a, i) { i.forEach(function(s) { return yT(e, s); }), e.closePath(); }; Ws.drawRoundRectanglePath = function(e, t, n, r, o, a) { var i = r / 2, s = o / 2, l = a === "auto" ? Bl(r, o) : Math.min(a, s, i); e.beginPath && e.beginPath(), e.moveTo(t, n - s), e.arcTo(t + i, n - s, t + i, n, l), e.arcTo(t + i, n + s, t, n + s, l), e.arcTo(t - i, n + s, t - i, n, l), e.arcTo(t - i, n - s, t, n - s, l), e.lineTo(t, n - s), e.closePath(); }; Ws.drawBottomRoundRectanglePath = function(e, t, n, r, o, a) { var i = r / 2, s = o / 2, l = a === "auto" ? Bl(r, o) : a; e.beginPath && e.beginPath(), e.moveTo(t, n - s), e.lineTo(t + i, n - s), e.lineTo(t + i, n), e.arcTo(t + i, n + s, t, n + s, l), e.arcTo(t - i, n + s, t - i, n, l), e.lineTo(t - i, n - s), e.lineTo(t, n - s), e.closePath(); }; Ws.drawCutRectanglePath = function(e, t, n, r, o, a, i) { var s = r / 2, l = o / 2, u = i === "auto" ? B2() : i; e.beginPath && e.beginPath(), e.moveTo(t - s + u, n - l), e.lineTo(t + s - u, n - l), e.lineTo(t + s, n - l + u), e.lineTo(t + s, n + l - u), e.lineTo(t + s - u, n + l), e.lineTo(t - s + u, n + l), e.lineTo(t - s, n + l - u), e.lineTo(t - s, n - l + u), e.closePath(); }; Ws.drawBarrelPath = function(e, t, n, r, o) { var a = r / 2, i = o / 2, s = t - a, l = t + a, u = n - i, c = n + i, d = uy(r, o), f = d.widthOffset, h = d.heightOffset, p = d.ctrlPtOffsetPct * f; e.beginPath && e.beginPath(), e.moveTo(s, u + h), e.lineTo(s, c - h), e.quadraticCurveTo(s + p, c, s + f, c), e.lineTo(l - f, c), e.quadraticCurveTo(l - p, c, l, c - h), e.lineTo(l, u + h), e.quadraticCurveTo(l - p, u, l - f, u), e.lineTo(s + f, u), e.quadraticCurveTo(s + p, u, s, u + h), e.closePath(); }; var I3 = Math.sin(0), A3 = Math.cos(0), xy = {}, ky = {}, IT = Math.PI / 40; for (var Tu = 0 * Math.PI; Tu < 2 * Math.PI; Tu += IT) xy[Tu] = Math.sin(Tu), ky[Tu] = Math.cos(Tu); Ws.drawEllipsePath = function(e, t, n, r, o) { if (e.beginPath && e.beginPath(), e.ellipse) e.ellipse(t, n, r / 2, o / 2, 0, 0, 2 * Math.PI); else for (var a, i, s = r / 2, l = o / 2, u = 0 * Math.PI; u < 2 * Math.PI; u += IT) a = t - s * xy[u] * I3 + s * ky[u] * A3, i = n + l * ky[u] * I3 + l * xy[u] * A3, u === 0 ? e.moveTo(a, i) : e.lineTo(a, i); e.closePath(); }; var mf = {}; mf.createBuffer = function(e, t) { var n = document.createElement("canvas"); return n.width = e, n.height = t, [n, n.getContext("2d")]; }; mf.bufferCanvasImage = function(e) { var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), o = this.findContainerClientCoords(), a = e.full ? Math.ceil(r.w) : o[2], i = e.full ? Math.ceil(r.h) : o[3], s = Ke(e.maxWidth) || Ke(e.maxHeight), l = this.getPixelRatio(), u = 1; if (e.scale !== void 0) a *= e.scale, i *= e.scale, u = e.scale; else if (s) { var c = 1 / 0, d = 1 / 0; Ke(e.maxWidth) && (c = u * e.maxWidth / a), Ke(e.maxHeight) && (d = u * e.maxHeight / i), u = Math.min(c, d), a *= u, i *= u; } s || (a *= l, i *= l, u *= l); var f = document.createElement("canvas"); f.width = a, f.height = i, f.style.width = a + "px", f.style.height = i + "px"; var h = f.getContext("2d"); if (a > 0 && i > 0) { h.clearRect(0, 0, a, i), h.globalCompositeOperation = "source-over"; var p = this.getCachedZSortedEles(); if (e.full) h.translate(-r.x1 * u, -r.y1 * u), h.scale(u, u), this.drawElements(h, p), h.scale(1 / u, 1 / u), h.translate(r.x1 * u, r.y1 * u); else { var v = t.pan(), m = { x: v.x * u, y: v.y * u }; u *= t.zoom(), h.translate(m.x, m.y), h.scale(u, u), this.drawElements(h, p), h.scale(1 / u, 1 / u), h.translate(-m.x, -m.y); } e.bg && (h.globalCompositeOperation = "destination-over", h.fillStyle = e.bg, h.rect(0, 0, a, i), h.fill()); } return f; }; function Fle(e, t) { for (var n = atob(e), r = new ArrayBuffer(n.length), o = new Uint8Array(r), a = 0; a < n.length; a++) o[a] = n.charCodeAt(a); return new Blob([r], { type: t }); } function P3(e) { var t = e.indexOf(","); return e.substr(t + 1); } function AT(e, t, n) { var r = function() { return t.toDataURL(n, e.quality); }; switch (e.output) { case "blob-promise": return new Dc(function(o, a) { try { t.toBlob(function(i) { i != null ? o(i) : a(new Error("`canvas.toBlob()` sent a null value in its callback")); }, n, e.quality); } catch (i) { a(i); } }); case "blob": return Fle(P3(r()), n); case "base64": return P3(r()); case "base64uri": default: return r(); } } mf.png = function(e) { return AT(e, this.bufferCanvasImage(e), "image/png"); }; mf.jpg = function(e) { return AT(e, this.bufferCanvasImage(e), "image/jpeg"); }; var PT = {}; PT.nodeShapeImpl = function(e, t, n, r, o, a, i, s) { switch (e) { case "ellipse": return this.drawEllipsePath(t, n, r, o, a); case "polygon": return this.drawPolygonPath(t, n, r, o, a, i); case "round-polygon": return this.drawRoundPolygonPath(t, n, r, o, a, i, s); case "roundrectangle": case "round-rectangle": return this.drawRoundRectanglePath(t, n, r, o, a, s); case "cutrectangle": case "cut-rectangle": return this.drawCutRectanglePath(t, n, r, o, a, i, s); case "bottomroundrectangle": case "bottom-round-rectangle": return this.drawBottomRoundRectanglePath(t, n, r, o, a, s); case "barrel": return this.drawBarrelPath(t, n, r, o, a); } }; var Ile = LT, qt = LT.prototype; qt.CANVAS_LAYERS = 3; qt.SELECT_BOX = 0; qt.DRAG = 1; qt.NODE = 2; qt.BUFFER_COUNT = 3; qt.TEXTURE_BUFFER = 0; qt.MOTIONBLUR_BUFFER_NODE = 1; qt.MOTIONBLUR_BUFFER_DRAG = 2; function LT(e) { var t = this, n = t.cy.window(), r = n.document; t.data = { canvases: new Array(qt.CANVAS_LAYERS), contexts: new Array(qt.CANVAS_LAYERS), canvasNeedsRedraw: new Array(qt.CANVAS_LAYERS), bufferCanvases: new Array(qt.BUFFER_COUNT), bufferContexts: new Array(qt.CANVAS_LAYERS) }; var o = "-webkit-tap-highlight-color", a = "rgba(0,0,0,0)"; t.data.canvasContainer = r.createElement("div"); var i = t.data.canvasContainer.style; t.data.canvasContainer.style[o] = a, i.position = "relative", i.zIndex = "0", i.overflow = "hidden"; var s = e.cy.container(); s.appendChild(t.data.canvasContainer), s.style[o] = a; var l = { "-webkit-user-select": "none", "-moz-user-select": "-moz-none", "user-select": "none", "-webkit-tap-highlight-color": "rgba(0,0,0,0)", "outline-style": "none" }; yte() && (l["-ms-touch-action"] = "none", l["touch-action"] = "none"); for (var u = 0; u < qt.CANVAS_LAYERS; u++) { var c = t.data.canvases[u] = r.createElement("canvas"); t.data.contexts[u] = c.getContext("2d"), Object.keys(l).forEach(function(ee) { c.style[ee] = l[ee]; }), c.style.position = "absolute", c.setAttribute("data-id", "layer" + u), c.style.zIndex = String(qt.CANVAS_LAYERS - u), t.data.canvasContainer.appendChild(c), t.data.canvasNeedsRedraw[u] = !1; } t.data.topCanvas = t.data.canvases[0], t.data.canvases[qt.NODE].setAttribute("data-id", "layer" + qt.NODE + "-node"), t.data.canvases[qt.SELECT_BOX].setAttribute("data-id", "layer" + qt.SELECT_BOX + "-selectbox"), t.data.canvases[qt.DRAG].setAttribute("data-id", "layer" + qt.DRAG + "-drag"); for (var u = 0; u < qt.BUFFER_COUNT; u++) t.data.bufferCanvases[u] = r.createElement("canvas"), t.data.bufferContexts[u] = t.data.bufferCanvases[u].getContext("2d"), t.data.bufferCanvases[u].style.position = "absolute", t.data.bufferCanvases[u].setAttribute("data-id", "buffer" + u), t.data.bufferCanvases[u].style.zIndex = String(-u - 1), t.data.bufferCanvases[u].style.visibility = "hidden"; t.pathsEnabled = !0; var d = yo(), f = function(ee) { return { x: (ee.x1 + ee.x2) / 2, y: (ee.y1 + ee.y2) / 2 }; }, h = function(ee) { return { x: -ee.w / 2, y: -ee.h / 2 }; }, p = function(ee) { var se = ee[0]._private, pe = se.oldBackgroundTimestamp === se.backgroundTimestamp; return !pe; }, v = function(ee) { return ee[0]._private.nodeKey; }, m = function(ee) { return ee[0]._private.labelStyleKey; }, g = function(ee) { return ee[0]._private.sourceLabelStyleKey; }, b = function(ee) { return ee[0]._private.targetLabelStyleKey; }, C = function(ee, se, pe, Se, Le) { return t.drawElement(ee, se, pe, !1, !1, Le); }, x = function(ee, se, pe, Se, Le) { return t.drawElementText(ee, se, pe, Se, "main", Le); }, w = function(ee, se, pe, Se, Le) { return t.drawElementText(ee, se, pe, Se, "source", Le); }, k = function(ee, se, pe, Se, Le) { return t.drawElementText(ee, se, pe, Se, "target", Le); }, S = function(ee) { return ee.boundingBox(), ee[0]._private.bodyBounds; }, _ = function(ee) { return ee.boundingBox(), ee[0]._private.labelBounds.main || d; }, O = function(ee) { return ee.boundingBox(), ee[0]._private.labelBounds.source || d; }, F = function(ee) { return ee.boundingBox(), ee[0]._private.labelBounds.target || d; }, I = function(ee, se) { return se; }, P = function(ee) { return f(S(ee)); }, M = function(ee, se, pe) { var Se = ee ? ee + "-" : ""; return { x: se.x + pe.pstyle(Se + "text-margin-x").pfValue, y: se.y + pe.pstyle(Se + "text-margin-y").pfValue }; }, N = function(ee, se, pe) { var Se = ee[0]._private.rscratch; return { x: Se[se], y: Se[pe] }; }, j = function(ee) { return M("", N(ee, "labelX", "labelY"), ee); }, A = function(ee) { return M("source", N(ee, "sourceLabelX", "sourceLabelY"), ee); }, U = function(ee) { return M("target", N(ee, "targetLabelX", "targetLabelY"), ee); }, q = function(ee) { return h(S(ee)); }, Y = function(ee) { return h(O(ee)); }, ie = function(ee) { return h(F(ee)); }, re = function(ee) { var se = _(ee), pe = h(_(ee)); if (ee.isNode()) { switch (ee.pstyle("text-halign").value) { case "left": pe.x = -se.w; break; case "right": pe.x = 0; break; } switch (ee.pstyle("text-valign").value) { case "top": pe.y = -se.h; break; case "bottom": pe.y = 0; break; } } return pe; }, le = t.data.eleTxrCache = new Pd(t, { getKey: v, doesEleInvalidateKey: p, drawElement: C, getBoundingBox: S, getRotationPoint: P, getRotationOffset: q, allowEdgeTxrCaching: !1, allowParentTxrCaching: !1 }), he = t.data.lblTxrCache = new Pd(t, { getKey: m, drawElement: x, getBoundingBox: _, getRotationPoint: j, getRotationOffset: re, isVisible: I }), we = t.data.slbTxrCache = new Pd(t, { getKey: g, drawElement: w, getBoundingBox: O, getRotationPoint: A, getRotationOffset: Y, isVisible: I }), be = t.data.tlbTxrCache = new Pd(t, { getKey: b, drawElement: k, getBoundingBox: F, getRotationPoint: U, getRotationOffset: ie, isVisible: I }), de = t.data.lyrTxrCache = new _T(t); t.onUpdateEleCalcs(function(ee, se) { le.invalidateElements(se), he.invalidateElements(se), we.invalidateElements(se), be.invalidateElements(se), de.invalidateElements(se); for (var pe = 0; pe < se.length; pe++) { var Se = se[pe]._private; Se.oldBackgroundTimestamp = Se.backgroundTimestamp; } }); var ae = function(ee) { for (var se = 0; se < ee.length; se++) de.enqueueElementRefinement(ee[se].ele); }; le.onDequeue(ae), he.onDequeue(ae), we.onDequeue(ae), be.onDequeue(ae); } qt.redrawHint = function(e, t) { var n = this; switch (e) { case "eles": n.data.canvasNeedsRedraw[qt.NODE] = t; break; case "drag": n.data.canvasNeedsRedraw[qt.DRAG] = t; break; case "select": n.data.canvasNeedsRedraw[qt.SELECT_BOX] = t; break; } }; var Ale = typeof Path2D < "u"; qt.path2dEnabled = function(e) { if (e === void 0) return this.pathsEnabled; this.pathsEnabled = !!e; }; qt.usePaths = function() { return Ale && this.pathsEnabled; }; qt.setImgSmoothing = function(e, t) { e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled = t : (e.webkitImageSmoothingEnabled = t, e.mozImageSmoothingEnabled = t, e.msImageSmoothingEnabled = t); }; qt.getImgSmoothing = function(e) { return e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled : e.webkitImageSmoothingEnabled || e.mozImageSmoothingEnabled || e.msImageSmoothingEnabled; }; qt.makeOffscreenCanvas = function(e, t) { var n; if ((typeof OffscreenCanvas > "u" ? "undefined" : or(OffscreenCanvas)) !== "undefined") n = new OffscreenCanvas(e, t); else { var r = this.cy.window(), o = r.document; n = o.createElement("canvas"), n.width = e, n.height = t; } return n; }; [TT, si, qi, Q2, su, Uc, Oo, Ws, mf, PT].forEach(function(e) { kt(qt, e); }); var Ple = [{ name: "null", impl: vT }, { name: "base", impl: ET }, { name: "canvas", impl: Ile }], Lle = [{ type: "layout", extensions: zse }, { type: "renderer", extensions: Ple }], RT = {}, DT = {}; function MT(e, t, n) { var r = n, o = function(S) { tn("Can not register `" + t + "` for `" + e + "` since `" + S + "` already exists in the prototype and can not be overridden"); }; if (e === "core") { if (Cp.prototype[t]) return o(t); Cp.prototype[t] = n; } else if (e === "collection") { if (Er.prototype[t]) return o(t); Er.prototype[t] = n; } else if (e === "layout") { for (var a = function(S) { this.options = S, n.call(this, S), Ht(this._private) || (this._private = {}), this._private.cy = S.cy, this._private.listeners = [], this.createEmitter(); }, i = a.prototype = Object.create(n.prototype), s = [], l = 0; l < s.length; l++) { var u = s[l]; i[u] = i[u] || function() { return this; }; } i.start && !i.run ? i.run = function() { return this.start(), this; } : !i.start && i.run && (i.start = function() { return this.run(), this; }); var c = n.prototype.stop; i.stop = function() { var S = this.options; if (S && S.animate) { var _ = this.animations; if (_) for (var O = 0; O < _.length; O++) _[O].stop(); } return c ? c.call(this) : this.emit("layoutstop"), this; }, i.destroy || (i.destroy = function() { return this; }), i.cy = function() { return this._private.cy; }; var d = function(S) { return S._private.cy; }, f = { addEventFields: function(S, _) { _.layout = S, _.cy = d(S), _.target = S; }, bubble: function() { return !0; }, parent: function(S) { return d(S); } }; kt(i, { createEmitter: function() { return this._private.emitter = new vg(f, this), this; }, emitter: function() { return this._private.emitter; }, on: function(S, _) { return this.emitter().on(S, _), this; }, one: function(S, _) { return this.emitter().one(S, _), this; }, once: function(S, _) { return this.emitter().one(S, _), this; }, removeListener: function(S, _) { return this.emitter().removeListener(S, _), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, emit: function(S, _) { return this.emitter().emit(S, _), this; } }), en.eventAliasesOn(i), r = a; } else if (e === "renderer" && t !== "null" && t !== "base") { var h = NT("renderer", "base"), p = h.prototype, v = n, m = n.prototype, g = function() { h.apply(this, arguments), v.apply(this, arguments); }, b = g.prototype; for (var C in p) { var x = p[C], w = m[C] != null; if (w) return o(C); b[C] = x; } for (var k in m) b[k] = m[k]; p.clientFunctions.forEach(function(S) { b[S] = b[S] || function() { Nn("Renderer does not implement `renderer." + S + "()` on its prototype"); }; }), r = g; } else if (e === "__proto__" || e === "constructor" || e === "prototype") return Nn(e + " is an illegal type to be registered, possibly lead to prototype pollutions"); return u6({ map: RT, keys: [e, t], value: r }); } function NT(e, t) { return c6({ map: RT, keys: [e, t] }); } function Rle(e, t, n, r, o) { return u6({ map: DT, keys: [e, t, n, r], value: o }); } function Dle(e, t, n, r) { return c6({ map: DT, keys: [e, t, n, r] }); } var Cy = function() { if (arguments.length === 2) return NT.apply(null, arguments); if (arguments.length === 3) return MT.apply(null, arguments); if (arguments.length === 4) return Dle.apply(null, arguments); if (arguments.length === 5) return Rle.apply(null, arguments); Nn("Invalid extension access syntax"); }; Cp.prototype.extension = Cy; Lle.forEach(function(e) { e.extensions.forEach(function(t) { MT(e.type, t.name, t.impl); }); }); var BT = function e() { if (!(this instanceof e)) return new e(); this.length = 0; }, jl = BT.prototype; jl.instanceString = function() { return "stylesheet"; }; jl.selector = function(e) { var t = this.length++; return this[t] = { selector: e, properties: [] }, this; }; jl.css = function(e, t) { var n = this.length - 1; if (ht(e)) this[n].properties.push({ name: e, value: t }); else if (Ht(e)) for (var r = e, o = Object.keys(r), a = 0; a < o.length; a++) { var i = o[a], s = r[i]; if (s != null) { var l = Nr.properties[i] || Nr.properties[ag(i)]; if (l != null) { var u = l.name, c = s; this[n].properties.push({ name: u, value: c }); } } } return this; }; jl.style = jl.css; jl.generateStyle = function(e) { var t = new Nr(e); return this.appendToStyle(t); }; jl.appendToStyle = function(e) { for (var t = 0; t < this.length; t++) { var n = this[t], r = n.selector, o = n.properties; e.selector(r); for (var a = 0; a < o.length; a++) { var i = o[a]; e.css(i.name, i.value); } } return e; }; var Mle = "3.30.2", Hl = function(e) { if (e === void 0 && (e = {}), Ht(e)) return new Cp(e); if (ht(e)) return Cy.apply(Cy, arguments); }; Hl.use = function(e) { var t = Array.prototype.slice.call(arguments, 1); return t.unshift(Hl), e.apply(null, t), this; }; Hl.warnings = function(e) { return y6(e); }; Hl.version = Mle; Hl.stylesheet = Hl.Stylesheet = BT; let Nle = class extends EventTarget { constructor(t, n) { super(), Da(this, "cyg", null), Da(this, "nodes", []), Da(this, "edges", []), Da(this, "axons", []), Da(this, "dendrites", []), Da(this, "somas", []), Da(this, "labelCache", /* @__PURE__ */ new Map()), Da(this, "graphCanvas", null), this.labelCache = t, this.graphCanvas = n; } async addConnectivity(t) { var n; if (this.axons = t.axons.map((r) => JSON.stringify(r)), this.dendrites = t.dendrites.map((r) => JSON.stringify(r)), (n = t.somas) != null && n.length && (this.somas = t.somas.map((r) => JSON.stringify(r))), t.connectivity.length) for (const r of t.connectivity) { const o = await this.graphNode(r[0]), a = await this.graphNode(r[1]); this.nodes.push(o), this.nodes.push(a), this.edges.push({ id: `${o.id}_${a.id}`, source: o.id, target: a.id }); } else this.nodes.push({ id: "MISSING", label: "NO PATHS" }); } showConnectivity(t) { this.cyg = new Ule(this, t), this.cyg.on("tap-node", (n) => { const r = new CustomEvent("tap-node", { detail: n.detail }); this.dispatchEvent(r); }); } selectConnectivity(t) { var n; if ((n = this.cyg) != null && n.cy) { let r = ""; this.cyg.cy.elements().forEach((o) => { const a = o.data("label"), i = Sy(a); Hle(t, i) && (r = o.id()); }), r && this.cyg.cy.$id(r).select(); } } clearConnectivity() { var t; (t = this.cyg) != null && t.cy && (this.cyg.cy.remove(), this.cyg.cy = null); } reset() { var t; (t = this.cyg) != null && t.cy && this.cyg.cy.reset(); } zoom(t) { var n; if ((n = this.cyg) != null && n.cy) { const r = this.cyg.cy.zoom(), o = this.cyg.cy.width(), a = this.cyg.cy.height(), i = { x: o / 2, y: a / 2 }; this.cyg.cy.zoom({ level: r + t, renderedPosition: i }); } } enableZoom(t) { var n; (n = this.cyg) != null && n.cy && this.cyg.cy.userZoomingEnabled(t); } get elements() { return [ ...this.nodes.map((t) => ({ data: t })), ...this.edges.map((t) => ({ data: t })) ]; } get roots() { return [ ...this.dendrites, ...this.somas ]; } async graphNode(t) { const n = JSON.stringify(t), r = [t[0], ...t[1]], o = []; for (const i of r) { const s = this.labelCache.has(i) ? this.labelCache.get(i) : ""; o.push(s); } r.push(...o); const a = { id: n, label: r.join(` `) }; return this.axons.includes(n) ? this.dendrites.includes(n) || this.somas.includes(n) ? a["both-a-d"] = !0 : a.axon = !0 : (this.dendrites.includes(n) || this.somas.includes(n)) && (a.dendrite = !0), a; } on(t, n) { this.addEventListener(t, n); } }; const Ble = "#8300bf", zle = "#f3ecf6", Vle = [ { selector: "node", style: { label: function(e) { return jle(e.data("label")); }, // 'background-color': '#80F0F0', "background-color": "transparent", "background-opacity": "0", "text-valign": "center", "text-wrap": "wrap", width: "80px", height: "80px", "text-max-width": "80px", "font-size": "6px", shape: "round-rectangle", "border-width": 1, "border-style": "solid", "border-color": "gray" } }, { selector: "node[axon]", style: { // 'background-color': 'green', shape: "round-diamond", width: "100px", height: "100px" } }, { selector: "node[dendrite]", style: { // 'background-color': 'red', shape: "ellipse" } }, { selector: "node[both-a-d]", style: { // 'background-color': 'gray', shape: "round-rectangle" } }, { selector: "edge", style: { width: 1, "line-color": "dimgray", "target-arrow-color": "dimgray", "target-arrow-shape": "triangle", "curve-style": "bezier" } }, { selector: "node.active", style: { "border-color": Ble, "background-color": zle, "background-opacity": 0.75 } } ]; function jle(e) { const t = e.split(` `), n = t.length / 2, r = t.slice(n); return zT(r.join(` `)); } function zT(e) { return e.split(` `).map((t) => t && t[0] >= "a" && t[0] <= "z" ? t.charAt(0).toUpperCase() + t.slice(1) : t).join(` `); } function Sy(e) { const t = e ? e.split(` `) : [], n = []; for (let r = 0; r < t.length / 2; r++) n.push({ id: t[r], label: t[r + t.length / 2] }); return n; } function Hle(e, t) { e.sort((n, r) => n.id < r.id ? -1 : n.id > r.id ? 1 : 0), t.sort((n, r) => n.id < r.id ? -1 : n.id > r.id ? 1 : 0); for (let n = 0; n < e.length; n++) if (JSON.stringify(e[n]) !== JSON.stringify(t[n])) return !1; return !0; } let Ule = class extends EventTarget { constructor(t, n) { var r; super(), Da(this, "cy"), Da(this, "tooltip"), this.cy = Hl({ container: n, elements: t.elements, layout: { name: "breadthfirst", circle: !1, roots: t.roots }, directed: !0, style: Vle, minZoom: 0.1, maxZoom: 10, wheelSensitivity: 0.4 }).on("mouseover", "node", this.overNode.bind(this)).on("mouseout", "node", this.exitNode.bind(this)).on("position", "node", this.moveNode.bind(this)), this.tooltip = document.createElement("div"), this.tooltip.className = "cy-graph-tooltip", this.tooltip.hidden = !0, (r = n == null ? void 0 : n.lastChild) == null || r.appendChild(this.tooltip); } remove() { this.cy && this.cy.destroy(); } checkRightBoundary(t) { var n; t + this.tooltip.offsetWidth >= ((n = this.tooltip.parentElement) == null ? void 0 : n.offsetWidth) && (this.tooltip.style.left = `${t - this.tooltip.offsetWidth}px`); } overNode(t) { const n = t.target.data(), { label: r } = n, o = Sy(r).map((a) => a.label + " (" + a.id + ")"); this.tooltip.innerText = zT(o.join(` `)), this.tooltip.style.left = `${t.renderedPosition.x}px`, this.tooltip.style.top = `${t.renderedPosition.y}px`, this.tooltip.style.maxWidth = "240px", this.tooltip.style.zIndex = 2, this.tooltip.hidden = !1, this.checkRightBoundary(t.renderedPosition.x), this.tapNode(t, !0); } moveNode(t) { const n = t.target; this.tooltip.style.left = `${n.renderedPosition().x}px`, this.tooltip.style.top = `${n.renderedPosition().y}px`, this.checkRightBoundary(n.renderedPosition().x); } exitNode(t) { this.tooltip.hidden = !0, this.tapNode(t, !1); } tapNode(t, n) { const r = t.target, o = r.data(); let { label: a } = o; n ? r.addClass("active") : (r.removeClass("active"), a = "", setTimeout(() => { r.unselect(); })); const i = Sy(a), s = new CustomEvent("tap-node", { detail: i }); this.dispatchEvent(s); } on(t, n) { this.addEventListener(t, n); } }; const qle = (e) => new Promise((t) => setTimeout(t, e)), Wle = 1.3, Gle = 24 * 60 * 60 * 1e3, Kle = "Reset position", L3 = "Lock zoom", Yle = "Unlock zoom", Xle = "Zoom in", Zle = "Zoom out", R3 = 0.25, Jle = "#8300bf", Qle = 3e3, eue = { name: "ConnectivityGraph", props: { /** * Entity to load its connectivity graph. */ entry: { type: String, default: "" }, mapServer: { type: String, default: "" }, selectedConnectivityData: { type: Array, default: [] } }, data: function() { return { loading: !0, connectivityGraph: null, selectedSource: "", pathList: [], schemaVersion: "", knowledgeByPath: /* @__PURE__ */ new Map(), labelledTerms: /* @__PURE__ */ new Set(), labelCache: /* @__PURE__ */ new Map(), resetLabel: Kle, zoomLockLabel: L3, zoomInLabel: Xle, zoomOutLabel: Zle, iconColor: Jle, zoomEnabled: !1, connectivityError: null, timeoutID: void 0, connectivityGraphContainer: null }; }, mounted() { this.updateTooltipContainer(), this.refreshCache(), this.loadCacheData(), this.run().then((e) => { this.showGraph(this.entry); }); }, methods: { updateTooltipContainer: function() { this.connectivityGraphContainer = this.$refs.connectivityGraphRef; }, loadCacheData: function() { const e = sessionStorage.getItem("connectivity-graph-source"), t = sessionStorage.getItem("connectivity-graph-labels"), n = sessionStorage.getItem("connectivity-graph-pathlist"), r = sessionStorage.getItem("connectivity-graph-schema-version"); if (e && (this.selectedSource = e), n && (this.pathList = JSON.parse(n)), t) { const o = JSON.parse(t); this.labelCache = new Map(Object.entries(o)); } r && (this.schemaVersion = r); }, removeAllCacheData: function() { [ "connectivity-graph-expiry", "connectivity-graph-source", "connectivity-graph-labels", "connectivity-graph-pathlist", "connectivity-graph-schema-version" ].forEach((e) => { sessionStorage.removeItem(e); }); }, refreshCache: function() { const e = sessionStorage.getItem("connectivity-graph-expiry"); (/* @__PURE__ */ new Date()).getTime() > e && this.removeAllCacheData(); }, updateCacheExpiry: function() { const e = (/* @__PURE__ */ new Date()).getTime() + Gle; sessionStorage.setItem("connectivity-graph-expiry", e); }, run: async function() { if (this.schemaVersion || (this.schemaVersion = await this.getSchemaVersion(), sessionStorage.setItem("connectivity-graph-schema-version", this.schemaVersion), this.updateCacheExpiry()), this.schemaVersion < Wle) { console.warn("No Server!"); return; } this.showSpinner(), this.selectedSource || (this.selectedSource = await this.setSourceList(), sessionStorage.setItem("connectivity-graph-source", this.selectedSource), this.updateCacheExpiry()), await this.setPathList(this.selectedSource), this.hideSpinner(); }, showGraph: async function(e) { const t = this.$refs.graphCanvas; this.showSpinner(), this.connectivityGraph = new Nle(this.labelCache, t), await this.connectivityGraph.addConnectivity(this.knowledgeByPath.get(e)), this.hideSpinner(), this.connectivityGraph.showConnectivity(t), this.selectedConnectivityData.length && this.connectivityGraph.selectConnectivity(this.selectedConnectivityData), this.connectivityGraph.on("tap-node", (n) => { const r = n.detail; this.$emit("tap-node", r); }); }, query: async function(e, t) { const n = `${this.mapServer}knowledge/query/`, r = { sql: e, params: t }; try { const o = await fetch(n, { method: "POST", headers: { Accept: "application/json; charset=utf-8", "Cache-Control": "no-store", "Content-Type": "application/json" }, body: JSON.stringify(r) }); if (!o.ok) throw new Error(`Cannot access ${n}`); return await o.json(); } catch { return { values: [] }; } }, setSourceList: async function() { const e = await this.getJsonData(`${this.mapServer}knowledge/sources`), t = e ? e.sources || [] : []; let n = ""; for (const r of t) r && n === "" && (n = r); return n; }, loadPathData: async function(e) { const t = await this.query( `select entity, knowledge from knowledge where entity like 'ilxtr:%' and source=? order by entity`, [e] ); return t ? t.values : []; }, setPathList: async function(e) { this.pathList.length || (this.pathList = await this.loadPathData(e), sessionStorage.setItem("connectivity-graph-pathlist", JSON.stringify(this.pathList)), this.updateCacheExpiry()), this.knowledgeByPath.clear(), this.labelledTerms = /* @__PURE__ */ new Set(); for (const [t, n] of this.pathList) { const r = JSON.parse(n); "connectivity" in r && (this.knowledgeByPath.set(t, r), this.cacheLabels(r)); } return this.labelCache.size || await this.getCachedTermLabels(), ""; }, getSchemaVersion: async function() { const e = await this.getJsonData(`${this.mapServer}knowledge/schema-version`); return e && +e.version || 0; }, getJsonData: async function(e) { try { const t = await fetch(e, { method: "GET", headers: { Accept: "application/json; charset=utf-8", "Cache-Control": "no-store", "Content-Type": "application/json" } }); return t.ok || console.error(`Cannot access ${e}`), await t.json(); } catch { return null; } }, getCachedTermLabels: async function() { if (this.labelledTerms.size) { const e = await this.query( `select entity, knowledge from knowledge where entity in (?${", ?".repeat(this.labelledTerms.size - 1)}) order by source desc`, [...this.labelledTerms.values()] ); let t = null; for (const [r, o] of e.values) if (r !== t) { const a = JSON.parse(o); this.labelCache.set(r, a.label || r), t = r; } const n = Object.fromEntries(this.labelCache); sessionStorage.setItem("connectivity-graph-labels", JSON.stringify(n)), this.updateCacheExpiry(); } }, cacheNodeLabels: function(e) { for (const t of [e[0], ...e[1]]) this.labelledTerms.add(t); }, cacheLabels: async function(e) { for (const t of e.connectivity) this.cacheNodeLabels(t[0]), this.cacheNodeLabels(t[1]); }, showSpinner: function() { this.loading = !0; }, hideSpinner: function() { this.loading = !1; }, reset: function() { this.connectivityGraph.reset(); }, zoomIn: function() { this.connectivityGraph.zoom(R3); }, zoomOut: function() { this.connectivityGraph.zoom(-R3); }, /** * Enable/disable user zoom for scrolling */ toggleZoom: function() { this.zoomEnabled = !this.zoomEnabled, this.zoomLockLabel = this.zoomEnabled ? Yle : L3, this.connectivityGraph.enableZoom(!this.zoomEnabled); }, showErrorMessage: function(e) { this.connectivityError = { ...e }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => { this.connectivityError = null; }, Qle); } } }, tue = { class: "connectivity-graph", ref: "connectivityGraphRef" }, nue = { ref: "graphCanvas", class: "graph-canvas" }, rue = { class: "control-panel control-panel-tools" }, oue = { class: "visually-hidden" }, aue = { class: "visually-hidden" }, iue = { class: "visually-hidden" }, sue = { class: "visually-hidden" }, lue = /* @__PURE__ */ UL('
Origin
Components
Destination
', 1), uue = { key: 0, class: "connectivity-graph-error" }, cue = { key: 0 }; function due(e, t, n, r, o, a) { const i = JG, s = gr, l = ka, u = af, c = bK, d = xK, f = _K, h = OK, p = O2; return Ne((E(), L("div", tue, [ B("div", nue, null, 512), B("div", rue, [ B("div", { class: V(["tools", { "zoom-locked": e.zoomEnabled }]) }, [ W(u, { content: e.resetLabel, placement: "top", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: R(() => [ W(l, { class: "control-button", size: "small", onClick: a.reset }, { default: R(() => [ W(s, { color: "white" }, { default: R(() => [ W(i) ]), _: 1 }), B("span", oue, me(e.resetLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]), W(u, { content: e.zoomLockLabel, placement: "top", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: R(() => [ W(l, { class: "control-button", size: "small", onClick: a.toggleZoom }, { default: R(() => [ W(s, { color: "white" }, { default: R(() => [ e.zoomEnabled ? (E(), Q(c, { key: 0 })) : (E(), Q(d, { key: 1 })) ]), _: 1 }), B("span", aue, me(e.zoomLockLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]), W(u, { content: e.zoomInLabel, placement: "left", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: R(() => [ W(l, { class: "control-button", size: "small", onClick: a.zoomIn }, { default: R(() => [ W(s, { color: "white" }, { default: R(() => [ W(f) ]), _: 1 }), B("span", iue, me(e.zoomInLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]), W(u, { content: e.zoomOutLabel, placement: "left", effect: "control-tooltip", teleported: !0, "append-to": e.connectivityGraphContainer }, { default: R(() => [ W(l, { class: "control-button", size: "small", onClick: a.zoomOut }, { default: R(() => [ W(s, { color: "white" }, { default: R(() => [ W(h) ]), _: 1 }), B("span", sue, me(e.zoomOutLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content", "append-to"]) ], 2) ]), lue, e.connectivityError ? (E(), L("div", uue, [ e.connectivityError.errorConnectivities ? (E(), L("strong", cue, me(e.connectivityError.errorConnectivities), 1)) : Z("", !0), Ae(" " + me(e.connectivityError.errorMessage), 1) ])) : Z("", !0) ])), [ [p, e.loading] ]); } const pue = /* @__PURE__ */ Ea(eue, [["render", due], ["__scopeId", "data-v-14856fe8"]]), fue = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, hue = { name: "ConnectionDialog", props: { connectionEntry: { type: Object, default: {} }, inDrawing: { type: Boolean, default: !1 }, connectionExist: { type: Boolean, default: !1 } }, data: function() { return { tooltipId: void 0 }; }, methods: { shadowDisplay: function(e) { return this.tooltipId === e ? "always" : "hover"; }, capitalize: function(e) { return fue(e); }, handleTooltip: function(e) { this.tooltipId = this.tooltipId === e ? void 0 : e, this.$emit("featureTooltip", this.tooltipId); } } }, ew = (e) => (Tr("data-v-1ddab772"), e = e(), Or(), e), vue = { class: "dialog-container" }, gue = /* @__PURE__ */ ew(() => /* @__PURE__ */ B("span", { class: "dialog-title" }, "Finalize drawing", -1)), mue = /* @__PURE__ */ ew(() => /* @__PURE__ */ B("span", { class: "dialog-title" }, "Visualize connection", -1)), yue = /* @__PURE__ */ ew(() => /* @__PURE__ */ B("b", null, [ /* @__PURE__ */ B("span", null, "Related Features") ], -1)), bue = { class: "connection-label" }; function wue(e, t, n, r, o, a) { const i = ka, s = rg, l = sf, u = og, c = mJ; return E(), L("div", vue, [ W(s, null, { default: R(() => [ W(l, null, { default: R(() => [ n.inDrawing ? (E(), Q(s, { key: 0 }, { default: R(() => [ gue, W(i, { type: "primary", plain: "", onClick: t[0] || (t[0] = (d) => e.$emit("confirmDrawn", !0)) }, { default: R(() => [ Ae(" Confirm ") ]), _: 1 }), W(i, { type: "primary", plain: "", onClick: t[1] || (t[1] = (d) => e.$emit("cancelDrawn", !0)) }, { default: R(() => [ Ae(" Cancel ") ]), _: 1 }) ]), _: 1 })) : (E(), Q(s, { key: 1 }, { default: R(() => [ mue, W(i, { type: "primary", plain: "", onClick: t[2] || (t[2] = (d) => e.$emit("dialogDisplay", !1)) }, { default: R(() => [ Ae(" Close ") ]), _: 1 }) ]), _: 1 })) ]), _: 1 }) ]), _: 1 }), n.connectionExist ? (E(), Q(s, { key: 0 }, { default: R(() => [ W(l, null, { default: R(() => [ yue, (E(!0), L(De, null, xt(n.connectionEntry, (d, f) => (E(), Q(s, { key: f }, { default: R(() => [ W(c, { shadow: a.shadowDisplay(f), onClick: (h) => a.handleTooltip(f) }, { default: R(() => [ W(u, { trigger: "hover", disabled: d.label.length < 20, width: 200, content: a.capitalize(d.label) }, { reference: R(() => [ B("span", bue, me(a.capitalize(d.label)), 1) ]), _: 2 }, 1032, ["disabled", "content"]) ]), _: 2 }, 1032, ["shadow", "onClick"]) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 })) : Z("", !0) ]); } const xue = /* @__PURE__ */ Ea(hue, [["render", wue], ["__scopeId", "data-v-1ddab772"]]), VT = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, kue = ["xlink:href"], Cue = { __name: "SvgIcon", props: { /** * The svg icon to show. */ icon: { type: String, required: !0 }, /** * The option to spin the icon. */ spin: { type: Boolean, default: !1 } }, setup(e) { return (t, n) => (E(), L("svg", { class: V(["map-icon", { "map-icon-spin": e.spin }]) }, [ B("use", { "xlink:href": `#${e.icon}` }, null, 8, kue) ], 2)); } }, Sue = /* @__PURE__ */ VT(Cue, [["__scopeId", "data-v-e172d5ff"]]), jT = ` 2horpanel ? `, HT = ` 2vertpanel ? `, UT = ` 3panel ? `, qT = ` 4panel ? `, WT = ` 2horpanel ? `, GT = ` 2horpanel ? `, KT = ` 4panel ? `, YT = ` changeBckgd `, XT = ` close no bk `, ZT = ` close `, JT = ` closeFullScreen `, QT = ` Comment `, eO = ` Connection `, tO = ` dock `, nO = ` drawLine `, rO = ` drawPoint `, oO = ` drawPolygon `, aO = ` drawTrash `, iO = ` fitWindow `, sO = ` fullScreen `, lO = 'DataPortal-Icons', uO = ` magnifyingGlass `, cO = `Created by Wahyu Prihantorofrom the Noun Project`, dO = ` openMap `, pO = ` Artboard Copy 6 `, fO = ` permalink `, hO = ` play `, vO = ` resetZoom `, gO = ` singlepanel ? `, mO = ` tooltips ? `, yO = ` undock `, bO = ` zoomIn `, wO = ` zoomOut `, xO = (e, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, o.map((u) => { const c = s.querySelector(u); c && c.remove(); }), a.map((u) => { s.querySelector("svg").removeAttribute(u); }), r && i.map((u) => { Object.values(s.querySelectorAll(`[${u}]`)).map((c) => { c.removeAttribute(u); }); }); const l = s.innerHTML; return s = null, l; }, kO = (e) => [ // Remove XML stuffs and comments [/<\?xml[\s\S]*?>/gi, ""], [//gi, ""], [//gi, ""], // SVG XML -> HTML5 [/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>"], // convert self-closing XML SVG nodes to explicitly closed HTML5 SVG nodes [/\s+/g, " "], // replace whitespace sequences with a single space [/\> \<"] // remove whitespace between tags ].reduce((t, n) => "".replace.apply(t, n), e).trim(), Eue = !0, $ue = !0, _ue = ["fill"], D3 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": jT, "/assets/icons/2vertpanel.svg": HT, "/assets/icons/3panel.svg": UT, "/assets/icons/4panel.svg": qT, "/assets/icons/5panel.svg": WT, "/assets/icons/6panel.svg": GT, "/assets/icons/6panelVertical.svg": KT, "/assets/icons/changeBckgd.svg": YT, "/assets/icons/close-no-bk.svg": XT, "/assets/icons/close.svg": ZT, "/assets/icons/closeFullScreen.svg": JT, "/assets/icons/comment.svg": QT, "/assets/icons/connection.svg": eO, "/assets/icons/dock.svg": tO, "/assets/icons/drawLine.svg": nO, "/assets/icons/drawPoint.svg": rO, "/assets/icons/drawPolygon.svg": oO, "/assets/icons/drawTrash.svg": aO, "/assets/icons/fitWindow.svg": iO, "/assets/icons/fullScreen.svg": sO, "/assets/icons/help.svg": lO, "/assets/icons/magnifyingGlass.svg": uO, "/assets/icons/noun-filter.svg": cO, "/assets/icons/openMap.svg": dO, "/assets/icons/pause.svg": pO, "/assets/icons/permalink.svg": fO, "/assets/icons/play.svg": hO, "/assets/icons/resetZoom.svg": vO, "/assets/icons/singlepanel.svg": gO, "/assets/icons/tooltips.svg": mO, "/assets/icons/undock.svg": yO, "/assets/icons/zoomIn.svg": bO, "/assets/icons/zoomOut.svg": wO }), Tue = Object.keys(D3).map((e) => { const t = xO(D3[e], Eue, $ue, _ue), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return kO(t).replace("", "symbol>"); }); Tue.join(` `); const Ey = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": jT, "/assets/icons/2vertpanel.svg": HT, "/assets/icons/3panel.svg": UT, "/assets/icons/4panel.svg": qT, "/assets/icons/5panel.svg": WT, "/assets/icons/6panel.svg": GT, "/assets/icons/6panelVertical.svg": KT, "/assets/icons/changeBckgd.svg": YT, "/assets/icons/close-no-bk.svg": XT, "/assets/icons/close.svg": ZT, "/assets/icons/closeFullScreen.svg": JT, "/assets/icons/comment.svg": QT, "/assets/icons/connection.svg": eO, "/assets/icons/dock.svg": tO, "/assets/icons/drawLine.svg": nO, "/assets/icons/drawPoint.svg": rO, "/assets/icons/drawPolygon.svg": oO, "/assets/icons/drawTrash.svg": aO, "/assets/icons/fitWindow.svg": iO, "/assets/icons/fullScreen.svg": sO, "/assets/icons/help.svg": lO, "/assets/icons/magnifyingGlass.svg": uO, "/assets/icons/noun-filter.svg": cO, "/assets/icons/openMap.svg": dO, "/assets/icons/pause.svg": pO, "/assets/icons/permalink.svg": fO, "/assets/icons/play.svg": hO, "/assets/icons/resetZoom.svg": vO, "/assets/icons/singlepanel.svg": gO, "/assets/icons/tooltips.svg": mO, "/assets/icons/undock.svg": yO, "/assets/icons/zoomIn.svg": bO, "/assets/icons/zoomOut.svg": wO }), Oue = Object.keys(Ey).map((e) => { const t = xO(Ey[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return kO(t).replace("", "symbol>"); }), Fue = { name: "MapSvgSpriteColor", svgContext: Ey, svgSprite: Oue.join(` `) // concatenate all symbols into $options.svgSprite }, Iue = ["innerHTML"]; function Aue(e, t, n, r, o, a) { return E(), L("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, Iue); } const Pue = /* @__PURE__ */ VT(Fue, [["render", Aue]]), Lue = (e, t) => { let n, r, o, a, i, s; t.style.left = "", t.style.top = "", t.addEventListener( "mousedown", (u) => { u.preventDefault(), n = t.offsetLeft, r = t.offsetTop, o = u.clientX, a = u.clientY, t.addEventListener("mousemove", l, !1), document.addEventListener( "mouseup", () => { t.removeEventListener("mousemove", l, !1); }, !1 ); }, !1 ); function l(u) { u.preventDefault(), i = n - (o - u.clientX), s = r - (a - u.clientY), t.style.left = `${i}px`, t.style.top = `${s}px`; } }, Rue = { name: "DrawToolbar", components: { MapSvgIcon: Sue, MapSvgSpriteColor: Pue }, props: { /** * Optional * * Associated with the Connection dialog. * This is needed to display the dialog and provides the additional drag capability to the dialog. * * e.g. * :mapCanvas="{ * containerHTML: appRef, // Reference to the map canvas container. * class: '.maplibregl-canvas', // CSS selector for the map canvas. * }" */ mapCanvas: { type: Object, default: void 0 }, /** * Array of toolbar options to display. * 'Connection' requires 'LineString' is included in the toolbar options. */ toolbarOptions: { type: Array, default: [ "Edit", "Delete", "Point", "LineString", "Polygon", "Connection" ] }, /** * Optional * * To update the toolbar icons or filter the features based on the tool type. * e.g. "All tools", "Point", "LineString", "Polygon" or "None". */ drawnType: { type: String, default: "All tools" }, activeDrawTool: { required: !0 }, activeDrawMode: { required: !0 }, /** * Optional * * Associated with the Connection dialog. * This will popup a dialog if new feature is drawn and map canvas exists. */ newlyDrawnEntry: { type: Object, default: {} }, /** * Optional * * Associated with the Connection dialog. * This will add entries to the dialog. */ connectionEntry: { type: Object, default: {} }, /** * Add following to the top hoverVisibilities array to enable tooltips for each icon. * [ * { value: false, refs: 'toolbarPopover', ref: 'editPopover' }, * { value: false, refs: 'toolbarPopover', ref: 'deletePopover' }, * { value: false, refs: 'toolbarPopover', ref: 'pointPopover' }, * { value: false, refs: 'toolbarPopover', ref: 'lineStringPopover' }, * { value: false, refs: 'toolbarPopover', ref: 'polygonPopover' }, * { value: false, refs: 'toolbarPopover', ref: 'connectionPopover' }, * ] */ hoverVisibilities: { type: Array, required: !0, default: [ { value: !1, ref: "editPopover" }, { value: !1, ref: "deletePopover" }, { value: !1, ref: "pointPopover" }, { value: !1, ref: "lineStringPopover" }, { value: !1, ref: "polygonPopover" }, { value: !1, ref: "connectionPopover" } ] } }, data: function() { return { toolbarIcons: [ { name: "Edit", active: !1, disabled: !1, type: "mode" }, { name: "Delete", active: !1, disabled: !1, type: "mode" }, { name: "Point", active: !1, disabled: !1, type: "tool" }, { name: "LineString", active: !1, disabled: !1, type: "tool" }, { name: "Polygon", active: !1, disabled: !1, type: "tool" }, { name: "Connection", active: !1, disabled: !0, type: "conn" } ], connectionDisplay: !1, dialogPosition: { offsetX: 0, offsetY: 0, x: void 0, y: void 0 } }; }, computed: { showAllToolIcons: function() { return this.drawnType === "All tools" || this.drawnType === "None"; }, showEditModeIcon: function() { return this.toolbarOptions.includes("Edit"); }, showDeleteModeIcon: function() { return this.toolbarOptions.includes("Delete"); }, showDrawPointIcon: function() { return this.toolbarOptions.includes("Point") && (this.showAllToolIcons || this.drawnType === "Point"); }, showDrawLineStringIcon: function() { return this.toolbarOptions.includes("LineString") && (this.showAllToolIcons || this.drawnType === "LineString"); }, showDrawPolygonIcon: function() { return this.toolbarOptions.includes("Polygon") && (this.showAllToolIcons || this.drawnType === "Polygon"); }, showConnectionIcon: function() { return this.toolbarOptions.includes("Connection") && this.toolbarOptions.includes("LineString") && (this.showAllToolIcons || this.drawnType === "LineString"); }, inDrawing: function() { return this.activeDrawTool !== void 0; }, newlyDrawnExist: function() { return Object.keys(this.newlyDrawnEntry).length > 0; }, connectionExist: function() { return Object.keys(this.connectionEntry).length > 0; } }, watch: { drawnType: function() { this.disabledToolbarConnectionIcon(!0); }, activeDrawMode: function(e) { this.updateToolbarIcons(e, "mode"), e === "Delete" && (this.connectionDisplay = !1); }, activeDrawTool: function(e) { this.updateToolbarIcons(e, "tool"), e || (this.connectionDisplay = !1); }, newlyDrawnExist: function(e) { e && (this.connectionDisplay = !0); }, connectionExist: function(e) { this.disabledToolbarConnectionIcon(!e), e || (this.connectionDisplay = !1); }, connectionDisplay: function(e) { this.activeToolbarConnectionIcon(e), e ? this.dialogCssHacks() : this.$emit("featureTooltip", void 0); }, dialogPosition: { handler: function() { const e = this.$el.getBoundingClientRect(); this.dialogPosition.offsetX = e.x, this.dialogPosition.offsetY = e.y; }, deep: !0, once: !0 } }, methods: { iconDisabled: function(e) { return this.toolbarIcons.filter((t) => t.name === e)[0].disabled; }, modeClickEvent: function(e) { if (!this.iconDisabled(e)) { const t = this.activeDrawMode === e ? void 0 : e; this.$emit("clickToolbar", "mode", t); } }, toolClickEvent: function(e) { if (!this.iconDisabled(e)) { const t = this.activeDrawTool === e ? void 0 : e; this.$emit("clickToolbar", "tool", t); } }, connectionClickEvent: function() { !this.iconDisabled("Connection") && !this.newlyDrawnExist && (this.connectionDisplay = !this.connectionDisplay); }, updateToolbarIcons: function(e, t) { this.toolbarIcons.map((n) => { n.name === e ? n.active = !0 : n.active = !1; }), this.toolbarIcons.filter((n) => n.type !== "conn").filter((n) => n.type !== t).map((n) => { e ? n.disabled = !0 : n.disabled = !1; }), this.toolbarCssHacks(); }, disabledToolbarConnectionIcon: function(e) { this.toolbarIcons.filter((t) => t.type === "conn").map((t) => { e ? t.disabled = !0 : t.disabled = !1, this.activeDrawMode === "Delete" && (t.disabled = !0); }), this.toolbarCssHacks(); }, activeToolbarConnectionIcon: function(e) { this.toolbarIcons.filter((t) => t.type === "conn").map((t) => { e ? t.active = !0 : t.active = !1; }), this.toolbarCssHacks(); }, toolbarCssHacks: function() { this.$nextTick(() => { this.toolbarIcons.map((e) => { const t = this.$el.querySelector(`.draw${e.name}`); t && (e.active ? t.classList.add("active") : t.classList.remove("active"), e.disabled ? t.classList.add("disabled") : t.classList.remove("disabled")); }); }); }, dialogCssHacks: function() { this.$nextTick(() => { const e = this.$el.querySelector(".connection-dialog"); Lue(this.mapCanvas.containerHTML, e); let t, n; const r = this.mapCanvas.containerHTML.getBoundingClientRect(), o = e.getBoundingClientRect(); this.dialogPosition.x > r.width / 2 ? t = this.dialogPosition.x - o.width : t = this.dialogPosition.x, this.dialogPosition.y > r.height / 2 ? n = this.dialogPosition.y - o.height : n = this.dialogPosition.y, e.style.transform = `translate(${t - this.dialogPosition.offsetX}px, ${n - this.dialogPosition.offsetY}px)`; }); }, hoverIndex: function(e) { return this.hoverVisibilities.findIndex((t) => t.ref === e); }, showTooltip: function(e) { this.$emit("showTooltip", e); }, hideTooltip: function(e) { this.$emit("hideTooltip", e); }, dialogPopUpPositionHandler: function(e) { e.preventDefault(), this.dialogPosition.x = e.clientX, this.dialogPosition.y = e.clientY, this.activeDrawTool === "Point" && this.dialogCssHacks(); } }, mounted: function() { this.$nextTick(() => { this.toolbarCssHacks(), this.mapCanvas && this.mapCanvas.containerHTML.querySelector(this.mapCanvas.class).addEventListener("click", this.dialogPopUpPositionHandler, !1); }); }, destroyed: function() { this.mapCanvas && this.mapCanvas.containerHTML.querySelector(this.mapCanvas.class).removeEventListener("click", this.dialogPopUpPositionHandler, !1); } }, Due = { class: "toolbar-container" }, Mue = { class: "toolbar-icons" }; function Nue(e, t, n, r, o, a) { const i = Xe("map-svg-sprite-color"), s = Xe("map-svg-icon"), l = og, u = xue; return E(), L("div", Due, [ W(i), B("div", Mue, [ a.showEditModeIcon ? (E(), Q(l, { key: 0, content: "Edit Mode", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[a.hoverIndex("editPopover")].value, ref: "editPopover" }, { reference: R(() => [ W(s, { icon: "comment", class: "icon-button drawEdit", onClick: t[0] || (t[0] = (c) => a.modeClickEvent("Edit")), onMouseover: t[1] || (t[1] = (c) => a.showTooltip(a.hoverIndex("editPopover"))), onMouseout: t[2] || (t[2] = (c) => a.hideTooltip(a.hoverIndex("editPopover"))) }) ]), _: 1 }, 8, ["visible"])) : Z("", !0), a.showDeleteModeIcon ? (E(), Q(l, { key: 1, content: "Delete Mode", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[a.hoverIndex("deletePopover")].value, ref: "deletePopover" }, { reference: R(() => [ W(s, { icon: "drawTrash", class: "icon-button drawDelete", onClick: t[3] || (t[3] = (c) => a.modeClickEvent("Delete")), onMouseover: t[4] || (t[4] = (c) => a.showTooltip(a.hoverIndex("deletePopover"))), onMouseout: t[5] || (t[5] = (c) => a.hideTooltip(a.hoverIndex("deletePopover"))) }) ]), _: 1 }, 8, ["visible"])) : Z("", !0), a.showDrawPointIcon ? (E(), Q(l, { key: 2, content: "Draw Point", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[a.hoverIndex("pointPopover")].value, ref: "pointPopover" }, { reference: R(() => [ W(s, { icon: "drawPoint", class: "icon-button drawPoint", onClick: t[6] || (t[6] = (c) => a.toolClickEvent("Point")), onMouseover: t[7] || (t[7] = (c) => a.showTooltip(a.hoverIndex("pointPopover"))), onMouseout: t[8] || (t[8] = (c) => a.hideTooltip(a.hoverIndex("pointPopover"))) }) ]), _: 1 }, 8, ["visible"])) : Z("", !0), a.showDrawLineStringIcon ? (E(), Q(l, { key: 3, content: "Draw LineString", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[a.hoverIndex("lineStringPopover")].value, ref: "drawLinePopover" }, { reference: R(() => [ W(s, { icon: "drawLine", class: "icon-button drawLineString", onClick: t[9] || (t[9] = (c) => a.toolClickEvent("LineString")), onMouseover: t[10] || (t[10] = (c) => a.showTooltip(a.hoverIndex("lineStringPopover"))), onMouseout: t[11] || (t[11] = (c) => a.hideTooltip(a.hoverIndex("lineStringPopover"))) }) ]), _: 1 }, 8, ["visible"])) : Z("", !0), a.showDrawPolygonIcon ? (E(), Q(l, { key: 4, content: "Draw Polygon", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[a.hoverIndex("polygonPopover")].value, ref: "polygonPopover" }, { reference: R(() => [ W(s, { icon: "drawPolygon", class: "icon-button drawPolygon", onClick: t[12] || (t[12] = (c) => a.toolClickEvent("Polygon")), onMouseover: t[13] || (t[13] = (c) => a.showTooltip(a.hoverIndex("polygonPopover"))), onMouseout: t[14] || (t[14] = (c) => a.hideTooltip(a.hoverIndex("polygonPopover"))) }) ]), _: 1 }, 8, ["visible"])) : Z("", !0), a.showConnectionIcon ? (E(), Q(l, { key: 5, content: "Connectivity", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[a.hoverIndex("connectionPopover")].value, ref: "connectionPopover" }, { reference: R(() => [ W(s, { icon: "connection", class: "icon-button drawConnection", onClick: t[15] || (t[15] = (c) => a.connectionClickEvent()), onMouseover: t[16] || (t[16] = (c) => a.showTooltip(a.hoverIndex("connectionPopover"))), onMouseout: t[17] || (t[17] = (c) => a.hideTooltip(a.hoverIndex("connectionPopover"))) }) ]), _: 1 }, 8, ["visible"])) : Z("", !0) ]), n.mapCanvas ? Ne((E(), Q(u, { key: 0, class: "connection-dialog", connectionEntry: n.connectionEntry, inDrawing: a.inDrawing, connectionExist: a.connectionExist, onDialogDisplay: t[18] || (t[18] = (c) => a.connectionClickEvent()), onConfirmDrawn: t[19] || (t[19] = (c) => e.$emit("confirmDrawn", c)), onCancelDrawn: t[20] || (t[20] = (c) => e.$emit("cancelDrawn", c)), onFeatureTooltip: t[21] || (t[21] = (c) => e.$emit("featureTooltip", c)) }, null, 8, ["connectionEntry", "inDrawing", "connectionExist"])), [ [ft, e.connectionDisplay] ]) : Z("", !0) ]); } const QIe = /* @__PURE__ */ Ea(Rue, [["render", Nue], ["__scopeId", "data-v-8a96a220"]]), Bue = { name: "HelpModeDialog", props: { /** * MultiFlatmapRef from multiflatmapvuer. Provide this when using with MultiFlatmap. */ multiflatmapRef: { type: Object, default: null }, /** * FlatmapRef from flatmapvuer. Provide this when using with Flatmap. */ flatmapRef: { type: Object, default: null }, /** * ScaffoldRef from scaffoldvuer. Provide this when using with Scaffold. */ scaffoldRef: { type: Object, default: null }, /** * The flag for last tooltip item. */ lastItem: { type: Boolean, default: !1, required: !1 } }, mounted: function() { this.toggleHelpModeHighlight(!0), this.toggleTooltipHighlight(); }, unmounted: function() { this.toggleHelpModeHighlight(!1); }, watch: { lastItem: function(e) { e && this.toggleTooltipHighlight(); } }, methods: { /** * This function will be called on clicking Next button. * * @public */ showNext: function() { this.$emit("show-next"); }, /** * This function will be called on clicking Finish button. * * @public */ finishHelpMode: function() { this.$emit("finish-help-mode"); }, /** * This function must be called on 'shown-map-tooltip' event. * * @public */ toggleTooltipPinHighlight: function() { const e = this.getCurrentFlatmap(); this.resetHighlightedItems(), this.$nextTick(() => { var t; const n = e.querySelectorAll(".maplibregl-marker"), r = e.querySelector( ".flatmap-popup-popper" ), o = ((t = r == null ? void 0 : r.style) == null ? void 0 : t.transform) || "", a = this.extractMarkerPosition(o); n.forEach((i) => { const s = i.style.transform; this.extractMarkerPosition(s) === a && i.classList.add("in-help-highlight"); }); }); }, /** * This function must be called on 'shown-tooltip' event. * * @public */ toggleTooltipHighlight: function() { this.resetHighlightedItems(), this.$nextTick(() => { document.querySelectorAll( '.el-popper:not([style*="none"])' ).forEach((e) => { const t = e.classList.contains("flatmap-popper"), n = e.classList.contains( "el-fade-in-linear-enter-active" ); (t || n) && this.toggleHighlight(e); }); }); }, toggleHighlight: function(e) { const t = (e == null ? void 0 : e.id) || "", n = document.querySelector( `[aria-describedby="${t}"]` ); n && n.classList.add("in-help-highlight"); }, resetHighlightedItems: function() { document.querySelectorAll(".in-help-highlight").forEach((e) => { e.classList.remove("in-help-highlight"); }); }, getCurrentScaffold: function() { var e; return ((e = this.scaffoldRef) == null ? void 0 : e.$el) || null; }, getCurrentMultiflatmap: function() { var e; return ((e = this.multiflatmapRef) == null ? void 0 : e.$el) || null; }, getCurrentFlatmap: function() { var e; const t = this.flatmapRef || ((e = this.multiflatmapRef) == null ? void 0 : e.getCurrentFlatmap()); return (t == null ? void 0 : t.$el) || null; }, toggleHelpModeHighlight: function(e) { const t = this.getCurrentMultiflatmap(), n = this.getCurrentFlatmap(), r = this.getCurrentScaffold(), o = document.querySelectorAll(".in-help-highlight"); t && (e ? t.classList.add("in-help") : t.classList.remove("in-help")), n && (e ? n.classList.add("in-help") : n.classList.remove("in-help")), r && (e ? r.classList.add("in-help") : r.classList.remove("in-help")), e || o.forEach((a) => { a.classList.remove("in-help-highlight"); }); }, /** * Temporary solution to find the position of map marker from popover */ extractMarkerPosition: function(e) { const t = /translate\((.*?)\)/g, n = e.match(t); return n ? n[n.length - 1].slice(10, -1) : ""; } } }, tw = (e) => (Tr("data-v-3efb89fb"), e = e(), Or(), e), zue = /* @__PURE__ */ tw(() => /* @__PURE__ */ B("h4", null, "Help Mode", -1)), Vue = /* @__PURE__ */ tw(() => /* @__PURE__ */ B("p", null, [ /* @__PURE__ */ Ae(" All caught up! "), /* @__PURE__ */ B("br"), /* @__PURE__ */ Ae(" Click 'Help' to restart. ") ], -1)), jue = /* @__PURE__ */ tw(() => /* @__PURE__ */ B("p", null, 'Click "Next" to see the next item.', -1)); function Hue(e, t, n, r, o, a) { const i = ka; return E(), L("div", { class: V(["help-mode-dialog", { finish: n.lastItem }]) }, [ zue, n.lastItem ? (E(), L(De, { key: 0 }, [ Vue, B("div", null, [ W(i, { class: "button", onClick: a.finishHelpMode }, { default: R(() => [ Ae(" Finish ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) : (E(), L(De, { key: 1 }, [ jue, B("div", null, [ W(i, { class: "button", onClick: a.showNext }, { default: R(() => [ Ae(" Next ") ]), _: 1 }, 8, ["onClick"]), W(i, { class: "button secondary", onClick: a.finishHelpMode }, { default: R(() => [ Ae(" Exit Help Mode ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) ], 2); } const eAe = /* @__PURE__ */ Ea(Bue, [["render", Hue], ["__scopeId", "data-v-3efb89fb"]]), Uue = "https://citation.doi.org", que = [ { label: "APA", value: "apa" }, { label: "Chicago", value: "chicago-note-bibliography" }, { label: "IEEE", value: "ieee" }, { label: "Bibtex", value: "bibtex" } ], t1 = "apa", Wue = 600, Gue = { name: "ExternalResourceCard", props: { resources: { type: Array, default: () => [] } }, data: function() { return { pubMedReferences: [], openLibReferences: [], isbnDBReferences: [], referecesListContent: "", citationOptions: que, citationType: t1, crosscite_host: Uue }; }, watch: { resources: function(e) { this.formatReferences([...e]), this.getCitationText(t1); } }, computed: { referencesWithDOI: function() { return this.pubMedReferences.filter((e) => e.type === "doi" || e.doi).length; } }, mounted: function() { this.formatReferences([...this.resources]), this.getCitationText(t1); }, methods: { formatReferences: function(e) { const t = this.extractNonPubMedReferences(e), n = e.filter((r) => !t.includes(r)); this.pubMedReferences = n.map( (r) => typeof r == "object" ? this.extractPublicationIdFromURLString(r[0]) : this.extractPublicationIdFromURLString(r) ), this.pubMedReferences.forEach((r) => { if (r.type === "pmc") { const o = r.id; this.searchPMID(o).then((a) => { if (a && a.esearchresult) { const i = a.esearchresult.idlist || []; r.id = i[0], r.type = "pmid"; } }); } }), this.formatNonPubMedReferences(t).then((r) => { this.openLibReferences = r.filter((o) => o.type === "openlib"), this.isbnDBReferences = r.filter((o) => o.type === "isbndb"), this.formatOpenLibReferences(); }); }, extractNonPubMedReferences: function(e) { const t = [], n = this.getPubMedDomains(); return e.forEach((r) => { let o = 0; n.forEach((a) => { r.includes(a) && o++; }), o || t.push(r); }), t; }, formatNonPubMedReferences: async function(e) { const t = [], n = e.filter((s) => s.indexOf("isbn") !== -1).map((s) => "ISBN:" + s.split("/").pop()), r = n.join(","), o = n.slice(), a = `https://openlibrary.org/api/books?bibkeys=${r}&format=json`, i = await this.fetchData(a); for (const s in i) { const l = o.indexOf(s); o.splice(l, 1); const u = i[s].info_url, c = u.split("/"), d = c.indexOf("books"), f = c[d + 1]; t.push({ id: s.split(":")[1], // Key => "ISBN:1234" type: "openlib", url: u, bookId: f }); } return o.forEach((s) => { const l = s.split(":")[1], u = `https://isbndb.com/book/${l}`; t.push({ id: l, url: u, type: "isbndb" }); }), t; }, extractPublicationIdFromURLString: function(e) { if (!e) return; const t = decodeURIComponent(e); let n = { id: "", type: "", citation: {} }; return this.getPubMedDomains().forEach((r) => { const o = t.lastIndexOf(r); o !== -1 && (n.id = t.slice(o + r.length), r === "doi.org/" ? n.type = "doi" : r === "pmc/articles/" ? n.type = "pmc" : n.type = "pmid"); }), n.id === "" && (e.includes("doi:") ? (n.id = this.stripPMIDPrefix(e), n.type = "doi") : e.includes("PMID:") && (n.id = this.stripPMIDPrefix(e), n.type = "pmid")), n.id.endsWith("/") && (n.id = n.id.slice(0, -1)), n; }, getPubMedDomains: function() { return [ "doi.org/", "nih.gov/pubmed/", "pmc/articles/", "pubmed.ncbi.nlm.nih.gov/" ]; }, stripPMIDPrefix: function(e) { return e.split(":")[1]; }, onCitationFormatChange: function(e) { this.citationType = e, this.getCitationText(e); }, generateCitationText: function(e, t) { const { id: n, type: r, doi: o } = e; if (!(e.citation && e.citation[t]) && n) if (e.citation[t] = "", e.citation.error = null, r === "doi" || o) { const a = r === "doi" ? n : o; this.getCitationTextByDOI(a).then((i) => { const s = this.replaceLinkInText(i); e.citation[t] = s, this.updateCopyContents(); }).catch((i) => { e.citation.error = { type: t, ref: "doi" }; }); } else r === "pmid" && this.getDOIFromPubMedID(n).then((a) => { if (a != null && a.result) { const i = a.result[n], s = ((i == null ? void 0 : i.articleids) || []).find((u) => u.idtype === "doi"), l = s == null ? void 0 : s.value; if (l) e.doi = l, this.getCitationTextByDOI(l).then((u) => { const c = this.replaceLinkInText(u); e.citation[t] = c, this.updateCopyContents(); }).catch((u) => { e.citation.error = { type: t, ref: "doi" }; }); else { const { title: u, pubdate: c, authors: d } = i, f = d ? d.map((p) => p.name) : [], h = this.formatCopyReference({ title: u || "", date: c || "", authors: f, url: `https://pubmed.ncbi.nlm.nih.gov/${n}` }); e.citation[t] = h, this.updateCopyContents(); } } }).catch((a) => { e.citation.error = { type: t, ref: "pubmed" }; }); }, getCitationText: function(e) { async function t(n) { for (let r = 0; r < n.pubMedReferences.length; r++) n.generateCitationText(n.pubMedReferences[r], e), n.pubMedReferences.length > 3 && r < n.pubMedReferences.length - 1 && await qle(Wue); } t(this); }, reloadCitation: function(e) { this.generateCitationText(e, this.citationType); }, updateCopyContents: function() { const e = this.citationOptions.find((r) => r.value === this.citationType); let t = ""; const n = []; if (this.referencesWithDOI && (t = e == null ? void 0 : e.label), this.pubMedReferences.forEach((r) => { n.push(r.citation[this.citationType]); }), this.openLibReferences.forEach((r) => { n.push(this.formatCopyReference(r)); }), this.isbnDBReferences.forEach((r) => { n.push(r.url); }), n.length) { const r = `
    ${n.map((a) => `
  • ${a}
  • `).join(` `)}
`, o = "
References
"; this.referecesListContent = o + ` ` + r; } this.$emit("references-loaded", { style: t, list: n }); }, replaceLinkInText: function(e) { const t = "https://"; let n = e.split(t)[1]; if (n) { n = n.split(" ")[0], n = n.trim(), n.endsWith(".") && (n = n.substring(0, n.length - 1)); const r = t + n, o = `${r}`; return e.replace(r, o); } return e; }, searchPMID: async function(e) { const t = `https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=${e}&format=json`; return await this.fetchData(t); }, getCitationTextByDOI: async function(e) { const t = `${this.crosscite_host}/format?doi=${e}&style=${this.citationType}&lang=en-US`; return await this.fetchData(t, "text"); }, getDOIFromPubMedID: async function(e) { const t = `https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=${e}&format=json`; return await this.fetchData(t); }, formatOpenLibReferences: function() { this.openLibReferences.forEach((e) => { const { bookId: t } = e; this.getBookData(t).then((n) => { const { title: r, authors: o, publish_date: a } = n; r && (e.title = r), a && (e.date = a), o && (e.authors = [], o.forEach((i) => { this.getBookAuthor(i.key).then((s) => { const { name: l } = s; l && (e.authors.push(l), this.updateCopyContents()); }); })), this.updateCopyContents(); }); }); }, getBookData: async function(e) { const t = `https://openlibrary.org/books/${e}.json`; return await this.fetchData(t); }, getBookAuthor: async function(e) { const t = `https://openlibrary.org${e}.json`; return await this.fetchData(t); }, formatCopyReference: function(e) { const t = [], { title: n, date: r, authors: o, url: a } = e; return n && t.push(n), r && t.push(`(${r})`), o && t.push(`- ${o.join(", ")}`), t.push(`
${a}
`), t.join(" "); }, fetchData: async function(e, t) { try { const n = await fetch(e); if (!n.ok) throw new Error(`Response status: ${n.status}`); return t === "text" ? await n.text() : await n.json(); } catch (n) { throw new Error(n); } } } }, lu = (e) => (Tr("data-v-e8282d9f"), e = e(), Or(), e), Kue = { class: "resource-container" }, Yue = { class: "attribute-title-container" }, Xue = /* @__PURE__ */ lu(() => /* @__PURE__ */ B("div", { class: "attribute-title" }, "References", -1)), Zue = { class: "copy-button" }, Jue = { key: 0, class: "citation-tabs" }, Que = { class: "citation-list" }, ece = /* @__PURE__ */ lu(() => /* @__PURE__ */ B("span", null, "Internal Server Error", -1)), tce = /* @__PURE__ */ lu(() => /* @__PURE__ */ B("br", null, null, -1)), nce = /* @__PURE__ */ lu(() => /* @__PURE__ */ B("br", null, null, -1)), rce = ["href"], oce = /* @__PURE__ */ lu(() => /* @__PURE__ */ B("br", null, null, -1)), ace = /* @__PURE__ */ lu(() => /* @__PURE__ */ B("span", null, "Sorry, something went wrong.", -1)), ice = /* @__PURE__ */ lu(() => /* @__PURE__ */ B("br", null, null, -1)), sce = ["onClick"], lce = ["innerHTML"], uce = ["innerHTML"], cce = ["href"]; function dce(e, t, n, r, o, a) { const i = Lc, s = ka; return E(), L("div", Kue, [ B("div", Yue, [ Xue, B("div", Zue, [ W(i, { label: "Copy list to clipboard", content: e.referecesListContent }, null, 8, ["content"]) ]) ]), a.referencesWithDOI ? (E(), L("div", Jue, [ (E(!0), L(De, null, xt(e.citationOptions, (l) => (E(), Q(s, { link: "", key: l.value, type: e.citationType === l.value ? "primary" : "", onClick: (u) => a.onCitationFormatChange(l.value) }, { default: R(() => [ Ae(me(l.label), 1) ]), _: 2 }, 1032, ["type", "onClick"]))), 128)) ])) : Z("", !0), B("ul", Que, [ (E(!0), L(De, null, xt(e.pubMedReferences, (l) => { var u, c, d, f; return E(), L("li", { key: l.id, class: V({ loading: l.citation && !l.citation.error && l.citation[e.citationType] === "" }) }, [ l.citation ? (E(), L(De, { key: 0 }, [ ((u = l.citation.error) == null ? void 0 : u.ref) === "doi" && ((c = l.citation.error) == null ? void 0 : c.type) === e.citationType ? (E(), L(De, { key: 0 }, [ ece, tce, Ae(" Sorry, something went wrong."), nce, Ae(" The dataset citation generator ("), B("a", { href: e.crosscite_host, target: "_blank" }, me(e.crosscite_host), 9, rce), Ae(") encountered an internal error and was unable to complete your request."), oce, Ae(" Please come back later. ") ], 64)) : ((d = l.citation.error) == null ? void 0 : d.ref) === "pubmed" && ((f = l.citation.error) == null ? void 0 : f.type) === e.citationType ? (E(), L(De, { key: 1 }, [ ace, ice, Ae(" Please try again. "), B("span", { class: "reload-button", onClick: (h) => a.reloadCitation(l) }, "Reload", 8, sce) ], 64)) : (E(), L(De, { key: 2 }, [ B("span", { innerHTML: l.citation[e.citationType] }, null, 8, lce), W(i, { content: l.citation[e.citationType] }, null, 8, ["content"]) ], 64)) ], 64)) : Z("", !0) ], 2); }), 128)), (E(!0), L(De, null, xt(e.openLibReferences, (l) => (E(), L("li", null, [ B("div", { innerHTML: a.formatCopyReference(l) }, null, 8, uce), W(i, { content: a.formatCopyReference(l) }, null, 8, ["content"]) ]))), 256)), (E(!0), L(De, null, xt(e.isbnDBReferences, (l) => (E(), L("li", null, [ B("a", { href: l.url, target: "_blank" }, me(l.url), 9, cce), W(i, { content: l.url }, null, 8, ["content"]) ]))), 256)) ]) ]); } const CO = /* @__PURE__ */ Ea(Gue, [["render", dce], ["__scopeId", "data-v-e8282d9f"]]); function pce(e) { return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) { var r = e.get(t); r ? r.push(n) : e.set(t, [n]); }, off: function(t, n) { var r = e.get(t); r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e.set(t, [])); }, emit: function(t, n) { var r = e.get(t); r && r.slice().map(function(o) { o(n); }), (r = e.get("*")) && r.slice().map(function(o) { o(t, n); }); } }; } const rv = new pce(), fce = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), hce = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, vce = { name: "ProvenancePopup", props: { tooltipEntry: { type: Object, default: () => ({ destinations: [], origins: [], components: [], destinationsWithDatasets: [], originsWithDatasets: [], componentsWithDatasets: [], resource: void 0 }) } }, inject: ["getFeaturesAlert"], data: function() { return { controller: void 0, activeSpecies: void 0, pubmedSearchUrl: "", loading: !1, showToolip: !1, showDetails: !1, originDescriptions: { motor: "is the location of the initial cell body of the circuit", sensory: "is the location of the initial cell body in the PNS circuit" }, componentsWithDatasets: [], uberons: [{ id: void 0, name: void 0 }] }; }, computed: { featuresAlert() { return this.getFeaturesAlert(); }, resources: function() { let e = []; return this.tooltipEntry && this.tooltipEntry.hyperlinks && (e = this.tooltipEntry.hyperlinks), e; }, originDescription: function() { return this.tooltipEntry && this.tooltipEntry.title && this.tooltipEntry.title.toLowerCase().includes("motor") ? this.originDescriptions.motor : this.originDescriptions.sensory; }, provSpeciesDescription: function() { let e = "Studied in"; return this.tooltipEntry.provenanceTaxonomyLabel.forEach((t) => { e += ` ${t},`; }), e = e.slice(0, -1), e += " species", e; } }, methods: { titleCase: function(e) { return fce(e); }, capitalise: function(e) { return hce(e); }, openUrl: function(e) { window.open(e, "_blank"); }, openAll: function() { rv.emit("onActionClick", { type: "Facets", labels: this.tooltipEntry.componentsWithDatasets.map((e) => e.name) }); }, openAxons: function() { rv.emit("onActionClick", { type: "Facets", labels: this.tooltipEntry.destinationsWithDatasets.map((e) => e.name) }); }, openDendrites: function() { rv.emit("onActionClick", { type: "Facets", labels: this.tooltipEntry.originsWithDatasets.map((e) => e.name) }); }, pubmedSearchUrlUpdate: function(e) { this.pubmedSearchUrl = e; } } }, qc = (e) => (Tr("data-v-3d217adc"), e = e(), Or(), e), gce = { key: 0, class: "main" }, mce = { key: 0, class: "block" }, yce = { class: "title" }, bce = { key: 0, class: "subtitle" }, wce = { key: 1, class: "block" }, xce = { class: "title" }, kce = { key: 2, class: "attribute-title-container" }, Cce = /* @__PURE__ */ qc(() => /* @__PURE__ */ B("span", { class: "attribute-title" }, "Alert", -1)), Sce = { style: { "word-break": "keep-all" } }, Ece = { class: "content-container scrollbar" }, $ce = { key: 0, class: "block" }, _ce = { class: "attribute-title-container" }, Tce = /* @__PURE__ */ qc(() => /* @__PURE__ */ B("span", { class: "attribute-title" }, "Origin", -1)), Oce = { style: { "word-break": "keep-all" } }, Fce = /* @__PURE__ */ qc(() => /* @__PURE__ */ B("i", null, "Origin", -1)), Ice = ["origin-item-label"], Ace = { key: 0, class: "separator" }, Pce = { key: 1, class: "block" }, Lce = /* @__PURE__ */ qc(() => /* @__PURE__ */ B("div", { class: "attribute-title-container" }, [ /* @__PURE__ */ B("div", { class: "attribute-title" }, "Components") ], -1)), Rce = ["component-item-label"], Dce = { key: 0, class: "separator" }, Mce = { key: 2, class: "block" }, Nce = { class: "attribute-title-container" }, Bce = /* @__PURE__ */ qc(() => /* @__PURE__ */ B("span", { class: "attribute-title" }, "Destination", -1)), zce = /* @__PURE__ */ qc(() => /* @__PURE__ */ B("span", { style: { "word-break": "keep-all" } }, [ /* @__PURE__ */ B("i", null, "Destination"), /* @__PURE__ */ Ae(" is where the axons terminate ") ], -1)), Vce = ["destination-item-label"], jce = { key: 0, class: "separator" }; function Hce(e, t, n, r, o, a) { const i = EK, s = gr, l = og, u = J_, c = Z0, d = ka, f = CO, h = O2; return n.tooltipEntry ? Ne((E(), L("div", gce, [ n.tooltipEntry.title ? (E(), L("div", mce, [ B("div", yce, me(a.capitalise(n.tooltipEntry.title)), 1), n.tooltipEntry.provenanceTaxonomyLabel && n.tooltipEntry.provenanceTaxonomyLabel.length > 0 ? (E(), L("div", bce, me(a.provSpeciesDescription), 1)) : Z("", !0) ])) : (E(), L("div", wce, [ B("div", xce, me(n.tooltipEntry.featureId), 1) ])), a.featuresAlert ? (E(), L("div", kce, [ Cce, W(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: R(() => [ W(s, { class: "info" }, { default: R(() => [ W(i) ]), _: 1 }) ]), default: R(() => [ B("span", Sce, me(a.featuresAlert), 1) ]), _: 1 }) ])) : Z("", !0), Ne(B("div", { class: "hide", id: "hide-path-info", onClick: t[0] || (t[0] = (p) => e.showDetails = !1) }, [ Ae(" Hide path information "), W(s, null, { default: R(() => [ W(u) ]), _: 1 }) ], 512), [ [ft, e.showDetails] ]), Ne(B("div", { class: "hide", id: "show-path-info", onClick: t[1] || (t[1] = (p) => e.showDetails = !0) }, [ Ae(" Show path information "), W(s, null, { default: R(() => [ W(c) ]), _: 1 }) ], 512), [ [ft, !e.showDetails] ]), W(pr, { name: "slide-fade" }, { default: R(() => [ Ne(B("div", Ece, [ Ae(me(n.tooltipEntry.paths) + " ", 1), n.tooltipEntry.origins && n.tooltipEntry.origins.length > 0 ? (E(), L("div", $ce, [ B("div", _ce, [ Tce, W(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: R(() => [ W(s, { class: "info" }, { default: R(() => [ W(i) ]), _: 1 }) ]), default: R(() => [ B("span", Oce, [ Fce, Ae(" " + me(a.originDescription), 1) ]) ]), _: 1 }) ]), (E(!0), L(De, null, xt(n.tooltipEntry.origins, (p, v) => (E(), L("div", { class: "attribute-content", "origin-item-label": p, key: p }, [ Ae(me(a.capitalise(p)) + " ", 1), v != n.tooltipEntry.origins.length - 1 ? (E(), L("div", Ace)) : Z("", !0) ], 8, Ice))), 128)), Ne(W(d, { class: "button", id: "open-dendrites-button", onClick: a.openDendrites }, { default: R(() => [ Ae(" Explore origin data ") ]), _: 1 }, 8, ["onClick"]), [ [ ft, n.tooltipEntry.originsWithDatasets && n.tooltipEntry.originsWithDatasets.length > 0 ] ]) ])) : Z("", !0), n.tooltipEntry.components && n.tooltipEntry.components.length > 0 ? (E(), L("div", Pce, [ Lce, (E(!0), L(De, null, xt(n.tooltipEntry.components, (p, v) => (E(), L("div", { class: "attribute-content", "component-item-label": p, key: p }, [ Ae(me(a.capitalise(p)) + " ", 1), v != n.tooltipEntry.components.length - 1 ? (E(), L("div", Dce)) : Z("", !0) ], 8, Rce))), 128)) ])) : Z("", !0), n.tooltipEntry.destinations && n.tooltipEntry.destinations.length > 0 ? (E(), L("div", Mce, [ B("div", Nce, [ Bce, W(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: R(() => [ W(s, { class: "info" }, { default: R(() => [ W(i) ]), _: 1 }) ]), default: R(() => [ zce ]), _: 1 }) ]), (E(!0), L(De, null, xt(n.tooltipEntry.destinations, (p, v) => (E(), L("div", { class: "attribute-content", "destination-item-label": p, key: p }, [ Ae(me(a.capitalise(p)) + " ", 1), v != n.tooltipEntry.destinations.length - 1 ? (E(), L("div", jce)) : Z("", !0) ], 8, Vce))), 128)), Ne(W(d, { class: "button", onClick: a.openAxons }, { default: R(() => [ Ae(" Explore destination data ") ]), _: 1 }, 8, ["onClick"]), [ [ ft, n.tooltipEntry.destinationsWithDatasets && n.tooltipEntry.destinationsWithDatasets.length > 0 ] ]) ])) : Z("", !0), Ne(W(d, { class: "button", onClick: a.openAll }, { default: R(() => [ Ae(" Search for data on components ") ]), _: 1 }, 8, ["onClick"]), [ [ ft, n.tooltipEntry.componentsWithDatasets && n.tooltipEntry.componentsWithDatasets.length > 0 ] ]), a.resources.length ? (E(), Q(f, { key: 3, resources: a.resources }, null, 8, ["resources"])) : Z("", !0) ], 512), [ [ft, e.showDetails] ]) ]), _: 1 }) ])), [ [h, e.loading] ]) : Z("", !0); } const Uce = /* @__PURE__ */ Ea(vce, [["render", Hce], ["__scopeId", "data-v-3d217adc"]]), qce = { name: "Tooltip", props: { tooltipEntry: { type: Object }, annotationDisplay: { type: Boolean, default: !1 }, annotationEntry: { type: Object } }, mounted: function() { rv.on("onActionClick", (e) => { this.$emit("onActionClick", e); }); } }, Wce = { class: "tooltip-container", id: "tooltip-container" }; function Gce(e, t, n, r, o, a) { const i = e6, s = Uce; return E(), L("div", Wce, [ n.annotationDisplay ? (E(), Q(i, { key: 0, annotationEntry: n.annotationEntry, onAnnotation: t[0] || (t[0] = (l) => e.$emit("annotation", l)) }, null, 8, ["annotationEntry"])) : (E(), Q(s, { key: 1, tooltipEntry: n.tooltipEntry }, null, 8, ["tooltipEntry"])) ]); } const tAe = /* @__PURE__ */ Ea(qce, [["render", Gce], ["__scopeId", "data-v-229b3988"]]), Kce = { name: "TreeControls", props: { /** * The type of map that the TreeControls is used. Either "flatmap" or "scaffold". */ mapType: { type: String, required: !0 }, isReady: { type: Boolean, default: !0 }, /** * The title of the TreeControls. */ title: { type: String }, /** * The data of the tree. */ treeData: { type: Array, default: function() { return []; } }, showColourPicker: { type: Boolean, default: !1 }, /** * The active node of the tree. */ active: { type: [String, Array], required: !0 }, /** * The hover node of the tree. */ hover: { type: [String, Array], required: !0 }, enableFilter: { type: Boolean, default: !0 } }, data: function() { return { defaultExpandedKeys: ["All"], filterText: "", myPopperClass: "hide-scaffold-colour-popup", tooltipVisible: !1, tooltipLabel: "", tooltipAtBottom: !1 }; }, computed: { isFlatmap: function() { return this.mapType === "flatmap"; }, isScaffold: function() { return this.mapType === "scaffold"; }, nodeKey: function() { if (this.isFlatmap) return "key"; if (this.isScaffold) return "id"; }, expandedKeys: function() { if (this.isFlatmap) return this.defaultExpandedKeys; if (this.isScaffold) return []; } }, watch: { showColourPicker: { immediate: !0, handler: function() { this.showColourPicker ? this.myPopperClass = "showPicker" : this.myPopperClass = "hide-scaffold-colour-popup"; } }, filterText: { handler: function(e) { this.$refs.regionTree && this.$refs.regionTree.filter(e); } } }, methods: { filterNode: function(e, t) { return e ? t.label ? t.label.toLowerCase().includes(e.toLowerCase()) : !1 : !0; }, setColour: function(e, t) { this.$emit("setColour", e, t); }, getBackgroundStyles: function(e) { return "colour" in e ? { background: e.colour } : {}; }, nodeIsActive: function(e) { return this.active === e.models; }, nodeIsHover: function(e) { return this.hover === e.models; }, changeActiveByNode: function(e, t = !1) { this.isFlatmap ? e.models && this.$emit("changeActive", e.models) : this.isScaffold && (e.isPrimitives || e.isRegion) && this.$emit("changeActive", e, t); }, changeHoverByNode: function(e, t = !1) { this.isFlatmap ? e.models && this.$emit("changeHover", e.models) : this.isScaffold && e.isPrimitives && this.$emit("changeHover", e, t); }, checkChanged: function(e, t) { if (this.isFlatmap) { const n = t.checkedKeys.includes(e.key); e.key === "All" ? this.$emit("checkAll", n) : this.$emit("checkChanged", { key: e.key, value: n }); } else this.isScaffold && this.$emit("checkChanged", e, t); }, displayTooltip: function(e, t, n) { const r = n.target.closest(".el-tree-node__content"), o = r.clientWidth, a = r.getBoundingClientRect().x, i = r.querySelector(".lastChildInItem"); let s = 0; if (i) { const u = i.getBoundingClientRect(); s = u.x + u.width - a; } const l = s > o; this.tooltipVisible = l && t, this.tooltipLabel = e, this.tooltipAtBottom = 0.5 > n.layerY / this.$refs.treeContainer.clientHeight; } }, unmounted: function() { this.sortedPrimitiveGroups = void 0; }, mounted: function() { this.$refs.regionTree && this.$refs.regionTree.filter(this.filterText); } }, Yce = { class: "selections-container" }, Xce = { class: "title-text" }, Zce = { class: "tree-container", ref: "treeContainer" }, Jce = { class: "tooltip-text" }, Qce = ["onClick", "onMouseover", "onMouseenter"], ede = ["onClick", "onMouseover", "onMouseenter"], tde = { class: "lastChildInItem" }, nde = { key: 0, class: "node-options" }; function rde(e, t, n, r, o, a) { const i = sf, s = of, l = rg, u = og, c = xQ, d = Eee, f = O2; return E(), L("div", Yce, [ n.title ? (E(), Q(l, { key: 0 }, { default: R(() => [ W(i, { span: 12 }, { default: R(() => [ B("div", Xce, me(n.title), 1) ]), _: 1 }), n.enableFilter ? (E(), Q(i, { key: 0, span: 12 }, { default: R(() => [ B("div", null, [ W(s, { class: "tree-filter-input", modelValue: e.filterText, "onUpdate:modelValue": t[0] || (t[0] = (h) => e.filterText = h), placeholder: "Filter " + n.title }, null, 8, ["modelValue", "placeholder"]) ]) ]), _: 1 })) : Z("", !0) ]), _: 1 })) : Z("", !0), B("div", Zce, [ B("div", { class: V(["tree-tooltip", e.tooltipAtBottom ? "bottom" : ""]) }, [ W(u, { ref: "tooltip", visible: e.tooltipVisible && e.tooltipLabel !== "", placement: "top", "show-arrow": !1, teleported: !1, trigger: "manual", "popper-class": "tree-tooltip-popper", "virtual-triggering": "", width: 260 }, { default: R(() => [ B("div", Jce, me(e.tooltipLabel), 1) ]), _: 1 }, 8, ["visible"]) ], 2), Ne((E(), Q(d, { ref: "regionTree", "element-loading-background": "rgba(0, 0, 0, 0.3)", "show-checkbox": "", "node-key": a.nodeKey, data: n.treeData, "check-strictly": !1, "expand-on-click-node": !1, "render-after-expand": !1, "default-expanded-keys": a.expandedKeys, onCheck: a.checkChanged, indent: 8, "filter-node-method": a.filterNode, class: V([n.mapType === "flatmap" ? "hide_grandchildren_checkbox" : ""]) }, { default: R(({ node: h, data: p }) => [ n.mapType === "flatmap" ? (E(), L("span", { key: 0, class: V(["region-tree-node", { activeItem: a.nodeIsActive(p), hoverItem: a.nodeIsHover(p) }]), onClick: (v) => a.changeActiveByNode(p), onMouseover: (v) => a.changeHoverByNode(p, !1), onMouseenter: (v) => a.displayTooltip(h.label, !0, v), onMouseleave: t[1] || (t[1] = (v) => a.displayTooltip("", !1, v)) }, [ B("div", { style: Ze(a.getBackgroundStyles(p)), class: "lastChildInItem" }, me(h.label), 5) ], 42, Qce)) : n.mapType === "scaffold" ? (E(), L("span", { key: 1, class: V(["region-tree-node", { activeItem: n.active.includes(p.id), hoverItem: n.hover.includes(p.id) }]), onClick: (v) => a.changeActiveByNode(p, !0), onMouseover: (v) => a.changeHoverByNode(p, !0, v), onMouseenter: (v) => a.displayTooltip(h.label, !0, v), onMouseleave: t[2] || (t[2] = (v) => a.displayTooltip("", !1, v)) }, [ p.isPrimitives ? (E(), Q(c, { key: 0, class: V({ "show-picker": n.showColourPicker }), modelValue: p.activeColour, "onUpdate:modelValue": (v) => p.activeColour = v, size: "small", "popper-class": e.myPopperClass, onChange: (v) => a.setColour(p, v) }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "popper-class", "onChange"])) : Z("", !0), B("div", tde, [ B("span", null, me(h.label), 1), p.isTextureSlides ? (E(), L("span", nde, " (Texture) ")) : Z("", !0) ]) ], 42, ede)) : Z("", !0) ]), _: 1 }, 8, ["node-key", "data", "default-expanded-keys", "onCheck", "filter-node-method", "class"])), [ [f, !n.isReady] ]) ], 512) ]); } const nAe = /* @__PURE__ */ Ea(Kce, [["render", rde], ["__scopeId", "data-v-823a8388"]]), ode = { name: "S3Bucket", data() { return { s3Bucket: void 0, s3Prefix: "" }; }, methods: { updateS3Bucket: function(e) { if (this.s3Bucket = void 0, e) { const t = e.split("//")[1]; if (t) { this.s3Bucket = t.split("/")[0]; const n = t.indexOf("/"); this.s3Prefix = t.substring(n + 1); return; } } }, getS3Args: function() { return this.s3Bucket ? `?s3BucketName=${this.s3Bucket}` : ""; }, getS3Prefix: function() { return this.s3Prefix; } } }; function SO() { return { async: !1, baseUrl: null, breaks: !1, extensions: null, gfm: !0, headerIds: !0, headerPrefix: "", highlight: null, hooks: null, langPrefix: "language-", mangle: !0, pedantic: !1, renderer: null, sanitize: !1, sanitizer: null, silent: !1, smartypants: !1, tokenizer: null, walkTokens: null, xhtml: !1 }; } let uu = SO(); function ade(e) { uu = e; } const EO = /[&<>"']/, ide = new RegExp(EO.source, "g"), $O = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, sde = new RegExp($O.source, "g"), lde = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, M3 = (e) => lde[e]; function Lr(e, t) { if (t) { if (EO.test(e)) return e.replace(ide, M3); } else if ($O.test(e)) return e.replace(sde, M3); return e; } const ude = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; function _O(e) { return e.replace(ude, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : "")); } const cde = /(^|[^\[])\^/g; function dn(e, t) { e = typeof e == "string" ? e : e.source, t = t || ""; const n = { replace: (r, o) => (o = o.source || o, o = o.replace(cde, "$1"), e = e.replace(r, o), n), getRegex: () => new RegExp(e, t) }; return n; } const dde = /[^\w:]/g, pde = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; function N3(e, t, n) { if (e) { let r; try { r = decodeURIComponent(_O(n)).replace(dde, "").toLowerCase(); } catch { return null; } if (r.indexOf("javascript:") === 0 || r.indexOf("vbscript:") === 0 || r.indexOf("data:") === 0) return null; } t && !pde.test(n) && (n = gde(t, n)); try { n = encodeURI(n).replace(/%25/g, "%"); } catch { return null; } return n; } const gh = {}, fde = /^[^:]+:\/*[^/]*$/, hde = /^([^:]+:)[\s\S]*$/, vde = /^([^:]+:\/*[^/]*)[\s\S]*$/; function gde(e, t) { gh[" " + e] || (fde.test(e) ? gh[" " + e] = e + "/" : gh[" " + e] = ov(e, "/", !0)), e = gh[" " + e]; const n = e.indexOf(":") === -1; return t.substring(0, 2) === "//" ? n ? t : e.replace(hde, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(vde, "$1") + t : e + t; } const qv = { exec: function() { } }; function B3(e, t) { const n = e.replace(/\|/g, (a, i, s) => { let l = !1, u = i; for (; --u >= 0 && s[u] === "\\"; ) l = !l; return l ? "|" : " |"; }), r = n.split(/ \|/); let o = 0; if (r[0].trim() || r.shift(), r.length > 0 && !r[r.length - 1].trim() && r.pop(), r.length > t) r.splice(t); else for (; r.length < t; ) r.push(""); for (; o < r.length; o++) r[o] = r[o].trim().replace(/\\\|/g, "|"); return r; } function ov(e, t, n) { const r = e.length; if (r === 0) return ""; let o = 0; for (; o < r; ) { const a = e.charAt(r - o - 1); if (a === t && !n) o++; else if (a !== t && n) o++; else break; } return e.slice(0, r - o); } function mde(e, t) { if (e.indexOf(t[1]) === -1) return -1; const n = e.length; let r = 0, o = 0; for (; o < n; o++) if (e[o] === "\\") o++; else if (e[o] === t[0]) r++; else if (e[o] === t[1] && (r--, r < 0)) return o; return -1; } function yde(e) { e && e.sanitize && !e.silent && console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"); } function z3(e, t) { if (t < 1) return ""; let n = ""; for (; t > 1; ) t & 1 && (n += e), t >>= 1, e += e; return n + e; } function V3(e, t, n, r) { const o = t.href, a = t.title ? Lr(t.title) : null, i = e[1].replace(/\\([\[\]])/g, "$1"); if (e[0].charAt(0) !== "!") { r.state.inLink = !0; const s = { type: "link", raw: n, href: o, title: a, text: i, tokens: r.inlineTokens(i) }; return r.state.inLink = !1, s; } return { type: "image", raw: n, href: o, title: a, text: Lr(i) }; } function bde(e, t) { const n = e.match(/^(\s+)(?:```)/); if (n === null) return t; const r = n[1]; return t.split(` `).map((o) => { const a = o.match(/^\s+/); if (a === null) return o; const [i] = a; return i.length >= r.length ? o.slice(r.length) : o; }).join(` `); } class nw { constructor(t) { this.options = t || uu; } space(t) { const n = this.rules.block.newline.exec(t); if (n && n[0].length > 0) return { type: "space", raw: n[0] }; } code(t) { const n = this.rules.block.code.exec(t); if (n) { const r = n[0].replace(/^ {1,4}/gm, ""); return { type: "code", raw: n[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : ov(r, ` `) }; } } fences(t) { const n = this.rules.block.fences.exec(t); if (n) { const r = n[0], o = bde(r, n[3] || ""); return { type: "code", raw: r, lang: n[2] ? n[2].trim().replace(this.rules.inline._escapes, "$1") : n[2], text: o }; } } heading(t) { const n = this.rules.block.heading.exec(t); if (n) { let r = n[2].trim(); if (/#$/.test(r)) { const o = ov(r, "#"); (this.options.pedantic || !o || / $/.test(o)) && (r = o.trim()); } return { type: "heading", raw: n[0], depth: n[1].length, text: r, tokens: this.lexer.inline(r) }; } } hr(t) { const n = this.rules.block.hr.exec(t); if (n) return { type: "hr", raw: n[0] }; } blockquote(t) { const n = this.rules.block.blockquote.exec(t); if (n) { const r = n[0].replace(/^ *>[ \t]?/gm, ""), o = this.lexer.state.top; this.lexer.state.top = !0; const a = this.lexer.blockTokens(r); return this.lexer.state.top = o, { type: "blockquote", raw: n[0], tokens: a, text: r }; } } list(t) { let n = this.rules.block.list.exec(t); if (n) { let r, o, a, i, s, l, u, c, d, f, h, p, v = n[1].trim(); const m = v.length > 1, g = { type: "list", raw: "", ordered: m, start: m ? +v.slice(0, -1) : "", loose: !1, items: [] }; v = m ? `\\d{1,9}\\${v.slice(-1)}` : `\\${v}`, this.options.pedantic && (v = m ? v : "[*+-]"); const b = new RegExp(`^( {0,3}${v})((?:[ ][^\\n]*)?(?:\\n|$))`); for (; t && (p = !1, !(!(n = b.exec(t)) || this.rules.block.hr.test(t))); ) { if (r = n[0], t = t.substring(r.length), c = n[2].split(` `, 1)[0].replace(/^\t+/, (x) => " ".repeat(3 * x.length)), d = t.split(` `, 1)[0], this.options.pedantic ? (i = 2, h = c.trimLeft()) : (i = n[2].search(/[^ ]/), i = i > 4 ? 1 : i, h = c.slice(i), i += n[1].length), l = !1, !c && /^ *$/.test(d) && (r += d + ` `, t = t.substring(d.length + 1), p = !0), !p) { const x = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), w = new RegExp(`^ {0,${Math.min(3, i - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), k = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:\`\`\`|~~~)`), S = new RegExp(`^ {0,${Math.min(3, i - 1)}}#`); for (; t && (f = t.split(` `, 1)[0], d = f, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(k.test(d) || S.test(d) || x.test(d) || w.test(t))); ) { if (d.search(/[^ ]/) >= i || !d.trim()) h += ` ` + d.slice(i); else { if (l || c.search(/[^ ]/) >= 4 || k.test(c) || S.test(c) || w.test(c)) break; h += ` ` + d; } !l && !d.trim() && (l = !0), r += f + ` `, t = t.substring(f.length + 1), c = d.slice(i); } } g.loose || (u ? g.loose = !0 : /\n *\n *$/.test(r) && (u = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(h), o && (a = o[0] !== "[ ] ", h = h.replace(/^\[[ xX]\] +/, ""))), g.items.push({ type: "list_item", raw: r, task: !!o, checked: a, loose: !1, text: h }), g.raw += r; } g.items[g.items.length - 1].raw = r.trimRight(), g.items[g.items.length - 1].text = h.trimRight(), g.raw = g.raw.trimRight(); const C = g.items.length; for (s = 0; s < C; s++) if (this.lexer.state.top = !1, g.items[s].tokens = this.lexer.blockTokens(g.items[s].text, []), !g.loose) { const x = g.items[s].tokens.filter((k) => k.type === "space"), w = x.length > 0 && x.some((k) => /\n.*\n/.test(k.raw)); g.loose = w; } if (g.loose) for (s = 0; s < C; s++) g.items[s].loose = !0; return g; } } html(t) { const n = this.rules.block.html.exec(t); if (n) { const r = { type: "html", raw: n[0], pre: !this.options.sanitizer && (n[1] === "pre" || n[1] === "script" || n[1] === "style"), text: n[0] }; if (this.options.sanitize) { const o = this.options.sanitizer ? this.options.sanitizer(n[0]) : Lr(n[0]); r.type = "paragraph", r.text = o, r.tokens = this.lexer.inline(o); } return r; } } def(t) { const n = this.rules.block.def.exec(t); if (n) { const r = n[1].toLowerCase().replace(/\s+/g, " "), o = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline._escapes, "$1") : "", a = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline._escapes, "$1") : n[3]; return { type: "def", tag: r, raw: n[0], href: o, title: a }; } } table(t) { const n = this.rules.block.table.exec(t); if (n) { const r = { type: "table", header: B3(n[1]).map((o) => ({ text: o })), align: n[2].replace(/^ *|\| *$/g, "").split(/ *\| */), rows: n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(` `) : [] }; if (r.header.length === r.align.length) { r.raw = n[0]; let o = r.align.length, a, i, s, l; for (a = 0; a < o; a++) /^ *-+: *$/.test(r.align[a]) ? r.align[a] = "right" : /^ *:-+: *$/.test(r.align[a]) ? r.align[a] = "center" : /^ *:-+ *$/.test(r.align[a]) ? r.align[a] = "left" : r.align[a] = null; for (o = r.rows.length, a = 0; a < o; a++) r.rows[a] = B3(r.rows[a], r.header.length).map((u) => ({ text: u })); for (o = r.header.length, i = 0; i < o; i++) r.header[i].tokens = this.lexer.inline(r.header[i].text); for (o = r.rows.length, i = 0; i < o; i++) for (l = r.rows[i], s = 0; s < l.length; s++) l[s].tokens = this.lexer.inline(l[s].text); return r; } } } lheading(t) { const n = this.rules.block.lheading.exec(t); if (n) return { type: "heading", raw: n[0], depth: n[2].charAt(0) === "=" ? 1 : 2, text: n[1], tokens: this.lexer.inline(n[1]) }; } paragraph(t) { const n = this.rules.block.paragraph.exec(t); if (n) { const r = n[1].charAt(n[1].length - 1) === ` ` ? n[1].slice(0, -1) : n[1]; return { type: "paragraph", raw: n[0], text: r, tokens: this.lexer.inline(r) }; } } text(t) { const n = this.rules.block.text.exec(t); if (n) return { type: "text", raw: n[0], text: n[0], tokens: this.lexer.inline(n[0]) }; } escape(t) { const n = this.rules.inline.escape.exec(t); if (n) return { type: "escape", raw: n[0], text: Lr(n[1]) }; } tag(t) { const n = this.rules.inline.tag.exec(t); if (n) return !this.lexer.state.inLink && /^/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), { type: this.options.sanitize ? "text" : "html", raw: n[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(n[0]) : Lr(n[0]) : n[0] }; } link(t) { const n = this.rules.inline.link.exec(t); if (n) { const r = n[2].trim(); if (!this.options.pedantic && /^$/.test(r)) return; const i = ov(r.slice(0, -1), "\\"); if ((r.length - i.length) % 2 === 0) return; } else { const i = mde(n[2], "()"); if (i > -1) { const l = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + i; n[2] = n[2].substring(0, i), n[0] = n[0].substring(0, l).trim(), n[3] = ""; } } let o = n[2], a = ""; if (this.options.pedantic) { const i = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o); i && (o = i[1], a = i[3]); } else a = n[3] ? n[3].slice(1, -1) : ""; return o = o.trim(), /^$/.test(r) ? o = o.slice(1) : o = o.slice(1, -1)), V3(n, { href: o && o.replace(this.rules.inline._escapes, "$1"), title: a && a.replace(this.rules.inline._escapes, "$1") }, n[0], this.lexer); } } reflink(t, n) { let r; if ((r = this.rules.inline.reflink.exec(t)) || (r = this.rules.inline.nolink.exec(t))) { let o = (r[2] || r[1]).replace(/\s+/g, " "); if (o = n[o.toLowerCase()], !o) { const a = r[0].charAt(0); return { type: "text", raw: a, text: a }; } return V3(r, o, r[0], this.lexer); } } emStrong(t, n, r = "") { let o = this.rules.inline.emStrong.lDelim.exec(t); if (!o || o[3] && r.match(/[\p{L}\p{N}]/u)) return; const a = o[1] || o[2] || ""; if (!a || a && (r === "" || this.rules.inline.punctuation.exec(r))) { const i = o[0].length - 1; let s, l, u = i, c = 0; const d = o[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd; for (d.lastIndex = 0, n = n.slice(-1 * t.length + i); (o = d.exec(n)) != null; ) { if (s = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !s) continue; if (l = s.length, o[3] || o[4]) { u += l; continue; } else if ((o[5] || o[6]) && i % 3 && !((i + l) % 3)) { c += l; continue; } if (u -= l, u > 0) continue; l = Math.min(l, l + u + c); const f = t.slice(0, i + o.index + (o[0].length - s.length) + l); if (Math.min(i, l) % 2) { const p = f.slice(1, -1); return { type: "em", raw: f, text: p, tokens: this.lexer.inlineTokens(p) }; } const h = f.slice(2, -2); return { type: "strong", raw: f, text: h, tokens: this.lexer.inlineTokens(h) }; } } } codespan(t) { const n = this.rules.inline.code.exec(t); if (n) { let r = n[2].replace(/\n/g, " "); const o = /[^ ]/.test(r), a = /^ /.test(r) && / $/.test(r); return o && a && (r = r.substring(1, r.length - 1)), r = Lr(r, !0), { type: "codespan", raw: n[0], text: r }; } } br(t) { const n = this.rules.inline.br.exec(t); if (n) return { type: "br", raw: n[0] }; } del(t) { const n = this.rules.inline.del.exec(t); if (n) return { type: "del", raw: n[0], text: n[2], tokens: this.lexer.inlineTokens(n[2]) }; } autolink(t, n) { const r = this.rules.inline.autolink.exec(t); if (r) { let o, a; return r[2] === "@" ? (o = Lr(this.options.mangle ? n(r[1]) : r[1]), a = "mailto:" + o) : (o = Lr(r[1]), a = o), { type: "link", raw: r[0], text: o, href: a, tokens: [ { type: "text", raw: o, text: o } ] }; } } url(t, n) { let r; if (r = this.rules.inline.url.exec(t)) { let o, a; if (r[2] === "@") o = Lr(this.options.mangle ? n(r[0]) : r[0]), a = "mailto:" + o; else { let i; do i = r[0], r[0] = this.rules.inline._backpedal.exec(r[0])[0]; while (i !== r[0]); o = Lr(r[0]), r[1] === "www." ? a = "http://" + r[0] : a = r[0]; } return { type: "link", raw: r[0], text: o, href: a, tokens: [ { type: "text", raw: o, text: o } ] }; } } inlineText(t, n) { const r = this.rules.inline.text.exec(t); if (r) { let o; return this.lexer.state.inRawBlock ? o = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(r[0]) : Lr(r[0]) : r[0] : o = Lr(this.options.smartypants ? n(r[0]) : r[0]), { type: "text", raw: r[0], text: o }; } } } const yt = { newline: /^(?: *(?:\n|$))+/, code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, fences: /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, hr: /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/, html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/, table: qv, lheading: /^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, // regex template, placeholders will be replaced according to different paragraph // interruption rules of commonmark and the original markdown spec: _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, text: /^[^\n]+/ }; yt._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/; yt._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; yt.def = dn(yt.def).replace("label", yt._label).replace("title", yt._title).getRegex(); yt.bullet = /(?:[*+-]|\d{1,9}[.)])/; yt.listItemStart = dn(/^( *)(bull) */).replace("bull", yt.bullet).getRegex(); yt.list = dn(yt.list).replace(/bull/g, yt.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + yt.def.source + ")").getRegex(); yt._tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul"; yt._comment = /|$)/; yt.html = dn(yt.html, "i").replace("comment", yt._comment).replace("tag", yt._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); yt.paragraph = dn(yt._paragraph).replace("hr", yt.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", yt._tag).getRegex(); yt.blockquote = dn(yt.blockquote).replace("paragraph", yt.paragraph).getRegex(); yt.normal = { ...yt }; yt.gfm = { ...yt.normal, table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)" // Cells }; yt.gfm.table = dn(yt.gfm.table).replace("hr", yt.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", yt._tag).getRegex(); yt.gfm.paragraph = dn(yt._paragraph).replace("hr", yt.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", yt.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", yt._tag).getRegex(); yt.pedantic = { ...yt.normal, html: dn( `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))` ).replace("comment", yt._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: qv, // fences not supported lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: dn(yt.normal._paragraph).replace("hr", yt.hr).replace("heading", ` *#{1,6} *[^ ]`).replace("lheading", yt.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex() }; const st = { escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, url: qv, tag: "^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^", // CDATA section link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, reflink: /^!?\[(label)\]\[(ref)\]/, nolink: /^!?\[(ref)\](?:\[\])?/, reflinkSearch: "reflink|nolink(?!\\()", emStrong: { lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/, // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right. // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a rDelimAst: /^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/, rDelimUnd: /^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _ }, code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, br: /^( {2,}|\\)\n(?!\s*$)/, del: qv, text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"; st.punctuation = dn(st.punctuation).replace(/punctuation/g, st._punctuation).getRegex(); st.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g; st.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g; st._comment = dn(yt._comment).replace("(?:-->|$)", "-->").getRegex(); st.emStrong.lDelim = dn(st.emStrong.lDelim).replace(/punct/g, st._punctuation).getRegex(); st.emStrong.rDelimAst = dn(st.emStrong.rDelimAst, "g").replace(/punct/g, st._punctuation).getRegex(); st.emStrong.rDelimUnd = dn(st.emStrong.rDelimUnd, "g").replace(/punct/g, st._punctuation).getRegex(); st._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; st._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; st._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; st.autolink = dn(st.autolink).replace("scheme", st._scheme).replace("email", st._email).getRegex(); st._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; st.tag = dn(st.tag).replace("comment", st._comment).replace("attribute", st._attribute).getRegex(); st._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; st._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/; st._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; st.link = dn(st.link).replace("label", st._label).replace("href", st._href).replace("title", st._title).getRegex(); st.reflink = dn(st.reflink).replace("label", st._label).replace("ref", yt._label).getRegex(); st.nolink = dn(st.nolink).replace("ref", yt._label).getRegex(); st.reflinkSearch = dn(st.reflinkSearch, "g").replace("reflink", st.reflink).replace("nolink", st.nolink).getRegex(); st.normal = { ...st }; st.pedantic = { ...st.normal, strong: { start: /^__|\*\*/, middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, endAst: /\*\*(?!\*)/g, endUnd: /__(?!_)/g }, em: { start: /^_|\*/, middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, endAst: /\*(?!\*)/g, endUnd: /_(?!_)/g }, link: dn(/^!?\[(label)\]\((.*?)\)/).replace("label", st._label).getRegex(), reflink: dn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", st._label).getRegex() }; st.gfm = { ...st.normal, escape: dn(st.escape).replace("])", "~|])").getRegex(), _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ 0.5 && (r = "x" + r.toString(16)), t += "&#" + r + ";"; return t; } class Ms { constructor(t) { this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || uu, this.options.tokenizer = this.options.tokenizer || new nw(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 }; const n = { block: yt.normal, inline: st.normal }; this.options.pedantic ? (n.block = yt.pedantic, n.inline = st.pedantic) : this.options.gfm && (n.block = yt.gfm, this.options.breaks ? n.inline = st.breaks : n.inline = st.gfm), this.tokenizer.rules = n; } /** * Expose Rules */ static get rules() { return { block: yt, inline: st }; } /** * Static Lex Method */ static lex(t, n) { return new Ms(n).lex(t); } /** * Static Lex Inline Method */ static lexInline(t, n) { return new Ms(n).inlineTokens(t); } /** * Preprocessing */ lex(t) { t = t.replace(/\r\n|\r/g, ` `), this.blockTokens(t, this.tokens); let n; for (; n = this.inlineQueue.shift(); ) this.inlineTokens(n.src, n.tokens); return this.tokens; } /** * Lexing */ blockTokens(t, n = []) { this.options.pedantic ? t = t.replace(/\t/g, " ").replace(/^ +$/gm, "") : t = t.replace(/^( *)(\t+)/gm, (s, l, u) => l + " ".repeat(u.length)); let r, o, a, i; for (; t; ) if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((s) => (r = s.call({ lexer: this }, t, n)) ? (t = t.substring(r.raw.length), n.push(r), !0) : !1))) { if (r = this.tokenizer.space(t)) { t = t.substring(r.raw.length), r.raw.length === 1 && n.length > 0 ? n[n.length - 1].raw += ` ` : n.push(r); continue; } if (r = this.tokenizer.code(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && (o.type === "paragraph" || o.type === "text") ? (o.raw += ` ` + r.raw, o.text += ` ` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : n.push(r); continue; } if (r = this.tokenizer.fences(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.heading(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.hr(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.blockquote(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.list(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.html(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.def(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && (o.type === "paragraph" || o.type === "text") ? (o.raw += ` ` + r.raw, o.text += ` ` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = { href: r.href, title: r.title }); continue; } if (r = this.tokenizer.table(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.lheading(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (a = t, this.options.extensions && this.options.extensions.startBlock) { let s = 1 / 0; const l = t.slice(1); let u; this.options.extensions.startBlock.forEach(function(c) { u = c.call({ lexer: this }, l), typeof u == "number" && u >= 0 && (s = Math.min(s, u)); }), s < 1 / 0 && s >= 0 && (a = t.substring(0, s + 1)); } if (this.state.top && (r = this.tokenizer.paragraph(a))) { o = n[n.length - 1], i && o.type === "paragraph" ? (o.raw += ` ` + r.raw, o.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : n.push(r), i = a.length !== t.length, t = t.substring(r.raw.length); continue; } if (r = this.tokenizer.text(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && o.type === "text" ? (o.raw += ` ` + r.raw, o.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : n.push(r); continue; } if (t) { const s = "Infinite loop on byte: " + t.charCodeAt(0); if (this.options.silent) { console.error(s); break; } else throw new Error(s); } } return this.state.top = !0, n; } inline(t, n = []) { return this.inlineQueue.push({ src: t, tokens: n }), n; } /** * Lexing/Compiling */ inlineTokens(t, n = []) { let r, o, a, i = t, s, l, u; if (this.tokens.links) { const c = Object.keys(this.tokens.links); if (c.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(i)) != null; ) c.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (i = i.slice(0, s.index) + "[" + z3("a", s[0].length - 2) + "]" + i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); } for (; (s = this.tokenizer.rules.inline.blockSkip.exec(i)) != null; ) i = i.slice(0, s.index) + "[" + z3("a", s[0].length - 2) + "]" + i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); for (; (s = this.tokenizer.rules.inline.escapedEmSt.exec(i)) != null; ) i = i.slice(0, s.index + s[0].length - 2) + "++" + i.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex), this.tokenizer.rules.inline.escapedEmSt.lastIndex--; for (; t; ) if (l || (u = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((c) => (r = c.call({ lexer: this }, t, n)) ? (t = t.substring(r.raw.length), n.push(r), !0) : !1))) { if (r = this.tokenizer.escape(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.tag(t)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && r.type === "text" && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r); continue; } if (r = this.tokenizer.link(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.reflink(t, this.tokens.links)) { t = t.substring(r.raw.length), o = n[n.length - 1], o && r.type === "text" && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r); continue; } if (r = this.tokenizer.emStrong(t, i, u)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.codespan(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.br(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.del(t)) { t = t.substring(r.raw.length), n.push(r); continue; } if (r = this.tokenizer.autolink(t, j3)) { t = t.substring(r.raw.length), n.push(r); continue; } if (!this.state.inLink && (r = this.tokenizer.url(t, j3))) { t = t.substring(r.raw.length), n.push(r); continue; } if (a = t, this.options.extensions && this.options.extensions.startInline) { let c = 1 / 0; const d = t.slice(1); let f; this.options.extensions.startInline.forEach(function(h) { f = h.call({ lexer: this }, d), typeof f == "number" && f >= 0 && (c = Math.min(c, f)); }), c < 1 / 0 && c >= 0 && (a = t.substring(0, c + 1)); } if (r = this.tokenizer.inlineText(a, wde)) { t = t.substring(r.raw.length), r.raw.slice(-1) !== "_" && (u = r.raw.slice(-1)), l = !0, o = n[n.length - 1], o && o.type === "text" ? (o.raw += r.raw, o.text += r.text) : n.push(r); continue; } if (t) { const c = "Infinite loop on byte: " + t.charCodeAt(0); if (this.options.silent) { console.error(c); break; } else throw new Error(c); } } return n; } } class rw { constructor(t) { this.options = t || uu; } code(t, n, r) { const o = (n || "").match(/\S*/)[0]; if (this.options.highlight) { const a = this.options.highlight(t, o); a != null && a !== t && (r = !0, t = a); } return t = t.replace(/\n$/, "") + ` `, o ? '
' + (r ? t : Lr(t, !0)) + `
` : "
" + (r ? t : Lr(t, !0)) + `
`; } /** * @param {string} quote */ blockquote(t) { return `
${t}
`; } html(t) { return t; } /** * @param {string} text * @param {string} level * @param {string} raw * @param {any} slugger */ heading(t, n, r, o) { if (this.options.headerIds) { const a = this.options.headerPrefix + o.slug(r); return `${t} `; } return `${t} `; } hr() { return this.options.xhtml ? `
` : `
`; } list(t, n, r) { const o = n ? "ol" : "ul", a = n && r !== 1 ? ' start="' + r + '"' : ""; return "<" + o + a + `> ` + t + " `; } /** * @param {string} text */ listitem(t) { return `
  • ${t}
  • `; } checkbox(t) { return " "; } /** * @param {string} text */ paragraph(t) { return `

    ${t}

    `; } /** * @param {string} header * @param {string} body */ table(t, n) { return n && (n = `${n}`), ` ` + t + ` ` + n + `
    `; } /** * @param {string} content */ tablerow(t) { return ` ${t} `; } tablecell(t, n) { const r = n.header ? "th" : "td"; return (n.align ? `<${r} align="${n.align}">` : `<${r}>`) + t + ` `; } /** * span level renderer * @param {string} text */ strong(t) { return `${t}`; } /** * @param {string} text */ em(t) { return `${t}`; } /** * @param {string} text */ codespan(t) { return `${t}`; } br() { return this.options.xhtml ? "
    " : "
    "; } /** * @param {string} text */ del(t) { return `${t}`; } /** * @param {string} href * @param {string} title * @param {string} text */ link(t, n, r) { if (t = N3(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let o = '
    ", o; } /** * @param {string} href * @param {string} title * @param {string} text */ image(t, n, r) { if (t = N3(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let o = `${r}" : ">", o; } text(t) { return t; } } class TO { // no need for block level renderers strong(t) { return t; } em(t) { return t; } codespan(t) { return t; } del(t) { return t; } html(t) { return t; } text(t) { return t; } link(t, n, r) { return "" + r; } image(t, n, r) { return "" + r; } br() { return ""; } } class OO { constructor() { this.seen = {}; } /** * @param {string} value */ serialize(t) { return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig, "").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "").replace(/\s/g, "-"); } /** * Finds the next safe (unique) slug to use * @param {string} originalSlug * @param {boolean} isDryRun */ getNextSafeSlug(t, n) { let r = t, o = 0; if (this.seen.hasOwnProperty(r)) { o = this.seen[t]; do o++, r = t + "-" + o; while (this.seen.hasOwnProperty(r)); } return n || (this.seen[t] = o, this.seen[r] = 0), r; } /** * Convert string to unique id * @param {object} [options] * @param {boolean} [options.dryrun] Generates the next unique slug without * updating the internal accumulator. */ slug(t, n = {}) { const r = this.serialize(t); return this.getNextSafeSlug(r, n.dryrun); } } class Ns { constructor(t) { this.options = t || uu, this.options.renderer = this.options.renderer || new rw(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new TO(), this.slugger = new OO(); } /** * Static Parse Method */ static parse(t, n) { return new Ns(n).parse(t); } /** * Static Parse Inline Method */ static parseInline(t, n) { return new Ns(n).parseInline(t); } /** * Parse Loop */ parse(t, n = !0) { let r = "", o, a, i, s, l, u, c, d, f, h, p, v, m, g, b, C, x, w, k; const S = t.length; for (o = 0; o < S; o++) { if (h = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[h.type] && (k = this.options.extensions.renderers[h.type].call({ parser: this }, h), k !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(h.type))) { r += k || ""; continue; } switch (h.type) { case "space": continue; case "hr": { r += this.renderer.hr(); continue; } case "heading": { r += this.renderer.heading( this.parseInline(h.tokens), h.depth, _O(this.parseInline(h.tokens, this.textRenderer)), this.slugger ); continue; } case "code": { r += this.renderer.code( h.text, h.lang, h.escaped ); continue; } case "table": { for (d = "", c = "", s = h.header.length, a = 0; a < s; a++) c += this.renderer.tablecell( this.parseInline(h.header[a].tokens), { header: !0, align: h.align[a] } ); for (d += this.renderer.tablerow(c), f = "", s = h.rows.length, a = 0; a < s; a++) { for (u = h.rows[a], c = "", l = u.length, i = 0; i < l; i++) c += this.renderer.tablecell( this.parseInline(u[i].tokens), { header: !1, align: h.align[i] } ); f += this.renderer.tablerow(c); } r += this.renderer.table(d, f); continue; } case "blockquote": { f = this.parse(h.tokens), r += this.renderer.blockquote(f); continue; } case "list": { for (p = h.ordered, v = h.start, m = h.loose, s = h.items.length, f = "", a = 0; a < s; a++) b = h.items[a], C = b.checked, x = b.task, g = "", b.task && (w = this.renderer.checkbox(C), m ? b.tokens.length > 0 && b.tokens[0].type === "paragraph" ? (b.tokens[0].text = w + " " + b.tokens[0].text, b.tokens[0].tokens && b.tokens[0].tokens.length > 0 && b.tokens[0].tokens[0].type === "text" && (b.tokens[0].tokens[0].text = w + " " + b.tokens[0].tokens[0].text)) : b.tokens.unshift({ type: "text", text: w }) : g += w), g += this.parse(b.tokens, m), f += this.renderer.listitem(g, x, C); r += this.renderer.list(f, p, v); continue; } case "html": { r += this.renderer.html(h.text); continue; } case "paragraph": { r += this.renderer.paragraph(this.parseInline(h.tokens)); continue; } case "text": { for (f = h.tokens ? this.parseInline(h.tokens) : h.text; o + 1 < S && t[o + 1].type === "text"; ) h = t[++o], f += ` ` + (h.tokens ? this.parseInline(h.tokens) : h.text); r += n ? this.renderer.paragraph(f) : f; continue; } default: { const _ = 'Token with "' + h.type + '" type was not found.'; if (this.options.silent) { console.error(_); return; } else throw new Error(_); } } } return r; } /** * Parse Inline Tokens */ parseInline(t, n) { n = n || this.renderer; let r = "", o, a, i; const s = t.length; for (o = 0; o < s; o++) { if (a = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[a.type] && (i = this.options.extensions.renderers[a.type].call({ parser: this }, a), i !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(a.type))) { r += i || ""; continue; } switch (a.type) { case "escape": { r += n.text(a.text); break; } case "html": { r += n.html(a.text); break; } case "link": { r += n.link(a.href, a.title, this.parseInline(a.tokens, n)); break; } case "image": { r += n.image(a.href, a.title, a.text); break; } case "strong": { r += n.strong(this.parseInline(a.tokens, n)); break; } case "em": { r += n.em(this.parseInline(a.tokens, n)); break; } case "codespan": { r += n.codespan(a.text); break; } case "br": { r += n.br(); break; } case "del": { r += n.del(this.parseInline(a.tokens, n)); break; } case "text": { r += n.text(a.text); break; } default: { const l = 'Token with "' + a.type + '" type was not found.'; if (this.options.silent) { console.error(l); return; } else throw new Error(l); } } } return r; } } class Wv { constructor(t) { this.options = t || uu; } /** * Process markdown before marked */ preprocess(t) { return t; } /** * Process HTML after marked is finished */ postprocess(t) { return t; } } Lx(Wv, "passThroughHooks", /* @__PURE__ */ new Set([ "preprocess", "postprocess" ])); function xde(e, t, n) { return (r) => { if (r.message += ` Please report this to https://github.com/markedjs/marked.`, e) { const o = "

    An error occurred:

    " + Lr(r.message + "", !0) + "
    "; if (t) return Promise.resolve(o); if (n) { n(null, o); return; } return o; } if (t) return Promise.reject(r); if (n) { n(r); return; } throw r; }; } function FO(e, t) { return (n, r, o) => { typeof r == "function" && (o = r, r = null); const a = { ...r }; r = { ...bt.defaults, ...a }; const i = xde(r.silent, r.async, o); if (typeof n > "u" || n === null) return i(new Error("marked(): input parameter is undefined or null")); if (typeof n != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected")); if (yde(r), r.hooks && (r.hooks.options = r), o) { const s = r.highlight; let l; try { r.hooks && (n = r.hooks.preprocess(n)), l = e(n, r); } catch (d) { return i(d); } const u = function(d) { let f; if (!d) try { r.walkTokens && bt.walkTokens(l, r.walkTokens), f = t(l, r), r.hooks && (f = r.hooks.postprocess(f)); } catch (h) { d = h; } return r.highlight = s, d ? i(d) : o(null, f); }; if (!s || s.length < 3 || (delete r.highlight, !l.length)) return u(); let c = 0; bt.walkTokens(l, function(d) { d.type === "code" && (c++, setTimeout(() => { s(d.text, d.lang, function(f, h) { if (f) return u(f); h != null && h !== d.text && (d.text = h, d.escaped = !0), c--, c === 0 && u(); }); }, 0)); }), c === 0 && u(); return; } if (r.async) return Promise.resolve(r.hooks ? r.hooks.preprocess(n) : n).then((s) => e(s, r)).then((s) => r.walkTokens ? Promise.all(bt.walkTokens(s, r.walkTokens)).then(() => s) : s).then((s) => t(s, r)).then((s) => r.hooks ? r.hooks.postprocess(s) : s).catch(i); try { r.hooks && (n = r.hooks.preprocess(n)); const s = e(n, r); r.walkTokens && bt.walkTokens(s, r.walkTokens); let l = t(s, r); return r.hooks && (l = r.hooks.postprocess(l)), l; } catch (s) { return i(s); } }; } function bt(e, t, n) { return FO(Ms.lex, Ns.parse)(e, t, n); } bt.options = bt.setOptions = function(e) { return bt.defaults = { ...bt.defaults, ...e }, ade(bt.defaults), bt; }; bt.getDefaults = SO; bt.defaults = uu; bt.use = function(...e) { const t = bt.defaults.extensions || { renderers: {}, childTokens: {} }; e.forEach((n) => { const r = { ...n }; if (r.async = bt.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((o) => { if (!o.name) throw new Error("extension name required"); if (o.renderer) { const a = t.renderers[o.name]; a ? t.renderers[o.name] = function(...i) { let s = o.renderer.apply(this, i); return s === !1 && (s = a.apply(this, i)), s; } : t.renderers[o.name] = o.renderer; } if (o.tokenizer) { if (!o.level || o.level !== "block" && o.level !== "inline") throw new Error("extension level must be 'block' or 'inline'"); t[o.level] ? t[o.level].unshift(o.tokenizer) : t[o.level] = [o.tokenizer], o.start && (o.level === "block" ? t.startBlock ? t.startBlock.push(o.start) : t.startBlock = [o.start] : o.level === "inline" && (t.startInline ? t.startInline.push(o.start) : t.startInline = [o.start])); } o.childTokens && (t.childTokens[o.name] = o.childTokens); }), r.extensions = t), n.renderer) { const o = bt.defaults.renderer || new rw(); for (const a in n.renderer) { const i = o[a]; o[a] = (...s) => { let l = n.renderer[a].apply(o, s); return l === !1 && (l = i.apply(o, s)), l; }; } r.renderer = o; } if (n.tokenizer) { const o = bt.defaults.tokenizer || new nw(); for (const a in n.tokenizer) { const i = o[a]; o[a] = (...s) => { let l = n.tokenizer[a].apply(o, s); return l === !1 && (l = i.apply(o, s)), l; }; } r.tokenizer = o; } if (n.hooks) { const o = bt.defaults.hooks || new Wv(); for (const a in n.hooks) { const i = o[a]; Wv.passThroughHooks.has(a) ? o[a] = (s) => { if (bt.defaults.async) return Promise.resolve(n.hooks[a].call(o, s)).then((u) => i.call(o, u)); const l = n.hooks[a].call(o, s); return i.call(o, l); } : o[a] = (...s) => { let l = n.hooks[a].apply(o, s); return l === !1 && (l = i.apply(o, s)), l; }; } r.hooks = o; } if (n.walkTokens) { const o = bt.defaults.walkTokens; r.walkTokens = function(a) { let i = []; return i.push(n.walkTokens.call(this, a)), o && (i = i.concat(o.call(this, a))), i; }; } bt.setOptions(r); }); }; bt.walkTokens = function(e, t) { let n = []; for (const r of e) switch (n = n.concat(t.call(bt, r)), r.type) { case "table": { for (const o of r.header) n = n.concat(bt.walkTokens(o.tokens, t)); for (const o of r.rows) for (const a of o) n = n.concat(bt.walkTokens(a.tokens, t)); break; } case "list": { n = n.concat(bt.walkTokens(r.items, t)); break; } default: bt.defaults.extensions && bt.defaults.extensions.childTokens && bt.defaults.extensions.childTokens[r.type] ? bt.defaults.extensions.childTokens[r.type].forEach(function(o) { n = n.concat(bt.walkTokens(r[o], t)); }) : r.tokens && (n = n.concat(bt.walkTokens(r.tokens, t))); } return n; }; bt.parseInline = FO(Ms.lexInline, Ns.parseInline); bt.Parser = Ns; bt.parser = Ns.parse; bt.Renderer = rw; bt.TextRenderer = TO; bt.Lexer = Ms; bt.lexer = Ms.lex; bt.Tokenizer = nw; bt.Slugger = OO; bt.Hooks = Wv; bt.parse = bt; bt.options; bt.setOptions; bt.use; bt.walkTokens; bt.parseInline; Ns.parse; Ms.lex; var $y = { exports: {} }, Pn = {}, _y = { exports: {} }, cu = {}; function IO() { var e = {}; return e["align-content"] = !1, e["align-items"] = !1, e["align-self"] = !1, e["alignment-adjust"] = !1, e["alignment-baseline"] = !1, e.all = !1, e["anchor-point"] = !1, e.animation = !1, e["animation-delay"] = !1, e["animation-direction"] = !1, e["animation-duration"] = !1, e["animation-fill-mode"] = !1, e["animation-iteration-count"] = !1, e["animation-name"] = !1, e["animation-play-state"] = !1, e["animation-timing-function"] = !1, e.azimuth = !1, e["backface-visibility"] = !1, e.background = !0, e["background-attachment"] = !0, e["background-clip"] = !0, e["background-color"] = !0, e["background-image"] = !0, e["background-origin"] = !0, e["background-position"] = !0, e["background-repeat"] = !0, e["background-size"] = !0, e["baseline-shift"] = !1, e.binding = !1, e.bleed = !1, e["bookmark-label"] = !1, e["bookmark-level"] = !1, e["bookmark-state"] = !1, e.border = !0, e["border-bottom"] = !0, e["border-bottom-color"] = !0, e["border-bottom-left-radius"] = !0, e["border-bottom-right-radius"] = !0, e["border-bottom-style"] = !0, e["border-bottom-width"] = !0, e["border-collapse"] = !0, e["border-color"] = !0, e["border-image"] = !0, e["border-image-outset"] = !0, e["border-image-repeat"] = !0, e["border-image-slice"] = !0, e["border-image-source"] = !0, e["border-image-width"] = !0, e["border-left"] = !0, e["border-left-color"] = !0, e["border-left-style"] = !0, e["border-left-width"] = !0, e["border-radius"] = !0, e["border-right"] = !0, e["border-right-color"] = !0, e["border-right-style"] = !0, e["border-right-width"] = !0, e["border-spacing"] = !0, e["border-style"] = !0, e["border-top"] = !0, e["border-top-color"] = !0, e["border-top-left-radius"] = !0, e["border-top-right-radius"] = !0, e["border-top-style"] = !0, e["border-top-width"] = !0, e["border-width"] = !0, e.bottom = !1, e["box-decoration-break"] = !0, e["box-shadow"] = !0, e["box-sizing"] = !0, e["box-snap"] = !0, e["box-suppress"] = !0, e["break-after"] = !0, e["break-before"] = !0, e["break-inside"] = !0, e["caption-side"] = !1, e.chains = !1, e.clear = !0, e.clip = !1, e["clip-path"] = !1, e["clip-rule"] = !1, e.color = !0, e["color-interpolation-filters"] = !0, e["column-count"] = !1, e["column-fill"] = !1, e["column-gap"] = !1, e["column-rule"] = !1, e["column-rule-color"] = !1, e["column-rule-style"] = !1, e["column-rule-width"] = !1, e["column-span"] = !1, e["column-width"] = !1, e.columns = !1, e.contain = !1, e.content = !1, e["counter-increment"] = !1, e["counter-reset"] = !1, e["counter-set"] = !1, e.crop = !1, e.cue = !1, e["cue-after"] = !1, e["cue-before"] = !1, e.cursor = !1, e.direction = !1, e.display = !0, e["display-inside"] = !0, e["display-list"] = !0, e["display-outside"] = !0, e["dominant-baseline"] = !1, e.elevation = !1, e["empty-cells"] = !1, e.filter = !1, e.flex = !1, e["flex-basis"] = !1, e["flex-direction"] = !1, e["flex-flow"] = !1, e["flex-grow"] = !1, e["flex-shrink"] = !1, e["flex-wrap"] = !1, e.float = !1, e["float-offset"] = !1, e["flood-color"] = !1, e["flood-opacity"] = !1, e["flow-from"] = !1, e["flow-into"] = !1, e.font = !0, e["font-family"] = !0, e["font-feature-settings"] = !0, e["font-kerning"] = !0, e["font-language-override"] = !0, e["font-size"] = !0, e["font-size-adjust"] = !0, e["font-stretch"] = !0, e["font-style"] = !0, e["font-synthesis"] = !0, e["font-variant"] = !0, e["font-variant-alternates"] = !0, e["font-variant-caps"] = !0, e["font-variant-east-asian"] = !0, e["font-variant-ligatures"] = !0, e["font-variant-numeric"] = !0, e["font-variant-position"] = !0, e["font-weight"] = !0, e.grid = !1, e["grid-area"] = !1, e["grid-auto-columns"] = !1, e["grid-auto-flow"] = !1, e["grid-auto-rows"] = !1, e["grid-column"] = !1, e["grid-column-end"] = !1, e["grid-column-start"] = !1, e["grid-row"] = !1, e["grid-row-end"] = !1, e["grid-row-start"] = !1, e["grid-template"] = !1, e["grid-template-areas"] = !1, e["grid-template-columns"] = !1, e["grid-template-rows"] = !1, e["hanging-punctuation"] = !1, e.height = !0, e.hyphens = !1, e.icon = !1, e["image-orientation"] = !1, e["image-resolution"] = !1, e["ime-mode"] = !1, e["initial-letters"] = !1, e["inline-box-align"] = !1, e["justify-content"] = !1, e["justify-items"] = !1, e["justify-self"] = !1, e.left = !1, e["letter-spacing"] = !0, e["lighting-color"] = !0, e["line-box-contain"] = !1, e["line-break"] = !1, e["line-grid"] = !1, e["line-height"] = !1, e["line-snap"] = !1, e["line-stacking"] = !1, e["line-stacking-ruby"] = !1, e["line-stacking-shift"] = !1, e["line-stacking-strategy"] = !1, e["list-style"] = !0, e["list-style-image"] = !0, e["list-style-position"] = !0, e["list-style-type"] = !0, e.margin = !0, e["margin-bottom"] = !0, e["margin-left"] = !0, e["margin-right"] = !0, e["margin-top"] = !0, e["marker-offset"] = !1, e["marker-side"] = !1, e.marks = !1, e.mask = !1, e["mask-box"] = !1, e["mask-box-outset"] = !1, e["mask-box-repeat"] = !1, e["mask-box-slice"] = !1, e["mask-box-source"] = !1, e["mask-box-width"] = !1, e["mask-clip"] = !1, e["mask-image"] = !1, e["mask-origin"] = !1, e["mask-position"] = !1, e["mask-repeat"] = !1, e["mask-size"] = !1, e["mask-source-type"] = !1, e["mask-type"] = !1, e["max-height"] = !0, e["max-lines"] = !1, e["max-width"] = !0, e["min-height"] = !0, e["min-width"] = !0, e["move-to"] = !1, e["nav-down"] = !1, e["nav-index"] = !1, e["nav-left"] = !1, e["nav-right"] = !1, e["nav-up"] = !1, e["object-fit"] = !1, e["object-position"] = !1, e.opacity = !1, e.order = !1, e.orphans = !1, e.outline = !1, e["outline-color"] = !1, e["outline-offset"] = !1, e["outline-style"] = !1, e["outline-width"] = !1, e.overflow = !1, e["overflow-wrap"] = !1, e["overflow-x"] = !1, e["overflow-y"] = !1, e.padding = !0, e["padding-bottom"] = !0, e["padding-left"] = !0, e["padding-right"] = !0, e["padding-top"] = !0, e.page = !1, e["page-break-after"] = !1, e["page-break-before"] = !1, e["page-break-inside"] = !1, e["page-policy"] = !1, e.pause = !1, e["pause-after"] = !1, e["pause-before"] = !1, e.perspective = !1, e["perspective-origin"] = !1, e.pitch = !1, e["pitch-range"] = !1, e["play-during"] = !1, e.position = !1, e["presentation-level"] = !1, e.quotes = !1, e["region-fragment"] = !1, e.resize = !1, e.rest = !1, e["rest-after"] = !1, e["rest-before"] = !1, e.richness = !1, e.right = !1, e.rotation = !1, e["rotation-point"] = !1, e["ruby-align"] = !1, e["ruby-merge"] = !1, e["ruby-position"] = !1, e["shape-image-threshold"] = !1, e["shape-outside"] = !1, e["shape-margin"] = !1, e.size = !1, e.speak = !1, e["speak-as"] = !1, e["speak-header"] = !1, e["speak-numeral"] = !1, e["speak-punctuation"] = !1, e["speech-rate"] = !1, e.stress = !1, e["string-set"] = !1, e["tab-size"] = !1, e["table-layout"] = !1, e["text-align"] = !0, e["text-align-last"] = !0, e["text-combine-upright"] = !0, e["text-decoration"] = !0, e["text-decoration-color"] = !0, e["text-decoration-line"] = !0, e["text-decoration-skip"] = !0, e["text-decoration-style"] = !0, e["text-emphasis"] = !0, e["text-emphasis-color"] = !0, e["text-emphasis-position"] = !0, e["text-emphasis-style"] = !0, e["text-height"] = !0, e["text-indent"] = !0, e["text-justify"] = !0, e["text-orientation"] = !0, e["text-overflow"] = !0, e["text-shadow"] = !0, e["text-space-collapse"] = !0, e["text-transform"] = !0, e["text-underline-position"] = !0, e["text-wrap"] = !0, e.top = !1, e.transform = !1, e["transform-origin"] = !1, e["transform-style"] = !1, e.transition = !1, e["transition-delay"] = !1, e["transition-duration"] = !1, e["transition-property"] = !1, e["transition-timing-function"] = !1, e["unicode-bidi"] = !1, e["vertical-align"] = !1, e.visibility = !1, e["voice-balance"] = !1, e["voice-duration"] = !1, e["voice-family"] = !1, e["voice-pitch"] = !1, e["voice-range"] = !1, e["voice-rate"] = !1, e["voice-stress"] = !1, e["voice-volume"] = !1, e.volume = !1, e["white-space"] = !1, e.widows = !1, e.width = !0, e["will-change"] = !1, e["word-break"] = !0, e["word-spacing"] = !0, e["word-wrap"] = !0, e["wrap-flow"] = !1, e["wrap-through"] = !1, e["writing-mode"] = !1, e["z-index"] = !1, e; } function kde(e, t, n) { } function Cde(e, t, n) { } var Sde = /javascript\s*\:/img; function Ede(e, t) { return Sde.test(t) ? "" : t; } cu.whiteList = IO(); cu.getDefaultWhiteList = IO; cu.onAttr = kde; cu.onIgnoreAttr = Cde; cu.safeAttrValue = Ede; var $de = { indexOf: function(e, t) { var n, r; if (Array.prototype.indexOf) return e.indexOf(t); for (n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; return -1; }, forEach: function(e, t, n) { var r, o; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, o = e.length; r < o; r++) t.call(n, e[r], r, e); }, trim: function(e) { return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, ""); }, trimRight: function(e) { return String.prototype.trimRight ? e.trimRight() : e.replace(/(\s*$)/g, ""); } }, gd = $de; function _de(e, t) { e = gd.trimRight(e), e[e.length - 1] !== ";" && (e += ";"); var n = e.length, r = !1, o = 0, a = 0, i = ""; function s() { if (!r) { var c = gd.trim(e.slice(o, a)), d = c.indexOf(":"); if (d !== -1) { var f = gd.trim(c.slice(0, d)), h = gd.trim(c.slice(d + 1)); if (f) { var p = t(o, i.length, f, h, c); p && (i += p + "; "); } } } o = a + 1; } for (; a < n; a++) { var l = e[a]; if (l === "/" && e[a + 1] === "*") { var u = e.indexOf("*/", a + 2); if (u === -1) break; a = u + 1, o = a + 1, r = !1; } else l === "(" ? r = !0 : l === ")" ? r = !1 : l === ";" ? r || s() : l === ` ` && s(); } return gd.trim(i); } var Tde = _de, mh = cu, Ode = Tde; function H3(e) { return e == null; } function Fde(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function AO(e) { e = Fde(e || {}), e.whiteList = e.whiteList || mh.whiteList, e.onAttr = e.onAttr || mh.onAttr, e.onIgnoreAttr = e.onIgnoreAttr || mh.onIgnoreAttr, e.safeAttrValue = e.safeAttrValue || mh.safeAttrValue, this.options = e; } AO.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, o = n.onAttr, a = n.onIgnoreAttr, i = n.safeAttrValue, s = Ode(e, function(l, u, c, d, f) { var h = r[c], p = !1; if (h === !0 ? p = h : typeof h == "function" ? p = h(d) : h instanceof RegExp && (p = h.test(d)), p !== !0 && (p = !1), d = i(c, d), !!d) { var v = { position: u, sourcePosition: l, source: f, isWhite: p }; if (p) { var m = o(c, d, v); return H3(m) ? c + ":" + d : m; } else { var m = a(c, d, v); if (!H3(m)) return m; } } }); return s; }; var Ide = AO; (function(e, t) { var n = cu, r = Ide; function o(i, s) { var l = new r(s); return l.process(i); } t = e.exports = o, t.FilterCSS = r; for (var a in n) t[a] = n[a]; typeof window < "u" && (window.filterCSS = e.exports); })(_y, _y.exports); var ow = _y.exports, aw = { indexOf: function(e, t) { var n, r; if (Array.prototype.indexOf) return e.indexOf(t); for (n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; return -1; }, forEach: function(e, t, n) { var r, o; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, o = e.length; r < o; r++) t.call(n, e[r], r, e); }, trim: function(e) { return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, ""); }, spaceIndex: function(e) { var t = /\s|\n|\t/, n = t.exec(e); return n ? n.index : -1; } }, Ade = ow.FilterCSS, Pde = ow.getDefaultWhiteList, Gv = aw; function PO() { return { a: ["target", "href", "title"], abbr: ["title"], address: [], area: ["shape", "coords", "href", "alt"], article: [], aside: [], audio: [ "autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src" ], b: [], bdi: ["dir"], bdo: ["dir"], big: [], blockquote: ["cite"], br: [], caption: [], center: [], cite: [], code: [], col: ["align", "valign", "span", "width"], colgroup: ["align", "valign", "span", "width"], dd: [], del: ["datetime"], details: ["open"], div: [], dl: [], dt: [], em: [], figcaption: [], figure: [], font: ["color", "size", "face"], footer: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], header: [], hr: [], i: [], img: ["src", "alt", "title", "width", "height"], ins: ["datetime"], li: [], mark: [], nav: [], ol: [], p: [], pre: [], s: [], section: [], small: [], span: [], sub: [], summary: [], sup: [], strong: [], strike: [], table: ["width", "border", "align", "valign"], tbody: ["align", "valign"], td: ["width", "rowspan", "colspan", "align", "valign"], tfoot: ["align", "valign"], th: ["width", "rowspan", "colspan", "align", "valign"], thead: ["align", "valign"], tr: ["rowspan", "align", "valign"], tt: [], u: [], ul: [], video: [ "autoplay", "controls", "crossorigin", "loop", "muted", "playsinline", "poster", "preload", "src", "height", "width" ] }; } var LO = new Ade(); function Lde(e, t, n) { } function Rde(e, t, n) { } function Dde(e, t, n) { } function Mde(e, t, n) { } function RO(e) { return e.replace(Bde, "<").replace(zde, ">"); } function Nde(e, t, n, r) { if (n = VO(n), t === "href" || t === "src") { if (n = Gv.trim(n), n === "#") return "#"; if (!(n.substr(0, 7) === "http://" || n.substr(0, 8) === "https://" || n.substr(0, 7) === "mailto:" || n.substr(0, 4) === "tel:" || n.substr(0, 11) === "data:image/" || n.substr(0, 6) === "ftp://" || n.substr(0, 2) === "./" || n.substr(0, 3) === "../" || n[0] === "#" || n[0] === "/")) return ""; } else if (t === "background") { if (yh.lastIndex = 0, yh.test(n)) return ""; } else if (t === "style") { if (U3.lastIndex = 0, U3.test(n) || (q3.lastIndex = 0, q3.test(n) && (yh.lastIndex = 0, yh.test(n)))) return ""; r !== !1 && (r = r || LO, n = r.process(n)); } return n = jO(n), n; } var Bde = //g, Vde = /"/g, jde = /"/g, Hde = /&#([a-zA-Z0-9]*);?/gim, Ude = /:?/gim, qde = /&newline;?/gim, yh = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi, U3 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, q3 = /u\s*r\s*l\s*\(.*/gi; function DO(e) { return e.replace(Vde, """); } function MO(e) { return e.replace(jde, '"'); } function NO(e) { return e.replace(Hde, function(n, r) { return r[0] === "x" || r[0] === "X" ? String.fromCharCode(parseInt(r.substr(1), 16)) : String.fromCharCode(parseInt(r, 10)); }); } function BO(e) { return e.replace(Ude, ":").replace(qde, " "); } function zO(e) { for (var t = "", n = 0, r = e.length; n < r; n++) t += e.charCodeAt(n) < 32 ? " " : e.charAt(n); return Gv.trim(t); } function VO(e) { return e = MO(e), e = NO(e), e = BO(e), e = zO(e), e; } function jO(e) { return e = DO(e), e = RO(e), e; } function Wde() { return ""; } function Gde(e, t) { typeof t != "function" && (t = function() { }); var n = !Array.isArray(e); function r(i) { return n ? !0 : Gv.indexOf(e, i) !== -1; } var o = [], a = !1; return { onIgnoreTag: function(i, s, l) { if (r(i)) if (l.isClosing) { var u = "[/removed]", c = l.position + u.length; return o.push([ a !== !1 ? a : l.position, c ]), a = !1, u; } else return a || (a = l.position), "[removed]"; else return t(i, s, l); }, remove: function(i) { var s = "", l = 0; return Gv.forEach(o, function(u) { s += i.slice(l, u[0]), l = u[1]; }), s += i.slice(l), s; } }; } function Kde(e) { for (var t = "", n = 0; n < e.length; ) { var r = e.indexOf("", r); if (o === -1) break; n = o + 3; } return t; } function Yde(e) { var t = e.split(""); return t = t.filter(function(n) { var r = n.charCodeAt(0); return r === 127 ? !1 : r <= 31 ? r === 10 || r === 13 : !0; }), t.join(""); } Pn.whiteList = PO(); Pn.getDefaultWhiteList = PO; Pn.onTag = Lde; Pn.onIgnoreTag = Rde; Pn.onTagAttr = Dde; Pn.onIgnoreTagAttr = Mde; Pn.safeAttrValue = Nde; Pn.escapeHtml = RO; Pn.escapeQuote = DO; Pn.unescapeQuote = MO; Pn.escapeHtmlEntities = NO; Pn.escapeDangerHtml5Entities = BO; Pn.clearNonPrintableCharacter = zO; Pn.friendlyAttrValue = VO; Pn.escapeAttrValue = jO; Pn.onIgnoreTagStripAll = Wde; Pn.StripTagBody = Gde; Pn.stripCommentTag = Kde; Pn.stripBlankChar = Yde; Pn.cssFilter = LO; Pn.getDefaultCSSWhiteList = Pde; var Cg = {}, hs = aw; function Xde(e) { var t = hs.spaceIndex(e), n; return t === -1 ? n = e.slice(1, -1) : n = e.slice(1, t + 1), n = hs.trim(n).toLowerCase(), n.slice(0, 1) === "/" && (n = n.slice(1)), n.slice(-1) === "/" && (n = n.slice(0, -1)), n; } function Zde(e) { return e.slice(0, 2) === "" || s === l - 1) { r += n(e.slice(o, a)), c = e.slice(a, s + 1), u = Xde(c), r += t( a, r.length, u, c, Zde(c) ), o = s + 1, a = !1; continue; } if (d === '"' || d === "'") for (var f = 1, h = e.charAt(s - f); h.trim() === "" || h === "="; ) { if (h === "=") { i = d; continue e; } h = e.charAt(s - ++f); } } else if (d === i) { i = !1; continue; } } return o < l && (r += n(e.substr(o))), r; } var Qde = /[^a-zA-Z0-9\\_:.-]/gim; function epe(e, t) { var n = 0, r = 0, o = [], a = !1, i = e.length; function s(f, h) { if (f = hs.trim(f), f = f.replace(Qde, "").toLowerCase(), !(f.length < 1)) { var p = t(f, h || ""); p && o.push(p); } } for (var l = 0; l < i; l++) { var u = e.charAt(l), c, d; if (a === !1 && u === "=") { a = e.slice(n, l), n = l + 1, r = e.charAt(n) === '"' || e.charAt(n) === "'" ? n : npe(e, l + 1); continue; } if (a !== !1 && l === r) { if (d = e.indexOf(u, l + 1), d === -1) break; c = hs.trim(e.slice(r + 1, d)), s(a, c), a = !1, l = d, n = l + 1; continue; } if (/\s|\n|\t/.test(u)) if (e = e.replace(/\s|\n|\t/g, " "), a === !1) if (d = tpe(e, l), d === -1) { c = hs.trim(e.slice(n, l)), s(c), a = !1, n = l + 1; continue; } else { l = d - 1; continue; } else if (d = rpe(e, l - 1), d === -1) { c = hs.trim(e.slice(n, l)), c = W3(c), s(a, c), a = !1, n = l + 1; continue; } else continue; } return n < e.length && (a === !1 ? s(e.slice(n)) : s(a, W3(hs.trim(e.slice(n))))), hs.trim(o.join(" ")); } function tpe(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function npe(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "'" || n === '"' ? t : -1; } } function rpe(e, t) { for (; t > 0; t--) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function ope(e) { return e[0] === '"' && e[e.length - 1] === '"' || e[0] === "'" && e[e.length - 1] === "'"; } function W3(e) { return ope(e) ? e.substr(1, e.length - 2) : e; } Cg.parseTag = Jde; Cg.parseAttr = epe; var ape = ow.FilterCSS, da = Pn, HO = Cg, ipe = HO.parseTag, spe = HO.parseAttr, av = aw; function bh(e) { return e == null; } function lpe(e) { var t = av.spaceIndex(e); if (t === -1) return { html: "", closing: e[e.length - 2] === "/" }; e = av.trim(e.slice(t + 1, -1)); var n = e[e.length - 1] === "/"; return n && (e = av.trim(e.slice(0, -1))), { html: e, closing: n }; } function upe(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function cpe(e) { var t = {}; for (var n in e) Array.isArray(e[n]) ? t[n.toLowerCase()] = e[n].map(function(r) { return r.toLowerCase(); }) : t[n.toLowerCase()] = e[n]; return t; } function UO(e) { e = upe(e || {}), e.stripIgnoreTag && (e.onIgnoreTag && console.error( 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time' ), e.onIgnoreTag = da.onIgnoreTagStripAll), e.whiteList || e.allowList ? e.whiteList = cpe(e.whiteList || e.allowList) : e.whiteList = da.whiteList, e.onTag = e.onTag || da.onTag, e.onTagAttr = e.onTagAttr || da.onTagAttr, e.onIgnoreTag = e.onIgnoreTag || da.onIgnoreTag, e.onIgnoreTagAttr = e.onIgnoreTagAttr || da.onIgnoreTagAttr, e.safeAttrValue = e.safeAttrValue || da.safeAttrValue, e.escapeHtml = e.escapeHtml || da.escapeHtml, this.options = e, e.css === !1 ? this.cssFilter = !1 : (e.css = e.css || {}, this.cssFilter = new ape(e.css)); } UO.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, o = n.onTag, a = n.onIgnoreTag, i = n.onTagAttr, s = n.onIgnoreTagAttr, l = n.safeAttrValue, u = n.escapeHtml, c = t.cssFilter; n.stripBlankChar && (e = da.stripBlankChar(e)), n.allowCommentTag || (e = da.stripCommentTag(e)); var d = !1; n.stripIgnoreTagBody && (d = da.StripTagBody( n.stripIgnoreTagBody, a ), a = d.onIgnoreTag); var f = ipe( e, function(h, p, v, m, g) { var b = { sourcePosition: h, position: p, isClosing: g, isWhite: Object.prototype.hasOwnProperty.call(r, v) }, C = o(v, m, b); if (!bh(C)) return C; if (b.isWhite) { if (b.isClosing) return ""; var x = lpe(m), w = r[v], k = spe(x.html, function(S, _) { var O = av.indexOf(w, S) !== -1, F = i(v, S, _, O); return bh(F) ? O ? (_ = l(v, S, _, c), _ ? S + '="' + _ + '"' : S) : (F = s(v, S, _, O), bh(F) ? void 0 : F) : F; }); return m = "<" + v, k && (m += " " + k), x.closing && (m += " /"), m += ">", m; } else return C = a(v, m, b), bh(C) ? u(m) : C; }, u ); return d && (f = d.remove(f)), f; }; var dpe = UO; (function(e, t) { var n = Pn, r = Cg, o = dpe; function a(s, l) { var u = new o(l); return u.process(s); } t = e.exports = a, t.filterXSS = a, t.FilterXSS = o, function() { for (var s in n) t[s] = n[s]; for (var l in r) t[l] = r[l]; }(), typeof window < "u" && (window.filterXSS = e.exports); function i() { return typeof self < "u" && typeof DedicatedWorkerGlobalScope < "u" && self instanceof DedicatedWorkerGlobalScope; } i() && (self.filterXSS = e.exports); })($y, $y.exports); var ppe = $y.exports; const fpe = /* @__PURE__ */ f_(ppe), $a = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, hpe = function(e) { return e.includes("files") ? e : "files/" + e; }, vpe = function(e) { return e = e.replaceAll("\\", "/"), e = e.replaceAll("\\\\", "/"), e; }, gpe = { name: "contextCard", components: { CopyToClipboard: Lc }, mixins: [ode], props: { /** * Object containing information for * the required viewing. */ entry: Object, envVars: Object }, data: function() { return { contextData: {}, showDetails: !0, showContextCard: !0, sampleDetails: {}, loading: !1 }; }, watch: { "entry.contextCardUrl": { handler(e) { e ? e === !0 ? console.error("asked for hardcoding but none provided") : (this.getContextFile(e), this.showContextCard = !0) : this.showContextCard = !1; }, immediate: !0 }, "entry.s3uri": { handler(e) { this.updateS3Bucket(e); }, immediate: !0 } }, computed: { samplesUnderViews: function() { var e, t; if (this.contextData) { if (this.contextData.samplesUnderViews) return !0; { let n = ((e = this.contextData.views) == null ? void 0 : e.map((a) => a.id)) || [], r = ((t = this.contextData.samples) == null ? void 0 : t.map((a) => a.view)) || [], o = n.filter((a) => r.includes(a)); if (n.length === o.length && o.length === r.length) return !0; } } return !1; }, banner: function() { return this.contextData.banner ? this.getFileFromPath(this.contextData.banner) : this.contextData && this.contextData.views && this.contextData.views.length > 0 && this.contextData.views[0].thumbnail ? this.getFileFromPath(this.contextData.views[0].thumbnail) : this.entry.banner; }, updatedCopyContent: function() { var t, n; const e = []; if (this.contextData.heading && e.push(`
    ${this.contextData.heading}
    `), this.contextData.description && e.push(`
    ${this.contextData.description}
    `), (t = this.contextData.views) != null && t.length) { let r = "
    Scaffold Views
    "; const o = []; this.contextData.views.forEach((a, i) => { const s = [], l = this.getFileFromPath(a.path); let u = `
    ${a.description}
    `; if (u += ` `, u += `
    ${l}
    `, s.push(u), this.samplesUnderViews) { let f = `
    ${this.samplesMatching(a.id).description}
    `; if (this.samplesMatching(a.id).path) { f += ` `; const h = this.generateFileLink(this.samplesMatching(a.id)); f += `
    ${h}
    `; } s.push(f); } const c = s.join(` `); o.push(`
  • ${c}
  • `); }), r += ` `, r += `
      ${o.join(` `)}
    `, e.push(r); } if (!this.samplesUnderViews && (n = this.contextData.samples) != null && n.length) { let r = "
    Samples on Scaffold
    "; const o = []; this.contextData.samples.forEach((a, i) => { let s = ""; if (s += `
    ${a.heading}
    `, s += ` `, s += `
    ${a.description}
    `, a.path) { const l = this.generateFileLink(a); s += ` `, s += `
    ${l}
    `; } o.push(`
  • ${s}
  • `); }), r += ` `, r += `
      ${o.join(` `)}
    `, e.push(r); } return e.join(`
    `); } }, methods: { samplesMatching: function(e) { return this.contextData && this.contextData.samples ? this.contextData.samples.filter((t) => t.view == e)[0] : []; }, viewClicked: function(e, t) { this.openViewFile(e), this.toggleSampleDetails(t); }, getContextFile: function(e) { this.loading = !0, fetch(e).then((t) => { if (t.ok) return t.json(); throw Error(t.statusText); }).then((t) => { this.contextData = t, this.loading = !1, this.addDiscoverIdsToContextData(); }).catch((t) => { console.error("caught error!", t), this.discoverId = void 0, this.loading = !1; }); }, removeDoubleFilesPath: function(e) { if (e) return e.includes("files/") ? e.replace("files/", "") : e.includes("files\\") ? e.replace("files\\", "") : e; }, toggleSampleDetails: function(e) { this.sampleDetails[e] === void 0 ? this.sampleDetails[e] = !0 : this.sampleDetails[e] = !this.sampleDetails[e]; }, getFileFromPath: function(e) { return this.entry.contextCardUrl === !0 ? e : (e = this.removeDoubleFilesPath(e), `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${e}${this.getS3Args()}`); }, // This is used later when generateing links to the resource on sparc.science (see generateFileLink) addDiscoverIdsToContextData() { this.contextData.samples.forEach((e, t) => { e && e.doi && e.doi !== "" ? fetch(`${this.envVars.PENNSIEVE_API_LOCATION}/discover/datasets/doi/${this.splitDoiFromUrl(e.doi)}`).then((n) => n.json()).then((n) => { this.contextData.samples[t].discoverId = n.id, this.contextData.samples[t].version = n.version; }) : (this.contextData.samples[t].discoverId = this.entry.discoverId, this.contextData.samples[t].version = this.entry.version); }); }, processPathForUrl(e) { return e = vpe(e), e = hpe(e), encodeURIComponent(e); }, splitDoiFromUrl(e) { return e.split("https://doi.org/").pop(); }, generateFileLink(e) { const t = this.processPathForUrl(e.path); let n = `${this.envVars.ROOT_URL}/file/${e.discoverId}/${e.version}?path=`; return n = n + t, n; }, parseMarkdown(e) { const t = fpe(bt.parse(e)); return this.$emit("context-ready"), t; }, openViewFile: function(e) { const t = this.getFileFromPath(e.path); this.$emit("scaffold-view-clicked", t); } } }, Wc = (e) => (Tr("data-v-48d3f7e3"), e = e(), Or(), e), mpe = { class: "context-card-container", ref: "container" }, ype = { key: 0, class: "context-card" }, bpe = { class: "card-left" }, wpe = ["src"], xpe = { class: "card-right scrollbar" }, kpe = { class: "title" }, Cpe = ["innerHTML"], Spe = { class: "card-bottom" }, Epe = { key: 0, class: "subtitle" }, $pe = ["onClick"], _pe = ["src"], Tpe = { class: "view-description" }, Ope = /* @__PURE__ */ Wc(() => /* @__PURE__ */ B("div", { class: "padding" }, null, -1)), Fpe = /* @__PURE__ */ Wc(() => /* @__PURE__ */ B("div", { style: { "margin-bottom": "16px" } }, null, -1)), Ipe = { key: 1, class: "subtitle" }, Ape = ["onClick"], Ppe = ["src"], Lpe = /* @__PURE__ */ Wc(() => /* @__PURE__ */ B("i", { class: "el-icon-warning-outline info" }, null, -1)), Rpe = ["innerHTML"], Dpe = ["href"], Mpe = /* @__PURE__ */ Wc(() => /* @__PURE__ */ B("div", { class: "padding" }, null, -1)), Npe = { key: 0, class: "subtitle" }, Bpe = ["onClick"], zpe = ["src"], Vpe = { class: "view-description" }, jpe = /* @__PURE__ */ Wc(() => /* @__PURE__ */ B("i", { class: "el-icon-warning-outline info" }, null, -1)), Hpe = ["innerHTML"], Upe = ["href"], qpe = /* @__PURE__ */ Wc(() => /* @__PURE__ */ B("div", { class: "padding" }, null, -1)), Wpe = { key: 2, class: "padding" }, Gpe = { class: "float-button-container" }; function Kpe(e, t, n, r, o, a) { const i = Xe("CopyToClipboard"), s = nc; return E(), L("div", mpe, [ Ne(B("div", null, [ e.showDetails && Object.keys(e.contextData).length !== 0 ? Ne((E(), L("div", ype, [ B("div", bpe, [ B("img", { src: a.banner, class: "context-image" }, null, 8, wpe) ]), B("div", xpe, [ B("div", null, [ B("div", kpe, me(e.contextData.heading), 1), B("div", { innerHTML: a.parseMarkdown(e.contextData.description) }, null, 8, Cpe) ]) ]), B("div", Spe, [ B("div", null, [ a.samplesUnderViews ? (E(), L(De, { key: 1 }, [ e.contextData.views && e.contextData.views.length > 0 ? (E(), L("div", Npe, "Scaffold Views")) : Z("", !0), (E(!0), L(De, null, xt(e.contextData.views, (l, u) => (E(), L(De, { key: u + "_1" }, [ B("span", { onClick: (c) => a.viewClicked(l, u), class: "context-card-view" }, [ B("img", { class: "view-image", src: a.getFileFromPath(l.thumbnail) }, null, 8, zpe), B("div", Vpe, [ Ae(me(l.description), 1), jpe ]) ], 8, Bpe), e.sampleDetails[u] ? (E(), L("div", { key: 0, innerHTML: a.samplesMatching(l.id).description }, null, 8, Hpe)) : Z("", !0), e.sampleDetails[u] && a.samplesMatching(l.id).path ? (E(), L("a", { key: u + "_5", href: a.generateFileLink(a.samplesMatching(l.id)), target: "_blank" }, "View Source", 8, Upe)) : Z("", !0), qpe, e.sampleDetails[u] ? (E(), L("div", Wpe)) : Z("", !0) ], 64))), 128)) ], 64)) : (E(), L(De, { key: 0 }, [ e.contextData.views && e.contextData.views.length > 0 ? (E(), L("div", Epe, "Scaffold Views")) : Z("", !0), (E(!0), L(De, null, xt(e.contextData.views, (l, u) => (E(), L(De, { key: u + "_1" }, [ B("div", { onClick: (c) => a.openViewFile(l), class: "context-card-view" }, [ B("img", { class: "view-image", src: a.getFileFromPath(l.thumbnail) }, null, 8, _pe), B("div", Tpe, me(l.description), 1) ], 8, $pe), Ope ], 64))), 128)), Fpe, e.contextData.samples && e.contextData.samples.length > 0 ? (E(), L("div", Ipe, "Samples on Scaffold")) : Z("", !0), (E(!0), L(De, null, xt(e.contextData.samples, (l, u) => (E(), L(De, { key: u + "_3" }, [ B("span", { class: "context-card-item cursor-pointer", onClick: (c) => a.toggleSampleDetails(u) }, [ (E(), L("div", { key: u + "_6", style: { display: "flex" } }, [ l.color ? (E(), L("div", { key: 0, class: "color-box", style: Ze("background-color:" + l.color) }, null, 4)) : l.thumbnail ? (E(), L("img", { key: 1, class: "key-image", src: a.getFileFromPath(l.thumbnail) }, null, 8, Ppe)) : Z("", !0), Ae(" " + me(l.heading) + " ", 1), Lpe ])) ], 8, Ape), e.sampleDetails[u] ? (E(), L("div", { key: 0, innerHTML: l.description }, null, 8, Rpe)) : Z("", !0), e.sampleDetails[u] && l.path ? (E(), L("a", { key: 1, href: a.generateFileLink(l), target: "_blank" }, "View Source", 8, Dpe)) : Z("", !0), Mpe ], 64))), 128)) ], 64)) ]) ]) ])), [ [s, e.loading] ]) : Z("", !0), B("div", Gpe, [ W(i, { content: a.updatedCopyContent, theme: "light" }, null, 8, ["content"]) ]) ], 512), [ [ft, e.showContextCard] ]) ], 512); } const qO = /* @__PURE__ */ $a(gpe, [["render", Kpe], ["__scopeId", "data-v-48d3f7e3"]]), Ype = { name: "FlatmapContextCard", components: { Loading: T_, CopyToClipboard: Lc }, props: { /** * Object containing information for * the required viewing. Can be retrieved from a flatmap */ mapImpProv: Object }, data: function() { return { contextData: {}, showDetails: !0, showContextCard: !0, sampleDetails: {}, loading: !1, copyContent: "" }; }, computed: { flatmapPublishedDisplay: function() { let e = "Unknown"; return this.mapImpProv && (e = new Date(this.mapImpProv.created).toLocaleDateString("en-US", { day: "2-digit", month: "long", year: "numeric" })), e; }, sckanReleaseDisplay: function() { var t, n; let e = "Unknown"; if (this.mapImpProv) { if (e = (t = this.mapImpProv.connectivity) == null ? void 0 : t.npo.date, !e) { let o = ((n = this.mapImpProv.sckan) != null && n.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan).replace(",", "."); e = new Date(o).toLocaleDateString("en-US", { day: "2-digit", month: "long", year: "numeric" }); } e || (e = "Unknown"); } return e; }, sckanReleaseLink: function() { var t, n; let e = "Unknown"; return this.mapImpProv && (e = (t = this.mapImpProv.connectivity) == null ? void 0 : t.npo.path, e || (e = (n = this.mapImpProv.sckan) == null ? void 0 : n.release), e || (e = "Unknown")), e; }, flatmapSource: function() { let e = "Unknown"; return this.mapImpProv && (e = this.mapImpProv.source), e; } }, mounted: function() { this.updateCopyContent(); }, methods: { updateCopyContent: function() { const e = []; e.push("
    Flatmap Provenance
    "); let t = "
    SCKAN version:
    "; t += ` `, t += `
    ${this.sckanReleaseLink}
    `, e.push(t); let n = "
    Published on:
    "; n += ` `, n += `
    ${this.flatmapPublishedDisplay}
    `, e.push(n); let r = "
    View publication:
    "; r += ` `, r += `
    ${this.flatmapSource}
    `, e.push(r), this.copyContent = e.join(`
    `); } } }, Sg = (e) => (Tr("data-v-c655abd4"), e = e(), Or(), e), Xpe = { class: "flatmap-context-card" }, Zpe = { class: "card-right scrollbar" }, Jpe = /* @__PURE__ */ Sg(() => /* @__PURE__ */ B("div", { class: "title" }, "Flatmap Provenance", -1)), Qpe = ["href"], efe = /* @__PURE__ */ Sg(() => /* @__PURE__ */ B("br", null, null, -1)), tfe = /* @__PURE__ */ Sg(() => /* @__PURE__ */ B("br", null, null, -1)), nfe = ["href"], rfe = /* @__PURE__ */ Sg(() => /* @__PURE__ */ B("br", null, null, -1)), ofe = { class: "float-button-container" }; function afe(e, t, n, r, o, a) { const i = Xe("CopyToClipboard"), s = nc; return Ne((E(), L("div", Xpe, [ B("div", Zpe, [ Jpe, Ae(" SCKAN version: "), B("a", { href: a.sckanReleaseLink, target: "_blank" }, me(a.sckanReleaseDisplay), 9, Qpe), efe, Ae(" Published on: " + me(a.flatmapPublishedDisplay) + " ", 1), tfe, Ae(" View publication "), B("a", { href: a.flatmapSource, target: "_blank" }, "here", 8, nfe), rfe ]), B("div", ofe, [ W(i, { content: e.copyContent, theme: "light" }, null, 8, ["content"]) ]) ])), [ [s, e.loading] ]); } const WO = /* @__PURE__ */ $a(Ype, [["render", afe], ["__scopeId", "data-v-c655abd4"]]); function ife(e) { return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) { var r = e.get(t); r ? r.push(n) : e.set(t, [n]); }, off: function(t, n) { var r = e.get(t); r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e.set(t, [])); }, emit: function(t, n) { var r = e.get(t); r && r.slice().map(function(o) { o(n); }), (r = e.get("*")) && r.slice().map(function(o) { o(t, n); }); } }; } const Qt = new ife(), GO = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, sfe = ["xlink:href"], lfe = { __name: "SvgIcon", props: { /** * The svg icon to show. */ icon: { type: String, required: !0 }, /** * The option to spin the icon. */ spin: { type: Boolean, default: !1 } }, setup(e) { return (t, n) => (E(), L("svg", { class: V(["map-icon", { "map-icon-spin": e.spin }]) }, [ B("use", { "xlink:href": `#${e.icon}` }, null, 8, sfe) ], 2)); } }, iw = /* @__PURE__ */ GO(lfe, [["__scopeId", "data-v-e172d5ff"]]), KO = ` 2horpanel ? `, YO = ` 2vertpanel ? `, XO = ` 3panel ? `, ZO = ` 4panel ? `, JO = ` 2horpanel ? `, QO = ` 2horpanel ? `, eF = ` 4panel ? `, tF = ` changeBckgd `, nF = ` close no bk `, rF = ` close `, oF = ` closeFullScreen `, aF = ` Comment `, iF = ` Connection `, sF = ` dock `, lF = ` drawLine `, uF = ` drawPoint `, cF = ` drawPolygon `, dF = ` drawTrash `, pF = ` fitWindow `, fF = ` fullScreen `, hF = 'DataPortal-Icons', vF = ` magnifyingGlass `, gF = `Created by Wahyu Prihantorofrom the Noun Project`, mF = ` openMap `, yF = ` Artboard Copy 6 `, bF = ` permalink `, wF = ` play `, xF = ` resetZoom `, kF = ` singlepanel ? `, CF = ` tooltips ? `, SF = ` undock `, EF = ` zoomIn `, $F = ` zoomOut `, _F = (e, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, o.map((u) => { const c = s.querySelector(u); c && c.remove(); }), a.map((u) => { s.querySelector("svg").removeAttribute(u); }), r && i.map((u) => { Object.values(s.querySelectorAll(`[${u}]`)).map((c) => { c.removeAttribute(u); }); }); const l = s.innerHTML; return s = null, l; }, TF = (e) => [ // Remove XML stuffs and comments [/<\?xml[\s\S]*?>/gi, ""], [//gi, ""], [//gi, ""], // SVG XML -> HTML5 [/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>"], // convert self-closing XML SVG nodes to explicitly closed HTML5 SVG nodes [/\s+/g, " "], // replace whitespace sequences with a single space [/\> \<"] // remove whitespace between tags ].reduce((t, n) => "".replace.apply(t, n), e).trim(), ufe = !0, cfe = !0, dfe = ["fill"], Ty = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": KO, "/assets/icons/2vertpanel.svg": YO, "/assets/icons/3panel.svg": XO, "/assets/icons/4panel.svg": ZO, "/assets/icons/5panel.svg": JO, "/assets/icons/6panel.svg": QO, "/assets/icons/6panelVertical.svg": eF, "/assets/icons/changeBckgd.svg": tF, "/assets/icons/close-no-bk.svg": nF, "/assets/icons/close.svg": rF, "/assets/icons/closeFullScreen.svg": oF, "/assets/icons/comment.svg": aF, "/assets/icons/connection.svg": iF, "/assets/icons/dock.svg": sF, "/assets/icons/drawLine.svg": lF, "/assets/icons/drawPoint.svg": uF, "/assets/icons/drawPolygon.svg": cF, "/assets/icons/drawTrash.svg": dF, "/assets/icons/fitWindow.svg": pF, "/assets/icons/fullScreen.svg": fF, "/assets/icons/help.svg": hF, "/assets/icons/magnifyingGlass.svg": vF, "/assets/icons/noun-filter.svg": gF, "/assets/icons/openMap.svg": mF, "/assets/icons/pause.svg": yF, "/assets/icons/permalink.svg": bF, "/assets/icons/play.svg": wF, "/assets/icons/resetZoom.svg": xF, "/assets/icons/singlepanel.svg": kF, "/assets/icons/tooltips.svg": CF, "/assets/icons/undock.svg": SF, "/assets/icons/zoomIn.svg": EF, "/assets/icons/zoomOut.svg": $F }), pfe = Object.keys(Ty).map((e) => { const t = _F(Ty[e], ufe, cfe, dfe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return TF(t).replace("", "symbol>"); }); pfe.join(` `); const Oy = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": KO, "/assets/icons/2vertpanel.svg": YO, "/assets/icons/3panel.svg": XO, "/assets/icons/4panel.svg": ZO, "/assets/icons/5panel.svg": JO, "/assets/icons/6panel.svg": QO, "/assets/icons/6panelVertical.svg": eF, "/assets/icons/changeBckgd.svg": tF, "/assets/icons/close-no-bk.svg": nF, "/assets/icons/close.svg": rF, "/assets/icons/closeFullScreen.svg": oF, "/assets/icons/comment.svg": aF, "/assets/icons/connection.svg": iF, "/assets/icons/dock.svg": sF, "/assets/icons/drawLine.svg": lF, "/assets/icons/drawPoint.svg": uF, "/assets/icons/drawPolygon.svg": cF, "/assets/icons/drawTrash.svg": dF, "/assets/icons/fitWindow.svg": pF, "/assets/icons/fullScreen.svg": fF, "/assets/icons/help.svg": hF, "/assets/icons/magnifyingGlass.svg": vF, "/assets/icons/noun-filter.svg": gF, "/assets/icons/openMap.svg": mF, "/assets/icons/pause.svg": yF, "/assets/icons/permalink.svg": bF, "/assets/icons/play.svg": wF, "/assets/icons/resetZoom.svg": xF, "/assets/icons/singlepanel.svg": kF, "/assets/icons/tooltips.svg": CF, "/assets/icons/undock.svg": SF, "/assets/icons/zoomIn.svg": EF, "/assets/icons/zoomOut.svg": $F }), ffe = Object.keys(Oy).map((e) => { const t = _F(Oy[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return TF(t).replace("", "symbol>"); }), hfe = { name: "MapSvgSpriteColor", svgContext: Oy, svgSprite: ffe.join(` `) // concatenate all symbols into $options.svgSprite }, vfe = ["innerHTML"]; function gfe(e, t, n, r, o, a) { return E(), L("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, vfe); } const OF = /* @__PURE__ */ GO(hfe, [["render", gfe]]), sw = () => ({ entries: [ { resource: "Human Male", type: "MultiFlatmap", mode: "main", id: 1, state: void 0, label: "", discoverId: void 0 } ] }), mfe = async (e, t) => { let n = {}; if (e === "AC") n = { resource: "Human Male", type: "MultiFlatmap", mode: "main", state: void 0, label: "", discoverId: void 0 }; else if (e === "FC") n = { resource: "FunctionalConnectivity", type: "Flatmap", mode: "main", state: void 0, label: "Functional", discoverId: void 0 }; else if (e === "3D") { const r = await FF(t, "human"); n = { resource: r.url, type: "Scaffold", mode: "main", state: void 0, label: "Human", discoverId: r.datasetInfo.discoverId, contextCardUrl: r.datasetInfo.contextCardUrl, s3uri: r.datasetInfo.s3uri, version: r.datasetInfo.version, isBodyScaffold: !0 }; } return n; }, yfe = async (e, t) => { const n = sw(); if (e === "FC") n.entries[0].resource = "FunctionalConnectivity", n.entries[0].type = "Flatmap", n.entries[0].label = "Functional"; else if (e === "WholeBody") { const r = await FF(t, "human"); n.entries[0].resource = r.url, n.entries[0].contextCardUrl = r.datasetInfo.contextCardUrl, n.entries[0].discoverId = r.datasetInfo.discoverId, n.entries[0].s3uri = r.datasetInfo.s3uri, n.entries[0].version = r.datasetInfo.version, n.entries[0].type = "Scaffold", n.entries[0].label = "Human", n.entries[0].isBodyScaffold = !0; } return n; }, G3 = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), bfe = () => ({ "Human Female": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !1 }, "Human Male": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !1 }, Rat: { taxo: "NCBITaxon:10114", iconClass: "mapicon-icon_rat", displayLatestChanges: !0, displayWarning: !1 }, Mouse: { taxo: "NCBITaxon:10090", iconClass: "mapicon-icon_mouse", displayLatestChanges: !0, displayWarning: !1 }, Pig: { taxo: "NCBITaxon:9823", iconClass: "mapicon-icon_pig", displayLatestChanges: !0, displayWarning: !1 }, Cat: { taxo: "NCBITaxon:9685", iconClass: "mapicon-icon_cat", displayLatestChanges: !0, displayWarning: !0 } }), wfe = (e) => { if (e) { const t = bfe(); for (let n in t) if (e.taxo === t[n].taxo) if (e.biologicalSex && t[n].biologicalSex) { if (e.biologicalSex === t[n].biologicalSex) return n; } else return n; } return ""; }, xfe = (e) => { if (e) { const t = e.split("//")[1]; if (t) { const n = t.split("/")[0], r = t.indexOf("/"), o = t.substring(r + 1); return { s3Bucket: n, s3Prefix: o }; } } }, FF = async (e, t) => { let n = "", r; const o = await fetch(`${e}get_body_scaffold_info/${t}`); if (o.ok) { const a = await o.json(), i = xfe(a.s3uri); n = `${e}s3-resource/${i.s3Prefix}files/${a.path}?s3BucketName=${i.s3Bucket}`; const s = `${e}s3-resource/${i.s3Prefix}files/${a.contextinfo}?s3BucketName=${i.s3Bucket}`; r = { s3uri: a.s3uri, contextCardUrl: s, discoverId: a.id, version: a.version }; } else n = "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/27-4-23-human/human_body_metadata.json"; return { url: n, datasetInfo: r }; }, kfe = (e, t) => e.filter((n) => t.includes(n)), rAe = (e) => Object.keys(e).map((t) => `${t}=${e[t]}`).join("&"), Eg = E0("entries", { state: () => sw(), getters: { findIndexOfId: (e) => (t) => { for (let n = 0; n < e.entries.length; n++) if (e.entries[n].id == t) return n; return -1; } }, actions: { addNewEntry(e) { this.entries.push(e); }, destroyEntry(e) { e > -1 && this.entries.splice(e, 1); }, setAll(e) { this.entries = [], Object.assign(this.entries, e); }, updateViewForEntry({ id: e, viewUrl: t }) { const n = this.entries.find((r) => r.id === e); n.viewUrl = t; } } }), Sp = E0("settings", { state: () => ({ shareLink: void 0, sparcApi: void 0, algoliaIndex: "k-core_dev_published_time_desc", algoliaKey: void 0, algoliaId: void 0, pennsieveApi: void 0, flatmapAPI: void 0, nlLinkPrefix: void 0, flatmapAPI2: "https://mapcore-demo.org/curation/flatmap/", mapManager: void 0, rootUrl: void 0, facets: { species: [], gender: [], organ: [] }, numberOfDatasetsForFacets: [], markers: [], hoverAnatomies: [], hoverOrgans: [], featuredMarkers: [], featuredMarkerIdentifiers: [], featuredMarkerDois: [], featuredMarkerSpecies: [], featuredDatasetIdentifiers: [], helpDelay: 0, useHelpModeDialog: !1, connectivityInfoSidebar: !0, annotationSidebar: !0 }), getters: { isFeaturedMarkerIdentifier: (e) => (t) => e.featuredMarkerIdentifiers.includes(t), featuredMarkerDoi: (e) => (t) => { const n = e.featuredMarkerIdentifiers.findIndex( (r) => r == t ); return e.featuredMarkerDois[n]; } }, actions: { updateShareLink(e) { this.shareLink = e; }, updateSparcAPI(e) { this.sparcApi = e; }, updateAlgoliaIndex(e) { this.algoliaIndex = e; }, updateAlgoliaKey(e) { this.algoliaKey = e; }, updateAlgoliaId(e) { this.algoliaId = e; }, updatePennsieveApi(e) { this.pennsieveApi = e; }, updateFlatmapAPI(e) { this.flatmapAPI = e; }, updateFlatmapAPI2(e) { this.flatmapAPI2 = e; }, updateMapManager(e) { this.mapManager = e; }, updateNLLinkPrefix(e) { this.nlLinkPrefix = e; }, updateRootUrl(e) { this.rootUrl = e; }, updateMarkers(e) { this.markers = e; }, updateHoverFeatures(e, t) { this.hoverAnatomies = e, this.hoverOrgans = t; }, updateFeatured(e) { this.featuredMarkerIdentifiers = new Array(e.length), this.featuredMarkers = new Array(e.length), this.featuredMarkerDois = new Array(e.length), this.featuredMarkerSpecies = new Array(e.length), this.featuredDatasetIdentifiers = e; }, updateFeaturedMarker(e) { const t = this.featuredDatasetIdentifiers.findIndex( (n) => n == e.identifier ); this.featuredMarkers[t] = e.marker, this.featuredMarkerDois[t] = e.doi, this.featuredMarkerSpecies[t] = e.species; }, updateFeaturedMarkerIdentifier(e) { this.featuredMarkerIdentifiers[e.index] = e.markerIdentifier; }, resetFeaturedMarkerIdentifier() { this.featuredMarkerIdentifiers = new Array( this.featuredDatasetIdentifiers.length ); }, updateFacets(e) { let t = { species: [], gender: [], organ: [] }; if (e) { e.forEach((n) => { switch (n.term.toLowerCase()) { case "species": n.facet.toLowerCase() !== "show all" ? (t.species.push(n.facet), this.facets.species.includes(n.facet) || this.facets.species.push(n.facet)) : this.facets.species = []; break; case "gender": n.facet.toLowerCase() !== "show all" && (t.gender.push(n.facet), this.facets.species.includes(n.facet) || this.facets.gender.push(n.facet)); break; case "organ": n.facet.toLowerCase() !== "show all" && (t.organ.push(n.facet), this.facets.species.includes(n.facet) || this.facets.organ.push(n.facet)); break; } }); for (const [n, r] of Object.entries(this.facets)) { let o = 0; for (o = r.length - 1; o >= 0; o -= 1) t[n].indexOf(r[o]) == -1 && r.splice(o, 1); } } }, updateNumberOfDatasetsForFacets(e) { this.numberOfDatasetsForFacets = e; }, updateUseHelpModeDialog(e) { this.useHelpModeDialog = e; }, updateConnectivityInfoSidebar(e) { this.connectivityInfoSidebar = e; }, updateAnnotationSidebar(e) { this.annotationSidebar = e; } } }), md = [ { id: "ilxtr:neuron-type-keast-13", centrelines: [ "n_71" ] }, { id: "ilxtr:neuron-type-keast-2", centrelines: [ "bladder_n" ] }, { id: "ilxtr:neuron-type-keast-3", centrelines: [ "bladder_n", "hypogastric_n" ] }, { id: "ilxtr:neuron-type-keast-15", centrelines: [ "n_73" ] }, { id: "ilxtr:neuron-type-keast-1", centrelines: [ "bladder_n" ] }, { id: "ilxtr:neuron-type-keast-7", centrelines: [ "L1_ventral_root_ramus", "L1_spinal_n-1", "lumbar_splanchnic_n", "L2_spinal_n", "L2_ventral_root_ramus" ] }, { id: "ilxtr:neuron-type-keast-9", centrelines: [ "L6_spinal_n-1", "L6_ventral_root", "pudendal_n", "L5_spinal_n", "L5_ventral_root" ] }, { id: "ilxtr:neuron-type-keast-10", centrelines: [ "S1_dorsal_root", "S1_spinal_n-2", "pelvic_splanchnic_n", "L6_spinal_n-2", "L6_dorsal_root", "bladder_n" ] }, { id: "ilxtr:neuron-type-keast-11", centrelines: [ "lumbar_splanchnic_n", "L2_spinal_n", "L1_spinal_n-1", "hypogastric_n", "bladder_n", "L1_dorsal_root", "L2_dorsal_root" ] }, { id: "ilxtr:neuron-type-keast-12", centrelines: [ "L6_spinal_n-1", "L6_dorsal_root", "pudendal_n", "S1_spinal_n-1", "S1_dorsal_root" ] }, { id: "ilxtr:neuron-type-keast-8", centrelines: [ "L1_ventral_root_paravertebral_ganglion", "L1-L2_interganglionic_segment", "sympathetic_trunk_T13-L1", "L2_ventral_root_paravertebral_ganglion", "sympathetic_trunk_L2-L3", "sympathetic_trunk_L4-L5", "sympathetic_trunk_L3-L4", "sympathetic_trunk_L5-L6", "sympathetic_trunk_T12-T13" ] }, { id: "ilxtr:neuron-type-keast-20", centrelines: [ "T1_T2_cns", "C8_T1_cns", "T2_T3_cns", "T10_T11_cns", "T9_T10_cns", "T11_T12_cns", "T8_T9_cns", "C7_C8_cns", "C6_C7_cns", "C4_C5_cns", "C3_C4_cns", "C5_C6_cns", "medulla_C1_cns", "pons_medulla_cns", "C1_C2_cns", "T5_T6_cns", "T4_T5_cns", "T6_T7_cns", "L3_L4_cns", "L2_L3_cns", "L4_L5_cns", "L5_L6_cns", "T13_L1_cns", "T12_T13_cns", "L1_L2_cns", "T3_T4_cns", "n_69", "C2_C3_cns", "T7_T8_cns" ] }, { id: "ilxtr:neuron-type-keast-16", centrelines: [ "n_74" ] }, { id: "ilxtr:neuron-type-keast-4", centrelines: [ "sympathetic_trunk_L6-S1", "L6_gray_ramus-spinal_n", "sympathetic_trunk_L5-L6", "S1_gray_ramus-spinal_n", "S1_spinal_n-2", "pelvic_splanchnic_n", "L6_spinal_n-2", "L1-L2_interganglionic_segment", "sympathetic_trunk_T13-L1", "sympathetic_trunk_L2-L3", "bladder_n", "sympathetic_trunk_L4-L5", "sympathetic_trunk_L3-L4", "sympathetic_trunk_T12-T13" ] }, { id: "ilxtr:neuron-type-keast-17", centrelines: [ "n_75" ] }, { id: "ilxtr:neuron-type-keast-5", centrelines: [ "S1_ventral_root", "S1_spinal_n-2", "pelvic_splanchnic_n", "L6_spinal_n-2", "L6_ventral_root" ] }, { id: "ilxtr:neuron-type-keast-18", centrelines: [ "n_70" ] }, { id: "ilxtr:neuron-type-keast-6", centrelines: [ "L1_ventral_root_ramus", "L1_spinal_n-1", "lumbar_splanchnic_n", "L2_spinal_n", "hypogastric_n", "L2_ventral_root_ramus" ] }, { id: "ilxtr:neuron-type-keast-19", centrelines: [ "n_69" ] }, { id: "ilxtr:neuron-type-keast-14", centrelines: [ "n_72" ] } ]; function Cfe() { return [ { id: "UBERON:0000948", name: "Heart", type: "simulation" }, { id: "UBERON:0001156", name: "Colon", type: "simulation" }, { id: "UBERON:0001255", name: "Bladder", type: "simulation" }, { id: "UBERON:0000945", name: "Stomach", type: "simulation" }, { id: "UBERON:0001759", name: "Vagus nerve", type: "simulation" }, { id: "UBERON:0002108", name: "Small intestines", type: "simulation" }, { id: "UBERON:0002107", name: "Liver", type: "simulation" } ]; } function Sfe() { return Cfe(); } function oAe(e) { if (e) for (let t = 0; t < md.length; t++) { if (md[t].id == e) return md[t].centrelines; if (md[t].centrelines.find((r) => r === e)) return [md[t].id]; } return []; } function aAe(e) { if (e) { const t = e.toLowerCase(); if (t.includes("heart")) return { id: "UBERON:0000948", name: "Heart" }; if (t.includes("liver")) return { id: "UBERON:0002107", name: "Liver" }; if (t.includes("stomach")) return { id: "UBERON:0000945", name: "Stomach" }; if (t.includes("colon")) return { id: "UBERON:0001156", name: "Colon" }; if (t.includes("bladder")) return { id: "UBERON:0001255", name: "Bladder" }; } } const IF = (e) => { switch (e) { case "2horpanel": return { "split-1": { content: !1, horizontal: !0, children: ["pane-1", "pane-2"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 } }; case "2vertpanel": return { "split-1": { content: !1, horizontal: !1, children: ["pane-1", "pane-2"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 } }; case "3panel": return { "split-1": { content: !1, horizontal: !1, children: ["pane-1", "split-2"] }, "split-2": { content: !1, horizontal: !0, children: ["pane-2", "pane-3"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 } }; case "4panel": return { "split-1": { content: !1, horizontal: !1, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !0, children: ["pane-2", "pane-3"] }, "split-3": { content: !1, horizontal: !0, children: ["pane-1", "pane-4"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 } }; case "5panel": return { "split-1": { content: !1, horizontal: !0, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !1, children: ["pane-2", "pane-3"] }, "split-3": { content: !1, horizontal: !1, children: ["pane-1", "pane-4", "pane-5"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 }, "pane-5": { content: !0, id: 5 } }; case "6panel": return { "split-1": { content: !1, horizontal: !0, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !1, children: ["pane-2", "pane-3", "pane-5"] }, "split-3": { content: !1, horizontal: !1, children: ["pane-1", "pane-4", "pane-6"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 }, "pane-5": { content: !0, id: 5 }, "pane-6": { content: !0, id: 6 } }; case "6panelVertical": return { "split-1": { content: !1, horizontal: !1, children: ["split-3", "split-2"] }, "split-2": { content: !1, horizontal: !0, children: ["pane-2", "pane-3", "pane-5"] }, "split-3": { content: !1, horizontal: !0, children: ["pane-1", "pane-4", "pane-6"] }, "pane-1": { content: !0, id: 1 }, "pane-2": { content: !0, id: 2 }, "pane-3": { content: !0, id: 3 }, "pane-4": { content: !0, id: 4 }, "pane-5": { content: !0, id: 5 }, "pane-6": { content: !0, id: 6 } }; case "singlepanel": default: return { "split-1": { content: !1, horizontal: !1, children: ["pane-1"] }, "pane-1": { content: !0, id: 1 } }; } }, Efe = (e, t) => { const n = [], r = []; for (const [o, a] of Object.entries(t)) a.content && (n.includes(a.id) ? r.push(o) : n.push(a.id)); r.forEach((o) => { let a = !1; for (let i = 0; i < e.length && !a; i++) n.includes(e[i].id) || (t[o].id = e[i].id, n.push(e.id), a = !0); }); }, $fe = (e) => { const t = {}; for (const [n, r] of Object.entries(e)) r.content && (t[n] = r); return t; }, wh = (e, t) => { const n = $fe(e), r = IF(t); for (const [o, a] of Object.entries(n)) r[o] = a; return r; }, ol = (e, t) => Object.keys(e).find((n) => e[n].id === t), K3 = () => ({ activeView: "singlepanel", idNamePair: {}, viewIcons: [ { icon: "singlepanel", name: "Single view", min: 1 }, { icon: "2horpanel", name: "Horizontal split", min: 2 }, { icon: "2vertpanel", name: "Vertical split", min: 2 }, { icon: "3panel", name: "Three panes", min: 3 }, { icon: "4panel", name: "Four panes", min: 4 }, { icon: "5panel", name: "Five panes", min: 5 }, { icon: "6panel", name: "Six (horizontal)", min: 6 }, { icon: "6panelVertical", name: "Six (vertical)", min: 6 } //{ icon: "customise", name: "Customise", min: 2 } ], customLayout: { "split-1": { content: !1, horizontal: !1, children: ["pane-1"] }, "pane-1": { content: !0, id: 1 } /* Example layout "split-1": {content: false, horizontal: true, children: ["split-2", "pane-1"]}, "split-2": {content: false, horizontal: false, children: ["pane-2", "pane-3"]}, "pane-1": {content: true, id: 1}, "pane-2": {content: true, id: 2}, "pane-3": {content: true, id: 3}, */ }, splitters: { first: 50, second: 50, third: 50 }, globalCallback: !1, syncMode: !1 }), du = E0("splitFlow", { state: () => K3(), getters: { getPaneNameById: (e) => (t) => ol(e.customLayout, t), getState: (e) => () => ({ activeView: e.activeView, splitters: e.splitters, globalCallback: e.globalCallback, customLayout: e.customLayout, syncMode: e.syncMode }) }, actions: { assignOrSwapPaneWithIds(e) { let t = ol(this.customLayout, e.source), n = ol(this.customLayout, e.target); this.syncMode && !(n || t) && (this.syncMode = !1, this.globalCallback = !1), n && (this.customLayout[n].id = e.source), t && (this.customLayout[t].id = e.target); }, getAvailableTerms(e) { let t = Sfe(); for (let n = 0; n < t.length; n++) this.idNamePair[t[n].id] = t[n].name; if (e) { this._controller && this._controller.abort(), this._controller = new AbortController(); let n = this._controller.signal; fetch(`${e}get-organ-curies`, { signal: n }).then((r) => r.json()).then((r) => { this._controller = void 0, r.uberon.array.forEach((o) => { this.idNamePair[o.id.toUpperCase()] = o.name.charAt(0).toUpperCase() + o.name.slice(1); }); }); } }, toggleGlobalCallback(e) { this.globalCallback = e; }, updateActiveView(e) { if (this.syncMode) { const n = this.viewIcons.find( (o) => this.activeView === o.icon ), r = this.viewIcons.find( (o) => e.view === o.icon ); n.min == 2 && r.min == 2 || (this.syncMode = !1, this.globalCallback = !1); } this.activeView = e.view; const t = wh( this.customLayout, this.activeView ); Efe(e.entries, t); for (const [n, r] of Object.entries(t)) this.customLayout[n] = r; }, setSplitter(e) { this.splitters[e.name] && (this.splitters[e.name] = e.value); }, setState(e) { if (e) { let t; if (e.activeView && (this.activeView = e.activeView), e.customLayout) t = e.customLayout; else if (t = IF(this.activeView), e.slotInfo) for (let n = 0; n < e.slotInfo.length; n++) switch (e.slotInfo[n].name) { case "first": t["pane-1"].id = e.slotInfo[n].id; break; case "second": "pane-2" in t && (t["pane-2"].id = e.slotInfo[n].id); break; case "thrid": "pane-3" in t && (t["pane-3"].id = e.slotInfo[n].id); break; case "fourth": "pane-4" in t && (t["pane-4"].id = e.slotInfo[n].id); break; case "fifth": "pane-5" in t && (t["pane-5"].id = e.slotInfo[n].id); break; case "sixth": "pane-6" in t && (t["pane-6"].id = e.slotInfo[n].id); break; } for (const [n, r] of Object.entries(t)) this.customLayout[n] = r; e.globalCallback && (this.globalCallback = e.globalCallback); for (const [n, r] of Object.entries(e.splitters)) this.splitters[n] = r; e.syncMode && (this.syncMode = e.syncMode); } }, setIdToPrimaryPane(e) { const t = ol(this.customLayout, e), n = this.customLayout["pane-1"].id; this.customLayout["pane-1"].id = e, t && (this.customLayout[t].id = n); }, setSyncMode(e) { if (e) if (e.flag === !0) { this.activeView = e.layout; const t = wh( this.customLayout, this.activeView ), n = ol(t, 1), r = t["pane-1"].id; n !== "pane-1" && (t["pane-1"].id = r), t["pane-1"].id = 1, t["pane-2"].id = e.newId; for (const [o, a] of Object.entries(t)) this.customLayout[o] = a; this.syncMode = !0, this.globalCallback = !0; } else { this.activeView = "singlepanel"; const t = wh( this.customLayout, this.activeView ); for (const [n, r] of Object.entries(t)) this.customLayout[n] = r; this.syncMode = !1, this.globalCallback = !1; } }, reset() { const e = K3(); this.activeView = e.activeView, this.customLayout = e.customLayout, this.splitters = e.splitters, this.globalCallback = e.globalCallback, this.syncMode = e.syncMode; }, closeSlot(e) { if (e) { this.syncMode = !1, this.globalCallback = !1; let t = 0; if (e.id === 1) t = 1; else if (e.entries) for (let n = 0; n < e.entries.length && t == 0; n++) ol(e.entries[n].id) === void 0 && (t = e.entries[n].id); if (this.activeView !== "customise") { const n = this.activeView; switch (this.activeView) { case "2horpanel": case "2vertpanel": this.activeView = "singlepanel"; break; case "3panel": this.activeView = "2vertpanel"; break; case "4panel": this.activeView = "3panel"; break; case "5panel": this.activeView = "4panel"; break; case "6panelVertical": case "6panel": this.activeView = "5panel"; break; } const r = wh( this.customLayout, this.activeView ); switch (ol(r, e.id)) { case "pane-1": switch (n) { case "2horpanel": case "2vertpanel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = t; break; case "3panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = t; break; case "4panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = t; break; case "5panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-1"].id = r["pane-2"].id, r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-2": switch (n) { case "2horpanel": case "2vertpanel": r["pane-2"].id = t; break; case "3panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = t; break; case "4panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = t; break; case "5panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-2"].id = r["pane-3"].id, r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-3": switch (n) { case "3panel": r["pane-3"].id = t; break; case "4panel": r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = t; break; case "5panel": r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-3"].id = r["pane-4"].id, r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-4": switch (n) { case "4panel": r["pane-4"].id = t; break; case "5panel": r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-4"].id = r["pane-5"].id, r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-5": switch (n) { case "5panel": r["pane-5"].id = t; break; case "6panelVertical": case "6panel": r["pane-5"].id = r["pane-6"].id, r["pane-6"].id = t; break; } break; case "pane-6": switch (n) { case "6panelVertical": case "6panel": r["pane-6"].id = t; break; } break; } for (const [a, i] of Object.entries(r)) this.customLayout[a] = i; } } } } }), _fe = { name: "ContentBar", components: { ElIconArrowDown: Tb, ElIconArrowUp: S$, ElIconInfoFilled: CB, Input: B0, Option: $_, Popover: H0, Row: V0, Select: E_, ContextCard: qO, FlatmapContextCard: WO, MapSvgIcon: iw }, props: { entry: Object }, data: function() { return { contextCardVisible: !1, slot: {}, boundariesElement: null, // this is set @vue:mounted by the parent component via the 'setBoundary' method showDetails: !0, contextCardEntry: void 0, titles: [] }; }, computed: { ...Zl(Eg, Sp, du), helpDelay() { return this.settingsStore.helpDelay; }, activeView: function() { return this.splitFlowStore.activeView; }, envVars: function() { return { API_LOCATION: this.settingsStore.sparcApi, ALGOLIA_INDEX: this.settingsStore.algoliaIndex, ALGOLIA_KEY: this.settingsStore.algoliaKey, ALGOLIA_ID: this.settingsStore.algoliaId, PENNSIEVE_API_LOCATION: this.settingsStore.pennsieveApi, NL_LINK_PREFIX: this.settingsStore.nlLinkPrefix, ROOT_URL: this.settingsStore.rootUrl }; }, popperOptions: function() { return { modifiers: [ { name: "preventOverflow", options: { boundary: this.boundariesElement } }, { name: "flip", options: { boundary: this.boundariesElement, flipVariations: !1, allowedAutoPlacements: ["bottom"] } } ] }; }, entries: function() { return this.titles = [], this.entriesStore.entries.map((e) => { const t = this.getEntryTitle(e); return this.titles.push({ id: e.id, title: t }), { ...e, title: t }; }); } }, methods: { closeAndRemove: function() { this.splitFlowStore.closeSlot({ id: this.entry.id, entries: this.entries }), Qt.emit("RemoveEntryRequest", this.entry.id); }, getEntryTitle: function(e) { if (e) { let t = e.label ? e.label + " " : "", n = e.type; return n == "Scaffold" && (n = "3D Scaffold"), t += n, e.datasetId ? t += " - " + e.datasetId : e.discoverId && (t += " - " + e.discoverId), t; } return "Viewer"; }, getTitle: function(e) { const { id: t, title: n } = e, r = this.titles.filter((o) => o.title === n); if (r.length > 1) { const o = []; for (let i = 0; i < r.length; i++) { const s = this.getCharById(i); o.push({ id: r[i].id, title: r[i].title + s }); } const a = o.find((i) => i.id === t); if (a) return a.title; } return n; }, getCharById: function(e) { return " (" + String.fromCharCode(65 + e) + ")"; }, viewerChanged: function(e) { this.entry.id && this.entry.id != e && (this.splitFlowStore.assignOrSwapPaneWithIds({ source: this.entry.id, target: e }), this.$nextTick(() => { Qt.emit("connectivity-info-close"), setTimeout(() => { this.$emit("chooser-changed"); }, 1200); })); }, // setPopper with is needed as the flatmap context card does not have an image and has smaller with setPopperWidth: function(e) { let t = this.entries.find((n) => n.id === e); if (t) return t.type == "Flatmap" || t.type == "MultiFlatmap" ? "240px" : "440px"; }, // Set the boundaries element for the popper setBoundary: function(e) { this.boundariesElement = e; }, setupFlatmapContextCard: function(e) { this.contextCardVisible = !1; let t = Object.assign({ mapImpProv: e.prov }, this.entry); this.contextCardEntry = t; }, setupScaffoldContextCard: function() { this.entry.contextCardUrl && (this.contextCardEntry = { ...this.entry }); } }, mounted: function() { this.setupScaffoldContextCard(); } }, Tfe = { class: "toolbar-flex-container" }, Ofe = { key: 1, class: "toolbar-title" }; function Ffe(e, t, n, r, o, a) { const i = $_, s = E_, l = WO, u = qO, c = S$, d = tr, f = Tb, h = H0, p = Xe("map-svg-icon"), v = V0; return E(), L("div", null, [ B("div", Tfe, [ a.entries.length > 1 ? (E(), Q(s, { key: 0, teleported: !1, "model-value": n.entry.id, placeholder: "Select", class: "select-box", "popper-class": "viewer_dropdown", onChange: t[0] || (t[0] = (m) => a.viewerChanged(m)) }, { default: R(() => [ (E(!0), L(De, null, xt(a.entries, (m) => (E(), Q(i, { key: m.id, label: a.getTitle(m), value: m.id }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["model-value"])) : (E(), L("div", Ofe, me(a.getEntryTitle(n.entry)), 1)) ]), W(v, { class: "icon-group" }, { default: R(() => [ W(h, { placement: "bottom", teleported: !1, trigger: "manual", width: a.setPopperWidth(e.slot.id), offset: 0, "popper-class": "context-card-popover", "popper-options": a.popperOptions, visible: e.contextCardVisible }, mb({ reference: R(() => [ Ne(B("div", null, [ Ne(B("div", { class: "hide", onClick: t[3] || (t[3] = (m) => e.contextCardVisible = !1) }, [ Ae(" Hide information "), W(d, null, { default: R(() => [ W(c) ]), _: 1 }) ], 512), [ [ft, e.contextCardVisible] ]), Ne(B("div", { class: "hide", onClick: t[4] || (t[4] = (m) => e.contextCardVisible = !0) }, [ Ae(" Show information "), W(d, null, { default: R(() => [ W(f) ]), _: 1 }) ], 512), [ [ft, !e.contextCardVisible] ]) ], 512), [ [ft, e.contextCardEntry] ]) ]), _: 2 }, [ e.contextCardEntry ? { name: "default", fn: R(() => [ e.contextCardEntry.type == "Flatmap" || e.contextCardEntry.type == "MultiFlatmap" ? (E(), Q(l, { key: 0, class: "flatmap-context-card", mapImpProv: e.contextCardEntry.mapImpProv }, null, 8, ["mapImpProv"])) : Z("", !0), e.contextCardEntry.type.toLowerCase() == "scaffold" ? (E(), Q(u, { key: 1, entry: e.contextCardEntry, envVars: a.envVars, class: "context-card", onContextReady: t[1] || (t[1] = (m) => e.contextCardVisible = !0), onScaffoldViewClicked: t[2] || (t[2] = (m) => e.$emit("scaffold-view-clicked", m)) }, null, 8, ["entry", "envVars"])) : Z("", !0) ]), key: "0" } : void 0 ]), 1032, ["width", "popper-options", "visible"]), W(h, { class: "tooltip", content: "Close and remove", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ Ne(W(p, { icon: "close", class: "header-icon", onClick: t[5] || (t[5] = (m) => a.closeAndRemove()) }, null, 512), [ [ft, a.activeView !== "singlepanel" && n.entry.mode !== "main"] ]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]); } const AF = /* @__PURE__ */ $a(_fe, [["render", Ffe], ["__scopeId", "data-v-885fc50f"]]), Ife = Oc(() => import("./Flatmap-_TMt0DjG.js")), Afe = Oc(() => import("./Iframe-BXmq4GqV.js")), Pfe = Oc(() => import("./MultiFlatmap-B3Hp2Eor.js")), Lfe = Oc(() => import("./Plot-ZftBk4Ek.js")), Rfe = Oc(() => import("./Scaffold-D57tyjRQ.js")), Dfe = Oc(() => import("./Simulation-BI0LQWst.js")), Mfe = { name: "ContentVuer", props: { /** * Object containing information for * the required viewing. */ entry: Object, visible: { type: Boolean, default: !0 } }, components: { //DatasetHeader, Button: Xb, ContentBar: AF, Flatmap: Ife, Iframe: Afe, MultiFlatmap: Pfe, Plot: Lfe, Scaffold: Rfe, Simulation: Dfe }, methods: { flatmapProvenacneReady: function(e) { var t; (t = this.$refs.contentBar) == null || t.setupFlatmapContextCard(e); }, /** * Toggle sync mode on/off depending on species and current state */ toggleSyncMode: function() { var e; (e = this.$refs.viewer) == null || e.toggleSyncMode(); }, getId: function() { return this.entry.id; }, getState: function() { var e; return (e = this.$refs.viewer) == null ? void 0 : e.getState(); }, resourceSelected: function(e) { this.$emit("resource-selected", e); }, scaffoldViewClicked: function(e) { var t; this.entry.viewUrl !== e ? this.entriesStore.updateViewForEntry({ id: this.entry.id, viewUrl: e }) : (t = this.$refs.viewer) == null || t.updateWithViewUrl(e); }, /** * Perform a local search on this contentvuer */ search: function(e) { var t; return (t = this.$refs.viewer) == null ? void 0 : t.search(e); }, /** * Push the suggested terms into the suggestions array */ searchSuggestions: function(e, t) { var n; (n = this.$refs.viewer) == null || n.searchSuggestions(e, t); }, setPanesBoundary: function() { var e; (e = this.$refs.contentBar) == null || e.setBoundary(this.$refs.container); }, speciesChanged: function(e) { this.activeSpecies = e, this.$emit("species-changed", e); }, receiveSynchronisedEvent: async function(e) { var t; (t = this.$refs.viewer) == null || t.receiveSynchronisedEvent(e); }, requestSynchronisedEvent: function(e) { var t; (t = this.$refs.viewer) == null || t.requestSynchronisedEvent(e); }, /** * Check if this viewer is currently visible */ isVisible: function() { return this.splitFlowStore.getPaneNameById(this.entry.id) !== void 0; }, onResize: function() { var e; (e = this.$refs.viewer) == null || e.onResize(); } }, data: function() { return { mouseHovered: !1, activeSpecies: "Rat" }; }, computed: { ...Zl(Eg, du), syncMode() { return this.splitFlowStore.syncMode; }, viewerType() { switch (this.entry.type) { case "Biolucida": case "Iframe": case "Segmentation": return "Iframe"; default: return this.entry.type; } } } }, Nfe = { class: "component-container", ref: "container" }; function Bfe(e, t, n, r, o, a) { const i = AF; return E(), L("div", { class: "content-container", onMouseover: t[0] || (t[0] = (s) => e.mouseHovered = !0), onMouseleave: t[1] || (t[1] = (s) => e.mouseHovered = !1) }, [ W(i, { class: "toolbar", entry: n.entry, ref: "contentBar", onChooserChanged: a.onResize, onScaffoldViewClicked: a.scaffoldViewClicked, onVnodeMounted: a.setPanesBoundary }, null, 8, ["entry", "onChooserChanged", "onScaffoldViewClicked", "onVnodeMounted"]), B("div", Nfe, [ (E(), Q(qL, null, { default: R(() => [ (E(), Q(vt(a.viewerType), { entry: n.entry, mouseHovered: e.mouseHovered, visible: n.visible, lazy: !0, ref: "viewer", onFlatmapProvenanceReady: a.flatmapProvenacneReady, onResourceSelected: a.resourceSelected, onSpeciesChanged: a.speciesChanged }, null, 40, ["entry", "mouseHovered", "visible", "onFlatmapProvenanceReady", "onResourceSelected", "onSpeciesChanged"])) ]), _: 1 })) ], 512) ], 32); } const PF = /* @__PURE__ */ $a(Mfe, [["render", Bfe], ["__scopeId", "data-v-47023f68"]]); var LF = { exports: {} }; (function(e, t) { (function(n, r) { e.exports = r(); })(typeof window < "u" ? window : vj, 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")(), r = n.requestAnimationFrame || n.mozRequestAnimationFrame || n.webkitRequestAnimationFrame || function(c) { return n.setTimeout(c, 20); }, o = n.cancelAnimationFrame || n.mozCancelAnimationFrame || n.webkitCancelAnimationFrame || function(c) { n.clearTimeout(c); }; function a(c, d) { var f = Object.prototype.toString.call(c), h = 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, v = c.length; if (h) for (; p < v; p++) d(c[p]); else d(c); } function i(c) { if (!c.getBoundingClientRect) return { width: c.offsetWidth, height: c.offsetHeight }; var d = c.getBoundingClientRect(); return { width: Math.round(d.width), height: Math.round(d.height) }; } function s(c, d) { Object.keys(d).forEach(function(f) { c.style[f] = d[f]; }); } var l = function(c, d) { var f = 0; function h() { var v = []; this.add = function(b) { v.push(b); }; var m, g; this.call = function(b) { for (m = 0, g = v.length; m < g; m++) v[m].call(this, b); }, this.remove = function(b) { var C = []; for (m = 0, g = v.length; m < g; m++) v[m] !== b && C.push(v[m]); v = C; }, this.length = function() { return v.length; }; } function p(v, m) { if (v) { if (v.resizedAttached) { v.resizedAttached.add(m); return; } v.resizedAttached = new h(), v.resizedAttached.add(m), v.resizeSensor = document.createElement("div"), v.resizeSensor.dir = "ltr", v.resizeSensor.className = "resize-sensor"; var g = { pointerEvents: "none", position: "absolute", left: "0px", top: "0px", right: "0px", bottom: "0px", overflow: "hidden", zIndex: "-1", visibility: "hidden", maxWidth: "100%" }, b = { position: "absolute", left: "0px", top: "0px", transition: "0s" }; s(v.resizeSensor, g); var C = document.createElement("div"); C.className = "resize-sensor-expand", s(C, g); var x = document.createElement("div"); s(x, b), C.appendChild(x); var w = document.createElement("div"); w.className = "resize-sensor-shrink", s(w, g); var k = document.createElement("div"); s(k, b), s(k, { width: "200%", height: "200%" }), w.appendChild(k), v.resizeSensor.appendChild(C), v.resizeSensor.appendChild(w), v.appendChild(v.resizeSensor); var S = window.getComputedStyle(v), _ = S ? S.getPropertyValue("position") : null; _ !== "absolute" && _ !== "relative" && _ !== "fixed" && _ !== "sticky" && (v.style.position = "relative"); var O = !1, F = 0, I = i(v), P = 0, M = 0, N = !0; f = 0; var j = function() { var ie = v.offsetWidth, re = v.offsetHeight; x.style.width = ie + 10 + "px", x.style.height = re + 10 + "px", C.scrollLeft = ie + 10, C.scrollTop = re + 10, w.scrollLeft = ie + 10, w.scrollTop = re + 10; }, A = function() { if (N) { var ie = v.offsetWidth === 0 && v.offsetHeight === 0; if (ie) { f || (f = r(function() { f = 0, A(); })); return; } else N = !1; } j(); }; v.resizeSensor.resetSensor = A; var U = function() { F = 0, O && (P = I.width, M = I.height, v.resizedAttached && v.resizedAttached.call(I)); }, q = function() { I = i(v), O = I.width !== P || I.height !== M, O && !F && (F = r(U)), A(); }, Y = function(ie, re, le) { ie.attachEvent ? ie.attachEvent("on" + re, le) : ie.addEventListener(re, le); }; Y(C, "scroll", q), Y(w, "scroll", q), f = r(function() { f = 0, A(); }); } } a(c, function(v) { p(v, d); }), this.detach = function(v) { f || (o(f), f = 0), l.detach(c, v); }, 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, h = 0; h < f.length; h++) f[h].resizeSensor && l.reset(f[h]); }); document.addEventListener("DOMContentLoaded", function(c) { u.observe(document.body, { childList: !0, subtree: !0 }); }); } return l; }); })(LF); var zfe = LF.exports; const Vfe = /* @__PURE__ */ f_(zfe), jfe = { name: "ResizeSensor", methods: { activate: function() { this._sensor || (this._sensor = new Vfe(this.$refs.display, this.displayResize), this.displayResize()); }, deactivate: function() { this._sensor && (this._sensor.detach(this.$refs.display, this.displayResize), delete this._sensor, this._sensor = void 0, this.displayResize()); }, displayResize: function() { this.$emit("resize"); } }, unmounted() { this.deactivate(); }, activated() { this.activate(); }, deactivated() { this.deactivate(); }, mounted: function() { this.activate(); } }, Hfe = { style: { height: "100%", width: "100%", position: "absolute" }, ref: "display" }; function Ufe(e, t, n, r, o, a) { return E(), L("div", Hfe, null, 512); } const RF = /* @__PURE__ */ $a(jfe, [["render", Ufe]]), qfe = { name: "splitpanes", emits: ["ready", "resize", "resized", "pane-click", "pane-maximize", "pane-add", "pane-remove", "splitter-click"], props: { horizontal: { type: Boolean }, pushOtherPanes: { type: Boolean, default: !0 }, dblClickSplitter: { type: Boolean, default: !0 }, rtl: { type: Boolean, default: !1 }, firstSplitter: { type: Boolean } }, provide() { return { requestUpdate: this.requestUpdate, onPaneAdd: this.onPaneAdd, onPaneRemove: this.onPaneRemove, onPaneClick: this.onPaneClick }; }, data: () => ({ container: null, ready: !1, panes: [], touch: { mouseDown: !1, dragging: !1, activeSplitter: null }, splitterTaps: { splitter: null, timeoutId: null } }), computed: { panesCount() { return this.panes.length; }, indexedPanes() { return this.panes.reduce((e, t) => (e[t.id] = t) && e, {}); } }, methods: { updatePaneComponents() { this.panes.forEach((e) => { e.update && e.update({ [this.horizontal ? "height" : "width"]: `${this.indexedPanes[e.id].size}%` }); }); }, bindEvents() { document.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.addEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.addEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.addEventListener("touchend", this.onMouseUp)); }, unbindEvents() { document.removeEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.removeEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.removeEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.removeEventListener("touchend", this.onMouseUp)); }, onMouseDown(e, t) { this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = t; }, onMouseMove(e) { this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = !0, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size })))); }, onMouseUp() { this.touch.dragging && this.$emit("resized", this.panes.map((e) => ({ min: e.min, max: e.max, size: e.size }))), this.touch.mouseDown = !1, setTimeout(() => { this.touch.dragging = !1, this.unbindEvents(); }, 100); }, onSplitterClick(e, t) { "ontouchstart" in window && (e.preventDefault(), this.dblClickSplitter && (this.splitterTaps.splitter === t ? (clearTimeout(this.splitterTaps.timeoutId), this.splitterTaps.timeoutId = null, this.onSplitterDblClick(e, t), this.splitterTaps.splitter = null) : (this.splitterTaps.splitter = t, this.splitterTaps.timeoutId = setTimeout(() => { this.splitterTaps.splitter = null; }, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[t]); }, onSplitterDblClick(e, t) { let n = 0; this.panes = this.panes.map((r, o) => (r.size = o === t ? r.max : r.min, o !== t && (n += r.min), r)), this.panes[t].size -= n, this.$emit("pane-maximize", this.panes[t]), this.$emit("resized", this.panes.map((r) => ({ min: r.min, max: r.max, size: r.size }))); }, onPaneClick(e, t) { this.$emit("pane-click", this.indexedPanes[t]); }, getCurrentMouseDrag(e) { const t = this.container.getBoundingClientRect(), { clientX: n, clientY: r } = "ontouchstart" in window && e.touches ? e.touches[0] : e; return { x: n - t.left, y: r - t.top }; }, getCurrentDragPercentage(e) { e = e[this.horizontal ? "y" : "x"]; const t = this.container[this.horizontal ? "clientHeight" : "clientWidth"]; return this.rtl && !this.horizontal && (e = t - e), e * 100 / t; }, calculatePanesSize(e) { const t = this.touch.activeSplitter; let n = { prevPanesSize: this.sumPrevPanesSize(t), nextPanesSize: this.sumNextPanesSize(t), prevReachedMinPanes: 0, nextReachedMinPanes: 0 }; const r = 0 + (this.pushOtherPanes ? 0 : n.prevPanesSize), o = 100 - (this.pushOtherPanes ? 0 : n.nextPanesSize), a = Math.max(Math.min(this.getCurrentDragPercentage(e), o), r); let i = [t, t + 1], s = this.panes[i[0]] || null, l = this.panes[i[1]] || null; const u = s.max < 100 && a >= s.max + n.prevPanesSize, c = l.max < 100 && a <= 100 - (l.max + this.sumNextPanesSize(t + 1)); if (u || c) { u ? (s.size = s.max, l.size = Math.max(100 - s.max - n.prevPanesSize - n.nextPanesSize, 0)) : (s.size = Math.max(100 - l.max - n.prevPanesSize - this.sumNextPanesSize(t + 1), 0), l.size = l.max); return; } if (this.pushOtherPanes) { const d = this.doPushOtherPanes(n, a); if (!d) return; ({ sums: n, panesToResize: i } = d), s = this.panes[i[0]] || null, l = this.panes[i[1]] || null; } s !== null && (s.size = Math.min(Math.max(a - n.prevPanesSize - n.prevReachedMinPanes, s.min), s.max)), l !== null && (l.size = Math.min(Math.max(100 - a - n.nextPanesSize - n.nextReachedMinPanes, l.min), l.max)); }, doPushOtherPanes(e, t) { const n = this.touch.activeSplitter, r = [n, n + 1]; return t < e.prevPanesSize + this.panes[r[0]].min && (r[0] = this.findPrevExpandedPane(n).index, e.prevReachedMinPanes = 0, r[0] < n && this.panes.forEach((o, a) => { a > r[0] && a <= n && (o.size = o.min, e.prevReachedMinPanes += o.min); }), e.prevPanesSize = this.sumPrevPanesSize(r[0]), r[0] === void 0) ? (e.prevReachedMinPanes = 0, this.panes[0].size = this.panes[0].min, this.panes.forEach((o, a) => { a > 0 && a <= n && (o.size = o.min, e.prevReachedMinPanes += o.min); }), this.panes[r[1]].size = 100 - e.prevReachedMinPanes - this.panes[0].min - e.prevPanesSize - e.nextPanesSize, null) : t > 100 - e.nextPanesSize - this.panes[r[1]].min && (r[1] = this.findNextExpandedPane(n).index, e.nextReachedMinPanes = 0, r[1] > n + 1 && this.panes.forEach((o, a) => { a > n && a < r[1] && (o.size = o.min, e.nextReachedMinPanes += o.min); }), e.nextPanesSize = this.sumNextPanesSize(r[1] - 1), r[1] === void 0) ? (e.nextReachedMinPanes = 0, this.panes[this.panesCount - 1].size = this.panes[this.panesCount - 1].min, this.panes.forEach((o, a) => { a < this.panesCount - 1 && a >= n + 1 && (o.size = o.min, e.nextReachedMinPanes += o.min); }), this.panes[r[0]].size = 100 - e.prevPanesSize - e.nextReachedMinPanes - this.panes[this.panesCount - 1].min - e.nextPanesSize, null) : { sums: e, panesToResize: r }; }, sumPrevPanesSize(e) { return this.panes.reduce((t, n, r) => t + (r < e ? n.size : 0), 0); }, sumNextPanesSize(e) { return this.panes.reduce((t, n, r) => t + (r > e + 1 ? n.size : 0), 0); }, findPrevExpandedPane(e) { return [...this.panes].reverse().find((t) => t.index < e && t.size > t.min) || {}; }, findNextExpandedPane(e) { return this.panes.find((t) => t.index > e + 1 && t.size > t.min) || {}; }, checkSplitpanesNodes() { Array.from(this.container.children).forEach((e) => { const t = e.classList.contains("splitpanes__pane"), n = e.classList.contains("splitpanes__splitter"); !t && !n && (e.parentNode.removeChild(e), console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed.")); }); }, addSplitter(e, t, n = !1) { const r = e - 1, o = document.createElement("div"); o.classList.add("splitpanes__splitter"), n || (o.onmousedown = (a) => this.onMouseDown(a, r), typeof window < "u" && "ontouchstart" in window && (o.ontouchstart = (a) => this.onMouseDown(a, r)), o.onclick = (a) => this.onSplitterClick(a, r + 1)), this.dblClickSplitter && (o.ondblclick = (a) => this.onSplitterDblClick(a, r + 1)), t.parentNode.insertBefore(o, t); }, removeSplitter(e) { e.onmousedown = void 0, e.onclick = void 0, e.ondblclick = void 0, e.parentNode.removeChild(e); }, redoSplitters() { const e = Array.from(this.container.children); e.forEach((n) => { n.className.includes("splitpanes__splitter") && this.removeSplitter(n); }); let t = 0; e.forEach((n) => { n.className.includes("splitpanes__pane") && (!t && this.firstSplitter ? this.addSplitter(t, n, !0) : t && this.addSplitter(t, n), t++); }); }, requestUpdate({ target: e, ...t }) { const n = this.indexedPanes[e._.uid]; Object.entries(t).forEach(([r, o]) => n[r] = o); }, onPaneAdd(e) { let t = -1; Array.from(e.$el.parentNode.children).some((o) => (o.className.includes("splitpanes__pane") && t++, o === e.$el)); const n = parseFloat(e.minSize), r = parseFloat(e.maxSize); this.panes.splice(t, 0, { id: e._.uid, index: t, min: isNaN(n) ? 0 : n, max: isNaN(r) ? 100 : r, size: e.size === null ? null : parseFloat(e.size), givenSize: e.size, update: e.update }), this.panes.forEach((o, a) => o.index = a), this.ready && this.$nextTick(() => { this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[t] }), this.$emit("pane-add", { index: t, panes: this.panes.map((o) => ({ min: o.min, max: o.max, size: o.size })) }); }); }, onPaneRemove(e) { const t = this.panes.findIndex((r) => r.id === e._.uid), n = this.panes.splice(t, 1)[0]; this.panes.forEach((r, o) => r.index = o), this.$nextTick(() => { this.redoSplitters(), this.resetPaneSizes({ removedPane: { ...n, index: t } }), this.$emit("pane-remove", { removed: n, panes: this.panes.map((r) => ({ min: r.min, max: r.max, size: r.size })) }); }); }, resetPaneSizes(e = {}) { !e.addedPane && !e.removedPane ? this.initialPanesSizing() : this.panes.some((t) => t.givenSize !== null || t.min || t.max < 100) ? this.equalizeAfterAddOrRemove(e) : this.equalize(), this.ready && this.$emit("resized", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size }))); }, equalize() { const e = 100 / this.panesCount; let t = 0; const n = [], r = []; this.panes.forEach((o) => { o.size = Math.max(Math.min(e, o.max), o.min), t -= o.size, o.size >= o.max && n.push(o.id), o.size <= o.min && r.push(o.id); }), t > 0.1 && this.readjustSizes(t, n, r); }, initialPanesSizing() { let e = 100; const t = [], n = []; let r = 0; this.panes.forEach((a) => { e -= a.size, a.size !== null && r++, a.size >= a.max && t.push(a.id), a.size <= a.min && n.push(a.id); }); let o = 100; e > 0.1 && (this.panes.forEach((a) => { a.size === null && (a.size = Math.max(Math.min(e / (this.panesCount - r), a.max), a.min)), o -= a.size; }), o > 0.1 && this.readjustSizes(e, t, n)); }, equalizeAfterAddOrRemove({ addedPane: e, removedPane: t } = {}) { let n = 100 / this.panesCount, r = 0; const o = [], a = []; e && e.givenSize !== null && (n = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((i) => { r -= i.size, i.size >= i.max && o.push(i.id), i.size <= i.min && a.push(i.id); }), !(Math.abs(r) < 0.1) && (this.panes.forEach((i) => { e && e.givenSize !== null && e.id === i.id || (i.size = Math.max(Math.min(n, i.max), i.min)), r -= i.size, i.size >= i.max && o.push(i.id), i.size <= i.min && a.push(i.id); }), r > 0.1 && this.readjustSizes(r, o, a)); }, readjustSizes(e, t, n) { let r; e > 0 ? r = e / (this.panesCount - t.length) : r = e / (this.panesCount - n.length), this.panes.forEach((o, a) => { if (e > 0 && !t.includes(o.id)) { const i = Math.max(Math.min(o.size + r, o.max), o.min), s = i - o.size; e -= s, o.size = i; } else if (!n.includes(o.id)) { const i = Math.max(Math.min(o.size + r, o.max), o.min), s = i - o.size; e -= s, o.size = i; } o.update({ [this.horizontal ? "height" : "width"]: `${this.indexedPanes[o.id].size}%` }); }), Math.abs(e) > 0.1 && this.$nextTick(() => { this.ready && console.warn("Splitpanes: Could not resize panes correctly due to their constraints."); }); } }, watch: { panes: { deep: !0, immediate: !1, handler() { this.updatePaneComponents(); } }, horizontal() { this.updatePaneComponents(); }, firstSplitter() { this.redoSplitters(); }, dblClickSplitter(e) { [...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t, n) => { t.ondblclick = e ? (r) => this.onSplitterDblClick(r, n) : void 0; }); } }, beforeUnmount() { this.ready = !1; }, mounted() { this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = !0; }, render() { return jt( "div", { ref: "container", class: [ "splitpanes", `splitpanes--${this.horizontal ? "horizontal" : "vertical"}`, { "splitpanes--dragging": this.touch.dragging } ] }, this.$slots.default() ); } }, Wfe = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, Gfe = { name: "pane", inject: ["requestUpdate", "onPaneAdd", "onPaneRemove", "onPaneClick"], props: { size: { type: [Number, String], default: null }, minSize: { type: [Number, String], default: 0 }, maxSize: { type: [Number, String], default: 100 } }, data: () => ({ style: {} }), mounted() { this.onPaneAdd(this); }, beforeUnmount() { this.onPaneRemove(this); }, methods: { update(e) { this.style = e; } }, computed: { sizeNumber() { return this.size || this.size === 0 ? parseFloat(this.size) : null; }, minSizeNumber() { return parseFloat(this.minSize); }, maxSizeNumber() { return parseFloat(this.maxSize); } }, watch: { sizeNumber(e) { this.requestUpdate({ target: this, size: e }); }, minSizeNumber(e) { this.requestUpdate({ target: this, min: e }); }, maxSizeNumber(e) { this.requestUpdate({ target: this, max: e }); } } }; function Kfe(e, t, n, r, o, a) { return E(), L("div", { class: "splitpanes__pane", onClick: t[0] || (t[0] = (i) => a.onPaneClick(i, e._.uid)), style: Ze(e.style) }, [ oe(e.$slots, "default") ], 4); } const Yfe = /* @__PURE__ */ Wfe(Gfe, [["render", Kfe]]), Xfe = { name: "CustomSplitter", components: { Splitpanes: qfe, Pane: Yfe, ResizeSensor: RF }, props: { index: { type: String, default: function() { return "split-1"; } } }, methods: { requestStylesUpdate: function(e) { if (this.$refs && e in this.$refs && this.$refs[e] && this.$refs[e][0] && this.$refs[e][0].$el) { const n = this.$refs[e][0].$el.getBoundingClientRect(); Qt.emit("PaneResize", { refName: e, rect: n }); } }, /** * Callback when the vuers emit a selected event. */ calculateStyles: function(e) { this.$refs && (e.startsWith("pane") ? this.requestStylesUpdate(e) : e.startsWith("split") && this.customLayout[e].children.forEach((t) => { t.startsWith("pane") && this.requestStylesUpdate(t); })); }, childUnmounted: function(e) { Qt.emit("PaneUnmounted", { refName: e }); } }, computed: { ...Zl(du), children() { return this.customLayout[this.index].children; }, customLayout() { return this.splitFlowStore.customLayout; }, isHorizontal() { return this.customLayout[this.index].horizontal; } } }, Zfe = { style: { height: "100%", width: "100%" } }; function Jfe(e, t, n, r, o, a) { const i = RF, s = Xe("custom-splitter", !0), l = Xe("pane"), u = Xe("splitpanes"); return E(), L("div", Zfe, [ W(i, { onResize: t[0] || (t[0] = (c) => a.calculateStyles(n.index)) }), W(u, { class: "default-theme", horizontal: a.isHorizontal, "dbl-click-splitter": !1 }, { default: R(() => [ (E(!0), L(De, null, xt(a.children, (c) => (E(), Q(l, { key: c, ref_for: !0, ref: c, onVnodeBeforeUnmount: (d) => a.childUnmounted(c) }, { default: R(() => [ a.customLayout[c].content ? (E(), Q(i, { key: 0, onResize: (d) => a.calculateStyles(c) }, null, 8, ["onResize"])) : (E(), Q(s, { key: c, index: c }, null, 8, ["index"])) ]), _: 2 }, 1032, ["onVnodeBeforeUnmount"]))), 128)) ]), _: 1 }, 8, ["horizontal"]) ]); } const DF = /* @__PURE__ */ $a(Xfe, [["render", Jfe], ["__scopeId", "data-v-0667e71f"]]), Qfe = { name: "SplitDialog", components: { ContentVuer: PF, CustomSplitter: DF }, props: { entries: { type: Array, default: function() { return []; } } }, data: function() { return { styles: {} }; }, methods: { /** * Callback when the vuers emit a selected event. */ resourceSelected: function(e) { this.$emit("resource-selected", e); }, speciesChanged: function(e) { this.$emit("species-changed", e); }, getClass: function(e) { return this.isIdVisible(e) ? this.getRefsName(e) : "inactive"; }, getRefsName: function(e) { const t = this.splitFlowStore.getPaneNameById(e); return t && (t in this.styles || (this.styles[t] = {})), t; }, getStyle: function(e) { const t = this.getRefsName(e); return t && t in this.styles && this.styles[t] ? this.styles[t] : {}; }, getActiveContents: function() { const e = [], t = this.$refs.content; return t && t.forEach((n) => { n.isVisible() && e.push(n); }), e; }, isIdVisible: function(e) { return this.splitFlowStore.getPaneNameById(e) !== void 0; }, sendSynchronisedEvent: function(e) { this.getActiveContents().forEach((n) => { n.receiveSynchronisedEvent(e); }); }, getContentsWithId: function(e) { let t = this.$refs.content; for (let n = 0; n < t.length; n++) if (t[n].getId() == e) return t[n]; }, getContentsState: function() { let e = [], t = this.$refs.content; for (let n = 0; n < t.length; n++) e.push(t[n].getState()); return e; }, setStyles: function(e, t) { if (this.$refs && this.$refs.tabContainer) { const n = this.$refs.tabContainer.getBoundingClientRect(), r = {}; r.width = `${t.width}px`, r.left = `${t.left - n.left}px`, r.height = `${t.height}px`, r.top = `${t.top - n.top}px`, r.display = "block", this.styles[e] = r; } }, hidePane: function(e) { if (this.$refs && "tabContainer" in this.$refs) { const t = {}; t.display = "none", this.styles[e] = t; } }, resize: function() { this.__userResize__ = !0; }, resized: function(e, t) { this.__userResize__ && this.splitFlowStore.setSplitter({ name: e, value: t[0].size }), this.__userResize__ = !1; } }, computed: { ...Zl(du), activeView: function() { return this.splitFlowStore.activeView; }, horizontal() { return this.splitFlowStore.activeView === "2horpanel"; }, splitters() { return this.splitFlowStore.splitters; }, globalCallback() { return this.splitFlowStore.globalCallback; } }, watch: { globalCallback: { handler: function(e) { if (e) { const t = this.getActiveContents(); t && t.forEach((n) => { n.requestSynchronisedEvent(e); }); } else { const t = this.$refs.content; t && t.forEach((n) => { n.requestSynchronisedEvent(!1); }); } }, immediate: !0, deep: !0 } }, mounted: function() { Qt.on("PaneResize", (e) => { this.setStyles(e.refName, e.rect); }), Qt.on("PaneUnmounted", (e) => { this.hidePane(e.refName); }); } }, ehe = { class: "tab-container", ref: "tabContainer" }; function the(e, t, n, r, o, a) { const i = DF, s = PF; return E(), L("div", ehe, [ W(i, { index: "split-1", key: "split-1" }), (E(!0), L(De, null, xt(n.entries, (l) => (E(), L("div", { key: l.id, style: Ze(a.getStyle(l.id)), class: V([a.getClass(l.id), "contentvuer"]) }, [ (E(), Q(s, { key: l.id, entry: l, ref_for: !0, ref: "content", onResourceSelected: a.resourceSelected, onSpeciesChanged: a.speciesChanged, visible: a.isIdVisible(l.id) }, null, 8, ["entry", "onResourceSelected", "onSpeciesChanged", "visible"])) ], 6))), 128)) ], 512); } const MF = /* @__PURE__ */ $a(Qfe, [["render", the], ["__scopeId", "data-v-32038eaa"]]), nhe = { name: "SearchControls", props: { failedSearch: void 0 }, components: { Autocomplete: u_, MapSvgIcon: iw }, methods: { fetchSuggestions: function(e, t) { e === "" ? t([]) : this.$emit("fetch-suggestions", { term: e, cb: t }); } }, data: function() { return { searchText: "" }; } }, rhe = (e) => (Tr("data-v-eb3db1ae"), e = e(), Or(), e), ohe = { class: "search-container" }, ahe = /* @__PURE__ */ rhe(() => /* @__PURE__ */ B("div", { class: "text search-text" }, " Search within display ", -1)), ihe = { key: 0, class: "text not-found-text" }; function she(e, t, n, r, o, a) { const i = u_, s = Xe("map-svg-icon"); return E(), L("div", ohe, [ ahe, W(i, { class: "search-box", placeholder: "Search", modelValue: e.searchText, "onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l), "fetch-suggestions": a.fetchSuggestions, onKeyup: t[1] || (t[1] = yn((l) => e.$emit("search", e.searchText), ["enter"])), onSelect: t[2] || (t[2] = (l) => e.$emit("search", l.value)), teleported: !1, "popper-class": "autocomplete-popper" }, null, 8, ["modelValue", "fetch-suggestions"]), W(s, { icon: "magnifyingGlass", class: "magnify", onClick: t[3] || (t[3] = (l) => e.$emit("search", e.searchText)) }), n.failedSearch ? (E(), L("div", ihe, " '" + me(n.failedSearch) + "' not found ", 1)) : Z("", !0) ]); } const NF = /* @__PURE__ */ $a(nhe, [["render", she], ["__scopeId", "data-v-eb3db1ae"]]), lhe = { name: "DialogToolbarContent", components: { Button: Xb, Col: v_, Icon: tr, Input: B0, Popover: H0, Row: V0, Switch: __, MapSvgIcon: iw, MapSvgSpriteColor: OF, SearchControls: NF, ElIconCopyDocument: wk }, props: { /** * Array of titles. */ numberOfEntries: { type: Number, default: 0 }, /** * Display icons for docking, undocking and etc. */ showIcons: { type: Boolean, default: !1 } }, computed: { ...Zl(Eg, Sp, du), activeView() { return this.splitFlowStore.activeView; }, helpDelay() { return this.settingsStore.helpDelay; }, shareLink() { return this.settingsStore.shareLink; }, syncMode() { return this.splitFlowStore.syncMode; }, viewIcons() { return this.splitFlowStore.viewIcons; }, globalCallback() { return this.splitFlowStore.globalCallback; } }, watch: { shareLink: function() { this.loadingLink = !1; }, independent: function(e) { let t = e !== !0; this.globalCallback !== t && this.splitFlowStore.toggleGlobalCallback(t); }, globalCallback: function(e) { let t = e !== !0; t !== this.independent && (this.independent = t); } }, data: function() { return { isFullscreen: !1, loadingLink: !0, shareLinkDisplay: !1, independent: !0, failedSearch: void 0, activeViewRef: void 0, permalinkRef: void 0, ElIconCopyDocument: On(wk) }; }, methods: { titleClicked: function(e) { this.$emit("titleClicked", e); }, startHelp: function() { Qt.emit("startHelp"); }, onFullscreen: function() { this.$emit("onFullscreen"), this.isFullscreen = !this.isFullscreen; }, onFullscreenEsc: function() { document.fullscreenElement || (this.isFullscreen = !1); }, close: function() { this.$emit("close"); }, copyShareLink: function() { document && (this.$refs.linkInput.$el.querySelector("input").select(), document.execCommand("copy")); }, setFailedSearch: function(e) { this.failedSearch = e; }, getShareLink: function() { this.loadingLink = !0, this.shareLinkDisplay = !0, Qt.emit("updateShareLinkRequested"); }, viewClicked: function(e) { this.splitFlowStore.updateActiveView({ view: e, entries: this.entriesStore.entries }), this.$refs.viewPopover && this.$refs.viewPopover.hide(); } }, mounted: function() { this.activeViewRef = On(this.$refs.activeViewRef), this.permalinkRef = On(this.$refs.permalinkRef), document.addEventListener("fullscreenchange", this.onFullscreenEsc); }, unmounted: function() { document.removeEventListener("fullscreenchange", this.onFullscreenEsc); } }, lw = (e) => (Tr("data-v-3ca4906c"), e = e(), Or(), e), uhe = { class: "header" }, che = { key: 0, class: "switch-control" }, dhe = /* @__PURE__ */ lw(() => /* @__PURE__ */ B("br", null, null, -1)), phe = /* @__PURE__ */ lw(() => /* @__PURE__ */ B("br", null, null, -1)), fhe = /* @__PURE__ */ lw(() => /* @__PURE__ */ B("br", null, null, -1)); function hhe(e, t, n, r, o, a) { const i = Xe("map-svg-sprite-color"), s = NF, l = __, u = Xe("map-svg-icon"), c = H0, d = v_, f = V0, h = B0, p = Xb, v = nc; return E(), L("div", uhe, [ W(i), W(s, { onSearch: t[0] || (t[0] = (m) => { e.$emit("local-search", { term: m }); }), onFetchSuggestions: t[1] || (t[1] = (m) => { e.$emit("fetch-suggestions", { data: m }); }), failedSearch: e.failedSearch }, null, 8, ["failedSearch"]), a.syncMode ? (E(), L("div", che, [ W(l, { class: "switch", modelValue: e.independent, "onUpdate:modelValue": t[2] || (t[2] = (m) => e.independent = m), "active-text": "Independent", width: 30, "inactive-text": "Linked" }, null, 8, ["modelValue"]), W(c, { class: "tooltip", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ W(u, { icon: "help", class: "sync-help header-icon" }) ]), default: R(() => [ Ae(" When in Linked mode the two maps will interact "), dhe, Ae(" together. Select an organ in one and it will "), phe, Ae(" be automatically selected in the other. "), fhe, Ae(' In Independent mode the maps will work separately." ') ]), _: 1 }, 8, ["show-after"]) ])) : Z("", !0), W(f, { class: "icon-group" }, { default: R(() => [ e.activeViewRef ? (E(), Q(c, { key: 0, "virtual-ref": e.activeViewRef, ref: "viewPopover", placement: "bottom", width: "133", teleported: !1, trigger: "click", "popper-class": "view-icon-popover", "virtual-triggering": "" }, { default: R(() => [ (E(!0), L(De, null, xt(a.viewIcons, (m) => (E(), Q(f, { gutter: 20, key: m.name, class: V([ { active: m.icon == a.activeView }, { disabled: m.min > n.numberOfEntries }, "view-icon-row" ]), onClick: (g) => a.viewClicked(m.icon) }, { default: R(() => [ W(d, { span: 4 }, { default: R(() => [ W(u, { icon: m.icon, class: "view-icon" }, null, 8, ["icon"]) ]), _: 2 }, 1024), W(d, { offset: 2, span: 18, class: "view-text" }, { default: R(() => [ Ae(me(m.name), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["class", "onClick"]))), 128)) ]), _: 1 }, 8, ["virtual-ref"])) : Z("", !0), W(c, { class: "tooltip", content: "Split screen", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ W(u, { icon: a.activeView, ref: "activeViewRef", class: V([ { disabled: 1 >= n.numberOfEntries }, "header-icon" ]) }, null, 8, ["icon", "class"]) ]), _: 1 }, 8, ["show-after"]), W(c, { class: "tooltip", content: "Help", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ W(u, { icon: "tooltips", class: "header-icon", onClick: t[3] || (t[3] = (m) => a.startHelp()) }) ]), _: 1 }, 8, ["show-after"]), W(c, { class: "tooltip", content: "Fullscreen", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ Ne(W(u, { icon: "fullScreen", class: "header-icon", onClick: a.onFullscreen }, null, 8, ["onClick"]), [ [ft, !e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), W(c, { class: "tooltip", content: "Exit fullscreen", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ Ne(W(u, { icon: "closeFullScreen", class: "header-icon", onClick: a.onFullscreen }, null, 8, ["onClick"]), [ [ft, e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), e.permalinkRef ? (E(), Q(c, { key: 1, ref: "linkPopover", "virtual-ref": e.permalinkRef, placement: "bottom-end", width: "400", teleported: !1, trigger: "click", "popper-class": "link-popover", "virtual-triggering": "" }, { default: R(() => [ Ne((E(), Q(f, { gutter: 20, "element-loading-text": "Creating link..." }, { default: R(() => [ W(d, { span: 20 }, { default: R(() => [ W(h, { class: "link-input", size: "small", placeholder: "Permanant Link Here", readonly: !0, modelValue: a.shareLink, "onUpdate:modelValue": t[4] || (t[4] = (m) => a.shareLink = m), ref: "linkInput" }, null, 8, ["modelValue"]) ]), _: 1 }), W(d, { span: 4 }, { default: R(() => [ W(c, { class: "tooltip", content: "Copy link", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ W(p, { class: "copy-button", icon: e.ElIconCopyDocument, size: "small", onClick: a.copyShareLink }, null, 8, ["icon", "onClick"]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]), _: 1 })), [ [v, e.loadingLink] ]) ]), _: 1 }, 8, ["virtual-ref"])) : Z("", !0), W(c, { class: "tooltip", content: "Get permalink", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ Ne(W(u, { icon: "permalink", ref: "permalinkRef", class: "header-icon", onClick: a.getShareLink }, null, 8, ["onClick"]), [ [ft, a.shareLink] ]) ]), _: 1 }, 8, ["show-after"]), W(c, { class: "tooltip", content: "Close", placement: "bottom-end", "show-after": a.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: R(() => [ Ne(W(u, { icon: "close", class: "header-icon", onClick: a.close }, null, 8, ["onClick"]), [ [ft, n.showIcons] ]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]); } const BF = /* @__PURE__ */ $a(lhe, [["render", hhe], ["__scopeId", "data-v-3ca4906c"]]), hi = { sendEvent: function(e) { const t = { event: e.event || "", event_name: e.event_name || "", files: e.files || "", file_name: e.file_name || "", file_path: e.file_path || "", file_type: e.file_type || "", category: e.category || "", dataset_id: e.dataset_id || "", version_id: e.version_id || "", doi: e.doi || "", citation_type: e.citation_type || "", location: e.location || "" }; localStorage.getItem("debugTagging") === "yes" && console.table(t), Qt.emit("trackEvent", t); } }, zF = (e) => !e.getAttribute("aria-owns"), VF = (e, t, n) => { const { parentNode: r } = e; if (!r) return null; const o = r.querySelectorAll(n), a = Array.prototype.indexOf.call(o, e); return o[a + t] || null; }, iv = (e) => { e && (e.focus(), !zF(e) && e.click()); }, jn = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const o = e == null ? void 0 : e(r); if (n === !1 || !o) return t == null ? void 0 : t(r); }, Y3 = (e) => (t) => t.pointerType === "mouse" ? e(t) : void 0; var X3; const En = typeof window < "u", vhe = (e) => typeof e == "string", jF = () => { }, Fy = En && ((X3 = window == null ? void 0 : window.navigator) == null ? void 0 : X3.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function Ep(e) { return typeof e == "function" ? e() : y(e); } function ghe(e) { return e; } function yf(e) { return g0() ? (jp(e), !0) : !1; } function mhe(e, t = !0) { rt() ? at(e) : t ? e() : Ue(e); } function Z3(e, t, n = {}) { const { immediate: r = !0 } = n, o = z(!1); let a = null; function i() { a && (clearTimeout(a), a = null); } function s() { o.value = !1, i(); } function l(...u) { i(), o.value = !0, a = setTimeout(() => { o.value = !1, a = null, e(...u); }, Ep(t)); } return r && (o.value = !0, En && l()), yf(s), { isPending: Tc(o), start: l, stop: s }; } function za(e) { var t; const n = Ep(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const bf = En ? window : void 0; function No(...e) { let t, n, r, o; if (vhe(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = bf) : [t, n, r, o] = e, !t) return jF; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = ce(() => [za(t), Ep(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return yf(u), u; } let J3 = !1; function yhe(e, t, n = {}) { const { window: r = bf, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; Fy && !J3 && (J3 = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", jF))); let s = !0; const l = (c) => o.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = za(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ No(r, "click", (c) => { const d = za(e); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !l(c)), !s) { s = !0; return; } t(c); } }, { passive: !0, capture: a }), No(r, "pointerdown", (c) => { const d = za(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && No(r, "blur", (c) => { var d; const f = za(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } function HF(e, t = !1) { const n = z(), r = () => n.value = !!e(); return r(), mhe(r, t), n; } const Q3 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, e4 = "__vueuse_ssr_handlers__"; Q3[e4] = Q3[e4] || {}; function bhe(e, t, { window: n = bf, initialValue: r = "" } = {}) { const o = z(r), a = $(() => { var i; return za(t) || ((i = n == null ? void 0 : n.document) == null ? void 0 : i.documentElement); }); return ce([a, () => Ep(e)], ([i, s]) => { var l; if (i && n) { const u = (l = n.getComputedStyle(i).getPropertyValue(s)) == null ? void 0 : l.trim(); o.value = u || r; } }, { immediate: !0 }), ce(o, (i) => { var s; (s = a.value) != null && s.style && a.value.style.setProperty(Ep(e), i); }), o; } var t4 = Object.getOwnPropertySymbols, whe = Object.prototype.hasOwnProperty, xhe = Object.prototype.propertyIsEnumerable, khe = (e, t) => { var n = {}; for (var r in e) whe.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && t4) for (var r of t4(e)) t.indexOf(r) < 0 && xhe.call(e, r) && (n[r] = e[r]); return n; }; function Ma(e, t, n = {}) { const r = n, { window: o = bf } = r, a = khe(r, ["window"]); let i; const s = HF(() => o && "ResizeObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = ce(() => za(e), (d) => { l(), s.value && o && d && (i = new ResizeObserver(t), i.observe(d, a)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return yf(c), { isSupported: s, stop: c }; } var n4 = Object.getOwnPropertySymbols, Che = Object.prototype.hasOwnProperty, She = Object.prototype.propertyIsEnumerable, Ehe = (e, t) => { var n = {}; for (var r in e) Che.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && n4) for (var r of n4(e)) t.indexOf(r) < 0 && She.call(e, r) && (n[r] = e[r]); return n; }; function $he(e, t, n = {}) { const r = n, { window: o = bf } = r, a = Ehe(r, ["window"]); let i; const s = HF(() => o && "MutationObserver" in o), l = () => { i && (i.disconnect(), i = void 0); }, u = ce(() => za(e), (d) => { l(), s.value && o && d && (i = new MutationObserver(t), i.observe(d, a)); }, { immediate: !0 }), c = () => { l(), u(); }; return yf(c), { isSupported: s, stop: c }; } var r4; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(r4 || (r4 = {})); var _he = Object.defineProperty, o4 = Object.getOwnPropertySymbols, The = Object.prototype.hasOwnProperty, Ohe = Object.prototype.propertyIsEnumerable, a4 = (e, t, n) => t in e ? _he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Fhe = (e, t) => { for (var n in t || (t = {})) The.call(t, n) && a4(e, n, t[n]); if (o4) for (var n of o4(t)) Ohe.call(t, n) && a4(e, n, t[n]); return e; }; const Ihe = { 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] }; Fhe({ linear: ghe }, Ihe); const Ahe = () => En && /firefox/i.test(window.navigator.userAgent); /** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ process.env.NODE_ENV !== "production" && Object.freeze({}); process.env.NODE_ENV !== "production" && Object.freeze([]); const Fi = () => { }, Phe = Object.prototype.hasOwnProperty, i4 = (e, t) => Phe.call(e, t), Yr = Array.isArray, Hn = (e) => typeof e == "function", uo = (e) => typeof e == "string", dr = (e) => e !== null && typeof e == "object", Lhe = (e) => (dr(e) || Hn(e)) && Hn(e.then) && Hn(e.catch), Rhe = Object.prototype.toString, Dhe = (e) => Rhe.call(e), n1 = (e) => Dhe(e).slice(8, -1), uw = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, Mhe = /-(\w)/g, Nhe = uw((e) => e.replace(Mhe, (t, n) => n ? n.toUpperCase() : "")), Bhe = /\B([A-Z])/g, zhe = uw( (e) => e.replace(Bhe, "-$1").toLowerCase() ), Vhe = uw((e) => e.charAt(0).toUpperCase() + e.slice(1)); var UF = typeof global == "object" && global && global.Object === Object && global, jhe = typeof self == "object" && self && self.Object === Object && self, _a = UF || jhe || Function("return this")(), Yo = _a.Symbol, qF = Object.prototype, Hhe = qF.hasOwnProperty, Uhe = qF.toString, yd = Yo ? Yo.toStringTag : void 0; function qhe(e) { var t = Hhe.call(e, yd), n = e[yd]; try { e[yd] = void 0; var r = !0; } catch { } var o = Uhe.call(e); return r && (t ? e[yd] = n : delete e[yd]), o; } var Whe = Object.prototype, Ghe = Whe.toString; function Khe(e) { return Ghe.call(e); } var Yhe = "[object Null]", Xhe = "[object Undefined]", s4 = Yo ? Yo.toStringTag : void 0; function Gc(e) { return e == null ? e === void 0 ? Xhe : Yhe : s4 && s4 in Object(e) ? qhe(e) : Khe(e); } function Bs(e) { return e != null && typeof e == "object"; } var Zhe = "[object Symbol]"; function $g(e) { return typeof e == "symbol" || Bs(e) && Gc(e) == Zhe; } function Jhe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; ) o[n] = t(e[n], n, e); return o; } var Xo = Array.isArray, Qhe = 1 / 0, l4 = Yo ? Yo.prototype : void 0, u4 = l4 ? l4.toString : void 0; function WF(e) { if (typeof e == "string") return e; if (Xo(e)) return Jhe(e, WF) + ""; if ($g(e)) return u4 ? u4.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Qhe ? "-0" : t; } var eve = /\s/; function tve(e) { for (var t = e.length; t-- && eve.test(e.charAt(t)); ) ; return t; } var nve = /^\s+/; function rve(e) { return e && e.slice(0, tve(e) + 1).replace(nve, ""); } function Qa(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var c4 = NaN, ove = /^[-+]0x[0-9a-f]+$/i, ave = /^0b[01]+$/i, ive = /^0o[0-7]+$/i, sve = parseInt; function d4(e) { if (typeof e == "number") return e; if ($g(e)) return c4; if (Qa(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Qa(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = rve(e); var n = ave.test(e); return n || ive.test(e) ? sve(e.slice(2), n ? 2 : 8) : ove.test(e) ? c4 : +e; } function GF(e) { return e; } var lve = "[object AsyncFunction]", uve = "[object Function]", cve = "[object GeneratorFunction]", dve = "[object Proxy]"; function KF(e) { if (!Qa(e)) return !1; var t = Gc(e); return t == uve || t == cve || t == lve || t == dve; } var r1 = _a["__core-js_shared__"], p4 = function() { var e = /[^.]+$/.exec(r1 && r1.keys && r1.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function pve(e) { return !!p4 && p4 in e; } var fve = Function.prototype, hve = fve.toString; function pu(e) { if (e != null) { try { return hve.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var vve = /[\\^$.*+?()[\]{}|]/g, gve = /^\[object .+?Constructor\]$/, mve = Function.prototype, yve = Object.prototype, bve = mve.toString, wve = yve.hasOwnProperty, xve = RegExp( "^" + bve.call(wve).replace(vve, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function kve(e) { if (!Qa(e) || pve(e)) return !1; var t = KF(e) ? xve : gve; return t.test(pu(e)); } function Cve(e, t) { return e == null ? void 0 : e[t]; } function fu(e, t) { var n = Cve(e, t); return kve(n) ? n : void 0; } var Iy = fu(_a, "WeakMap"), f4 = Object.create, Sve = /* @__PURE__ */ function() { function e() { } return function(t) { if (!Qa(t)) return {}; if (f4) return f4(t); e.prototype = t; var n = new e(); return e.prototype = void 0, n; }; }(); function Eve(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 $ve = 800, _ve = 16, Tve = Date.now; function Ove(e) { var t = 0, n = 0; return function() { var r = Tve(), o = _ve - (r - n); if (n = r, o > 0) { if (++t >= $ve) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function Fve(e) { return function() { return e; }; } var Kv = function() { try { var e = fu(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), Ive = Kv ? function(e, t) { return Kv(e, "toString", { configurable: !0, enumerable: !1, value: Fve(t), writable: !0 }); } : GF, Ave = Ove(Ive); function Pve(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; ) ; return e; } function Lve(e, t, n, r) { e.length; for (var o = n + 1; o--; ) if (t(e[o], o, e)) return o; return -1; } var Rve = 9007199254740991, Dve = /^(?:0|[1-9]\d*)$/; function cw(e, t) { var n = typeof e; return t = t ?? Rve, !!t && (n == "number" || n != "symbol" && Dve.test(e)) && e > -1 && e % 1 == 0 && e < t; } function Mve(e, t, n) { t == "__proto__" && Kv ? Kv(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function dw(e, t) { return e === t || e !== e && t !== t; } var Nve = Object.prototype, Bve = Nve.hasOwnProperty; function YF(e, t, n) { var r = e[t]; (!(Bve.call(e, t) && dw(r, n)) || n === void 0 && !(t in e)) && Mve(e, t, n); } var h4 = Math.max; function zve(e, t, n) { return t = h4(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = h4(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), Eve(e, this, s); }; } var Vve = 9007199254740991; function pw(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Vve; } function jve(e) { return e != null && pw(e.length) && !KF(e); } var Hve = Object.prototype; function XF(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || Hve; return e === n; } function Uve(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var qve = "[object Arguments]"; function v4(e) { return Bs(e) && Gc(e) == qve; } var ZF = Object.prototype, Wve = ZF.hasOwnProperty, Gve = ZF.propertyIsEnumerable, fw = v4(/* @__PURE__ */ function() { return arguments; }()) ? v4 : function(e) { return Bs(e) && Wve.call(e, "callee") && !Gve.call(e, "callee"); }; function Kve() { return !1; } var JF = typeof exports == "object" && exports && !exports.nodeType && exports, g4 = JF && typeof module == "object" && module && !module.nodeType && module, Yve = g4 && g4.exports === JF, m4 = Yve ? _a.Buffer : void 0, Xve = m4 ? m4.isBuffer : void 0, Yv = Xve || Kve, Zve = "[object Arguments]", Jve = "[object Array]", Qve = "[object Boolean]", e0e = "[object Date]", t0e = "[object Error]", n0e = "[object Function]", r0e = "[object Map]", o0e = "[object Number]", a0e = "[object Object]", i0e = "[object RegExp]", s0e = "[object Set]", l0e = "[object String]", u0e = "[object WeakMap]", c0e = "[object ArrayBuffer]", d0e = "[object DataView]", p0e = "[object Float32Array]", f0e = "[object Float64Array]", h0e = "[object Int8Array]", v0e = "[object Int16Array]", g0e = "[object Int32Array]", m0e = "[object Uint8Array]", y0e = "[object Uint8ClampedArray]", b0e = "[object Uint16Array]", w0e = "[object Uint32Array]", Cn = {}; Cn[p0e] = Cn[f0e] = Cn[h0e] = Cn[v0e] = Cn[g0e] = Cn[m0e] = Cn[y0e] = Cn[b0e] = Cn[w0e] = !0; Cn[Zve] = Cn[Jve] = Cn[c0e] = Cn[Qve] = Cn[d0e] = Cn[e0e] = Cn[t0e] = Cn[n0e] = Cn[r0e] = Cn[o0e] = Cn[a0e] = Cn[i0e] = Cn[s0e] = Cn[l0e] = Cn[u0e] = !1; function x0e(e) { return Bs(e) && pw(e.length) && !!Cn[Gc(e)]; } function hw(e) { return function(t) { return e(t); }; } var QF = typeof exports == "object" && exports && !exports.nodeType && exports, Ud = QF && typeof module == "object" && module && !module.nodeType && module, k0e = Ud && Ud.exports === QF, o1 = k0e && UF.process, vc = function() { try { var e = Ud && Ud.require && Ud.require("util").types; return e || o1 && o1.binding && o1.binding("util"); } catch { } }(), y4 = vc && vc.isTypedArray, eI = y4 ? hw(y4) : x0e, C0e = Object.prototype, S0e = C0e.hasOwnProperty; function E0e(e, t) { var n = Xo(e), r = !n && fw(e), o = !n && !r && Yv(e), a = !n && !r && !o && eI(e), i = n || r || o || a, s = i ? Uve(e.length, String) : [], l = s.length; for (var u in e) S0e.call(e, u) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. o && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. cw(u, l))) && s.push(u); return s; } function tI(e, t) { return function(n) { return e(t(n)); }; } var $0e = tI(Object.keys, Object), _0e = Object.prototype, T0e = _0e.hasOwnProperty; function O0e(e) { if (!XF(e)) return $0e(e); var t = []; for (var n in Object(e)) T0e.call(e, n) && n != "constructor" && t.push(n); return t; } function nI(e) { return jve(e) ? E0e(e) : O0e(e); } var F0e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, I0e = /^\w*$/; function vw(e, t) { if (Xo(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || $g(e) ? !0 : I0e.test(e) || !F0e.test(e) || t != null && e in Object(t); } var $p = fu(Object, "create"); function A0e() { this.__data__ = $p ? $p(null) : {}, this.size = 0; } function P0e(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var L0e = "__lodash_hash_undefined__", R0e = Object.prototype, D0e = R0e.hasOwnProperty; function M0e(e) { var t = this.__data__; if ($p) { var n = t[e]; return n === L0e ? void 0 : n; } return D0e.call(t, e) ? t[e] : void 0; } var N0e = Object.prototype, B0e = N0e.hasOwnProperty; function z0e(e) { var t = this.__data__; return $p ? t[e] !== void 0 : B0e.call(t, e); } var V0e = "__lodash_hash_undefined__"; function j0e(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = $p && t === void 0 ? V0e : t, this; } function Ul(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Ul.prototype.clear = A0e; Ul.prototype.delete = P0e; Ul.prototype.get = M0e; Ul.prototype.has = z0e; Ul.prototype.set = j0e; function H0e() { this.__data__ = [], this.size = 0; } function _g(e, t) { for (var n = e.length; n--; ) if (dw(e[n][0], t)) return n; return -1; } var U0e = Array.prototype, q0e = U0e.splice; function W0e(e) { var t = this.__data__, n = _g(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : q0e.call(t, n, 1), --this.size, !0; } function G0e(e) { var t = this.__data__, n = _g(t, e); return n < 0 ? void 0 : t[n][1]; } function K0e(e) { return _g(this.__data__, e) > -1; } function Y0e(e, t) { var n = this.__data__, r = _g(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Wi(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Wi.prototype.clear = H0e; Wi.prototype.delete = W0e; Wi.prototype.get = G0e; Wi.prototype.has = K0e; Wi.prototype.set = Y0e; var _p = fu(_a, "Map"); function X0e() { this.size = 0, this.__data__ = { hash: new Ul(), map: new (_p || Wi)(), string: new Ul() }; } function Z0e(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Tg(e, t) { var n = e.__data__; return Z0e(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function J0e(e) { var t = Tg(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function Q0e(e) { return Tg(this, e).get(e); } function ege(e) { return Tg(this, e).has(e); } function tge(e, t) { var n = Tg(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Gi(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Gi.prototype.clear = X0e; Gi.prototype.delete = J0e; Gi.prototype.get = Q0e; Gi.prototype.has = ege; Gi.prototype.set = tge; var nge = "Expected a function"; function gw(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(nge); var n = function() { var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache; if (a.has(o)) return a.get(o); var i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (gw.Cache || Gi)(), n; } gw.Cache = Gi; var rge = 500; function oge(e) { var t = gw(e, function(r) { return n.size === rge && n.clear(), r; }), n = t.cache; return t; } var age = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ige = /\\(\\)?/g, sge = oge(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(age, function(n, r, o, a) { t.push(o ? a.replace(ige, "$1") : r || n); }), t; }); function lge(e) { return e == null ? "" : WF(e); } function Og(e, t) { return Xo(e) ? e : vw(e, t) ? [e] : sge(lge(e)); } var uge = 1 / 0; function wf(e) { if (typeof e == "string" || $g(e)) return e; var t = e + ""; return t == "0" && 1 / e == -uge ? "-0" : t; } function mw(e, t) { t = Og(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[wf(t[n++])]; return n && n == r ? e : void 0; } function Ci(e, t, n) { var r = e == null ? void 0 : mw(e, t); return r === void 0 ? n : r; } function rI(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var b4 = Yo ? Yo.isConcatSpreadable : void 0; function cge(e) { return Xo(e) || fw(e) || !!(b4 && e && e[b4]); } function yw(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = cge), o || (o = []); ++a < i; ) { var s = e[a]; t > 0 && n(s) ? t > 1 ? yw(s, t - 1, n, r, o) : rI(o, s) : o[o.length] = s; } return o; } function dge(e) { var t = e == null ? 0 : e.length; return t ? yw(e, 1) : []; } function pge(e) { return Ave(zve(e, void 0, dge), e + ""); } var fge = tI(Object.getPrototypeOf, Object); function Si() { if (!arguments.length) return []; var e = arguments[0]; return Xo(e) ? e : [e]; } function hge() { this.__data__ = new Wi(), this.size = 0; } function vge(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function gge(e) { return this.__data__.get(e); } function mge(e) { return this.__data__.has(e); } var yge = 200; function bge(e, t) { var n = this.__data__; if (n instanceof Wi) { var r = n.__data__; if (!_p || r.length < yge - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Gi(r); } return n.set(e, t), this.size = n.size, this; } function Ha(e) { var t = this.__data__ = new Wi(e); this.size = t.size; } Ha.prototype.clear = hge; Ha.prototype.delete = vge; Ha.prototype.get = gge; Ha.prototype.has = mge; Ha.prototype.set = bge; var oI = typeof exports == "object" && exports && !exports.nodeType && exports, w4 = oI && typeof module == "object" && module && !module.nodeType && module, wge = w4 && w4.exports === oI, x4 = wge ? _a.Buffer : void 0; x4 && x4.allocUnsafe; function xge(e, t) { return e.slice(); } function kge(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = 0, a = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (a[o++] = i); } return a; } function Cge() { return []; } var Sge = Object.prototype, Ege = Sge.propertyIsEnumerable, k4 = Object.getOwnPropertySymbols, $ge = k4 ? function(e) { return e == null ? [] : (e = Object(e), kge(k4(e), function(t) { return Ege.call(e, t); })); } : Cge; function _ge(e, t, n) { var r = t(e); return Xo(e) ? r : rI(r, n(e)); } function Ay(e) { return _ge(e, nI, $ge); } var Py = fu(_a, "DataView"), Ly = fu(_a, "Promise"), Ry = fu(_a, "Set"), C4 = "[object Map]", Tge = "[object Object]", S4 = "[object Promise]", E4 = "[object Set]", $4 = "[object WeakMap]", _4 = "[object DataView]", Oge = pu(Py), Fge = pu(_p), Ige = pu(Ly), Age = pu(Ry), Pge = pu(Iy), va = Gc; (Py && va(new Py(new ArrayBuffer(1))) != _4 || _p && va(new _p()) != C4 || Ly && va(Ly.resolve()) != S4 || Ry && va(new Ry()) != E4 || Iy && va(new Iy()) != $4) && (va = function(e) { var t = Gc(e), n = t == Tge ? e.constructor : void 0, r = n ? pu(n) : ""; if (r) switch (r) { case Oge: return _4; case Fge: return C4; case Ige: return S4; case Age: return E4; case Pge: return $4; } return t; }); var Lge = Object.prototype, Rge = Lge.hasOwnProperty; function Dge(e) { var t = e.length, n = new e.constructor(t); return t && typeof e[0] == "string" && Rge.call(e, "index") && (n.index = e.index, n.input = e.input), n; } var Xv = _a.Uint8Array; function bw(e) { var t = new e.constructor(e.byteLength); return new Xv(t).set(new Xv(e)), t; } function Mge(e, t) { var n = bw(e.buffer); return new e.constructor(n, e.byteOffset, e.byteLength); } var Nge = /\w*$/; function Bge(e) { var t = new e.constructor(e.source, Nge.exec(e)); return t.lastIndex = e.lastIndex, t; } var T4 = Yo ? Yo.prototype : void 0, O4 = T4 ? T4.valueOf : void 0; function zge(e) { return O4 ? Object(O4.call(e)) : {}; } function Vge(e, t) { var n = bw(e.buffer); return new e.constructor(n, e.byteOffset, e.length); } var jge = "[object Boolean]", Hge = "[object Date]", Uge = "[object Map]", qge = "[object Number]", Wge = "[object RegExp]", Gge = "[object Set]", Kge = "[object String]", Yge = "[object Symbol]", Xge = "[object ArrayBuffer]", Zge = "[object DataView]", Jge = "[object Float32Array]", Qge = "[object Float64Array]", eme = "[object Int8Array]", tme = "[object Int16Array]", nme = "[object Int32Array]", rme = "[object Uint8Array]", ome = "[object Uint8ClampedArray]", ame = "[object Uint16Array]", ime = "[object Uint32Array]"; function sme(e, t, n) { var r = e.constructor; switch (t) { case Xge: return bw(e); case jge: case Hge: return new r(+e); case Zge: return Mge(e); case Jge: case Qge: case eme: case tme: case nme: case rme: case ome: case ame: case ime: return Vge(e); case Uge: return new r(); case qge: case Kge: return new r(e); case Wge: return Bge(e); case Gge: return new r(); case Yge: return zge(e); } } function lme(e) { return typeof e.constructor == "function" && !XF(e) ? Sve(fge(e)) : {}; } var ume = "[object Map]"; function cme(e) { return Bs(e) && va(e) == ume; } var F4 = vc && vc.isMap, dme = F4 ? hw(F4) : cme, pme = "[object Set]"; function fme(e) { return Bs(e) && va(e) == pme; } var I4 = vc && vc.isSet, hme = I4 ? hw(I4) : fme, vme = 1, aI = "[object Arguments]", gme = "[object Array]", mme = "[object Boolean]", yme = "[object Date]", bme = "[object Error]", iI = "[object Function]", wme = "[object GeneratorFunction]", xme = "[object Map]", kme = "[object Number]", sI = "[object Object]", Cme = "[object RegExp]", Sme = "[object Set]", Eme = "[object String]", $me = "[object Symbol]", _me = "[object WeakMap]", Tme = "[object ArrayBuffer]", Ome = "[object DataView]", Fme = "[object Float32Array]", Ime = "[object Float64Array]", Ame = "[object Int8Array]", Pme = "[object Int16Array]", Lme = "[object Int32Array]", Rme = "[object Uint8Array]", Dme = "[object Uint8ClampedArray]", Mme = "[object Uint16Array]", Nme = "[object Uint32Array]", mn = {}; mn[aI] = mn[gme] = mn[Tme] = mn[Ome] = mn[mme] = mn[yme] = mn[Fme] = mn[Ime] = mn[Ame] = mn[Pme] = mn[Lme] = mn[xme] = mn[kme] = mn[sI] = mn[Cme] = mn[Sme] = mn[Eme] = mn[$me] = mn[Rme] = mn[Dme] = mn[Mme] = mn[Nme] = !0; mn[bme] = mn[iI] = mn[_me] = !1; function sv(e, t, n, r, o, a) { var i, s = t & vme; if (i !== void 0) return i; if (!Qa(e)) return e; var l = Xo(e); if (l) i = Dge(e); else { var u = va(e), c = u == iI || u == wme; if (Yv(e)) return xge(e); if (u == sI || u == aI || c && !o) i = c ? {} : lme(e); else { if (!mn[u]) return o ? e : {}; i = sme(e, u); } } a || (a = new Ha()); var d = a.get(e); if (d) return d; a.set(e, i), hme(e) ? e.forEach(function(p) { i.add(sv(p, t, n, p, e, a)); }) : dme(e) && e.forEach(function(p, v) { i.set(v, sv(p, t, n, v, e, a)); }); var f = Ay, h = l ? void 0 : f(e); return Pve(h || e, function(p, v) { h && (v = p, p = e[v]), YF(i, v, sv(p, t, n, v, e, a)); }), i; } var Bme = 1, zme = 4; function lI(e) { return sv(e, Bme | zme); } var Vme = "__lodash_hash_undefined__"; function jme(e) { return this.__data__.set(e, Vme), this; } function Hme(e) { return this.__data__.has(e); } function Zv(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Gi(); ++t < n; ) this.add(e[t]); } Zv.prototype.add = Zv.prototype.push = jme; Zv.prototype.has = Hme; function Ume(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r; ) if (t(e[n], n, e)) return !0; return !1; } function qme(e, t) { return e.has(t); } var Wme = 1, Gme = 2; function uI(e, t, n, r, o, a) { var i = n & Wme, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & Gme ? new Zv() : void 0; for (a.set(e, t), a.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, a) : r(p, v, d, e, t, a); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!Ume(t, function(g, b) { if (!qme(h, b) && (p === g || o(p, g, n, r, a))) return h.push(b); })) { f = !1; break; } } else if (!(p === v || o(p, v, n, r, a))) { f = !1; break; } } return a.delete(e), a.delete(t), f; } function Kme(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, o) { n[++t] = [o, r]; }), n; } function Yme(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var Xme = 1, Zme = 2, Jme = "[object Boolean]", Qme = "[object Date]", e1e = "[object Error]", t1e = "[object Map]", n1e = "[object Number]", r1e = "[object RegExp]", o1e = "[object Set]", a1e = "[object String]", i1e = "[object Symbol]", s1e = "[object ArrayBuffer]", l1e = "[object DataView]", A4 = Yo ? Yo.prototype : void 0, a1 = A4 ? A4.valueOf : void 0; function u1e(e, t, n, r, o, a, i) { switch (n) { case l1e: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case s1e: return !(e.byteLength != t.byteLength || !a(new Xv(e), new Xv(t))); case Jme: case Qme: case n1e: return dw(+e, +t); case e1e: return e.name == t.name && e.message == t.message; case r1e: case a1e: return e == t + ""; case t1e: var s = Kme; case o1e: var l = r & Xme; if (s || (s = Yme), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= Zme, i.set(e, t); var c = uI(s(e), s(t), r, o, a, i); return i.delete(e), c; case i1e: if (a1) return a1.call(e) == a1.call(t); } return !1; } var c1e = 1, d1e = Object.prototype, p1e = d1e.hasOwnProperty; function f1e(e, t, n, r, o, a) { var i = n & c1e, s = Ay(e), l = s.length, u = Ay(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : p1e.call(t, f))) return !1; } var h = a.get(e), p = a.get(t); if (h && p) return h == t && p == e; var v = !0; a.set(e, t), a.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], b = t[f]; if (r) var C = i ? r(b, g, f, t, e, a) : r(g, b, f, e, t, a); if (!(C === void 0 ? g === b || o(g, b, n, r, a) : C)) { v = !1; break; } m || (m = f == "constructor"); } if (v && !m) { var x = e.constructor, w = t.constructor; x != w && "constructor" in e && "constructor" in t && !(typeof x == "function" && x instanceof x && typeof w == "function" && w instanceof w) && (v = !1); } return a.delete(e), a.delete(t), v; } var h1e = 1, P4 = "[object Arguments]", L4 = "[object Array]", xh = "[object Object]", v1e = Object.prototype, R4 = v1e.hasOwnProperty; function g1e(e, t, n, r, o, a) { var i = Xo(e), s = Xo(t), l = i ? L4 : va(e), u = s ? L4 : va(t); l = l == P4 ? xh : l, u = u == P4 ? xh : u; var c = l == xh, d = u == xh, f = l == u; if (f && Yv(e)) { if (!Yv(t)) return !1; i = !0, c = !1; } if (f && !c) return a || (a = new Ha()), i || eI(e) ? uI(e, t, n, r, o, a) : u1e(e, t, l, n, r, o, a); if (!(n & h1e)) { var h = c && R4.call(e, "__wrapped__"), p = d && R4.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return a || (a = new Ha()), o(v, m, n, r, a); } } return f ? (a || (a = new Ha()), f1e(e, t, n, r, o, a)) : !1; } function Fg(e, t, n, r, o) { return e === t ? !0 : e == null || t == null || !Bs(e) && !Bs(t) ? e !== e && t !== t : g1e(e, t, n, r, Fg, o); } var m1e = 1, y1e = 2; function b1e(e, t, n, r) { var o = n.length, a = o; if (e == null) return !a; for (e = Object(e); o--; ) { var i = n[o]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++o < a; ) { i = n[o]; var s = i[0], l = e[s], u = i[1]; if (i[2]) { if (l === void 0 && !(s in e)) return !1; } else { var c = new Ha(), d; if (!(d === void 0 ? Fg(u, l, m1e | y1e, r, c) : d)) return !1; } } return !0; } function cI(e) { return e === e && !Qa(e); } function w1e(e) { for (var t = nI(e), n = t.length; n--; ) { var r = t[n], o = e[r]; t[n] = [r, o, cI(o)]; } return t; } function dI(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function x1e(e) { var t = w1e(e); return t.length == 1 && t[0][2] ? dI(t[0][0], t[0][1]) : function(n) { return n === e || b1e(n, e, t); }; } function k1e(e, t) { return e != null && t in Object(e); } function C1e(e, t, n) { t = Og(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = wf(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && pw(o) && cw(i, o) && (Xo(e) || fw(e))); } function pI(e, t) { return e != null && C1e(e, t, k1e); } var S1e = 1, E1e = 2; function $1e(e, t) { return vw(e) && cI(t) ? dI(wf(e), t) : function(n) { var r = Ci(n, e); return r === void 0 && r === t ? pI(n, e) : Fg(t, r, S1e | E1e); }; } function _1e(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function T1e(e) { return function(t) { return mw(t, e); }; } function O1e(e) { return vw(e) ? _1e(wf(e)) : T1e(e); } function F1e(e) { return typeof e == "function" ? e : e == null ? GF : typeof e == "object" ? Xo(e) ? $1e(e[0], e[1]) : x1e(e) : O1e(e); } var i1 = function() { return _a.Date.now(); }, I1e = "Expected a function", A1e = Math.max, P1e = Math.min; function fI(e, t, n) { var r, o, a, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(I1e); t = d4(t) || 0, Qa(n) && (c = !!n.leading, d = "maxWait" in n, a = d ? A1e(d4(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f); function h(k) { var S = r, _ = o; return r = o = void 0, u = k, i = e.apply(_, S), i; } function p(k) { return u = k, s = setTimeout(g, t), c ? h(k) : i; } function v(k) { var S = k - l, _ = k - u, O = t - S; return d ? P1e(O, a - _) : O; } function m(k) { var S = k - l, _ = k - u; return l === void 0 || S >= t || S < 0 || d && _ >= a; } function g() { var k = i1(); if (m(k)) return b(k); s = setTimeout(g, v(k)); } function b(k) { return s = void 0, f && r ? h(k) : (r = o = void 0, i); } function C() { s !== void 0 && clearTimeout(s), u = 0, r = l = o = s = void 0; } function x() { return s === void 0 ? i : b(i1()); } function w() { var k = i1(), S = m(k); if (r = arguments, o = this, l = k, S) { if (s === void 0) return p(l); if (d) return clearTimeout(s), s = setTimeout(g, t), h(l); } return s === void 0 && (s = setTimeout(g, t)), i; } return w.cancel = C, w.flush = x, w; } function L1e(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var o = r - 1; return Lve(e, F1e(t), o); } var R1e = 1 / 0; function D1e(e) { var t = e == null ? 0 : e.length; return t ? yw(e, R1e) : []; } function Jv(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var o = e[t]; r[o[0]] = o[1]; } return r; } function Ua(e, t) { return Fg(e, t); } function xf(e) { return e == null; } function hI(e) { return e === void 0; } function M1e(e, t, n, r) { if (!Qa(e)) return e; t = Og(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = wf(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = Qa(c) ? c : cw(t[o + 1]) ? [] : {}); } YF(s, l, u), s = s[l]; } return e; } function N1e(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = mw(e, i); n(s, i) && M1e(a, Og(i, e), s); } return a; } function B1e(e, t) { return N1e(e, t, function(n, r) { return pI(e, r); }); } var vI = pge(function(e, t) { return e == null ? {} : B1e(e, t); }); const _i = (e) => e === void 0, ei = (e) => typeof e == "boolean", sn = (e) => typeof e == "number", Dy = (e) => !e && e !== 0 || Yr(e) && e.length === 0 || dr(e) && !Object.keys(e).length, El = (e) => typeof Element > "u" ? !1 : e instanceof Element, Tp = (e) => xf(e), z1e = (e) => uo(e) ? !Number.isNaN(Number(e)) : !1, V1e = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), D4 = (e) => Vhe(e), M4 = (e) => Object.keys(e); class gI extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function mI(e, t) { throw new gI(`[${e}] ${t}`); } function Wn(e, t) { if (process.env.NODE_ENV !== "production") { const n = uo(e) ? new gI(`[${e}] ${t}`) : e; console.warn(n); } } const j1e = "utils/dom/style", yI = (e = "") => e.split(" ").filter((t) => !!t.trim()), N4 = (e, t) => { if (!e || !t) return !1; if (t.includes(" ")) throw new Error("className should not contain space."); return e.classList.contains(t); }, My = (e, t) => { !e || !t.trim() || e.classList.add(...yI(t)); }, Op = (e, t) => { !e || !t.trim() || e.classList.remove(...yI(t)); }, Du = (e, t) => { var n; if (!En || !e || !t) return ""; let r = Nhe(t); r === "float" && (r = "cssFloat"); try { const o = e.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return a ? a[r] : ""; } catch { return e.style[r]; } }; function ql(e, t = "px") { if (!e) return ""; if (sn(e) || z1e(e)) return `${e}${t}`; if (uo(e)) return e; Wn(j1e, "binding value must be a string or number"); } let kh; const H1e = (e) => { var t; if (!En) return 0; if (kh !== void 0) return kh; 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 r = n.offsetWidth; n.style.overflow = "scroll"; const o = document.createElement("div"); o.style.width = "100%", n.appendChild(o); const a = o.offsetWidth; return (t = n.parentNode) == null || t.removeChild(n), kh = r - a, kh; }; function bI(e, t) { if (!En) return; if (!t) { e.scrollTop = 0; return; } const n = []; let r = t.offsetParent; for (; r !== null && e !== r && e.contains(r); ) n.push(r), r = r.offsetParent; const o = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), a = o + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; o < i ? e.scrollTop = o : a > s && (e.scrollTop = a - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var U1e = /* @__PURE__ */ K({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z" }) ])); } }), kf = U1e, q1e = /* @__PURE__ */ K({ name: "ArrowLeft", __name: "arrow-left", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z" }) ])); } }), ww = q1e, W1e = /* @__PURE__ */ K({ name: "ArrowRight", __name: "arrow-right", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z" }) ])); } }), Ig = W1e, G1e = /* @__PURE__ */ K({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0" }) ])); } }), K1e = G1e, Y1e = /* @__PURE__ */ K({ name: "Check", __name: "check", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" }) ])); } }), wI = Y1e, X1e = /* @__PURE__ */ K({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }), B("path", { fill: "currentColor", d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z" }) ])); } }), Z1e = X1e, J1e = /* @__PURE__ */ K({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z" }), B("path", { fill: "currentColor", d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896" }) ])); } }), Ag = J1e, Q1e = /* @__PURE__ */ K({ name: "Close", __name: "close", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z" }) ])); } }), Ny = Q1e, eye = /* @__PURE__ */ K({ name: "DArrowLeft", __name: "d-arrow-left", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z" }) ])); } }), tye = eye, nye = /* @__PURE__ */ K({ name: "DArrowRight", __name: "d-arrow-right", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z" }) ])); } }), rye = nye, oye = /* @__PURE__ */ K({ name: "Delete", __name: "delete", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32" }) ])); } }), By = oye, aye = /* @__PURE__ */ K({ name: "Hide", __name: "hide", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z" }), B("path", { fill: "currentColor", d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z" }) ])); } }), iye = aye, sye = /* @__PURE__ */ K({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z" }) ])); } }), Pg = sye, lye = /* @__PURE__ */ K({ name: "Location", __name: "location", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544" }), B("path", { fill: "currentColor", d: "M512 512a96 96 0 1 0 0-192 96 96 0 0 0 0 192m0 64a160 160 0 1 1 0-320 160 160 0 0 1 0 320" }) ])); } }), uye = lye, cye = /* @__PURE__ */ K({ name: "MoreFilled", __name: "more-filled", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224" }) ])); } }), B4 = cye, dye = /* @__PURE__ */ K({ name: "View", __name: "view", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160" }) ])); } }), xI = dye, pye = /* @__PURE__ */ K({ name: "WarnTriangleFilled", __name: "warn-triangle-filled", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", "xml:space": "preserve", style: { "enable-background": "new 0 0 1024 1024" }, viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M928.99 755.83 574.6 203.25c-12.89-20.16-36.76-32.58-62.6-32.58s-49.71 12.43-62.6 32.58L95.01 755.83c-12.91 20.12-12.9 44.91.01 65.03 12.92 20.12 36.78 32.51 62.59 32.49h708.78c25.82.01 49.68-12.37 62.59-32.49 12.91-20.12 12.92-44.91.01-65.03M554.67 768h-85.33v-85.33h85.33zm0-426.67v298.66h-85.33V341.32z" }) ])); } }), fye = pye, hye = /* @__PURE__ */ K({ name: "Warning", __name: "warning", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32" }) ])); } }), kI = hye; const CI = "__epPropKey", ct = (e) => e, vye = (e) => dr(e) && !!e[CI], Lg = (e, t) => { if (!dr(e) || vye(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, s = { type: a, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), i4(e, "default") && c.push(o), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", "); m0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [CI]: !0 }; return i4(e, "default") && (s.default = o), s; }, St = (e) => Jv(Object.entries(e).map(([t, n]) => [ t, Lg(n, t) ])), Zo = ct([ String, Object, Function ]), SI = { validating: Pg, success: Z1e, error: Ag }, zn = (e, t) => { if (e.install = (n) => { for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e[n] = r; return e; }, gye = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Fo = (e) => (e.install = Fi, e), EI = (...e) => (t) => { e.forEach((n) => { Hn(n) ? n(t) : n.value = t; }); }, Wt = { 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" }, Mn = "update:modelValue", Wl = "change", Rg = ["", "default", "small", "large"]; var lv = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(lv || {}); const z4 = (e) => [...new Set(e)], V4 = (e) => !e && e !== 0 ? [] : Array.isArray(e) ? e : [e], mye = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), ys = (e) => e, yye = ["class", "style"], bye = /^on[A-Z]/, wye = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = $(() => ((n == null ? void 0 : n.value) || []).concat(yye)), o = rt(); return o ? $(() => { var a; return Jv(Object.entries((a = o.proxy) == null ? void 0 : a.$attrs).filter(([i]) => !r.value.includes(i) && !(t && bye.test(i)))); }) : (Wn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), $(() => ({}))); }, $l = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { ce(() => y(i), (s) => { s && Wn(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var xye = { name: "en", el: { breadcrumb: { label: "Breadcrumb" }, colorpicker: { confirm: "OK", clear: "Clear", defaultLabel: "color picker", description: "current color is {color}. press enter to select a new color.", alphaLabel: "pick alpha value" }, datepicker: { now: "Now", today: "Today", cancel: "Cancel", clear: "Clear", confirm: "OK", dateTablePrompt: "Use the arrow keys and enter to select the day of the month", monthTablePrompt: "Use the arrow keys and enter to select the month", yearTablePrompt: "Use the arrow keys and enter to select the year", selectedDate: "Selected date", selectDate: "Select date", selectTime: "Select time", startDate: "Start Date", startTime: "Start Time", endDate: "End Date", endTime: "End Time", prevYear: "Previous Year", nextYear: "Next Year", prevMonth: "Previous Month", nextMonth: "Next Month", year: "", month1: "January", month2: "February", month3: "March", month4: "April", month5: "May", month6: "June", month7: "July", month8: "August", month9: "September", month10: "October", month11: "November", month12: "December", week: "week", weeks: { sun: "Sun", mon: "Mon", tue: "Tue", wed: "Wed", thu: "Thu", fri: "Fri", sat: "Sat" }, weeksFull: { sun: "Sunday", mon: "Monday", tue: "Tuesday", wed: "Wednesday", thu: "Thursday", fri: "Friday", sat: "Saturday" }, months: { jan: "Jan", feb: "Feb", mar: "Mar", apr: "Apr", may: "May", jun: "Jun", jul: "Jul", aug: "Aug", sep: "Sep", oct: "Oct", nov: "Nov", dec: "Dec" } }, inputNumber: { decrease: "decrease number", increase: "increase number" }, select: { loading: "Loading", noMatch: "No matching data", noData: "No data", placeholder: "Select" }, mention: { loading: "Loading" }, dropdown: { toggleDropdown: "Toggle Dropdown" }, cascader: { noMatch: "No matching data", loading: "Loading", placeholder: "Select", noData: "No data" }, pagination: { goto: "Go to", pagesize: "/page", total: "Total {total}", pageClassifier: "", page: "Page", prev: "Go to previous page", next: "Go to next page", currentPage: "page {pager}", prevPages: "Previous {pager} pages", nextPages: "Next {pager} pages", deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details" }, dialog: { close: "Close this dialog" }, drawer: { close: "Close this dialog" }, messagebox: { title: "Message", confirm: "OK", cancel: "Cancel", error: "Illegal input", close: "Close this dialog" }, upload: { deleteTip: "press delete to remove", delete: "Delete", preview: "Preview", continue: "Continue" }, slider: { defaultLabel: "slider between {min} and {max}", defaultRangeStartLabel: "pick start value", defaultRangeEndLabel: "pick end value" }, table: { emptyText: "No Data", confirmFilter: "Confirm", resetFilter: "Reset", clearFilter: "All", sumText: "Sum" }, tour: { next: "Next", previous: "Previous", finish: "Finish" }, tree: { emptyText: "No Data" }, transfer: { noMatch: "No matching data", noData: "No data", titles: ["List 1", "List 2"], filterPlaceholder: "Enter keyword", noCheckedFormat: "{total} items", hasCheckedFormat: "{checked}/{total} checked" }, image: { error: "FAILED" }, pageHeader: { title: "Back" }, popconfirm: { confirmButtonText: "Yes", cancelButtonText: "No" }, carousel: { leftArrow: "Carousel arrow left", rightArrow: "Carousel arrow right", indicator: "Carousel switch to index {index}" } } }; const kye = (e) => (t, n) => Cye(t, n, y(e)), Cye = (e, t, n) => Ci(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), Sye = (e) => { const t = $(() => y(e).name), n = Gn(e) ? e : z(e); return { lang: t, locale: n, t: kye(e) }; }, $I = Symbol("localeContextKey"), Io = (e) => { const t = e || xe($I, z()); return Sye($(() => t.value || xye)); }, qd = "el", Eye = "is-", al = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, _I = Symbol("namespaceContextKey"), xw = (e) => { const t = e || (rt() ? xe(_I, z(qd)) : z(qd)); return $(() => y(t) || qd); }, mt = (e, t) => { const n = xw(t); return { namespace: n, b: (r = "") => al(n.value, e, r, "", ""), e: (r) => r ? al(n.value, e, "", r, "") : "", m: (r) => r ? al(n.value, e, "", "", r) : "", be: (r, o) => r && o ? al(n.value, e, r, o, "") : "", em: (r, o) => r && o ? al(n.value, e, "", r, o) : "", bm: (r, o) => r && o ? al(n.value, e, r, "", o) : "", bem: (r, o, a) => r && o && a ? al(n.value, e, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : !0; return r && a ? `${Eye}${r}` : ""; }, cssVar: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${a}`] = r[a]); return o; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${e}-${a}`] = r[a]); return o; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, $ye = (e, t = {}) => { Gn(e) || mI("[useLockscreen]", "You need to pass a ref param to this function"); const n = t.ns || mt("popup"), r = $(() => n.bm("parent", "hidden")); if (!En || N4(document.body, r.value)) return; let o = 0, a = !1, i = "0"; const s = () => { setTimeout(() => { Op(document == null ? void 0 : document.body, r.value), a && document && (document.body.style.width = i); }, 200); }; ce(e, (l) => { if (!l) { s(); return; } a = !N4(document.body, r.value), a && (i = document.body.style.width), o = H1e(n.namespace.value); const u = document.documentElement.clientHeight < document.body.scrollHeight, c = Du(document.body, "overflowY"); o > 0 && (u || c === "scroll") && a && (document.body.style.width = `calc(100% - ${o}px)`), My(document.body, r.value); }), jp(() => s()); }, _ye = Lg({ type: ct(Boolean), default: null }), Tye = Lg({ type: ct(Function) }), Oye = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: _ye, [n]: Tye }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = rt(), { emit: f } = d, h = d.props, p = $(() => Hn(h[n])), v = $(() => h[e] === null), m = (k) => { a.value !== !0 && (a.value = !0, i && (i.value = k), Hn(u) && u(k)); }, g = (k) => { a.value !== !1 && (a.value = !1, i && (i.value = k), Hn(c) && c(k)); }, b = (k) => { if (h.disabled === !0 || Hn(l) && !l()) return; const S = p.value && En; S && f(t, !0), (v.value || !S) && m(k); }, C = (k) => { if (h.disabled === !0 || !En) return; const S = p.value && En; S && f(t, !1), (v.value || !S) && g(k); }, x = (k) => { ei(k) && (h.disabled && k ? p.value && f(t, !1) : a.value !== k && (k ? m() : g())); }, w = () => { a.value ? C() : b(); }; return ce(() => h[e], x), s && d.appContext.config.globalProperties.$route !== void 0 && ce(() => ({ ...d.proxy.$route }), () => { s.value && a.value && C(); }), at(() => { x(h[e]); }), { hide: C, show: b, toggle: w, hasUpdateHandler: p }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, TI = (e) => { const t = rt(); return $(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var co = "top", Jo = "bottom", Qo = "right", po = "left", kw = "auto", Cf = [co, Jo, Qo, po], gc = "start", Fp = "end", Fye = "clippingParents", OI = "viewport", bd = "popper", Iye = "reference", j4 = Cf.reduce(function(e, t) { return e.concat([t + "-" + gc, t + "-" + Fp]); }, []), Sf = [].concat(Cf, [kw]).reduce(function(e, t) { return e.concat([t, t + "-" + gc, t + "-" + Fp]); }, []), Aye = "beforeRead", Pye = "read", Lye = "afterRead", Rye = "beforeMain", Dye = "main", Mye = "afterMain", Nye = "beforeWrite", Bye = "write", zye = "afterWrite", Vye = [Aye, Pye, Lye, Rye, Dye, Mye, Nye, Bye, zye]; function ti(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Ta(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function mc(e) { var t = Ta(e).Element; return e instanceof t || e instanceof Element; } function Ho(e) { var t = Ta(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function Cw(e) { if (typeof ShadowRoot > "u") return !1; var t = Ta(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function jye(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n]; !Ho(a) || !ti(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function Hye(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(r) { var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !Ho(o) || !ti(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var FI = { name: "applyStyles", enabled: !0, phase: "write", fn: jye, effect: Hye, requires: ["computeStyles"] }; function qa(e) { return e.split("-")[0]; } var _l = Math.max, Qv = Math.min, yc = Math.round; function bc(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (Ho(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = yc(n.width) / i || 1), a > 0 && (o = yc(n.height) / a || 1); } return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o }; } function Sw(e) { var t = bc(e), n = e.offsetWidth, r = e.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: r }; } function II(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && Cw(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Di(e) { return Ta(e).getComputedStyle(e); } function Uye(e) { return ["table", "td", "th"].indexOf(ti(e)) >= 0; } function Gs(e) { return ((mc(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function Dg(e) { return ti(e) === "html" ? e : e.assignedSlot || e.parentNode || (Cw(e) ? e.host : null) || Gs(e); } function H4(e) { return !Ho(e) || Di(e).position === "fixed" ? null : e.offsetParent; } function qye(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Ho(e)) { var r = Di(e); if (r.position === "fixed") return null; } var o = Dg(e); for (Cw(o) && (o = o.host); Ho(o) && ["html", "body"].indexOf(ti(o)) < 0; ) { var a = Di(o); 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 o; o = o.parentNode; } return null; } function Ef(e) { for (var t = Ta(e), n = H4(e); n && Uye(n) && Di(n).position === "static"; ) n = H4(n); return n && (ti(n) === "html" || ti(n) === "body" && Di(n).position === "static") ? t : n || qye(e) || t; } function Ew(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Wd(e, t, n) { return _l(e, Qv(t, n)); } function Wye(e, t, n) { var r = Wd(e, t, n); return r > n ? n : r; } function AI() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function PI(e) { return Object.assign({}, AI(), e); } function LI(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var Gye = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, PI(typeof e != "number" ? e : LI(e, Cf)); }; function Kye(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = qa(n.placement), l = Ew(s), u = [po, Qo].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = Gye(o.padding, n), f = Sw(a), h = l === "y" ? co : po, p = l === "y" ? Jo : Qo, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Ef(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, C = v / 2 - m / 2, x = d[h], w = b - f[c] - d[p], k = b / 2 - f[c] / 2 + C, S = Wd(x, k, w), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - k, t); } } function Yye(e) { var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r; o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !II(t.elements.popper, o) || (t.elements.arrow = o)); } var Xye = { name: "arrow", enabled: !0, phase: "main", fn: Kye, effect: Yye, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function wc(e) { return e.split("-")[1]; } var Zye = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function Jye(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: yc(t * o) / o || 0, y: yc(n * o) / o || 0 }; } function U4(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), C = po, x = co, w = window; if (u) { var k = Ef(n), S = "clientHeight", _ = "clientWidth"; if (k === Ta(n) && (k = Gs(n), Di(k).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), k = k, o === co || (o === po || o === Qo) && a === Fp) { x = Jo; var O = d && k === w && w.visualViewport ? w.visualViewport.height : k[S]; v -= O - r.height, v *= l ? 1 : -1; } if (o === po || (o === co || o === Jo) && a === Fp) { C = Qo; var F = d && k === w && w.visualViewport ? w.visualViewport.width : k[_]; h -= F - r.width, h *= l ? 1 : -1; } } var I = Object.assign({ position: s }, u && Zye), P = c === !0 ? Jye({ x: h, y: v }) : { x: h, y: v }; if (h = P.x, v = P.y, l) { var M; return Object.assign({}, I, (M = {}, M[x] = b ? "0" : "", M[C] = g ? "0" : "", M.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", M)); } return Object.assign({}, I, (t = {}, t[x] = b ? v + "px" : "", t[C] = g ? h + "px" : "", t.transform = "", t)); } function Qye(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: qa(t.placement), variation: wc(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, U4(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, U4(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var RI = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: Qye, data: {} }, Ch = { passive: !0 }; function ebe(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Ta(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, Ch); }), s && l.addEventListener("resize", n.update, Ch), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, Ch); }), s && l.removeEventListener("resize", n.update, Ch); }; } var DI = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: ebe, data: {} }, tbe = { left: "right", right: "left", bottom: "top", top: "bottom" }; function uv(e) { return e.replace(/left|right|bottom|top/g, function(t) { return tbe[t]; }); } var nbe = { start: "end", end: "start" }; function q4(e) { return e.replace(/start|end/g, function(t) { return nbe[t]; }); } function $w(e) { var t = Ta(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function _w(e) { return bc(Gs(e)).left + $w(e).scrollLeft; } function rbe(e) { var t = Ta(e), n = Gs(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + _w(e), y: s }; } function obe(e) { var t, n = Gs(e), r = $w(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = _l(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = _l(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + _w(e), l = -r.scrollTop; return Di(o || n).direction === "rtl" && (s += _l(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function Tw(e) { var t = Di(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function MI(e) { return ["html", "body", "#document"].indexOf(ti(e)) >= 0 ? e.ownerDocument.body : Ho(e) && Tw(e) ? e : MI(Dg(e)); } function Gd(e, t) { var n; t === void 0 && (t = []); var r = MI(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ta(r), i = o ? [a].concat(a.visualViewport || [], Tw(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(Gd(Dg(i))); } function zy(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function abe(e) { var t = bc(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 W4(e, t) { return t === OI ? zy(rbe(e)) : mc(t) ? abe(t) : zy(obe(Gs(e))); } function ibe(e) { var t = Gd(Dg(e)), n = ["absolute", "fixed"].indexOf(Di(e).position) >= 0, r = n && Ho(e) ? Ef(e) : e; return mc(r) ? t.filter(function(o) { return mc(o) && II(o, r) && ti(o) !== "body"; }) : []; } function sbe(e, t, n) { var r = t === "clippingParents" ? ibe(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = W4(e, l); return s.top = _l(u.top, s.top), s.right = Qv(u.right, s.right), s.bottom = Qv(u.bottom, s.bottom), s.left = _l(u.left, s.left), s; }, W4(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function NI(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? qa(r) : null, a = r ? wc(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case co: l = { x: i, y: t.y - n.height }; break; case Jo: l = { x: i, y: t.y + t.height }; break; case Qo: l = { x: t.x + t.width, y: s }; break; case po: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? Ew(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case gc: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case Fp: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function Ip(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? Fye : a, s = n.rootBoundary, l = s === void 0 ? OI : s, u = n.elementContext, c = u === void 0 ? bd : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = PI(typeof p != "number" ? p : LI(p, Cf)), m = c === bd ? Iye : bd, g = e.rects.popper, b = e.elements[f ? m : c], C = sbe(mc(b) ? b : b.contextElement || Gs(e.elements.popper), i, l), x = bc(e.elements.reference), w = NI({ reference: x, element: g, strategy: "absolute", placement: o }), k = zy(Object.assign({}, g, w)), S = c === bd ? k : x, _ = { top: C.top - S.top + v.top, bottom: S.bottom - C.bottom + v.bottom, left: C.left - S.left + v.left, right: S.right - C.right + v.right }, O = e.modifiersData.offset; if (c === bd && O) { var F = O[o]; Object.keys(_).forEach(function(I) { var P = [Qo, Jo].indexOf(I) >= 0 ? 1 : -1, M = [co, Jo].indexOf(I) >= 0 ? "y" : "x"; _[I] += F[M] * P; }); } return _; } function lbe(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Sf : l, c = wc(r), d = c ? s ? j4 : j4.filter(function(p) { return wc(p) === c; }) : Cf, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = Ip(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[qa(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function ube(e) { if (qa(e) === kw) return []; var t = uv(e); return [q4(e), t, q4(t)]; } function cbe(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = qa(m), b = g === m, C = l || (b || !p ? [uv(m)] : ube(m)), x = [m].concat(C).reduce(function(we, be) { return we.concat(qa(be) === kw ? lbe(t, { placement: be, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : be); }, []), w = t.rects.reference, k = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, O = x[0], F = 0; F < x.length; F++) { var I = x[F], P = qa(I), M = wc(I) === gc, N = [co, Jo].indexOf(P) >= 0, j = N ? "width" : "height", A = Ip(t, { placement: I, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), U = N ? M ? Qo : po : M ? Jo : co; w[j] > k[j] && (U = uv(U)); var q = uv(U), Y = []; if (a && Y.push(A[P] <= 0), s && Y.push(A[U] <= 0, A[q] <= 0), Y.every(function(we) { return we; })) { O = I, _ = !1; break; } S.set(I, Y); } if (_) for (var ie = p ? 3 : 1, re = function(we) { var be = x.find(function(de) { var ae = S.get(de); if (ae) return ae.slice(0, we).every(function(ee) { return ee; }); }); if (be) return O = be, "break"; }, le = ie; le > 0; le--) { var he = re(le); if (he === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var dbe = { name: "flip", enabled: !0, phase: "main", fn: cbe, requiresIfExists: ["offset"], data: { _skip: !1 } }; function G4(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 K4(e) { return [co, Qo, Jo, po].some(function(t) { return e[t] >= 0; }); } function pbe(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Ip(t, { elementContext: "reference" }), s = Ip(t, { altBoundary: !0 }), l = G4(i, r), u = G4(s, o, a), c = K4(l), d = K4(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 fbe = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: pbe }; function hbe(e, t, n) { var r = qa(e), o = [po, co].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [po, Qo].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function vbe(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = Sf.reduce(function(c, d) { return c[d] = hbe(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var gbe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: vbe }; function mbe(e) { var t = e.state, n = e.name; t.modifiersData[n] = NI({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var BI = { name: "popperOffsets", enabled: !0, phase: "read", fn: mbe, data: {} }; function ybe(e) { return e === "x" ? "y" : "x"; } function bbe(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = Ip(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = qa(t.placement), b = wc(t.placement), C = !b, x = Ew(g), w = ybe(x), k = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), I = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, P = { x: 0, y: 0 }; if (k) { if (a) { var M, N = x === "y" ? co : po, j = x === "y" ? Jo : Qo, A = x === "y" ? "height" : "width", U = k[x], q = U + m[N], Y = U - m[j], ie = h ? -_[A] / 2 : 0, re = b === gc ? S[A] : _[A], le = b === gc ? -_[A] : -S[A], he = t.elements.arrow, we = h && he ? Sw(he) : { width: 0, height: 0 }, be = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : AI(), de = be[N], ae = be[j], ee = Wd(0, S[A], we[A]), se = C ? S[A] / 2 - ie - ee - de - F.mainAxis : re - ee - de - F.mainAxis, pe = C ? -S[A] / 2 + ie + ee + ae + F.mainAxis : le + ee + ae + F.mainAxis, Se = t.elements.arrow && Ef(t.elements.arrow), Le = Se ? x === "y" ? Se.clientTop || 0 : Se.clientLeft || 0 : 0, je = (M = I == null ? void 0 : I[x]) != null ? M : 0, _e = U + se - je - Le, ze = U + pe - je, Ie = Wd(h ? Qv(q, _e) : q, U, h ? _l(Y, ze) : Y); k[x] = Ie, P[x] = Ie - U; } if (s) { var He, qe = x === "x" ? co : po, et = x === "x" ? Jo : Qo, Ve = k[w], nt = w === "y" ? "height" : "width", ot = Ve + m[qe], pt = Ve - m[et], T = [co, po].indexOf(g) !== -1, G = (He = I == null ? void 0 : I[w]) != null ? He : 0, fe = T ? ot : Ve - S[nt] - _[nt] - G + F.altAxis, ge = T ? Ve + S[nt] + _[nt] - G - F.altAxis : pt, ve = h && T ? Wye(fe, Ve, ge) : Wd(h ? fe : ot, Ve, h ? ge : pt); k[w] = ve, P[w] = ve - Ve; } t.modifiersData[r] = P; } } var wbe = { name: "preventOverflow", enabled: !0, phase: "main", fn: bbe, requiresIfExists: ["offset"] }; function xbe(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function kbe(e) { return e === Ta(e) || !Ho(e) ? $w(e) : xbe(e); } function Cbe(e) { var t = e.getBoundingClientRect(), n = yc(t.width) / e.offsetWidth || 1, r = yc(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function Sbe(e, t, n) { n === void 0 && (n = !1); var r = Ho(t), o = Ho(t) && Cbe(t), a = Gs(t), i = bc(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((ti(t) !== "body" || Tw(a)) && (s = kbe(t)), Ho(t) ? (l = bc(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = _w(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function Ebe(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(a) { t.set(a.name, a); }); function o(a) { n.add(a.name); var i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function $be(e) { var t = Ebe(e); return Vye.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function _be(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function Tbe(e) { var t = e.reduce(function(n, r) { var o = n[r.name]; return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var Y4 = { placement: "bottom", modifiers: [], strategy: "absolute" }; function X4() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function Ow(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? Y4 : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Y4, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: mc(i) ? Gd(i) : i.contextElement ? Gd(i.contextElement) : [], popper: Gd(s) }; var g = $be(Tbe([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (X4(m, g)) { u.rects = { reference: Sbe(m, Ef(g), u.options.strategy === "fixed"), popper: Sw(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var C = u.orderedModifiers[b], x = C.fn, w = C.options, k = w === void 0 ? {} : w, S = C.name; typeof x == "function" && (u = x({ state: u, options: k, name: S, instance: f }) || u); } } } }, update: _be(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!X4(i, s)) return f; f.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, C = v.effect; if (typeof C == "function") { var x = C({ state: u, name: m, instance: f, options: b }), w = function() { }; c.push(x || w); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } Ow(); var Obe = [DI, BI, RI, FI]; Ow({ defaultModifiers: Obe }); var Fbe = [DI, BI, RI, FI, gbe, dbe, wbe, Xye, fbe], Ibe = Ow({ defaultModifiers: Fbe }); const Abe = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = Pbe(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = $(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = On(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return ce(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), ce([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = Ibe(l, u, y(o))); }), Tt(() => { s(); }), { state: $(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: $(() => y(i).styles), attributes: $(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: $(() => y(a)) }; }; function Pbe(e) { const t = Object.keys(e.elements), n = Jv(t.map((o) => [o, e.styles[o] || {}])), r = Jv(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } const Lbe = (e) => { if (!e) return { onClick: Fi, onMousedown: Fi, onMouseup: Fi }; let t = !1, n = !1; return { onClick: (r) => { t && n && e(r), t = n = !1; }, onMousedown: (r) => { t = r.target === r.currentTarget; }, onMouseup: (r) => { n = r.target === r.currentTarget; } }; }; function Z4() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return yf(() => n()), { registerTimeout: t, cancelTimeout: n }; } const Vy = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, Rbe = Symbol("elIdInjection"), zI = () => rt() ? xe(Rbe, Vy) : Vy, ni = (e) => { const t = zI(); !En && t === Vy && Wn("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 = xw(); return $(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Mu = []; const J4 = (e) => { const t = e; t.key === Wt.esc && Mu.forEach((n) => n(t)); }, Dbe = (e) => { at(() => { Mu.length === 0 && document.addEventListener("keydown", J4), En && Mu.push(e); }), Tt(() => { Mu = Mu.filter((t) => t !== e), Mu.length === 0 && En && document.removeEventListener("keydown", J4); }); }; let Q4; const VI = () => { const e = xw(), t = zI(), n = $(() => `${e.value}-popper-container-${t.prefix}`), r = $(() => `#${n.value}`); return { id: n, selector: r }; }, Mbe = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Nbe = () => { const { id: e, selector: t } = VI(); return y0(() => { En && (process.env.NODE_ENV === "test" || !Q4 || !document.body.querySelector(t.value)) && (Q4 = Mbe(e.value)); }), { id: e, selector: t }; }, Bbe = St({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), zbe = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = Z4(), { registerTimeout: i, cancelTimeout: s } = Z4(); return { onOpen: (l) => { a(() => { r(l); const u = y(n); sn(u) && u > 0 && i(() => { o(l); }, u); }, y(e)); }, onClose: (l) => { s(), a(() => { o(l); }, y(t)); } }; }, jI = Symbol("elForwardRef"), Vbe = (e) => { tt(jI, { setForwardRef: (t) => { e.value = t; } }); }, jbe = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), eS = { current: 0 }, tS = z(0), HI = 2e3, nS = Symbol("elZIndexContextKey"), UI = Symbol("zIndexContextKey"), Fw = (e) => { const t = rt() ? xe(nS, eS) : eS, n = e || (rt() ? xe(UI, void 0) : void 0), r = $(() => { const i = y(n); return sn(i) ? i : HI; }), o = $(() => r.value + tS.value), a = () => (t.current++, tS.value = t.current, o.value); return !En && !xe(nS) && Wn("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: r, currentZIndex: o, nextZIndex: a }; }; function Hbe(e) { let t; function n() { if (e.value == null) return; const { selectionStart: o, selectionEnd: a, value: i } = e.value; if (o == null || a == null) return; const s = i.slice(0, Math.max(0, o)), l = i.slice(Math.max(0, a)); t = { selectionStart: o, selectionEnd: a, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: o } = e.value, { beforeTxt: a, afterTxt: i, selectionStart: s } = t; if (a == null || i == null || s == null) return; let l = o.length; if (o.endsWith(i)) l = o.length - i.length; else if (o.startsWith(a)) l = a.length; else { const u = a[s - 1], c = o.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Ki = Lg({ type: String, values: Rg, required: !1 }), qI = Symbol("size"), WI = () => { const e = xe(qI, {}); return $(() => y(e.size) || ""); }; function GI(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: o } = {}) { const a = rt(), { emit: i } = a, s = On(), l = z(!1), u = (f) => { Hn(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; Hn(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (l.value = !1, i("blur", f), o == null || o()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return ce(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), No(s, "focus", u, !0), No(s, "blur", c, !0), No(s, "click", d, !0), process.env.NODE_ENV === "test" && at(() => { const f = El(e.value) ? e.value : document.querySelector("input,textarea"); f && (No(f, "focus", u, !0), No(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function Iw({ afterComposition: e, emit: t }) { const n = z(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, o = (i) => { var s; t == null || t("compositionupdate", i); const l = (s = i.target) == null ? void 0 : s.value, u = l[l.length - 1] || ""; n.value = !mye(u); }, a = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, Ue(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? a(i) : o(i); }, handleCompositionStart: r, handleCompositionUpdate: o, handleCompositionEnd: a }; } const KI = Symbol("emptyValuesContextKey"), Ube = "use-empty-values", qbe = ["", void 0, null], Wbe = void 0, YI = St({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Hn(e) ? !e() : !e } }), XI = (e, t) => { const n = rt() ? xe(KI, z({})) : z({}), r = $(() => e.emptyValues || n.value.emptyValues || qbe), o = $(() => Hn(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Hn(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : Wbe), a = (i) => r.value.includes(i); return r.value.includes(o.value) || Wn(Ube, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: o, isEmptyValue: a }; }, Gbe = St({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), Ks = (e) => vI(Gbe, e), ZI = Symbol(), e0 = z(); function Mg(e, t = void 0) { const n = rt() ? xe(ZI, e0) : e0; return e ? $(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function Kbe(e, t) { const n = Mg(), r = mt(e, $(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || qd; })), o = Io($(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = Fw($(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || HI; })), i = $(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return Ybe($(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const Ybe = (e, t, n = !1) => { var r; const o = !!rt(), a = o ? Mg() : void 0, i = (r = void 0) != null ? r : o ? tt : void 0; if (!i) { Wn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = $(() => { const l = y(e); return a != null && a.value ? Xbe(a.value, l) : l; }); return i(ZI, s), i($I, $(() => s.value.locale)), i(_I, $(() => s.value.namespace)), i(UI, $(() => s.value.zIndex)), i(qI, { size: $(() => s.value.size || "") }), i(KI, $(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !e0.value) && (e0.value = s.value), s; }, Xbe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...M4(e), ...M4(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var gt = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const Zbe = St({ size: { type: ct([Number, String]) }, color: { type: String } }), Jbe = K({ name: "ElIcon", inheritAttrs: !1 }), Qbe = /* @__PURE__ */ K({ ...Jbe, props: Zbe, setup(e) { const t = e, n = mt("icon"), r = $(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: _i(o) ? void 0 : ql(o), "--color": a }; }); return (o, a) => (E(), L("i", Lt({ class: y(n).b(), style: y(r) }, o.$attrs), [ oe(o.$slots, "default") ], 16)); } }); var e2e = /* @__PURE__ */ gt(Qbe, [["__file", "icon.vue"]]); const ln = zn(e2e), Aw = Symbol("formContextKey"), t0 = Symbol("formItemContextKey"), Mi = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : TI("size"), o = t.global ? n : WI(), a = t.form ? { size: void 0 } : xe(Aw, void 0), i = t.formItem ? { size: void 0 } : xe(t0, void 0); return $(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, $f = (e) => { const t = TI("disabled"), n = xe(Aw, void 0); return $(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, Ys = () => { const e = xe(Aw, void 0), t = xe(t0, void 0); return { form: e, formItem: t }; }, _f = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = z(!1)), r || (r = z(!1)); const o = z(); let a; const i = $(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return at(() => { a = ce([$t(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : ni().value); u !== o.value && (t != null && t.removeInputId && (o.value && t.removeInputId(o.value), !(r != null && r.value) && !l && u && t.addInputId(u)), o.value = u); }, { immediate: !0 }); }), vb(() => { a && a(), t != null && t.removeInputId && o.value && t.removeInputId(o.value); }), { isLabeledByFormItem: i, inputId: o }; }; let aa; const t2e = ` height:0 !important; visibility:hidden !important; ${Ahe() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, n2e = [ "letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing" ]; function r2e(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), o = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: n2e.map((a) => `${a}:${t.getPropertyValue(a)}`).join(";"), paddingSize: r, borderSize: o, boxSizing: n }; } function rS(e, t = 1, n) { var r; aa || (aa = document.createElement("textarea"), document.body.appendChild(aa)); const { paddingSize: o, borderSize: a, boxSizing: i, contextStyle: s } = r2e(e); aa.setAttribute("style", `${s};${t2e}`), aa.value = e.value || e.placeholder || ""; let l = aa.scrollHeight; const u = {}; i === "border-box" ? l = l + a : i === "content-box" && (l = l - o), aa.value = ""; const c = aa.scrollHeight - o; if (sn(t)) { let d = c * t; i === "border-box" && (d = d + o + a), l = Math.max(d, l), u.minHeight = `${d}px`; } if (sn(n)) { let d = c * n; i === "border-box" && (d = d + o + a), l = Math.min(d, l); } return u.height = `${l}px`, (r = aa.parentNode) == null || r.removeChild(aa), aa = void 0, u; } const o2e = St({ id: { type: String, default: void 0 }, size: Ki, disabled: Boolean, modelValue: { type: ct([ String, Number, Object ]), default: "" }, maxlength: { type: [String, Number] }, minlength: { type: [String, Number] }, type: { type: String, default: "text" }, resize: { type: String, values: ["none", "both", "horizontal", "vertical"] }, autosize: { type: ct([Boolean, Object]), default: !1 }, autocomplete: { type: String, default: "off" }, formatter: { type: Function }, parser: { type: Function }, placeholder: { type: String }, form: { type: String }, readonly: Boolean, clearable: Boolean, showPassword: Boolean, showWordLimit: Boolean, suffixIcon: { type: Zo }, prefixIcon: { type: Zo }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: ct([Object, Array, String]), default: () => ys({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...Ks(["ariaLabel"]) }), a2e = { [Mn]: (e) => uo(e), input: (e) => uo(e), change: (e) => uo(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, mouseleave: (e) => e instanceof MouseEvent, mouseenter: (e) => e instanceof MouseEvent, keydown: (e) => e instanceof Event, compositionstart: (e) => e instanceof CompositionEvent, compositionupdate: (e) => e instanceof CompositionEvent, compositionend: (e) => e instanceof CompositionEvent }, i2e = K({ name: "ElInput", inheritAttrs: !1 }), s2e = /* @__PURE__ */ K({ ...i2e, props: o2e, emits: a2e, setup(e, { expose: t, emit: n }) { const r = e, o = Hp(), a = Xr(), i = $(() => { const T = {}; return r.containerRole === "combobox" && (T["aria-haspopup"] = o["aria-haspopup"], T["aria-owns"] = o["aria-owns"], T["aria-expanded"] = o["aria-expanded"]), T; }), s = $(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", he.value), { [v.b("group")]: a.prepend || a.append, [v.m("prefix")]: a.prefix || r.prefixIcon, [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: Y.value && ie.value, [v.b("hidden")]: r.type === "hidden" }, o.class ]), l = $(() => [ v.e("wrapper"), v.is("focus", O.value) ]), u = wye({ excludeKeys: $(() => Object.keys(i.value)) }), { form: c, formItem: d } = Ys(), { inputId: f } = _f(r, { formItemContext: d }), h = Mi(), p = $f(), v = mt("input"), m = mt("textarea"), g = On(), b = On(), C = z(!1), x = z(!1), w = z(), k = On(r.inputStyle), S = $(() => g.value || b.value), { wrapperRef: _, isFocused: O, handleFocus: F, handleBlur: I } = GI(S, { beforeFocus() { return p.value; }, afterBlur() { var T; r.validateEvent && ((T = d == null ? void 0 : d.validate) == null || T.call(d, "blur").catch((G) => Wn(G))); } }), P = $(() => { var T; return (T = c == null ? void 0 : c.statusIcon) != null ? T : !1; }), M = $(() => (d == null ? void 0 : d.validateState) || ""), N = $(() => M.value && SI[M.value]), j = $(() => x.value ? xI : iye), A = $(() => [ o.style ]), U = $(() => [ r.inputStyle, k.value, { resize: r.resize } ]), q = $(() => xf(r.modelValue) ? "" : String(r.modelValue)), Y = $(() => r.clearable && !p.value && !r.readonly && !!q.value && (O.value || C.value)), ie = $(() => r.showPassword && !p.value && !r.readonly && !!q.value && (!!q.value || O.value)), re = $(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), le = $(() => q.value.length), he = $(() => !!re.value && le.value > Number(r.maxlength)), we = $(() => !!a.suffix || !!r.suffixIcon || Y.value || r.showPassword || re.value || !!M.value && P.value), [be, de] = Hbe(g); Ma(b, (T) => { if (ee(), !re.value || r.resize !== "both") return; const G = T[0], { width: fe } = G.contentRect; w.value = { right: `calc(100% - ${fe + 15 + 6}px)` }; }); const ae = () => { const { type: T, autosize: G } = r; if (!(!En || T !== "textarea" || !b.value)) if (G) { const fe = dr(G) ? G.minRows : void 0, ge = dr(G) ? G.maxRows : void 0, ve = rS(b.value, fe, ge); k.value = { overflowY: "hidden", ...ve }, Ue(() => { b.value.offsetHeight, k.value = ve; }); } else k.value = { minHeight: rS(b.value).minHeight }; }, ee = /* @__PURE__ */ ((T) => { let G = !1; return () => { var fe; G || !r.autosize || ((fe = b.value) == null ? void 0 : fe.offsetParent) === null || (T(), G = !0); }; })(ae), se = () => { const T = S.value, G = r.formatter ? r.formatter(q.value) : q.value; !T || T.value === G || (T.value = G); }, pe = async (T) => { be(); let { value: G } = T.target; if (r.formatter && (G = r.parser ? r.parser(G) : G), !Le.value) { if (G === q.value) { se(); return; } n(Mn, G), n("input", G), await Ue(), se(), de(); } }, Se = (T) => { n("change", T.target.value); }, { isComposing: Le, handleCompositionStart: je, handleCompositionUpdate: _e, handleCompositionEnd: ze } = Iw({ emit: n, afterComposition: pe }), Ie = () => { x.value = !x.value, He(); }, He = async () => { var T; await Ue(), (T = S.value) == null || T.focus(); }, qe = () => { var T; return (T = S.value) == null ? void 0 : T.blur(); }, et = (T) => { C.value = !1, n("mouseleave", T); }, Ve = (T) => { C.value = !0, n("mouseenter", T); }, nt = (T) => { n("keydown", T); }, ot = () => { var T; (T = S.value) == null || T.select(); }, pt = () => { n(Mn, ""), n("change", ""), n("clear"), n("input", ""); }; return ce(() => r.modelValue, () => { var T; Ue(() => ae()), r.validateEvent && ((T = d == null ? void 0 : d.validate) == null || T.call(d, "change").catch((G) => Wn(G))); }), ce(q, () => se()), ce(() => r.type, async () => { await Ue(), se(), ae(); }), at(() => { !r.formatter && r.parser && Wn("ElInput", "If you set the parser, you also need to set the formatter."), se(), Ue(ae); }), t({ input: g, textarea: b, ref: S, textareaStyle: U, autosize: $t(r, "autosize"), isComposing: Le, focus: He, blur: qe, select: ot, clear: pt, resizeTextarea: ae }), (T, G) => (E(), L("div", Lt(y(i), { class: [ y(s), { [y(v).bm("group", "append")]: T.$slots.append, [y(v).bm("group", "prepend")]: T.$slots.prepend } ], style: y(A), role: T.containerRole, onMouseenter: Ve, onMouseleave: et }), [ Z(" input "), T.type !== "textarea" ? (E(), L(De, { key: 0 }, [ Z(" prepend slot "), T.$slots.prepend ? (E(), L("div", { key: 0, class: V(y(v).be("group", "prepend")) }, [ oe(T.$slots, "prepend") ], 2)) : Z("v-if", !0), B("div", { ref_key: "wrapperRef", ref: _, class: V(y(l)) }, [ Z(" prefix slot "), T.$slots.prefix || T.prefixIcon ? (E(), L("span", { key: 0, class: V(y(v).e("prefix")) }, [ B("span", { class: V(y(v).e("prefix-inner")) }, [ oe(T.$slots, "prefix"), T.prefixIcon ? (E(), Q(y(ln), { key: 0, class: V(y(v).e("icon")) }, { default: R(() => [ (E(), Q(vt(T.prefixIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 2)) : Z("v-if", !0), B("input", Lt({ id: y(f), ref_key: "input", ref: g, class: y(v).e("inner") }, y(u), { minlength: T.minlength, maxlength: T.maxlength, type: T.showPassword ? x.value ? "text" : "password" : T.type, disabled: y(p), readonly: T.readonly, autocomplete: T.autocomplete, tabindex: T.tabindex, "aria-label": T.ariaLabel, placeholder: T.placeholder, style: T.inputStyle, form: T.form, autofocus: T.autofocus, onCompositionstart: y(je), onCompositionupdate: y(_e), onCompositionend: y(ze), onInput: pe, onChange: Se, onKeydown: nt }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), Z(" suffix slot "), y(we) ? (E(), L("span", { key: 1, class: V(y(v).e("suffix")) }, [ B("span", { class: V(y(v).e("suffix-inner")) }, [ !y(Y) || !y(ie) || !y(re) ? (E(), L(De, { key: 0 }, [ oe(T.$slots, "suffix"), T.suffixIcon ? (E(), Q(y(ln), { key: 0, class: V(y(v).e("icon")) }, { default: R(() => [ (E(), Q(vt(T.suffixIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 64)) : Z("v-if", !0), y(Y) ? (E(), Q(y(ln), { key: 1, class: V([y(v).e("icon"), y(v).e("clear")]), onMousedown: Je(y(Fi), ["prevent"]), onClick: pt }, { default: R(() => [ W(y(Ag)) ]), _: 1 }, 8, ["class", "onMousedown"])) : Z("v-if", !0), y(ie) ? (E(), Q(y(ln), { key: 2, class: V([y(v).e("icon"), y(v).e("password")]), onClick: Ie }, { default: R(() => [ (E(), Q(vt(y(j)))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), y(re) ? (E(), L("span", { key: 3, class: V(y(v).e("count")) }, [ B("span", { class: V(y(v).e("count-inner")) }, me(y(le)) + " / " + me(T.maxlength), 3) ], 2)) : Z("v-if", !0), y(M) && y(N) && y(P) ? (E(), Q(y(ln), { key: 4, class: V([ y(v).e("icon"), y(v).e("validateIcon"), y(v).is("loading", y(M) === "validating") ]) }, { default: R(() => [ (E(), Q(vt(y(N)))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 2)) : Z("v-if", !0) ], 2), Z(" append slot "), T.$slots.append ? (E(), L("div", { key: 1, class: V(y(v).be("group", "append")) }, [ oe(T.$slots, "append") ], 2)) : Z("v-if", !0) ], 64)) : (E(), L(De, { key: 1 }, [ Z(" textarea "), B("textarea", Lt({ id: y(f), ref_key: "textarea", ref: b, class: [y(m).e("inner"), y(v).is("focus", y(O))] }, y(u), { minlength: T.minlength, maxlength: T.maxlength, tabindex: T.tabindex, disabled: y(p), readonly: T.readonly, autocomplete: T.autocomplete, style: y(U), "aria-label": T.ariaLabel, placeholder: T.placeholder, form: T.form, autofocus: T.autofocus, rows: T.rows, onCompositionstart: y(je), onCompositionupdate: y(_e), onCompositionend: y(ze), onInput: pe, onFocus: y(F), onBlur: y(I), onChange: Se, onKeydown: nt }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), y(re) ? (E(), L("span", { key: 0, style: Ze(w.value), class: V(y(v).e("count")) }, me(y(le)) + " / " + me(T.maxlength), 7)) : Z("v-if", !0) ], 64)) ], 16, ["role"])); } }); var l2e = /* @__PURE__ */ gt(s2e, [["__file", "input.vue"]]); const Ng = zn(l2e), Ou = 4, u2e = { 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" } }, c2e = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), Pw = Symbol("scrollbarContextKey"), d2e = St({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), p2e = "Thumb", f2e = /* @__PURE__ */ K({ __name: "thumb", props: d2e, setup(e) { const t = e, n = xe(Pw), r = mt("scrollbar"); n || mI(p2e, "can not inject scrollbar context"); const o = z(), a = z(), i = z({}), s = z(!1); let l = !1, u = !1, c = En ? document.onselectstart : null; const d = $(() => u2e[t.vertical ? "vertical" : "horizontal"]), f = $(() => c2e({ size: t.size, move: t.move, bar: d.value })), h = $(() => o.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a.value[d.value.offset]), p = (k) => { var S; if (k.stopPropagation(), k.ctrlKey || [1, 2].includes(k.button)) return; (S = window.getSelection()) == null || S.removeAllRanges(), m(k); const _ = k.currentTarget; _ && (i.value[d.value.axis] = _[d.value.offset] - (k[d.value.client] - _.getBoundingClientRect()[d.value.direction])); }, v = (k) => { if (!a.value || !o.value || !n.wrapElement) return; const S = Math.abs(k.target.getBoundingClientRect()[d.value.direction] - k[d.value.client]), _ = a.value[d.value.offset] / 2, O = (S - _) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = O * n.wrapElement[d.value.scrollSize] / 100; }, m = (k) => { k.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", b), c = document.onselectstart, document.onselectstart = () => !1; }, g = (k) => { if (!o.value || !a.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (o.value.getBoundingClientRect()[d.value.direction] - k[d.value.client]) * -1, O = a.value[d.value.offset] - S, F = (_ - O) * 100 * h.value / o.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, b = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", b), w(), u && (s.value = !1); }, C = () => { u = !1, s.value = !!t.size; }, x = () => { u = !0, s.value = l; }; Tt(() => { w(), document.removeEventListener("mouseup", b); }); const w = () => { document.onselectstart !== c && (document.onselectstart = c); }; return No($t(n, "scrollbarElement"), "mousemove", C), No($t(n, "scrollbarElement"), "mouseleave", x), (k, S) => (E(), Q(pr, { name: y(r).b("fade"), persisted: "" }, { default: R(() => [ Ne(B("div", { ref_key: "instance", ref: o, class: V([y(r).e("bar"), y(r).is(y(d).key)]), onMousedown: v }, [ B("div", { ref_key: "thumb", ref: a, class: V(y(r).e("thumb")), style: Ze(y(f)), onMousedown: p }, null, 38) ], 34), [ [ft, k.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var oS = /* @__PURE__ */ gt(f2e, [["__file", "thumb.vue"]]); const h2e = St({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), v2e = /* @__PURE__ */ K({ __name: "bar", props: h2e, setup(e, { expose: t }) { const n = e, r = xe(Pw), o = z(0), a = z(0), i = z(""), s = z(""), l = z(1), u = z(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - Ou, f = c.offsetWidth - Ou; a.value = c.scrollTop * 100 / d * l.value, o.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - Ou, f = c.offsetWidth - Ou, h = d ** 2 / c.scrollHeight, p = f ** 2 / c.scrollWidth, v = Math.max(h, n.minSize), m = Math.max(p, n.minSize); l.value = h / (d - h) / (v / (d - v)), u.value = p / (f - p) / (m / (f - m)), s.value = v + Ou < d ? `${v}px` : "", i.value = m + Ou < f ? `${m}px` : ""; } }), (c, d) => (E(), L(De, null, [ W(oS, { move: o.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), W(oS, { move: a.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var g2e = /* @__PURE__ */ gt(v2e, [["__file", "bar.vue"]]); const m2e = St({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: ct([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, ...Ks(["ariaLabel", "ariaOrientation"]) }), y2e = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(sn) }, jy = "ElScrollbar", b2e = K({ name: jy }), w2e = /* @__PURE__ */ K({ ...b2e, props: m2e, emits: y2e, setup(e, { expose: t, emit: n }) { const r = e, o = mt("scrollbar"); let a, i, s = 0, l = 0; const u = z(), c = z(), d = z(), f = z(), h = $(() => { const w = {}; return r.height && (w.height = ql(r.height)), r.maxHeight && (w.maxHeight = ql(r.maxHeight)), [r.wrapStyle, w]; }), p = $(() => [ r.wrapClass, o.e("wrap"), { [o.em("wrap", "hidden-default")]: !r.native } ]), v = $(() => [o.e("view"), r.viewClass]), m = () => { var w; c.value && ((w = f.value) == null || w.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(w, k) { dr(w) ? c.value.scrollTo(w) : sn(w) && sn(k) && c.value.scrollTo(w, k); } const b = (w) => { if (!sn(w)) { Wn(jy, "value must be a number"); return; } c.value.scrollTop = w; }, C = (w) => { if (!sn(w)) { Wn(jy, "value must be a number"); return; } c.value.scrollLeft = w; }, x = () => { var w; (w = f.value) == null || w.update(); }; return ce(() => r.noresize, (w) => { w ? (a == null || a(), i == null || i()) : ({ stop: a } = Ma(d, x), i = No("resize", x)); }, { immediate: !0 }), ce(() => [r.maxHeight, r.height], () => { r.native || Ue(() => { var w; x(), c.value && ((w = f.value) == null || w.handleScroll(c.value)); }); }), tt(Pw, Kt({ scrollbarElement: u, wrapElement: c })), gb(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), at(() => { r.native || Ue(() => { x(); }); }), Up(() => x()), t({ wrapRef: c, update: x, scrollTo: g, setScrollTop: b, setScrollLeft: C, handleScroll: m }), (w, k) => (E(), L("div", { ref_key: "scrollbarRef", ref: u, class: V(y(o).b()) }, [ B("div", { ref_key: "wrapRef", ref: c, class: V(y(p)), style: Ze(y(h)), tabindex: w.tabindex, onScroll: m }, [ (E(), Q(vt(w.tag), { id: w.id, ref_key: "resizeRef", ref: d, class: V(y(v)), style: Ze(w.viewStyle), role: w.role, "aria-label": w.ariaLabel, "aria-orientation": w.ariaOrientation }, { default: R(() => [ oe(w.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), w.native ? Z("v-if", !0) : (E(), Q(g2e, { key: 0, ref_key: "barRef", ref: f, always: w.always, "min-size": w.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var x2e = /* @__PURE__ */ gt(w2e, [["__file", "scrollbar.vue"]]); const Bg = zn(x2e), Lw = Symbol("popper"), JI = Symbol("popperContent"), k2e = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], QI = St({ role: { type: String, values: k2e, default: "tooltip" } }), C2e = K({ name: "ElPopper", inheritAttrs: !1 }), S2e = /* @__PURE__ */ K({ ...C2e, props: QI, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = $(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), tt(Lw, l), (u, c) => oe(u.$slots, "default"); } }); var E2e = /* @__PURE__ */ gt(S2e, [["__file", "popper.vue"]]); const eA = St({ arrowOffset: { type: Number, default: 5 } }), $2e = K({ name: "ElPopperArrow", inheritAttrs: !1 }), _2e = /* @__PURE__ */ K({ ...$2e, props: eA, setup(e, { expose: t }) { const n = e, r = mt("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = xe(JI, void 0); return ce(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (E(), L("span", { ref_key: "arrowRef", ref: a, class: V(y(r).e("arrow")), style: Ze(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var T2e = /* @__PURE__ */ gt(_2e, [["__file", "arrow.vue"]]); const s1 = "ElOnlyChild", tA = K({ name: s1, setup(e, { slots: t, attrs: n }) { var r; const o = xe(jI), a = jbe((r = o == null ? void 0 : o.setForwardRef) != null ? r : Fi); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Wn(s1, "requires exact only one valid child."), null; const l = nA(s); return l ? Ne(b0(l, n), [[a]]) : (Wn(s1, "no valid child node found"), null); }; } }); function nA(e) { if (!e) return null; const t = e; for (const n of t) { if (dr(n)) switch (n.type) { case w0: continue; case Vs: case "svg": return aS(n); case De: return nA(n.children); default: return n; } return aS(n); } return null; } function aS(e) { const t = mt("only-child"); return W("span", { class: t.e("content") }, [e]); } const rA = St({ virtualRef: { type: ct(Object) }, virtualTriggering: Boolean, onMouseenter: { type: ct(Function) }, onMouseleave: { type: ct(Function) }, onClick: { type: ct(Function) }, onKeydown: { type: ct(Function) }, onFocus: { type: ct(Function) }, onBlur: { type: ct(Function) }, onContextmenu: { type: ct(Function) }, id: String, open: Boolean }), O2e = K({ name: "ElPopperTrigger", inheritAttrs: !1 }), F2e = /* @__PURE__ */ K({ ...O2e, props: rA, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = xe(Lw, void 0); Vbe(o); const a = $(() => s.value ? n.id : void 0), i = $(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = $(() => { if (r && r.value !== "tooltip") return r.value; }), l = $(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return at(() => { ce(() => n.virtualRef, (d) => { d && (o.value = za(d)); }, { immediate: !0 }), ce(o, (d, f) => { u == null || u(), u = void 0, El(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = ce([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { xf(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), El(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && El(o.value)) { const d = o.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, f) => d.virtualTriggering ? Z("v-if", !0) : (E(), Q(y(tA), Lt({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: R(() => [ oe(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var I2e = /* @__PURE__ */ gt(F2e, [["__file", "trigger.vue"]]); const l1 = "focus-trap.focus-after-trapped", u1 = "focus-trap.focus-after-released", A2e = "focus-trap.focusout-prevented", iS = { cancelable: !0, bubbles: !1 }, P2e = { cancelable: !0, bubbles: !1 }, sS = "focusAfterTrapped", lS = "focusAfterReleased", oA = Symbol("elFocusTrap"), Rw = z(), zg = z(0), Dw = z(0); let Sh = 0; const aA = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const o = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, uS = (e, t) => { for (const n of e) if (!L2e(n, t)) return n; }, L2e = (e, t) => { if (process.env.NODE_ENV === "test") return !1; if (getComputedStyle(e).visibility === "hidden") return !0; for (; e; ) { if (t && e === t) return !1; if (getComputedStyle(e).display === "none") return !0; e = e.parentElement; } return !1; }, R2e = (e) => { const t = aA(e), n = uS(t, e), r = uS(t.reverse(), e); return [n, r]; }, D2e = (e) => e instanceof HTMLInputElement && "select" in e, ls = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), Dw.value = window.performance.now(), e !== n && D2e(e) && t && e.select(); } }; function cS(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const M2e = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = cS(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = cS(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, N2e = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (ls(r, t), document.activeElement !== n) return; }, dS = M2e(), B2e = () => zg.value > Dw.value, Eh = () => { Rw.value = "pointer", zg.value = window.performance.now(); }, pS = () => { Rw.value = "keyboard", zg.value = window.performance.now(); }, z2e = () => (at(() => { Sh === 0 && (document.addEventListener("mousedown", Eh), document.addEventListener("touchstart", Eh), document.addEventListener("keydown", pS)), Sh++; }), Tt(() => { Sh--, Sh <= 0 && (document.removeEventListener("mousedown", Eh), document.removeEventListener("touchstart", Eh), document.removeEventListener("keydown", pS)); }), { focusReason: Rw, lastUserFocusTimestamp: zg, lastAutomatedFocusTimestamp: Dw }), $h = (e) => new CustomEvent(A2e, { ...P2e, detail: e }), V2e = K({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ sS, lS, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = z2e(); Dbe((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: C, shiftKey: x } = p, { loop: w } = e, k = v === Wt.tab && !m && !g && !b, S = document.activeElement; if (k && S) { const _ = C, [O, F] = R2e(_); if (O && F) { if (!x && S === F) { const I = $h({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), w && ls(O, !0)); } else if (x && [O, _].includes(S)) { const I = $h({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), w && ls(F, !0)); } } else if (S === _) { const I = $h({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || p.preventDefault(); } } }; tt(oA, { focusTrapRef: n, onKeydown: s }), ce(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), ce([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(sS, p); }, u = (p) => t(lS, p), c = (p) => { const v = y(n); if (!v) return; const m = p.target, g = p.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e.trapped && (b ? o = m : ls(o, !0)); }, d = (p) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !xf(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = $h({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || ls(o, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = y(n); if (p) { dS.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(l1, iS); p.addEventListener(l1, l), p.dispatchEvent(m), m.defaultPrevented || Ue(() => { let g = e.focusStartEl; uo(g) || (ls(g), document.activeElement !== g && (g = "first")), g === "first" && N2e(aA(p), !0), (document.activeElement === v || g === "container") && ls(p); }); } } } function h() { const p = y(n); if (p) { p.removeEventListener(l1, l); const v = new CustomEvent(u1, { ...iS, detail: { focusReason: a.value } }); p.addEventListener(u1, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !B2e() || p.contains(document.activeElement)) && ls(r ?? document.body), p.removeEventListener(u1, u), dS.remove(i); } } return at(() => { e.trapped && f(), ce(() => e.trapped, (p) => { p ? f() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function j2e(e, t, n, r, o, a) { return oe(e.$slots, "default", { handleKeydown: e.onKeydown }); } var iA = /* @__PURE__ */ gt(V2e, [["render", j2e], ["__file", "focus-trap.vue"]]); const H2e = ["fixed", "absolute"], U2e = St({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: ct(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: Sf, default: "bottom" }, popperOptions: { type: ct(Object), default: () => ({}) }, strategy: { type: String, values: H2e, default: "absolute" } }), sA = St({ ...U2e, id: String, style: { type: ct([String, Array, Object]) }, className: { type: ct([String, Array, Object]) }, effect: { type: ct(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: ct([String, Array, Object]) }, popperStyle: { type: ct([String, Array, Object]) }, referenceEl: { type: ct(Object) }, triggerTargetEl: { type: ct(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...Ks(["ariaLabel"]) }), q2e = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, W2e = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...K2e(e), ...t] }; return Y2e(a, o == null ? void 0 : o.modifiers), a; }, G2e = (e) => { if (En) return za(e); }; function K2e(e) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = 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: r } }, { name: "computeStyles", options: { gpuAcceleration: n } } ]; } function Y2e(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const X2e = 0, Z2e = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = xe(Lw, void 0), a = z(), i = z(), s = $(() => ({ name: "eventListeners", enabled: !!e.visible })), l = $(() => { var g; const b = y(a), C = (g = y(i)) != null ? g : X2e; return { name: "arrow", enabled: !hI(b), options: { element: b, padding: C } }; }), u = $(() => ({ onFirstUpdate: () => { p(); }, ...W2e(e, [ y(l), y(s) ]) })), c = $(() => G2e(e.referenceEl) || y(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = Abe(c, n, u); return ce(m, (g) => t.value = g), at(() => { ce(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: f, styles: h, role: o, forceUpdate: v, update: p }; }, J2e = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = Fw(), a = mt("popper"), i = $(() => y(t).popper), s = z(sn(e.zIndex) ? e.zIndex : o()), l = $(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = $(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = $(() => r.value === "dialog" ? "false" : void 0), d = $(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = sn(e.zIndex) ? e.zIndex : o(); } }; }, Q2e = (e, t) => { const n = z(!1), r = z(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (o) => { var a; ((a = o.detail) == null ? void 0 : a.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (o) => { e.visible && !n.value && (o.target && (r.value = o.target), n.value = !0); }, onFocusoutPrevented: (o) => { e.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, ewe = K({ name: "ElPopperContent" }), twe = /* @__PURE__ */ K({ ...ewe, props: sA, emits: q2e, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = Q2e(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = Z2e(r), { ariaModal: b, arrowStyle: C, contentAttrs: x, contentClass: w, contentStyle: k, updateZIndex: S } = J2e(r, { styles: p, attributes: d, role: m }), _ = xe(t0, void 0), O = z(); tt(JI, { arrowStyle: C, arrowRef: f, arrowOffset: O }), _ && tt(t0, { ..._, addInputId: Fi, removeInputId: Fi }); let F; const I = (M = !0) => { g(), M && S(); }, P = () => { I(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return at(() => { ce(() => r.triggerTargetEl, (M, N) => { F == null || F(), F = void 0; const j = y(M || h.value), A = y(N || h.value); El(j) && (F = ce([m, () => r.ariaLabel, b, () => r.id], (U) => { ["role", "aria-label", "aria-modal", "id"].forEach((q, Y) => { xf(U[Y]) ? j.removeAttribute(q) : j.setAttribute(q, U[Y]); }); }, { immediate: !0 })), A !== j && El(A) && ["role", "aria-label", "aria-modal", "id"].forEach((U) => { A.removeAttribute(U); }); }, { immediate: !0 }), ce(() => r.visible, P, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: I, contentStyle: k }), (M, N) => (E(), L("div", Lt({ ref_key: "contentRef", ref: h }, y(x), { style: y(k), class: y(w), tabindex: "-1", onMouseenter: (j) => M.$emit("mouseenter", j), onMouseleave: (j) => M.$emit("mouseleave", j) }), [ W(y(iA), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: R(() => [ oe(M.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var nwe = /* @__PURE__ */ gt(twe, [["__file", "content.vue"]]); const rwe = zn(E2e), Mw = Symbol("elTooltip"), no = St({ ...Bbe, ...sA, appendTo: { type: ct([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: ct(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...Ks(["ariaLabel"]) }), Ap = St({ ...rA, disabled: Boolean, trigger: { type: ct([String, Array]), default: "hover" }, triggerKeys: { type: ct(Array), default: () => [Wt.enter, Wt.space] } }), { useModelToggleProps: owe, useModelToggleEmits: awe, useModelToggle: iwe } = Oye("visible"), swe = St({ ...QI, ...owe, ...no, ...Ap, ...eA, showArrow: { type: Boolean, default: !0 } }), lwe = [ ...awe, "before-show", "before-hide", "show", "hide", "open", "close" ], uwe = (e, t) => Yr(e) ? e.includes(t) : e === t, Fu = (e, t, n) => (r) => { uwe(y(e), t) && n(r); }, cwe = K({ name: "ElTooltipTrigger" }), dwe = /* @__PURE__ */ K({ ...cwe, props: Ap, setup(e, { expose: t }) { const n = e, r = mt("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = xe(Mw, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, f = $t(n, "trigger"), h = jn(d, Fu(f, "hover", s)), p = jn(d, Fu(f, "hover", l)), v = jn(d, Fu(f, "click", (x) => { x.button === 0 && u(x); })), m = jn(d, Fu(f, "focus", s)), g = jn(d, Fu(f, "focus", l)), b = jn(d, Fu(f, "contextmenu", (x) => { x.preventDefault(), u(x); })), C = jn(d, (x) => { const { code: w } = x; n.triggerKeys.includes(w) && (x.preventDefault(), u(x)); }); return t({ triggerRef: c }), (x, w) => (E(), Q(y(I2e), { id: y(a), "virtual-ref": x.virtualRef, open: y(i), "virtual-triggering": x.virtualTriggering, class: V(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(p), onKeydown: y(C) }, { default: R(() => [ oe(x.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var pwe = /* @__PURE__ */ gt(dwe, [["__file", "trigger.vue"]]); const fwe = St({ to: { type: ct([String, Object]), required: !0 }, disabled: Boolean }), hwe = /* @__PURE__ */ K({ __name: "teleport", props: fwe, setup(e) { return (t, n) => t.disabled ? oe(t.$slots, "default", { key: 0 }) : (E(), Q(x0, { key: 1, to: t.to }, [ oe(t.$slots, "default") ], 8, ["to"])); } }); var vwe = /* @__PURE__ */ gt(hwe, [["__file", "teleport.vue"]]); const lA = zn(vwe), gwe = K({ name: "ElTooltipContent", inheritAttrs: !1 }), mwe = /* @__PURE__ */ K({ ...gwe, props: no, setup(e, { expose: t }) { const n = e, { selector: r } = VI(), o = mt("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = xe(Mw, void 0), g = $(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = $(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const C = $(() => y(b) ? !0 : y(u)), x = $(() => n.disabled ? !1 : y(u)), w = $(() => n.appendTo || r.value), k = $(() => { var A; return (A = n.style) != null ? A : {}; }), S = z(!0), _ = () => { p(), S.value = !0; }, O = () => { if (y(s)) return !0; }, F = jn(O, () => { n.enterable && y(c) === "hover" && f(); }), I = jn(O, () => { y(c) === "hover" && d(); }), P = () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A), v == null || v(); }, M = () => { m == null || m(); }, N = () => { h(), i = yhe($(() => { var A; return (A = a.value) == null ? void 0 : A.popperContentRef; }), () => { y(s) || y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return ce(() => y(u), (A) => { A ? S.value = !1 : i == null || i(); }, { flush: "post" }), ce(() => n.content, () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A); }), t({ contentRef: a }), (A, U) => (E(), Q(y(lA), { disabled: !A.teleported, to: y(w) }, { default: R(() => [ W(pr, { name: y(g), onAfterLeave: _, onBeforeEnter: P, onAfterEnter: N, onBeforeLeave: M }, { default: R(() => [ y(C) ? Ne((E(), Q(y(nwe), Lt({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, A.$attrs, { "aria-label": A.ariaLabel, "aria-hidden": S.value, "boundaries-padding": A.boundariesPadding, "fallback-placements": A.fallbackPlacements, "gpu-acceleration": A.gpuAcceleration, offset: A.offset, placement: A.placement, "popper-options": A.popperOptions, strategy: A.strategy, effect: A.effect, enterable: A.enterable, pure: A.pure, "popper-class": A.popperClass, "popper-style": [A.popperStyle, y(k)], "reference-el": A.referenceEl, "trigger-target-el": A.triggerTargetEl, visible: y(x), "z-index": A.zIndex, onMouseenter: y(F), onMouseleave: y(I), onBlur: j, onClose: y(d) }), { default: R(() => [ oe(A.$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"])), [ [ft, y(x)] ]) : Z("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var ywe = /* @__PURE__ */ gt(mwe, [["__file", "content.vue"]]); const bwe = K({ name: "ElTooltip" }), wwe = /* @__PURE__ */ K({ ...bwe, props: swe, emits: lwe, setup(e, { expose: t, emit: n }) { const r = e; Nbe(); const o = ni(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: f } = iwe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = zbe({ showAfter: $t(r, "showAfter"), hideAfter: $t(r, "hideAfter"), autoClose: $t(r, "autoClose"), open: c, close: d }), v = $(() => ei(r.visible) && !f.value); tt(Mw, { controlled: v, id: o, open: Tc(l), trigger: $t(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { y(l) ? p(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), ce(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, C; const x = (C = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : C.popperContentRef, w = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return x && x.contains(w); }; return k0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, b) => (E(), Q(y(rwe), { ref_key: "popperRef", ref: a, role: g.role }, { default: R(() => [ W(pwe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: R(() => [ g.$slots.default ? oe(g.$slots, "default", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), W(ywe, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: R(() => [ oe(g.$slots, "content", {}, () => [ g.rawContent ? (E(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (E(), L("span", { key: 1 }, me(g.content), 1)) ]), g.showArrow ? (E(), Q(y(T2e), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : Z("v-if", !0) ]), _: 3 }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"]) ]), _: 3 }, 8, ["role"])); } }); var xwe = /* @__PURE__ */ gt(wwe, [["__file", "tooltip.vue"]]); const Pp = zn(xwe), uA = Symbol("buttonGroupContextKey"), kwe = (e, t) => { $l({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, $(() => e.type === "text")); const n = xe(uA, void 0), r = Mg("button"), { form: o } = Ys(), a = Mi($(() => n == null ? void 0 : n.size)), i = $f(), s = z(), l = Xr(), u = $(() => e.type || (n == null ? void 0 : n.type) || ""), c = $(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = $(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = $(() => { var h; const p = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Vs) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h); } }; }, Cwe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], Swe = ["button", "submit", "reset"], Hy = St({ size: Ki, disabled: Boolean, type: { type: String, values: Cwe, default: "" }, icon: { type: Zo }, nativeType: { type: String, values: Swe, default: "button" }, loading: Boolean, loadingIcon: { type: Zo, default: () => Pg }, 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: ct([String, Object]), default: "button" } }), Ewe = { click: (e) => e instanceof MouseEvent }; function $r(e, t) { $we(e) && (e = "100%"); var n = _we(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 _h(e) { return Math.min(1, Math.max(0, e)); } function $we(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function _we(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function cA(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Th(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function hl(e) { return e.length === 1 ? "0" + e : String(e); } function Twe(e, t, n) { return { r: $r(e, 255) * 255, g: $r(t, 255) * 255, b: $r(n, 255) * 255 }; } function fS(e, t, n) { e = $r(e, 255), t = $r(t, 255), n = $r(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 0.5 ? l / (2 - r - o) : l / (r + o), r) { 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: i, l: s }; } function c1(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 Owe(e, t, n) { var r, o, a; if (e = $r(e, 360), t = $r(t, 100), n = $r(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = c1(s, i, e + 1 / 3), o = c1(s, i, e), a = c1(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function hS(e, t, n) { e = $r(e, 255), t = $r(t, 255), n = $r(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function Fwe(e, t, n) { e = $r(e, 360) * 6, t = $r(t, 100), n = $r(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function vS(e, t, n, r) { var o = [ hl(Math.round(e).toString(16)), hl(Math.round(t).toString(16)), hl(Math.round(n).toString(16)) ]; return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join(""); } function Iwe(e, t, n, r, o) { var a = [ hl(Math.round(e).toString(16)), hl(Math.round(t).toString(16)), hl(Math.round(n).toString(16)), hl(Awe(r)) ]; return o && 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 Awe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function gS(e) { return Co(e) / 255; } function Co(e) { return parseInt(e, 16); } function Pwe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var Uy = { 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 Lwe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = Mwe(e)), typeof e == "object" && (pi(e.r) && pi(e.g) && pi(e.b) ? (t = Twe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : pi(e.h) && pi(e.s) && pi(e.v) ? (r = Th(e.s), o = Th(e.v), t = Fwe(e.h, r, o), i = !0, s = "hsv") : pi(e.h) && pi(e.s) && pi(e.l) && (r = Th(e.s), a = Th(e.l), t = Owe(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = cA(n), { ok: i, format: e.format || s, r: Math.min(255, Math.max(t.r, 0)), g: Math.min(255, Math.max(t.g, 0)), b: Math.min(255, Math.max(t.b, 0)), a: n }; } var Rwe = "[-\\+]?\\d+%?", Dwe = "[-\\+]?\\d*\\.\\d+%?", Cs = "(?:".concat(Dwe, ")|(?:").concat(Rwe, ")"), d1 = "[\\s|\\(]+(".concat(Cs, ")[,|\\s]+(").concat(Cs, ")[,|\\s]+(").concat(Cs, ")\\s*\\)?"), p1 = "[\\s|\\(]+(".concat(Cs, ")[,|\\s]+(").concat(Cs, ")[,|\\s]+(").concat(Cs, ")[,|\\s]+(").concat(Cs, ")\\s*\\)?"), la = { CSS_UNIT: new RegExp(Cs), rgb: new RegExp("rgb" + d1), rgba: new RegExp("rgba" + p1), hsl: new RegExp("hsl" + d1), hsla: new RegExp("hsla" + p1), hsv: new RegExp("hsv" + d1), hsva: new RegExp("hsva" + p1), 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 Mwe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (Uy[e]) e = Uy[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = la.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = la.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = la.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = la.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = la.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = la.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = la.hex8.exec(e), n ? { r: Co(n[1]), g: Co(n[2]), b: Co(n[3]), a: gS(n[4]), format: t ? "name" : "hex8" } : (n = la.hex6.exec(e), n ? { r: Co(n[1]), g: Co(n[2]), b: Co(n[3]), format: t ? "name" : "hex" } : (n = la.hex4.exec(e), n ? { r: Co(n[1] + n[1]), g: Co(n[2] + n[2]), b: Co(n[3] + n[3]), a: gS(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = la.hex3.exec(e), n ? { r: Co(n[1] + n[1]), g: Co(n[2] + n[2]), b: Co(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function pi(e) { return !!la.CSS_UNIT.exec(String(e)); } var Nwe = ( /** @class */ function() { function e(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e) return t; typeof t == "number" && (t = Pwe(t)), this.originalInput = t; var o = Lwe(t); this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.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 = o.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, r, o, a = t.r / 255, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = cA(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 = hS(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 = hS(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = fS(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 = fS(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), vS(this.r, this.g, this.b, t); }, e.prototype.toHexString = function(t) { return t === void 0 && (t = !1), "#" + this.toHex(t); }, e.prototype.toHex8 = function(t) { return t === void 0 && (t = !1), Iwe(this.r, this.g, this.b, this.a, t); }, e.prototype.toHex8String = function(t) { return t === void 0 && (t = !1), "#" + this.toHex8(t); }, e.prototype.toHexShortString = function(t) { return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e.prototype.toRgbString = function() { var t = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b); return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")"); }, e.prototype.toPercentageRgb = function() { var t = function(n) { return "".concat(Math.round($r(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($r(n, 255) * 100); }; return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")"); }, e.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return !1; for (var t = "#" + vS(this.r, this.g, this.b, !1), n = 0, r = Object.entries(Uy); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) return a; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name"); return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || 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 = _h(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 = _h(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 = _h(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 = _h(n.s), new e(n); }, e.prototype.greyscale = function() { return this.desaturate(100); }, e.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e(n); }, e.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, i = { r: (o.r - r.r) * a + r.r, g: (o.g - r.g) * a + r.g, b: (o.b - r.b) * a + r.b, a: (o.a - r.a) * a + r.a }; return new e(i); }, e.prototype.analogous = function(t, n) { t === void 0 && (t = 6), n === void 0 && (n = 30); var r = this.toHsl(), o = 360 / n, a = [this]; for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; ) r.h = (r.h + o) % 360, a.push(new e(r)); 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(), r = n.h, o = n.s, a = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o, a: o }); }, 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(), r = n.h, o = [this], a = 360 / t, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function es(e, t = 20) { return e.mix("#141414", t).toString(); } function Bwe(e) { const t = $f(), n = mt("button"); return $(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new Nwe(o), s = e.dark ? i.tint(20).toString() : es(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? es(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? es(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? es(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? es(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? es(i, 80) : i.tint(80).toString()); else { const l = e.dark ? es(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? es(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c; } } } return r; }); } const zwe = K({ name: "ElButton" }), Vwe = /* @__PURE__ */ K({ ...zwe, props: Hy, emits: Ewe, setup(e, { expose: t, emit: n }) { const r = e, o = Bwe(r), a = mt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = kwe(r, n), h = $(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.value), a.is("loading", r.loading), a.is("plain", r.plain), a.is("round", r.round), a.is("circle", r.circle), a.is("text", r.text), a.is("link", r.link), a.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (E(), Q(vt(p.tag), Lt({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(f) }), { default: R(() => [ p.loading ? (E(), L(De, { key: 0 }, [ p.$slots.loading ? oe(p.$slots, "loading", { key: 0 }) : (E(), Q(y(ln), { key: 1, class: V(y(a).is("loading")) }, { default: R(() => [ (E(), Q(vt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (E(), Q(y(ln), { key: 1 }, { default: R(() => [ p.icon ? (E(), Q(vt(p.icon), { key: 0 })) : oe(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : Z("v-if", !0), p.$slots.default ? (E(), L("span", { key: 2, class: V({ [y(a).em("text", "expand")]: y(d) }) }, [ oe(p.$slots, "default") ], 2)) : Z("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var jwe = /* @__PURE__ */ gt(Vwe, [["__file", "button.vue"]]); const Hwe = { size: Hy.size, type: Hy.type }, Uwe = K({ name: "ElButtonGroup" }), qwe = /* @__PURE__ */ K({ ...Uwe, props: Hwe, setup(e) { const t = e; tt(uA, Kt({ size: $t(t, "size"), type: $t(t, "type") })); const n = mt("button"); return (r, o) => (E(), L("div", { class: V(y(n).b("group")) }, [ oe(r.$slots, "default") ], 2)); } }); var dA = /* @__PURE__ */ gt(qwe, [["__file", "button-group.vue"]]); const bo = zn(jwe, { ButtonGroup: dA }); Fo(dA); var Wwe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Gwe(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const us = /* @__PURE__ */ new Map(); if (En) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of us.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function mS(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : El(t.arg) && n.push(t.arg), function(r, o) { const a = t.instance.popperRef, i = r.target, s = o == null ? void 0 : o.target, l = !t || !t.instance, u = !i || !s, c = e.contains(i) || e.contains(s), d = e === i, f = n.length && n.some((p) => p == null ? void 0 : p.contains(i)) || n.length && n.includes(s), h = a && (a.contains(i) || a.contains(s)); l || u || c || d || f || h || t.value(r, o); }; } const pA = { beforeMount(e, t) { us.has(e) || us.set(e, []), us.get(e).push({ documentHandler: mS(e, t), bindingFn: t.value }); }, updated(e, t) { us.has(e) || us.set(e, []); const n = us.get(e), r = n.findIndex((a) => a.bindingFn === t.oldValue), o = { documentHandler: mS(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, o) : n.push(o); }, unmounted(e) { us.delete(e); } }, Kwe = St({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: ct([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), Ywe = K({ name: "ElCard" }), Xwe = /* @__PURE__ */ K({ ...Ywe, props: Kwe, setup(e) { const t = mt("card"); return (n, r) => (E(), L("div", { class: V([y(t).b(), y(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (E(), L("div", { key: 0, class: V(y(t).e("header")) }, [ oe(n.$slots, "header", {}, () => [ Ae(me(n.header), 1) ]) ], 2)) : Z("v-if", !0), B("div", { class: V([y(t).e("body"), n.bodyClass]), style: Ze(n.bodyStyle) }, [ oe(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (E(), L("div", { key: 1, class: V(y(t).e("footer")) }, [ oe(n.$slots, "footer", {}, () => [ Ae(me(n.footer), 1) ]) ], 2)) : Z("v-if", !0) ], 2)); } }); var Zwe = /* @__PURE__ */ gt(Xwe, [["__file", "card.vue"]]); const fA = zn(Zwe), hA = { 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: Ki, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...Ks(["ariaControls"]) }, vA = { [Mn]: (e) => uo(e) || sn(e) || ei(e), change: (e) => uo(e) || sn(e) || ei(e) }, Kc = Symbol("checkboxGroupContextKey"), Jwe = ({ model: e, isChecked: t }) => { const n = xe(Kc, void 0), r = $(() => { var o, a; const i = (o = n == null ? void 0 : n.max) == null ? void 0 : o.value, s = (a = n == null ? void 0 : n.min) == null ? void 0 : a.value; return !_i(i) && e.value.length >= i && !t.value || !_i(s) && e.value.length <= s && t.value; }); return { isDisabled: $f($(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, Qwe = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: o, isLabeledByFormItem: a }) => { const i = xe(Kc, void 0), { formItem: s } = Ys(), { emit: l } = rt(); function u(p) { var v, m, g, b; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (b = (g = e.falseValue) != null ? g : e.falseLabel) != null ? b : !1; } function c(p, v) { l("change", u(p), v); } function d(p) { if (n.value) return; const v = p.target; l("change", u(v.checked), p); } async function f(p) { n.value || !r.value && !o.value && a.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await Ue(), c(t.value, p))); } const h = $(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return ce(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => Wn(p))); }), { handleChange: d, onClickRoot: f }; }, exe = (e) => { const t = z(!1), { emit: n } = rt(), r = xe(Kc, void 0), o = $(() => _i(r) === !1), a = z(!1), i = $({ get() { var s, l; return o.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (l = e.modelValue) != null ? l : t.value; }, set(s) { var l, u; o.value && Yr(s) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > i.value.length, a.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(Mn, s), t.value = s); } }); return { model: i, isGroup: o, isLimitExceeded: a }; }, txe = (e, t, { model: n }) => { const r = xe(Kc, void 0), o = z(!1), a = $(() => Tp(e.value) ? e.label : e.value), i = $(() => { const c = n.value; return ei(c) ? c : Yr(c) ? dr(a.value) ? c.map(Ga).some((d) => Ua(d, a.value)) : c.map(Ga).includes(a.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = Mi($(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = Mi($(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = $(() => !!t.default || !Tp(a.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: o, checkboxSize: l, hasOwnLabel: u, actualValue: a }; }, gA = (e, t) => { const { formItem: n } = Ys(), { model: r, isGroup: o, isLimitExceeded: a } = exe(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = txe(e, t, { model: r }), { isDisabled: f } = Jwe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = _f(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: o }), { handleChange: v, onClickRoot: m } = Qwe(e, { model: r, isLimitExceeded: a, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var b, C; Yr(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (C = (b = e.trueValue) != null ? b : e.trueLabel) != null ? C : !0; } e.checked && g(); })(), $l({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, $(() => o.value && Tp(e.value))), $l({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, $(() => !!e.trueLabel)), $l({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, $(() => !!e.falseLabel)), { inputId: h, isLabeledByFormItem: p, isChecked: s, isDisabled: f, isFocused: i, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, model: r, actualValue: d, handleChange: v, onClickRoot: m }; }, nxe = K({ name: "ElCheckbox" }), rxe = /* @__PURE__ */ K({ ...nxe, props: hA, emits: vA, setup(e) { const t = e, n = Xr(), { inputId: r, isLabeledByFormItem: o, isChecked: a, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = gA(t, n), p = mt("checkbox"), v = $(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", a.value) ]), m = $(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", a.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, b) => (E(), Q(vt(!y(u) && y(o) ? "span" : "label"), { class: V(y(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: y(h) }, { default: R(() => { var C, x, w, k; return [ B("span", { class: V(y(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Ne((E(), L("input", { key: 0, id: y(r), "onUpdate:modelValue": (S) => Gn(c) ? c.value = S : null, class: V(y(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: y(i), "true-value": (x = (C = g.trueValue) != null ? C : g.trueLabel) != null ? x : !0, "false-value": (k = (w = g.falseValue) != null ? w : g.falseLabel) != null ? k : !1, onChange: y(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(c)] ]) : Ne((E(), L("input", { key: 1, id: y(r), "onUpdate:modelValue": (S) => Gn(c) ? c.value = S : null, class: V(y(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: y(i), value: y(d), name: g.name, tabindex: g.tabindex, onChange: y(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(c)] ]), B("span", { class: V(y(p).e("inner")) }, null, 2) ], 2), y(u) ? (E(), L("span", { key: 0, class: V(y(p).e("label")) }, [ oe(g.$slots, "default"), g.$slots.default ? Z("v-if", !0) : (E(), L(De, { key: 0 }, [ Ae(me(g.label), 1) ], 64)) ], 2)) : Z("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var oxe = /* @__PURE__ */ gt(rxe, [["__file", "checkbox.vue"]]); const axe = K({ name: "ElCheckboxButton" }), ixe = /* @__PURE__ */ K({ ...axe, props: hA, emits: vA, setup(e) { const t = e, n = Xr(), { isFocused: r, isChecked: o, isDisabled: a, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = gA(t, n), c = xe(Kc, void 0), d = mt("checkbox"), f = $(() => { var p, v, m, g; const b = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: b, borderColor: b, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: b ? `-1px 0 0 0 ${b}` : void 0 }; }), h = $(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", a.value), d.is("checked", o.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, b, C; return E(), L("label", { class: V(y(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? Ne((E(), L("input", { key: 0, "onUpdate:modelValue": (x) => Gn(s) ? s.value = x : null, class: V(y(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: y(a), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (C = (b = p.falseValue) != null ? b : p.falseLabel) != null ? C : !1, onChange: y(u), onFocus: (x) => r.value = !0, onBlur: (x) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(s)] ]) : Ne((E(), L("input", { key: 1, "onUpdate:modelValue": (x) => Gn(s) ? s.value = x : null, class: V(y(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: y(a), value: y(l), onChange: y(u), onFocus: (x) => r.value = !0, onBlur: (x) => r.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [Ts, y(s)] ]), p.$slots.default || p.label ? (E(), L("span", { key: 2, class: V(y(d).be("button", "inner")), style: Ze(y(o) ? y(f) : void 0) }, [ oe(p.$slots, "default", {}, () => [ Ae(me(p.label), 1) ]) ], 6)) : Z("v-if", !0) ], 2); }; } }); var mA = /* @__PURE__ */ gt(ixe, [["__file", "checkbox-button.vue"]]); const sxe = St({ modelValue: { type: ct(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Ki, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...Ks(["ariaLabel"]) }), lxe = { [Mn]: (e) => Yr(e), change: (e) => Yr(e) }, uxe = K({ name: "ElCheckboxGroup" }), cxe = /* @__PURE__ */ K({ ...uxe, props: sxe, emits: lxe, setup(e, { emit: t }) { const n = e, r = mt("checkbox"), { formItem: o } = Ys(), { inputId: a, isLabeledByFormItem: i } = _f(n, { formItemContext: o }), s = async (u) => { t(Mn, u), await Ue(), t("change", u); }, l = $({ get() { return n.modelValue; }, set(u) { s(u); } }); return tt(Kc, { ...vI(Vr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), ce(() => n.modelValue, () => { n.validateEvent && (o == null || o.validate("change").catch((u) => Wn(u))); }), (u, c) => { var d; return E(), Q(vt(u.tag), { id: y(a), class: V(y(r).b("group")), role: "group", "aria-label": y(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": y(i) ? (d = y(o)) == null ? void 0 : d.labelId : void 0 }, { default: R(() => [ oe(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var yA = /* @__PURE__ */ gt(cxe, [["__file", "checkbox-group.vue"]]); const dxe = zn(oxe, { CheckboxButton: mA, CheckboxGroup: yA }); Fo(mA); Fo(yA); const bA = St({ modelValue: { type: [String, Number, Boolean], default: void 0 }, size: Ki, disabled: Boolean, label: { type: [String, Number, Boolean], default: void 0 }, value: { type: [String, Number, Boolean], default: void 0 }, name: { type: String, default: void 0 } }), pxe = St({ ...bA, border: Boolean }), wA = { [Mn]: (e) => uo(e) || sn(e) || ei(e), [Wl]: (e) => uo(e) || sn(e) || ei(e) }, xA = Symbol("radioGroupKey"), kA = (e, t) => { const n = z(), r = xe(xA, void 0), o = $(() => !!r), a = $(() => Tp(e.value) ? e.label : e.value), i = $({ get() { return o.value ? r.modelValue : e.modelValue; }, set(d) { o.value ? r.changeEvent(d) : t && t(Mn, d), n.value.checked = e.modelValue === a.value; } }), s = Mi($(() => r == null ? void 0 : r.size)), l = $f($(() => r == null ? void 0 : r.disabled)), u = z(!1), c = $(() => l.value || o.value && i.value !== a.value ? -1 : 0); return $l({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-radio", ref: "https://element-plus.org/en-US/component/radio.html" }, $(() => o.value && Tp(e.value))), { radioRef: n, isGroup: o, radioGroup: r, focus: u, size: s, disabled: l, tabIndex: c, modelValue: i, actualValue: a }; }, fxe = K({ name: "ElRadio" }), hxe = /* @__PURE__ */ K({ ...fxe, props: pxe, emits: wA, setup(e, { emit: t }) { const n = e, r = mt("radio"), { radioRef: o, radioGroup: a, focus: i, size: s, disabled: l, modelValue: u, actualValue: c } = kA(n, t); function d() { Ue(() => t("change", u.value)); } return (f, h) => { var p; return E(), L("label", { class: V([ y(r).b(), y(r).is("disabled", y(l)), y(r).is("focus", y(i)), y(r).is("bordered", f.border), y(r).is("checked", y(u) === y(c)), y(r).m(y(s)) ]) }, [ B("span", { class: V([ y(r).e("input"), y(r).is("disabled", y(l)), y(r).is("checked", y(u) === y(c)) ]) }, [ Ne(B("input", { ref_key: "radioRef", ref: o, "onUpdate:modelValue": (v) => Gn(u) ? u.value = v : null, class: V(y(r).e("original")), value: y(c), name: f.name || ((p = y(a)) == null ? void 0 : p.name), disabled: y(l), checked: y(u) === y(c), type: "radio", onFocus: (v) => i.value = !0, onBlur: (v) => i.value = !1, onChange: d, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [ [e$, y(u)] ]), B("span", { class: V(y(r).e("inner")) }, null, 2) ], 2), B("span", { class: V(y(r).e("label")), onKeydown: Je(() => { }, ["stop"]) }, [ oe(f.$slots, "default", {}, () => [ Ae(me(f.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var vxe = /* @__PURE__ */ gt(hxe, [["__file", "radio.vue"]]); const gxe = St({ ...bA }), mxe = K({ name: "ElRadioButton" }), yxe = /* @__PURE__ */ K({ ...mxe, props: gxe, setup(e) { const t = e, n = mt("radio"), { radioRef: r, focus: o, size: a, disabled: i, modelValue: s, radioGroup: l, actualValue: u } = kA(t), c = $(() => ({ 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 h; return E(), L("label", { class: V([ y(n).b("button"), y(n).is("active", y(s) === y(u)), y(n).is("disabled", y(i)), y(n).is("focus", y(o)), y(n).bm("button", y(a)) ]) }, [ Ne(B("input", { ref_key: "radioRef", ref: r, "onUpdate:modelValue": (p) => Gn(s) ? s.value = p : null, class: V(y(n).be("button", "original-radio")), value: y(u), type: "radio", name: d.name || ((h = y(l)) == null ? void 0 : h.name), disabled: y(i), onFocus: (p) => o.value = !0, onBlur: (p) => o.value = !1, onClick: Je(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [ [e$, y(s)] ]), B("span", { class: V(y(n).be("button", "inner")), style: Ze(y(s) === y(u) ? y(c) : {}), onKeydown: Je(() => { }, ["stop"]) }, [ oe(d.$slots, "default", {}, () => [ Ae(me(d.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var CA = /* @__PURE__ */ gt(yxe, [["__file", "radio-button.vue"]]); const bxe = St({ id: { type: String, default: void 0 }, size: Ki, disabled: Boolean, modelValue: { type: [String, Number, Boolean], default: void 0 }, fill: { type: String, default: "" }, textColor: { type: String, default: "" }, name: { type: String, default: void 0 }, validateEvent: { type: Boolean, default: !0 }, ...Ks(["ariaLabel"]) }), wxe = wA, xxe = K({ name: "ElRadioGroup" }), kxe = /* @__PURE__ */ K({ ...xxe, props: bxe, emits: wxe, setup(e, { emit: t }) { const n = e, r = mt("radio"), o = ni(), a = z(), { formItem: i } = Ys(), { inputId: s, isLabeledByFormItem: l } = _f(n, { formItemContext: i }), u = (d) => { t(Mn, d), Ue(() => t("change", d)); }; at(() => { const d = a.value.querySelectorAll("[type=radio]"), f = d[0]; !Array.from(d).some((h) => h.checked) && f && (f.tabIndex = 0); }); const c = $(() => n.name || o.value); return tt(xA, Kt({ ...Vr(n), changeEvent: u, name: c })), ce(() => n.modelValue, () => { n.validateEvent && (i == null || i.validate("change").catch((d) => Wn(d))); }), (d, f) => (E(), L("div", { id: y(s), ref_key: "radioGroupRef", ref: a, class: V(y(r).b("group")), role: "radiogroup", "aria-label": y(l) ? void 0 : d.ariaLabel || "radio-group", "aria-labelledby": y(l) ? y(i).labelId : void 0 }, [ oe(d.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var SA = /* @__PURE__ */ gt(kxe, [["__file", "radio-group.vue"]]); const Cxe = zn(vxe, { RadioButton: CA, RadioGroup: SA }); Fo(SA); Fo(CA); var Sxe = K({ name: "NodeContent", setup() { return { ns: mt("cascader-node") }; }, render() { const { ns: e } = this, { node: t, panel: n } = this.$parent, { data: r, label: o } = t, { renderLabelFn: a } = n; return jt("span", { class: e.e("label") }, a ? a({ node: t, data: r }) : o); } }); const Nw = Symbol(), Exe = K({ name: "ElCascaderNode", components: { ElCheckbox: dxe, ElRadio: Cxe, NodeContent: Sxe, ElIcon: ln, Check: wI, Loading: Pg, ArrowRight: Ig }, props: { node: { type: Object, required: !0 }, menuId: String }, emits: ["expand"], setup(e, { emit: t }) { const n = xe(Nw), r = mt("cascader-node"), o = $(() => n.isHoverMenu), a = $(() => n.config.multiple), i = $(() => n.config.checkStrictly), s = $(() => { var k; return (k = n.checkedNodes[0]) == null ? void 0 : k.uid; }), l = $(() => e.node.isDisabled), u = $(() => e.node.isLeaf), c = $(() => i.value && !u.value || !l.value), d = $(() => h(n.expandingNode)), f = $(() => i.value && n.checkedNodes.some(h)), h = (k) => { var S; const { level: _, uid: O } = e.node; return ((S = k == null ? void 0 : k.pathNodes[_ - 1]) == null ? void 0 : S.uid) === O; }, p = () => { d.value || n.expandNode(e.node); }, v = (k) => { const { node: S } = e; k !== S.checked && n.handleCheckChange(S, k); }, m = () => { n.lazyLoad(e.node, () => { u.value || p(); }); }, g = (k) => { o.value && (b(), !u.value && t("expand", k)); }, b = () => { const { node: k } = e; !c.value || k.loading || (k.loaded ? p() : m()); }, C = () => { o.value && !u.value || (u.value && !l.value && !i.value && !a.value ? w(!0) : b()); }, x = (k) => { i.value ? (v(k), e.node.loaded && p()) : w(k); }, w = (k) => { e.node.loaded ? (v(k), !i.value && p()) : m(); }; return { panel: n, isHoverMenu: o, multiple: a, checkStrictly: i, checkedNodeId: s, isDisabled: l, isLeaf: u, expandable: c, inExpandingPath: d, inCheckedPath: f, ns: r, handleHoverExpand: g, handleExpand: b, handleClick: C, handleCheck: w, handleSelectCheck: x }; } }); function $xe(e, t, n, r, o, a) { const i = Xe("el-checkbox"), s = Xe("el-radio"), l = Xe("check"), u = Xe("el-icon"), c = Xe("node-content"), d = Xe("loading"), f = Xe("arrow-right"); return E(), L("li", { id: `${e.menuId}-${e.node.uid}`, role: "menuitem", "aria-haspopup": !e.isLeaf, "aria-owns": e.isLeaf ? null : e.menuId, "aria-expanded": e.inExpandingPath, tabindex: e.expandable ? -1 : void 0, class: V([ e.ns.b(), e.ns.is("selectable", e.checkStrictly), e.ns.is("active", e.node.checked), e.ns.is("disabled", !e.expandable), e.inExpandingPath && "in-active-path", e.inCheckedPath && "in-checked-path" ]), onMouseenter: e.handleHoverExpand, onFocus: e.handleHoverExpand, onClick: e.handleClick }, [ Z(" prefix "), e.multiple ? (E(), Q(i, { key: 0, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: e.isDisabled, onClick: Je(() => { }, ["stop"]), "onUpdate:modelValue": e.handleSelectCheck }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : e.checkStrictly ? (E(), Q(s, { key: 1, "model-value": e.checkedNodeId, label: e.node.uid, disabled: e.isDisabled, "onUpdate:modelValue": e.handleSelectCheck, onClick: Je(() => { }, ["stop"]) }, { default: R(() => [ Z(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `), B("span") ]), _: 1 }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : e.isLeaf && e.node.checked ? (E(), Q(u, { key: 2, class: V(e.ns.e("prefix")) }, { default: R(() => [ W(l) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), Z(" content "), W(c), Z(" postfix "), e.isLeaf ? Z("v-if", !0) : (E(), L(De, { key: 3 }, [ e.node.loading ? (E(), Q(u, { key: 0, class: V([e.ns.is("loading"), e.ns.e("postfix")]) }, { default: R(() => [ W(d) ]), _: 1 }, 8, ["class"])) : (E(), Q(u, { key: 1, class: V(["arrow-right", e.ns.e("postfix")]) }, { default: R(() => [ W(f) ]), _: 1 }, 8, ["class"])) ], 64)) ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]); } var _xe = /* @__PURE__ */ gt(Exe, [["render", $xe], ["__file", "node.vue"]]); const Txe = K({ name: "ElCascaderMenu", components: { Loading: Pg, ElIcon: ln, ElScrollbar: Bg, ElCascaderNode: _xe }, props: { nodes: { type: Array, required: !0 }, index: { type: Number, required: !0 } }, setup(e) { const t = rt(), n = mt("cascader-menu"), { t: r } = Io(), o = ni(); let a = null, i = null; const s = xe(Nw), l = z(null), u = $(() => !e.nodes.length), c = $(() => !s.initialLoaded), d = $(() => `${o.value}-${e.index}`), f = (m) => { a = m.target; }, h = (m) => { if (!(!s.isHoverMenu || !a || !l.value)) if (a.contains(m.target)) { p(); const g = t.vnode.el, { left: b } = g.getBoundingClientRect(), { offsetWidth: C, offsetHeight: x } = g, w = m.clientX - b, k = a.offsetTop, S = k + a.offsetHeight; l.value.innerHTML = ` `; } else i || (i = window.setTimeout(v, s.config.hoverThreshold)); }, p = () => { i && (clearTimeout(i), i = null); }, v = () => { l.value && (l.value.innerHTML = "", p()); }; return { ns: n, panel: s, hoverZone: l, isEmpty: u, isLoading: c, menuId: d, t: r, handleExpand: f, handleMouseMove: h, clearHoverZone: v }; } }); function Oxe(e, t, n, r, o, a) { const i = Xe("el-cascader-node"), s = Xe("loading"), l = Xe("el-icon"), u = Xe("el-scrollbar"); return E(), Q(u, { key: e.menuId, tag: "ul", role: "menu", class: V(e.ns.b()), "wrap-class": e.ns.e("wrap"), "view-class": [e.ns.e("list"), e.ns.is("empty", e.isEmpty)], onMousemove: e.handleMouseMove, onMouseleave: e.clearHoverZone }, { default: R(() => { var c; return [ (E(!0), L(De, null, xt(e.nodes, (d) => (E(), Q(i, { key: d.uid, node: d, "menu-id": e.menuId, onExpand: e.handleExpand }, null, 8, ["node", "menu-id", "onExpand"]))), 128)), e.isLoading ? (E(), L("div", { key: 0, class: V(e.ns.e("empty-text")) }, [ W(l, { size: "14", class: V(e.ns.is("loading")) }, { default: R(() => [ W(s) ]), _: 1 }, 8, ["class"]), Ae(" " + me(e.t("el.cascader.loading")), 1) ], 2)) : e.isEmpty ? (E(), L("div", { key: 1, class: V(e.ns.e("empty-text")) }, [ oe(e.$slots, "empty", {}, () => [ Ae(me(e.t("el.cascader.noData")), 1) ]) ], 2)) : (c = e.panel) != null && c.isHoverMenu ? (E(), L("svg", { key: 2, ref: "hoverZone", class: V(e.ns.e("hover-zone")) }, null, 2)) : Z("v-if", !0) ]; }), _: 3 }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]); } var Fxe = /* @__PURE__ */ gt(Txe, [["render", Oxe], ["__file", "menu.vue"]]); let Ixe = 0; const Axe = (e) => { const t = [e]; let { parent: n } = e; for (; n; ) t.unshift(n), n = n.parent; return t; }; class xc { constructor(t, n, r, o = !1) { this.data = t, this.config = n, this.parent = r, this.root = o, this.uid = Ixe++, this.checked = !1, this.indeterminate = !1, this.loading = !1; const { value: a, label: i, children: s } = n, l = t[s], u = Axe(this); this.level = o ? 0 : r ? r.level + 1 : 1, this.value = t[a], this.label = t[i], this.pathNodes = u, this.pathValues = u.map((c) => c.value), this.pathLabels = u.map((c) => c.label), this.childrenData = l, this.children = (l || []).map((c) => new xc(c, n, this)), this.loaded = !n.lazy || this.isLeaf || !Dy(l); } get isDisabled() { const { data: t, parent: n, config: r } = this, { disabled: o, checkStrictly: a } = r; return (Hn(o) ? o(t, this) : !!t[o]) || !a && (n == null ? void 0 : n.isDisabled); } get isLeaf() { const { data: t, config: n, childrenData: r, loaded: o } = this, { lazy: a, leaf: i } = n, s = Hn(i) ? i(t, this) : t[i]; return _i(s) ? a && !o ? !1 : !(Array.isArray(r) && r.length) : !!s; } get valueByOption() { return this.config.emitPath ? this.pathValues : this.value; } appendChild(t) { const { childrenData: n, children: r } = this, o = new xc(t, this.config, this); return Array.isArray(n) ? n.push(t) : this.childrenData = [t], r.push(o), o; } calcText(t, n) { const r = t ? this.pathLabels.join(n) : this.label; return this.text = r, r; } broadcast(t, ...n) { const r = `onParent${D4(t)}`; this.children.forEach((o) => { o && (o.broadcast(t, ...n), o[r] && o[r](...n)); }); } emit(t, ...n) { const { parent: r } = this, o = `onChild${D4(t)}`; r && (r[o] && r[o](...n), r.emit(t, ...n)); } onParentCheck(t) { this.isDisabled || this.setCheckState(t); } onChildCheck() { const { children: t } = this, n = t.filter((o) => !o.isDisabled), r = n.length ? n.every((o) => o.checked) : !1; this.setCheckState(r); } setCheckState(t) { const n = this.children.length, r = this.children.reduce((o, a) => { const i = a.checked ? 1 : a.indeterminate ? 0.5 : 0; return o + i; }, 0); this.checked = this.loaded && this.children.filter((o) => !o.isDisabled).every((o) => o.loaded && o.checked) && t, this.indeterminate = this.loaded && r !== n && r > 0; } doCheck(t) { if (this.checked === t) return; const { checkStrictly: n, multiple: r } = this.config; n || !r ? this.checked = t : (this.broadcast("check", t), this.setCheckState(t), this.emit("check")); } } const qy = (e, t) => e.reduce((n, r) => (r.isLeaf ? n.push(r) : (!t && n.push(r), n = n.concat(qy(r.children, t))), n), []); class yS { constructor(t, n) { this.config = n; const r = (t || []).map((o) => new xc(o, this.config)); this.nodes = r, this.allNodes = qy(r, !1), this.leafNodes = qy(r, !0); } getNodes() { return this.nodes; } getFlattedNodes(t) { return t ? this.leafNodes : this.allNodes; } appendNode(t, n) { const r = n ? n.appendChild(t) : new xc(t, this.config); n || this.nodes.push(r), this.allNodes.push(r), r.isLeaf && this.leafNodes.push(r); } appendNodes(t, n) { t.forEach((r) => this.appendNode(r, n)); } getNodeByValue(t, n = !1) { return !t && t !== 0 ? null : this.getFlattedNodes(n).find((r) => Ua(r.value, t) || Ua(r.pathValues, t)) || null; } getSameNode(t) { return t && this.getFlattedNodes(!1).find(({ value: n, level: r }) => Ua(t.value, n) && t.level === r) || null; } } const EA = St({ modelValue: { type: ct([Number, String, Array]) }, options: { type: ct(Array), default: () => [] }, props: { type: ct(Object), default: () => ({}) } }), Pxe = { expandTrigger: "click", multiple: !1, checkStrictly: !1, emitPath: !0, lazy: !1, lazyLoad: Fi, value: "value", label: "label", children: "children", leaf: "leaf", disabled: "disabled", hoverThreshold: 500 }, Lxe = (e) => $(() => ({ ...Pxe, ...e.props })), bS = (e) => { if (!e) return 0; const t = e.id.split("-"); return Number(t[t.length - 2]); }, Rxe = (e) => { if (!e) return; const t = e.querySelector("input"); t ? t.click() : zF(e) && e.click(); }, Dxe = (e, t) => { const n = t.slice(0), r = n.map((a) => a.uid), o = e.reduce((a, i) => { const s = r.indexOf(i.uid); return s > -1 && (a.push(i), n.splice(s, 1), r.splice(s, 1)), a; }, []); return o.push(...n), o; }, Mxe = K({ name: "ElCascaderPanel", components: { ElCascaderMenu: Fxe }, props: { ...EA, border: { type: Boolean, default: !0 }, renderLabel: Function }, emits: [Mn, Wl, "close", "expand-change"], setup(e, { emit: t, slots: n }) { let r = !1; const o = mt("cascader"), a = Lxe(e); let i = null; const s = z(!0), l = z([]), u = z(null), c = z([]), d = z(null), f = z([]), h = $(() => a.value.expandTrigger === "hover"), p = $(() => e.renderLabel || n.default), v = () => { const { options: P } = e, M = a.value; r = !1, i = new yS(P, M), c.value = [i.getNodes()], M.lazy && Dy(e.options) ? (s.value = !1, m(void 0, (N) => { N && (i = new yS(N, M), c.value = [i.getNodes()]), s.value = !0, _(!1, !0); })) : _(!1, !0); }, m = (P, M) => { const N = a.value; P = P || new xc({}, N, void 0, !0), P.loading = !0; const j = (A) => { const U = P, q = U.root ? null : U; A && (i == null || i.appendNodes(A, q)), U.loading = !1, U.loaded = !0, U.childrenData = U.childrenData || [], M && M(A); }; N.lazyLoad(P, j); }, g = (P, M) => { var N; const { level: j } = P, A = c.value.slice(0, j); let U; P.isLeaf ? U = P.pathNodes[j - 2] : (U = P, A.push(P.children)), ((N = d.value) == null ? void 0 : N.uid) !== (U == null ? void 0 : U.uid) && (d.value = P, c.value = A, !M && t("expand-change", (P == null ? void 0 : P.pathValues) || [])); }, b = (P, M, N = !0) => { const { checkStrictly: j, multiple: A } = a.value, U = f.value[0]; r = !0, !A && (U == null || U.doCheck(!1)), P.doCheck(M), S(), N && !A && !j && t("close"), !N && !A && !j && C(P); }, C = (P) => { P && (P = P.parent, C(P), P && g(P)); }, x = (P) => i == null ? void 0 : i.getFlattedNodes(P), w = (P) => { var M; return (M = x(P)) == null ? void 0 : M.filter((N) => N.checked !== !1); }, k = () => { f.value.forEach((P) => P.doCheck(!1)), S(), c.value = c.value.slice(0, 1), d.value = null, t("expand-change", []); }, S = () => { var P; const { checkStrictly: M, multiple: N } = a.value, j = f.value, A = w(!M), U = Dxe(j, A), q = U.map((Y) => Y.valueByOption); f.value = U, u.value = N ? q : (P = q[0]) != null ? P : null; }, _ = (P = !1, M = !1) => { const { modelValue: N } = e, { lazy: j, multiple: A, checkStrictly: U } = a.value, q = !U; if (!(!s.value || r || !M && Ua(N, u.value))) if (j && !P) { const Y = z4(D1e(V4(N))).map((ie) => i == null ? void 0 : i.getNodeByValue(ie)).filter((ie) => !!ie && !ie.loaded && !ie.loading); Y.length ? Y.forEach((ie) => { m(ie, () => _(!1, M)); }) : _(!0, M); } else { const Y = A ? V4(N) : [N], ie = z4(Y.map((re) => i == null ? void 0 : i.getNodeByValue(re, q))); O(ie, M), u.value = lI(N); } }, O = (P, M = !0) => { const { checkStrictly: N } = a.value, j = f.value, A = P.filter((Y) => !!Y && (N || Y.isLeaf)), U = i == null ? void 0 : i.getSameNode(d.value), q = M && U || A[0]; q ? q.pathNodes.forEach((Y) => g(Y, !0)) : d.value = null, j.forEach((Y) => Y.doCheck(!1)), Kt(A).forEach((Y) => Y.doCheck(!0)), f.value = A, Ue(F); }, F = () => { En && l.value.forEach((P) => { const M = P == null ? void 0 : P.$el; if (M) { const N = M.querySelector(`.${o.namespace.value}-scrollbar__wrap`), j = M.querySelector(`.${o.b("node")}.${o.is("active")}`) || M.querySelector(`.${o.b("node")}.in-active-path`); bI(N, j); } }); }, I = (P) => { const M = P.target, { code: N } = P; switch (N) { case Wt.up: case Wt.down: { P.preventDefault(); const j = N === Wt.up ? -1 : 1; iv(VF(M, j, `.${o.b("node")}[tabindex="-1"]`)); break; } case Wt.left: { P.preventDefault(); const j = l.value[bS(M) - 1], A = j == null ? void 0 : j.$el.querySelector(`.${o.b("node")}[aria-expanded="true"]`); iv(A); break; } case Wt.right: { P.preventDefault(); const j = l.value[bS(M) + 1], A = j == null ? void 0 : j.$el.querySelector(`.${o.b("node")}[tabindex="-1"]`); iv(A); break; } case Wt.enter: Rxe(M); break; } }; return tt(Nw, Kt({ config: a, expandingNode: d, checkedNodes: f, isHoverMenu: h, initialLoaded: s, renderLabelFn: p, lazyLoad: m, expandNode: g, handleCheckChange: b })), ce([a, () => e.options], v, { deep: !0, immediate: !0 }), ce(() => e.modelValue, () => { r = !1, _(); }, { deep: !0 }), ce(() => u.value, (P) => { Ua(P, e.modelValue) || (t(Mn, P), t(Wl, P)); }), WL(() => l.value = []), at(() => !Dy(e.modelValue) && _()), { ns: o, menuList: l, menus: c, checkedNodes: f, handleKeyDown: I, handleCheckChange: b, getFlattedNodes: x, getCheckedNodes: w, clearCheckedNodes: k, calculateCheckedValue: S, scrollToExpandingNode: F }; } }); function Nxe(e, t, n, r, o, a) { const i = Xe("el-cascader-menu"); return E(), L("div", { class: V([e.ns.b("panel"), e.ns.is("bordered", e.border)]), onKeydown: e.handleKeyDown }, [ (E(!0), L(De, null, xt(e.menus, (s, l) => (E(), Q(i, { key: l, ref_for: !0, ref: (u) => e.menuList[l] = u, index: l, nodes: [...s] }, { empty: R(() => [ oe(e.$slots, "empty") ]), _: 2 }, 1032, ["index", "nodes"]))), 128)) ], 42, ["onKeydown"]); } var Bxe = /* @__PURE__ */ gt(Mxe, [["render", Nxe], ["__file", "index.vue"]]); const zxe = zn(Bxe), Lp = St({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: Rg }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), Vxe = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, jxe = K({ name: "ElTag" }), Hxe = /* @__PURE__ */ K({ ...jxe, props: Lp, emits: Vxe, setup(e, { emit: t }) { const n = e, r = Mi(), o = mt("tag"), a = $(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ o.b(), o.is("closable", f), o.m(u || "primary"), o.m(r.value), o.m(d), o.is("hit", c), o.is("round", h) ]; }), i = (u) => { t("close", u); }, s = (u) => { t("click", u); }, l = (u) => { u.component.subTree.component.bum = null; }; return (u, c) => u.disableTransitions ? (E(), L("span", { key: 0, class: V(y(a)), style: Ze({ backgroundColor: u.color }), onClick: s }, [ B("span", { class: V(y(o).e("content")) }, [ oe(u.$slots, "default") ], 2), u.closable ? (E(), Q(y(ln), { key: 0, class: V(y(o).e("close")), onClick: Je(i, ["stop"]) }, { default: R(() => [ W(y(Ny)) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0) ], 6)) : (E(), Q(pr, { key: 1, name: `${y(o).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: R(() => [ B("span", { class: V(y(a)), style: Ze({ backgroundColor: u.color }), onClick: s }, [ B("span", { class: V(y(o).e("content")) }, [ oe(u.$slots, "default") ], 2), u.closable ? (E(), Q(y(ln), { key: 0, class: V(y(o).e("close")), onClick: Je(i, ["stop"]) }, { default: R(() => [ W(y(Ny)) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var Uxe = /* @__PURE__ */ gt(Hxe, [["__file", "tag.vue"]]); const kc = zn(Uxe), qxe = St({ ...EA, size: Ki, placeholder: String, disabled: Boolean, clearable: Boolean, filterable: Boolean, filterMethod: { type: ct(Function), default: (e, t) => e.text.includes(t) }, separator: { type: String, default: " / " }, showAllLevels: { type: Boolean, default: !0 }, collapseTags: Boolean, maxCollapseTags: { type: Number, default: 1 }, collapseTagsTooltip: { type: Boolean, default: !1 }, debounce: { type: Number, default: 300 }, beforeFilter: { type: ct(Function), default: () => !0 }, placement: { type: ct(String), values: Sf, default: "bottom-start" }, fallbackPlacements: { type: ct(Array), default: ["bottom-start", "bottom", "top-start", "top", "right", "left"] }, popperClass: { type: String, default: "" }, teleported: no.teleported, tagType: { ...Lp.type, default: "info" }, tagEffect: { ...Lp.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, ...YI }), Wxe = { [Mn]: (e) => !0, [Wl]: (e) => !0, focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, visibleChange: (e) => ei(e), expandChange: (e) => !!e, removeTag: (e) => !!e }, Gxe = "ElCascader", Kxe = K({ name: Gxe }), Yxe = /* @__PURE__ */ K({ ...Kxe, props: qxe, emits: Wxe, setup(e, { expose: t, emit: n }) { const r = e, o = { modifiers: [ { name: "arrowPosition", enabled: !0, phase: "main", fn: ({ state: ue }) => { const { modifiersData: Te, placement: ke } = ue; ["right", "left", "bottom", "top"].includes(ke) || (Te.arrow.x = 35); }, requires: ["arrow"] } ] }, a = Hp(); let i = 0, s = 0; const l = mt("cascader"), u = mt("input"), { t: c } = Io(), { form: d, formItem: f } = Ys(), { valueOnClear: h } = XI(r), { isComposing: p, handleComposition: v } = Iw({ afterComposition(ue) { var Te; const ke = (Te = ue.target) == null ? void 0 : Te.value; lt(ke); } }), m = z(null), g = z(null), b = z(null), C = z(null), x = z(null), w = z(!1), k = z(!1), S = z(!1), _ = z(!1), O = z(""), F = z(""), I = z([]), P = z([]), M = z([]), N = $(() => a.style), j = $(() => r.disabled || (d == null ? void 0 : d.disabled)), A = $(() => r.placeholder || c("el.cascader.placeholder")), U = $(() => F.value || I.value.length > 0 || p.value ? "" : A.value), q = Mi(), Y = $(() => ["small"].includes(q.value) ? "small" : "default"), ie = $(() => !!r.props.multiple), re = $(() => !r.filterable || ie.value), le = $(() => ie.value ? F.value : O.value), he = $(() => { var ue; return ((ue = C.value) == null ? void 0 : ue.checkedNodes) || []; }), we = $(() => !r.clearable || j.value || S.value || !k.value ? !1 : !!he.value.length), be = $(() => { const { showAllLevels: ue, separator: Te } = r, ke = he.value; return ke.length ? ie.value ? "" : ke[0].calcText(ue, Te) : ""; }), de = $(() => (f == null ? void 0 : f.validateState) || ""), ae = $({ get() { return lI(r.modelValue); }, set(ue) { const Te = ue ?? h.value; n(Mn, Te), n(Wl, Te), r.validateEvent && (f == null || f.validate("change").catch((ke) => Wn(ke))); } }), ee = $(() => [ l.b(), l.m(q.value), l.is("disabled", j.value), a.class ]), se = $(() => [ u.e("icon"), "icon-arrow-down", l.is("reverse", w.value) ]), pe = $(() => l.is("focus", w.value || _.value)), Se = $(() => { var ue, Te; return (Te = (ue = m.value) == null ? void 0 : ue.popperRef) == null ? void 0 : Te.contentRef; }), Le = (ue) => { var Te, ke, Be; j.value || (ue = ue ?? !w.value, ue !== w.value && (w.value = ue, (ke = (Te = g.value) == null ? void 0 : Te.input) == null || ke.setAttribute("aria-expanded", `${ue}`), ue ? (je(), Ue((Be = C.value) == null ? void 0 : Be.scrollToExpandingNode)) : r.filterable && G(), n("visibleChange", ue))); }, je = () => { Ue(() => { var ue; (ue = m.value) == null || ue.updatePopper(); }); }, _e = () => { S.value = !1; }, ze = (ue) => { const { showAllLevels: Te, separator: ke } = r; return { node: ue, key: ue.uid, text: ue.calcText(Te, ke), hitState: !1, closable: !j.value && !ue.isDisabled, isCollapseTag: !1 }; }, Ie = (ue) => { var Te; const ke = ue.node; ke.doCheck(!1), (Te = C.value) == null || Te.calculateCheckedValue(), n("removeTag", ke.valueByOption); }, He = () => { if (!ie.value) return; const ue = he.value, Te = [], ke = []; if (ue.forEach((Be) => ke.push(ze(Be))), P.value = ke, ue.length) { ue.slice(0, r.maxCollapseTags).forEach((Ft) => Te.push(ze(Ft))); const Be = ue.slice(r.maxCollapseTags), Dt = Be.length; Dt && (r.collapseTags ? Te.push({ key: -1, text: `+ ${Dt}`, closable: !1, isCollapseTag: !0 }) : Be.forEach((Ft) => Te.push(ze(Ft)))); } I.value = Te; }, qe = () => { var ue, Te; const { filterMethod: ke, showAllLevels: Be, separator: Dt } = r, Ft = (Te = (ue = C.value) == null ? void 0 : ue.getFlattedNodes(!r.props.checkStrictly)) == null ? void 0 : Te.filter((zt) => zt.isDisabled ? !1 : (zt.calcText(Be, Dt), ke(zt, le.value))); ie.value && (I.value.forEach((zt) => { zt.hitState = !1; }), P.value.forEach((zt) => { zt.hitState = !1; })), S.value = !0, M.value = Ft, je(); }, et = () => { var ue; let Te; S.value && x.value ? Te = x.value.$el.querySelector(`.${l.e("suggestion-item")}`) : Te = (ue = C.value) == null ? void 0 : ue.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`), Te && (Te.focus(), !S.value && Te.click()); }, Ve = () => { var ue, Te; const ke = (ue = g.value) == null ? void 0 : ue.input, Be = b.value, Dt = (Te = x.value) == null ? void 0 : Te.$el; if (!(!En || !ke)) { if (Dt) { const Ft = Dt.querySelector(`.${l.e("suggestion-list")}`); Ft.style.minWidth = `${ke.offsetWidth}px`; } if (Be) { const { offsetHeight: Ft } = Be, zt = I.value.length > 0 ? `${Math.max(Ft + 6, i)}px` : `${i}px`; ke.style.height = zt, je(); } } }, nt = (ue) => { var Te; return (Te = C.value) == null ? void 0 : Te.getCheckedNodes(ue); }, ot = (ue) => { je(), n("expandChange", ue); }, pt = (ue) => { if (!p.value) switch (ue.code) { case Wt.enter: Le(); break; case Wt.down: Le(!0), Ue(et), ue.preventDefault(); break; case Wt.esc: w.value === !0 && (ue.preventDefault(), ue.stopPropagation(), Le(!1)); break; case Wt.tab: Le(!1); break; } }, T = () => { var ue; (ue = C.value) == null || ue.clearCheckedNodes(), !w.value && r.filterable && G(), Le(!1), n("clear"); }, G = () => { const { value: ue } = be; O.value = ue, F.value = ue; }, fe = (ue) => { var Te, ke; const { checked: Be } = ue; ie.value ? (Te = C.value) == null || Te.handleCheckChange(ue, !Be, !1) : (!Be && ((ke = C.value) == null || ke.handleCheckChange(ue, !0, !1)), Le(!1)); }, ge = (ue) => { const Te = ue.target, { code: ke } = ue; switch (ke) { case Wt.up: case Wt.down: { const Be = ke === Wt.up ? -1 : 1; iv(VF(Te, Be, `.${l.e("suggestion-item")}[tabindex="-1"]`)); break; } case Wt.enter: Te.click(); break; } }, ve = () => { const ue = I.value, Te = ue[ue.length - 1]; s = F.value ? 0 : s + 1, !(!Te || !s || r.collapseTags && ue.length > 1) && (Te.hitState ? Ie(Te) : Te.hitState = !0); }, Fe = (ue) => { const Te = ue.target, ke = l.e("search-input"); Te.className === ke && (_.value = !0), n("focus", ue); }, Ce = (ue) => { _.value = !1, n("blur", ue); }, Re = fI(() => { const { value: ue } = le; if (!ue) return; const Te = r.beforeFilter(ue); Lhe(Te) ? Te.then(qe).catch(() => { }) : Te !== !1 ? qe() : _e(); }, r.debounce), lt = (ue, Te) => { !w.value && Le(!0), !(Te != null && Te.isComposing) && (ue ? Re() : _e()); }, ut = (ue) => Number.parseFloat(bhe(u.cssVarName("input-height"), ue).value) - 2; return ce(S, je), ce([he, j, () => r.collapseTags], He), ce(I, () => { Ue(() => Ve()); }), ce(q, async () => { await Ue(); const ue = g.value.input; i = ut(ue) || i, Ve(); }), ce(be, G, { immediate: !0 }), at(() => { const ue = g.value.input, Te = ut(ue); i = ue.offsetHeight || Te, Ma(ue, Ve); }), t({ getCheckedNodes: nt, cascaderPanelRef: C, togglePopperVisible: Le, contentRef: Se, presentText: be }), (ue, Te) => (E(), Q(y(Pp), { ref_key: "tooltipRef", ref: m, visible: w.value, teleported: ue.teleported, "popper-class": [y(l).e("dropdown"), ue.popperClass], "popper-options": o, "fallback-placements": ue.fallbackPlacements, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, placement: ue.placement, transition: `${y(l).namespace.value}-zoom-in-top`, effect: "light", pure: "", persistent: ue.persistent, onHide: _e }, { default: R(() => [ Ne((E(), L("div", { class: V(y(ee)), style: Ze(y(N)), onClick: () => Le(y(re) ? void 0 : !0), onKeydown: pt, onMouseenter: (ke) => k.value = !0, onMouseleave: (ke) => k.value = !1 }, [ W(y(Ng), { ref_key: "input", ref: g, modelValue: O.value, "onUpdate:modelValue": (ke) => O.value = ke, placeholder: y(U), readonly: y(re), disabled: y(j), "validate-event": !1, size: y(q), class: V(y(pe)), tabindex: y(ie) && ue.filterable && !y(j) ? -1 : void 0, onCompositionstart: y(v), onCompositionupdate: y(v), onCompositionend: y(v), onFocus: Fe, onBlur: Ce, onInput: lt }, { suffix: R(() => [ y(we) ? (E(), Q(y(ln), { key: "clear", class: V([y(u).e("icon"), "icon-circle-close"]), onClick: Je(T, ["stop"]) }, { default: R(() => [ W(y(Ag)) ]), _: 1 }, 8, ["class", "onClick"])) : (E(), Q(y(ln), { key: "arrow-down", class: V(y(se)), onClick: Je((ke) => Le(), ["stop"]) }, { default: R(() => [ W(y(kf)) ]), _: 1 }, 8, ["class", "onClick"])) ]), _: 1 }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), y(ie) ? (E(), L("div", { key: 0, ref_key: "tagWrapper", ref: b, class: V([ y(l).e("tags"), y(l).is("validate", !!y(de)) ]) }, [ (E(!0), L(De, null, xt(I.value, (ke) => (E(), Q(y(kc), { key: ke.key, type: ue.tagType, size: y(Y), effect: ue.tagEffect, hit: ke.hitState, closable: ke.closable, "disable-transitions": "", onClose: (Be) => Ie(ke) }, { default: R(() => [ ke.isCollapseTag === !1 ? (E(), L("span", { key: 0 }, me(ke.text), 1)) : (E(), Q(y(Pp), { key: 1, disabled: w.value || !ue.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], placement: "bottom", effect: "light" }, { default: R(() => [ B("span", null, me(ke.text), 1) ]), content: R(() => [ B("div", { class: V(y(l).e("collapse-tags")) }, [ (E(!0), L(De, null, xt(P.value.slice(ue.maxCollapseTags), (Be, Dt) => (E(), L("div", { key: Dt, class: V(y(l).e("collapse-tag")) }, [ (E(), Q(y(kc), { key: Be.key, class: "in-tooltip", type: ue.tagType, size: y(Y), effect: ue.tagEffect, hit: Be.hitState, closable: Be.closable, "disable-transitions": "", onClose: (Ft) => Ie(Be) }, { default: R(() => [ B("span", null, me(Be.text), 1) ]), _: 2 }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"])) ], 2))), 128)) ], 2) ]), _: 2 }, 1032, ["disabled"])) ]), _: 2 }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))), 128)), ue.filterable && !y(j) ? Ne((E(), L("input", { key: 0, "onUpdate:modelValue": (ke) => F.value = ke, type: "text", class: V(y(l).e("search-input")), placeholder: y(be) ? "" : y(A), onInput: (ke) => lt(F.value, ke), onClick: Je((ke) => Le(!0), ["stop"]), onKeydown: yn(ve, ["delete"]), onCompositionstart: y(v), onCompositionupdate: y(v), onCompositionend: y(v), onFocus: Fe, onBlur: Ce }, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [ [C0, F.value] ]) : Z("v-if", !0) ], 2)) : Z("v-if", !0) ], 46, ["onClick", "onMouseenter", "onMouseleave"])), [ [y(pA), () => Le(!1), y(Se)] ]) ]), content: R(() => [ Ne(W(y(zxe), { ref_key: "cascaderPanelRef", ref: C, modelValue: y(ae), "onUpdate:modelValue": (ke) => Gn(ae) ? ae.value = ke : null, options: ue.options, props: r.props, border: !1, "render-label": ue.$slots.default, onExpandChange: ot, onClose: (ke) => ue.$nextTick(() => Le(!1)) }, { empty: R(() => [ oe(ue.$slots, "empty") ]), _: 3 }, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [ [ft, !S.value] ]), ue.filterable ? Ne((E(), Q(y(Bg), { key: 0, ref_key: "suggestionPanel", ref: x, tag: "ul", class: V(y(l).e("suggestion-panel")), "view-class": y(l).e("suggestion-list"), onKeydown: ge }, { default: R(() => [ M.value.length ? (E(!0), L(De, { key: 0 }, xt(M.value, (ke) => (E(), L("li", { key: ke.uid, class: V([ y(l).e("suggestion-item"), y(l).is("checked", ke.checked) ]), tabindex: -1, onClick: (Be) => fe(ke) }, [ B("span", null, me(ke.text), 1), ke.checked ? (E(), Q(y(ln), { key: 0 }, { default: R(() => [ W(y(wI)) ]), _: 1 })) : Z("v-if", !0) ], 10, ["onClick"]))), 128)) : oe(ue.$slots, "empty", { key: 1 }, () => [ B("li", { class: V(y(l).e("empty-text")) }, me(y(c)("el.cascader.noMatch")), 3) ]) ]), _: 3 }, 8, ["class", "view-class"])), [ [ft, S.value] ]) : Z("v-if", !0) ]), _: 3 }, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"])); } }); var Xxe = /* @__PURE__ */ gt(Yxe, [["__file", "cascader.vue"]]); const $A = zn(Xxe), _A = Symbol("rowContextKey"), Zxe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], Jxe = ["top", "middle", "bottom"], Qxe = St({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: Zxe, default: "start" }, align: { type: String, values: Jxe } }), eke = K({ name: "ElRow" }), tke = /* @__PURE__ */ K({ ...eke, props: Qxe, setup(e) { const t = e, n = mt("row"), r = $(() => t.gutter); tt(_A, { gutter: r }); const o = $(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), a = $(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => (E(), Q(vt(i.tag), { class: V(y(a)), style: Ze(y(o)) }, { default: R(() => [ oe(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var nke = /* @__PURE__ */ gt(tke, [["__file", "row.vue"]]); const TA = zn(nke), rke = St({ 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: ct([Number, Object]), default: () => ys({}) }, sm: { type: ct([Number, Object]), default: () => ys({}) }, md: { type: ct([Number, Object]), default: () => ys({}) }, lg: { type: ct([Number, Object]), default: () => ys({}) }, xl: { type: ct([Number, Object]), default: () => ys({}) } }), oke = K({ name: "ElCol" }), ake = /* @__PURE__ */ K({ ...oke, props: rke, setup(e) { const t = e, { gutter: n } = xe(_A, { gutter: $(() => 0) }), r = mt("col"), o = $(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), a = $(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; sn(l) && (s === "span" ? i.push(r.b(`${t[s]}`)) : l > 0 && i.push(r.b(`${s}-${t[s]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((s) => { sn(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : dr(t[s]) && Object.entries(t[s]).forEach(([l, u]) => { i.push(l !== "span" ? r.b(`${s}-${l}-${u}`) : r.b(`${s}-${u}`)); }); }), n.value && i.push(r.is("guttered")), [r.b(), i]; }); return (i, s) => (E(), Q(vt(i.tag), { class: V(y(a)), style: Ze(y(o)) }, { default: R(() => [ oe(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var ike = /* @__PURE__ */ gt(ake, [["__file", "col.vue"]]); const OA = zn(ike), ske = K({ name: "ElContainer" }), lke = /* @__PURE__ */ K({ ...ske, props: { direction: { type: String } }, setup(e) { const t = e, n = Xr(), r = mt("container"), o = $(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((a) => { const i = a.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (a, i) => (E(), L("section", { class: V([y(r).b(), y(r).is("vertical", y(o))]) }, [ oe(a.$slots, "default") ], 2)); } }); var uke = /* @__PURE__ */ gt(lke, [["__file", "container.vue"]]); const cke = K({ name: "ElAside" }), dke = /* @__PURE__ */ K({ ...cke, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = mt("aside"), r = $(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (o, a) => (E(), L("aside", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var FA = /* @__PURE__ */ gt(dke, [["__file", "aside.vue"]]); const pke = K({ name: "ElFooter" }), fke = /* @__PURE__ */ K({ ...pke, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = mt("footer"), r = $(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (E(), L("footer", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var IA = /* @__PURE__ */ gt(fke, [["__file", "footer.vue"]]); const hke = K({ name: "ElHeader" }), vke = /* @__PURE__ */ K({ ...hke, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = mt("header"), r = $(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (o, a) => (E(), L("header", { class: V(y(n).b()), style: Ze(y(r)) }, [ oe(o.$slots, "default") ], 6)); } }); var AA = /* @__PURE__ */ gt(vke, [["__file", "header.vue"]]); const gke = K({ name: "ElMain" }), mke = /* @__PURE__ */ K({ ...gke, setup(e) { const t = mt("main"); return (n, r) => (E(), L("main", { class: V(y(t).b()) }, [ oe(n.$slots, "default") ], 2)); } }); var PA = /* @__PURE__ */ gt(mke, [["__file", "main.vue"]]); const yke = zn(uke, { Aside: FA, Footer: IA, Header: AA, Main: PA }); Fo(FA); Fo(IA); Fo(AA); Fo(PA); const bke = St({ mask: { type: Boolean, default: !0 }, customMaskEvent: Boolean, overlayClass: { type: ct([ String, Array, Object ]) }, zIndex: { type: ct([String, Number]) } }), wke = { click: (e) => e instanceof MouseEvent }, xke = "overlay"; var kke = K({ name: "ElOverlay", props: bke, emits: wke, setup(e, { slots: t, emit: n }) { const r = mt(xke), o = (l) => { n("click", l); }, { onClick: a, onMousedown: i, onMouseup: s } = Lbe(e.customMaskEvent ? void 0 : o); return () => e.mask ? W("div", { class: [r.b(), e.overlayClass], style: { zIndex: e.zIndex }, onClick: a, onMousedown: i, onMouseup: s }, [oe(t, "default")], lv.STYLE | lv.CLASS | lv.PROPS, ["onClick", "onMouseup", "onMousedown"]) : jt("div", { class: e.overlayClass, style: { zIndex: e.zIndex, position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px" } }, [oe(t, "default")]); } }); const Cke = kke, Ske = St({ center: Boolean, alignCenter: Boolean, closeIcon: { type: Zo }, draggable: Boolean, overflow: Boolean, fullscreen: Boolean, showClose: { type: Boolean, default: !0 }, title: { type: String, default: "" }, ariaLevel: { type: String, default: "2" } }), Eke = St({ ...Ske, appendToBody: Boolean, appendTo: { type: ct([String, Object]), default: "body" }, beforeClose: { type: ct(Function) }, destroyOnClose: Boolean, closeOnClickModal: { type: Boolean, default: !0 }, closeOnPressEscape: { type: Boolean, default: !0 }, lockScroll: { type: Boolean, default: !0 }, modal: { type: Boolean, default: !0 }, openDelay: { type: Number, default: 0 }, closeDelay: { type: Number, default: 0 }, top: { type: String }, modelValue: Boolean, modalClass: String, width: { type: [String, Number] }, zIndex: { type: Number }, trapFocus: Boolean, headerAriaLevel: { type: String, default: "2" } }), $ke = { open: () => !0, opened: () => !0, close: () => !0, closed: () => !0, [Mn]: (e) => ei(e), openAutoFocus: () => !0, closeAutoFocus: () => !0 }, _ke = (e, t) => { var n; const r = rt().emit, { nextZIndex: o } = Fw(); let a = ""; const i = ni(), s = ni(), l = z(!1), u = z(!1), c = z(!1), d = z((n = e.zIndex) != null ? n : o()); let f, h; const p = Mg("namespace", qd), v = $(() => { const N = {}, j = `--${p.value}-dialog`; return e.fullscreen || (e.top && (N[`${j}-margin-top`] = e.top), e.width && (N[`${j}-width`] = ql(e.width))), N; }), m = $(() => e.alignCenter ? { display: "flex" } : {}); function g() { r("opened"); } function b() { r("closed"), r(Mn, !1), e.destroyOnClose && (c.value = !1); } function C() { r("close"); } function x() { h == null || h(), f == null || f(), e.openDelay && e.openDelay > 0 ? { stop: f } = Z3(() => _(), e.openDelay) : _(); } function w() { f == null || f(), h == null || h(), e.closeDelay && e.closeDelay > 0 ? { stop: h } = Z3(() => O(), e.closeDelay) : O(); } function k() { function N(j) { j || (u.value = !0, l.value = !1); } e.beforeClose ? e.beforeClose(N) : w(); } function S() { e.closeOnClickModal && k(); } function _() { En && (l.value = !0); } function O() { l.value = !1; } function F() { r("openAutoFocus"); } function I() { r("closeAutoFocus"); } function P(N) { var j; ((j = N.detail) == null ? void 0 : j.focusReason) === "pointer" && N.preventDefault(); } e.lockScroll && $ye(l); function M() { e.closeOnPressEscape && k(); } return ce(() => e.modelValue, (N) => { N ? (u.value = !1, x(), c.value = !0, d.value = hI(e.zIndex) ? o() : d.value++, Ue(() => { r("open"), t.value && (t.value.scrollTop = 0); })) : l.value && w(); }), ce(() => e.fullscreen, (N) => { t.value && (N ? (a = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = a); }), at(() => { e.modelValue && (l.value = !0, c.value = !0, x()); }), { afterEnter: g, afterLeave: b, beforeLeave: C, handleClose: k, onModalClick: S, close: w, doClose: O, onOpenAutoFocus: F, onCloseAutoFocus: I, onCloseRequested: M, onFocusoutPrevented: P, titleId: i, bodyId: s, closed: u, style: v, overlayDialogStyle: m, rendered: c, visible: l, zIndex: d }; }, Tke = St({ ...Eke, direction: { type: String, default: "rtl", values: ["ltr", "rtl", "ttb", "btt"] }, size: { type: [String, Number], default: "30%" }, withHeader: { type: Boolean, default: !0 }, modalFade: { type: Boolean, default: !0 }, headerAriaLevel: { type: String, default: "2" } }), Oke = $ke, Fke = K({ name: "ElDrawer", inheritAttrs: !1 }), Ike = /* @__PURE__ */ K({ ...Fke, props: Tke, emits: Oke, setup(e, { expose: t }) { const n = e, r = Xr(); $l({ scope: "el-drawer", from: "the title slot", replacement: "the header slot", version: "3.0.0", ref: "https://element-plus.org/en-US/component/drawer.html#slots" }, $(() => !!r.title)); const o = z(), a = z(), i = mt("drawer"), { t: s } = Io(), { afterEnter: l, afterLeave: u, beforeLeave: c, visible: d, rendered: f, titleId: h, bodyId: p, zIndex: v, onModalClick: m, onOpenAutoFocus: g, onCloseAutoFocus: b, onFocusoutPrevented: C, onCloseRequested: x, handleClose: w } = _ke(n, o), k = $(() => n.direction === "rtl" || n.direction === "ltr"), S = $(() => ql(n.size)); return t({ handleClose: w, afterEnter: l, afterLeave: u }), (_, O) => (E(), Q(y(lA), { to: _.appendTo, disabled: _.appendTo !== "body" ? !1 : !_.appendToBody }, { default: R(() => [ W(pr, { name: y(i).b("fade"), onAfterEnter: y(l), onAfterLeave: y(u), onBeforeLeave: y(c), persisted: "" }, { default: R(() => [ Ne(W(y(Cke), { mask: _.modal, "overlay-class": _.modalClass, "z-index": y(v), onClick: y(m) }, { default: R(() => [ W(y(iA), { loop: "", trapped: y(d), "focus-trap-el": o.value, "focus-start-el": a.value, onFocusAfterTrapped: y(g), onFocusAfterReleased: y(b), onFocusoutPrevented: y(C), onReleaseRequested: y(x) }, { default: R(() => [ B("div", Lt({ ref_key: "drawerRef", ref: o, "aria-modal": "true", "aria-label": _.title || void 0, "aria-labelledby": _.title ? void 0 : y(h), "aria-describedby": y(p) }, _.$attrs, { class: [y(i).b(), _.direction, y(d) && "open"], style: y(k) ? "width: " + y(S) : "height: " + y(S), role: "dialog", onClick: Je(() => { }, ["stop"]) }), [ B("span", { ref_key: "focusStartRef", ref: a, class: V(y(i).e("sr-focus")), tabindex: "-1" }, null, 2), _.withHeader ? (E(), L("header", { key: 0, class: V(y(i).e("header")) }, [ _.$slots.title ? oe(_.$slots, "title", { key: 1 }, () => [ Z(" DEPRECATED SLOT ") ]) : oe(_.$slots, "header", { key: 0, close: y(w), titleId: y(h), titleClass: y(i).e("title") }, () => [ _.$slots.title ? Z("v-if", !0) : (E(), L("span", { key: 0, id: y(h), role: "heading", "aria-level": _.headerAriaLevel, class: V(y(i).e("title")) }, me(_.title), 11, ["id", "aria-level"])) ]), _.showClose ? (E(), L("button", { key: 2, "aria-label": y(s)("el.drawer.close"), class: V(y(i).e("close-btn")), type: "button", onClick: y(w) }, [ W(y(ln), { class: V(y(i).e("close")) }, { default: R(() => [ W(y(Ny)) ]), _: 1 }, 8, ["class"]) ], 10, ["aria-label", "onClick"])) : Z("v-if", !0) ], 2)) : Z("v-if", !0), y(f) ? (E(), L("div", { key: 1, id: y(p), class: V(y(i).e("body")) }, [ oe(_.$slots, "default") ], 10, ["id"])) : Z("v-if", !0), _.$slots.footer ? (E(), L("div", { key: 2, class: V(y(i).e("footer")) }, [ oe(_.$slots, "footer") ], 2)) : Z("v-if", !0) ], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"]) ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"]) ]), _: 3 }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [ [ft, y(d)] ]) ]), _: 3 }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"]) ]), _: 3 }, 8, ["to", "disabled"])); } }); var Ake = /* @__PURE__ */ gt(Ike, [["__file", "drawer.vue"]]); const Bw = zn(Ake), Pke = /* @__PURE__ */ K({ inheritAttrs: !1 }); function Lke(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var Rke = /* @__PURE__ */ gt(Pke, [["render", Lke], ["__file", "collection.vue"]]); const Dke = /* @__PURE__ */ K({ name: "ElCollectionItem", inheritAttrs: !1 }); function Mke(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var Nke = /* @__PURE__ */ gt(Dke, [["render", Mke], ["__file", "collection-item.vue"]]); const LA = "data-el-collection-item", RA = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...Rke, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); tt(r, { itemMap: l, getItems: () => { const u = y(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${LA}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...Nke, name: n, setup(s, { attrs: l }) { const u = z(null), c = xe(r, void 0); tt(o, { collectionItemRef: u }), at(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, Bke = St({ style: { type: ct([String, Array, Object]) }, currentTabId: { type: ct(String) }, defaultCurrentTabId: String, loop: Boolean, dir: { type: String, values: ["ltr", "rtl"], default: "ltr" }, orientation: { type: ct(String) }, onBlur: Function, onFocus: Function, onMousedown: Function }), { ElCollection: zke, ElCollectionItem: Vke, COLLECTION_INJECTION_KEY: zw, COLLECTION_ITEM_INJECTION_KEY: jke } = RA("RovingFocusGroup"), Vw = Symbol("elRovingFocusGroup"), DA = Symbol("elRovingFocusGroupItem"), Hke = { ArrowLeft: "prev", ArrowUp: "prev", ArrowRight: "next", ArrowDown: "next", PageUp: "first", Home: "first", PageDown: "last", End: "last" }, Uke = (e, t) => e, qke = (e, t, n) => { const r = Uke(e.key); return Hke[r]; }, Wke = (e, t) => e.map((n, r) => e[(r + t) % e.length]), jw = (e) => { const { activeElement: t } = document; for (const n of e) if (n === t || (n.focus(), t !== document.activeElement)) return; }, wS = "currentTabIdChange", xS = "rovingFocusGroup.entryFocus", Gke = { bubbles: !1, cancelable: !0 }, Kke = K({ name: "ElRovingFocusGroupImpl", inheritAttrs: !1, props: Bke, emits: [wS, "entryFocus"], setup(e, { emit: t }) { var n; const r = z((n = e.currentTabId || e.defaultCurrentTabId) != null ? n : null), o = z(!1), a = z(!1), i = z(null), { getItems: s } = xe(zw, void 0), l = $(() => [ { outline: "none" }, e.style ]), u = (v) => { t(wS, v); }, c = () => { o.value = !0; }, d = jn((v) => { var m; (m = e.onMousedown) == null || m.call(e, v); }, () => { a.value = !0; }), f = jn((v) => { var m; (m = e.onFocus) == null || m.call(e, v); }, (v) => { const m = !y(a), { target: g, currentTarget: b } = v; if (g === b && m && !y(o)) { const C = new Event(xS, Gke); if (b == null || b.dispatchEvent(C), !C.defaultPrevented) { const x = s().filter((_) => _.focusable), w = x.find((_) => _.active), k = x.find((_) => _.id === y(r)), S = [w, k, ...x].filter(Boolean).map((_) => _.ref); jw(S); } } a.value = !1; }), h = jn((v) => { var m; (m = e.onBlur) == null || m.call(e, v); }, () => { o.value = !1; }), p = (...v) => { t("entryFocus", ...v); }; tt(Vw, { currentTabbedId: Tc(r), loop: $t(e, "loop"), tabIndex: $(() => y(o) ? -1 : 0), rovingFocusGroupRef: i, rovingFocusGroupRootStyle: l, orientation: $t(e, "orientation"), dir: $t(e, "dir"), onItemFocus: u, onItemShiftTab: c, onBlur: h, onFocus: f, onMousedown: d }), ce(() => e.currentTabId, (v) => { r.value = v ?? null; }), No(i, xS, p); } }); function Yke(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var Xke = /* @__PURE__ */ gt(Kke, [["render", Yke], ["__file", "roving-focus-group-impl.vue"]]); const Zke = K({ name: "ElRovingFocusGroup", components: { ElFocusGroupCollection: zke, ElRovingFocusGroupImpl: Xke } }); function Jke(e, t, n, r, o, a) { const i = Xe("el-roving-focus-group-impl"), s = Xe("el-focus-group-collection"); return E(), Q(s, null, { default: R(() => [ W(i, GL(KL(e.$attrs)), { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }, 16) ]), _: 3 }); } var Qke = /* @__PURE__ */ gt(Zke, [["render", Jke], ["__file", "roving-focus-group.vue"]]); const eCe = K({ components: { ElRovingFocusCollectionItem: Vke }, props: { focusable: { type: Boolean, default: !0 }, active: { type: Boolean, default: !1 } }, emits: ["mousedown", "focus", "keydown"], setup(e, { emit: t }) { const { currentTabbedId: n, loop: r, onItemFocus: o, onItemShiftTab: a } = xe(Vw, void 0), { getItems: i } = xe(zw, void 0), s = ni(), l = z(null), u = jn((h) => { t("mousedown", h); }, (h) => { e.focusable ? o(y(s)) : h.preventDefault(); }), c = jn((h) => { t("focus", h); }, () => { o(y(s)); }), d = jn((h) => { t("keydown", h); }, (h) => { const { key: p, shiftKey: v, target: m, currentTarget: g } = h; if (p === Wt.tab && v) { a(); return; } if (m !== g) return; const b = qke(h); if (b) { h.preventDefault(); let C = i().filter((x) => x.focusable).map((x) => x.ref); switch (b) { case "last": { C.reverse(); break; } case "prev": case "next": { b === "prev" && C.reverse(); const x = C.indexOf(g); C = r.value ? Wke(C, x + 1) : C.slice(x + 1); break; } } Ue(() => { jw(C); }); } }), f = $(() => n.value === y(s)); return tt(DA, { rovingFocusGroupItemRef: l, tabIndex: $(() => y(f) ? 0 : -1), handleMousedown: u, handleFocus: c, handleKeydown: d }), { id: s, handleKeydown: d, handleFocus: c, handleMousedown: u }; } }); function tCe(e, t, n, r, o, a) { const i = Xe("el-roving-focus-collection-item"); return E(), Q(i, { id: e.id, focusable: e.focusable, active: e.active }, { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }, 8, ["id", "focusable", "active"]); } var nCe = /* @__PURE__ */ gt(eCe, [["render", tCe], ["__file", "roving-focus-item.vue"]]); const cv = St({ trigger: Ap.trigger, effect: { ...no.effect, default: "light" }, type: { type: ct(String) }, placement: { type: ct(String), default: "bottom" }, popperOptions: { type: ct(Object), default: () => ({}) }, id: String, size: { type: String, default: "" }, splitButton: Boolean, hideOnClick: { type: Boolean, default: !0 }, loop: { type: Boolean, default: !0 }, showTimeout: { type: Number, default: 150 }, hideTimeout: { type: Number, default: 150 }, tabindex: { type: ct([Number, String]), default: 0 }, maxHeight: { type: ct([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: ct(Object) }, teleported: no.teleported }), MA = St({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: Zo } }), rCe = St({ onKeydown: { type: ct(Function) } }), oCe = [ Wt.down, Wt.pageDown, Wt.home ], NA = [Wt.up, Wt.pageUp, Wt.end], aCe = [...oCe, ...NA], { ElCollection: iCe, ElCollectionItem: sCe, COLLECTION_INJECTION_KEY: lCe, COLLECTION_ITEM_INJECTION_KEY: uCe } = RA("Dropdown"), Vg = Symbol("elDropdown"), { ButtonGroup: cCe } = bo, dCe = K({ name: "ElDropdown", components: { ElButton: bo, ElButtonGroup: cCe, ElScrollbar: Bg, ElDropdownCollection: iCe, ElTooltip: Pp, ElRovingFocusGroup: Qke, ElOnlyChild: tA, ElIcon: ln, ArrowDown: kf }, props: cv, emits: ["visible-change", "click", "command"], setup(e, { emit: t }) { const n = rt(), r = mt("dropdown"), { t: o } = Io(), a = z(), i = z(), s = z(null), l = z(null), u = z(null), c = z(null), d = z(!1), f = [Wt.enter, Wt.space, Wt.down], h = $(() => ({ maxHeight: ql(e.maxHeight) })), p = $(() => [r.m(w.value)]), v = $(() => Si(e.trigger)), m = ni().value, g = $(() => e.id || m); ce([a, v], ([j, A], [U]) => { var q, Y, ie; (q = U == null ? void 0 : U.$el) != null && q.removeEventListener && U.$el.removeEventListener("pointerenter", S), (Y = j == null ? void 0 : j.$el) != null && Y.removeEventListener && j.$el.removeEventListener("pointerenter", S), (ie = j == null ? void 0 : j.$el) != null && ie.addEventListener && A.includes("hover") && j.$el.addEventListener("pointerenter", S); }, { immediate: !0 }), Tt(() => { var j, A; (A = (j = a.value) == null ? void 0 : j.$el) != null && A.removeEventListener && a.value.$el.removeEventListener("pointerenter", S); }); function b() { C(); } function C() { var j; (j = s.value) == null || j.onClose(); } function x() { var j; (j = s.value) == null || j.onOpen(); } const w = Mi(); function k(...j) { t("command", ...j); } function S() { var j, A; (A = (j = a.value) == null ? void 0 : j.$el) == null || A.focus(); } function _() { } function O() { const j = y(l); v.value.includes("hover") && (j == null || j.focus()), c.value = null; } function F(j) { c.value = j; } function I(j) { d.value || (j.preventDefault(), j.stopImmediatePropagation()); } function P() { t("visible-change", !0); } function M(j) { (j == null ? void 0 : j.type) === "keydown" && l.value.focus(); } function N() { t("visible-change", !1); } return tt(Vg, { contentRef: l, role: $(() => e.role), triggerId: g, isUsingKeyboard: d, onItemEnter: _, onItemLeave: O }), tt("elDropdown", { instance: n, dropdownSize: w, handleClick: b, commandHandler: k, trigger: $t(e, "trigger"), hideOnClick: $t(e, "hideOnClick") }), { t: o, ns: r, scrollbar: u, wrapStyle: h, dropdownTriggerKls: p, dropdownSize: w, triggerId: g, triggerKeys: f, currentTabId: c, handleCurrentTabIdChange: F, handlerMainButtonClick: (j) => { t("click", j); }, handleEntryFocus: I, handleClose: C, handleOpen: x, handleBeforeShowTooltip: P, handleShowTooltip: M, handleBeforeHideTooltip: N, onFocusAfterTrapped: (j) => { var A, U; j.preventDefault(), (U = (A = l.value) == null ? void 0 : A.focus) == null || U.call(A, { preventScroll: !0 }); }, popperRef: s, contentRef: l, triggeringElementRef: a, referenceElementRef: i }; } }); function pCe(e, t, n, r, o, a) { var i; const s = Xe("el-dropdown-collection"), l = Xe("el-roving-focus-group"), u = Xe("el-scrollbar"), c = Xe("el-only-child"), d = Xe("el-tooltip"), f = Xe("el-button"), h = Xe("arrow-down"), p = Xe("el-icon"), v = Xe("el-button-group"); return E(), L("div", { class: V([e.ns.b(), e.ns.is("disabled", e.disabled)]) }, [ W(d, { ref: "popperRef", role: e.role, effect: e.effect, "fallback-placements": ["bottom", "top"], "popper-options": e.popperOptions, "gpu-acceleration": !1, "hide-after": e.trigger === "hover" ? e.hideTimeout : 0, "manual-mode": !0, placement: e.placement, "popper-class": [e.ns.e("popper"), e.popperClass], "reference-element": (i = e.referenceElementRef) == null ? void 0 : i.$el, trigger: e.trigger, "trigger-keys": e.triggerKeys, "trigger-target-el": e.contentRef, "show-after": e.trigger === "hover" ? e.showTimeout : 0, "stop-popper-mouse-event": !1, "virtual-ref": e.triggeringElementRef, "virtual-triggering": e.splitButton, disabled: e.disabled, transition: `${e.ns.namespace.value}-zoom-in-top`, teleported: e.teleported, pure: "", persistent: "", onBeforeShow: e.handleBeforeShowTooltip, onShow: e.handleShowTooltip, onBeforeHide: e.handleBeforeHideTooltip }, mb({ content: R(() => [ W(u, { ref: "scrollbar", "wrap-style": e.wrapStyle, tag: "div", "view-class": e.ns.e("list") }, { default: R(() => [ W(l, { loop: e.loop, "current-tab-id": e.currentTabId, orientation: "horizontal", onCurrentTabIdChange: e.handleCurrentTabIdChange, onEntryFocus: e.handleEntryFocus }, { default: R(() => [ W(s, null, { default: R(() => [ oe(e.$slots, "dropdown") ]), _: 3 }) ]), _: 3 }, 8, ["loop", "current-tab-id", "onCurrentTabIdChange", "onEntryFocus"]) ]), _: 3 }, 8, ["wrap-style", "view-class"]) ]), _: 2 }, [ e.splitButton ? void 0 : { name: "default", fn: R(() => [ W(c, { id: e.triggerId, ref: "triggeringElementRef", role: "button", tabindex: e.tabindex }, { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }, 8, ["id", "tabindex"]) ]) } ]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "onBeforeShow", "onShow", "onBeforeHide"]), e.splitButton ? (E(), Q(v, { key: 0 }, { default: R(() => [ W(f, Lt({ ref: "referenceElementRef" }, e.buttonProps, { size: e.dropdownSize, type: e.type, disabled: e.disabled, tabindex: e.tabindex, onClick: e.handlerMainButtonClick }), { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }, 16, ["size", "type", "disabled", "tabindex", "onClick"]), W(f, Lt({ id: e.triggerId, ref: "triggeringElementRef" }, e.buttonProps, { role: "button", size: e.dropdownSize, type: e.type, class: e.ns.e("caret-button"), disabled: e.disabled, tabindex: e.tabindex, "aria-label": e.t("el.dropdown.toggleDropdown") }), { default: R(() => [ W(p, { class: V(e.ns.e("icon")) }, { default: R(() => [ W(h) ]), _: 1 }, 8, ["class"]) ]), _: 1 }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"]) ]), _: 3 })) : Z("v-if", !0) ], 2); } var fCe = /* @__PURE__ */ gt(dCe, [["render", pCe], ["__file", "dropdown.vue"]]); const hCe = K({ name: "DropdownItemImpl", components: { ElIcon: ln }, props: MA, emits: ["pointermove", "pointerleave", "click", "clickimpl"], setup(e, { emit: t }) { const n = mt("dropdown"), { role: r } = xe(Vg, void 0), { collectionItemRef: o } = xe(uCe, void 0), { collectionItemRef: a } = xe(jke, void 0), { rovingFocusGroupItemRef: i, tabIndex: s, handleFocus: l, handleKeydown: u, handleMousedown: c } = xe(DA, void 0), d = EI(o, a, i), f = $(() => r.value === "menu" ? "menuitem" : r.value === "navigation" ? "link" : "button"), h = jn((p) => { const { code: v } = p; if (v === Wt.enter || v === Wt.space) return p.preventDefault(), p.stopImmediatePropagation(), t("clickimpl", p), !0; }, u); return { ns: n, itemRef: d, dataset: { [LA]: "" }, role: f, tabIndex: s, handleFocus: l, handleKeydown: h, handleMousedown: c }; } }); function vCe(e, t, n, r, o, a) { const i = Xe("el-icon"); return E(), L(De, null, [ e.divided ? (E(), L("li", Lt({ key: 0, role: "separator", class: e.ns.bem("menu", "item", "divided") }, e.$attrs), null, 16)) : Z("v-if", !0), B("li", Lt({ ref: e.itemRef }, { ...e.dataset, ...e.$attrs }, { "aria-disabled": e.disabled, class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)], tabindex: e.tabIndex, role: e.role, onClick: (s) => e.$emit("clickimpl", s), onFocus: e.handleFocus, onKeydown: Je(e.handleKeydown, ["self"]), onMousedown: e.handleMousedown, onPointermove: (s) => e.$emit("pointermove", s), onPointerleave: (s) => e.$emit("pointerleave", s) }), [ e.icon ? (E(), Q(i, { key: 0 }, { default: R(() => [ (E(), Q(vt(e.icon))) ]), _: 1 })) : Z("v-if", !0), oe(e.$slots, "default") ], 16, ["aria-disabled", "tabindex", "role", "onClick", "onFocus", "onKeydown", "onMousedown", "onPointermove", "onPointerleave"]) ], 64); } var gCe = /* @__PURE__ */ gt(hCe, [["render", vCe], ["__file", "dropdown-item-impl.vue"]]); const BA = () => { const e = xe("elDropdown", {}), t = $(() => e == null ? void 0 : e.dropdownSize); return { elDropdown: e, _elDropdownSize: t }; }, mCe = K({ name: "ElDropdownItem", components: { ElDropdownCollectionItem: sCe, ElRovingFocusItem: nCe, ElDropdownItemImpl: gCe }, inheritAttrs: !1, props: MA, emits: ["pointermove", "pointerleave", "click"], setup(e, { emit: t, attrs: n }) { const { elDropdown: r } = BA(), o = rt(), a = z(null), i = $(() => { var h, p; return (p = (h = y(a)) == null ? void 0 : h.textContent) != null ? p : ""; }), { onItemEnter: s, onItemLeave: l } = xe(Vg, void 0), u = jn((h) => (t("pointermove", h), h.defaultPrevented), Y3((h) => { if (e.disabled) { l(h); return; } const p = h.currentTarget; p === document.activeElement || p.contains(document.activeElement) || (s(h), h.defaultPrevented || p == null || p.focus()); })), c = jn((h) => (t("pointerleave", h), h.defaultPrevented), Y3(l)), d = jn((h) => { if (!e.disabled) return t("click", h), h.type !== "keydown" && h.defaultPrevented; }, (h) => { var p, v, m; if (e.disabled) { h.stopImmediatePropagation(); return; } (p = r == null ? void 0 : r.hideOnClick) != null && p.value && ((v = r.handleClick) == null || v.call(r)), (m = r.commandHandler) == null || m.call(r, e.command, o, h); }), f = $(() => ({ ...e, ...n })); return { handleClick: d, handlePointerMove: u, handlePointerLeave: c, textContent: i, propsAndAttrs: f }; } }); function yCe(e, t, n, r, o, a) { var i; const s = Xe("el-dropdown-item-impl"), l = Xe("el-roving-focus-item"), u = Xe("el-dropdown-collection-item"); return E(), Q(u, { disabled: e.disabled, "text-value": (i = e.textValue) != null ? i : e.textContent }, { default: R(() => [ W(l, { focusable: !e.disabled }, { default: R(() => [ W(s, Lt(e.propsAndAttrs, { onPointerleave: e.handlePointerLeave, onPointermove: e.handlePointerMove, onClickimpl: e.handleClick }), { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }, 16, ["onPointerleave", "onPointermove", "onClickimpl"]) ]), _: 3 }, 8, ["focusable"]) ]), _: 3 }, 8, ["disabled", "text-value"]); } var zA = /* @__PURE__ */ gt(mCe, [["render", yCe], ["__file", "dropdown-item.vue"]]); const bCe = K({ name: "ElDropdownMenu", props: rCe, setup(e) { const t = mt("dropdown"), { _elDropdownSize: n } = BA(), r = n.value, { focusTrapRef: o, onKeydown: a } = xe(oA, void 0), { contentRef: i, role: s, triggerId: l } = xe(Vg, void 0), { collectionRef: u, getItems: c } = xe(lCe, void 0), { rovingFocusGroupRef: d, rovingFocusGroupRootStyle: f, tabIndex: h, onBlur: p, onFocus: v, onMousedown: m } = xe(Vw, void 0), { collectionRef: g } = xe(zw, void 0), b = $(() => [t.b("menu"), t.bm("menu", r == null ? void 0 : r.value)]), C = EI(i, u, o, d, g), x = jn((w) => { var k; (k = e.onKeydown) == null || k.call(e, w); }, (w) => { const { currentTarget: k, code: S, target: _ } = w; if (k.contains(_), Wt.tab === S && w.stopImmediatePropagation(), w.preventDefault(), _ !== y(i) || !aCe.includes(S)) return; const O = c().filter((F) => !F.disabled).map((F) => F.ref); NA.includes(S) && O.reverse(), jw(O); }); return { size: r, rovingFocusGroupRootStyle: f, tabIndex: h, dropdownKls: b, role: s, triggerId: l, dropdownListWrapperRef: C, handleKeydown: (w) => { x(w), a(w); }, onBlur: p, onFocus: v, onMousedown: m }; } }); function wCe(e, t, n, r, o, a) { return E(), L("ul", { ref: e.dropdownListWrapperRef, class: V(e.dropdownKls), style: Ze(e.rovingFocusGroupRootStyle), tabindex: -1, role: e.role, "aria-labelledby": e.triggerId, onBlur: e.onBlur, onFocus: e.onFocus, onKeydown: Je(e.handleKeydown, ["self"]), onMousedown: Je(e.onMousedown, ["self"]) }, [ oe(e.$slots, "default") ], 46, ["role", "aria-labelledby", "onBlur", "onFocus", "onKeydown", "onMousedown"]); } var VA = /* @__PURE__ */ gt(bCe, [["render", wCe], ["__file", "dropdown-menu.vue"]]); const xCe = zn(fCe, { DropdownItem: zA, DropdownMenu: VA }), kCe = Fo(zA), CCe = Fo(VA), jA = Symbol("elPaginationKey"), SCe = St({ disabled: Boolean, currentPage: { type: Number, default: 1 }, prevText: { type: String }, prevIcon: { type: Zo } }), ECe = { click: (e) => e instanceof MouseEvent }, $Ce = K({ name: "ElPaginationPrev" }), _Ce = /* @__PURE__ */ K({ ...$Ce, props: SCe, emits: ECe, setup(e) { const t = e, { t: n } = Io(), r = $(() => t.disabled || t.currentPage <= 1); return (o, a) => (E(), L("button", { type: "button", class: "btn-prev", disabled: y(r), "aria-label": o.prevText || y(n)("el.pagination.prev"), "aria-disabled": y(r), onClick: (i) => o.$emit("click", i) }, [ o.prevText ? (E(), L("span", { key: 0 }, me(o.prevText), 1)) : (E(), Q(y(ln), { key: 1 }, { default: R(() => [ (E(), Q(vt(o.prevIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var TCe = /* @__PURE__ */ gt(_Ce, [["__file", "prev.vue"]]); const OCe = St({ disabled: Boolean, currentPage: { type: Number, default: 1 }, pageCount: { type: Number, default: 50 }, nextText: { type: String }, nextIcon: { type: Zo } }), FCe = K({ name: "ElPaginationNext" }), ICe = /* @__PURE__ */ K({ ...FCe, props: OCe, emits: ["click"], setup(e) { const t = e, { t: n } = Io(), r = $(() => t.disabled || t.currentPage === t.pageCount || t.pageCount === 0); return (o, a) => (E(), L("button", { type: "button", class: "btn-next", disabled: y(r), "aria-label": o.nextText || y(n)("el.pagination.next"), "aria-disabled": y(r), onClick: (i) => o.$emit("click", i) }, [ o.nextText ? (E(), L("span", { key: 0 }, me(o.nextText), 1)) : (E(), Q(y(ln), { key: 1 }, { default: R(() => [ (E(), Q(vt(o.nextIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var ACe = /* @__PURE__ */ gt(ICe, [["__file", "next.vue"]]); const HA = Symbol("ElSelectGroup"), jg = Symbol("ElSelect"); function PCe(e, t) { const n = xe(jg), r = xe(HA, { disabled: !1 }), o = $(() => c(Si(n.props.modelValue), e.value)), a = $(() => { var h; if (n.props.multiple) { const p = Si((h = n.props.modelValue) != null ? h : []); return !o.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = $(() => e.label || (dr(e.value) ? "" : e.value)), s = $(() => e.value || e.label || ""), l = $(() => e.disabled || t.groupDisabled || a.value), u = rt(), c = (h = [], p) => { if (dr(e.value)) { const v = n.props.valueKey; return h && h.some((m) => Ga(Ci(m, v)) === Ci(p, v)); } else return h && h.includes(p); }, d = () => { !e.disabled && !r.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u.proxy)); }, f = (h) => { const p = new RegExp(V1e(h), "i"); t.visible = p.test(i.value) || e.created; }; return ce(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), ce(() => e.value, (h, p) => { const { remote: v, valueKey: m } = n.props; if (h !== p && (n.onOptionDestroy(p, u.proxy), n.onOptionCreate(u.proxy)), !e.created && !v) { if (m && dr(h) && dr(p) && h[m] === p[m]) return; n.setSelected(); } }), ce(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: o, isDisabled: l, hoverItem: d, updateOption: f }; } const LCe = K({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = mt("select"), n = ni(), r = $(() => [ t.be("dropdown", "item"), t.is("disabled", y(s)), t.is("selected", y(i)), t.is("hovering", y(f)) ]), o = Kt({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = PCe(e, o), { visible: d, hover: f } = Vr(o), h = rt().proxy; l.onOptionCreate(h), Tt(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((b) => b.value === h.value); Ue(() => { l.states.cachedOptions.get(v) === h && !g && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: a, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: o }; } }); function RCe(e, t, n, r, o, a) { return Ne((E(), L("li", { id: e.id, class: V(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: Je(e.selectOptionClick, ["stop"]) }, [ oe(e.$slots, "default", {}, () => [ B("span", null, me(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ft, e.visible] ]); } var Hw = /* @__PURE__ */ gt(LCe, [["render", RCe], ["__file", "option.vue"]]); const DCe = K({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = xe(jg), t = mt("select"), n = $(() => e.props.popperClass), r = $(() => e.props.multiple), o = $(() => e.props.fitInputWidth), a = z(""); function i() { var s; a.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return at(() => { i(), Ma(e.selectRef, i); }), { ns: t, minWidth: a, popperClass: n, isMultiple: r, isFitInputWidth: o }; } }); function MCe(e, t, n, r, o, a) { return E(), L("div", { class: V([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Ze({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? (E(), L("div", { key: 0, class: V(e.ns.be("dropdown", "header")) }, [ oe(e.$slots, "header") ], 2)) : Z("v-if", !0), oe(e.$slots, "default"), e.$slots.footer ? (E(), L("div", { key: 1, class: V(e.ns.be("dropdown", "footer")) }, [ oe(e.$slots, "footer") ], 2)) : Z("v-if", !0) ], 6); } var NCe = /* @__PURE__ */ gt(DCe, [["render", MCe], ["__file", "select-dropdown.vue"]]); const BCe = 11, zCe = (e, t) => { const { t: n } = Io(), r = ni(), o = mt("select"), a = mt("input"), i = Kt({ inputValue: "", options: /* @__PURE__ */ new Map(), cachedOptions: /* @__PURE__ */ new Map(), disabledOptions: /* @__PURE__ */ new Map(), optionValues: [], selected: [], selectionWidth: 0, calculatorWidth: 0, collapseItemWidth: 0, selectedLabel: "", hoveringIndex: -1, previousQuery: null, inputHovering: !1, menuVisibleOnFocus: !1, isBeforeHide: !1 }), s = z(null), l = z(null), u = z(null), c = z(null), d = z(null), f = z(null), h = z(null), p = z(null), v = z(null), m = z(null), g = z(null), b = z(null), { isComposing: C, handleCompositionStart: x, handleCompositionUpdate: w, handleCompositionEnd: k } = Iw({ afterComposition: (D) => ge(D) }), { wrapperRef: S, isFocused: _ } = GI(d, { beforeFocus() { return A.value; }, afterFocus() { e.automaticDropdown && !O.value && (O.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(D) { var ne, Oe; return ((ne = u.value) == null ? void 0 : ne.isFocusInsideContent(D)) || ((Oe = c.value) == null ? void 0 : Oe.isFocusInsideContent(D)); }, afterBlur() { O.value = !1, i.menuVisibleOnFocus = !1; } }), O = z(!1), F = z(), { form: I, formItem: P } = Ys(), { inputId: M } = _f(e, { formItemContext: P }), { valueOnClear: N, isEmptyValue: j } = XI(e), A = $(() => e.disabled || (I == null ? void 0 : I.disabled)), U = $(() => Yr(e.modelValue) ? e.modelValue.length > 0 : !j(e.modelValue)), q = $(() => e.clearable && !A.value && i.inputHovering && U.value), Y = $(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), ie = $(() => o.is("reverse", Y.value && O.value)), re = $(() => (P == null ? void 0 : P.validateState) || ""), le = $(() => SI[re.value]), he = $(() => e.remote ? 300 : 0), we = $(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !i.inputValue && i.options.size === 0 ? !1 : e.filterable && i.inputValue && i.options.size > 0 && be.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), be = $(() => de.value.filter((D) => D.visible).length), de = $(() => { const D = Array.from(i.options.values()), ne = []; return i.optionValues.forEach((Oe) => { const We = D.findIndex((Zt) => Zt.value === Oe); We > -1 && ne.push(D[We]); }), ne.length >= D.length ? ne : D; }), ae = $(() => Array.from(i.cachedOptions.values())), ee = $(() => { const D = de.value.filter((ne) => !ne.created).some((ne) => ne.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !D; }), se = () => { e.filterable && Hn(e.filterMethod) || e.filterable && e.remote && Hn(e.remoteMethod) || de.value.forEach((D) => { var ne; (ne = D.updateOption) == null || ne.call(D, i.inputValue); }); }, pe = Mi(), Se = $(() => ["small"].includes(pe.value) ? "small" : "default"), Le = $({ get() { return O.value && we.value !== !1; }, set(D) { O.value = D; } }), je = $(() => { if (e.multiple && !_i(e.modelValue)) return Si(e.modelValue).length === 0 && !i.inputValue; const D = Yr(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || _i(D) ? !i.inputValue : !0; }), _e = $(() => { var D; const ne = (D = e.placeholder) != null ? D : n("el.select.placeholder"); return e.multiple || !U.value ? ne : i.selectedLabel; }), ze = $(() => Fy ? null : "mouseenter"); ce(() => e.modelValue, (D, ne) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Ie("")), qe(), !Ua(D, ne) && e.validateEvent && (P == null || P.validate("change").catch((Oe) => Wn(Oe))); }, { flush: "post", deep: !0 }), ce(() => O.value, (D) => { D ? Ie(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", D); }), ce(() => i.options.entries(), () => { var D; if (!En) return; const ne = ((D = s.value) == null ? void 0 : D.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !_i(e.modelValue) || !Array.from(ne).includes(document.activeElement)) && qe(), e.defaultFirstOption && (e.filterable || e.remote) && be.value && He(); }, { flush: "post" }), ce(() => i.hoveringIndex, (D) => { sn(D) && D > -1 ? F.value = de.value[D] || {} : F.value = {}, de.value.forEach((ne) => { ne.hover = F.value === ne; }); }), qp(() => { i.isBeforeHide || se(); }); const Ie = (D) => { i.previousQuery === D || C.value || (i.previousQuery = D, e.filterable && Hn(e.filterMethod) ? e.filterMethod(D) : e.filterable && e.remote && Hn(e.remoteMethod) && e.remoteMethod(D), e.defaultFirstOption && (e.filterable || e.remote) && be.value ? Ue(He) : Ue(Ve)); }, He = () => { const D = de.value.filter((We) => We.visible && !We.disabled && !We.states.groupDisabled), ne = D.find((We) => We.created), Oe = D[0]; i.hoveringIndex = Te(de.value, ne || Oe); }, qe = () => { if (e.multiple) i.selectedLabel = ""; else { const ne = Yr(e.modelValue) ? e.modelValue[0] : e.modelValue, Oe = et(ne); i.selectedLabel = Oe.currentLabel, i.selected = [Oe]; return; } const D = []; _i(e.modelValue) || Si(e.modelValue).forEach((ne) => { D.push(et(ne)); }), i.selected = D; }, et = (D) => { let ne; const Oe = n1(D).toLowerCase() === "object", We = n1(D).toLowerCase() === "null", Zt = n1(D).toLowerCase() === "undefined"; for (let Tn = i.cachedOptions.size - 1; Tn >= 0; Tn--) { const on = ae.value[Tn]; if (Oe ? Ci(on.value, e.valueKey) === Ci(D, e.valueKey) : on.value === D) { ne = { value: D, currentLabel: on.currentLabel, get isDisabled() { return on.isDisabled; } }; break; } } if (ne) return ne; const _n = Oe ? D.label : !We && !Zt ? D : ""; return { value: D, currentLabel: _n }; }, Ve = () => { i.hoveringIndex = de.value.findIndex((D) => i.selected.some((ne) => wn(ne) === wn(D))); }, nt = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, ot = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, pt = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, T = () => { var D, ne; (ne = (D = u.value) == null ? void 0 : D.updatePopper) == null || ne.call(D); }, G = () => { var D, ne; (ne = (D = c.value) == null ? void 0 : D.updatePopper) == null || ne.call(D); }, fe = () => { i.inputValue.length > 0 && !O.value && (O.value = !0), Ie(i.inputValue); }, ge = (D) => { if (i.inputValue = D.target.value, e.remote) ve(); else return fe(); }, ve = fI(() => { fe(); }, he.value), Fe = (D) => { Ua(e.modelValue, D) || t(Wl, D); }, Ce = (D) => L1e(D, (ne) => !i.disabledOptions.has(ne)), Re = (D) => { if (e.multiple && D.code !== Wt.delete && D.target.value.length <= 0) { const ne = Si(e.modelValue).slice(), Oe = Ce(ne); if (Oe < 0) return; const We = ne[Oe]; ne.splice(Oe, 1), t(Mn, ne), Fe(ne), t("remove-tag", We); } }, lt = (D, ne) => { const Oe = i.selected.indexOf(ne); if (Oe > -1 && !A.value) { const We = Si(e.modelValue).slice(); We.splice(Oe, 1), t(Mn, We), Fe(We), t("remove-tag", ne.value); } D.stopPropagation(), Nt(); }, ut = (D) => { D.stopPropagation(); const ne = e.multiple ? [] : N.value; if (e.multiple) for (const Oe of i.selected) Oe.isDisabled && ne.push(Oe.value); t(Mn, ne), Fe(ne), i.hoveringIndex = -1, O.value = !1, t("clear"), Nt(); }, ue = (D) => { var ne; if (e.multiple) { const Oe = Si((ne = e.modelValue) != null ? ne : []).slice(), We = Te(Oe, D.value); We > -1 ? Oe.splice(We, 1) : (e.multipleLimit <= 0 || Oe.length < e.multipleLimit) && Oe.push(D.value), t(Mn, Oe), Fe(Oe), D.created && Ie(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Mn, D.value), Fe(D.value), O.value = !1; Nt(), !O.value && Ue(() => { ke(D); }); }, Te = (D = [], ne) => { if (!dr(ne)) return D.indexOf(ne); const Oe = e.valueKey; let We = -1; return D.some((Zt, _n) => Ga(Ci(Zt, Oe)) === Ci(ne, Oe) ? (We = _n, !0) : !1), We; }, ke = (D) => { var ne, Oe, We, Zt, _n; const Tn = Yr(D) ? D[0] : D; let on = null; if (Tn != null && Tn.value) { const Jt = de.value.filter((Po) => Po.value === Tn.value); Jt.length > 0 && (on = Jt[0].$el); } if (u.value && on) { const Jt = (Zt = (We = (Oe = (ne = u.value) == null ? void 0 : ne.popperRef) == null ? void 0 : Oe.contentRef) == null ? void 0 : We.querySelector) == null ? void 0 : Zt.call(We, `.${o.be("dropdown", "wrap")}`); Jt && bI(Jt, on); } (_n = b.value) == null || _n.handleScroll(); }, Be = (D) => { i.options.set(D.value, D), i.cachedOptions.set(D.value, D), D.disabled && i.disabledOptions.set(D.value, D); }, Dt = (D, ne) => { i.options.get(D) === ne && i.options.delete(D); }, Ft = $(() => { var D, ne; return (ne = (D = u.value) == null ? void 0 : D.popperRef) == null ? void 0 : ne.contentRef; }), zt = () => { i.isBeforeHide = !1, Ue(() => ke(i.selected)); }, Nt = () => { var D; (D = d.value) == null || D.focus(); }, Yt = () => { var D; (D = d.value) == null || D.blur(); }, Ln = (D) => { ut(D); }, pn = () => { O.value = !1, _.value && Yt(); }, fn = () => { i.inputValue.length > 0 ? i.inputValue = "" : O.value = !1; }, Fn = () => { A.value || (Fy && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : O.value = !O.value); }, Rn = () => { O.value ? de.value[i.hoveringIndex] && ue(de.value[i.hoveringIndex]) : Fn(); }, wn = (D) => dr(D.value) ? Ci(D.value, e.valueKey) : D.value, sr = $(() => de.value.filter((D) => D.visible).every((D) => D.disabled)), Xn = $(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), Zn = $(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Xt = (D) => { if (!O.value) { O.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || C.value) && !sr.value) { D === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : D === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ne = de.value[i.hoveringIndex]; (ne.disabled === !0 || ne.states.groupDisabled === !0 || !ne.visible) && Xt(D), Ue(() => ke(F.value)); } }, hn = () => { if (!l.value) return 0; const D = window.getComputedStyle(l.value); return Number.parseFloat(D.gap || "6px"); }, $n = $(() => { const D = hn(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - D : i.selectionWidth}px` }; }), lr = $(() => ({ maxWidth: `${i.selectionWidth}px` })), Ao = $(() => ({ width: `${Math.max(i.calculatorWidth, BCe)}px` })); return Ma(l, nt), Ma(f, ot), Ma(v, T), Ma(S, T), Ma(m, G), Ma(g, pt), at(() => { qe(); }), { inputId: M, contentId: r, nsSelect: o, nsInput: a, states: i, isFocused: _, expanded: O, optionsArray: de, hoverOption: F, selectSize: pe, filteredOptionsCount: be, resetCalculatorWidth: ot, updateTooltip: T, updateTagTooltip: G, debouncedOnInputChange: ve, onInput: ge, deletePrevTag: Re, deleteTag: lt, deleteSelected: ut, handleOptionSelect: ue, scrollToOption: ke, hasModelValue: U, shouldShowPlaceholder: je, currentPlaceholder: _e, mouseEnterEventName: ze, showClose: q, iconComponent: Y, iconReverse: ie, validateState: re, validateIcon: le, showNewOption: ee, updateOptions: se, collapseTagSize: Se, setSelected: qe, selectDisabled: A, emptyText: we, handleCompositionStart: x, handleCompositionUpdate: w, handleCompositionEnd: k, onOptionCreate: Be, onOptionDestroy: Dt, handleMenuEnter: zt, focus: Nt, blur: Yt, handleClearClick: Ln, handleClickOutside: pn, handleEsc: fn, toggleMenu: Fn, selectOption: Rn, getValueKey: wn, navigateOptions: Xt, dropdownMenuVisible: Le, showTagList: Xn, collapseTagList: Zn, tagStyle: $n, collapseTagStyle: lr, inputStyle: Ao, popperRef: Ft, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: b, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var VCe = K({ name: "ElOptions", setup(e, { slots: t }) { const n = xe(jg); let r = []; return () => { var o, a; const i = (o = t.default) == null ? void 0 : o.call(t), s = []; function l(u) { Yr(u) && u.forEach((c) => { var d, f, h, p; const v = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name; v === "ElOptionGroup" ? l(!uo(c.children) && !Yr(c.children) && Hn((f = c.children) == null ? void 0 : f.default) ? (h = c.children) == null ? void 0 : h.default() : c.children) : v === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : Yr(c.children) && l(c.children); }); } return i.length && l((a = i[0]) == null ? void 0 : a.children), Ua(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const jCe = St({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Ki, effect: { type: ct(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: ct(Object), default: () => ({}) }, remote: Boolean, loadingText: String, noMatchText: String, noDataText: String, remoteMethod: Function, filterMethod: Function, multiple: Boolean, multipleLimit: { type: Number, default: 0 }, placeholder: { type: String }, defaultFirstOption: Boolean, reserveKeyword: { type: Boolean, default: !0 }, valueKey: { type: String, default: "value" }, collapseTags: Boolean, collapseTagsTooltip: Boolean, maxCollapseTags: { type: Number, default: 1 }, teleported: no.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: Zo, default: Ag }, fitInputWidth: Boolean, suffixIcon: { type: Zo, default: kf }, tagType: { ...Lp.type, default: "info" }, tagEffect: { ...Lp.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: ct(String), values: Sf, default: "bottom-start" }, fallbackPlacements: { type: ct(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...YI, ...Ks(["ariaLabel"]) }), kS = "ElSelect", HCe = K({ name: kS, componentName: kS, components: { ElSelectMenu: NCe, ElOption: Hw, ElOptions: VCe, ElTag: kc, ElScrollbar: Bg, ElTooltip: Pp, ElIcon: ln }, directives: { ClickOutside: pA }, props: jCe, emits: [ Mn, Wl, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = $(() => { const { modelValue: a, multiple: i } = e, s = i ? [] : void 0; return Yr(a) ? i ? a : s : i ? s : a; }), r = Kt({ ...Vr(e), modelValue: n }), o = zCe(r, t); return tt(jg, Kt({ props: r, states: o.states, optionsArray: o.optionsArray, handleOptionSelect: o.handleOptionSelect, onOptionCreate: o.onOptionCreate, onOptionDestroy: o.onOptionDestroy, selectRef: o.selectRef, setSelected: o.setSelected })), { ...o, modelValue: n }; } }); function UCe(e, t, n, r, o, a) { const i = Xe("el-tag"), s = Xe("el-tooltip"), l = Xe("el-icon"), u = Xe("el-option"), c = Xe("el-options"), d = Xe("el-scrollbar"), f = Xe("el-select-menu"), h = yb("click-outside"); return Ne((E(), L("div", { ref: "selectRef", class: V([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [bb(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ W(s, { ref: "tooltipRef", visible: e.dropdownMenuVisible, placement: e.placement, teleported: e.teleported, "popper-class": [e.nsSelect.e("popper"), e.popperClass], "popper-options": e.popperOptions, "fallback-placements": e.fallbackPlacements, effect: e.effect, pure: "", trigger: "click", transition: `${e.nsSelect.namespace.value}-zoom-in-top`, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, persistent: e.persistent, "append-to": e.appendTo, onBeforeShow: e.handleMenuEnter, onHide: (p) => e.states.isBeforeHide = !1 }, { default: R(() => { var p; return [ B("div", { ref: "wrapperRef", class: V([ 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: Je(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? (E(), L("div", { key: 0, ref: "prefixRef", class: V(e.nsSelect.e("prefix")) }, [ oe(e.$slots, "prefix") ], 2)) : Z("v-if", !0), B("div", { ref: "selectionRef", class: V([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? oe(e.$slots, "tag", { key: 0 }, () => [ (E(!0), L(De, null, xt(e.showTagList, (v) => (E(), L("div", { key: e.getValueKey(v), class: V(e.nsSelect.e("selected-item")) }, [ W(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ze(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, [ oe(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Ae(me(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (E(), Q(s, { key: 0, ref: "tagTooltipRef", disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], effect: e.effect, placement: "bottom", teleported: e.teleported }, { default: R(() => [ B("div", { ref: "collapseItemRef", class: V(e.nsSelect.e("selected-item")) }, [ W(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Ze(e.collapseTagStyle) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, " + " + me(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: R(() => [ B("div", { ref: "tagMenuRef", class: V(e.nsSelect.e("selection")) }, [ (E(!0), L(De, null, xt(e.collapseTagList, (v) => (E(), L("div", { key: e.getValueKey(v), class: V(e.nsSelect.e("selected-item")) }, [ W(i, { class: "in-tooltip", closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", onClose: (m) => e.deleteTag(m, v) }, { default: R(() => [ B("span", { class: V(e.nsSelect.e("tags-text")) }, [ oe(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ Ae(me(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : Z("v-if", !0) ]) : Z("v-if", !0), e.selectDisabled ? Z("v-if", !0) : (E(), L("div", { key: 1, class: V([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ Ne(B("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: V([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Ze(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: [ yn(Je((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), yn(Je((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), yn(Je(e.handleEsc, ["stop", "prevent"]), ["esc"]), yn(Je(e.selectOption, ["stop", "prevent"]), ["enter"]), yn(Je(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: Je(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"]), [ [C0, e.states.inputValue] ]), e.filterable ? (E(), L("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: V(e.nsSelect.e("input-calculator")), textContent: me(e.states.inputValue) }, null, 10, ["textContent"])) : Z("v-if", !0) ], 2)), e.shouldShowPlaceholder ? (E(), L("div", { key: 2, class: V([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? oe(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ B("span", null, me(e.currentPlaceholder), 1) ]) : (E(), L("span", { key: 1 }, me(e.currentPlaceholder), 1)) ], 2)) : Z("v-if", !0) ], 2), B("div", { ref: "suffixRef", class: V(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? (E(), Q(l, { key: 0, class: V([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: R(() => [ (E(), Q(vt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0), e.showClose && e.clearIcon ? (E(), Q(l, { key: 1, class: V([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: R(() => [ (E(), Q(vt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : Z("v-if", !0), e.validateState && e.validateIcon ? (E(), Q(l, { key: 2, class: V([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: R(() => [ (E(), Q(vt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : Z("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: R(() => [ W(f, { ref: "menuRef" }, { default: R(() => [ e.$slots.header ? (E(), L("div", { key: 0, class: V(e.nsSelect.be("dropdown", "header")), onClick: Je(() => { }, ["stop"]) }, [ oe(e.$slots, "header") ], 10, ["onClick"])) : Z("v-if", !0), Ne(W(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: V([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: R(() => [ e.showNewOption ? (E(), Q(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : Z("v-if", !0), W(c, null, { default: R(() => [ oe(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ft, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? (E(), L("div", { key: 1, class: V(e.nsSelect.be("dropdown", "loading")) }, [ oe(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? (E(), L("div", { key: 2, class: V(e.nsSelect.be("dropdown", "empty")) }, [ oe(e.$slots, "empty", {}, () => [ B("span", null, me(e.emptyText), 1) ]) ], 2)) : Z("v-if", !0), e.$slots.footer ? (E(), L("div", { key: 3, class: V(e.nsSelect.be("dropdown", "footer")), onClick: Je(() => { }, ["stop"]) }, [ oe(e.$slots, "footer") ], 10, ["onClick"])) : Z("v-if", !0) ]), _: 3 }, 512) ]), _: 3 }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"]) ], 16, ["onMouseleave"])), [ [h, e.handleClickOutside, e.popperRef] ]); } var qCe = /* @__PURE__ */ gt(HCe, [["render", UCe], ["__file", "select.vue"]]); const WCe = K({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = mt("select"), n = z(null), r = rt(), o = z([]); tt(HA, Kt({ ...Vr(e) })); const a = $(() => o.value.some((u) => u.visible === !0)), i = (u) => { var c, d; return ((c = u.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u.component) != null && d.proxy); }, s = (u) => { const c = Si(u), d = []; return c.forEach((f) => { var h, p; i(f) ? d.push(f.component.proxy) : (h = f.children) != null && h.length ? d.push(...s(f.children)) : (p = f.component) != null && p.subTree && d.push(...s(f.component.subTree)); }), d; }, l = () => { o.value = s(r.subTree); }; return at(() => { l(); }), $he(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: a, ns: t }; } }); function GCe(e, t, n, r, o, a) { return Ne((E(), L("ul", { ref: "groupRef", class: V(e.ns.be("group", "wrap")) }, [ B("li", { class: V(e.ns.be("group", "title")) }, me(e.label), 3), B("li", null, [ B("ul", { class: V(e.ns.b("group")) }, [ oe(e.$slots, "default") ], 2) ]) ], 2)), [ [ft, e.visible] ]); } var UA = /* @__PURE__ */ gt(WCe, [["render", GCe], ["__file", "option-group.vue"]]); const Hg = zn(qCe, { Option: Hw, OptionGroup: UA }), Uw = Fo(Hw); Fo(UA); const qw = () => xe(jA, {}), KCe = St({ pageSize: { type: Number, required: !0 }, pageSizes: { type: ct(Array), default: () => ys([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String }, disabled: Boolean, teleported: Boolean, size: { type: String, values: Rg }, appendSizeTo: String }), YCe = K({ name: "ElPaginationSizes" }), XCe = /* @__PURE__ */ K({ ...YCe, props: KCe, emits: ["page-size-change"], setup(e, { emit: t }) { const n = e, { t: r } = Io(), o = mt("pagination"), a = qw(), i = z(n.pageSize); ce(() => n.pageSizes, (u, c) => { if (!Ua(u, c) && Array.isArray(u)) { const d = u.includes(n.pageSize) ? n.pageSize : n.pageSizes[0]; t("page-size-change", d); } }), ce(() => n.pageSize, (u) => { i.value = u; }); const s = $(() => n.pageSizes); function l(u) { var c; u !== i.value && (i.value = u, (c = a.handleSizeChange) == null || c.call(a, Number(u))); } return (u, c) => (E(), L("span", { class: V(y(o).e("sizes")) }, [ W(y(Hg), { "model-value": i.value, disabled: u.disabled, "popper-class": u.popperClass, size: u.size, teleported: u.teleported, "validate-event": !1, "append-to": u.appendSizeTo, onChange: l }, { default: R(() => [ (E(!0), L(De, null, xt(y(s), (d) => (E(), Q(y(Uw), { key: d, value: d, label: d + y(r)("el.pagination.pagesize") }, null, 8, ["value", "label"]))), 128)) ]), _: 1 }, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"]) ], 2)); } }); var ZCe = /* @__PURE__ */ gt(XCe, [["__file", "sizes.vue"]]); const JCe = St({ size: { type: String, values: Rg } }), QCe = K({ name: "ElPaginationJumper" }), e5e = /* @__PURE__ */ K({ ...QCe, props: JCe, setup(e) { const { t } = Io(), n = mt("pagination"), { pageCount: r, disabled: o, currentPage: a, changeEvent: i } = qw(), s = z(), l = $(() => { var d; return (d = s.value) != null ? d : a == null ? void 0 : a.value; }); function u(d) { s.value = d ? +d : ""; } function c(d) { d = Math.trunc(+d), i == null || i(d), s.value = void 0; } return (d, f) => (E(), L("span", { class: V(y(n).e("jump")), disabled: y(o) }, [ B("span", { class: V([y(n).e("goto")]) }, me(y(t)("el.pagination.goto")), 3), W(y(Ng), { size: d.size, class: V([y(n).e("editor"), y(n).is("in-pagination")]), min: 1, max: y(r), disabled: y(o), "model-value": y(l), "validate-event": !1, "aria-label": y(t)("el.pagination.page"), type: "number", "onUpdate:modelValue": u, onChange: c }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]), B("span", { class: V([y(n).e("classifier")]) }, me(y(t)("el.pagination.pageClassifier")), 3) ], 10, ["disabled"])); } }); var t5e = /* @__PURE__ */ gt(e5e, [["__file", "jumper.vue"]]); const n5e = St({ total: { type: Number, default: 1e3 } }), r5e = K({ name: "ElPaginationTotal" }), o5e = /* @__PURE__ */ K({ ...r5e, props: n5e, setup(e) { const { t } = Io(), n = mt("pagination"), { disabled: r } = qw(); return (o, a) => (E(), L("span", { class: V(y(n).e("total")), disabled: y(r) }, me(y(t)("el.pagination.total", { total: o.total })), 11, ["disabled"])); } }); var a5e = /* @__PURE__ */ gt(o5e, [["__file", "total.vue"]]); const i5e = St({ currentPage: { type: Number, default: 1 }, pageCount: { type: Number, required: !0 }, pagerCount: { type: Number, default: 7 }, disabled: Boolean }), s5e = K({ name: "ElPaginationPager" }), l5e = /* @__PURE__ */ K({ ...s5e, props: i5e, emits: ["change"], setup(e, { emit: t }) { const n = e, r = mt("pager"), o = mt("icon"), { t: a } = Io(), i = z(!1), s = z(!1), l = z(!1), u = z(!1), c = z(!1), d = z(!1), f = $(() => { const x = n.pagerCount, w = (x - 1) / 2, k = Number(n.currentPage), S = Number(n.pageCount); let _ = !1, O = !1; S > x && (k > x - w && (_ = !0), k < S - w && (O = !0)); const F = []; if (_ && !O) { const I = S - (x - 2); for (let P = I; P < S; P++) F.push(P); } else if (!_ && O) for (let I = 2; I < x; I++) F.push(I); else if (_ && O) { const I = Math.floor(x / 2) - 1; for (let P = k - I; P <= k + I; P++) F.push(P); } else for (let I = 2; I < S; I++) F.push(I); return F; }), h = $(() => [ "more", "btn-quickprev", o.b(), r.is("disabled", n.disabled) ]), p = $(() => [ "more", "btn-quicknext", o.b(), r.is("disabled", n.disabled) ]), v = $(() => n.disabled ? -1 : 0); qp(() => { const x = (n.pagerCount - 1) / 2; i.value = !1, s.value = !1, n.pageCount > n.pagerCount && (n.currentPage > n.pagerCount - x && (i.value = !0), n.currentPage < n.pageCount - x && (s.value = !0)); }); function m(x = !1) { n.disabled || (x ? l.value = !0 : u.value = !0); } function g(x = !1) { x ? c.value = !0 : d.value = !0; } function b(x) { const w = x.target; if (w.tagName.toLowerCase() === "li" && Array.from(w.classList).includes("number")) { const k = Number(w.textContent); k !== n.currentPage && t("change", k); } else w.tagName.toLowerCase() === "li" && Array.from(w.classList).includes("more") && C(x); } function C(x) { const w = x.target; if (w.tagName.toLowerCase() === "ul" || n.disabled) return; let k = Number(w.textContent); const S = n.pageCount, _ = n.currentPage, O = n.pagerCount - 2; w.className.includes("more") && (w.className.includes("quickprev") ? k = _ - O : w.className.includes("quicknext") && (k = _ + O)), Number.isNaN(+k) || (k < 1 && (k = 1), k > S && (k = S)), k !== _ && t("change", k); } return (x, w) => (E(), L("ul", { class: V(y(r).b()), onClick: C, onKeyup: yn(b, ["enter"]) }, [ x.pageCount > 0 ? (E(), L("li", { key: 0, class: V([[ y(r).is("active", x.currentPage === 1), y(r).is("disabled", x.disabled) ], "number"]), "aria-current": x.currentPage === 1, "aria-label": y(a)("el.pagination.currentPage", { pager: 1 }), tabindex: y(v) }, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : Z("v-if", !0), i.value ? (E(), L("li", { key: 1, class: V(y(h)), tabindex: y(v), "aria-label": y(a)("el.pagination.prevPages", { pager: x.pagerCount - 2 }), onMouseenter: (k) => m(!0), onMouseleave: (k) => l.value = !1, onFocus: (k) => g(!0), onBlur: (k) => c.value = !1 }, [ (l.value || c.value) && !x.disabled ? (E(), Q(y(tye), { key: 0 })) : (E(), Q(y(B4), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : Z("v-if", !0), (E(!0), L(De, null, xt(y(f), (k) => (E(), L("li", { key: k, class: V([[ y(r).is("active", x.currentPage === k), y(r).is("disabled", x.disabled) ], "number"]), "aria-current": x.currentPage === k, "aria-label": y(a)("el.pagination.currentPage", { pager: k }), tabindex: y(v) }, me(k), 11, ["aria-current", "aria-label", "tabindex"]))), 128)), s.value ? (E(), L("li", { key: 2, class: V(y(p)), tabindex: y(v), "aria-label": y(a)("el.pagination.nextPages", { pager: x.pagerCount - 2 }), onMouseenter: (k) => m(), onMouseleave: (k) => u.value = !1, onFocus: (k) => g(), onBlur: (k) => d.value = !1 }, [ (u.value || d.value) && !x.disabled ? (E(), Q(y(rye), { key: 0 })) : (E(), Q(y(B4), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : Z("v-if", !0), x.pageCount > 1 ? (E(), L("li", { key: 3, class: V([[ y(r).is("active", x.currentPage === x.pageCount), y(r).is("disabled", x.disabled) ], "number"]), "aria-current": x.currentPage === x.pageCount, "aria-label": y(a)("el.pagination.currentPage", { pager: x.pageCount }), tabindex: y(v) }, me(x.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : Z("v-if", !0) ], 42, ["onKeyup"])); } }); var u5e = /* @__PURE__ */ gt(l5e, [["__file", "pager.vue"]]); const Wr = (e) => typeof e != "number", c5e = St({ pageSize: Number, defaultPageSize: Number, total: Number, pageCount: Number, pagerCount: { type: Number, validator: (e) => sn(e) && Math.trunc(e) === e && e > 4 && e < 22 && e % 2 === 1, default: 7 }, currentPage: Number, defaultCurrentPage: Number, layout: { type: String, default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ") }, pageSizes: { type: ct(Array), default: () => ys([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String, default: "" }, prevText: { type: String, default: "" }, prevIcon: { type: Zo, default: () => ww }, nextText: { type: String, default: "" }, nextIcon: { type: Zo, default: () => Ig }, teleported: { type: Boolean, default: !0 }, small: Boolean, size: Ki, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean, appendSizeTo: String }), d5e = { "update:current-page": (e) => sn(e), "update:page-size": (e) => sn(e), "size-change": (e) => sn(e), change: (e, t) => sn(e) && sn(t), "current-change": (e) => sn(e), "prev-click": (e) => sn(e), "next-click": (e) => sn(e) }, CS = "ElPagination"; var p5e = K({ name: CS, props: c5e, emits: d5e, setup(e, { emit: t, slots: n }) { const { t: r } = Io(), o = mt("pagination"), a = rt().vnode.props || {}, i = WI(), s = $(() => { var w; return e.small ? "small" : (w = e.size) != null ? w : i.value; }); $l({ from: "small", replacement: "size", version: "3.0.0", scope: "el-pagination", ref: "https://element-plus.org/zh-CN/component/pagination.html" }, $(() => !!e.small)); const l = "onUpdate:currentPage" in a || "onUpdate:current-page" in a || "onCurrentChange" in a, u = "onUpdate:pageSize" in a || "onUpdate:page-size" in a || "onSizeChange" in a, c = $(() => { if (Wr(e.total) && Wr(e.pageCount) || !Wr(e.currentPage) && !l) return !1; if (e.layout.includes("sizes")) { if (Wr(e.pageCount)) { if (!Wr(e.total) && !Wr(e.pageSize) && !u) return !1; } else if (!u) return !1; } return !0; }), d = z(Wr(e.defaultPageSize) ? 10 : e.defaultPageSize), f = z(Wr(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), h = $({ get() { return Wr(e.pageSize) ? d.value : e.pageSize; }, set(w) { Wr(e.pageSize) && (d.value = w), u && (t("update:page-size", w), t("size-change", w)); } }), p = $(() => { let w = 0; return Wr(e.pageCount) ? Wr(e.total) || (w = Math.max(1, Math.ceil(e.total / h.value))) : w = e.pageCount, w; }), v = $({ get() { return Wr(e.currentPage) ? f.value : e.currentPage; }, set(w) { let k = w; w < 1 ? k = 1 : w > p.value && (k = p.value), Wr(e.currentPage) && (f.value = k), l && (t("update:current-page", k), t("current-change", k)); } }); ce(p, (w) => { v.value > w && (v.value = w); }), ce([v, h], (w) => { t("change", ...w); }, { flush: "post" }); function m(w) { v.value = w; } function g(w) { h.value = w; const k = p.value; v.value > k && (v.value = k); } function b() { e.disabled || (v.value -= 1, t("prev-click", v.value)); } function C() { e.disabled || (v.value += 1, t("next-click", v.value)); } function x(w, k) { w && (w.props || (w.props = {}), w.props.class = [w.props.class, k].join(" ")); } return tt(jA, { pageCount: p, disabled: $(() => e.disabled), currentPage: v, changeEvent: m, handleSizeChange: g }), () => { var w, k; if (!c.value) return Wn(CS, r("el.pagination.deprecationWarning")), null; if (!e.layout || e.hideOnSinglePage && p.value <= 1) return null; const S = [], _ = [], O = jt("div", { class: o.e("rightwrapper") }, _), F = { prev: jt(TCe, { disabled: e.disabled, currentPage: v.value, prevText: e.prevText, prevIcon: e.prevIcon, onClick: b }), jumper: jt(t5e, { size: s.value }), pager: jt(u5e, { currentPage: v.value, pageCount: p.value, pagerCount: e.pagerCount, onChange: m, disabled: e.disabled }), next: jt(ACe, { disabled: e.disabled, currentPage: v.value, pageCount: p.value, nextText: e.nextText, nextIcon: e.nextIcon, onClick: C }), sizes: jt(ZCe, { pageSize: h.value, pageSizes: e.pageSizes, popperClass: e.popperClass, disabled: e.disabled, teleported: e.teleported, size: s.value, appendSizeTo: e.appendSizeTo }), slot: (k = (w = n == null ? void 0 : n.default) == null ? void 0 : w.call(n)) != null ? k : null, total: jt(a5e, { total: Wr(e.total) ? 0 : e.total }) }, I = e.layout.split(",").map((M) => M.trim()); let P = !1; return I.forEach((M) => { if (M === "->") { P = !0; return; } P ? _.push(F[M]) : S.push(F[M]); }), x(S[0], o.is("first")), x(S[S.length - 1], o.is("last")), P && _.length > 0 && (x(_[0], o.is("first")), x(_[_.length - 1], o.is("last")), S.push(O)), jt("div", { class: [ o.b(), o.is("background", e.background), o.m(s.value) ] }, S); }; } }); const qA = zn(p5e), f5e = St({ trigger: Ap.trigger, placement: cv.placement, disabled: Ap.disabled, visible: no.visible, transition: no.transition, popperOptions: cv.popperOptions, tabindex: cv.tabindex, content: no.content, popperStyle: no.popperStyle, popperClass: no.popperClass, enterable: { ...no.enterable, default: !0 }, effect: { ...no.effect, default: "light" }, teleported: no.teleported, title: String, width: { type: [String, Number], default: 150 }, offset: { type: Number, default: void 0 }, showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 }, showArrow: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, "onUpdate:visible": { type: Function } }), h5e = { "update:visible": (e) => ei(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, v5e = "onUpdate:visible", g5e = K({ name: "ElPopover" }), m5e = /* @__PURE__ */ K({ ...g5e, props: f5e, emits: h5e, setup(e, { expose: t, emit: n }) { const r = e, o = $(() => r[v5e]), a = mt("popover"), i = z(), s = $(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = $(() => [ { width: ql(r.width) }, r.popperStyle ]), u = $(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = $(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (E(), Q(y(Pp), Lt({ ref_key: "tooltipRef", ref: i }, m.$attrs, { trigger: m.trigger, placement: m.placement, disabled: m.disabled, visible: m.visible, transition: m.transition, "popper-options": m.popperOptions, tabindex: m.tabindex, content: m.content, offset: m.offset, "show-after": m.showAfter, "hide-after": m.hideAfter, "auto-close": m.autoClose, "show-arrow": m.showArrow, "aria-label": m.title, effect: m.effect, enterable: m.enterable, "popper-class": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: R(() => [ m.title ? (E(), L("div", { key: 0, class: V(y(a).e("title")), role: "title" }, me(m.title), 3)) : Z("v-if", !0), oe(m.$slots, "default", {}, () => [ Ae(me(m.content), 1) ]) ]), default: R(() => [ m.$slots.reference ? oe(m.$slots, "reference", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"])); } }); var y5e = /* @__PURE__ */ gt(m5e, [["__file", "popover.vue"]]); const SS = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var b5e = { mounted(e, t) { SS(e, t); }, updated(e, t) { SS(e, t); } }; const w5e = "popover", x5e = gye(b5e, w5e), Ug = zn(y5e, { directive: x5e }); function k5e(e) { let t; const n = z(!1), r = Kt({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(f) { r.text = f; } function a() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (Op(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), Op(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, a(); } const u = K({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = Kbe("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = jt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ jt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? jt("p", { class: p.b("text") }, [r.text]) : void 0; return jt(pr, { name: p.b("fade"), onAfterLeave: l }, { default: R(() => [ Ne(W("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ jt("div", { class: p.b("spinner") }, [g, b]) ]), [[ft, r.visible]]) ]) }); }; } }), c = S0(u), d = c.mount(document.createElement("div")); return { ...Vr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Oh; const C5e = function(e = {}) { if (!En) return; const t = S5e(e); if (t.fullscreen && Oh) return Oh; const n = k5e({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (Oh = void 0); } }); E5e(t, t.parent, n), ES(t, t.parent, n), t.parent.vLoadingAddClassList = () => ES(t, t.parent, n); let r = t.parent.getAttribute("loading-number"); return r ? r = `${Number.parseInt(r) + 1}` : r = "1", t.parent.setAttribute("loading-number", r), t.parent.appendChild(n.$el), Ue(() => n.visible.value = t.visible), t.fullscreen && (Oh = n), n; }, S5e = (e) => { var t, n, r, o; let a; return uo(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, { parent: a === document.body || e.body ? document.body : a, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (o = e.visible) != null ? o : !0, beforeClose: e.beforeClose, closed: e.closed, target: a }; }, E5e = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = Du(document.body, "position"), n.originalOverflow.value = Du(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = Du(document.body, "position"), await Ue(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(Du(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = Du(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, ES = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Op(t, r.bm("parent", "relative")) : My(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? My(t, r.bm("parent", "hidden")) : Op(t, r.bm("parent", "hidden")); }, dv = Symbol("ElLoading"), $S = (e, t) => { var n, r, o, a; const i = t.instance, s = (f) => dr(t.value) ? t.value[f] : void 0, l = (f) => { const h = uo(f) && (i == null ? void 0 : i[f]) || f; return h && z(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${zhe(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[dv] = { options: d, instance: C5e(d) }; }, $5e = (e, t) => { for (const n of Object.keys(t)) Gn(t[n]) && (t[n].value = e[n]); }, qg = { mounted(e, t) { t.value && $S(e, t); }, updated(e, t) { const n = e[dv]; t.oldValue !== t.value && (t.value && !t.oldValue ? $S(e, t) : t.value && t.oldValue ? dr(t.value) && $5e(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[dv]) == null || t.instance.close(), e[dv] = null; } }, li = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, _5e = { name: "BadgesGroup", components: { Button: bo }, props: { /** * Object containing information for * the required viewing. */ additionalLinks: { type: Array, default: () => [] }, datasetBiolucida: { type: Object, default: () => ({}) }, entry: { type: Object, default: () => ({}) } }, data: function() { return { //Always start with 1 image - the dataset thumbnail itself categories: { All: { size: 1 }, Dataset: { size: 1 } }, active: "All" }; }, methods: { addToCategories: function(e, t) { e && e.length > 0 && (this.categories[t] = { size: e.length }, this.categories.All.size += e.length); }, addSimulationsToCategories: function(e) { e && e.length > 0 && (this.categories.Simulations = { size: 1 }, this.categories.All.size += 1); }, categoryClicked: function(e) { this.active = e, this.$emit("categoryChanged", e); } }, watch: { datasetBiolucida: { deep: !0, immediate: !0, handler: function(e) { "dataset_images" in e && this.addToCategories(e.dataset_images, "Images"); } }, entry: { deep: !0, immediate: !0, handler: function() { this.addToCategories(this.entry.scaffolds, "Scaffolds"), this.addToCategories(this.entry.segmentation, "Segmentations"), this.addToCategories(this.entry.plots, "Plots"), this.addSimulationsToCategories(this.entry.simulation); } } } }, T5e = (e) => (Tr("data-v-da8a77c1"), e = e(), Or(), e), O5e = { key: 0, class: "container", ref: "container" }, F5e = /* @__PURE__ */ T5e(() => /* @__PURE__ */ B("div", null, "View data types:", -1)); function I5e(e, t, n, r, o, a) { const i = bo; return e.categories.All.size > 1 ? (E(), L("div", O5e, [ F5e, (E(!0), L(De, null, xt(e.categories, (s, l) => (E(), L(De, null, [ s.size > 0 ? (E(), Q(i, { class: V([{ active: l == e.active }, "tag-button"]), onClick: (u) => a.categoryClicked(l), size: "small", key: l }, { default: R(() => [ Ae(me(l + " (" + s.size + ")"), 1) ]), _: 2 }, 1032, ["class", "onClick"])) : Z("", !0) ], 64))), 256)) ], 512)) : Z("", !0); } const WA = /* @__PURE__ */ li(_5e, [["render", I5e], ["__scopeId", "data-v-da8a77c1"]]); function GA(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: A5e } = Object.prototype, { getPrototypeOf: Ww } = Object, Wg = /* @__PURE__ */ ((e) => (t) => { const n = A5e.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Oa = (e) => (e = e.toLowerCase(), (t) => Wg(t) === e), Gg = (e) => (t) => typeof t === e, { isArray: Yc } = Array, Rp = Gg("undefined"); function P5e(e) { return e !== null && !Rp(e) && e.constructor !== null && !Rp(e.constructor) && $o(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const KA = Oa("ArrayBuffer"); function L5e(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && KA(e.buffer), t; } const R5e = Gg("string"), $o = Gg("function"), YA = Gg("number"), Kg = (e) => e !== null && typeof e == "object", D5e = (e) => e === !0 || e === !1, pv = (e) => { if (Wg(e) !== "object") return !1; const t = Ww(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, M5e = Oa("Date"), N5e = Oa("File"), B5e = Oa("Blob"), z5e = Oa("FileList"), V5e = (e) => Kg(e) && $o(e.pipe), j5e = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || $o(e.append) && ((t = Wg(e)) === "formdata" || // detect form-data instance t === "object" && $o(e.toString) && e.toString() === "[object FormData]")); }, H5e = Oa("URLSearchParams"), [U5e, q5e, W5e, G5e] = ["ReadableStream", "Request", "Response", "Headers"].map(Oa), K5e = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Tf(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, o; if (typeof e != "object" && (e = [e]), Yc(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length; let s; for (r = 0; r < i; r++) s = a[r], t.call(null, e[s], s, e); } } function XA(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } const vl = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ZA = (e) => !Rp(e) && e !== vl; function Wy() { const { caseless: e } = ZA(this) && this || {}, t = {}, n = (r, o) => { const a = e && XA(t, o) || o; pv(t[a]) && pv(r) ? t[a] = Wy(t[a], r) : pv(r) ? t[a] = Wy({}, r) : Yc(r) ? t[a] = r.slice() : t[a] = r; }; for (let r = 0, o = arguments.length; r < o; r++) arguments[r] && Tf(arguments[r], n); return t; } const Y5e = (e, t, n, { allOwnKeys: r } = {}) => (Tf(t, (o, a) => { n && $o(o) ? e[a] = GA(o, n) : e[a] = o; }, { allOwnKeys: r }), e), X5e = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Z5e = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, J5e = (e, t, n, r) => { let o, a, i; const s = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; ) i = o[a], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && Ww(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, Q5e = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, e3e = (e) => { if (!e) return null; if (Yc(e)) return e; let t = e.length; if (!YA(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, t3e = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ww(Uint8Array)), n3e = (e, t) => { const n = (e && e[Symbol.iterator]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, r3e = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, o3e = Oa("HTMLFormElement"), a3e = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), _S = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), i3e = Oa("RegExp"), JA = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; Tf(n, (o, a) => { let i; (i = t(o, a, e)) !== !1 && (r[a] = i || o); }), Object.defineProperties(e, r); }, s3e = (e) => { JA(e, (t, n) => { if ($o(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if ($o(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, l3e = (e, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = !0; }); }; return Yc(e) ? r(e) : r(String(e).split(t)), n; }, u3e = () => { }, c3e = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, f1 = "abcdefghijklmnopqrstuvwxyz", TS = "0123456789", QA = { DIGIT: TS, ALPHA: f1, ALPHA_DIGIT: f1 + f1.toUpperCase() + TS }, d3e = (e = 16, t = QA.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function p3e(e) { return !!(e && $o(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const f3e = (e) => { const t = new Array(10), n = (r, o) => { if (Kg(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[o] = r; const a = Yc(r) ? [] : {}; return Tf(r, (i, s) => { const l = n(i, o + 1); !Rp(l) && (a[s] = l); }), t[o] = void 0, a; } } return r; }; return n(e, 0); }, h3e = Oa("AsyncFunction"), v3e = (e) => e && (Kg(e) || $o(e)) && $o(e.then) && $o(e.catch), eP = ((e, t) => e ? setImmediate : t ? ((n, r) => (vl.addEventListener("message", ({ source: o, data: a }) => { o === vl && a === n && r.length && r.shift()(); }, !1), (o) => { r.push(o), vl.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", $o(vl.postMessage) ), g3e = typeof queueMicrotask < "u" ? queueMicrotask.bind(vl) : typeof process < "u" && process.nextTick || eP, $e = { isArray: Yc, isArrayBuffer: KA, isBuffer: P5e, isFormData: j5e, isArrayBufferView: L5e, isString: R5e, isNumber: YA, isBoolean: D5e, isObject: Kg, isPlainObject: pv, isReadableStream: U5e, isRequest: q5e, isResponse: W5e, isHeaders: G5e, isUndefined: Rp, isDate: M5e, isFile: N5e, isBlob: B5e, isRegExp: i3e, isFunction: $o, isStream: V5e, isURLSearchParams: H5e, isTypedArray: t3e, isFileList: z5e, forEach: Tf, merge: Wy, extend: Y5e, trim: K5e, stripBOM: X5e, inherits: Z5e, toFlatObject: J5e, kindOf: Wg, kindOfTest: Oa, endsWith: Q5e, toArray: e3e, forEachEntry: n3e, matchAll: r3e, isHTMLForm: o3e, hasOwnProperty: _S, hasOwnProp: _S, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: JA, freezeMethods: s3e, toObjectSet: l3e, toCamelCase: a3e, noop: u3e, toFiniteNumber: c3e, findKey: XA, global: vl, isContextDefined: ZA, ALPHABET: QA, generateString: d3e, isSpecCompliantForm: p3e, toJSONObject: f3e, isAsyncFn: h3e, isThenable: v3e, setImmediate: eP, asap: g3e }; function At(e, t, n, r, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o); } $e.inherits(At, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: $e.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; } }); const tP = At.prototype, nP = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { nP[e] = { value: e }; }); Object.defineProperties(At, nP); Object.defineProperty(tP, "isAxiosError", { value: !0 }); At.from = (e, t, n, r, o, a) => { const i = Object.create(tP); return $e.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), At.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, a && Object.assign(i, a), i; }; const m3e = null; function Gy(e) { return $e.isPlainObject(e) || $e.isArray(e); } function rP(e) { return $e.endsWith(e, "[]") ? e.slice(0, -2) : e; } function OS(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = rP(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function y3e(e) { return $e.isArray(e) && !e.some(Gy); } const b3e = $e.toFlatObject($e, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function Yg(e, t, n) { if (!$e.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = $e.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, p) { return !$e.isUndefined(p[h]); }); const r = n.metaTokens, o = n.visitor || u, a = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && $e.isSpecCompliantForm(t); if (!$e.isFunction(o)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if ($e.isDate(h)) return h.toISOString(); if (!s && $e.isBlob(h)) throw new At("Blob is not supported. Use a Buffer instead."); return $e.isArrayBuffer(h) || $e.isTypedArray(h) ? s && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function u(h, p, v) { let m = h; if (h && !v && typeof h == "object") { if ($e.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), h = JSON.stringify(h); else if ($e.isArray(h) && y3e(h) || ($e.isFileList(h) || $e.endsWith(p, "[]")) && (m = $e.toArray(h))) return p = rP(p), m.forEach(function(g, b) { !($e.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? OS([p], b, a) : i === null ? p : p + "[]", l(g) ); }), !1; } return Gy(h) ? !0 : (t.append(OS(v, p, a), l(h)), !1); } const c = [], d = Object.assign(b3e, { defaultVisitor: u, convertValue: l, isVisitable: Gy }); function f(h, p) { if (!$e.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + p.join(".")); c.push(h), $e.forEach(h, function(v, m) { (!($e.isUndefined(v) || v === null) && o.call( t, v, $e.isString(m) ? m.trim() : m, p, d )) === !0 && f(v, p ? p.concat(m) : [m]); }), c.pop(); } } if (!$e.isObject(e)) throw new TypeError("data must be an object"); return f(e), t; } function FS(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function Gw(e, t) { this._pairs = [], e && Yg(e, this, t); } const oP = Gw.prototype; oP.append = function(e, t) { this._pairs.push([e, t]); }; oP.toString = function(e) { const t = e ? function(n) { return e.call(this, n, FS); } : FS; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function w3e(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function aP(e, t, n) { if (!t) return e; const r = n && n.encode || w3e, o = n && n.serialize; let a; if (o ? a = o(t, n) : a = $e.isURLSearchParams(t) ? t.toString() : new Gw(t, n).toString(r), a) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a; } return e; } class IS { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, r) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { $e.forEach(this.handlers, function(n) { n !== null && t(n); }); } } const iP = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, x3e = typeof URLSearchParams < "u" ? URLSearchParams : Gw, k3e = typeof FormData < "u" ? FormData : null, C3e = typeof Blob < "u" ? Blob : null, S3e = { isBrowser: !0, classes: { URLSearchParams: x3e, FormData: k3e, Blob: C3e }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Kw = typeof window < "u" && typeof document < "u", E3e = ((e) => Kw && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), $3e = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", _3e = Kw && window.location.href || "http://localhost", T3e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Kw, hasStandardBrowserEnv: E3e, hasStandardBrowserWebWorkerEnv: $3e, origin: _3e }, Symbol.toStringTag, { value: "Module" })), ba = { ...T3e, ...S3e }; function O3e(e, t) { return Yg(e, new ba.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, o, a) { return ba.isNode && $e.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments); } }, t)); } function F3e(e) { return $e.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function I3e(e) { const t = {}, n = Object.keys(e); let r; const o = n.length; let a; for (r = 0; r < o; r++) a = n[r], t[a] = e[a]; return t; } function sP(e) { function t(n, r, o, a) { let i = n[a++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = a >= n.length; return i = !i && $e.isArray(o) ? o.length : i, l ? ($e.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !s) : ((!o[i] || !$e.isObject(o[i])) && (o[i] = []), t(n, r, o[i], a) && $e.isArray(o[i]) && (o[i] = I3e(o[i])), !s); } if ($e.isFormData(e) && $e.isFunction(e.entries)) { const n = {}; return $e.forEachEntry(e, (r, o) => { t(F3e(r), o, n, 0); }), n; } return null; } function A3e(e, t, n) { if ($e.isString(e)) try { return (t || JSON.parse)(e), $e.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const Of = { transitional: iP, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = $e.isObject(e); if (o && $e.isHTMLForm(e) && (e = new FormData(e)), $e.isFormData(e)) return r ? JSON.stringify(sP(e)) : e; if ($e.isArrayBuffer(e) || $e.isBuffer(e) || $e.isStream(e) || $e.isFile(e) || $e.isBlob(e) || $e.isReadableStream(e)) return e; if ($e.isArrayBufferView(e)) return e.buffer; if ($e.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let a; if (o) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return O3e(e, this.formSerializer).toString(); if ((a = $e.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return Yg( a ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return o || r ? (t.setContentType("application/json", !1), A3e(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || Of.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if ($e.isResponse(e) || $e.isReadableStream(e)) return e; if (e && $e.isString(e) && (n && !this.responseType || r)) { const o = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (a) { if (o) throw a.name === "SyntaxError" ? At.from(a, At.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return e; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: ba.classes.FormData, Blob: ba.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; $e.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { Of.headers[e] = {}; }); const P3e = $e.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), L3e = (e) => { const t = {}; let n, r, o; return e && e.split(` `).forEach(function(a) { o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && P3e[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, AS = Symbol("internals"); function wd(e) { return e && String(e).trim().toLowerCase(); } function fv(e) { return e === !1 || e == null ? e : $e.isArray(e) ? e.map(fv) : String(e); } function R3e(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const D3e = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function h1(e, t, n, r, o) { if ($e.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!$e.isString(t)) { if ($e.isString(r)) return t.indexOf(r) !== -1; if ($e.isRegExp(r)) return r.test(t); } } function M3e(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function N3e(e, t) { const n = $e.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, a, i) { return this[r].call(this, t, o, a, i); }, configurable: !0 }); }); } class fo { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function a(s, l, u) { const c = wd(l); if (!c) throw new Error("header name must be a non-empty string"); const d = $e.findKey(o, c); (!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || l] = fv(s)); } const i = (s, l) => $e.forEach(s, (u, c) => a(u, c, l)); if ($e.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if ($e.isString(t) && (t = t.trim()) && !D3e(t)) i(L3e(t), n); else if ($e.isHeaders(t)) for (const [s, l] of t.entries()) a(l, s, r); else t != null && a(n, t, r); return this; } get(t, n) { if (t = wd(t), t) { const r = $e.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return R3e(o); if ($e.isFunction(n)) return n.call(this, o, r); if ($e.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = wd(t), t) { const r = $e.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || h1(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function a(i) { if (i = wd(i), i) { const s = $e.findKey(r, i); s && (!n || h1(r, r[s], s, n)) && (delete r[s], o = !0); } } return $e.isArray(t) ? t.forEach(a) : a(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = !1; for (; r--; ) { const a = n[r]; (!t || h1(this, this[a], a, t, !0)) && (delete this[a], o = !0); } return o; } normalize(t) { const n = this, r = {}; return $e.forEach(this, (o, a) => { const i = $e.findKey(r, a); if (i) { n[i] = fv(o), delete n[a]; return; } const s = t ? M3e(a) : String(a).trim(); s !== a && delete n[a], n[s] = fv(o), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return $e.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && $e.isArray(r) ? r.join(", ") : r); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const r = new this(t); return n.forEach((o) => r.set(o)), r; } static accessor(t) { const n = (this[AS] = this[AS] = { accessors: {} }).accessors, r = this.prototype; function o(a) { const i = wd(a); n[i] || (N3e(r, a), n[i] = !0); } return $e.isArray(t) ? t.forEach(o) : o(t), this; } } fo.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); $e.reduceDescriptors(fo.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); $e.freezeMethods(fo); function v1(e, t) { const n = this || Of, r = t || n, o = fo.from(r.headers); let a = r.data; return $e.forEach(e, function(i) { a = i.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function lP(e) { return !!(e && e.__CANCEL__); } function Xc(e, t, n) { At.call(this, e ?? "canceled", At.ERR_CANCELED, t, n), this.name = "CanceledError"; } $e.inherits(Xc, At, { __CANCEL__: !0 }); function uP(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new At( "Request failed with status code " + n.status, [At.ERR_BAD_REQUEST, At.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function B3e(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function z3e(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, a = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[a]; i || (i = l), n[o] = s, r[o] = l; let c = a, d = 0; for (; c !== o; ) d += n[c++], c = c % e; if (o = (o + 1) % e, o === a && (a = (a + 1) % e), l - i < t) return; const f = u && l - u; return f ? Math.round(d * 1e3 / f) : void 0; }; } function V3e(e, t) { let n = 0, r = 1e3 / t, o, a; const i = (s, l = Date.now()) => { n = l, o = null, a && (clearTimeout(a), a = null), e.apply(null, s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (o = s, a || (a = setTimeout(() => { a = null, i(o); }, r - u))); }, () => o && i(o)]; } const n0 = (e, t, n = 3) => { let r = 0; const o = z3e(50, 250); return V3e((a) => { const i = a.loaded, s = a.lengthComputable ? a.total : void 0, l = i - r, u = o(l), c = i <= s; r = i; const d = { loaded: i, total: s, progress: s ? i / s : void 0, bytes: l, rate: u || void 0, estimated: u && s && c ? (s - i) / u : void 0, event: a, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, PS = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, LS = (e) => (...t) => $e.asap(() => e(...t)), j3e = ba.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { const e = /(msie|trident)/i.test(navigator.userAgent), t = document.createElement("a"); let n; function r(o) { let a = o; return e && (t.setAttribute("href", a), a = t.href), t.setAttribute("href", a), { href: t.href, protocol: t.protocol ? t.protocol.replace(/:$/, "") : "", host: t.host, search: t.search ? t.search.replace(/^\?/, "") : "", hash: t.hash ? t.hash.replace(/^#/, "") : "", hostname: t.hostname, port: t.port, pathname: t.pathname.charAt(0) === "/" ? t.pathname : "/" + t.pathname }; } return n = r(window.location.href), function(o) { const a = $e.isString(o) ? r(o) : o; return a.protocol === n.protocol && a.host === n.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), H3e = ba.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, a) { const i = [e + "=" + encodeURIComponent(t)]; $e.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), $e.isString(r) && i.push("path=" + r), $e.isString(o) && i.push("domain=" + o), a === !0 && i.push("secure"), document.cookie = i.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function U3e(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function q3e(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function cP(e, t) { return e && !U3e(t) ? q3e(e, t) : t; } const RS = (e) => e instanceof fo ? { ...e } : e; function Gl(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return $e.isPlainObject(u) && $e.isPlainObject(c) ? $e.merge.call({ caseless: d }, u, c) : $e.isPlainObject(c) ? $e.merge({}, c) : $e.isArray(c) ? c.slice() : c; } function o(u, c, d) { if ($e.isUndefined(c)) { if (!$e.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function a(u, c) { if (!$e.isUndefined(c)) return r(void 0, c); } function i(u, c) { if ($e.isUndefined(c)) { if (!$e.isUndefined(u)) return r(void 0, u); } else return r(void 0, c); } function s(u, c, d) { if (d in t) return r(u, c); if (d in e) return r(void 0, u); } const l = { url: a, method: a, data: a, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, withXSRFToken: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: s, headers: (u, c) => o(RS(u), RS(c), !0) }; return $e.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const c = l[u] || o, d = c(e[u], t[u], u); $e.isUndefined(d) && c !== s || (n[u] = d); }), n; } const dP = (e) => { const t = Gl({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = t; t.headers = i = fo.from(i), t.url = aP(cP(t.baseURL, t.url), e.params, e.paramsSerializer), s && i.set( "Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : "")) ); let l; if ($e.isFormData(n)) { if (ba.hasStandardBrowserEnv || ba.hasStandardBrowserWebWorkerEnv) i.setContentType(void 0); else if ((l = i.getContentType()) !== !1) { const [u, ...c] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : []; i.setContentType([u || "multipart/form-data", ...c].join("; ")); } } if (ba.hasStandardBrowserEnv && (r && $e.isFunction(r) && (r = r(t)), r || r !== !1 && j3e(t.url))) { const u = o && a && H3e.read(a); u && i.set(o, u); } return t; }, W3e = typeof XMLHttpRequest < "u", G3e = W3e && function(e) { return new Promise(function(t, n) { const r = dP(e); let o = r.data; const a = fo.from(r.headers).normalize(); let { responseType: i, onUploadProgress: s, onDownloadProgress: l } = r, u, c, d, f, h; function p() { f && f(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u); } let v = new XMLHttpRequest(); v.open(r.method.toUpperCase(), r.url, !0), v.timeout = r.timeout; function m() { if (!v) return; const b = fo.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), C = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: b, config: e, request: v }; uP(function(x) { t(x), p(); }, function(x) { n(x), p(); }, C), v = null; } "onloadend" in v ? v.onloadend = m : v.onreadystatechange = function() { !v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(m); }, v.onabort = function() { v && (n(new At("Request aborted", At.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new At("Network Error", At.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let b = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const C = r.transitional || iP; r.timeoutErrorMessage && (b = r.timeoutErrorMessage), n(new At( b, C.clarifyTimeoutError ? At.ETIMEDOUT : At.ECONNABORTED, e, v )), v = null; }, o === void 0 && a.setContentType(null), "setRequestHeader" in v && $e.forEach(a.toJSON(), function(b, C) { v.setRequestHeader(C, b); }), $e.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = n0(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, f] = n0(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (u = (b) => { v && (n(!b || b.type ? new Xc(null, e, v) : b), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = B3e(r.url); if (g && ba.protocols.indexOf(g) === -1) { n(new At("Unsupported protocol " + g + ":", At.ERR_BAD_REQUEST, e)); return; } v.send(o || null); }); }, K3e = (e, t) => { let n = new AbortController(), r; const o = function(l) { if (!r) { r = !0, i(); const u = l instanceof Error ? l : this.reason; n.abort(u instanceof At ? u : new Xc(u instanceof Error ? u.message : u)); } }; let a = t && setTimeout(() => { o(new At(`timeout ${t} of ms exceeded`, At.ETIMEDOUT)); }, t); const i = () => { e && (a && clearTimeout(a), a = null, e.forEach((l) => { l && (l.removeEventListener ? l.removeEventListener("abort", o) : l.unsubscribe(o)); }), e = null); }; e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", o)); const { signal: s } = n; return s.unsubscribe = i, [s, () => { a && clearTimeout(a), a = null; }]; }, Y3e = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e.slice(r, o), r = o; }, X3e = async function* (e, t, n) { for await (const r of e) yield* Y3e(ArrayBuffer.isView(r) ? r : await n(String(r)), t); }, DS = (e, t, n, r, o) => { const a = X3e(e, t, o); let i = 0, s, l = (u) => { s || (s = !0, r && r(u)); }; return new ReadableStream({ async pull(u) { try { const { done: c, value: d } = await a.next(); if (c) { l(), u.close(); return; } let f = d.byteLength; if (n) { let h = i += f; n(h); } u.enqueue(new Uint8Array(d)); } catch (c) { throw l(c), c; } }, cancel(u) { return l(u), a.return(); } }, { highWaterMark: 2 }); }, Xg = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", pP = Xg && typeof ReadableStream == "function", Ky = Xg && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), fP = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, Z3e = pP && fP(() => { let e = !1; const t = new Request(ba.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), MS = 64 * 1024, Yy = pP && fP(() => $e.isReadableStream(new Response("").body)), r0 = { stream: Yy && ((e) => e.body) }; Xg && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !r0[t] && (r0[t] = $e.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new At(`Response type '${t}' is not supported`, At.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const J3e = async (e) => { if (e == null) return 0; if ($e.isBlob(e)) return e.size; if ($e.isSpecCompliantForm(e)) return (await new Request(e).arrayBuffer()).byteLength; if ($e.isArrayBufferView(e) || $e.isArrayBuffer(e)) return e.byteLength; if ($e.isURLSearchParams(e) && (e = e + ""), $e.isString(e)) return (await Ky(e)).byteLength; }, Q3e = async (e, t) => $e.toFiniteNumber(e.getContentLength()) ?? J3e(t), e4e = Xg && (async (e) => { let { url: t, method: n, data: r, signal: o, cancelToken: a, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = dP(e); u = u ? (u + "").toLowerCase() : "text"; let [h, p] = o || a || i ? K3e([o, a], i) : [], v, m; const g = () => { !v && setTimeout(() => { h && h.unsubscribe(); }), v = !0; }; let b; try { if (l && Z3e && n !== "get" && n !== "head" && (b = await Q3e(c, r)) !== 0) { let k = new Request(t, { method: "POST", body: r, duplex: "half" }), S; if ($e.isFormData(r) && (S = k.headers.get("content-type")) && c.setContentType(S), k.body) { const [_, O] = PS( b, n0(LS(l)) ); r = DS(k.body, MS, _, O, Ky); } } $e.isString(d) || (d = d ? "include" : "omit"), m = new Request(t, { ...f, signal: h, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: d }); let C = await fetch(m); const x = Yy && (u === "stream" || u === "response"); if (Yy && (s || x)) { const k = {}; ["status", "statusText", "headers"].forEach((F) => { k[F] = C[F]; }); const S = $e.toFiniteNumber(C.headers.get("content-length")), [_, O] = s && PS( S, n0(LS(s), !0) ) || []; C = new Response( DS(C.body, MS, _, () => { O && O(), x && g(); }, Ky), k ); } u = u || "text"; let w = await r0[$e.findKey(r0, u) || "text"](C, e); return !x && g(), p && p(), await new Promise((k, S) => { uP(k, S, { data: w, headers: fo.from(C.headers), status: C.status, statusText: C.statusText, config: e, request: m }); }); } catch (C) { throw g(), C && C.name === "TypeError" && /fetch/i.test(C.message) ? Object.assign( new At("Network Error", At.ERR_NETWORK, e, m), { cause: C.cause || C } ) : At.from(C, C && C.code, e, m); } }), Xy = { http: m3e, xhr: G3e, fetch: e4e }; $e.forEach(Xy, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const NS = (e) => `- ${e}`, t4e = (e) => $e.isFunction(e) || e === null || e === !1, hP = { getAdapter: (e) => { e = $e.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e[a]; let i; if (r = n, !t4e(n) && (r = Xy[(i = String(n)).toLowerCase()], r === void 0)) throw new At(`Unknown adapter '${i}'`); if (r) break; o[i || "#" + a] = r; } if (!r) { const a = Object.entries(o).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? a.length > 1 ? `since : ` + a.map(NS).join(` `) : " " + NS(a[0]) : "as no adapter specified"; throw new At( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: Xy }; function g1(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Xc(null, e); } function BS(e) { return g1(e), e.headers = fo.from(e.headers), e.data = v1.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), hP.getAdapter(e.adapter || Of.adapter)(e).then(function(t) { return g1(e), t.data = v1.call( e, e.transformResponse, t ), t.headers = fo.from(t.headers), t; }, function(t) { return lP(t) || (g1(e), t && t.response && (t.response.data = v1.call( e, e.transformResponse, t.response ), t.response.headers = fo.from(t.response.headers))), Promise.reject(t); }); } const vP = "1.7.4", Yw = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { Yw[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const zS = {}; Yw.transitional = function(e, t, n) { function r(o, a) { return "[Axios v" + vP + "] Transitional option '" + o + "'" + a + (n ? ". " + n : ""); } return (o, a, i) => { if (e === !1) throw new At( r(a, " has been removed" + (t ? " in " + t : "")), At.ERR_DEPRECATED ); return t && !zS[a] && (zS[a] = !0, console.warn( r( a, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(o, a, i) : !0; }; }; function n4e(e, t, n) { if (typeof e != "object") throw new At("options must be an object", At.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const a = r[o], i = t[a]; if (i) { const s = e[a], l = s === void 0 || i(s, a, e); if (l !== !0) throw new At("option " + a + " must be " + l, At.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new At("Unknown option " + a, At.ERR_BAD_OPTION); } } const Zy = { assertOptions: n4e, validators: Yw }, ts = Zy.validators; class Tl { constructor(t) { this.defaults = t, this.interceptors = { request: new IS(), response: new IS() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (r) { if (r instanceof Error) { let o; Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error(); const a = o.stack ? o.stack.replace(/^.+\n/, "") : ""; try { r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + a) : r.stack = a; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Gl(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: a } = n; r !== void 0 && Zy.assertOptions(r, { silentJSONParsing: ts.transitional(ts.boolean), forcedJSONParsing: ts.transitional(ts.boolean), clarifyTimeoutError: ts.transitional(ts.boolean) }, !1), o != null && ($e.isFunction(o) ? n.paramsSerializer = { serialize: o } : Zy.assertOptions(o, { encode: ts.function, serialize: ts.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = a && $e.merge( a.common, a[n.method] ); a && $e.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (p) => { delete a[p]; } ), n.headers = fo.concat(i, a); const s = []; let l = !0; this.interceptors.request.forEach(function(p) { typeof p.runWhen == "function" && p.runWhen(n) === !1 || (l = l && p.synchronous, s.unshift(p.fulfilled, p.rejected)); }); const u = []; this.interceptors.response.forEach(function(p) { u.push(p.fulfilled, p.rejected); }); let c, d = 0, f; if (!l) { const p = [BS.bind(this), void 0]; for (p.unshift.apply(p, s), p.push.apply(p, u), f = p.length, c = Promise.resolve(n); d < f; ) c = c.then(p[d++], p[d++]); return c; } f = s.length; let h = n; for (d = 0; d < f; ) { const p = s[d++], v = s[d++]; try { h = p(h); } catch (m) { v.call(this, m); break; } } try { c = BS.call(this, h); } catch (p) { return Promise.reject(p); } for (d = 0, f = u.length; d < f; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = Gl(this.defaults, t); const n = cP(t.baseURL, t.url); return aP(n, t.params, t.paramsSerializer); } } $e.forEach(["delete", "get", "head", "options"], function(e) { Tl.prototype[e] = function(t, n) { return this.request(Gl(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); $e.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, o, a) { return this.request(Gl(a || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: o })); }; } Tl.prototype[e] = t(), Tl.prototype[e + "Form"] = t(!0); }); class Xw { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(o) { n = o; }); const r = this; this.promise.then((o) => { if (!r._listeners) return; let a = r._listeners.length; for (; a-- > 0; ) r._listeners[a](o); r._listeners = null; }), this.promise.then = (o) => { let a; const i = new Promise((s) => { r.subscribe(s), a = s; }).then(o); return i.cancel = function() { r.unsubscribe(a); }, i; }, t(function(o, a, i) { r.reason || (r.reason = new Xc(o, a, i), n(r.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new Xw(function(n) { t = n; }), cancel: t }; } } function r4e(e) { return function(t) { return e.apply(null, t); }; } function o4e(e) { return $e.isObject(e) && e.isAxiosError === !0; } const Jy = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(Jy).forEach(([e, t]) => { Jy[t] = e; }); function gP(e) { const t = new Tl(e), n = GA(Tl.prototype.request, t); return $e.extend(n, Tl.prototype, t, { allOwnKeys: !0 }), $e.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return gP(Gl(e, r)); }, n; } const Kn = gP(Of); Kn.Axios = Tl; Kn.CanceledError = Xc; Kn.CancelToken = Xw; Kn.isCancel = lP; Kn.VERSION = vP; Kn.toFormData = Yg; Kn.AxiosError = At; Kn.Cancel = Kn.CanceledError; Kn.all = function(e) { return Promise.all(e); }; Kn.spread = r4e; Kn.isAxiosError = o4e; Kn.mergeConfig = Gl; Kn.AxiosHeaders = fo; Kn.formToJSON = (e) => sP($e.isHTMLForm(e) ? new FormData(e) : e); Kn.getAdapter = hP.getAdapter; Kn.HttpStatusCode = Jy; Kn.default = Kn; const a4e = "data:image/svg+xml,%3csvg%20id='logo-sparc-wave-primary'%20data-name='logo-sparc-wave-primary'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20400%20190.5854'%3e%3cdefs%3e%3clinearGradient%20id='linear-gradient'%20y1='96.3505'%20x2='400'%20y2='96.3505'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230b00bf'/%3e%3cstop%20offset='1'%20stop-color='%23bc00fc'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3eSPARC%20Logo%3c/title%3e%3cpath%20d='M396.6976,128.6248l-146.2735-3.38a6.5358,6.5358,0,0,0-6.1378,3.9236l-.0612.1407-13.673,31.4482L202.9416,9.5333l-.01-.0685a8.9823,8.9823,0,0,0-17.6624-.0114L163.673,125.3819,3.298,129.2886a3.38,3.38,0,0,0,.0269,6.7592L169.34,138.7635a6.5939,6.5939,0,0,0,6.5373-5.1457l.0571-.2546,17.8534-79.5649L221.26,185.1237l.0256.1243A6.7593,6.7593,0,0,0,234.092,186.52L254.9005,138.66l141.7971-3.2762a3.3805,3.3805,0,0,0,0-6.7592Z'%20style='fill:url(%23linear-gradient)'/%3e%3cpath%20d='M25.6793,0C41.3957,0,51.057,10.0926,51.057,26.0972v9.5162H36.2053V26.0972c0-7.3532-3.8945-11.8219-10.526-11.8219-6.7768,0-10.6691,4.4687-10.6691,11.8219,0,3.8945,1.2982,7.3533,5.4786,11.3908l19.754,18.601C46.5861,62.1441,52.21,68.7778,52.21,79.88c0,16.0047-9.95,26.0973-25.9543,26.0973C10.108,105.9776.1585,95.885.1585,79.88V70.362H15.01V79.88c0,7.3533,4.0375,11.822,11.2455,11.822,7.065,0,11.1025-4.4687,11.1025-11.822,0-4.4709-2.1628-8.6514-6.0551-12.2576L11.1158,48.7357C3.043,41.2372.1585,34.8939.1585,25.666.1585,10.0926,9.82,0,25.6793,0Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M99.7971,69.7856v35.1821H84.9454V1.01h25.3755c16.0047,0,26.0973,10.0926,26.0973,26.0973V43.6883c0,16.15-10.0926,26.0973-26.0973,26.0973Zm10.3808-13.9849c7.2081,0,11.3908-4.3257,11.3908-11.6789V26.6759c0-7.21-4.1827-11.6811-11.3908-11.6811H99.7971V55.8007Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M278.5812,108.147H263.73V4.1893h26.0972c16.0047,0,26.0973,10.0926,26.0973,26.0972v14.13c0,9.95-4.3257,17.7363-11.3908,22.205,4.1827,12.6889,10.0926,29.9917,13.8418,41.5254h-15.14L290.6914,70.3708h-12.11Zm11.1-51.7632c7.21,0,11.3907-4.3257,11.3907-11.5338V29.8553c0-7.21-4.18-11.6812-11.3907-11.6812h-11.1v38.21Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M399.844,73.5414V83.06c0,16.0047-9.9474,26.0973-25.9521,26.0973-16.15,0-26.0972-10.0926-26.0972-26.0973V29.2766c0-16.0046,9.9473-26.0972,26.0972-26.0972,16.0047,0,25.9521,10.0926,25.9521,26.0972v9.5161h-14.85V29.2766c0-7.3532-4.0374-11.822-11.1025-11.822-7.21,0-11.2477,4.4688-11.2477,11.822V83.06c0,7.3533,4.0375,11.822,11.2477,11.822,7.0651,0,11.1025-4.4687,11.1025-11.822V73.5414Z'%20style='fill:%230e0e19'/%3e%3c/svg%3e", i4e = { //this mixin is not used by this code base but it can be used by other //projects to get a handle to various resources data() { return { defaultImg: a4e }; }, methods: { async getRequest(e, t, n) { return await Kn({ method: "get", url: e, params: t, timeout: n }); }, /** * Returns a file path for S3. * @param {String} dataset_id dataset id. * @param {String} dataset_version dataset version. * @param {String} file_path file path. * @returns {String} full path to S3 file. */ getS3FilePath(e, t, n) { const r = encodeURIComponent(n); return `${e}/${t}/files/${r}`; }, /** * Find data path in the array that matches the provide path */ findEntryWithPathInArray(e, t) { if (t && e) { for (let n = 0; n < e.length; n++) if (t === e[n].dataset.path) return e[n]; } }, getThumbnailForPlot(e, t) { if (t && e) return this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]); }, /** * Use the scaffoldViews to help with finding the correct thumbnails. * Use the index if the workflow stated above fails. */ getThumbnailForScaffold(e, t, n, r) { if (n && n.length > 0) { let o; if (e && t) { const a = this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]); a && (o = this.findEntryWithPathInArray(n, a.datacite.isSourceOf.path[0])); } if (o) return o; if (r < n.length) return n[r]; } }, getImageURLFromS3(e, t) { let n = `${e}/s3-resource/${t.datasetId}/${t.datasetVersion}/files/${t.file_path}?encodeBase64=true`; return t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n; }, getSegmentationThumbnailURL(e, t) { let n = `${e}/thumbnail/neurolucida`; return n = n + `?datasetId=${t.datasetId}`, n = n + `&version=${t.datasetVersion}`, n = n + `&path=files/${t.segmentationFilePath}`, t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n; }, getThumbnailURLFromBiolucida(e, t) { return `${e}/thumbnail/${t.id}`; }, getImageInfoFromBiolucida(e, t, n) { const r = `${e}/image/${n.id}`, o = {}; this.getRequest(r, o, 2e4).then( (a) => { let i = t.find((l) => l.id === n.id); const s = a.name; s && (i.title = s); }, (a) => (a.message.includes("timeout") && a.message.includes("exceeded") && n.fetchAttempts < 3 && (n.fetchAttempts += 1, this.getImageInfoFromBiolucida(e, t, n)), Promise.reject("Maximum iterations reached.")) ); } } }, Zw = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, s4e = { class: "indicator-container" }, l4e = ["onClick"], u4e = { __name: "IndexIndicator", props: { count: { type: Number, default: 0 }, current: { type: Number, default: 0 } }, emits: ["clicked"], setup(e, { emit: t }) { const n = t; return (r, o) => (E(), L("div", s4e, [ (E(!0), L(De, null, xt(e.count, (a, i) => (E(), L("div", { key: "indicator_" + a, class: V(["indicator", { active: e.current === i }]), onClick: (s) => n("clicked", i) }, null, 10, l4e))), 128)) ])); } }, c4e = /* @__PURE__ */ Zw(u4e, [["__scopeId", "data-v-afcfce15"]]), yi = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const o = e == null ? void 0 : e(r); if (n === !1 || !o) return t == null ? void 0 : t(r); }; var VS; const _o = typeof window < "u", d4e = (e) => typeof e == "string", mP = () => { }, p4e = _o && ((VS = window == null ? void 0 : window.navigator) == null ? void 0 : VS.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function yP(e) { return typeof e == "function" ? e() : y(e); } function f4e(e) { return e; } function bP(e) { return g0() ? (jp(e), !0) : !1; } function gl(e) { var t; const n = yP(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const wP = _o ? window : void 0; function m1(...e) { let t, n, r, o; if (d4e(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = wP) : [t, n, r, o] = e, !t) return mP; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const a = [], i = () => { a.forEach((c) => c()), a.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = ce(() => [gl(t), yP(o)], ([c, d]) => { i(), c && a.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return bP(u), u; } let jS = !1; function h4e(e, t, n = {}) { const { window: r = wP, ignore: o = [], capture: a = !0, detectIframe: i = !1 } = n; if (!r) return; p4e && !jS && (jS = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", mP))); let s = !0; const l = (c) => o.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = gl(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ m1(r, "click", (c) => { const d = gl(e); if (!(!d || d === c.target || c.composedPath().includes(d))) { if (c.detail === 0 && (s = !l(c)), !s) { s = !0; return; } t(c); } }, { passive: !0, capture: a }), m1(r, "pointerdown", (c) => { const d = gl(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && m1(r, "blur", (c) => { var d; const f = gl(e); ((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(f != null && f.contains(r.document.activeElement)) && t(c); }) ].filter(Boolean); return () => u.forEach((c) => c()); } const HS = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, US = "__vueuse_ssr_handlers__"; HS[US] = HS[US] || {}; var qS; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(qS || (qS = {})); var v4e = Object.defineProperty, WS = Object.getOwnPropertySymbols, g4e = Object.prototype.hasOwnProperty, m4e = Object.prototype.propertyIsEnumerable, GS = (e, t, n) => t in e ? v4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y4e = (e, t) => { for (var n in t || (t = {})) g4e.call(t, n) && GS(e, n, t[n]); if (WS) for (var n of WS(t)) m4e.call(t, n) && GS(e, n, t[n]); return e; }; const b4e = { 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] }; y4e({ linear: f4e }, b4e); /** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ process.env.NODE_ENV !== "production" && Object.freeze({}); process.env.NODE_ENV !== "production" && Object.freeze([]); const o0 = () => { }, w4e = Object.prototype.hasOwnProperty, KS = (e, t) => w4e.call(e, t), x4e = Array.isArray, Ld = (e) => typeof e == "function", Zc = (e) => typeof e == "string", Ff = (e) => e !== null && typeof e == "object", xP = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, k4e = /-(\w)/g, C4e = xP((e) => e.replace(k4e, (t, n) => n ? n.toUpperCase() : "")), S4e = /\B([A-Z])/g, E4e = xP( (e) => e.replace(S4e, "-$1").toLowerCase() ); var $4e = typeof global == "object" && global && global.Object === Object && global, _4e = typeof self == "object" && self && self.Object === Object && self, Jw = $4e || _4e || Function("return this")(), zs = Jw.Symbol, kP = Object.prototype, T4e = kP.hasOwnProperty, O4e = kP.toString, xd = zs ? zs.toStringTag : void 0; function F4e(e) { var t = T4e.call(e, xd), n = e[xd]; try { e[xd] = void 0; var r = !0; } catch { } var o = O4e.call(e); return r && (t ? e[xd] = n : delete e[xd]), o; } var I4e = Object.prototype, A4e = I4e.toString; function P4e(e) { return A4e.call(e); } var L4e = "[object Null]", R4e = "[object Undefined]", YS = zs ? zs.toStringTag : void 0; function Qw(e) { return e == null ? e === void 0 ? R4e : L4e : YS && YS in Object(e) ? F4e(e) : P4e(e); } function ex(e) { return e != null && typeof e == "object"; } var D4e = "[object Symbol]"; function tx(e) { return typeof e == "symbol" || ex(e) && Qw(e) == D4e; } function M4e(e, t) { for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; ) o[n] = t(e[n], n, e); return o; } var If = Array.isArray, N4e = 1 / 0, XS = zs ? zs.prototype : void 0, ZS = XS ? XS.toString : void 0; function CP(e) { if (typeof e == "string") return e; if (If(e)) return M4e(e, CP) + ""; if (tx(e)) return ZS ? ZS.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -N4e ? "-0" : t; } function a0(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } function B4e(e) { return e; } var z4e = "[object AsyncFunction]", V4e = "[object Function]", j4e = "[object GeneratorFunction]", H4e = "[object Proxy]"; function U4e(e) { if (!a0(e)) return !1; var t = Qw(e); return t == V4e || t == j4e || t == z4e || t == H4e; } var y1 = Jw["__core-js_shared__"], JS = function() { var e = /[^.]+$/.exec(y1 && y1.keys && y1.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function q4e(e) { return !!JS && JS in e; } var W4e = Function.prototype, G4e = W4e.toString; function K4e(e) { if (e != null) { try { return G4e.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var Y4e = /[\\^$.*+?()[\]{}|]/g, X4e = /^\[object .+?Constructor\]$/, Z4e = Function.prototype, J4e = Object.prototype, Q4e = Z4e.toString, eSe = J4e.hasOwnProperty, tSe = RegExp( "^" + Q4e.call(eSe).replace(Y4e, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function nSe(e) { if (!a0(e) || q4e(e)) return !1; var t = U4e(e) ? tSe : X4e; return t.test(K4e(e)); } function rSe(e, t) { return e == null ? void 0 : e[t]; } function nx(e, t) { var n = rSe(e, t); return nSe(n) ? n : void 0; } function oSe(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 aSe = 800, iSe = 16, sSe = Date.now; function lSe(e) { var t = 0, n = 0; return function() { var r = sSe(), o = iSe - (r - n); if (n = r, o > 0) { if (++t >= aSe) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function uSe(e) { return function() { return e; }; } var i0 = function() { try { var e = nx(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), cSe = i0 ? function(e, t) { return i0(e, "toString", { configurable: !0, enumerable: !1, value: uSe(t), writable: !0 }); } : B4e, dSe = lSe(cSe), pSe = 9007199254740991, fSe = /^(?:0|[1-9]\d*)$/; function SP(e, t) { var n = typeof e; return t = t ?? pSe, !!t && (n == "number" || n != "symbol" && fSe.test(e)) && e > -1 && e % 1 == 0 && e < t; } function hSe(e, t, n) { t == "__proto__" && i0 ? i0(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function EP(e, t) { return e === t || e !== e && t !== t; } var vSe = Object.prototype, gSe = vSe.hasOwnProperty; function mSe(e, t, n) { var r = e[t]; (!(gSe.call(e, t) && EP(r, n)) || n === void 0 && !(t in e)) && hSe(e, t, n); } var QS = Math.max; function ySe(e, t, n) { return t = QS(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, o = -1, a = QS(r.length - t, 0), i = Array(a); ++o < a; ) i[o] = r[t + o]; o = -1; for (var s = Array(t + 1); ++o < t; ) s[o] = r[o]; return s[t] = n(i), oSe(e, this, s); }; } var bSe = 9007199254740991; function wSe(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= bSe; } var xSe = "[object Arguments]"; function eE(e) { return ex(e) && Qw(e) == xSe; } var $P = Object.prototype, kSe = $P.hasOwnProperty, CSe = $P.propertyIsEnumerable, _P = eE(/* @__PURE__ */ function() { return arguments; }()) ? eE : function(e) { return ex(e) && kSe.call(e, "callee") && !CSe.call(e, "callee"); }, SSe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ESe = /^\w*$/; function $Se(e, t) { if (If(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || tx(e) ? !0 : ESe.test(e) || !SSe.test(e) || t != null && e in Object(t); } var Dp = nx(Object, "create"); function _Se() { this.__data__ = Dp ? Dp(null) : {}, this.size = 0; } function TSe(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var OSe = "__lodash_hash_undefined__", FSe = Object.prototype, ISe = FSe.hasOwnProperty; function ASe(e) { var t = this.__data__; if (Dp) { var n = t[e]; return n === OSe ? void 0 : n; } return ISe.call(t, e) ? t[e] : void 0; } var PSe = Object.prototype, LSe = PSe.hasOwnProperty; function RSe(e) { var t = this.__data__; return Dp ? t[e] !== void 0 : LSe.call(t, e); } var DSe = "__lodash_hash_undefined__"; function MSe(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Dp && t === void 0 ? DSe : t, this; } function Kl(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Kl.prototype.clear = _Se; Kl.prototype.delete = TSe; Kl.prototype.get = ASe; Kl.prototype.has = RSe; Kl.prototype.set = MSe; function NSe() { this.__data__ = [], this.size = 0; } function Zg(e, t) { for (var n = e.length; n--; ) if (EP(e[n][0], t)) return n; return -1; } var BSe = Array.prototype, zSe = BSe.splice; function VSe(e) { var t = this.__data__, n = Zg(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : zSe.call(t, n, 1), --this.size, !0; } function jSe(e) { var t = this.__data__, n = Zg(t, e); return n < 0 ? void 0 : t[n][1]; } function HSe(e) { return Zg(this.__data__, e) > -1; } function USe(e, t) { var n = this.__data__, r = Zg(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Jc(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } Jc.prototype.clear = NSe; Jc.prototype.delete = VSe; Jc.prototype.get = jSe; Jc.prototype.has = HSe; Jc.prototype.set = USe; var qSe = nx(Jw, "Map"); function WSe() { this.size = 0, this.__data__ = { hash: new Kl(), map: new (qSe || Jc)(), string: new Kl() }; } function GSe(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Jg(e, t) { var n = e.__data__; return GSe(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function KSe(e) { var t = Jg(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function YSe(e) { return Jg(this, e).get(e); } function XSe(e) { return Jg(this, e).has(e); } function ZSe(e, t) { var n = Jg(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function hu(e) { var t = -1, n = e == null ? 0 : e.length; for (this.clear(); ++t < n; ) { var r = e[t]; this.set(r[0], r[1]); } } hu.prototype.clear = WSe; hu.prototype.delete = KSe; hu.prototype.get = YSe; hu.prototype.has = XSe; hu.prototype.set = ZSe; var JSe = "Expected a function"; function rx(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(JSe); var n = function() { var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache; if (a.has(o)) return a.get(o); var i = e.apply(this, r); return n.cache = a.set(o, i) || a, i; }; return n.cache = new (rx.Cache || hu)(), n; } rx.Cache = hu; var QSe = 500; function eEe(e) { var t = rx(e, function(r) { return n.size === QSe && n.clear(), r; }), n = t.cache; return t; } var tEe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, nEe = /\\(\\)?/g, rEe = eEe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(tEe, function(n, r, o, a) { t.push(o ? a.replace(nEe, "$1") : r || n); }), t; }); function oEe(e) { return e == null ? "" : CP(e); } function Qg(e, t) { return If(e) ? e : $Se(e, t) ? [e] : rEe(oEe(e)); } var aEe = 1 / 0; function ox(e) { if (typeof e == "string" || tx(e)) return e; var t = e + ""; return t == "0" && 1 / e == -aEe ? "-0" : t; } function TP(e, t) { t = Qg(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[ox(t[n++])]; return n && n == r ? e : void 0; } function iEe(e, t, n) { var r = e == null ? void 0 : TP(e, t); return r === void 0 ? n : r; } function sEe(e, t) { for (var n = -1, r = t.length, o = e.length; ++n < r; ) e[o + n] = t[n]; return e; } var tE = zs ? zs.isConcatSpreadable : void 0; function lEe(e) { return If(e) || _P(e) || !!(tE && e && e[tE]); } function uEe(e, t, n, r, o) { var a = -1, i = e.length; for (n || (n = lEe), o || (o = []); ++a < i; ) { var s = e[a]; n(s) ? sEe(o, s) : o[o.length] = s; } return o; } function cEe(e) { var t = e == null ? 0 : e.length; return t ? uEe(e) : []; } function dEe(e) { return dSe(ySe(e, void 0, cEe), e + ""); } function pEe(e, t) { return e != null && t in Object(e); } function fEe(e, t, n) { t = Qg(t, e); for (var r = -1, o = t.length, a = !1; ++r < o; ) { var i = ox(t[r]); if (!(a = e != null && n(e, i))) break; e = e[i]; } return a || ++r != o ? a : (o = e == null ? 0 : e.length, !!o && wSe(o) && SP(i, o) && (If(e) || _P(e))); } function hEe(e, t) { return e != null && fEe(e, t, pEe); } function Qy(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var o = e[t]; r[o[0]] = o[1]; } return r; } function ax(e) { return e == null; } function vEe(e) { return e === void 0; } function gEe(e, t, n, r) { if (!a0(e)) return e; t = Qg(t, e); for (var o = -1, a = t.length, i = a - 1, s = e; s != null && ++o < a; ) { var l = ox(t[o]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (o != i) { var c = s[l]; u = void 0, u === void 0 && (u = a0(c) ? c : SP(t[o + 1]) ? [] : {}); } mSe(s, l, u), s = s[l]; } return e; } function mEe(e, t, n) { for (var r = -1, o = t.length, a = {}; ++r < o; ) { var i = t[r], s = TP(e, i); n(s, i) && gEe(a, Qg(i, e), s); } return a; } function yEe(e, t) { return mEe(e, t, function(n, r) { return hEe(e, r); }); } var bEe = dEe(function(e, t) { return e == null ? {} : yEe(e, t); }); const wEe = (e) => e === void 0, ix = (e) => typeof e == "boolean", Mp = (e) => typeof e == "number", Kd = (e) => typeof Element > "u" ? !1 : e instanceof Element, xEe = (e) => Zc(e) ? !Number.isNaN(Number(e)) : !1, nE = (e) => Object.keys(e); class kEe extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function Yl(e, t) { if (process.env.NODE_ENV !== "production") { const n = Zc(e) ? new kEe(`[${e}] ${t}`) : e; console.warn(n); } } const CEe = "utils/dom/style", OP = (e = "") => e.split(" ").filter((t) => !!t.trim()), rE = (e, t) => { !e || !t.trim() || e.classList.add(...OP(t)); }, s0 = (e, t) => { !e || !t.trim() || e.classList.remove(...OP(t)); }, kd = (e, t) => { var n; if (!_o || !e || !t) return ""; let r = C4e(t); r === "float" && (r = "cssFloat"); try { const o = e.style[r]; if (o) return o; const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return a ? a[r] : ""; } catch { return e.style[r]; } }; function FP(e, t = "px") { if (!e) return ""; if (Mp(e) || xEe(e)) return `${e}${t}`; if (Zc(e)) return e; Yl(CEe, "binding value must be a string or number"); } /*! Element Plus Icons Vue v2.3.1 */ var SEe = /* @__PURE__ */ K({ name: "Loading", __name: "loading", setup(e) { return (t, n) => (E(), L("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ B("path", { fill: "currentColor", d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z" }) ])); } }), EEe = SEe; const IP = "__epPropKey", Mt = (e) => e, $Ee = (e) => Ff(e) && !!e[IP], em = (e, t) => { if (!Ff(e) || $Ee(e)) return e; const { values: n, required: r, default: o, type: a, validator: i } = e, s = { type: a, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), KS(e, "default") && c.push(o), u || (u = c.includes(l))), i && (u || (u = i(l))), !u && c.length > 0) { const d = [...new Set(c)].map((f) => JSON.stringify(f)).join(", "); m0(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [IP]: !0 }; return KS(e, "default") && (s.default = o), s; }, ir = (e) => Qy(Object.entries(e).map(([t, n]) => [ t, em(n, t) ])), eb = Mt([ String, Object, Function ]), vu = (e, t) => { if (e.install = (n) => { for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r); }, t) for (const [n, r] of Object.entries(t)) e[n] = r; return e; }, _Ee = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), TEe = (e) => (e.install = o0, e), l0 = { 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" }, OEe = ["", "default", "small", "large"], FEe = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, i) => { ce(() => y(i), (s) => { s && Yl(n, `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${o} `); }, { immediate: !0 }); }; var IEe = { name: "en", el: { breadcrumb: { label: "Breadcrumb" }, colorpicker: { confirm: "OK", clear: "Clear", defaultLabel: "color picker", description: "current color is {color}. press enter to select a new color.", alphaLabel: "pick alpha value" }, datepicker: { now: "Now", today: "Today", cancel: "Cancel", clear: "Clear", confirm: "OK", dateTablePrompt: "Use the arrow keys and enter to select the day of the month", monthTablePrompt: "Use the arrow keys and enter to select the month", yearTablePrompt: "Use the arrow keys and enter to select the year", selectedDate: "Selected date", selectDate: "Select date", selectTime: "Select time", startDate: "Start Date", startTime: "Start Time", endDate: "End Date", endTime: "End Time", prevYear: "Previous Year", nextYear: "Next Year", prevMonth: "Previous Month", nextMonth: "Next Month", year: "", month1: "January", month2: "February", month3: "March", month4: "April", month5: "May", month6: "June", month7: "July", month8: "August", month9: "September", month10: "October", month11: "November", month12: "December", week: "week", weeks: { sun: "Sun", mon: "Mon", tue: "Tue", wed: "Wed", thu: "Thu", fri: "Fri", sat: "Sat" }, weeksFull: { sun: "Sunday", mon: "Monday", tue: "Tuesday", wed: "Wednesday", thu: "Thursday", fri: "Friday", sat: "Saturday" }, months: { jan: "Jan", feb: "Feb", mar: "Mar", apr: "Apr", may: "May", jun: "Jun", jul: "Jul", aug: "Aug", sep: "Sep", oct: "Oct", nov: "Nov", dec: "Dec" } }, inputNumber: { decrease: "decrease number", increase: "increase number" }, select: { loading: "Loading", noMatch: "No matching data", noData: "No data", placeholder: "Select" }, mention: { loading: "Loading" }, dropdown: { toggleDropdown: "Toggle Dropdown" }, cascader: { noMatch: "No matching data", loading: "Loading", placeholder: "Select", noData: "No data" }, pagination: { goto: "Go to", pagesize: "/page", total: "Total {total}", pageClassifier: "", page: "Page", prev: "Go to previous page", next: "Go to next page", currentPage: "page {pager}", prevPages: "Previous {pager} pages", nextPages: "Next {pager} pages", deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details" }, dialog: { close: "Close this dialog" }, drawer: { close: "Close this dialog" }, messagebox: { title: "Message", confirm: "OK", cancel: "Cancel", error: "Illegal input", close: "Close this dialog" }, upload: { deleteTip: "press delete to remove", delete: "Delete", preview: "Preview", continue: "Continue" }, slider: { defaultLabel: "slider between {min} and {max}", defaultRangeStartLabel: "pick start value", defaultRangeEndLabel: "pick end value" }, table: { emptyText: "No Data", confirmFilter: "Confirm", resetFilter: "Reset", clearFilter: "All", sumText: "Sum" }, tour: { next: "Next", previous: "Previous", finish: "Finish" }, tree: { emptyText: "No Data" }, transfer: { noMatch: "No matching data", noData: "No data", titles: ["List 1", "List 2"], filterPlaceholder: "Enter keyword", noCheckedFormat: "{total} items", hasCheckedFormat: "{checked}/{total} checked" }, image: { error: "FAILED" }, pageHeader: { title: "Back" }, popconfirm: { confirmButtonText: "Yes", cancelButtonText: "No" }, carousel: { leftArrow: "Carousel arrow left", rightArrow: "Carousel arrow right", indicator: "Carousel switch to index {index}" } } }; const AEe = (e) => (t, n) => PEe(t, n, y(e)), PEe = (e, t, n) => iEe(n, e, e).replace(/\{(\w+)\}/g, (r, o) => { var a; return `${(a = t == null ? void 0 : t[o]) != null ? a : `{${o}}`}`; }), LEe = (e) => { const t = $(() => y(e).name), n = Gn(e) ? e : z(e); return { lang: t, locale: n, t: AEe(e) }; }, AP = Symbol("localeContextKey"), REe = (e) => { const t = e || xe(AP, z()); return LEe($(() => t.value || IEe)); }, hv = "el", DEe = "is-", il = (e, t, n, r, o) => { let a = `${e}-${t}`; return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a; }, PP = Symbol("namespaceContextKey"), sx = (e) => { const t = e || (rt() ? xe(PP, z(hv)) : z(hv)); return $(() => y(t) || hv); }, na = (e, t) => { const n = sx(t); return { namespace: n, b: (r = "") => il(n.value, e, r, "", ""), e: (r) => r ? il(n.value, e, "", r, "") : "", m: (r) => r ? il(n.value, e, "", "", r) : "", be: (r, o) => r && o ? il(n.value, e, r, o, "") : "", em: (r, o) => r && o ? il(n.value, e, "", r, o) : "", bm: (r, o) => r && o ? il(n.value, e, r, "", o) : "", bem: (r, o, a) => r && o && a ? il(n.value, e, r, o, a) : "", is: (r, ...o) => { const a = o.length >= 1 ? o[0] : !0; return r && a ? `${DEe}${r}` : ""; }, cssVar: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${a}`] = r[a]); return o; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const o = {}; for (const a in r) r[a] && (o[`--${n.value}-${e}-${a}`] = r[a]); return o; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, MEe = em({ type: Mt(Boolean), default: null }), NEe = em({ type: Mt(Function) }), BEe = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], o = { [e]: MEe, [n]: NEe }; return { useModelToggle: ({ indicator: a, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = rt(), { emit: f } = d, h = d.props, p = $(() => Ld(h[n])), v = $(() => h[e] === null), m = (k) => { a.value !== !0 && (a.value = !0, i && (i.value = k), Ld(u) && u(k)); }, g = (k) => { a.value !== !1 && (a.value = !1, i && (i.value = k), Ld(c) && c(k)); }, b = (k) => { if (h.disabled === !0 || Ld(l) && !l()) return; const S = p.value && _o; S && f(t, !0), (v.value || !S) && m(k); }, C = (k) => { if (h.disabled === !0 || !_o) return; const S = p.value && _o; S && f(t, !1), (v.value || !S) && g(k); }, x = (k) => { ix(k) && (h.disabled && k ? p.value && f(t, !1) : a.value !== k && (k ? m() : g())); }, w = () => { a.value ? C() : b(); }; return ce(() => h[e], x), s && d.appContext.config.globalProperties.$route !== void 0 && ce(() => ({ ...d.proxy.$route }), () => { s.value && a.value && C(); }), at(() => { x(h[e]); }), { hide: C, show: b, toggle: w, hasUpdateHandler: p }; }, useModelToggleProps: o, useModelToggleEmits: r }; }, LP = (e) => { const t = rt(); return $(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var ho = "top", ea = "bottom", ta = "right", vo = "left", lx = "auto", Af = [ho, ea, ta, vo], Cc = "start", Np = "end", zEe = "clippingParents", RP = "viewport", Cd = "popper", VEe = "reference", oE = Af.reduce(function(e, t) { return e.concat([t + "-" + Cc, t + "-" + Np]); }, []), ux = [].concat(Af, [lx]).reduce(function(e, t) { return e.concat([t, t + "-" + Cc, t + "-" + Np]); }, []), jEe = "beforeRead", HEe = "read", UEe = "afterRead", qEe = "beforeMain", WEe = "main", GEe = "afterMain", KEe = "beforeWrite", YEe = "write", XEe = "afterWrite", ZEe = [jEe, HEe, UEe, qEe, WEe, GEe, KEe, YEe, XEe]; function ri(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Fa(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Sc(e) { var t = Fa(e).Element; return e instanceof t || e instanceof Element; } function Uo(e) { var t = Fa(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function cx(e) { if (typeof ShadowRoot > "u") return !1; var t = Fa(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function JEe(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n]; !Uo(a) || !ri(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { var s = o[i]; s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s); })); }); } function QEe(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(r) { var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), s = i.reduce(function(l, u) { return l[u] = "", l; }, {}); !Uo(o) || !ri(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(l) { o.removeAttribute(l); })); }); }; } var DP = { name: "applyStyles", enabled: !0, phase: "write", fn: JEe, effect: QEe, requires: ["computeStyles"] }; function Wa(e) { return e.split("-")[0]; } var Ol = Math.max, u0 = Math.min, Ec = Math.round; function $c(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, o = 1; if (Uo(e) && t) { var a = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Ec(n.width) / i || 1), a > 0 && (o = Ec(n.height) / a || 1); } return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o }; } function dx(e) { var t = $c(e), n = e.offsetWidth, r = e.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: r }; } function MP(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && cx(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Ni(e) { return Fa(e).getComputedStyle(e); } function e$e(e) { return ["table", "td", "th"].indexOf(ri(e)) >= 0; } function Xs(e) { return ((Sc(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function tm(e) { return ri(e) === "html" ? e : e.assignedSlot || e.parentNode || (cx(e) ? e.host : null) || Xs(e); } function aE(e) { return !Uo(e) || Ni(e).position === "fixed" ? null : e.offsetParent; } function t$e(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Uo(e)) { var r = Ni(e); if (r.position === "fixed") return null; } var o = tm(e); for (cx(o) && (o = o.host); Uo(o) && ["html", "body"].indexOf(ri(o)) < 0; ) { var a = Ni(o); 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 o; o = o.parentNode; } return null; } function Pf(e) { for (var t = Fa(e), n = aE(e); n && e$e(n) && Ni(n).position === "static"; ) n = aE(n); return n && (ri(n) === "html" || ri(n) === "body" && Ni(n).position === "static") ? t : n || t$e(e) || t; } function px(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Yd(e, t, n) { return Ol(e, u0(t, n)); } function n$e(e, t, n) { var r = Yd(e, t, n); return r > n ? n : r; } function NP() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function BP(e) { return Object.assign({}, NP(), e); } function zP(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var r$e = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, BP(typeof e != "number" ? e : zP(e, Af)); }; function o$e(e) { var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Wa(n.placement), l = px(s), u = [vo, ta].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!a || !i)) { var d = r$e(o.padding, n), f = dx(a), h = l === "y" ? ho : vo, p = l === "y" ? ea : ta, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Pf(a), b = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, C = v / 2 - m / 2, x = d[h], w = b - f[c] - d[p], k = b / 2 - f[c] / 2 + C, S = Yd(x, k, w), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - k, t); } } function a$e(e) { var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r; o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || !MP(t.elements.popper, o) || (t.elements.arrow = o)); } var i$e = { name: "arrow", enabled: !0, phase: "main", fn: o$e, effect: a$e, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function _c(e) { return e.split("-")[1]; } var s$e = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function l$e(e) { var t = e.x, n = e.y, r = window, o = r.devicePixelRatio || 1; return { x: Ec(t * o) / o || 0, y: Ec(n * o) / o || 0 }; } function iE(e) { var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, d = e.isFixed, f = i.x, h = f === void 0 ? 0 : f, p = i.y, v = p === void 0 ? 0 : p, m = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v }; h = m.x, v = m.y; var g = i.hasOwnProperty("x"), b = i.hasOwnProperty("y"), C = vo, x = ho, w = window; if (u) { var k = Pf(n), S = "clientHeight", _ = "clientWidth"; if (k === Fa(n) && (k = Xs(n), Ni(k).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), k = k, o === ho || (o === vo || o === ta) && a === Np) { x = ea; var O = d && k === w && w.visualViewport ? w.visualViewport.height : k[S]; v -= O - r.height, v *= l ? 1 : -1; } if (o === vo || (o === ho || o === ea) && a === Np) { C = ta; var F = d && k === w && w.visualViewport ? w.visualViewport.width : k[_]; h -= F - r.width, h *= l ? 1 : -1; } } var I = Object.assign({ position: s }, u && s$e), P = c === !0 ? l$e({ x: h, y: v }) : { x: h, y: v }; if (h = P.x, v = P.y, l) { var M; return Object.assign({}, I, (M = {}, M[x] = b ? "0" : "", M[C] = g ? "0" : "", M.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", M)); } return Object.assign({}, I, (t = {}, t[x] = b ? v + "px" : "", t[C] = g ? h + "px" : "", t.transform = "", t)); } function u$e(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: Wa(t.placement), variation: _c(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, iE(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, iE(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } var VP = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: u$e, data: {} }, Fh = { passive: !0 }; function c$e(e) { var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, s = i === void 0 ? !0 : i, l = Fa(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && u.forEach(function(c) { c.addEventListener("scroll", n.update, Fh); }), s && l.addEventListener("resize", n.update, Fh), function() { a && u.forEach(function(c) { c.removeEventListener("scroll", n.update, Fh); }), s && l.removeEventListener("resize", n.update, Fh); }; } var jP = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: c$e, data: {} }, d$e = { left: "right", right: "left", bottom: "top", top: "bottom" }; function vv(e) { return e.replace(/left|right|bottom|top/g, function(t) { return d$e[t]; }); } var p$e = { start: "end", end: "start" }; function sE(e) { return e.replace(/start|end/g, function(t) { return p$e[t]; }); } function fx(e) { var t = Fa(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function hx(e) { return $c(Xs(e)).left + fx(e).scrollLeft; } function f$e(e) { var t = Fa(e), n = Xs(e), r = t.visualViewport, o = n.clientWidth, a = n.clientHeight, i = 0, s = 0; return r && (o = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: o, height: a, x: i + hx(e), y: s }; } function h$e(e) { var t, n = Xs(e), r = fx(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = Ol(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = Ol(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + hx(e), l = -r.scrollTop; return Ni(o || n).direction === "rtl" && (s += Ol(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, height: i, x: s, y: l }; } function vx(e) { var t = Ni(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } function HP(e) { return ["html", "body", "#document"].indexOf(ri(e)) >= 0 ? e.ownerDocument.body : Uo(e) && vx(e) ? e : HP(tm(e)); } function Xd(e, t) { var n; t === void 0 && (t = []); var r = HP(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Fa(r), i = o ? [a].concat(a.visualViewport || [], vx(r) ? r : []) : r, s = t.concat(i); return o ? s : s.concat(Xd(tm(i))); } function tb(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function v$e(e) { var t = $c(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 lE(e, t) { return t === RP ? tb(f$e(e)) : Sc(t) ? v$e(t) : tb(h$e(Xs(e))); } function g$e(e) { var t = Xd(tm(e)), n = ["absolute", "fixed"].indexOf(Ni(e).position) >= 0, r = n && Uo(e) ? Pf(e) : e; return Sc(r) ? t.filter(function(o) { return Sc(o) && MP(o, r) && ri(o) !== "body"; }) : []; } function m$e(e, t, n) { var r = t === "clippingParents" ? g$e(e) : [].concat(t), o = [].concat(r, [n]), a = o[0], i = o.reduce(function(s, l) { var u = lE(e, l); return s.top = Ol(u.top, s.top), s.right = u0(u.right, s.right), s.bottom = u0(u.bottom, s.bottom), s.left = Ol(u.left, s.left), s; }, lE(e, a)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function UP(e) { var t = e.reference, n = e.element, r = e.placement, o = r ? Wa(r) : null, a = r ? _c(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (o) { case ho: l = { x: i, y: t.y - n.height }; break; case ea: l = { x: i, y: t.y + t.height }; break; case ta: l = { x: t.x + t.width, y: s }; break; case vo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = o ? px(o) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (a) { case Cc: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case Np: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function Bp(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.boundary, i = a === void 0 ? zEe : a, s = n.rootBoundary, l = s === void 0 ? RP : s, u = n.elementContext, c = u === void 0 ? Cd : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = BP(typeof p != "number" ? p : zP(p, Af)), m = c === Cd ? VEe : Cd, g = e.rects.popper, b = e.elements[f ? m : c], C = m$e(Sc(b) ? b : b.contextElement || Xs(e.elements.popper), i, l), x = $c(e.elements.reference), w = UP({ reference: x, element: g, strategy: "absolute", placement: o }), k = tb(Object.assign({}, g, w)), S = c === Cd ? k : x, _ = { top: C.top - S.top + v.top, bottom: S.bottom - C.bottom + v.bottom, left: C.left - S.left + v.left, right: S.right - C.right + v.right }, O = e.modifiersData.offset; if (c === Cd && O) { var F = O[o]; Object.keys(_).forEach(function(I) { var P = [ta, ea].indexOf(I) >= 0 ? 1 : -1, M = [ho, ea].indexOf(I) >= 0 ? "y" : "x"; _[I] += F[M] * P; }); } return _; } function y$e(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? ux : l, c = _c(r), d = c ? s ? oE : oE.filter(function(p) { return _c(p) === c; }) : Af, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d); var h = f.reduce(function(p, v) { return p[v] = Bp(e, { placement: v, boundary: o, rootBoundary: a, padding: i })[Wa(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function b$e(e) { if (Wa(e) === lx) return []; var t = vv(e); return [sE(e), t, sE(t)]; } function w$e(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, u = n.padding, c = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, m = t.options.placement, g = Wa(m), b = g === m, C = l || (b || !p ? [vv(m)] : b$e(m)), x = [m].concat(C).reduce(function(we, be) { return we.concat(Wa(be) === lx ? y$e(t, { placement: be, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : be); }, []), w = t.rects.reference, k = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, O = x[0], F = 0; F < x.length; F++) { var I = x[F], P = Wa(I), M = _c(I) === Cc, N = [ho, ea].indexOf(P) >= 0, j = N ? "width" : "height", A = Bp(t, { placement: I, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), U = N ? M ? ta : vo : M ? ea : ho; w[j] > k[j] && (U = vv(U)); var q = vv(U), Y = []; if (a && Y.push(A[P] <= 0), s && Y.push(A[U] <= 0, A[q] <= 0), Y.every(function(we) { return we; })) { O = I, _ = !1; break; } S.set(I, Y); } if (_) for (var ie = p ? 3 : 1, re = function(we) { var be = x.find(function(de) { var ae = S.get(de); if (ae) return ae.slice(0, we).every(function(ee) { return ee; }); }); if (be) return O = be, "break"; }, le = ie; le > 0; le--) { var he = re(le); if (he === "break") break; } t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } var x$e = { name: "flip", enabled: !0, phase: "main", fn: w$e, requiresIfExists: ["offset"], data: { _skip: !1 } }; function uE(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 cE(e) { return [ho, ta, ea, vo].some(function(t) { return e[t] >= 0; }); } function k$e(e) { var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Bp(t, { elementContext: "reference" }), s = Bp(t, { altBoundary: !0 }), l = uE(i, r), u = uE(s, o, a), c = cE(l), d = cE(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 C$e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: k$e }; function S$e(e, t, n) { var r = Wa(e), o = [vo, ho].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = a[0], s = a[1]; return i = i || 0, s = (s || 0) * o, [vo, ta].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function E$e(e) { var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = ux.reduce(function(c, d) { return c[d] = S$e(d, t.rects, a), c; }, {}), s = i[t.placement], l = s.x, u = s.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[r] = i; } var $$e = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: E$e }; function _$e(e) { var t = e.state, n = e.name; t.modifiersData[n] = UP({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var qP = { name: "popperOffsets", enabled: !0, phase: "read", fn: _$e, data: {} }; function T$e(e) { return e === "x" ? "y" : "x"; } function O$e(e) { var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, p = n.tetherOffset, v = p === void 0 ? 0 : p, m = Bp(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = Wa(t.placement), b = _c(t.placement), C = !b, x = px(g), w = T$e(x), k = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, O = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof O == "number" ? { mainAxis: O, altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 }, O), I = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, P = { x: 0, y: 0 }; if (k) { if (a) { var M, N = x === "y" ? ho : vo, j = x === "y" ? ea : ta, A = x === "y" ? "height" : "width", U = k[x], q = U + m[N], Y = U - m[j], ie = h ? -_[A] / 2 : 0, re = b === Cc ? S[A] : _[A], le = b === Cc ? -_[A] : -S[A], he = t.elements.arrow, we = h && he ? dx(he) : { width: 0, height: 0 }, be = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : NP(), de = be[N], ae = be[j], ee = Yd(0, S[A], we[A]), se = C ? S[A] / 2 - ie - ee - de - F.mainAxis : re - ee - de - F.mainAxis, pe = C ? -S[A] / 2 + ie + ee + ae + F.mainAxis : le + ee + ae + F.mainAxis, Se = t.elements.arrow && Pf(t.elements.arrow), Le = Se ? x === "y" ? Se.clientTop || 0 : Se.clientLeft || 0 : 0, je = (M = I == null ? void 0 : I[x]) != null ? M : 0, _e = U + se - je - Le, ze = U + pe - je, Ie = Yd(h ? u0(q, _e) : q, U, h ? Ol(Y, ze) : Y); k[x] = Ie, P[x] = Ie - U; } if (s) { var He, qe = x === "x" ? ho : vo, et = x === "x" ? ea : ta, Ve = k[w], nt = w === "y" ? "height" : "width", ot = Ve + m[qe], pt = Ve - m[et], T = [ho, vo].indexOf(g) !== -1, G = (He = I == null ? void 0 : I[w]) != null ? He : 0, fe = T ? ot : Ve - S[nt] - _[nt] - G + F.altAxis, ge = T ? Ve + S[nt] + _[nt] - G - F.altAxis : pt, ve = h && T ? n$e(fe, Ve, ge) : Yd(h ? fe : ot, Ve, h ? ge : pt); k[w] = ve, P[w] = ve - Ve; } t.modifiersData[r] = P; } } var F$e = { name: "preventOverflow", enabled: !0, phase: "main", fn: O$e, requiresIfExists: ["offset"] }; function I$e(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function A$e(e) { return e === Fa(e) || !Uo(e) ? fx(e) : I$e(e); } function P$e(e) { var t = e.getBoundingClientRect(), n = Ec(t.width) / e.offsetWidth || 1, r = Ec(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function L$e(e, t, n) { n === void 0 && (n = !1); var r = Uo(t), o = Uo(t) && P$e(t), a = Xs(t), i = $c(e, o), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((ri(t) !== "body" || vx(a)) && (s = A$e(t)), Uo(t) ? (l = $c(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = hx(a))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function R$e(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(a) { t.set(a.name, a); }); function o(a) { n.add(a.name); var i = [].concat(a.requires || [], a.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && o(l); } }), r.push(a); } return e.forEach(function(a) { n.has(a.name) || o(a); }), r; } function D$e(e) { var t = R$e(e); return ZEe.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } function M$e(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function N$e(e) { var t = e.reduce(function(n, r) { var o = n[r.name]; return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var dE = { placement: "bottom", modifiers: [], strategy: "absolute" }; function pE() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } function gx(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? dE : o; return function(i, s, l) { l === void 0 && (l = a); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, dE, a), modifiersData: {}, elements: { reference: i, popper: s }, attributes: {}, styles: {} }, c = [], d = !1, f = { state: u, setOptions: function(v) { var m = typeof v == "function" ? v(u.options) : v; p(), u.options = Object.assign({}, a, u.options, m), u.scrollParents = { reference: Sc(i) ? Xd(i) : i.contextElement ? Xd(i.contextElement) : [], popper: Xd(s) }; var g = D$e(N$e([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(b) { return b.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (pE(m, g)) { u.rects = { reference: L$e(m, Pf(g), u.options.strategy === "fixed"), popper: dx(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var b = 0; b < u.orderedModifiers.length; b++) { if (u.reset === !0) { u.reset = !1, b = -1; continue; } var C = u.orderedModifiers[b], x = C.fn, w = C.options, k = w === void 0 ? {} : w, S = C.name; typeof x == "function" && (u = x({ state: u, options: k, name: S, instance: f }) || u); } } } }, update: M$e(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!pE(i, s)) return f; f.setOptions(l).then(function(v) { !d && l.onFirstUpdate && l.onFirstUpdate(v); }); function h() { u.orderedModifiers.forEach(function(v) { var m = v.name, g = v.options, b = g === void 0 ? {} : g, C = v.effect; if (typeof C == "function") { var x = C({ state: u, name: m, instance: f, options: b }), w = function() { }; c.push(x || w); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } gx(); var B$e = [jP, qP, VP, DP]; gx({ defaultModifiers: B$e }); var z$e = [jP, qP, VP, DP, $$e, x$e, F$e, i$e, C$e], V$e = gx({ defaultModifiers: z$e }); const j$e = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = H$e(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, o = $(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = y(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), a = On(), i = z({ styles: { popper: { position: y(o).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { a.value && (a.value.destroy(), a.value = void 0); }; return ce(o, (l) => { const u = y(a); u && u.setOptions(l); }, { deep: !0 }), ce([e, t], ([l, u]) => { s(), !(!l || !u) && (a.value = V$e(l, u, y(o))); }), Tt(() => { s(); }), { state: $(() => { var l; return { ...((l = y(a)) == null ? void 0 : l.state) || {} }; }), styles: $(() => y(i).styles), attributes: $(() => y(i).attributes), update: () => { var l; return (l = y(a)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = y(a)) == null ? void 0 : l.forceUpdate(); }, instanceRef: $(() => y(a)) }; }; function H$e(e) { const t = Object.keys(e.elements), n = Qy(t.map((o) => [o, e.styles[o] || {}])), r = Qy(t.map((o) => [o, e.attributes[o]])); return { styles: n, attributes: r }; } function fE() { let e; const t = (r, o) => { n(), e = window.setTimeout(r, o); }, n = () => window.clearTimeout(e); return bP(() => n()), { registerTimeout: t, cancelTimeout: n }; } const nb = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, U$e = Symbol("elIdInjection"), WP = () => rt() ? xe(U$e, nb) : nb, q$e = (e) => { const t = WP(); !_o && t === nb && Yl("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 = sx(); return $(() => y(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Nu = []; const hE = (e) => { const t = e; t.key === l0.esc && Nu.forEach((n) => n(t)); }, W$e = (e) => { at(() => { Nu.length === 0 && document.addEventListener("keydown", hE), _o && Nu.push(e); }), Tt(() => { Nu = Nu.filter((t) => t !== e), Nu.length === 0 && _o && document.removeEventListener("keydown", hE); }); }; let vE; const GP = () => { const e = sx(), t = WP(), n = $(() => `${e.value}-popper-container-${t.prefix}`), r = $(() => `#${n.value}`); return { id: n, selector: r }; }, G$e = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, K$e = () => { const { id: e, selector: t } = GP(); return y0(() => { _o && (process.env.NODE_ENV === "test" || !vE || !document.body.querySelector(t.value)) && (vE = G$e(e.value)); }), { id: e, selector: t }; }, Y$e = ir({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), X$e = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: o }) => { const { registerTimeout: a } = fE(), { registerTimeout: i, cancelTimeout: s } = fE(); return { onOpen: (l) => { a(() => { r(l); const u = y(n); Mp(u) && u > 0 && i(() => { o(l); }, u); }, y(e)); }, onClose: (l) => { s(), a(() => { o(l); }, y(t)); } }; }, KP = Symbol("elForwardRef"), Z$e = (e) => { tt(KP, { setForwardRef: (t) => { e.value = t; } }); }, J$e = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), gE = { current: 0 }, mE = z(0), YP = 2e3, yE = Symbol("elZIndexContextKey"), XP = Symbol("zIndexContextKey"), ZP = (e) => { const t = rt() ? xe(yE, gE) : gE, n = e || (rt() ? xe(XP, void 0) : void 0), r = $(() => { const i = y(n); return Mp(i) ? i : YP; }), o = $(() => r.value + mE.value), a = () => (t.current++, mE.value = t.current, o.value); return !_o && !xe(yE) && Yl("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: r, currentZIndex: o, nextZIndex: a }; }, Q$e = em({ type: String, values: OEe, required: !1 }), JP = Symbol("size"), e_e = () => { const e = xe(JP, {}); return $(() => y(e.size) || ""); }, t_e = Symbol("emptyValuesContextKey"); ir({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Ld(e) ? !e() : !e } }); const n_e = ir({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), QP = (e) => bEe(n_e, e), e9 = Symbol(), c0 = z(); function mx(e, t = void 0) { const n = rt() ? xe(e9, c0) : c0; return e ? $(() => { var r, o; return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t; }) : n; } function r_e(e, t) { const n = mx(), r = na(e, $(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || hv; })), o = REe($(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), a = ZP($(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || YP; })), i = $(() => { var s; return y(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return o_e($(() => y(n) || {})), { ns: r, locale: o, zIndex: a, size: i }; } const o_e = (e, t, n = !1) => { var r; const o = !!rt(), a = o ? mx() : void 0, i = (r = void 0) != null ? r : o ? tt : void 0; if (!i) { Yl("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = $(() => { const l = y(e); return a != null && a.value ? a_e(a.value, l) : l; }); return i(e9, s), i(AP, $(() => s.value.locale)), i(PP, $(() => s.value.namespace)), i(XP, $(() => s.value.zIndex)), i(JP, { size: $(() => s.value.size || "") }), i(t_e, $(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !c0.value) && (c0.value = s.value), s; }, a_e = (e, t) => { const n = [.../* @__PURE__ */ new Set([...nE(e), ...nE(t)])], r = {}; for (const o of n) r[o] = t[o] !== void 0 ? t[o] : e[o]; return r; }; var Ur = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }; const i_e = ir({ size: { type: Mt([Number, String]) }, color: { type: String } }), s_e = K({ name: "ElIcon", inheritAttrs: !1 }), l_e = /* @__PURE__ */ K({ ...s_e, props: i_e, setup(e) { const t = e, n = na("icon"), r = $(() => { const { size: o, color: a } = t; return !o && !a ? {} : { fontSize: wEe(o) ? void 0 : FP(o), "--color": a }; }); return (o, a) => (E(), L("i", Lt({ class: y(n).b(), style: y(r) }, o.$attrs), [ oe(o.$slots, "default") ], 16)); } }); var u_e = /* @__PURE__ */ Ur(l_e, [["__file", "icon.vue"]]); const bE = vu(u_e), yx = Symbol("formContextKey"), d0 = Symbol("formItemContextKey"), c_e = (e, t = {}) => { const n = z(void 0), r = t.prop ? n : LP("size"), o = t.global ? n : e_e(), a = t.form ? { size: void 0 } : xe(yx, void 0), i = t.formItem ? { size: void 0 } : xe(d0, void 0); return $(() => r.value || y(e) || (i == null ? void 0 : i.size) || (a == null ? void 0 : a.size) || o.value || ""); }, t9 = (e) => { const t = LP("disabled"), n = xe(yx, void 0); return $(() => t.value || y(e) || (n == null ? void 0 : n.disabled) || !1); }, d_e = () => { const e = xe(yx, void 0), t = xe(d0, void 0); return { form: e, formItem: t }; }, bx = Symbol("popper"), n9 = Symbol("popperContent"), p_e = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], r9 = ir({ role: { type: String, values: p_e, default: "tooltip" } }), f_e = K({ name: "ElPopper", inheritAttrs: !1 }), h_e = /* @__PURE__ */ K({ ...f_e, props: r9, setup(e, { expose: t }) { const n = e, r = z(), o = z(), a = z(), i = z(), s = $(() => n.role), l = { triggerRef: r, popperInstanceRef: o, contentRef: a, referenceRef: i, role: s }; return t(l), tt(bx, l), (u, c) => oe(u.$slots, "default"); } }); var v_e = /* @__PURE__ */ Ur(h_e, [["__file", "popper.vue"]]); const o9 = ir({ arrowOffset: { type: Number, default: 5 } }), g_e = K({ name: "ElPopperArrow", inheritAttrs: !1 }), m_e = /* @__PURE__ */ K({ ...g_e, props: o9, setup(e, { expose: t }) { const n = e, r = na("popper"), { arrowOffset: o, arrowRef: a, arrowStyle: i } = xe(n9, void 0); return ce(() => n.arrowOffset, (s) => { o.value = s; }), Tt(() => { a.value = void 0; }), t({ arrowRef: a }), (s, l) => (E(), L("span", { ref_key: "arrowRef", ref: a, class: V(y(r).e("arrow")), style: Ze(y(i)), "data-popper-arrow": "" }, null, 6)); } }); var y_e = /* @__PURE__ */ Ur(m_e, [["__file", "arrow.vue"]]); const b1 = "ElOnlyChild", b_e = K({ name: b1, setup(e, { slots: t, attrs: n }) { var r; const o = xe(KP), a = J$e((r = o == null ? void 0 : o.setForwardRef) != null ? r : o0); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Yl(b1, "requires exact only one valid child."), null; const l = a9(s); return l ? Ne(b0(l, n), [[a]]) : (Yl(b1, "no valid child node found"), null); }; } }); function a9(e) { if (!e) return null; const t = e; for (const n of t) { if (Ff(n)) switch (n.type) { case w0: continue; case Vs: case "svg": return wE(n); case De: return a9(n.children); default: return n; } return wE(n); } return null; } function wE(e) { const t = na("only-child"); return W("span", { class: t.e("content") }, [e]); } const i9 = ir({ virtualRef: { type: Mt(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Mt(Function) }, onMouseleave: { type: Mt(Function) }, onClick: { type: Mt(Function) }, onKeydown: { type: Mt(Function) }, onFocus: { type: Mt(Function) }, onBlur: { type: Mt(Function) }, onContextmenu: { type: Mt(Function) }, id: String, open: Boolean }), w_e = K({ name: "ElPopperTrigger", inheritAttrs: !1 }), x_e = /* @__PURE__ */ K({ ...w_e, props: i9, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: o } = xe(bx, void 0); Z$e(o); const a = $(() => s.value ? n.id : void 0), i = $(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = $(() => { if (r && r.value !== "tooltip") return r.value; }), l = $(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return at(() => { ce(() => n.virtualRef, (d) => { d && (o.value = gl(d)); }, { immediate: !0 }), ce(o, (d, f) => { u == null || u(), u = void 0, Kd(d) && (c.forEach((h) => { var p; const v = n[h]; v && (d.addEventListener(h.slice(2).toLowerCase(), v), (p = f == null ? void 0 : f.removeEventListener) == null || p.call(f, h.slice(2).toLowerCase(), v)); }), u = ce([a, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { ax(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), Kd(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Tt(() => { if (u == null || u(), u = void 0, o.value && Kd(o.value)) { const d = o.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), o.value = void 0; } }), t({ triggerRef: o }), (d, f) => d.virtualTriggering ? Z("v-if", !0) : (E(), Q(y(b_e), Lt({ key: 0 }, d.$attrs, { "aria-controls": y(a), "aria-describedby": y(i), "aria-expanded": y(l), "aria-haspopup": y(s) }), { default: R(() => [ oe(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var k_e = /* @__PURE__ */ Ur(x_e, [["__file", "trigger.vue"]]); const w1 = "focus-trap.focus-after-trapped", x1 = "focus-trap.focus-after-released", C_e = "focus-trap.focusout-prevented", xE = { cancelable: !0, bubbles: !1 }, S_e = { cancelable: !0, bubbles: !1 }, kE = "focusAfterTrapped", CE = "focusAfterReleased", E_e = Symbol("elFocusTrap"), wx = z(), nm = z(0), xx = z(0); let Ih = 0; const s9 = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const o = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, SE = (e, t) => { for (const n of e) if (!$_e(n, t)) return n; }, $_e = (e, t) => { if (process.env.NODE_ENV === "test") return !1; if (getComputedStyle(e).visibility === "hidden") return !0; for (; e; ) { if (t && e === t) return !1; if (getComputedStyle(e).display === "none") return !0; e = e.parentElement; } return !1; }, __e = (e) => { const t = s9(e), n = SE(t, e), r = SE(t.reverse(), e); return [n, r]; }, T_e = (e) => e instanceof HTMLInputElement && "select" in e, cs = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), xx.value = window.performance.now(), e !== n && T_e(e) && t && e.select(); } }; function EE(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const O_e = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = EE(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = EE(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, F_e = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (cs(r, t), document.activeElement !== n) return; }, $E = O_e(), I_e = () => nm.value > xx.value, Ah = () => { wx.value = "pointer", nm.value = window.performance.now(); }, _E = () => { wx.value = "keyboard", nm.value = window.performance.now(); }, A_e = () => (at(() => { Ih === 0 && (document.addEventListener("mousedown", Ah), document.addEventListener("touchstart", Ah), document.addEventListener("keydown", _E)), Ih++; }), Tt(() => { Ih--, Ih <= 0 && (document.removeEventListener("mousedown", Ah), document.removeEventListener("touchstart", Ah), document.removeEventListener("keydown", _E)); }), { focusReason: wx, lastUserFocusTimestamp: nm, lastAutomatedFocusTimestamp: xx }), Ph = (e) => new CustomEvent(C_e, { ...S_e, detail: e }), P_e = K({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ kE, CE, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = z(); let r, o; const { focusReason: a } = A_e(); W$e((p) => { e.trapped && !i.paused && t("release-requested", p); }); const i = { paused: !1, pause() { this.paused = !0; }, resume() { this.paused = !1; } }, s = (p) => { if (!e.loop && !e.trapped || i.paused) return; const { key: v, altKey: m, ctrlKey: g, metaKey: b, currentTarget: C, shiftKey: x } = p, { loop: w } = e, k = v === l0.tab && !m && !g && !b, S = document.activeElement; if (k && S) { const _ = C, [O, F] = __e(_); if (O && F) { if (!x && S === F) { const I = Ph({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), w && cs(O, !0)); } else if (x && [O, _].includes(S)) { const I = Ph({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), w && cs(F, !0)); } } else if (S === _) { const I = Ph({ focusReason: a.value }); t("focusout-prevented", I), I.defaultPrevented || p.preventDefault(); } } }; tt(E_e, { focusTrapRef: n, onKeydown: s }), ce(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), ce([n], ([p], [v]) => { p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", d)); }); const l = (p) => { t(kE, p); }, u = (p) => t(CE, p), c = (p) => { const v = y(n); if (!v) return; const m = p.target, g = p.relatedTarget, b = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), b && t("focusin", p), !i.paused && e.trapped && (b ? o = m : cs(o, !0)); }, d = (p) => { const v = y(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !ax(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Ph({ focusReason: a.value }); t("focusout-prevented", g), g.defaultPrevented || cs(o, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await Ue(); const p = y(n); if (p) { $E.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(w1, xE); p.addEventListener(w1, l), p.dispatchEvent(m), m.defaultPrevented || Ue(() => { let g = e.focusStartEl; Zc(g) || (cs(g), document.activeElement !== g && (g = "first")), g === "first" && F_e(s9(p), !0), (document.activeElement === v || g === "container") && cs(p); }); } } } function h() { const p = y(n); if (p) { p.removeEventListener(w1, l); const v = new CustomEvent(x1, { ...xE, detail: { focusReason: a.value } }); p.addEventListener(x1, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !I_e() || p.contains(document.activeElement)) && cs(r ?? document.body), p.removeEventListener(x1, u), $E.remove(i); } } return at(() => { e.trapped && f(), ce(() => e.trapped, (p) => { p ? f() : h(); }); }), Tt(() => { e.trapped && h(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0); }), { onKeydown: s }; } }); function L_e(e, t, n, r, o, a) { return oe(e.$slots, "default", { handleKeydown: e.onKeydown }); } var R_e = /* @__PURE__ */ Ur(P_e, [["render", L_e], ["__file", "focus-trap.vue"]]); const D_e = ["fixed", "absolute"], M_e = ir({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Mt(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: ux, default: "bottom" }, popperOptions: { type: Mt(Object), default: () => ({}) }, strategy: { type: String, values: D_e, default: "absolute" } }), l9 = ir({ ...M_e, id: String, style: { type: Mt([String, Array, Object]) }, className: { type: Mt([String, Array, Object]) }, effect: { type: Mt(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Mt([String, Array, Object]) }, popperStyle: { type: Mt([String, Array, Object]) }, referenceEl: { type: Mt(Object) }, triggerTargetEl: { type: Mt(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...QP(["ariaLabel"]) }), N_e = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, B_e = (e, t = []) => { const { placement: n, strategy: r, popperOptions: o } = e, a = { placement: n, strategy: r, ...o, modifiers: [...V_e(e), ...t] }; return j_e(a, o == null ? void 0 : o.modifiers), a; }, z_e = (e) => { if (_o) return gl(e); }; function V_e(e) { const { offset: t, gpuAcceleration: n, fallbackPlacements: r } = 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: r } }, { name: "computeStyles", options: { gpuAcceleration: n } } ]; } function j_e(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const H_e = 0, U_e = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: o } = xe(bx, void 0), a = z(), i = z(), s = $(() => ({ name: "eventListeners", enabled: !!e.visible })), l = $(() => { var g; const b = y(a), C = (g = y(i)) != null ? g : H_e; return { name: "arrow", enabled: !vEe(b), options: { element: b, padding: C } }; }), u = $(() => ({ onFirstUpdate: () => { p(); }, ...B_e(e, [ y(l), y(s) ]) })), c = $(() => z_e(e.referenceEl) || y(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = j$e(c, n, u); return ce(m, (g) => t.value = g), at(() => { ce(() => { var g; return (g = y(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: a, contentRef: n, instanceRef: m, state: f, styles: h, role: o, forceUpdate: v, update: p }; }, q_e = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: o } = ZP(), a = na("popper"), i = $(() => y(t).popper), s = z(Mp(e.zIndex) ? e.zIndex : o()), l = $(() => [ a.b(), a.is("pure", e.pure), a.is(e.effect), e.popperClass ]), u = $(() => [ { zIndex: y(s) }, y(n).popper, e.popperStyle || {} ]), c = $(() => r.value === "dialog" ? "false" : void 0), d = $(() => y(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Mp(e.zIndex) ? e.zIndex : o(); } }; }, W_e = (e, t) => { const n = z(!1), r = z(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (o) => { var a; ((a = o.detail) == null ? void 0 : a.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (o) => { e.visible && !n.value && (o.target && (r.value = o.target), n.value = !0); }, onFocusoutPrevented: (o) => { e.trapping || (o.detail.focusReason === "pointer" && o.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, G_e = K({ name: "ElPopperContent" }), K_e = /* @__PURE__ */ K({ ...G_e, props: l9, emits: N_e, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: o, trapped: a, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = W_e(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = U_e(r), { ariaModal: b, arrowStyle: C, contentAttrs: x, contentClass: w, contentStyle: k, updateZIndex: S } = q_e(r, { styles: p, attributes: d, role: m }), _ = xe(d0, void 0), O = z(); tt(n9, { arrowStyle: C, arrowRef: f, arrowOffset: O }), _ && tt(d0, { ..._, addInputId: o0, removeInputId: o0 }); let F; const I = (M = !0) => { g(), M && S(); }, P = () => { I(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1); }; return at(() => { ce(() => r.triggerTargetEl, (M, N) => { F == null || F(), F = void 0; const j = y(M || h.value), A = y(N || h.value); Kd(j) && (F = ce([m, () => r.ariaLabel, b, () => r.id], (U) => { ["role", "aria-label", "aria-modal", "id"].forEach((q, Y) => { ax(U[Y]) ? j.removeAttribute(q) : j.setAttribute(q, U[Y]); }); }, { immediate: !0 })), A !== j && Kd(A) && ["role", "aria-label", "aria-modal", "id"].forEach((U) => { A.removeAttribute(U); }); }, { immediate: !0 }), ce(() => r.visible, P, { immediate: !0 }); }), Tt(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: I, contentStyle: k }), (M, N) => (E(), L("div", Lt({ ref_key: "contentRef", ref: h }, y(x), { style: y(k), class: y(w), tabindex: "-1", onMouseenter: (j) => M.$emit("mouseenter", j), onMouseleave: (j) => M.$emit("mouseleave", j) }), [ W(y(R_e), { trapped: y(a), "trap-on-focus-in": !0, "focus-trap-el": y(h), "focus-start-el": y(o), onFocusAfterTrapped: y(s), onFocusAfterReleased: y(i), onFocusin: y(l), onFocusoutPrevented: y(u), onReleaseRequested: y(c) }, { default: R(() => [ oe(M.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var Y_e = /* @__PURE__ */ Ur(K_e, [["__file", "content.vue"]]); const X_e = vu(v_e), kx = Symbol("elTooltip"), Ro = ir({ ...Y$e, ...l9, appendTo: { type: Mt([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Mt(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...QP(["ariaLabel"]) }), zp = ir({ ...i9, disabled: Boolean, trigger: { type: Mt([String, Array]), default: "hover" }, triggerKeys: { type: Mt(Array), default: () => [l0.enter, l0.space] } }), { useModelToggleProps: Z_e, useModelToggleEmits: J_e, useModelToggle: Q_e } = BEe("visible"), e8e = ir({ ...r9, ...Z_e, ...Ro, ...zp, ...o9, showArrow: { type: Boolean, default: !0 } }), t8e = [ ...J_e, "before-show", "before-hide", "show", "hide", "open", "close" ], n8e = (e, t) => x4e(e) ? e.includes(t) : e === t, Iu = (e, t, n) => (r) => { n8e(y(e), t) && n(r); }, r8e = K({ name: "ElTooltipTrigger" }), o8e = /* @__PURE__ */ K({ ...r8e, props: zp, setup(e, { expose: t }) { const n = e, r = na("tooltip"), { controlled: o, id: a, open: i, onOpen: s, onClose: l, onToggle: u } = xe(kx, void 0), c = z(null), d = () => { if (y(o) || n.disabled) return !0; }, f = $t(n, "trigger"), h = yi(d, Iu(f, "hover", s)), p = yi(d, Iu(f, "hover", l)), v = yi(d, Iu(f, "click", (x) => { x.button === 0 && u(x); })), m = yi(d, Iu(f, "focus", s)), g = yi(d, Iu(f, "focus", l)), b = yi(d, Iu(f, "contextmenu", (x) => { x.preventDefault(), u(x); })), C = yi(d, (x) => { const { code: w } = x; n.triggerKeys.includes(w) && (x.preventDefault(), u(x)); }); return t({ triggerRef: c }), (x, w) => (E(), Q(y(k_e), { id: y(a), "virtual-ref": x.virtualRef, open: y(i), "virtual-triggering": x.virtualTriggering, class: V(y(r).e("trigger")), onBlur: y(g), onClick: y(v), onContextmenu: y(b), onFocus: y(m), onMouseenter: y(h), onMouseleave: y(p), onKeydown: y(C) }, { default: R(() => [ oe(x.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var a8e = /* @__PURE__ */ Ur(o8e, [["__file", "trigger.vue"]]); const i8e = ir({ to: { type: Mt([String, Object]), required: !0 }, disabled: Boolean }), s8e = /* @__PURE__ */ K({ __name: "teleport", props: i8e, setup(e) { return (t, n) => t.disabled ? oe(t.$slots, "default", { key: 0 }) : (E(), Q(x0, { key: 1, to: t.to }, [ oe(t.$slots, "default") ], 8, ["to"])); } }); var l8e = /* @__PURE__ */ Ur(s8e, [["__file", "teleport.vue"]]); const u8e = vu(l8e), c8e = K({ name: "ElTooltipContent", inheritAttrs: !1 }), d8e = /* @__PURE__ */ K({ ...c8e, props: Ro, setup(e, { expose: t }) { const n = e, { selector: r } = GP(), o = na("tooltip"), a = z(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = xe(kx, void 0), g = $(() => n.transition || `${o.namespace.value}-fade-in-linear`), b = $(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Tt(() => { i == null || i(); }); const C = $(() => y(b) ? !0 : y(u)), x = $(() => n.disabled ? !1 : y(u)), w = $(() => n.appendTo || r.value), k = $(() => { var A; return (A = n.style) != null ? A : {}; }), S = z(!0), _ = () => { p(), S.value = !0; }, O = () => { if (y(s)) return !0; }, F = yi(O, () => { n.enterable && y(c) === "hover" && f(); }), I = yi(O, () => { y(c) === "hover" && d(); }), P = () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A), v == null || v(); }, M = () => { m == null || m(); }, N = () => { h(), i = h4e($(() => { var A; return (A = a.value) == null ? void 0 : A.popperContentRef; }), () => { y(s) || y(c) !== "hover" && d(); }); }, j = () => { n.virtualTriggering || d(); }; return ce(() => y(u), (A) => { A ? S.value = !1 : i == null || i(); }, { flush: "post" }), ce(() => n.content, () => { var A, U; (U = (A = a.value) == null ? void 0 : A.updatePopper) == null || U.call(A); }), t({ contentRef: a }), (A, U) => (E(), Q(y(u8e), { disabled: !A.teleported, to: y(w) }, { default: R(() => [ W(pr, { name: y(g), onAfterLeave: _, onBeforeEnter: P, onAfterEnter: N, onBeforeLeave: M }, { default: R(() => [ y(C) ? Ne((E(), Q(y(Y_e), Lt({ key: 0, id: y(l), ref_key: "contentRef", ref: a }, A.$attrs, { "aria-label": A.ariaLabel, "aria-hidden": S.value, "boundaries-padding": A.boundariesPadding, "fallback-placements": A.fallbackPlacements, "gpu-acceleration": A.gpuAcceleration, offset: A.offset, placement: A.placement, "popper-options": A.popperOptions, strategy: A.strategy, effect: A.effect, enterable: A.enterable, pure: A.pure, "popper-class": A.popperClass, "popper-style": [A.popperStyle, y(k)], "reference-el": A.referenceEl, "trigger-target-el": A.triggerTargetEl, visible: y(x), "z-index": A.zIndex, onMouseenter: y(F), onMouseleave: y(I), onBlur: j, onClose: y(d) }), { default: R(() => [ oe(A.$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"])), [ [ft, y(x)] ]) : Z("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var p8e = /* @__PURE__ */ Ur(d8e, [["__file", "content.vue"]]); const f8e = K({ name: "ElTooltip" }), h8e = /* @__PURE__ */ K({ ...f8e, props: e8e, emits: t8e, setup(e, { expose: t, emit: n }) { const r = e; K$e(); const o = q$e(), a = z(), i = z(), s = () => { var g; const b = y(a); b && ((g = b.popperInstanceRef) == null || g.update()); }, l = z(!1), u = z(), { show: c, hide: d, hasUpdateHandler: f } = Q_e({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = X$e({ showAfter: $t(r, "showAfter"), hideAfter: $t(r, "hideAfter"), autoClose: $t(r, "autoClose"), open: c, close: d }), v = $(() => ix(r.visible) && !f.value); tt(kx, { controlled: v, id: o, open: Tc(l), trigger: $t(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { y(l) ? p(g) : h(g); }, onShow: () => { n("show", u.value); }, onHide: () => { n("hide", u.value); }, onBeforeShow: () => { n("before-show", u.value); }, onBeforeHide: () => { n("before-hide", u.value); }, updatePopper: s }), ce(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var b, C; const x = (C = (b = i.value) == null ? void 0 : b.contentRef) == null ? void 0 : C.popperContentRef, w = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return x && x.contains(w); }; return k0(() => l.value && d()), t({ popperRef: a, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, b) => (E(), Q(y(X_e), { ref_key: "popperRef", ref: a, role: g.role }, { default: R(() => [ W(a8e, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: R(() => [ g.$slots.default ? oe(g.$slots, "default", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), W(p8e, { ref_key: "contentRef", ref: i, "aria-label": g.ariaLabel, "boundaries-padding": g.boundariesPadding, content: g.content, disabled: g.disabled, effect: g.effect, enterable: g.enterable, "fallback-placements": g.fallbackPlacements, "hide-after": g.hideAfter, "gpu-acceleration": g.gpuAcceleration, offset: g.offset, persistent: g.persistent, "popper-class": g.popperClass, "popper-style": g.popperStyle, placement: g.placement, "popper-options": g.popperOptions, pure: g.pure, "raw-content": g.rawContent, "reference-el": g.referenceEl, "trigger-target-el": g.triggerTargetEl, "show-after": g.showAfter, strategy: g.strategy, teleported: g.teleported, transition: g.transition, "virtual-triggering": g.virtualTriggering, "z-index": g.zIndex, "append-to": g.appendTo }, { default: R(() => [ oe(g.$slots, "content", {}, () => [ g.rawContent ? (E(), L("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : (E(), L("span", { key: 1 }, me(g.content), 1)) ]), g.showArrow ? (E(), Q(y(y_e), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : Z("v-if", !0) ]), _: 3 }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"]) ]), _: 3 }, 8, ["role"])); } }); var v8e = /* @__PURE__ */ Ur(h8e, [["__file", "tooltip.vue"]]); const g8e = vu(v8e), u9 = Symbol("buttonGroupContextKey"), m8e = (e, t) => { FEe({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, $(() => e.type === "text")); const n = xe(u9, void 0), r = mx("button"), { form: o } = d_e(), a = c_e($(() => n == null ? void 0 : n.size)), i = t9(), s = z(), l = Xr(), u = $(() => e.type || (n == null ? void 0 : n.type) || ""), c = $(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = $(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = $(() => { var h; const p = (h = l.default) == null ? void 0 : h.call(l); if (c.value && (p == null ? void 0 : p.length) === 1) { const v = p[0]; if ((v == null ? void 0 : v.type) === Vs) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: a, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (o == null || o.resetFields()), t("click", h); } }; }, y8e = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], b8e = ["button", "submit", "reset"], rb = ir({ size: Q$e, disabled: Boolean, type: { type: String, values: y8e, default: "" }, icon: { type: eb }, nativeType: { type: String, values: b8e, default: "button" }, loading: Boolean, loadingIcon: { type: eb, default: () => EEe }, 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: Mt([String, Object]), default: "button" } }), w8e = { click: (e) => e instanceof MouseEvent }; function _r(e, t) { x8e(e) && (e = "100%"); var n = k8e(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 Lh(e) { return Math.min(1, Math.max(0, e)); } function x8e(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function k8e(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function c9(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Rh(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function ml(e) { return e.length === 1 ? "0" + e : String(e); } function C8e(e, t, n) { return { r: _r(e, 255) * 255, g: _r(t, 255) * 255, b: _r(n, 255) * 255 }; } function TE(e, t, n) { e = _r(e, 255), t = _r(t, 255), n = _r(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = 0, s = (r + o) / 2; if (r === o) i = 0, a = 0; else { var l = r - o; switch (i = s > 0.5 ? l / (2 - r - o) : l / (r + o), r) { 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: i, l: s }; } function k1(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 S8e(e, t, n) { var r, o, a; if (e = _r(e, 360), t = _r(t, 100), n = _r(n, 100), t === 0) o = n, a = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = k1(s, i, e + 1 / 3), o = k1(s, i, e), a = k1(s, i, e - 1 / 3); } return { r: r * 255, g: o * 255, b: a * 255 }; } function OE(e, t, n) { e = _r(e, 255), t = _r(t, 255), n = _r(n, 255); var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, i = r, s = r - o, l = r === 0 ? 0 : s / r; if (r === o) a = 0; else { switch (r) { case e: a = (t - n) / s + (t < n ? 6 : 0); break; case t: a = (n - e) / s + 2; break; case n: a = (e - t) / s + 4; break; } a /= 6; } return { h: a, s: l, v: i }; } function E8e(e, t, n) { e = _r(e, 360) * 6, t = _r(t, 100), n = _r(n, 100); var r = Math.floor(e), o = e - r, a = n * (1 - t), i = n * (1 - o * t), s = n * (1 - (1 - o) * t), l = r % 6, u = [n, i, a, a, s, n][l], c = [s, n, n, i, a, a][l], d = [a, a, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function FE(e, t, n, r) { var o = [ ml(Math.round(e).toString(16)), ml(Math.round(t).toString(16)), ml(Math.round(n).toString(16)) ]; return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join(""); } function $8e(e, t, n, r, o) { var a = [ ml(Math.round(e).toString(16)), ml(Math.round(t).toString(16)), ml(Math.round(n).toString(16)), ml(_8e(r)) ]; return o && 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 _8e(e) { return Math.round(parseFloat(e) * 255).toString(16); } function IE(e) { return So(e) / 255; } function So(e) { return parseInt(e, 16); } function T8e(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var ob = { 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 O8e(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, i = !1, s = !1; return typeof e == "string" && (e = A8e(e)), typeof e == "object" && (fi(e.r) && fi(e.g) && fi(e.b) ? (t = C8e(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : fi(e.h) && fi(e.s) && fi(e.v) ? (r = Rh(e.s), o = Rh(e.v), t = E8e(e.h, r, o), i = !0, s = "hsv") : fi(e.h) && fi(e.s) && fi(e.l) && (r = Rh(e.s), a = Rh(e.l), t = S8e(e.h, r, a), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = c9(n), { ok: i, format: e.format || s, r: Math.min(255, Math.max(t.r, 0)), g: Math.min(255, Math.max(t.g, 0)), b: Math.min(255, Math.max(t.b, 0)), a: n }; } var F8e = "[-\\+]?\\d+%?", I8e = "[-\\+]?\\d*\\.\\d+%?", Ss = "(?:".concat(I8e, ")|(?:").concat(F8e, ")"), C1 = "[\\s|\\(]+(".concat(Ss, ")[,|\\s]+(").concat(Ss, ")[,|\\s]+(").concat(Ss, ")\\s*\\)?"), S1 = "[\\s|\\(]+(".concat(Ss, ")[,|\\s]+(").concat(Ss, ")[,|\\s]+(").concat(Ss, ")[,|\\s]+(").concat(Ss, ")\\s*\\)?"), ua = { CSS_UNIT: new RegExp(Ss), rgb: new RegExp("rgb" + C1), rgba: new RegExp("rgba" + S1), hsl: new RegExp("hsl" + C1), hsla: new RegExp("hsla" + S1), hsv: new RegExp("hsv" + C1), hsva: new RegExp("hsva" + S1), 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 A8e(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (ob[e]) e = ob[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = ua.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = ua.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ua.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = ua.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ua.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = ua.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ua.hex8.exec(e), n ? { r: So(n[1]), g: So(n[2]), b: So(n[3]), a: IE(n[4]), format: t ? "name" : "hex8" } : (n = ua.hex6.exec(e), n ? { r: So(n[1]), g: So(n[2]), b: So(n[3]), format: t ? "name" : "hex" } : (n = ua.hex4.exec(e), n ? { r: So(n[1] + n[1]), g: So(n[2] + n[2]), b: So(n[3] + n[3]), a: IE(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = ua.hex3.exec(e), n ? { r: So(n[1] + n[1]), g: So(n[2] + n[2]), b: So(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function fi(e) { return !!ua.CSS_UNIT.exec(String(e)); } var P8e = ( /** @class */ function() { function e(t, n) { t === void 0 && (t = ""), n === void 0 && (n = {}); var r; if (t instanceof e) return t; typeof t == "number" && (t = T8e(t)), this.originalInput = t; var o = O8e(t); this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.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 = o.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, r, o, a = t.r / 255, i = t.g / 255, s = t.b / 255; return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), i <= 0.03928 ? r = i / 12.92 : r = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = c9(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 = OE(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 = OE(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = TE(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 = TE(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), FE(this.r, this.g, this.b, t); }, e.prototype.toHexString = function(t) { return t === void 0 && (t = !1), "#" + this.toHex(t); }, e.prototype.toHex8 = function(t) { return t === void 0 && (t = !1), $8e(this.r, this.g, this.b, this.a, t); }, e.prototype.toHex8String = function(t) { return t === void 0 && (t = !1), "#" + this.toHex8(t); }, e.prototype.toHexShortString = function(t) { return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t); }, e.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }, e.prototype.toRgbString = function() { var t = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b); return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")"); }, e.prototype.toPercentageRgb = function() { var t = function(n) { return "".concat(Math.round(_r(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(_r(n, 255) * 100); }; return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")"); }, e.prototype.toName = function() { if (this.a === 0) return "transparent"; if (this.a < 1) return !1; for (var t = "#" + FE(this.r, this.g, this.b, !1), n = 0, r = Object.entries(ob); n < r.length; n++) { var o = r[n], a = o[0], i = o[1]; if (t === i) return a; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name"); return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || 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 = Lh(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 = Lh(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 = Lh(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 = Lh(n.s), new e(n); }, e.prototype.greyscale = function() { return this.desaturate(100); }, e.prototype.spin = function(t) { var n = this.toHsl(), r = (n.h + t) % 360; return n.h = r < 0 ? 360 + r : r, new e(n); }, e.prototype.mix = function(t, n) { n === void 0 && (n = 50); var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, i = { r: (o.r - r.r) * a + r.r, g: (o.g - r.g) * a + r.g, b: (o.b - r.b) * a + r.b, a: (o.a - r.a) * a + r.a }; return new e(i); }, e.prototype.analogous = function(t, n) { t === void 0 && (t = 6), n === void 0 && (n = 30); var r = this.toHsl(), o = 360 / n, a = [this]; for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; ) r.h = (r.h + o) % 360, a.push(new e(r)); 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(), r = n.h, o = n.s, a = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: o, v: a })), a = (a + s) % 1; return i; }, 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(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o, a: o }); }, 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(), r = n.h, o = [this], a = 360 / t, i = 1; i < t; i++) o.push(new e({ h: (r + i * a) % 360, s: n.s, l: n.l })); return o; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function ns(e, t = 20) { return e.mix("#141414", t).toString(); } function L8e(e) { const t = t9(), n = na("button"); return $(() => { let r = {}, o = e.color; if (o) { const a = o.match(/var\((.*?)\)/); a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1])); const i = new P8e(o), s = e.dark ? i.tint(20).toString() : ns(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? ns(i, 90) : i.tint(90).toString(), "text-color": o, "border-color": e.dark ? ns(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": o, "hover-border-color": o, "active-bg-color": s, "active-text-color": `var(${n.cssVarName("color-white")})`, "active-border-color": s }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? ns(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? ns(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? ns(i, 80) : i.tint(80).toString()); else { const l = e.dark ? ns(i, 30) : i.tint(30).toString(), u = i.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`; if (r = n.cssVarBlock({ "bg-color": o, "text-color": u, "border-color": o, "hover-bg-color": l, "hover-text-color": u, "hover-border-color": l, "active-bg-color": s, "active-border-color": s }), t.value) { const c = e.dark ? ns(i, 50) : i.tint(50).toString(); r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c; } } } return r; }); } const R8e = K({ name: "ElButton" }), D8e = /* @__PURE__ */ K({ ...R8e, props: rb, emits: w8e, setup(e, { expose: t, emit: n }) { const r = e, o = L8e(r), a = na("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = m8e(r, n), h = $(() => [ a.b(), a.m(l.value), a.m(s.value), a.is("disabled", u.value), a.is("loading", r.loading), a.is("plain", r.plain), a.is("round", r.round), a.is("circle", r.circle), a.is("text", r.text), a.is("link", r.link), a.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => (E(), Q(vt(p.tag), Lt({ ref_key: "_ref", ref: i }, y(c), { class: y(h), style: y(o), onClick: y(f) }), { default: R(() => [ p.loading ? (E(), L(De, { key: 0 }, [ p.$slots.loading ? oe(p.$slots, "loading", { key: 0 }) : (E(), Q(y(bE), { key: 1, class: V(y(a).is("loading")) }, { default: R(() => [ (E(), Q(vt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? (E(), Q(y(bE), { key: 1 }, { default: R(() => [ p.icon ? (E(), Q(vt(p.icon), { key: 0 })) : oe(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : Z("v-if", !0), p.$slots.default ? (E(), L("span", { key: 2, class: V({ [y(a).em("text", "expand")]: y(d) }) }, [ oe(p.$slots, "default") ], 2)) : Z("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var M8e = /* @__PURE__ */ Ur(D8e, [["__file", "button.vue"]]); const N8e = { size: rb.size, type: rb.type }, B8e = K({ name: "ElButtonGroup" }), z8e = /* @__PURE__ */ K({ ...B8e, props: N8e, setup(e) { const t = e; tt(u9, Kt({ size: $t(t, "size"), type: $t(t, "type") })); const n = na("button"); return (r, o) => (E(), L("div", { class: V(y(n).b("group")) }, [ oe(r.$slots, "default") ], 2)); } }); var d9 = /* @__PURE__ */ Ur(z8e, [["__file", "button-group.vue"]]); const V8e = vu(M8e, { ButtonGroup: d9 }); TEe(d9); const j8e = ir({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: Mt([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), H8e = K({ name: "ElCard" }), U8e = /* @__PURE__ */ K({ ...H8e, props: j8e, setup(e) { const t = na("card"); return (n, r) => (E(), L("div", { class: V([y(t).b(), y(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? (E(), L("div", { key: 0, class: V(y(t).e("header")) }, [ oe(n.$slots, "header", {}, () => [ Ae(me(n.header), 1) ]) ], 2)) : Z("v-if", !0), B("div", { class: V([y(t).e("body"), n.bodyClass]), style: Ze(n.bodyStyle) }, [ oe(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? (E(), L("div", { key: 1, class: V(y(t).e("footer")) }, [ oe(n.$slots, "footer", {}, () => [ Ae(me(n.footer), 1) ]) ], 2)) : Z("v-if", !0) ], 2)); } }); var q8e = /* @__PURE__ */ Ur(U8e, [["__file", "card.vue"]]); const W8e = vu(q8e), G8e = /* @__PURE__ */ K({ inheritAttrs: !1 }); function K8e(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var Y8e = /* @__PURE__ */ Ur(G8e, [["render", K8e], ["__file", "collection.vue"]]); const X8e = /* @__PURE__ */ K({ name: "ElCollectionItem", inheritAttrs: !1 }); function Z8e(e, t, n, r, o, a) { return oe(e.$slots, "default"); } var J8e = /* @__PURE__ */ Ur(X8e, [["render", Z8e], ["__file", "collection-item.vue"]]); const Q8e = "data-el-collection-item", e6e = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), o = Symbol(n), a = { ...Y8e, name: t, setup() { const s = z(null), l = /* @__PURE__ */ new Map(); tt(r, { itemMap: l, getItems: () => { const u = y(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${Q8e}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...J8e, name: n, setup(s, { attrs: l }) { const u = z(null), c = xe(r, void 0); tt(o, { collectionItemRef: u }), at(() => { const d = y(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Tt(() => { const d = y(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: o, ElCollection: a, ElCollectionItem: i }; }, E1 = ir({ trigger: zp.trigger, effect: { ...Ro.effect, default: "light" }, type: { type: Mt(String) }, placement: { type: Mt(String), default: "bottom" }, popperOptions: { type: Mt(Object), default: () => ({}) }, id: String, size: { type: String, default: "" }, splitButton: Boolean, hideOnClick: { type: Boolean, default: !0 }, loop: { type: Boolean, default: !0 }, showTimeout: { type: Number, default: 150 }, hideTimeout: { type: Number, default: 150 }, tabindex: { type: Mt([Number, String]), default: 0 }, maxHeight: { type: Mt([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Mt(Object) }, teleported: Ro.teleported }); ir({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: eb } }); ir({ onKeydown: { type: Mt(Function) } }); e6e("Dropdown"); const t6e = ir({ trigger: zp.trigger, placement: E1.placement, disabled: zp.disabled, visible: Ro.visible, transition: Ro.transition, popperOptions: E1.popperOptions, tabindex: E1.tabindex, content: Ro.content, popperStyle: Ro.popperStyle, popperClass: Ro.popperClass, enterable: { ...Ro.enterable, default: !0 }, effect: { ...Ro.effect, default: "light" }, teleported: Ro.teleported, title: String, width: { type: [String, Number], default: 150 }, offset: { type: Number, default: void 0 }, showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 }, showArrow: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, "onUpdate:visible": { type: Function } }), n6e = { "update:visible": (e) => ix(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, r6e = "onUpdate:visible", o6e = K({ name: "ElPopover" }), a6e = /* @__PURE__ */ K({ ...o6e, props: t6e, emits: n6e, setup(e, { expose: t, emit: n }) { const r = e, o = $(() => r[r6e]), a = na("popover"), i = z(), s = $(() => { var m; return (m = y(i)) == null ? void 0 : m.popperRef; }), l = $(() => [ { width: FP(r.width) }, r.popperStyle ]), u = $(() => [a.b(), r.popperClass, { [a.m("plain")]: !!r.content }]), c = $(() => r.transition === `${a.namespace.value}-fade-in-linear`), d = () => { var m; (m = i.value) == null || m.hide(); }, f = () => { n("before-enter"); }, h = () => { n("before-leave"); }, p = () => { n("after-enter"); }, v = () => { n("update:visible", !1), n("after-leave"); }; return t({ popperRef: s, hide: d }), (m, g) => (E(), Q(y(g8e), Lt({ ref_key: "tooltipRef", ref: i }, m.$attrs, { trigger: m.trigger, placement: m.placement, disabled: m.disabled, visible: m.visible, transition: m.transition, "popper-options": m.popperOptions, tabindex: m.tabindex, content: m.content, offset: m.offset, "show-after": m.showAfter, "hide-after": m.hideAfter, "auto-close": m.autoClose, "show-arrow": m.showArrow, "aria-label": m.title, effect: m.effect, enterable: m.enterable, "popper-class": y(u), "popper-style": y(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": y(c), "onUpdate:visible": y(o), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: R(() => [ m.title ? (E(), L("div", { key: 0, class: V(y(a).e("title")), role: "title" }, me(m.title), 3)) : Z("v-if", !0), oe(m.$slots, "default", {}, () => [ Ae(me(m.content), 1) ]) ]), default: R(() => [ m.$slots.reference ? oe(m.$slots, "reference", { key: 0 }) : Z("v-if", !0) ]), _: 3 }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"])); } }); var i6e = /* @__PURE__ */ Ur(a6e, [["__file", "popover.vue"]]); const AE = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var s6e = { mounted(e, t) { AE(e, t); }, updated(e, t) { AE(e, t); } }; const l6e = "popover", u6e = _Ee(s6e, l6e), c6e = vu(i6e, { directive: u6e }); function d6e(e) { let t; const n = z(!1), r = Kt({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function o(f) { r.text = f; } function a() { const f = r.parent, h = d.ns; if (!f.vLoadingAddClassList) { let p = f.getAttribute("loading-number"); p = Number.parseInt(p) - 1, p ? f.setAttribute("loading-number", p.toString()) : (s0(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), s0(f, h.bm("parent", "hidden")); } i(), c.unmount(); } function i() { var f, h; (h = (f = d.$el) == null ? void 0 : f.parentNode) == null || h.removeChild(d.$el); } function s() { var f; e.beforeClose && !e.beforeClose() || (n.value = !0, clearTimeout(t), t = setTimeout(l, 400), r.visible = !1, (f = e.closed) == null || f.call(e)); } function l() { if (!n.value) return; const f = r.parent; n.value = !1, f.vLoadingAddClassList = void 0, a(); } const u = K({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = r_e("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = jt("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ jt("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), b = r.text ? jt("p", { class: p.b("text") }, [r.text]) : void 0; return jt(pr, { name: p.b("fade"), onAfterLeave: l }, { default: R(() => [ Ne(W("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ jt("div", { class: p.b("spinner") }, [g, b]) ]), [[ft, r.visible]]) ]) }); }; } }), c = S0(u), d = c.mount(document.createElement("div")); return { ...Vr(r), setText: o, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Dh; const p6e = function(e = {}) { if (!_o) return; const t = f6e(e); if (t.fullscreen && Dh) return Dh; const n = d6e({ ...t, closed: () => { var o; (o = t.closed) == null || o.call(t), t.fullscreen && (Dh = void 0); } }); h6e(t, t.parent, n), PE(t, t.parent, n), t.parent.vLoadingAddClassList = () => PE(t, t.parent, n); let r = t.parent.getAttribute("loading-number"); return r ? r = `${Number.parseInt(r) + 1}` : r = "1", t.parent.setAttribute("loading-number", r), t.parent.appendChild(n.$el), Ue(() => n.visible.value = t.visible), t.fullscreen && (Dh = n), n; }, f6e = (e) => { var t, n, r, o; let a; return Zc(e.target) ? a = (t = document.querySelector(e.target)) != null ? t : document.body : a = e.target || document.body, { parent: a === document.body || e.body ? document.body : a, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: a === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (o = e.visible) != null ? o : !0, beforeClose: e.beforeClose, closed: e.closed, target: a }; }, h6e = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {}; if (e.fullscreen) n.originalPosition.value = kd(document.body, "position"), n.originalOverflow.value = kd(document.body, "overflow"), o.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = kd(document.body, "position"), await Ue(); for (const a of ["top", "left"]) { const i = a === "top" ? "scrollTop" : "scrollLeft"; o[a] = `${e.target.getBoundingClientRect()[a] + document.body[i] + document.documentElement[i] - Number.parseInt(kd(document.body, `margin-${a}`), 10)}px`; } for (const a of ["height", "width"]) o[a] = `${e.target.getBoundingClientRect()[a]}px`; } else n.originalPosition.value = kd(t, "position"); for (const [a, i] of Object.entries(o)) n.$el.style[a] = i; }, PE = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? s0(t, r.bm("parent", "relative")) : rE(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? rE(t, r.bm("parent", "hidden")) : s0(t, r.bm("parent", "hidden")); }, gv = Symbol("ElLoading"), LE = (e, t) => { var n, r, o, a; const i = t.instance, s = (f) => Ff(t.value) ? t.value[f] : void 0, l = (f) => { const h = Zc(f) && (i == null ? void 0 : i[f]) || f; return h && z(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${E4e(f)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = { text: u("text"), svg: u("svg"), svgViewBox: u("svgViewBox"), spinner: u("spinner"), background: u("background"), customClass: u("customClass"), fullscreen: c, target: (r = s("target")) != null ? r : c ? void 0 : e, body: (o = s("body")) != null ? o : t.modifiers.body, lock: (a = s("lock")) != null ? a : t.modifiers.lock }; e[gv] = { options: d, instance: p6e(d) }; }, v6e = (e, t) => { for (const n of Object.keys(t)) Gn(t[n]) && (t[n].value = e[n]); }, g6e = { mounted(e, t) { t.value && LE(e, t); }, updated(e, t) { const n = e[gv]; t.oldValue !== t.value && (t.value && !t.oldValue ? LE(e, t) : t.value && t.oldValue ? Ff(t.value) && v6e(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[gv]) == null || t.instance.close(), e[gv] = null; } }; function p9(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: m6e } = Object.prototype, { getPrototypeOf: Cx } = Object, rm = /* @__PURE__ */ ((e) => (t) => { const n = m6e.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Ia = (e) => (e = e.toLowerCase(), (t) => rm(t) === e), om = (e) => (t) => typeof t === e, { isArray: Qc } = Array, Vp = om("undefined"); function y6e(e) { return e !== null && !Vp(e) && e.constructor !== null && !Vp(e.constructor) && To(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const f9 = Ia("ArrayBuffer"); function b6e(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && f9(e.buffer), t; } const w6e = om("string"), To = om("function"), h9 = om("number"), am = (e) => e !== null && typeof e == "object", x6e = (e) => e === !0 || e === !1, mv = (e) => { if (rm(e) !== "object") return !1; const t = Cx(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, k6e = Ia("Date"), C6e = Ia("File"), S6e = Ia("Blob"), E6e = Ia("FileList"), $6e = (e) => am(e) && To(e.pipe), _6e = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || To(e.append) && ((t = rm(e)) === "formdata" || // detect form-data instance t === "object" && To(e.toString) && e.toString() === "[object FormData]")); }, T6e = Ia("URLSearchParams"), [O6e, F6e, I6e, A6e] = ["ReadableStream", "Request", "Response", "Headers"].map(Ia), P6e = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Lf(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, o; if (typeof e != "object" && (e = [e]), Qc(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length; let s; for (r = 0; r < i; r++) s = a[r], t.call(null, e[s], s, e); } } function v9(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } const yl = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, g9 = (e) => !Vp(e) && e !== yl; function ab() { const { caseless: e } = g9(this) && this || {}, t = {}, n = (r, o) => { const a = e && v9(t, o) || o; mv(t[a]) && mv(r) ? t[a] = ab(t[a], r) : mv(r) ? t[a] = ab({}, r) : Qc(r) ? t[a] = r.slice() : t[a] = r; }; for (let r = 0, o = arguments.length; r < o; r++) arguments[r] && Lf(arguments[r], n); return t; } const L6e = (e, t, n, { allOwnKeys: r } = {}) => (Lf(t, (o, a) => { n && To(o) ? e[a] = p9(o, n) : e[a] = o; }, { allOwnKeys: r }), e), R6e = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), D6e = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, M6e = (e, t, n, r) => { let o, a, i; const s = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; ) i = o[a], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && Cx(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, N6e = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, B6e = (e) => { if (!e) return null; if (Qc(e)) return e; let t = e.length; if (!h9(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, z6e = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Cx(Uint8Array)), V6e = (e, t) => { const n = (e && e[Symbol.iterator]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, j6e = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, H6e = Ia("HTMLFormElement"), U6e = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), RE = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), q6e = Ia("RegExp"), m9 = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; Lf(n, (o, a) => { let i; (i = t(o, a, e)) !== !1 && (r[a] = i || o); }), Object.defineProperties(e, r); }, W6e = (e) => { m9(e, (t, n) => { if (To(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (To(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, G6e = (e, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = !0; }); }; return Qc(e) ? r(e) : r(String(e).split(t)), n; }, K6e = () => { }, Y6e = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, $1 = "abcdefghijklmnopqrstuvwxyz", DE = "0123456789", y9 = { DIGIT: DE, ALPHA: $1, ALPHA_DIGIT: $1 + $1.toUpperCase() + DE }, X6e = (e = 16, t = y9.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function Z6e(e) { return !!(e && To(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const J6e = (e) => { const t = new Array(10), n = (r, o) => { if (am(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[o] = r; const a = Qc(r) ? [] : {}; return Lf(r, (i, s) => { const l = n(i, o + 1); !Vp(l) && (a[s] = l); }), t[o] = void 0, a; } } return r; }; return n(e, 0); }, Q6e = Ia("AsyncFunction"), eTe = (e) => e && (am(e) || To(e)) && To(e.then) && To(e.catch), b9 = ((e, t) => e ? setImmediate : t ? ((n, r) => (yl.addEventListener("message", ({ source: o, data: a }) => { o === yl && a === n && r.length && r.shift()(); }, !1), (o) => { r.push(o), yl.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", To(yl.postMessage) ), tTe = typeof queueMicrotask < "u" ? queueMicrotask.bind(yl) : typeof process < "u" && process.nextTick || b9, Ee = { isArray: Qc, isArrayBuffer: f9, isBuffer: y6e, isFormData: _6e, isArrayBufferView: b6e, isString: w6e, isNumber: h9, isBoolean: x6e, isObject: am, isPlainObject: mv, isReadableStream: O6e, isRequest: F6e, isResponse: I6e, isHeaders: A6e, isUndefined: Vp, isDate: k6e, isFile: C6e, isBlob: S6e, isRegExp: q6e, isFunction: To, isStream: $6e, isURLSearchParams: T6e, isTypedArray: z6e, isFileList: E6e, forEach: Lf, merge: ab, extend: L6e, trim: P6e, stripBOM: R6e, inherits: D6e, toFlatObject: M6e, kindOf: rm, kindOfTest: Ia, endsWith: N6e, toArray: B6e, forEachEntry: V6e, matchAll: j6e, isHTMLForm: H6e, hasOwnProperty: RE, hasOwnProp: RE, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: m9, freezeMethods: W6e, toObjectSet: G6e, toCamelCase: U6e, noop: K6e, toFiniteNumber: Y6e, findKey: v9, global: yl, isContextDefined: g9, ALPHABET: y9, generateString: X6e, isSpecCompliantForm: Z6e, toJSONObject: J6e, isAsyncFn: Q6e, isThenable: eTe, setImmediate: b9, asap: tTe }; function Pt(e, t, n, r, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null); } Ee.inherits(Pt, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: Ee.toJSONObject(this.config), code: this.code, status: this.status }; } }); const w9 = Pt.prototype, x9 = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { x9[e] = { value: e }; }); Object.defineProperties(Pt, x9); Object.defineProperty(w9, "isAxiosError", { value: !0 }); Pt.from = (e, t, n, r, o, a) => { const i = Object.create(w9); return Ee.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Pt.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, a && Object.assign(i, a), i; }; const nTe = null; function ib(e) { return Ee.isPlainObject(e) || Ee.isArray(e); } function k9(e) { return Ee.endsWith(e, "[]") ? e.slice(0, -2) : e; } function ME(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = k9(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function rTe(e) { return Ee.isArray(e) && !e.some(ib); } const oTe = Ee.toFlatObject(Ee, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function im(e, t, n) { if (!Ee.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = Ee.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, p) { return !Ee.isUndefined(p[h]); }); const r = n.metaTokens, o = n.visitor || u, a = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && Ee.isSpecCompliantForm(t); if (!Ee.isFunction(o)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if (Ee.isDate(h)) return h.toISOString(); if (!s && Ee.isBlob(h)) throw new Pt("Blob is not supported. Use a Buffer instead."); return Ee.isArrayBuffer(h) || Ee.isTypedArray(h) ? s && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function u(h, p, v) { let m = h; if (h && !v && typeof h == "object") { if (Ee.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), h = JSON.stringify(h); else if (Ee.isArray(h) && rTe(h) || (Ee.isFileList(h) || Ee.endsWith(p, "[]")) && (m = Ee.toArray(h))) return p = k9(p), m.forEach(function(g, b) { !(Ee.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? ME([p], b, a) : i === null ? p : p + "[]", l(g) ); }), !1; } return ib(h) ? !0 : (t.append(ME(v, p, a), l(h)), !1); } const c = [], d = Object.assign(oTe, { defaultVisitor: u, convertValue: l, isVisitable: ib }); function f(h, p) { if (!Ee.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + p.join(".")); c.push(h), Ee.forEach(h, function(v, m) { (!(Ee.isUndefined(v) || v === null) && o.call( t, v, Ee.isString(m) ? m.trim() : m, p, d )) === !0 && f(v, p ? p.concat(m) : [m]); }), c.pop(); } } if (!Ee.isObject(e)) throw new TypeError("data must be an object"); return f(e), t; } function NE(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function Sx(e, t) { this._pairs = [], e && im(e, this, t); } const C9 = Sx.prototype; C9.append = function(e, t) { this._pairs.push([e, t]); }; C9.toString = function(e) { const t = e ? function(n) { return e.call(this, n, NE); } : NE; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function aTe(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function S9(e, t, n) { if (!t) return e; const r = n && n.encode || aTe, o = n && n.serialize; let a; if (o ? a = o(t, n) : a = Ee.isURLSearchParams(t) ? t.toString() : new Sx(t, n).toString(r), a) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a; } return e; } class BE { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, r) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { Ee.forEach(this.handlers, function(n) { n !== null && t(n); }); } } const E9 = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, iTe = typeof URLSearchParams < "u" ? URLSearchParams : Sx, sTe = typeof FormData < "u" ? FormData : null, lTe = typeof Blob < "u" ? Blob : null, uTe = { isBrowser: !0, classes: { URLSearchParams: iTe, FormData: sTe, Blob: lTe }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Ex = typeof window < "u" && typeof document < "u", sb = typeof navigator == "object" && navigator || void 0, cTe = Ex && (!sb || ["ReactNative", "NativeScript", "NS"].indexOf(sb.product) < 0), dTe = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pTe = Ex && window.location.href || "http://localhost", fTe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Ex, hasStandardBrowserEnv: cTe, hasStandardBrowserWebWorkerEnv: dTe, navigator: sb, origin: pTe }, Symbol.toStringTag, { value: "Module" })), go = { ...fTe, ...uTe }; function hTe(e, t) { return im(e, new go.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, o, a) { return go.isNode && Ee.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments); } }, t)); } function vTe(e) { return Ee.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function gTe(e) { const t = {}, n = Object.keys(e); let r; const o = n.length; let a; for (r = 0; r < o; r++) a = n[r], t[a] = e[a]; return t; } function $9(e) { function t(n, r, o, a) { let i = n[a++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = a >= n.length; return i = !i && Ee.isArray(o) ? o.length : i, l ? (Ee.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !s) : ((!o[i] || !Ee.isObject(o[i])) && (o[i] = []), t(n, r, o[i], a) && Ee.isArray(o[i]) && (o[i] = gTe(o[i])), !s); } if (Ee.isFormData(e) && Ee.isFunction(e.entries)) { const n = {}; return Ee.forEachEntry(e, (r, o) => { t(vTe(r), o, n, 0); }), n; } return null; } function mTe(e, t, n) { if (Ee.isString(e)) try { return (t || JSON.parse)(e), Ee.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const Rf = { transitional: E9, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = Ee.isObject(e); if (o && Ee.isHTMLForm(e) && (e = new FormData(e)), Ee.isFormData(e)) return r ? JSON.stringify($9(e)) : e; if (Ee.isArrayBuffer(e) || Ee.isBuffer(e) || Ee.isStream(e) || Ee.isFile(e) || Ee.isBlob(e) || Ee.isReadableStream(e)) return e; if (Ee.isArrayBufferView(e)) return e.buffer; if (Ee.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let a; if (o) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return hTe(e, this.formSerializer).toString(); if ((a = Ee.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return im( a ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return o || r ? (t.setContentType("application/json", !1), mTe(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || Rf.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (Ee.isResponse(e) || Ee.isReadableStream(e)) return e; if (e && Ee.isString(e) && (n && !this.responseType || r)) { const o = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (a) { if (o) throw a.name === "SyntaxError" ? Pt.from(a, Pt.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return e; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: go.classes.FormData, Blob: go.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; Ee.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { Rf.headers[e] = {}; }); const yTe = Ee.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), bTe = (e) => { const t = {}; let n, r, o; return e && e.split(` `).forEach(function(a) { o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && yTe[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, zE = Symbol("internals"); function Sd(e) { return e && String(e).trim().toLowerCase(); } function yv(e) { return e === !1 || e == null ? e : Ee.isArray(e) ? e.map(yv) : String(e); } function wTe(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const xTe = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function _1(e, t, n, r, o) { if (Ee.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!Ee.isString(t)) { if (Ee.isString(r)) return t.indexOf(r) !== -1; if (Ee.isRegExp(r)) return r.test(t); } } function kTe(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function CTe(e, t) { const n = Ee.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, a, i) { return this[r].call(this, t, o, a, i); }, configurable: !0 }); }); } class mo { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function a(s, l, u) { const c = Sd(l); if (!c) throw new Error("header name must be a non-empty string"); const d = Ee.findKey(o, c); (!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || l] = yv(s)); } const i = (s, l) => Ee.forEach(s, (u, c) => a(u, c, l)); if (Ee.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (Ee.isString(t) && (t = t.trim()) && !xTe(t)) i(bTe(t), n); else if (Ee.isHeaders(t)) for (const [s, l] of t.entries()) a(l, s, r); else t != null && a(n, t, r); return this; } get(t, n) { if (t = Sd(t), t) { const r = Ee.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return wTe(o); if (Ee.isFunction(n)) return n.call(this, o, r); if (Ee.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = Sd(t), t) { const r = Ee.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || _1(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function a(i) { if (i = Sd(i), i) { const s = Ee.findKey(r, i); s && (!n || _1(r, r[s], s, n)) && (delete r[s], o = !0); } } return Ee.isArray(t) ? t.forEach(a) : a(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = !1; for (; r--; ) { const a = n[r]; (!t || _1(this, this[a], a, t, !0)) && (delete this[a], o = !0); } return o; } normalize(t) { const n = this, r = {}; return Ee.forEach(this, (o, a) => { const i = Ee.findKey(r, a); if (i) { n[i] = yv(o), delete n[a]; return; } const s = t ? kTe(a) : String(a).trim(); s !== a && delete n[a], n[s] = yv(o), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return Ee.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && Ee.isArray(r) ? r.join(", ") : r); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const r = new this(t); return n.forEach((o) => r.set(o)), r; } static accessor(t) { const n = (this[zE] = this[zE] = { accessors: {} }).accessors, r = this.prototype; function o(a) { const i = Sd(a); n[i] || (CTe(r, a), n[i] = !0); } return Ee.isArray(t) ? t.forEach(o) : o(t), this; } } mo.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); Ee.reduceDescriptors(mo.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); Ee.freezeMethods(mo); function T1(e, t) { const n = this || Rf, r = t || n, o = mo.from(r.headers); let a = r.data; return Ee.forEach(e, function(i) { a = i.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function _9(e) { return !!(e && e.__CANCEL__); } function ed(e, t, n) { Pt.call(this, e ?? "canceled", Pt.ERR_CANCELED, t, n), this.name = "CanceledError"; } Ee.inherits(ed, Pt, { __CANCEL__: !0 }); function T9(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Pt( "Request failed with status code " + n.status, [Pt.ERR_BAD_REQUEST, Pt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function STe(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function ETe(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, a = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[a]; i || (i = l), n[o] = s, r[o] = l; let c = a, d = 0; for (; c !== o; ) d += n[c++], c = c % e; if (o = (o + 1) % e, o === a && (a = (a + 1) % e), l - i < t) return; const f = u && l - u; return f ? Math.round(d * 1e3 / f) : void 0; }; } function $Te(e, t) { let n = 0, r = 1e3 / t, o, a; const i = (s, l = Date.now()) => { n = l, o = null, a && (clearTimeout(a), a = null), e.apply(null, s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (o = s, a || (a = setTimeout(() => { a = null, i(o); }, r - u))); }, () => o && i(o)]; } const p0 = (e, t, n = 3) => { let r = 0; const o = ETe(50, 250); return $Te((a) => { const i = a.loaded, s = a.lengthComputable ? a.total : void 0, l = i - r, u = o(l), c = i <= s; r = i; const d = { loaded: i, total: s, progress: s ? i / s : void 0, bytes: l, rate: u || void 0, estimated: u && s && c ? (s - i) / u : void 0, event: a, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, VE = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, jE = (e) => (...t) => Ee.asap(() => e(...t)), _Te = go.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { const e = go.navigator && /(msie|trident)/i.test(go.navigator.userAgent), t = document.createElement("a"); let n; function r(o) { let a = o; return e && (t.setAttribute("href", a), a = t.href), t.setAttribute("href", a), { href: t.href, protocol: t.protocol ? t.protocol.replace(/:$/, "") : "", host: t.host, search: t.search ? t.search.replace(/^\?/, "") : "", hash: t.hash ? t.hash.replace(/^#/, "") : "", hostname: t.hostname, port: t.port, pathname: t.pathname.charAt(0) === "/" ? t.pathname : "/" + t.pathname }; } return n = r(window.location.href), function(o) { const a = Ee.isString(o) ? r(o) : o; return a.protocol === n.protocol && a.host === n.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), TTe = go.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, a) { const i = [e + "=" + encodeURIComponent(t)]; Ee.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), Ee.isString(r) && i.push("path=" + r), Ee.isString(o) && i.push("domain=" + o), a === !0 && i.push("secure"), document.cookie = i.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function OTe(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function FTe(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function O9(e, t) { return e && !OTe(t) ? FTe(e, t) : t; } const HE = (e) => e instanceof mo ? { ...e } : e; function Xl(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return Ee.isPlainObject(u) && Ee.isPlainObject(c) ? Ee.merge.call({ caseless: d }, u, c) : Ee.isPlainObject(c) ? Ee.merge({}, c) : Ee.isArray(c) ? c.slice() : c; } function o(u, c, d) { if (Ee.isUndefined(c)) { if (!Ee.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function a(u, c) { if (!Ee.isUndefined(c)) return r(void 0, c); } function i(u, c) { if (Ee.isUndefined(c)) { if (!Ee.isUndefined(u)) return r(void 0, u); } else return r(void 0, c); } function s(u, c, d) { if (d in t) return r(u, c); if (d in e) return r(void 0, u); } const l = { url: a, method: a, data: a, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, withXSRFToken: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: s, headers: (u, c) => o(HE(u), HE(c), !0) }; return Ee.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const c = l[u] || o, d = c(e[u], t[u], u); Ee.isUndefined(d) && c !== s || (n[u] = d); }), n; } const F9 = (e) => { const t = Xl({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = t; t.headers = i = mo.from(i), t.url = S9(O9(t.baseURL, t.url), e.params, e.paramsSerializer), s && i.set( "Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : "")) ); let l; if (Ee.isFormData(n)) { if (go.hasStandardBrowserEnv || go.hasStandardBrowserWebWorkerEnv) i.setContentType(void 0); else if ((l = i.getContentType()) !== !1) { const [u, ...c] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : []; i.setContentType([u || "multipart/form-data", ...c].join("; ")); } } if (go.hasStandardBrowserEnv && (r && Ee.isFunction(r) && (r = r(t)), r || r !== !1 && _Te(t.url))) { const u = o && a && TTe.read(a); u && i.set(o, u); } return t; }, ITe = typeof XMLHttpRequest < "u", ATe = ITe && function(e) { return new Promise(function(t, n) { const r = F9(e); let o = r.data; const a = mo.from(r.headers).normalize(); let { responseType: i, onUploadProgress: s, onDownloadProgress: l } = r, u, c, d, f, h; function p() { f && f(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u); } let v = new XMLHttpRequest(); v.open(r.method.toUpperCase(), r.url, !0), v.timeout = r.timeout; function m() { if (!v) return; const b = mo.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), C = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: b, config: e, request: v }; T9(function(x) { t(x), p(); }, function(x) { n(x), p(); }, C), v = null; } "onloadend" in v ? v.onloadend = m : v.onreadystatechange = function() { !v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(m); }, v.onabort = function() { v && (n(new Pt("Request aborted", Pt.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new Pt("Network Error", Pt.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let b = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const C = r.transitional || E9; r.timeoutErrorMessage && (b = r.timeoutErrorMessage), n(new Pt( b, C.clarifyTimeoutError ? Pt.ETIMEDOUT : Pt.ECONNABORTED, e, v )), v = null; }, o === void 0 && a.setContentType(null), "setRequestHeader" in v && Ee.forEach(a.toJSON(), function(b, C) { v.setRequestHeader(C, b); }), Ee.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = p0(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, f] = p0(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (u = (b) => { v && (n(!b || b.type ? new ed(null, e, v) : b), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = STe(r.url); if (g && go.protocols.indexOf(g) === -1) { n(new Pt("Unsupported protocol " + g + ":", Pt.ERR_BAD_REQUEST, e)); return; } v.send(o || null); }); }, PTe = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), o; const a = function(u) { if (!o) { o = !0, s(); const c = u instanceof Error ? u : this.reason; r.abort(c instanceof Pt ? c : new ed(c instanceof Error ? c.message : c)); } }; let i = t && setTimeout(() => { i = null, a(new Pt(`timeout ${t} of ms exceeded`, Pt.ETIMEDOUT)); }, t); const s = () => { e && (i && clearTimeout(i), i = null, e.forEach((u) => { u.unsubscribe ? u.unsubscribe(a) : u.removeEventListener("abort", a); }), e = null); }; e.forEach((u) => u.addEventListener("abort", a)); const { signal: l } = r; return l.unsubscribe = () => Ee.asap(s), l; } }, LTe = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e.slice(r, o), r = o; }, RTe = async function* (e, t) { for await (const n of DTe(e)) yield* LTe(n, t); }, DTe = async function* (e) { if (e[Symbol.asyncIterator]) { yield* e; return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: r } = await t.read(); if (n) break; yield r; } } finally { await t.cancel(); } }, UE = (e, t, n, r) => { const o = RTe(e, t); let a = 0, i, s = (l) => { i || (i = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: u, value: c } = await o.next(); if (u) { s(), l.close(); return; } let d = c.byteLength; if (n) { let f = a += d; n(f); } l.enqueue(new Uint8Array(c)); } catch (u) { throw s(u), u; } }, cancel(l) { return s(l), o.return(); } }, { highWaterMark: 2 }); }, sm = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", I9 = sm && typeof ReadableStream == "function", MTe = sm && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), A9 = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, NTe = I9 && A9(() => { let e = !1; const t = new Request(go.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), qE = 64 * 1024, lb = I9 && A9(() => Ee.isReadableStream(new Response("").body)), f0 = { stream: lb && ((e) => e.body) }; sm && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !f0[t] && (f0[t] = Ee.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Pt(`Response type '${t}' is not supported`, Pt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const BTe = async (e) => { if (e == null) return 0; if (Ee.isBlob(e)) return e.size; if (Ee.isSpecCompliantForm(e)) return (await new Request(go.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (Ee.isArrayBufferView(e) || Ee.isArrayBuffer(e)) return e.byteLength; if (Ee.isURLSearchParams(e) && (e = e + ""), Ee.isString(e)) return (await MTe(e)).byteLength; }, zTe = async (e, t) => Ee.toFiniteNumber(e.getContentLength()) ?? BTe(t), VTe = sm && (async (e) => { let { url: t, method: n, data: r, signal: o, cancelToken: a, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = F9(e); u = u ? (u + "").toLowerCase() : "text"; let h = PTe([o, a && a.toAbortSignal()], i), p; const v = h && h.unsubscribe && (() => { h.unsubscribe(); }); let m; try { if (l && NTe && n !== "get" && n !== "head" && (m = await zTe(c, r)) !== 0) { let w = new Request(t, { method: "POST", body: r, duplex: "half" }), k; if (Ee.isFormData(r) && (k = w.headers.get("content-type")) && c.setContentType(k), w.body) { const [S, _] = VE( m, p0(jE(l)) ); r = UE(w.body, qE, S, _); } } Ee.isString(d) || (d = d ? "include" : "omit"); const g = "credentials" in Request.prototype; p = new Request(t, { ...f, signal: h, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: g ? d : void 0 }); let b = await fetch(p); const C = lb && (u === "stream" || u === "response"); if (lb && (s || C && v)) { const w = {}; ["status", "statusText", "headers"].forEach((O) => { w[O] = b[O]; }); const k = Ee.toFiniteNumber(b.headers.get("content-length")), [S, _] = s && VE( k, p0(jE(s), !0) ) || []; b = new Response( UE(b.body, qE, S, () => { _ && _(), v && v(); }), w ); } u = u || "text"; let x = await f0[Ee.findKey(f0, u) || "text"](b, e); return !C && v && v(), await new Promise((w, k) => { T9(w, k, { data: x, headers: mo.from(b.headers), status: b.status, statusText: b.statusText, config: e, request: p }); }); } catch (g) { throw v && v(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign( new Pt("Network Error", Pt.ERR_NETWORK, e, p), { cause: g.cause || g } ) : Pt.from(g, g && g.code, e, p); } }), ub = { http: nTe, xhr: ATe, fetch: VTe }; Ee.forEach(ub, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const WE = (e) => `- ${e}`, jTe = (e) => Ee.isFunction(e) || e === null || e === !1, P9 = { getAdapter: (e) => { e = Ee.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e[a]; let i; if (r = n, !jTe(n) && (r = ub[(i = String(n)).toLowerCase()], r === void 0)) throw new Pt(`Unknown adapter '${i}'`); if (r) break; o[i || "#" + a] = r; } if (!r) { const a = Object.entries(o).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? a.length > 1 ? `since : ` + a.map(WE).join(` `) : " " + WE(a[0]) : "as no adapter specified"; throw new Pt( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: ub }; function O1(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new ed(null, e); } function GE(e) { return O1(e), e.headers = mo.from(e.headers), e.data = T1.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), P9.getAdapter(e.adapter || Rf.adapter)(e).then(function(t) { return O1(e), t.data = T1.call( e, e.transformResponse, t ), t.headers = mo.from(t.headers), t; }, function(t) { return _9(t) || (O1(e), t && t.response && (t.response.data = T1.call( e, e.transformResponse, t.response ), t.response.headers = mo.from(t.response.headers))), Promise.reject(t); }); } const L9 = "1.7.7", $x = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { $x[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const KE = {}; $x.transitional = function(e, t, n) { function r(o, a) { return "[Axios v" + L9 + "] Transitional option '" + o + "'" + a + (n ? ". " + n : ""); } return (o, a, i) => { if (e === !1) throw new Pt( r(a, " has been removed" + (t ? " in " + t : "")), Pt.ERR_DEPRECATED ); return t && !KE[a] && (KE[a] = !0, console.warn( r( a, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(o, a, i) : !0; }; }; function HTe(e, t, n) { if (typeof e != "object") throw new Pt("options must be an object", Pt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const a = r[o], i = t[a]; if (i) { const s = e[a], l = s === void 0 || i(s, a, e); if (l !== !0) throw new Pt("option " + a + " must be " + l, Pt.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Pt("Unknown option " + a, Pt.ERR_BAD_OPTION); } } const cb = { assertOptions: HTe, validators: $x }, rs = cb.validators; class Fl { constructor(t) { this.defaults = t, this.interceptors = { request: new BE(), response: new BE() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (r) { if (r instanceof Error) { let o; Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error(); const a = o.stack ? o.stack.replace(/^.+\n/, "") : ""; try { r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + a) : r.stack = a; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Xl(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: a } = n; r !== void 0 && cb.assertOptions(r, { silentJSONParsing: rs.transitional(rs.boolean), forcedJSONParsing: rs.transitional(rs.boolean), clarifyTimeoutError: rs.transitional(rs.boolean) }, !1), o != null && (Ee.isFunction(o) ? n.paramsSerializer = { serialize: o } : cb.assertOptions(o, { encode: rs.function, serialize: rs.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = a && Ee.merge( a.common, a[n.method] ); a && Ee.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (p) => { delete a[p]; } ), n.headers = mo.concat(i, a); const s = []; let l = !0; this.interceptors.request.forEach(function(p) { typeof p.runWhen == "function" && p.runWhen(n) === !1 || (l = l && p.synchronous, s.unshift(p.fulfilled, p.rejected)); }); const u = []; this.interceptors.response.forEach(function(p) { u.push(p.fulfilled, p.rejected); }); let c, d = 0, f; if (!l) { const p = [GE.bind(this), void 0]; for (p.unshift.apply(p, s), p.push.apply(p, u), f = p.length, c = Promise.resolve(n); d < f; ) c = c.then(p[d++], p[d++]); return c; } f = s.length; let h = n; for (d = 0; d < f; ) { const p = s[d++], v = s[d++]; try { h = p(h); } catch (m) { v.call(this, m); break; } } try { c = GE.call(this, h); } catch (p) { return Promise.reject(p); } for (d = 0, f = u.length; d < f; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = Xl(this.defaults, t); const n = O9(t.baseURL, t.url); return S9(n, t.params, t.paramsSerializer); } } Ee.forEach(["delete", "get", "head", "options"], function(e) { Fl.prototype[e] = function(t, n) { return this.request(Xl(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); Ee.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, o, a) { return this.request(Xl(a || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: o })); }; } Fl.prototype[e] = t(), Fl.prototype[e + "Form"] = t(!0); }); class _x { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(o) { n = o; }); const r = this; this.promise.then((o) => { if (!r._listeners) return; let a = r._listeners.length; for (; a-- > 0; ) r._listeners[a](o); r._listeners = null; }), this.promise.then = (o) => { let a; const i = new Promise((s) => { r.subscribe(s), a = s; }).then(o); return i.cancel = function() { r.unsubscribe(a); }, i; }, t(function(o, a, i) { r.reason || (r.reason = new ed(o, a, i), n(r.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } toAbortSignal() { const t = new AbortController(), n = (r) => { t.abort(r); }; return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new _x(function(n) { t = n; }), cancel: t }; } } function UTe(e) { return function(t) { return e.apply(null, t); }; } function qTe(e) { return Ee.isObject(e) && e.isAxiosError === !0; } const db = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(db).forEach(([e, t]) => { db[t] = e; }); function R9(e) { const t = new Fl(e), n = p9(Fl.prototype.request, t); return Ee.extend(n, Fl.prototype, t, { allOwnKeys: !0 }), Ee.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return R9(Xl(e, r)); }, n; } const Yn = R9(Rf); Yn.Axios = Fl; Yn.CanceledError = ed; Yn.CancelToken = _x; Yn.isCancel = _9; Yn.VERSION = L9; Yn.toFormData = im; Yn.AxiosError = Pt; Yn.Cancel = Yn.CanceledError; Yn.all = function(e) { return Promise.all(e); }; Yn.spread = UTe; Yn.isAxiosError = qTe; Yn.mergeConfig = Xl; Yn.AxiosHeaders = mo; Yn.formToJSON = (e) => $9(Ee.isHTMLForm(e) ? new FormData(e) : e); Yn.getAdapter = P9.getAdapter; Yn.HttpStatusCode = db; Yn.default = Yn; const WTe = "data:image/svg+xml,%3csvg%20id='logo-sparc-wave-primary'%20data-name='logo-sparc-wave-primary'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20400%20190.5854'%3e%3cdefs%3e%3clinearGradient%20id='linear-gradient'%20y1='96.3505'%20x2='400'%20y2='96.3505'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%230b00bf'/%3e%3cstop%20offset='1'%20stop-color='%23bc00fc'/%3e%3c/linearGradient%3e%3c/defs%3e%3ctitle%3eSPARC%20Logo%3c/title%3e%3cpath%20d='M396.6976,128.6248l-146.2735-3.38a6.5358,6.5358,0,0,0-6.1378,3.9236l-.0612.1407-13.673,31.4482L202.9416,9.5333l-.01-.0685a8.9823,8.9823,0,0,0-17.6624-.0114L163.673,125.3819,3.298,129.2886a3.38,3.38,0,0,0,.0269,6.7592L169.34,138.7635a6.5939,6.5939,0,0,0,6.5373-5.1457l.0571-.2546,17.8534-79.5649L221.26,185.1237l.0256.1243A6.7593,6.7593,0,0,0,234.092,186.52L254.9005,138.66l141.7971-3.2762a3.3805,3.3805,0,0,0,0-6.7592Z'%20style='fill:url(%23linear-gradient)'/%3e%3cpath%20d='M25.6793,0C41.3957,0,51.057,10.0926,51.057,26.0972v9.5162H36.2053V26.0972c0-7.3532-3.8945-11.8219-10.526-11.8219-6.7768,0-10.6691,4.4687-10.6691,11.8219,0,3.8945,1.2982,7.3533,5.4786,11.3908l19.754,18.601C46.5861,62.1441,52.21,68.7778,52.21,79.88c0,16.0047-9.95,26.0973-25.9543,26.0973C10.108,105.9776.1585,95.885.1585,79.88V70.362H15.01V79.88c0,7.3533,4.0375,11.822,11.2455,11.822,7.065,0,11.1025-4.4687,11.1025-11.822,0-4.4709-2.1628-8.6514-6.0551-12.2576L11.1158,48.7357C3.043,41.2372.1585,34.8939.1585,25.666.1585,10.0926,9.82,0,25.6793,0Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M99.7971,69.7856v35.1821H84.9454V1.01h25.3755c16.0047,0,26.0973,10.0926,26.0973,26.0973V43.6883c0,16.15-10.0926,26.0973-26.0973,26.0973Zm10.3808-13.9849c7.2081,0,11.3908-4.3257,11.3908-11.6789V26.6759c0-7.21-4.1827-11.6811-11.3908-11.6811H99.7971V55.8007Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M278.5812,108.147H263.73V4.1893h26.0972c16.0047,0,26.0973,10.0926,26.0973,26.0972v14.13c0,9.95-4.3257,17.7363-11.3908,22.205,4.1827,12.6889,10.0926,29.9917,13.8418,41.5254h-15.14L290.6914,70.3708h-12.11Zm11.1-51.7632c7.21,0,11.3907-4.3257,11.3907-11.5338V29.8553c0-7.21-4.18-11.6812-11.3907-11.6812h-11.1v38.21Z'%20style='fill:%230e0e19'/%3e%3cpath%20d='M399.844,73.5414V83.06c0,16.0047-9.9474,26.0973-25.9521,26.0973-16.15,0-26.0972-10.0926-26.0972-26.0973V29.2766c0-16.0046,9.9473-26.0972,26.0972-26.0972,16.0047,0,25.9521,10.0926,25.9521,26.0972v9.5161h-14.85V29.2766c0-7.3532-4.0374-11.822-11.1025-11.822-7.21,0-11.2477,4.4688-11.2477,11.822V83.06c0,7.3533,4.0375,11.822,11.2477,11.822,7.0651,0,11.1025-4.4687,11.1025-11.822V73.5414Z'%20style='fill:%230e0e19'/%3e%3c/svg%3e"; function GTe() { const e = WTe; async function t(n, r, o) { return await Yn({ method: "get", url: n, params: r, timeout: o }); } return { defaultImg: e, getRequest: t }; } const KTe = ["src"], YTe = ["src"], XTe = { key: 1, class: "details" }, ZTe = { key: 0 }, JTe = { class: "title text-placeholder" }, QTe = { __name: "Card", props: { data: { type: Object, required: !0 }, width: { type: Number, default: 3 }, height: { type: Number, default: 3 }, showCardDetails: { type: Boolean }, bodyStyle: { type: Object, default: () => ({ padding: "20px", background: "#ffffff" }) }, imageStyle: { type: Object, default: () => ({}) }, imageContainerStyle: { type: Object, default: () => ({}) }, shadow: { type: String, default: "always" } }, emits: ["card-clicked", "datalink-clicked"], setup(e, { emit: t }) { function n(g) { let b; try { b = new URL(g); } catch { return !1; } return b.protocol === "http:" || b.protocol === "https:"; } const { defaultImg: r, getRequest: o } = GTe(), a = z(); z(null), z(4); const i = z(void 0), s = z(!1), l = z(!1), u = z(!1), c = e, d = t, f = $(() => c.data.title && ((i ? i.value : !1) || s.value) && (c.data.link || c.data.userData)); $(() => showCardDetails ? height * 0.525 : height), $(() => width - 2 * h), $(() => height * 0.237); const h = $(() => height * 0.076); $(() => showCardDetails ? height * 0.525 : height), ce( () => c.data, () => { i.value = void 0, s.value = !1, u.value = !1, l.value = !1, c.data.thumbnail ? n(c.data.thumbnail) && c.data.mimetype ? v(c.data.thumbnail, { fetchAttempts: 0 }) : i.value = c.data.thumbnail : s.value = !0, Ue(() => { m(); }); }, { immediate: !0 } ), Up(() => { Ue(() => { m(); }); }); function p() { if (c.data.link) { const g = document.createElement("a"); g.href = c.data.link, g.target = "_blank", document.body.appendChild(g), g.click(), d("datalink-clicked", c.data.link), g.remove(); } c.data.userData && d("card-clicked", c.data.userData); } function v(g, b) { o(g, {}, 11e3).then( (C) => { let x = C.data; typeof x == "string" && x.startsWith("data:") ? i.value = C.data : c.data.mimetype ? i.value = `data:${c.data.mimetype};base64,${C.data}` : i.value = C.data; }, (C) => { C.message.includes("timeout") && C.message.includes("exceeded") && b.fetchAttempts < 3 ? (b.fetchAttempts += 1, v(g, b)) : s.value = !0; } ); } function m() { if (c.data.hideTitle) l.value = !0, u.value = !0; else { const g = a; g && g.offsetParent ? (u.value = !0, g.offsetWidth >= g.scrollWidth ? l.value = !0 : l.value = !1) : c.data.title.length > 20 ? l.value = !1 : l.value = !0; } } return (g, b) => { const C = c6e, x = V8e, w = W8e, k = g6e; return E(), Q(w, { shadow: e.shadow, "body-style": e.bodyStyle, style: Ze({ padding: "0px", maxWidth: e.width + "rem" }), class: "card" }, { default: R(() => [ Ne((E(), L("div", null, [ B("div", { class: "cursor-pointer", style: Ze(e.imageContainerStyle), onClick: Je(p, ["prevent"]) }, [ s.value ? (E(), L("img", { key: 0, src: y(r), style: Ze(e.imageStyle) }, null, 12, KTe)) : (E(), L("img", { key: 1, src: i.value, alt: "thumbnail loading ...", style: Ze(e.imageStyle) }, null, 12, YTe)) ], 4), Z("", !0), e.showCardDetails ? (E(), L("div", XTe, [ e.data.hideType ? Z("", !0) : (E(), L("p", ZTe, [ B("b", null, me(e.data.type), 1) ])), W(C, { "virtual-ref": a.value, disabled: l.value, content: e.data.title, placement: "top", trigger: "hover", "popper-class": "gallery-popper", "virtual-triggering": "" }, null, 8, ["virtual-ref", "disabled", "content"]), Ne(B("p", { ref_key: "titleText", ref: a, class: "title" }, me(e.data.title), 513), [ [ft, !e.data.hideTitle] ]), Ne(B("p", JTe, null, 512), [ [ft, e.data.hideTitle] ]), W(x, { class: "button", onClick: Je(p, ["prevent"]), size: "large" }, { default: R(() => [ Ae(" View " + me(e.data.type), 1) ]), _: 1 }) ])) : Z("", !0) ])), [ [k, !f.value] ]) ]), _: 1 }, 8, ["shadow", "body-style", "style"]); }; } }, eOe = /* @__PURE__ */ Zw(QTe, [["__scopeId", "data-v-8306387d"]]), lm = (e) => (Tr("data-v-e745b327"), e = e(), Or(), e), tOe = { ref: "myButton", class: "gallery" }, nOe = { class: "gallery-strip" }, rOe = /* @__PURE__ */ lm(() => /* @__PURE__ */ B("span", { class: "progress-button" }, "‹", -1)), oOe = [ rOe ], aOe = { key: 1, style: { width: "2rem" } }, iOe = /* @__PURE__ */ lm(() => /* @__PURE__ */ B("div", { class: "filler" }, null, -1)), sOe = { class: "card-line" }, lOe = /* @__PURE__ */ lm(() => /* @__PURE__ */ B("div", { class: "filler" }, null, -1)), uOe = /* @__PURE__ */ lm(() => /* @__PURE__ */ B("span", { class: "progress-button" }, "›", -1)), cOe = [ uOe ], dOe = { key: 3, style: { width: "2rem" } }, pOe = { __name: "Gallery", props: { /** * The array of items (data) to render the gallery. */ items: { type: Array, default: () => [] }, /** * The maximum width we are allowed minus two buttons for next and previous divided by the width of a card. */ maxWidth: { type: Number, default: 3 }, /** * The width of the card in rem unit. */ cardWidth: { type: Number, default: 13.8 }, /** * The option to show indicator bar at the bottom. */ showIndicatorBar: { type: Boolean, default: !0 }, /** * The option to highlight the active item. */ highlightActive: { type: Boolean, default: !0 }, /** * The option to show card details. */ showCardDetails: { type: Boolean, default: !0 }, /** * The CSS to define card's style. */ bodyStyle: { type: Object, default: () => ({ padding: "20px", background: "#ffffff" }) }, /** * The space between the card and indicator bar. */ bottomSpacer: { type: Object, default: () => ({ minHeight: "4rem" }) }, /** * The CSS for image container in card. */ imageContainerStyle: { type: Object, default: () => ({}) }, /** * The CSS for image style in card. */ imageStyle: { type: Object, default: () => ({}) }, // TODO: not in use metaData: { type: Object, default: () => ({ datasetVersion: -1, datasetId: -1 }) }, // TODO: not in use description: { type: String, default: "" }, /** * when to show card shadows (always / hover / never) */ shadow: { type: String, default: "always" } }, emits: ["card-clicked", "datalink-clicked"], setup(e, { expose: t, emit: n }) { function r(_) { return typeof window < "u" ? _ * parseFloat(window.getComputedStyle(document.documentElement).fontSize) : _ * 16; } const o = e, a = n, i = z(0), s = z(0), l = z(2), u = z(2), c = $(() => o.items.length), d = $(() => s.value > 0), f = $(() => s.value < c.value - 1), h = $(() => 0.78 * o.cardWidth); $(() => c.value * (o.cardWidth + 0.25) - 0.25); const p = $(() => { const _ = r(0.5), O = r(2), F = r(o.cardWidth), I = (o.maxWidth - 2 * O - 2 * _) / (1.1 * F); return Math.max(1, Math.floor(I)); }), v = $(() => { const _ = r(1), O = o.maxWidth / (_ * c.value); return o.showIndicatorBar && O > 0.1 && c.value > 1; }), m = $(() => { const _ = Math.floor(p.value / 2); let O = s.value - _; return O < 0 ? O = 0 : O + p.value > c.value && (O = c.value - p.value), O; }), g = $(() => { let _ = []; for (let O = 0; O < p.value; O++) _.push(o.items[O + m.value]); return _; }); function b(_) { a("card-clicked", _); } function C(_) { a("datalink-clicked", _); } function x(_) { return s.value - m.value === _ && o.highlightActive; } function w() { s.value += 1; } function k() { s.value -= 1; } function S(_) { s.value !== _ && (s.value = _); } return t({ count: i, currentIndex: s, controlHeight: l, controlWidth: u, cardClicked: b, isActive: x, goNext: w, goPrev: k, indicatorClicked: S }), (_, O) => (E(), L("div", tOe, [ B("div", nOe, [ e.items.length > 1 ? (E(), L("a", { key: 0, href: "#", class: V(["oval", "prev", { disabled: !d.value }]), onClick: Je(k, ["prevent"]) }, oOe, 2)) : (E(), L("div", aOe)), iOe, B("div", sOe, [ (E(!0), L(De, null, xt(g.value, (F, I) => (E(), L("span", { key: "card_" + I, class: V(["key-image-span", { active: x(I) }]) }, [ F ? (E(), Q(eOe, { key: 0, data: F, "body-style": e.bodyStyle, "image-container-style": e.imageContainerStyle, "image-style": e.imageStyle, width: e.cardWidth, height: h.value, shadow: e.shadow, "show-card-details": e.showCardDetails, onCardClicked: b, onDatalinkClicked: C }, null, 8, ["data", "body-style", "image-container-style", "image-style", "width", "height", "shadow", "show-card-details"])) : Z("", !0) ], 2))), 128)) ]), lOe, e.items.length > 1 ? (E(), L("a", { key: 2, href: "#", class: V(["oval", "next", { disabled: !f.value }]), onClick: Je(w, ["prevent"]) }, cOe, 2)) : (E(), L("div", dOe)) ]), B("div", { style: Ze(e.bottomSpacer) }, null, 4), v.value ? (E(), Q(c4e, { key: 0, count: c.value, current: s.value, onClicked: S }, null, 8, ["count", "current"])) : Z("", !0) ], 512)); } }, fOe = /* @__PURE__ */ Zw(pOe, [["__scopeId", "data-v-e745b327"]]), hOe = { name: "S3Bucket", data() { return { s3Bucket: void 0, s3Prefix: "" }; }, methods: { updateS3Bucket: function(e) { if (this.s3Bucket = void 0, e) { const t = e.split("//")[1]; if (t) { this.s3Bucket = t.split("/")[0]; const n = t.indexOf("/"); this.s3Prefix = t.substring(n + 1); return; } } }, getS3Args: function() { return this.s3Bucket ? `?s3BucketName=${this.s3Bucket}` : ""; }, getS3Prefix: function() { return this.s3Prefix; } } }, Mh = (e) => e.split("\\").pop().split("/").pop(), Ed = function(e) { return e.replace(/\b\w/g, (t) => t.toUpperCase()); }, vOe = { name: "ImageGallery", components: { Gallery: fOe }, mixins: [i4e, hOe], props: { datasetBiolucida: { type: Object, default: () => ({}) }, envVars: { type: Object, default: () => { } }, label: { type: String, default: "" }, plots: { type: Array, default: () => [] }, datasetId: { type: Number, default: -1 }, datasetVersion: { type: Number, default: -1 }, datasetThumbnail: { type: String, default: "" }, category: { type: String, default: "All" }, entry: { type: Object, default: () => ({}) } }, data() { return { currentIndex: 0, ro: null, maxWidth: 3, items: { //Use the Images instead for Biolucida Images //"Biolucida Images": [], Dataset: [], Images: [], Scaffolds: [], Segmentations: [], Simulations: [], Videos: [], Plots: [] }, bodyStyle: { padding: "0px", background: "#ffffff" }, imageContainerStyle: { width: "160px", height: "160px", display: "flex", alignItems: "center", justifyContent: "center" }, imageStyle: { maxWidth: "160px", maxHeight: "160px" }, shadow: "never", bottomSpacer: { minHeight: "0rem" }, resetIndex: !1 }; }, methods: { cardClicked: function(e) { this.$emit("card-clicked", e); }, datalinkClicked: function(e) { this.$emit("datalink-clicked", e); }, createSciCurnchItems: function() { this.updateS3Bucket(this.entry.s3uri), this.createDatasetItem(), this.createScaffoldItems(), this.createSimulationItems(), this.createPlotItems(), this.createSegmentationItems(); }, createDatasetItem: function() { const e = `${this.envVars.ROOT_URL}/datasets/${this.datasetId}?type=dataset`; this.datasetThumbnail && this.items.Dataset.push({ id: -1, //Work around gallery requires a truthy string title: " ", type: `Dataset ${this.datasetId}`, thumbnail: this.datasetThumbnail, link: e, hideType: !0, hideTitle: !0 }); }, createImageItems: function() { this.entry.images && this.entry.images.forEach((e) => { const t = e.dataset.path, n = e.identifier, r = `${this.envVars.ROOT_URL}/datasets/imageviewer?dataset_id=${this.datasetId}&dataset_version=${this.datasetVersion}&file_path=${t}&mimetype=${e.mimetype.name}`; this.items.Images.push({ id: n, title: Mh(t), type: "Image", link: r, hideType: !0 }); }); }, createPlotItems: function() { this.entry.plots && this.entry.plots.forEach((e) => { const t = e.dataset.path, n = e.identifier, r = this.getThumbnailForPlot( e, this.entry.thumbnails ); let o, a = ""; r && (o = this.getImageURL(this.envVars.API_LOCATION, { id: n, prefix: this.getS3Prefix(), file_path: r.dataset.path, s3Bucket: this.s3Bucket }), a = r.mimetype.name); const i = e.datacite, s = `${this.envVars.API_LOCATION}/s3-resource/${this.getS3Prefix()}files/`, l = s + e.dataset.path + this.getS3Args(); let u = {}; try { u = JSON.parse( i.supplemental_json_metadata.description ); } catch (h) { console.warn(h); } let c = []; i.isDescribedBy && c.push({ url: s + i.isDescribedBy.path }); const d = { dataSource: { url: l }, metadata: u, supplementalData: c }; let f = { label: Ed(this.label), resource: d, s3uri: this.entry.s3uri, title: "View plot", type: "Plot", discoverId: this.discoverId, version: this.datasetVersion }; this.items.Plots.push({ id: n, title: Mh(t), type: "Plot", thumbnail: o, userData: f, hideType: !0, mimetype: a }); }); }, createScaffoldItems: function() { if (this.entry.scaffolds) { let e = 0; this.entry.scaffolds.forEach((t, n) => { const r = t.dataset.path, o = t.identifier, a = this.getThumbnailForScaffold( t, this.entry.scaffoldViews, this.entry.thumbnails, e ); let i = "", s; a && (s = this.getImageURL(this.envVars.API_LOCATION, { id: o, prefix: this.getS3Prefix(), file_path: a.dataset.path, s3Bucket: this.s3Bucket }), i = a.mimetype.name); let l = { label: Ed(this.label), resource: `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${r}${this.getS3Args()}`, title: "View 3D scaffold", type: "Scaffold", discoverId: this.datasetId, apiLocation: this.envVars.API_LOCATION, version: this.datasetVersion, banner: this.datasetThumbnail, s3uri: this.entry.s3uri, contextCardUrl: this.getContextCardUrl(n) }; this.items.Scaffolds.push({ id: o, title: Mh(r), type: "Scaffold", thumbnail: s, userData: l, hideType: !0, mimetype: i }); }); } }, createSegmentationItems: function() { this.entry.segmentation && this.entry.segmentation.forEach((e) => { const t = e.id; let n = e.dataset.path; n = n.replaceAll(" ", "_"), n = n.replaceAll(",", "_"); const r = { share_link: `${this.envVars.NL_LINK_PREFIX}/dataviewer?datasetId=${this.datasetId}&version=${this.datasetVersion}&path=files/${n}` }; let o = { label: Ed(this.label), resource: r, datasetId: this.datasetId, s3uri: this.entry.s3uri, title: "View segmentation", type: "Segmentation" }; const a = this.getSegmentationThumbnailURL( this.envVars.API_LOCATION, { id: t, datasetId: this.datasetId, datasetVersion: this.datasetVersion, segmentationFilePath: n, s3Bucket: this.s3Bucket } ); this.items.Segmentations.push({ id: t, title: Mh(n), type: "Segmentation", thumbnail: a, userData: o, hideType: !0, mimetype: "image/png" }); }); }, createSimulationItems: function() { if (this.entry.simulation && this.entry.simulation.length > 0) { let e = { label: void 0, apiLocation: this.envVars.API_LOCATION, s3uri: this.entry.s3uri, version: this.datasetVersion, title: "View simulation", type: "Simulation", name: this.entry.name, description: this.entry.description, discoverId: this.datasetId, dataset: `${this.envVars.ROOT_URL}/datasets/${this.datasetId}?type=dataset` }; this.items.Simulations.push({ id: "simulation", title: " ", type: "Simulation", hideType: !0, hideTitle: !0, userData: e }); } }, createVideoItems: function() { this.entry.videos && this.entry.videos.forEach((e) => { const t = this.getS3FilePath( this.datasetId, this.datasetVersion, e.dataset.path ), n = `${this.envVars.ROOT_URL}/datasets/videoviewer?dataset_version=${this.datasetVersion}&dataset_id=${this.datasetId}&file_path=${t}&mimetype=${e.mimetype.name}`; this.items.Videos.push({ title: e.name, type: "Video", thumbnail: this.defaultVideoImg, hideType: !0, link: n }); }); }, onResize: function() { this.maxWidth = this.$el.clientWidth; }, getContextCardUrl: function(e) { if (!(!this.entry.contextualInformation || this.entry.contextualInformation.length == 0)) { let t = this.entry["abi-contextual-information"].length == this.entry.scaffolds.length ? e : 0; return `${this.envVars.API_LOCATION}s3-resource/${this.getS3Prefix()}files/${this.entry.contextualInformation[t]}${this.getS3Args()}`; } }, getImageURL: function(e, t) { let n = `${e}/s3-resource/${t.prefix}files/${t.file_path}?encodeBase64=true`; return t.s3Bucket && (n = n + `&s3BucketName=${t.s3Bucket}`), n; } }, computed: { galleryItems() { this.resetIndex && this.$refs.gallery.indicatorClicked(0); let e = [...this.items.Dataset]; if (this.category === "All") { for (const [t, n] of Object.entries(this.items)) t !== "Dataset" && (e = e.concat(n)); return e; } else return [...this.items[this.category]]; } }, created: function() { this.createSciCurnchItems(); }, watch: { category: function() { this.resetIndex = !0; }, galleryItems: function() { this.resetIndex = !1; }, datasetBiolucida: { deep: !0, immediate: !0, handler: function(e) { let t = []; "dataset_images" in e && t.push( ...Array.from(e.dataset_images, (n) => { const r = this.getThumbnailURLFromBiolucida( this.envVars.API_LOCATION, { id: n.image_id } ), o = { share_link: n.share_link, id: n.image_id, itemId: n.sourcepkg_id }; let a = { label: Ed(this.label), resource: o, datasetId: this.datasetId, title: "View image", name: Ed(this.label), type: "Biolucida" }; return { id: n.image_id, title: "Image", type: "Image", thumbnail: r, userData: a, mimetype: "image/png", hideType: !0 }; }) ), this.items.Images = t; } } }, mounted() { this.ro = new ResizeObserver(this.onResize).observe(this.$el); }, unmounted() { delete this.ro; } }, gOe = { class: "full-size" }; function mOe(e, t, n, r, o, a) { const i = Xe("Gallery"); return E(), L("div", gOe, [ W(i, { bottomSpacer: o.bottomSpacer, cardWidth: 10, items: a.galleryItems, "max-width": o.maxWidth, "show-indicator-bar": !1, "show-card-details": !0, "highlight-active": !1, "image-style": o.imageStyle, "image-container-style": o.imageContainerStyle, "body-style": o.bodyStyle, shadow: o.shadow, onCardClicked: a.cardClicked, onDatalinkClicked: a.datalinkClicked, ref: "gallery" }, null, 8, ["bottomSpacer", "items", "max-width", "image-style", "image-container-style", "body-style", "shadow", "onCardClicked", "onDatalinkClicked"]) ]); } const D9 = /* @__PURE__ */ li(vOe, [["render", mOe], ["__scopeId", "data-v-7e45605c"]]); function yOe(e) { return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) { var r = e.get(t); r ? r.push(n) : e.set(t, [n]); }, off: function(t, n) { var r = e.get(t); r && (n ? r.splice(r.indexOf(n) >>> 0, 1) : e.set(t, [])); }, emit: function(t, n) { var r = e.get(t); r && r.slice().map(function(o) { o(n); }), (r = e.get("*")) && r.slice().map(function(o) { o(t, n); }); } }; } const Qn = new yOe(), h0 = { "homo sapiens": "Human", "rattus norvegicus": "Rat", "mus musculus": "Mouse", "sus scrofa domesticus": "Pig", "sus scrofa": "Boar", "felis catus": "Cat" }, YE = "data:image/svg+xml,%3csvg%20width='429'%20height='238'%20viewBox='0%200%20429%20238'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3emissing-image-4x3%3c/title%3e%3cg%20fill-rule='nonzero'%20fill='none'%3e%3cpath%20d='M0%200h429v238H0z'%20fill='%23F0F1F2'/%3e%3cpath%20d='M160.875%2079v77.7h107.25V79h-107.25zm101.888%204.9v39.8l-28.85-26.1-28.744%2026.8-14.693-13.7-24.239%2022.7V83.9h96.525zm-96.525%2056.5l24.345-22.7%2036.358%2033.9h-60.704v-11.2zm68.21%2011.3l-25.525-23.8%2024.99-23.3%2028.85%2026.1v21h-28.314z'%20fill='%23DCDDDF'/%3e%3c/g%3e%3c/svg%3e", bOe = { data() { return { ElIconView: xI }; }, name: "DatasetCard", components: { BadgesGroup: WA, ImageGallery: D9, Button: bo, Icon: ln, CopyToClipboard: Lc }, props: { /** * Object containing information for * the required viewing. */ entry: { type: Object, default: () => { } }, envVars: { type: Object, default: () => { } } }, data: function() { return { thumbnail: YE, dataLocation: this.entry.doi, discoverId: void 0, loading: !0, version: 1, lastDoi: void 0, biolucidaData: void 0, currentCategory: "All", copyContent: "" }; }, computed: { contributors: function() { let e = ""; return this.entry.contributors && (this.entry.contributors.length === 1 ? e = this.lastName(this.entry.contributors[0].name) : this.entry.contributors.length === 2 ? e = this.lastName(this.entry.contributors[0].name) + " & " + this.lastName(this.entry.contributors[1].name) : this.entry.contributors.length > 2 && (e = this.lastName(this.entry.contributors[0].name) + " et al.")), e; }, samples: function() { let e = ""; return this.entry.species && (h0[this.entry.species[0].toLowerCase()] ? e = `${h0[this.entry.species[0].toLowerCase()]}` : e = `${this.entry.species}`), this.entry.numberSamples > 0 && (e += " (", this.entry.numberSamples === 1 ? e += `${this.entry.numberSamples} sample` : this.entry.numberSamples > 1 && (e += `${this.entry.numberSamples} samples`), this.entry.numberSubjects === 1 ? e += ` from ${this.entry.numberSubjects} subject` : this.entry.numberSamples > 1 && (e += ` from ${this.entry.numberSubjects} subjects`), e += ")"), e; }, label: function() { return this.entry.organs ? this.entry.organs[0] : this.entry.name; }, publishYear: function() { return this.entry.publishDate.split("-")[0]; } }, mounted: function() { this.updateCopyContent(); }, methods: { cardClicked: function() { this.openDataset(); }, categoryChanged: function(e) { this.currentCategory = e; }, galleryClicked: function(e) { this.propogateCardAction(e); }, galleryDatalinkClicked: function(e) { Qn.emit("datalink-clicked", e); }, openDataset: function() { window.open(this.dataLocation, "_blank"); }, openRepository: function() { let e = this.envVars.API_LOCATION; this.entry.additionalLinks.forEach(function(t) { if (t.description == "Repository") { let n = new XMLHttpRequest(); n.open("POST", e + "/pmr_latest_exposure", !0), n.setRequestHeader("Content-type", "application/json"), n.onreadystatechange = () => { if (n.readyState === 4) { let r = ""; n.status === 200 && (r = JSON.parse(n.responseText).url), r === "" && (r = t.uri), window.open(r, "_blank"); } }, n.send(JSON.stringify({ workspace_url: t.uri })); } }); }, propogateCardAction: function(e) { Qn.emit("PopoverActionClick", e), Qn.emit("contextUpdate", e); }, splitDOI: function(e) { return [ e.split("/")[e.split("/").length - 2], e.split("/")[e.split("/").length - 1] ]; }, getBanner: function() { if (this.lastDoi !== this.entry.doi) { this.lastDoi = this.entry.doi, this.loading = !0; let e = this.splitDOI(this.entry.doi); fetch( `${this.envVars.PENNSIEVE_API_LOCATION}/discover/datasets/doi/${e[0]}/${e[1]}` ).then((t) => { if (t.ok) return t.json(); throw Error(t.statusText); }).then((t) => { this.thumbnail = t.banner, this.discoverId = t.id, this.version = t.version, this.dataLocation = `https://sparc.science/datasets/${t.id}?type=dataset`, this.getBiolucidaInfo(this.discoverId), this.loading = !1, this.updateCopyContent(); }).catch(() => { this.thumbnail = YE, this.discoverId = Number(this.entry.datasetId), this.loading = !1; }); } }, lastName: function(e) { return e.split(",")[0]; }, getBiolucidaInfo: function(e) { let t = this.envVars.API_LOCATION + "image_search/" + e; fetch(t).then((n) => n.json()).then((n) => { n.status == "success" && (this.biolucidaData = n); }); }, updateCopyContent: function() { const e = []; if (this.entry.name && e.push(`
    ${this.entry.name}
    `), this.contributors) { let t = this.contributors; this.entry.publishDate && (t += ` (${this.publishYear})`), e.push(`
    ${t}
    `); } if (this.samples && e.push(`
    ${this.samples}
    `), this.entry.doi) { let t = "
    DOI:
    "; t += ` `, t += `${this.entry.doi}`, e.push(`
    ${t}
    `); } if (this.entry.datasetId) { let t = "
    Dataset ID:
    "; t += ` `, t += `${this.entry.datasetId}`, e.push(`
    ${t}
    `); } if (this.dataLocation) { let t = "
    Dataset URL:
    "; t += ` `, t += `${this.dataLocation}`, e.push(`
    ${t}
    `); } if (this.version) { let t = "
    Dataset version:
    "; t += ` `, t += `${this.version}`, e.push(`
    ${t}
    `); } this.copyContent = e.join(`
    `); } }, created: function() { this.getBanner(); }, watch: { // currently not using card overflow "entry.description": function() { this.getBanner(); } } }, wOe = (e) => (Tr("data-v-541a51e6"), e = e(), Or(), e), xOe = { class: "dataset-card-container", ref: "container" }, kOe = { class: "dataset-card", ref: "card" }, COe = /* @__PURE__ */ wOe(() => /* @__PURE__ */ B("div", { class: "seperator-path" }, null, -1)), SOe = { class: "card" }, EOe = { class: "card-left" }, $Oe = { class: "card-right" }, _Oe = { class: "details" }, TOe = { class: "details" }, OOe = { key: 0, class: "details loading-icon" }, FOe = { class: "badges-container" }, IOe = { class: "float-button-container" }; function AOe(e, t, n, r, o, a) { const i = D9, s = bo, l = WA, u = Xe("CopyToClipboard"), c = qg; return E(), L("div", xOe, [ B("div", kOe, [ COe, Ne((E(), L("div", SOe, [ B("span", EOe, [ !e.loading && e.discoverId ? (E(), Q(i, { key: 0, datasetId: e.discoverId, datasetVersion: e.version, entry: n.entry, envVars: n.envVars, label: a.label, datasetThumbnail: e.thumbnail, "dataset-biolucida": e.biolucidaData, category: e.currentCategory, onCardClicked: a.galleryClicked, onDatalinkClicked: a.galleryDatalinkClicked }, null, 8, ["datasetId", "datasetVersion", "entry", "envVars", "label", "datasetThumbnail", "dataset-biolucida", "category", "onCardClicked", "onDatalinkClicked"])) : Z("", !0) ]), B("div", $Oe, [ B("div", { class: "title", onClick: t[0] || (t[0] = (...d) => a.cardClicked && a.cardClicked(...d)) }, me(n.entry.name), 1), B("div", _Oe, me(a.contributors) + " " + me(n.entry.publishDate ? `(${a.publishYear})` : ""), 1), B("div", TOe, me(a.samples), 1), n.entry.detailsReady ? Z("", !0) : Ne((E(), L("div", OOe, null, 512)), [ [c, !n.entry.detailsReady] ]), B("div", null, [ n.entry.simulation ? (E(), Q(s, { key: 0, onClick: a.openRepository, size: "small", class: "button", icon: o.ElIconView }, { default: R(() => [ Ae("View repository") ]), _: 1 }, 8, ["onClick", "icon"])) : Z("", !0) ]), B("div", FOe, [ W(l, { entry: n.entry, "dataset-biolucida": e.biolucidaData, onCategoryChanged: a.categoryChanged }, null, 8, ["entry", "dataset-biolucida", "onCategoryChanged"]) ]), B("div", IOe, [ W(u, { content: e.copyContent }, null, 8, ["content"]) ]) ]) ])), [ [c, e.loading] ]) ], 512) ], 512); } const M9 = /* @__PURE__ */ li(bOe, [["render", AOe], ["__scopeId", "data-v-541a51e6"]]), XE = 12; function ZE() { const e = new Uint8Array(16); window.crypto.getRandomValues(e), e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128; const t = Array.from(e).map((n) => n.toString(16).padStart(2, "0")).join(""); return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`; } const POe = { name: "SearchHistory", components: { Tag: kc, Select: Hg }, data() { return { searchHistory: [], savedSearchHistory: [] }; }, mounted: function() { this.getSearchHistory(), Qn.on("search-changed", (e) => { this.setSearchHistory(e); }), this.updateSearchHistory(), this.savedSearchHistory = this.searchHistory.filter((e) => e.saved); }, methods: { getSearchHistory() { localStorage.getItem("sparc.science-sidebar-search-history") ? this.searchHistory = JSON.parse( localStorage.getItem("sparc.science-sidebar-search-history") ) : this.searchHistory = []; }, clearSearchHistory() { localStorage.removeItem("sparc.science-sidebar-search-history"), this.searchHistory = []; }, sortFilters(e, t) { return e.facetPropPath.localeCompare(t.facetPropPath); }, // Sort by saved and updated sortSearchHistory(e, t) { return e.saved !== t.saved ? t.saved - e.saved : e.updated !== t.updated ? t.updated - e.updated : 0; }, formatFilters(e) { return e.facet2 && (e.facet = e.facet2, delete e.facet2), e; }, addSearchToHistory(e = [], t = "") { if (t = t.trim(), !this.searchHistory.some((n) => { let r = n.filters, o = e; r.forEach((s) => this.formatFilters(s)), o.forEach((s) => this.formatFilters(s)), r = r.sort(this.sortFilters), o = o.sort(this.sortFilters); const a = JSON.stringify(r), i = JSON.stringify(o); return n.search === t && a === i; })) { const { label: n, longLabel: r } = this.searchHistoryItemLabel(t, e), o = { filters: e, search: t, saved: !1, label: n, longLabel: r, id: ZE(), updated: (/* @__PURE__ */ new Date()).getTime() }; this.searchHistory.push(o), this.searchHistory = this.searchHistory.sort(this.sortSearchHistory), this.trimSearchHistory(), localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify(this.searchHistory) ); } }, /** * Remove the duplicate items in search history. */ removeDuplicateSearchHistory: function() { const e = [], t = []; this.searchHistory.forEach((n) => { const r = `${n.search}-${JSON.stringify(n.filters)}`, o = e.find((a) => a.key === r); o ? n.saved ? t.push(o.id) : t.push(n.id) : e.push({ id: n.id, key: r }); }), t.length && (this.searchHistory = this.searchHistory.filter((n) => !t.includes(n.id))); }, /** * Function to trim search history to maximum items, */ trimSearchHistory: function() { if (this.searchHistory.length > XE) { const e = this.searchHistory.filter((r) => r.saved), t = this.searchHistory.filter((r) => !r.saved), n = XE - this.searchHistory.length; this.searchHistory = [ ...e, ...t.slice(0, n) ]; } }, updateSearchHistory: function() { this.searchHistory.forEach((e) => { if (e.id || (e.id = ZE()), !e.label) { const { label: t, longLabel: n } = this.searchHistoryItemLabel(e.search, e.filters); e.label = t, e.longLabel = n; } e.filters.forEach( (t) => this.formatFilters(t) ), e.filters = e.filters.sort(this.sortFilters), e.saved || (e.saved = !1), e.updated || (e.updated = (/* @__PURE__ */ new Date()).getTime()); }), this.searchHistory = this.searchHistory.sort(this.sortSearchHistory), this.removeDuplicateSearchHistory(), this.trimSearchHistory(), localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify(this.searchHistory) ); }, search: function(e) { this.$emit("search", e); }, searchHistoryItemLabel: function(e, t) { let n = e ? `"${e.trim()}"` : "", r = "", o = [], a = []; return t && (o = t.filter((i) => i.facet !== "Show all"), a = o.map((i) => i.facet2 || i.facet)), n && o.length && (r += n, r += `, ${a.join(", ")}`, n += ` (+${o.length})`), !n && o.length && (n = o[0].facet, o.length > 1 && (r += `${a.join(", ")}`, n += ` (+${o.length - 1})`)), n ? n.length > 15 && !r && (r = n) : n = "Unknown search", { label: n, longLabel: r }; }, toggleSavedSearch: function(e) { this.searchHistory.forEach((t) => { t.id === e.id && (t.saved = !t.saved); }), this.savedSearchHistory = this.searchHistory.filter((t) => t.saved), this.updateSearchHistory(); }, removeFromSavedSearch: function(e) { const t = this.searchHistory.findIndex((n) => n.id === e.id); this.searchHistory.splice(t, 1), this.savedSearchHistory = this.searchHistory.filter((n) => n.saved), this.updateSearchHistory(); } } }, um = (e) => (Tr("data-v-667b56a8"), e = e(), Or(), e), LOe = { key: 0, class: "history-container" }, ROe = { key: 0, class: "saved-search-history" }, DOe = { key: 1 }, MOe = /* @__PURE__ */ um(() => /* @__PURE__ */ B("span", { class: "empty-saved-search" }, "No Saved Searches", -1)), NOe = [ MOe ], BOe = { class: "el-dropdown-select" }, zOe = ["onClick"], VOe = ["onClick"], jOe = { key: 0, viewBox: "0 0 24 24" }, HOe = /* @__PURE__ */ um(() => /* @__PURE__ */ B("path", { d: "m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z" }, null, -1)), UOe = [ HOe ], qOe = { key: 1, viewBox: "0 0 24 24" }, WOe = /* @__PURE__ */ um(() => /* @__PURE__ */ B("path", { d: "M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05" }, null, -1)), GOe = [ WOe ], KOe = { key: 0 }, YOe = { key: 1 }, XOe = { key: 2 }, ZOe = /* @__PURE__ */ um(() => /* @__PURE__ */ B("span", null, " Remove from search history. ", -1)); function JOe(e, t, n, r, o, a) { const i = Ug, s = kc, l = kf, u = ln, c = bo, d = By, f = kCe, h = CCe, p = xCe; return o.searchHistory.length ? (E(), L("div", LOe, [ o.savedSearchHistory.length ? (E(), L("div", ROe, [ (E(!0), L(De, null, xt(o.savedSearchHistory, (v, m) => (E(), L(De, { key: v.id }, [ m < 2 ? (E(), Q(s, { class: "search-tag", key: m, onClick: (g) => a.search(v), size: "large" }, { default: R(() => [ v.longLabel ? (E(), Q(i, { key: 0, width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: R(() => [ Ae(me(v.label), 1) ]), default: R(() => [ Ae(" " + me(v.longLabel), 1) ]), _: 2 }, 1024)) : (E(), L(De, { key: 1 }, [ Ae(me(v.label), 1) ], 64)) ]), _: 2 }, 1032, ["onClick"])) : Z("", !0) ], 64))), 128)) ])) : (E(), L("div", DOe, NOe)), W(p, { trigger: "click", "hide-on-click": !1 }, { dropdown: R(() => [ W(h, null, { default: R(() => [ (E(!0), L(De, null, xt(o.searchHistory, (v) => (E(), Q(f, { key: v.id }, { default: R(() => [ B("div", null, [ v.longLabel ? (E(), Q(i, { key: 0, width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: R(() => [ B("span", { class: "dropdown-clickable-item", onClick: (m) => a.search(v) }, me(v.label), 9, zOe) ]), default: R(() => [ Ae(" " + me(v.longLabel), 1) ]), _: 2 }, 1024)) : (E(), L("span", { key: 1, class: "dropdown-clickable-item", onClick: (m) => a.search(v) }, me(v.label), 9, VOe)) ]), B("div", null, [ W(i, { width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: R(() => [ W(c, { circle: "", text: "", size: "small", onClick: (m) => a.toggleSavedSearch(v), disabled: o.savedSearchHistory.length > 1 && !v.saved }, { default: R(() => [ W(u, { color: "#8300BF" }, { default: R(() => [ v.saved ? (E(), L("svg", jOe, UOe)) : (E(), L("svg", qOe, GOe)) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["onClick", "disabled"]) ]), default: R(() => [ o.savedSearchHistory.length > 1 && !v.saved ? (E(), L("span", KOe, " Limit 2: Please remove a saved search before adding another. ")) : v.saved ? (E(), L("span", YOe, " Remove from saved searches. ")) : (E(), L("span", XOe, " Add up to two saved searches. ")) ]), _: 2 }, 1024), W(i, { width: "auto", trigger: "hover", "show-after": 200, persistent: !1, "popper-class": "popover-dropdown" }, { reference: R(() => [ W(c, { circle: "", text: "", size: "small", onClick: (m) => a.removeFromSavedSearch(v) }, { default: R(() => [ W(u, { color: "#8300BF" }, { default: R(() => [ W(d) ]), _: 1 }) ]), _: 2 }, 1032, ["onClick"]) ]), default: R(() => [ ZOe ]), _: 2 }, 1024) ]) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), default: R(() => [ B("span", BOe, [ Ae(" Search history "), W(u, { class: "el-icon--right" }, { default: R(() => [ W(l) ]), _: 1 }) ]) ]), _: 1 }) ])) : Z("", !0); } const N9 = /* @__PURE__ */ li(POe, [["render", JOe], ["__scopeId", "data-v-667b56a8"]]), B9 = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, QOe = ["xlink:href"], eFe = { __name: "SvgIcon", props: { /** * The svg icon to show. */ icon: { type: String, required: !0 }, /** * The option to spin the icon. */ spin: { type: Boolean, default: !1 } }, setup(e) { return (t, n) => (E(), L("svg", { class: V(["map-icon", { "map-icon-spin": e.spin }]) }, [ B("use", { "xlink:href": `#${e.icon}` }, null, 8, QOe) ], 2)); } }, tFe = /* @__PURE__ */ B9(eFe, [["__scopeId", "data-v-e172d5ff"]]), z9 = ` 2horpanel ? `, V9 = ` 2vertpanel ? `, j9 = ` 3panel ? `, H9 = ` 4panel ? `, U9 = ` 2horpanel ? `, q9 = ` 2horpanel ? `, W9 = ` 4panel ? `, G9 = ` changeBckgd `, K9 = ` close no bk `, Y9 = ` close `, X9 = ` closeFullScreen `, Z9 = ` Comment `, J9 = ` Connection `, Q9 = ` dock `, eL = ` drawLine `, tL = ` drawPoint `, nL = ` drawPolygon `, rL = ` drawTrash `, oL = ` fitWindow `, aL = ` fullScreen `, iL = 'DataPortal-Icons', sL = ` magnifyingGlass `, lL = `Created by Wahyu Prihantorofrom the Noun Project`, uL = ` openMap `, cL = ` Artboard Copy 6 `, dL = ` permalink `, pL = ` play `, fL = ` resetZoom `, hL = ` singlepanel ? `, vL = ` tooltips ? `, gL = ` undock `, mL = ` zoomIn `, yL = ` zoomOut `, bL = (e, t, n, r) => { const o = ["title", "desc", "defs", "style"], a = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, o.map((u) => { const c = s.querySelector(u); c && c.remove(); }), a.map((u) => { s.querySelector("svg").removeAttribute(u); }), r && i.map((u) => { Object.values(s.querySelectorAll(`[${u}]`)).map((c) => { c.removeAttribute(u); }); }); const l = s.innerHTML; return s = null, l; }, wL = (e) => [ // Remove XML stuffs and comments [/<\?xml[\s\S]*?>/gi, ""], [//gi, ""], [//gi, ""], // SVG XML -> HTML5 [/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>"], // convert self-closing XML SVG nodes to explicitly closed HTML5 SVG nodes [/\s+/g, " "], // replace whitespace sequences with a single space [/\> \<"] // remove whitespace between tags ].reduce((t, n) => "".replace.apply(t, n), e).trim(), nFe = !0, rFe = !0, oFe = ["fill"], JE = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": z9, "/assets/icons/2vertpanel.svg": V9, "/assets/icons/3panel.svg": j9, "/assets/icons/4panel.svg": H9, "/assets/icons/5panel.svg": U9, "/assets/icons/6panel.svg": q9, "/assets/icons/6panelVertical.svg": W9, "/assets/icons/changeBckgd.svg": G9, "/assets/icons/close-no-bk.svg": K9, "/assets/icons/close.svg": Y9, "/assets/icons/closeFullScreen.svg": X9, "/assets/icons/comment.svg": Z9, "/assets/icons/connection.svg": J9, "/assets/icons/dock.svg": Q9, "/assets/icons/drawLine.svg": eL, "/assets/icons/drawPoint.svg": tL, "/assets/icons/drawPolygon.svg": nL, "/assets/icons/drawTrash.svg": rL, "/assets/icons/fitWindow.svg": oL, "/assets/icons/fullScreen.svg": aL, "/assets/icons/help.svg": iL, "/assets/icons/magnifyingGlass.svg": sL, "/assets/icons/noun-filter.svg": lL, "/assets/icons/openMap.svg": uL, "/assets/icons/pause.svg": cL, "/assets/icons/permalink.svg": dL, "/assets/icons/play.svg": pL, "/assets/icons/resetZoom.svg": fL, "/assets/icons/singlepanel.svg": hL, "/assets/icons/tooltips.svg": vL, "/assets/icons/undock.svg": gL, "/assets/icons/zoomIn.svg": mL, "/assets/icons/zoomOut.svg": yL }), aFe = Object.keys(JE).map((e) => { const t = bL(JE[e], nFe, rFe, oFe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return wL(t).replace("", "symbol>"); }); aFe.join(` `); const pb = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": z9, "/assets/icons/2vertpanel.svg": V9, "/assets/icons/3panel.svg": j9, "/assets/icons/4panel.svg": H9, "/assets/icons/5panel.svg": U9, "/assets/icons/6panel.svg": q9, "/assets/icons/6panelVertical.svg": W9, "/assets/icons/changeBckgd.svg": G9, "/assets/icons/close-no-bk.svg": K9, "/assets/icons/close.svg": Y9, "/assets/icons/closeFullScreen.svg": X9, "/assets/icons/comment.svg": Z9, "/assets/icons/connection.svg": J9, "/assets/icons/dock.svg": Q9, "/assets/icons/drawLine.svg": eL, "/assets/icons/drawPoint.svg": tL, "/assets/icons/drawPolygon.svg": nL, "/assets/icons/drawTrash.svg": rL, "/assets/icons/fitWindow.svg": oL, "/assets/icons/fullScreen.svg": aL, "/assets/icons/help.svg": iL, "/assets/icons/magnifyingGlass.svg": sL, "/assets/icons/noun-filter.svg": lL, "/assets/icons/openMap.svg": uL, "/assets/icons/pause.svg": cL, "/assets/icons/permalink.svg": dL, "/assets/icons/play.svg": pL, "/assets/icons/resetZoom.svg": fL, "/assets/icons/singlepanel.svg": hL, "/assets/icons/tooltips.svg": vL, "/assets/icons/undock.svg": gL, "/assets/icons/zoomIn.svg": mL, "/assets/icons/zoomOut.svg": yL }), iFe = Object.keys(pb).map((e) => { const t = bL(pb[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return wL(t).replace("", "symbol>"); }), sFe = { name: "MapSvgSpriteColor", svgContext: pb, svgSprite: iFe.join(` `) // concatenate all symbols into $options.svgSprite }, lFe = ["innerHTML"]; function uFe(e, t, n, r, o, a) { return E(), L("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, lFe); } const cFe = /* @__PURE__ */ B9(sFe, [["render", uFe]]); var xL = { exports: {} }; /*! algoliasearch.umd.js | 4.23.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ (function(e, t) { (function(n, r) { e.exports = r(); })(Wwe, function() { function n(H, X, J) { return X in H ? Object.defineProperty(H, X, { value: J, enumerable: !0, configurable: !0, writable: !0 }) : H[X] = J, H; } function r(H, X) { var J = Object.keys(H); if (Object.getOwnPropertySymbols) { var te = Object.getOwnPropertySymbols(H); X && (te = te.filter(function(ye) { return Object.getOwnPropertyDescriptor(H, ye).enumerable; })), J.push.apply(J, te); } return J; } function o(H) { for (var X = 1; X < arguments.length; X++) { var J = arguments[X] != null ? arguments[X] : {}; X % 2 ? r(Object(J), !0).forEach(function(te) { n(H, te, J[te]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(H, Object.getOwnPropertyDescriptors(J)) : r(Object(J)).forEach(function(te) { Object.defineProperty(H, te, Object.getOwnPropertyDescriptor(J, te)); }); } return H; } function a(H, X) { if (H == null) return {}; var J, te, ye = function(Ye, Pe) { if (Ye == null) return {}; var Ge, dt, Qe = {}, _t = Object.keys(Ye); for (dt = 0; dt < _t.length; dt++) Ge = _t[dt], Pe.indexOf(Ge) >= 0 || (Qe[Ge] = Ye[Ge]); return Qe; }(H, X); if (Object.getOwnPropertySymbols) { var Me = Object.getOwnPropertySymbols(H); for (te = 0; te < Me.length; te++) J = Me[te], X.indexOf(J) >= 0 || Object.prototype.propertyIsEnumerable.call(H, J) && (ye[J] = H[J]); } return ye; } function i(H, X) { return function(J) { if (Array.isArray(J)) return J; }(H) || function(J, te) { if (Symbol.iterator in Object(J) || Object.prototype.toString.call(J) === "[object Arguments]") { var ye = [], Me = !0, Ye = !1, Pe = void 0; try { for (var Ge, dt = J[Symbol.iterator](); !(Me = (Ge = dt.next()).done) && (ye.push(Ge.value), !te || ye.length !== te); Me = !0) ; } catch (Qe) { Ye = !0, Pe = Qe; } finally { try { Me || dt.return == null || dt.return(); } finally { if (Ye) throw Pe; } } return ye; } }(H, X) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }(); } function s(H) { return function(X) { if (Array.isArray(X)) { for (var J = 0, te = new Array(X.length); J < X.length; J++) te[J] = X[J]; return te; } }(H) || function(X) { if (Symbol.iterator in Object(X) || Object.prototype.toString.call(X) === "[object Arguments]") return Array.from(X); }(H) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }(); } function l(H) { var X, J = "algoliasearch-client-js-".concat(H.key), te = function() { return X === void 0 && (X = H.localStorage || window.localStorage), X; }, ye = function() { return JSON.parse(te().getItem(J) || "{}"); }, Me = function(Pe) { te().setItem(J, JSON.stringify(Pe)); }, Ye = function() { var Pe = H.timeToLive ? 1e3 * H.timeToLive : null, Ge = ye(), dt = Object.fromEntries(Object.entries(Ge).filter(function(_t) { return i(_t, 2)[1].timestamp !== void 0; })); if (Me(dt), Pe) { var Qe = Object.fromEntries(Object.entries(dt).filter(function(_t) { var Et = i(_t, 2)[1], Bt = (/* @__PURE__ */ new Date()).getTime(); return !(Et.timestamp + Pe < Bt); })); Me(Qe); } }; return { get: function(Pe, Ge) { var dt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return Promise.resolve().then(function() { Ye(); var Qe = JSON.stringify(Pe); return ye()[Qe]; }).then(function(Qe) { return Promise.all([Qe ? Qe.value : Ge(), Qe !== void 0]); }).then(function(Qe) { var _t = i(Qe, 2), Et = _t[0], Bt = _t[1]; return Promise.all([Et, Bt || dt.miss(Et)]); }).then(function(Qe) { return i(Qe, 1)[0]; }); }, set: function(Pe, Ge) { return Promise.resolve().then(function() { var dt = ye(); return dt[JSON.stringify(Pe)] = { timestamp: (/* @__PURE__ */ new Date()).getTime(), value: Ge }, te().setItem(J, JSON.stringify(dt)), Ge; }); }, delete: function(Pe) { return Promise.resolve().then(function() { var Ge = ye(); delete Ge[JSON.stringify(Pe)], te().setItem(J, JSON.stringify(Ge)); }); }, clear: function() { return Promise.resolve().then(function() { te().removeItem(J); }); } }; } function u(H) { var X = s(H.caches), J = X.shift(); return J === void 0 ? { get: function(te, ye) { var Me = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, Ye = ye(); return Ye.then(function(Pe) { return Promise.all([Pe, Me.miss(Pe)]); }).then(function(Pe) { return i(Pe, 1)[0]; }); }, set: function(te, ye) { return Promise.resolve(ye); }, delete: function(te) { return Promise.resolve(); }, clear: function() { return Promise.resolve(); } } : { get: function(te, ye) { var Me = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return J.get(te, ye, Me).catch(function() { return u({ caches: X }).get(te, ye, Me); }); }, set: function(te, ye) { return J.set(te, ye).catch(function() { return u({ caches: X }).set(te, ye); }); }, delete: function(te) { return J.delete(te).catch(function() { return u({ caches: X }).delete(te); }); }, clear: function() { return J.clear().catch(function() { return u({ caches: X }).clear(); }); } }; } function c() { var H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { serializable: !0 }, X = {}; return { get: function(J, te) { var ye = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, Me = JSON.stringify(J); if (Me in X) return Promise.resolve(H.serializable ? JSON.parse(X[Me]) : X[Me]); var Ye = te(), Pe = ye && ye.miss || function() { return Promise.resolve(); }; return Ye.then(function(Ge) { return Pe(Ge); }).then(function() { return Ye; }); }, set: function(J, te) { return X[JSON.stringify(J)] = H.serializable ? JSON.stringify(te) : te, Promise.resolve(te); }, delete: function(J) { return delete X[JSON.stringify(J)], Promise.resolve(); }, clear: function() { return X = {}, Promise.resolve(); } }; } function d(H, X, J) { var te = { "x-algolia-api-key": J, "x-algolia-application-id": X }; return { headers: function() { return H === g.WithinHeaders ? te : {}; }, queryParameters: function() { return H === g.WithinQueryParameters ? te : {}; } }; } function f(H) { var X = 0; return H(function J() { return X++, new Promise(function(te) { setTimeout(function() { te(H(J)); }, Math.min(100 * X, 1e3)); }); }); } function h(H) { var X = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(J, te) { return Promise.resolve(); }; return Object.assign(H, { wait: function(J) { return h(H.then(function(te) { return Promise.all([X(te, J), te]); }).then(function(te) { return te[1]; })); } }); } function p(H) { for (var X = H.length - 1; X > 0; X--) { var J = Math.floor(Math.random() * (X + 1)), te = H[X]; H[X] = H[J], H[J] = te; } return H; } function v(H, X) { return X && Object.keys(X).forEach(function(J) { H[J] = X[J](H); }), H; } function m(H) { for (var X = arguments.length, J = new Array(X > 1 ? X - 1 : 0), te = 1; te < X; te++) J[te - 1] = arguments[te]; var ye = 0; return H.replace(/%s/g, function() { return encodeURIComponent(J[ye++]); }); } var g = { WithinQueryParameters: 0, WithinHeaders: 1 }; function b(H, X) { var J = H || {}, te = J.data || {}; return Object.keys(J).forEach(function(ye) { ["timeout", "headers", "queryParameters", "data", "cacheable"].indexOf(ye) === -1 && (te[ye] = J[ye]); }), { data: Object.entries(te).length > 0 ? te : void 0, timeout: J.timeout || X, headers: J.headers || {}, queryParameters: J.queryParameters || {}, cacheable: J.cacheable }; } var C = { Read: 1, Write: 2, Any: 3 }, x = 1, w = 2, k = 3; function S(H) { var X = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : x; return o(o({}, H), {}, { status: X, lastUpdate: Date.now() }); } function _(H) { return typeof H == "string" ? { protocol: "https", url: H, accept: C.Any } : { protocol: H.protocol || "https", url: H.url, accept: H.accept || C.Any }; } var O = "DELETE", F = "GET", I = "POST", P = "PUT"; function M(H, X) { return Promise.all(X.map(function(J) { return H.get(J, function() { return Promise.resolve(S(J)); }); })).then(function(J) { var te = J.filter(function(Ye) { return function(Pe) { return Pe.status === x || Date.now() - Pe.lastUpdate > 12e4; }(Ye); }), ye = J.filter(function(Ye) { return function(Pe) { return Pe.status === k && Date.now() - Pe.lastUpdate <= 12e4; }(Ye); }), Me = [].concat(s(te), s(ye)); return { getTimeout: function(Ye, Pe) { return (ye.length === 0 && Ye === 0 ? 1 : ye.length + 3 + Ye) * Pe; }, statelessHosts: Me.length > 0 ? Me.map(function(Ye) { return _(Ye); }) : X }; }); } function N(H, X, J, te) { var ye = [], Me = function(Et, Bt) { if (!(Et.method === F || Et.data === void 0 && Bt.data === void 0)) { var Rt = Array.isArray(Et.data) ? Et.data : o(o({}, Et.data), Bt.data); return JSON.stringify(Rt); } }(J, te), Ye = function(Et, Bt) { var Rt = o(o({}, Et.headers), Bt.headers), vn = {}; return Object.keys(Rt).forEach(function(In) { var Jr = Rt[In]; vn[In.toLowerCase()] = Jr; }), vn; }(H, te), Pe = J.method, Ge = J.method !== F ? {} : o(o({}, J.data), te.data), dt = o(o(o({ "x-algolia-agent": H.userAgent.value }, H.queryParameters), Ge), te.queryParameters), Qe = 0, _t = function Et(Bt, Rt) { var vn = Bt.pop(); if (vn === void 0) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: Y(ye) }; var In = { data: Me, headers: Ye, method: Pe, url: U(vn, J.path, dt), connectTimeout: Rt(Qe, H.timeouts.connect), responseTimeout: Rt(Qe, te.timeout) }, Jr = function(Qr) { var Ar = { request: In, response: Qr, host: vn, triesLeft: Bt.length }; return ye.push(Ar), Ar; }, nd = { onSuccess: function(Qr) { return function(Ar) { try { return JSON.parse(Ar.content); } catch (Qs) { throw /* @__PURE__ */ function(Yi, yu) { return { name: "DeserializationError", message: Yi, response: yu }; }(Qs.message, Ar); } }(Qr); }, onRetry: function(Qr) { var Ar = Jr(Qr); return Qr.isTimedOut && Qe++, Promise.all([H.logger.info("Retryable failure", ie(Ar)), H.hostsCache.set(vn, S(vn, Qr.isTimedOut ? k : w))]).then(function() { return Et(Bt, Rt); }); }, onFail: function(Qr) { throw Jr(Qr), function(Ar, Qs) { var Yi = Ar.content, yu = Ar.status, rd = Yi; try { rd = JSON.parse(Yi).message; } catch { } return /* @__PURE__ */ function(hm, vm, zL) { return { name: "ApiError", message: hm, status: vm, transporterStackTrace: zL }; }(rd, yu, Qs); }(Qr, Y(ye)); } }; return H.requester.send(In).then(function(Qr) { return function(Ar, Qs) { return function(Yi) { var yu = Yi.status; return Yi.isTimedOut || function(rd) { var hm = rd.isTimedOut, vm = rd.status; return !hm && ~~vm == 0; }(Yi) || ~~(yu / 100) != 2 && ~~(yu / 100) != 4; }(Ar) ? Qs.onRetry(Ar) : ~~(Ar.status / 100) == 2 ? Qs.onSuccess(Ar) : Qs.onFail(Ar); }(Qr, nd); }); }; return M(H.hostsCache, X).then(function(Et) { return _t(s(Et.statelessHosts).reverse(), Et.getTimeout); }); } function j(H) { var X = H.hostsCache, J = H.logger, te = H.requester, ye = H.requestsCache, Me = H.responsesCache, Ye = H.timeouts, Pe = H.userAgent, Ge = H.hosts, dt = H.queryParameters, Qe = { hostsCache: X, logger: J, requester: te, requestsCache: ye, responsesCache: Me, timeouts: Ye, userAgent: Pe, headers: H.headers, queryParameters: dt, hosts: Ge.map(function(_t) { return _(_t); }), read: function(_t, Et) { var Bt = b(Et, Qe.timeouts.read), Rt = function() { return N(Qe, Qe.hosts.filter(function(In) { return (In.accept & C.Read) != 0; }), _t, Bt); }; if ((Bt.cacheable !== void 0 ? Bt.cacheable : _t.cacheable) !== !0) return Rt(); var vn = { request: _t, mappedRequestOptions: Bt, transporter: { queryParameters: Qe.queryParameters, headers: Qe.headers } }; return Qe.responsesCache.get(vn, function() { return Qe.requestsCache.get(vn, function() { return Qe.requestsCache.set(vn, Rt()).then(function(In) { return Promise.all([Qe.requestsCache.delete(vn), In]); }, function(In) { return Promise.all([Qe.requestsCache.delete(vn), Promise.reject(In)]); }).then(function(In) { var Jr = i(In, 2); return Jr[0], Jr[1]; }); }); }, { miss: function(In) { return Qe.responsesCache.set(vn, In); } }); }, write: function(_t, Et) { return N(Qe, Qe.hosts.filter(function(Bt) { return (Bt.accept & C.Write) != 0; }), _t, b(Et, Qe.timeouts.write)); } }; return Qe; } function A(H) { var X = { value: "Algolia for JavaScript (".concat(H, ")"), add: function(J) { var te = "; ".concat(J.segment).concat(J.version !== void 0 ? " (".concat(J.version, ")") : ""); return X.value.indexOf(te) === -1 && (X.value = "".concat(X.value).concat(te)), X; } }; return X; } function U(H, X, J) { var te = q(J), ye = "".concat(H.protocol, "://").concat(H.url, "/").concat(X.charAt(0) === "/" ? X.substr(1) : X); return te.length && (ye += "?".concat(te)), ye; } function q(H) { return Object.keys(H).map(function(X) { return m("%s=%s", X, (J = H[X], Object.prototype.toString.call(J) === "[object Object]" || Object.prototype.toString.call(J) === "[object Array]" ? JSON.stringify(H[X]) : H[X])); var J; }).join("&"); } function Y(H) { return H.map(function(X) { return ie(X); }); } function ie(H) { var X = H.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return o(o({}, H), {}, { request: o(o({}, H.request), {}, { headers: o(o({}, H.request.headers), X) }) }); } var re = function(H) { return function(X, J) { return H.transporter.write({ method: I, path: "2/abtests", data: X }, J); }; }, le = function(H) { return function(X, J) { return H.transporter.write({ method: O, path: m("2/abtests/%s", X) }, J); }; }, he = function(H) { return function(X, J) { return H.transporter.read({ method: F, path: m("2/abtests/%s", X) }, J); }; }, we = function(H) { return function(X) { return H.transporter.read({ method: F, path: "2/abtests" }, X); }; }, be = function(H) { return function(X, J) { return H.transporter.write({ method: I, path: m("2/abtests/%s/stop", X) }, J); }; }, de = function(H) { return function(X) { return H.transporter.read({ method: F, path: "1/strategies/personalization" }, X); }; }, ae = function(H) { return function(X, J) { return H.transporter.write({ method: I, path: "1/strategies/personalization", data: X }, J); }; }; function ee(H) { return function X(J) { return H.request(J).then(function(te) { if (H.batch !== void 0 && H.batch(te.hits), !H.shouldStop(te)) return te.cursor ? X({ cursor: te.cursor }) : X({ page: (J.page || 0) + 1 }); }); }({}); } var se = function(H) { return function(X, J) { var te = J || {}, ye = te.queryParameters, Me = a(te, ["queryParameters"]), Ye = o({ acl: X }, ye !== void 0 ? { queryParameters: ye } : {}); return h(H.transporter.write({ method: I, path: "1/keys", data: Ye }, Me), function(Pe, Ge) { return f(function(dt) { return Ve(H)(Pe.key, Ge).catch(function(Qe) { if (Qe.status !== 404) throw Qe; return dt(); }); }); }); }; }, pe = function(H) { return function(X, J, te) { var ye = b(te); return ye.queryParameters["X-Algolia-User-ID"] = X, H.transporter.write({ method: I, path: "1/clusters/mapping", data: { cluster: J } }, ye); }; }, Se = function(H) { return function(X, J, te) { return H.transporter.write({ method: I, path: "1/clusters/mapping/batch", data: { users: X, cluster: J } }, te); }; }, Le = function(H) { return function(X, J) { return h(H.transporter.write({ method: I, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !0, requests: { action: "addEntry", body: [] } } }, J), function(te, ye) { return fn(H)(te.taskID, ye); }); }; }, je = function(H) { return function(X, J, te) { return h(H.transporter.write({ method: I, path: m("1/indexes/%s/operation", X), data: { operation: "copy", destination: J } }, te), function(ye, Me) { return ge(H)(X, { methods: { waitTask: Vn } }).waitTask(ye.taskID, Me); }); }; }, _e = function(H) { return function(X, J, te) { return je(H)(X, J, o(o({}, te), {}, { scope: [fm.Rules] })); }; }, ze = function(H) { return function(X, J, te) { return je(H)(X, J, o(o({}, te), {}, { scope: [fm.Settings] })); }; }, Ie = function(H) { return function(X, J, te) { return je(H)(X, J, o(o({}, te), {}, { scope: [fm.Synonyms] })); }; }, He = function(H) { return function(X, J) { return X.method === F ? H.transporter.read(X, J) : H.transporter.write(X, J); }; }, qe = function(H) { return function(X, J) { return h(H.transporter.write({ method: O, path: m("1/keys/%s", X) }, J), function(te, ye) { return f(function(Me) { return Ve(H)(X, ye).then(Me).catch(function(Ye) { if (Ye.status !== 404) throw Ye; }); }); }); }; }, et = function(H) { return function(X, J, te) { var ye = J.map(function(Me) { return { action: "deleteEntry", body: { objectID: Me } }; }); return h(H.transporter.write({ method: I, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !1, requests: ye } }, te), function(Me, Ye) { return fn(H)(Me.taskID, Ye); }); }; }, Ve = function(H) { return function(X, J) { return H.transporter.read({ method: F, path: m("1/keys/%s", X) }, J); }; }, nt = function(H) { return function(X, J) { return H.transporter.read({ method: F, path: m("1/task/%s", X.toString()) }, J); }; }, ot = function(H) { return function(X) { return H.transporter.read({ method: F, path: "/1/dictionaries/*/settings" }, X); }; }, pt = function(H) { return function(X) { return H.transporter.read({ method: F, path: "1/logs" }, X); }; }, T = function(H) { return function(X) { return H.transporter.read({ method: F, path: "1/clusters/mapping/top" }, X); }; }, G = function(H) { return function(X, J) { return H.transporter.read({ method: F, path: m("1/clusters/mapping/%s", X) }, J); }; }, fe = function(H) { return function(X) { var J = X || {}, te = J.retrieveMappings, ye = a(J, ["retrieveMappings"]); return te === !0 && (ye.getClusters = !0), H.transporter.read({ method: F, path: "1/clusters/mapping/pending" }, ye); }; }, ge = function(H) { return function(X) { var J = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, te = { transporter: H.transporter, appId: H.appId, indexName: X }; return v(te, J.methods); }; }, ve = function(H) { return function(X) { return H.transporter.read({ method: F, path: "1/keys" }, X); }; }, Fe = function(H) { return function(X) { return H.transporter.read({ method: F, path: "1/clusters" }, X); }; }, Ce = function(H) { return function(X) { return H.transporter.read({ method: F, path: "1/indexes" }, X); }; }, Re = function(H) { return function(X) { return H.transporter.read({ method: F, path: "1/clusters/mapping" }, X); }; }, lt = function(H) { return function(X, J, te) { return h(H.transporter.write({ method: I, path: m("1/indexes/%s/operation", X), data: { operation: "move", destination: J } }, te), function(ye, Me) { return ge(H)(X, { methods: { waitTask: Vn } }).waitTask(ye.taskID, Me); }); }; }, ut = function(H) { return function(X, J) { return h(H.transporter.write({ method: I, path: "1/indexes/*/batch", data: { requests: X } }, J), function(te, ye) { return Promise.all(Object.keys(te.taskID).map(function(Me) { return ge(H)(Me, { methods: { waitTask: Vn } }).waitTask(te.taskID[Me], ye); })); }); }; }, ue = function(H) { return function(X, J) { return H.transporter.read({ method: I, path: "1/indexes/*/objects", data: { requests: X } }, J); }; }, Te = function(H) { return function(X, J) { var te = X.map(function(ye) { return o(o({}, ye), {}, { params: q(ye.params || {}) }); }); return H.transporter.read({ method: I, path: "1/indexes/*/queries", data: { requests: te }, cacheable: !0 }, J); }; }, ke = function(H) { return function(X, J) { return Promise.all(X.map(function(te) { var ye = te.params, Me = ye.facetName, Ye = ye.facetQuery, Pe = a(ye, ["facetName", "facetQuery"]); return ge(H)(te.indexName, { methods: { searchForFacetValues: Fx } }).searchForFacetValues(Me, Ye, o(o({}, J), Pe)); })); }; }, Be = function(H) { return function(X, J) { var te = b(J); return te.queryParameters["X-Algolia-User-ID"] = X, H.transporter.write({ method: O, path: "1/clusters/mapping" }, te); }; }, Dt = function(H) { return function(X, J, te) { var ye = J.map(function(Me) { return { action: "addEntry", body: Me }; }); return h(H.transporter.write({ method: I, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !0, requests: ye } }, te), function(Me, Ye) { return fn(H)(Me.taskID, Ye); }); }; }, Ft = function(H) { return function(X, J) { return h(H.transporter.write({ method: I, path: m("1/keys/%s/restore", X) }, J), function(te, ye) { return f(function(Me) { return Ve(H)(X, ye).catch(function(Ye) { if (Ye.status !== 404) throw Ye; return Me(); }); }); }); }; }, zt = function(H) { return function(X, J, te) { var ye = J.map(function(Me) { return { action: "addEntry", body: Me }; }); return h(H.transporter.write({ method: I, path: m("/1/dictionaries/%s/batch", X), data: { clearExistingDictionaryEntries: !1, requests: ye } }, te), function(Me, Ye) { return fn(H)(Me.taskID, Ye); }); }; }, Nt = function(H) { return function(X, J, te) { return H.transporter.read({ method: I, path: m("/1/dictionaries/%s/search", X), data: { query: J }, cacheable: !0 }, te); }; }, Yt = function(H) { return function(X, J) { return H.transporter.read({ method: I, path: "1/clusters/mapping/search", data: { query: X } }, J); }; }, Ln = function(H) { return function(X, J) { return h(H.transporter.write({ method: P, path: "/1/dictionaries/*/settings", data: X }, J), function(te, ye) { return fn(H)(te.taskID, ye); }); }; }, pn = function(H) { return function(X, J) { var te = Object.assign({}, J), ye = J || {}, Me = ye.queryParameters, Ye = a(ye, ["queryParameters"]), Pe = Me ? { queryParameters: Me } : {}, Ge = ["acl", "indexes", "referers", "restrictSources", "queryParameters", "description", "maxQueriesPerIPPerHour", "maxHitsPerQuery"]; return h(H.transporter.write({ method: P, path: m("1/keys/%s", X), data: Pe }, Ye), function(dt, Qe) { return f(function(_t) { return Ve(H)(X, Qe).then(function(Et) { return function(Bt) { return Object.keys(te).filter(function(Rt) { return Ge.indexOf(Rt) !== -1; }).every(function(Rt) { if (Array.isArray(Bt[Rt]) && Array.isArray(te[Rt])) { var vn = Bt[Rt]; return vn.length === te[Rt].length && vn.every(function(In, Jr) { return In === te[Rt][Jr]; }); } return Bt[Rt] === te[Rt]; }); }(Et) ? Promise.resolve() : _t(); }); }); }); }; }, fn = function(H) { return function(X, J) { return f(function(te) { return nt(H)(X, J).then(function(ye) { return ye.status !== "published" ? te() : void 0; }); }); }; }, Fn = function(H) { return function(X, J) { return h(H.transporter.write({ method: I, path: m("1/indexes/%s/batch", H.indexName), data: { requests: X } }, J), function(te, ye) { return Vn(H)(te.taskID, ye); }); }; }, Rn = function(H) { return function(X) { return ee(o(o({ shouldStop: function(J) { return J.cursor === void 0; } }, X), {}, { request: function(J) { return H.transporter.read({ method: I, path: m("1/indexes/%s/browse", H.indexName), data: J }, X); } })); }; }, wn = function(H) { return function(X) { var J = o({ hitsPerPage: 1e3 }, X); return ee(o(o({ shouldStop: function(te) { return te.hits.length < J.hitsPerPage; } }, J), {}, { request: function(te) { return Ix(H)("", o(o({}, J), te)).then(function(ye) { return o(o({}, ye), {}, { hits: ye.hits.map(function(Me) { return delete Me._highlightResult, Me; }) }); }); } })); }; }, sr = function(H) { return function(X) { var J = o({ hitsPerPage: 1e3 }, X); return ee(o(o({ shouldStop: function(te) { return te.hits.length < J.hitsPerPage; } }, J), {}, { request: function(te) { return Ax(H)("", o(o({}, J), te)).then(function(ye) { return o(o({}, ye), {}, { hits: ye.hits.map(function(Me) { return delete Me._highlightResult, Me; }) }); }); } })); }; }, Xn = function(H) { return function(X, J, te) { var ye = te || {}, Me = ye.batchSize, Ye = a(ye, ["batchSize"]), Pe = { taskIDs: [], objectIDs: [] }; return h(function Ge() { var dt, Qe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, _t = []; for (dt = Qe; dt < X.length && (_t.push(X[dt]), _t.length !== (Me || 1e3)); dt++) ; return _t.length === 0 ? Promise.resolve(Pe) : Fn(H)(_t.map(function(Et) { return { action: J, body: Et }; }), Ye).then(function(Et) { return Pe.objectIDs = Pe.objectIDs.concat(Et.objectIDs), Pe.taskIDs.push(Et.taskID), dt++, Ge(dt); }); }(), function(Ge, dt) { return Promise.all(Ge.taskIDs.map(function(Qe) { return Vn(H)(Qe, dt); })); }); }; }, Zn = function(H) { return function(X) { return h(H.transporter.write({ method: I, path: m("1/indexes/%s/clear", H.indexName) }, X), function(J, te) { return Vn(H)(J.taskID, te); }); }; }, Xt = function(H) { return function(X) { var J = X || {}, te = J.forwardToReplicas, ye = b(a(J, ["forwardToReplicas"])); return te && (ye.queryParameters.forwardToReplicas = 1), h(H.transporter.write({ method: I, path: m("1/indexes/%s/rules/clear", H.indexName) }, ye), function(Me, Ye) { return Vn(H)(Me.taskID, Ye); }); }; }, hn = function(H) { return function(X) { var J = X || {}, te = J.forwardToReplicas, ye = b(a(J, ["forwardToReplicas"])); return te && (ye.queryParameters.forwardToReplicas = 1), h(H.transporter.write({ method: I, path: m("1/indexes/%s/synonyms/clear", H.indexName) }, ye), function(Me, Ye) { return Vn(H)(Me.taskID, Ye); }); }; }, $n = function(H) { return function(X, J) { return h(H.transporter.write({ method: I, path: m("1/indexes/%s/deleteByQuery", H.indexName), data: X }, J), function(te, ye) { return Vn(H)(te.taskID, ye); }); }; }, lr = function(H) { return function(X) { return h(H.transporter.write({ method: O, path: m("1/indexes/%s", H.indexName) }, X), function(J, te) { return Vn(H)(J.taskID, te); }); }; }, Ao = function(H) { return function(X, J) { return h(D(H)([X], J).then(function(te) { return { taskID: te.taskIDs[0] }; }), function(te, ye) { return Vn(H)(te.taskID, ye); }); }; }, D = function(H) { return function(X, J) { var te = X.map(function(ye) { return { objectID: ye }; }); return Xn(H)(te, mu.DeleteObject, J); }; }, ne = function(H) { return function(X, J) { var te = J || {}, ye = te.forwardToReplicas, Me = b(a(te, ["forwardToReplicas"])); return ye && (Me.queryParameters.forwardToReplicas = 1), h(H.transporter.write({ method: O, path: m("1/indexes/%s/rules/%s", H.indexName, X) }, Me), function(Ye, Pe) { return Vn(H)(Ye.taskID, Pe); }); }; }, Oe = function(H) { return function(X, J) { var te = J || {}, ye = te.forwardToReplicas, Me = b(a(te, ["forwardToReplicas"])); return ye && (Me.queryParameters.forwardToReplicas = 1), h(H.transporter.write({ method: O, path: m("1/indexes/%s/synonyms/%s", H.indexName, X) }, Me), function(Ye, Pe) { return Vn(H)(Ye.taskID, Pe); }); }; }, We = function(H) { return function(X) { return Zs(H)(X).then(function() { return !0; }).catch(function(J) { if (J.status !== 404) throw J; return !1; }); }; }, Zt = function(H) { return function(X, J, te) { return H.transporter.read({ method: I, path: m("1/answers/%s/prediction", H.indexName), data: { query: X, queryLanguages: J }, cacheable: !0 }, te); }; }, _n = function(H) { return function(X, J) { var te = J || {}, ye = te.query, Me = te.paginate, Ye = a(te, ["query", "paginate"]), Pe = 0; return function Ge() { return Ox(H)(ye || "", o(o({}, Ye), {}, { page: Pe })).then(function(dt) { for (var Qe = 0, _t = Object.entries(dt.hits); Qe < _t.length; Qe++) { var Et = i(_t[Qe], 2), Bt = Et[0], Rt = Et[1]; if (X(Rt)) return { object: Rt, position: parseInt(Bt, 10), page: Pe }; } if (Pe++, Me === !1 || Pe >= dt.nbPages) throw { name: "ObjectNotFoundError", message: "Object not found." }; return Ge(); }); }(); }; }, Tn = function(H) { return function(X, J) { return H.transporter.read({ method: F, path: m("1/indexes/%s/%s", H.indexName, X) }, J); }; }, on = function() { return function(H, X) { for (var J = 0, te = Object.entries(H.hits); J < te.length; J++) { var ye = i(te[J], 2), Me = ye[0]; if (ye[1].objectID === X) return parseInt(Me, 10); } return -1; }; }, Jt = function(H) { return function(X, J) { var te = J || {}, ye = te.attributesToRetrieve, Me = a(te, ["attributesToRetrieve"]), Ye = X.map(function(Pe) { return o({ indexName: H.indexName, objectID: Pe }, ye ? { attributesToRetrieve: ye } : {}); }); return H.transporter.read({ method: I, path: "1/indexes/*/objects", data: { requests: Ye } }, Me); }; }, Po = function(H) { return function(X, J) { return H.transporter.read({ method: F, path: m("1/indexes/%s/rules/%s", H.indexName, X) }, J); }; }, Zs = function(H) { return function(X) { return H.transporter.read({ method: F, path: m("1/indexes/%s/settings", H.indexName), data: { getVersion: 2 } }, X); }; }, Df = function(H) { return function(X, J) { return H.transporter.read({ method: F, path: m("1/indexes/%s/synonyms/%s", H.indexName, X) }, J); }; }, Mf = function(H) { return function(X, J) { return h(Nf(H)([X], J).then(function(te) { return { objectID: te.objectIDs[0], taskID: te.taskIDs[0] }; }), function(te, ye) { return Vn(H)(te.taskID, ye); }); }; }, Nf = function(H) { return function(X, J) { var te = J || {}, ye = te.createIfNotExists, Me = a(te, ["createIfNotExists"]), Ye = ye ? mu.PartialUpdateObject : mu.PartialUpdateObjectNoCreate; return Xn(H)(X, Ye, Me); }; }, wo = function(H) { return function(X, J) { var te = J || {}, ye = te.safe, Me = te.autoGenerateObjectIDIfNotExist, Ye = te.batchSize, Pe = a(te, ["safe", "autoGenerateObjectIDIfNotExist", "batchSize"]), Ge = function(Rt, vn, In, Jr) { return h(H.transporter.write({ method: I, path: m("1/indexes/%s/operation", Rt), data: { operation: In, destination: vn } }, Jr), function(nd, Qr) { return Vn(H)(nd.taskID, Qr); }); }, dt = Math.random().toString(36).substring(7), Qe = "".concat(H.indexName, "_tmp_").concat(dt), _t = qr({ appId: H.appId, transporter: H.transporter, indexName: Qe }), Et = [], Bt = Ge(H.indexName, Qe, "copy", o(o({}, Pe), {}, { scope: ["settings", "synonyms", "rules"] })); return Et.push(Bt), h((ye ? Bt.wait(Pe) : Bt).then(function() { var Rt = _t(X, o(o({}, Pe), {}, { autoGenerateObjectIDIfNotExist: Me, batchSize: Ye })); return Et.push(Rt), ye ? Rt.wait(Pe) : Rt; }).then(function() { var Rt = Ge(Qe, H.indexName, "move", Pe); return Et.push(Rt), ye ? Rt.wait(Pe) : Rt; }).then(function() { return Promise.all(Et); }).then(function(Rt) { var vn = i(Rt, 3), In = vn[0], Jr = vn[1], nd = vn[2]; return { objectIDs: Jr.objectIDs, taskIDs: [In.taskID].concat(s(Jr.taskIDs), [nd.taskID]) }; }), function(Rt, vn) { return Promise.all(Et.map(function(In) { return In.wait(vn); })); }); }; }, td = function(H) { return function(X, J) { return dm(H)(X, o(o({}, J), {}, { clearExistingRules: !0 })); }; }, Bf = function(H) { return function(X, J) { return pm(H)(X, o(o({}, J), {}, { clearExistingSynonyms: !0 })); }; }, Js = function(H) { return function(X, J) { return h(qr(H)([X], J).then(function(te) { return { objectID: te.objectIDs[0], taskID: te.taskIDs[0] }; }), function(te, ye) { return Vn(H)(te.taskID, ye); }); }; }, qr = function(H) { return function(X, J) { var te = J || {}, ye = te.autoGenerateObjectIDIfNotExist, Me = a(te, ["autoGenerateObjectIDIfNotExist"]), Ye = ye ? mu.AddObject : mu.UpdateObject; if (Ye === mu.UpdateObject) { var Pe = !0, Ge = !1, dt = void 0; try { for (var Qe, _t = X[Symbol.iterator](); !(Pe = (Qe = _t.next()).done); Pe = !0) if (Qe.value.objectID === void 0) return h(Promise.reject({ name: "MissingObjectIDError", message: "All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option." })); } catch (Et) { Ge = !0, dt = Et; } finally { try { Pe || _t.return == null || _t.return(); } finally { if (Ge) throw dt; } } } return Xn(H)(X, Ye, Me); }; }, cm = function(H) { return function(X, J) { return dm(H)([X], J); }; }, dm = function(H) { return function(X, J) { var te = J || {}, ye = te.forwardToReplicas, Me = te.clearExistingRules, Ye = b(a(te, ["forwardToReplicas", "clearExistingRules"])); return ye && (Ye.queryParameters.forwardToReplicas = 1), Me && (Ye.queryParameters.clearExistingRules = 1), h(H.transporter.write({ method: I, path: m("1/indexes/%s/rules/batch", H.indexName), data: X }, Ye), function(Pe, Ge) { return Vn(H)(Pe.taskID, Ge); }); }; }, OL = function(H) { return function(X, J) { return pm(H)([X], J); }; }, pm = function(H) { return function(X, J) { var te = J || {}, ye = te.forwardToReplicas, Me = te.clearExistingSynonyms, Ye = te.replaceExistingSynonyms, Pe = b(a(te, ["forwardToReplicas", "clearExistingSynonyms", "replaceExistingSynonyms"])); return ye && (Pe.queryParameters.forwardToReplicas = 1), (Ye || Me) && (Pe.queryParameters.replaceExistingSynonyms = 1), h(H.transporter.write({ method: I, path: m("1/indexes/%s/synonyms/batch", H.indexName), data: X }, Pe), function(Ge, dt) { return Vn(H)(Ge.taskID, dt); }); }; }, Ox = function(H) { return function(X, J) { return H.transporter.read({ method: I, path: m("1/indexes/%s/query", H.indexName), data: { query: X }, cacheable: !0 }, J); }; }, Fx = function(H) { return function(X, J, te) { return H.transporter.read({ method: I, path: m("1/indexes/%s/facets/%s/query", H.indexName, X), data: { facetQuery: J }, cacheable: !0 }, te); }; }, Ix = function(H) { return function(X, J) { return H.transporter.read({ method: I, path: m("1/indexes/%s/rules/search", H.indexName), data: { query: X } }, J); }; }, Ax = function(H) { return function(X, J) { return H.transporter.read({ method: I, path: m("1/indexes/%s/synonyms/search", H.indexName), data: { query: X } }, J); }; }, FL = function(H) { return function(X, J) { var te = J || {}, ye = te.forwardToReplicas, Me = b(a(te, ["forwardToReplicas"])); return ye && (Me.queryParameters.forwardToReplicas = 1), h(H.transporter.write({ method: P, path: m("1/indexes/%s/settings", H.indexName), data: X }, Me), function(Ye, Pe) { return Vn(H)(Ye.taskID, Pe); }); }; }, Vn = function(H) { return function(X, J) { return f(function(te) { return (/* @__PURE__ */ function(ye) { return function(Me, Ye) { return ye.transporter.read({ method: F, path: m("1/indexes/%s/task/%s", ye.indexName, Me.toString()) }, Ye); }; }(H))(X, J).then(function(ye) { return ye.status !== "published" ? te() : void 0; }); }); }; }, mu = { AddObject: "addObject", UpdateObject: "updateObject", PartialUpdateObject: "partialUpdateObject", PartialUpdateObjectNoCreate: "partialUpdateObjectNoCreate", DeleteObject: "deleteObject", DeleteIndex: "delete", ClearIndex: "clear" }, fm = { Settings: "settings", Synonyms: "synonyms", Rules: "rules" }, IL = 1, AL = 2, PL = 3, zf = function(H) { return function(X, J) { var te = X.map(function(ye) { return o(o({}, ye), {}, { threshold: ye.threshold || 0 }); }); return H.transporter.read({ method: I, path: "1/indexes/*/recommendations", data: { requests: te }, cacheable: !0 }, J); }; }, LL = function(H) { return function(X, J) { return zf(H)(X.map(function(te) { return o(o({}, te), {}, { fallbackParameters: {}, model: "bought-together" }); }), J); }; }, RL = function(H) { return function(X, J) { return zf(H)(X.map(function(te) { return o(o({}, te), {}, { model: "related-products" }); }), J); }; }, DL = function(H) { return function(X, J) { var te = X.map(function(ye) { return o(o({}, ye), {}, { model: "trending-facets", threshold: ye.threshold || 0 }); }); return H.transporter.read({ method: I, path: "1/indexes/*/recommendations", data: { requests: te }, cacheable: !0 }, J); }; }, ML = function(H) { return function(X, J) { var te = X.map(function(ye) { return o(o({}, ye), {}, { model: "trending-items", threshold: ye.threshold || 0 }); }); return H.transporter.read({ method: I, path: "1/indexes/*/recommendations", data: { requests: te }, cacheable: !0 }, J); }; }, NL = function(H) { return function(X, J) { return zf(H)(X.map(function(te) { return o(o({}, te), {}, { model: "looking-similar" }); }), J); }; }, BL = function(H) { return function(X, J) { var te = X.map(function(ye) { return o(o({}, ye), {}, { model: "recommended-for-you", threshold: ye.threshold || 0 }); }); return H.transporter.read({ method: I, path: "1/indexes/*/recommendations", data: { requests: te }, cacheable: !0 }, J); }; }; function Px(H, X, J) { var te, ye = { appId: H, apiKey: X, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function(Pe) { return new Promise(function(Ge) { var dt = new XMLHttpRequest(); dt.open(Pe.method, Pe.url, !0), Object.keys(Pe.headers).forEach(function(Bt) { return dt.setRequestHeader(Bt, Pe.headers[Bt]); }); var Qe, _t = function(Bt, Rt) { return setTimeout(function() { dt.abort(), Ge({ status: 0, content: Rt, isTimedOut: !0 }); }, 1e3 * Bt); }, Et = _t(Pe.connectTimeout, "Connection timeout"); dt.onreadystatechange = function() { dt.readyState > dt.OPENED && Qe === void 0 && (clearTimeout(Et), Qe = _t(Pe.responseTimeout, "Socket timeout")); }, dt.onerror = function() { dt.status === 0 && (clearTimeout(Et), clearTimeout(Qe), Ge({ content: dt.responseText || "Network request failed", status: dt.status, isTimedOut: !1 })); }, dt.onload = function() { clearTimeout(Et), clearTimeout(Qe), Ge({ content: dt.responseText, status: dt.status, isTimedOut: !1 }); }, dt.send(Pe.data); }); } }, logger: (te = PL, { debug: function(Pe, Ge) { return IL >= te && console.debug(Pe, Ge), Promise.resolve(); }, info: function(Pe, Ge) { return AL >= te && console.info(Pe, Ge), Promise.resolve(); }, error: function(Pe, Ge) { return console.error(Pe, Ge), Promise.resolve(); } }), responsesCache: c(), requestsCache: c({ serializable: !1 }), hostsCache: u({ caches: [l({ key: "".concat("4.23.2", "-").concat(H) }), c()] }), userAgent: A("4.23.2").add({ segment: "Browser" }) }, Me = o(o({}, ye), J), Ye = function() { return function(Pe) { return function(Ge) { var dt = Ge.region || "us", Qe = d(g.WithinHeaders, Ge.appId, Ge.apiKey), _t = j(o(o({ hosts: [{ url: "personalization.".concat(dt, ".algolia.com") }] }, Ge), {}, { headers: o(o(o({}, Qe.headers()), { "content-type": "application/json" }), Ge.headers), queryParameters: o(o({}, Qe.queryParameters()), Ge.queryParameters) })); return v({ appId: Ge.appId, transporter: _t }, Ge.methods); }(o(o(o({}, ye), Pe), {}, { methods: { getPersonalizationStrategy: de, setPersonalizationStrategy: ae } })); }; }; return function(Pe) { var Ge = Pe.appId, dt = d(Pe.authMode !== void 0 ? Pe.authMode : g.WithinHeaders, Ge, Pe.apiKey), Qe = j(o(o({ hosts: [{ url: "".concat(Ge, "-dsn.algolia.net"), accept: C.Read }, { url: "".concat(Ge, ".algolia.net"), accept: C.Write }].concat(p([{ url: "".concat(Ge, "-1.algolianet.com") }, { url: "".concat(Ge, "-2.algolianet.com") }, { url: "".concat(Ge, "-3.algolianet.com") }])) }, Pe), {}, { headers: o(o(o({}, dt.headers()), { "content-type": "application/x-www-form-urlencoded" }), Pe.headers), queryParameters: o(o({}, dt.queryParameters()), Pe.queryParameters) })); return v({ transporter: Qe, appId: Ge, addAlgoliaAgent: function(_t, Et) { Qe.userAgent.add({ segment: _t, version: Et }); }, clearCache: function() { return Promise.all([Qe.requestsCache.clear(), Qe.responsesCache.clear()]).then(function() { }); } }, Pe.methods); }(o(o({}, Me), {}, { methods: { search: Te, searchForFacetValues: ke, multipleBatch: ut, multipleGetObjects: ue, multipleQueries: Te, copyIndex: je, copySettings: ze, copySynonyms: Ie, copyRules: _e, moveIndex: lt, listIndices: Ce, getLogs: pt, listClusters: Fe, multipleSearchForFacetValues: ke, getApiKey: Ve, addApiKey: se, listApiKeys: ve, updateApiKey: pn, deleteApiKey: qe, restoreApiKey: Ft, assignUserID: pe, assignUserIDs: Se, getUserID: G, searchUserIDs: Yt, listUserIDs: Re, getTopUserIDs: T, removeUserID: Be, hasPendingMappings: fe, clearDictionaryEntries: Le, deleteDictionaryEntries: et, getDictionarySettings: ot, getAppTask: nt, replaceDictionaryEntries: Dt, saveDictionaryEntries: zt, searchDictionaryEntries: Nt, setDictionarySettings: Ln, waitAppTask: fn, customRequest: He, initIndex: function(Pe) { return function(Ge) { return ge(Pe)(Ge, { methods: { batch: Fn, delete: lr, findAnswers: Zt, getObject: Tn, getObjects: Jt, saveObject: Js, saveObjects: qr, search: Ox, searchForFacetValues: Fx, waitTask: Vn, setSettings: FL, getSettings: Zs, partialUpdateObject: Mf, partialUpdateObjects: Nf, deleteObject: Ao, deleteObjects: D, deleteBy: $n, clearObjects: Zn, browseObjects: Rn, getObjectPosition: on, findObject: _n, exists: We, saveSynonym: OL, saveSynonyms: pm, getSynonym: Df, searchSynonyms: Ax, browseSynonyms: sr, deleteSynonym: Oe, clearSynonyms: hn, replaceAllObjects: wo, replaceAllSynonyms: Bf, searchRules: Ix, getRule: Po, deleteRule: ne, saveRule: cm, saveRules: dm, replaceAllRules: td, browseRules: wn, clearRules: Xt } }); }; }, initAnalytics: function() { return function(Pe) { return function(Ge) { var dt = Ge.region || "us", Qe = d(g.WithinHeaders, Ge.appId, Ge.apiKey), _t = j(o(o({ hosts: [{ url: "analytics.".concat(dt, ".algolia.com") }] }, Ge), {}, { headers: o(o(o({}, Qe.headers()), { "content-type": "application/json" }), Ge.headers), queryParameters: o(o({}, Qe.queryParameters()), Ge.queryParameters) })); return v({ appId: Ge.appId, transporter: _t }, Ge.methods); }(o(o(o({}, ye), Pe), {}, { methods: { addABTest: re, getABTest: he, getABTests: we, stopABTest: be, deleteABTest: le } })); }; }, initPersonalization: Ye, initRecommendation: function() { return function(Pe) { return Me.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."), Ye()(Pe); }; }, getRecommendations: zf, getFrequentlyBoughtTogether: LL, getLookingSimilar: NL, getRecommendedForYou: BL, getRelatedProducts: RL, getTrendingFacets: DL, getTrendingItems: ML } })); } return Px.version = "4.23.2", Px; }); })(xL); var dFe = xL.exports; const pFe = /* @__PURE__ */ Gwe(dFe); class kL { constructor(t, n, r = "https://api.pennsieve.io") { this.client = pFe( t, n ), this.PENNSIEVE_API_LOCATION = r, this.anatomyFacetLabels = []; } initIndex(t) { this.index = this.client.initIndex(t); } getAlgoliaFacets(t) { const n = t.map((i) => i.facetPropPath), r = t.map((i) => i.facetSubpropPath); let o = [], a = 0; return this.index.search("", { sortFacetValuesBy: "alpha", facets: n.concat(r) }).then((i) => (n.map((s) => { const l = t.find((h) => h.facetPropPath == s); var u = []; const c = i.facets; if (c === void 0) return; const d = c[s] == null ? {} : c[s], f = l && c[l.facetSubpropPath] ? Object.keys(c[l.facetSubpropPath]) : []; Object.keys(d).map((h) => { const p = f.reduce((m, g) => { const b = g.split("."); return b.length !== 2 || h === b[0] && m.push({ label: b[1], id: a++, facetPropPath: `${l ? l.facetSubpropPath : void 0}` }), m; }, []); let v = { label: h, id: a++, facetPropPath: s }; p.length > 0 && (v.children = p), u.push(v); }), u.length > 0 && o.push({ label: l ? l.label : "", id: a++, children: u, key: s }); }), o)); } // Returns all DOIs of all versions for a given discover dataset _discoverAllDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { fetch(`${n}/discover/datasets/${t}/versions`).then((o) => o.json()).then((o) => { r(o.map((a) => a.doi)); }); }); } // Get all dois given a list of discoverIds _expandDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { let o = t.map((a) => this._discoverAllDois(a, n)); Promise.all(o).then((a) => { r(a.flat()); }); }); } _processResultsForCards(t) { let n = [], r = {}; for (let o of t) r = { ...o }, r = { anatomy: o.anatomy ? o.anatomy.organ.map((a) => a.curie) : void 0, doi: o.item.curie.split(":")[1], name: o.item.name, description: o.item.description, updated: o.pennsieve ? o.pennsieve.updatedAt : void 0, publishDate: o.pennsieve ? o.pennsieve.publishDate : void 0, datasetId: o.objectID, detailsReady: !1 }, n.push(r); return n; } _processAnatomy(t) { let n = [], r = [], o = [], a = []; return t.forEach((i) => { i.item && i.item.keywords && i.item.keywords.forEach((s) => { let l = s.keyword.toUpperCase(); (l.includes("UBERON") || l.includes("ILX")) && n.push(this._processUberonURL(l)); }), i.anatomy && i.anatomy.organ && i.anatomy.organ.forEach((s) => { s.curie && (n.push(s.curie), r.push(s.name)); }); }), a = [...new Set(n)], o = [...new Set(r)], this.anatomyFacetLabels = o, a; } _processUberonURL(t) { return t.split("/").pop().replace("_", ":"); } /** * Get Search results * This is using fetch from the Algolia API */ search(t, n = "", r = 10, o = 1) { return new Promise((a) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: o - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "pennsieve.publishDate", "pennsieve.updatedAt", "item.curie", "item.name", "item.description", "objectID", "anatomy.organ.curie" ] }).then((i) => { let s = { items: this._processResultsForCards(i.hits), total: i.nbHits, discoverIds: i.hits.map((l) => l.pennsieve ? l.pennsieve.identifier : l.objectID), dois: i.hits.map((l) => l.item.curie.split(":")[1]) }; a(s); }); }); } /** * Get key words * This is used to return all keywords for a given search. Note that you often want the hits per page to be maxed out */ anatomyInSearch(t, n = "", r = 999999, o = 1) { return new Promise((a) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: o - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "objectID", "item.keywords.keyword", "anatomy.organ.name", "anatomy.organ.curie" ] }).then((i) => { a({ forFlatmap: this.processResultsForFlatmap(i.hits), forScaffold: this.processResultsForScaffold(i.hits) }); }); }); } processResultsForFlatmap(t) { return t.map((n) => ({ id: n.objectID, terms: n.anatomy ? n.anatomy.organ.map((r) => r.curie) : [] })); } processResultsForScaffold(t) { let n = {}; return t.forEach((r) => { r.anatomy && r.anatomy.organ && r.anatomy.organ.forEach((o) => { o.name && (n[o.name] ? n[o.name]++ : n[o.name] = 1); }); }), n; } } const Tx = [ { label: "Data Type", id: "item.types", facetPropPath: "item.types.name", facetSubpropPath: "item.types.subcategory.name" }, { label: "Anatomical Structure", id: "anatomy.organ.category", facetPropPath: "anatomy.organ.category.name", facetSubpropPath: "anatomy.organ.subcategory.name", facetFilterPath: "anatomy.organ.name" }, { label: "Species", id: "organisms.primary.species", facetPropPath: "organisms.primary.species.name", facetSubpropPath: "organisms.primary.species.subcategory.name" }, { label: "Experimental Approach", id: "item.modalities", facetPropPath: "item.modalities.keyword", facetSubpropPath: "item.modalities.subcategory.name" }, { label: "Sex", id: "attributes.subject.sex", facetPropPath: "attributes.subject.sex.value", facetSubpropPath: "attributes.subject.sex.subcategory.name" }, { label: "Age Categories", id: "attributes.subject.ageCategory", facetPropPath: "attributes.subject.ageCategory.value", facetSubpropPath: "attributes.subject.ageCategory.subcategory.name" }, { label: "Funding Program", id: "pennsieve.organization", facetPropPath: "pennsieve.organization.name", facetSubpropPath: "pennsieve.organization.subcategory.name" } ]; function QE(e = void 0) { if (e === void 0) return "NOT item.published.status:embargo"; e.forEach((r) => r.label = r.facet); let t = fFe(e), n = "NOT item.published.status:embargo"; return n = `(${n}) AND `, Tx.map((r) => r.facetPropPath).map((r) => { let o = t.filter( (s) => s.facetPropPath == r ), a = "", i = ""; o.map((s) => { let l = s.facetSubPropPath ? s.facetSubPropPath : r; s.AND ? i += `AND "${l}":"${s.label}"` : a += `"${l}":"${s.label}" OR `; }), !(a == "" && i == "") && (a = `(${a.substring(0, a.lastIndexOf(" OR "))})`, n += `${a + i} AND `, n = n.split("()AND ").join("")); }), n.substring(0, n.lastIndexOf(" AND ")); } function fFe(e) { return e.filter((t) => t.label !== "Show all"); } const v0 = function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, F1 = function(e) { const t = e.toLowerCase(); return h0[t] ? v0(h0[t]) : v0(t); }, hFe = { name: "SearchFilters", components: { MapSvgIcon: tFe, MapSvgSpriteColor: cFe, Option: Uw, Select: Hg, Popover: Ug, Cascader: $A }, props: { /** * Object containing information for * the required viewing. */ entry: Object, envVars: { type: Object, default: () => { } } }, data: function() { return { algoliaClient: void 0, cascaderIsReady: !1, previousShowAllChecked: { species: !1, gender: !1, organ: !1, datasets: !1 }, showFilters: !0, showFiltersText: !0, cascadeSelected: [], cascadeSelectedWithBoolean: [], filterTimeout: null, numberShown: 10, filters: [], facets: ["Species", "Gender", "Organ", "Datasets"], numberDatasetsShown: ["10", "20", "50"], props: { multiple: !0 }, options: [ { value: "Species", label: "Species", children: [{}] } ], presentTags: [] }; }, setup() { const e = pa({}), t = pa({ term: /* @__PURE__ */ new Set(), facet: /* @__PURE__ */ new Set(), facet2: /* @__PURE__ */ new Set() }); return { cascaderTags: e, correctnessCheck: t }; }, computed: { numberOfResultsText: function() { return `${this.entry.numberOfHits} results | Showing`; } }, methods: { createCascaderItemValue: function(e, t = void 0, n = void 0) { let r = e; return t && (r = `${e}>${t}`), t && n && (r = `${e}>${t}>${n}`), !t && n && console.warn( `Warning: ${n} provided without its parent, this will not be shown in the cascader` ), r; }, populateCascader: function() { return new Promise((e) => { this.algoliaClient.getAlgoliaFacets(Tx).then((t) => { this.facets = t, Qn.emit("available-facets", t), this.options = t, this.options.forEach((n, r) => { this.options[r].total = this.countTotalFacet(n), this.options[r].label = F1(n.label), this.options[r].value = this.createCascaderItemValue( n.key, void 0 ), this.options[r].children.unshift({ value: this.createCascaderItemValue("Show all"), label: "Show all" }), this.options[r].children.forEach((o, a) => { this.options[r].children[a].facetPropPath !== "pennsieve.organization.name" && (this.options[r].children[a].label = F1( o.label )), this.options[r].children[a].value = this.createCascaderItemValue(n.label, o.label), this.options[r].children[a].children && this.options[r].children[a].children.length > 0 && this.options[r].children[a].children.forEach((i, s) => { this.options[r].children[a].children[s].label = F1(i.label), this.options[r].children[a].children[s].value = this.createCascaderItemValue( n.label, o.label, i.label ); }); }); }); }).finally(() => { e(); }); }); }, /** * Create manual events when cascader tag is closed */ cascadeTagClose: function(e) { let t = []; Object.entries(this.cascaderTags).map((n) => { const r = n[0], o = n[1], a = this.options.filter((s) => s.label == r)[0], i = a.key; for (let s = 0; s < a.children.length; s++) { const l = a.children[s], u = l.label, c = l.value; if (Array.isArray(o)) if (o.length === 0 && u.toLowerCase() === "show all") { t.push([i, c]); break; } else u !== e && o.includes(u) && t.push([i, c]); else Object.entries(o).map((d) => { const f = d[0], h = d[1]; f === u && l.children.map((p) => { const v = p.label, m = p.value; v !== e && h.includes(v) && t.push([i, m]); }); }); } }), this.cascadeEvent(t); }, /** * Re-generate 'cascaderTags' and 'presentTags' * Not able to avoid wrong facet at the moment */ tagsChangedCallback: function(e) { this.correctnessCheck.term && this.correctnessCheck.facet && this.correctnessCheck.facet2 && this.options.map((t) => { this.correctnessCheck.term.add(t.label), t.children.map((n) => { this.correctnessCheck.facet.add(n.label), t.label === "Anatomical structure" && n.label !== "Show all" && n.children.map((r) => { this.correctnessCheck.facet2.add(r.label); }); }); }), this.cascaderTags = {}, this.presentTags = [], e.map((t) => { const { facet: n, facet2: r, term: o } = t; this.correctnessCheck.term.has(o) && this.correctnessCheck.facet.has(n) && (r ? this.correctnessCheck.facet2.has(r) && (o in this.cascaderTags ? n in this.cascaderTags[o] ? this.cascaderTags[o][n].push(r) : this.cascaderTags[o][n] = [r] : (this.cascaderTags[o] = {}, this.cascaderTags[o][n] = [r])) : o in this.cascaderTags && o !== "Anatomical structure" ? this.cascaderTags[o].push(n) : n.toLowerCase() !== "show all" ? this.cascaderTags[o] = [n] : this.cascaderTags[o] = []); }), Object.values(this.cascaderTags).map((t) => { const n = Array.isArray(t) ? t : Object.values(t).flat(1); this.presentTags = [...this.presentTags, ...n]; }), this.presentTags = [...new Set(this.presentTags)], this.presentTags.length > 0 ? this.showFiltersText = !1 : this.showFiltersText = !0; }, /** * Support for function 'showAllEventModifierForAutoCheckAll' * Called in function 'populateCascader' */ countTotalFacet: function(e) { return ["anatomy.organ.category.name"].includes(e.key) ? e.children.reduce((t, n) => (t = typeof t == "number" ? t : t.children.length, t + n.children.length)) : e.children.length; }, /** * When check/uncheck all child items, automatically check "Show all" */ showAllEventModifierForAutoCheckAll: function(e) { const t = {}; return e.map((n) => { const r = n[0]; r in t ? t[r] += 1 : t[r] = 1; }), this.options.map((n) => { const r = n.key, o = n.children.filter((i) => i.label === "Show all")[0].value, a = n.total; t[r] === a && (e = e.filter((i) => i[0] !== n.key), delete t[r]), r in t || e.unshift([r, o]); }), e; }, // cascadeEvent: initiate searches based off cascader changes cascadeEvent: function(e) { let t = [...e]; if (t) { if (t = this.showAllEventModifier(t), t = this.showAllEventModifierForAutoCheckAll(t), this.__expandItem__) { let o = 0; this.__expandItem__.length > 1 && (o = 1); const a = t.filter((s) => s[o] == this.__expandItem__[o]), i = t.filter((s) => s[o] !== this.__expandItem__[o]); t = [...a, ...i]; } let n = t.filter((o) => o !== void 0).map((o) => { let { hString: a, bString: i } = this.findHierarachyStringAndBooleanString(o), { facet: s, facet2: l, term: u } = this.getFacetsFromHierarchyString(a); return { facetPropPath: o[0], facet: s, facet2: l, term: u, AND: i // for setting the boolean }; }), r = t.filter((o) => o !== void 0).map((o) => { let a, i = o[0].includes("duplicate") ? o[0].split("duplicate")[0] : o[0], { hString: s, bString: l } = this.findHierarachyStringAndBooleanString(o), { facet: u, facet2: c, term: d } = this.getFacetsFromHierarchyString(s); return c && (u = c, a = "anatomy.organ.name"), { facetPropPath: i, facet: u, term: d, AND: l, // for setting the boolean facetSubPropPath: a // will be used for filters if we are at the third level of the cascader }; }); r.filter((o) => o.facet !== "Show all").length || (r = []), this.filterTimeout && clearTimeout(this.filterTimeout), this.$emit("loading", !0), this.setCascader(n), this.filterTimeout = setTimeout(() => { this.$emit("filterResults", r), this.cssMods(); }, 600); } }, //this fucntion is needed as we previously stored booleans in the array of event that // are stored in the cascader findHierarachyStringAndBooleanString(e) { let t, n; return e.length >= 3 ? e[2] && (typeof e[2] == "string" || e[2] instanceof String) && e[2].split(">").length > 2 ? (t = e[2], n = e.length == 4 ? e[3] : void 0) : (t = e[1], n = e[2]) : (t = e[1], n = void 0), { hString: t, bString: n }; }, // Splits the terms and facets from the string stored in the cascader getFacetsFromHierarchyString(e) { let t, n, r, o = e.split(">"); return o.length == 3 ? (r = o[2], t = o[1], n = o[0]) : (t = o[1], n = o[0]), { facet: t, facet2: r, term: n }; }, // showAllEventModifier: Modifies a cascade event to unclick all selections in category if "show all" is clicked. Also unchecks "Show all" if any secection is clicked // *NOTE* Does NOT remove 'Show all' selections from showing in 'cascadeSelected' showAllEventModifier: function(e) { if (e.map((t) => t ? t[1].toLowerCase().includes("show all") : !1).includes(!0)) { let t = [], n = {}; for (const r in e) n[e[r][0]] === void 0 && (n[e[r][0]] = []), n[e[r][0]].push(e[r]); for (const r in n) { let o; for (let a = n[r].length - 1; a >= 0; a--) if (n[r][a][1].toLowerCase().includes("show all")) { o = n[r].splice(a, 1)[0]; break; } o ? this.previousShowAllChecked[r] && n[r].length > 0 ? t.push(...n[r]) : t.push(o) : t.push(...n[r]); } return t.sort((r, o) => this.__expandItem__ ? r[0] == this.__expandItem__ ? o[0] == this.__expandItem__ ? 0 : -1 : o[0] == this.__expandItem__ ? r[0] == this.__expandItem__ ? 0 : 1 : 0 : 0); } return e; }, cascadeExpandChange: function(e) { this.__expandItem__ = e, this.cssMods(); }, numberShownChanged: function(e) { this.$emit("numberPerPage", parseInt(e)); }, updatePreviousShowAllChecked: function(e) { for (const t in this.previousShowAllChecked) this.previousShowAllChecked[t] = !1; e.forEach((t) => { t[1].toLowerCase().includes("show all") && (this.previousShowAllChecked[t[0]] = !0); }); }, // setCascader: Clears previous selections and takes in an array of facets to select: filterFacets // facets are in the form: // { // facetPropPath: 'anatomy.organ.name', // term: 'Sex', // facet: 'Male' // AND: true // Optional value for setting the boolean within a facet // } setCascader: function(e) { if (this.cascaderIsReady && e && e.length != 0) { const t = (n) => { let r = [ n.facetPropPath, this.createCascaderItemValue(v0(n.term), n.facet) ]; return n.facet2 && r.push( this.createCascaderItemValue( v0(n.term), n.facet, n.facet2 ) ), r; }; this.cascadeSelected = e.map((n) => t(n)), this.cascadeSelectedWithBoolean = e.map((n) => { let r = t(n); return r.push(n.AND), r; }), this.updatePreviousShowAllChecked(this.cascadeSelected); } this.tagsChangedCallback(e); }, addFilter: function(e) { if (this.cascaderIsReady && e) { let t = this.validateAndConvertFilterToHierarchical(e); if (t) return this.cascadeSelected.filter((n) => n.term != t.term), this.cascadeSelected.push([ t.facetPropPath, this.createCascaderItemValue(t.term, t.facet), this.createCascaderItemValue( t.term, t.facet, t.facet2 ) ]), this.cascadeSelectedWithBoolean.push([ t.facetPropPath, this.createCascaderItemValue(t.term, t.facet), this.createCascaderItemValue( t.term, t.facet, t.facet2 ), t.AND ]), !0; } }, initiateSearch: function() { this.cascadeEvent(this.cascadeSelectedWithBoolean); }, // checkShowAllBoxes: Checks each 'Show all' cascade option by using the setCascader function checkShowAllBoxes: function() { this.setCascader( this.options.map((e) => ({ facetPropPath: e.value, term: e.label, facet: "Show all" })) ); }, makeCascadeLabelsClickable: function() { this.$nextTick(() => { document.querySelectorAll(".sidebar-cascader-popper .el-cascader-node__label").forEach((e) => { e.onclick = function() { const t = this.previousElementSibling; t && (t.parentElement.attributes["aria-owns"] || this.previousElementSibling.click()); }; }); }); }, cssMods: function() { this.makeCascadeLabelsClickable(), this.removeTopLevelCascaderCheckboxes(); }, removeTopLevelCascaderCheckboxes: function() { this.$nextTick(() => { document.querySelectorAll( ".sidebar-cascader-popper .el-cascader-menu__list" )[0].querySelectorAll(".el-checkbox__input").forEach((e) => e.style.display = "none"); }); }, /* * Given a filter, the function below returns the filter in the format of the cascader, returns false if facet is not found */ validateAndConvertFilterToHierarchical: function(e) { var t, n; if (e && e.facet && e.term) { const r = e.facet.toLowerCase(); if (e.facet2) return e; for (const o of this.options) if (o.value === e.facetPropPath) for (const a of o.children) { if (((t = a.label) == null ? void 0 : t.toLowerCase()) === r) return e.facet = a.label, e; if (a.children && a.children.length > 0) { for (const i of a.children) if (((n = i.label) == null ? void 0 : n.toLowerCase()) === r) return e.facet2 = i.label, e.facet = a.label, e; } } } return !1; }, getHierarchicalValidatedFilters: function(e) { if (e) if (this.cascaderIsReady) { const t = []; return e.forEach((n) => { const r = this.validateAndConvertFilterToHierarchical(n); r && t.push(r); }), t; } else return e; return []; } }, mounted: function() { this.algoliaClient = pa(new kL( this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION )), this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX), this.populateCascader().then(() => { this.cascaderIsReady = !0, this.checkShowAllBoxes(), this.setCascader(this.entry.filterFacets), this.cssMods(), this.$emit("cascaderReady"); }); } }, vFe = (e) => (Tr("data-v-4088113a"), e = e(), Or(), e), gFe = { class: "filters" }, mFe = { key: 0, class: "cascader-tag" }, yFe = { class: "el-tags-container" }, bFe = { class: "el-tags-container" }, wFe = { class: "search-filters transition-box" }, xFe = { key: 0, class: "filter-default-value" }, kFe = /* @__PURE__ */ vFe(() => /* @__PURE__ */ B("div", null, [ /* @__PURE__ */ B("strong", null, "Within categories:"), /* @__PURE__ */ Ae(" OR "), /* @__PURE__ */ B("br"), /* @__PURE__ */ Ae(" example: 'heart' OR 'colon' "), /* @__PURE__ */ B("br"), /* @__PURE__ */ B("br"), /* @__PURE__ */ B("strong", null, "Between categories:"), /* @__PURE__ */ Ae(" AND "), /* @__PURE__ */ B("br"), /* @__PURE__ */ Ae(" example: 'rat' AND 'lung' ") ], -1)), CFe = { class: "dataset-shown" }, SFe = { class: "dataset-results-feedback" }; function EFe(e, t, n, r, o, a) { const i = Xe("MapSvgSpriteColor"), s = kc, l = Ug, u = $A, c = Xe("MapSvgIcon"), d = Uw, f = Hg, h = qg; return E(), L("div", gFe, [ W(i), e.presentTags.length > 0 ? (E(), L("div", mFe, [ W(s, { class: "ml-2", type: "info", closable: "", onClose: t[0] || (t[0] = (p) => a.cascadeTagClose(e.presentTags[0])) }, { default: R(() => [ Ae(me(e.presentTags[0]), 1) ]), _: 1 }), e.presentTags.length > 1 ? (E(), Q(l, { key: 0, placement: "bottom-start", width: 200, trigger: "hover", "popper-class": "cascade-tags-popover" }, { default: R(() => [ B("div", yFe, [ (E(!0), L(De, null, xt(e.presentTags.slice(1), (p, v) => (E(), Q(s, { key: v, class: "ml-2", type: "info", closable: "", onClose: (m) => a.cascadeTagClose(p) }, { default: R(() => [ Ae(me(p), 1) ]), _: 2 }, 1032, ["onClose"]))), 128)) ]) ]), reference: R(() => [ B("div", bFe, [ e.presentTags.length > 1 ? (E(), Q(s, { key: 0, class: "ml-2", type: "info" }, { default: R(() => [ Ae(" +" + me(e.presentTags.length - 1), 1) ]), _: 1 })) : Z("", !0) ]) ]), _: 1 })) : Z("", !0) ])) : Z("", !0), W(pr, { name: "el-zoom-in-top" }, { default: R(() => [ Ne((E(), L("span", wFe, [ W(u, { class: "cascader", ref: "cascader", modelValue: e.cascadeSelected, "onUpdate:modelValue": t[1] || (t[1] = (p) => e.cascadeSelected = p), size: "large", placeholder: " ", "collapse-tags": !0, "collapse-tags-tooltip": "", options: e.options, props: e.props, onChange: t[2] || (t[2] = (p) => a.cascadeEvent(p)), onExpandChange: a.cascadeExpandChange, "show-all-levels": !0, "popper-class": "sidebar-cascader-popper" }, null, 8, ["modelValue", "options", "props", "onExpandChange"]), e.showFiltersText ? (E(), L("div", xFe, "Filters")) : Z("", !0), W(l, { title: "How do filters work?", width: "250", trigger: "hover", "popper-class": "filter-help-popover" }, { reference: R(() => [ W(c, { icon: "help", class: "help" }) ]), default: R(() => [ kFe ]), _: 1 }) ])), [ [ft, e.showFilters], [h, !e.cascaderIsReady] ]) ]), _: 1 }), B("div", CFe, [ B("span", SFe, me(a.numberOfResultsText), 1), W(f, { class: "number-shown-select", modelValue: e.numberShown, "onUpdate:modelValue": t[3] || (t[3] = (p) => e.numberShown = p), placeholder: "10", onChange: t[4] || (t[4] = (p) => a.numberShownChanged(p)) }, { default: R(() => [ (E(!0), L(De, null, xt(e.numberDatasetsShown, (p) => (E(), Q(d, { key: p, label: p, value: p }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]); } const CL = /* @__PURE__ */ li(hFe, [["render", EFe], ["__scopeId", "data-v-4088113a"]]); var $Fe = async function(e) { if (!e.ok) { let t = await e.json(); throw t ? new Error(t.message) : new Error(e); } return e; }, _Fe = { filters: [], searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: !1, numberPerPage: 10, page: 1, pageModel: 1, start: 0, hasSearched: !1, contextCardEnabled: !1 }; const TFe = { components: { SearchFilters: CL, DatasetCard: M9, SearchHistory: N9, Button: bo, Card: fA, Drawer: Bw, Icon: ln, Input: Ng, Pagination: qA }, name: "SideBarContent", props: { visible: { type: Boolean, default: !1 }, isDrawer: { type: Boolean, default: !0 }, entry: { type: Object, default: () => _Fe }, envVars: { type: Object, default: () => { } } }, data: function() { return { ...this.entry, algoliaClient: void 0, bodyStyle: { flex: "1 1 auto", "flex-flow": "column", display: "flex" }, cascaderIsReady: !1 }; }, computed: { // This computed property populates filter data's entry object with $data from this sidebar filterEntry: function() { return { numberOfHits: this.numberOfHits, filterFacets: this.filter }; } }, methods: { hoverChanged: function(e) { this.$emit("hover-changed", e); }, resetSearch: function() { this.numberOfHits = 0, this.discoverIds = [], this._dois = [], this.results = [], this.loadingCards = !1; }, openSearch: function(e, t = "", n = { withSearch: !0 }) { this.searchInput = t, this.resetPageNavigation(), this.cascaderIsReady ? (this.filter = this.$refs.filtersRef.getHierarchicalValidatedFilters(e), e && e.length > 0 && this.filter && this.filter.length === 0 ? (this.$refs.filtersRef.checkShowAllBoxes(), this.resetSearch()) : this.filter && (n.withSearch && this.searchAlgolia(this.filter, t), this.$refs.filtersRef.setCascader(this.filter))) : (this.filter = e, (!e || e.length == 0) && n.withSearch && this.searchAlgolia(this.filter, t)); }, addFilter: function(e) { this.cascaderIsReady ? (this.resetPageNavigation(), e && this.$refs.filtersRef.addFilter(e) && this.$refs.filtersRef.initiateSearch()) : Array.isArray(this.filter) ? this.filter.push(e) : this.filter = [e]; }, cascaderReady: function() { this.cascaderIsReady = !0, this.openSearch(this.filter, this.searchInput); }, clearSearchClicked: function() { this.searchInput = "", this.searchAndFilterUpdate(); }, searchEvent: function(e = !1) { (e.keyCode === 13 || e instanceof MouseEvent) && (this.searchInput = this.searchInput.trim(), this.searchAndFilterUpdate()); }, filterUpdate: function(e) { this.filters = [...e], this.searchAndFilterUpdate(), this.$emit("search-changed", { value: e, type: "filter-update" }); }, /** * Transform filters for third level items to perform search * because cascader keeps adding it back. */ transformFiltersBeforeSearch: function(e) { return e.map((t) => (t.facet2 && (t.facet = t.facet2, delete t.facet2), t)); }, searchAndFilterUpdate: function() { var e; this.resetPageNavigation(); const t = this.transformFiltersBeforeSearch(this.filters); this.searchAlgolia(t, this.searchInput), this.$refs.searchHistory.selectValue = "Search history", (this.filters.length || (e = this.searchInput) != null && e.trim()) && this.$refs.searchHistory.addSearchToHistory( this.filters, this.searchInput ); }, searchAlgolia(e, t = "") { this.loadingCards = !0, this.algoliaClient.anatomyInSearch(QE(e), t).then((n) => { Qn.emit("anatomy-in-datasets", n.forFlatmap), Qn.emit("number-of-datasets-for-anatomies", n.forScaffold); }), this.algoliaClient.search(QE(e), t, this.numberPerPage, this.page).then((n) => { this.numberOfHits = n.total, this.discoverIds = n.discoverIds, this._dois = n.dois, this.results = n.items, this.loadingCards = !1, this.scrollToTop(), this.$emit("search-changed", { value: this.searchInput, type: "query-update" }), this._abortController && this._abortController.abort(), this._abortController = new AbortController(); const r = this._abortController.signal; this.perItemSearch(r, { count: 0 }); }); }, filtersLoading: function(e) { this.loadingCards = e; }, numberPerPageUpdate: function(e) { this.numberPerPage = e, this.pageChange(1); }, pageChange: function(e) { this.start = (e - 1) * this.numberPerPage, this.page = e, this.searchAlgolia( this.filters, this.searchInput, this.numberPerPage, this.page ); }, handleMissingData: function(e) { let t = this.results.findIndex((n) => n.doi === e); this.results[t] && (this.results[t].detailsReady = !0); }, perItemSearch: function(e, t) { if (10 > t.count) { const n = this._dois.shift(); n && (t.count++, this.callSciCrunch(this.envVars.API_LOCATION, { dois: [n] }, e).then((r) => { r.numberOfHits === 0 ? this.handleMissingData(n) : this.resultsProcessing(r), this.$refs.content.style["overflow-y"] = "scroll", t.count--, this.perItemSearch(e, t); }).catch((r) => { r.name !== "AbortError" && (this.handleMissingData(n), t.count--, this.perItemSearch(e, t)); }), this.perItemSearch(e, t)); } }, scrollToTop: function() { this.$refs.content && this.$refs.content.scroll({ top: 0, behavior: "smooth" }); }, resetPageNavigation: function() { this.start = 0, this.page = 1; }, resultsProcessing: function(e) { this.lastSearch = this.searchInput, e.results.length !== 0 && e.results.forEach((t) => { let n = this.results.findIndex( (r) => t.doi ? t.doi.includes(r.doi) : !1 ); Object.assign(this.results[n], t), Object.assign(this.results[n], { numberSamples: t.sampleSize ? parseInt(t.sampleSize) : 0, numberSubjects: t.subjectSize ? parseInt(t.subjectSize) : 0, updated: (t.updated && t.updated.length) > 0 ? t.updated[0].timestamp.split("T")[0] : "", url: t.uri[0], datasetId: t.dataset_identifier, datasetRevision: t.dataset_revision, datasetVersion: t.dataset_version, organs: t.organs && t.organs.length > 0 ? [...new Set(t.organs.map((r) => r.name))] : void 0, species: t.organisms && t.organisms[0].species ? [ ...new Set( t.organisms.map( (r) => r.species ? r.species.name : null ) ) ] : void 0, // This processing only includes each gender once into 'sexes' scaffolds: t["abi-scaffold-metadata-file"], thumbnails: t["abi-thumbnail"] ? t["abi-thumbnail"] : t["abi-scaffold-thumbnail"], scaffoldViews: t["abi-scaffold-view-file"], videos: t.video, plots: t["abi-plot"], images: t["common-images"], contextualInformation: t["abi-contextual-information"].length > 0 ? t["abi-contextual-information"] : void 0, segmentation: t["mbf-segmentation"], simulation: t["abi-simulation-file"], additionalLinks: t.additionalLinks, detailsReady: !0 }), this.results[n] = this.results[n]; }); }, createfilterParams: function(e) { let t = new URLSearchParams(); for (const n in e) Array.isArray(e[n]) ? e[n].forEach((r) => { t.append(n, r); }) : t.append(n, e[n]); return t.toString(); }, callSciCrunch: function(e, t = {}, n) { return new Promise((r, o) => { let a = this.envVars.API_LOCATION + this.searchEndpoint + "?" + this.createfilterParams(t); fetch(a, { signal: n }).then($Fe).then((i) => i.json()).then((i) => r(i)).catch((i) => o(i)); }); }, getAlgoliaFacets: async function() { return await this.algoliaClient.getAlgoliaFacets( Tx ); }, searchHistorySearch: function(e) { this.searchInput = e.search, this.filters = e.filters, this.searchAndFilterUpdate(), this.openSearch([...e.filters], e.search, { withSearch: !1 }); } }, mounted: function() { this.algoliaClient = pa(new kL( this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION )), this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX), this.openSearch(this.filter, this.searchInput); }, created: function() { this.searchEndpoint = "dataset_info/using_multiple_dois/"; } }, OFe = { class: "header" }, FFe = { class: "content scrollbar", ref: "content" }, IFe = { key: 0, class: "error-feedback" }; function AFe(e, t, n, r, o, a) { const i = Ng, s = bo, l = CL, u = N9, c = M9, d = qA, f = fA, h = qg; return E(), Q(f, { "body-style": e.bodyStyle, class: "content-card" }, { header: R(() => [ B("div", OFe, [ W(i, { class: "search-input", placeholder: "Search", modelValue: e.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (p) => e.searchInput = p), onKeyup: a.searchEvent, clearable: "", onClear: a.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), W(s, { type: "primary", class: "button", onClick: a.searchEvent, size: "large" }, { default: R(() => [ Ae(" Search ") ]), _: 1 }, 8, ["onClick"]) ]) ]), default: R(() => [ W(l, { class: "filters", ref: "filtersRef", entry: a.filterEntry, envVars: n.envVars, onFilterResults: a.filterUpdate, onNumberPerPage: a.numberPerPageUpdate, onLoading: a.filtersLoading, onCascaderReady: a.cascaderReady }, null, 8, ["entry", "envVars", "onFilterResults", "onNumberPerPage", "onLoading", "onCascaderReady"]), W(u, { ref: "searchHistory", onSearch: a.searchHistorySearch }, null, 8, ["onSearch"]), Ne((E(), L("div", FFe, [ e.results.length === 0 && !e.loadingCards ? (E(), L("div", IFe, " No results found - Please change your search / filter criteria. ")) : Z("", !0), (E(!0), L(De, null, xt(e.results, (p) => (E(), L("div", { key: p.doi, class: "step-item" }, [ W(c, { class: "dataset-card", entry: p, envVars: n.envVars, onMouseenter: (v) => a.hoverChanged(p), onMouseleave: t[1] || (t[1] = (v) => a.hoverChanged(void 0)) }, null, 8, ["entry", "envVars", "onMouseenter"]) ]))), 128)), W(d, { class: "pagination", "current-page": e.page, "onUpdate:currentPage": t[2] || (t[2] = (p) => e.page = p), "hide-on-single-page": "", large: "", layout: "prev, pager, next", "page-size": e.numberPerPage, total: e.numberOfHits, onCurrentChange: a.pageChange }, null, 8, ["current-page", "page-size", "total", "onCurrentChange"]) ])), [ [h, e.loadingCards] ]) ]), _: 1 }, 8, ["body-style"]); } const SL = /* @__PURE__ */ li(TFe, [["render", AFe], ["__scopeId", "data-v-d3c8c59e"]]), PFe = { name: "AnnotationTool", components: { AnnotationPopup: e6, Button: bo, CreateTooltipContent: ote, Col: OA, ElIconDelete: By, Icon: ln, Row: TA }, props: { annotationEntry: { type: Object }, createData: { type: Object, default: {} } }, data: function() { return { ElIconDelete: On(By) }; } }, LFe = { class: "annotation-tool scrollbar" }, RFe = { key: 1, class: "delete-container" }; function DFe(e, t, n, r, o, a) { const i = Xe("CreateTooltipContent"), s = Xe("annotation-popup"), l = OA, u = bo, c = TA; return E(), L("div", LFe, [ Ne(W(i, { createData: n.createData, onConfirmCreate: t[0] || (t[0] = (d) => e.$emit("confirm-create", d)), onCancelCreate: t[1] || (t[1] = (d) => e.$emit("cancel-create")), class: "create-tooltip-content" }, null, 8, ["createData"]), [ [ft, n.createData && n.createData.toBeConfirmed] ]), n.annotationEntry && (!n.createData || !n.createData.toBeConfirmed) ? (E(), Q(s, { key: 0, class: "annotation-popup", annotationEntry: n.annotationEntry, onAnnotation: t[2] || (t[2] = (d) => e.$emit("annotation", d)) }, null, 8, ["annotationEntry"])) : Z("", !0), n.createData && n.createData.toBeDeleted ? (E(), L("div", RFe, [ W(c, null, { default: R(() => [ W(l, { offset: 1, span: 6 }, { default: R(() => [ Ae("Delete this feature?") ]), _: 1 }), W(l, { offset: 1, span: 3 }, { default: R(() => [ W(u, { class: "delete-button", icon: e.ElIconDelete, onClick: t[3] || (t[3] = (d) => e.$emit("confirm-delete")) }, { default: R(() => [ Ae(" Delete ") ]), _: 1 }, 8, ["icon"]) ]), _: 1 }), W(l, { offset: 1, span: 2 }, { default: R(() => [ W(u, { class: "delete-button", onClick: t[4] || (t[4] = (d) => e.$emit("cancel-create")) }, { default: R(() => [ Ae(" Dismiss ") ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ])) : Z("", !0) ]); } const EL = /* @__PURE__ */ li(PFe, [["render", DFe], ["__scopeId", "data-v-de83d649"]]), MFe = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), $d = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, NFe = 3e3, BFe = { name: "ConnectivityInfo", components: { Button: bo, Container: yke, Icon: ln, ElIconArrowUp: K1e, ElIconArrowDown: kf, ElIconWarning: kI, ExternalResourceCard: CO, CopyToClipboard: Lc, ConnectivityGraph: pue }, props: { entry: { type: Object, default: () => ({ destinations: [], origins: [], components: [], destinationsWithDatasets: [], originsWithDatasets: [], componentsWithDatasets: [], resource: void 0, featuresAlert: void 0 }) }, envVars: { type: Object, default: () => { } }, availableAnatomyFacets: { type: Array, default: () => [] } }, data: function() { return { controller: void 0, activeSpecies: void 0, pubmedSearchUrl: "", loading: !1, activeView: "listView", facetList: [], showToolip: !1, showDetails: !1, originDescriptions: { motor: "is the location of the initial cell body of the circuit", sensory: "is the location of the initial cell body in the PNS circuit" }, componentsWithDatasets: [], uberons: [{ id: void 0, name: void 0 }], connectivityError: null, timeoutID: void 0, graphViewLoaded: !1, updatedCopyContent: "" }; }, watch: { availableAnatomyFacets: { handler: function(e) { this.convertFacetsToList(e); }, immediate: !0, deep: !0 } }, computed: { resources: function() { let e = []; return this.entry && this.entry.hyperlinks && (e = this.entry.hyperlinks), e; }, originDescription: function() { return this.entry && this.entry.title && this.entry.title.toLowerCase().includes("motor") ? this.originDescriptions.motor : this.originDescriptions.sensory; }, provSpeciesDescription: function() { let e = "Studied in"; return this.entry.provenanceTaxonomyLabel.forEach((t) => { e += ` ${t},`; }), e = e.slice(0, -1), e += " species", e; } }, methods: { titleCase: function(e) { return MFe(e); }, capitalise: function(e) { return $d(e); }, openUrl: function(e) { window.open(e, "_blank"); }, openAll: function() { Qn.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.componentsWithDatasets.map((e) => e.name.toLowerCase()) }); }, openAxons: function() { Qn.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.destinationsWithDatasets.map((e) => e.name.toLowerCase()) }); }, // shouldShowExploreButton: Checks if the feature is in the list of available anatomy facets shouldShowExploreButton: function(e) { for (let t = 0; t < e.length; t++) if (this.facetList.includes(e[t].name.toLowerCase())) return !0; return !1; }, // convertFacetsToList: Converts the available anatomy facets to a list for easy searching convertFacetsToList: function(e) { e.forEach((t) => { t.children ? this.convertFacetsToList(t.children) : this.facetList.push(t.label.toLowerCase()); }); }, openDendrites: function() { Qn.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.originsWithDatasets.map((e) => e.name.toLowerCase()) }); }, pubmedSearchUrlUpdate: function(e) { this.pubmedSearchUrl = e; }, showConnectivity: function(e) { const t = e.featureId || []; this.$emit("show-connectivity", t); }, switchConnectivityView: function(e) { this.activeView = e, e === "graphView" && !this.graphViewLoaded && this.$nextTick(() => { this.graphViewLoaded = !0; }); }, onTapNode: function(e) { const t = e.map((n) => n.label).join(", "); this.toggleConnectivityTooltip(t, { show: !0 }); }, onReferencesLoaded: function(e) { this.updatedCopyContent = this.getUpdateCopyContent(e); }, getUpdateCopyContent: function(e) { var t, n, r, o; if (!this.entry) return ""; const a = []; this.entry.title ? a.push(`
    ${$d(this.entry.title)}
    `) : a.push(`
    ${this.entry.featureId}
    `), (t = this.entry.provenanceTaxonomyLabel) != null && t.length && a.push(`
    ${this.provSpeciesDescription}
    `), this.entry.paths && a.push(`
    ${this.entry.paths}
    `); function i(s, l, u = []) { let c = `
    ${s}
    `; const d = []; l.forEach((h) => { let p = []; h.split(",").forEach((v) => { const m = u.find((g) => g.name === v.trim()); m ? p.push(`${$d(v)} (${m.id})`) : p.push(`${$d(v)}`); }), d.push(p.join(",")); }); const f = d.map((h) => `
  • ${h}
  • `).join(` `); return c += ` `, c += `
      ${f}
    `, c; } if ((n = this.entry.origins) != null && n.length) { const s = "Origin", l = this.entry.origins, u = this.entry.originsWithDatasets, c = i(s, l, u); a.push(c); } if ((r = this.entry.components) != null && r.length) { const s = "Components", l = this.entry.components, u = this.entry.componentsWithDatasets, c = i(s, l, u); a.push(c); } if ((o = this.entry.destinations) != null && o.length) { const s = "Destination", l = this.entry.destinations, u = this.entry.destinationsWithDatasets, c = i(s, l, u); a.push(c); } if (e) { let s = "
    References
    "; s += ` `; const l = e.list.map((u) => `
  • ${u}
  • `).join(` `); s += `
      ${l}
    `, a.push(s); } return a.join(`
    `); }, toggleConnectivityTooltip: function(e, t) { const n = [ ...this.entry.componentsWithDatasets, ...this.entry.destinationsWithDatasets, ...this.entry.originsWithDatasets ], r = e.split(","), o = []; t.show && r.forEach((a) => { const i = n.find( (s) => s.name.toLowerCase().trim() === a.toLowerCase().trim() ); i && o.push({ id: i.id, label: i.name }); }), this.$emit("connectivity-component-click", o); }, getErrorConnectivities: function(e) { const t = [...new Set(e)]; let n = ""; return t.forEach((r, o) => { const { label: a } = r; n += o === 0 ? $d(a) : a, t.length > 1 && (o + 2 === t.length ? n += " and " : o + 1 < t.length && (n += ", ")); }), n; }, /** * Function to show error message. * `errorInfo` includes `errorData` array (optional) for error connectivities * and `errorMessage` for error message. * @arg `errorInfo` */ getConnectivityError: function(e) { const { errorData: t, errorMessage: n } = e; return { errorConnectivities: this.getErrorConnectivities(t), errorMessage: n }; }, pushConnectivityError: function(e) { const t = this.getConnectivityError(e), n = this.$refs.connectivityGraphRef; n && n.showErrorMessage(t), this.connectivityError = { ...t }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => { this.connectivityError = null; }, NFe); } }, mounted: function() { this.updatedCopyContent = this.getUpdateCopyContent(), Qn.on("connectivity-graph-error", (e) => { this.pushConnectivityError(e); }); } }, gu = (e) => (Tr("data-v-31b04c7e"), e = e(), Or(), e), zFe = { key: 0, class: "main" }, VFe = { class: "connectivity-info-title" }, jFe = { class: "title-content" }, HFe = { key: 0, class: "block" }, UFe = { class: "title" }, qFe = { style: { "word-break": "keep-all" } }, WFe = { key: 0, class: "subtitle" }, GFe = { key: 1, class: "block" }, KFe = { class: "title" }, YFe = { class: "title-buttons" }, XFe = /* @__PURE__ */ gu(() => /* @__PURE__ */ B("span", null, " Show connectivity on map ", -1)), ZFe = { class: "content-container population-display" }, JFe = /* @__PURE__ */ gu(() => /* @__PURE__ */ B("div", { class: "block attribute-title-container" }, [ /* @__PURE__ */ B("span", { class: "attribute-title" }, "Population Display") ], -1)), QFe = { class: "block buttons-row" }, eIe = { class: "content-container content-container-connectivity" }, tIe = { key: 0, class: "block" }, nIe = { class: "attribute-title-container" }, rIe = /* @__PURE__ */ gu(() => /* @__PURE__ */ B("span", { class: "attribute-title" }, "Origin", -1)), oIe = { style: { "word-break": "keep-all" } }, aIe = /* @__PURE__ */ gu(() => /* @__PURE__ */ B("i", null, "Origin", -1)), iIe = ["origin-item-label", "onMouseenter", "onMouseleave"], sIe = { key: 1, class: "block" }, lIe = /* @__PURE__ */ gu(() => /* @__PURE__ */ B("div", { class: "attribute-title-container" }, [ /* @__PURE__ */ B("div", { class: "attribute-title" }, "Components") ], -1)), uIe = ["component-item-label", "onMouseenter", "onMouseleave"], cIe = { key: 2, class: "block" }, dIe = { class: "attribute-title-container" }, pIe = /* @__PURE__ */ gu(() => /* @__PURE__ */ B("span", { class: "attribute-title" }, "Destination", -1)), fIe = /* @__PURE__ */ gu(() => /* @__PURE__ */ B("span", { style: { "word-break": "keep-all" } }, [ /* @__PURE__ */ B("i", null, "Destination"), /* @__PURE__ */ Ae(" is where the axons terminate ") ], -1)), hIe = ["destination-item-label", "onMouseenter", "onMouseleave"], vIe = { class: "block" }, gIe = { class: "connectivity-error-container" }, mIe = { key: 0, class: "connectivity-error" }, yIe = { key: 0 }, bIe = { class: "content-container" }, wIe = { key: 0, class: "content-container content-container-references" }; function xIe(e, t, n, r, o, a) { const i = fye, s = ln, l = Ug, u = uye, c = bo, d = Xe("CopyToClipboard"), f = kI, h = Xe("connectivity-graph"), p = Xe("external-resource-card"), v = qg; return n.entry ? Ne((E(), L("div", zFe, [ B("div", VFe, [ B("div", jFe, [ n.entry.title ? (E(), L("div", HFe, [ B("div", UFe, [ Ae(me(a.capitalise(n.entry.title)) + " ", 1), n.entry.featuresAlert ? (E(), Q(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: R(() => [ W(s, { class: "alert" }, { default: R(() => [ W(i) ]), _: 1 }) ]), default: R(() => [ B("span", qFe, me(n.entry.featuresAlert), 1) ]), _: 1 })) : Z("", !0) ]), n.entry.provenanceTaxonomyLabel && n.entry.provenanceTaxonomyLabel.length > 0 ? (E(), L("div", WFe, me(a.provSpeciesDescription), 1)) : Z("", !0) ])) : (E(), L("div", GFe, [ B("div", KFe, me(n.entry.featureId), 1) ])) ]), B("div", YFe, [ W(l, { width: "auto", trigger: "hover", teleported: !1, "popper-class": "popover-map-pin" }, { reference: R(() => [ W(c, { class: "button-circle", circle: "", onClick: t[0] || (t[0] = (m) => a.showConnectivity(n.entry)) }, { default: R(() => [ W(s, { color: "white" }, { default: R(() => [ W(u) ]), _: 1 }) ]), _: 1 }) ]), default: R(() => [ XFe ]), _: 1 }), W(d, { content: e.updatedCopyContent }, null, 8, ["content"]) ]) ]), B("div", ZFe, [ JFe, B("div", QFe, [ W(c, { class: V(e.activeView === "listView" ? "button" : "el-button-secondary"), onClick: t[1] || (t[1] = (m) => a.switchConnectivityView("listView")) }, { default: R(() => [ Ae(" List view ") ]), _: 1 }, 8, ["class"]), W(c, { class: V(e.activeView === "graphView" ? "button" : "el-button-secondary"), onClick: t[2] || (t[2] = (m) => a.switchConnectivityView("graphView")) }, { default: R(() => [ Ae(" Graph view ") ]), _: 1 }, 8, ["class"]) ]) ]), Ne(B("div", eIe, [ Ae(me(n.entry.paths) + " ", 1), n.entry.origins && n.entry.origins.length > 0 ? (E(), L("div", tIe, [ B("div", nIe, [ rIe, W(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: R(() => [ W(s, { class: "info" }, { default: R(() => [ W(f) ]), _: 1 }) ]), default: R(() => [ B("span", oIe, [ aIe, Ae(" " + me(a.originDescription), 1) ]) ]), _: 1 }) ]), (E(!0), L(De, null, xt(n.entry.origins, (m, g) => (E(), L("div", { class: "attribute-content", "origin-item-label": m, key: m, onMouseenter: (b) => a.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (b) => a.toggleConnectivityTooltip(m, { show: !1 }) }, me(a.capitalise(m)), 41, iIe))), 128)), Ne(W(c, { class: "button", id: "open-dendrites-button", onClick: a.openDendrites }, { default: R(() => [ Ae(" Explore origin data ") ]), _: 1 }, 8, ["onClick"]), [ [ ft, n.entry.originsWithDatasets && n.entry.originsWithDatasets.length > 0 && a.shouldShowExploreButton(n.entry.originsWithDatasets) ] ]) ])) : Z("", !0), n.entry.components && n.entry.components.length > 0 ? (E(), L("div", sIe, [ lIe, (E(!0), L(De, null, xt(n.entry.components, (m, g) => (E(), L("div", { class: "attribute-content", "component-item-label": m, key: m, onMouseenter: (b) => a.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (b) => a.toggleConnectivityTooltip(m, { show: !1 }) }, me(a.capitalise(m)), 41, uIe))), 128)) ])) : Z("", !0), n.entry.destinations && n.entry.destinations.length > 0 ? (E(), L("div", cIe, [ B("div", dIe, [ pIe, W(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: R(() => [ W(s, { class: "info" }, { default: R(() => [ W(f) ]), _: 1 }) ]), default: R(() => [ fIe ]), _: 1 }) ]), (E(!0), L(De, null, xt(n.entry.destinations, (m, g) => (E(), L("div", { class: "attribute-content", "destination-item-label": m, key: m, onMouseenter: (b) => a.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (b) => a.toggleConnectivityTooltip(m, { show: !1 }) }, me(a.capitalise(m)), 41, hIe))), 128)), Ne(W(c, { class: "button", onClick: a.openAxons }, { default: R(() => [ Ae(" Explore destination data ") ]), _: 1 }, 8, ["onClick"]), [ [ ft, n.entry.destinationsWithDatasets && n.entry.destinationsWithDatasets.length > 0 && a.shouldShowExploreButton(n.entry.destinationsWithDatasets) ] ]) ])) : Z("", !0), Ne(B("div", vIe, [ W(c, { class: "button", onClick: a.openAll }, { default: R(() => [ Ae(" Search for data on components ") ]), _: 1 }, 8, ["onClick"]) ], 512), [ [ ft, n.entry.componentsWithDatasets && n.entry.componentsWithDatasets.length > 0 && a.shouldShowExploreButton(n.entry.componentsWithDatasets) ] ]), B("div", gIe, [ e.connectivityError ? (E(), L("div", mIe, [ e.connectivityError.errorConnectivities ? (E(), L("strong", yIe, me(e.connectivityError.errorConnectivities), 1)) : Z("", !0), Ae(" " + me(e.connectivityError.errorMessage), 1) ])) : Z("", !0) ]) ], 512), [ [ft, e.activeView === "listView"] ]), Ne(B("div", bIe, [ e.graphViewLoaded ? (E(), Q(h, { key: 0, entry: n.entry.featureId[0], mapServer: n.envVars.FLATMAPAPI_LOCATION, onTapNode: a.onTapNode, ref: "connectivityGraphRef" }, null, 8, ["entry", "mapServer", "onTapNode"])) : Z("", !0) ], 512), [ [ft, e.activeView === "graphView"] ]), a.resources.length ? (E(), L("div", wIe, [ W(p, { resources: a.resources, onReferencesLoaded: a.onReferencesLoaded }, null, 8, ["resources", "onReferencesLoaded"]) ])) : Z("", !0) ])), [ [v, e.loading] ]) : Z("", !0); } const $L = /* @__PURE__ */ li(BFe, [["render", xIe], ["__scopeId", "data-v-31b04c7e"]]), kIe = { name: "Tabs", props: { tabTitles: { type: Array, default: () => [] }, activeId: { type: Number, default: 1 } }, methods: { titleClicked: function(e, t) { this.$emit("titleClicked", { id: e, type: t }); }, tabClose: function(e) { this.$emit("tab-close", e); } } }, CIe = (e) => (Tr("data-v-ed1ce6dc"), e = e(), Or(), e), SIe = { class: "tab-container" }, EIe = ["onClick"], $Ie = { class: "title-text" }, _Ie = /* @__PURE__ */ CIe(() => /* @__PURE__ */ B("span", { class: "visually-hidden" }, "Close", -1)); function TIe(e, t, n, r, o, a) { const i = bo; return E(), L("div", SIe, [ (E(!0), L(De, null, xt(n.tabTitles, (s) => (E(), L("div", { class: V(["title", { "active-tab": s.id == n.activeId }]), key: s.id }, [ B("div", { class: V(["title-text-table", { highlightText: s.id == n.activeId }]), onClick: (l) => a.titleClicked(s.id, s.type) }, [ B("div", $Ie, me(s.title), 1) ], 10, EIe), s.id > 1 ? (E(), Q(i, { key: 0, onClick: (l) => a.tabClose(s.id), class: "button-tab-close", "aria-label": "Close" }, { default: R(() => [ Ae(" × "), _Ie ]), _: 2 }, 1032, ["onClick"])) : Z("", !0) ], 2))), 128)) ]); } const _L = /* @__PURE__ */ li(kIe, [["render", TIe], ["__scopeId", "data-v-ed1ce6dc"]]), OIe = { components: { SidebarContent: SL, Tabs: _L, ElIconArrowLeft: ww, ElIconArrowRight: Ig, Drawer: Bw, Icon: ln, ConnectivityInfo: $L, AnnotationTool: EL }, name: "SideBar", props: { /** * The option to show side bar. */ visible: { type: Boolean, default: !1 }, /** * The environment variables object with * `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`, * `ALGOLIA_INDEX`, `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`, * `NL_LINK_PREFIX`, `ROOT_URL` */ envVars: { type: Object, default: () => { } }, /** * The array of objects to show multiple sidebar contents. */ tabs: { type: Array, default: () => [ { id: 1, title: "Search", type: "search" }, { id: 2, title: "Connectivity", type: "connectivity" }, { id: 3, title: "Annotation", type: "annotation" } ] }, /** * The active tab id for default tab. */ activeTabId: { type: Number, default: 1 }, /** * The option to show or hide sidebar on page load. */ openAtStart: { type: Boolean, default: !1 }, /** * The connectivity info data to show in sidebar. */ connectivityInfo: { type: Object, default: null }, /** * The annotation data to show in sidebar. */ annotationEntry: { type: Object, default: null }, createData: { type: Object, default: { toBeConfirmed: !1, points: [], shape: "", x: 0, y: 0 } } }, data: function() { return { drawerOpen: !1, availableAnatomyFacets: [] }; }, methods: { /** * This event is emitted when the mouse hover are changed. * @arg data */ hoverChanged: function(e) { this.$emit("hover-changed", e); }, /** * This event is emitted when the show connectivity button is clicked. * @arg featureIds */ showConnectivity: function(e) { this.$emit("show-connectivity", e); }, /** * This function is triggered after a connectivity component is clicked. * @arg data */ onConnectivityComponentClick: function(e) { this.$emit("connectivity-component-click", e); }, /** * This event is emitted when the search filters are changed. * @arg `obj` {data, id} */ searchChanged: function(e, t) { this.$emit("search-changed", { ...t, id: e }); }, /** * The function to close sidebar. * @public */ close: function() { this.drawerOpen = !1; }, /** * The function to toggle (open and close) sidebar. * @public */ toggleDrawer: function() { this.drawerOpen = !this.drawerOpen; }, openSearch: function(e, t) { this.drawerOpen = !0, this.$nextTick(() => { this.getSearchTabRefById(1).openSearch(e, t); }); }, /** * Get the tab object by tab id and type. * If not found, return the first available tab. */ getTabByIdAndType: function(e, t) { const n = e || this.activeTabId, r = t || "search", o = this.tabs.find((i) => i.id === n && i.type === r), a = this.tabs[0]; return o || a; }, /** * Get the ref id of the tab by id and type. */ getTabRefId: function(e, t) { let n = "searchTab_"; t === "connectivity" ? n = "connectivityTab_" : t === "annotation" && (n = "annotationTab_"); const r = this.getTabByIdAndType(e, t); return n + r.id; }, getSearchTabRefById: function(e) { const t = e || 1, n = this.getTabRefId(t, "search"); return this.$refs[n][0]; }, /** * The function to add filters to sidebar search. * * @param {Object} filter * @public */ addFilter: function(e) { this.drawerOpen = !0, e.AND = !0, this.$nextTick(() => { this.getSearchTabRefById(1).addFilter(e); }); }, openNeuronSearch: function(e) { this.drawerOpen = !0, this.$nextTick(() => { this.getSearchTabRefById(1).openSearch( "", void 0, "scicrunch-query-string/", { field: "*organ.curie", curie: e } ); }); }, getAlgoliaFacets: async function() { return await this.getSearchTabRefById(1).getAlgoliaFacets(); }, setDrawerOpen: function(e = !0) { this.drawerOpen = e; }, /** * The function to emit 'tabClicked' event with tab's `id` and tab's `type` * when user clicks the sidebar tab. * @param {Object} {id, type} * @public */ tabClicked: function({ id: e, type: t }) { this.$emit("tabClicked", { id: e, type: t }); }, tabClose: function(e) { this.$emit("tab-close", e); }, /** * To receive error message for connectivity graph * @param {String} errorMessage */ updateConnectivityGraphError: function(e) { Qn.emit("connectivity-graph-error", e); } }, computed: { activeTabs: function() { const e = [ { id: 1, title: "Search", type: "search" } ]; return this.connectivityInfo && e.push({ id: 2, title: "Connectivity", type: "connectivity" }), this.annotationEntry && Object.keys(this.annotationEntry).length > 0 && e.push({ id: 3, title: "Annotation", type: "annotation" }), e; } }, created: function() { this.drawerOpen = this.openAtStart; }, mounted: function() { Qn.on("PopoverActionClick", (e) => { this.$emit("actionClick", e); }), Qn.on("number-of-datasets-for-anatomies", (e) => { this.$emit("number-of-datasets-for-anatomies", e); }), Qn.on("anatomy-in-datasets", (e) => { this.$emit("anatomy-in-datasets", e); }), Qn.on("contextUpdate", (e) => { this.$emit("contextUpdate", e); }), Qn.on("datalink-clicked", (e) => { this.$emit("datalink-clicked", e); }), Qn.on("onConnectivityActionClick", (e) => { this.tabClicked({ id: 1, type: "search" }), this.$emit("actionClick", e); }), Qn.on("available-facets", (e) => { this.availableAnatomyFacets = e.find((t) => t.label === "Anatomical Structure").children; }); } }, FIe = { ref: "container" }, IIe = { class: "box-card" }, AIe = { class: "sidebar-container" }; function PIe(e, t, n, r, o, a) { const i = ww, s = ln, l = Ig, u = _L, c = $L, d = EL, f = SL, h = Bw; return E(), L("div", FIe, [ e.drawerOpen ? Z("", !0) : (E(), L("div", { key: 0, onClick: t[0] || (t[0] = (...p) => a.toggleDrawer && a.toggleDrawer(...p)), class: "open-tab" }, [ W(s, null, { default: R(() => [ W(i) ]), _: 1 }) ])), W(h, { class: "side-bar my-drawer", modelValue: e.drawerOpen, "onUpdate:modelValue": t[7] || (t[7] = (p) => e.drawerOpen = p), teleported: !1, "modal-append-to-body": !1, size: "584", "with-header": !1, wrapperClosable: !1, modal: !1, "modal-class": "sidebar-body", "z-index": 10, "lock-scroll": !1 }, { default: R(() => [ B("div", IIe, [ e.drawerOpen ? (E(), L("div", { key: 0, onClick: t[1] || (t[1] = (...p) => a.close && a.close(...p)), class: "close-tab" }, [ W(s, null, { default: R(() => [ W(l) ]), _: 1 }) ])) : Z("", !0), B("div", AIe, [ a.activeTabs.length > 1 ? (E(), Q(u, { key: 0, tabTitles: a.activeTabs, activeId: n.activeTabId, onTitleClicked: a.tabClicked, onTabClose: a.tabClose }, null, 8, ["tabTitles", "activeId", "onTitleClicked", "onTabClose"])) : Z("", !0), (E(!0), L(De, null, xt(n.tabs, (p) => (E(), L(De, { key: "tab.id" }, [ p.type === "connectivity" && n.connectivityInfo ? (E(), L(De, { key: 0 }, [ p.id === n.activeTabId ? (E(), Q(c, { key: 0, entry: n.connectivityInfo, availableAnatomyFacets: e.availableAnatomyFacets, envVars: n.envVars, ref_for: !0, ref: "connectivityTab_" + p.id, onShowConnectivity: a.showConnectivity, onConnectivityComponentClick: a.onConnectivityComponentClick }, null, 8, ["entry", "availableAnatomyFacets", "envVars", "onShowConnectivity", "onConnectivityComponentClick"])) : Z("", !0) ], 64)) : p.type === "annotation" ? Ne((E(), Q(d, { key: 1, ref_for: !0, ref: "annotationTab_" + p.id, annotationEntry: n.annotationEntry, createData: n.createData, onAnnotation: t[2] || (t[2] = (v) => e.$emit("annotation-submitted", v)), onConfirmCreate: t[3] || (t[3] = (v) => e.$emit("confirm-create", v)), onCancelCreate: t[4] || (t[4] = (v) => e.$emit("cancel-create")), onConfirmDelete: t[5] || (t[5] = (v) => e.$emit("confirm-delete", v)) }, null, 8, ["annotationEntry", "createData"])), [ [ft, p.id === n.activeTabId] ]) : Ne((E(), Q(f, { key: 2, class: "sidebar-content-container", contextCardEntry: p.contextCard, envVars: n.envVars, ref_for: !0, ref: "searchTab_" + p.id, onSearchChanged: (v) => a.searchChanged(p.id, v), onHoverChanged: t[6] || (t[6] = (v) => a.hoverChanged(v)) }, null, 8, ["contextCardEntry", "envVars", "onSearchChanged"])), [ [ft, p.id === n.activeTabId] ]) ], 64))), 128)) ]) ]) ]), _: 1 }, 8, ["modelValue"]) ], 512); } const LIe = /* @__PURE__ */ li(OIe, [["render", PIe], ["__scopeId", "data-v-319adc7d"]]); /*! js-cookie v3.0.5 | MIT */ function Nh(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) e[r] = n[r]; } return e; } var RIe = { read: function(e) { return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent); }, write: function(e) { return encodeURIComponent(e).replace( /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent ); } }; function fb(e, t) { function n(o, a, i) { if (!(typeof document > "u")) { i = Nh({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape); var s = ""; for (var l in i) i[l] && (s += "; " + l, i[l] !== !0 && (s += "=" + i[l].split(";")[0])); return document.cookie = o + "=" + e.write(a, o) + s; } } function r(o) { if (!(typeof document > "u" || arguments.length && !o)) { for (var a = document.cookie ? document.cookie.split("; ") : [], i = {}, s = 0; s < a.length; s++) { var l = a[s].split("="), u = l.slice(1).join("="); try { var c = decodeURIComponent(l[0]); if (i[c] = e.read(u, c), o === c) break; } catch { } } return o ? i[o] : i; } } return Object.create( { set: n, get: r, remove: function(o, a) { n( o, "", Nh({}, a, { expires: -1 }) ); }, withAttributes: function(o) { return fb(this.converter, Nh({}, this.attributes, o)); }, withConverter: function(o) { return fb(Nh({}, this.converter, o), this.attributes); } }, { attributes: { value: Object.freeze(t) }, converter: { value: Object.freeze(e) } } ); } var hb = fb(RIe, { path: "/" }), La = function(e, t, n, r, o) { if (r === "m") throw new TypeError("Private method is not writable"); if (r === "a" && !o) throw new TypeError("Private accessor was defined without a setter"); if (typeof t == "function" ? e !== t || !o : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return r === "a" ? o.call(e, n) : o ? o.value = n : t.set(e, n), n; }, Dn = function(e, t, n, r) { if (n === "a" && !r) throw new TypeError("Private accessor was defined without a getter"); if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e); }, vi, Zd, Ra, Pr, ds; const DIe = 1e4; class MIe { /** * @param serverEndpoint The URL of a map annotation service. */ constructor(t) { vi.add(this), Zd.set(this, void 0), Ra.set(this, null), Pr.set( this, null /** * @param serverEndpoint The URL of a map annotation service. */ ), t.slice(-1) === "/" ? La(this, Zd, t.slice(0, -1), "f") : La(this, Zd, t, "f"); } /** * Get information about the logged-in SPARC user. * * Requires {@linkcode authenticate} to first be called. */ get currentUser() { return Dn(this, Ra, "f"); } /** * Get information about any error from the last call * to {@linkcode authenticate}. */ get currentError() { return Dn(this, Pr, "f"); } /** * Authenticate the logged-in SPARC user. * * @param userApiKey The Api token of the logged-in Pennsieve user * @return A Promise resolving to either data about a valid user * or a reason why the user is invalid. */ async authenticate(t) { La(this, Pr, null, "f"), La(this, Ra, null, "f"); const n = await Dn(this, vi, "m", ds).call(this, t, "authenticate"); return "error" in n ? (hb.remove("annotation-key"), Promise.resolve(Dn(this, Pr, "f"))) : (hb.set("annotation-key", n.session, { secure: !0, expires: 1 }), La(this, Ra, n.data, "f"), Promise.resolve(Dn(this, Ra, "f"))); } /** * Unauthenticate with the annotation service. * * @param userApiKey The Api token of the logged-in Pennsieve user * @return A Promise with data about the call. */ async unauthenticate(t) { La(this, Pr, null, "f"), La(this, Ra, null, "f"); const n = await Dn(this, vi, "m", ds).call(this, t, "unauthenticate"); return "success" in n ? Promise.resolve(n) : Promise.resolve(Dn(this, Pr, "f")); } /** * Get identifiers of all annotated items in a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param resourceId The resource's identifier * @param userId A user identifier (ORCID). Optional * @param participated Get items the user was involved in annotating or not. * Optional, default ``true`` * @return A Promise resolving to either a list of identifiers of annotated * items or a reason why identifiers couldn't be retrieved. */ async annotatedItemIds(t, n, r, o) { const a = { resource: n }; r !== void 0 && (a.user = r), o !== void 0 && (a.participated = o); const i = await Dn(this, vi, "m", ds).call(this, t, "items/", "GET", a); return "error" in i ? Promise.resolve(Dn(this, Pr, "f")) : Promise.resolve(i); } /** * Get all annotated features drawn on a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param resourceId The resource's identifier * @return A Promise resolving to either a list of annotated * features drawn on the resource or a reason why * features couldn't be retrieved. */ async drawnFeatures(t, n, r) { const o = { resource: n }; r !== void 0 && (o.items = r); const a = await Dn(this, vi, "m", ds).call(this, t, "features/", "GET", o); return "error" in a ? Promise.resolve(Dn(this, Pr, "f")) : Promise.resolve(a); } /** * Get all annotations about a specific item in a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param resourceId The resource's identifier * @param itemId The item's identifier within the resource * @return A Promise resolving to either a list of * annotations about the item or a reason * why annotations couldn't be retrieved. */ async itemAnnotations(t, n, r) { const o = await Dn(this, vi, "m", ds).call(this, t, "annotations/", "GET", { resource: n, item: r }); return "error" in o ? Promise.resolve(Dn(this, Pr, "f")) : Promise.resolve(o); } /** * Get details of a specific annotation. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param annotationId The annotation's URI * @return A Promise resolving to either an annotation * with the given URI or a reason why the * annotation couldn't be retrieved. */ async annotation(t, n) { const r = await Dn(this, vi, "m", ds).call(this, t, "annotation/", "GET", { annotation: n }); return "error" in r ? Promise.resolve(Dn(this, Pr, "f")) : Promise.resolve(r); } /** * Add an annotation about a specific item in a resource. * * @param userApiKey The Api token of the logged-in Pennsieve user * @param annotation Annotation about the feature * @return A Promise resolving to either the resulting * full annotation or a reason why the * annotation couldn't be added */ async addAnnotation(t, n) { if (Dn(this, Ra, "f") && Dn(this, Ra, "f").canUpdate) { const r = Object.assign({ creator: Dn(this, Ra, "f"), created: (/* @__PURE__ */ new Date()).toISOString() }, n), o = await Dn(this, vi, "m", ds).call(this, t, "annotation/", "POST", { data: r }); if (!("error" in o)) return Promise.resolve(o); La(this, Pr, o, "f"); } else La(this, Pr, { error: "user cannot add annotation" }, "f"); return Promise.resolve(Dn(this, Pr, "f")); } } Zd = /* @__PURE__ */ new WeakMap(), Ra = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakSet(), ds = async function(t, n, r = "GET", o = {}) { let a = !0; const i = new AbortController(); setTimeout(() => { a && (console.log("Annotation server timeout..."), i.abort()); }, DIe); const s = { method: r, signal: i.signal }; let l = `${Dn(this, Zd, "f")}/${n}`; const u = hb.get("annotation-key") || ""; if (r === "GET") { const d = []; for (const [f, h] of Object.entries(o)) d.push(`${f}=${encodeURIComponent(JSON.stringify(h))}`); d.push(`key=${encodeURIComponent(t)}`), d.push(`session=${encodeURIComponent(u)}`), l += "?" + d.join("&"), s.headers = { Accept: "application/json; charset=utf-8", "Cache-Control": "no-store" }; } else if (r === "POST") { const d = Object.assign({ key: t, session: u }, o); s.body = JSON.stringify(d), s.headers = { Accept: "application/json; charset=utf-8", "Content-Type": "application/json; charset=utf-8", "Cache-Control": "no-store" }; } const c = await fetch(l, s); return a = !1, c.ok ? Promise.resolve(await c.json()) : (La(this, Pr, { error: `${c.status} ${c.statusText}` }, "f"), Promise.resolve(Dn(this, Pr, "f"))); }; const NIe = E0("main", { state: () => ({ userProfile: { token: "" } }), getters: { userToken(e) { return e.userProfile.token; } }, actions: { setUserToken(e) { this.userProfile.token = e; } } }), BIe = { name: "SplitFlow", components: { Container: w_, Header: x_, Main: k_, DialogToolbarContent: BF, SplitDialog: MF, SideBar: LIe }, setup() { const e = NIe(); tt("userApiKey", e.userToken); const t = Sp(); let n = pa(new MIe(`${t.flatmapAPI}annotator`)); return tt("$annotator", n), { annotator: n }; }, props: { state: { type: Object, default: void 0 }, useDOIFormatter: { type: Boolean, default: !0 } }, data: function() { return { sideBarVisibility: !0, startUp: !0, search: "", activeDockedId: 1, filterTriggered: !1, availableFacets: [], connectivityInfo: null, annotationEntry: {}, annotationCallback: void 0, confirmCreateCallback: void 0, cancelCreateCallback: void 0, confirmDeleteCallback: void 0, createData: {} }; }, watch: { state: { handler: function(e) { e && (this._externalStateSet || this.setState(e), this._externalStateSet = !0); }, immediate: !0 } }, methods: { /** * Callback when an action is performed (open new dialogs). */ actionClick: function(e) { if (e) if (e.type == "Search") if (e.nervePath) this.openSearch([e.filter], e.label); else { this.openSearch([], e.term); const t = e.featuredDataset ? "portal_maps_featured_dataset_search" : "portal_maps_action_search"; hi.sendEvent({ event: "interaction_event", event_name: t, category: e.term || "filter", location: "map_location_pin" }), this.filterTriggered = !0; } else if (e.type == "URL") window.open(e.resource, "_blank"); else if (e.type == "Facet") { if (this.$refs.sideBar) { this.closeConnectivityInfo(), this.$refs.sideBar.addFilter(e); const { facet: t } = e; hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: t || "filter", location: "map_location_pin" }), this.filterTriggered = !0; } } else if (e.type == "Facets") { const t = []; if (this.settingsStore.facets.species.forEach((n) => { t.push({ facet: G3(n), term: "Species", facetPropPath: "organisms.primary.species.name" }); }), t.length == 0 && t.push({ facet: "Show All", term: "Species", facetPropPath: "organisms.primary.species.name" }), t.push( ...e.labels.map((n) => ({ facet: G3(n), term: "Anatomical structure", facetPropPath: "anatomy.organ.category.name" })) ), this.$refs.sideBar) { this.closeConnectivityInfo(), this.$refs.sideBar.openSearch(t, ""); const r = kfe(this.availableFacets, e.labels).join(", "); hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: r || "filter", location: "map_popup_button" }); } } else this.trackGalleryClick(e), this.createNewEntry(e); }, trackGalleryClick: function(e) { const t = [], { label: n, type: r, datasetId: o, discoverId: a, resource: i } = e; let s = "", l = o || a; n && t.push(n), r && t.push(r), o && t.push("(" + l + ")"), i && (r === "Plot" ? s = i.dataSource.url : s = typeof i == "string" ? i : i.share_link), hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_gallery_click", category: t.join(" "), location: "map_sidebar_gallery", dataset_id: l ? l + "" : "", // change to string format file_path: s }); }, onDisplaySearch: function(e) { let t = !1, n = this.$refs.splitdialog; n && n.getActiveContents().forEach((o) => { o.search(e.term) && (t = !0); }), this.$refs.dialogToolbar.setFailedSearch(t ? void 0 : e.term), hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_display_search", category: e.term, location: "map_toolbar" }); }, fetchSuggestions: function(e) { const t = []; this.$refs.splitdialog.getActiveContents().forEach((i) => i.searchSuggestions(e.data.term, t)); const o = []; t.forEach((i) => { o.push(i.replaceAll('"', "")); }); const a = new Set(o); t.length = 0; for (const i of a) t.push({ value: '"' + i + '"' }); e.data.cb(t); }, /** * This event is emitted when the show connectivity button in sidebar is clicked. * This will move the map to the highlighted connectivity area. * @arg featureIds */ onShowConnectivity: function(e) { const t = this.splitFlowStore.getState(), n = (t == null ? void 0 : t.activeView) || ""; Qt.emit("show-connectivity", { featureIds: e, offset: n === "singlepanel" || n === "2horpanel" }); }, onConnectivityComponentClick: function(e) { Qt.emit("connectivity-component-click", { connectivityInfo: this.connectivityInfo, data: e }); }, hoverChanged: function(e) { const t = e && e.anatomy ? e.anatomy : [], n = e && e.organs ? e.organs : []; this.settingsStore.updateHoverFeatures(t, n), Qt.emit("hoverUpdate"); }, searchChanged: function(e) { if (e && e.type == "query-update" && (this.search = e.value, this.search && !this.filterTriggered && hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_search", category: this.search, location: "map_sidebar_search" }), this.filterTriggered = !1), e && e.type == "filter-update") { if (this.settingsStore.updateFacets(e.value), !this.filterTriggered) { const { value: t } = e, r = t.filter( (o) => o.facet && o.facet.toLowerCase() !== "show all" ).map((o) => o.facet).join(", "); hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_action_filter", category: r || "filter", location: "map_sidebar_filter" }); } this.filterTriggered = !1; } }, updateMarkers: function(e) { this.settingsStore.updateMarkers(e), Qt.emit("markerUpdate"); }, updateScaffoldMarkers: function(e) { this.settingsStore.updateNumberOfDatasetsForFacets(e); }, getNewEntryId: function() { return this.entries.length ? this.entries[this.entries.length - 1].id + 1 : 1; }, /** * Activate Synchronised workflow */ activateSyncMap: function(e) { let t = {}; return Object.assign(t, e), t.mode = "normal", t.id = this.getNewEntryId(), t.state = void 0, t.type = "Scaffold", t.discoverId = e.discoverId, t.rotation = "free", e.layout == "2vertpanel" ? t.rotation = "horizontal" : e.layout == "2horpanel" && (t.rotation = "vertical"), this.entriesStore.addNewEntry(t), this.splitFlowStore.setSyncMode({ flag: !0, newId: t.id, layout: e.layout }), t.id; }, /** * Add new entry which will sequentially create a * new dialog. */ createNewEntry: function(e) { let t = {}; return t.viewUrl = void 0, t.state = void 0, Object.assign(t, e), t.mode = "normal", t.id = this.getNewEntryId(), t.discoverId = e.discoverId, this.entriesStore.addNewEntry(t), this.splitFlowStore.setIdToPrimaryPane(t.id), this.splitFlowStore.syncMode && this.splitFlowStore.setSyncMode({ flag: !1 }), this.$refs.sideBar && this.$refs.sideBar.setDrawerOpen(!1), t.id; }, openNewMap: async function(e) { const t = await mfe(e, this.settingsStore.sparcApi); this.createNewEntry(t), t.contextCard && Qt.emit("contextUpdate", t.contextCard); }, openSearch: function(e, t) { this.search = t, this._facets = e, this.$refs && this.$refs.sideBar && (this.closeConnectivityInfo(), this.$refs.sideBar.openSearch(e, t)), this.startUp = !1; }, closeConnectivityInfo: function() { this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach((t) => { t.click(); }); }, onFullscreen: function(e) { this.$emit("onFullscreen", e); }, resetApp: function() { this.setState(sw()); }, setIdToPrimaryPane: function(e) { this.splitFlowStore.setIdToPrimaryPane(e); }, setState: function(e) { this.entriesStore.setAll(e.entries), e.splitFlow ? this.splitFlowStore.setState(e.splitFlow) : this.entries.forEach((t) => this.splitFlowStore.setIdToPrimaryPane(t.id)); }, getState: function() { let e = JSON.parse(JSON.stringify(this.entriesStore.$state)), n = this.$refs.splitdialog.getContentsState(); if (e.entries.length === n.length) for (let r = 0; r < n.length; r++) { const o = e.entries[r]; o.state = n[r], o.type === "Scaffold" && "viewUrl" in o && delete o.viewUrl, o.type === "MultiFlatmap" && "uberonId" in o && delete o.uberonId; } return e.splitFlow = this.splitFlowStore.getState(), e; }, removeEntry: function(e) { let t = this.entriesStore.findIndexOfId(e); this.entriesStore.destroyEntry(t); }, resourceSelected: function(e) { this.$emit("resource-selected", e), this.splitFlowStore.globalCallback && this.$refs.splitdialog.sendSynchronisedEvent(e); }, speciesChanged: function(e) { this.$refs.sideBar && this.$refs.sideBar.close(); }, tabClicked: function({ id: e, type: t }) { this.activeDockedId = e; }, toggleSyncMode: function(e) { e && (e.flag ? e.action && this.activateSyncMap(e.action) : this.splitFlowStore.syncMode && this.splitFlowStore.setSyncMode({ flag: !1 })); }, contextUpdate: function(e) { Qt.emit("contextUpdate", e); }, datalinkClicked: function(e) { const t = e || "", n = "datasets/", o = t.substring( t.indexOf(n) + n.length, t.indexOf("?type=dataset") ); hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_gallery_click", category: t, location: "map_sidebar_gallery", dataset_id: o || "" }); }, onAnnotationSubmitted: function(e) { this.annotationCallback && this.annotationCallback(e); }, onConfirmCreate: function(e) { this.confirmCreateCallback && this.confirmCreateCallback(e); }, onCancelCreate: function() { this.cancelCreateCallback && this.cancelCreateCallback(); }, onConfirmDelete: function(e) { this.confirmDeleteCallback && this.confirmDeleteCallback(e); }, onSidebarTabClose: function(e) { e === 2 && Qt.emit("connectivity-info-close"), e === 3 && Qt.emit("annotation-close", { tabClose: !0 }); }, resetActivePathways: function() { const t = this.$el.querySelector(".maplibregl-canvas"); t && t.click(); } }, created: function() { this._facets = [], this._externalStateSet = !1; }, mounted: function() { Qt.on("RemoveEntryRequest", (e) => { this.removeEntry(e); }), Qt.on("SyncModeRequest", (e) => { this.toggleSyncMode(e); }), Qt.on("PopoverActionClick", (e) => { this.actionClick(e); }), Qt.on("annotation-open", (e) => { this.annotationEntry = e.annotationEntry, this.annotationCallback = pa(e.commitCallback), e.createData ? this.createData = pa(e.createData) : this.createData = pa({}), this.confirmCreateCallback = pa(e.confirmCreate), this.cancelCreateCallback = pa(e.cancelCreate), this.confirmDeleteCallback = pa(e.confirmDelete), this.$refs.sideBar && (this.tabClicked({ id: 3, type: "annotation" }), this.$refs.sideBar.setDrawerOpen(!0)); }), Qt.on("annotation-close", (e) => { this.tabClicked({ id: 1, type: "search" }), this.annotationEntry = {}, this.createData = {}, this.$refs.sideBar && this.$refs.sideBar.setDrawerOpen(!1); }), Qt.on("connectivity-info-open", (e) => { this.connectivityInfo = e, this.$refs.sideBar && (this.tabClicked({ id: 2, type: "connectivity" }), this.$refs.sideBar.setDrawerOpen(!0)); }), Qt.on("connectivity-info-close", (e) => { this.tabClicked({ id: 1, type: "search" }), this.connectivityInfo = null, this.resetActivePathways(); }), Qt.on("connectivity-graph-error", (e) => { this.$refs.sideBar && this.$refs.sideBar.updateConnectivityGraphError(e.data); }), Qt.on("OpenNewMap", (e) => { this.openNewMap(e); }), Qt.on("startHelp", () => { this.$refs.sideBar && this.$refs.sideBar.close(); }), this.$nextTick(() => { this.search === "" && this._facets.length === 0 ? (this.$refs.sideBar && this.$refs.sideBar.close(), setTimeout(() => { this.startUp = !1; }, 2e3)) : this.openSearch(this._facets, this.search); }); }, computed: { ...Zl(Eg, Sp, du), envVars: function() { return { API_LOCATION: this.settingsStore.sparcApi, ALGOLIA_INDEX: this.settingsStore.algoliaIndex, ALGOLIA_KEY: this.settingsStore.algoliaKey, ALGOLIA_ID: this.settingsStore.algoliaId, PENNSIEVE_API_LOCATION: this.settingsStore.pennsieveApi, NL_LINK_PREFIX: this.settingsStore.nlLinkPrefix, ROOT_URL: this.settingsStore.rootUrl, FLATMAPAPI_LOCATION: this.settingsStore.flatmapAPI2 // temporary }; }, entries: function() { return this.entriesStore.entries; } } }, zIe = { style: { width: "100%", height: "100%", position: "relative", overflow: "hidden" } }; function VIe(e, t, n, r, o, a) { const i = BF, s = x_, l = Xe("SideBar"), u = MF, c = k_, d = w_; return E(), Q(d, { style: { height: "100%", background: "white" } }, { default: R(() => [ W(s, { ref: "header", style: { "text-align": "left", "font-size": "14px", padding: "0" }, height: "32px", class: "dialog-header" }, { default: R(() => [ W(i, { numberOfEntries: a.entries.length, onOnFullscreen: a.onFullscreen, onLocalSearch: a.onDisplaySearch, onFetchSuggestions: a.fetchSuggestions, ref: "dialogToolbar" }, null, 8, ["numberOfEntries", "onOnFullscreen", "onLocalSearch", "onFetchSuggestions"]) ]), _: 1 }, 512), W(c, { class: "dialog-main" }, { default: R(() => [ B("div", zIe, [ W(l, { ref: "sideBar", envVars: a.envVars, visible: e.sideBarVisibility, class: V(["side-bar", { "start-up": e.startUp }]), activeTabId: e.activeDockedId, "open-at-start": e.startUp, annotationEntry: e.annotationEntry, createData: e.createData, connectivityInfo: e.connectivityInfo, useDOIFormatter: n.useDOIFormatter, onTabClose: a.onSidebarTabClose, onActionClick: a.actionClick, onTabClicked: a.tabClicked, onSearchChanged: t[0] || (t[0] = (f) => a.searchChanged(f)), onAnatomyInDatasets: t[1] || (t[1] = (f) => a.updateMarkers(f)), onAnnotationSubmitted: a.onAnnotationSubmitted, onConfirmCreate: a.onConfirmCreate, onCancelCreate: a.onCancelCreate, onConfirmDelete: a.onConfirmDelete, onNumberOfDatasetsForAnatomies: t[2] || (t[2] = (f) => a.updateScaffoldMarkers(f)), onHoverChanged: t[3] || (t[3] = (f) => a.hoverChanged(f)), onContextUpdate: t[4] || (t[4] = (f) => a.contextUpdate(f)), onDatalinkClicked: t[5] || (t[5] = (f) => a.datalinkClicked(f)), onShowConnectivity: a.onShowConnectivity, onConnectivityComponentClick: a.onConnectivityComponentClick }, null, 8, ["envVars", "visible", "class", "activeTabId", "open-at-start", "annotationEntry", "createData", "connectivityInfo", "useDOIFormatter", "onTabClose", "onActionClick", "onTabClicked", "onAnnotationSubmitted", "onConfirmCreate", "onCancelCreate", "onConfirmDelete", "onShowConnectivity", "onConnectivityComponentClick"]), W(u, { entries: a.entries, ref: "splitdialog", onResourceSelected: a.resourceSelected, onSpeciesChanged: a.speciesChanged }, null, 8, ["entries", "onResourceSelected", "onSpeciesChanged"]) ]) ]), _: 1 }) ]), _: 1 }); } const TL = /* @__PURE__ */ $a(BIe, [["render", VIe], ["__scopeId", "data-v-2428aa77"]]), jIe = { // Note that the setting store is included in MapContent.vue methods: { retrieveContextCardFromUrl: async function(e) { const [t, n, r, o] = this.splitInfoFromUrl(e), a = await this.getContextFileFromScicrunch(t, r); if (!a.success) return {}; const i = n + a.contextFile + o; return { s3uri: a.s3uri, contextCardUrl: i }; }, splitInfoFromUrl: function(e) { let t = e.split("s3-resource")[1], n = e.split("files/")[0] + "files/", r = e.split("files/")[1].split("?")[0], o = "?" + e.split("?")[1]; const a = t.split("/"); return a.shift(), [a[0], n, r, o]; }, getContextFileFromScicrunch: async function(e, t) { return await fetch(`${this.settingsStore.sparcApi}/dataset_info/using_multiple_discoverIds/?discoverIds=${e}`).then((r) => r.json()).then((r) => { if (r.numberOfHits === 1) { const o = r.results[0]["abi-contextual-information"]; if (o && o.length === 1) return { success: !0, contextFile: o[0], s3uri: r.results[0].s3uri }; if (o && o.length > 1) { let a = this.findContextInforForFilePath(r.results[0]["abi-context-file"], t); if (a) return { success: !0, contextFile: a, s3uri: r.results[0].s3uri }; } } return { success: !1 }; }).catch((r) => (console.error("Error:", r), { success: !1 })); }, findContextInforForFilePath: function(e, t) { var r; let n = e.find((o) => o.datacite.isDerivedFrom.path.includes(t)); return (r = n == null ? void 0 : n.dataset) == null ? void 0 : r.path; } } }, HIe = { name: "MapContent", components: { MapSvgSpriteColor: OF, Loading: T_, SplitFlow: TL }, mixins: [jIe], props: { /** * A link (URL) to share. */ shareLink: { type: String, default: void 0 }, /** * State containing state of the scaffold. */ state: { type: Object, default: void 0 }, /** * The options include APIs and Keys. */ options: { type: Object, default: () => ({}), required: !0 }, /** * New option to start the map in AC, FC or WholeBody. */ startingMap: { type: String, default: "AC" }, /** * To use help-mode-dialog when user clicks "Help". * This option is available on Flatmap, MultiFlatmap, and Scaffold. * When this is set to `true`, "Help" tooltips will be shown one by one. */ useHelpModeDialog: { type: Boolean, default: !1 }, /** * The option to show connectivity info in sidebar. * Default is `true`. Set `false` to show as popup on map. */ connectivityInfoSidebar: { type: Boolean, default: !0 }, /** * The option to show annotation in sidebar. * Default is `true`. Set `false` to show as popup on map. */ annotationSidebar: { type: Boolean, default: !0 }, /** * The option to use DOI.org as citation formatter in sidebar. * If set to `false`, citation.js will be used. * Default is `true`. */ useDOIFormatter: { type: Boolean, default: !0 } }, data: function() { return { isReady: !1, initialState: void 0 }; }, methods: { /** * @public * Function to check whether it is in fullscreen mode or not. * */ isFullscreen: function() { return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement; }, /** * @public * Function to toggle fullscreen. * @arg `fullscreenReq` */ onFullscreen: function(e) { e !== void 0 ? (e && !this.isFullscreen() && this.goFullscreen(), !e && this.isFullscreen() && this.leaveFullscreen()) : this.isFullscreen() ? this.leaveFullscreen() : this.goFullscreen(); }, /** * @public * Function to leave fullscreen mode. */ leaveFullscreen: function() { if (this.isFullscreen()) { document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(); let e = this.$refs.MapApp; this.replacePopupsOnFullscreen(e, document.body); } }, /** * @public * Function to go to fullscreen mode. */ goFullscreen: function() { let e = this.$refs.MapApp; e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : parent.msRequestFullscreen && e.msRequestFullscreen(), this.replacePopupsOnFullscreen(document.body, e); }, replacePopupsOnFullscreen: function(e, t) { e.querySelectorAll('[id^="el-popper-container"]').forEach((r) => { t.append(r); }); }, setState: function(e) { return this.$refs.flow.setState(e); }, getState: function() { return this.$refs.flow.getState(); }, /** * @public * Provide a way to set the current view, this is currently limited * to setting view for flatmapm, multiflatmap or scaffold. * In the case of the multiflatmap, it will not create a new entry and * instead change the current entry by setting the state. * @arg `state` */ setCurrentEntry: async function(e) { if (e && e.type) { if (e.type === "Scaffold" && e.url) { let t = { type: e.type, label: e.label, region: e.region, resource: e.url, state: e.state, viewUrl: e.viewUrl }; const n = await this.retrieveContextCardFromUrl(e.url); t = { ...t, ...n }, this.$refs.flow.createNewEntry(t); } else if (e.type === "MultiFlatmap") { const t = wfe(e); if (t) { const n = this.getState(); if (n && n.entries) for (let r = 0; r < n.entries.length; r++) { const o = n.entries[r]; if (o.type === "MultiFlatmap") { o.resource = t, o.state = { species: t }, (e.organ || e.uuid) && (o.state.state = { searchTerm: e.organ, uuid: e.uuid }, e.uuid && (o.state.state.entry = e.taxo)), this.$refs.flow.setState(n), this.$refs.flow.setIdToPrimaryPane(o.id); break; } } } } else if (e.type === "Flatmap") { const t = { type: e.type, resource: e.resource, state: e.state, label: e.label }; this.$refs.flow.createNewEntry(t); } } }, /** * @public * Open the sidebar with the specified facets and query. * @arg `facets`, * @arg `query` */ openSearch: function(e, t) { return this.$refs.flow.openSearch(e, t); }, /** * @public * Function to run when the component is mounted. */ flowMounted: function() { this._flowMounted = !0, this.$emit("isReady"), hi.sendEvent({ event: "interaction_event", event_name: "portal_maps_page_view", category: this.startingMap }); } }, computed: { ...Zl(Sp, du), stateToSet() { return this.state ? this.state : this.initialState; } }, watch: { shareLink: { handler: function(e) { this.settingsStore.updateShareLink(e); }, immediate: !0 } }, beforeMount: function() { var e, t; this.options && (this.options.sparcApi && this.settingsStore.updateSparcAPI(this.options.sparcApi), this.options.algoliaIndex && this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex), this.options.algoliaKey && this.settingsStore.updateAlgoliaKey(this.options.algoliaKey), this.options.algoliaId && this.settingsStore.updateAlgoliaId(this.options.algoliaId), this.options.pennsieveApi && this.settingsStore.updatePennsieveApi(this.options.pennsieveApi), this.options.flatmapAPI && this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI), this.options.flatmapAPI2 && this.settingsStore.updateFlatmapAPI2(this.options.flatmapAPI2), this.options.nlLinkPrefix && this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix), this.options.rootUrl && this.settingsStore.updateRootUrl(this.options.rootUrl)), (e = this.splitFlowStore) == null || e.reset(), (t = this.splitFlowStore) == null || t.getAvailableTerms(this.settingsStore.sparcApi); }, mounted: async function() { Qt.on("updateShareLinkRequested", () => { this.$emit("updateShareLinkRequested"); }), Qt.on("trackEvent", (e) => { this.$emit("trackEvent", e); }), this.state || (this.initialState = await yfe(this.startingMap, this.options.sparcApi)), Qt.on("mapLoaded", (e) => { this.$emit("mapLoaded", e); }), this.isReady = !0, this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog), this.settingsStore.updateConnectivityInfoSidebar(this.connectivityInfoSidebar), this.settingsStore.updateAnnotationSidebar(this.annotationSidebar); } }, UIe = { ref: "MapApp", class: "mapcontent", "element-loading-text": "Loading...", "element-loading-background": "rgba(0, 0, 0, 0.3)" }; function qIe(e, t, n, r, o, a) { const i = Xe("map-svg-sprite-color"), s = TL, l = nc; return Ne((E(), L("div", UIe, [ W(i), e.isReady ? (E(), Q(s, { key: 0, onOnFullscreen: a.onFullscreen, state: a.stateToSet, useDOIFormatter: n.useDOIFormatter, ref: "flow", onVnodeMounted: a.flowMounted }, null, 8, ["onOnFullscreen", "state", "useDOIFormatter", "onVnodeMounted"])) : Z("", !0) ])), [ [l, !e.isReady] ]); } const iAe = /* @__PURE__ */ $a(HIe, [["render", qIe], ["__scopeId", "data-v-8acc72e0"]]); export { Qt as E, iAe as M, hi as T, $a as _, bfe as a, tAe as b, QIe as c, ote as d, du as e, oAe as f, FF as g, OF as h, aAe as i, nAe as m, eAe as p, rAe as t, Sp as u, iw as w };