var yG = Object.defineProperty; var bG = (e, t, n) => t in e ? yG(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var Z_ = (e, t, n) => bG(e, typeof t != "symbol" ? t + "" : t, n); import { getCurrentScope as xg, onScopeDispose as lh, unref as b, getCurrentInstance as tt, onMounted as nt, nextTick as We, watch as be, ref as U, defineComponent as G, openBlock as $, createElementBlock as B, createElementVNode as K, warn as kg, computed as O, inject as $e, isRef as Kn, shallowRef as un, onBeforeUnmount as Ct, onBeforeMount as Cg, provide as rt, mergeProps as Dt, renderSlot as he, toRef as Pt, onUnmounted as d2, useAttrs as uh, useSlots as _r, createCommentVNode as te, Fragment as Ue, normalizeClass as H, createBlock as ae, withCtx as q, resolveDynamicComponent as dt, withModifiers as et, createVNode as Z, toDisplayString as _e, normalizeStyle as Qe, Transition as lr, withDirectives as qe, vShow as ct, reactive as en, onActivated as p2, onUpdated as qd, cloneVNode as Sg, Text as Ls, Comment as Eg, Teleport as _g, readonly as ch, onDeactivated as Tg, renderList as yt, createTextVNode as ze, withKeys as gn, createSlots as QP, toRaw as xo, toRefs as gr, watchEffect as Wd, resolveComponent as lt, resolveDirective as f2, toHandlerKey as h2, vModelText as $g, h as nn, createApp as Og, vModelCheckbox as ti, toHandlers as JP, pushScopeId as ma, popScopeId as ya, defineAsyncComponent as dh, Suspense as wG, vModelRadio as eL, onBeforeUpdate as xG, markRaw as Oi, createStaticVNode as kG } from "vue"; import { defineStore as v2, mapStores as Kd } from "pinia"; const Js = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (a) => { const o = e == null ? void 0 : e(a); if (n === !1 || !o) return t == null ? void 0 : t(a); }; var Q_; const Br = typeof window < "u", CG = (e) => typeof e == "string", tL = () => { }, kC = Br && ((Q_ = window == null ? void 0 : window.navigator) == null ? void 0 : Q_.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function nL(e) { return typeof e == "function" ? e() : b(e); } function SG(e) { return e; } function g2(e) { return xg() ? (lh(e), !0) : !1; } function EG(e, t = !0) { tt() ? nt(e) : t ? e() : We(e); } function dl(e) { var t; const n = nL(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const m2 = Br ? window : void 0; function Ni(...e) { let t, n, r, a; if (CG(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = m2) : [t, n, r, a] = e, !t) return tL; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [dl(t), nL(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return g2(u), u; } let J_ = !1; function rL(e, t, n = {}) { const { window: r = m2, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; kC && !J_ && (J_ = !0, Array.from(r.document.body.children).forEach((f) => f.addEventListener("click", tL))); let s = !0; const l = (f) => a.some((h) => { if (typeof h == "string") return Array.from(r.document.querySelectorAll(h)).some((p) => p === f.target || f.composedPath().includes(p)); { const p = dl(h); return p && (f.target === p || f.composedPath().includes(p)); } }), c = [ Ni(r, "click", (f) => { const h = dl(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: o }), Ni(r, "pointerdown", (f) => { const h = dl(e); h && (s = !f.composedPath().includes(h) && !l(f)); }, { passive: !0 }), i && Ni(r, "blur", (f) => { var h; const p = dl(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 aL(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), EG(r, t), n; } const e8 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t8 = "__vueuse_ssr_handlers__"; e8[t8] = e8[t8] || {}; var n8 = Object.getOwnPropertySymbols, _G = Object.prototype.hasOwnProperty, TG = Object.prototype.propertyIsEnumerable, $G = (e, t) => { var n = {}; for (var r in e) _G.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && n8) for (var r of n8(e)) t.indexOf(r) < 0 && TG.call(e, r) && (n[r] = e[r]); return n; }; function al(e, t, n = {}) { const r = n, { window: a = m2 } = r, o = $G(r, ["window"]); let i; const s = aL(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => dl(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return g2(c), { isSupported: s, stop: c }; } var r8 = Object.getOwnPropertySymbols, OG = Object.prototype.hasOwnProperty, FG = Object.prototype.propertyIsEnumerable, AG = (e, t) => { var n = {}; for (var r in e) OG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && r8) for (var r of r8(e)) t.indexOf(r) < 0 && FG.call(e, r) && (n[r] = e[r]); return n; }; function IG(e, t, n = {}) { const r = n, { window: a = m2 } = r, o = AG(r, ["window"]); let i; const s = aL(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => dl(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return g2(c), { isSupported: s, stop: c }; } var a8; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(a8 || (a8 = {})); var PG = Object.defineProperty, o8 = Object.getOwnPropertySymbols, LG = Object.prototype.hasOwnProperty, NG = Object.prototype.propertyIsEnumerable, i8 = (e, t, n) => t in e ? PG(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, MG = (e, t) => { for (var n in t || (t = {})) LG.call(t, n) && i8(e, n, t[n]); if (o8) for (var n of o8(t)) NG.call(t, n) && i8(e, n, t[n]); return e; }; const DG = { 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] }; MG({ linear: SG }, DG); const BG = () => Br && /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 gf = () => { }, RG = Object.prototype.hasOwnProperty, s8 = (e, t) => RG.call(e, t), Go = Array.isArray, ta = (e) => typeof e == "function", Oa = (e) => typeof e == "string", na = (e) => e !== null && typeof e == "object", l8 = (e) => (na(e) || ta(e)) && ta(e.then) && ta(e.catch), zG = Object.prototype.toString, VG = (e) => zG.call(e), Lx = (e) => VG(e).slice(8, -1), oL = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, jG = /-(\w)/g, HG = oL((e) => e.replace(jG, (t, n) => n ? n.toUpperCase() : "")), UG = /\B([A-Z])/g, qG = oL( (e) => e.replace(UG, "-$1").toLowerCase() ); var iL = typeof global == "object" && global && global.Object === Object && global, WG = typeof self == "object" && self && self.Object === Object && self, Ns = iL || WG || Function("return this")(), xs = Ns.Symbol, sL = Object.prototype, KG = sL.hasOwnProperty, GG = sL.toString, Qh = xs ? xs.toStringTag : void 0; function XG(e) { var t = KG.call(e, Qh), n = e[Qh]; try { e[Qh] = void 0; var r = !0; } catch { } var a = GG.call(e); return r && (t ? e[Qh] = n : delete e[Qh]), a; } var YG = Object.prototype, ZG = YG.toString; function QG(e) { return ZG.call(e); } var JG = "[object Null]", eX = "[object Undefined]", u8 = xs ? xs.toStringTag : void 0; function ph(e) { return e == null ? e === void 0 ? eX : JG : u8 && u8 in Object(e) ? XG(e) : QG(e); } function mf(e) { return e != null && typeof e == "object"; } var tX = "[object Symbol]"; function y2(e) { return typeof e == "symbol" || mf(e) && ph(e) == tX; } function nX(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var ji = Array.isArray, rX = 1 / 0, c8 = xs ? xs.prototype : void 0, d8 = c8 ? c8.toString : void 0; function lL(e) { if (typeof e == "string") return e; if (ji(e)) return nX(e, lL) + ""; if (y2(e)) return d8 ? d8.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -rX ? "-0" : t; } var aX = /\s/; function oX(e) { for (var t = e.length; t-- && aX.test(e.charAt(t)); ) ; return t; } var iX = /^\s+/; function sX(e) { return e && e.slice(0, oX(e) + 1).replace(iX, ""); } function Ru(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var p8 = NaN, lX = /^[-+]0x[0-9a-f]+$/i, uX = /^0b[01]+$/i, cX = /^0o[0-7]+$/i, dX = parseInt; function f8(e) { if (typeof e == "number") return e; if (y2(e)) return p8; if (Ru(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Ru(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = sX(e); var n = uX.test(e); return n || cX.test(e) ? dX(e.slice(2), n ? 2 : 8) : lX.test(e) ? p8 : +e; } function uL(e) { return e; } var pX = "[object AsyncFunction]", fX = "[object Function]", hX = "[object GeneratorFunction]", vX = "[object Proxy]"; function cL(e) { if (!Ru(e)) return !1; var t = ph(e); return t == fX || t == hX || t == pX || t == vX; } var Nx = Ns["__core-js_shared__"], h8 = function() { var e = /[^.]+$/.exec(Nx && Nx.keys && Nx.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function gX(e) { return !!h8 && h8 in e; } var mX = Function.prototype, yX = mX.toString; function Gd(e) { if (e != null) { try { return yX.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var bX = /[\\^$.*+?()[\]{}|]/g, wX = /^\[object .+?Constructor\]$/, xX = Function.prototype, kX = Object.prototype, CX = xX.toString, SX = kX.hasOwnProperty, EX = RegExp( "^" + CX.call(SX).replace(bX, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function _X(e) { if (!Ru(e) || gX(e)) return !1; var t = cL(e) ? EX : wX; return t.test(Gd(e)); } function TX(e, t) { return e == null ? void 0 : e[t]; } function Xd(e, t) { var n = TX(e, t); return _X(n) ? n : void 0; } var CC = Xd(Ns, "WeakMap"); function $X(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 OX = 800, FX = 16, AX = Date.now; function IX(e) { var t = 0, n = 0; return function() { var r = AX(), a = FX - (r - n); if (n = r, a > 0) { if (++t >= OX) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function PX(e) { return function() { return e; }; } var Ky = function() { try { var e = Xd(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), LX = Ky ? function(e, t) { return Ky(e, "toString", { configurable: !0, enumerable: !1, value: PX(t), writable: !0 }); } : uL, NX = IX(LX); function MX(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var DX = 9007199254740991, BX = /^(?:0|[1-9]\d*)$/; function D3(e, t) { var n = typeof e; return t = t ?? DX, !!t && (n == "number" || n != "symbol" && BX.test(e)) && e > -1 && e % 1 == 0 && e < t; } function RX(e, t, n) { t == "__proto__" && Ky ? Ky(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function B3(e, t) { return e === t || e !== e && t !== t; } var zX = Object.prototype, VX = zX.hasOwnProperty; function jX(e, t, n) { var r = e[t]; (!(VX.call(e, t) && B3(r, n)) || n === void 0 && !(t in e)) && RX(e, t, n); } var v8 = Math.max; function HX(e, t, n) { return t = v8(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = v8(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), $X(e, this, s); }; } var UX = 9007199254740991; function R3(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= UX; } function qX(e) { return e != null && R3(e.length) && !cL(e); } var WX = Object.prototype; function KX(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || WX; return e === n; } function GX(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var XX = "[object Arguments]"; function g8(e) { return mf(e) && ph(e) == XX; } var dL = Object.prototype, YX = dL.hasOwnProperty, ZX = dL.propertyIsEnumerable, z3 = g8(/* @__PURE__ */ function() { return arguments; }()) ? g8 : function(e) { return mf(e) && YX.call(e, "callee") && !ZX.call(e, "callee"); }; function QX() { return !1; } var pL = typeof exports == "object" && exports && !exports.nodeType && exports, m8 = pL && typeof module == "object" && module && !module.nodeType && module, JX = m8 && m8.exports === pL, y8 = JX ? Ns.Buffer : void 0, eY = y8 ? y8.isBuffer : void 0, SC = eY || QX, tY = "[object Arguments]", nY = "[object Array]", rY = "[object Boolean]", aY = "[object Date]", oY = "[object Error]", iY = "[object Function]", sY = "[object Map]", lY = "[object Number]", uY = "[object Object]", cY = "[object RegExp]", dY = "[object Set]", pY = "[object String]", fY = "[object WeakMap]", hY = "[object ArrayBuffer]", vY = "[object DataView]", gY = "[object Float32Array]", mY = "[object Float64Array]", yY = "[object Int8Array]", bY = "[object Int16Array]", wY = "[object Int32Array]", xY = "[object Uint8Array]", kY = "[object Uint8ClampedArray]", CY = "[object Uint16Array]", SY = "[object Uint32Array]", Zn = {}; Zn[gY] = Zn[mY] = Zn[yY] = Zn[bY] = Zn[wY] = Zn[xY] = Zn[kY] = Zn[CY] = Zn[SY] = !0; Zn[tY] = Zn[nY] = Zn[hY] = Zn[rY] = Zn[vY] = Zn[aY] = Zn[oY] = Zn[iY] = Zn[sY] = Zn[lY] = Zn[uY] = Zn[cY] = Zn[dY] = Zn[pY] = Zn[fY] = !1; function EY(e) { return mf(e) && R3(e.length) && !!Zn[ph(e)]; } function _Y(e) { return function(t) { return e(t); }; } var fL = typeof exports == "object" && exports && !exports.nodeType && exports, Uv = fL && typeof module == "object" && module && !module.nodeType && module, TY = Uv && Uv.exports === fL, Mx = TY && iL.process, b8 = function() { try { var e = Uv && Uv.require && Uv.require("util").types; return e || Mx && Mx.binding && Mx.binding("util"); } catch { } }(), w8 = b8 && b8.isTypedArray, hL = w8 ? _Y(w8) : EY, $Y = Object.prototype, OY = $Y.hasOwnProperty; function FY(e, t) { var n = ji(e), r = !n && z3(e), a = !n && !r && SC(e), o = !n && !r && !a && hL(e), i = n || r || a || o, s = i ? GX(e.length, String) : [], l = s.length; for (var u in e) OY.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. D3(u, l))) && s.push(u); return s; } function AY(e, t) { return function(n) { return e(t(n)); }; } var IY = AY(Object.keys, Object), PY = Object.prototype, LY = PY.hasOwnProperty; function NY(e) { if (!KX(e)) return IY(e); var t = []; for (var n in Object(e)) LY.call(e, n) && n != "constructor" && t.push(n); return t; } function vL(e) { return qX(e) ? FY(e) : NY(e); } var MY = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, DY = /^\w*$/; function V3(e, t) { if (ji(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || y2(e) ? !0 : DY.test(e) || !MY.test(e) || t != null && e in Object(t); } var h0 = Xd(Object, "create"); function BY() { this.__data__ = h0 ? h0(null) : {}, this.size = 0; } function RY(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var zY = "__lodash_hash_undefined__", VY = Object.prototype, jY = VY.hasOwnProperty; function HY(e) { var t = this.__data__; if (h0) { var n = t[e]; return n === zY ? void 0 : n; } return jY.call(t, e) ? t[e] : void 0; } var UY = Object.prototype, qY = UY.hasOwnProperty; function WY(e) { var t = this.__data__; return h0 ? t[e] !== void 0 : qY.call(t, e); } var KY = "__lodash_hash_undefined__"; function GY(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = h0 && t === void 0 ? KY : t, this; } function hd(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]); } } hd.prototype.clear = BY; hd.prototype.delete = RY; hd.prototype.get = HY; hd.prototype.has = WY; hd.prototype.set = GY; function XY() { this.__data__ = [], this.size = 0; } function b2(e, t) { for (var n = e.length; n--; ) if (B3(e[n][0], t)) return n; return -1; } var YY = Array.prototype, ZY = YY.splice; function QY(e) { var t = this.__data__, n = b2(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : ZY.call(t, n, 1), --this.size, !0; } function JY(e) { var t = this.__data__, n = b2(t, e); return n < 0 ? void 0 : t[n][1]; } function eZ(e) { return b2(this.__data__, e) > -1; } function tZ(e, t) { var n = this.__data__, r = b2(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Ol(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]); } } Ol.prototype.clear = XY; Ol.prototype.delete = QY; Ol.prototype.get = JY; Ol.prototype.has = eZ; Ol.prototype.set = tZ; var v0 = Xd(Ns, "Map"); function nZ() { this.size = 0, this.__data__ = { hash: new hd(), map: new (v0 || Ol)(), string: new hd() }; } function rZ(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function w2(e, t) { var n = e.__data__; return rZ(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function aZ(e) { var t = w2(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function oZ(e) { return w2(this, e).get(e); } function iZ(e) { return w2(this, e).has(e); } function sZ(e, t) { var n = w2(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Fl(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]); } } Fl.prototype.clear = nZ; Fl.prototype.delete = aZ; Fl.prototype.get = oZ; Fl.prototype.has = iZ; Fl.prototype.set = sZ; var lZ = "Expected a function"; function j3(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(lZ); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (j3.Cache || Fl)(), n; } j3.Cache = Fl; var uZ = 500; function cZ(e) { var t = j3(e, function(r) { return n.size === uZ && n.clear(), r; }), n = t.cache; return t; } var dZ = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, pZ = /\\(\\)?/g, fZ = cZ(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(dZ, function(n, r, a, o) { t.push(a ? o.replace(pZ, "$1") : r || n); }), t; }); function hZ(e) { return e == null ? "" : lL(e); } function x2(e, t) { return ji(e) ? e : V3(e, t) ? [e] : fZ(hZ(e)); } var vZ = 1 / 0; function Fg(e) { if (typeof e == "string" || y2(e)) return e; var t = e + ""; return t == "0" && 1 / e == -vZ ? "-0" : t; } function H3(e, t) { t = x2(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Fg(t[n++])]; return n && n == r ? e : void 0; } function sl(e, t, n) { var r = e == null ? void 0 : H3(e, t); return r === void 0 ? n : r; } function gL(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var x8 = xs ? xs.isConcatSpreadable : void 0; function gZ(e) { return ji(e) || z3(e) || !!(x8 && e && e[x8]); } function mZ(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = gZ), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? gL(a, s) : a[a.length] = s; } return a; } function yZ(e) { var t = e == null ? 0 : e.length; return t ? mZ(e) : []; } function bZ(e) { return NX(HX(e, void 0, yZ), e + ""); } function mu() { if (!arguments.length) return []; var e = arguments[0]; return ji(e) ? e : [e]; } function wZ() { this.__data__ = new Ol(), this.size = 0; } function xZ(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function kZ(e) { return this.__data__.get(e); } function CZ(e) { return this.__data__.has(e); } var SZ = 200; function EZ(e, t) { var n = this.__data__; if (n instanceof Ol) { var r = n.__data__; if (!v0 || r.length < SZ - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Fl(r); } return n.set(e, t), this.size = n.size, this; } function vl(e) { var t = this.__data__ = new Ol(e); this.size = t.size; } vl.prototype.clear = wZ; vl.prototype.delete = xZ; vl.prototype.get = kZ; vl.prototype.has = CZ; vl.prototype.set = EZ; function _Z(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function TZ() { return []; } var $Z = Object.prototype, OZ = $Z.propertyIsEnumerable, k8 = Object.getOwnPropertySymbols, FZ = k8 ? function(e) { return e == null ? [] : (e = Object(e), _Z(k8(e), function(t) { return OZ.call(e, t); })); } : TZ; function AZ(e, t, n) { var r = t(e); return ji(e) ? r : gL(r, n(e)); } function C8(e) { return AZ(e, vL, FZ); } var EC = Xd(Ns, "DataView"), _C = Xd(Ns, "Promise"), TC = Xd(Ns, "Set"), S8 = "[object Map]", IZ = "[object Object]", E8 = "[object Promise]", _8 = "[object Set]", T8 = "[object WeakMap]", $8 = "[object DataView]", PZ = Gd(EC), LZ = Gd(v0), NZ = Gd(_C), MZ = Gd(TC), DZ = Gd(CC), fu = ph; (EC && fu(new EC(new ArrayBuffer(1))) != $8 || v0 && fu(new v0()) != S8 || _C && fu(_C.resolve()) != E8 || TC && fu(new TC()) != _8 || CC && fu(new CC()) != T8) && (fu = function(e) { var t = ph(e), n = t == IZ ? e.constructor : void 0, r = n ? Gd(n) : ""; if (r) switch (r) { case PZ: return $8; case LZ: return S8; case NZ: return E8; case MZ: return _8; case DZ: return T8; } return t; }); var O8 = Ns.Uint8Array, BZ = "__lodash_hash_undefined__"; function RZ(e) { return this.__data__.set(e, BZ), this; } function zZ(e) { return this.__data__.has(e); } function Gy(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Fl(); ++t < n; ) this.add(e[t]); } Gy.prototype.add = Gy.prototype.push = RZ; Gy.prototype.has = zZ; function VZ(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 jZ(e, t) { return e.has(t); } var HZ = 1, UZ = 2; function mL(e, t, n, r, a, o) { var i = n & HZ, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & UZ ? new Gy() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!VZ(t, function(g, y) { if (!jZ(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function qZ(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function WZ(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var KZ = 1, GZ = 2, XZ = "[object Boolean]", YZ = "[object Date]", ZZ = "[object Error]", QZ = "[object Map]", JZ = "[object Number]", eQ = "[object RegExp]", tQ = "[object Set]", nQ = "[object String]", rQ = "[object Symbol]", aQ = "[object ArrayBuffer]", oQ = "[object DataView]", F8 = xs ? xs.prototype : void 0, Dx = F8 ? F8.valueOf : void 0; function iQ(e, t, n, r, a, o, i) { switch (n) { case oQ: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case aQ: return !(e.byteLength != t.byteLength || !o(new O8(e), new O8(t))); case XZ: case YZ: case JZ: return B3(+e, +t); case ZZ: return e.name == t.name && e.message == t.message; case eQ: case nQ: return e == t + ""; case QZ: var s = qZ; case tQ: var l = r & KZ; if (s || (s = WZ), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= GZ, i.set(e, t); var c = mL(s(e), s(t), r, a, o, i); return i.delete(e), c; case rQ: if (Dx) return Dx.call(e) == Dx.call(t); } return !1; } var sQ = 1, lQ = Object.prototype, uQ = lQ.hasOwnProperty; function cQ(e, t, n, r, a, o) { var i = n & sQ, s = C8(e), l = s.length, u = C8(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : uQ.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "constructor"); } if (v && !m) { var w = e.constructor, k = t.constructor; w != k && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof k == "function" && k instanceof k) && (v = !1); } return o.delete(e), o.delete(t), v; } var dQ = 1, A8 = "[object Arguments]", I8 = "[object Array]", Mm = "[object Object]", pQ = Object.prototype, P8 = pQ.hasOwnProperty; function fQ(e, t, n, r, a, o) { var i = ji(e), s = ji(t), l = i ? I8 : fu(e), u = s ? I8 : fu(t); l = l == A8 ? Mm : l, u = u == A8 ? Mm : u; var c = l == Mm, d = u == Mm, f = l == u; if (f && SC(e)) { if (!SC(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new vl()), i || hL(e) ? mL(e, t, n, r, a, o) : iQ(e, t, l, n, r, a, o); if (!(n & dQ)) { var h = c && P8.call(e, "__wrapped__"), p = d && P8.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new vl()), a(v, m, n, r, o); } } return f ? (o || (o = new vl()), cQ(e, t, n, r, a, o)) : !1; } function k2(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !mf(e) && !mf(t) ? e !== e && t !== t : fQ(e, t, n, r, k2, a); } var hQ = 1, vQ = 2; function gQ(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 vl(), d; if (!(d === void 0 ? k2(u, l, hQ | vQ, r, c) : d)) return !1; } } return !0; } function yL(e) { return e === e && !Ru(e); } function mQ(e) { for (var t = vL(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, yL(a)]; } return t; } function bL(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function yQ(e) { var t = mQ(e); return t.length == 1 && t[0][2] ? bL(t[0][0], t[0][1]) : function(n) { return n === e || gQ(n, e, t); }; } function bQ(e, t) { return e != null && t in Object(e); } function wQ(e, t, n) { t = x2(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = Fg(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && R3(a) && D3(i, a) && (ji(e) || z3(e))); } function wL(e, t) { return e != null && wQ(e, t, bQ); } var xQ = 1, kQ = 2; function CQ(e, t) { return V3(e) && yL(t) ? bL(Fg(e), t) : function(n) { var r = sl(n, e); return r === void 0 && r === t ? wL(n, e) : k2(t, r, xQ | kQ); }; } function SQ(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function EQ(e) { return function(t) { return H3(t, e); }; } function _Q(e) { return V3(e) ? SQ(Fg(e)) : EQ(e); } function TQ(e) { return typeof e == "function" ? e : e == null ? uL : typeof e == "object" ? ji(e) ? CQ(e[0], e[1]) : yQ(e) : _Q(e); } var Bx = function() { return Ns.Date.now(); }, $Q = "Expected a function", OQ = Math.max, FQ = Math.min; function xL(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError($Q); t = f8(t) || 0, Ru(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? OQ(f8(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? FQ(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Bx(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Bx()); } function k() { var C = Bx(), S = m(C); if (r = arguments, a = this, l = C, 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 k.cancel = x, k.flush = w, k; } function AQ(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return MX(e, TQ(t), a); } function Xy(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function $C(e, t) { return k2(e, t); } function C2(e) { return e == null; } function IQ(e) { return e === void 0; } function PQ(e, t, n, r) { if (!Ru(e)) return e; t = x2(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = Fg(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = Ru(c) ? c : D3(t[a + 1]) ? [] : {}); } jX(s, l, u), s = s[l]; } return e; } function LQ(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = H3(e, i); n(s, i) && PQ(o, x2(i, e), s); } return o; } function NQ(e, t) { return LQ(e, t, function(n, r) { return wL(e, r); }); } var MQ = bZ(function(e, t) { return e == null ? {} : NQ(e, t); }); const Fv = (e) => e === void 0, Qc = (e) => typeof e == "boolean", Kr = (e) => typeof e == "number", Jc = (e) => typeof Element > "u" ? !1 : e instanceof Element, DQ = (e) => Oa(e) ? !Number.isNaN(Number(e)) : !1, BQ = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), L8 = (e) => Object.keys(e); class kL extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function U3(e, t) { throw new kL(`[${e}] ${t}`); } function sa(e, t) { if (process.env.NODE_ENV !== "production") { const n = Oa(e) ? new kL(`[${e}] ${t}`) : e; console.warn(n); } } const RQ = "utils/dom/style", CL = (e = "") => e.split(" ").filter((t) => !!t.trim()), N8 = (e, t) => { !e || !t.trim() || e.classList.add(...CL(t)); }, Yy = (e, t) => { !e || !t.trim() || e.classList.remove(...CL(t)); }, Jh = (e, t) => { var n; if (!Br || !e || !t) return ""; let r = HG(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function g0(e, t = "px") { if (!e) return ""; if (Kr(e) || DQ(e)) return `${e}${t}`; if (Oa(e)) return e; sa(RQ, "binding value must be a string or number"); } function zQ(e, t) { if (!Br) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var VQ = /* @__PURE__ */ G({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), q3 = VQ, jQ = /* @__PURE__ */ G({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), SL = jQ, HQ = /* @__PURE__ */ G({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), UQ = HQ, qQ = /* @__PURE__ */ G({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), W3 = qQ, WQ = /* @__PURE__ */ G({ name: "Close", __name: "close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), M8 = WQ, KQ = /* @__PURE__ */ G({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), D8 = KQ, GQ = /* @__PURE__ */ G({ name: "Hide", __name: "hide", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), XQ = GQ, YQ = /* @__PURE__ */ G({ name: "InfoFilled", __name: "info-filled", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), ZQ = YQ, QQ = /* @__PURE__ */ G({ name: "Loading", __name: "loading", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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 = QQ, JQ = /* @__PURE__ */ G({ name: "View", __name: "view", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), eJ = JQ; const EL = "__epPropKey", Lt = (e) => e, tJ = (e) => na(e) && !!e[EL], E2 = (e, t) => { if (!na(e) || tJ(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, l = { type: o, required: !!r, validator: n || i ? (u) => { let c = !1, d = []; if (n && (d = Array.from(n), s8(e, "default") && d.push(a), 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(", "); kg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`); } return c; } : void 0, [EL]: !0 }; return s8(e, "default") && (l.default = a), l; }, Bn = (e) => Xy(Object.entries(e).map(([t, n]) => [ t, E2(n, t) ])), Di = Lt([ String, Object, Function ]), _L = { validating: S2, success: UQ, error: W3 }, Xa = (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; }, nJ = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Yd = (e) => (e.install = gf, e), m0 = { 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" }, _a = "update:modelValue", vd = "change", yf = "input", K3 = ["", "default", "small", "large"], rJ = (e) => ["", ...K3].includes(e), aJ = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), jp = (e) => e, oJ = ["class", "style"], iJ = /^on[A-Z]/, TL = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = O(() => ((n == null ? void 0 : n.value) || []).concat(oJ)), a = tt(); return a ? O(() => { var o; return Xy(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && iJ.test(i)))); }) : (sa("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), O(() => ({}))); }, sJ = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && sa(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var lJ = { 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 uJ = (e) => (t, n) => cJ(t, n, b(e)), cJ = (e, t, n) => sl(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), dJ = (e) => { const t = O(() => b(e).name), n = Kn(e) ? e : U(e); return { lang: t, locale: n, t: uJ(e) }; }, $L = Symbol("localeContextKey"), OL = (e) => { const t = e || $e($L, U()); return dJ(O(() => t.value || lJ)); }, ty = "el", pJ = "is-", Cc = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, FL = Symbol("namespaceContextKey"), G3 = (e) => { const t = e || (tt() ? $e(FL, U(ty)) : U(ty)); return O(() => b(t) || ty); }, In = (e, t) => { const n = G3(t); return { namespace: n, b: (v = "") => Cc(n.value, e, v, "", ""), e: (v) => v ? Cc(n.value, e, "", v, "") : "", m: (v) => v ? Cc(n.value, e, "", "", v) : "", be: (v, m) => v && m ? Cc(n.value, e, v, m, "") : "", em: (v, m) => v && m ? Cc(n.value, e, "", v, m) : "", bm: (v, m) => v && m ? Cc(n.value, e, v, "", m) : "", bem: (v, m, g) => v && m && g ? Cc(n.value, e, v, m, g) : "", is: (v, ...m) => { const g = m.length >= 1 ? m[0] : !0; return v && g ? `${pJ}${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}` }; }, fJ = E2({ type: Lt(Boolean), default: null }), hJ = E2({ type: Lt(Function) }), vJ = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: fJ, [n]: hJ }; return { useModelToggle: ({ indicator: i, toggleReason: s, shouldHideWhenRouteChanges: l, shouldProceed: u, onShow: c, onHide: d }) => { const f = tt(), { emit: h } = f, p = f.props, v = O(() => ta(p[n])), m = O(() => p[e] === null), g = (S) => { i.value !== !0 && (i.value = !0, s && (s.value = S), ta(c) && c(S)); }, y = (S) => { i.value !== !1 && (i.value = !1, s && (s.value = S), ta(d) && d(S)); }, x = (S) => { if (p.disabled === !0 || ta(u) && !u()) return; const _ = v.value && Br; _ && h(t, !0), (m.value || !_) && g(S); }, w = (S) => { if (p.disabled === !0 || !Br) return; const _ = v.value && Br; _ && h(t, !1), (m.value || !_) && y(S); }, k = (S) => { Qc(S) && (p.disabled && S ? v.value && h(t, !1) : i.value !== S && (S ? g() : y())); }, C = () => { i.value ? w() : x(); }; return be(() => p[e], k), l && f.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...f.proxy.$route }), () => { l.value && i.value && w(); }), nt(() => { k(p[e]); }), { hide: w, show: x, toggle: C, hasUpdateHandler: v }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, AL = (e) => { const t = tt(); return O(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var io = "top", ni = "bottom", ri = "right", so = "left", _2 = "auto", Ag = [io, ni, ri, so], bf = "start", y0 = "end", gJ = "clippingParents", IL = "viewport", ev = "popper", mJ = "reference", B8 = /* @__PURE__ */ Ag.reduce(function(e, t) { return e.concat([t + "-" + bf, t + "-" + y0]); }, []), T2 = /* @__PURE__ */ [].concat(Ag, [_2]).reduce(function(e, t) { return e.concat([t, t + "-" + bf, t + "-" + y0]); }, []), yJ = "beforeRead", bJ = "read", wJ = "afterRead", xJ = "beforeMain", kJ = "main", CJ = "afterMain", SJ = "beforeWrite", EJ = "write", _J = "afterWrite", OC = [yJ, bJ, wJ, xJ, kJ, CJ, SJ, EJ, _J]; function ks(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Mo(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function gd(e) { var t = Mo(e).Element; return e instanceof t || e instanceof Element; } function Fo(e) { var t = Mo(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function X3(e) { if (typeof ShadowRoot > "u") return !1; var t = Mo(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function TJ(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Fo(o) || !ks(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function $J(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 a = t.elements[r], o = 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; }, {}); !Fo(a) || !ks(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } const OJ = { name: "applyStyles", enabled: !0, phase: "write", fn: TJ, effect: $J, requires: ["computeStyles"] }; function Bi(e) { return e.split("-")[0]; } var ed = Math.max, Zy = Math.min, wf = Math.round; function FC() { var e = navigator.userAgentData; return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) { return t.brand + "/" + t.version; }).join(" ") : navigator.userAgent; } function PL() { return !/^((?!chrome|android).)*safari/i.test(FC()); } function xf(e, t, n) { t === void 0 && (t = !1), n === void 0 && (n = !1); var r = e.getBoundingClientRect(), a = 1, o = 1; t && Fo(e) && (a = e.offsetWidth > 0 && wf(r.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && wf(r.height) / e.offsetHeight || 1); var i = gd(e) ? Mo(e) : window, s = i.visualViewport, l = !PL() && n, u = (r.left + (l && s ? s.offsetLeft : 0)) / a, c = (r.top + (l && s ? s.offsetTop : 0)) / o, d = r.width / a, f = r.height / o; return { width: d, height: f, top: c, right: u + d, bottom: c + f, left: u, x: u, y: c }; } function Y3(e) { var t = xf(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 LL(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && X3(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Hi(e) { return Mo(e).getComputedStyle(e); } function FJ(e) { return ["table", "td", "th"].indexOf(ks(e)) >= 0; } function ic(e) { return ((gd(e) ? e.ownerDocument : ( // $FlowFixMe[prop-missing] e.document )) || window.document).documentElement; } function $2(e) { return ks(e) === "html" ? e : ( // this is a quicker (but less type safe) way to save quite some bytes from the bundle // $FlowFixMe[incompatible-return] // $FlowFixMe[prop-missing] e.assignedSlot || // step into the shadow DOM of the parent of a slotted node e.parentNode || // DOM Element detected (X3(e) ? e.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node ic(e) ); } function R8(e) { return !Fo(e) || // https://github.com/popperjs/popper-core/issues/837 Hi(e).position === "fixed" ? null : e.offsetParent; } function AJ(e) { var t = /firefox/i.test(FC()), n = /Trident/i.test(FC()); if (n && Fo(e)) { var r = Hi(e); if (r.position === "fixed") return null; } var a = $2(e); for (X3(a) && (a = a.host); Fo(a) && ["html", "body"].indexOf(ks(a)) < 0; ) { var o = Hi(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function Ig(e) { for (var t = Mo(e), n = R8(e); n && FJ(n) && Hi(n).position === "static"; ) n = R8(n); return n && (ks(n) === "html" || ks(n) === "body" && Hi(n).position === "static") ? t : n || AJ(e) || t; } function Z3(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function qv(e, t, n) { return ed(e, Zy(t, n)); } function IJ(e, t, n) { var r = qv(e, t, n); return r > n ? n : r; } function NL() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function ML(e) { return Object.assign({}, NL(), e); } function DL(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var PJ = function(t, n) { return t = typeof t == "function" ? t(Object.assign({}, n.rects, { placement: n.placement })) : t, ML(typeof t != "number" ? t : DL(t, Ag)); }; function LJ(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = Bi(n.placement), l = Z3(s), u = [so, ri].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = PJ(a.padding, n), f = Y3(o), h = l === "y" ? io : so, p = l === "y" ? ni : ri, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Ig(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = qv(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function NJ(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; if (a != null && !(typeof a == "string" && (a = t.elements.popper.querySelector(a), !a))) { if (process.env.NODE_ENV !== "production" && (Fo(a) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !LL(t.elements.popper, a)) { process.env.NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); return; } t.elements.arrow = a; } } const MJ = { name: "arrow", enabled: !0, phase: "main", fn: LJ, effect: NJ, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function kf(e) { return e.split("-")[1]; } var DJ = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function BJ(e, t) { var n = e.x, r = e.y, a = t.devicePixelRatio || 1; return { x: wf(n * a) / a || 0, y: wf(r * a) / a || 0 }; } function z8(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = 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"), y = i.hasOwnProperty("y"), x = so, w = io, k = window; if (u) { var C = Ig(n), S = "clientHeight", _ = "clientWidth"; if (C === Mo(n) && (C = ic(n), Hi(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === io || (a === so || a === ri) && o === y0) { w = ni; var T = d && C === k && k.visualViewport ? k.visualViewport.height : ( // $FlowFixMe[prop-missing] C[S] ); v -= T - r.height, v *= l ? 1 : -1; } if (a === so || (a === io || a === ni) && o === y0) { x = ri; var F = d && C === k && k.visualViewport ? k.visualViewport.width : ( // $FlowFixMe[prop-missing] C[_] ); h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && DJ), I = c === !0 ? BJ({ x: h, y: v }, Mo(n)) : { x: h, y: v }; if (h = I.x, v = I.y, l) { var N; return Object.assign({}, A, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, A, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function RJ(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s; if (process.env.NODE_ENV !== "production") { var u = Hi(t.elements.popper).transitionProperty || ""; i && ["transform", "top", "right", "bottom", "left"].some(function(d) { return u.indexOf(d) >= 0; }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', ` `, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", ` `, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); } var c = { placement: Bi(t.placement), variation: kf(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, z8(Object.assign({}, c, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: i, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, z8(Object.assign({}, c, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement }); } const zJ = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: RJ, data: {} }; var Dm = { passive: !0 }; function VJ(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Mo(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, Dm); }), s && l.addEventListener("resize", n.update, Dm), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, Dm); }), s && l.removeEventListener("resize", n.update, Dm); }; } const jJ = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: VJ, data: {} }; var HJ = { left: "right", right: "left", bottom: "top", top: "bottom" }; function ny(e) { return e.replace(/left|right|bottom|top/g, function(t) { return HJ[t]; }); } var UJ = { start: "end", end: "start" }; function V8(e) { return e.replace(/start|end/g, function(t) { return UJ[t]; }); } function Q3(e) { var t = Mo(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function J3(e) { return xf(ic(e)).left + Q3(e).scrollLeft; } function qJ(e, t) { var n = Mo(e), r = ic(e), a = n.visualViewport, o = r.clientWidth, i = r.clientHeight, s = 0, l = 0; if (a) { o = a.width, i = a.height; var u = PL(); (u || !u && t === "fixed") && (s = a.offsetLeft, l = a.offsetTop); } return { width: o, height: i, x: s + J3(e), y: l }; } function WJ(e) { var t, n = ic(e), r = Q3(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = ed(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = ed(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + J3(e), l = -r.scrollTop; return Hi(a || n).direction === "rtl" && (s += ed(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function e4(e) { var t = Hi(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function BL(e) { return ["html", "body", "#document"].indexOf(ks(e)) >= 0 ? e.ownerDocument.body : Fo(e) && e4(e) ? e : BL($2(e)); } function Wv(e, t) { var n; t === void 0 && (t = []); var r = BL(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Mo(r), i = a ? [o].concat(o.visualViewport || [], e4(r) ? r : []) : r, s = t.concat(i); return a ? s : ( // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here s.concat(Wv($2(i))) ); } function AC(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function KJ(e, t) { var n = xf(e, !1, t === "fixed"); return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n; } function j8(e, t, n) { return t === IL ? AC(qJ(e, n)) : gd(t) ? KJ(t, n) : AC(WJ(ic(e))); } function GJ(e) { var t = Wv($2(e)), n = ["absolute", "fixed"].indexOf(Hi(e).position) >= 0, r = n && Fo(e) ? Ig(e) : e; return gd(r) ? t.filter(function(a) { return gd(a) && LL(a, r) && ks(a) !== "body"; }) : []; } function XJ(e, t, n, r) { var a = t === "clippingParents" ? GJ(e) : [].concat(t), o = [].concat(a, [n]), i = o[0], s = o.reduce(function(l, u) { var c = j8(e, u, r); return l.top = ed(c.top, l.top), l.right = Zy(c.right, l.right), l.bottom = Zy(c.bottom, l.bottom), l.left = ed(c.left, l.left), l; }, j8(e, i, r)); return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s; } function RL(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? Bi(r) : null, o = r ? kf(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case io: l = { x: i, y: t.y - n.height }; break; case ni: l = { x: i, y: t.y + t.height }; break; case ri: l = { x: t.x + t.width, y: s }; break; case so: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? Z3(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case bf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case y0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function b0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.strategy, i = o === void 0 ? e.strategy : o, s = n.boundary, l = s === void 0 ? gJ : s, u = n.rootBoundary, c = u === void 0 ? IL : u, d = n.elementContext, f = d === void 0 ? ev : d, h = n.altBoundary, p = h === void 0 ? !1 : h, v = n.padding, m = v === void 0 ? 0 : v, g = ML(typeof m != "number" ? m : DL(m, Ag)), y = f === ev ? mJ : ev, x = e.rects.popper, w = e.elements[p ? y : f], k = XJ(gd(w) ? w : w.contextElement || ic(e.elements.popper), l, c, i), C = xf(e.elements.reference), S = RL({ reference: C, element: x, strategy: "absolute", placement: a }), _ = AC(Object.assign({}, x, S)), T = f === ev ? _ : C, F = { top: k.top - T.top + g.top, bottom: T.bottom - k.bottom + g.bottom, left: k.left - T.left + g.left, right: T.right - k.right + g.right }, A = e.modifiersData.offset; if (f === ev && A) { var I = A[a]; Object.keys(F).forEach(function(N) { var L = [ri, ni].indexOf(N) >= 0 ? 1 : -1, z = [io, ni].indexOf(N) >= 0 ? "y" : "x"; F[N] += I[z] * L; }); } return F; } function YJ(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? T2 : l, c = kf(r), d = c ? s ? B8 : B8.filter(function(p) { return kf(p) === c; }) : Ag, f = d.filter(function(p) { return u.indexOf(p) >= 0; }); f.length === 0 && (f = d, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "))); var h = f.reduce(function(p, v) { return p[v] = b0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[Bi(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function ZJ(e) { if (Bi(e) === _2) return []; var t = ny(e); return [V8(e), t, V8(t)]; } function QJ(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = Bi(m), y = g === m, x = l || (y || !p ? [ny(m)] : ZJ(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(Bi(ge) === _2 ? YJ(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], F = 0; F < w.length; F++) { var A = w[F], I = Bi(A), N = kf(A) === bf, L = [io, ni].indexOf(I) >= 0, z = L ? "width" : "height", P = b0(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), D = L ? N ? ri : so : N ? ni : io; k[z] > C[z] && (D = ny(D)); var M = ny(D), V = []; if (o && V.push(P[I] <= 0), s && V.push(P[D] <= 0, P[M] <= 0), V.every(function(ve) { return ve; })) { T = A, _ = !1; break; } S.set(A, V); } if (_) for (var Q = p ? 3 : 1, X = function(ge) { var se = w.find(function(ne) { var W = S.get(ne); if (W) return W.slice(0, ge).every(function(Y) { return Y; }); }); if (se) return T = se, "break"; }, ee = Q; ee > 0; ee--) { var ue = X(ee); if (ue === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } const JJ = { name: "flip", enabled: !0, phase: "main", fn: QJ, requiresIfExists: ["offset"], data: { _skip: !1 } }; function H8(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 U8(e) { return [io, ri, ni, so].some(function(t) { return e[t] >= 0; }); } function eee(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = b0(t, { elementContext: "reference" }), s = b0(t, { altBoundary: !0 }), l = H8(i, r), u = H8(s, a, o), c = U8(l), d = U8(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 }); } const tee = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: eee }; function nee(e, t, n) { var r = Bi(e), a = [so, io].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [so, ri].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function ree(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = T2.reduce(function(c, d) { return c[d] = nee(d, t.rects, o), 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; } const aee = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: ree }; function oee(e) { var t = e.state, n = e.name; t.modifiersData[n] = RL({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } const iee = { name: "popperOffsets", enabled: !0, phase: "read", fn: oee, data: {} }; function see(e) { return e === "x" ? "y" : "x"; } function lee(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = b0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = Bi(t.placement), y = kf(t.placement), x = !y, w = Z3(g), k = see(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, I = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? io : so, z = w === "y" ? ni : ri, P = w === "y" ? "height" : "width", D = C[w], M = D + m[L], V = D - m[z], Q = h ? -_[P] / 2 : 0, X = y === bf ? S[P] : _[P], ee = y === bf ? -_[P] : -S[P], ue = t.elements.arrow, ve = h && ue ? Y3(ue) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : NL(), se = ge[L], ne = ge[z], W = qv(0, S[P], ve[P]), Y = x ? S[P] / 2 - Q - W - se - F.mainAxis : X - W - se - F.mainAxis, re = x ? -S[P] / 2 + Q + W + ne + F.mainAxis : ee + W + ne + F.mainAxis, we = t.elements.arrow && Ig(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = A == null ? void 0 : A[w]) != null ? N : 0, xe = D + Y - Ne - Oe, Fe = D + re - Ne, Se = qv(h ? Zy(M, xe) : M, D, h ? ed(V, Fe) : V); C[w] = Se, I[w] = Se - D; } if (s) { var Pe, Me = w === "x" ? io : so, He = w === "x" ? ni : ri, De = C[k], Xe = k === "y" ? "height" : "width", Ge = De + m[Me], Ze = De - m[He], E = [io, so].indexOf(g) !== -1, j = (Pe = A == null ? void 0 : A[k]) != null ? Pe : 0, le = E ? Ge : De - S[Xe] - _[Xe] - j + F.altAxis, ce = E ? De + S[Xe] + _[Xe] - j - F.altAxis : Ze, oe = h && E ? IJ(le, De, ce) : qv(h ? le : Ge, De, h ? ce : Ze); C[k] = oe, I[k] = oe - De; } t.modifiersData[r] = I; } } const uee = { name: "preventOverflow", enabled: !0, phase: "main", fn: lee, requiresIfExists: ["offset"] }; function cee(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function dee(e) { return e === Mo(e) || !Fo(e) ? Q3(e) : cee(e); } function pee(e) { var t = e.getBoundingClientRect(), n = wf(t.width) / e.offsetWidth || 1, r = wf(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function fee(e, t, n) { n === void 0 && (n = !1); var r = Fo(t), a = Fo(t) && pee(t), o = ic(t), i = xf(e, a, n), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((ks(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 e4(o)) && (s = dee(t)), Fo(t) ? (l = xf(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = J3(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function hee(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function vee(e) { var t = hee(e); return OC.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function gee(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function ql(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r]; return [].concat(n).reduce(function(a, o) { return a.replace(/%s/, o); }, e); } var Sc = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', mee = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', q8 = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; function yee(e) { e.forEach(function(t) { [].concat(Object.keys(t), q8).filter(function(n, r, a) { return a.indexOf(n) === r; }).forEach(function(n) { switch (n) { case "name": typeof t.name != "string" && console.error(ql(Sc, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"')); break; case "enabled": typeof t.enabled != "boolean" && console.error(ql(Sc, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"')); break; case "phase": OC.indexOf(t.phase) < 0 && console.error(ql(Sc, t.name, '"phase"', "either " + OC.join(", "), '"' + String(t.phase) + '"')); break; case "fn": typeof t.fn != "function" && console.error(ql(Sc, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"')); break; case "effect": t.effect != null && typeof t.effect != "function" && console.error(ql(Sc, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"')); break; case "requires": t.requires != null && !Array.isArray(t.requires) && console.error(ql(Sc, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"')); break; case "requiresIfExists": Array.isArray(t.requiresIfExists) || console.error(ql(Sc, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"')); break; case "options": case "data": break; default: console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' + q8.map(function(r) { return '"' + r + '"'; }).join(", ") + '; but "' + n + '" was provided.'); } t.requires && t.requires.forEach(function(r) { e.find(function(a) { return a.name === r; }) == null && console.error(ql(mee, String(t.name), r, r)); }); }); }); } function bee(e, t) { var n = /* @__PURE__ */ new Set(); return e.filter(function(r) { var a = t(r); if (!n.has(a)) return n.add(a), !0; }); } function wee(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var W8 = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", xee = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", K8 = { placement: "bottom", modifiers: [], strategy: "absolute" }; function G8() { 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 kee(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? K8 : a; return function(s, l, u) { u === void 0 && (u = o); var c = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, K8, o), modifiersData: {}, elements: { reference: s, popper: l }, attributes: {}, styles: {} }, d = [], f = !1, h = { state: c, setOptions: function(g) { var y = typeof g == "function" ? g(c.options) : g; v(), c.options = Object.assign({}, o, c.options, y), c.scrollParents = { reference: gd(s) ? Wv(s) : s.contextElement ? Wv(s.contextElement) : [], popper: Wv(l) }; var x = vee(wee([].concat(r, c.options.modifiers))); if (c.orderedModifiers = x.filter(function(A) { return A.enabled; }), process.env.NODE_ENV !== "production") { var w = bee([].concat(x, c.options.modifiers), function(A) { var I = A.name; return I; }); if (yee(w), Bi(c.options.placement) === _2) { var k = c.orderedModifiers.find(function(A) { var I = A.name; return I === "flip"; }); k || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); } var C = Hi(l), S = C.marginTop, _ = C.marginRight, T = C.marginBottom, F = C.marginLeft; [S, _, T, F].some(function(A) { return parseFloat(A); }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); } return p(), h.update(); }, // Sync update – it will always be executed, even if not necessary. This // is useful for low frequency updates where sync behavior simplifies the // logic. // For high frequency updates (e.g. `resize` and `scroll` events), always // prefer the async Popper#update method forceUpdate: function() { if (!f) { var g = c.elements, y = g.reference, x = g.popper; if (!G8(y, x)) { process.env.NODE_ENV !== "production" && console.error(W8); return; } c.rects = { reference: fee(y, Ig(x), c.options.strategy === "fixed"), popper: Y3(x) }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(A) { return c.modifiersData[A.name] = Object.assign({}, A.data); }); for (var w = 0, k = 0; k < c.orderedModifiers.length; k++) { if (process.env.NODE_ENV !== "production" && (w += 1, w > 100)) { console.error(xee); break; } if (c.reset === !0) { c.reset = !1, k = -1; continue; } var C = c.orderedModifiers[k], S = C.fn, _ = C.options, T = _ === void 0 ? {} : _, F = C.name; typeof S == "function" && (c = S({ state: c, options: T, name: F, instance: h }) || c); } } }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) update: gee(function() { return new Promise(function(m) { h.forceUpdate(), m(c); }); }), destroy: function() { v(), f = !0; } }; if (!G8(s, l)) return process.env.NODE_ENV !== "production" && console.error(W8), h; h.setOptions(u).then(function(m) { !f && u.onFirstUpdate && u.onFirstUpdate(m); }); function p() { c.orderedModifiers.forEach(function(m) { var g = m.name, y = m.options, x = y === void 0 ? {} : y, w = m.effect; if (typeof w == "function") { var k = w({ state: c, name: g, instance: h, options: x }), C = function() { }; d.push(k || C); } }); } function v() { d.forEach(function(m) { return m(); }), d = []; } return h; }; } var Cee = [jJ, iee, zJ, OJ, aee, JJ, uee, MJ, tee], See = /* @__PURE__ */ kee({ defaultModifiers: Cee }); const Eee = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = _ee(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = O(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = un(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = See(l, u, b(a))); }), Ct(() => { s(); }), { state: O(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: O(() => b(i).styles), attributes: O(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: O(() => b(o)) }; }; function _ee(e) { const t = Object.keys(e.elements), n = Xy(t.map((a) => [a, e.styles[a] || {}])), r = Xy(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function X8() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return g2(() => n()), { registerTimeout: t, cancelTimeout: n }; } const IC = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, Tee = Symbol("elIdInjection"), zL = () => tt() ? $e(Tee, IC) : IC, Pg = (e) => { const t = zL(); !Br && t === IC && sa("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 = G3(); return O(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Hp = []; const Y8 = (e) => { const t = e; t.key === m0.esc && Hp.forEach((n) => n(t)); }, $ee = (e) => { nt(() => { Hp.length === 0 && document.addEventListener("keydown", Y8), Br && Hp.push(e); }), Ct(() => { Hp = Hp.filter((t) => t !== e), Hp.length === 0 && Br && document.removeEventListener("keydown", Y8); }); }; let Z8; const VL = () => { const e = G3(), t = zL(), n = O(() => `${e.value}-popper-container-${t.prefix}`), r = O(() => `#${n.value}`); return { id: n, selector: r }; }, Oee = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, Fee = () => { const { id: e, selector: t } = VL(); return Cg(() => { Br && (process.env.NODE_ENV === "test" || !Z8 || !document.body.querySelector(t.value)) && (Z8 = Oee(e.value)); }), { id: e, selector: t }; }, Aee = Bn({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), Iee = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = X8(), { registerTimeout: i, cancelTimeout: s } = X8(); return { onOpen: (c) => { o(() => { r(c); const d = b(n); Kr(d) && d > 0 && i(() => { a(c); }, d); }, b(e)); }, onClose: (c) => { s(), o(() => { a(c); }, b(t)); } }; }, jL = Symbol("elForwardRef"), Pee = (e) => { rt(jL, { setForwardRef: (n) => { e.value = n; } }); }, Lee = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), Q8 = { current: 0 }, J8 = U(0), HL = 2e3, e6 = Symbol("elZIndexContextKey"), UL = Symbol("zIndexContextKey"), qL = (e) => { const t = tt() ? $e(e6, Q8) : Q8, n = e || (tt() ? $e(UL, void 0) : void 0), r = O(() => { const i = b(n); return Kr(i) ? i : HL; }), a = O(() => r.value + J8.value), o = () => (t.current++, J8.value = t.current, a.value); return !Br && !$e(e6) && sa("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: a, nextZIndex: o }; }; function Nee(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const t4 = E2({ type: String, values: K3, required: !1 }), WL = Symbol("size"), Mee = () => { const e = $e(WL, {}); return O(() => b(e.size) || ""); }; function KL(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = un(), l = U(!1), u = (f) => { ta(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; ta(r) && r(f) || f.relatedTarget && ((h = s.value) != null && h.contains(f.relatedTarget)) || (l.value = !1, i("blur", f), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Ni(s, "focus", u, !0), Ni(s, "blur", c, !0), Ni(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = Jc(e.value) ? e.value : document.querySelector("input,textarea"); f && (Ni(f, "focus", u, !0), Ni(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function GL({ afterComposition: e, emit: t }) { const n = U(!1), r = (s) => { t == null || t("compositionstart", s), n.value = !0; }, a = (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 = !aJ(c); }, o = (s) => { t == null || t("compositionend", s), n.value && (n.value = !1, We(() => e(s))); }; return { isComposing: n, handleComposition: (s) => { s.type === "compositionend" ? o(s) : a(s); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const XL = Symbol("emptyValuesContextKey"), Dee = "use-empty-values", Bee = ["", void 0, null], Ree = void 0, zee = Bn({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => ta(e) ? !e() : !e } }), Vee = (e, t) => { const n = tt() ? $e(XL, U({})) : U({}), r = O(() => e.emptyValues || n.value.emptyValues || Bee), a = O(() => ta(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : ta(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : Ree), o = (i) => r.value.includes(i); return r.value.includes(a.value) || sa(Dee, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, jee = Bn({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), Zd = (e) => MQ(jee, e), YL = Symbol(), Qy = U(); function n4(e, t = void 0) { const n = tt() ? $e(YL, Qy) : Qy; return e ? O(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function Hee(e, t) { const n = n4(), r = In(e, O(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || ty; })), a = OL(O(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = qL(O(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || HL; })), i = O(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return Uee(O(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const Uee = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? n4() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { sa("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = O(() => { const l = b(e); return o != null && o.value ? qee(o.value, l) : l; }); return i(YL, s), i($L, O(() => s.value.locale)), i(FL, O(() => s.value.namespace)), i(UL, O(() => s.value.zIndex)), i(WL, { size: O(() => s.value.size || "") }), i(XL, O(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Qy.value) && (Qy.value = s.value), s; }, qee = (e, t) => { const n = [.../* @__PURE__ */ new Set([...L8(e), ...L8(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var yn = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const Wee = Bn({ size: { type: Lt([Number, String]) }, color: { type: String } }), Kee = G({ name: "ElIcon", inheritAttrs: !1 }), Gee = /* @__PURE__ */ G({ ...Kee, props: Wee, setup(e) { const t = e, n = In("icon"), r = O(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: Fv(a) ? void 0 : g0(a), "--color": o }; }); return (a, o) => ($(), B("i", Dt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var Xee = /* @__PURE__ */ yn(Gee, [["__file", "icon.vue"]]); const Lr = Xa(Xee), r4 = Symbol("formContextKey"), Jy = Symbol("formItemContextKey"), Lg = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : AL("size"), a = t.global ? n : Mee(), o = t.form ? { size: void 0 } : $e(r4, void 0), i = t.formItem ? { size: void 0 } : $e(Jy, void 0); return O(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, Ng = (e) => { const t = AL("disabled"), n = $e(r4, void 0); return O(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, O2 = () => { const e = $e(r4, void 0), t = $e(Jy, void 0); return { form: e, formItem: t }; }, a4 = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = O(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([Pt(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : Pg().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), d2(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let mi; const Yee = ` height:0 !important; visibility:hidden !important; ${BG() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, Zee = [ "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 Qee(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: Zee.map((i) => `${i}:${t.getPropertyValue(i)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function t6(e, t = 1, n) { var r; mi || (mi = document.createElement("textarea"), document.body.appendChild(mi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = Qee(e); mi.setAttribute("style", `${s};${Yee}`), mi.value = e.value || e.placeholder || ""; let l = mi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), mi.value = ""; const c = mi.scrollHeight - a; if (Kr(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (Kr(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = mi.parentNode) == null || r.removeChild(mi), mi = void 0, u; } const Jee = Bn({ id: { type: String, default: void 0 }, size: t4, disabled: Boolean, modelValue: { type: Lt([ 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: Lt([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: Di }, prefixIcon: { type: Di }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: Lt([Object, Array, String]), default: () => jp({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...Zd(["ariaLabel"]) }), ete = { [_a]: (e) => Oa(e), input: (e) => Oa(e), change: (e) => Oa(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 }, tte = G({ name: "ElInput", inheritAttrs: !1 }), nte = /* @__PURE__ */ G({ ...tte, props: Jee, emits: ete, setup(e, { expose: t, emit: n }) { const r = e, a = uh(), o = _r(), i = O(() => { const j = {}; return r.containerRole === "combobox" && (j["aria-haspopup"] = a["aria-haspopup"], j["aria-owns"] = a["aria-owns"], j["aria-expanded"] = a["aria-expanded"]), j; }), s = O(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", ue.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: V.value && Q.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = O(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = TL({ excludeKeys: O(() => Object.keys(i.value)) }), { form: c, formItem: d } = O2(), { inputId: f } = a4(r, { formItemContext: d }), h = Lg(), p = Ng(), v = In("input"), m = In("textarea"), g = un(), y = un(), x = U(!1), w = U(!1), k = U(), C = un(r.inputStyle), S = O(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: F, handleBlur: A } = KL(S, { beforeFocus() { return p.value; }, afterBlur() { var j; r.validateEvent && ((j = d == null ? void 0 : d.validate) == null || j.call(d, "blur").catch((le) => sa(le))); } }), I = O(() => { var j; return (j = c == null ? void 0 : c.statusIcon) != null ? j : !1; }), N = O(() => (d == null ? void 0 : d.validateState) || ""), L = O(() => N.value && _L[N.value]), z = O(() => w.value ? eJ : XQ), P = O(() => [ a.style ]), D = O(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = O(() => C2(r.modelValue) ? "" : String(r.modelValue)), V = O(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Q = O(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), X = O(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ee = O(() => M.value.length), ue = O(() => !!X.value && ee.value > Number(r.maxlength)), ve = O(() => !!o.suffix || !!r.suffixIcon || V.value || r.showPassword || X.value || !!N.value && I.value), [ge, se] = Nee(g); al(y, (j) => { if (Y(), !X.value || r.resize !== "both") return; const le = j[0], { width: ce } = le.contentRect; k.value = { right: `calc(100% - ${ce + 15 + 6}px)` }; }); const ne = () => { const { type: j, autosize: le } = r; if (!(!Br || j !== "textarea" || !y.value)) if (le) { const ce = na(le) ? le.minRows : void 0, oe = na(le) ? le.maxRows : void 0, ke = t6(y.value, ce, oe); C.value = { overflowY: "hidden", ...ke }, We(() => { y.value.offsetHeight, C.value = ke; }); } else C.value = { minHeight: t6(y.value).minHeight }; }, Y = ((j) => { let le = !1; return () => { var ce; if (le || !r.autosize) return; ((ce = y.value) == null ? void 0 : ce.offsetParent) === null || (j(), le = !0); }; })(ne), re = () => { const j = S.value, le = r.formatter ? r.formatter(M.value) : M.value; !j || j.value === le || (j.value = le); }, we = async (j) => { ge(); let { value: le } = j.target; if (r.formatter && (le = r.parser ? r.parser(le) : le), !Ne.value) { if (le === M.value) { re(); return; } n(_a, le), n("input", le), await We(), re(), se(); } }, Oe = (j) => { n("change", j.target.value); }, { isComposing: Ne, handleCompositionStart: xe, handleCompositionUpdate: Fe, handleCompositionEnd: Se } = GL({ emit: n, afterComposition: we }), Pe = () => { w.value = !w.value, Me(); }, Me = async () => { var j; await We(), (j = S.value) == null || j.focus(); }, He = () => { var j; return (j = S.value) == null ? void 0 : j.blur(); }, De = (j) => { x.value = !1, n("mouseleave", j); }, Xe = (j) => { x.value = !0, n("mouseenter", j); }, Ge = (j) => { n("keydown", j); }, Ze = () => { var j; (j = S.value) == null || j.select(); }, E = () => { n(_a, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var j; We(() => ne()), r.validateEvent && ((j = d == null ? void 0 : d.validate) == null || j.call(d, "change").catch((le) => sa(le))); }), be(M, () => re()), be(() => r.type, async () => { await We(), re(), ne(); }), nt(() => { !r.formatter && r.parser && sa("ElInput", "If you set the parser, you also need to set the formatter."), re(), We(ne); }), t({ input: g, textarea: y, ref: S, textareaStyle: D, autosize: Pt(r, "autosize"), isComposing: Ne, focus: Me, blur: He, select: Ze, clear: E, resizeTextarea: ne }), (j, le) => ($(), B("div", Dt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: j.$slots.append, [b(v).bm("group", "prepend")]: j.$slots.prepend } ], style: b(P), role: j.containerRole, onMouseenter: Xe, onMouseleave: De }), [ te(" input "), j.type !== "textarea" ? ($(), B(Ue, { key: 0 }, [ te(" prepend slot "), j.$slots.prepend ? ($(), B("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(j.$slots, "prepend") ], 2)) : te("v-if", !0), K("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ te(" prefix slot "), j.$slots.prefix || j.prefixIcon ? ($(), B("span", { key: 0, class: H(b(v).e("prefix")) }, [ K("span", { class: H(b(v).e("prefix-inner")) }, [ he(j.$slots, "prefix"), j.prefixIcon ? ($(), ae(b(Lr), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(j.prefixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0), K("input", Dt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: j.minlength, maxlength: j.maxlength, type: j.showPassword ? w.value ? "text" : "password" : j.type, disabled: b(p), readonly: j.readonly, autocomplete: j.autocomplete, tabindex: j.tabindex, "aria-label": j.ariaLabel, placeholder: j.placeholder, style: j.inputStyle, form: j.form, autofocus: j.autofocus, onCompositionstart: b(xe), onCompositionupdate: b(Fe), onCompositionend: b(Se), onInput: we, onChange: Oe, onKeydown: Ge }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), te(" suffix slot "), b(ve) ? ($(), B("span", { key: 1, class: H(b(v).e("suffix")) }, [ K("span", { class: H(b(v).e("suffix-inner")) }, [ !b(V) || !b(Q) || !b(X) ? ($(), B(Ue, { key: 0 }, [ he(j.$slots, "suffix"), j.suffixIcon ? ($(), ae(b(Lr), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(j.suffixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 64)) : te("v-if", !0), b(V) ? ($(), ae(b(Lr), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: et(b(gf), ["prevent"]), onClick: E }, { default: q(() => [ Z(b(W3)) ]), _: 1 }, 8, ["class", "onMousedown"])) : te("v-if", !0), b(Q) ? ($(), ae(b(Lr), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Pe }, { default: q(() => [ ($(), ae(dt(b(z)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), b(X) ? ($(), B("span", { key: 3, class: H(b(v).e("count")) }, [ K("span", { class: H(b(v).e("count-inner")) }, _e(b(ee)) + " / " + _e(j.maxlength), 3) ], 2)) : te("v-if", !0), b(N) && b(L) && b(I) ? ($(), ae(b(Lr), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: q(() => [ ($(), ae(dt(b(L)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0) ], 2), te(" append slot "), j.$slots.append ? ($(), B("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(j.$slots, "append") ], 2)) : te("v-if", !0) ], 64)) : ($(), B(Ue, { key: 1 }, [ te(" textarea "), K("textarea", Dt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: j.minlength, maxlength: j.maxlength, tabindex: j.tabindex, disabled: b(p), readonly: j.readonly, autocomplete: j.autocomplete, style: b(D), "aria-label": j.ariaLabel, placeholder: j.placeholder, form: j.form, autofocus: j.autofocus, rows: j.rows, onCompositionstart: b(xe), onCompositionupdate: b(Fe), onCompositionend: b(Se), onInput: we, onFocus: b(F), onBlur: b(A), onChange: Oe, onKeydown: Ge }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(X) ? ($(), B("span", { key: 0, style: Qe(k.value), class: H(b(v).e("count")) }, _e(b(ee)) + " / " + _e(j.maxlength), 7)) : te("v-if", !0) ], 64)) ], 16, ["role"])); } }); var rte = /* @__PURE__ */ yn(nte, [["__file", "input.vue"]]); const F2 = Xa(rte), xp = 4, ate = { 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" } }, ote = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), o4 = Symbol("scrollbarContextKey"), ite = Bn({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), ste = "Thumb", lte = /* @__PURE__ */ G({ __name: "thumb", props: ite, setup(e) { const t = e, n = $e(o4), r = In("scrollbar"); n || U3(ste, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = Br ? document.onselectstart : null; const d = O(() => ate[t.vertical ? "vertical" : "horizontal"]), f = O(() => ote({ size: t.size, move: t.move, bar: d.value })), h = O(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.removeAllRanges(), m(C); const _ = C.currentTarget; _ && (i.value[d.value.axis] = _[d.value.offset] - (C[d.value.client] - _.getBoundingClientRect()[d.value.direction])); }, v = (C) => { if (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, F = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; Ct(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Ni(Pt(n, "scrollbarElement"), "mousemove", x), Ni(Pt(n, "scrollbarElement"), "mouseleave", w), (C, S) => ($(), ae(lr, { name: b(r).b("fade"), persisted: "" }, { default: q(() => [ qe(K("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ K("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Qe(b(f)), onMousedown: p }, null, 38) ], 34), [ [ct, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var n6 = /* @__PURE__ */ yn(lte, [["__file", "thumb.vue"]]); const ute = Bn({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), cte = /* @__PURE__ */ G({ __name: "bar", props: ute, setup(e, { expose: t }) { const n = e, r = $e(o4), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (f) => { if (f) { const h = f.offsetHeight - xp, p = f.offsetWidth - xp; o.value = f.scrollTop * 100 / h * l.value, a.value = f.scrollLeft * 100 / p * u.value; } }, update: () => { const f = r == null ? void 0 : r.wrapElement; if (!f) return; const h = f.offsetHeight - xp, p = f.offsetWidth - xp, v = h ** 2 / f.scrollHeight, m = p ** 2 / f.scrollWidth, g = Math.max(v, n.minSize), y = Math.max(m, n.minSize); l.value = v / (h - v) / (g / (h - g)), u.value = m / (p - m) / (y / (p - y)), s.value = g + xp < h ? `${g}px` : "", i.value = y + xp < p ? `${y}px` : ""; } }), (f, h) => ($(), B(Ue, null, [ Z(n6, { move: a.value, ratio: u.value, size: i.value, always: f.always }, null, 8, ["move", "ratio", "size", "always"]), Z(n6, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: f.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var dte = /* @__PURE__ */ yn(cte, [["__file", "bar.vue"]]); const pte = Bn({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: Lt([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, ...Zd(["ariaLabel", "ariaOrientation"]) }), fte = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(Kr) }, PC = "ElScrollbar", hte = G({ name: PC }), vte = /* @__PURE__ */ G({ ...hte, props: pte, emits: fte, setup(e, { expose: t, emit: n }) { const r = e, a = In("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = O(() => { const k = {}; return r.height && (k.height = g0(r.height)), r.maxHeight && (k.maxHeight = g0(r.maxHeight)), [r.wrapStyle, k]; }), p = O(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = O(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.value) == null || k.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(k, C) { na(k) ? c.value.scrollTo(k) : Kr(k) && Kr(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!Kr(k)) { sa(PC, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!Kr(k)) { sa(PC, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = al(d, w), i = Ni("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || We(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(o4, en({ scrollbarElement: u, wrapElement: c })), p2(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || We(() => { w(); }); }), qd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => ($(), B("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ K("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Qe(b(h)), tabindex: k.tabindex, onScroll: m }, [ ($(), ae(dt(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Qe(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: q(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? te("v-if", !0) : ($(), ae(dte, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var gte = /* @__PURE__ */ yn(vte, [["__file", "scrollbar.vue"]]); const ZL = Xa(gte), i4 = Symbol("popper"), QL = Symbol("popperContent"), mte = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], JL = Bn({ role: { type: String, values: mte, default: "tooltip" } }), yte = G({ name: "ElPopper", inheritAttrs: !1 }), bte = /* @__PURE__ */ G({ ...yte, props: JL, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = O(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(i4, l), (u, c) => he(u.$slots, "default"); } }); var wte = /* @__PURE__ */ yn(bte, [["__file", "popper.vue"]]); const eN = Bn({ arrowOffset: { type: Number, default: 5 } }), xte = G({ name: "ElPopperArrow", inheritAttrs: !1 }), kte = /* @__PURE__ */ G({ ...xte, props: eN, setup(e, { expose: t }) { const n = e, r = In("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = $e(QL, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), Ct(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => ($(), B("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Qe(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var Cte = /* @__PURE__ */ yn(kte, [["__file", "arrow.vue"]]); const Rx = "ElOnlyChild", Ste = G({ name: Rx, setup(e, { slots: t, attrs: n }) { var r; const a = $e(jL), o = Lee((r = a == null ? void 0 : a.setForwardRef) != null ? r : gf); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return sa(Rx, "requires exact only one valid child."), null; const l = tN(s); return l ? qe(Sg(l, n), [[o]]) : (sa(Rx, "no valid child node found"), null); }; } }); function tN(e) { if (!e) return null; const t = e; for (const n of t) { if (na(n)) switch (n.type) { case Eg: continue; case Ls: case "svg": return r6(n); case Ue: return tN(n.children); default: return n; } return r6(n); } return null; } function r6(e) { const t = In("only-child"); return Z("span", { class: t.e("content") }, [e]); } const nN = Bn({ virtualRef: { type: Lt(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Lt(Function) }, onMouseleave: { type: Lt(Function) }, onClick: { type: Lt(Function) }, onKeydown: { type: Lt(Function) }, onFocus: { type: Lt(Function) }, onBlur: { type: Lt(Function) }, onContextmenu: { type: Lt(Function) }, id: String, open: Boolean }), Ete = G({ name: "ElPopperTrigger", inheritAttrs: !1 }), _te = /* @__PURE__ */ G({ ...Ete, props: nN, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = $e(i4, void 0); Pee(a); const o = O(() => s.value ? n.id : void 0), i = O(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = O(() => { if (r && r.value !== "tooltip") return r.value; }), l = O(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = dl(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, Jc(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 = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { C2(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), Jc(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Ct(() => { if (u == null || u(), u = void 0, a.value && Jc(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? te("v-if", !0) : ($(), ae(b(Ste), Dt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: q(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var Tte = /* @__PURE__ */ yn(_te, [["__file", "trigger.vue"]]); const zx = "focus-trap.focus-after-trapped", Vx = "focus-trap.focus-after-released", $te = "focus-trap.focusout-prevented", a6 = { cancelable: !0, bubbles: !1 }, Ote = { cancelable: !0, bubbles: !1 }, o6 = "focusAfterTrapped", i6 = "focusAfterReleased", Fte = Symbol("elFocusTrap"), s4 = U(), A2 = U(0), l4 = U(0); let Bm = 0; const rN = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, s6 = (e, t) => { for (const n of e) if (!Ate(n, t)) return n; }, Ate = (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; }, Ite = (e) => { const t = rN(e), n = s6(t, e), r = s6(t.reverse(), e); return [n, r]; }, Pte = (e) => e instanceof HTMLInputElement && "select" in e, ru = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), l4.value = window.performance.now(), e !== n && Pte(e) && t && e.select(); } }; function l6(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const Lte = () => { let e = []; return { push: (r) => { const a = e[0]; a && r !== a && a.pause(), e = l6(e, r), e.unshift(r); }, remove: (r) => { var a, o; e = l6(e, r), (o = (a = e[0]) == null ? void 0 : a.resume) == null || o.call(a); } }; }, Nte = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (ru(r, t), document.activeElement !== n) return; }, u6 = Lte(), Mte = () => A2.value > l4.value, Rm = () => { s4.value = "pointer", A2.value = window.performance.now(); }, c6 = () => { s4.value = "keyboard", A2.value = window.performance.now(); }, Dte = () => (nt(() => { Bm === 0 && (document.addEventListener("mousedown", Rm), document.addEventListener("touchstart", Rm), document.addEventListener("keydown", c6)), Bm++; }), Ct(() => { Bm--, Bm <= 0 && (document.removeEventListener("mousedown", Rm), document.removeEventListener("touchstart", Rm), document.removeEventListener("keydown", c6)); }), { focusReason: s4, lastUserFocusTimestamp: A2, lastAutomatedFocusTimestamp: l4 }), zm = (e) => new CustomEvent($te, { ...Ote, detail: e }), Bte = G({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ o6, i6, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = Dte(); $ee((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: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === m0.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, F] = Ite(_); if (T && F) { if (!w && S === F) { const I = zm({ focusReason: o.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), k && ru(T, !0)); } else if (w && [T, _].includes(S)) { const I = zm({ focusReason: o.value }); t("focusout-prevented", I), I.defaultPrevented || (p.preventDefault(), k && ru(F, !0)); } } else if (S === _) { const I = zm({ focusReason: o.value }); t("focusout-prevented", I), I.defaultPrevented || p.preventDefault(); } } }; rt(Fte, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([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(o6, p); }, u = (p) => t(i6, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : ru(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !C2(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = zm({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || ru(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await We(); const p = b(n); if (p) { u6.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const g = new Event(zx, a6); p.addEventListener(zx, l), p.dispatchEvent(g), g.defaultPrevented || We(() => { let y = e.focusStartEl; Oa(y) || (ru(y), document.activeElement !== y && (y = "first")), y === "first" && Nte(rN(p), !0), (document.activeElement === v || y === "container") && ru(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(zx, l); const v = new CustomEvent(Vx, { ...a6, detail: { focusReason: o.value } }); p.addEventListener(Vx, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !Mte() || p.contains(document.activeElement)) && ru(r ?? document.body), p.removeEventListener(Vx, u), u6.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), Ct(() => { 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 Rte(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var zte = /* @__PURE__ */ yn(Bte, [["render", Rte], ["__file", "focus-trap.vue"]]); const Vte = ["fixed", "absolute"], jte = Bn({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Lt(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: T2, default: "bottom" }, popperOptions: { type: Lt(Object), default: () => ({}) }, strategy: { type: String, values: Vte, default: "absolute" } }), aN = Bn({ ...jte, id: String, style: { type: Lt([String, Array, Object]) }, className: { type: Lt([String, Array, Object]) }, effect: { type: Lt(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Lt([String, Array, Object]) }, popperStyle: { type: Lt([String, Array, Object]) }, referenceEl: { type: Lt(Object) }, triggerTargetEl: { type: Lt(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...Zd(["ariaLabel"]) }), Hte = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, Ute = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...Wte(e), ...t] }; return Kte(o, a == null ? void 0 : a.modifiers), o; }, qte = (e) => { if (Br) return dl(e); }; function Wte(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 Kte(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const Gte = 0, Xte = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = $e(i4, void 0), o = U(), i = U(), s = O(() => ({ name: "eventListeners", enabled: !!e.visible })), l = O(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : Gte; return { name: "arrow", enabled: !IQ(y), options: { element: y, padding: x } }; }), u = O(() => ({ onFirstUpdate: () => { p(); }, ...Ute(e, [ b(l), b(s) ]) })), c = O(() => qte(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = Eee(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, Yte = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = qL(), o = In("popper"), i = O(() => b(t).popper), s = U(Kr(e.zIndex) ? e.zIndex : a()), l = O(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = O(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = O(() => r.value === "dialog" ? "false" : void 0), d = O(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Kr(e.zIndex) ? e.zIndex : a(); } }; }, Zte = (e, t) => { const n = U(!1), r = U(); 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"); } }; }, Qte = G({ name: "ElPopperContent" }), Jte = /* @__PURE__ */ G({ ...Qte, props: aN, emits: Hte, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = Zte(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = Xte(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = Yte(r, { styles: p, attributes: d, role: m }), _ = $e(Jy, void 0), T = U(); rt(QL, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(Jy, { ..._, addInputId: gf, removeInputId: gf }); let F; const A = (N = !0) => { g(), N && S(); }, I = () => { A(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { F == null || F(), F = void 0; const z = b(N || h.value), P = b(L || h.value); Jc(z) && (F = be([m, () => r.ariaLabel, y, () => r.id], (D) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, V) => { C2(D[V]) ? z.removeAttribute(M) : z.setAttribute(M, D[V]); }); }, { immediate: !0 })), P !== z && Jc(P) && ["role", "aria-label", "aria-modal", "id"].forEach((D) => { P.removeAttribute(D); }); }, { immediate: !0 }), be(() => r.visible, I, { immediate: !0 }); }), Ct(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (N, L) => ($(), B("div", Dt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (z) => N.$emit("mouseenter", z), onMouseleave: (z) => N.$emit("mouseleave", z) }), [ Z(b(zte), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: q(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var ene = /* @__PURE__ */ yn(Jte, [["__file", "content.vue"]]); const tne = Xa(wte), u4 = Symbol("elTooltip"), Qa = Bn({ ...Aee, ...aN, appendTo: { type: Lt([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Lt(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...Zd(["ariaLabel"]) }), w0 = Bn({ ...nN, disabled: Boolean, trigger: { type: Lt([String, Array]), default: "hover" }, triggerKeys: { type: Lt(Array), default: () => [m0.enter, m0.space] } }), { useModelToggleProps: nne, useModelToggleEmits: rne, useModelToggle: ane } = vJ("visible"), one = Bn({ ...JL, ...nne, ...Qa, ...w0, ...eN, showArrow: { type: Boolean, default: !0 } }), ine = [ ...rne, "before-show", "before-hide", "show", "hide", "open", "close" ], sne = (e, t) => Go(e) ? e.includes(t) : e === t, kp = (e, t, n) => (r) => { sne(b(e), t) && n(r); }, lne = G({ name: "ElTooltipTrigger" }), une = /* @__PURE__ */ G({ ...lne, props: w0, setup(e, { expose: t }) { const n = e, r = In("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = $e(u4, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = Pt(n, "trigger"), h = Js(d, kp(f, "hover", s)), p = Js(d, kp(f, "hover", l)), v = Js(d, kp(f, "click", (w) => { w.button === 0 && u(w); })), m = Js(d, kp(f, "focus", s)), g = Js(d, kp(f, "focus", l)), y = Js(d, kp(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = Js(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => ($(), ae(b(Tte), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: q(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var cne = /* @__PURE__ */ yn(une, [["__file", "trigger.vue"]]); const dne = Bn({ to: { type: Lt([String, Object]), required: !0 }, disabled: Boolean }), pne = /* @__PURE__ */ G({ __name: "teleport", props: dne, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : ($(), ae(_g, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var fne = /* @__PURE__ */ yn(pne, [["__file", "teleport.vue"]]); const hne = Xa(fne), vne = G({ name: "ElTooltipContent", inheritAttrs: !1 }), gne = /* @__PURE__ */ G({ ...vne, props: Qa, setup(e, { expose: t }) { const n = e, { selector: r } = VL(), a = In("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = $e(u4, void 0), g = O(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = O(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Ct(() => { i == null || i(); }); const x = O(() => b(y) ? !0 : b(u)), w = O(() => n.disabled ? !1 : b(u)), k = O(() => n.appendTo || r.value), C = O(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, F = Js(T, () => { n.enterable && b(c) === "hover" && f(); }), A = Js(T, () => { b(c) === "hover" && d(); }), I = () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = rL(O(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { if (b(s)) return; b(c) !== "hover" && d(); }); }, z = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P); }), t({ contentRef: o }), (P, D) => ($(), ae(b(hne), { disabled: !P.teleported, to: b(k) }, { default: q(() => [ Z(lr, { name: b(g), onAfterLeave: _, onBeforeEnter: I, onAfterEnter: L, onBeforeLeave: N }, { default: q(() => [ b(x) ? qe(($(), ae(b(ene), Dt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(F), onMouseleave: b(A), onBlur: z, onClose: b(d) }), { default: q(() => [ he(P.$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"])), [ [ct, b(w)] ]) : te("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var mne = /* @__PURE__ */ yn(gne, [["__file", "content.vue"]]); const yne = G({ name: "ElTooltip" }), bne = /* @__PURE__ */ G({ ...yne, props: one, emits: ine, setup(e, { expose: t, emit: n }) { const r = e; Fee(); const a = Pg(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = ane({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = Iee({ showAfter: Pt(r, "showAfter"), hideAfter: Pt(r, "hideAfter"), autoClose: Pt(r, "autoClose"), open: c, close: d }), v = O(() => Qc(r.visible) && !f.value); rt(u4, { controlled: v, id: a, open: ch(l), trigger: Pt(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return Tg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => ($(), ae(b(tne), { ref_key: "popperRef", ref: o, role: g.role }, { default: q(() => [ Z(cne, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: q(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : te("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), Z(mne, { 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: q(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? ($(), B("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : ($(), B("span", { key: 1 }, _e(g.content), 1)) ]), g.showArrow ? ($(), ae(b(Cte), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : te("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 wne = /* @__PURE__ */ yn(bne, [["__file", "tooltip.vue"]]); const c4 = Xa(wne), xne = Bn({ valueKey: { type: String, default: "value" }, modelValue: { type: [String, Number], default: "" }, debounce: { type: Number, default: 300 }, placement: { type: Lt(String), values: [ "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end" ], default: "bottom-start" }, fetchSuggestions: { type: Lt([Function, Array]), default: gf }, popperClass: { type: String, default: "" }, triggerOnFocus: { type: Boolean, default: !0 }, selectWhenUnmatched: { type: Boolean, default: !1 }, hideLoading: { type: Boolean, default: !1 }, teleported: Qa.teleported, highlightFirstItem: { type: Boolean, default: !1 }, fitInputWidth: { type: Boolean, default: !1 }, clearable: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, name: String, ...Zd(["ariaLabel"]) }), kne = { [_a]: (e) => Oa(e), [yf]: (e) => Oa(e), [vd]: (e) => Oa(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, select: (e) => na(e) }, oN = "ElAutocomplete", Cne = G({ name: oN, inheritAttrs: !1 }), Sne = /* @__PURE__ */ G({ ...Cne, props: xne, emits: kne, setup(e, { expose: t, emit: n }) { const r = e, a = TL(), o = uh(), i = Ng(), s = In("autocomplete"), l = U(), u = U(), c = U(), d = U(); let f = !1, h = !1; const p = U([]), v = U(-1), m = U(""), g = U(!1), y = U(!1), x = U(!1), w = Pg(), k = O(() => o.style), C = O(() => (p.value.length > 0 || x.value) && g.value), S = O(() => !r.hideLoading && x.value), _ = O(() => l.value ? Array.from(l.value.$el.querySelectorAll("input")) : []), T = () => { C.value && (m.value = `${l.value.$el.offsetWidth}px`); }, F = () => { v.value = -1; }, A = async (ne) => { if (y.value) return; const W = (Y) => { x.value = !1, !y.value && (Go(Y) ? (p.value = Y, v.value = r.highlightFirstItem ? 0 : -1) : U3(oN, "autocomplete suggestions must be an array")); }; if (x.value = !0, Go(r.fetchSuggestions)) W(r.fetchSuggestions); else { const Y = await r.fetchSuggestions(ne, W); Go(Y) && W(Y); } }, I = xL(A, r.debounce), N = (ne) => { const W = !!ne; if (n(yf, ne), n(_a, ne), y.value = !1, g.value || (g.value = W), !r.triggerOnFocus && !ne) { y.value = !0, p.value = []; return; } I(ne); }, L = (ne) => { var W; i.value || (((W = ne.target) == null ? void 0 : W.tagName) !== "INPUT" || _.value.includes(document.activeElement)) && (g.value = !0); }, z = (ne) => { n(vd, ne); }, P = (ne) => { h ? h = !1 : (g.value = !0, n("focus", ne), r.triggerOnFocus && !f && I(String(r.modelValue))); }, D = (ne) => { setTimeout(() => { var W; if ((W = c.value) != null && W.isFocusInsideContent()) { h = !0; return; } g.value && X(), n("blur", ne); }); }, M = () => { g.value = !1, n(_a, ""), n("clear"); }, V = async () => { C.value && v.value >= 0 && v.value < p.value.length ? ve(p.value[v.value]) : r.selectWhenUnmatched && (n("select", { value: r.modelValue }), p.value = [], v.value = -1); }, Q = (ne) => { C.value && (ne.preventDefault(), ne.stopPropagation(), X()); }, X = () => { g.value = !1; }, ee = () => { var ne; (ne = l.value) == null || ne.focus(); }, ue = () => { var ne; (ne = l.value) == null || ne.blur(); }, ve = async (ne) => { n(yf, ne[r.valueKey]), n(_a, ne[r.valueKey]), n("select", ne), p.value = [], v.value = -1; }, ge = (ne) => { if (!C.value || x.value) return; if (ne < 0) { v.value = -1; return; } ne >= p.value.length && (ne = p.value.length - 1); const W = u.value.querySelector(`.${s.be("suggestion", "wrap")}`), re = W.querySelectorAll(`.${s.be("suggestion", "list")} li`)[ne], we = W.scrollTop, { offsetTop: Oe, scrollHeight: Ne } = re; Oe + Ne > we + W.clientHeight && (W.scrollTop += Ne), Oe < we && (W.scrollTop -= Ne), v.value = ne, l.value.ref.setAttribute("aria-activedescendant", `${w.value}-item-${v.value}`); }, se = rL(d, () => { C.value && X(); }); return Ct(() => { se == null || se(); }), nt(() => { 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", `${w.value}-item-${v.value}`), f = l.value.ref.hasAttribute("readonly"); }), t({ highlightedIndex: v, activated: g, loading: x, inputRef: l, popperRef: c, suggestions: p, handleSelect: ve, handleKeyEnter: V, focus: ee, blur: ue, close: X, highlight: ge, getData: A }), (ne, W) => ($(), ae(b(c4), { ref_key: "popperRef", ref: c, visible: b(C), placement: ne.placement, "fallback-placements": ["bottom-start", "top-start"], "popper-class": [b(s).e("popper"), ne.popperClass], teleported: ne.teleported, "gpu-acceleration": !1, pure: "", "manual-mode": "", effect: "light", trigger: "click", transition: `${b(s).namespace.value}-zoom-in-top`, persistent: "", role: "listbox", onBeforeShow: T, onHide: F }, { content: q(() => [ K("div", { ref_key: "regionRef", ref: u, class: H([b(s).b("suggestion"), b(s).is("loading", b(S))]), style: Qe({ [ne.fitInputWidth ? "width" : "minWidth"]: m.value, outline: "none" }), role: "region" }, [ Z(b(ZL), { id: b(w), tag: "ul", "wrap-class": b(s).be("suggestion", "wrap"), "view-class": b(s).be("suggestion", "list"), role: "listbox" }, { default: q(() => [ b(S) ? ($(), B("li", { key: 0 }, [ he(ne.$slots, "loading", {}, () => [ Z(b(Lr), { class: H(b(s).is("loading")) }, { default: q(() => [ Z(b(S2)) ]), _: 1 }, 8, ["class"]) ]) ])) : ($(!0), B(Ue, { key: 1 }, yt(p.value, (Y, re) => ($(), B("li", { id: `${b(w)}-item-${re}`, key: re, class: H({ highlighted: v.value === re }), role: "option", "aria-selected": v.value === re, onClick: (we) => ve(Y) }, [ he(ne.$slots, "default", { item: Y }, () => [ ze(_e(Y[ne.valueKey]), 1) ]) ], 10, ["id", "aria-selected", "onClick"]))), 128)) ]), _: 3 }, 8, ["id", "wrap-class", "view-class"]) ], 6) ]), default: q(() => [ K("div", { ref_key: "listboxRef", ref: d, class: H([b(s).b(), ne.$attrs.class]), style: Qe(b(k)), role: "combobox", "aria-haspopup": "listbox", "aria-expanded": b(C), "aria-owns": b(w) }, [ Z(b(F2), Dt({ ref_key: "inputRef", ref: l }, b(a), { clearable: ne.clearable, disabled: b(i), name: ne.name, "model-value": ne.modelValue, "aria-label": ne.ariaLabel, onInput: N, onChange: z, onFocus: P, onBlur: D, onClear: M, onKeydown: [ gn(et((Y) => ge(v.value - 1), ["prevent"]), ["up"]), gn(et((Y) => ge(v.value + 1), ["prevent"]), ["down"]), gn(V, ["enter"]), gn(X, ["tab"]), gn(Q, ["esc"]) ], onMousedown: L }), QP({ _: 2 }, [ ne.$slots.prepend ? { name: "prepend", fn: q(() => [ he(ne.$slots, "prepend") ]) } : void 0, ne.$slots.append ? { name: "append", fn: q(() => [ he(ne.$slots, "append") ]) } : void 0, ne.$slots.prefix ? { name: "prefix", fn: q(() => [ he(ne.$slots, "prefix") ]) } : void 0, ne.$slots.suffix ? { name: "suffix", fn: q(() => [ he(ne.$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 Ene = /* @__PURE__ */ yn(Sne, [["__file", "autocomplete.vue"]]); const iN = Xa(Ene), sN = Symbol("buttonGroupContextKey"), _ne = (e, t) => { sJ({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, O(() => e.type === "text")); const n = $e(sN, void 0), r = n4("button"), { form: a } = O2(), o = Lg(O(() => n == null ? void 0 : n.size)), i = Ng(), s = U(), l = _r(), u = O(() => e.type || (n == null ? void 0 : n.type) || ""), c = O(() => { var p, v, m; return (m = (v = e.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? m : !1; }), d = O(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = O(() => { 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) === Ls) { const g = m.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(g.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (p) => { if (i.value || e.loading) { p.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", p); } }; }, Tne = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], $ne = ["button", "submit", "reset"], LC = Bn({ size: t4, disabled: Boolean, type: { type: String, values: Tne, default: "" }, icon: { type: Di }, nativeType: { type: String, values: $ne, default: "button" }, loading: Boolean, loadingIcon: { type: Di, 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: Lt([String, Object]), default: "button" } }), One = { click: (e) => e instanceof MouseEvent }; function la(e, t) { Fne(e) && (e = "100%"); var n = Ane(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 Vm(e) { return Math.min(1, Math.max(0, e)); } function Fne(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function Ane(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function lN(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function jm(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function jc(e) { return e.length === 1 ? "0" + e : String(e); } function Ine(e, t, n) { return { r: la(e, 255) * 255, g: la(t, 255) * 255, b: la(n, 255) * 255 }; } function d6(e, t, n) { e = la(e, 255), t = la(t, 255), n = la(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function jx(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 Pne(e, t, n) { var r, a, o; if (e = la(e, 360), t = la(t, 100), n = la(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = jx(s, i, e + 1 / 3), a = jx(s, i, e), o = jx(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function p6(e, t, n) { e = la(e, 255), t = la(t, 255), n = la(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function Lne(e, t, n) { e = la(e, 360) * 6, t = la(t, 100), n = la(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function f6(e, t, n, r) { var a = [ jc(Math.round(e).toString(16)), jc(Math.round(t).toString(16)), jc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function Nne(e, t, n, r, a) { var o = [ jc(Math.round(e).toString(16)), jc(Math.round(t).toString(16)), jc(Math.round(n).toString(16)), jc(Mne(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function Mne(e) { return Math.round(parseFloat(e) * 255).toString(16); } function h6(e) { return Eo(e) / 255; } function Eo(e) { return parseInt(e, 16); } function Dne(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var NC = { 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 Bne(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = Vne(e)), typeof e == "object" && (Us(e.r) && Us(e.g) && Us(e.b) ? (t = Ine(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Us(e.h) && Us(e.s) && Us(e.v) ? (r = jm(e.s), a = jm(e.v), t = Lne(e.h, r, a), i = !0, s = "hsv") : Us(e.h) && Us(e.s) && Us(e.l) && (r = jm(e.s), o = jm(e.l), t = Pne(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = lN(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 Rne = "[-\\+]?\\d+%?", zne = "[-\\+]?\\d*\\.\\d+%?", Su = "(?:".concat(zne, ")|(?:").concat(Rne, ")"), Hx = "[\\s|\\(]+(".concat(Su, ")[,|\\s]+(").concat(Su, ")[,|\\s]+(").concat(Su, ")\\s*\\)?"), Ux = "[\\s|\\(]+(".concat(Su, ")[,|\\s]+(").concat(Su, ")[,|\\s]+(").concat(Su, ")[,|\\s]+(").concat(Su, ")\\s*\\)?"), xi = { CSS_UNIT: new RegExp(Su), rgb: new RegExp("rgb" + Hx), rgba: new RegExp("rgba" + Ux), hsl: new RegExp("hsl" + Hx), hsla: new RegExp("hsla" + Ux), hsv: new RegExp("hsv" + Hx), hsva: new RegExp("hsva" + Ux), 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 Vne(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (NC[e]) e = NC[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = xi.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = xi.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = xi.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = xi.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = xi.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = xi.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = xi.hex8.exec(e), n ? { r: Eo(n[1]), g: Eo(n[2]), b: Eo(n[3]), a: h6(n[4]), format: t ? "name" : "hex8" } : (n = xi.hex6.exec(e), n ? { r: Eo(n[1]), g: Eo(n[2]), b: Eo(n[3]), format: t ? "name" : "hex" } : (n = xi.hex4.exec(e), n ? { r: Eo(n[1] + n[1]), g: Eo(n[2] + n[2]), b: Eo(n[3] + n[3]), a: h6(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = xi.hex3.exec(e), n ? { r: Eo(n[1] + n[1]), g: Eo(n[2] + n[2]), b: Eo(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Us(e) { return !!xi.CSS_UNIT.exec(String(e)); } var jne = ( /** @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 = Dne(t)), this.originalInput = t; var a = Bne(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.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, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = lN(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 = p6(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 = p6(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = d6(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 = d6(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), f6(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), Nne(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(la(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(la(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 = "#" + f6(this.r, this.g, this.b, !1), n = 0, r = Object.entries(NC); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = Vm(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 = Vm(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 = Vm(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 = Vm(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, 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, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Wl(e, t = 20) { return e.mix("#141414", t).toString(); } function Hne(e) { const t = Ng(), n = In("button"); return O(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new jne(a), s = e.dark ? i.tint(20).toString() : Wl(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Wl(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Wl(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Wl(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Wl(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Wl(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Wl(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": a, "text-color": u, "border-color": a, "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 ? Wl(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 Une = G({ name: "ElButton" }), qne = /* @__PURE__ */ G({ ...Une, props: LC, emits: One, setup(e, { expose: t, emit: n }) { const r = e, a = Hne(r), o = In("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = _ne(r, n), h = O(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => ($(), ae(dt(p.tag), Dt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: q(() => [ p.loading ? ($(), B(Ue, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : ($(), ae(b(Lr), { key: 1, class: H(b(o).is("loading")) }, { default: q(() => [ ($(), ae(dt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? ($(), ae(b(Lr), { key: 1 }, { default: q(() => [ p.icon ? ($(), ae(dt(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : te("v-if", !0), p.$slots.default ? ($(), B("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : te("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var Wne = /* @__PURE__ */ yn(qne, [["__file", "button.vue"]]); const Kne = { size: LC.size, type: LC.type }, Gne = G({ name: "ElButtonGroup" }), Xne = /* @__PURE__ */ G({ ...Gne, props: Kne, setup(e) { const t = e; rt(sN, en({ size: Pt(t, "size"), type: Pt(t, "type") })); const n = In("button"); return (r, a) => ($(), B("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var uN = /* @__PURE__ */ yn(Xne, [["__file", "button-group.vue"]]); const d4 = Xa(Wne, { ButtonGroup: uN }); Yd(uN); var Yne = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function cN(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const au = /* @__PURE__ */ new Map(); if (Br) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of au.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function v6(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : Jc(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.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 = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const Zne = { beforeMount(e, t) { au.has(e) || au.set(e, []), au.get(e).push({ documentHandler: v6(e, t), bindingFn: t.value }); }, updated(e, t) { au.has(e) || au.set(e, []); const n = au.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: v6(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { au.delete(e); } }, MC = Bn({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: K3 }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), Qne = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, Jne = G({ name: "ElTag" }), ere = /* @__PURE__ */ G({ ...Jne, props: MC, emits: Qne, setup(e, { emit: t }) { const n = e, r = Lg(), a = In("tag"), o = O(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? ($(), B("span", { key: 0, class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b(Lr), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(M8)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6)) : ($(), ae(lr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: q(() => [ K("span", { class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b(Lr), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(M8)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var tre = /* @__PURE__ */ yn(ere, [["__file", "tag.vue"]]); const nre = Xa(tre), dN = Symbol("rowContextKey"), rre = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], are = ["top", "middle", "bottom"], ore = Bn({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: rre, default: "start" }, align: { type: String, values: are } }), ire = G({ name: "ElRow" }), sre = /* @__PURE__ */ G({ ...ire, props: ore, setup(e) { const t = e, n = In("row"), r = O(() => t.gutter); rt(dN, { gutter: r }); const a = O(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = O(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var lre = /* @__PURE__ */ yn(sre, [["__file", "row.vue"]]); const I2 = Xa(lre), ure = Bn({ 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: Lt([Number, Object]), default: () => jp({}) }, sm: { type: Lt([Number, Object]), default: () => jp({}) }, md: { type: Lt([Number, Object]), default: () => jp({}) }, lg: { type: Lt([Number, Object]), default: () => jp({}) }, xl: { type: Lt([Number, Object]), default: () => jp({}) } }), cre = G({ name: "ElCol" }), dre = /* @__PURE__ */ G({ ...cre, props: ure, setup(e) { const t = e, { gutter: n } = $e(dN, { gutter: O(() => 0) }), r = In("col"), a = O(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = O(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((u) => { const c = t[u]; Kr(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) => { Kr(t[u]) ? i.push(r.b(`${u}-${t[u]}`)) : na(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) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var pre = /* @__PURE__ */ yn(dre, [["__file", "col.vue"]]); const pN = Xa(pre), fre = G({ name: "ElContainer" }), hre = /* @__PURE__ */ G({ ...fre, props: { direction: { type: String } }, setup(e) { const t = e, n = _r(), r = In("container"), a = 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 (o, i) => ($(), B("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var vre = /* @__PURE__ */ yn(hre, [["__file", "container.vue"]]); const gre = G({ name: "ElAside" }), mre = /* @__PURE__ */ G({ ...gre, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = In("aside"), r = O(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => ($(), B("aside", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var fN = /* @__PURE__ */ yn(mre, [["__file", "aside.vue"]]); const yre = G({ name: "ElFooter" }), bre = /* @__PURE__ */ G({ ...yre, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = In("footer"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("footer", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var hN = /* @__PURE__ */ yn(bre, [["__file", "footer.vue"]]); const wre = G({ name: "ElHeader" }), xre = /* @__PURE__ */ G({ ...wre, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = In("header"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("header", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var vN = /* @__PURE__ */ yn(xre, [["__file", "header.vue"]]); const kre = G({ name: "ElMain" }), Cre = /* @__PURE__ */ G({ ...kre, setup(e) { const t = In("main"); return (n, r) => ($(), B("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var gN = /* @__PURE__ */ yn(Cre, [["__file", "main.vue"]]); const mN = Xa(vre, { Aside: fN, Footer: hN, Header: vN, Main: gN }); Yd(fN); Yd(hN); const yN = Yd(vN), bN = Yd(gN), Sre = /* @__PURE__ */ G({ inheritAttrs: !1 }); function Ere(e, t, n, r, a, o) { return he(e.$slots, "default"); } var _re = /* @__PURE__ */ yn(Sre, [["render", Ere], ["__file", "collection.vue"]]); const Tre = /* @__PURE__ */ G({ name: "ElCollectionItem", inheritAttrs: !1 }); function $re(e, t, n, r, a, o) { return he(e.$slots, "default"); } var Ore = /* @__PURE__ */ yn(Tre, [["render", $re], ["__file", "collection-item.vue"]]); const Fre = "data-el-collection-item", Are = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ..._re, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const c = b(s); if (!c) return []; const d = Array.from(c.querySelectorAll(`[${Fre}]`)); return [...l.values()].sort((h, p) => d.indexOf(h.ref) - d.indexOf(p.ref)); }, collectionRef: s }); } }, i = { ...Ore, name: n, setup(s, { attrs: l }) { const u = U(null), c = $e(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Ct(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, qx = Bn({ trigger: w0.trigger, effect: { ...Qa.effect, default: "light" }, type: { type: Lt(String) }, placement: { type: Lt(String), default: "bottom" }, popperOptions: { type: Lt(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: Lt([Number, String]), default: 0 }, maxHeight: { type: Lt([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Lt(Object) }, teleported: Qa.teleported }); Bn({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: Di } }); Bn({ onKeydown: { type: Lt(Function) } }); Are("Dropdown"); const wN = Symbol("ElSelectGroup"), P2 = Symbol("ElSelect"); function Ire(e, t) { const n = $e(P2), r = $e(wN, { disabled: !1 }), a = O(() => c(mu(n.props.modelValue), e.value)), o = O(() => { var h; if (n.props.multiple) { const p = mu((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = O(() => e.label || (na(e.value) ? "" : e.value)), s = O(() => e.value || e.label || ""), l = O(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (na(e.value)) { const v = n.props.valueKey; return h && h.some((m) => xo(sl(m, v)) === sl(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(BQ(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => 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 && na(h) && na(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const Pre = G({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = In("select"), n = Pg(), r = O(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = en({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = Ire(e, a), { visible: d, hover: f } = gr(a), h = tt().proxy; l.onOptionCreate(h), Ct(() => { const v = h.value, { selected: m } = l.states, y = (l.props.multiple ? m : [m]).some((x) => x.value === h.value); We(() => { l.states.cachedOptions.get(v) === h && !y && l.states.cachedOptions.delete(v); }), l.onOptionDestroy(v, h); }); function p() { s.value || l.handleOptionSelect(h); } return { ns: t, id: n, containerKls: r, currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function Lre(e, t, n, r, a, o) { return qe(($(), B("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: et(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ K("span", null, _e(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ct, e.visible] ]); } var p4 = /* @__PURE__ */ yn(Pre, [["render", Lre], ["__file", "option.vue"]]); const Nre = G({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = $e(P2), t = In("select"), n = O(() => e.props.popperClass), r = O(() => e.props.multiple), a = O(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), al(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function Mre(e, t, n, r, a, o) { return $(), B("div", { class: H([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Qe({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : te("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? ($(), B("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : te("v-if", !0) ], 6); } var Dre = /* @__PURE__ */ yn(Nre, [["render", Mre], ["__file", "select-dropdown.vue"]]); const Bre = 11, Rre = (e, t) => { const { t: n } = OL(), r = Pg(), a = In("select"), o = In("input"), i = en({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = GL({ afterComposition: (R) => ce(R) }), { wrapperRef: S, isFocused: _ } = KL(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(R) { var ie, Ie; return ((ie = u.value) == null ? void 0 : ie.isFocusInsideContent(R)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(R)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), F = U(), { form: A, formItem: I } = O2(), { inputId: N } = a4(e, { formItemContext: I }), { valueOnClear: L, isEmptyValue: z } = Vee(e), P = O(() => e.disabled || (A == null ? void 0 : A.disabled)), D = O(() => Go(e.modelValue) ? e.modelValue.length > 0 : !z(e.modelValue)), M = O(() => e.clearable && !P.value && i.inputHovering && D.value), V = O(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Q = O(() => a.is("reverse", V.value && T.value)), X = O(() => (I == null ? void 0 : I.validateState) || ""), ee = O(() => _L[X.value]), ue = O(() => e.remote ? 300 : 0), ve = O(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = O(() => se.value.filter((R) => R.visible).length), se = O(() => { const R = Array.from(i.options.values()), ie = []; return i.optionValues.forEach((Ie) => { const Ke = R.findIndex((Jt) => Jt.value === Ie); Ke > -1 && ie.push(R[Ke]); }), ie.length >= R.length ? ie : R; }), ne = O(() => Array.from(i.cachedOptions.values())), W = O(() => { const R = se.value.filter((ie) => !ie.created).some((ie) => ie.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !R; }), Y = () => { e.filterable && ta(e.filterMethod) || e.filterable && e.remote && ta(e.remoteMethod) || se.value.forEach((R) => { var ie; (ie = R.updateOption) == null || ie.call(R, i.inputValue); }); }, re = Lg(), we = O(() => ["small"].includes(re.value) ? "small" : "default"), Oe = O({ get() { return T.value && ve.value !== !1; }, set(R) { T.value = R; } }), Ne = O(() => { if (e.multiple && !Fv(e.modelValue)) return mu(e.modelValue).length === 0 && !i.inputValue; const R = Go(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Fv(R) ? !i.inputValue : !0; }), xe = O(() => { var R; const ie = (R = e.placeholder) != null ? R : n("el.select.placeholder"); return e.multiple || !D.value ? ie : i.selectedLabel; }), Fe = O(() => kC ? null : "mouseenter"); be(() => e.modelValue, (R, ie) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !$C(R, ie) && e.validateEvent && (I == null || I.validate("change").catch((Ie) => sa(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (R) => { R ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", R); }), be(() => i.options.entries(), () => { var R; if (!Br) return; const ie = ((R = s.value) == null ? void 0 : R.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Fv(e.modelValue) || !Array.from(ie).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (R) => { Kr(R) && R > -1 ? F.value = se.value[R] || {} : F.value = {}, se.value.forEach((ie) => { ie.hover = F.value === ie; }); }), Wd(() => { i.isBeforeHide || Y(); }); const Se = (R) => { i.previousQuery === R || x.value || (i.previousQuery = R, e.filterable && ta(e.filterMethod) ? e.filterMethod(R) : e.filterable && e.remote && ta(e.remoteMethod) && e.remoteMethod(R), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? We(Pe) : We(De)); }, Pe = () => { const R = se.value.filter((Ke) => Ke.visible && !Ke.disabled && !Ke.states.groupDisabled), ie = R.find((Ke) => Ke.created), Ie = R[0]; i.hoveringIndex = Te(se.value, ie || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ie = Go(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = He(ie); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const R = []; Fv(e.modelValue) || mu(e.modelValue).forEach((ie) => { R.push(He(ie)); }), i.selected = R; }, He = (R) => { let ie; const Ie = Lx(R).toLowerCase() === "object", Ke = Lx(R).toLowerCase() === "null", Jt = Lx(R).toLowerCase() === "undefined"; for (let tn = i.cachedOptions.size - 1; tn >= 0; tn--) { const Xt = ne.value[tn]; if (Ie ? sl(Xt.value, e.valueKey) === sl(R, e.valueKey) : Xt.value === R) { ie = { value: R, currentLabel: Xt.currentLabel, get isDisabled() { return Xt.isDisabled; } }; break; } } if (ie) return ie; const fn = Ie ? R.label : !Ke && !Jt ? R : ""; return { value: R, currentLabel: fn }; }, De = () => { i.hoveringIndex = se.value.findIndex((R) => i.selected.some((ie) => Qt(ie) === Qt(R))); }, Xe = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, Ge = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ze = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var R, ie; (ie = (R = u.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, j = () => { var R, ie; (ie = (R = c.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, le = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, ce = (R) => { if (i.inputValue = R.target.value, e.remote) oe(); else return le(); }, oe = xL(() => { le(); }, ue.value), ke = (R) => { $C(e.modelValue, R) || t(vd, R); }, fe = (R) => AQ(R, (ie) => !i.disabledOptions.has(ie)), Ee = (R) => { if (e.multiple && R.code !== m0.delete && R.target.value.length <= 0) { const ie = mu(e.modelValue).slice(), Ie = fe(ie); if (Ie < 0) return; const Ke = ie[Ie]; ie.splice(Ie, 1), t(_a, ie), ke(ie), t("remove-tag", Ke); } }, Ve = (R, ie) => { const Ie = i.selected.indexOf(ie); if (Ie > -1 && !P.value) { const Ke = mu(e.modelValue).slice(); Ke.splice(Ie, 1), t(_a, Ke), ke(Ke), t("remove-tag", ie.value); } R.stopPropagation(), wt(); }, je = (R) => { R.stopPropagation(); const ie = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ie.push(Ie.value); t(_a, ie), ke(ie), i.hoveringIndex = -1, T.value = !1, t("clear"), wt(); }, me = (R) => { var ie; if (e.multiple) { const Ie = mu((ie = e.modelValue) != null ? ie : []).slice(), Ke = Te(Ie, R.value); Ke > -1 ? Ie.splice(Ke, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(R.value), t(_a, Ie), ke(Ie), R.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(_a, R.value), ke(R.value), T.value = !1; wt(), !T.value && We(() => { Ce(R); }); }, Te = (R = [], ie) => { if (!na(ie)) return R.indexOf(ie); const Ie = e.valueKey; let Ke = -1; return R.some((Jt, fn) => xo(sl(Jt, Ie)) === sl(ie, Ie) ? (Ke = fn, !0) : !1), Ke; }, Ce = (R) => { var ie, Ie, Ke, Jt, fn; const cn = Go(R) ? R[0] : R; let tn = null; if (cn != null && cn.value) { const Xt = se.value.filter((Ur) => Ur.value === cn.value); Xt.length > 0 && (tn = Xt[0].$el); } if (u.value && tn) { const Xt = (Jt = (Ke = (Ie = (ie = u.value) == null ? void 0 : ie.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : Ke.querySelector) == null ? void 0 : Jt.call(Ke, `.${a.be("dropdown", "wrap")}`); Xt && zQ(Xt, tn); } (fn = y.value) == null || fn.handleScroll(); }, Le = (R) => { i.options.set(R.value, R), i.cachedOptions.set(R.value, R), R.disabled && i.disabledOptions.set(R.value, R); }, bt = (R, ie) => { i.options.get(R) === ie && i.options.delete(R); }, pt = O(() => { var R, ie; return (ie = (R = u.value) == null ? void 0 : R.popperRef) == null ? void 0 : ie.contentRef; }), Tt = () => { i.isBeforeHide = !1, We(() => Ce(i.selected)); }, wt = () => { var R; (R = d.value) == null || R.focus(); }, St = () => { var R; (R = d.value) == null || R.blur(); }, rn = (R) => { je(R); }, Bt = () => { T.value = !1, _.value && St(); }, Gt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, sn = () => { P.value || (kC && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, an = () => { T.value ? se.value[i.hoveringIndex] && me(se.value[i.hoveringIndex]) : sn(); }, Qt = (R) => na(R.value) ? sl(R.value, e.valueKey) : R.value, Sn = O(() => se.value.filter((R) => R.visible).every((R) => R.disabled)), En = O(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = O(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Et = (R) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { R === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : R === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ie = se.value[i.hoveringIndex]; (ie.disabled === !0 || ie.states.groupDisabled === !0 || !ie.visible) && Et(R), We(() => Ce(F.value)); } }, Rt = () => { if (!l.value) return 0; const R = window.getComputedStyle(l.value); return Number.parseFloat(R.gap || "6px"); }, qt = O(() => { const R = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - R : i.selectionWidth}px` }; }), _n = O(() => ({ maxWidth: `${i.selectionWidth}px` })), $r = O(() => ({ width: `${Math.max(i.calculatorWidth, Bre)}px` })); return al(l, Xe), al(f, Ge), al(v, E), al(S, E), al(m, j), al(g, Ze), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: se, hoverOption: F, selectSize: re, filteredOptionsCount: ge, resetCalculatorWidth: Ge, updateTooltip: E, updateTagTooltip: j, debouncedOnInputChange: oe, onInput: ce, deletePrevTag: Ee, deleteTag: Ve, deleteSelected: je, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: D, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: Fe, showClose: M, iconComponent: V, iconReverse: Q, validateState: X, validateIcon: ee, showNewOption: W, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: bt, handleMenuEnter: Tt, focus: wt, blur: St, handleClearClick: rn, handleClickOutside: Bt, handleEsc: Gt, toggleMenu: sn, selectOption: an, getValueKey: Qt, navigateOptions: Et, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: $r, popperRef: pt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var zre = G({ name: "ElOptions", setup(e, { slots: t }) { const n = $e(P2); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.call(t), s = []; function l(u) { Go(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(!Oa(c.children) && !Go(c.children) && ta((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) : Go(c.children) && l(c.children); }); } return i.length && l((o = i[0]) == null ? void 0 : o.children), $C(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const Vre = Bn({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: t4, effect: { type: Lt(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: Lt(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: Qa.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: Di, default: W3 }, fitInputWidth: Boolean, suffixIcon: { type: Di, default: q3 }, tagType: { ...MC.type, default: "info" }, tagEffect: { ...MC.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: Lt(String), values: T2, default: "bottom-start" }, fallbackPlacements: { type: Lt(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...zee, ...Zd(["ariaLabel"]) }), g6 = "ElSelect", jre = G({ name: g6, componentName: g6, components: { ElSelectMenu: Dre, ElOption: p4, ElOptions: zre, ElTag: nre, ElScrollbar: ZL, ElTooltip: c4, ElIcon: Lr }, directives: { ClickOutside: Zne }, props: Vre, emits: [ _a, vd, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = O(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return Go(o) ? i ? o : s : i ? s : o; }), r = en({ ...gr(e), modelValue: n }), a = Rre(r, t); return rt(P2, en({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function Hre(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = f2("click-outside"); return qe(($(), B("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [h2(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ Z(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: q(() => { var p; return [ K("div", { ref: "wrapperRef", class: H([ 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: et(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? ($(), B("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : te("v-if", !0), K("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ ($(!0), B(Ue, null, yt(e.showTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? ($(), ae(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: q(() => [ K("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.collapseTagStyle) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + _e(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: q(() => [ K("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ ($(!0), B(Ue, null, yt(e.collapseTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(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: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : te("v-if", !0) ]) : te("v-if", !0), e.selectDisabled ? te("v-if", !0) : ($(), B("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ qe(K("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: H([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Qe(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: [ gn(et((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(et((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(et(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(et(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(et(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: et(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"]), [ [$g, e.states.inputValue] ]), e.filterable ? ($(), B("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: _e(e.states.inputValue) }, null, 10, ["textContent"])) : te("v-if", !0) ], 2)), e.shouldShowPlaceholder ? ($(), B("div", { key: 2, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ K("span", null, _e(e.currentPlaceholder), 1) ]) : ($(), B("span", { key: 1 }, _e(e.currentPlaceholder), 1)) ], 2)) : te("v-if", !0) ], 2), K("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? ($(), ae(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: q(() => [ ($(), ae(dt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), e.showClose && e.clearIcon ? ($(), ae(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: q(() => [ ($(), ae(dt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0), e.validateState && e.validateIcon ? ($(), ae(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: q(() => [ ($(), ae(dt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: q(() => [ Z(f, { ref: "menuRef" }, { default: q(() => [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : te("v-if", !0), qe(Z(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: H([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: q(() => [ e.showNewOption ? ($(), ae(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : te("v-if", !0), Z(c, null, { default: q(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ct, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? ($(), B("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? ($(), B("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ K("span", null, _e(e.emptyText), 1) ]) ], 2)) : te("v-if", !0), e.$slots.footer ? ($(), B("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : te("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 Ure = /* @__PURE__ */ yn(jre, [["render", Hre], ["__file", "select.vue"]]); const qre = G({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = In("select"), n = U(null), r = tt(), a = U([]); rt(wN, en({ ...gr(e) })); const o = O(() => a.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 = mu(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 = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), IG(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function Wre(e, t, n, r, a, o) { return qe(($(), B("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ K("li", { class: H(e.ns.be("group", "title")) }, _e(e.label), 3), K("li", null, [ K("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [ct, e.visible] ]); } var xN = /* @__PURE__ */ yn(qre, [["render", Wre], ["__file", "option-group.vue"]]); const kN = Xa(Ure, { Option: p4, OptionGroup: xN }), CN = Yd(p4); Yd(xN); const Kre = Bn({ trigger: w0.trigger, placement: qx.placement, disabled: w0.disabled, visible: Qa.visible, transition: Qa.transition, popperOptions: qx.popperOptions, tabindex: qx.tabindex, content: Qa.content, popperStyle: Qa.popperStyle, popperClass: Qa.popperClass, enterable: { ...Qa.enterable, default: !0 }, effect: { ...Qa.effect, default: "light" }, teleported: Qa.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 } }), Gre = { "update:visible": (e) => Qc(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, Xre = "onUpdate:visible", Yre = G({ name: "ElPopover" }), Zre = /* @__PURE__ */ G({ ...Yre, props: Kre, emits: Gre, setup(e, { expose: t, emit: n }) { const r = e, a = O(() => r[Xre]), o = In("popover"), i = U(), s = O(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = O(() => [ { width: g0(r.width) }, r.popperStyle ]), u = O(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = O(() => r.transition === `${o.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) => ($(), ae(b(c4), Dt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: q(() => [ m.title ? ($(), B("div", { key: 0, class: H(b(o).e("title")), role: "title" }, _e(m.title), 3)) : te("v-if", !0), he(m.$slots, "default", {}, () => [ ze(_e(m.content), 1) ]) ]), default: q(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : te("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 Qre = /* @__PURE__ */ yn(Zre, [["__file", "popover.vue"]]); const m6 = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var Jre = { mounted(e, t) { m6(e, t); }, updated(e, t) { m6(e, t); } }; const eae = "popover", tae = nJ(Jre, eae), L2 = Xa(Qre, { directive: tae }), nae = Bn({ modelValue: { type: [Boolean, String, Number], default: !1 }, disabled: Boolean, loading: Boolean, size: { type: String, validator: rJ }, width: { type: [String, Number], default: "" }, inlinePrompt: Boolean, inactiveActionIcon: { type: Di }, activeActionIcon: { type: Di }, activeIcon: { type: Di }, inactiveIcon: { type: Di }, 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: Lt(Function) }, id: String, tabindex: { type: [String, Number] }, ...Zd(["ariaLabel"]) }), rae = { [_a]: (e) => Qc(e) || Oa(e) || Kr(e), [vd]: (e) => Qc(e) || Oa(e) || Kr(e), [yf]: (e) => Qc(e) || Oa(e) || Kr(e) }, DC = "ElSwitch", aae = G({ name: DC }), oae = /* @__PURE__ */ G({ ...aae, props: nae, emits: rae, setup(e, { expose: t, emit: n }) { const r = e, { formItem: a } = O2(), o = Lg(), i = In("switch"), { inputId: s } = a4(r, { formItemContext: a }), l = Ng(O(() => r.loading)), u = U(r.modelValue !== !1), c = U(), d = U(), f = O(() => [ i.b(), i.m(o.value), i.is("disabled", l.value), i.is("checked", g.value) ]), h = O(() => [ i.e("label"), i.em("label", "left"), i.is("active", !g.value) ]), p = O(() => [ i.e("label"), i.em("label", "right"), i.is("active", g.value) ]), v = O(() => ({ width: g0(r.width) })); be(() => r.modelValue, () => { u.value = !0; }); const m = O(() => u.value ? r.modelValue : !1), g = O(() => m.value === r.activeValue); [r.activeValue, r.inactiveValue].includes(m.value) || (n(_a, r.inactiveValue), n(vd, r.inactiveValue), n(yf, r.inactiveValue)), be(g, (k) => { var C; c.value.checked = k, r.validateEvent && ((C = a == null ? void 0 : a.validate) == null || C.call(a, "change").catch((S) => sa(S))); }); const y = () => { const k = g.value ? r.inactiveValue : r.activeValue; n(_a, k), n(vd, k), n(yf, k), We(() => { c.value.checked = g.value; }); }, x = () => { if (l.value) return; const { beforeChange: k } = r; if (!k) { y(); return; } const C = k(); [ l8(C), Qc(C) ].includes(!0) || U3(DC, "beforeChange must return type `Promise` or `boolean`"), l8(C) ? C.then((_) => { _ && y(); }).catch((_) => { sa(DC, `some error occurred: ${_}`); }) : C && y(); }, w = () => { var k, C; (C = (k = c.value) == null ? void 0 : k.focus) == null || C.call(k); }; return nt(() => { c.value.checked = g.value; }), t({ focus: w, checked: g }), (k, C) => ($(), B("div", { class: H(b(f)), onClick: et(x, ["prevent"]) }, [ K("input", { id: b(s), ref_key: "input", ref: c, class: H(b(i).e("input")), type: "checkbox", role: "switch", "aria-checked": b(g), "aria-disabled": b(l), "aria-label": k.ariaLabel, name: k.name, "true-value": k.activeValue, "false-value": k.inactiveValue, disabled: b(l), tabindex: k.tabindex, onChange: y, onKeydown: gn(x, ["enter"]) }, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]), !k.inlinePrompt && (k.inactiveIcon || k.inactiveText) ? ($(), B("span", { key: 0, class: H(b(h)) }, [ k.inactiveIcon ? ($(), ae(b(Lr), { key: 0 }, { default: q(() => [ ($(), ae(dt(k.inactiveIcon))) ]), _: 1 })) : te("v-if", !0), !k.inactiveIcon && k.inactiveText ? ($(), B("span", { key: 1, "aria-hidden": b(g) }, _e(k.inactiveText), 9, ["aria-hidden"])) : te("v-if", !0) ], 2)) : te("v-if", !0), K("span", { ref_key: "core", ref: d, class: H(b(i).e("core")), style: Qe(b(v)) }, [ k.inlinePrompt ? ($(), B("div", { key: 0, class: H(b(i).e("inner")) }, [ k.activeIcon || k.inactiveIcon ? ($(), ae(b(Lr), { key: 0, class: H(b(i).is("icon")) }, { default: q(() => [ ($(), ae(dt(b(g) ? k.activeIcon : k.inactiveIcon))) ]), _: 1 }, 8, ["class"])) : k.activeText || k.inactiveText ? ($(), B("span", { key: 1, class: H(b(i).is("text")), "aria-hidden": !b(g) }, _e(b(g) ? k.activeText : k.inactiveText), 11, ["aria-hidden"])) : te("v-if", !0) ], 2)) : te("v-if", !0), K("div", { class: H(b(i).e("action")) }, [ k.loading ? ($(), ae(b(Lr), { key: 0, class: H(b(i).is("loading")) }, { default: q(() => [ Z(b(S2)) ]), _: 1 }, 8, ["class"])) : b(g) ? he(k.$slots, "active-action", { key: 1 }, () => [ k.activeActionIcon ? ($(), ae(b(Lr), { key: 0 }, { default: q(() => [ ($(), ae(dt(k.activeActionIcon))) ]), _: 1 })) : te("v-if", !0) ]) : b(g) ? te("v-if", !0) : he(k.$slots, "inactive-action", { key: 2 }, () => [ k.inactiveActionIcon ? ($(), ae(b(Lr), { key: 0 }, { default: q(() => [ ($(), ae(dt(k.inactiveActionIcon))) ]), _: 1 })) : te("v-if", !0) ]) ], 2) ], 6), !k.inlinePrompt && (k.activeIcon || k.activeText) ? ($(), B("span", { key: 1, class: H(b(p)) }, [ k.activeIcon ? ($(), ae(b(Lr), { key: 0 }, { default: q(() => [ ($(), ae(dt(k.activeIcon))) ]), _: 1 })) : te("v-if", !0), !k.activeIcon && k.activeText ? ($(), B("span", { key: 1, "aria-hidden": !b(g) }, _e(k.activeText), 9, ["aria-hidden"])) : te("v-if", !0) ], 2)) : te("v-if", !0) ], 10, ["onClick"])); } }); var iae = /* @__PURE__ */ yn(oae, [["__file", "switch.vue"]]); const SN = Xa(iae); function sae(e) { let t; const n = U(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { 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()) : (Yy(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), Yy(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, o(); } const u = G({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = Hee("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = nn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ nn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? nn("p", { class: p.b("text") }, [r.text]) : void 0; return nn(lr, { name: p.b("fade"), onAfterLeave: l }, { default: q(() => [ qe(Z("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ nn("div", { class: p.b("spinner") }, [g, y]) ]), [[ct, r.visible]]) ]) }); }; } }), c = Og(u), d = c.mount(document.createElement("div")); return { ...gr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Hm; const BC = function(e = {}) { if (!Br) return; const t = lae(e); if (t.fullscreen && Hm) return Hm; const n = sae({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (Hm = void 0); } }); uae(t, t.parent, n), y6(t, t.parent, n), t.parent.vLoadingAddClassList = () => y6(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), We(() => n.visible.value = t.visible), t.fullscreen && (Hm = n), n; }, lae = (e) => { var t, n, r, a; let o; return Oa(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, uae = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = Jh(document.body, "position"), n.originalOverflow.value = Jh(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = Jh(document.body, "position"), await We(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(Jh(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = Jh(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, y6 = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Yy(t, r.bm("parent", "relative")) : N8(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? N8(t, r.bm("parent", "hidden")) : Yy(t, r.bm("parent", "hidden")); }, ry = Symbol("ElLoading"), b6 = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => na(t.value) ? t.value[f] : void 0, l = (f) => { const h = Oa(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${qG(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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[ry] = { options: d, instance: BC(d) }; }, cae = (e, t) => { for (const n of Object.keys(t)) Kn(t[n]) && (t[n].value = e[n]); }, Cf = { mounted(e, t) { t.value && b6(e, t); }, updated(e, t) { const n = e[ry]; t.oldValue !== t.value && (t.value && !t.oldValue ? b6(e, t) : t.value && t.oldValue ? na(t.value) && cae(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[ry]) == null || t.instance.close(), e[ry] = null; } }, EN = { install(e) { e.directive("loading", Cf), e.config.globalProperties.$loading = BC; }, directive: Cf, service: BC }, el = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var w6; const br = typeof window < "u", dae = (e) => typeof e == "string", _N = () => { }, RC = br && ((w6 = window == null ? void 0 : window.navigator) == null ? void 0 : w6.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function TN(e) { return typeof e == "function" ? e() : b(e); } function pae(e) { return e; } function N2(e) { return xg() ? (lh(e), !0) : !1; } function fae(e, t = !0) { tt() ? nt(e) : t ? e() : We(e); } function pl(e) { var t; const n = TN(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const M2 = br ? window : void 0; function Wo(...e) { let t, n, r, a; if (dae(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = M2) : [t, n, r, a] = e, !t) return _N; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [pl(t), TN(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return N2(u), u; } let x6 = !1; function hae(e, t, n = {}) { const { window: r = M2, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; RC && !x6 && (x6 = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", _N))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = pl(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Wo(r, "click", (c) => { const d = pl(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: o }), Wo(r, "pointerdown", (c) => { const d = pl(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Wo(r, "blur", (c) => { var d; const f = pl(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 $N(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), fae(r, t), n; } const k6 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, C6 = "__vueuse_ssr_handlers__"; k6[C6] = k6[C6] || {}; var S6 = Object.getOwnPropertySymbols, vae = Object.prototype.hasOwnProperty, gae = Object.prototype.propertyIsEnumerable, mae = (e, t) => { var n = {}; for (var r in e) vae.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && S6) for (var r of S6(e)) t.indexOf(r) < 0 && gae.call(e, r) && (n[r] = e[r]); return n; }; function ol(e, t, n = {}) { const r = n, { window: a = M2 } = r, o = mae(r, ["window"]); let i; const s = $N(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => pl(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return N2(c), { isSupported: s, stop: c }; } var E6 = Object.getOwnPropertySymbols, yae = Object.prototype.hasOwnProperty, bae = Object.prototype.propertyIsEnumerable, wae = (e, t) => { var n = {}; for (var r in e) yae.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && E6) for (var r of E6(e)) t.indexOf(r) < 0 && bae.call(e, r) && (n[r] = e[r]); return n; }; function xae(e, t, n = {}) { const r = n, { window: a = M2 } = r, o = wae(r, ["window"]); let i; const s = $N(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => pl(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return N2(c), { isSupported: s, stop: c }; } var _6; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(_6 || (_6 = {})); var kae = Object.defineProperty, T6 = Object.getOwnPropertySymbols, Cae = Object.prototype.hasOwnProperty, Sae = Object.prototype.propertyIsEnumerable, $6 = (e, t, n) => t in e ? kae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Eae = (e, t) => { for (var n in t || (t = {})) Cae.call(t, n) && $6(e, n, t[n]); if (T6) for (var n of T6(t)) Sae.call(t, n) && $6(e, n, t[n]); return e; }; const _ae = { 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] }; Eae({ linear: pae }, _ae); const Tae = () => br && /firefox/i.test(window.navigator.userAgent), f4 = (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 x0 = () => { }, $ae = Object.prototype.hasOwnProperty, md = (e, t) => $ae.call(e, t), ao = Array.isArray, Wa = (e) => typeof e == "function", Fa = (e) => typeof e == "string", ra = (e) => e !== null && typeof e == "object", Oae = Object.prototype.toString, Fae = (e) => Oae.call(e), Wx = (e) => Fae(e).slice(8, -1), ON = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, Aae = /-(\w)/g, Iae = ON((e) => e.replace(Aae, (t, n) => n ? n.toUpperCase() : "")), Pae = /\B([A-Z])/g, Lae = ON( (e) => e.replace(Pae, "-$1").toLowerCase() ); var FN = typeof global == "object" && global && global.Object === Object && global, Nae = typeof self == "object" && self && self.Object === Object && self, Ms = FN || Nae || Function("return this")(), Cs = Ms.Symbol, AN = Object.prototype, Mae = AN.hasOwnProperty, Dae = AN.toString, tv = Cs ? Cs.toStringTag : void 0; function Bae(e) { var t = Mae.call(e, tv), n = e[tv]; try { e[tv] = void 0; var r = !0; } catch { } var a = Dae.call(e); return r && (t ? e[tv] = n : delete e[tv]), a; } var Rae = Object.prototype, zae = Rae.toString; function Vae(e) { return zae.call(e); } var jae = "[object Null]", Hae = "[object Undefined]", O6 = Cs ? Cs.toStringTag : void 0; function fh(e) { return e == null ? e === void 0 ? Hae : jae : O6 && O6 in Object(e) ? Bae(e) : Vae(e); } function Sf(e) { return e != null && typeof e == "object"; } var Uae = "[object Symbol]"; function D2(e) { return typeof e == "symbol" || Sf(e) && fh(e) == Uae; } function qae(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var Ui = Array.isArray, Wae = 1 / 0, F6 = Cs ? Cs.prototype : void 0, A6 = F6 ? F6.toString : void 0; function IN(e) { if (typeof e == "string") return e; if (Ui(e)) return qae(e, IN) + ""; if (D2(e)) return A6 ? A6.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Wae ? "-0" : t; } var Kae = /\s/; function Gae(e) { for (var t = e.length; t-- && Kae.test(e.charAt(t)); ) ; return t; } var Xae = /^\s+/; function Yae(e) { return e && e.slice(0, Gae(e) + 1).replace(Xae, ""); } function zu(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var I6 = NaN, Zae = /^[-+]0x[0-9a-f]+$/i, Qae = /^0b[01]+$/i, Jae = /^0o[0-7]+$/i, eoe = parseInt; function P6(e) { if (typeof e == "number") return e; if (D2(e)) return I6; if (zu(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = zu(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = Yae(e); var n = Qae.test(e); return n || Jae.test(e) ? eoe(e.slice(2), n ? 2 : 8) : Zae.test(e) ? I6 : +e; } function PN(e) { return e; } var toe = "[object AsyncFunction]", noe = "[object Function]", roe = "[object GeneratorFunction]", aoe = "[object Proxy]"; function LN(e) { if (!zu(e)) return !1; var t = fh(e); return t == noe || t == roe || t == toe || t == aoe; } var Kx = Ms["__core-js_shared__"], L6 = function() { var e = /[^.]+$/.exec(Kx && Kx.keys && Kx.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function ooe(e) { return !!L6 && L6 in e; } var ioe = Function.prototype, soe = ioe.toString; function Qd(e) { if (e != null) { try { return soe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var loe = /[\\^$.*+?()[\]{}|]/g, uoe = /^\[object .+?Constructor\]$/, coe = Function.prototype, doe = Object.prototype, poe = coe.toString, foe = doe.hasOwnProperty, hoe = RegExp( "^" + poe.call(foe).replace(loe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function voe(e) { if (!zu(e) || ooe(e)) return !1; var t = LN(e) ? hoe : uoe; return t.test(Qd(e)); } function goe(e, t) { return e == null ? void 0 : e[t]; } function Jd(e, t) { var n = goe(e, t); return voe(n) ? n : void 0; } var zC = Jd(Ms, "WeakMap"); function moe(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 yoe = 800, boe = 16, woe = Date.now; function xoe(e) { var t = 0, n = 0; return function() { var r = woe(), a = boe - (r - n); if (n = r, a > 0) { if (++t >= yoe) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function koe(e) { return function() { return e; }; } var eb = function() { try { var e = Jd(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), Coe = eb ? function(e, t) { return eb(e, "toString", { configurable: !0, enumerable: !1, value: koe(t), writable: !0 }); } : PN, Soe = xoe(Coe); function Eoe(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var _oe = 9007199254740991, Toe = /^(?:0|[1-9]\d*)$/; function h4(e, t) { var n = typeof e; return t = t ?? _oe, !!t && (n == "number" || n != "symbol" && Toe.test(e)) && e > -1 && e % 1 == 0 && e < t; } function $oe(e, t, n) { t == "__proto__" && eb ? eb(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function v4(e, t) { return e === t || e !== e && t !== t; } var Ooe = Object.prototype, Foe = Ooe.hasOwnProperty; function Aoe(e, t, n) { var r = e[t]; (!(Foe.call(e, t) && v4(r, n)) || n === void 0 && !(t in e)) && $oe(e, t, n); } var N6 = Math.max; function Ioe(e, t, n) { return t = N6(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = N6(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), moe(e, this, s); }; } var Poe = 9007199254740991; function g4(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Poe; } function Loe(e) { return e != null && g4(e.length) && !LN(e); } var Noe = Object.prototype; function Moe(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || Noe; return e === n; } function Doe(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var Boe = "[object Arguments]"; function M6(e) { return Sf(e) && fh(e) == Boe; } var NN = Object.prototype, Roe = NN.hasOwnProperty, zoe = NN.propertyIsEnumerable, m4 = M6(/* @__PURE__ */ function() { return arguments; }()) ? M6 : function(e) { return Sf(e) && Roe.call(e, "callee") && !zoe.call(e, "callee"); }; function Voe() { return !1; } var MN = typeof exports == "object" && exports && !exports.nodeType && exports, D6 = MN && typeof module == "object" && module && !module.nodeType && module, joe = D6 && D6.exports === MN, B6 = joe ? Ms.Buffer : void 0, Hoe = B6 ? B6.isBuffer : void 0, VC = Hoe || Voe, Uoe = "[object Arguments]", qoe = "[object Array]", Woe = "[object Boolean]", Koe = "[object Date]", Goe = "[object Error]", Xoe = "[object Function]", Yoe = "[object Map]", Zoe = "[object Number]", Qoe = "[object Object]", Joe = "[object RegExp]", eie = "[object Set]", tie = "[object String]", nie = "[object WeakMap]", rie = "[object ArrayBuffer]", aie = "[object DataView]", oie = "[object Float32Array]", iie = "[object Float64Array]", sie = "[object Int8Array]", lie = "[object Int16Array]", uie = "[object Int32Array]", cie = "[object Uint8Array]", die = "[object Uint8ClampedArray]", pie = "[object Uint16Array]", fie = "[object Uint32Array]", Qn = {}; Qn[oie] = Qn[iie] = Qn[sie] = Qn[lie] = Qn[uie] = Qn[cie] = Qn[die] = Qn[pie] = Qn[fie] = !0; Qn[Uoe] = Qn[qoe] = Qn[rie] = Qn[Woe] = Qn[aie] = Qn[Koe] = Qn[Goe] = Qn[Xoe] = Qn[Yoe] = Qn[Zoe] = Qn[Qoe] = Qn[Joe] = Qn[eie] = Qn[tie] = Qn[nie] = !1; function hie(e) { return Sf(e) && g4(e.length) && !!Qn[fh(e)]; } function vie(e) { return function(t) { return e(t); }; } var DN = typeof exports == "object" && exports && !exports.nodeType && exports, Kv = DN && typeof module == "object" && module && !module.nodeType && module, gie = Kv && Kv.exports === DN, Gx = gie && FN.process, R6 = function() { try { var e = Kv && Kv.require && Kv.require("util").types; return e || Gx && Gx.binding && Gx.binding("util"); } catch { } }(), z6 = R6 && R6.isTypedArray, BN = z6 ? vie(z6) : hie, mie = Object.prototype, yie = mie.hasOwnProperty; function bie(e, t) { var n = Ui(e), r = !n && m4(e), a = !n && !r && VC(e), o = !n && !r && !a && BN(e), i = n || r || a || o, s = i ? Doe(e.length, String) : [], l = s.length; for (var u in e) yie.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. h4(u, l))) && s.push(u); return s; } function wie(e, t) { return function(n) { return e(t(n)); }; } var xie = wie(Object.keys, Object), kie = Object.prototype, Cie = kie.hasOwnProperty; function Sie(e) { if (!Moe(e)) return xie(e); var t = []; for (var n in Object(e)) Cie.call(e, n) && n != "constructor" && t.push(n); return t; } function RN(e) { return Loe(e) ? bie(e) : Sie(e); } var Eie = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _ie = /^\w*$/; function y4(e, t) { if (Ui(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || D2(e) ? !0 : _ie.test(e) || !Eie.test(e) || t != null && e in Object(t); } var k0 = Jd(Object, "create"); function Tie() { this.__data__ = k0 ? k0(null) : {}, this.size = 0; } function $ie(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Oie = "__lodash_hash_undefined__", Fie = Object.prototype, Aie = Fie.hasOwnProperty; function Iie(e) { var t = this.__data__; if (k0) { var n = t[e]; return n === Oie ? void 0 : n; } return Aie.call(t, e) ? t[e] : void 0; } var Pie = Object.prototype, Lie = Pie.hasOwnProperty; function Nie(e) { var t = this.__data__; return k0 ? t[e] !== void 0 : Lie.call(t, e); } var Mie = "__lodash_hash_undefined__"; function Die(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = k0 && t === void 0 ? Mie : t, this; } function yd(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]); } } yd.prototype.clear = Tie; yd.prototype.delete = $ie; yd.prototype.get = Iie; yd.prototype.has = Nie; yd.prototype.set = Die; function Bie() { this.__data__ = [], this.size = 0; } function B2(e, t) { for (var n = e.length; n--; ) if (v4(e[n][0], t)) return n; return -1; } var Rie = Array.prototype, zie = Rie.splice; function Vie(e) { var t = this.__data__, n = B2(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : zie.call(t, n, 1), --this.size, !0; } function jie(e) { var t = this.__data__, n = B2(t, e); return n < 0 ? void 0 : t[n][1]; } function Hie(e) { return B2(this.__data__, e) > -1; } function Uie(e, t) { var n = this.__data__, r = B2(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Al(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]); } } Al.prototype.clear = Bie; Al.prototype.delete = Vie; Al.prototype.get = jie; Al.prototype.has = Hie; Al.prototype.set = Uie; var C0 = Jd(Ms, "Map"); function qie() { this.size = 0, this.__data__ = { hash: new yd(), map: new (C0 || Al)(), string: new yd() }; } function Wie(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function R2(e, t) { var n = e.__data__; return Wie(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function Kie(e) { var t = R2(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function Gie(e) { return R2(this, e).get(e); } function Xie(e) { return R2(this, e).has(e); } function Yie(e, t) { var n = R2(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, 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 = qie; Il.prototype.delete = Kie; Il.prototype.get = Gie; Il.prototype.has = Xie; Il.prototype.set = Yie; var Zie = "Expected a function"; function b4(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(Zie); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (b4.Cache || Il)(), n; } b4.Cache = Il; var Qie = 500; function Jie(e) { var t = b4(e, function(r) { return n.size === Qie && n.clear(), r; }), n = t.cache; return t; } var ese = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, tse = /\\(\\)?/g, nse = Jie(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(ese, function(n, r, a, o) { t.push(a ? o.replace(tse, "$1") : r || n); }), t; }); function rse(e) { return e == null ? "" : IN(e); } function z2(e, t) { return Ui(e) ? e : y4(e, t) ? [e] : nse(rse(e)); } var ase = 1 / 0; function Mg(e) { if (typeof e == "string" || D2(e)) return e; var t = e + ""; return t == "0" && 1 / e == -ase ? "-0" : t; } function w4(e, t) { t = z2(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[Mg(t[n++])]; return n && n == r ? e : void 0; } function ll(e, t, n) { var r = e == null ? void 0 : w4(e, t); return r === void 0 ? n : r; } function zN(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var V6 = Cs ? Cs.isConcatSpreadable : void 0; function ose(e) { return Ui(e) || m4(e) || !!(V6 && e && e[V6]); } function ise(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = ose), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? zN(a, s) : a[a.length] = s; } return a; } function sse(e) { var t = e == null ? 0 : e.length; return t ? ise(e) : []; } function lse(e) { return Soe(Ioe(e, void 0, sse), e + ""); } function yu() { if (!arguments.length) return []; var e = arguments[0]; return Ui(e) ? e : [e]; } function use() { this.__data__ = new Al(), this.size = 0; } function cse(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function dse(e) { return this.__data__.get(e); } function pse(e) { return this.__data__.has(e); } var fse = 200; function hse(e, t) { var n = this.__data__; if (n instanceof Al) { var r = n.__data__; if (!C0 || r.length < fse - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Il(r); } return n.set(e, t), this.size = n.size, this; } function gl(e) { var t = this.__data__ = new Al(e); this.size = t.size; } gl.prototype.clear = use; gl.prototype.delete = cse; gl.prototype.get = dse; gl.prototype.has = pse; gl.prototype.set = hse; function vse(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function gse() { return []; } var mse = Object.prototype, yse = mse.propertyIsEnumerable, j6 = Object.getOwnPropertySymbols, bse = j6 ? function(e) { return e == null ? [] : (e = Object(e), vse(j6(e), function(t) { return yse.call(e, t); })); } : gse; function wse(e, t, n) { var r = t(e); return Ui(e) ? r : zN(r, n(e)); } function H6(e) { return wse(e, RN, bse); } var jC = Jd(Ms, "DataView"), HC = Jd(Ms, "Promise"), UC = Jd(Ms, "Set"), U6 = "[object Map]", xse = "[object Object]", q6 = "[object Promise]", W6 = "[object Set]", K6 = "[object WeakMap]", G6 = "[object DataView]", kse = Qd(jC), Cse = Qd(C0), Sse = Qd(HC), Ese = Qd(UC), _se = Qd(zC), hu = fh; (jC && hu(new jC(new ArrayBuffer(1))) != G6 || C0 && hu(new C0()) != U6 || HC && hu(HC.resolve()) != q6 || UC && hu(new UC()) != W6 || zC && hu(new zC()) != K6) && (hu = function(e) { var t = fh(e), n = t == xse ? e.constructor : void 0, r = n ? Qd(n) : ""; if (r) switch (r) { case kse: return G6; case Cse: return U6; case Sse: return q6; case Ese: return W6; case _se: return K6; } return t; }); var X6 = Ms.Uint8Array, Tse = "__lodash_hash_undefined__"; function $se(e) { return this.__data__.set(e, Tse), this; } function Ose(e) { return this.__data__.has(e); } function tb(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Il(); ++t < n; ) this.add(e[t]); } tb.prototype.add = tb.prototype.push = $se; tb.prototype.has = Ose; function Fse(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 Ase(e, t) { return e.has(t); } var Ise = 1, Pse = 2; function VN(e, t, n, r, a, o) { var i = n & Ise, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & Pse ? new tb() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!Fse(t, function(g, y) { if (!Ase(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function Lse(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function Nse(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var Mse = 1, Dse = 2, Bse = "[object Boolean]", Rse = "[object Date]", zse = "[object Error]", Vse = "[object Map]", jse = "[object Number]", Hse = "[object RegExp]", Use = "[object Set]", qse = "[object String]", Wse = "[object Symbol]", Kse = "[object ArrayBuffer]", Gse = "[object DataView]", Y6 = Cs ? Cs.prototype : void 0, Xx = Y6 ? Y6.valueOf : void 0; function Xse(e, t, n, r, a, o, i) { switch (n) { case Gse: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case Kse: return !(e.byteLength != t.byteLength || !o(new X6(e), new X6(t))); case Bse: case Rse: case jse: return v4(+e, +t); case zse: return e.name == t.name && e.message == t.message; case Hse: case qse: return e == t + ""; case Vse: var s = Lse; case Use: var l = r & Mse; if (s || (s = Nse), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= Dse, i.set(e, t); var c = VN(s(e), s(t), r, a, o, i); return i.delete(e), c; case Wse: if (Xx) return Xx.call(e) == Xx.call(t); } return !1; } var Yse = 1, Zse = Object.prototype, Qse = Zse.hasOwnProperty; function Jse(e, t, n, r, a, o) { var i = n & Yse, s = H6(e), l = s.length, u = H6(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : Qse.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "constructor"); } if (v && !m) { var w = e.constructor, k = t.constructor; w != k && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof k == "function" && k instanceof k) && (v = !1); } return o.delete(e), o.delete(t), v; } var ele = 1, Z6 = "[object Arguments]", Q6 = "[object Array]", Um = "[object Object]", tle = Object.prototype, J6 = tle.hasOwnProperty; function nle(e, t, n, r, a, o) { var i = Ui(e), s = Ui(t), l = i ? Q6 : hu(e), u = s ? Q6 : hu(t); l = l == Z6 ? Um : l, u = u == Z6 ? Um : u; var c = l == Um, d = u == Um, f = l == u; if (f && VC(e)) { if (!VC(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new gl()), i || BN(e) ? VN(e, t, n, r, a, o) : Xse(e, t, l, n, r, a, o); if (!(n & ele)) { var h = c && J6.call(e, "__wrapped__"), p = d && J6.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new gl()), a(v, m, n, r, o); } } return f ? (o || (o = new gl()), Jse(e, t, n, r, a, o)) : !1; } function V2(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !Sf(e) && !Sf(t) ? e !== e && t !== t : nle(e, t, n, r, V2, a); } var rle = 1, ale = 2; function ole(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 gl(), d; if (!(d === void 0 ? V2(u, l, rle | ale, r, c) : d)) return !1; } } return !0; } function jN(e) { return e === e && !zu(e); } function ile(e) { for (var t = RN(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, jN(a)]; } return t; } function HN(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function sle(e) { var t = ile(e); return t.length == 1 && t[0][2] ? HN(t[0][0], t[0][1]) : function(n) { return n === e || ole(n, e, t); }; } function lle(e, t) { return e != null && t in Object(e); } function ule(e, t, n) { t = z2(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = Mg(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && g4(a) && h4(i, a) && (Ui(e) || m4(e))); } function UN(e, t) { return e != null && ule(e, t, lle); } var cle = 1, dle = 2; function ple(e, t) { return y4(e) && jN(t) ? HN(Mg(e), t) : function(n) { var r = ll(n, e); return r === void 0 && r === t ? UN(n, e) : V2(t, r, cle | dle); }; } function fle(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function hle(e) { return function(t) { return w4(t, e); }; } function vle(e) { return y4(e) ? fle(Mg(e)) : hle(e); } function gle(e) { return typeof e == "function" ? e : e == null ? PN : typeof e == "object" ? Ui(e) ? ple(e[0], e[1]) : sle(e) : vle(e); } var Yx = function() { return Ms.Date.now(); }, mle = "Expected a function", yle = Math.max, ble = Math.min; function qN(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(mle); t = P6(t) || 0, zu(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? yle(P6(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? ble(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Yx(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Yx()); } function k() { var C = Yx(), S = m(C); if (r = arguments, a = this, l = C, 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 k.cancel = x, k.flush = w, k; } function wle(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return Eoe(e, gle(t), a); } function nb(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function rb(e, t) { return V2(e, t); } function Pu(e) { return e == null; } function xle(e) { return e === void 0; } function kle(e, t, n, r) { if (!zu(e)) return e; t = z2(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = Mg(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = zu(c) ? c : h4(t[a + 1]) ? [] : {}); } Aoe(s, l, u), s = s[l]; } return e; } function Cle(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = w4(e, i); n(s, i) && kle(o, z2(i, e), s); } return o; } function Sle(e, t) { return Cle(e, t, function(n, r) { return UN(e, r); }); } var WN = lse(function(e, t) { return e == null ? {} : Sle(e, t); }); const Eu = (e) => e === void 0, Ef = (e) => typeof e == "boolean", aa = (e) => typeof e == "number", td = (e) => typeof Element > "u" ? !1 : e instanceof Element, ab = (e) => Pu(e), Ele = (e) => Fa(e) ? !Number.isNaN(Number(e)) : !1, _le = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), eT = (e) => Object.keys(e); let KN = class extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } }; function Tle(e, t) { throw new KN(`[${e}] ${t}`); } function wr(e, t) { if (process.env.NODE_ENV !== "production") { const n = Fa(e) ? new KN(`[${e}] ${t}`) : e; console.warn(n); } } const $le = "utils/dom/style", GN = (e = "") => e.split(" ").filter((t) => !!t.trim()), qC = (e, t) => { !e || !t.trim() || e.classList.add(...GN(t)); }, nd = (e, t) => { !e || !t.trim() || e.classList.remove(...GN(t)); }, nv = (e, t) => { var n; if (!br || !e || !t) return ""; let r = Iae(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function _f(e, t = "px") { if (!e) return ""; if (aa(e) || Ele(e)) return `${e}${t}`; if (Fa(e)) return e; wr($le, "binding value must be a string or number"); } function Ole(e, t) { if (!br) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var Fle = /* @__PURE__ */ G({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), j2 = Fle, Ale = /* @__PURE__ */ G({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), XN = Ale, Ile = /* @__PURE__ */ G({ name: "CaretRight", __name: "caret-right", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("path", { fill: "currentColor", d: "M384 192v640l384-320.064z" }) ])); } }), Ple = Ile, Lle = /* @__PURE__ */ G({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), Nle = Lle, Mle = /* @__PURE__ */ G({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), x4 = Mle, Dle = /* @__PURE__ */ G({ name: "Close", __name: "close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), ob = Dle, Ble = /* @__PURE__ */ G({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), Rle = Ble, zle = /* @__PURE__ */ G({ name: "Delete", __name: "delete", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), Vle = zle, jle = /* @__PURE__ */ G({ name: "Edit", __name: "edit", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), Hle = jle, Ule = /* @__PURE__ */ G({ name: "Finished", __name: "finished", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), qle = Ule, Wle = /* @__PURE__ */ G({ name: "Hide", __name: "hide", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), Kle = Wle, Gle = /* @__PURE__ */ G({ name: "Loading", __name: "loading", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), k4 = Gle, Xle = /* @__PURE__ */ G({ name: "Notebook", __name: "notebook", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("path", { fill: "currentColor", d: "M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32" }), K("path", { fill: "currentColor", d: "M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32" }) ])); } }), Yle = Xle, Zle = /* @__PURE__ */ G({ name: "View", __name: "view", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), Qle = Zle, Jle = /* @__PURE__ */ G({ name: "Warning", __name: "warning", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), eue = Jle; const YN = "__epPropKey", Ot = (e) => e, tue = (e) => ra(e) && !!e[YN], H2 = (e, t) => { if (!ra(e) || tue(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), md(e, "default") && c.push(a), 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(", "); kg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [YN]: !0 }; return md(e, "default") && (s.default = a), s; }, Pn = (e) => nb(Object.entries(e).map(([t, n]) => [ t, H2(n, t) ])), Vu = Ot([ String, Object, Function ]), ZN = { validating: k4, success: Nle, error: x4 }, Xr = (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; }, nue = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Pl = (e) => (e.install = x0, e), Ir = { 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" }, Jr = "update:modelValue", C4 = "change", QN = ["", "default", "small", "large"], rue = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Up = (e) => e, aue = ["class", "style"], oue = /^on[A-Z]/, iue = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = O(() => ((n == null ? void 0 : n.value) || []).concat(aue)), a = tt(); return a ? O(() => { var o; return nb(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && oue.test(i)))); }) : (wr("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), O(() => ({}))); }, ay = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && wr(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var sue = { 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 lue = (e) => (t, n) => uue(t, n, b(e)), uue = (e, t, n) => ll(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), cue = (e) => { const t = O(() => b(e).name), n = Kn(e) ? e : U(e); return { lang: t, locale: n, t: lue(e) }; }, JN = Symbol("localeContextKey"), Dg = (e) => { const t = e || $e(JN, U()); return cue(O(() => t.value || sue)); }, oy = "el", due = "is-", Ec = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, eM = Symbol("namespaceContextKey"), S4 = (e) => { const t = e || (tt() ? $e(eM, U(oy)) : U(oy)); return O(() => b(t) || oy); }, Wt = (e, t) => { const n = S4(t); return { namespace: n, b: (r = "") => Ec(n.value, e, r, "", ""), e: (r) => r ? Ec(n.value, e, "", r, "") : "", m: (r) => r ? Ec(n.value, e, "", "", r) : "", be: (r, a) => r && a ? Ec(n.value, e, r, a, "") : "", em: (r, a) => r && a ? Ec(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? Ec(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? Ec(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${due}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, pue = H2({ type: Ot(Boolean), default: null }), fue = H2({ type: Ot(Function) }), hue = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: pue, [n]: fue }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = O(() => Wa(h[n])), v = O(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Wa(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Wa(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Wa(l) && !l()) return; const S = p.value && br; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !br) return; const S = p.value && br; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { Ef(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, tM = (e) => { const t = tt(); return O(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var lo = "top", ai = "bottom", oi = "right", uo = "left", E4 = "auto", Bg = [lo, ai, oi, uo], Tf = "start", S0 = "end", vue = "clippingParents", nM = "viewport", rv = "popper", gue = "reference", tT = Bg.reduce(function(e, t) { return e.concat([t + "-" + Tf, t + "-" + S0]); }, []), U2 = [].concat(Bg, [E4]).reduce(function(e, t) { return e.concat([t, t + "-" + Tf, t + "-" + S0]); }, []), mue = "beforeRead", yue = "read", bue = "afterRead", wue = "beforeMain", xue = "main", kue = "afterMain", Cue = "beforeWrite", Sue = "write", Eue = "afterWrite", _ue = [mue, yue, bue, wue, xue, kue, Cue, Sue, Eue]; function Ss(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Wi(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function $f(e) { var t = Wi(e).Element; return e instanceof t || e instanceof Element; } function Zo(e) { var t = Wi(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function _4(e) { if (typeof ShadowRoot > "u") return !1; var t = Wi(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function Tue(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Zo(o) || !Ss(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function $ue(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 a = t.elements[r], o = 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; }, {}); !Zo(a) || !Ss(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var rM = { name: "applyStyles", enabled: !0, phase: "write", fn: Tue, effect: $ue, requires: ["computeStyles"] }; function vs(e) { return e.split("-")[0]; } var rd = Math.max, ib = Math.min, Of = Math.round; function Ff(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (Zo(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Of(n.width) / i || 1), o > 0 && (a = Of(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function T4(e) { var t = Ff(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 aM(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && _4(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function bl(e) { return Wi(e).getComputedStyle(e); } function Oue(e) { return ["table", "td", "th"].indexOf(Ss(e)) >= 0; } function sc(e) { return (($f(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function q2(e) { return Ss(e) === "html" ? e : e.assignedSlot || e.parentNode || (_4(e) ? e.host : null) || sc(e); } function nT(e) { return !Zo(e) || bl(e).position === "fixed" ? null : e.offsetParent; } function Fue(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Zo(e)) { var r = bl(e); if (r.position === "fixed") return null; } var a = q2(e); for (_4(a) && (a = a.host); Zo(a) && ["html", "body"].indexOf(Ss(a)) < 0; ) { var o = bl(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function Rg(e) { for (var t = Wi(e), n = nT(e); n && Oue(n) && bl(n).position === "static"; ) n = nT(n); return n && (Ss(n) === "html" || Ss(n) === "body" && bl(n).position === "static") ? t : n || Fue(e) || t; } function $4(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Gv(e, t, n) { return rd(e, ib(t, n)); } function Aue(e, t, n) { var r = Gv(e, t, n); return r > n ? n : r; } function oM() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function iM(e) { return Object.assign({}, oM(), e); } function sM(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var Iue = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, iM(typeof e != "number" ? e : sM(e, Bg)); }; function Pue(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = vs(n.placement), l = $4(s), u = [uo, oi].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = Iue(a.padding, n), f = T4(o), h = l === "y" ? lo : uo, p = l === "y" ? ai : oi, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = Rg(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = Gv(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function Lue(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !aM(t.elements.popper, a) || (t.elements.arrow = a)); } var Nue = { name: "arrow", enabled: !0, phase: "main", fn: Pue, effect: Lue, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Af(e) { return e.split("-")[1]; } var Mue = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function Due(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: Of(t * a) / a || 0, y: Of(n * a) / a || 0 }; } function rT(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = 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"), y = i.hasOwnProperty("y"), x = uo, w = lo, k = window; if (u) { var C = Rg(n), S = "clientHeight", _ = "clientWidth"; if (C === Wi(n) && (C = sc(n), bl(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === lo || (a === uo || a === oi) && o === S0) { w = ai; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === uo || (a === lo || a === ai) && o === S0) { x = oi; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && Mue), I = c === !0 ? Due({ x: h, y: v }) : { x: h, y: v }; if (h = I.x, v = I.y, l) { var N; return Object.assign({}, A, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, A, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function Bue(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: vs(t.placement), variation: Af(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, rT(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, rT(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 lM = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: Bue, data: {} }, qm = { passive: !0 }; function Rue(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Wi(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, qm); }), s && l.addEventListener("resize", n.update, qm), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, qm); }), s && l.removeEventListener("resize", n.update, qm); }; } var uM = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: Rue, data: {} }, zue = { left: "right", right: "left", bottom: "top", top: "bottom" }; function iy(e) { return e.replace(/left|right|bottom|top/g, function(t) { return zue[t]; }); } var Vue = { start: "end", end: "start" }; function aT(e) { return e.replace(/start|end/g, function(t) { return Vue[t]; }); } function O4(e) { var t = Wi(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function F4(e) { return Ff(sc(e)).left + O4(e).scrollLeft; } function jue(e) { var t = Wi(e), n = sc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + F4(e), y: s }; } function Hue(e) { var t, n = sc(e), r = O4(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = rd(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = rd(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + F4(e), l = -r.scrollTop; return bl(a || n).direction === "rtl" && (s += rd(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function A4(e) { var t = bl(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function cM(e) { return ["html", "body", "#document"].indexOf(Ss(e)) >= 0 ? e.ownerDocument.body : Zo(e) && A4(e) ? e : cM(q2(e)); } function Xv(e, t) { var n; t === void 0 && (t = []); var r = cM(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Wi(r), i = a ? [o].concat(o.visualViewport || [], A4(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(Xv(q2(i))); } function WC(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function Uue(e) { var t = Ff(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 oT(e, t) { return t === nM ? WC(jue(e)) : $f(t) ? Uue(t) : WC(Hue(sc(e))); } function que(e) { var t = Xv(q2(e)), n = ["absolute", "fixed"].indexOf(bl(e).position) >= 0, r = n && Zo(e) ? Rg(e) : e; return $f(r) ? t.filter(function(a) { return $f(a) && aM(a, r) && Ss(a) !== "body"; }) : []; } function Wue(e, t, n) { var r = t === "clippingParents" ? que(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = oT(e, l); return s.top = rd(u.top, s.top), s.right = ib(u.right, s.right), s.bottom = ib(u.bottom, s.bottom), s.left = rd(u.left, s.left), s; }, oT(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function dM(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? vs(r) : null, o = r ? Af(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case lo: l = { x: i, y: t.y - n.height }; break; case ai: l = { x: i, y: t.y + t.height }; break; case oi: l = { x: t.x + t.width, y: s }; break; case uo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? $4(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case Tf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case S0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function E0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? vue : o, s = n.rootBoundary, l = s === void 0 ? nM : s, u = n.elementContext, c = u === void 0 ? rv : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = iM(typeof p != "number" ? p : sM(p, Bg)), m = c === rv ? gue : rv, g = e.rects.popper, y = e.elements[f ? m : c], x = Wue($f(y) ? y : y.contextElement || sc(e.elements.popper), i, l), w = Ff(e.elements.reference), k = dM({ reference: w, element: g, strategy: "absolute", placement: a }), C = WC(Object.assign({}, g, k)), S = c === rv ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === rv && T) { var F = T[a]; Object.keys(_).forEach(function(A) { var I = [oi, ai].indexOf(A) >= 0 ? 1 : -1, N = [lo, ai].indexOf(A) >= 0 ? "y" : "x"; _[A] += F[N] * I; }); } return _; } function Kue(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? U2 : l, c = Af(r), d = c ? s ? tT : tT.filter(function(p) { return Af(p) === c; }) : Bg, 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] = E0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[vs(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function Gue(e) { if (vs(e) === E4) return []; var t = iy(e); return [aT(e), t, aT(t)]; } function Xue(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = vs(m), y = g === m, x = l || (y || !p ? [iy(m)] : Gue(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(vs(ge) === E4 ? Kue(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], F = 0; F < w.length; F++) { var A = w[F], I = vs(A), N = Af(A) === Tf, L = [lo, ai].indexOf(I) >= 0, z = L ? "width" : "height", P = E0(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), D = L ? N ? oi : uo : N ? ai : lo; k[z] > C[z] && (D = iy(D)); var M = iy(D), V = []; if (o && V.push(P[I] <= 0), s && V.push(P[D] <= 0, P[M] <= 0), V.every(function(ve) { return ve; })) { T = A, _ = !1; break; } S.set(A, V); } if (_) for (var Q = p ? 3 : 1, X = function(ve) { var ge = w.find(function(se) { var ne = S.get(se); if (ne) return ne.slice(0, ve).every(function(W) { return W; }); }); if (ge) return T = ge, "break"; }, ee = Q; ee > 0; ee--) { var ue = X(ee); if (ue === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var Yue = { name: "flip", enabled: !0, phase: "main", fn: Xue, requiresIfExists: ["offset"], data: { _skip: !1 } }; function iT(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 sT(e) { return [lo, oi, ai, uo].some(function(t) { return e[t] >= 0; }); } function Zue(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = E0(t, { elementContext: "reference" }), s = E0(t, { altBoundary: !0 }), l = iT(i, r), u = iT(s, a, o), c = sT(l), d = sT(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 Que = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: Zue }; function Jue(e, t, n) { var r = vs(e), a = [uo, lo].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [uo, oi].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function ece(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = U2.reduce(function(c, d) { return c[d] = Jue(d, t.rects, o), 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 tce = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: ece }; function nce(e) { var t = e.state, n = e.name; t.modifiersData[n] = dM({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var pM = { name: "popperOffsets", enabled: !0, phase: "read", fn: nce, data: {} }; function rce(e) { return e === "x" ? "y" : "x"; } function ace(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = E0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = vs(t.placement), y = Af(t.placement), x = !y, w = $4(g), k = rce(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, I = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? lo : uo, z = w === "y" ? ai : oi, P = w === "y" ? "height" : "width", D = C[w], M = D + m[L], V = D - m[z], Q = h ? -_[P] / 2 : 0, X = y === Tf ? S[P] : _[P], ee = y === Tf ? -_[P] : -S[P], ue = t.elements.arrow, ve = h && ue ? T4(ue) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : oM(), se = ge[L], ne = ge[z], W = Gv(0, S[P], ve[P]), Y = x ? S[P] / 2 - Q - W - se - F.mainAxis : X - W - se - F.mainAxis, re = x ? -S[P] / 2 + Q + W + ne + F.mainAxis : ee + W + ne + F.mainAxis, we = t.elements.arrow && Rg(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = A == null ? void 0 : A[w]) != null ? N : 0, xe = D + Y - Ne - Oe, Fe = D + re - Ne, Se = Gv(h ? ib(M, xe) : M, D, h ? rd(V, Fe) : V); C[w] = Se, I[w] = Se - D; } if (s) { var Pe, Me = w === "x" ? lo : uo, He = w === "x" ? ai : oi, De = C[k], Xe = k === "y" ? "height" : "width", Ge = De + m[Me], Ze = De - m[He], E = [lo, uo].indexOf(g) !== -1, j = (Pe = A == null ? void 0 : A[k]) != null ? Pe : 0, le = E ? Ge : De - S[Xe] - _[Xe] - j + F.altAxis, ce = E ? De + S[Xe] + _[Xe] - j - F.altAxis : Ze, oe = h && E ? Aue(le, De, ce) : Gv(h ? le : Ge, De, h ? ce : Ze); C[k] = oe, I[k] = oe - De; } t.modifiersData[r] = I; } } var oce = { name: "preventOverflow", enabled: !0, phase: "main", fn: ace, requiresIfExists: ["offset"] }; function ice(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function sce(e) { return e === Wi(e) || !Zo(e) ? O4(e) : ice(e); } function lce(e) { var t = e.getBoundingClientRect(), n = Of(t.width) / e.offsetWidth || 1, r = Of(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function uce(e, t, n) { n === void 0 && (n = !1); var r = Zo(t), a = Zo(t) && lce(t), o = sc(t), i = Ff(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Ss(t) !== "body" || A4(o)) && (s = sce(t)), Zo(t) ? (l = Ff(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = F4(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function cce(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function dce(e) { var t = cce(e); return _ue.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function pce(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function fce(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var lT = { placement: "bottom", modifiers: [], strategy: "absolute" }; function uT() { 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 I4(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? lT : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, lT, o), 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({}, o, u.options, m), u.scrollParents = { reference: $f(i) ? Xv(i) : i.contextElement ? Xv(i.contextElement) : [], popper: Xv(s) }; var g = dce(fce([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (uT(m, g)) { u.rects = { reference: uce(m, Rg(g), u.options.strategy === "fixed"), popper: T4(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: pce(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!uT(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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } I4(); var hce = [uM, pM, lM, rM]; I4({ defaultModifiers: hce }); var vce = [uM, pM, lM, rM, tce, Yue, oce, Nue, Que], gce = I4({ defaultModifiers: vce }); const mce = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = yce(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = O(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = un(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = gce(l, u, b(a))); }), Ct(() => { s(); }), { state: O(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: O(() => b(i).styles), attributes: O(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: O(() => b(o)) }; }; function yce(e) { const t = Object.keys(e.elements), n = nb(t.map((a) => [a, e.styles[a] || {}])), r = nb(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function cT() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return N2(() => n()), { registerTimeout: t, cancelTimeout: n }; } const KC = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, bce = Symbol("elIdInjection"), fM = () => tt() ? $e(bce, KC) : KC, W2 = (e) => { const t = fM(); !br && t === KC && wr("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 = S4(); return O(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let qp = []; const dT = (e) => { const t = e; t.key === Ir.esc && qp.forEach((n) => n(t)); }, wce = (e) => { nt(() => { qp.length === 0 && document.addEventListener("keydown", dT), br && qp.push(e); }), Ct(() => { qp = qp.filter((t) => t !== e), qp.length === 0 && br && document.removeEventListener("keydown", dT); }); }; let pT; const hM = () => { const e = S4(), t = fM(), n = O(() => `${e.value}-popper-container-${t.prefix}`), r = O(() => `#${n.value}`); return { id: n, selector: r }; }, xce = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, kce = () => { const { id: e, selector: t } = hM(); return Cg(() => { br && (process.env.NODE_ENV === "test" || !pT || !document.body.querySelector(t.value)) && (pT = xce(e.value)); }), { id: e, selector: t }; }, Cce = Pn({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), Sce = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = cT(), { registerTimeout: i, cancelTimeout: s } = cT(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); aa(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, vM = Symbol("elForwardRef"), Ece = (e) => { rt(vM, { setForwardRef: (t) => { e.value = t; } }); }, _ce = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), fT = { current: 0 }, hT = U(0), gM = 2e3, vT = Symbol("elZIndexContextKey"), mM = Symbol("zIndexContextKey"), yM = (e) => { const t = tt() ? $e(vT, fT) : fT, n = e || (tt() ? $e(mM, void 0) : void 0), r = O(() => { const i = b(n); return aa(i) ? i : gM; }), a = O(() => r.value + hT.value), o = () => (t.current++, hT.value = t.current, a.value); return !br && !$e(vT) && wr("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: a, nextZIndex: o }; }; function Tce(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const hh = H2({ type: String, values: QN, required: !1 }), bM = Symbol("size"), $ce = () => { const e = $e(bM, {}); return O(() => b(e.size) || ""); }; function P4(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = un(), l = U(!1), u = (f) => { Wa(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; Wa(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (l.value = !1, i("blur", f), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Wo(s, "focus", u, !0), Wo(s, "blur", c, !0), Wo(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = td(e.value) ? e.value : document.querySelector("input,textarea"); f && (Wo(f, "focus", u, !0), Wo(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function wM({ afterComposition: e, emit: t }) { const n = U(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, a = (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 = !rue(u); }, o = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, We(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? o(i) : a(i); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const xM = Symbol("emptyValuesContextKey"), Oce = "use-empty-values", Fce = ["", void 0, null], Ace = void 0, Ice = Pn({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Wa(e) ? !e() : !e } }), Pce = (e, t) => { const n = tt() ? $e(xM, U({})) : U({}), r = O(() => e.emptyValues || n.value.emptyValues || Fce), a = O(() => Wa(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Wa(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : Ace), o = (i) => r.value.includes(i); return r.value.includes(a.value) || wr(Oce, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, Lce = Pn({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), lc = (e) => WN(Lce, e), kM = Symbol(), sb = U(); function L4(e, t = void 0) { const n = tt() ? $e(kM, sb) : sb; return e ? O(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function Nce(e, t) { const n = L4(), r = Wt(e, O(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || oy; })), a = Dg(O(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = yM(O(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || gM; })), i = O(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return Mce(O(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const Mce = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? L4() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { wr("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = O(() => { const l = b(e); return o != null && o.value ? Dce(o.value, l) : l; }); return i(kM, s), i(JN, O(() => s.value.locale)), i(eM, O(() => s.value.namespace)), i(mM, O(() => s.value.zIndex)), i(bM, { size: O(() => s.value.size || "") }), i(xM, O(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !sb.value) && (sb.value = s.value), s; }, Dce = (e, t) => { const n = [.../* @__PURE__ */ new Set([...eT(e), ...eT(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var Ht = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const Bce = Pn({ size: { type: Ot([Number, String]) }, color: { type: String } }), Rce = G({ name: "ElIcon", inheritAttrs: !1 }), zce = /* @__PURE__ */ G({ ...Rce, props: Bce, setup(e) { const t = e, n = Wt("icon"), r = O(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: Eu(a) ? void 0 : _f(a), "--color": o }; }); return (a, o) => ($(), B("i", Dt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var Vce = /* @__PURE__ */ Ht(zce, [["__file", "icon.vue"]]); const Ta = Xr(Vce), N4 = Symbol("formContextKey"), _0 = Symbol("formItemContextKey"), bd = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : tM("size"), a = t.global ? n : $ce(), o = t.form ? { size: void 0 } : $e(N4, void 0), i = t.formItem ? { size: void 0 } : $e(_0, void 0); return O(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, zg = (e) => { const t = tM("disabled"), n = $e(N4, void 0); return O(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, ep = () => { const e = $e(N4, void 0), t = $e(_0, void 0); return { form: e, formItem: t }; }, Vg = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = O(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([Pt(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : W2().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), d2(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let yi; const jce = ` height:0 !important; visibility:hidden !important; ${Tae() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, Hce = [ "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 Uce(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: Hce.map((o) => `${o}:${t.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function gT(e, t = 1, n) { var r; yi || (yi = document.createElement("textarea"), document.body.appendChild(yi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = Uce(e); yi.setAttribute("style", `${s};${jce}`), yi.value = e.value || e.placeholder || ""; let l = yi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), yi.value = ""; const c = yi.scrollHeight - a; if (aa(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (aa(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = yi.parentNode) == null || r.removeChild(yi), yi = void 0, u; } const qce = Pn({ id: { type: String, default: void 0 }, size: hh, disabled: Boolean, modelValue: { type: Ot([ 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: Ot([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: Vu }, prefixIcon: { type: Vu }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: Ot([Object, Array, String]), default: () => Up({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...lc(["ariaLabel"]) }), Wce = { [Jr]: (e) => Fa(e), input: (e) => Fa(e), change: (e) => Fa(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 }, Kce = G({ name: "ElInput", inheritAttrs: !1 }), Gce = /* @__PURE__ */ G({ ...Kce, props: qce, emits: Wce, setup(e, { expose: t, emit: n }) { const r = e, a = uh(), o = _r(), i = O(() => { const E = {}; return r.containerRole === "combobox" && (E["aria-haspopup"] = a["aria-haspopup"], E["aria-owns"] = a["aria-owns"], E["aria-expanded"] = a["aria-expanded"]), E; }), s = O(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", ue.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: V.value && Q.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = O(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = iue({ excludeKeys: O(() => Object.keys(i.value)) }), { form: c, formItem: d } = ep(), { inputId: f } = Vg(r, { formItemContext: d }), h = bd(), p = zg(), v = Wt("input"), m = Wt("textarea"), g = un(), y = un(), x = U(!1), w = U(!1), k = U(), C = un(r.inputStyle), S = O(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: F, handleBlur: A } = P4(S, { beforeFocus() { return p.value; }, afterBlur() { var E; r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "blur").catch((j) => wr(j))); } }), I = O(() => { var E; return (E = c == null ? void 0 : c.statusIcon) != null ? E : !1; }), N = O(() => (d == null ? void 0 : d.validateState) || ""), L = O(() => N.value && ZN[N.value]), z = O(() => w.value ? Qle : Kle), P = O(() => [ a.style ]), D = O(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = O(() => Pu(r.modelValue) ? "" : String(r.modelValue)), V = O(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Q = O(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), X = O(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ee = O(() => M.value.length), ue = O(() => !!X.value && ee.value > Number(r.maxlength)), ve = O(() => !!o.suffix || !!r.suffixIcon || V.value || r.showPassword || X.value || !!N.value && I.value), [ge, se] = Tce(g); ol(y, (E) => { if (W(), !X.value || r.resize !== "both") return; const j = E[0], { width: le } = j.contentRect; k.value = { right: `calc(100% - ${le + 15 + 6}px)` }; }); const ne = () => { const { type: E, autosize: j } = r; if (!(!br || E !== "textarea" || !y.value)) if (j) { const le = ra(j) ? j.minRows : void 0, ce = ra(j) ? j.maxRows : void 0, oe = gT(y.value, le, ce); C.value = { overflowY: "hidden", ...oe }, We(() => { y.value.offsetHeight, C.value = oe; }); } else C.value = { minHeight: gT(y.value).minHeight }; }, W = /* @__PURE__ */ ((E) => { let j = !1; return () => { var le; j || !r.autosize || ((le = y.value) == null ? void 0 : le.offsetParent) === null || (E(), j = !0); }; })(ne), Y = () => { const E = S.value, j = r.formatter ? r.formatter(M.value) : M.value; !E || E.value === j || (E.value = j); }, re = async (E) => { ge(); let { value: j } = E.target; if (r.formatter && (j = r.parser ? r.parser(j) : j), !Oe.value) { if (j === M.value) { Y(); return; } n(Jr, j), n("input", j), await We(), Y(), se(); } }, we = (E) => { n("change", E.target.value); }, { isComposing: Oe, handleCompositionStart: Ne, handleCompositionUpdate: xe, handleCompositionEnd: Fe } = wM({ emit: n, afterComposition: re }), Se = () => { w.value = !w.value, Pe(); }, Pe = async () => { var E; await We(), (E = S.value) == null || E.focus(); }, Me = () => { var E; return (E = S.value) == null ? void 0 : E.blur(); }, He = (E) => { x.value = !1, n("mouseleave", E); }, De = (E) => { x.value = !0, n("mouseenter", E); }, Xe = (E) => { n("keydown", E); }, Ge = () => { var E; (E = S.value) == null || E.select(); }, Ze = () => { n(Jr, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var E; We(() => ne()), r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "change").catch((j) => wr(j))); }), be(M, () => Y()), be(() => r.type, async () => { await We(), Y(), ne(); }), nt(() => { !r.formatter && r.parser && wr("ElInput", "If you set the parser, you also need to set the formatter."), Y(), We(ne); }), t({ input: g, textarea: y, ref: S, textareaStyle: D, autosize: Pt(r, "autosize"), isComposing: Oe, focus: Pe, blur: Me, select: Ge, clear: Ze, resizeTextarea: ne }), (E, j) => ($(), B("div", Dt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: E.$slots.append, [b(v).bm("group", "prepend")]: E.$slots.prepend } ], style: b(P), role: E.containerRole, onMouseenter: De, onMouseleave: He }), [ te(" input "), E.type !== "textarea" ? ($(), B(Ue, { key: 0 }, [ te(" prepend slot "), E.$slots.prepend ? ($(), B("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(E.$slots, "prepend") ], 2)) : te("v-if", !0), K("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ te(" prefix slot "), E.$slots.prefix || E.prefixIcon ? ($(), B("span", { key: 0, class: H(b(v).e("prefix")) }, [ K("span", { class: H(b(v).e("prefix-inner")) }, [ he(E.$slots, "prefix"), E.prefixIcon ? ($(), ae(b(Ta), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(E.prefixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0), K("input", Dt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: E.minlength, maxlength: E.maxlength, type: E.showPassword ? w.value ? "text" : "password" : E.type, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, tabindex: E.tabindex, "aria-label": E.ariaLabel, placeholder: E.placeholder, style: E.inputStyle, form: E.form, autofocus: E.autofocus, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b(Fe), onInput: re, onChange: we, onKeydown: Xe }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), te(" suffix slot "), b(ve) ? ($(), B("span", { key: 1, class: H(b(v).e("suffix")) }, [ K("span", { class: H(b(v).e("suffix-inner")) }, [ !b(V) || !b(Q) || !b(X) ? ($(), B(Ue, { key: 0 }, [ he(E.$slots, "suffix"), E.suffixIcon ? ($(), ae(b(Ta), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(E.suffixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 64)) : te("v-if", !0), b(V) ? ($(), ae(b(Ta), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: et(b(x0), ["prevent"]), onClick: Ze }, { default: q(() => [ Z(b(x4)) ]), _: 1 }, 8, ["class", "onMousedown"])) : te("v-if", !0), b(Q) ? ($(), ae(b(Ta), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Se }, { default: q(() => [ ($(), ae(dt(b(z)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), b(X) ? ($(), B("span", { key: 3, class: H(b(v).e("count")) }, [ K("span", { class: H(b(v).e("count-inner")) }, _e(b(ee)) + " / " + _e(E.maxlength), 3) ], 2)) : te("v-if", !0), b(N) && b(L) && b(I) ? ($(), ae(b(Ta), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: q(() => [ ($(), ae(dt(b(L)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0) ], 2), te(" append slot "), E.$slots.append ? ($(), B("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(E.$slots, "append") ], 2)) : te("v-if", !0) ], 64)) : ($(), B(Ue, { key: 1 }, [ te(" textarea "), K("textarea", Dt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: E.minlength, maxlength: E.maxlength, tabindex: E.tabindex, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, style: b(D), "aria-label": E.ariaLabel, placeholder: E.placeholder, form: E.form, autofocus: E.autofocus, rows: E.rows, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b(Fe), onInput: re, onFocus: b(F), onBlur: b(A), onChange: we, onKeydown: Xe }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(X) ? ($(), B("span", { key: 0, style: Qe(k.value), class: H(b(v).e("count")) }, _e(b(ee)) + " / " + _e(E.maxlength), 7)) : te("v-if", !0) ], 64)) ], 16, ["role"])); } }); var Xce = /* @__PURE__ */ Ht(Gce, [["__file", "input.vue"]]); const jg = Xr(Xce), Cp = 4, Yce = { 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" } }, Zce = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), M4 = Symbol("scrollbarContextKey"), Qce = Pn({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), Jce = "Thumb", ede = /* @__PURE__ */ G({ __name: "thumb", props: Qce, setup(e) { const t = e, n = $e(M4), r = Wt("scrollbar"); n || Tle(Jce, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = br ? document.onselectstart : null; const d = O(() => Yce[t.vertical ? "vertical" : "horizontal"]), f = O(() => Zce({ size: t.size, move: t.move, bar: d.value })), h = O(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.removeAllRanges(), m(C); const _ = C.currentTarget; _ && (i.value[d.value.axis] = _[d.value.offset] - (C[d.value.client] - _.getBoundingClientRect()[d.value.direction])); }, v = (C) => { if (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, F = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; Ct(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Wo(Pt(n, "scrollbarElement"), "mousemove", x), Wo(Pt(n, "scrollbarElement"), "mouseleave", w), (C, S) => ($(), ae(lr, { name: b(r).b("fade"), persisted: "" }, { default: q(() => [ qe(K("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ K("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Qe(b(f)), onMousedown: p }, null, 38) ], 34), [ [ct, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var mT = /* @__PURE__ */ Ht(ede, [["__file", "thumb.vue"]]); const tde = Pn({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), nde = /* @__PURE__ */ G({ __name: "bar", props: tde, setup(e, { expose: t }) { const n = e, r = $e(M4), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - Cp, f = c.offsetWidth - Cp; o.value = c.scrollTop * 100 / d * l.value, a.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - Cp, f = c.offsetWidth - Cp, 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 + Cp < d ? `${v}px` : "", i.value = m + Cp < f ? `${m}px` : ""; } }), (c, d) => ($(), B(Ue, null, [ Z(mT, { move: a.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), Z(mT, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var rde = /* @__PURE__ */ Ht(nde, [["__file", "bar.vue"]]); const ade = Pn({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: Ot([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, ...lc(["ariaLabel", "ariaOrientation"]) }), ode = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(aa) }, GC = "ElScrollbar", ide = G({ name: GC }), sde = /* @__PURE__ */ G({ ...ide, props: ade, emits: ode, setup(e, { expose: t, emit: n }) { const r = e, a = Wt("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = O(() => { const k = {}; return r.height && (k.height = _f(r.height)), r.maxHeight && (k.maxHeight = _f(r.maxHeight)), [r.wrapStyle, k]; }), p = O(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = O(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.value) == null || k.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(k, C) { ra(k) ? c.value.scrollTo(k) : aa(k) && aa(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!aa(k)) { wr(GC, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!aa(k)) { wr(GC, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = ol(d, w), i = Wo("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || We(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(M4, en({ scrollbarElement: u, wrapElement: c })), p2(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || We(() => { w(); }); }), qd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => ($(), B("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ K("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Qe(b(h)), tabindex: k.tabindex, onScroll: m }, [ ($(), ae(dt(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Qe(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: q(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? te("v-if", !0) : ($(), ae(rde, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var lde = /* @__PURE__ */ Ht(sde, [["__file", "scrollbar.vue"]]); const ude = Xr(lde), D4 = Symbol("popper"), CM = Symbol("popperContent"), cde = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], SM = Pn({ role: { type: String, values: cde, default: "tooltip" } }), dde = G({ name: "ElPopper", inheritAttrs: !1 }), pde = /* @__PURE__ */ G({ ...dde, props: SM, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = O(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(D4, l), (u, c) => he(u.$slots, "default"); } }); var fde = /* @__PURE__ */ Ht(pde, [["__file", "popper.vue"]]); const EM = Pn({ arrowOffset: { type: Number, default: 5 } }), hde = G({ name: "ElPopperArrow", inheritAttrs: !1 }), vde = /* @__PURE__ */ G({ ...hde, props: EM, setup(e, { expose: t }) { const n = e, r = Wt("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = $e(CM, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), Ct(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => ($(), B("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Qe(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var gde = /* @__PURE__ */ Ht(vde, [["__file", "arrow.vue"]]); const Zx = "ElOnlyChild", mde = G({ name: Zx, setup(e, { slots: t, attrs: n }) { var r; const a = $e(vM), o = _ce((r = a == null ? void 0 : a.setForwardRef) != null ? r : x0); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return wr(Zx, "requires exact only one valid child."), null; const l = _M(s); return l ? qe(Sg(l, n), [[o]]) : (wr(Zx, "no valid child node found"), null); }; } }); function _M(e) { if (!e) return null; const t = e; for (const n of t) { if (ra(n)) switch (n.type) { case Eg: continue; case Ls: case "svg": return yT(n); case Ue: return _M(n.children); default: return n; } return yT(n); } return null; } function yT(e) { const t = Wt("only-child"); return Z("span", { class: t.e("content") }, [e]); } const TM = Pn({ virtualRef: { type: Ot(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Ot(Function) }, onMouseleave: { type: Ot(Function) }, onClick: { type: Ot(Function) }, onKeydown: { type: Ot(Function) }, onFocus: { type: Ot(Function) }, onBlur: { type: Ot(Function) }, onContextmenu: { type: Ot(Function) }, id: String, open: Boolean }), yde = G({ name: "ElPopperTrigger", inheritAttrs: !1 }), bde = /* @__PURE__ */ G({ ...yde, props: TM, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = $e(D4, void 0); Ece(a); const o = O(() => s.value ? n.id : void 0), i = O(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = O(() => { if (r && r.value !== "tooltip") return r.value; }), l = O(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = pl(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, td(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 = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { Pu(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), td(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Ct(() => { if (u == null || u(), u = void 0, a.value && td(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? te("v-if", !0) : ($(), ae(b(mde), Dt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: q(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var wde = /* @__PURE__ */ Ht(bde, [["__file", "trigger.vue"]]); const Qx = "focus-trap.focus-after-trapped", Jx = "focus-trap.focus-after-released", xde = "focus-trap.focusout-prevented", bT = { cancelable: !0, bubbles: !1 }, kde = { cancelable: !0, bubbles: !1 }, wT = "focusAfterTrapped", xT = "focusAfterReleased", Cde = Symbol("elFocusTrap"), B4 = U(), K2 = U(0), R4 = U(0); let Wm = 0; const $M = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, kT = (e, t) => { for (const n of e) if (!Sde(n, t)) return n; }, Sde = (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; }, Ede = (e) => { const t = $M(e), n = kT(t, e), r = kT(t.reverse(), e); return [n, r]; }, _de = (e) => e instanceof HTMLInputElement && "select" in e, ou = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), R4.value = window.performance.now(), e !== n && _de(e) && t && e.select(); } }; function CT(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const Tde = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = CT(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = CT(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, $de = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (ou(r, t), document.activeElement !== n) return; }, ST = Tde(), Ode = () => K2.value > R4.value, Km = () => { B4.value = "pointer", K2.value = window.performance.now(); }, ET = () => { B4.value = "keyboard", K2.value = window.performance.now(); }, Fde = () => (nt(() => { Wm === 0 && (document.addEventListener("mousedown", Km), document.addEventListener("touchstart", Km), document.addEventListener("keydown", ET)), Wm++; }), Ct(() => { Wm--, Wm <= 0 && (document.removeEventListener("mousedown", Km), document.removeEventListener("touchstart", Km), document.removeEventListener("keydown", ET)); }), { focusReason: B4, lastUserFocusTimestamp: K2, lastAutomatedFocusTimestamp: R4 }), Gm = (e) => new CustomEvent(xde, { ...kde, detail: e }), Ade = G({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ wT, xT, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = Fde(); wce((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: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === Ir.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, F] = Ede(_); if (T && F) { if (!w && S === F) { const A = Gm({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && ou(T, !0)); } else if (w && [T, _].includes(S)) { const A = Gm({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && ou(F, !0)); } } else if (S === _) { const A = Gm({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || p.preventDefault(); } } }; rt(Cde, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([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(wT, p); }, u = (p) => t(xT, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : ou(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !Pu(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = Gm({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || ou(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await We(); const p = b(n); if (p) { ST.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(Qx, bT); p.addEventListener(Qx, l), p.dispatchEvent(m), m.defaultPrevented || We(() => { let g = e.focusStartEl; Fa(g) || (ou(g), document.activeElement !== g && (g = "first")), g === "first" && $de($M(p), !0), (document.activeElement === v || g === "container") && ou(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(Qx, l); const v = new CustomEvent(Jx, { ...bT, detail: { focusReason: o.value } }); p.addEventListener(Jx, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !Ode() || p.contains(document.activeElement)) && ou(r ?? document.body), p.removeEventListener(Jx, u), ST.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), Ct(() => { 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 Ide(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var Pde = /* @__PURE__ */ Ht(Ade, [["render", Ide], ["__file", "focus-trap.vue"]]); const Lde = ["fixed", "absolute"], Nde = Pn({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Ot(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: U2, default: "bottom" }, popperOptions: { type: Ot(Object), default: () => ({}) }, strategy: { type: String, values: Lde, default: "absolute" } }), OM = Pn({ ...Nde, id: String, style: { type: Ot([String, Array, Object]) }, className: { type: Ot([String, Array, Object]) }, effect: { type: Ot(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Ot([String, Array, Object]) }, popperStyle: { type: Ot([String, Array, Object]) }, referenceEl: { type: Ot(Object) }, triggerTargetEl: { type: Ot(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...lc(["ariaLabel"]) }), Mde = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, Dde = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...Rde(e), ...t] }; return zde(o, a == null ? void 0 : a.modifiers), o; }, Bde = (e) => { if (br) return pl(e); }; function Rde(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 zde(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const Vde = 0, jde = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = $e(D4, void 0), o = U(), i = U(), s = O(() => ({ name: "eventListeners", enabled: !!e.visible })), l = O(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : Vde; return { name: "arrow", enabled: !xle(y), options: { element: y, padding: x } }; }), u = O(() => ({ onFirstUpdate: () => { p(); }, ...Dde(e, [ b(l), b(s) ]) })), c = O(() => Bde(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = mce(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, Hde = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = yM(), o = Wt("popper"), i = O(() => b(t).popper), s = U(aa(e.zIndex) ? e.zIndex : a()), l = O(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = O(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = O(() => r.value === "dialog" ? "false" : void 0), d = O(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = aa(e.zIndex) ? e.zIndex : a(); } }; }, Ude = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, qde = G({ name: "ElPopperContent" }), Wde = /* @__PURE__ */ G({ ...qde, props: OM, emits: Mde, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = Ude(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = jde(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = Hde(r, { styles: p, attributes: d, role: m }), _ = $e(_0, void 0), T = U(); rt(CM, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(_0, { ..._, addInputId: x0, removeInputId: x0 }); let F; const A = (N = !0) => { g(), N && S(); }, I = () => { A(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { F == null || F(), F = void 0; const z = b(N || h.value), P = b(L || h.value); td(z) && (F = be([m, () => r.ariaLabel, y, () => r.id], (D) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, V) => { Pu(D[V]) ? z.removeAttribute(M) : z.setAttribute(M, D[V]); }); }, { immediate: !0 })), P !== z && td(P) && ["role", "aria-label", "aria-modal", "id"].forEach((D) => { P.removeAttribute(D); }); }, { immediate: !0 }), be(() => r.visible, I, { immediate: !0 }); }), Ct(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (N, L) => ($(), B("div", Dt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (z) => N.$emit("mouseenter", z), onMouseleave: (z) => N.$emit("mouseleave", z) }), [ Z(b(Pde), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: q(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var Kde = /* @__PURE__ */ Ht(Wde, [["__file", "content.vue"]]); const Gde = Xr(fde), z4 = Symbol("elTooltip"), Ja = Pn({ ...Cce, ...OM, appendTo: { type: Ot([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Ot(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...lc(["ariaLabel"]) }), T0 = Pn({ ...TM, disabled: Boolean, trigger: { type: Ot([String, Array]), default: "hover" }, triggerKeys: { type: Ot(Array), default: () => [Ir.enter, Ir.space] } }), { useModelToggleProps: Xde, useModelToggleEmits: Yde, useModelToggle: Zde } = hue("visible"), Qde = Pn({ ...SM, ...Xde, ...Ja, ...T0, ...EM, showArrow: { type: Boolean, default: !0 } }), Jde = [ ...Yde, "before-show", "before-hide", "show", "hide", "open", "close" ], epe = (e, t) => ao(e) ? e.includes(t) : e === t, Sp = (e, t, n) => (r) => { epe(b(e), t) && n(r); }, tpe = G({ name: "ElTooltipTrigger" }), npe = /* @__PURE__ */ G({ ...tpe, props: T0, setup(e, { expose: t }) { const n = e, r = Wt("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = $e(z4, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = Pt(n, "trigger"), h = el(d, Sp(f, "hover", s)), p = el(d, Sp(f, "hover", l)), v = el(d, Sp(f, "click", (w) => { w.button === 0 && u(w); })), m = el(d, Sp(f, "focus", s)), g = el(d, Sp(f, "focus", l)), y = el(d, Sp(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = el(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => ($(), ae(b(wde), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: q(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var rpe = /* @__PURE__ */ Ht(npe, [["__file", "trigger.vue"]]); const ape = Pn({ to: { type: Ot([String, Object]), required: !0 }, disabled: Boolean }), ope = /* @__PURE__ */ G({ __name: "teleport", props: ape, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : ($(), ae(_g, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var ipe = /* @__PURE__ */ Ht(ope, [["__file", "teleport.vue"]]); const spe = Xr(ipe), lpe = G({ name: "ElTooltipContent", inheritAttrs: !1 }), upe = /* @__PURE__ */ G({ ...lpe, props: Ja, setup(e, { expose: t }) { const n = e, { selector: r } = hM(), a = Wt("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = $e(z4, void 0), g = O(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = O(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Ct(() => { i == null || i(); }); const x = O(() => b(y) ? !0 : b(u)), w = O(() => n.disabled ? !1 : b(u)), k = O(() => n.appendTo || r.value), C = O(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, F = el(T, () => { n.enterable && b(c) === "hover" && f(); }), A = el(T, () => { b(c) === "hover" && d(); }), I = () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = hae(O(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, z = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P); }), t({ contentRef: o }), (P, D) => ($(), ae(b(spe), { disabled: !P.teleported, to: b(k) }, { default: q(() => [ Z(lr, { name: b(g), onAfterLeave: _, onBeforeEnter: I, onAfterEnter: L, onBeforeLeave: N }, { default: q(() => [ b(x) ? qe(($(), ae(b(Kde), Dt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(F), onMouseleave: b(A), onBlur: z, onClose: b(d) }), { default: q(() => [ he(P.$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"])), [ [ct, b(w)] ]) : te("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var cpe = /* @__PURE__ */ Ht(upe, [["__file", "content.vue"]]); const dpe = G({ name: "ElTooltip" }), ppe = /* @__PURE__ */ G({ ...dpe, props: Qde, emits: Jde, setup(e, { expose: t, emit: n }) { const r = e; kce(); const a = W2(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = Zde({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = Sce({ showAfter: Pt(r, "showAfter"), hideAfter: Pt(r, "hideAfter"), autoClose: Pt(r, "autoClose"), open: c, close: d }), v = O(() => Ef(r.visible) && !f.value); rt(z4, { controlled: v, id: a, open: ch(l), trigger: Pt(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return Tg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => ($(), ae(b(Gde), { ref_key: "popperRef", ref: o, role: g.role }, { default: q(() => [ Z(rpe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: q(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : te("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), Z(cpe, { 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: q(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? ($(), B("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : ($(), B("span", { key: 1 }, _e(g.content), 1)) ]), g.showArrow ? ($(), ae(b(gde), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : te("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 fpe = /* @__PURE__ */ Ht(ppe, [["__file", "tooltip.vue"]]); const G2 = Xr(fpe), FM = Symbol("buttonGroupContextKey"), hpe = (e, t) => { ay({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, O(() => e.type === "text")); const n = $e(FM, void 0), r = L4("button"), { form: a } = ep(), o = bd(O(() => n == null ? void 0 : n.size)), i = zg(), s = U(), l = _r(), u = O(() => e.type || (n == null ? void 0 : n.type) || ""), c = O(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = O(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = O(() => { 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) === Ls) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, vpe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], gpe = ["button", "submit", "reset"], XC = Pn({ size: hh, disabled: Boolean, type: { type: String, values: vpe, default: "" }, icon: { type: Vu }, nativeType: { type: String, values: gpe, default: "button" }, loading: Boolean, loadingIcon: { type: Vu, default: () => k4 }, 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: Ot([String, Object]), default: "button" } }), mpe = { click: (e) => e instanceof MouseEvent }; function ua(e, t) { ype(e) && (e = "100%"); var n = bpe(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 Xm(e) { return Math.min(1, Math.max(0, e)); } function ype(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function bpe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function AM(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function Ym(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Hc(e) { return e.length === 1 ? "0" + e : String(e); } function wpe(e, t, n) { return { r: ua(e, 255) * 255, g: ua(t, 255) * 255, b: ua(n, 255) * 255 }; } function _T(e, t, n) { e = ua(e, 255), t = ua(t, 255), n = ua(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function ek(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 xpe(e, t, n) { var r, a, o; if (e = ua(e, 360), t = ua(t, 100), n = ua(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = ek(s, i, e + 1 / 3), a = ek(s, i, e), o = ek(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function TT(e, t, n) { e = ua(e, 255), t = ua(t, 255), n = ua(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function kpe(e, t, n) { e = ua(e, 360) * 6, t = ua(t, 100), n = ua(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function $T(e, t, n, r) { var a = [ Hc(Math.round(e).toString(16)), Hc(Math.round(t).toString(16)), Hc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function Cpe(e, t, n, r, a) { var o = [ Hc(Math.round(e).toString(16)), Hc(Math.round(t).toString(16)), Hc(Math.round(n).toString(16)), Hc(Spe(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function Spe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function OT(e) { return _o(e) / 255; } function _o(e) { return parseInt(e, 16); } function Epe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var YC = { 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 _pe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = Ope(e)), typeof e == "object" && (qs(e.r) && qs(e.g) && qs(e.b) ? (t = wpe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : qs(e.h) && qs(e.s) && qs(e.v) ? (r = Ym(e.s), a = Ym(e.v), t = kpe(e.h, r, a), i = !0, s = "hsv") : qs(e.h) && qs(e.s) && qs(e.l) && (r = Ym(e.s), o = Ym(e.l), t = xpe(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = AM(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 Tpe = "[-\\+]?\\d+%?", $pe = "[-\\+]?\\d*\\.\\d+%?", _u = "(?:".concat($pe, ")|(?:").concat(Tpe, ")"), tk = "[\\s|\\(]+(".concat(_u, ")[,|\\s]+(").concat(_u, ")[,|\\s]+(").concat(_u, ")\\s*\\)?"), nk = "[\\s|\\(]+(".concat(_u, ")[,|\\s]+(").concat(_u, ")[,|\\s]+(").concat(_u, ")[,|\\s]+(").concat(_u, ")\\s*\\)?"), ki = { CSS_UNIT: new RegExp(_u), rgb: new RegExp("rgb" + tk), rgba: new RegExp("rgba" + nk), hsl: new RegExp("hsl" + tk), hsla: new RegExp("hsla" + nk), hsv: new RegExp("hsv" + tk), hsva: new RegExp("hsva" + nk), 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 Ope(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (YC[e]) e = YC[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = ki.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = ki.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ki.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = ki.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ki.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = ki.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ki.hex8.exec(e), n ? { r: _o(n[1]), g: _o(n[2]), b: _o(n[3]), a: OT(n[4]), format: t ? "name" : "hex8" } : (n = ki.hex6.exec(e), n ? { r: _o(n[1]), g: _o(n[2]), b: _o(n[3]), format: t ? "name" : "hex" } : (n = ki.hex4.exec(e), n ? { r: _o(n[1] + n[1]), g: _o(n[2] + n[2]), b: _o(n[3] + n[3]), a: OT(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = ki.hex3.exec(e), n ? { r: _o(n[1] + n[1]), g: _o(n[2] + n[2]), b: _o(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function qs(e) { return !!ki.CSS_UNIT.exec(String(e)); } var Fpe = ( /** @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 = Epe(t)), this.originalInput = t; var a = _pe(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.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, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = AM(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 = TT(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 = TT(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = _T(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 = _T(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), $T(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), Cpe(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(ua(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(ua(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 = "#" + $T(this.r, this.g, this.b, !1), n = 0, r = Object.entries(YC); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = Xm(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 = Xm(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 = Xm(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 = Xm(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, 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, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Kl(e, t = 20) { return e.mix("#141414", t).toString(); } function Ape(e) { const t = zg(), n = Wt("button"); return O(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new Fpe(a), s = e.dark ? i.tint(20).toString() : Kl(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Kl(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Kl(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Kl(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Kl(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Kl(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Kl(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": a, "text-color": u, "border-color": a, "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 ? Kl(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 Ipe = G({ name: "ElButton" }), Ppe = /* @__PURE__ */ G({ ...Ipe, props: XC, emits: mpe, setup(e, { expose: t, emit: n }) { const r = e, a = Ape(r), o = Wt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = hpe(r, n), h = O(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => ($(), ae(dt(p.tag), Dt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: q(() => [ p.loading ? ($(), B(Ue, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : ($(), ae(b(Ta), { key: 1, class: H(b(o).is("loading")) }, { default: q(() => [ ($(), ae(dt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? ($(), ae(b(Ta), { key: 1 }, { default: q(() => [ p.icon ? ($(), ae(dt(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : te("v-if", !0), p.$slots.default ? ($(), B("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : te("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var Lpe = /* @__PURE__ */ Ht(Ppe, [["__file", "button.vue"]]); const Npe = { size: XC.size, type: XC.type }, Mpe = G({ name: "ElButtonGroup" }), Dpe = /* @__PURE__ */ G({ ...Mpe, props: Npe, setup(e) { const t = e; rt(FM, en({ size: Pt(t, "size"), type: Pt(t, "type") })); const n = Wt("button"); return (r, a) => ($(), B("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var IM = /* @__PURE__ */ Ht(Dpe, [["__file", "button-group.vue"]]); const Es = Xr(Lpe, { ButtonGroup: IM }), Bpe = Pl(IM), iu = /* @__PURE__ */ new Map(); if (br) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of iu.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function FT(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : td(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.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 = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const PM = { beforeMount(e, t) { iu.has(e) || iu.set(e, []), iu.get(e).push({ documentHandler: FT(e, t), bindingFn: t.value }); }, updated(e, t) { iu.has(e) || iu.set(e, []); const n = iu.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: FT(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { iu.delete(e); } }, Rpe = Pn({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: Ot([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), zpe = G({ name: "ElCard" }), Vpe = /* @__PURE__ */ G({ ...zpe, props: Rpe, setup(e) { const t = Wt("card"); return (n, r) => ($(), B("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? ($(), B("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ ze(_e(n.header), 1) ]) ], 2)) : te("v-if", !0), K("div", { class: H([b(t).e("body"), n.bodyClass]), style: Qe(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? ($(), B("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ ze(_e(n.footer), 1) ]) ], 2)) : te("v-if", !0) ], 2)); } }); var jpe = /* @__PURE__ */ Ht(Vpe, [["__file", "card.vue"]]); const Hpe = Xr(jpe), LM = { 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: hh, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...lc(["ariaControls"]) }, NM = { [Jr]: (e) => Fa(e) || aa(e) || Ef(e), change: (e) => Fa(e) || aa(e) || Ef(e) }, vh = Symbol("checkboxGroupContextKey"), Upe = ({ model: e, isChecked: t }) => { const n = $e(vh, void 0), r = O(() => { var a, o; const i = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, s = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value; return !Eu(i) && e.value.length >= i && !t.value || !Eu(s) && e.value.length <= s && t.value; }); return { isDisabled: zg(O(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, qpe = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: a, isLabeledByFormItem: o }) => { const i = $e(vh, void 0), { formItem: s } = ep(), { emit: l } = tt(); function u(p) { var v, m, g, y; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (y = (g = e.falseValue) != null ? g : e.falseLabel) != null ? y : !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 && !a.value && o.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await We(), c(t.value, p))); } const h = O(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return be(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => wr(p))); }), { handleChange: d, onClickRoot: f }; }, Wpe = (e) => { const t = U(!1), { emit: n } = tt(), r = $e(vh, void 0), a = O(() => Eu(r) === !1), o = U(!1), i = O({ get() { var s, l; return a.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; a.value && ao(s) ? (o.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, o.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(Jr, s), t.value = s); } }); return { model: i, isGroup: a, isLimitExceeded: o }; }, Kpe = (e, t, { model: n }) => { const r = $e(vh, void 0), a = U(!1), o = O(() => ab(e.value) ? e.label : e.value), i = O(() => { const c = n.value; return Ef(c) ? c : ao(c) ? ra(o.value) ? c.map(xo).some((d) => rb(d, o.value)) : c.map(xo).includes(o.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = bd(O(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = bd(O(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = O(() => !!t.default || !ab(o.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: a, checkboxSize: l, hasOwnLabel: u, actualValue: o }; }, MM = (e, t) => { const { formItem: n } = ep(), { model: r, isGroup: a, isLimitExceeded: o } = Wpe(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = Kpe(e, t, { model: r }), { isDisabled: f } = Upe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Vg(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: a }), { handleChange: v, onClickRoot: m } = qpe(e, { model: r, isLimitExceeded: o, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var y, x; ao(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (y = e.trueValue) != null ? y : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), ay({ 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(() => a.value && ab(e.value))), ay({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, O(() => !!e.trueLabel)), ay({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, O(() => !!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 }; }, Gpe = G({ name: "ElCheckbox" }), Xpe = /* @__PURE__ */ G({ ...Gpe, props: LM, emits: NM, setup(e) { const t = e, n = _r(), { inputId: r, isLabeledByFormItem: a, isChecked: o, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = MM(t, n), p = Wt("checkbox"), v = O(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", o.value) ]), m = O(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", o.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, y) => ($(), ae(dt(!b(u) && b(a) ? "span" : "label"), { class: H(b(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: b(h) }, { default: q(() => { var x, w, k, C; return [ K("span", { class: H(b(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? qe(($(), B("input", { key: 0, id: b(r), "onUpdate:modelValue": (S) => Kn(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: b(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0, "false-value": (C = (k = g.falseValue) != null ? k : g.falseLabel) != null ? C : !1, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]) : qe(($(), B("input", { key: 1, id: b(r), "onUpdate:modelValue": (S) => Kn(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: b(i), value: b(d), name: g.name, tabindex: g.tabindex, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]), K("span", { class: H(b(p).e("inner")) }, null, 2) ], 2), b(u) ? ($(), B("span", { key: 0, class: H(b(p).e("label")) }, [ he(g.$slots, "default"), g.$slots.default ? te("v-if", !0) : ($(), B(Ue, { key: 0 }, [ ze(_e(g.label), 1) ], 64)) ], 2)) : te("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var Ype = /* @__PURE__ */ Ht(Xpe, [["__file", "checkbox.vue"]]); const Zpe = G({ name: "ElCheckboxButton" }), Qpe = /* @__PURE__ */ G({ ...Zpe, props: LM, emits: NM, setup(e) { const t = e, n = _r(), { isFocused: r, isChecked: a, isDisabled: o, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = MM(t, n), c = $e(vh, void 0), d = Wt("checkbox"), f = O(() => { var p, v, m, g; const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: y, borderColor: y, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: y ? `-1px 0 0 0 ${y}` : void 0 }; }), h = O(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", o.value), d.is("checked", a.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, y, x; return $(), B("label", { class: H(b(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? qe(($(), B("input", { key: 0, "onUpdate:modelValue": (w) => Kn(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (x = (y = p.falseValue) != null ? y : p.falseLabel) != null ? x : !1, onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]) : qe(($(), B("input", { key: 1, "onUpdate:modelValue": (w) => Kn(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), value: b(l), onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]), p.$slots.default || p.label ? ($(), B("span", { key: 2, class: H(b(d).be("button", "inner")), style: Qe(b(a) ? b(f) : void 0) }, [ he(p.$slots, "default", {}, () => [ ze(_e(p.label), 1) ]) ], 6)) : te("v-if", !0) ], 2); }; } }); var DM = /* @__PURE__ */ Ht(Qpe, [["__file", "checkbox-button.vue"]]); const Jpe = Pn({ modelValue: { type: Ot(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: hh, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...lc(["ariaLabel"]) }), efe = { [Jr]: (e) => ao(e), change: (e) => ao(e) }, tfe = G({ name: "ElCheckboxGroup" }), nfe = /* @__PURE__ */ G({ ...tfe, props: Jpe, emits: efe, setup(e, { emit: t }) { const n = e, r = Wt("checkbox"), { formItem: a } = ep(), { inputId: o, isLabeledByFormItem: i } = Vg(n, { formItemContext: a }), s = async (u) => { t(Jr, u), await We(), t("change", u); }, l = O({ get() { return n.modelValue; }, set(u) { s(u); } }); return rt(vh, { ...WN(gr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), be(() => n.modelValue, () => { n.validateEvent && (a == null || a.validate("change").catch((u) => wr(u))); }), (u, c) => { var d; return $(), ae(dt(u.tag), { id: b(o), class: H(b(r).b("group")), role: "group", "aria-label": b(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": b(i) ? (d = b(a)) == null ? void 0 : d.labelId : void 0 }, { default: q(() => [ he(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var BM = /* @__PURE__ */ Ht(nfe, [["__file", "checkbox-group.vue"]]); const rfe = Xr(Ype, { CheckboxButton: DM, CheckboxGroup: BM }); Pl(DM); Pl(BM); const ZC = Pn({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: QN }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), afe = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, ofe = G({ name: "ElTag" }), ife = /* @__PURE__ */ G({ ...ofe, props: ZC, emits: afe, setup(e, { emit: t }) { const n = e, r = bd(), a = Wt("tag"), o = O(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? ($(), B("span", { key: 0, class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b(Ta), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(ob)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6)) : ($(), ae(lr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: q(() => [ K("span", { class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b(Ta), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(ob)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var sfe = /* @__PURE__ */ Ht(ife, [["__file", "tag.vue"]]); const lfe = Xr(sfe), RM = Symbol("rowContextKey"), ufe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], cfe = ["top", "middle", "bottom"], dfe = Pn({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: ufe, default: "start" }, align: { type: String, values: cfe } }), pfe = G({ name: "ElRow" }), ffe = /* @__PURE__ */ G({ ...pfe, props: dfe, setup(e) { const t = e, n = Wt("row"), r = O(() => t.gutter); rt(RM, { gutter: r }); const a = O(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = O(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var hfe = /* @__PURE__ */ Ht(ffe, [["__file", "row.vue"]]); const X2 = Xr(hfe), vfe = Pn({ 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: Ot([Number, Object]), default: () => Up({}) }, sm: { type: Ot([Number, Object]), default: () => Up({}) }, md: { type: Ot([Number, Object]), default: () => Up({}) }, lg: { type: Ot([Number, Object]), default: () => Up({}) }, xl: { type: Ot([Number, Object]), default: () => Up({}) } }), gfe = G({ name: "ElCol" }), mfe = /* @__PURE__ */ G({ ...gfe, props: vfe, setup(e) { const t = e, { gutter: n } = $e(RM, { gutter: O(() => 0) }), r = Wt("col"), a = O(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = O(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; aa(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) => { aa(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : ra(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) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var yfe = /* @__PURE__ */ Ht(mfe, [["__file", "col.vue"]]); const Hg = Xr(yfe), bfe = G({ name: "ElCollapseTransition" }), wfe = /* @__PURE__ */ G({ ...bfe, setup(e) { const t = Wt("collapse-transition"), n = (a) => { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom; }, r = { beforeEnter(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.style.height && (a.dataset.elExistsHeight = a.style.height), a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0; }, enter(a) { requestAnimationFrame(() => { a.dataset.oldOverflow = a.style.overflow, a.dataset.elExistsHeight ? a.style.maxHeight = a.dataset.elExistsHeight : a.scrollHeight !== 0 ? a.style.maxHeight = `${a.scrollHeight}px` : a.style.maxHeight = 0, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom, a.style.overflow = "hidden"; }); }, afterEnter(a) { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow; }, enterCancelled(a) { n(a); }, beforeLeave(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.dataset.oldOverflow = a.style.overflow, a.style.maxHeight = `${a.scrollHeight}px`, a.style.overflow = "hidden"; }, leave(a) { a.scrollHeight !== 0 && (a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0); }, afterLeave(a) { n(a); }, leaveCancelled(a) { n(a); } }; return (a, o) => ($(), ae(lr, Dt({ name: b(t).b() }, JP(r)), { default: q(() => [ he(a.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var xfe = /* @__PURE__ */ Ht(wfe, [["__file", "collapse-transition.vue"]]); const kfe = Xr(xfe), Cfe = Pn({ color: { type: Ot(Object), required: !0 }, vertical: { type: Boolean, default: !1 } }); let rk = !1; function $0(e, t) { if (!br) return; const n = function(o) { var i; (i = t.drag) == null || i.call(t, o); }, r = function(o) { var i; document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, rk = !1, (i = t.end) == null || i.call(t, o); }, a = function(o) { var i; rk || (o.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), rk = !0, (i = t.start) == null || i.call(t, o)); }; e.addEventListener("mousedown", a), e.addEventListener("touchstart", a, { passive: !1 }); } const Sfe = (e) => { const t = tt(), { t: n } = Dg(), r = un(), a = un(), o = O(() => e.color.get("alpha")), i = O(() => 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 (!a.value || !r.value) return; const f = t.vnode.el.getBoundingClientRect(), { clientX: h, clientY: p } = f4(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 Ir.left: case Ir.down: d.preventDefault(), d.stopPropagation(), c(-p); break; case Ir.right: case Ir.up: d.preventDefault(), d.stopPropagation(), c(p); break; } } function c(d) { let f = o.value + d; f = f < 0 ? 0 : f > 100 ? 100 : f, e.color.set("alpha", f); } return { thumb: r, bar: a, alpha: o, alphaLabel: i, handleDrag: l, handleClick: s, handleKeydown: u }; }, Efe = (e, { bar: t, thumb: n, handleDrag: r }) => { const a = tt(), o = Wt("color-alpha-slider"), i = U(0), s = U(0), l = U(); function u() { if (!n.value || e.vertical) return 0; const y = a.vnode.el, x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0; } function c() { if (!n.value) return 0; const y = a.vnode.el; if (!e.vertical) return 0; const x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0; } function d() { if (e.color && e.color.value) { const { r: y, g: x, b: w } = e.color.toRgb(); return `linear-gradient(to right, rgba(${y}, ${x}, ${w}, 0) 0%, rgba(${y}, ${x}, ${w}, 1) 100%)`; } return ""; } function f() { i.value = u(), s.value = c(), l.value = d(); } nt(() => { if (!t.value || !n.value) return; const y = { drag: (x) => { r(x); }, end: (x) => { r(x); } }; $0(t.value, y), $0(n.value, y), f(); }), be(() => e.color.get("alpha"), () => f()), be(() => e.color.value, () => f()); const h = O(() => [o.b(), o.is("vertical", e.vertical)]), p = O(() => o.e("bar")), v = O(() => o.e("thumb")), m = O(() => ({ background: l.value })), g = O(() => ({ left: _f(i.value), top: _f(s.value) })); return { rootKls: h, barKls: p, barStyle: m, thumbKls: v, thumbStyle: g, update: f }; }, _fe = "ElColorAlphaSlider", Tfe = G({ name: _fe }), $fe = /* @__PURE__ */ G({ ...Tfe, props: Cfe, setup(e, { expose: t }) { const n = e, { alpha: r, alphaLabel: a, bar: o, thumb: i, handleDrag: s, handleClick: l, handleKeydown: u } = Sfe(n), { rootKls: c, barKls: d, barStyle: f, thumbKls: h, thumbStyle: p, update: v } = Efe(n, { bar: o, thumb: i, handleDrag: s }); return t({ update: v, bar: o, thumb: i }), (m, g) => ($(), B("div", { class: H(b(c)) }, [ K("div", { ref_key: "bar", ref: o, class: H(b(d)), style: Qe(b(f)), onClick: b(l) }, null, 14, ["onClick"]), K("div", { ref_key: "thumb", ref: i, class: H(b(h)), style: Qe(b(p)), "aria-label": b(a), "aria-valuenow": b(r), "aria-orientation": m.vertical ? "vertical" : "horizontal", "aria-valuemin": "0", "aria-valuemax": "100", role: "slider", tabindex: "0", onKeydown: b(u) }, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"]) ], 2)); } }); var Ofe = /* @__PURE__ */ Ht($fe, [["__file", "alpha-slider.vue"]]); const Ffe = G({ name: "ElColorHueSlider", props: { color: { type: Object, required: !0 }, vertical: Boolean }, setup(e) { const t = Wt("color-hue-slider"), n = tt(), r = U(), a = U(), o = U(0), i = U(0), s = O(() => e.color.get("hue")); be(() => s.value, () => { f(); }); function l(h) { h.target !== r.value && u(h); } function u(h) { if (!a.value || !r.value) return; const p = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = f4(h); let g; if (e.vertical) { let y = m - p.top; y = Math.min(y, p.height - r.value.offsetHeight / 2), y = Math.max(r.value.offsetHeight / 2, y), g = Math.round((y - r.value.offsetHeight / 2) / (p.height - r.value.offsetHeight) * 360); } else { let y = v - p.left; y = Math.min(y, p.width - r.value.offsetWidth / 2), y = Math.max(r.value.offsetWidth / 2, y), g = Math.round((y - 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() { o.value = c(), i.value = d(); } return nt(() => { if (!a.value || !r.value) return; const h = { drag: (p) => { u(p); }, end: (p) => { u(p); } }; $0(a.value, h), $0(r.value, h), f(); }), { bar: a, thumb: r, thumbLeft: o, thumbTop: i, hueValue: s, handleClick: l, update: f, ns: t }; } }); function Afe(e, t, n, r, a, o) { return $(), B("div", { class: H([e.ns.b(), e.ns.is("vertical", e.vertical)]) }, [ K("div", { ref: "bar", class: H(e.ns.e("bar")), onClick: e.handleClick }, null, 10, ["onClick"]), K("div", { ref: "thumb", class: H(e.ns.e("thumb")), style: Qe({ left: e.thumbLeft + "px", top: e.thumbTop + "px" }) }, null, 6) ], 2); } var Ife = /* @__PURE__ */ Ht(Ffe, [["render", Afe], ["__file", "hue-slider.vue"]]); const Pfe = Pn({ modelValue: String, id: String, showAlpha: Boolean, colorFormat: String, disabled: Boolean, size: hh, popperClass: { type: String, default: "" }, tabindex: { type: [String, Number], default: 0 }, teleported: Ja.teleported, predefine: { type: Ot(Array) }, validateEvent: { type: Boolean, default: !0 }, ...lc(["ariaLabel"]) }), Lfe = { [Jr]: (e) => Fa(e) || Pu(e), [C4]: (e) => Fa(e) || Pu(e), activeChange: (e) => Fa(e) || Pu(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent }, zM = Symbol("colorPickerContextKey"), AT = function(e, t, n) { return [ e, t * n / ((e = (2 - t) * n) < 1 ? e : 2 - e) || 0, e / 2 ]; }, Nfe = function(e) { return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1; }, Mfe = function(e) { return typeof e == "string" && e.includes("%"); }, rf = function(e, t) { Nfe(e) && (e = "100%"); const n = Mfe(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); }, IT = { 10: "A", 11: "B", 12: "C", 13: "D", 14: "E", 15: "F" }, sy = (e) => { e = Math.min(Math.round(e), 255); const t = Math.floor(e / 16), n = e % 16; return `${IT[t] || t}${IT[n] || n}`; }, PT = function({ r: e, g: t, b: n }) { return Number.isNaN(+e) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${sy(e)}${sy(t)}${sy(n)}`; }, ak = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 }, _c = function(e) { return e.length === 2 ? (ak[e[0].toUpperCase()] || +e[0]) * 16 + (ak[e[1].toUpperCase()] || +e[1]) : ak[e[1].toUpperCase()] || +e[1]; }, Dfe = function(e, t, n) { t = t / 100, n = n / 100; let r = t; const a = Math.max(n, 0.01); n *= 2, t *= n <= 1 ? n : 2 - n, r *= a <= 1 ? a : 2 - a; const o = (n + t) / 2, i = n === 0 ? 2 * r / (a + r) : 2 * t / (n + t); return { h: e, s: i * 100, v: o * 100 }; }, LT = (e, t, n) => { e = rf(e, 255), t = rf(t, 255), n = rf(n, 255); const r = Math.max(e, t, n), a = Math.min(e, t, n); let o; const i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: { o = (t - n) / s + (t < n ? 6 : 0); break; } case t: { o = (n - e) / s + 2; break; } case n: { o = (e - t) / s + 4; break; } } o /= 6; } return { h: o * 360, s: l * 100, v: i * 100 }; }, av = function(e, t, n) { e = rf(e, 360) * 6, t = rf(t, 100), n = rf(n, 100); const r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: Math.round(u * 255), g: Math.round(c * 255), b: Math.round(d * 255) }; }; let Yv = class { 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) md(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) md(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 av(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, a, o) => { this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, a)), this._value = Math.max(0, Math.min(100, o)), this.doOnChange(); }; if (t.includes("hsl")) { const r = t.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = Dfe(r[0], r[1], r[2]); n(a, o, i); } } else if (t.includes("hsv")) { const r = t.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 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((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = LT(r[0], r[1], r[2]); n(a, o, 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 a, o, i; r.length === 3 ? (a = _c(r[0] + r[0]), o = _c(r[1] + r[1]), i = _c(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (a = _c(r.slice(0, 2)), o = _c(r.slice(2, 4)), i = _c(r.slice(4, 6))), r.length === 8 ? this._alpha = _c(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100); const { h: s, s: l, v: u } = LT(a, o, 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: a, format: o } = this; if (this.enableAlpha) switch (o) { case "hsl": { const i = AT(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 = `${PT(av(t, n, r))}${sy(a * 255 / 100)}`; break; } default: { const { r: i, g: s, b: l } = av(t, n, r); this.value = `rgba(${i}, ${s}, ${l}, ${this.get("alpha") / 100})`; } } else switch (o) { case "hsl": { const i = AT(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 } = av(t, n, r); this.value = `rgb(${i}, ${s}, ${l})`; break; } default: this.value = PT(av(t, n, r)); } } }; const Bfe = G({ props: { colors: { type: Array, required: !0 }, color: { type: Object, required: !0 }, enableAlpha: { type: Boolean, required: !0 } }, setup(e) { const t = Wt("color-predefine"), { currentColor: n } = $e(zM), r = U(o(e.colors, e.color)); be(() => n.value, (i) => { const s = new Yv(); s.fromString(i), r.value.forEach((l) => { l.selected = s.compare(l); }); }), Wd(() => { r.value = o(e.colors, e.color); }); function a(i) { e.color.fromString(e.colors[i]); } function o(i, s) { return i.map((l) => { const u = new Yv(); return u.enableAlpha = e.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u; }); } return { rgbaColors: r, handleSelect: a, ns: t }; } }); function Rfe(e, t, n, r, a, o) { return $(), B("div", { class: H(e.ns.b()) }, [ K("div", { class: H(e.ns.e("colors")) }, [ ($(!0), B(Ue, null, yt(e.rgbaColors, (i, s) => ($(), B("div", { key: e.colors[s], class: H([ e.ns.e("color-selector"), e.ns.is("alpha", i._alpha < 100), { selected: i.selected } ]), onClick: (l) => e.handleSelect(s) }, [ K("div", { style: Qe({ backgroundColor: i.value }) }, null, 4) ], 10, ["onClick"]))), 128)) ], 2) ], 2); } var zfe = /* @__PURE__ */ Ht(Bfe, [["render", Rfe], ["__file", "predefine.vue"]]); const Vfe = G({ name: "ElSlPanel", props: { color: { type: Object, required: !0 } }, setup(e) { const t = Wt("color-svpanel"), n = tt(), r = U(0), a = U(0), o = U("hsl(0, 100%, 50%)"), i = O(() => { 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; a.value = u * f / 100, r.value = (100 - c) * h / 100, o.value = `hsl(${e.color.get("hue")}, 100%, 50%)`; } function l(u) { const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: f } = f4(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), a.value = h, r.value = p, e.color.set({ saturation: h / c.width * 100, value: 100 - p / c.height * 100 }); } return be(() => i.value, () => { s(); }), nt(() => { $0(n.vnode.el, { drag: (u) => { l(u); }, end: (u) => { l(u); } }), s(); }), { cursorTop: r, cursorLeft: a, background: o, colorValue: i, handleDrag: l, update: s, ns: t }; } }); function jfe(e, t, n, r, a, o) { return $(), B("div", { class: H(e.ns.b()), style: Qe({ backgroundColor: e.background }) }, [ K("div", { class: H(e.ns.e("white")) }, null, 2), K("div", { class: H(e.ns.e("black")) }, null, 2), K("div", { class: H(e.ns.e("cursor")), style: Qe({ top: e.cursorTop + "px", left: e.cursorLeft + "px" }) }, [ K("div") ], 6) ], 6); } var Hfe = /* @__PURE__ */ Ht(Vfe, [["render", jfe], ["__file", "sv-panel.vue"]]); const Ufe = G({ name: "ElColorPicker" }), qfe = /* @__PURE__ */ G({ ...Ufe, props: Pfe, emits: Lfe, setup(e, { expose: t, emit: n }) { const r = e, { t: a } = Dg(), o = Wt("color"), { formItem: i } = ep(), s = bd(), l = zg(), { inputId: u, isLabeledByFormItem: c } = Vg(r, { formItemContext: i }), d = U(), f = U(), h = U(), p = U(), v = U(), m = U(), { isFocused: g, handleFocus: y, handleBlur: x } = P4(v, { beforeFocus() { return l.value; }, beforeBlur(Y) { var re; return (re = p.value) == null ? void 0 : re.isFocusInsideContent(Y); }, afterBlur() { z(!1), V(); } }); let w = !0; const k = en(new Yv({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue })), C = U(!1), S = U(!1), _ = U(""), T = O(() => !r.modelValue && !S.value ? "transparent" : L(k, r.showAlpha)), F = O(() => !r.modelValue && !S.value ? "" : k.value), A = O(() => c.value ? void 0 : r.ariaLabel || a("el.colorpicker.defaultLabel")), I = O(() => c.value ? i == null ? void 0 : i.labelId : void 0), N = O(() => [ o.b("picker"), o.is("disabled", l.value), o.bm("picker", s.value), o.is("focused", g.value) ]); function L(Y, re) { if (!(Y instanceof Yv)) throw new TypeError("color should be instance of _color Class"); const { r: we, g: Oe, b: Ne } = Y.toRgb(); return re ? `rgba(${we}, ${Oe}, ${Ne}, ${Y.get("alpha") / 100})` : `rgb(${we}, ${Oe}, ${Ne})`; } function z(Y) { C.value = Y; } const P = qN(z, 100, { leading: !0 }); function D() { l.value || z(!0); } function M() { P(!1), V(); } function V() { We(() => { r.modelValue ? k.fromString(r.modelValue) : (k.value = "", We(() => { S.value = !1; })); }); } function Q() { l.value || P(!C.value); } function X() { k.fromString(_.value); } function ee() { const Y = k.value; n(Jr, Y), n("change", Y), r.validateEvent && (i == null || i.validate("change").catch((re) => wr(re))), P(!1), We(() => { const re = new Yv({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue }); k.compare(re) || V(); }); } function ue() { P(!1), n(Jr, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((Y) => wr(Y))), V(); } function ve() { C.value && (M(), g.value && ne()); } function ge(Y) { Y.preventDefault(), Y.stopPropagation(), z(!1), V(); } function se(Y) { switch (Y.code) { case Ir.enter: case Ir.space: Y.preventDefault(), Y.stopPropagation(), D(), m.value.focus(); break; case Ir.esc: ge(Y); break; } } function ne() { v.value.focus(); } function W() { v.value.blur(); } return nt(() => { r.modelValue && (_.value = F.value); }), be(() => r.modelValue, (Y) => { Y ? Y && Y !== k.value && (w = !1, k.fromString(Y)) : S.value = !1; }), be(() => [r.colorFormat, r.showAlpha], () => { k.enableAlpha = r.showAlpha, k.format = r.colorFormat || k.format, k.doOnChange(), n(Jr, k.value); }), be(() => F.value, (Y) => { _.value = Y, w && n("activeChange", Y), w = !0; }), be(() => k.value, () => { !r.modelValue && !S.value && (S.value = !0); }), be(() => C.value, () => { We(() => { var Y, re, we; (Y = d.value) == null || Y.update(), (re = f.value) == null || re.update(), (we = h.value) == null || we.update(); }); }), rt(zM, { currentColor: F }), t({ color: k, show: D, hide: M, focus: ne, blur: W }), (Y, re) => ($(), ae(b(G2), { ref_key: "popper", ref: p, visible: C.value, "show-arrow": !1, "fallback-placements": ["bottom", "top", "right", "left"], offset: 0, "gpu-acceleration": !1, "popper-class": [b(o).be("picker", "panel"), b(o).b("dropdown"), Y.popperClass], "stop-popper-mouse-event": !1, effect: "light", trigger: "click", teleported: Y.teleported, transition: `${b(o).namespace.value}-zoom-in-top`, persistent: "", onHide: (we) => z(!1) }, { content: q(() => [ qe(($(), B("div", { onKeydown: gn(ge, ["esc"]) }, [ K("div", { class: H(b(o).be("dropdown", "main-wrapper")) }, [ Z(Ife, { ref_key: "hue", ref: d, class: "hue-slider", color: b(k), vertical: "" }, null, 8, ["color"]), Z(Hfe, { ref_key: "sv", ref: f, color: b(k) }, null, 8, ["color"]) ], 2), Y.showAlpha ? ($(), ae(Ofe, { key: 0, ref_key: "alpha", ref: h, color: b(k) }, null, 8, ["color"])) : te("v-if", !0), Y.predefine ? ($(), ae(zfe, { key: 1, ref: "predefine", "enable-alpha": Y.showAlpha, color: b(k), colors: Y.predefine }, null, 8, ["enable-alpha", "color", "colors"])) : te("v-if", !0), K("div", { class: H(b(o).be("dropdown", "btns")) }, [ K("span", { class: H(b(o).be("dropdown", "value")) }, [ Z(b(jg), { ref_key: "inputRef", ref: m, modelValue: _.value, "onUpdate:modelValue": (we) => _.value = we, "validate-event": !1, size: "small", onKeyup: gn(X, ["enter"]), onBlur: X }, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]) ], 2), Z(b(Es), { class: H(b(o).be("dropdown", "link-btn")), text: "", size: "small", onClick: ue }, { default: q(() => [ ze(_e(b(a)("el.colorpicker.clear")), 1) ]), _: 1 }, 8, ["class"]), Z(b(Es), { plain: "", size: "small", class: H(b(o).be("dropdown", "btn")), onClick: ee }, { default: q(() => [ ze(_e(b(a)("el.colorpicker.confirm")), 1) ]), _: 1 }, 8, ["class"]) ], 2) ], 40, ["onKeydown"])), [ [b(PM), ve] ]) ]), default: q(() => [ K("div", Dt({ id: b(u), ref_key: "triggerRef", ref: v }, Y.$attrs, { class: b(N), role: "button", "aria-label": b(A), "aria-labelledby": b(I), "aria-description": b(a)("el.colorpicker.description", { color: Y.modelValue || "" }), "aria-disabled": b(l), tabindex: b(l) ? -1 : Y.tabindex, onKeydown: se, onFocus: b(y), onBlur: b(x) }), [ b(l) ? ($(), B("div", { key: 0, class: H(b(o).be("picker", "mask")) }, null, 2)) : te("v-if", !0), K("div", { class: H(b(o).be("picker", "trigger")), onClick: Q }, [ K("span", { class: H([b(o).be("picker", "color"), b(o).is("alpha", Y.showAlpha)]) }, [ K("span", { class: H(b(o).be("picker", "color-inner")), style: Qe({ backgroundColor: b(T) }) }, [ qe(Z(b(Ta), { class: H([b(o).be("picker", "icon"), b(o).is("icon-arrow-down")]) }, { default: q(() => [ Z(b(j2)) ]), _: 1 }, 8, ["class"]), [ [ct, Y.modelValue || S.value] ]), qe(Z(b(Ta), { class: H([b(o).be("picker", "empty"), b(o).is("icon-close")]) }, { default: q(() => [ Z(b(ob)) ]), _: 1 }, 8, ["class"]), [ [ct, !Y.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 Wfe = /* @__PURE__ */ Ht(qfe, [["__file", "color-picker.vue"]]); const Kfe = Xr(Wfe), Gfe = G({ name: "ElContainer" }), Xfe = /* @__PURE__ */ G({ ...Gfe, props: { direction: { type: String } }, setup(e) { const t = e, n = _r(), r = Wt("container"), a = O(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((o) => { const i = o.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (o, i) => ($(), B("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var Yfe = /* @__PURE__ */ Ht(Xfe, [["__file", "container.vue"]]); const Zfe = G({ name: "ElAside" }), Qfe = /* @__PURE__ */ G({ ...Zfe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Wt("aside"), r = O(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => ($(), B("aside", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var VM = /* @__PURE__ */ Ht(Qfe, [["__file", "aside.vue"]]); const Jfe = G({ name: "ElFooter" }), ehe = /* @__PURE__ */ G({ ...Jfe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Wt("footer"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("footer", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var jM = /* @__PURE__ */ Ht(ehe, [["__file", "footer.vue"]]); const the = G({ name: "ElHeader" }), nhe = /* @__PURE__ */ G({ ...the, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Wt("header"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("header", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var HM = /* @__PURE__ */ Ht(nhe, [["__file", "header.vue"]]); const rhe = G({ name: "ElMain" }), ahe = /* @__PURE__ */ G({ ...rhe, setup(e) { const t = Wt("main"); return (n, r) => ($(), B("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var UM = /* @__PURE__ */ Ht(ahe, [["__file", "main.vue"]]); const qM = Xr(Yfe, { Aside: VM, Footer: jM, Header: HM, Main: UM }); Pl(VM); Pl(jM); const WM = Pl(HM), V4 = Pl(UM), ohe = /* @__PURE__ */ G({ inheritAttrs: !1 }); function ihe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var she = /* @__PURE__ */ Ht(ohe, [["render", ihe], ["__file", "collection.vue"]]); const lhe = /* @__PURE__ */ G({ name: "ElCollectionItem", inheritAttrs: !1 }); function uhe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var che = /* @__PURE__ */ Ht(lhe, [["render", uhe], ["__file", "collection-item.vue"]]); const dhe = "data-el-collection-item", phe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...she, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${dhe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...che, name: n, setup(s, { attrs: l }) { const u = U(null), c = $e(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Ct(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, ok = Pn({ trigger: T0.trigger, effect: { ...Ja.effect, default: "light" }, type: { type: Ot(String) }, placement: { type: Ot(String), default: "bottom" }, popperOptions: { type: Ot(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: Ot([Number, String]), default: 0 }, maxHeight: { type: Ot([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Ot(Object) }, teleported: Ja.teleported }); Pn({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: Vu } }); Pn({ onKeydown: { type: Ot(Function) } }); phe("Dropdown"); const KM = Symbol("ElSelectGroup"), Ug = Symbol("ElSelect"); function fhe(e, t) { const n = $e(Ug), r = $e(KM, { disabled: !1 }), a = O(() => c(yu(n.props.modelValue), e.value)), o = O(() => { var h; if (n.props.multiple) { const p = yu((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = O(() => e.label || (ra(e.value) ? "" : e.value)), s = O(() => e.value || e.label || ""), l = O(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (ra(e.value)) { const v = n.props.valueKey; return h && h.some((m) => xo(ll(m, v)) === ll(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(_le(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => 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 && ra(h) && ra(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const hhe = G({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = Wt("select"), n = W2(), r = O(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = en({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = fhe(e, a), { visible: d, hover: f } = gr(a), h = tt().proxy; l.onOptionCreate(h), Ct(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((y) => y.value === h.value); We(() => { 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: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function vhe(e, t, n, r, a, o) { return qe(($(), B("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: et(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ K("span", null, _e(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ct, e.visible] ]); } var j4 = /* @__PURE__ */ Ht(hhe, [["render", vhe], ["__file", "option.vue"]]); const ghe = G({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = $e(Ug), t = Wt("select"), n = O(() => e.props.popperClass), r = O(() => e.props.multiple), a = O(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), ol(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function mhe(e, t, n, r, a, o) { return $(), B("div", { class: H([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Qe({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : te("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? ($(), B("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : te("v-if", !0) ], 6); } var yhe = /* @__PURE__ */ Ht(ghe, [["render", mhe], ["__file", "select-dropdown.vue"]]); const bhe = 11, whe = (e, t) => { const { t: n } = Dg(), r = W2(), a = Wt("select"), o = Wt("input"), i = en({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = wM({ afterComposition: (R) => ce(R) }), { wrapperRef: S, isFocused: _ } = P4(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(R) { var ie, Ie; return ((ie = u.value) == null ? void 0 : ie.isFocusInsideContent(R)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(R)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), F = U(), { form: A, formItem: I } = ep(), { inputId: N } = Vg(e, { formItemContext: I }), { valueOnClear: L, isEmptyValue: z } = Pce(e), P = O(() => e.disabled || (A == null ? void 0 : A.disabled)), D = O(() => ao(e.modelValue) ? e.modelValue.length > 0 : !z(e.modelValue)), M = O(() => e.clearable && !P.value && i.inputHovering && D.value), V = O(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Q = O(() => a.is("reverse", V.value && T.value)), X = O(() => (I == null ? void 0 : I.validateState) || ""), ee = O(() => ZN[X.value]), ue = O(() => e.remote ? 300 : 0), ve = O(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = O(() => se.value.filter((R) => R.visible).length), se = O(() => { const R = Array.from(i.options.values()), ie = []; return i.optionValues.forEach((Ie) => { const Ke = R.findIndex((Jt) => Jt.value === Ie); Ke > -1 && ie.push(R[Ke]); }), ie.length >= R.length ? ie : R; }), ne = O(() => Array.from(i.cachedOptions.values())), W = O(() => { const R = se.value.filter((ie) => !ie.created).some((ie) => ie.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !R; }), Y = () => { e.filterable && Wa(e.filterMethod) || e.filterable && e.remote && Wa(e.remoteMethod) || se.value.forEach((R) => { var ie; (ie = R.updateOption) == null || ie.call(R, i.inputValue); }); }, re = bd(), we = O(() => ["small"].includes(re.value) ? "small" : "default"), Oe = O({ get() { return T.value && ve.value !== !1; }, set(R) { T.value = R; } }), Ne = O(() => { if (e.multiple && !Eu(e.modelValue)) return yu(e.modelValue).length === 0 && !i.inputValue; const R = ao(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Eu(R) ? !i.inputValue : !0; }), xe = O(() => { var R; const ie = (R = e.placeholder) != null ? R : n("el.select.placeholder"); return e.multiple || !D.value ? ie : i.selectedLabel; }), Fe = O(() => RC ? null : "mouseenter"); be(() => e.modelValue, (R, ie) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !rb(R, ie) && e.validateEvent && (I == null || I.validate("change").catch((Ie) => wr(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (R) => { R ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", R); }), be(() => i.options.entries(), () => { var R; if (!br) return; const ie = ((R = s.value) == null ? void 0 : R.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Eu(e.modelValue) || !Array.from(ie).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (R) => { aa(R) && R > -1 ? F.value = se.value[R] || {} : F.value = {}, se.value.forEach((ie) => { ie.hover = F.value === ie; }); }), Wd(() => { i.isBeforeHide || Y(); }); const Se = (R) => { i.previousQuery === R || x.value || (i.previousQuery = R, e.filterable && Wa(e.filterMethod) ? e.filterMethod(R) : e.filterable && e.remote && Wa(e.remoteMethod) && e.remoteMethod(R), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? We(Pe) : We(De)); }, Pe = () => { const R = se.value.filter((Ke) => Ke.visible && !Ke.disabled && !Ke.states.groupDisabled), ie = R.find((Ke) => Ke.created), Ie = R[0]; i.hoveringIndex = Te(se.value, ie || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ie = ao(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = He(ie); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const R = []; Eu(e.modelValue) || yu(e.modelValue).forEach((ie) => { R.push(He(ie)); }), i.selected = R; }, He = (R) => { let ie; const Ie = Wx(R).toLowerCase() === "object", Ke = Wx(R).toLowerCase() === "null", Jt = Wx(R).toLowerCase() === "undefined"; for (let cn = i.cachedOptions.size - 1; cn >= 0; cn--) { const tn = ne.value[cn]; if (Ie ? ll(tn.value, e.valueKey) === ll(R, e.valueKey) : tn.value === R) { ie = { value: R, currentLabel: tn.currentLabel, get isDisabled() { return tn.isDisabled; } }; break; } } if (ie) return ie; const fn = Ie ? R.label : !Ke && !Jt ? R : ""; return { value: R, currentLabel: fn }; }, De = () => { i.hoveringIndex = se.value.findIndex((R) => i.selected.some((ie) => Qt(ie) === Qt(R))); }, Xe = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, Ge = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ze = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var R, ie; (ie = (R = u.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, j = () => { var R, ie; (ie = (R = c.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, le = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, ce = (R) => { if (i.inputValue = R.target.value, e.remote) oe(); else return le(); }, oe = qN(() => { le(); }, ue.value), ke = (R) => { rb(e.modelValue, R) || t(C4, R); }, fe = (R) => wle(R, (ie) => !i.disabledOptions.has(ie)), Ee = (R) => { if (e.multiple && R.code !== Ir.delete && R.target.value.length <= 0) { const ie = yu(e.modelValue).slice(), Ie = fe(ie); if (Ie < 0) return; const Ke = ie[Ie]; ie.splice(Ie, 1), t(Jr, ie), ke(ie), t("remove-tag", Ke); } }, Ve = (R, ie) => { const Ie = i.selected.indexOf(ie); if (Ie > -1 && !P.value) { const Ke = yu(e.modelValue).slice(); Ke.splice(Ie, 1), t(Jr, Ke), ke(Ke), t("remove-tag", ie.value); } R.stopPropagation(), wt(); }, je = (R) => { R.stopPropagation(); const ie = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ie.push(Ie.value); t(Jr, ie), ke(ie), i.hoveringIndex = -1, T.value = !1, t("clear"), wt(); }, me = (R) => { var ie; if (e.multiple) { const Ie = yu((ie = e.modelValue) != null ? ie : []).slice(), Ke = Te(Ie, R.value); Ke > -1 ? Ie.splice(Ke, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(R.value), t(Jr, Ie), ke(Ie), R.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(Jr, R.value), ke(R.value), T.value = !1; wt(), !T.value && We(() => { Ce(R); }); }, Te = (R = [], ie) => { if (!ra(ie)) return R.indexOf(ie); const Ie = e.valueKey; let Ke = -1; return R.some((Jt, fn) => xo(ll(Jt, Ie)) === ll(ie, Ie) ? (Ke = fn, !0) : !1), Ke; }, Ce = (R) => { var ie, Ie, Ke, Jt, fn; const cn = ao(R) ? R[0] : R; let tn = null; if (cn != null && cn.value) { const Xt = se.value.filter((Ur) => Ur.value === cn.value); Xt.length > 0 && (tn = Xt[0].$el); } if (u.value && tn) { const Xt = (Jt = (Ke = (Ie = (ie = u.value) == null ? void 0 : ie.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : Ke.querySelector) == null ? void 0 : Jt.call(Ke, `.${a.be("dropdown", "wrap")}`); Xt && Ole(Xt, tn); } (fn = y.value) == null || fn.handleScroll(); }, Le = (R) => { i.options.set(R.value, R), i.cachedOptions.set(R.value, R), R.disabled && i.disabledOptions.set(R.value, R); }, bt = (R, ie) => { i.options.get(R) === ie && i.options.delete(R); }, pt = O(() => { var R, ie; return (ie = (R = u.value) == null ? void 0 : R.popperRef) == null ? void 0 : ie.contentRef; }), Tt = () => { i.isBeforeHide = !1, We(() => Ce(i.selected)); }, wt = () => { var R; (R = d.value) == null || R.focus(); }, St = () => { var R; (R = d.value) == null || R.blur(); }, rn = (R) => { je(R); }, Bt = () => { T.value = !1, _.value && St(); }, Gt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, sn = () => { P.value || (RC && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, an = () => { T.value ? se.value[i.hoveringIndex] && me(se.value[i.hoveringIndex]) : sn(); }, Qt = (R) => ra(R.value) ? ll(R.value, e.valueKey) : R.value, Sn = O(() => se.value.filter((R) => R.visible).every((R) => R.disabled)), En = O(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = O(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Et = (R) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { R === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : R === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ie = se.value[i.hoveringIndex]; (ie.disabled === !0 || ie.states.groupDisabled === !0 || !ie.visible) && Et(R), We(() => Ce(F.value)); } }, Rt = () => { if (!l.value) return 0; const R = window.getComputedStyle(l.value); return Number.parseFloat(R.gap || "6px"); }, qt = O(() => { const R = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - R : i.selectionWidth}px` }; }), _n = O(() => ({ maxWidth: `${i.selectionWidth}px` })), $r = O(() => ({ width: `${Math.max(i.calculatorWidth, bhe)}px` })); return ol(l, Xe), ol(f, Ge), ol(v, E), ol(S, E), ol(m, j), ol(g, Ze), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: se, hoverOption: F, selectSize: re, filteredOptionsCount: ge, resetCalculatorWidth: Ge, updateTooltip: E, updateTagTooltip: j, debouncedOnInputChange: oe, onInput: ce, deletePrevTag: Ee, deleteTag: Ve, deleteSelected: je, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: D, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: Fe, showClose: M, iconComponent: V, iconReverse: Q, validateState: X, validateIcon: ee, showNewOption: W, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: bt, handleMenuEnter: Tt, focus: wt, blur: St, handleClearClick: rn, handleClickOutside: Bt, handleEsc: Gt, toggleMenu: sn, selectOption: an, getValueKey: Qt, navigateOptions: Et, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: $r, popperRef: pt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var xhe = G({ name: "ElOptions", setup(e, { slots: t }) { const n = $e(Ug); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.call(t), s = []; function l(u) { ao(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(!Fa(c.children) && !ao(c.children) && Wa((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) : ao(c.children) && l(c.children); }); } return i.length && l((o = i[0]) == null ? void 0 : o.children), rb(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const khe = Pn({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: hh, effect: { type: Ot(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: Ot(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: Ja.teleported, persistent: { type: Boolean, default: !0 }, clearIcon: { type: Vu, default: x4 }, fitInputWidth: Boolean, suffixIcon: { type: Vu, default: j2 }, tagType: { ...ZC.type, default: "info" }, tagEffect: { ...ZC.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: Ot(String), values: U2, default: "bottom-start" }, fallbackPlacements: { type: Ot(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...Ice, ...lc(["ariaLabel"]) }), NT = "ElSelect", Che = G({ name: NT, componentName: NT, components: { ElSelectMenu: yhe, ElOption: j4, ElOptions: xhe, ElTag: lfe, ElScrollbar: ude, ElTooltip: G2, ElIcon: Ta }, directives: { ClickOutside: PM }, props: khe, emits: [ Jr, C4, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = O(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return ao(o) ? i ? o : s : i ? s : o; }), r = en({ ...gr(e), modelValue: n }), a = whe(r, t); return rt(Ug, en({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function She(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = f2("click-outside"); return qe(($(), B("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [h2(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ Z(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: q(() => { var p; return [ K("div", { ref: "wrapperRef", class: H([ 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: et(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? ($(), B("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : te("v-if", !0), K("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ ($(!0), B(Ue, null, yt(e.showTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? ($(), ae(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: q(() => [ K("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.collapseTagStyle) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + _e(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: q(() => [ K("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ ($(!0), B(Ue, null, yt(e.collapseTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(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: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : te("v-if", !0) ]) : te("v-if", !0), e.selectDisabled ? te("v-if", !0) : ($(), B("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ qe(K("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: H([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Qe(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: [ gn(et((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(et((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(et(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(et(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(et(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: et(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"]), [ [$g, e.states.inputValue] ]), e.filterable ? ($(), B("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: _e(e.states.inputValue) }, null, 10, ["textContent"])) : te("v-if", !0) ], 2)), e.shouldShowPlaceholder ? ($(), B("div", { key: 2, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ K("span", null, _e(e.currentPlaceholder), 1) ]) : ($(), B("span", { key: 1 }, _e(e.currentPlaceholder), 1)) ], 2)) : te("v-if", !0) ], 2), K("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? ($(), ae(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: q(() => [ ($(), ae(dt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), e.showClose && e.clearIcon ? ($(), ae(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: q(() => [ ($(), ae(dt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0), e.validateState && e.validateIcon ? ($(), ae(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: q(() => [ ($(), ae(dt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: q(() => [ Z(f, { ref: "menuRef" }, { default: q(() => [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : te("v-if", !0), qe(Z(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: H([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: q(() => [ e.showNewOption ? ($(), ae(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : te("v-if", !0), Z(c, null, { default: q(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ct, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? ($(), B("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? ($(), B("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ K("span", null, _e(e.emptyText), 1) ]) ], 2)) : te("v-if", !0), e.$slots.footer ? ($(), B("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : te("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 Ehe = /* @__PURE__ */ Ht(Che, [["render", She], ["__file", "select.vue"]]); const _he = G({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Wt("select"), n = U(null), r = tt(), a = U([]); rt(KM, en({ ...gr(e) })); const o = O(() => a.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 = yu(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 = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), xae(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function The(e, t, n, r, a, o) { return qe(($(), B("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ K("li", { class: H(e.ns.be("group", "title")) }, _e(e.label), 3), K("li", null, [ K("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [ct, e.visible] ]); } var GM = /* @__PURE__ */ Ht(_he, [["render", The], ["__file", "option-group.vue"]]); const $he = Xr(Ehe, { Option: j4, OptionGroup: GM }), Ohe = Pl(j4); Pl(GM); const Fhe = Pn({ trigger: T0.trigger, placement: ok.placement, disabled: T0.disabled, visible: Ja.visible, transition: Ja.transition, popperOptions: ok.popperOptions, tabindex: ok.tabindex, content: Ja.content, popperStyle: Ja.popperStyle, popperClass: Ja.popperClass, enterable: { ...Ja.enterable, default: !0 }, effect: { ...Ja.effect, default: "light" }, teleported: Ja.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 } }), Ahe = { "update:visible": (e) => Ef(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, Ihe = "onUpdate:visible", Phe = G({ name: "ElPopover" }), Lhe = /* @__PURE__ */ G({ ...Phe, props: Fhe, emits: Ahe, setup(e, { expose: t, emit: n }) { const r = e, a = O(() => r[Ihe]), o = Wt("popover"), i = U(), s = O(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = O(() => [ { width: _f(r.width) }, r.popperStyle ]), u = O(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = O(() => r.transition === `${o.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) => ($(), ae(b(G2), Dt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: q(() => [ m.title ? ($(), B("div", { key: 0, class: H(b(o).e("title")), role: "title" }, _e(m.title), 3)) : te("v-if", !0), he(m.$slots, "default", {}, () => [ ze(_e(m.content), 1) ]) ]), default: q(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : te("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 Nhe = /* @__PURE__ */ Ht(Lhe, [["__file", "popover.vue"]]); const MT = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var Mhe = { mounted(e, t) { MT(e, t); }, updated(e, t) { MT(e, t); } }; const Dhe = "popover", Bhe = nue(Mhe, Dhe), H4 = Xr(Nhe, { directive: Bhe }), af = "$treeNodeId", DT = function(e, t) { !t || t[af] || Object.defineProperty(t, af, { value: e.id, enumerable: !1, configurable: !1, writable: !1 }); }, U4 = function(e, t) { return e ? t[e] : t[af]; }, QC = (e, t, n) => { const r = e.value.currentNode; n(); const a = e.value.currentNode; r !== a && t("current-change", a ? a.data : null, a); }, JC = (e) => { let t = !0, n = !0, r = !0; for (let a = 0, o = e.length; a < o; a++) { const i = e[a]; (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 }; }, Av = function(e) { if (e.childNodes.length === 0 || e.loading) return; const { all: t, none: n, half: r } = JC(e.childNodes); t ? (e.checked = !0, e.indeterminate = !1) : r ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1); const a = e.parent; !a || a.level === 0 || e.store.checkStrictly || Av(a); }, Zm = function(e, t) { const n = e.store.props, r = e.data || {}, a = n[t]; if (typeof a == "function") return a(r, e); if (typeof a == "string") return r[a]; if (typeof a > "u") { const o = r[t]; return o === void 0 ? "" : o; } }; let Rhe = 0, e5 = class ly { constructor(t) { this.id = Rhe++, 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) md(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 o = Zm(this, "isLeaf"); typeof o == "boolean" && (this.isLeafByUser = o); } 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) || DT(this, this.data), !this.data) return; const r = t.defaultExpandedKeys, a = t.key; a && r && r.includes(this.key) && this.expand(null, t.autoExpandParent), a && 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) || DT(this, t), this.data = t, this.childNodes = []; let n; this.level === 0 && Array.isArray(this.data) ? n = this.data : n = Zm(this, "children") || []; for (let r = 0, a = n.length; r < a; r++) this.insertChild({ data: n[r] }); } get label() { return Zm(this, "label"); } get key() { const t = this.store.key; return this.data ? this.data[t] : null; } get disabled() { return Zm(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 ly)) { if (!r) { const a = this.getChildren(!0); a.includes(t.data) || (typeof n > "u" || n < 0 ? a.push(t.data) : a.splice(n, 0, t.data)); } Object.assign(t, { parent: this, store: this.store }), t = en(new ly(t)), t instanceof ly && 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 a = this.childNodes.indexOf(t); a > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(a, 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 a = this.parent; for (; a.level > 0; ) a.expanded = !0, a = a.parent; } this.expanded = !0, t && t(), this.childNodes.forEach((a) => { a.canFocus = !0; }); }; this.shouldLoadData() ? this.loadData((a) => { Array.isArray(a) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || Av(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, a) { if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: i, allWithoutDisable: s } = JC(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]; a = a || t !== !1; const v = p.disabled ? p.checked : a; p.setChecked(v, n, !0, a); } const { half: c, all: d } = JC(u); d || (this.checked = d, this.indeterminate = c); } }; if (this.shouldLoadData()) { this.loadData(() => { l(), Av(this); }, { checked: t !== !1 }); return; } else l(); } const o = this.parent; !o || o.level === 0 || r || Av(o); } getChildren(t = !1) { if (this.level === 0) return this.data; const n = this.data; if (!n) return null; const r = this.store.props; let a = "children"; return r && (a = r.children || "children"), n[a] === void 0 && (n[a] = null), t && !n[a] && (n[a] = []), n[a]; } updateChildren() { const t = this.getChildren() || [], n = this.childNodes.map((o) => o.data), r = {}, a = []; t.forEach((o, i) => { const s = o[af]; s && n.findIndex((l) => l[af] === s) >= 0 ? r[s] = { index: i, data: o } : a.push({ index: i, data: o }); }), this.store.lazy || n.forEach((o) => { r[o[af]] || this.removeChildByData(o); }), a.forEach(({ index: o, data: i }) => { this.insertChild({ data: i }, o); }), 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 = (o) => { this.childNodes = [], this.doCreateChildren(o, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, o); }, a = () => { this.loading = !1; }; this.store.load(this, r, a); } 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 || Av(this); } }, zhe = class { constructor(t) { this.currentNode = null, this.currentNodeKey = null; for (const n in t) md(t, n) && (this[n] = t[n]); this.nodesMap = {}; } initialize() { if (this.root = new e5({ 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, a = function(o) { const i = o.root ? o.root.childNodes : o.childNodes; if (i.forEach((s) => { s.visible = n.call(s, t, s.data, s), a(s); }), !o.visible && i.length) { let s = !0; s = !i.some((l) => l.visible), o.root ? o.root.visible = s === !1 : o.visible = s === !1; } t && o.visible && !o.isLeaf && (!r || o.loaded) && o.expand(); }; a(this); } setData(t) { t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes()) : this.root.updateChildren(); } getNode(t) { if (t instanceof e5) return t; const n = ra(t) ? U4(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 = ab(n) ? this.root : this.getNode(n); r && r.insertChild({ data: t }); } _initDefaultCheckedNodes() { const t = this.defaultCheckedKeys || [], n = this.nodesMap; t.forEach((r) => { const a = n[r]; a && a.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 = [], a = function(o) { (o.root ? o.root.childNodes : o.childNodes).forEach((i) => { (i.checked || n && i.indeterminate) && (!t || t && i.isLeaf) && r.push(i.data), a(i); }); }; return a(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((a) => { a.indeterminate && t.push(a.data), n(a); }); }; return n(this), t; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]); } _getAllNodes() { const t = [], n = this.nodesMap; for (const r in n) md(n, r) && t.push(n[r]); return t; } updateChildren(t, n) { const r = this.nodesMap[t]; if (!r) return; const a = r.childNodes; for (let o = a.length - 1; o >= 0; o--) { const i = a[o]; this.remove(i.data); } for (let o = 0, i = n.length; o < i; o++) { const s = n[o]; this.append(s, r.data); } } _setCheckedKeys(t, n = !1, r) { const a = this._getAllNodes().sort((l, u) => l.level - u.level), o = /* @__PURE__ */ Object.create(null), i = Object.keys(r); a.forEach((l) => l.setChecked(!1, !1)); const s = (l) => { l.childNodes.forEach((u) => { var c; o[u.data[t]] = !0, (c = u.childNodes) != null && c.length && s(u); }); }; for (let l = 0, u = a.length; l < u; l++) { const c = a[l], d = c.data[t].toString(); if (!i.includes(d)) { c.checked && !o[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, a = {}; t.forEach((o) => { a[(o || {})[r]] = !0; }), this._setCheckedKeys(r, n, a); } setCheckedKeys(t, n = !1) { this.defaultCheckedKeys = t; const r = this.key, a = {}; t.forEach((o) => { a[o] = !0; }), this._setCheckedKeys(r, n, a); } 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 a = this.getNode(t); a && a.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], a = this.nodesMap[r]; this.setCurrentNode(a), 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 Vhe = G({ name: "ElTreeNodeContent", props: { node: { type: Object, required: !0 }, renderContent: Function }, setup(e) { const t = Wt("tree"), n = $e("NodeInstance"), r = $e("RootTree"); return () => { const a = e.node, { data: o, store: i } = a; return e.renderContent ? e.renderContent(nn, { _self: n, node: a, data: o, store: i }) : he(r.ctx.slots, "default", { node: a, data: o }, () => [ nn("span", { class: t.be("node", "label") }, [a.label]) ]); }; } }); var jhe = /* @__PURE__ */ Ht(Vhe, [["__file", "tree-node-content.vue"]]); function XM(e) { const t = $e("TreeNodeMap", null), n = { treeNodeExpand: (r) => { e.node !== r && e.node.collapse(); }, children: [] }; return t && t.children.push(n), rt("TreeNodeMap", n), { broadcastExpanded: (r) => { if (e.accordion) for (const a of n.children) a.treeNodeExpand(r); } }; } const YM = Symbol("dragEvents"); function Hhe({ props: e, ctx: t, el$: n, dropIndicator$: r, store: a }) { const o = Wt("tree"), i = U({ showDropIndicator: !1, draggingNode: null, dropNode: null, allowDrop: !0, dropType: null }); return rt(YM, { 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 && nd(c.$el, o.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(`.${o.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect(); let y; const x = f ? h ? 0.25 : p ? 0.45 : 1 : -1, w = p ? h ? 0.75 : f ? 0.55 : 0 : 1; let k = -9999; const C = s.clientY - m.top; C < m.height * x ? y = "before" : C > m.height * w ? y = "after" : h ? y = "inner" : y = "none"; const S = u.$el.querySelector(`.${o.be("node", "expand-icon")}`).getBoundingClientRect(), _ = r.value; y === "before" ? k = S.top - g.top : y === "after" && (k = S.bottom - g.top), _.style.top = `${k}px`, _.style.left = `${S.right - g.left}px`, y === "inner" ? qC(u.$el, o.is("drop-inner")) : nd(u.$el, o.is("drop-inner")), i.value.showDropIndicator = y === "before" || y === "after", i.value.allowDrop = i.value.showDropIndicator || v, i.value.dropType = y, 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" && (a.value.registerNode(d), a.value.key && l.node.eachNode((f) => { var h; (h = a.value.nodesMap[f.data[a.value.key]]) == null || h.setChecked(f.checked, !a.value.checkStrictly); })), nd(c.$el, o.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 Uhe = G({ name: "ElTreeNode", components: { ElCollapseTransition: kfe, ElCheckbox: rfe, NodeContent: jhe, ElIcon: Ta, Loading: k4 }, props: { node: { type: e5, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: !1 } }, emits: ["node-expand"], setup(e, t) { const n = Wt("tree"), { broadcastExpanded: r } = XM(e), a = $e("RootTree"), o = U(!1), i = U(!1), s = U(null), l = U(null), u = U(null), c = $e(YM), d = tt(); rt("NodeInstance", d), a || wr("Tree", "Can not find node's tree."), e.node.expanded && (o.value = !0, i.value = !0); const f = a.props.props.children || "children"; be(() => { const w = e.node.data[f]; return w && [...w]; }, () => { e.node.updateChildren(); }), be(() => e.node.indeterminate, (w) => { v(e.node.checked, w); }), be(() => e.node.checked, (w) => { v(w, e.node.indeterminate); }), be(() => e.node.childNodes.length, () => e.node.reInitChecked()), be(() => e.node.expanded, (w) => { We(() => o.value = w), w && (i.value = !0); }); const h = (w) => U4(a.props.nodeKey, w.data), p = (w) => { const k = e.props.class; if (!k) return {}; let C; if (Wa(k)) { const { data: S } = w; C = k(S, w); } else C = k; return Fa(C) ? { [C]: !0 } : C; }, v = (w, k) => { (s.value !== w || l.value !== k) && a.ctx.emit("check-change", e.node.data, w, k), s.value = w, l.value = k; }, m = (w) => { QC(a.store, a.ctx.emit, () => a.store.value.setCurrentNode(e.node)), a.currentNode.value = e.node, a.props.expandOnClickNode && y(), a.props.checkOnClickNode && !e.node.disabled && x(null, { target: { checked: !e.node.checked } }), a.ctx.emit("node-click", e.node.data, e.node, d, w); }, g = (w) => { a.instance.vnode.props.onNodeContextmenu && (w.stopPropagation(), w.preventDefault()), a.ctx.emit("node-contextmenu", w, e.node.data, e.node, d); }, y = () => { e.node.isLeaf || (o.value ? (a.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); })); }, x = (w, k) => { e.node.setChecked(k.target.checked, !a.props.checkStrictly), We(() => { const C = a.store.value; a.ctx.emit("check", e.node.data, { checkedNodes: C.getCheckedNodes(), checkedKeys: C.getCheckedKeys(), halfCheckedNodes: C.getHalfCheckedNodes(), halfCheckedKeys: C.getHalfCheckedKeys() }); }); }; return { ns: n, node$: u, tree: a, expanded: o, childNodeRendered: i, oldChecked: s, oldIndeterminate: l, getNodeKey: h, getNodeClass: p, handleSelectChange: v, handleClick: m, handleContextMenu: g, handleExpandIconClick: y, handleCheckChange: x, handleChildNodeExpand: (w, k, C) => { r(k), a.ctx.emit("node-expand", w, k, C); }, handleDragStart: (w) => { a.props.draggable && c.treeNodeDragStart({ event: w, treeNode: e }); }, handleDragOver: (w) => { w.preventDefault(), a.props.draggable && c.treeNodeDragOver({ event: w, treeNode: { $el: u.value, node: e.node } }); }, handleDrop: (w) => { w.preventDefault(); }, handleDragEnd: (w) => { a.props.draggable && c.treeNodeDragEnd(w); }, CaretRight: Ple }; } }); function qhe(e, t, n, r, a, o) { const i = lt("el-icon"), s = lt("el-checkbox"), l = lt("loading"), u = lt("node-content"), c = lt("el-tree-node"), d = lt("el-collapse-transition"); return qe(($(), B("div", { ref: "node$", class: H([ 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: et(e.handleClick, ["stop"]), onContextmenu: e.handleContextMenu, onDragstart: et(e.handleDragStart, ["stop"]), onDragover: et(e.handleDragOver, ["stop"]), onDragend: et(e.handleDragEnd, ["stop"]), onDrop: et(e.handleDrop, ["stop"]) }, [ K("div", { class: H(e.ns.be("node", "content")), style: Qe({ paddingLeft: (e.node.level - 1) * e.tree.props.indent + "px" }) }, [ e.tree.props.icon || e.CaretRight ? ($(), ae(i, { key: 0, class: H([ e.ns.be("node", "expand-icon"), e.ns.is("leaf", e.node.isLeaf), { expanded: !e.node.isLeaf && e.expanded } ]), onClick: et(e.handleExpandIconClick, ["stop"]) }, { default: q(() => [ ($(), ae(dt(e.tree.props.icon || e.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0), e.showCheckbox ? ($(), ae(s, { key: 1, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: !!e.node.disabled, onClick: et(() => { }, ["stop"]), onChange: e.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : te("v-if", !0), e.node.loading ? ($(), ae(i, { key: 2, class: H([e.ns.be("node", "loading-icon"), e.ns.is("loading")]) }, { default: q(() => [ Z(l) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), Z(u, { node: e.node, "render-content": e.renderContent }, null, 8, ["node", "render-content"]) ], 6), Z(d, null, { default: q(() => [ !e.renderAfterExpand || e.childNodeRendered ? qe(($(), B("div", { key: 0, class: H(e.ns.be("node", "children")), role: "group", "aria-expanded": e.expanded }, [ ($(!0), B(Ue, null, yt(e.node.childNodes, (f) => ($(), ae(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"])), [ [ct, e.expanded] ]) : te("v-if", !0) ]), _: 1 }) ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [ [ct, e.node.visible] ]); } var Whe = /* @__PURE__ */ Ht(Uhe, [["render", qhe], ["__file", "tree-node.vue"]]); function Khe({ el$: e }, t) { const n = Wt("tree"), r = un([]), a = un([]); nt(() => { o(); }), qd(() => { r.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), a.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); }), be(a, (i) => { i.forEach((s) => { s.setAttribute("tabindex", "-1"); }); }), Wo(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 ([Ir.up, Ir.down].includes(l)) { if (i.preventDefault(), l === Ir.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(); } [Ir.left, Ir.right].includes(l) && (i.preventDefault(), s.click()); const d = s.querySelector('[type="checkbox"]'); [Ir.enter, Ir.space].includes(l) && d && (i.preventDefault(), d.click()); }); const o = () => { var i; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), a.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 Ghe = G({ name: "ElTree", components: { ElTreeNode: Whe }, 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: Vu } }, 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 } = Dg(), r = Wt("tree"), a = $e(Ug, null), o = U(new zhe({ 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 })); o.value.initialize(); const i = U(o.value.root), s = U(null), l = U(null), u = U(null), { broadcastExpanded: c } = XM(e), { dragState: d } = Hhe({ props: e, ctx: t, el$: l, dropIndicator$: u, store: o }); Khe({ el$: l }, o); const f = O(() => { const { childNodes: M } = i.value, V = a ? a.hasFilteredOptions !== 0 : !1; return (!M || M.length === 0 || M.every(({ visible: Q }) => !Q)) && !V; }); be(() => e.currentNodeKey, (M) => { o.value.setCurrentNodeKey(M); }), be(() => e.defaultCheckedKeys, (M) => { o.value.setDefaultCheckedKey(M); }), be(() => e.defaultExpandedKeys, (M) => { o.value.setDefaultExpandedKeys(M); }), be(() => e.data, (M) => { o.value.setData(M); }, { deep: !0 }), be(() => e.checkStrictly, (M) => { o.value.checkStrictly = M; }); const h = (M) => { if (!e.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); o.value.filter(M); }, p = (M) => U4(e.nodeKey, M.data), v = (M) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const V = o.value.getNode(M); if (!V) return []; const Q = [V.data]; let X = V.parent; for (; X && X !== i.value; ) Q.push(X.data), X = X.parent; return Q.reverse(); }, m = (M, V) => o.value.getCheckedNodes(M, V), g = (M) => o.value.getCheckedKeys(M), y = () => { const M = o.value.getCurrentNode(); return M ? M.data : null; }, x = () => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const M = y(); return M ? M[e.nodeKey] : null; }, w = (M, V) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); o.value.setCheckedNodes(M, V); }, k = (M, V) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); o.value.setCheckedKeys(M, V); }, C = (M, V, Q) => { o.value.setChecked(M, V, Q); }, S = () => o.value.getHalfCheckedNodes(), _ = () => o.value.getHalfCheckedKeys(), T = (M, V = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); QC(o, t.emit, () => { c(M), o.value.setUserCurrentNode(M, V); }); }, F = (M, V = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); QC(o, t.emit, () => { c(), o.value.setCurrentNodeKey(M, V); }); }, A = (M) => o.value.getNode(M), I = (M) => { o.value.remove(M); }, N = (M, V) => { o.value.append(M, V); }, L = (M, V) => { o.value.insertBefore(M, V); }, z = (M, V) => { o.value.insertAfter(M, V); }, P = (M, V, Q) => { c(V), t.emit("node-expand", M, V, Q); }, D = (M, V) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); o.value.updateChildren(M, V); }; return rt("RootTree", { ctx: t, props: e, store: o, root: i, currentNode: s, instance: tt() }), rt(_0, void 0), { ns: r, store: o, root: i, currentNode: s, dragState: d, el$: l, dropIndicator$: u, isEmpty: f, filter: h, getNodeKey: p, getNodePath: v, getCheckedNodes: m, getCheckedKeys: g, getCurrentNode: y, getCurrentKey: x, setCheckedNodes: w, setCheckedKeys: k, setChecked: C, getHalfCheckedNodes: S, getHalfCheckedKeys: _, setCurrentNode: T, setCurrentKey: F, t: n, getNode: A, remove: I, append: N, insertBefore: L, insertAfter: z, handleNodeExpand: P, updateKeyChildren: D }; } }); function Xhe(e, t, n, r, a, o) { const i = lt("el-tree-node"); return $(), B("div", { ref: "el$", class: H([ 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" }, [ ($(!0), B(Ue, null, yt(e.root.childNodes, (s) => ($(), ae(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 ? ($(), B("div", { key: 0, class: H(e.ns.e("empty-block")) }, [ he(e.$slots, "empty", {}, () => { var s; return [ K("span", { class: H(e.ns.e("empty-text")) }, _e((s = e.emptyText) != null ? s : e.t("el.tree.emptyText")), 3) ]; }) ], 2)) : te("v-if", !0), qe(K("div", { ref: "dropIndicator$", class: H(e.ns.e("drop-indicator")) }, null, 2), [ [ct, e.dragState.showDropIndicator] ]) ], 2); } var Yhe = /* @__PURE__ */ Ht(Ghe, [["render", Xhe], ["__file", "tree.vue"]]); const Zhe = Xr(Yhe); function Qhe(e) { let t; const n = U(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { 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()) : (nd(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), nd(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, o(); } const u = G({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = Nce("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = nn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ nn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? nn("p", { class: p.b("text") }, [r.text]) : void 0; return nn(lr, { name: p.b("fade"), onAfterLeave: l }, { default: q(() => [ qe(Z("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ nn("div", { class: p.b("spinner") }, [g, y]) ]), [[ct, r.visible]]) ]) }); }; } }), c = Og(u), d = c.mount(document.createElement("div")); return { ...gr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let Qm; const Jhe = function(e = {}) { if (!br) return; const t = eve(e); if (t.fullscreen && Qm) return Qm; const n = Qhe({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (Qm = void 0); } }); tve(t, t.parent, n), BT(t, t.parent, n), t.parent.vLoadingAddClassList = () => BT(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), We(() => n.visible.value = t.visible), t.fullscreen && (Qm = n), n; }, eve = (e) => { var t, n, r, a; let o; return Fa(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, tve = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = nv(document.body, "position"), n.originalOverflow.value = nv(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = nv(document.body, "position"), await We(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(nv(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = nv(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, BT = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? nd(t, r.bm("parent", "relative")) : qC(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? qC(t, r.bm("parent", "hidden")) : nd(t, r.bm("parent", "hidden")); }, uy = Symbol("ElLoading"), RT = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => ra(t.value) ? t.value[f] : void 0, l = (f) => { const h = Fa(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${Lae(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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[uy] = { options: d, instance: Jhe(d) }; }, nve = (e, t) => { for (const n of Object.keys(t)) Kn(t[n]) && (t[n].value = e[n]); }, ZM = { mounted(e, t) { t.value && RT(e, t); }, updated(e, t) { const n = e[uy]; t.oldValue !== t.value && (t.value && !t.oldValue ? RT(e, t) : t.value && t.oldValue ? ra(t.value) && nve(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[uy]) == null || t.instance.close(), e[uy] = null; } }, Ds = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, rve = { name: "AnnotationPopup", props: { annotationEntry: { type: Object } }, inject: ["$annotator", "userApiKey"], data: function() { return { displayPair: { "Feature ID": "featureId", Tooltip: "label", Models: "models", Name: "name", Resource: "resourceId" }, editing: !1, evidencePrefixes: ["", "DOI:", "PMID:"], evidencePrefix: "", evidence: [], authenticated: !1, newEvidence: "", comment: "", prevSubs: [], showSubmissions: !0, errorMessage: "", creator: void 0 }; }, 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"; } }, methods: { 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 a = r.replace("DOI:", "https://doi.org/"); t.push(new URL(a)); } else if (r.includes("PMID:")) { const a = r.replace( "PMID:", "https://pubmed.ncbi.nlm.nih.gov/" ); t.push(new URL(a)); } 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 = ""; } }, 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 = ""; }); } }, tp = (e) => (ma("data-v-9930ef40"), e = e(), ya(), e), ave = { class: "block" }, ove = /* @__PURE__ */ tp(() => /* @__PURE__ */ K("div", { class: "title" }, "Feature Annotations", -1)), ive = /* @__PURE__ */ tp(() => /* @__PURE__ */ K("strong", { class: "sub-title" }, "Previous submissions:", -1)), sve = /* @__PURE__ */ tp(() => /* @__PURE__ */ K("strong", null, "Evidence: ", -1)), lve = ["href"], uve = /* @__PURE__ */ tp(() => /* @__PURE__ */ K("strong", null, "Comment: ", -1)), cve = /* @__PURE__ */ tp(() => /* @__PURE__ */ K("strong", { class: "sub-title" }, "Suggest changes:", -1)), dve = /* @__PURE__ */ tp(() => /* @__PURE__ */ K("strong", null, "Evidence:", -1)), pve = /* @__PURE__ */ tp(() => /* @__PURE__ */ K("strong", null, "Comment:", -1)), fve = { class: "sub-title" }; function hve(e, t, n, r, a, o) { const i = X2, s = XN, l = Ta, u = j2, c = Hle, d = Vle, f = qle, h = Hg, p = ob, v = Ohe, m = $he, g = jg, y = Es, x = V4; return $(), ae(x, { class: "main" }, { default: q(() => [ K("div", ave, [ Z(i, { class: "info-field" }, { default: q(() => [ ove ]), _: 1 }), n.annotationEntry ? ($(), B(Ue, { key: 0 }, [ ($(!0), B(Ue, null, yt(e.displayPair, (w, k) => qe(($(), ae(i, { class: "dialog-text", key: w }, { default: q(() => [ K("strong", null, _e(k) + ": ", 1), ze(" " + _e(n.annotationEntry[w]), 1) ]), _: 2 }, 1024)), [ [ct, n.annotationEntry[w]] ])), 128)), e.prevSubs.length > 0 ? ($(), B(Ue, { key: 0 }, [ qe(K("div", { class: "hide", onClick: t[0] || (t[0] = (w) => e.showSubmissions = !1) }, [ ze(" Hide previous submissions "), Z(l, null, { default: q(() => [ Z(s) ]), _: 1 }) ], 512), [ [ct, e.showSubmissions] ]), qe(K("div", { class: "hide", onClick: t[1] || (t[1] = (w) => e.showSubmissions = !0) }, [ ze(" Show previous " + _e(e.prevSubs.length) + " submission(s) ", 1), Z(l, null, { default: q(() => [ Z(u) ]), _: 1 }) ], 512), [ [ct, !e.showSubmissions] ]), e.showSubmissions ? ($(), B(Ue, { key: 0 }, [ Z(i, { class: "dialog-spacer" }), Z(i, { class: "dialog-text" }, { default: q(() => [ ive ]), _: 1 }), ($(!0), B(Ue, null, yt(e.prevSubs, (w, k) => ($(), B("div", { class: "entry", key: k }, [ Z(i, { class: "dialog-text" }, { default: q(() => [ K("strong", null, _e(o.formatTime(w.created)), 1), ze(" " + _e(w.creator.name), 1) ]), _: 2 }, 1024), Z(i, { class: "dialog-text" }, { default: q(() => [ sve, ($(!0), B(Ue, null, yt(w.body.evidence, (C) => ($(), ae(i, { key: C, class: "dialog-text" }, { default: q(() => [ K("a", { href: C, target: "_blank" }, _e(C), 9, lve) ]), _: 2 }, 1024))), 128)) ]), _: 2 }, 1024), Z(i, { class: "dialog-text" }, { default: q(() => [ uve, ze(" " + _e(w.body.comment), 1) ]), _: 2 }, 1024) ]))), 128)) ], 64)) : te("", !0) ], 64)) : te("", !0), e.authenticated ? ($(), B(Ue, { key: 1 }, [ o.isEditable ? ($(), B(Ue, { key: 0 }, [ Z(i, { class: "dialog-spacer" }), e.editing ? ($(), B(Ue, { key: 1 }, [ Z(i, { class: "dialog-text" }, { default: q(() => [ cve ]), _: 1 }), o.isDeleted ? te("", !0) : ($(), B(Ue, { key: 0 }, [ Z(i, { class: "dialog-text" }, { default: q(() => [ dve ]), _: 1 }), ($(!0), B(Ue, null, yt(e.evidence, (w, k) => ($(), ae(i, { key: w }, { default: q(() => [ Z(h, { span: 20 }, { default: q(() => [ ze(_e(e.evidence[k]), 1) ]), _: 2 }, 1024), Z(h, { span: 4 }, { default: q(() => [ Z(l, { class: "standard-icon" }, { default: q(() => [ Z(p, { onClick: (C) => o.removeEvidence(k) }, null, 8, ["onClick"]) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1024))), 128)), Z(i, null, { default: q(() => [ Z(g, { size: "small", placeholder: "Enter", modelValue: e.newEvidence, "onUpdate:modelValue": t[4] || (t[4] = (w) => e.newEvidence = w), onChange: t[5] || (t[5] = (w) => o.evidenceEntered(w)) }, { prepend: q(() => [ Z(m, { teleported: !1, modelValue: e.evidencePrefix, "onUpdate:modelValue": t[3] || (t[3] = (w) => e.evidencePrefix = w), placeholder: "No Prefix", class: "select-box", "popper-class": "flatmap_dropdown" }, { default: q(() => [ ($(!0), B(Ue, null, yt(e.evidencePrefixes, (w) => ($(), ae(v, { key: w, label: w, value: w }, { default: q(() => [ Z(i, null, { default: q(() => [ Z(h, { span: 12 }, { default: q(() => [ ze(_e(w), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }) ], 64)), Z(i, null, { default: q(() => [ pve ]), _: 1 }), Z(i, { class: "dialog-text" }, { default: q(() => [ Z(g, { 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 }), Z(i, { class: "dialog-text" }, { default: q(() => [ Z(y, { class: "button", type: "primary", plain: "", onClick: o.submit }, { default: q(() => [ ze(" Submit ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ], 64)) : ($(), ae(i, { key: 0 }, { default: q(() => [ Z(l, { class: "standard-icon" }, { default: q(() => [ Z(c, { onClick: t[2] || (t[2] = (w) => e.editing = !0) }) ]), _: 1 }), o.isDeleted ? ($(), ae(l, { key: 0, class: "standard-icon" }, { default: q(() => [ Z(d, { onClick: o.submit }, null, 8, ["onClick"]) ]), _: 1 })) : o.isPositionUpdated ? ($(), ae(l, { key: 1, class: "standard-icon" }, { default: q(() => [ Z(f, { onClick: o.submit }, null, 8, ["onClick"]) ]), _: 1 })) : te("", !0) ]), _: 1 })), e.errorMessage ? ($(), ae(i, { key: 2, class: "dialog-text" }, { default: q(() => [ K("strong", fve, _e(e.errorMessage), 1) ]), _: 1 })) : te("", !0) ], 64)) : te("", !0) ], 64)) : te("", !0) ], 64)) : te("", !0) ]) ]), _: 1 }); } const vve = /* @__PURE__ */ Ds(rve, [["render", hve], ["__scopeId", "data-v-9930ef40"]]), gve = { name: "CreateTooltipContent", components: { Button: Es, Col: Hg, Container: qM, Header: WM, Input: jg, Main: V4 }, 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"); } } }, mve = (e) => (ma("data-v-d61c5879"), e = e(), ya(), e), yve = /* @__PURE__ */ mve(() => /* @__PURE__ */ K("span", { class: "create-text" }, " Primitives will be created in the __annotation region ", -1)); function bve(e, t, n, r, a, o) { const i = WM, s = Hg, l = X2, u = jg, c = Es, d = V4, f = qM; return $(), ae(f, { class: "create-container" }, { default: q(() => [ Z(i, { height: "30px", class: "header" }, { default: q(() => [ K("div", null, "Create " + _e(n.createData.shape), 1) ]), _: 1 }), Z(d, { class: "slides-block" }, { default: q(() => [ yve, qe(Z(l, { class: "row" }, { default: q(() => [ Z(s, { offset: 0, span: 8 }, { default: q(() => [ ze(" Position: ") ]), _: 1 }), Z(s, { offset: 0, span: 16 }, { default: q(() => [ ($(!0), B(Ue, null, yt(n.createData.points, ({ value: h, i: p }) => ($(), ae(l, { key: p, class: "value" }, { default: q(() => [ ze(_e(p), 1) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 }, 512), [ [ct, e.showPoint] ]), Z(l, { class: "row" }, { default: q(() => [ Z(s, { offset: 0, span: 8 }, { default: q(() => [ ze(" Region: ") ]), _: 1 }), Z(s, { offset: 0, span: 16 }, { default: q(() => [ Z(u, { modelValue: e.region, "onUpdate:modelValue": t[0] || (t[0] = (h) => e.region = h), placeholder: "__annotation", size: "small" }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }), Z(l, { class: "row" }, { default: q(() => [ Z(s, { offset: 0, span: 8 }, { default: q(() => [ ze(" Group: ") ]), _: 1 }), Z(s, { offset: 0, span: 16 }, { default: q(() => [ Z(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 }), Z(l, null, { default: q(() => [ Z(s, { offset: 0, span: 12 }, { default: q(() => [ Z(c, { type: "primary", plain: "", onClick: o.confirm }, { default: q(() => [ ze(_e(o.confirmText), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }), Z(s, { offset: 0, span: 12 }, { default: q(() => [ Z(c, { type: "primary", plain: "", onClick: o.cancel }, { default: q(() => [ ze(" Cancel ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }); } const hlt = /* @__PURE__ */ Ds(gve, [["render", bve], ["__scopeId", "data-v-d61c5879"]]); function Rr(e) { "@babel/helpers - typeof"; return Rr = 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; }, Rr(e); } function q4(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function wve(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 W4(e, t, n) { return t && wve(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function QM(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function _i(e, t) { return xve(e) || kve(e, t) || JM(e, t) || Cve(); } function xve(e) { if (Array.isArray(e)) return e; } function kve(e, t) { var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n != null) { var r = [], a = !0, o = !1, i, s; try { for (n = n.call(e); !(a = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); a = !0) ; } catch (l) { o = !0, s = l; } finally { try { !a && n.return != null && n.return(); } finally { if (o) throw s; } } return r; } } function JM(e, t) { if (e) { if (typeof e == "string") return zT(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 zT(e, t); } } function zT(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 Cve() { 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 eD(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (!n) { if (Array.isArray(e) || (n = JM(e)) || t) { n && (e = n); var r = 0, a = function() { }; return { s: a, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }, e: function(l) { throw l; }, f: a }; } 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 o = !0, i = !1, s; return { s: function() { n = n.call(e); }, n: function() { var l = n.next(); return o = l.done, l; }, e: function(l) { i = !0, s = l; }, f: function() { try { !o && n.return != null && n.return(); } finally { if (i) throw s; } } }; } var Or = typeof window > "u" ? null : window, VT = Or ? Or.navigator : null; Or && Or.document; var Sve = Rr(""), tD = Rr({}), Eve = Rr(function() { }), _ve = typeof HTMLElement > "u" ? "undefined" : Rr(HTMLElement), qg = function(e) { return e && e.instanceString && ir(e.instanceString) ? e.instanceString() : null; }, kt = function(e) { return e != null && Rr(e) == Sve; }, ir = function(e) { return e != null && Rr(e) === Eve; }, zn = function(e) { return !Ao(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, Cn = function(e) { return e != null && Rr(e) === tD && !zn(e) && e.constructor === Object; }, Tve = function(e) { return e != null && Rr(e) === tD; }, ot = function(e) { return e != null && Rr(e) === Rr(1) && !isNaN(e); }, $ve = function(e) { return ot(e) && Math.floor(e) === e; }, lb = function(e) { if (_ve !== "undefined") return e != null && e instanceof HTMLElement; }, Ao = function(e) { return Wg(e) || nD(e); }, Wg = function(e) { return qg(e) === "collection" && e._private.single; }, nD = function(e) { return qg(e) === "collection" && !e._private.single; }, K4 = function(e) { return qg(e) === "core"; }, rD = function(e) { return qg(e) === "stylesheet"; }, Ove = function(e) { return qg(e) === "event"; }, ju = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, Fve = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, Ave = function(e) { return Cn(e) && ot(e.x1) && ot(e.x2) && ot(e.y1) && ot(e.y2); }, Ive = function(e) { return Tve(e) && ir(e.then); }, Pve = function() { return VT && VT.userAgent.match(/msie|trident|edge/i); }, O0 = function(e, t) { t || (t = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var r = [], a = 0; a < arguments.length; a++) r.push(arguments[a]); return r.join("$"); }); var n = function r() { var a = this, o = arguments, i, s = t.apply(a, o), l = r.cache; return (i = l[s]) || (i = l[s] = e.apply(a, o)), i; }; return n.cache = {}, n; }, G4 = O0(function(e) { return e.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase(); }); }), Y2 = O0(function(e) { return e.replace(/(-\w)/g, function(t) { return t[1].toUpperCase(); }); }), aD = O0(function(e, t) { return e + t[0].toUpperCase() + t.substring(1); }, function(e, t) { return e + "$" + t; }), jT = function(e) { return ju(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, Nr = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", Lve = "rgb[a]?\\((" + Nr + "[%]?)\\s*,\\s*(" + Nr + "[%]?)\\s*,\\s*(" + Nr + "[%]?)(?:\\s*,\\s*(" + Nr + "))?\\)", Nve = "rgb[a]?\\((?:" + Nr + "[%]?)\\s*,\\s*(?:" + Nr + "[%]?)\\s*,\\s*(?:" + Nr + "[%]?)(?:\\s*,\\s*(?:" + Nr + "))?\\)", Mve = "hsl[a]?\\((" + Nr + ")\\s*,\\s*(" + Nr + "[%])\\s*,\\s*(" + Nr + "[%])(?:\\s*,\\s*(" + Nr + "))?\\)", Dve = "hsl[a]?\\((?:" + Nr + ")\\s*,\\s*(?:" + Nr + "[%])\\s*,\\s*(?:" + Nr + "[%])(?:\\s*,\\s*(?:" + Nr + "))?\\)", Bve = "\\#[0-9a-fA-F]{3}", Rve = "\\#[0-9a-fA-F]{6}", oD = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; }, zve = function(e, t) { return -1 * oD(e, t); }, At = 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 a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o]; e[i] = r[i]; } } return e; }, Vve = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var t = e.length === 4, n, r, a, o = 16; return t ? (n = parseInt(e[1] + e[1], o), r = parseInt(e[2] + e[2], o), a = parseInt(e[3] + e[3], o)) : (n = parseInt(e[1] + e[2], o), r = parseInt(e[3] + e[4], o), a = parseInt(e[5] + e[6], o)), [n, r, a]; } }, jve = function(e) { var t, n, r, a, o, 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("^" + Mve + "$").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, a = parseFloat(c[3]), a < 0 || a > 100) || (a = a / 100, o = c[4], o !== void 0 && (o = parseFloat(o), o < 0 || o > 1))) return; if (r === 0) i = s = l = Math.round(a * 255); else { var d = a < 0.5 ? a * (1 + r) : a + r - a * r, f = 2 * a - 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, o]; } return t; }, Hve = function(e) { var t, n = new RegExp("^" + Lve + "$").exec(e); if (n) { t = []; for (var r = [], a = 1; a <= 3; a++) { var o = n[a]; if (o[o.length - 1] === "%" && (r[a] = !0), o = parseFloat(o), r[a] && (o = o / 100 * 255), o < 0 || o > 255) return; t.push(Math.floor(o)); } 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; }, Uve = function(e) { return Wve[e.toLowerCase()]; }, qve = function(e) { return (zn(e) ? e : null) || Uve(e) || Vve(e) || Hve(e) || jve(e); }, Wve = { // 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] }, iD = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (Cn(o)) throw Error("Tried to set map with object key"); a < n.length - 1 ? (t[o] == null && (t[o] = {}), t = t[o]) : t[o] = e.value; } }, sD = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (Cn(o)) throw Error("Tried to get map with object key"); if (t = t[o], t == null) return t; } return t; }; function Kve(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var wd = Kve, Iv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Gve(e, t) { return t = { exports: {} }, e(t, t.exports), t.exports; } var Xve = typeof Iv == "object" && Iv && Iv.Object === Object && Iv, Yve = Xve, Zve = typeof self == "object" && self && self.Object === Object && self, Qve = Yve || Zve || Function("return this")(), Z2 = Qve, Jve = function() { return Z2.Date.now(); }, ik = Jve, e0e = /\s/; function t0e(e) { for (var t = e.length; t-- && e0e.test(e.charAt(t)); ) ; return t; } var n0e = t0e, r0e = /^\s+/; function a0e(e) { return e && e.slice(0, n0e(e) + 1).replace(r0e, ""); } var o0e = a0e, i0e = Z2.Symbol, If = i0e, lD = Object.prototype, s0e = lD.hasOwnProperty, l0e = lD.toString, ov = If ? If.toStringTag : void 0; function u0e(e) { var t = s0e.call(e, ov), n = e[ov]; try { e[ov] = void 0; var r = !0; } catch { } var a = l0e.call(e); return r && (t ? e[ov] = n : delete e[ov]), a; } var c0e = u0e, d0e = Object.prototype, p0e = d0e.toString; function f0e(e) { return p0e.call(e); } var h0e = f0e, v0e = "[object Null]", g0e = "[object Undefined]", HT = If ? If.toStringTag : void 0; function m0e(e) { return e == null ? e === void 0 ? g0e : v0e : HT && HT in Object(e) ? c0e(e) : h0e(e); } var uD = m0e; function y0e(e) { return e != null && typeof e == "object"; } var b0e = y0e, w0e = "[object Symbol]"; function x0e(e) { return typeof e == "symbol" || b0e(e) && uD(e) == w0e; } var Kg = x0e, UT = NaN, k0e = /^[-+]0x[0-9a-f]+$/i, C0e = /^0b[01]+$/i, S0e = /^0o[0-7]+$/i, E0e = parseInt; function _0e(e) { if (typeof e == "number") return e; if (Kg(e)) return UT; if (wd(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = wd(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = o0e(e); var n = C0e.test(e); return n || S0e.test(e) ? E0e(e.slice(2), n ? 2 : 8) : k0e.test(e) ? UT : +e; } var qT = _0e, T0e = "Expected a function", $0e = Math.max, O0e = Math.min; function F0e(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(T0e); t = qT(t) || 0, wd(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? $0e(qT(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? O0e(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = ik(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(ik()); } function k() { var C = ik(), S = m(C); if (r = arguments, a = this, l = C, 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 k.cancel = x, k.flush = w, k; } var Q2 = F0e, sk = Or ? Or.performance : null, cD = sk && sk.now ? function() { return sk.now(); } : function() { return Date.now(); }, A0e = function() { if (Or) { if (Or.requestAnimationFrame) return function(e) { Or.requestAnimationFrame(e); }; if (Or.mozRequestAnimationFrame) return function(e) { Or.mozRequestAnimationFrame(e); }; if (Or.webkitRequestAnimationFrame) return function(e) { Or.webkitRequestAnimationFrame(e); }; if (Or.msRequestAnimationFrame) return function(e) { Or.msRequestAnimationFrame(e); }; } return function(e) { e && setTimeout(function() { e(cD()); }, 1e3 / 60); }; }(), ub = function(e) { return A0e(e); }, wl = cD, Zp = 9261, dD = 65599, Pv = 5381, pD = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Zp, n = t, r; r = e.next(), !r.done; ) n = n * dD + r.value | 0; return n; }, F0 = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Zp; return t * dD + e | 0; }, A0 = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Pv; return (t << 5) + t + e | 0; }, I0e = function(e, t) { return e * 2097152 + t; }, Gl = function(e) { return e[0] * 2097152 + e[1]; }, Jm = function(e, t) { return [F0(e[0], t[0]), A0(e[1], t[1])]; }, P0e = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e[r++] : n.done = !0, n; } }; return pD(o, t); }, xd = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e.charCodeAt(r++) : n.done = !0, n; } }; return pD(o, t); }, fD = function() { return L0e(arguments); }, L0e = function(e) { for (var t, n = 0; n < e.length; n++) { var r = e[n]; n === 0 ? t = xd(r) : t = xd(r, t); } return t; }, N0e = !0, M0e = console.warn != null, D0e = console.trace != null, X4 = Number.MAX_SAFE_INTEGER || 9007199254740991, hD = function() { return !0; }, cb = function() { return !1; }, WT = function() { return 0; }, Y4 = function() { }, pr = function(e) { throw new Error(e); }, B0e = function(e) { return N0e; }, Fn = function(e) { B0e() && (M0e ? console.warn(e) : (console.log(e), D0e && console.trace())); }, R0e = function(e) { return At({}, e); }, cs = function(e) { return e == null ? e : zn(e) ? e.slice() : Cn(e) ? R0e(e) : e; }, z0e = function(e) { return e.slice(); }, vD = 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; }, V0e = {}, gD = function() { return V0e; }, ba = function(e) { var t = Object.keys(e); return function(n) { for (var r = {}, a = 0; a < t.length; a++) { var o = t[a], i = n == null ? void 0 : n[o]; r[o] = i === void 0 ? e[o] : i; } return r; }; }, Hu = function(e, t, n) { for (var r = e.length - 1; r >= 0; r--) e[r] === t && e.splice(r, 1); }, Z4 = function(e) { e.splice(0, e.length); }, j0e = function(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.push(r); } }, Ii = function(e, t, n) { return n && (t = aD(n, t)), e[t]; }, bu = function(e, t, n, r) { n && (t = aD(n, t)), e[t] = r; }, H0e = /* @__PURE__ */ function() { function e() { q4(this, e), this._obj = {}; } return W4(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; }(), ds = typeof Map < "u" ? Map : H0e, U0e = "undefined", q0e = /* @__PURE__ */ function() { function e(t) { if (q4(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 W4(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; }(), gh = (typeof Set > "u" ? "undefined" : Rr(Set)) !== U0e ? Set : q0e, J2 = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; if (e === void 0 || t === void 0 || !K4(e)) { pr("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") { pr("An element must be of type `nodes` or `edges`; you specified `" + r + "`"); return; } this.length = 1, this[0] = this; var a = 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 gh(), // 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 (a.position.x == null && (a.position.x = 0), a.position.y == null && (a.position.y = 0), t.renderedPosition) { var o = t.renderedPosition, i = e.pan(), s = e.zoom(); a.position = { x: (o.x - i.x) / s, y: (o.y - i.y) / s }; } var l = []; zn(t.classes) ? l = t.classes : kt(t.classes) && (l = t.classes.split(/\s+/)); for (var u = 0, c = l.length; u < c; u++) { var d = l[u]; !d || d === "" || a.classes.add(d); } this.createEmitter(); var f = t.style || t.css; f && (Fn("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(); }, KT = function(e) { return e = { bfs: e.bfs || !e.dfs, dfs: e.dfs || !e.bfs }, function(t, n, r) { var a; Cn(t) && !Ao(t) && (a = t, t = a.roots || a.root, n = a.visit, r = a.directed), r = arguments.length === 2 && !ir(n) ? n : r, n = ir(n) ? n : function() { }; for (var o = this._private.cy, i = t = kt(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 y = i[g], x = y.id(); y.isNode() && (s.unshift(y), e.bfs && (d[x] = !0, l.push(y)), c[x] = 0); } for (var w = function() { var F = e.bfs ? s.shift() : s.pop(), A = F.id(); if (e.dfs) { if (d[A]) return "continue"; d[A] = !0, l.push(F); } var I = c[A], N = u[A], L = N != null ? N.source() : null, z = N != null ? N.target() : null, P = N == null ? void 0 : F.same(L) ? z[0] : L[0], D = void 0; if (D = n(F, N, P, f++, I), D === !0) return h = F, "break"; if (D === !1) return "break"; for (var M = F.connectedEdges().filter(function(ue) { return (!r || ue.source().same(F)) && m.has(ue); }), V = 0; V < M.length; V++) { var Q = M[V], X = Q.connectedNodes().filter(function(ue) { return !ue.same(F) && v.has(ue); }), ee = X.id(); X.length !== 0 && !d[ee] && (X = X[0], s.push(X), e.bfs && (d[ee] = !0, l.push(X)), u[ee] = Q, c[ee] = c[A] + 1); } }; s.length !== 0; ) { var k = w(); if (k !== "continue" && k === "break") break; } for (var C = o.collection(), S = 0; S < l.length; S++) { var _ = l[S], T = u[_.id()]; T != null && C.push(T), C.push(_); } return { path: o.collection(C), found: o.collection(h) }; }; }, I0 = { breadthFirstSearch: KT({ bfs: !0 }), depthFirstSearch: KT({ dfs: !0 }) }; I0.bfs = I0.breadthFirstSearch; I0.dfs = I0.depthFirstSearch; var W0e = Gve(function(e, t) { (function() { var n, r, a, o, i, s, l, u, c, d, f, h, p, v, m; a = Math.floor, d = Math.min, r = function(g, y) { return g < y ? -1 : g > y ? 1 : 0; }, c = function(g, y, x, w, k) { var C; if (x == null && (x = 0), k == null && (k = r), x < 0) throw new Error("lo must be non-negative"); for (w == null && (w = g.length); x < w; ) C = a((x + w) / 2), k(y, g[C]) < 0 ? w = C : x = C + 1; return [].splice.apply(g, [x, x - x].concat(y)), y; }, s = function(g, y, x) { return x == null && (x = r), g.push(y), v(g, 0, g.length - 1, x); }, i = function(g, y) { var x, w; return y == null && (y = r), x = g.pop(), g.length ? (w = g[0], g[0] = x, m(g, 0, y)) : w = x, w; }, u = function(g, y, x) { var w; return x == null && (x = r), w = g[0], g[0] = y, m(g, 0, x), w; }, l = function(g, y, x) { var w; return x == null && (x = r), g.length && x(g[0], y) < 0 && (w = [g[0], y], y = w[0], g[0] = w[1], m(g, 0, x)), y; }, o = function(g, y) { var x, w, k, C, S, _; for (y == null && (y = r), C = (function() { _ = []; for (var T = 0, F = a(g.length / 2); 0 <= F ? T < F : T > F; 0 <= F ? T++ : T--) _.push(T); return _; }).apply(this).reverse(), S = [], w = 0, k = C.length; w < k; w++) x = C[w], S.push(m(g, x, y)); return S; }, p = function(g, y, x) { var w; if (x == null && (x = r), w = g.indexOf(y), w !== -1) return v(g, 0, w, x), m(g, w, x); }, f = function(g, y, x) { var w, k, C, S, _; if (x == null && (x = r), k = g.slice(0, y), !k.length) return k; for (o(k, x), _ = g.slice(y), C = 0, S = _.length; C < S; C++) w = _[C], l(k, w, x); return k.sort(x).reverse(); }, h = function(g, y, x) { var w, k, C, S, _, T, F, A, I; if (x == null && (x = r), y * 10 <= g.length) { if (C = g.slice(0, y).sort(x), !C.length) return C; for (k = C[C.length - 1], F = g.slice(y), S = 0, T = F.length; S < T; S++) w = F[S], x(w, k) < 0 && (c(C, w, 0, null, x), C.pop(), k = C[C.length - 1]); return C; } for (o(g, x), I = [], _ = 0, A = d(y, g.length); 0 <= A ? _ < A : _ > A; 0 <= A ? ++_ : --_) I.push(i(g, x)); return I; }, v = function(g, y, x, w) { var k, C, S; for (w == null && (w = r), k = g[x]; x > y; ) { if (S = x - 1 >> 1, C = g[S], w(k, C) < 0) { g[x] = C, x = S; continue; } break; } return g[x] = k; }, m = function(g, y, x) { var w, k, C, S, _; for (x == null && (x = r), k = g.length, _ = y, C = g[y], w = 2 * y + 1; w < k; ) S = w + 1, S < k && !(x(g[w], g[S]) < 0) && (w = S), g[y] = g[w], y = w, w = 2 * y + 1; return g[y] = C, v(g, _, y, x); }, n = function() { g.push = s, g.pop = i, g.replace = u, g.pushpop = l, g.heapify = o, g.updateItem = p, g.nlargest = f, g.nsmallest = h; function g(y) { this.cmp = y ?? r, this.nodes = []; } return g.prototype.push = function(y) { return s(this.nodes, y, this.cmp); }, g.prototype.pop = function() { return i(this.nodes, this.cmp); }, g.prototype.peek = function() { return this.nodes[0]; }, g.prototype.contains = function(y) { return this.nodes.indexOf(y) !== -1; }, g.prototype.replace = function(y) { return u(this.nodes, y, this.cmp); }, g.prototype.pushpop = function(y) { return l(this.nodes, y, this.cmp); }, g.prototype.heapify = function() { return o(this.nodes, this.cmp); }, g.prototype.updateItem = function(y) { return p(this.nodes, y, 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 y; return y = new g(), y.nodes = this.nodes.slice(0), y; }, 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, y) { return e.exports = y(); }(this, function() { return n; }); }).call(Iv); }), Gg = W0e, K0e = ba({ root: null, weight: function(e) { return 1; }, directed: !1 }), G0e = { dijkstra: function(e) { if (!Cn(e)) { var t = arguments; e = { root: t[0], weight: t[1], directed: t[2] }; } var n = K0e(e), r = n.root, a = n.weight, o = n.directed, i = this, s = a, l = kt(r) ? this.filter(r)[0] : r[0], u = {}, c = {}, d = {}, f = this.byGroup(), h = f.nodes, p = f.edges; p.unmergeBy(function(L) { return L.isLoop(); }); for (var v = function(L) { return u[L.id()]; }, m = function(L, z) { u[L.id()] = z, g.updateItem(L); }, g = new Gg(function(L, z) { return v(L) - v(z); }), y = 0; y < h.length; y++) { var x = h[y]; u[x.id()] = x.same(l) ? 0 : 1 / 0, g.push(x); } for (var w = function(L, z) { for (var P = (o ? L.edgesTo(z) : L.edgesWith(z)).intersect(p), D = 1 / 0, M, V = 0; V < P.length; V++) { var Q = P[V], X = s(Q); (X < D || !M) && (D = X, M = Q); } return { edge: M, dist: D }; }; g.size() > 0; ) { var k = g.pop(), C = v(k), S = k.id(); if (d[S] = C, C !== 1 / 0) for (var _ = k.neighborhood().intersect(h), T = 0; T < _.length; T++) { var F = _[T], A = F.id(), I = w(k, F), N = C + I.dist; N < v(F) && (m(F, N), c[A] = { node: k, edge: I.edge }); } } return { distanceTo: function(L) { var z = kt(L) ? h.filter(L)[0] : L[0]; return d[z.id()]; }, pathTo: function(L) { var z = kt(L) ? h.filter(L)[0] : L[0], P = [], D = z, M = D.id(); if (z.length > 0) for (P.unshift(z); c[M]; ) { var V = c[M]; P.unshift(V.edge), P.unshift(V.node), D = V.node, M = D.id(); } return i.spawn(P); } }; } }, X0e = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e) { e = e || function(y) { return 1; }; for (var t = this.byGroup(), n = t.nodes, r = t.edges, a = n.length, o = new Array(a), i = n, s = function(y) { for (var x = 0; x < o.length; x++) { var w = o[x]; if (w.has(y)) return x; } }, l = 0; l < a; l++) o[l] = this.spawn(n[l]); for (var u = r.sort(function(y, x) { return e(y) - e(x); }), 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 = o[p], g = o[v]; p !== v && (i.merge(d), m.merge(g), o.splice(v, 1)); } return i; } }, Y0e = ba({ root: null, goal: null, weight: function(e) { return 1; }, heuristic: function(e) { return 0; }, directed: !1 }), Z0e = { // Implemented from pseudocode from wikipedia aStar: function(e) { var t = this.cy(), n = Y0e(e), r = n.root, a = n.goal, o = n.heuristic, i = n.directed, s = n.weight; r = t.collection(r)[0], a = t.collection(a)[0]; var l = r.id(), u = a.id(), c = {}, d = {}, f = {}, h = new Gg(function(V, Q) { return d[V.id()] - d[Q.id()]; }), p = new gh(), v = {}, m = {}, g = function(V, Q) { h.push(V), p.add(Q); }, y, x, w = function() { y = h.pop(), x = y.id(), p.delete(x); }, k = function(V) { return p.has(V); }; g(r, l), c[l] = 0, d[l] = o(r); for (var C = 0; h.size() > 0; ) { if (w(), C++, x === u) { for (var S = [], _ = a, T = u, F = m[T]; S.unshift(_), F != null && S.unshift(F), _ = v[T], _ != null; ) T = _.id(), F = m[T]; return { found: !0, distance: c[x], path: this.spawn(S), steps: C }; } f[x] = !0; for (var A = y._private.edges, I = 0; I < A.length; I++) { var N = A[I]; if (this.hasElementWithId(N.id()) && !(i && N.data("source") !== x)) { var L = N.source(), z = N.target(), P = L.id() !== x ? L : z, D = P.id(); if (this.hasElementWithId(D) && !f[D]) { var M = c[x] + s(N); if (!k(D)) { c[D] = M, d[D] = M + o(P), g(P, D), v[D] = y, m[D] = N; continue; } M < c[D] && (c[D] = M, d[D] = M + o(P), v[D] = y, m[D] = N); } } } } return { found: !1, distance: void 0, path: void 0, steps: C }; } }, Q0e = ba({ weight: function(e) { return 1; }, directed: !1 }), J0e = { // Implemented from pseudocode from wikipedia floydWarshall: function(e) { for (var t = this.cy(), n = Q0e(e), r = n.weight, a = n.directed, o = r, i = this.byGroup(), s = i.nodes, l = i.edges, u = s.length, c = u * u, d = function(X) { return s.indexOf(X); }, f = function(X) { return s[X]; }, 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), y = new Array(c), x = 0; x < l.length; x++) { var w = l[x], k = w.source()[0], C = w.target()[0]; if (k !== C) { var S = d(k), _ = d(C), T = S * u + _, F = o(w); if (h[T] > F && (h[T] = F, g[T] = _, y[T] = w), !a) { var A = _ * u + S; !a && h[A] > F && (h[A] = F, g[A] = S, y[A] = w); } } } for (var I = 0; I < u; I++) for (var N = 0; N < u; N++) for (var L = N * u + I, z = 0; z < u; z++) { var P = N * u + z, D = I * u + z; h[L] + h[D] < h[P] && (h[P] = h[L] + h[D], g[P] = g[L]); } var M = function(X) { return (kt(X) ? t.filter(X) : X)[0]; }, V = function(X) { return d(M(X)); }, Q = { distance: function(X, ee) { var ue = V(X), ve = V(ee); return h[ue * u + ve]; }, path: function(X, ee) { var ue = V(X), ve = V(ee), ge = f(ue); if (ue === ve) return ge.collection(); if (g[ue * u + ve] == null) return t.collection(); var se = t.collection(), ne = ue, W; for (se.merge(ge); ue !== ve; ) ne = ue, ue = g[ue * u + ve], W = y[ne * u + ue], se.merge(W), se.merge(f(ue)); return se; } }; return Q; } // floydWarshall }, ege = ba({ weight: function(e) { return 1; }, directed: !1, root: null }), tge = { // Implemented from pseudocode from wikipedia bellmanFord: function(e) { var t = this, n = ege(e), r = n.weight, a = n.directed, o = n.root, i = r, s = this, l = this.cy(), u = this.byGroup(), c = u.edges, d = u.nodes, f = d.length, h = new ds(), p = !1, v = []; o = l.collection(o)[0], c.unmergeBy(function(Se) { return Se.isLoop(); }); for (var m = c.length, g = function(Se) { var Pe = h.get(Se.id()); return Pe || (Pe = {}, h.set(Se.id(), Pe)), Pe; }, y = function(Se) { return (kt(Se) ? l.$(Se) : Se)[0]; }, x = function(Se) { return g(y(Se)).dist; }, w = function(Se) { for (var Pe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : o, Me = y(Se), He = [], De = Me; ; ) { if (De == null) return t.spawn(); var Xe = g(De), Ge = Xe.edge, Ze = Xe.pred; if (He.unshift(De[0]), De.same(Pe) && He.length > 0) break; Ge != null && He.unshift(Ge), De = Ze; } return s.spawn(He); }, k = 0; k < f; k++) { var C = d[k], S = g(C); C.same(o) ? S.dist = 0 : S.dist = 1 / 0, S.pred = null, S.edge = null; } for (var _ = !1, T = function(Se, Pe, Me, He, De, Xe) { var Ge = He.dist + Xe; Ge < De.dist && !Me.same(He.edge) && (De.dist = Ge, De.pred = Se, De.edge = Me, _ = !0); }, F = 1; F < f; F++) { _ = !1; for (var A = 0; A < m; A++) { var I = c[A], N = I.source(), L = I.target(), z = i(I), P = g(N), D = g(L); T(N, L, I, P, D, z), a || T(L, N, I, D, P, z); } if (!_) break; } if (_) for (var M = [], V = 0; V < m; V++) { var Q = c[V], X = Q.source(), ee = Q.target(), ue = i(Q), ve = g(X).dist, ge = g(ee).dist; if (ve + ue < ge || !a && ge + ue < ve) if (p || (Fn("Graph contains a negative weight cycle for Bellman-Ford"), p = !0), e.findNegativeWeightCycles !== !1) { var se = []; ve + ue < ge && se.push(X), !a && ge + ue < ve && se.push(ee); for (var ne = se.length, W = 0; W < ne; W++) { var Y = se[W], re = [Y]; re.push(g(Y).edge); for (var we = g(Y).pred; re.indexOf(we) === -1; ) re.push(we), re.push(g(we).edge), we = g(we).pred; re = re.slice(re.indexOf(we)); for (var Oe = re[0].id(), Ne = 0, xe = 2; xe < re.length; xe += 2) re[xe].id() < Oe && (Oe = re[xe].id(), Ne = xe); re = re.slice(Ne).concat(re.slice(0, Ne)), re.push(re[0]); var Fe = re.map(function(Se) { return Se.id(); }).join(","); M.indexOf(Fe) === -1 && (v.push(s.spawn(re)), M.push(Fe)); } } else break; } return { distanceTo: x, pathTo: w, hasNegativeWeightCycle: p, negativeWeightCycles: v }; } // bellmanFord }, nge = Math.sqrt(2), rge = function(e, t, n) { n.length === 0 && pr("Karger-Stein must be run on a connected (sub)graph"); for (var r = n[e], a = r[1], o = r[2], i = t[a], s = t[o], 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; }, lk = function(e, t, n, r) { for (; n > r; ) { var a = Math.floor(Math.random() * t.length); t = rge(a, e, t), n--; } return t; }, age = { // 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(D) { return D.isLoop(); }); var a = n.length, o = r.length, i = Math.ceil(Math.pow(Math.log(a) / Math.LN2, 2)), s = Math.floor(a / nge); if (a < 2) { pr("At least 2 nodes are required for Karger-Stein algorithm"); return; } for (var l = [], u = 0; u < o; 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(a), p = new Array(a), v = new Array(a), m = function(D, M) { for (var V = 0; V < a; V++) M[V] = D[V]; }, g = 0; g <= i; g++) { for (var y = 0; y < a; y++) p[y] = y; var x = lk(p, l.slice(), a, s), w = x.slice(); m(p, v); var k = lk(p, x, s, 2), C = lk(v, w, s, 2); k.length <= C.length && k.length < d ? (d = k.length, f = k, m(p, h)) : C.length <= k.length && C.length < d && (d = C.length, f = C, m(v, h)); } for (var S = this.spawn(f.map(function(D) { return r[D[0]]; })), _ = this.spawn(), T = this.spawn(), F = h[0], A = 0; A < h.length; A++) { var I = h[A], N = n[A]; I === F ? _.merge(N) : T.merge(N); } var L = function(D) { var M = e.spawn(); return D.forEach(function(V) { M.merge(V), V.connectedEdges().forEach(function(Q) { e.contains(Q) && !S.contains(Q) && M.merge(Q); }); }), M; }, z = [L(_), L(T)], P = { cut: S, components: z, // n.b. partitions are included to be compatible with the old api spec // (could be removed in a future major version) partition1: _, partition2: T }; return P; } }, oge = function(e) { return { x: e.x, y: e.y }; }, ew = function(e, t, n) { return { x: e.x * t + n.x, y: e.y * t + n.y }; }, mD = function(e, t, n) { return { x: (e.x - n.x) / t, y: (e.y - n.y) / t }; }, Qp = function(e) { return { x: e[0], y: e[1] }; }, ige = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.min(o, r)); } return r; }, sge = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.max(o, r)); } return r; }, lge = 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, a = 0, o = t; o < n; o++) { var i = e[o]; isFinite(i) && (r += i, a++); } return r / a; }, uge = 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, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = 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]; o ? isFinite(l) || (e[s] = -1 / 0, i++) : e.splice(s, 1); } a && 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; }, cge = function(e) { return Math.PI * e / 180; }, e1 = function(e, t) { return Math.atan2(t, e) - Math.PI / 2; }, Q4 = Math.log2 || function(e) { return Math.log(e) / Math.log(2); }, yD = function(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; }, kd = function(e, t) { return Math.sqrt(Lc(e, t)); }, Lc = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return n * n + r * r; }, dge = function(e) { for (var t = e.length, n = 0, r = 0; r < t; r++) n += e[r]; for (var a = 0; a < t; a++) e[a] = e[a] / n; return e; }, qr = function(e, t, n, r) { return (1 - r) * (1 - r) * e + 2 * (1 - r) * r * t + r * r * n; }, of = function(e, t, n, r) { return { x: qr(e.x, t.x, n.x, r), y: qr(e.y, t.y, n.y, r) }; }, pge = function(e, t, n, r) { var a = { x: t.x - e.x, y: t.y - e.y }, o = kd(e, t), i = { x: a.x / o, y: a.y / o }; return n = n ?? 0, r = r ?? n * o, { x: e.x + i.x * r, y: e.y + i.y * r }; }, P0 = function(e, t, n) { return Math.max(e, Math.min(n, t)); }, ko = 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 }; } }, fge = function(e) { return { x1: e.x1, x2: e.x2, w: e.w, y1: e.y1, y2: e.y2, h: e.h }; }, hge = function(e) { e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; }, vge = 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 }; }, bD = 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; }, gge = 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; }, cy = 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; }, dy = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], n, r, a, o; if (t.length === 1) n = r = a = o = t[0]; else if (t.length === 2) n = a = t[0], o = r = t[1]; else if (t.length === 4) { var i = _i(t, 4); n = i[0], r = i[1], a = i[2], o = i[3]; } return e.x1 -= o, e.x2 += r, e.y1 -= n, e.y2 += a, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, GT = 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; }, J4 = 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); }, Pf = function(e, t, n) { return e.x1 <= t && t <= e.x2 && e.y1 <= n && n <= e.y2; }, mge = function(e, t) { return Pf(e, t.x, t.y); }, wD = function(e, t) { return Pf(e, t.x1, t.y1) && Pf(e, t.x2, t.y2); }, xD = function(e, t, n, r, a, o, i) { var s = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "auto", l = s === "auto" ? Cd(a, o) : s, u = a / 2, c = o / 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 = Tu(e, t, n, r, p, v, m, g, !1), h.length > 0) return h; } if (f) { var y = n + u + i, x = r - c + l - i, w = y, k = r + c - l + i; if (h = Tu(e, t, n, r, y, x, w, k, !1), h.length > 0) return h; } if (d) { var C = n - u + l - i, S = r + c + i, _ = n + u - l + i, T = S; if (h = Tu(e, t, n, r, C, S, _, T, !1), h.length > 0) return h; } if (f) { var F = n - u - i, A = r - c + l - i, I = F, N = r + c - l + i; if (h = Tu(e, t, n, r, F, A, I, N, !1), h.length > 0) return h; } var L; { var z = n - u + l, P = r - c + l; if (L = Lv(e, t, n, r, z, P, l + i), L.length > 0 && L[0] <= z && L[1] <= P) return [L[0], L[1]]; } { var D = n + u - l, M = r - c + l; if (L = Lv(e, t, n, r, D, M, l + i), L.length > 0 && L[0] >= D && L[1] <= M) return [L[0], L[1]]; } { var V = n + u - l, Q = r + c - l; if (L = Lv(e, t, n, r, V, Q, l + i), L.length > 0 && L[0] >= V && L[1] >= Q) return [L[0], L[1]]; } { var X = n - u + l, ee = r + c - l; if (L = Lv(e, t, n, r, X, ee, l + i), L.length > 0 && L[0] <= X && L[1] >= ee) return [L[0], L[1]]; } return []; }, yge = function(e, t, n, r, a, o, i) { var s = i, l = Math.min(n, a), u = Math.max(n, a), c = Math.min(r, o), d = Math.max(r, o); return l - s <= e && e <= u + s && c - s <= t && t <= d + s; }, bge = function(e, t, n, r, a, o, i, s, l) { var u = { x1: Math.min(n, i, a) - l, x2: Math.max(n, i, a) + l, y1: Math.min(r, s, o) - l, y2: Math.max(r, s, o) + l }; return !(e < u.x1 || e > u.x2 || t < u.y1 || t > u.y2); }, wge = function(e, t, n, r) { n -= r; var a = t * t - 4 * e * n; if (a < 0) return []; var o = Math.sqrt(a), i = 2 * e, s = (-t + o) / i, l = (-t - o) / i; return [s, l]; }, xge = function(e, t, n, r, a) { var o = 1e-5; e === 0 && (e = o), 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, a[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), a[0] = -f + c + d, f += (c + d) / 2, a[4] = a[2] = -f, f = Math.sqrt(3) * (-d + c) / 2, a[3] = f, a[5] = -f; return; } if (a[5] = a[3] = 0, i === 0) { h = l < 0 ? -Math.pow(-l, 1 / 3) : Math.pow(l, 1 / 3), a[0] = -f + 2 * h, a[4] = a[2] = -(h + f); return; } s = -s, u = s * s * s, u = Math.acos(l / Math.sqrt(u)), h = 2 * Math.sqrt(s), a[0] = -f + h * Math.cos(u / 3), a[2] = -f + h * Math.cos((u + 2 * Math.PI) / 3), a[4] = -f + h * Math.cos((u + 4 * Math.PI) / 3); }, kge = function(e, t, n, r, a, o, i, s) { var l = 1 * n * n - 4 * n * a + 2 * n * i + 4 * a * a - 4 * a * i + i * i + r * r - 4 * r * o + 2 * r * s + 4 * o * o - 4 * o * s + s * s, u = 1 * 9 * n * a - 3 * n * n - 3 * n * i - 6 * a * a + 3 * a * i + 9 * r * o - 3 * r * r - 3 * r * s - 6 * o * o + 3 * o * s, c = 1 * 3 * n * n - 6 * n * a + n * i - n * e + 2 * a * a + 2 * a * e - i * e + 3 * r * r - 6 * r * o + r * s - r * t + 2 * o * o + 2 * o * t - s * t, d = 1 * n * a - n * n + n * e - a * e + r * o - r * r + r * t - o * t, f = []; xge(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, y, x, w = 0; w < p.length; w++) g = Math.pow(1 - p[w], 2) * n + 2 * (1 - p[w]) * p[w] * a + p[w] * p[w] * i, y = Math.pow(1 - p[w], 2) * r + 2 * (1 - p[w]) * p[w] * o + p[w] * p[w] * s, x = Math.pow(g - e, 2) + Math.pow(y - t, 2), m >= 0 ? x < m && (m = x) : m = x; return m; }, Cge = function(e, t, n, r, a, o) { var i = [e - n, t - r], s = [a - n, o - 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 - a) * (e - a) + (t - o) * (t - o) : u - d; }, no = function(e, t, n) { for (var r, a, o, i, s, l = 0, u = 0; u < n.length / 2; u++) if (r = n[u * 2], a = n[u * 2 + 1], u + 1 < n.length / 2 ? (o = n[(u + 1) * 2], i = n[(u + 1) * 2 + 1]) : (o = n[(u + 1 - n.length / 2) * 2], i = n[(u + 1 - n.length / 2) * 2 + 1]), !(r == e && o == e)) if (r >= e && e >= o || r <= e && e <= o) s = (e - r) / (o - r) * (i - a) + a, s > t && l++; else continue; return l % 2 !== 0; }, xl = function(e, t, n, r, a, o, 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] = o / 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] += a; var p; if (l > 0) { var v = pb(u, -l); p = db(v); } else p = u; return no(e, t, p); }, Sge = function(e, t, n, r, a, o, 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 no(e, t, l); }, db = function(e) { for (var t = new Array(e.length / 2), n, r, a, o, i, s, l, u, c = 0; c < e.length / 4; c++) { n = e[c * 4], r = e[c * 4 + 1], a = e[c * 4 + 2], o = 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 = Tu(n, r, a, o, i, s, l, u, !0); t[c * 2] = d[0], t[c * 2 + 1] = d[1]; } return t; }, pb = function(e, t) { for (var n = new Array(e.length * 2), r, a, o, i, s = 0; s < e.length / 2; s++) { r = e[s * 2], a = e[s * 2 + 1], s < e.length / 2 - 1 ? (o = e[(s + 1) * 2], i = e[(s + 1) * 2 + 1]) : (o = e[0], i = e[1]); var l = i - a, u = -(o - r), c = Math.sqrt(l * l + u * u), d = l / c, f = u / c; n[s * 4] = r + d * t, n[s * 4 + 1] = a + f * t, n[s * 4 + 2] = o + d * t, n[s * 4 + 3] = i + f * t; } return n; }, Ege = function(e, t, n, r, a, o) { var i = n - e, s = r - t; i /= a, s /= o; 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]; }, Uc = function(e, t, n, r, a, o, i) { return e -= a, t -= o, e /= n / 2 + i, t /= r / 2 + i, e * e + t * t <= 1; }, Lv = function(e, t, n, r, a, o, i) { var s = [n - e, r - t], l = [e - a, t - o], 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 y = g[0] * s[0] + e, x = g[0] * s[1] + t; if (g.length > 1) { if (g[0] == g[1]) return [y, x]; var w = g[1] * s[0] + e, k = g[1] * s[1] + t; return [y, x, w, k]; } else return [y, x]; }, uk = function(e, t, n) { return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n; }, Tu = function(e, t, n, r, a, o, i, s, l) { var u = e - a, c = n - e, d = i - a, f = t - o, h = r - t, p = s - o, v = d * f - p * u, m = c * f - h * u, g = p * c - d * h; if (g !== 0) { var y = v / g, x = m / g, w = 1e-3, k = 0 - w, C = 1 + w; return k <= y && y <= C && k <= x && x <= C ? [e + y * c, t + y * h] : l ? [e + y * c, t + y * h] : []; } else return v === 0 || m === 0 ? uk(e, n, i) === i ? [i, s] : uk(e, n, a) === a ? [a, o] : uk(a, i, n) === n ? [n, r] : [] : []; }, L0 = function(e, t, n, r, a, o, i, s) { var l = [], u, c = new Array(n.length), d = !0; o == null && (d = !1); var f; if (d) { for (var h = 0; h < c.length / 2; h++) c[h * 2] = n[h * 2] * o + r, c[h * 2 + 1] = n[h * 2 + 1] * i + a; if (s > 0) { var p = pb(c, -s); f = db(p); } else f = c; } else f = n; for (var v, m, g, y, x = 0; x < f.length / 2; x++) v = f[x * 2], m = f[x * 2 + 1], x < f.length / 2 - 1 ? (g = f[(x + 1) * 2], y = f[(x + 1) * 2 + 1]) : (g = f[0], y = f[1]), u = Tu(e, t, r, a, v, m, g, y), u.length !== 0 && l.push(u[0], u[1]); return l; }, _ge = function(e, t, n, r, a, o, i, s, l) { var u = [], c, d = new Array(n.length * 2); l.forEach(function(g, y) { y === 0 ? (d[d.length - 2] = g.startX, d[d.length - 1] = g.startY) : (d[y * 4 - 2] = g.startX, d[y * 4 - 1] = g.startY), d[y * 4] = g.stopX, d[y * 4 + 1] = g.stopY, c = Lv(e, t, r, a, 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 = Tu(e, t, r, a, 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; }, t1 = function(e, t, n) { var r = [e[0] - t[0], e[1] - t[1]], a = Math.sqrt(r[0] * r[0] + r[1] * r[1]), o = (a - n) / a; return o < 0 && (o = 1e-5), [t[0] + o * r[0], t[1] + o * r[1]]; }, Ua = function(e, t) { var n = t5(e, t); return n = kD(n), n; }, kD = function(e) { for (var t, n, r = e.length / 2, a = 1 / 0, o = 1 / 0, i = -1 / 0, s = -1 / 0, l = 0; l < r; l++) t = e[2 * l], n = e[2 * l + 1], a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); for (var u = 2 / (i - a), c = 2 / (s - o), d = 0; d < r; d++) t = e[2 * d] = e[2 * d] * u, n = e[2 * d + 1] = e[2 * d + 1] * c, a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); if (o < -1) for (var f = 0; f < r; f++) n = e[2 * f + 1] = e[2 * f + 1] + (-1 - o); return e; }, t5 = 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 a = new Array(e * 2), o, i = 0; i < e; i++) o = i * n + r, a[2 * i] = Math.cos(o), a[2 * i + 1] = Math.sin(-o); return a; }, Cd = function(e, t) { return Math.min(e / 4, t / 4, 8); }, CD = function(e, t) { return Math.min(e / 10, t / 10, 8); }, eS = function() { return 8; }, Tge = function(e, t, n) { return [e - 2 * t + n, 2 * (t - e), e]; }, n5 = function(e, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e), ctrlPtOffsetPct: 0.05 }; }, $ge = ba({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e) { return 1; } }), Oge = { pageRank: function(e) { for (var t = $ge(e), n = t.dampingFactor, r = t.precision, a = t.iterations, o = 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 y = m * c + g; h[y] = 0; } p[m] = 0; } for (var x = 0; x < f; x++) { var w = u[x], k = w.data("source"), C = w.data("target"); if (k !== C) { var S = l.indexOfId(k), _ = l.indexOfId(C), T = o(w), F = _ * c + S; h[F] += T, p[S] += T; } } for (var A = 1 / c + v, I = 0; I < c; I++) if (p[I] === 0) for (var N = 0; N < c; N++) { var L = N * c + I; h[L] = A; } else for (var z = 0; z < c; z++) { var P = z * c + I; h[P] = h[P] / p[I] + v; } for (var D = new Array(c), M = new Array(c), V, Q = 0; Q < c; Q++) D[Q] = 1; for (var X = 0; X < a; X++) { for (var ee = 0; ee < c; ee++) M[ee] = 0; for (var ue = 0; ue < c; ue++) for (var ve = 0; ve < c; ve++) { var ge = ue * c + ve; M[ue] += h[ge] * D[ve]; } dge(M), V = D, D = M, M = V; for (var se = 0, ne = 0; ne < c; ne++) { var W = V[ne] - D[ne]; se += W * W; } if (se < r) break; } var Y = { rank: function(re) { return re = i.collection(re)[0], D[l.indexOf(re)]; } }; return Y; } // pageRank }, XT = ba({ root: null, weight: function(e) { return 1; }, directed: !1, alpha: 0 }), sf = { degreeCentralityNormalized: function(e) { e = XT(e); var t = this.cy(), n = this.nodes(), r = n.length; if (e.directed) { for (var a = {}, o = {}, 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), a[c] = d.indegree, o[c] = d.outdegree; } return { indegree: function(g) { return i == 0 ? 0 : (kt(g) && (g = t.filter(g)), a[g.id()] / i); }, outdegree: function(g) { return s === 0 ? 0 : (kt(g) && (g = t.filter(g)), o[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 : (kt(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 = XT(e); var t = this.cy(), n = this, r = e, a = r.root, o = r.weight, i = r.directed, s = r.alpha; if (a = t.collection(a)[0], i) { for (var l = a.connectedEdges(), u = l.filter(function(k) { return k.target().same(a) && n.has(k); }), c = l.filter(function(k) { return k.source().same(a) && n.has(k); }), d = u.length, f = c.length, h = 0, p = 0, v = 0; v < u.length; v++) h += o(u[v]); for (var m = 0; m < c.length; m++) p += o(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 = a.connectedEdges().intersection(n), y = g.length, x = 0, w = 0; w < g.length; w++) x += o(g[w]); return { degree: Math.pow(y, 1 - s) * Math.pow(x, s) }; } } // degreeCentrality }; sf.dc = sf.degreeCentrality; sf.dcn = sf.degreeCentralityNormalised = sf.degreeCentralityNormalized; var YT = ba({ harmonic: !0, weight: function() { return 1; }, directed: !1, root: null }), lf = { closenessCentralityNormalized: function(e) { for (var t = YT(e), n = t.harmonic, r = t.weight, a = t.directed, o = this.cy(), i = {}, s = 0, l = this.nodes(), u = this.floydWarshall({ weight: r, directed: a }), 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 : (kt(v) ? v = o.filter(v)[0].id() : v = v.id(), i[v] / s); } }; }, // Implemented from pseudocode from wikipedia closenessCentrality: function(e) { var t = YT(e), n = t.root, r = t.weight, a = t.directed, o = t.harmonic; n = this.filter(n)[0]; for (var i = this.dijkstra({ root: n, weight: r, directed: a }), s = 0, l = this.nodes(), u = 0; u < l.length; u++) { var c = l[u]; if (!c.same(n)) { var d = i.distanceTo(c); o ? s += 1 / d : s += d; } } return o ? s : 1 / s; } // closenessCentrality }; lf.cc = lf.closenessCentrality; lf.ccn = lf.closenessCentralityNormalised = lf.closenessCentralityNormalized; var Fge = ba({ weight: null, directed: !1 }), r5 = { // 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 = Fge(e), n = t.directed, r = t.weight, a = r != null, o = this.cy(), i = this.nodes(), s = {}, l = {}, u = 0, c = { set: function(g, y) { l[g] = y, y > u && (u = y); }, 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 y = i[g].id(), x = [], w = {}, k = {}, C = {}, S = new Gg(function(ue, ve) { return C[ue] - C[ve]; }), _ = 0; _ < i.length; _++) { var T = i[_].id(); w[T] = [], k[T] = 0, C[T] = 1 / 0; } for (k[y] = 1, C[y] = 0, S.push(y); !S.empty(); ) { var F = S.pop(); if (x.push(F), a) for (var A = 0; A < s[F].length; A++) { var I = s[F][A], N = o.getElementById(F), L = void 0; N.edgesTo(I).length > 0 ? L = N.edgesTo(I)[0] : L = I.edgesTo(N)[0]; var z = r(L); I = I.id(), C[I] > C[F] + z && (C[I] = C[F] + z, S.nodes.indexOf(I) < 0 ? S.push(I) : S.updateItem(I), k[I] = 0, w[I] = []), C[I] == C[F] + z && (k[I] = k[I] + k[F], w[I].push(F)); } else for (var P = 0; P < s[F].length; P++) { var D = s[F][P].id(); C[D] == 1 / 0 && (S.push(D), C[D] = C[F] + 1), C[D] == C[F] + 1 && (k[D] = k[D] + k[F], w[D].push(F)); } } for (var M = {}, V = 0; V < i.length; V++) M[i[V].id()] = 0; for (; x.length > 0; ) { for (var Q = x.pop(), X = 0; X < w[Q].length; X++) { var ee = w[Q][X]; M[ee] = M[ee] + k[ee] / k[Q] * (1 + M[Q]); } Q != i[g].id() && c.set(Q, c.get(Q) + M[Q]); } }, v = 0; v < i.length; v++) p(v); var m = { betweenness: function(g) { var y = o.collection(g).id(); return c.get(y); }, betweennessNormalized: function(g) { if (u == 0) return 0; var y = o.collection(g).id(); return c.get(y) / u; } }; return m.betweennessNormalised = m.betweennessNormalized, m; } // betweennessCentrality }; r5.bc = r5.betweennessCentrality; var Age = ba({ 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; } ] }), Ige = function(e) { return Age(e); }, Pge = function(e, t) { for (var n = 0, r = 0; r < t.length; r++) n += t[r](e); return n; }, Lge = function(e, t, n) { for (var r = 0; r < t; r++) e[r * t + r] = n; }, SD = function(e, t) { for (var n, r = 0; r < t; r++) { n = 0; for (var a = 0; a < t; a++) n += e[a * t + r]; for (var o = 0; o < t; o++) e[o * t + r] = e[o * t + r] / n; } }, Nge = function(e, t, n) { for (var r = new Array(n * n), a = 0; a < n; a++) { for (var o = 0; o < n; o++) r[a * n + o] = 0; for (var i = 0; i < n; i++) for (var s = 0; s < n; s++) r[a * n + s] += e[a * n + i] * t[i * n + s]; } return r; }, Mge = function(e, t, n) { for (var r = e.slice(0), a = 1; a < n; a++) e = Nge(e, r, t); return e; }, Dge = function(e, t, n) { for (var r = new Array(t * t), a = 0; a < t * t; a++) r[a] = Math.pow(e[a], n); return SD(r, t), r; }, Bge = function(e, t, n, r) { for (var a = 0; a < n; a++) { var o = Math.round(e[a] * Math.pow(10, r)) / Math.pow(10, r), i = Math.round(t[a] * Math.pow(10, r)) / Math.pow(10, r); if (o !== i) return !1; } return !0; }, Rge = function(e, t, n, r) { for (var a = [], o = 0; o < t; o++) { for (var i = [], s = 0; s < t; s++) Math.round(e[o * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]); i.length !== 0 && a.push(r.collection(i)); } return a; }, zge = function(e, t) { for (var n = 0; n < e.length; n++) if (!t[n] || e[n].id() !== t[n].id()) return !1; return !0; }, Vge = function(e) { for (var t = 0; t < e.length; t++) for (var n = 0; n < e.length; n++) t != n && zge(e[t], e[n]) && e.splice(n, 1); return e; }, ZT = function(e) { for (var t = this.nodes(), n = this.edges(), r = this.cy(), a = Ige(e), o = {}, i = 0; i < t.length; i++) o[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 = o[h.source().id()], v = o[h.target().id()], m = Pge(h, a.attributes); u[p * s + v] += m, u[v * s + p] += m; } Lge(u, s, a.multFactor), SD(u, s); for (var g = !0, y = 0; g && y < a.maxIterations; ) g = !1, c = Mge(u, s, a.expandFactor), u = Dge(c, s, a.inflateFactor), Bge(u, c, l, 4) || (g = !0), y++; var x = Rge(u, s, t, r); return x = Vge(x), x; }, jge = { markovClustering: ZT, mcl: ZT }, Hge = function(e) { return e; }, ED = function(e, t) { return Math.abs(t - e); }, QT = function(e, t, n) { return e + ED(t, n); }, JT = function(e, t, n) { return e + Math.pow(n - t, 2); }, Uge = function(e) { return Math.sqrt(e); }, qge = function(e, t, n) { return Math.max(e, ED(t, n)); }, iv = function(e, t, n, r, a) { for (var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : Hge, i = r, s, l, u = 0; u < e; u++) s = t(u), l = n(u), i = a(i, s, l); return o(i); }, Lf = { euclidean: function(e, t, n) { return e >= 2 ? iv(e, t, n, 0, JT, Uge) : iv(e, t, n, 0, QT); }, squaredEuclidean: function(e, t, n) { return iv(e, t, n, 0, JT); }, manhattan: function(e, t, n) { return iv(e, t, n, 0, QT); }, max: function(e, t, n) { return iv(e, t, n, -1 / 0, qge); } }; Lf["squared-euclidean"] = Lf.squaredEuclidean; Lf.squaredeuclidean = Lf.squaredEuclidean; function tw(e, t, n, r, a, o) { var i; return ir(e) ? i = e : i = Lf[e] || Lf.euclidean, t === 0 && ir(e) ? i(a, o) : i(t, n, r, a, o); } var Wge = ba({ k: 2, m: 2, sensitivityThreshold: 1e-4, distance: "euclidean", maxIterations: 10, attributes: [], testMode: !1, testCentroids: null }), tS = function(e) { return Wge(e); }, fb = function(e, t, n, r, a) { var o = a !== "kMedoids", i = o ? function(c) { return n[c]; } : function(c) { return r[c](n); }, s = function(c) { return r[c](t); }, l = n, u = t; return tw(e, r.length, i, s, l, u); }, ck = function(e, t, n) { for (var r = n.length, a = new Array(r), o = new Array(r), i = new Array(t), s = null, l = 0; l < r; l++) a[l] = e.min(n[l]).value, o[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() * (o[c] - a[c]) + a[c]; i[u] = s; } return i; }, _D = function(e, t, n, r, a) { for (var o = 1 / 0, i = 0, s = 0; s < t.length; s++) { var l = fb(n, e, t[s], r, a); l < o && (o = l, i = s); } return i; }, TD = function(e, t, n) { for (var r = [], a = null, o = 0; o < t.length; o++) a = t[o], n[a.id()] === e && r.push(a); return r; }, Kge = function(e, t, n) { return Math.abs(t - e) <= n; }, Gge = function(e, t, n) { for (var r = 0; r < e.length; r++) for (var a = 0; a < e[r].length; a++) { var o = Math.abs(e[r][a] - t[r][a]); if (o > n) return !1; } return !0; }, Xge = function(e, t, n) { for (var r = 0; r < n; r++) if (e === t[r]) return !0; return !1; }, e$ = function(e, t) { var n = new Array(t); if (e.length < 50) for (var r = 0; r < t; r++) { for (var a = e[Math.floor(Math.random() * e.length)]; Xge(a, n, r); ) a = e[Math.floor(Math.random() * e.length)]; n[r] = a; } else for (var o = 0; o < t; o++) n[o] = e[Math.floor(Math.random() * e.length)]; return n; }, t$ = function(e, t, n) { for (var r = 0, a = 0; a < t.length; a++) r += fb("manhattan", t[a], e, n, "kMedoids"); return r; }, Yge = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = tS(e), o = new Array(a.k), i = {}, s; a.testMode ? typeof a.testCentroids == "number" ? (a.testCentroids, s = ck(n, a.k, a.attributes)) : Rr(a.testCentroids) === "object" ? s = a.testCentroids : s = ck(n, a.k, a.attributes) : s = ck(n, a.k, a.attributes); for (var l = !0, u = 0; l && u < a.maxIterations; ) { for (var c = 0; c < n.length; c++) r = n[c], i[r.id()] = _D(r, s, a.distance, a.attributes, "kMeans"); l = !1; for (var d = 0; d < a.k; d++) { var f = TD(d, n, i); if (f.length !== 0) { for (var h = a.attributes.length, p = s[d], v = new Array(h), m = new Array(h), g = 0; g < h; g++) { m[g] = 0; for (var y = 0; y < f.length; y++) r = f[y], m[g] += a.attributes[g](r); v[g] = m[g] / f.length, Kge(v[g], p[g], a.sensitivityThreshold) || (l = !0); } s[d] = v, o[d] = t.collection(f); } } u++; } return o; }, Zge = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = tS(e), o = new Array(a.k), i, s = {}, l, u = new Array(a.k); a.testMode ? typeof a.testCentroids == "number" || (Rr(a.testCentroids) === "object" ? i = a.testCentroids : i = e$(n, a.k)) : i = e$(n, a.k); for (var c = !0, d = 0; c && d < a.maxIterations; ) { for (var f = 0; f < n.length; f++) r = n[f], s[r.id()] = _D(r, i, a.distance, a.attributes, "kMedoids"); c = !1; for (var h = 0; h < i.length; h++) { var p = TD(h, n, s); if (p.length !== 0) { u[h] = t$(i[h], p, a.attributes); for (var v = 0; v < p.length; v++) l = t$(p[v], p, a.attributes), l < u[h] && (u[h] = l, i[h] = p[v], c = !0); o[h] = t.collection(p); } } d++; } return o; }, Qge = function(e, t, n, r, a) { for (var o, i, s = 0; s < t.length; s++) for (var l = 0; l < e.length; l++) r[s][l] = Math.pow(n[s][l], a.m); for (var u = 0; u < e.length; u++) for (var c = 0; c < a.attributes.length; c++) { o = 0, i = 0; for (var d = 0; d < t.length; d++) o += r[d][u] * a.attributes[c](t[d]), i += r[d][u]; e[u][c] = o / i; } }, Jge = function(e, t, n, r, a) { for (var o = 0; o < e.length; o++) t[o] = e[o].slice(); for (var i, s, l, u = 2 / (a.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 = fb(a.distance, r[d], n[c], a.attributes, "cmeans"), l = fb(a.distance, r[d], n[f], a.attributes, "cmeans"), i += Math.pow(s / l, u); e[d][c] = 1 / i; } }, eme = function(e, t, n, r) { for (var a = new Array(n.k), o = 0; o < a.length; o++) a[o] = []; 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); a[s].push(e[l]); } for (var c = 0; c < a.length; c++) a[c] = r.collection(a[c]); return a; }, n$ = function(e) { var t = this.cy(), n = this.nodes(), r = tS(e), a, o, 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; } o = new Array(r.k); for (var v = 0; v < r.k; v++) o[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, y = 0; g && y < r.maxIterations; ) g = !1, Qge(o, n, i, l, r), Jge(i, s, o, n, r), Gge(i, s, r.sensitivityThreshold) || (g = !0), y++; return a = eme(n, i, r, t), { clusters: a, degreeOfMembership: i }; }, tme = { kMeans: Yge, kMedoids: Zge, fuzzyCMeans: n$, fcm: n$ }, nme = ba({ 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 }), rme = { single: "min", complete: "max" }, ame = function(e) { var t = nme(e), n = rme[t.linkage]; return n != null && (t.linkage = n), t; }, r$ = function(e, t, n, r, a) { for (var o = 0, i = 1 / 0, s, l = a.attributes, u = function(S, _) { return tw(a.distance, l.length, function(T) { return l[T](S); }, function(T) { return l[T](_); }, S, _); }, c = 0; c < e.length; c++) { var d = e[c].key, f = n[d][r[d]]; f < i && (o = d, i = f); } if (a.mode === "threshold" && i >= a.threshold || a.mode === "dendrogram" && e.length === 1) return !1; var h = t[o], p = t[r[o]], v; a.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 : a.linkage === "min" ? (s = n[h.key][g.key], n[h.key][g.key] > n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "max" ? (s = n[h.key][g.key], n[h.key][g.key] < n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "mean" ? s = (n[h.key][g.key] * h.size + n[p.key][g.key] * p.size) / (h.size + p.size) : a.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 y = 0; y < e.length; y++) { var x = e[y].key; if (r[x] === h.key || r[x] === p.key) { for (var w = x, k = 0; k < e.length; k++) { var C = e[k].key; n[x][C] < n[x][w] && (w = C); } r[x] = w; } e[y].index = y; } return h.key = p.key = h.index = p.index = null, !0; }, n1 = function e(t, n, r) { t && (t.value ? n.push(t.value) : (t.left && e(t.left, n), t.right && e(t.right, n))); }, ome = function e(t, n) { if (!t) return ""; if (t.left && t.right) { var r = e(t.left, n), a = e(t.right, n), o = n.add({ group: "nodes", data: { id: r + "," + a } }); return n.add({ group: "edges", data: { source: r, target: o.id() } }), n.add({ group: "edges", data: { source: a, target: o.id() } }), o.id(); } else if (t.value) return t.value.id(); }, ime = function e(t, n, r) { if (!t) return []; var a = [], o = [], i = []; return n === 0 ? (t.left && n1(t.left, a), t.right && n1(t.right, o), i = a.concat(o), [r.collection(i)]) : n === 1 ? t.value ? [r.collection(t.value)] : (t.left && n1(t.left, a), t.right && n1(t.right, o), [r.collection(a), r.collection(o)]) : t.value ? [r.collection(t.value)] : (t.left && (a = e(t.left, n - 1, r)), t.right && (o = e(t.right, n - 1, r)), a.concat(o)); }, a$ = function(e) { for (var t = this.cy(), n = this.nodes(), r = ame(e), a = r.attributes, o = function(g, y) { return tw(r.distance, a.length, function(x) { return a[x](g); }, function(x) { return a[x](y); }, g, y); }, 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 : o(i[f].value, i[h].value) : p = f === h ? 1 / 0 : o(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 = r$(i, u, s, l, r); v; ) v = r$(i, u, s, l, r); var m; return r.mode === "dendrogram" ? (m = ime(i[0], r.dendrogramDepth, t), r.addDendrogram && ome(i[0], t)) : (m = new Array(i.length), i.forEach(function(g, y) { g.key = g.index = null, m[y] = t.collection(g.value); })), m; }, sme = { hierarchicalClustering: a$, hca: a$ }, lme = ba({ 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') ] }), ume = function(e) { var t = e.damping, n = e.preference; 0.5 <= t && t < 1 || pr("Damping must range on [0.5, 1). Got: ".concat(t)); var r = ["median", "mean", "min", "max"]; return r.some(function(a) { return a === n; }) || ot(n) || pr("Preference must be one of [".concat(r.map(function(a) { return "'".concat(a, "'"); }).join(", "), "] or a number. Got: ").concat(n)), lme(e); }, cme = function(e, t, n, r) { var a = function(o, i) { return r[i](o); }; return -tw(e, r.length, function(o) { return a(t, o); }, function(o) { return a(n, o); }, t, n); }, dme = function(e, t) { var n = null; return t === "median" ? n = uge(e) : t === "mean" ? n = lge(e) : t === "min" ? n = ige(e) : t === "max" ? n = sge(e) : n = t, n; }, pme = function(e, t, n) { for (var r = [], a = 0; a < e; a++) t[a * e + a] + n[a * e + a] > 0 && r.push(a); return r; }, o$ = function(e, t, n) { for (var r = [], a = 0; a < e; a++) { for (var o = -1, i = -1 / 0, s = 0; s < n.length; s++) { var l = n[s]; t[a * e + l] > i && (o = l, i = t[a * e + l]); } o > 0 && r.push(o); } for (var u = 0; u < n.length; u++) r[n[u]] = n[u]; return r; }, fme = function(e, t, n) { for (var r = o$(e, t, n), a = 0; a < n.length; a++) { for (var o = [], i = 0; i < r.length; i++) r[i] === n[a] && o.push(i); for (var s = -1, l = -1 / 0, u = 0; u < o.length; u++) { for (var c = 0, d = 0; d < o.length; d++) c += t[o[d] * e + o[u]]; c > l && (s = u, l = c); } n[a] = o[s]; } return r = o$(e, t, n), r; }, i$ = function(e) { for (var t = this.cy(), n = this.nodes(), r = ume(e), a = {}, o = 0; o < n.length; o++) a[n[o].id()] = o; 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] = cme(r.distance, n[h], n[p], r.attributes)); u = dme(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 y = new Array(i), x = new Array(i), w = new Array(i), k = 0; k < i; k++) y[k] = 0, x[k] = 0, w[k] = 0; for (var C = new Array(i * r.minIterations), S = 0; S < C.length; S++) C[S] = 0; var _; for (_ = 0; _ < r.maxIterations; _++) { for (var T = 0; T < i; T++) { for (var F = -1 / 0, A = -1 / 0, I = -1, N = 0, L = 0; L < i; L++) y[L] = c[T * i + L], N = d[T * i + L] + l[T * i + L], N >= F ? (A = F, F = N, I = L) : N > A && (A = N); for (var z = 0; z < i; z++) c[T * i + z] = (1 - r.damping) * (l[T * i + z] - F) + r.damping * y[z]; c[T * i + I] = (1 - r.damping) * (l[T * i + I] - A) + r.damping * y[I]; } for (var P = 0; P < i; P++) { for (var D = 0, M = 0; M < i; M++) y[M] = d[M * i + P], x[M] = Math.max(0, c[M * i + P]), D += x[M]; D -= x[P], x[P] = c[P * i + P], D += x[P]; for (var V = 0; V < i; V++) d[V * i + P] = (1 - r.damping) * Math.min(0, D - x[V]) + r.damping * y[V]; d[P * i + P] = (1 - r.damping) * (D - x[P]) + r.damping * y[P]; } for (var Q = 0, X = 0; X < i; X++) { var ee = d[X * i + X] + c[X * i + X] > 0 ? 1 : 0; C[_ % r.minIterations * i + X] = ee, Q += ee; } if (Q > 0 && (_ >= r.minIterations - 1 || _ == r.maxIterations - 1)) { for (var ue = 0, ve = 0; ve < i; ve++) { w[ve] = 0; for (var ge = 0; ge < r.minIterations; ge++) w[ve] += C[ge * i + ve]; (w[ve] === 0 || w[ve] === r.minIterations) && ue++; } if (ue === i) break; } } for (var se = pme(i, c, d), ne = fme(i, l, se), W = {}, Y = 0; Y < se.length; Y++) W[se[Y]] = []; for (var re = 0; re < n.length; re++) { var we = a[n[re].id()], Oe = ne[we]; Oe != null && W[Oe].push(n[re]); } for (var Ne = new Array(se.length), xe = 0; xe < se.length; xe++) Ne[xe] = t.collection(W[se[xe]]); return Ne; }, hme = { affinityPropagation: i$, ap: i$ }, vme = ba({ root: void 0, directed: !1 }), gme = { hierholzer: function(e) { if (!Cn(e)) { var t = arguments; e = { root: t[0], directed: t[1] }; } var n = vme(e), r = n.root, a = n.directed, o = this, i = !1, s, l, u; r && (u = kt(r) ? this.filter(r)[0].id() : r[0].id()); var c = {}, d = {}; a ? o.forEach(function(g) { var y = g.id(); if (g.isNode()) { var x = g.indegree(!0), w = g.outdegree(!0), k = x - w, C = w - x; k == 1 ? s ? i = !0 : s = y : C == 1 ? l ? i = !0 : l = y : (C > 1 || k > 1) && (i = !0), c[y] = [], g.outgoers().forEach(function(S) { S.isEdge() && c[y].push(S.id()); }); } else d[y] = [void 0, g.target().id()]; }) : o.forEach(function(g) { var y = g.id(); if (g.isNode()) { var x = g.degree(!0); x % 2 && (s ? l ? i = !0 : l = y : s = y), c[y] = [], g.connectedEdges().forEach(function(w) { return c[y].push(w.id()); }); } else d[y] = [g.source().id(), g.target().id()]; }); var f = { found: !1, trail: void 0 }; if (i) return f; if (l && s) if (a) { if (u && l != u) return f; u = l; } else { if (u && l != u && s != u) return f; u || (u = l); } else u || (u = o[0].id()); var h = function(g) { for (var y = g, x = [g], w, k, C; c[y].length; ) w = c[y].shift(), k = d[w][0], C = d[w][1], y != C ? (c[C] = c[C].filter(function(S) { return S != w; }), y = C) : !a && y != k && (c[k] = c[k].filter(function(S) { return S != w; }), y = k), x.unshift(w), x.unshift(y); return x; }, p = [], v = []; for (v = h(u); v.length != 1; ) c[v[0]].length == 0 ? (p.unshift(o.getElementById(v.shift())), p.unshift(o.getElementById(v.shift()))) : v = h(v.shift()).concat(v); p.unshift(o.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; } }, r1 = function() { var e = this, t = {}, n = 0, r = 0, a = [], o = [], i = {}, s = function(c, d) { for (var f = o.length - 1, h = [], p = e.spawn(); o[f].x != c || o[f].y != d; ) h.push(o.pop().edge), f--; h.push(o.pop().edge), h.forEach(function(v) { var m = v.connectedNodes().intersection(e); p.merge(v), m.forEach(function(g) { var y = g.id(), x = g.connectedEdges().intersection(e); p.merge(g), t[y].cutVertex ? p.merge(x.filter(function(w) { return w.isLoop(); })) : p.merge(x); }); }), a.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) a.push(e.spawn(e.getElementById(f))); else { var v, m, g, y; p.forEach(function(x) { v = x.source().id(), m = x.target().id(), g = v === f ? m : v, g !== h && (y = x.id(), i[y] || (i[y] = !0, o.push({ x: f, y: g, edge: x })), 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: a }; }, mme = { hopcroftTarjanBiconnected: r1, htbc: r1, htb: r1, hopcroftTarjanBiconnectedComponents: r1 }, a1 = function() { var e = this, t = {}, n = 0, r = [], a = [], o = e.spawn(e), i = function s(l) { a.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 = a.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), o = o.difference(h); } }; return e.forEach(function(s) { if (s.isNode()) { var l = s.id(); l in t || i(l); } }), { cut: o, components: r }; }, yme = { tarjanStronglyConnected: a1, tsc: a1, tscc: a1, tarjanStronglyConnectedComponents: a1 }, $D = {}; [I0, G0e, X0e, Z0e, J0e, tge, age, Oge, sf, lf, r5, jge, tme, sme, hme, gme, mme, yme].forEach(function(e) { At($D, 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 OD = 0, FD = 1, AD = 2, kl = function e(t) { if (!(this instanceof e)) return new e(t); this.id = "Thenable/1.0.7", this.state = OD, 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)); }; kl.prototype = { /* promise resolving methods */ fulfill: function(e) { return s$(this, FD, "fulfillValue", e); }, reject: function(e) { return s$(this, AD, "rejectReason", e); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function(e, t) { var n = this, r = new kl(); return n.onFulfilled.push(u$(e, r, "fulfill")), n.onRejected.push(u$(t, r, "reject")), ID(n), r.proxy; } }; var s$ = function(e, t, n, r) { return e.state === OD && (e.state = t, e[n] = r, ID(e)), e; }, ID = function(e) { e.state === FD ? l$(e, "onFulfilled", e.fulfillValue) : e.state === AD && l$(e, "onRejected", e.rejectReason); }, l$ = function(e, t, n) { if (e[t].length !== 0) { var r = e[t]; e[t] = []; var a = function() { for (var o = 0; o < r.length; o++) r[o](n); }; typeof setImmediate == "function" ? setImmediate(a) : setTimeout(a, 0); } }, u$ = function(e, t, n) { return function(r) { if (typeof e != "function") t[n].call(t, r); else { var a; try { a = e(r); } catch (o) { t.reject(o); return; } bme(t, a); } }; }, bme = function e(t, n) { if (t === n || t.proxy === n) { t.reject(new TypeError("cannot resolve promise with itself")); return; } var r; if (Rr(n) === "object" && n !== null || typeof n == "function") try { r = n.then; } catch (o) { t.reject(o); return; } if (typeof r == "function") { var a = !1; try { r.call( n, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function(o) { a || (a = !0, o === n ? t.reject(new TypeError("circular thenable chain")) : e(t, o)); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function(o) { a || (a = !0, t.reject(o)); } ); } catch (o) { a || t.reject(o); } return; } t.fulfill(n); }; kl.all = function(e) { return new kl(function(t, n) { for (var r = new Array(e.length), a = 0, o = function(s, l) { r[s] = l, a++, a === 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) { o(s, d); }, function(d) { n(d); }); else { var c = l; o(s, c); } })(i); }); }; kl.resolve = function(e) { return new kl(function(t, n) { t(e); }); }; kl.reject = function(e) { return new kl(function(t, n) { n(e); }); }; var mh = typeof Promise < "u" ? Promise : kl, a5 = function(e, t, n) { var r = K4(e), a = !r, o = this._private = At({ duration: 1e3 }, t, n); if (o.target = e, o.style = o.style || o.css, o.started = !1, o.playing = !1, o.hooked = !1, o.applying = !1, o.progress = 0, o.completes = [], o.frames = [], o.complete && ir(o.complete) && o.completes.push(o.complete), a) { var i = e.position(); o.startPosition = o.startPosition || { x: i.x, y: i.y }, o.startStyle = o.startStyle || e.cy().style().getAnimationStartStyle(e, o.style); } if (r) { var s = e.pan(); o.startPan = { x: s.x, y: s.y }, o.startZoom = e.zoom(); } this.length = 1, this[0] = this; }, Sd = a5.prototype; At(Sd, { 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), Ao(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 a = e.style[r], o = a.name, i = e.startStyle[o]; e.startStyle[o] = a, 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 mh(function(r, a) { n.push(function() { r(); }); }); } }); Sd.complete = Sd.completed; Sd.run = Sd.play; Sd.running = Sd.playing; var wme = { 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 a = n[0]; if (a) return a._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 a = 0; a < n.length; a++) { var o = n[a]; o._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, a = r ? n : [n], o = this._private.cy || this, i = !r, s = !i; if (!o.styleEnabled()) return this; var l = o.style(); e = At({}, e, t); var u = Object.keys(e).length === 0; if (u) return new a5(a[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 = o.pan(), f = o.zoom(); e.position = mD(c, f, d); } if (i && e.panBy != null) { var h = e.panBy, p = o.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 = o.getCenterPan(v.eles, e.zoom); m != null && (e.pan = m); } if (i && e.fit != null) { var g = e.fit, y = o.getFitViewport(g.eles || g.boundingBox, g.padding); y != null && (e.pan = y.pan, e.zoom = y.zoom); } if (i && Cn(e.zoom)) { var x = o.getZoomedViewport(e.zoom); x != null ? (x.zoomed && (e.zoom = x.zoom), x.panned && (e.pan = x.pan)) : e.zoom = null; } return new a5(a[0], e); }; }, // animate animate: function() { return function(e, t) { var n = this, r = n.length !== void 0, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; t && (e = At({}, e, t)); for (var i = 0; i < a.length; i++) { var s = a[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, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; for (var i = 0; i < a.length; i++) { for (var s = a[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 o.notify("draw"), this; }; } // stop }, xme = Array.isArray, nw = xme, kme = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Cme = /^\w*$/; function Sme(e, t) { if (nw(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || Kg(e) ? !0 : Cme.test(e) || !kme.test(e) || t != null && e in Object(t); } var Eme = Sme, _me = "[object AsyncFunction]", Tme = "[object Function]", $me = "[object GeneratorFunction]", Ome = "[object Proxy]"; function Fme(e) { if (!wd(e)) return !1; var t = uD(e); return t == Tme || t == $me || t == _me || t == Ome; } var Ame = Fme, Ime = Z2["__core-js_shared__"], dk = Ime, c$ = function() { var e = /[^.]+$/.exec(dk && dk.keys && dk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function Pme(e) { return !!c$ && c$ in e; } var Lme = Pme, Nme = Function.prototype, Mme = Nme.toString; function Dme(e) { if (e != null) { try { return Mme.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var Bme = Dme, Rme = /[\\^$.*+?()[\]{}|]/g, zme = /^\[object .+?Constructor\]$/, Vme = Function.prototype, jme = Object.prototype, Hme = Vme.toString, Ume = jme.hasOwnProperty, qme = RegExp( "^" + Hme.call(Ume).replace(Rme, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Wme(e) { if (!wd(e) || Lme(e)) return !1; var t = Ame(e) ? qme : zme; return t.test(Bme(e)); } var Kme = Wme; function Gme(e, t) { return e == null ? void 0 : e[t]; } var Xme = Gme; function Yme(e, t) { var n = Xme(e, t); return Kme(n) ? n : void 0; } var nS = Yme, Zme = nS(Object, "create"), N0 = Zme; function Qme() { this.__data__ = N0 ? N0(null) : {}, this.size = 0; } var Jme = Qme; function e1e(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var t1e = e1e, n1e = "__lodash_hash_undefined__", r1e = Object.prototype, a1e = r1e.hasOwnProperty; function o1e(e) { var t = this.__data__; if (N0) { var n = t[e]; return n === n1e ? void 0 : n; } return a1e.call(t, e) ? t[e] : void 0; } var i1e = o1e, s1e = Object.prototype, l1e = s1e.hasOwnProperty; function u1e(e) { var t = this.__data__; return N0 ? t[e] !== void 0 : l1e.call(t, e); } var c1e = u1e, d1e = "__lodash_hash_undefined__"; function p1e(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = N0 && t === void 0 ? d1e : t, this; } var f1e = p1e; function yh(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]); } } yh.prototype.clear = Jme; yh.prototype.delete = t1e; yh.prototype.get = i1e; yh.prototype.has = c1e; yh.prototype.set = f1e; var d$ = yh; function h1e() { this.__data__ = [], this.size = 0; } var v1e = h1e; function g1e(e, t) { return e === t || e !== e && t !== t; } var PD = g1e; function m1e(e, t) { for (var n = e.length; n--; ) if (PD(e[n][0], t)) return n; return -1; } var rw = m1e, y1e = Array.prototype, b1e = y1e.splice; function w1e(e) { var t = this.__data__, n = rw(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : b1e.call(t, n, 1), --this.size, !0; } var x1e = w1e; function k1e(e) { var t = this.__data__, n = rw(t, e); return n < 0 ? void 0 : t[n][1]; } var C1e = k1e; function S1e(e) { return rw(this.__data__, e) > -1; } var E1e = S1e; function _1e(e, t) { var n = this.__data__, r = rw(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } var T1e = _1e; function bh(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]); } } bh.prototype.clear = v1e; bh.prototype.delete = x1e; bh.prototype.get = C1e; bh.prototype.has = E1e; bh.prototype.set = T1e; var $1e = bh, O1e = nS(Z2, "Map"), F1e = O1e; function A1e() { this.size = 0, this.__data__ = { hash: new d$(), map: new (F1e || $1e)(), string: new d$() }; } var I1e = A1e; function P1e(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } var L1e = P1e; function N1e(e, t) { var n = e.__data__; return L1e(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var aw = N1e; function M1e(e) { var t = aw(this, e).delete(e); return this.size -= t ? 1 : 0, t; } var D1e = M1e; function B1e(e) { return aw(this, e).get(e); } var R1e = B1e; function z1e(e) { return aw(this, e).has(e); } var V1e = z1e; function j1e(e, t) { var n = aw(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } var H1e = j1e; function wh(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]); } } wh.prototype.clear = I1e; wh.prototype.delete = D1e; wh.prototype.get = R1e; wh.prototype.has = V1e; wh.prototype.set = H1e; var LD = wh, U1e = "Expected a function"; function rS(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(U1e); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (rS.Cache || LD)(), n; } rS.Cache = LD; var q1e = rS, W1e = 500; function K1e(e) { var t = q1e(e, function(r) { return n.size === W1e && n.clear(), r; }), n = t.cache; return t; } var G1e = K1e, X1e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Y1e = /\\(\\)?/g, Z1e = G1e(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(X1e, function(n, r, a, o) { t.push(a ? o.replace(Y1e, "$1") : r || n); }), t; }), ND = Z1e; function Q1e(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var MD = Q1e, J1e = 1 / 0, p$ = If ? If.prototype : void 0, f$ = p$ ? p$.toString : void 0; function DD(e) { if (typeof e == "string") return e; if (nw(e)) return MD(e, DD) + ""; if (Kg(e)) return f$ ? f$.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -J1e ? "-0" : t; } var eye = DD; function tye(e) { return e == null ? "" : eye(e); } var BD = tye; function nye(e, t) { return nw(e) ? e : Eme(e, t) ? [e] : ND(BD(e)); } var RD = nye, rye = 1 / 0; function aye(e) { if (typeof e == "string" || Kg(e)) return e; var t = e + ""; return t == "0" && 1 / e == -rye ? "-0" : t; } var aS = aye; function oye(e, t) { t = RD(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[aS(t[n++])]; return n && n == r ? e : void 0; } var iye = oye; function sye(e, t, n) { var r = e == null ? void 0 : iye(e, t); return r === void 0 ? n : r; } var lye = sye, uye = function() { try { var e = nS(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), h$ = uye; function cye(e, t, n) { t == "__proto__" && h$ ? h$(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } var dye = cye, pye = Object.prototype, fye = pye.hasOwnProperty; function hye(e, t, n) { var r = e[t]; (!(fye.call(e, t) && PD(r, n)) || n === void 0 && !(t in e)) && dye(e, t, n); } var vye = hye, gye = 9007199254740991, mye = /^(?:0|[1-9]\d*)$/; function yye(e, t) { var n = typeof e; return t = t ?? gye, !!t && (n == "number" || n != "symbol" && mye.test(e)) && e > -1 && e % 1 == 0 && e < t; } var bye = yye; function wye(e, t, n, r) { if (!wd(e)) return e; t = RD(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = aS(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = r ? r(c, l, s) : void 0, u === void 0 && (u = wd(c) ? c : bye(t[a + 1]) ? [] : {}); } vye(s, l, u), s = s[l]; } return e; } var xye = wye; function kye(e, t, n) { return e == null ? e : xye(e, t, n); } var Cye = kye; function Sye(e, t) { var n = -1, r = e.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; return t; } var Eye = Sye; function _ye(e) { return nw(e) ? MD(e, aS) : Kg(e) ? [e] : Eye(ND(BD(e))); } var Tye = _ye, $ye = { // 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 = At({}, t, e), function(n, r) { var a = e, o = this, i = o.length !== void 0, s = i ? o : [o], l = i ? o[0] : o; if (kt(n)) { var u = n.indexOf(".") !== -1, c = u && Tye(n); if (a.allowGetting && r === void 0) { var d; return l && (a.beforeGet(l), c && l._private[a.field][n] === void 0 ? d = lye(l._private[a.field], c) : d = l._private[a.field][n]), d; } else if (a.allowSetting && r !== void 0) { var f = !a.immutableKeys[n]; if (f) { var h = QM({}, n, r); a.beforeSet(o, h); for (var p = 0, v = s.length; p < v; p++) { var m = s[p]; a.canSet(m) && (c && l._private[a.field][n] === void 0 ? Cye(m._private[a.field], c, r) : m._private[a.field][n] = r); } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } } } else if (a.allowSetting && Cn(n)) { var g = n, y, x, w = Object.keys(g); a.beforeSet(o, g); for (var k = 0; k < w.length; k++) { y = w[k], x = g[y]; var C = !a.immutableKeys[y]; if (C) for (var S = 0; S < s.length; S++) { var _ = s[S]; a.canSet(_) && (_._private[a.field][y] = x); } } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } else if (a.allowBinding && ir(n)) { var T = n; o.on(a.bindingEvent, T); } else if (a.allowGetting && n === void 0) { var F; return l && (a.beforeGet(l), F = l._private[a.field]), F; } return o; }; }, // data // remove data field removeData: function(e) { var t = { field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !1, immutableKeys: {} // key => true if immutable }; return e = At({}, t, e), function(n) { var r = e, a = this, o = a.length !== void 0, i = o ? a : [a]; if (kt(n)) { for (var s = n.split(/\s+/), l = s.length, u = 0; u < l; u++) { var c = s[u]; if (!ju(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 && a[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), y = 0; y < g.length; y++) { var x = g[y], w = !r.immutableKeys[x]; w && (m[x] = void 0); } r.triggerEvent && a[r.triggerFnName](r.event); } return a; }; } // removeData }, Oye = { 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 a = this, o = Array.prototype.slice.call(arguments, 0); return new mh(function(i, s) { var l = function(d) { a.off.apply(a, c), i(d); }, u = o.concat([l]), c = u.concat([]); a.on.apply(a, u); }); }; } }, $n = {}; [wme, $ye, Oye].forEach(function(e) { At($n, e); }); var Fye = { animate: $n.animate(), animation: $n.animation(), animated: $n.animated(), clearQueue: $n.clearQueue(), delay: $n.delay(), delayAnimation: $n.delayAnimation(), stop: $n.stop() }, py = { 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 zn(e) || (e = (e || "").match(/\S+/g) || []); for (var r = [], a = new gh(e), o = 0; o < t.length; o++) { for (var i = t[o], 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 = a, 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) { zn(e) || (e = e.match(/\S+/g) || []); for (var n = this, r = t === void 0, a = [], o = 0, i = n.length; o < i; o++) for (var s = n[o], 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 && (a.push(s), u = !0); } return a.length > 0 && this.spawn(a).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; } }; py.className = py.classNames = py.classes; var hn = { 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+" }; hn.variable = "(?:[\\w-.]|(?:\\\\" + hn.metaChar + "))+"; hn.className = "(?:[\\w-]|(?:\\\\" + hn.metaChar + "))+"; hn.value = hn.string + "|" + hn.number; hn.id = hn.variable; (function() { var e, t, n; for (e = hn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], hn.comparatorOp += "|@" + t; for (e = hn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], !(t.indexOf("!") >= 0) && t !== "=" && (hn.comparatorOp += "|\\!" + t); })(); var Nn = function() { return { checks: [] }; }, ft = { /** 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 }, o5 = [{ 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 zve(e.selector, t.selector); }), Aye = function() { for (var e = {}, t, n = 0; n < o5.length; n++) t = o5[n], e[t.selector] = t.matches; return e; }(), Iye = function(e, t) { return Aye[e](t); }, Pye = "(" + o5.map(function(e) { return e.selector; }).join("|") + ")", Ep = function(e) { return e.replace(new RegExp("\\\\(" + hn.metaChar + ")", "g"), function(t, n) { return n; }); }, Xl = function(e, t, n) { e[e.length - 1] = n; }, i5 = [{ name: "group", // just used for identifying when debugging query: !0, regex: "(" + hn.group + ")", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: ft.GROUP, value: a === "*" ? a : a + "s" }); } }, { name: "state", query: !0, regex: Pye, populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: ft.STATE, value: a }); } }, { name: "id", query: !0, regex: "\\#(" + hn.id + ")", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: ft.ID, value: Ep(a) }); } }, { name: "className", query: !0, regex: "\\.(" + hn.className + ")", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: ft.CLASS, value: Ep(a) }); } }, { name: "dataExists", query: !0, regex: "\\[\\s*(" + hn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = _i(n, 1), a = r[0]; t.checks.push({ type: ft.DATA_EXIST, field: Ep(a) }); } }, { name: "dataCompare", query: !0, regex: "\\[\\s*(" + hn.variable + ")\\s*(" + hn.comparatorOp + ")\\s*(" + hn.value + ")\\s*\\]", populate: function(e, t, n) { var r = _i(n, 3), a = r[0], o = r[1], i = r[2], s = new RegExp("^" + hn.string + "$").exec(i) != null; s ? i = i.substring(1, i.length - 1) : i = parseFloat(i), t.checks.push({ type: ft.DATA_COMPARE, field: Ep(a), operator: o, value: i }); } }, { name: "dataBool", query: !0, regex: "\\[\\s*(" + hn.boolOp + ")\\s*(" + hn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = _i(n, 2), a = r[0], o = r[1]; t.checks.push({ type: ft.DATA_BOOL, field: Ep(o), operator: a }); } }, { name: "metaCompare", query: !0, regex: "\\[\\[\\s*(" + hn.meta + ")\\s*(" + hn.comparatorOp + ")\\s*(" + hn.number + ")\\s*\\]\\]", populate: function(e, t, n) { var r = _i(n, 3), a = r[0], o = r[1], i = r[2]; t.checks.push({ type: ft.META_COMPARE, field: Ep(a), operator: o, value: parseFloat(i) }); } }, { name: "nextQuery", separator: !0, regex: hn.separator, populate: function(e, t) { var n = e.currentSubject, r = e.edgeCount, a = e.compoundCount, o = e[e.length - 1]; n != null && (o.subject = n, e.currentSubject = null), o.edgeCount = r, o.compoundCount = a, e.edgeCount = 0, e.compoundCount = 0; var i = e[e.length++] = Nn(); return i; } }, { name: "directedEdge", separator: !0, regex: hn.directedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = t, a = Nn(); return n.checks.push({ type: ft.DIRECTED_EDGE, source: r, target: a }), Xl(e, t, n), e.edgeCount++, a; } else { var o = Nn(), i = t, s = Nn(); return o.checks.push({ type: ft.NODE_SOURCE, source: i, target: s }), Xl(e, t, o), e.edgeCount++, s; } } }, { name: "undirectedEdge", separator: !0, regex: hn.undirectedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = t, a = Nn(); return n.checks.push({ type: ft.UNDIRECTED_EDGE, nodes: [r, a] }), Xl(e, t, n), e.edgeCount++, a; } else { var o = Nn(), i = t, s = Nn(); return o.checks.push({ type: ft.NODE_NEIGHBOR, node: i, neighbor: s }), Xl(e, t, o), s; } } }, { name: "child", separator: !0, regex: hn.child, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = Nn(), a = e[e.length - 1]; return n.checks.push({ type: ft.CHILD, parent: a, child: r }), Xl(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Nn(), i = e[e.length - 1], s = Nn(), l = Nn(), u = Nn(), c = Nn(); return o.checks.push({ type: ft.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ft.TRUE }], c.checks.push({ type: ft.TRUE }), s.checks.push({ type: ft.PARENT, // type is swapped on right side queries parent: c, child: u // empty for now }), Xl(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Nn(), f = Nn(), h = [{ type: ft.PARENT, parent: d, child: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "descendant", separator: !0, regex: hn.descendant, populate: function(e, t) { if (e.currentSubject == null) { var n = Nn(), r = Nn(), a = e[e.length - 1]; return n.checks.push({ type: ft.DESCENDANT, ancestor: a, descendant: r }), Xl(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Nn(), i = e[e.length - 1], s = Nn(), l = Nn(), u = Nn(), c = Nn(); return o.checks.push({ type: ft.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ft.TRUE }], c.checks.push({ type: ft.TRUE }), s.checks.push({ type: ft.ANCESTOR, // type is swapped on right side queries ancestor: c, descendant: u // empty for now }), Xl(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Nn(), f = Nn(), h = [{ type: ft.ANCESTOR, ancestor: d, descendant: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "subject", modifier: !0, regex: hn.subject, populate: function(e, t) { if (e.currentSubject != null && e.currentSubject !== t) return Fn("Redefinition of subject in selector `" + e.toString() + "`"), !1; e.currentSubject = t; var n = e[e.length - 1], r = n.checks[0], a = r == null ? null : r.type; a === ft.DIRECTED_EDGE ? r.type = ft.NODE_TARGET : a === ft.UNDIRECTED_EDGE && (r.type = ft.NODE_NEIGHBOR, r.node = r.nodes[1], r.neighbor = r.nodes[0], r.nodes = null); } }]; i5.forEach(function(e) { return e.regexObj = new RegExp("^" + e.regex); }); var Lye = function(e) { for (var t, n, r, a = 0; a < i5.length; a++) { var o = i5[a], i = o.name, s = e.match(o.regexObj); if (s != null) { n = s, t = o, r = i; var l = s[0]; e = e.substring(l.length); break; } } return { expr: t, match: n, name: r, remaining: e }; }, Nye = function(e) { var t = e.match(/^\s+/); if (t) { var n = t[0]; e = e.substring(n.length); } return e; }, Mye = function(e) { var t = this, n = t.inputText = e, r = t[0] = Nn(); for (t.length = 1, n = Nye(n); ; ) { var a = Lye(n); if (a.expr == null) return Fn("The selector `" + e + "`is invalid"), !1; var o = a.match.slice(1), i = a.expr.populate(t, r, o); if (i === !1) return !1; if (i != null && (r = i), n = a.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 Fn("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1; if (u.edgeCount > 1) return Fn("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1; u.edgeCount === 1 && Fn("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; }, Dye = function() { if (this.toStringCache != null) return this.toStringCache; for (var e = function(l) { return l ?? ""; }, t = function(l) { return kt(l) ? '"' + l + '"' : e(l); }, n = function(l) { return " " + l + " "; }, r = function(l, u) { var c = l.type, d = l.value; switch (c) { case ft.GROUP: { var f = e(d); return f.substring(0, f.length - 1); } case ft.DATA_COMPARE: { var h = l.field, p = l.operator; return "[" + h + n(e(p)) + t(d) + "]"; } case ft.DATA_BOOL: { var v = l.operator, m = l.field; return "[" + e(v) + m + "]"; } case ft.DATA_EXIST: { var g = l.field; return "[" + g + "]"; } case ft.META_COMPARE: { var y = l.operator, x = l.field; return "[[" + x + n(e(y)) + t(d) + "]]"; } case ft.STATE: return d; case ft.ID: return "#" + d; case ft.CLASS: return "." + d; case ft.PARENT: case ft.CHILD: return a(l.parent, u) + n(">") + a(l.child, u); case ft.ANCESTOR: case ft.DESCENDANT: return a(l.ancestor, u) + " " + a(l.descendant, u); case ft.COMPOUND_SPLIT: { var w = a(l.left, u), k = a(l.subject, u), C = a(l.right, u); return w + (w.length > 0 ? " " : "") + k + C; } case ft.TRUE: return ""; } }, a = function(l, u) { return l.checks.reduce(function(c, d, f) { return c + (u === l && f === 0 ? "$" : "") + r(d, u); }, ""); }, o = "", i = 0; i < this.length; i++) { var s = this[i]; o += a(s, s.subject), this.length > 1 && i < this.length - 1 && (o += ", "); } return this.toStringCache = o, o; }, Bye = { parse: Mye, toString: Dye }, zD = function(e, t, n) { var r, a = kt(e), o = ot(e), i = kt(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), (a || i || u) && (s = !a && !o ? "" : "" + 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; }, Rye = function(e, t) { switch (t) { case "?": return !!e; case "!": return !e; case "^": return e === void 0; } }, zye = function(e) { return e !== void 0; }, oS = function(e, t) { return e.data(t); }, Vye = function(e, t) { return e[t](); }, hr = [], nr = function(e, t) { return e.checks.every(function(n) { return hr[n.type](n, t); }); }; hr[ft.GROUP] = function(e, t) { var n = e.value; return n === "*" || n === t.group(); }; hr[ft.STATE] = function(e, t) { var n = e.value; return Iye(n, t); }; hr[ft.ID] = function(e, t) { var n = e.value; return t.id() === n; }; hr[ft.CLASS] = function(e, t) { var n = e.value; return t.hasClass(n); }; hr[ft.META_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return zD(Vye(t, n), r, a); }; hr[ft.DATA_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return zD(oS(t, n), r, a); }; hr[ft.DATA_BOOL] = function(e, t) { var n = e.field, r = e.operator; return Rye(oS(t, n), r); }; hr[ft.DATA_EXIST] = function(e, t) { var n = e.field; return e.operator, zye(oS(t, n)); }; hr[ft.UNDIRECTED_EDGE] = function(e, t) { var n = e.nodes[0], r = e.nodes[1], a = t.source(), o = t.target(); return nr(n, a) && nr(r, o) || nr(r, a) && nr(n, o); }; hr[ft.NODE_NEIGHBOR] = function(e, t) { return nr(e.node, t) && t.neighborhood().some(function(n) { return n.isNode() && nr(e.neighbor, n); }); }; hr[ft.DIRECTED_EDGE] = function(e, t) { return nr(e.source, t.source()) && nr(e.target, t.target()); }; hr[ft.NODE_SOURCE] = function(e, t) { return nr(e.source, t) && t.outgoers().some(function(n) { return n.isNode() && nr(e.target, n); }); }; hr[ft.NODE_TARGET] = function(e, t) { return nr(e.target, t) && t.incomers().some(function(n) { return n.isNode() && nr(e.source, n); }); }; hr[ft.CHILD] = function(e, t) { return nr(e.child, t) && nr(e.parent, t.parent()); }; hr[ft.PARENT] = function(e, t) { return nr(e.parent, t) && t.children().some(function(n) { return nr(e.child, n); }); }; hr[ft.DESCENDANT] = function(e, t) { return nr(e.descendant, t) && t.ancestors().some(function(n) { return nr(e.ancestor, n); }); }; hr[ft.ANCESTOR] = function(e, t) { return nr(e.ancestor, t) && t.descendants().some(function(n) { return nr(e.descendant, n); }); }; hr[ft.COMPOUND_SPLIT] = function(e, t) { return nr(e.subject, t) && nr(e.left, t) && nr(e.right, t); }; hr[ft.TRUE] = function() { return !0; }; hr[ft.COLLECTION] = function(e, t) { var n = e.value; return n.has(t); }; hr[ft.FILTER] = function(e, t) { var n = e.value; return n(t); }; var jye = function(e) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === ft.ID) return e.getElementById(t[0].checks[0].value).collection(); var n = function(r) { for (var a = 0; a < t.length; a++) { var o = t[a]; if (nr(o, r)) return !0; } return !1; }; return t.text() == null && (n = function() { return !0; }), e.filter(n); }, Hye = function(e) { for (var t = this, n = 0; n < t.length; n++) { var r = t[n]; if (nr(r, e)) return !0; } return !1; }, Uye = { matches: Hye, filter: jye }, Uu = function(e) { this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || kt(e) && e.match(/^\s*$/) || (Ao(e) ? this.addQuery({ checks: [{ type: ft.COLLECTION, value: e.collection() }] }) : ir(e) ? this.addQuery({ checks: [{ type: ft.FILTER, value: e }] }) : kt(e) ? this.parse(e) || (this.invalid = !0) : pr("A selector must be created from a string; found ")); }, qu = Uu.prototype; [Bye, Uye].forEach(function(e) { return At(qu, e); }); qu.text = function() { return this.inputText; }; qu.size = function() { return this.length; }; qu.eq = function(e) { return this[e]; }; qu.sameText = function(e) { return !this.invalid && !e.invalid && this.text() === e.text(); }; qu.addQuery = function(e) { this[this.length++] = e; }; qu.selector = qu.toString; var Lu = { allAre: function(e) { var t = new Uu(e); return this.every(function(n) { return t.matches(n); }); }, is: function(e) { var t = new Uu(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()); }); } }; Lu.allAreNeighbours = Lu.allAreNeighbors; Lu.has = Lu.contains; Lu.equal = Lu.equals = Lu.same; var Xo = function(e, t) { return function(n, r, a, o) { var i = n, s = this, l; if (i == null ? l = "" : Ao(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 = xd(l), h = d[f]; return h || (d[f] = e.call(s, n, r, a, o)); } else return e.call(s, n, r, a, o); }; }, Nf = { 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 a = this[r], o = a._private.parent; o && t.push(o); } 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 a = n[r]; t.push(a); } 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], a = r.parents(); t = t || a, t = t.intersect(a); } 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: Xo(function(e) { for (var t = [], n = 0; n < this.length; n++) for (var r = this[n], a = r._private.children, o = 0; o < a.length; o++) t.push(a[o]); 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 a = 0; a < r.length; a++) { var o = r[a]; t.push(o), o.children().nonempty() && n(o.children()); } } return n(this.children()), this.spawn(t, !0).filter(e); } }; function iS(e, t, n, r) { for (var a = [], o = new gh(), i = e.cy(), s = i.hasCompoundNodes(), l = 0; l < e.length; l++) { var u = e[l]; n ? a.push(u) : s && r(a, o, u); } for (; a.length > 0; ) { var c = a.shift(); t(c), o.add(c.id()), s && r(a, o, c); } return e; } function VD(e, t, n) { if (n.isParent()) for (var r = n._private.children, a = 0; a < r.length; a++) { var o = r[a]; t.has(o.id()) || e.push(o); } } Nf.forEachDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return iS(this, e, t, VD); }; function jD(e, t, n) { if (n.isChild()) { var r = n._private.parent; t.has(r.id()) || e.push(r); } } Nf.forEachUp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return iS(this, e, t, jD); }; function qye(e, t, n) { jD(e, t, n), VD(e, t, n); } Nf.forEachUpAndDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return iS(this, e, t, qye); }; Nf.ancestors = Nf.parents; var M0, HD; M0 = HD = { data: $n.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: $n.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), scratch: $n.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: $n.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), rscratch: $n.data({ field: "rscratch", allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !0 }), removeRscratch: $n.removeData({ field: "rscratch", triggerEvent: !1 }), id: function() { var e = this[0]; if (e) return e._private.data.id; } }; M0.attr = M0.data; M0.removeAttr = M0.removeData; var Wye = HD, ow = {}; function pk(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, a = n[0], o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; !t && s.isLoop() || (r += e(a, s)); } return r; } else return; }; } At(ow, { degree: pk(function(e, t) { return t.source().same(t.target()) ? 2 : 1; }), indegree: pk(function(e, t) { return t.target().same(e) ? 1 : 0; }), outdegree: pk(function(e, t) { return t.source().same(e) ? 1 : 0; }) }); function _p(e, t) { return function(n) { for (var r, a = this.nodes(), o = 0; o < a.length; o++) { var i = a[o], s = i[e](n); s !== void 0 && (r === void 0 || t(s, r)) && (r = s); } return r; }; } At(ow, { minDegree: _p("degree", function(e, t) { return e < t; }), maxDegree: _p("degree", function(e, t) { return e > t; }), minIndegree: _p("indegree", function(e, t) { return e < t; }), maxIndegree: _p("indegree", function(e, t) { return e > t; }), minOutdegree: _p("outdegree", function(e, t) { return e < t; }), maxOutdegree: _p("outdegree", function(e, t) { return e > t; }) }); At(ow, { totalDegree: function(e) { for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++) t += n[r].degree(e); return t; } }); var Ri, UD, qD = function(e, t, n) { for (var r = 0; r < e.length; r++) { var a = e[r]; if (!a.locked()) { var o = a._private.position, i = { x: t.x != null ? t.x - o.x : 0, y: t.y != null ? t.y - o.y : 0 }; a.isParent() && !(i.x === 0 && i.y === 0) && a.children().shift(i, n), a.dirtyBoundingBoxCache(); } } }, v$ = { 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) { qD(e, t, !1); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); }, canSet: function(e) { return !e.locked(); } }; Ri = UD = { position: $n.data(v$), // position but no notification to renderer silentPosition: $n.data(At({}, v$, { allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !1, beforeSet: function(e, t) { qD(e, t, !0); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); } })), positions: function(e, t) { if (Cn(e)) t ? this.silentPosition(e) : this.position(e); else if (ir(e)) { var n = e, r = this.cy(); r.startBatch(); for (var a = 0; a < this.length; a++) { var o = this[a], i = void 0; (i = n(o, a)) && (t ? o.silentPosition(i) : o.position(i)); } r.endBatch(); } return this; }, silentPositions: function(e) { return this.positions(e, !0); }, shift: function(e, t, n) { var r; if (Cn(e) ? (r = { x: ot(e.x) ? e.x : 0, y: ot(e.y) ? e.y : 0 }, n = t) : kt(e) && ot(t) && (r = { x: 0, y: 0 }, r[e] = t), r != null) { var a = this.cy(); a.startBatch(); for (var o = 0; o < this.length; o++) { var i = this[o]; if (!(a.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); } } a.endBatch(); } return this; }, silentShift: function(e, t) { return Cn(e) ? this.shift(e, !0) : kt(e) && ot(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(), a = r.zoom(), o = r.pan(), i = Cn(e) ? e : void 0, s = i !== void 0 || t !== void 0 && kt(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 - o[e]) / a) : i !== void 0 && u.position(mD(i, a, o)); } else { var c = n.position(); return i = ew(c, a, o), 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(), a = Cn(e) ? e : void 0, o = a !== void 0 || t !== void 0 && kt(e), i = r.hasCompoundNodes(); if (n && n.isNode()) if (o) 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]) : a !== void 0 && l.position({ x: a.x + f.x, y: a.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 a = { x: h.x - g.x, y: h.y - g.y }, e === void 0 ? a : a[e]; } else if (!o) return; return this; } }; Ri.modelPosition = Ri.point = Ri.position; Ri.modelPositions = Ri.points = Ri.positions; Ri.renderedPoint = Ri.renderedPosition; Ri.relativePoint = Ri.relativePosition; var Kye = UD, uf, uc; uf = uc = {}; uc.renderedBoundingBox = function(e) { var t = this.boundingBox(e), n = this.cy(), r = n.zoom(), a = n.pan(), o = t.x1 * r + a.x, i = t.x2 * r + a.x, s = t.y1 * r + a.y, l = t.y2 * r + a.y; return { x1: o, x2: i, y1: s, y2: l, w: i - o, h: l - s }; }; uc.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); }; uc.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(T, F, A) { var I = 0, N = 0, L = F + A; return T > 0 && L > 0 && (I = F / L * T, N = A / L * T), { biasDiff: I, biasComplementDiff: N }; } function p(T, F, A, I) { if (A.units === "%") switch (I) { case "width": return T > 0 ? A.pfValue * T : 0; case "height": return F > 0 ? A.pfValue * F : 0; case "average": return T > 0 && F > 0 ? A.pfValue * (T + F) / 2 : 0; case "min": return T > 0 && F > 0 ? T > F ? A.pfValue * F : A.pfValue * T : 0; case "max": return T > 0 && F > 0 ? T > F ? A.pfValue * T : A.pfValue * F : 0; default: return 0; } else return A.units === "px" ? A.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 y = c.height.bottom.value; c.height.bottom.units === "px" && c.height.val > 0 && (y = y * 100 / c.height.val); var x = h(c.width.val - d.w, v, m), w = x.biasDiff, k = x.biasComplementDiff, C = h(c.height.val - d.h, g, y), S = C.biasDiff, _ = C.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 = (-w + d.x1 + d.x2 + k) / 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 a = this[r], o = a._private; (!o.compoundBoundsClean || e) && (n(a), t.batching() || (o.compoundBoundsClean = !0)); } return this; }; var Uo = function(e) { return e === 1 / 0 || e === -1 / 0 ? 0 : e; }, Fi = function(e, t, n, r, a) { r - t === 0 || a - n === 0 || t == null || n == null || r == null || a == 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 = a > e.y2 ? a : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1); }, Nc = function(e, t) { return t == null ? e : Fi(e, t.x1, t.y1, t.x2, t.y2); }, sv = function(e, t, n) { return Ii(e, t, n); }, o1 = function(e, t, n) { if (!t.cy().headless()) { var r = t._private, a = r.rstyle, o = a.arrowWidth / 2, i = t.pstyle(n + "-arrow-shape").value, s, l; if (i !== "none") { n === "source" ? (s = a.srcX, l = a.srcY) : n === "target" ? (s = a.tgtX, l = a.tgtY) : (s = a.midX, l = a.midY); var u = r.arrowBounds = r.arrowBounds || {}, c = u[n] = u[n] || {}; c.x1 = s - o, c.y1 = l - o, c.x2 = s + o, c.y2 = l + o, c.w = c.x2 - c.x1, c.h = c.y2 - c.y1, cy(c, 1), Fi(e, c.x1, c.y1, c.x2, c.y2); } } }, fk = function(e, t, n) { if (!t.cy().headless()) { var r; n ? r = n + "-" : r = ""; var a = t._private, o = a.rstyle, i = t.pstyle(r + "label").strValue; if (i) { var s = t.pstyle("text-halign"), l = t.pstyle("text-valign"), u = sv(o, "labelWidth", n), c = sv(o, "labelHeight", n), d = sv(o, "labelX", n), f = sv(o, "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, y = t.pstyle("text-border-width").pfValue, x = y / 2, w = t.pstyle("text-background-padding").pfValue, k = 2, C = c, S = u, _ = S / 2, T = C / 2, F, A, I, N; if (v) F = d - _, A = d + _, I = f - T, N = f + T; else { switch (s.value) { case "left": F = d - S, A = d; break; case "center": F = d - _, A = d + _; break; case "right": F = d, A = d + S; break; } switch (l.value) { case "top": I = f - C, N = f; break; case "center": I = f - T, N = f + T; break; case "bottom": I = f, N = f + C; break; } } F += h - Math.max(g, x) - w - k, A += h + Math.max(g, x) + w + k, I += p - Math.max(g, x) - w - k, N += p + Math.max(g, x) + w + k; var L = n || "main", z = a.labelBounds, P = z[L] = z[L] || {}; P.x1 = F, P.y1 = I, P.x2 = A, P.y2 = N, P.w = A - F, P.h = N - I; var D = v && m.strValue === "autorotate", M = m.pfValue != null && m.pfValue !== 0; if (D || M) { var V = D ? sv(a.rstyle, "labelAngle", n) : m.pfValue, Q = Math.cos(V), X = Math.sin(V), ee = (F + A) / 2, ue = (I + N) / 2; if (!v) { switch (s.value) { case "left": ee = A; break; case "right": ee = F; break; } switch (l.value) { case "top": ue = N; break; case "bottom": ue = I; break; } } var ve = function(we, Oe) { return we = we - ee, Oe = Oe - ue, { x: we * Q - Oe * X + ee, y: we * X + Oe * Q + ue }; }, ge = ve(F, I), se = ve(F, N), ne = ve(A, I), W = ve(A, N); F = Math.min(ge.x, se.x, ne.x, W.x), A = Math.max(ge.x, se.x, ne.x, W.x), I = Math.min(ge.y, se.y, ne.y, W.y), N = Math.max(ge.y, se.y, ne.y, W.y); } var Y = L + "Rot", re = z[Y] = z[Y] || {}; re.x1 = F, re.y1 = I, re.x2 = A, re.y2 = N, re.w = A - F, re.h = N - I, Fi(e, F, I, A, N), Fi(a.labelBounds.all, F, I, A, N); } return e; } }, Gye = 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 a = t.pstyle("outline-offset").value, o = t.pstyle("shape").value, i = r + a, s = (e.w + i * 2) / e.w, l = (e.h + i * 2) / e.h, u = 0, c = 0; ["diamond", "pentagon", "round-triangle"].includes(o) ? (s = (e.w + i * 2.4) / e.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(o) ? s = (e.w + i * 2.4) / e.w : o === "star" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.6) / e.h, c = -i / 3.8) : o === "triangle" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.4) / e.h, c = -i / 1.4) : o === "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 (dy(e, [Math.ceil(d / 2), Math.ceil(f / 2)]), u != 0 || c !== 0) { var h = vge(e, u, c); bD(e, h); } } } }, Xye = function(e, t) { var n = e._private.cy, r = n.styleEnabled(), a = n.headless(), o = ko(), 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(xe) { return xe.pstyle("display").value !== "none"; }, y = !r || g(e) && (!l || g(e.source()) && g(e.target())); if (y) { var x = 0, w = 0; r && t.includeOverlays && (x = e.pstyle("overlay-opacity").value, x !== 0 && (w = e.pstyle("overlay-padding").value)); var k = 0, C = 0; r && t.includeUnderlays && (k = e.pstyle("underlay-opacity").value, k !== 0 && (C = e.pstyle("underlay-padding").value)); var S = Math.max(w, C), _ = 0, T = 0; if (r && (_ = e.pstyle("width").pfValue, T = _ / 2), s && t.includeNodes) { var F = e.position(); h = F.x, p = F.y; var A = e.outerWidth(), I = A / 2, N = e.outerHeight(), L = N / 2; u = h - I, c = h + I, d = p - L, f = p + L, Fi(o, u, d, c, f), r && t.includeOutlines && Gye(o, e); } else if (l && t.includeEdges) if (r && !a) { var z = 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 -= T, c += T, d -= T, f += T, Fi(o, u, d, c, f), z === "haystack") { var P = v.haystackPts; if (P && P.length === 2) { if (u = P[0].x, d = P[0].y, c = P[1].x, f = P[1].y, u > c) { var D = u; u = c, c = D; } if (d > f) { var M = d; d = f, f = M; } Fi(o, u - T, d - T, c + T, f + T); } } else if (z === "bezier" || z === "unbundled-bezier" || z.endsWith("segments") || z.endsWith("taxi")) { var V; switch (z) { case "bezier": case "unbundled-bezier": V = v.bezierPts; break; case "segments": case "taxi": case "round-segments": case "round-taxi": V = v.linePts; break; } if (V != null) for (var Q = 0; Q < V.length; Q++) { var X = V[Q]; u = X.x - T, c = X.x + T, d = X.y - T, f = X.y + T, Fi(o, u, d, c, f); } } } else { var ee = e.source(), ue = ee.position(), ve = e.target(), ge = ve.position(); if (u = ue.x, c = ge.x, d = ue.y, f = ge.y, u > c) { var se = u; u = c, c = se; } if (d > f) { var ne = d; d = f, f = ne; } u -= T, c += T, d -= T, f += T, Fi(o, u, d, c, f); } if (r && t.includeEdges && l && (o1(o, e, "mid-source"), o1(o, e, "mid-target"), o1(o, e, "source"), o1(o, e, "target")), r) { var W = e.pstyle("ghost").value === "yes"; if (W) { var Y = e.pstyle("ghost-offset-x").pfValue, re = e.pstyle("ghost-offset-y").pfValue; Fi(o, o.x1 + Y, o.y1 + re, o.x2 + Y, o.y2 + re); } } var we = i.bodyBounds = i.bodyBounds || {}; GT(we, o), dy(we, m), cy(we, 1), r && (u = o.x1, c = o.x2, d = o.y1, f = o.y2, Fi(o, u - S, d - S, c + S, f + S)); var Oe = i.overlayBounds = i.overlayBounds || {}; GT(Oe, o), dy(Oe, m), cy(Oe, 1); var Ne = i.labelBounds = i.labelBounds || {}; Ne.all != null ? hge(Ne.all) : Ne.all = ko(), r && t.includeLabels && (t.includeMainLabels && fk(o, e, null), l && (t.includeSourceLabels && fk(o, e, "source"), t.includeTargetLabels && fk(o, e, "target"))); } return o.x1 = Uo(o.x1), o.y1 = Uo(o.y1), o.x2 = Uo(o.x2), o.y2 = Uo(o.y2), o.w = Uo(o.x2 - o.x1), o.h = Uo(o.y2 - o.y1), o.w > 0 && o.h > 0 && y && (dy(o, m), cy(o, 1)), o; }, WD = function(e) { var t = 0, n = function(a) { return (a ? 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; }, KD = function(e) { if (e.isEdge()) { var t = e.source().position(), n = e.target().position(), r = function(a) { return Math.round(a); }; return P0e([r(t.x), r(t.y), r(n.x), r(n.y)]); } else return 0; }, g$ = function(e, t) { var n = e._private, r, a = e.isEdge(), o = t == null ? m$ : WD(t), i = o === m$, s = KD(e), l = n.bbCachePosKey === s, u = t.useCache && l, c = function(h) { return h._private.bbCache == null || h._private.styleDirty; }, d = !u || c(e) || a && c(e.source()) || c(e.target()); if (d ? (l || e.recalculateRenderedStyle(u), r = Xye(e, D0), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) { var f = e.isNode(); r = ko(), (t.includeNodes && f || t.includeEdges && !f) && (t.includeOverlays ? Nc(r, n.overlayBounds) : Nc(r, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!a || t.includeSourceLabels && t.includeTargetLabels) ? Nc(r, n.labelBounds.all) : (t.includeMainLabels && Nc(r, n.labelBounds.mainRot), t.includeSourceLabels && Nc(r, n.labelBounds.sourceRot), t.includeTargetLabels && Nc(r, n.labelBounds.targetRot))), r.w = r.x2 - r.x1, r.h = r.y2 - r.y1; } return r; }, D0 = { includeNodes: !0, includeEdges: !0, includeLabels: !0, includeMainLabels: !0, includeSourceLabels: !0, includeTargetLabels: !0, includeOverlays: !0, includeUnderlays: !0, includeOutlines: !0, useCache: !0 }, m$ = WD(D0), y$ = ba(D0); uc.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 = D0 : e = y$(e), t = g$(this[0], e); else { t = ko(), e = e || D0; var n = y$(e), r = this, a = r.cy(), o = a.styleEnabled(); if (o) for (var i = 0; i < r.length; i++) { var s = r[i], l = s._private, u = KD(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]; Nc(t, g$(h, n)); } } return t.x1 = Uo(t.x1), t.y1 = Uo(t.y1), t.x2 = Uo(t.x2), t.y2 = Uo(t.y2), t.w = Uo(t.x2 - t.x1), t.h = Uo(t.y2 - t.y1), t; }; uc.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; }; uc.boundingBoxAt = function(e) { var t = this.nodes(), n = this.cy(), r = n.hasCompoundNodes(), a = n.collection(); if (r && (a = t.filter(function(u) { return u.isParent(); }), t = t.not(a)), Cn(e)) { var o = e; e = function() { return o; }; } 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 && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)); var l = fge(this.boundingBox({ useCache: !1 })); return t.silentPositions(s), r && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)), n.endBatch(), l; }; uf.boundingbox = uf.bb = uf.boundingBox; uf.renderedBoundingbox = uf.renderedBoundingBox; var Yye = uc, Nv, Xg; Nv = Xg = {}; var GD = function(e) { e.uppercaseName = jT(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = jT(e.outerName), Nv[e.name] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { if (t.isParent()) return t.updateCompoundBounds(), n[e.autoName] || 0; var o = t.pstyle(e.name); switch (o.strValue) { case "label": return t.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0; default: return o.pfValue; } } else return 1; }, Nv["outer" + e.uppercaseName] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { var o = t[e.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding(); return o + i + s; } else return 1; }, Nv["rendered" + e.uppercaseName] = function() { var t = this[0]; if (t) { var n = t[e.name](); return n * this.cy().zoom(); } }, Nv["rendered" + e.uppercaseOuterName] = function() { var t = this[0]; if (t) { var n = t[e.outerName](); return n * this.cy().zoom(); } }; }; GD({ name: "width" }); GD({ name: "height" }); Xg.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; }; Xg.paddedHeight = function() { var e = this[0]; return e.height() + 2 * e.padding(); }; Xg.paddedWidth = function() { var e = this[0]; return e.width() + 2 * e.padding(); }; var Zye = Xg, Qye = function(e, t) { if (e.isEdge()) return t(e); }, Jye = function(e, t) { if (e.isEdge()) { var n = e.cy(); return ew(t(e), n.zoom(), n.pan()); } }, ebe = function(e, t) { if (e.isEdge()) { var n = e.cy(), r = n.pan(), a = n.zoom(); return t(e).map(function(o) { return ew(o, a, r); }); } }, tbe = function(e) { return e.renderer().getControlPoints(e); }, nbe = function(e) { return e.renderer().getSegmentPoints(e); }, rbe = function(e) { return e.renderer().getSourceEndpoint(e); }, abe = function(e) { return e.renderer().getTargetEndpoint(e); }, obe = function(e) { return e.renderer().getEdgeMidpoint(e); }, b$ = { controlPoints: { get: tbe, mult: !0 }, segmentPoints: { get: nbe, mult: !0 }, sourceEndpoint: { get: rbe }, targetEndpoint: { get: abe }, midpoint: { get: obe } }, ibe = function(e) { return "rendered" + e[0].toUpperCase() + e.substr(1); }, sbe = Object.keys(b$).reduce(function(e, t) { var n = b$[t], r = ibe(t); return e[t] = function() { return Qye(this, n.get); }, n.mult ? e[r] = function() { return ebe(this, n.get); } : e[r] = function() { return Jye(this, n.get); }, e; }, {}), lbe = At({}, Kye, Yye, Zye, sbe); /*! 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 XD = function(e, t) { this.recycle(e, t); }; function lv() { return !1; } function i1() { return !0; } XD.prototype = { instanceString: function() { return "event"; }, recycle: function(e, t) { if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = lv, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? i1 : lv) : 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(), a = this.cy.pan(); this.renderedPosition = { x: n.x * r + a.x, y: n.y * r + a.y }; } this.timeStamp = e && e.timeStamp || Date.now(); }, preventDefault: function() { this.isDefaultPrevented = i1; var e = this.originalEvent; e && e.preventDefault && e.preventDefault(); }, stopPropagation: function() { this.isPropagationStopped = i1; var e = this.originalEvent; e && e.stopPropagation && e.stopPropagation(); }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = i1, this.stopPropagation(); }, isDefaultPrevented: lv, isPropagationStopped: lv, isImmediatePropagationStopped: lv }; var YD = /^([^.]+)(\.(?:[^.]+))?$/, ube = ".*", ZD = { 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 }, w$ = Object.keys(ZD), cbe = {}; function iw() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : cbe, t = arguments.length > 1 ? arguments[1] : void 0, n = 0; n < w$.length; n++) { var r = w$[n]; this[r] = e[r] || ZD[r]; } this.context = t || this.context, this.listeners = [], this.emitting = 0; } var Wu = iw.prototype, QD = function(e, t, n, r, a, o, i) { ir(r) && (a = r, r = null), i && (o == null ? o = i : o = At({}, o, i)); for (var s = zn(n) ? n : n.split(/\s+/), l = 0; l < s.length; l++) { var u = s[l]; if (!ju(u)) { var c = u.match(YD); if (c) { var d = c[1], f = c[2] ? c[2] : null, h = t(e, u, d, f, r, a, o); if (h === !1) break; } } } }, x$ = function(e, t) { return e.addEventFields(e.context, t), new XD(t.type, t); }, dbe = function(e, t, n) { if (Ove(n)) { t(e, n); return; } else if (Cn(n)) { t(e, x$(e, n)); return; } for (var r = zn(n) ? n : n.split(/\s+/), a = 0; a < r.length; a++) { var o = r[a]; if (!ju(o)) { var i = o.match(YD); if (i) { var s = i[1], l = i[2] ? i[2] : null, u = x$(e, { type: s, namespace: l, target: e.context }); t(e, u); } } } }; Wu.on = Wu.addListener = function(e, t, n, r, a) { return QD(this, function(o, i, s, l, u, c, d) { ir(c) && o.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, a), this; }; Wu.one = function(e, t, n, r) { return this.on(e, t, n, r, { one: !0 }); }; Wu.removeListener = Wu.off = function(e, t, n, r) { var a = this; this.emitting !== 0 && (this.listeners = z0e(this.listeners)); for (var o = this.listeners, i = function(l) { var u = o[l]; QD(a, 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 o.splice(l, 1), !1; }, e, t, n, r); }, s = o.length - 1; s >= 0; s--) i(s); return this; }; Wu.removeAllListeners = function() { return this.removeListener("*"); }; Wu.emit = Wu.trigger = function(e, t, n) { var r = this.listeners, a = r.length; return this.emitting++, zn(t) || (t = [t]), dbe(this, function(o, i) { n != null && (r = [{ event: i.event, type: i.type, namespace: i.namespace, callback: n }], a = r.length); for (var s = function(u) { var c = r[u]; if (c.type === i.type && (!c.namespace || c.namespace === i.namespace || c.namespace === ube) && o.eventMatches(o.context, c, i)) { var d = [i]; t != null && j0e(d, t), o.beforeEmit(o.context, c, i), c.conf && c.conf.one && (o.listeners = o.listeners.filter(function(p) { return p !== c; })); var f = o.callbackContext(o.context, c, i), h = c.callback.apply(f, d); o.afterEmit(o.context, c, i), h === !1 && (i.stopPropagation(), i.preventDefault()); } }, l = 0; l < a; l++) s(l); o.bubble(o.context) && !i.isPropagationStopped() && o.parent(o.context).emit(i, t); }, e), this.emitting--, this; }; var pbe = { 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 && Wg(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(); } }, s1 = function(e) { return kt(e) ? new Uu(e) : e; }, JD = { createEmitter: function() { for (var e = 0; e < this.length; e++) { var t = this[e], n = t._private; n.emitter || (n.emitter = new iw(pbe, t)); } return this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { for (var r = s1(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().on(e, r, n); } return this; }, removeListener: function(e, t, n) { for (var r = s1(t), a = 0; a < this.length; a++) { var o = this[a]; o.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 = s1(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().one(e, r, n); } return this; }, once: function(e, t, n) { for (var r = s1(t), a = 0; a < this.length; a++) { var o = this[a]; o.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; } }; $n.eventAliasesOn(JD); var eB = { 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 (kt(e) || Ao(e)) return new Uu(e).filter(this); if (ir(e)) { for (var n = this.spawn(), r = this, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); i && n.push(o); } return n; } return this.spawn(); }, not: function(e) { if (e) { kt(e) && (e = this.filter(e)); for (var t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n], a = e.has(r); a || t.push(r); } return t; } else return this; }, absoluteComplement: function() { var e = this.cy(); return e.mutableElements().not(this); }, intersect: function(e) { if (kt(e)) { var t = e; return this.filter(t); } for (var n = this.spawn(), r = this, a = e, o = this.length < e.length, i = o ? r : a, s = o ? a : 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; kt(e) && (e = t.$(e)); var n = this.spawn(), r = this, a = e, o = 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 o(r, a), o(a, r), n; }, diff: function(e) { var t = this._private.cy; kt(e) && (e = t.$(e)); var n = this.spawn(), r = this.spawn(), a = this.spawn(), o = 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 ? a.merge(f) : c.push(f); } }; return s(o, i, n), s(i, o, r), { left: n, right: r, both: a }; }, add: function(e) { var t = this._private.cy; if (!e) return this; if (kt(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = this.spawnSelf(), a = 0; a < e.length; a++) { var o = e[a], i = !this.has(o); i && r.push(o); } return r; }, // in place merge on calling collection merge: function(e) { var t = this._private, n = t.cy; if (!e) return this; if (e && kt(e)) { var r = e; e = n.mutableElements().filter(r); } for (var a = t.map, o = 0; o < e.length; o++) { var i = e[o], s = i._private.data.id, l = !a.has(s); if (l) { var u = this.length++; this[u] = i, a.set(s, { ele: i, index: u }); } } return this; }, unmergeAt: function(e) { var t = this[e], n = t.id(), r = this._private, a = r.map; this[e] = void 0, a.delete(n); var o = e === this.length - 1; if (this.length > 1 && !o) { var i = this.length - 1, s = this[i], l = s._private.data.id; this[i] = void 0, this[e] = s, a.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, a = r.get(n); if (!a) return this; var o = a.index; return this.unmergeAt(o), this; }, // remove eles in place on calling collection unmerge: function(e) { var t = this._private.cy; if (!e) return this; if (e && kt(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, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); n.push(i); } return n; }, reduce: function(e, t) { for (var n = t, r = this, a = 0; a < r.length; a++) n = e(n, r[a], a, r); return n; }, max: function(e, t) { for (var n = -1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s > n && (n = s, r = i); } return { value: n, ele: r }; }, min: function(e, t) { for (var n = 1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s < n && (n = s, r = i); } return { value: n, ele: r }; } }, xn = eB; xn.u = xn["|"] = xn["+"] = xn.union = xn.or = xn.add; xn["\\"] = xn["!"] = xn["-"] = xn.difference = xn.relativeComplement = xn.subtract = xn.not; xn.n = xn["&"] = xn["."] = xn.and = xn.intersection = xn.intersect; xn["^"] = xn["(+)"] = xn["(-)"] = xn.symmetricDifference = xn.symdiff = xn.xor; xn.fnFilter = xn.filterFn = xn.stdFilter = xn.filter; xn.complement = xn.abscomp = xn.absoluteComplement; var fbe = { 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; } }, tB = function(e, t) { var n = e.cy(), r = n.hasCompoundNodes(); function a(u) { var c = u.pstyle("z-compound-depth"); return c.value === "auto" ? r ? u.zDepth() : 0 : c.value === "bottom" ? -1 : c.value === "top" ? X4 : 0; } var o = a(e) - a(t); if (o !== 0) return o; 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(); }, hb = { forEach: function(e, t) { if (ir(e)) for (var n = this.length, r = 0; r < n; r++) { var a = this[r], o = t ? e.apply(t, [a, r, this]) : e(a, r, this); if (o === !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 a = e; a >= 0 && a < t && a < r; a++) n.push(this[a]); 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 (!ir(e)) return this; var t = this.toArray().sort(e); return this.spawn(t); }, sortByZIndex: function() { return this.sort(tB); }, 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 : X4 - 1; } else { var a = t.source, o = t.target, i = a.zDepth(), s = o.zDepth(); return Math.max(i, s, 0); } } } }; hb.each = hb.forEach; var hbe = function() { var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : Rr(Symbol)) != e && Rr(Symbol.iterator) != e; t && (hb[Symbol.iterator] = function() { var n = this, r = { value: void 0, done: !1 }, a = 0, o = this.length; return QM({ next: function() { return a < o ? r.value = n[a++] : (r.value = void 0, r.done = !0), r; } }, Symbol.iterator, function() { return this; }); }); }; hbe(); var vbe = ba({ nodeDimensionsIncludeLabels: !1 }), fy = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e) { e = vbe(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(w) { return !w.isParent(); }), a = this.cy(), o = t.eles, i = function(w) { return w.id(); }, s = O0(n, i); e.emit({ type: "layoutstart", layout: e }), e.animations = []; var l = function(w, k, C) { var S = { x: k.x1 + k.w / 2, y: k.y1 + k.h / 2 }, _ = { // scale from center of bounding box (not necessarily 0,0) x: (C.x - S.x) * w, y: (C.y - S.y) * w }; return { x: S.x + _.x, y: S.y + _.y }; }, u = t.spacingFactor && t.spacingFactor !== 1, c = function() { if (!u) return null; for (var w = ko(), k = 0; k < r.length; k++) { var C = r[k], S = s(C, k); gge(w, S.x, S.y); } return w; }, d = c(), f = O0(function(w, k) { var C = s(w, k); if (u) { var S = Math.abs(t.spacingFactor); C = l(S, d, C); } return t.transform != null && (C = t.transform(w, C)), C; }, 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 y = a.animation({ fit: { boundingBox: o.boundingBoxAt(f), padding: t.padding }, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(y); } else if (t.zoom !== void 0 && t.pan !== void 0) { var x = a.animation({ zoom: t.zoom, pan: t.pan, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(x); } e.animations.forEach(function(w) { return w.play(); }), e.one("layoutready", t.ready), e.emit({ type: "layoutready", layout: e }), mh.all(e.animations.map(function(w) { return w.promise(); })).then(function() { e.one("layoutstop", t.stop), e.emit({ type: "layoutstop", layout: e }); }); } else r.positions(f), t.fit && a.fit(t.eles, t.padding), t.zoom != null && a.zoom(t.zoom), t.pan && a.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(At({}, e, { eles: this })); } }; fy.createLayout = fy.makeLayout = fy.layout; function nB(e, t, n) { var r = n._private, a = r.styleCache = r.styleCache || [], o; return (o = a[e]) != null || (o = a[e] = t(n)), o; } function sw(e, t) { return e = xd(e), function(n) { return nB(e, t, n); }; } function lw(e, t) { e = xd(e); var n = function(r) { return t.call(r); }; return function() { var r = this[0]; if (r) return nB(e, n, r); }; } var ca = { 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(), a = this; e = !!(e || e === void 0), r && (a = this.spawnSelf().merge(this.descendants()).merge(this.parents())); var o = a; return e ? o.emitAndNotify("style") : o.emit("style"), a.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 a = n._private.style[e]; return a ?? (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, a = n.style(); if (Cn(e)) { var o = e; a.applyBypass(this, o, r), this.emitAndNotify("style"); } else if (kt(e)) if (t === void 0) { var i = this[0]; return i ? a.getStylePropertyValue(i, e) : void 0; } else a.applyBypass(this, e, t, r), this.emitAndNotify("style"); else if (e === void 0) { var s = this[0]; return s ? a.getRawStyle(s) : void 0; } return this; }, removeStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = !1, r = t.style(), a = this; if (e === void 0) for (var o = 0; o < a.length; o++) { var i = a[o]; r.removeAllBypasses(i, n); } else { e = e.split(/\s+/); for (var s = 0; s < a.length; s++) { var l = a[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, a = n.pstyle("opacity").value; if (!t) return a; var o = r.data.parent ? n.parents() : null; if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.pstyle("opacity").value; a = l * a; } return a; } }, 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 hk(e, t) { var n = e._private, r = n.data.parent ? e.parents() : null; if (r) for (var a = 0; a < r.length; a++) { var o = r[a]; if (!t(o)) return !1; } return !0; } function sS(e) { var t = e.ok, n = e.edgeOkViaNode || e.ok, r = e.parentOk || e.ok; return function() { var a = this.cy(); if (!a.styleEnabled()) return !0; var o = this[0], i = a.hasCompoundNodes(); if (o) { var s = o._private; if (!t(o)) return !1; if (o.isNode()) return !i || hk(o, r); var l = s.source, u = s.target; return n(l) && (!i || hk(l, n)) && (l === u || n(u) && (!i || hk(u, n))); } }; } var xh = sw("eleTakesUpSpace", function(e) { return e.pstyle("display").value === "element" && e.width() !== 0 && (e.isNode() ? e.height() !== 0 : !0); }); ca.takesUpSpace = lw("takesUpSpace", sS({ ok: xh })); var gbe = sw("eleInteractive", function(e) { return e.pstyle("events").value === "yes" && e.pstyle("visibility").value === "visible" && xh(e); }), mbe = sw("parentInteractive", function(e) { return e.pstyle("visibility").value === "visible" && xh(e); }); ca.interactive = lw("interactive", sS({ ok: gbe, parentOk: mbe, edgeOkViaNode: xh })); ca.noninteractive = function() { var e = this[0]; if (e) return !e.interactive(); }; var ybe = sw("eleVisible", function(e) { return e.pstyle("visibility").value === "visible" && e.pstyle("opacity").pfValue !== 0 && xh(e); }), bbe = xh; ca.visible = lw("visible", sS({ ok: ybe, edgeOkViaNode: bbe })); ca.hidden = function() { var e = this[0]; if (e) return !e.visible(); }; ca.isBundledBezier = lw("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; }); ca.bypass = ca.css = ca.style; ca.renderedCss = ca.renderedStyle; ca.removeBypass = ca.removeCss = ca.removeStyle; ca.pstyle = ca.parsedStyle; var Nu = {}; function k$(e) { return function() { var t = arguments, n = []; if (t.length === 2) { var r = t[0], a = t[1]; this.on(e.event, r, a); } else if (t.length === 1 && ir(t[0])) { var o = t[0]; this.on(e.event, o); } else if (t.length === 0 || t.length === 1 && zn(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 kh(e) { Nu[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]; } }, Nu[e.on] = k$({ event: e.on, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !0 }), Nu[e.off] = k$({ event: e.off, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !1 }); } kh({ field: "locked", overrideField: function(e) { return e.cy().autolock() ? !0 : void 0; }, on: "lock", off: "unlock" }); kh({ field: "grabbable", overrideField: function(e) { return e.cy().autoungrabify() || e.pannable() ? !1 : void 0; }, on: "grabify", off: "ungrabify" }); kh({ field: "selected", ableField: "selectable", overrideAble: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "select", off: "unselect" }); kh({ field: "selectable", overrideField: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "selectify", off: "unselectify" }); Nu.deselect = Nu.unselect; Nu.grabbed = function() { var e = this[0]; if (e) return e._private.grabbed; }; kh({ field: "active", on: "activate", off: "unactivate" }); kh({ field: "pannable", on: "panify", off: "unpanify" }); Nu.inactive = function() { var e = this[0]; if (e) return !e._private.active; }; var La = {}, C$ = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) { for (var i = !1, s = o.connectedEdges(), l = 0; l < s.length; l++) { var u = s[l], c = u.source(), d = u.target(); if (e.noIncomingEdges && d === o && c !== o || e.noOutgoingEdges && c === o && d !== o) { i = !0; break; } } i || r.push(o); } } return this.spawn(r, !0).filter(t); }; }, S$ = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) for (var i = o.connectedEdges(), s = 0; s < i.length; s++) { var l = i[s], u = l.source(), c = l.target(); e.outgoing && u === o ? (r.push(l), r.push(c)) : e.incoming && c === o && (r.push(l), r.push(u)); } } return this.spawn(r, !0).filter(t); }; }, E$ = function(e) { return function(t) { for (var n = this, r = [], a = {}; ; ) { var o = e.outgoing ? n.outgoers() : n.incomers(); if (o.length === 0) break; for (var i = !1, s = 0; s < o.length; s++) { var l = o[s], u = l.id(); a[u] || (a[u] = !0, r.push(l), i = !0); } if (!i) break; n = o; } return this.spawn(r, !0).filter(t); }; }; La.clearTraversalCache = function() { for (var e = 0; e < this.length; e++) this[e]._private.traversalCache = null; }; At(La, { // get the root nodes in the DAG roots: C$({ noIncomingEdges: !0 }), // get the leaf nodes in the DAG leaves: C$({ noOutgoingEdges: !0 }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: Xo(S$({ outgoing: !0 }), "outgoers"), // aka DAG descendants successors: E$({ outgoing: !0 }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: Xo(S$({ incoming: !0 }), "incomers"), // aka DAG ancestors predecessors: E$({ incoming: !0 }) }); At(La, { neighborhood: Xo(function(e) { for (var t = [], n = this.nodes(), r = 0; r < n.length; r++) for (var a = n[r], o = a.connectedEdges(), i = 0; i < o.length; i++) { var s = o[i], l = s.source(), u = s.target(), c = a === 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); } }); La.neighbourhood = La.neighborhood; La.closedNeighbourhood = La.closedNeighborhood; La.openNeighbourhood = La.openNeighborhood; At(La, { source: Xo(function(e) { var t = this[0], n; return t && (n = t._private.source || t.cy().collection()), n && e ? n.filter(e) : n; }, "source"), target: Xo(function(e) { var t = this[0], n; return t && (n = t._private.target || t.cy().collection()), n && e ? n.filter(e) : n; }, "target"), sources: _$({ attr: "source" }), targets: _$({ attr: "target" }) }); function _$(e) { return function(t) { for (var n = [], r = 0; r < this.length; r++) { var a = this[r], o = a._private[e.attr]; o && n.push(o); } return this.spawn(n, !0).filter(t); }; } At(La, { edgesWith: Xo(T$(), "edgesWith"), edgesTo: Xo(T$({ thisIsSrc: !0 }), "edgesTo") }); function T$(e) { return function(t) { var n = [], r = this._private.cy, a = e || {}; kt(t) && (t = r.$(t)); for (var o = 0; o < t.length; o++) for (var i = t[o]._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 && ((a.thisIsSrc || a.thisIsTgt) && (a.thisIsSrc && !c || a.thisIsTgt && !d) || n.push(l)); } return this.spawn(n, !0); }; } At(La, { connectedEdges: Xo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; if (a.isNode()) for (var o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; t.push(s); } } return this.spawn(t, !0).filter(e); }, "connectedEdges"), connectedNodes: Xo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; a.isEdge() && (t.push(a.source()[0]), t.push(a.target()[0])); } return this.spawn(t, !0).filter(e); }, "connectedNodes"), parallelEdges: Xo($$(), "parallelEdges"), codirectedEdges: Xo($$({ codirected: !0 }), "codirectedEdges") }); function $$(e) { var t = { codirected: !1 }; return e = At({}, t, e), function(n) { for (var r = [], a = this.edges(), o = e, i = 0; i < a.length; i++) for (var s = a[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, y = m === d && g === c, x = c === m && d === g; (o.codirected && y || !o.codirected && (y || x)) && r.push(p); } return this.spawn(r, !0).filter(n); }; } At(La, { components: function(e) { var t = this, n = t.cy(), r = n.collection(), a = e == null ? t.nodes() : e.nodes(), o = []; e != null && a.empty() && (a = e.sources()); var i = function(l, u) { r.merge(l), a.unmerge(l), u.merge(l); }; if (a.empty()) return t.spawn(); var s = function() { var l = n.collection(); o.push(l); var u = a[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 (a.length > 0); return o; }, component: function() { var e = this[0]; return e.cy().mutableElements().components(e)[0]; } }); La.componentsOf = La.components; var da = 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) { pr("A collection must have a reference to the core"); return; } var a = new ds(), o = !1; if (!t) t = []; else if (t.length > 0 && Cn(t[0]) && !Wg(t[0])) { o = !0; for (var i = [], s = new gh(), 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 = vD(); else if (e.hasElementWithId(d.id) || s.has(d.id)) continue; var f = new J2(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 || !a.has(m)) && (n && a.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 ds(), y = this.eles, x = 0; x < y.length; x++) { var w = y[x]; g.set(w.id(), { index: x, ele: w }); } } }, n && (this._private.map = a), o && !r && this.restore(); }, Gn = J2.prototype = da.prototype = Object.create(Array.prototype); Gn.instanceString = function() { return "collection"; }; Gn.spawn = function(e, t) { return new da(this.cy(), e, t); }; Gn.spawnSelf = function() { return this.spawn(this); }; Gn.cy = function() { return this._private.cy; }; Gn.renderer = function() { return this._private.cy.renderer(); }; Gn.element = function() { return this[0]; }; Gn.collection = function() { return nD(this) ? this : new da(this._private.cy, [this]); }; Gn.unique = function() { return new da(this._private.cy, this, !0); }; Gn.hasElementWithId = function(e) { return e = "" + e, this._private.map.has(e); }; Gn.getElementById = function(e) { e = "" + e; var t = this._private.cy, n = this._private.map.get(e); return n ? n.ele : new da(t); }; Gn.$id = Gn.getElementById; Gn.poolIndex = function() { var e = this._private.cy, t = e._private.elements, n = this[0]._private.data.id; return t._private.map.get(n).index; }; Gn.indexOf = function(e) { var t = e[0]._private.data.id; return this._private.map.get(t).index; }; Gn.indexOfId = function(e) { return e = "" + e, this._private.map.get(e).index; }; Gn.json = function(e) { var t = this.element(), n = this.cy(); if (t == null && e) return this; if (t != null) { var r = t._private; if (Cn(e)) { if (n.startBatch(), e.data) { t.data(e.data); var a = r.data; if (t.isEdge()) { var o = !1, i = {}, s = e.data.source, l = e.data.target; s != null && s != a.source && (i.source = "" + s, o = !0), l != null && l != a.target && (i.target = "" + l, o = !0), o && (t = t.move(i)); } else { var u = "parent" in e.data, c = e.data.parent; u && (c != null || a.parent != null) && c != a.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: cs(r.data), position: cs(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; } } }; Gn.jsons = function() { for (var e = [], t = 0; t < this.length; t++) { var n = this[t], r = n.json(); e.push(r); } return e; }; Gn.clone = function() { for (var e = this.cy(), t = [], n = 0; n < this.length; n++) { var r = this[n], a = r.json(), o = new J2(e, a, !1); t.push(o); } return new da(e, t); }; Gn.copy = Gn.clone; Gn.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(), a = r._private, o = [], i = [], s, l = 0, u = n.length; l < u; l++) { var c = n[l]; t && !c.removed() || (c.isNode() ? o.push(c) : i.push(c)); } s = o.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 = vD(); else if (ot(v.id)) v.id = "" + v.id; else if (ju(v.id) || !kt(v.id)) { pr("Can not create element with invalid string ID `" + v.id + "`"), f(); continue; } else if (r.hasElementWithId(v.id)) { pr("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 y = h, x = ["source", "target"], w = x.length, k = !1, C = 0; C < w; C++) { var S = x[C], _ = v[S]; ot(_) && (_ = v[S] = "" + v[S]), _ == null || _ === "" ? (pr("Can not create edge `" + m + "` with unspecified " + S), k = !0) : r.hasElementWithId(_) || (pr("Can not create edge `" + m + "` with nonexistant " + S + " `" + _ + "`"), k = !0); } if (k) { f(); continue; } var T = r.getElementById(v.source), F = r.getElementById(v.target); T.same(F) ? T._private.edges.push(y) : (T._private.edges.push(y), F._private.edges.push(y)), y._private.source = T, y._private.target = F; } p.map = new ds(), p.map.set(m, { ele: h, index: 0 }), p.removed = !1, t && r.addToPool(h); } for (var A = 0; A < o.length; A++) { var I = o[A], N = I._private.data; ot(N.parent) && (N.parent = "" + N.parent); var L = N.parent, z = L != null; if (z || I._private.parent) { var P = I._private.parent ? r.collection().merge(I._private.parent) : r.getElementById(L); if (P.empty()) N.parent = void 0; else if (P[0].removed()) Fn("Node added with missing parent, reference to parent removed"), N.parent = void 0, I._private.parent = null; else { for (var D = !1, M = P; !M.empty(); ) { if (I.same(M)) { D = !0, N.parent = void 0; break; } M = M.parent(); } D || (P[0]._private.children.push(I), I._private.parent = P[0], a.hasCompoundNodes = !0); } } } if (s.length > 0) { for (var V = s.length === n.length ? n : new da(r, s), Q = 0; Q < V.length; Q++) { var X = V[Q]; X.isNode() || (X.parallelEdges().clearTraversalCache(), X.source().clearTraversalCache(), X.target().clearTraversalCache()); } var ee; a.hasCompoundNodes ? ee = r.collection().merge(V).merge(V.connectedNodes()).merge(V.parent()) : ee = V, ee.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e), e ? V.emitAndNotify("add") : t && V.emit("add"); } return n; }; Gn.removed = function() { var e = this[0]; return e && e._private.removed; }; Gn.inside = function() { var e = this[0]; return e && !e._private.removed; }; Gn.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 = [], a = {}, o = n._private.cy; function i(L) { for (var z = L._private.edges, P = 0; P < z.length; P++) l(z[P]); } function s(L) { for (var z = L._private.children, P = 0; P < z.length; P++) l(z[P]); } function l(L) { var z = a[L.id()]; t && L.removed() || z || (a[L.id()] = !0, L.isNode() ? (r.push(L), i(L), s(L)) : r.unshift(L)); } for (var u = 0, c = n.length; u < c; u++) { var d = n[u]; l(d); } function f(L, z) { var P = L._private.edges; Hu(P, z), L.clearTraversalCache(); } function h(L) { L.clearTraversalCache(); } var p = []; p.ids = {}; function v(L, z) { z = z[0], L = L[0]; var P = L._private.children, D = L.id(); Hu(P, z), z._private.parent = null, p.ids[D] || (p.ids[D] = !0, p.push(L)); } n.dirtyCompoundBoundsCache(), t && o.removeFromPool(r); for (var m = 0; m < r.length; m++) { var g = r[m]; if (g.isEdge()) { var y = g.source()[0], x = g.target()[0]; f(y, g), f(x, g); for (var w = g.parallelEdges(), k = 0; k < w.length; k++) { var C = w[k]; h(C), C.isBundledBezier() && C.dirtyBoundingBoxCache(); } } else { var S = g.parent(); S.length !== 0 && v(S, g); } t && (g._private.removed = !0); } var _ = o._private.elements; o._private.hasCompoundNodes = !1; for (var T = 0; T < _.length; T++) { var F = _[T]; if (F.isParent()) { o._private.hasCompoundNodes = !0; break; } } var A = new da(this.cy(), r); A.size() > 0 && (e ? A.emitAndNotify("remove") : t && A.emit("remove")); for (var I = 0; I < p.length; I++) { var N = p[I]; (!t || !N.removed()) && N.updateStyle(); } return A; }; Gn.move = function(e) { var t = this._private.cy, n = this, r = !1, a = !1, o = function(h) { return h == null ? h : "" + h; }; if (e.source !== void 0 || e.target !== void 0) { var i = o(e.source), s = o(e.target), l = i != null && t.hasElementWithId(i), u = s != null && t.hasElementWithId(s); (l || u) && (t.batch(function() { n.remove(r, a), 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, a); }), n.emitAndNotify("move")); } else if (e.parent !== void 0) { var c = o(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, a); 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, a); }), n.emitAndNotify("move"); } } return this; }; [$D, Fye, py, Lu, Nf, Wye, ow, lbe, JD, eB, fbe, hb, fy, ca, Nu, La].forEach(function(e) { At(Gn, e); }); var wbe = { add: function(e) { var t, n = this; if (Ao(e)) { var r = e; if (r._private.cy === n) t = r.restore(); else { for (var a = [], o = 0; o < r.length; o++) { var i = r[o]; a.push(i.json()); } t = new da(n, a); } } else if (zn(e)) { var s = e; t = new da(n, s); } else if (Cn(e) && (zn(e.nodes) || zn(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 (zn(p)) for (var v = 0, m = p.length; v < m; v++) { var g = At({ group: h }, p[v]); u.push(g); } } t = new da(n, u); } else { var y = e; t = new J2(n, y).collection(); } return t; }, remove: function(e) { if (!Ao(e) && kt(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 xbe(e, t, n, r) { var a = 4, o = 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, A) { return 1 - 3 * A + 3 * F; } function p(F, A) { return 3 * A - 6 * F; } function v(F) { return 3 * F; } function m(F, A, I) { return ((h(A, I) * F + p(A, I)) * F + v(A)) * F; } function g(F, A, I) { return 3 * h(A, I) * F * F + 2 * p(A, I) * F + v(A); } function y(F, A) { for (var I = 0; I < a; ++I) { var N = g(A, e, n); if (N === 0) return A; var L = m(A, e, n) - F; A -= L / N; } return A; } function x() { for (var F = 0; F < l; ++F) f[F] = m(F * u, e, n); } function w(F, A, I) { var N, L, z = 0; do L = A + (I - A) / 2, N = m(L, e, n) - F, N > 0 ? I = L : A = L; while (Math.abs(N) > i && ++z < s); return L; } function k(F) { for (var A = 0, I = 1, N = l - 1; I !== N && f[I] <= F; ++I) A += u; --I; var L = (F - f[I]) / (f[I + 1] - f[I]), z = A + L * u, P = g(z, e, n); return P >= o ? y(F, z) : P === 0 ? z : w(F, A, A + u); } var C = !1; function S() { C = !0, (e !== t || n !== r) && x(); } var _ = function(F) { return C || S(), e === t && n === r ? F : F === 0 ? 0 : F === 1 ? 1 : m(k(F), t, r); }; _.getControlPoints = function() { return [{ x: e, y: t }, { x: n, y: r }]; }; var T = "generateBezier(" + [e, t, n, r] + ")"; return _.toString = function() { return T; }, _; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ var kbe = /* @__PURE__ */ function() { function e(r) { return -r.tension * r.x - r.friction * r.v; } function t(r, a, o) { var i = { x: r.x + o.dx * a, v: r.v + o.dv * a, tension: r.tension, friction: r.friction }; return { dx: i.v, dv: e(i) }; } function n(r, a) { var o = { dx: r.v, dv: e(r) }, i = t(r, a * 0.5, o), s = t(r, a * 0.5, i), l = t(r, a, s), u = 1 / 6 * (o.dx + 2 * (i.dx + s.dx) + l.dx), c = 1 / 6 * (o.dv + 2 * (i.dv + s.dv) + l.dv); return r.x = r.x + u * a, r.v = r.v + c * a, r; } return function r(a, o, 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 (a = parseFloat(a) || 500, o = parseFloat(o) || 20, i = i || null, s.tension = a, s.friction = o, f = i !== null, f ? (u = r(a, o), 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; }; }(), Un = function(e, t, n, r) { var a = xbe(e, t, n, r); return function(o, i, s) { return o + (i - o) * a(s); }; }, hy = { linear: function(e, t, n) { return e + (t - e) * n; }, // default easings ease: Un(0.25, 0.1, 0.25, 1), "ease-in": Un(0.42, 0, 1, 1), "ease-out": Un(0, 0, 0.58, 1), "ease-in-out": Un(0.42, 0, 0.58, 1), // sine "ease-in-sine": Un(0.47, 0, 0.745, 0.715), "ease-out-sine": Un(0.39, 0.575, 0.565, 1), "ease-in-out-sine": Un(0.445, 0.05, 0.55, 0.95), // quad "ease-in-quad": Un(0.55, 0.085, 0.68, 0.53), "ease-out-quad": Un(0.25, 0.46, 0.45, 0.94), "ease-in-out-quad": Un(0.455, 0.03, 0.515, 0.955), // cubic "ease-in-cubic": Un(0.55, 0.055, 0.675, 0.19), "ease-out-cubic": Un(0.215, 0.61, 0.355, 1), "ease-in-out-cubic": Un(0.645, 0.045, 0.355, 1), // quart "ease-in-quart": Un(0.895, 0.03, 0.685, 0.22), "ease-out-quart": Un(0.165, 0.84, 0.44, 1), "ease-in-out-quart": Un(0.77, 0, 0.175, 1), // quint "ease-in-quint": Un(0.755, 0.05, 0.855, 0.06), "ease-out-quint": Un(0.23, 1, 0.32, 1), "ease-in-out-quint": Un(0.86, 0, 0.07, 1), // expo "ease-in-expo": Un(0.95, 0.05, 0.795, 0.035), "ease-out-expo": Un(0.19, 1, 0.22, 1), "ease-in-out-expo": Un(1, 0, 0, 1), // circ "ease-in-circ": Un(0.6, 0.04, 0.98, 0.335), "ease-out-circ": Un(0.075, 0.82, 0.165, 1), "ease-in-out-circ": Un(0.785, 0.135, 0.15, 0.86), // user param easings... spring: function(e, t, n) { if (n === 0) return hy.linear; var r = kbe(e, t, n); return function(a, o, i) { return a + (o - a) * r(i); }; }, "cubic-bezier": Un }; function O$(e, t, n, r, a) { if (r === 1 || t === n) return n; var o = a(t, n, r); return e == null || ((e.roundValue || e.color) && (o = Math.round(o)), e.min !== void 0 && (o = Math.max(o, e.min)), e.max !== void 0 && (o = Math.min(o, e.max))), o; } function F$(e, t) { return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e; } function Tp(e, t, n, r, a) { var o = a != null ? a.type : null; n < 0 ? n = 0 : n > 1 && (n = 1); var i = F$(e, a), s = F$(t, a); if (ot(i) && ot(s)) return O$(o, i, s, n, r); if (zn(i) && zn(s)) { for (var l = [], u = 0; u < s.length; u++) { var c = i[u], d = s[u]; if (c != null && d != null) { var f = O$(o, c, d, n, r); l.push(f); } else l.push(d); } return l; } } function Cbe(e, t, n, r) { var a = !r, o = 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 = hy.linear; else { var d; if (kt(s)) { var f = c.parse("transition-timing-function", s); d = f.value; } else d = s; var h, p; kt(d) ? (h = d, p = []) : (h = d[1], p = d.slice(2).map(function(V) { return +V; })), p.length > 0 ? (h === "spring" && p.push(i.duration), i.easingImpl = hy[h].apply(null, p)) : i.easingImpl = hy[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, y = i.position; if (y && a && !e.locked()) { var x = {}; uv(g.x, y.x) && (x.x = Tp(g.x, y.x, m, v)), uv(g.y, y.y) && (x.y = Tp(g.y, y.y, m, v)), e.position(x); } var w = i.startPan, k = i.pan, C = o.pan, S = k != null && r; S && (uv(w.x, k.x) && (C.x = Tp(w.x, k.x, m, v)), uv(w.y, k.y) && (C.y = Tp(w.y, k.y, m, v)), e.emit("pan")); var _ = i.startZoom, T = i.zoom, F = T != null && r; F && (uv(_, T) && (o.zoom = P0(o.minZoom, Tp(_, T, m, v), o.maxZoom)), e.emit("zoom")), (S || F) && e.emit("viewport"); var A = i.style; if (A && A.length > 0 && a) { for (var I = 0; I < A.length; I++) { var N = A[I], L = N.name, z = N, P = i.startStyle[L], D = c.properties[P.name], M = Tp(P, z, m, v, D); c.overrideBypass(e, L, M); } e.emit("style"); } } return i.progress = m, m; } function uv(e, t) { return e == null || t == null ? !1 : ot(e) && ot(t) ? !0 : !!(e && t); } function Sbe(e, t, n, r) { var a = t._private; a.started = !0, a.startTime = n - a.progress * a.duration; } function A$(e, t) { var n = t._private.aniEles, r = []; function a(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(k) { for (var C = k.length - 1; C >= 0; C--) { var S = k[C]; S(); } k.splice(0, k.length); }, y = h.length - 1; y >= 0; y--) { var x = h[y], w = x._private; if (w.stopped) { h.splice(y, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.frames); continue; } !w.playing && !w.applying || (w.playing && w.applying && (w.applying = !1), w.started || Sbe(c, x, e), Cbe(c, x, e, d), w.applying && (w.applying = !1), g(w.frames), w.step != null && w.step(e), x.completed() && (h.splice(y, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.completes)), v = !0); } return !d && h.length === 0 && p.length === 0 && r.push(c), v; } for (var o = !1, i = 0; i < n.length; i++) { var s = n[i], l = a(s); o = o || l; } var u = a(t, !0); (o || u) && (n.length > 0 ? t.notify("draw", n) : t.notify("draw")), n.unmerge(r), t.emit("step"); } var Ebe = { // pull in animation functions animate: $n.animate(), animation: $n.animation(), animated: $n.animated(), clearQueue: $n.clearQueue(), delay: $n.delay(), delayAnimation: $n.delayAnimation(), stop: $n.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 && ub(function(r) { A$(r, e), t(); }); } var n = e.renderer(); n && n.beforeRender ? n.beforeRender(function(r, a) { A$(a, e); }, n.beforeRenderPriorities.animations) : t(); } }, _be = { 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 && Wg(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; } }, l1 = function(e) { return kt(e) ? new Uu(e) : e; }, rB = { createEmitter: function() { var e = this._private; return e.emitter || (e.emitter = new iw(_be, this)), this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { return this.emitter().on(e, l1(t), n), this; }, removeListener: function(e, t, n) { return this.emitter().removeListener(e, l1(t), n), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, one: function(e, t, n) { return this.emitter().one(e, l1(t), n), this; }, once: function(e, t, n) { return this.emitter().one(e, l1(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; } }; $n.eventAliasesOn(rB); var s5 = { 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); } }; s5.jpeg = s5.jpg; var vy = { layout: function(e) { var t = this; if (e == null) { pr("Layout options must be specified to make a layout"); return; } if (e.name == null) { pr("A `name` must be specified to make a layout"); return; } var n = e.name, r = t.extension("layout", n); if (r == null) { pr("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?"); return; } var a; kt(e.eles) ? a = t.$(e.eles) : a = e.eles != null ? e.eles : t.$(); var o = new r(At({}, e, { cy: t, eles: a })); return o; } }; vy.createLayout = vy.makeLayout = vy.layout; var Tbe = { 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 a = this.renderer(); this.destroyed() || !a || a.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 a = n[r], o = e[a], i = t.getElementById(a); i.data(o); } }); } }, $be = ba({ hideEdgesOnViewport: !1, textureOnViewport: !1, motionBlur: !1, motionBlurOpacity: 0.05, pixelRatio: void 0, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: !1, showFps: !1 }), l5 = { renderTo: function(e, t, n, r) { var a = this._private.renderer; return a.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) { pr("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 && Fn("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 = $be(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); } }; l5.invalidateDimensions = l5.resize; var gy = { // 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 kt(e) ? this.$(e) : Ao(e) ? e.collection() : zn(e) ? (t || (t = {}), new da(this, e, t.unique, t.removed)) : new da(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; } }; gy.elements = gy.filter = gy.$; var Ba = {}, Zv = "t", Obe = "f"; Ba.apply = function(e) { for (var t = this, n = t._private, r = n.cy, a = r.collection(), o = 0; o < e.length; o++) { var i = e[o], 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 && a.push(i); } } return a; }; Ba.getPropertiesDiff = function(e, t) { var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, a = e + "-" + t, o = r[a]; if (o) return o; for (var i = [], s = {}, l = 0; l < n.length; l++) { var u = n[l], c = e[l] === Zv, d = t[l] === Zv, 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, y = !1, x = l + 1; x < n.length; x++) { var w = n[x], k = t[x] === Zv; if (k && (y = w.properties[m.name] != null, y)) break; } !s[g] && !y && (s[g] = !0, i.push(g)); } } } return r[a] = i, i; }; Ba.getContextMeta = function(e) { for (var t = this, n = "", r, a = e._private.styleCxtKey || "", o = 0; o < t.length; o++) { var i = t[o], s = i.selector && i.selector.matches(e); s ? n += Zv : n += Obe; } return r = t.getPropertiesDiff(a, n), e._private.styleCxtKey = n, { key: n, diffPropNames: r, empty: r.length === 0 }; }; Ba.getContextStyle = function(e) { var t = e.key, n = this, r = this._private.contextStyles = this._private.contextStyles || {}; if (r[t]) return r[t]; for (var a = { _private: { key: t } }, o = 0; o < n.length; o++) { var i = n[o], s = t[o] === Zv; if (s) for (var l = 0; l < i.properties.length; l++) { var u = i.properties[l]; a[u.name] = u; } } return r[t] = a, a; }; Ba.applyContextStyle = function(e, t, n) { for (var r = this, a = e.diffPropNames, o = {}, i = r.types, s = 0; s < a.length; s++) { var l = a[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 = o[l] = { prev: c }; r.applyParsedProperty(n, u), h.next = n.pstyle(l), h.next && h.next.bypass && (h.next = h.next.bypassed); } } return { diffProps: o }; }; Ba.updateStyleHints = function(e) { var t = e._private, n = this, r = n.propertyGroupNames, a = n.propertyGroupKeys, o = function(re, we, Oe) { return n.getPropertiesHash(re, we, Oe); }, 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 < a.length; u++) { var c = a[u]; t.styleKeys[c] = [Zp, Pv]; } for (var d = function(re, we) { return t.styleKeys[we][0] = F0(re, t.styleKeys[we][0]); }, f = function(re, we) { return t.styleKeys[we][1] = A0(re, t.styleKeys[we][1]); }, h = function(re, we) { d(re, we), f(re, we); }, p = function(re, we) { for (var Oe = 0; Oe < re.length; Oe++) { var Ne = re.charCodeAt(Oe); d(Ne, we), f(Ne, we); } }, v = 2e9, m = function(re) { return -128 < re && re < 128 && Math.floor(re) !== re ? v - (re * 1024 | 0) : re; }, g = 0; g < r.length; g++) { var y = r[g], x = l[y]; if (x != null) { var w = this.properties[y], k = w.type, C = w.groupKey, S = void 0; w.hashOverride != null ? S = w.hashOverride(e, x) : x.pfValue != null && (S = x.pfValue); var _ = w.enums == null ? x.value : null, T = S != null, F = _ != null, A = T || F, I = x.units; if (k.number && A && !k.multiple) { var N = T ? S : _; h(m(N), C), !T && I != null && p(I, C); } else p(x.strValue, C); } } for (var L = [Zp, Pv], z = 0; z < a.length; z++) { var P = a[z], D = t.styleKeys[P]; L[0] = F0(D[0], L[0]), L[1] = A0(D[1], L[1]); } t.styleKey = I0e(L[0], L[1]); var M = t.styleKeys; t.labelDimsKey = Gl(M.labelDimensions); var V = o(e, ["label"], M.labelDimensions); if (t.labelKey = Gl(V), t.labelStyleKey = Gl(Jm(M.commonLabel, V)), !s) { var Q = o(e, ["source-label"], M.labelDimensions); t.sourceLabelKey = Gl(Q), t.sourceLabelStyleKey = Gl(Jm(M.commonLabel, Q)); var X = o(e, ["target-label"], M.labelDimensions); t.targetLabelKey = Gl(X), t.targetLabelStyleKey = Gl(Jm(M.commonLabel, X)); } if (s) { var ee = t.styleKeys, ue = ee.nodeBody, ve = ee.nodeBorder, ge = ee.nodeOutline, se = ee.backgroundImage, ne = ee.compound, W = ee.pie, Y = [ue, ve, ge, se, ne, W].filter(function(re) { return re != null; }).reduce(Jm, [Zp, Pv]); t.nodeKey = Gl(Y), t.hasPie = W != null && W[0] !== Zp && W[1] !== Pv; } return i !== t.styleKey; }; Ba.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; }; Ba.applyParsedProperty = function(e, t) { var n = this, r = t, a = e._private.style, o, i = n.types, s = n.properties[r.name].type, l = r.bypass, u = a[r.name], c = u && u.bypass, d = e._private, f = "mapping", h = function(ee) { return ee == null ? null : ee.pfValue != null ? ee.pfValue : ee.value; }, p = function() { var ee = h(u), ue = h(r); n.checkTriggers(e, r.name, ee, ue); }; 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 a[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 ? (a[r.name] = u.bypassed, p(), !0) : !1 : (p(), !0); var v = function() { Fn("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, y = 0; y < m.length && g; y++) { var x = m[y]; g = g[x]; } if (g == null) return v(), !1; var w; if (ot(g)) { var k = r.fieldMax - r.fieldMin; k === 0 ? w = 0 : w = (g - r.fieldMin) / k; } else return Fn("Do not use continuous mappers without specifying numeric data (i.e. `" + r.field + ": " + g + "` for `" + e.id() + "` is non-numeric)"), !1; if (w < 0 ? w = 0 : w > 1 && (w = 1), s.color) { var C = r.valueMin[0], S = r.valueMax[0], _ = r.valueMin[1], T = r.valueMax[1], F = r.valueMin[2], A = r.valueMax[2], I = r.valueMin[3] == null ? 1 : r.valueMin[3], N = r.valueMax[3] == null ? 1 : r.valueMax[3], L = [Math.round(C + (S - C) * w), Math.round(_ + (T - _) * w), Math.round(F + (A - F) * w), Math.round(I + (N - I) * w)]; o = { // 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: L, strValue: "rgb(" + L[0] + ", " + L[1] + ", " + L[2] + ")" }; } else if (s.number) { var z = r.valueMin + (r.valueMax - r.valueMin) * w; o = this.parse(r.name, z, r.bypass, f); } else return !1; if (!o) return v(), !1; o.mapping = r, r = o; break; } case i.data: { for (var P = r.field.split("."), D = d.data, M = 0; M < P.length && D; M++) { var V = P[M]; D = D[V]; } if (D != null && (o = this.parse(r.name, D, r.bypass, f)), !o) return v(), !1; o.mapping = r, r = o; break; } case i.fn: { var Q = r.value, X = r.fnValue != null ? r.fnValue : Q(e); if (r.prevFnValue = X, X == null) return Fn("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e.id() + "` is null)"), !1; if (o = this.parse(r.name, X, r.bypass, f), !o) return Fn("Custom function mappers may not return invalid values for the property type (i.e. `" + r.name + "` for ele `" + e.id() + "` is invalid)"), !1; o.mapping = cs(r), r = o; break; } case void 0: break; default: return !1; } return l ? (c ? r.bypassed = u.bypassed : r.bypassed = u, a[r.name] = r) : c ? u.bypassed = r : a[r.name] = r, p(), !0; }; Ba.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 a = r._private.style, o = Object.keys(a), i = 0; i < o.length; i++) { var s = o[i], l = a[s]; l != null && (l.bypass ? l.bypassed = null : a[s] = null); } } }; Ba.update = function() { var e = this._private.cy, t = e.mutableElements(); t.updateStyle(); }; Ba.updateTransitions = function(e, t) { var n = this, r = e._private, a = e.pstyle("transition-property").value, o = e.pstyle("transition-duration").pfValue, i = e.pstyle("transition-delay").pfValue; if (a.length > 0 && o > 0) { for (var s = {}, l = !1, u = 0; u < a.length; u++) { var c = a[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, y = 1e-6; p && (ot(p.pfValue) && ot(v.pfValue) ? (m = v.pfValue - p.pfValue, g = p.pfValue + y * m) : ot(p.value) && ot(v.value) ? (m = v.value - p.value, g = p.value + y * m) : zn(p.value) && zn(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 mh(function(x) { i > 0 ? e.delayAnimation(i).play().promise().then(x) : x(); }).then(function() { return e.animation({ style: s, duration: o, easing: e.pstyle("transition-timing-function").value, queue: !1 }).play().promise(); }).then(function() { n.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1; }); } else r.transitioning && (this.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1); }; Ba.checkTrigger = function(e, t, n, r, a, o) { var i = this.properties[t], s = a(i); s != null && s(n, r) && o(i); }; Ba.checkZOrderTrigger = function(e, t, n, r) { var a = this; this.checkTrigger(e, t, n, r, function(o) { return o.triggersZOrder; }, function() { a._private.cy.notify("zorder", e); }); }; Ba.checkBoundsTrigger = function(e, t, n, r) { this.checkTrigger(e, t, n, r, function(a) { return a.triggersBounds; }, function(a) { e.dirtyCompoundBoundsCache(), e.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected a.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e.parallelEdges().forEach(function(o) { o.isBundledBezier() && o.dirtyBoundingBoxCache(); }), a.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e.connectedEdges().forEach(function(o) { o.dirtyBoundingBoxCache(); }); }); }; Ba.checkTriggers = function(e, t, n, r) { e.dirtyStyleCache(), this.checkZOrderTrigger(e, t, n, r), this.checkBoundsTrigger(e, t, n, r); }; var Yg = {}; Yg.applyBypass = function(e, t, n, r) { var a = this, o = [], i = !0; if (t === "*" || t === "**") { if (n !== void 0) for (var s = 0; s < a.properties.length; s++) { var l = a.properties[s], u = l.name, c = this.parse(u, n, !0); c && o.push(c); } } else if (kt(t)) { var d = this.parse(t, n, !0); d && o.push(d); } else if (Cn(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[Y2(v)]), m !== void 0) { var g = this.parse(v, m, !0); g && o.push(g); } } } else return !1; if (o.length === 0) return !1; for (var y = !1, x = 0; x < e.length; x++) { for (var w = e[x], k = {}, C = void 0, S = 0; S < o.length; S++) { var _ = o[S]; if (r) { var T = w.pstyle(_.name); C = k[_.name] = { prev: T }; } y = this.applyParsedProperty(w, cs(_)) || y, r && (C.next = w.pstyle(_.name)); } y && this.updateStyleHints(w), r && this.updateTransitions(w, k, i); } return y; }; Yg.overrideBypass = function(e, t, n) { t = G4(t); for (var r = 0; r < e.length; r++) { var a = e[r], o = a._private.style[t], i = this.properties[t].type, s = i.color, l = i.mutiple, u = o ? o.pfValue != null ? o.pfValue : o.value : null; !o || !o.bypass ? this.applyBypass(a, t, n) : (o.value = n, o.pfValue != null && (o.pfValue = n), s ? o.strValue = "rgb(" + n.join(",") + ")" : l ? o.strValue = n.join(" ") : o.strValue = "" + n, this.updateStyleHints(a)), this.checkTriggers(a, t, u, n); } }; Yg.removeAllBypasses = function(e, t) { return this.removeBypasses(e, this.propertyNames, t); }; Yg.removeBypasses = function(e, t, n) { for (var r = !0, a = 0; a < e.length; a++) { for (var o = e[a], i = {}, s = 0; s < t.length; s++) { var l = t[s], u = this.properties[l], c = o.pstyle(u.name); if (!(!c || !c.bypass)) { var d = "", f = this.parse(l, d, !0), h = i[u.name] = { prev: c }; this.applyParsedProperty(o, f), h.next = o.pstyle(u.name); } } this.updateStyleHints(o), n && this.updateTransitions(o, i, r); } }; var lS = {}; lS.getEmSizeInPixels = function() { var e = this.containerCss("font-size"); return e != null ? parseFloat(e) : 1; }; lS.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 _s = {}; _s.getRenderedStyle = function(e, t) { return t ? this.getStylePropertyValue(e, t, !0) : this.getRawStyle(e, !0); }; _s.getRawStyle = function(e, t) { var n = this; if (e = e[0], e) { for (var r = {}, a = 0; a < n.properties.length; a++) { var o = n.properties[a], i = n.getStylePropertyValue(e, o.name, t); i != null && (r[o.name] = i, r[Y2(o.name)] = i); } return r; } }; _s.getIndexedStyle = function(e, t, n, r) { var a = e.pstyle(t)[n][r]; return a ?? e.cy().style().getDefaultProperty(t)[n][0]; }; _s.getStylePropertyValue = function(e, t, n) { var r = this; if (e = e[0], e) { var a = r.properties[t]; a.alias && (a = a.pointsTo); var o = a.type, i = e.pstyle(a.name); if (i) { var s = i.value, l = i.units, u = i.strValue; if (n && o.number && s != null && ot(s)) { var c = e.cy().zoom(), d = function(v) { return v * c; }, f = function(v, m) { return d(v) + m; }, h = zn(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 kt(v) ? v : "" + d(v); }).join(" ") : "" + d(s); } else if (u != null) return u; } return null; } }; _s.getAnimationStartStyle = function(e, t) { for (var n = {}, r = 0; r < t.length; r++) { var a = t[r], o = a.name, i = e.pstyle(o); i !== void 0 && (Cn(i) ? i = this.parse(o, i.strValue) : i = this.parse(o, i)), i && (n[o] = i); } return n; }; _s.getPropsList = function(e) { var t = this, n = [], r = e, a = t.properties; if (r) for (var o = Object.keys(r), i = 0; i < o.length; i++) { var s = o[i], l = r[s], u = a[s] || a[G4(s)], c = this.parse(u.name, l); c && n.push(c); } return n; }; _s.getNonDefaultPropertiesHash = function(e, t, n) { var r = n.slice(), a, o, i, s, l, u; for (l = 0; l < t.length; l++) if (a = t[l], o = e.pstyle(a, !1), o != null) if (o.pfValue != null) r[0] = F0(s, r[0]), r[1] = A0(s, r[1]); else for (i = o.strValue, u = 0; u < i.length; u++) s = i.charCodeAt(u), r[0] = F0(s, r[0]), r[1] = A0(s, r[1]); return r; }; _s.getPropertiesHash = _s.getNonDefaultPropertiesHash; var uw = {}; uw.appendFromJson = function(e) { for (var t = this, n = 0; n < e.length; n++) { var r = e[n], a = r.selector, o = r.style || r.css, i = Object.keys(o); t.selector(a); for (var s = 0; s < i.length; s++) { var l = i[s], u = o[l]; t.css(l, u); } } return t; }; uw.fromJson = function(e) { var t = this; return t.resetToDefault(), t.appendFromJson(e), t; }; uw.json = function() { for (var e = [], t = this.defaultLength; t < this.length; t++) { for (var n = this[t], r = n.selector, a = n.properties, o = {}, i = 0; i < a.length; i++) { var s = a[i]; o[s.name] = s.strValue; } e.push({ selector: r ? r.toString() : "core", style: o }); } return e; }; var uS = {}; uS.appendFromString = function(e) { var t = this, n = this, r = "" + e, a, o, i; r = r.replace(/[/][*](\s|.)+?[*][/]/g, ""); function s() { r.length > a.length ? r = r.substr(a.length) : r = ""; } function l() { o.length > i.length ? o = o.substr(i.length) : o = ""; } for (; ; ) { var u = r.match(/^\s*$/); if (u) break; var c = r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!c) { Fn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + r); break; } a = c[0]; var d = c[1]; if (d !== "core") { var f = new Uu(d); if (f.invalid) { Fn("Skipping parsing of block: Invalid selector found in string stylesheet: " + d), s(); continue; } } var h = c[2], p = !1; o = h; for (var v = []; ; ) { var m = o.match(/^\s*$/); if (m) break; var g = o.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!g) { Fn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + h), p = !0; break; } i = g[0]; var y = g[1], x = g[2], w = t.properties[y]; if (!w) { Fn("Skipping property: Invalid property name in: " + i), l(); continue; } var k = n.parse(y, x); if (!k) { Fn("Skipping property: Invalid property definition in: " + i), l(); continue; } v.push({ name: y, val: x }), l(); } if (p) { s(); break; } n.selector(d); for (var C = 0; C < v.length; C++) { var S = v[C]; n.css(S.name, S.val); } s(); } return n; }; uS.fromString = function(e) { var t = this; return t.resetToDefault(), t.appendFromString(e), t; }; var Zr = {}; (function() { var e = Nr, t = Nve, n = Dve, r = Bve, a = Rve, o = function(W) { return "^" + W + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, i = function(W) { var Y = e + "|\\w+|" + t + "|" + n + "|" + r + "|" + a; return "^" + W + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e + ")\\s*\\,\\s*(" + e + ")\\s*,\\s*(" + Y + ")\\s*\\,\\s*(" + Y + ")\\)$"; }, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; Zr.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: o("data") }, layoutData: { mapping: !0, regex: o("layoutData") }, scratch: { mapping: !0, regex: o("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(W, Y) { switch (W.length) { case 2: return Y[0] !== "deg" && Y[0] !== "rad" && Y[1] !== "deg" && Y[1] !== "rad"; case 1: return kt(W[0]) || Y[0] === "deg" || Y[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(W) { var Y = W.length; return Y === 1 || Y === 2 || Y === 4; } } }; var l = { zeroNonZero: function(W, Y) { return (W == null || Y == null) && W !== Y || W == 0 && Y != 0 ? !0 : W != 0 && Y == 0; }, any: function(W, Y) { return W != Y; }, emptyNonEmpty: function(W, Y) { var re = ju(W), we = ju(Y); return re && !we || !re && we; } }, u = Zr.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 }], y = [{ 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 }], x = [{ 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 }], w = function(W, Y) { return Y.value === "label" ? -W.poolIndex() : Y.pfValue; }, k = [{ name: "height", type: u.nodeSize, triggersBounds: l.any, hashOverride: w }, { name: "width", type: u.nodeSize, triggersBounds: l.any, hashOverride: w }, { 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 }], C = [{ 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 }], T = [{ 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 }], A = [{ 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 }], I = [{ 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 }], N = []; Zr.pieBackgroundN = 16, N.push({ name: "pie-size", type: u.sizeMaybePercent }); for (var L = 1; L <= Zr.pieBackgroundN; L++) N.push({ name: "pie-" + L + "-background-color", type: u.color }), N.push({ name: "pie-" + L + "-background-size", type: u.percent }), N.push({ name: "pie-" + L + "-background-opacity", type: u.zeroOneNumber }); var z = [], P = Zr.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(W) { P.forEach(function(Y) { var re = Y + "-" + W.name, we = W.type, Oe = W.triggersBounds; z.push({ name: re, type: we, triggersBounds: Oe }); }); }, {}); var D = Zr.properties = [].concat(v, x, m, g, y, A, p, h, c, d, f, k, C, S, _, N, T, F, z, I), M = Zr.propertyGroups = { // common to all eles behavior: v, transition: x, visibility: m, overlay: g, underlay: y, ghost: A, // labels commonLabel: p, labelDimensions: h, mainLabel: c, sourceLabel: d, targetLabel: f, // node props nodeBody: k, nodeBorder: C, nodeOutline: S, backgroundImage: _, pie: N, compound: T, // edge props edgeLine: F, edgeArrow: z, core: I }, V = Zr.propertyGroupNames = {}, Q = Zr.propertyGroupKeys = Object.keys(M); Q.forEach(function(W) { V[W] = M[W].map(function(Y) { return Y.name; }), M[W].forEach(function(Y) { return Y.groupKey = W; }); }); var X = Zr.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" }]; Zr.propertyNames = D.map(function(W) { return W.name; }); for (var ee = 0; ee < D.length; ee++) { var ue = D[ee]; D[ue.name] = ue; } for (var ve = 0; ve < X.length; ve++) { var ge = X[ve], se = D[ge.pointsTo], ne = { name: ge.name, alias: !0, pointsTo: se }; D.push(ne), D[ge.name] = ne; } })(); Zr.getDefaultProperty = function(e) { return this.getDefaultProperties()[e]; }; Zr.getDefaultProperties = function() { var e = this._private; if (e.defaultProperties != null) return e.defaultProperties; for (var t = At({ // 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 <= Zr.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 Zr.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 a = this.properties[r]; if (!a.pointsTo) { var o = a.name, i = t[o], s = this.parse(o, i); n[o] = s; } } return e.defaultProperties = n, e.defaultProperties; }; Zr.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 cw = {}; cw.parse = function(e, t, n, r) { var a = this; if (ir(t)) return a.parseImplWarn(e, t, n, r); var o = r === "mapping" || r === !0 || r === !1 || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, l = fD(e, s, i, o), u = a.propCache = a.propCache || [], c; return (c = u[l]) || (c = u[l] = a.parseImplWarn(e, t, n, r)), (n || r === "mapping") && (c = cs(c), c && (c.value = cs(c.value))), c; }; cw.parseImplWarn = function(e, t, n, r) { var a = this.parseImpl(e, t, n, r); return !a && t != null && Fn("The style property `".concat(e, ": ").concat(t, "` is invalid")), a && (a.name === "width" || a.name === "height") && t === "label" && Fn("The style value of `label` is deprecated for `" + a.name + "`"), a; }; cw.parseImpl = function(e, t, n, r) { var a = this; e = G4(e); var o = a.properties[e], i = t, s = a.types; if (!o || t === void 0) return null; o.alias && (o = o.pointsTo, e = o.name); var l = kt(t); l && (t = t.trim()); var u = o.type; if (!u) return null; if (n && (t === "" || t === null)) return { name: e, value: t, bypass: !0, deleteBypass: !0 }; if (ir(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 Fn("`" + 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, y = 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 (y) 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 x; if (l ? x = t.split(/\s+/) : zn(t) ? x = t : x = [t], u.evenMultiple && x.length % 2 !== 0) return null; for (var w = [], k = [], C = [], S = "", _ = !1, T = 0; T < x.length; T++) { var F = a.parse(e, x[T], n, "multiple"); _ = _ || kt(F.value), w.push(F.value), C.push(F.pfValue != null ? F.pfValue : F.value), k.push(F.units), S += (T > 0 ? " " : "") + F.strValue; } return u.validate && !u.validate(w, k) ? null : u.singleEnum && _ ? w.length === 1 && kt(w[0]) ? { name: e, value: w[0], strValue: w[0], bypass: n } : null : { name: e, value: w, pfValue: C, strValue: S, bypass: n, units: k }; } var A = function() { for (var W = 0; W < u.enums.length; W++) { var Y = u.enums[W]; if (Y === t) return { name: e, value: t, strValue: "" + t, bypass: n }; } return null; }; if (u.number) { var I, N = "px"; if (u.units && (I = u.units), u.implicitUnits && (N = u.implicitUnits), !u.unitless) if (l) { var L = "px|em" + (u.allowPercent ? "|\\%" : ""); I && (L = I); var z = t.match("^(" + Nr + ")(" + L + ")?$"); z && (t = z[1], I = z[2] || N); } else (!I || u.implicitUnits) && (I = N); if (t = parseFloat(t), isNaN(t) && u.enums === void 0) return null; if (isNaN(t) && u.enums !== void 0) return t = i, A(); if (u.integer && !$ve(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 P = { name: e, value: t, strValue: "" + t + (I || ""), units: I, bypass: n }; return u.unitless || I !== "px" && I !== "em" ? P.pfValue = t : P.pfValue = I === "px" || !I ? t : this.getEmSizeInPixels() * t, (I === "ms" || I === "s") && (P.pfValue = I === "ms" ? t : 1e3 * t), (I === "deg" || I === "rad") && (P.pfValue = I === "rad" ? t : cge(t)), I === "%" && (P.pfValue = t / 100), P; } else if (u.propList) { var D = [], M = "" + t; if (M !== "none") { for (var V = M.split(/\s*,\s*|\s+/), Q = 0; Q < V.length; Q++) { var X = V[Q].trim(); a.properties[X] ? D.push(X) : Fn("`" + X + "` is not a valid property name"); } if (D.length === 0) return null; } return { name: e, value: D, strValue: D.length === 0 ? "none" : D.join(" "), bypass: n }; } else if (u.color) { var ee = qve(t); return ee ? { name: e, value: ee, pfValue: ee, strValue: "rgb(" + ee[0] + "," + ee[1] + "," + ee[2] + ")", // n.b. no spaces b/c of multiple support bypass: n } : null; } else if (u.regex || u.regexes) { if (u.enums) { var ue = A(); if (ue) return ue; } for (var ve = u.regexes ? u.regexes : [u.regex], ge = 0; ge < ve.length; ge++) { var se = new RegExp(ve[ge]), ne = se.exec(t); if (ne) return { name: e, value: u.singleRegexMatchValue ? ne[1] : ne, strValue: "" + t, bypass: n }; } return null; } else return u.string ? { name: e, value: "" + t, strValue: "" + t, bypass: n } : u.enums ? A() : null; }; var Aa = function e(t) { if (!(this instanceof e)) return new e(t); if (!K4(t)) { pr("A style must have a core reference"); return; } this._private = { cy: t, coreStyle: {} }, this.length = 0, this.resetToDefault(); }, Na = Aa.prototype; Na.instanceString = function() { return "style"; }; Na.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(a) { var o = a[0]._private; o.styleDirty = !0, o.appliedInitStyle = !1; }), this; }; Na.resetToDefault = function() { return this.clear(), this.addDefaultStylesheet(), this; }; Na.core = function(e) { return this._private.coreStyle[e] || this.getDefaultProperty(e); }; Na.selector = function(e) { var t = e === "core" ? null : new Uu(e), n = this.length++; return this[n] = { selector: t, properties: [], mappedProperties: [], index: n }, this; }; Na.css = function() { var e = this, t = arguments; if (t.length === 1) for (var n = t[0], r = 0; r < e.properties.length; r++) { var a = e.properties[r], o = n[a.name]; o === void 0 && (o = n[Y2(a.name)]), o !== void 0 && this.cssRule(a.name, o); } else t.length === 2 && this.cssRule(t[0], t[1]); return this; }; Na.style = Na.css; Na.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 a = !this[r].selector; a && (this._private.coreStyle[n.name] = n); } return this; }; Na.append = function(e) { return rD(e) ? e.appendToStyle(this) : zn(e) ? this.appendFromJson(e) : kt(e) && this.appendFromString(e), this; }; Aa.fromJson = function(e, t) { var n = new Aa(e); return n.fromJson(t), n; }; Aa.fromString = function(e, t) { return new Aa(e).fromString(t); }; [Ba, Yg, lS, _s, uw, uS, Zr, cw].forEach(function(e) { At(Na, e); }); Aa.types = Na.types; Aa.properties = Na.properties; Aa.propertyGroups = Na.propertyGroups; Aa.propertyGroupNames = Na.propertyGroupNames; Aa.propertyGroupKeys = Na.propertyGroupKeys; var Fbe = { style: function(e) { if (e) { var t = this.setStyle(e); t.update(); } return this._private.style; }, setStyle: function(e) { var t = this._private; return rD(e) ? t.style = e.generateStyle(this) : zn(e) ? t.style = Aa.fromJson(this, e) : kt(e) ? t.style = Aa.fromString(this, e) : t.style = Aa(this), t.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function() { this.mutableElements().updateStyle(); } }, Abe = "single", Ed = { 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 = Abe), 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, a, o, i; switch (e.length) { case 0: return t; case 1: if (kt(e[0])) return n = e[0], t[n]; if (Cn(e[0])) { if (!this._private.panningEnabled) return this; a = e[0], o = a.x, i = a.y, ot(o) && (t.x = o), ot(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") && ot(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, a, o, i, s, l; if (!this._private.panningEnabled) return this; switch (n.length) { case 1: Cn(e) && (i = n[0], s = i.x, l = i.y, ot(s) && (r.x += s), ot(l) && (r.y += l), this.emit("pan viewport")); break; case 2: a = e, o = t, (a === "x" || a === "y") && ot(o) && (r[a] += o), 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 (ot(e) && t === void 0 && (t = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { var n; if (kt(e)) { var r = e; e = this.$(r); } else if (Ave(e)) { var a = e; n = { x1: a.x1, y1: a.y1, x2: a.x2, y2: a.y2 }, n.w = n.x2 - n.x1, n.h = n.y2 - n.y1; } else Ao(e) || (e = this.mutableElements()); if (!(Ao(e) && e.empty())) { n = n || e.boundingBox(); var o = this.width(), i = this.height(), s; if (t = ot(t) ? t : 0, !isNaN(o) && !isNaN(i) && o > 0 && i > 0 && !isNaN(n.w) && !isNaN(n.h) && n.w > 0 && n.h > 0) { s = Math.min((o - 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: (o - 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 ot(e) && ot(t) && e <= t ? (n.minZoom = e, n.maxZoom = t) : ot(e) && t === void 0 && e <= n.maxZoom ? n.minZoom = e : ot(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, a, o, i = !1; if (t.zoomingEnabled || (i = !0), ot(e) ? o = e : Cn(e) && (o = e.level, e.position != null ? a = ew(e.position, r, n) : e.renderedPosition != null && (a = e.renderedPosition), a != null && !t.panningEnabled && (i = !0)), o = o > t.maxZoom ? t.maxZoom : o, o = o < t.minZoom ? t.minZoom : o, i || !ot(o) || o === r || a != null && (!ot(a.x) || !ot(a.y))) return null; if (a != null) { var s = n, l = r, u = o, c = { x: -u / l * (a.x - s.x) + a.x, y: -u / l * (a.y - s.y) + a.y }; return { zoomed: !0, panned: !0, zoom: u, pan: c }; } else return { zoomed: !0, panned: !1, zoom: o, 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, a = [], o = !1, i = !1; if (!e) return this; if (ot(e.zoom) || (n = !1), Cn(e.pan) || (r = !1), !n && !r) return this; if (n) { var s = e.zoom; s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? o = !0 : (t.zoom = s, a.push("zoom")); } if (r && (!o || !e.cancelOnFailedZoom) && t.panningEnabled) { var l = e.pan; ot(l.x) && (t.pan.x = l.x, i = !1), ot(l.y) && (t.pan.y = l.y, i = !1), i || a.push("pan"); } return a.length > 0 && (a.push("viewport"), this.emit(a.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 (kt(e)) { var n = e; e = this.mutableElements().filter(n); } else Ao(e) || (e = this.mutableElements()); if (e.length !== 0) { var r = e.boundingBox(), a = this.width(), o = this.height(); t = t === void 0 ? this._private.zoom : t; var i = { // middle x: (a - t * (r.x1 + r.x2)) / 2, y: (o - 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), a = function(o) { return parseFloat(r.getPropertyValue(o)); }; return { width: t.clientWidth - a("padding-left") - a("padding-right"), height: t.clientHeight - a("padding-top") - a("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; } }; Ed.centre = Ed.center; Ed.autolockNodes = Ed.autolock; Ed.autoungrabifyNodes = Ed.autoungrabify; var B0 = { data: $n.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeData: $n.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), scratch: $n.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: $n.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }) }; B0.attr = B0.data; B0.removeAttr = B0.removeData; var vb = function(e) { var t = this; e = At({}, e); var n = e.container; n && !lb(n) && lb(n[0]) && (n = n[0]); var r = n ? n._cyreg : null; r = r || {}, r && r.cy && (r.cy.destroy(), r = {}); var a = r.readies = r.readies || []; n && (n._cyreg = r), r.cy = t; var o = Or !== void 0 && n !== void 0 && !e.headless, i = e; i.layout = At({ name: o ? "grid" : "null" }, i.layout), i.renderer = At({ name: o ? "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 da(this), // elements in the graph listeners: [], // list of listeners aniEles: new da(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 ? o : i.styleEnabled, zoom: ot(i.zoom) ? i.zoom : 1, pan: { x: Cn(i.pan) && ot(i.pan.x) ? i.pan.x : 0, y: Cn(i.pan) && ot(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(Ive); if (p) return mh.all(f).then(h); h(f); }; l.styleEnabled && t.setStyle([]); var c = At({}, 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 && (Cn(f) || zn(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 = At({}, 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, ir(i.ready) && t.on("ready", i.ready); for (var v = 0; v < a.length; v++) { var m = a[v]; t.on("ready", m); } r && (r.readies = []), t.emit("ready"); }, i.done); }); }, gb = vb.prototype; At(gb, { 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 Or; var t = this._private.container.ownerDocument; return t === void 0 || t == null ? Or : t.defaultView || Or; }, mount: function(e) { if (e != null) { var t = this, n = t._private, r = n.options; return !lb(e) && lb(e[0]) && (e = e[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e, n.styleEnabled = !0, t.invalidateSize(), t.initRenderer(At({}, 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 cs(this._private.options); }, json: function(e) { var t = this, n = t._private, r = t.mutableElements(), a = function(y) { return t.getElementById(y.id()); }; if (Cn(e)) { if (t.startBatch(), e.elements) { var o = {}, i = function(y, x) { for (var w = [], k = [], C = 0; C < y.length; C++) { var S = y[C]; if (!S.data.id) { Fn("cy.json() cannot handle elements without an ID attribute"); continue; } var _ = "" + S.data.id, T = t.getElementById(_); o[_] = !0, T.length !== 0 ? k.push({ ele: T, json: S }) : (x && (S.group = x), w.push(S)); } t.add(w); for (var F = 0; F < k.length; F++) { var A = k[F], I = A.ele, N = A.json; I.json(N); } }; if (zn(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]; zn(c) && i(c, u); } var d = t.collection(); r.filter(function(y) { return !o[y.id()]; }).forEach(function(y) { y.isParent() ? d.merge(y) : y.remove(); }), d.forEach(function(y) { return y.children().move({ parent: null }); }), d.forEach(function(y) { return a(y).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(y) { return y.json(); }) : (m.elements = {}, r.forEach(function(y) { var x = y.group(); m.elements[x] || (m.elements[x] = []), m.elements[x].push(y.json()); })), this._private.styleEnabled && (m.style = t.style().json()), m.data = cs(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 = cs(n.pan), m.boxSelectionEnabled = n.boxSelectionEnabled, m.renderer = cs(g.renderer), m.hideEdgesOnViewport = g.hideEdgesOnViewport, m.textureOnViewport = g.textureOnViewport, m.wheelSensitivity = g.wheelSensitivity, m.motionBlur = g.motionBlur, m.multiClickDebounceTime = g.multiClickDebounceTime, m; } } }); gb.$id = gb.getElementById; [wbe, Ebe, rB, s5, vy, Tbe, l5, gy, Fbe, Ed, B0].forEach(function(e) { At(gb, e); }); var Ibe = { 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 }, Pbe = { 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 }, $p = function(e) { return e.scratch("breadthfirst"); }, I$ = function(e, t) { return e.scratch("breadthfirst", t); }; function aB(e) { this.options = At({}, Ibe, Pbe, e); } aB.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().filter(function(xe) { return !xe.isParent(); }), o = r, i = t.directed, s = t.acyclic || t.maximal || t.maximalAdjustments > 0, l = ko(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), u; if (Ao(t.roots)) u = t.roots; else if (zn(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 (kt(t.roots)) u = n.$(t.roots); else if (i) u = a.roots(); else { var p = r.components(); u = n.collection(); for (var v = function(xe) { var Fe = p[xe], Se = Fe.maxDegree(!1), Pe = Fe.filter(function(Me) { return Me.degree(!1) === Se; }); u = u.add(Pe); }, m = 0; m < p.length; m++) v(m); } var g = [], y = {}, x = function(xe, Fe) { g[Fe] == null && (g[Fe] = []); var Se = g[Fe].length; g[Fe].push(xe), I$(xe, { index: Se, depth: Fe }); }, w = function(xe, Fe) { var Se = $p(xe), Pe = Se.depth, Me = Se.index; g[Pe][Me] = null, x(xe, Fe); }; o.bfs({ roots: u, directed: t.directed, visit: function(xe, Fe, Se, Pe, Me) { var He = xe[0], De = He.id(); x(He, Me), y[De] = !0; } }); for (var k = [], C = 0; C < a.length; C++) { var S = a[C]; y[S.id()] || k.push(S); } var _ = function(xe) { for (var Fe = g[xe], Se = 0; Se < Fe.length; Se++) { var Pe = Fe[Se]; if (Pe == null) { Fe.splice(Se, 1), Se--; continue; } I$(Pe, { depth: xe, index: Se }); } }, T = function() { for (var xe = 0; xe < g.length; xe++) _(xe); }, F = function(xe, Fe) { for (var Se = $p(xe), Pe = xe.incomers().filter(function(E) { return E.isNode() && r.has(E); }), Me = -1, He = xe.id(), De = 0; De < Pe.length; De++) { var Xe = Pe[De], Ge = $p(Xe); Me = Math.max(Me, Ge.depth); } if (Se.depth <= Me) { if (!t.acyclic && Fe[He]) return null; var Ze = Me + 1; return w(xe, Ze), Fe[He] = Ze, !0; } return !1; }; if (i && s) { var A = [], I = {}, N = function(xe) { return A.push(xe); }, L = function() { return A.shift(); }; for (a.forEach(function(xe) { return A.push(xe); }); A.length > 0; ) { var z = L(), P = F(z, I); if (P) z.outgoers().filter(function(xe) { return xe.isNode() && r.has(xe); }).forEach(N); else if (P === null) { Fn("Detected double maximal shift for node `" + z.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); break; } } } T(); var D = 0; if (t.avoidOverlap) for (var M = 0; M < a.length; M++) { var V = a[M], Q = V.layoutDimensions(t), X = Q.w, ee = Q.h; D = Math.max(D, X, ee); } var ue = {}, ve = function(xe) { if (ue[xe.id()]) return ue[xe.id()]; for (var Fe = $p(xe).depth, Se = xe.neighborhood(), Pe = 0, Me = 0, He = 0; He < Se.length; He++) { var De = Se[He]; if (!(De.isEdge() || De.isParent() || !a.has(De))) { var Xe = $p(De); if (Xe != null) { var Ge = Xe.index, Ze = Xe.depth; if (!(Ge == null || Ze == null)) { var E = g[Ze].length; Ze < Fe && (Pe += Ge / E, Me++); } } } } return Me = Math.max(1, Me), Pe = Pe / Me, Me === 0 && (Pe = 0), ue[xe.id()] = Pe, Pe; }, ge = function(xe, Fe) { var Se = ve(xe), Pe = ve(Fe), Me = Se - Pe; return Me === 0 ? oD(xe.id(), Fe.id()) : Me; }; t.depthSort !== void 0 && (ge = t.depthSort); for (var se = 0; se < g.length; se++) g[se].sort(ge), _(se); for (var ne = [], W = 0; W < k.length; W++) ne.push(k[W]); g.unshift(ne), T(); for (var Y = 0, re = 0; re < g.length; re++) Y = Math.max(g[re].length, Y); var we = { x: l.x1 + l.w / 2, y: l.x1 + l.h / 2 }, Oe = g.reduce(function(xe, Fe) { return Math.max(xe, Fe.length); }, 0), Ne = function(xe) { var Fe = $p(xe), Se = Fe.depth, Pe = Fe.index, Me = g[Se].length, He = Math.max(l.w / ((t.grid ? Oe : Me) + 1), D), De = Math.max(l.h / (g.length + 1), D), Xe = Math.min(l.w / 2 / g.length, l.h / 2 / g.length); if (Xe = Math.max(Xe, D), t.circle) { var Ge = Xe * Se + Xe - (g.length > 0 && g[0].length <= 3 ? Xe / 2 : 0), Ze = 2 * Math.PI / g[Se].length * Pe; return Se === 0 && g[0].length === 1 && (Ge = 1), { x: we.x + Ge * Math.cos(Ze), y: we.y + Ge * Math.sin(Ze) }; } else { var E = { x: we.x + (Pe + 1 - (Me + 1) / 2) * He, y: (Se + 1) * De }; return E; } }; return r.nodes().layoutPositions(this, t, Ne), this; }; var Lbe = { 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 oB(e) { this.options = At({}, Lbe, e); } oB.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, o = r.nodes().not(":parent"); t.sort && (o = o.sort(t.sort)); for (var i = ko(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 / o.length : t.sweep, u = l / Math.max(1, o.length - 1), c, d = 0, f = 0; f < o.length; f++) { var h = o[f], p = h.layoutDimensions(t), v = p.w, m = p.h; d = Math.max(d, v, m); } if (ot(t.radius) ? c = t.radius : o.length <= 1 ? c = 0 : c = Math.min(i.h, i.w) / 2 - d, o.length > 1 && t.avoidOverlap) { d *= 1.75; var g = Math.cos(u) - Math.cos(0), y = Math.sin(u) - Math.sin(0), x = Math.sqrt(d * d / (g * g + y * y)); c = Math.max(x, c); } var w = function(k, C) { var S = t.startAngle + C * u * (a ? 1 : -1), _ = c * Math.cos(S), T = c * Math.sin(S), F = { x: s.x + _, y: s.y + T }; return F; }; return r.nodes().layoutPositions(this, t, w), this; }; var Nbe = { 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 iB(e) { this.options = At({}, Nbe, e); } iB.prototype.run = function() { for (var e = this.options, t = e, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e.cy, a = t.eles, o = a.nodes().not(":parent"), i = ko(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 < o.length; c++) { var d = o[c], f = void 0; f = t.concentric(d), l.push({ value: f, node: d }), d._private.scratch.concentric = f; } o.updateStyle(); for (var h = 0; h < o.length; h++) { var p = o[h], v = p.layoutDimensions(t); u = Math.max(u, v.w, v.h); } l.sort(function(xe, Fe) { return Fe.value - xe.value; }); for (var m = t.levelWidth(o), g = [[]], y = g[0], x = 0; x < l.length; x++) { var w = l[x]; if (y.length > 0) { var k = Math.abs(y[0].value - w.value); k >= m && (y = [], g.push(y)); } y.push(w); } var C = u + t.minNodeSpacing; if (!t.avoidOverlap) { var S = g.length > 0 && g[0].length > 1, _ = Math.min(i.w, i.h) / 2 - C, T = _ / (g.length + S ? 1 : 0); C = Math.min(C, T); } for (var F = 0, A = 0; A < g.length; A++) { var I = g[A], N = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / I.length : t.sweep, L = I.dTheta = N / Math.max(1, I.length - 1); if (I.length > 1 && t.avoidOverlap) { var z = Math.cos(L) - Math.cos(0), P = Math.sin(L) - Math.sin(0), D = Math.sqrt(C * C / (z * z + P * P)); F = Math.max(D, F); } I.r = F, F += C; } if (t.equidistant) { for (var M = 0, V = 0, Q = 0; Q < g.length; Q++) { var X = g[Q], ee = X.r - V; M = Math.max(M, ee); } V = 0; for (var ue = 0; ue < g.length; ue++) { var ve = g[ue]; ue === 0 && (V = ve.r), ve.r = V, V += M; } } for (var ge = {}, se = 0; se < g.length; se++) for (var ne = g[se], W = ne.dTheta, Y = ne.r, re = 0; re < ne.length; re++) { var we = ne[re], Oe = t.startAngle + (n ? 1 : -1) * W * re, Ne = { x: s.x + Y * Math.cos(Oe), y: s.y + Y * Math.sin(Oe) }; ge[we.node.id()] = Ne; } return a.nodes().layoutPositions(this, t, function(xe) { var Fe = xe.id(); return ge[Fe]; }), this; }; var vk, Mbe = { // 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 dw(e) { this.options = At({}, Mbe, e), this.options.layout = this; var t = this.options.eles.nodes(), n = this.options.eles.edges(), r = n.filter(function(a) { var o = a.source().data("id"), i = a.target().data("id"), s = t.some(function(u) { return u.data("id") === o; }), l = t.some(function(u) { return u.data("id") === i; }); return !s || !l; }); this.options.eles = this.options.eles.not(r); } dw.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 ? vk = !0 : vk = !1; var r = Dbe(t, n, e); vk && zbe(r), e.randomize && Vbe(r); var a = wl(), o = function() { jbe(r, t, e), e.fit === !0 && t.fit(e.padding); }, i = function(d) { return !(n.stopped || d >= e.numIter || (Hbe(r, e), r.temperature = r.temperature * e.coolingFactor, r.temperature < e.minTemp)); }, s = function() { if (e.animate === !0 || e.animate === !1) o(), n.one("layoutstop", e.stop), n.emit({ type: "layoutstop", layout: n }); else { var d = e.eles.nodes(), f = sB(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) L$(r, e), s(); else { var h = wl(); h - a >= e.animationThreshold && o(), ub(d); } }; c(); } else { for (; u; ) u = i(l), l++; L$(r, e), s(); } return this; }; dw.prototype.stop = function() { return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; dw.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; var Dbe = function(e, t, n) { for (var r = n.eles.edges(), a = n.eles.nodes(), o = ko(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, w: e.width(), h: e.height() }), i = { isCompound: e.hasCompoundNodes(), layoutNodes: [], idToIndex: {}, nodeSize: a.size(), graphSet: [], indexToGraph: [], layoutEdges: [], edgeSize: r.size(), temperature: n.initialTemp, clientWidth: o.w, clientHeight: o.h, boundingBox: o }, 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 = a[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 = ir(n.nodeRepulsion) ? n.nodeRepulsion(h) : n.nodeRepulsion, i.layoutNodes.push(v), i.idToIndex[v.id] = u; } for (var m = [], g = 0, y = -1, x = [], u = 0; u < i.nodeSize; u++) { var h = i.layoutNodes[u], w = h.parentId; w != null ? i.layoutNodes[i.idToIndex[w]].children.push(h.id) : (m[++y] = h.id, x.push(h.id)); } for (i.graphSet.push(x); g <= y; ) { var k = m[g++], C = i.idToIndex[k], f = i.layoutNodes[C], S = f.children; if (S.length > 0) { i.graphSet.push(S); for (var u = 0; u < S.length; u++) m[++y] = S[u]; } } for (var u = 0; u < i.graphSet.length; u++) for (var _ = i.graphSet[u], d = 0; d < _.length; d++) { var T = i.idToIndex[_[d]]; i.indexToGraph[T] = u; } for (var u = 0; u < i.edgeSize; u++) { var F = r[u], A = {}; A.id = F.data("id"), A.sourceId = F.data("source"), A.targetId = F.data("target"); var I = ir(n.idealEdgeLength) ? n.idealEdgeLength(F) : n.idealEdgeLength, N = ir(n.edgeElasticity) ? n.edgeElasticity(F) : n.edgeElasticity, L = i.idToIndex[A.sourceId], z = i.idToIndex[A.targetId], P = i.indexToGraph[L], D = i.indexToGraph[z]; if (P != D) { for (var M = Bbe(A.sourceId, A.targetId, i), V = i.graphSet[M], Q = 0, v = i.layoutNodes[L]; V.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Q++; for (v = i.layoutNodes[z]; V.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Q++; I *= Q * n.nestingFactor; } A.idealLength = I, A.elasticity = N, i.layoutEdges.push(A); } return i; }, Bbe = function(e, t, n) { var r = Rbe(e, t, 0, n); return 2 > r.count ? 0 : r.graph; }, Rbe = function e(t, n, r, a) { var o = a.graphSet[r]; if (-1 < o.indexOf(t) && -1 < o.indexOf(n)) return { count: 2, graph: r }; for (var i = 0, s = 0; s < o.length; s++) { var l = o[s], u = a.idToIndex[l], c = a.layoutNodes[u].children; if (c.length !== 0) { var d = a.indexToGraph[a.idToIndex[c[0]]], f = e(t, n, d, a); if (f.count !== 0) if (f.count === 1) { if (i++, i === 2) break; } else return f; } } return { count: i, graph: r }; }, zbe, Vbe = function(e, t) { for (var n = e.clientWidth, r = e.clientHeight, a = 0; a < e.nodeSize; a++) { var o = e.layoutNodes[a]; o.children.length === 0 && !o.isLocked && (o.positionX = Math.random() * n, o.positionY = Math.random() * r); } }, sB = function(e, t, n) { var r = e.boundingBox, a = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }; return t.boundingBox && (n.forEach(function(o) { var i = e.layoutNodes[e.idToIndex[o.data("id")]]; a.x1 = Math.min(a.x1, i.positionX), a.x2 = Math.max(a.x2, i.positionX), a.y1 = Math.min(a.y1, i.positionY), a.y2 = Math.max(a.y2, i.positionY); }), a.w = a.x2 - a.x1, a.h = a.y2 - a.y1), function(o, i) { var s = e.layoutNodes[e.idToIndex[o.data("id")]]; if (t.boundingBox) { var l = (s.positionX - a.x1) / a.w, u = (s.positionY - a.y1) / a.h; return { x: r.x1 + l * r.w, y: r.y1 + u * r.h }; } else return { x: s.positionX, y: s.positionY }; }; }, jbe = function(e, t, n) { var r = n.layout, a = n.eles.nodes(), o = sB(e, n, a); a.positions(o), e.ready !== !0 && (e.ready = !0, r.one("layoutready", n.ready), r.emit({ type: "layoutready", layout: this })); }, Hbe = function(e, t, n) { Ube(e, t), Kbe(e), Gbe(e, t), Xbe(e), Ybe(e); }, Ube = function(e, t) { for (var n = 0; n < e.graphSet.length; n++) for (var r = e.graphSet[n], a = r.length, o = 0; o < a; o++) for (var i = e.layoutNodes[e.idToIndex[r[o]]], s = o + 1; s < a; s++) { var l = e.layoutNodes[e.idToIndex[r[s]]]; qbe(i, l, e, t); } }, P$ = function(e) { return -e + 2 * e * Math.random(); }, qbe = function(e, t, n, r) { var a = e.cmptId, o = t.cmptId; if (!(a !== o && !n.isCompound)) { var i = t.positionX - e.positionX, s = t.positionY - e.positionY, l = 1; i === 0 && s === 0 && (i = P$(l), s = P$(l)); var u = Wbe(e, t, i, s); if (u > 0) var m = r.nodeOverlap * u, v = Math.sqrt(i * i + s * s), g = m * i / v, y = m * s / v; else var c = mb(e, i, s), d = mb(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, y = m * h / v; e.isLocked || (e.offsetX -= g, e.offsetY -= y), t.isLocked || (t.offsetX += g, t.offsetY += y); } }, Wbe = function(e, t, n, r) { if (n > 0) var a = e.maxX - t.minX; else var a = t.maxX - e.minX; if (r > 0) var o = e.maxY - t.minY; else var o = t.maxY - e.minY; return a >= 0 && o >= 0 ? Math.sqrt(a * a + o * o) : 0; }, mb = function(e, t, n) { var r = e.positionX, a = e.positionY, o = e.height || 1, i = e.width || 1, s = n / t, l = o / i, u = {}; return t === 0 && 0 < n || t === 0 && 0 > n ? (u.x = r, u.y = a + o / 2, u) : 0 < t && -1 * l <= s && s <= l ? (u.x = r + i / 2, u.y = a + i * n / 2 / t, u) : 0 > t && -1 * l <= s && s <= l ? (u.x = r - i / 2, u.y = a - i * n / 2 / t, u) : 0 < n && (s <= -1 * l || s >= l) ? (u.x = r + o * t / 2 / n, u.y = a + o / 2, u) : (0 > n && (s <= -1 * l || s >= l) && (u.x = r - o * t / 2 / n, u.y = a - o / 2), u); }, Kbe = function(e, t) { for (var n = 0; n < e.edgeSize; n++) { var r = e.layoutEdges[n], a = e.idToIndex[r.sourceId], o = e.layoutNodes[a], i = e.idToIndex[r.targetId], s = e.layoutNodes[i], l = s.positionX - o.positionX, u = s.positionY - o.positionY; if (!(l === 0 && u === 0)) { var c = mb(o, l, u), d = mb(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; o.isLocked || (o.offsetX += m, o.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g); } } }, Gbe = function(e, t) { if (t.gravity !== 0) for (var n = 1, r = 0; r < e.graphSet.length; r++) { var a = e.graphSet[r], o = a.length; if (r === 0) var l = e.clientHeight / 2, u = e.clientWidth / 2; else var i = e.layoutNodes[e.idToIndex[a[0]]], s = e.layoutNodes[e.idToIndex[i.parentId]], l = s.positionX, u = s.positionY; for (var c = 0; c < o; c++) { var d = e.layoutNodes[e.idToIndex[a[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; } } } } }, Xbe = function(e, t) { var n = [], r = 0, a = -1; for (n.push.apply(n, e.graphSet[0]), a += e.graphSet[0].length; r <= a; ) { var o = n[r++], i = e.idToIndex[o], 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[++a] = l[d]; } s.offsetX = 0, s.offsetY = 0; } } }, Ybe = 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 a = Zbe(r.offsetX, r.offsetY, e.temperature); r.positionX += a.x, r.positionY += a.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, Qbe(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); } }, Zbe = function(e, t, n) { var r = Math.sqrt(e * e + t * t); if (r > n) var a = { x: n * e / r, y: n * t / r }; else var a = { x: e, y: t }; return a; }, Qbe = function e(t, n) { var r = t.parentId; if (r != null) { var a = n.layoutNodes[n.idToIndex[r]], o = !1; if ((a.maxX == null || t.maxX + a.padRight > a.maxX) && (a.maxX = t.maxX + a.padRight, o = !0), (a.minX == null || t.minX - a.padLeft < a.minX) && (a.minX = t.minX - a.padLeft, o = !0), (a.maxY == null || t.maxY + a.padBottom > a.maxY) && (a.maxY = t.maxY + a.padBottom, o = !0), (a.minY == null || t.minY - a.padTop < a.minY) && (a.minY = t.minY - a.padTop, o = !0), o) return e(a, n); } }, L$ = function(e, t) { for (var n = e.layoutNodes, r = [], a = 0; a < n.length; a++) { var o = n[a], i = o.cmptId, s = r[i] = r[i] || []; s.push(o); } for (var l = 0, a = 0; a < r.length; a++) { var u = r[a]; 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, y) { return y.w * y.h - g.w * g.h; }); for (var f = 0, h = 0, p = 0, v = 0, m = Math.sqrt(l) * e.clientWidth / e.clientHeight, a = 0; a < r.length; a++) { var u = r[a]; 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); } } }, Jbe = { 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 lB(e) { this.options = At({}, Jbe, e); } lB.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().not(":parent"); t.sort && (a = a.sort(t.sort)); var o = ko(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }); if (o.h === 0 || o.w === 0) r.nodes().layoutPositions(this, t, function(ue) { return { x: o.x1, y: o.y1 }; }); else { var i = a.size(), s = Math.sqrt(i * o.h / o.w), l = Math.round(s), u = Math.round(o.w / o.h * s), c = function(ue) { if (ue == null) return Math.min(l, u); var ve = Math.min(l, u); ve == l ? l = ue : u = ue; }, d = function(ue) { if (ue == null) return Math.max(l, u); var ve = Math.max(l, u); ve == l ? l = ue : u = ue; }, 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 y = o.w / u, x = o.h / l; if (t.condense && (y = 0, x = 0), t.avoidOverlap) for (var w = 0; w < a.length; w++) { var k = a[w], C = k._private.position; (C.x == null || C.y == null) && (C.x = 0, C.y = 0); var S = k.layoutDimensions(t), _ = t.avoidOverlapPadding, T = S.w + _, F = S.h + _; y = Math.max(y, T), x = Math.max(x, F); } for (var A = {}, I = function(ue, ve) { return !!A["c-" + ue + "-" + ve]; }, N = function(ue, ve) { A["c-" + ue + "-" + ve] = !0; }, L = 0, z = 0, P = function() { z++, z >= u && (z = 0, L++); }, D = {}, M = 0; M < a.length; M++) { var V = a[M], Q = t.position(V); if (Q && (Q.row !== void 0 || Q.col !== void 0)) { var X = { row: Q.row, col: Q.col }; if (X.col === void 0) for (X.col = 0; I(X.row, X.col); ) X.col++; else if (X.row === void 0) for (X.row = 0; I(X.row, X.col); ) X.row++; D[V.id()] = X, N(X.row, X.col); } } var ee = function(ue, ve) { var ge, se; if (ue.locked() || ue.isParent()) return !1; var ne = D[ue.id()]; if (ne) ge = ne.col * y + y / 2 + o.x1, se = ne.row * x + x / 2 + o.y1; else { for (; I(L, z); ) P(); ge = z * y + y / 2 + o.x1, se = L * x + x / 2 + o.y1, N(L, z), P(); } return { x: ge, y: se }; }; a.layoutPositions(this, t, ee); } return this; }; var e2e = { ready: function() { }, // on layoutready stop: function() { } // on layoutstop }; function cS(e) { this.options = At({}, e2e, e); } cS.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; }; cS.prototype.stop = function() { return this; }; var t2e = { 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 uB(e) { this.options = At({}, t2e, e); } uB.prototype.run = function() { var e = this.options, t = e.eles, n = t.nodes(), r = ir(e.positions); function a(o) { if (e.positions == null) return oge(o.position()); if (r) return e.positions(o); var i = e.positions[o._private.data.id]; return i ?? null; } return n.layoutPositions(this, e, function(o, i) { var s = a(o); return o.locked() || s == null ? !1 : s; }), this; }; var n2e = { 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 cB(e) { this.options = At({}, n2e, e); } cB.prototype.run = function() { var e = this.options, t = e.cy, n = e.eles, r = ko(e.boundingBox ? e.boundingBox : { x1: 0, y1: 0, w: t.width(), h: t.height() }), a = function(o, 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, a), this; }; var r2e = [{ name: "breadthfirst", impl: aB }, { name: "circle", impl: oB }, { name: "concentric", impl: iB }, { name: "cose", impl: dw }, { name: "grid", impl: lB }, { name: "null", impl: cS }, { name: "preset", impl: uB }, { name: "random", impl: cB }]; function dB(e) { this.options = e, this.notifications = 0; } var N$ = function() { }, M$ = function() { throw new Error("A headless instance can not render images"); }; dB.prototype = { recalculateRenderedStyle: N$, notify: function() { this.notifications++; }, init: N$, isHeadless: function() { return !0; }, png: M$, jpg: M$ }; var dS = {}; dS.arrowShapeWidth = 0.3; dS.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, y = f.y + c / 2 + p, x = v <= l && l <= m && g <= u && u <= y; return x; }, 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, y = m + f.y; return { x: g, y }; }, a = 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; }, o = 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) { kt(u) && (u = e[u]), e[l] = At({ 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 = o(a(this.points, f + 2 * v, h, p)), g = no(c, d, m); return g; }, roughCollide: n, draw: function(c, d, f, h) { var p = a(this.points, d, f, h); t.arrowShapeImpl("polygon")(c, p); }, spacing: function(c) { return 0; }, gap: i }, u); }; s("none", { collide: cb, roughCollide: cb, draw: Y4, spacing: WT, gap: WT }), 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 = a(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 = o(a(this.points, c + 2 * p, d, f)), m = o(a(this.pointsTee, c + 2 * p, d, f)), g = no(l, u, v) || no(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = a(this.points, u, c, d), p = a(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 = o(a(this.points, c + 2 * p, d, f)); return no(l, u, g) || m; }, draw: function(l, u, c, d, f) { var h = a(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 = o(a(this.points, c + 2 * p, d, f)), m = o(a(this.crossLinePts(c, h), c + 2 * p, d, f)), g = no(l, u, v) || no(l, u, m); return g; }, draw: function(l, u, c, d, f) { var h = a(this.points, u, c, d), p = a(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 np = {}; np.projectIntoViewport = function(e, t) { var n = this.cy, r = this.findContainerClientCoords(), a = r[0], o = r[1], i = r[4], s = n.pan(), l = n.zoom(), u = ((e - a) / i - s.x) / l, c = ((t - o) / i - s.y) / l; return [u, c]; }; np.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)); }, a = { left: r("padding-left"), right: r("padding-right"), top: r("padding-top"), bottom: r("padding-bottom") }, o = { 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 = a.left + a.right, u = a.top + a.bottom, c = o.left + o.right, d = t.width / (i + c), f = i - l, h = s - u, p = t.left + a.left + o.left, v = t.top + a.top + o.top; return this.containerBB = [p, v, f, h, d]; }; np.invalidateContainerClientCoordsCache = function() { this.containerBB = null; }; np.findNearestElement = function(e, t, n, r) { return this.findNearestElements(e, t, n, r)[0]; }; np.findNearestElements = function(e, t, n, r) { var a = this, o = this, i = o.getCachedZSortedEles(), s = [], l = o.cy.zoom(), u = o.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 T = 0; T < s.length; T++) if (s[T].isEdge()) { s[T] = S, p = S, h = _ ?? h; break; } } } else s.push(S), p = S, h = _ ?? h; } function g(S) { var _ = S.outerWidth() + 2 * d, T = S.outerHeight() + 2 * d, F = _ / 2, A = T / 2, I = S.position(), N = S.pstyle("corner-radius").value === "auto" ? "auto" : S.pstyle("corner-radius").pfValue, L = S._private.rscratch; if (I.x - F <= e && e <= I.x + F && I.y - A <= t && t <= I.y + A) { var z = o.nodeShapes[a.getNodeShape(S)]; if (z.checkPoint(e, t, 0, _, T, I.x, I.y, N, L)) return m(S, 0), !0; } } function y(S) { var _ = S._private, T = _.rscratch, F = S.pstyle("width").pfValue, A = S.pstyle("arrow-scale").value, I = F / 2 + c, N = I * I, L = I * 2, z = _.source, P = _.target, D; if (T.edgeType === "segments" || T.edgeType === "straight" || T.edgeType === "haystack") { for (var M = T.allpts, V = 0; V + 3 < M.length; V += 2) if (yge(e, t, M[V], M[V + 1], M[V + 2], M[V + 3], L) && N > (D = Cge(e, t, M[V], M[V + 1], M[V + 2], M[V + 3]))) return m(S, D), !0; } else if (T.edgeType === "bezier" || T.edgeType === "multibezier" || T.edgeType === "self" || T.edgeType === "compound") { for (var M = T.allpts, V = 0; V + 5 < T.allpts.length; V += 4) if (bge(e, t, M[V], M[V + 1], M[V + 2], M[V + 3], M[V + 4], M[V + 5], L) && N > (D = kge(e, t, M[V], M[V + 1], M[V + 2], M[V + 3], M[V + 4], M[V + 5]))) return m(S, D), !0; } for (var z = z || _.source, P = P || _.target, Q = a.getArrowWidth(F, A), X = [{ name: "source", x: T.arrowStartX, y: T.arrowStartY, angle: T.srcArrowAngle }, { name: "target", x: T.arrowEndX, y: T.arrowEndY, angle: T.tgtArrowAngle }, { name: "mid-source", x: T.midX, y: T.midY, angle: T.midsrcArrowAngle }, { name: "mid-target", x: T.midX, y: T.midY, angle: T.midtgtArrowAngle }], V = 0; V < X.length; V++) { var ee = X[V], ue = o.arrowShapes[S.pstyle(ee.name + "-arrow-shape").value], ve = S.pstyle("width").pfValue; if (ue.roughCollide(e, t, Q, ee.angle, { x: ee.x, y: ee.y }, ve, c) && ue.collide(e, t, Q, ee.angle, { x: ee.x, y: ee.y }, ve, c)) return m(S), !0; } u && s.length > 0 && (g(z), g(P)); } function x(S, _, T) { return Ii(S, _, T); } function w(S, _) { var T = S._private, F = f, A; _ ? A = _ + "-" : A = "", S.boundingBox(); var I = T.labelBounds[_ || "main"], N = S.pstyle(A + "label").value, L = S.pstyle("text-events").strValue === "yes"; if (!(!L || !N)) { var z = x(T.rscratch, "labelX", _), P = x(T.rscratch, "labelY", _), D = x(T.rscratch, "labelAngle", _), M = S.pstyle(A + "text-margin-x").pfValue, V = S.pstyle(A + "text-margin-y").pfValue, Q = I.x1 - F - M, X = I.x2 + F - M, ee = I.y1 - F - V, ue = I.y2 + F - V; if (D) { var ve = Math.cos(D), ge = Math.sin(D), se = function(Oe, Ne) { return Oe = Oe - z, Ne = Ne - P, { x: Oe * ve - Ne * ge + z, y: Oe * ge + Ne * ve + P }; }, ne = se(Q, ee), W = se(Q, ue), Y = se(X, ee), re = se(X, ue), we = [ // with the margin added after the rotation is applied ne.x + M, ne.y + V, Y.x + M, Y.y + V, re.x + M, re.y + V, W.x + M, W.y + V ]; if (no(e, t, we)) return m(S), !0; } else if (Pf(I, e, t)) return m(S), !0; } } for (var k = i.length - 1; k >= 0; k--) { var C = i[k]; C.isNode() ? g(C) || w(C) : y(C) || w(C) || w(C, "source") || w(C, "target"); } return s; }; np.getAllInBox = function(e, t, n, r) { var a = this.getCachedZSortedEles().interactive, o = [], 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 = ko({ x1: e, y1: t, x2: n, y2: r }), d = 0; d < a.length; d++) { var f = a[d]; if (f.isNode()) { var h = f, p = h.boundingBox({ includeNodes: !0, includeEdges: !1, includeLabels: !1 }); J4(c, p) && !wD(p, c) && o.push(h); } else { var v = f, m = v._private, g = m.rscratch; if (g.startX != null && g.startY != null && !Pf(c, g.startX, g.startY) || g.endX != null && g.endY != null && !Pf(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 y = m.rstyle.bezierPts || m.rstyle.linePts || m.rstyle.haystackPts, x = !0, w = 0; w < y.length; w++) if (!mge(c, y[w])) { x = !1; break; } x && o.push(v); } else (g.edgeType === "haystack" || g.edgeType === "straight") && o.push(v); } } return o; }; var yb = {}; yb.calculateArrowAngles = function(e) { var t = e._private.rscratch, n = t.edgeType === "haystack", r = t.edgeType === "bezier", a = t.edgeType === "multibezier", o = t.edgeType === "segments", i = t.edgeType === "compound", s = t.edgeType === "self", l, u, c, d, f, h, g, y; 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, y = t.midY, o) l = c - t.segpts[0], u = d - t.segpts[1]; else if (a || i || s || r) { var p = t.allpts, v = qr(p[0], p[2], p[4], 0.1), m = qr(p[1], p[3], p[5], 0.1); l = c - v, u = d - m; } else l = c - g, u = d - y; t.srcArrowAngle = e1(l, u); var g = t.midX, y = t.midY; if (n && (g = (c + f) / 2, y = (d + h) / 2), l = f - c, u = h - d, o) { var p = t.allpts; if (p.length / 2 % 2 === 0) { var x = p.length / 2, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } else if (t.isRound) l = t.midVector[1], u = -t.midVector[0]; else { var x = p.length / 2 - 1, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } } else if (a || i || s) { var p = t.allpts, k = t.ctrlpts, C, S, _, T; if (k.length / 2 % 2 === 0) { var F = p.length / 2 - 1, A = F + 2, I = A + 2; C = qr(p[F], p[A], p[I], 0), S = qr(p[F + 1], p[A + 1], p[I + 1], 0), _ = qr(p[F], p[A], p[I], 1e-4), T = qr(p[F + 1], p[A + 1], p[I + 1], 1e-4); } else { var A = p.length / 2 - 1, F = A - 2, I = A + 2; C = qr(p[F], p[A], p[I], 0.4999), S = qr(p[F + 1], p[A + 1], p[I + 1], 0.4999), _ = qr(p[F], p[A], p[I], 0.5), T = qr(p[F + 1], p[A + 1], p[I + 1], 0.5); } l = _ - C, u = T - S; } if (t.midtgtArrowAngle = e1(l, u), t.midDispX = l, t.midDispY = u, l *= -1, u *= -1, o) { var p = t.allpts; if (p.length / 2 % 2 !== 0 && !t.isRound) { var x = p.length / 2 - 1, N = x + 2; l = -(p[N] - p[x]), u = -(p[N + 1] - p[x + 1]); } } if (t.midsrcArrowAngle = e1(l, u), o) l = f - t.segpts[t.segpts.length - 2], u = h - t.segpts[t.segpts.length - 1]; else if (a || i || s || r) { var p = t.allpts, L = p.length, v = qr(p[L - 6], p[L - 4], p[L - 2], 0.9), m = qr(p[L - 5], p[L - 3], p[L - 1], 0.9); l = f - v, u = h - m; } else l = f - g, u = h - y; t.tgtArrowAngle = e1(l, u); }; yb.getArrowWidth = yb.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 u5, c5, as = {}, Vo = {}, D$, B$, zc, my, Ws, Tc, Mc, ns, Op, u1, pB, fB, d5, p5, R$, z$ = 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); }, a2e = 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; }, o2e = function(e, t, n, r, a) { if (e !== R$ ? z$(t, e, as) : a2e(Vo, as), z$(t, n, Vo), D$ = as.nx * Vo.ny - as.ny * Vo.nx, B$ = as.nx * Vo.nx - as.ny * -Vo.ny, Ws = Math.asin(Math.max(-1, Math.min(1, D$))), Math.abs(Ws) < 1e-6) { u5 = t.x, c5 = t.y, Mc = Op = 0; return; } zc = 1, my = !1, B$ < 0 ? Ws < 0 ? Ws = Math.PI + Ws : (Ws = Math.PI - Ws, zc = -1, my = !0) : Ws > 0 && (zc = -1, my = !0), t.radius !== void 0 ? Op = t.radius : Op = r, Tc = Ws / 2, u1 = Math.min(as.len / 2, Vo.len / 2), a ? (ns = Math.abs(Math.cos(Tc) * Op / Math.sin(Tc)), ns > u1 ? (ns = u1, Mc = Math.abs(ns * Math.sin(Tc) / Math.cos(Tc))) : Mc = Op) : (ns = Math.min(u1, Op), Mc = Math.abs(ns * Math.sin(Tc) / Math.cos(Tc))), d5 = t.x + Vo.nx * ns, p5 = t.y + Vo.ny * ns, u5 = d5 - Vo.ny * Mc * zc, c5 = p5 + Vo.nx * Mc * zc, pB = t.x + as.nx * ns, fB = t.y + as.ny * ns, R$ = t; }; function hB(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 pS(e, t, n, r) { var a = 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 } : (o2e(e, t, n, r, a), { cx: u5, cy: c5, radius: Mc, startX: pB, startY: fB, stopX: d5, stopY: p5, startAngle: as.ang + Math.PI / 2 * zc, endAngle: Vo.ang - Math.PI / 2 * zc, counterClockwise: my }); } var Ra = {}; Ra.findMidptPtsEtc = function(e, t) { var n = t.posPts, r = t.intersectionPts, a = t.vectorNormInverse, o, i = e.pstyle("source-endpoint"), s = e.pstyle("target-endpoint"), l = i.units != null && s.units != null, u = function(w, k, C, S) { var _ = S - k, T = C - w, F = Math.sqrt(T * T + _ * _); return { x: -_ / F, y: T / F }; }, c = e.pstyle("edge-distances").value; switch (c) { case "node-position": o = n; break; case "intersection": o = r; break; case "endpoints": { if (l) { var d = this.manualEndptToPx(e.source()[0], i), f = _i(d, 2), h = f[0], p = f[1], v = this.manualEndptToPx(e.target()[0], s), m = _i(v, 2), g = m[0], y = m[1], x = { x1: h, y1: p, x2: g, y2: y }; a = u(h, p, g, y), o = x; } else Fn("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).")), o = r; break; } } return { midptPts: o, vectorNormInverse: a }; }; Ra.findHaystackPoints = function(e) { for (var t = 0; t < e.length; t++) { var n = e[t], r = n._private, a = r.rscratch; if (!a.haystack) { var o = Math.random() * 2 * Math.PI; a.source = { x: Math.cos(o), y: Math.sin(o) }, o = Math.random() * 2 * Math.PI, a.target = { x: Math.cos(o), y: Math.sin(o) }; } 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; a.haystackPts = a.allpts = [a.source.x * c * v + l.x, a.source.y * f * v + l.y, a.target.x * d * v + u.x, a.target.y * h * v + u.y], a.midX = (a.allpts[0] + a.allpts[2]) / 2, a.midY = (a.allpts[1] + a.allpts[3]) / 2, a.edgeType = "haystack", a.haystack = !0, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n); } }; Ra.findSegmentsPoints = function(e, t) { var n = e._private.rscratch, r = e.pstyle("segment-weights"), a = e.pstyle("segment-distances"), o = e.pstyle("segment-radii"), i = e.pstyle("radius-type"), s = Math.min(r.pfValue.length, a.pfValue.length), l = o.pfValue[o.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 = a.pfValue[c], h = 1 - d, p = d, v = this.findMidptPtsEtc(e, t), m = v.midptPts, g = v.vectorNormInverse, y = { x: m.x1 * h + m.x2 * p, y: m.y1 * h + m.y2 * p }; n.segpts.push(y.x + g.x * f, y.y + g.y * f), n.radii.push(o.pfValue[c] !== void 0 ? o.pfValue[c] : l), n.isArcRadius.push((i.pfValue[c] !== void 0 ? i.pfValue[c] : u) === "arc-radius"); } }; Ra.findLoopPoints = function(e, t, n, r) { var a = e._private.rscratch, o = 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; a.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 = o[g] === void 0 ? o[g] = 0 : ++o[g], a.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)]; }; Ra.findCompoundLoopPoints = function(e, t, n, r) { var a = e._private.rscratch; a.edgeType = "compound"; var o = 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: o.x - s / 2, y: o.y - l / 2 }, y = { x: i.x - u / 2, y: i.y - c / 2 }, x = { x: Math.min(g.x, y.x), y: Math.min(g.y, y.y) }, w = 0.5, k = Math.max(w, Math.log(s * 0.01)), C = Math.max(w, Math.log(u * 0.01)); a.ctrlpts = [x.x, x.y - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * k, x.x - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * C, x.y]; }; Ra.findStraightEdgePoints = function(e) { e._private.rscratch.edgeType = "straight"; }; Ra.findBezierPoints = function(e, t, n, r, a) { var o = 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; o.edgeType = f ? "multibezier" : "bezier", o.ctrlpts = []; for (var h = 0; h < u; h++) { var p = (0.5 - t.eles.length / 2 + n) * i * (a ? -1 : 1), v = void 0, m = yD(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, y = 1 - d, x = d, w = this.findMidptPtsEtc(e, t), k = w.midptPts, C = w.vectorNormInverse, S = { x: k.x1 * y + k.x2 * x, y: k.y1 * y + k.y2 * x }; o.ctrlpts.push(S.x + C.x * g, S.y + C.y * g); } }; Ra.findTaxiPoints = function(e, t) { var n = e._private.rscratch; n.edgeType = "segments"; var r = "vertical", a = "horizontal", o = "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, y = g, x = e.pstyle("taxi-turn"), w = x.units === "%", k = x.pfValue, C = k < 0, S = e.pstyle("taxi-turn-min-distance").pfValue, _ = m ? (d + h) / 2 : 0, T = m ? (f + p) / 2 : 0, F = c.x2 - c.x1, A = c.y2 - c.y1, I = function(Ve, je) { return Ve > 0 ? Math.max(Ve - je, 0) : Math.min(Ve + je, 0); }, N = I(F, _), L = I(A, T), z = !1; y === u ? g = Math.abs(N) > Math.abs(L) ? a : r : y === l || y === s ? (g = r, z = !0) : (y === o || y === i) && (g = a, z = !0); var P = g === r, D = P ? L : N, M = P ? A : F, V = yD(M), Q = !1; !(z && (w || C)) && (y === s && M < 0 || y === l && M > 0 || y === o && M > 0 || y === i && M < 0) && (V *= -1, D = V * Math.abs(D), Q = !0); var X; if (w) { var ee = k < 0 ? 1 + k : k; X = ee * D; } else { var ue = k < 0 ? D : 0; X = ue + k * V; } var ve = function(Ve) { return Math.abs(Ve) < S || Math.abs(Ve) >= Math.abs(D); }, ge = ve(X), se = ve(Math.abs(D) - Math.abs(X)), ne = ge || se; if (ne && !Q) if (P) { var W = Math.abs(M) <= f / 2, Y = Math.abs(F) <= h / 2; if (W) { var re = (c.x1 + c.x2) / 2, we = c.y1, Oe = c.y2; n.segpts = [re, we, re, Oe]; } else if (Y) { var Ne = (c.y1 + c.y2) / 2, xe = c.x1, Fe = c.x2; n.segpts = [xe, Ne, Fe, Ne]; } else n.segpts = [c.x1, c.y2]; } else { var Se = Math.abs(M) <= d / 2, Pe = Math.abs(A) <= p / 2; if (Se) { var Me = (c.y1 + c.y2) / 2, He = c.x1, De = c.x2; n.segpts = [He, Me, De, Me]; } else if (Pe) { var Xe = (c.x1 + c.x2) / 2, Ge = c.y1, Ze = c.y2; n.segpts = [Xe, Ge, Xe, Ze]; } else n.segpts = [c.x2, c.y1]; } else if (P) { var E = c.y1 + X + (m ? f / 2 * V : 0), j = c.x1, le = c.x2; n.segpts = [j, E, le, E]; } else { var ce = c.x1 + X + (m ? d / 2 * V : 0), oe = c.y1, ke = c.y2; n.segpts = [ce, oe, ce, ke]; } if (n.isRound) { var fe = e.pstyle("taxi-radius").value, Ee = e.pstyle("radius-type").value[0] === "arc-radius"; n.radii = new Array(n.segpts.length / 2).fill(fe), n.isArcRadius = new Array(n.segpts.length / 2).fill(Ee); } }; Ra.tryToCorrectInvalidPoints = function(e, t) { var n = e._private.rscratch; if (n.edgeType === "bezier") { var r = t.srcPos, a = t.tgtPos, o = 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 = !ot(n.startX) || !ot(n.startY), m = !ot(n.arrowStartX) || !ot(n.arrowStartY), g = !ot(n.endX) || !ot(n.endY), y = !ot(n.arrowEndX) || !ot(n.arrowEndY), x = 3, w = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth, k = x * w, C = kd({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.startX, y: n.startY }), S = C < k, _ = kd({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.endX, y: n.endY }), T = _ < k, F = !1; if (v || m || S) { F = !0; var A = { // delta x: n.ctrlpts[0] - r.x, y: n.ctrlpts[1] - r.y }, I = Math.sqrt(A.x * A.x + A.y * A.y), N = { // normalised delta x: A.x / I, y: A.y / I }, L = Math.max(o, i), z = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + N.x * 2 * L, y: n.ctrlpts[1] + N.y * 2 * L }, P = u.intersectLine(r.x, r.y, o, i, z.x, z.y, 0, d, h); S ? (n.ctrlpts[0] = n.ctrlpts[0] + N.x * (k - C), n.ctrlpts[1] = n.ctrlpts[1] + N.y * (k - C)) : (n.ctrlpts[0] = P[0] + N.x * k, n.ctrlpts[1] = P[1] + N.y * k); } if (g || y || T) { F = !0; var D = { // delta x: n.ctrlpts[0] - a.x, y: n.ctrlpts[1] - a.y }, M = Math.sqrt(D.x * D.x + D.y * D.y), V = { // normalised delta x: D.x / M, y: D.y / M }, Q = Math.max(o, i), X = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + V.x * 2 * Q, y: n.ctrlpts[1] + V.y * 2 * Q }, ee = c.intersectLine(a.x, a.y, s, l, X.x, X.y, 0, f, p); T ? (n.ctrlpts[0] = n.ctrlpts[0] + V.x * (k - _), n.ctrlpts[1] = n.ctrlpts[1] + V.y * (k - _)) : (n.ctrlpts[0] = ee[0] + V.x * k, n.ctrlpts[1] = ee[1] + V.y * k); } F && this.findEndpoints(e); } }; Ra.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, a; 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, a = 0.5, t.midX = qr(t.allpts[r], t.allpts[r + 2], t.allpts[r + 4], a), t.midY = qr(t.allpts[r + 1], t.allpts[r + 3], t.allpts[r + 5], a)); } 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 o = 2; o + 3 < t.allpts.length; o += 2) { var i = t.radii[o / 2 - 1], s = t.isArcRadius[o / 2 - 1]; t.roundCorners.push(pS({ x: t.allpts[o - 2], y: t.allpts[o - 1] }, { x: t.allpts[o], y: t.allpts[o + 1], radius: i }, { x: t.allpts[o + 2], y: t.allpts[o + 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; } } } }; Ra.checkForInvalidEdgeWarning = function(e) { var t = e[0]._private.rscratch; t.nodesOverlap || ot(t.startX) && ot(t.startY) && ot(t.endX) && ot(t.endY) ? t.loggedErr = !1 : t.loggedErr || (t.loggedErr = !0, Fn("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.")); }; Ra.findEdgeControlPoints = function(e) { var t = this; if (!(!e || e.length === 0)) { for (var n = this, r = n.cy, a = r.hasCompoundNodes(), o = { map: new ds(), get: function(C) { var S = this.map.get(C[0]); return S != null ? S.get(C[1]) : null; }, set: function(C, S) { var _ = this.map.get(C[0]); _ == null && (_ = new ds(), this.map.set(C[0], _)), _.set(C[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(), y = [m, g].sort(), x = o.get(y); x == null && (x = { eles: [] }, o.set(y, x), i.push(y)), x.eles.push(u), f && (x.hasUnbundled = !0), h && (x.hasBezier = !0); } } for (var w = function(C) { var S = i[C], _ = o.get(S), T = void 0; if (!_.hasUnbundled) { var F = _.eles[0].parallelEdges().filter(function(le) { return le.isBundledBezier(); }); Z4(_.eles), F.forEach(function(le) { return _.eles.push(le); }), _.eles.sort(function(le, ce) { return le.poolIndex() - ce.poolIndex(); }); } var A = _.eles[0], I = A.source(), N = A.target(); if (I.poolIndex() > N.poolIndex()) { var L = I; I = N, N = L; } var z = _.srcPos = I.position(), P = _.tgtPos = N.position(), D = _.srcW = I.outerWidth(), M = _.srcH = I.outerHeight(), V = _.tgtW = N.outerWidth(), Q = _.tgtH = N.outerHeight(), X = _.srcShape = n.nodeShapes[t.getNodeShape(I)], ee = _.tgtShape = n.nodeShapes[t.getNodeShape(N)], ue = _.srcCornerRadius = I.pstyle("corner-radius").value === "auto" ? "auto" : I.pstyle("corner-radius").pfValue, ve = _.tgtCornerRadius = N.pstyle("corner-radius").value === "auto" ? "auto" : N.pstyle("corner-radius").pfValue, ge = _.tgtRs = N._private.rscratch, se = _.srcRs = I._private.rscratch; _.dirCounts = { north: 0, west: 0, south: 0, east: 0, northwest: 0, southwest: 0, northeast: 0, southeast: 0 }; for (var ne = 0; ne < _.eles.length; ne++) { var W = _.eles[ne], Y = W[0]._private.rscratch, re = W.pstyle("curve-style").value, we = re === "unbundled-bezier" || re.endsWith("segments") || re.endsWith("taxi"), Oe = !I.same(W.source()); if (!_.calculatedIntersection && I !== N && (_.hasBezier || _.hasUnbundled)) { _.calculatedIntersection = !0; var Ne = X.intersectLine(z.x, z.y, D, M, P.x, P.y, 0, ue, se), xe = _.srcIntn = Ne, Fe = ee.intersectLine(P.x, P.y, V, Q, z.x, z.y, 0, ve, ge), Se = _.tgtIntn = Fe, Pe = _.intersectionPts = { x1: Ne[0], x2: Fe[0], y1: Ne[1], y2: Fe[1] }, Me = _.posPts = { x1: z.x, x2: P.x, y1: z.y, y2: P.y }, He = Fe[1] - Ne[1], De = Fe[0] - Ne[0], Xe = Math.sqrt(De * De + He * He), Ge = _.vector = { x: De, y: He }, Ze = _.vectorNorm = { x: Ge.x / Xe, y: Ge.y / Xe }, E = { x: -Ze.y, y: Ze.x }; _.nodesOverlap = !ot(Xe) || ee.checkPoint(Ne[0], Ne[1], 0, V, Q, P.x, P.y, ve, ge) || X.checkPoint(Fe[0], Fe[1], 0, D, M, z.x, z.y, ue, se), _.vectorNormInverse = E, T = { nodesOverlap: _.nodesOverlap, dirCounts: _.dirCounts, calculatedIntersection: !0, hasBezier: _.hasBezier, hasUnbundled: _.hasUnbundled, eles: _.eles, srcPos: P, tgtPos: z, srcW: V, srcH: Q, tgtW: D, tgtH: M, srcIntn: Se, tgtIntn: xe, srcShape: ee, tgtShape: X, posPts: { x1: Me.x2, y1: Me.y2, x2: Me.x1, y2: Me.y1 }, intersectionPts: { x1: Pe.x2, y1: Pe.y2, x2: Pe.x1, y2: Pe.y1 }, vector: { x: -Ge.x, y: -Ge.y }, vectorNorm: { x: -Ze.x, y: -Ze.y }, vectorNormInverse: { x: -E.x, y: -E.y } }; } var j = Oe ? T : _; Y.nodesOverlap = j.nodesOverlap, Y.srcIntn = j.srcIntn, Y.tgtIntn = j.tgtIntn, Y.isRound = re.startsWith("round"), a && (I.isParent() || I.isChild() || N.isParent() || N.isChild()) && (I.parents().anySame(N) || N.parents().anySame(I) || I.same(N) && I.isParent()) ? t.findCompoundLoopPoints(W, j, ne, we) : I === N ? t.findLoopPoints(W, j, ne, we) : re.endsWith("segments") ? t.findSegmentsPoints(W, j) : re.endsWith("taxi") ? t.findTaxiPoints(W, j) : re === "straight" || !we && _.eles.length % 2 === 1 && ne === Math.floor(_.eles.length / 2) ? t.findStraightEdgePoints(W) : t.findBezierPoints(W, j, ne, we, Oe), t.findEndpoints(W), t.tryToCorrectInvalidPoints(W, j), t.checkForInvalidEdgeWarning(W), t.storeAllpts(W), t.storeEdgeProjections(W), t.calculateArrowAngles(W), t.recalculateEdgeLabelProjections(W), t.calculateLabelAngles(W); } }, k = 0; k < i.length; k++) w(k); this.findHaystackPoints(s); } }; function vB(e) { var t = []; if (e != null) { for (var n = 0; n < e.length; n += 2) { var r = e[n], a = e[n + 1]; t.push({ x: r, y: a }); } return t; } } Ra.getSegmentPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "segments") return this.recalculateRenderedStyle(e), vB(t.segpts); }; Ra.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), vB(t.ctrlpts); }; Ra.getEdgeMidpoint = function(e) { var t = e[0]._private.rscratch; return this.recalculateRenderedStyle(e), { x: t.midX, y: t.midY }; }; var Zg = {}; Zg.manualEndptToPx = function(e, t) { var n = this, r = e.position(), a = e.outerWidth(), o = 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] * a), t.units[1] === "%" && (s[1] = s[1] * o), 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(a, o), c = [r.x + Math.cos(l) * u, r.y + Math.sin(l) * u]; return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x, r.y, a, o, c[0], c[1], 0, e.pstyle("corner-radius").value === "auto" ? "auto" : e.pstyle("corner-radius").pfValue, i); } }; Zg.findEndpoints = function(e) { var t = this, n, r = e.source()[0], a = e.target()[0], o = r.position(), i = a.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 = a._private.rscratch, h = e.pstyle("curve-style").value, p = e._private.rscratch, v = p.edgeType, m = h === "taxi", g = v === "self" || v === "compound", y = v === "bezier" || v === "multibezier" || g, x = v !== "bezier", w = v === "straight" || v === "segments", k = v === "segments", C = y || x || w, S = g || m, _ = e.pstyle("source-endpoint"), T = S ? "outside-to-node" : _.value, F = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, A = e.pstyle("target-endpoint"), I = S ? "outside-to-node" : A.value, N = a.pstyle("corner-radius").value === "auto" ? "auto" : a.pstyle("corner-radius").pfValue; p.srcManEndpt = _, p.tgtManEndpt = A; var L, z, P, D; if (y) { var M = [p.ctrlpts[0], p.ctrlpts[1]], V = x ? [p.ctrlpts[p.ctrlpts.length - 2], p.ctrlpts[p.ctrlpts.length - 1]] : M; L = V, z = M; } else if (w) { var Q = k ? p.segpts.slice(0, 2) : [i.x, i.y], X = k ? p.segpts.slice(p.segpts.length - 2) : [o.x, o.y]; L = X, z = Q; } if (I === "inside-to-node") n = [i.x, i.y]; else if (A.units) n = this.manualEndptToPx(a, A); else if (I === "outside-to-line") n = p.tgtIntn; else if (I === "outside-to-node" || I === "outside-to-node-or-label" ? P = L : (I === "outside-to-line" || I === "outside-to-line-or-label") && (P = [o.x, o.y]), n = t.nodeShapes[this.getNodeShape(a)].intersectLine(i.x, i.y, a.outerWidth(), a.outerHeight(), P[0], P[1], 0, N, f), I === "outside-to-node-or-label" || I === "outside-to-line-or-label") { var ee = a._private.rscratch, ue = ee.labelWidth, ve = ee.labelHeight, ge = ee.labelX, se = ee.labelY, ne = ue / 2, W = ve / 2, Y = a.pstyle("text-valign").value; Y === "top" ? se -= W : Y === "bottom" && (se += W); var re = a.pstyle("text-halign").value; re === "left" ? ge -= ne : re === "right" && (ge += ne); var we = L0(P[0], P[1], [ge - ne, se - W, ge + ne, se - W, ge + ne, se + W, ge - ne, se + W], i.x, i.y); if (we.length > 0) { var Oe = o, Ne = Lc(Oe, Qp(n)), xe = Lc(Oe, Qp(we)), Fe = Ne; if (xe < Ne && (n = we, Fe = xe), we.length > 2) { var Se = Lc(Oe, { x: we[2], y: we[3] }); Se < Fe && (n = [we[2], we[3]]); } } } var Pe = t1(n, L, t.arrowShapes[s].spacing(e) + u), Me = t1(n, L, t.arrowShapes[s].gap(e) + u); if (p.endX = Me[0], p.endY = Me[1], p.arrowEndX = Pe[0], p.arrowEndY = Pe[1], T === "inside-to-node") n = [o.x, o.y]; else if (_.units) n = this.manualEndptToPx(r, _); else if (T === "outside-to-line") n = p.srcIntn; else if (T === "outside-to-node" || T === "outside-to-node-or-label" ? D = z : (T === "outside-to-line" || T === "outside-to-line-or-label") && (D = [i.x, i.y]), n = t.nodeShapes[this.getNodeShape(r)].intersectLine(o.x, o.y, r.outerWidth(), r.outerHeight(), D[0], D[1], 0, F, d), T === "outside-to-node-or-label" || T === "outside-to-line-or-label") { var He = r._private.rscratch, De = He.labelWidth, Xe = He.labelHeight, Ge = He.labelX, Ze = He.labelY, E = De / 2, j = Xe / 2, le = r.pstyle("text-valign").value; le === "top" ? Ze -= j : le === "bottom" && (Ze += j); var ce = r.pstyle("text-halign").value; ce === "left" ? Ge -= E : ce === "right" && (Ge += E); var oe = L0(D[0], D[1], [Ge - E, Ze - j, Ge + E, Ze - j, Ge + E, Ze + j, Ge - E, Ze + j], o.x, o.y); if (oe.length > 0) { var ke = i, fe = Lc(ke, Qp(n)), Ee = Lc(ke, Qp(oe)), Ve = fe; if (Ee < fe && (n = [oe[0], oe[1]], Ve = Ee), oe.length > 2) { var je = Lc(ke, { x: oe[2], y: oe[3] }); je < Ve && (n = [oe[2], oe[3]]); } } } var me = t1(n, z, t.arrowShapes[l].spacing(e) + c), Te = t1(n, z, t.arrowShapes[l].gap(e) + c); p.startX = Te[0], p.startY = Te[1], p.arrowStartX = me[0], p.arrowStartY = me[1], C && (!ot(p.startX) || !ot(p.startY) || !ot(p.endX) || !ot(p.endY) ? p.badLine = !0 : p.badLine = !1); }; Zg.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 }; } }; Zg.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 fS = {}; function i2e(e, t, n) { for (var r = function(l, u, c, d) { return qr(l, u, c, d); }, a = t._private, o = a.rstyle.bezierPts, i = 0; i < e.bezierProjPcts.length; i++) { var s = e.bezierProjPcts[i]; o.push({ x: r(n[0], n[2], n[4], s), y: r(n[1], n[3], n[5], s) }); } } fS.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 a = 0; a + 5 < n.allpts.length; a += 4) i2e(this, e, n.allpts.slice(a, a + 6)); } else if (r === "segments") for (var o = t.rstyle.linePts = [], a = 0; a + 1 < n.allpts.length; a += 2) o.push({ x: n.allpts[a], y: n.allpts[a + 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; }; fS.recalculateEdgeProjections = function(e) { this.findEdgeControlPoints(e); }; var Bs = {}; Bs.recalculateNodeLabelProjection = function(e) { var t = e.pstyle("label").strValue; if (!ju(t)) { var n, r, a = e._private, o = e.width(), i = e.height(), s = e.padding(), l = e.position(), u = e.pstyle("text-halign").strValue, c = e.pstyle("text-valign").strValue, d = a.rscratch, f = a.rstyle; switch (u) { case "left": n = l.x - o / 2 - s; break; case "right": n = l.x + o / 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 gB = function(e, t) { var n = Math.atan(t / e); return e === 0 && n < 0 && (n = n * -1), n; }, mB = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return gB(n, r); }, s2e = function(e, t, n, r) { var a = P0(0, r - 1e-3, 1), o = P0(0, r + 1e-3, 1), i = of(e, t, n, a), s = of(e, t, n, o); return mB(i, s); }; Bs.recalculateEdgeLabelProjections = function(e) { var t, n = e._private, r = n.rscratch, a = this, o = { mid: e.pstyle("label").strValue, source: e.pstyle("source-label").strValue, target: e.pstyle("target-label").strValue }; if (o.mid || o.source || o.target) { t = { x: r.midX, y: r.midY }; var i = function(c, d, f) { bu(n.rscratch, c, d, f), bu(n.rstyle, c, d, f); }; i("labelX", null, t.x), i("labelY", null, t.y); var s = gB(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 = a.bezierProjPcts.length; function y(S, _, T, F, A) { var I = kd(_, T), N = S.segments[S.segments.length - 1], L = { p0: _, p1: T, t0: F, t1: A, startDist: N ? N.startDist + N.length : 0, length: I }; S.segments.push(L), S.length += I; } for (var x = 0; x < d.length; x++) { var w = d[x], k = d[x - 1]; k && (w.startDist = k.startDist + k.length), y(w, w.p0, m[x * g], 0, a.bezierProjPcts[0]); for (var C = 0; C < g - 1; C++) y(w, m[x * g + C], m[x * g + C + 1], a.bezierProjPcts[C], a.bezierProjPcts[C + 1]); y(w, m[x * g + g - 1], w.p2, a.bezierProjPcts[g - 1], 1); } return c.cache = d; }, u = function(c) { var d, f = c === "source"; if (o[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, y = 0; y < p.length; y++) { for (var x = p[f ? y : p.length - 1 - y], w = 0; w < x.segments.length; w++) { var k = x.segments[f ? w : x.segments.length - 1 - w], C = y === p.length - 1 && w === x.segments.length - 1; if (m = g, g += k.length, g >= h || C) { v = { cp: x, segment: k }; break; } } if (v) break; } var S = v.cp, _ = v.segment, T = (h - m) / _.length, F = _.t1 - _.t0, A = f ? _.t0 + F * T : _.t1 - F * T; A = P0(0, A, 1), t = of(S.p0, S.p1, S.p2, A), d = s2e(S.p0, S.p1, S.p2, A); break; } case "straight": case "segments": case "haystack": { for (var I = 0, N, L, z, P, D = r.allpts.length, M = 0; M + 3 < D && (f ? (z = { x: r.allpts[M], y: r.allpts[M + 1] }, P = { x: r.allpts[M + 2], y: r.allpts[M + 3] }) : (z = { x: r.allpts[D - 2 - M], y: r.allpts[D - 1 - M] }, P = { x: r.allpts[D - 4 - M], y: r.allpts[D - 3 - M] }), N = kd(z, P), L = I, I += N, !(I >= h)); M += 2) ; var V = h - L, Q = V / N; Q = P0(0, Q, 1), t = pge(z, P, Q), d = mB(z, P); break; } } i("labelX", c, t.x), i("labelY", c, t.y), i("labelAutoAngle", c, d); } }; u("source"), u("target"), this.applyLabelDimensions(e); } }; Bs.applyLabelDimensions = function(e) { this.applyPrefixedLabelDimensions(e), e.isEdge() && (this.applyPrefixedLabelDimensions(e, "source"), this.applyPrefixedLabelDimensions(e, "target")); }; Bs.applyPrefixedLabelDimensions = function(e, t) { var n = e._private, r = this.getLabelText(e, t), a = this.calculateLabelDimensions(e, r), o = e.pstyle("line-height").pfValue, i = e.pstyle("text-wrap").strValue, s = Ii(n.rscratch, "labelWrapCachedLines", t) || [], l = i !== "wrap" ? 1 : Math.max(s.length, 1), u = a.height / l, c = u * o, d = a.width, f = a.height + (l - 1) * (o - 1) * u; bu(n.rstyle, "labelWidth", t, d), bu(n.rscratch, "labelWidth", t, d), bu(n.rstyle, "labelHeight", t, f), bu(n.rscratch, "labelHeight", t, f), bu(n.rscratch, "labelLineHeight", t, c); }; Bs.getLabelText = function(e, t) { var n = e._private, r = t ? t + "-" : "", a = e.pstyle(r + "label").strValue, o = e.pstyle("text-transform").value, i = function(ee, ue) { return ue ? (bu(n.rscratch, ee, t, ue), ue) : Ii(n.rscratch, ee, t); }; if (!a) return ""; o == "none" || (o == "uppercase" ? a = a.toUpperCase() : o == "lowercase" && (a = a.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 = a.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], y = this.calculateLabelDimensions(e, g), x = y.width; if (h) { var w = g.split("").join(u); g = w; } if (x > d) { var k = g.matchAll(v), C = "", S = 0, _ = eD(k), T; try { for (_.s(); !(T = _.n()).done; ) { var F = T.value, A = F[0], I = g.substring(S, F.index); S = F.index + A.length; var N = C.length === 0 ? I : C + I + A, L = this.calculateLabelDimensions(e, N), z = L.width; z <= d ? C += I + A : (C && p.push(C), C = I + A); } } catch (ee) { _.e(ee); } finally { _.f(); } C.match(/^[\s\u200b]+$/) || p.push(C); } else p.push(g); } i("labelWrapCachedLines", p), a = i("labelWrapCachedText", p.join(` `)), i("labelWrapKey", l); } else if (s === "ellipsis") { var P = e.pstyle("text-max-width").pfValue, D = "", M = "…", V = !1; if (this.calculateLabelDimensions(e, a).width < P) return a; for (var Q = 0; Q < a.length; Q++) { var X = this.calculateLabelDimensions(e, D + a[Q] + M).width; if (X > P) break; D += a[Q], Q === a.length - 1 && (V = !0); } return V || (D += M), D; } return a; }; Bs.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; }; Bs.calculateLabelDimensions = function(e, t) { var n = this, r = n.cy.window(), a = r.document, o = xd(t, e._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[o]; 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 = a.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, y = t.split(` `), x = 0; x < y.length; x++) { var w = y[x], k = p.measureText(w), C = Math.ceil(k.width), S = c; m = Math.max(C, m), g += S; } return m += l, g += l, i[o] = { width: m, height: g }; }; Bs.calculateLabelAngle = function(e, t) { var n = e._private, r = n.rscratch, a = e.isEdge(), o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = i.strValue; return s === "none" ? 0 : a && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue; }; Bs.calculateLabelAngles = function(e) { var t = this, n = e.isEdge(), r = e._private, a = r.rscratch; a.labelAngle = t.calculateLabelAngle(e), n && (a.sourceLabelAngle = t.calculateLabelAngle(e, "source"), a.targetLabelAngle = t.calculateLabelAngle(e, "target")); }; var yB = {}, V$ = 28, j$ = !1; yB.getNodeShape = function(e) { var t = this, n = e.pstyle("shape").value; if (n === "cutrectangle" && (e.width() < V$ || e.height() < V$)) return j$ || (Fn("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), j$ = !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 pw = {}; pw.registerCalculationListeners = function() { var e = this.cy, t = e.collection(), n = this, r = function(o) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; if (t.merge(o), i) for (var s = 0; s < o.length; s++) { var l = o[s], u = l._private, c = u.rstyle; c.clean = !1, c.cleanConnected = !1; } }; n.binder(e).on("bounds.* dirty.*", function(o) { var i = o.target; r(i); }).on("style.* background.*", function(o) { var i = o.target; r(i, !1); }); var a = function(o) { if (o) { 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(o, t); } n.recalculateRenderedStyle(t), t = e.collection(); } }; n.flushRenderedStyleQueue = function() { a(!0); }, n.beforeRender(a, n.beforeRenderPriorities.eleCalcs); }; pw.onUpdateEleCalcs = function(e) { var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; t.push(e); }; pw.recalculateRenderedStyle = function(e, t) { var n = function(x) { return x._private.rstyle.cleanConnected; }, r = [], a = []; if (!this.destroyed) { t === void 0 && (t = !0); for (var o = 0; o < e.length; o++) { var i = e[o], 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" ? a.push(i) : r.push(i), l.clean = !0); } for (var u = 0; u < a.length; u++) { var c = a[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, y = m.rscratch; g.srcX = y.arrowStartX, g.srcY = y.arrowStartY, g.tgtX = y.arrowEndX, g.tgtY = y.arrowEndY, g.midX = y.midX, g.midY = y.midY, g.labelAngle = y.labelAngle, g.sourceLabelAngle = y.sourceLabelAngle, g.targetLabelAngle = y.targetLabelAngle; } } }; var fw = {}; fw.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], a = r._private.rscratch; r.grabbed() && !r.isParent() ? t.push(r) : a.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); } } }; fw.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; fw.getCachedZSortedEles = function(e) { if (e || !this.cachedZSortedEles) { var t = this.cy.mutableElements().toArray(); t.sort(tB), t.interactive = t.filter(function(n) { return n.interactive(); }), this.cachedZSortedEles = t, this.updateCachedGrabbedEles(); } else t = this.cachedZSortedEles; return t; }; var bB = {}; [np, yb, Ra, Zg, fS, Bs, yB, pw, fw].forEach(function(e) { At(bB, e); }); var wB = {}; wB.getCachedImage = function(e, t, n) { var r = this, a = r.imageCache = r.imageCache || {}, o = a[e]; if (o) return o.image.complete || o.image.addEventListener("load", n), o.image; o = a[e] = a[e] || {}; var i = o.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 Ch = {}; Ch.registerBinding = function(e, t, n, r) { var a = Array.prototype.slice.apply(arguments, [1]), o = this.binder(e); return o.on.apply(o, a); }; Ch.binder = function(e) { var t = this, n = t.cy.window(), r = e === n || e === n.document || e === n.document.body || Fve(e); if (t.supportsPassiveEvents == null) { var a = !1; try { var o = Object.defineProperty({}, "passive", { get: function() { return a = !0, !0; } }); n.addEventListener("test", null, o); } catch { } t.supportsPassiveEvents = a; } 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 }; }; Ch.nodeIsDraggable = function(e) { return e && e.isNode() && !e.locked() && e.grabbable(); }; Ch.nodeIsGrabbable = function(e) { return this.nodeIsDraggable(e) && e.interactive(); }; Ch.load = function() { var e = this, t = e.cy.window(), n = function(E) { return E.selected(); }, r = function(E, j, le, ce) { E == null && (E = e.cy); for (var oe = 0; oe < j.length; oe++) { var ke = j[oe]; E.emit({ originalEvent: le, type: ke, position: ce }); } }, a = function(E) { return E.shiftKey || E.metaKey || E.ctrlKey; }, o = function(E, j) { var le = !0; if (e.cy.hasCompoundNodes() && E && E.pannable()) for (var ce = 0; j && ce < j.length; ce++) { var E = j[ce]; if (E.isNode() && E.isParent() && !E.pannable()) { le = !1; break; } } else le = !0; return le; }, i = function(E) { E[0]._private.grabbed = !0; }, s = function(E) { E[0]._private.grabbed = !1; }, l = function(E) { E[0]._private.rscratch.inDragLayer = !0; }, u = function(E) { E[0]._private.rscratch.inDragLayer = !1; }, c = function(E) { E[0]._private.rscratch.isGrabTarget = !0; }, d = function(E) { E[0]._private.rscratch.isGrabTarget = !1; }, f = function(E, j) { var le = j.addToList, ce = le.has(E); !ce && E.grabbable() && !E.locked() && (le.merge(E), i(E)); }, h = function(E, j) { if (E.cy().hasCompoundNodes() && !(j.inDragLayer == null && j.addToList == null)) { var le = E.descendants(); j.inDragLayer && (le.forEach(l), le.connectedEdges().forEach(l)), j.addToList && f(le, j); } }, p = function(E, j) { j = j || {}; var le = E.cy().hasCompoundNodes(); j.inDragLayer && (E.forEach(l), E.neighborhood().stdFilter(function(ce) { return !le || ce.isEdge(); }).forEach(l)), j.addToList && E.forEach(function(ce) { f(ce, j); }), h(E, j), g(E, { inDragLayer: j.inDragLayer }), e.updateCachedGrabbedEles(); }, v = p, m = function(E) { E && (e.getCachedZSortedEles().forEach(function(j) { s(j), u(j), d(j); }), e.updateCachedGrabbedEles()); }, g = function(E, j) { if (!(j.inDragLayer == null && j.addToList == null) && E.cy().hasCompoundNodes()) { var le = E.ancestors().orphans(); if (!le.same(E)) { var ce = le.descendants().spawnSelf().merge(le).unmerge(E).unmerge(E.descendants()), oe = ce.connectedEdges(); j.inDragLayer && (oe.forEach(l), ce.forEach(l)), j.addToList && ce.forEach(function(ke) { f(ke, j); }); } } }, y = function() { document.activeElement != null && document.activeElement.blur != null && document.activeElement.blur(); }, x = typeof MutationObserver < "u", w = typeof ResizeObserver < "u"; x ? (e.removeObserver = new MutationObserver(function(E) { for (var j = 0; j < E.length; j++) { var le = E[j], ce = le.removedNodes; if (ce) for (var oe = 0; oe < ce.length; oe++) { var ke = ce[oe]; if (ke === e.container) { e.destroy(); break; } } } }), e.container.parentNode && e.removeObserver.observe(e.container.parentNode, { childList: !0 })) : e.registerBinding(e.container, "DOMNodeRemoved", function(E) { e.destroy(); }); var k = Q2(function() { e.cy.resize(); }, 100); x && (e.styleObserver = new MutationObserver(k), e.styleObserver.observe(e.container, { attributes: !0 })), e.registerBinding(t, "resize", k), w && (e.resizeObserver = new ResizeObserver(k), e.resizeObserver.observe(e.container)); var C = function(E, j) { for (; E != null; ) j(E), E = E.parentNode; }, S = function() { e.invalidateContainerClientCoordsCache(); }; C(e.container, function(E) { e.registerBinding(E, "transitionend", S), e.registerBinding(E, "animationend", S), e.registerBinding(E, "scroll", S); }), e.registerBinding(e.container, "contextmenu", function(E) { E.preventDefault(); }); var _ = function() { return e.selection[4] !== 0; }, T = function(E) { for (var j = e.findContainerClientCoords(), le = j[0], ce = j[1], oe = j[2], ke = j[3], fe = E.touches ? E.touches : [E], Ee = !1, Ve = 0; Ve < fe.length; Ve++) { var je = fe[Ve]; if (le <= je.clientX && je.clientX <= le + oe && ce <= je.clientY && je.clientY <= ce + ke) { Ee = !0; break; } } if (!Ee) return !1; for (var me = e.container, Te = E.target, Ce = Te.parentNode, Le = !1; Ce; ) { if (Ce === me) { Le = !0; break; } Ce = Ce.parentNode; } return !!Le; }; e.registerBinding(e.container, "mousedown", function(E) { if (T(E) && !(e.hoverData.which === 1 && E.which !== 1)) { E.preventDefault(), y(), e.hoverData.capture = !0, e.hoverData.which = E.which; var j = e.cy, le = [E.clientX, E.clientY], ce = e.projectIntoViewport(le[0], le[1]), oe = e.selection, ke = e.findNearestElements(ce[0], ce[1], !0, !1), fe = ke[0], Ee = e.dragData.possibleDragElements; e.hoverData.mdownPos = ce, e.hoverData.mdownGPos = le; var Ve = function() { e.hoverData.tapholdCancelled = !1, clearTimeout(e.hoverData.tapholdTimeout), e.hoverData.tapholdTimeout = setTimeout(function() { if (!e.hoverData.tapholdCancelled) { var Le = e.hoverData.down; Le ? Le.emit({ originalEvent: E, type: "taphold", position: { x: ce[0], y: ce[1] } }) : j.emit({ originalEvent: E, type: "taphold", position: { x: ce[0], y: ce[1] } }); } }, e.tapholdDuration); }; if (E.which == 3) { e.hoverData.cxtStarted = !0; var je = { originalEvent: E, type: "cxttapstart", position: { x: ce[0], y: ce[1] } }; fe ? (fe.activate(), fe.emit(je), e.hoverData.down = fe) : j.emit(je), e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e.hoverData.cxtDragged = !1; } else if (E.which == 1) { fe && fe.activate(); { if (fe != null && e.nodeIsGrabbable(fe)) { var me = function(Le) { return { originalEvent: E, type: Le, position: { x: ce[0], y: ce[1] } }; }, Te = function(Le) { Le.emit(me("grab")); }; if (c(fe), !fe.selected()) Ee = e.dragData.possibleDragElements = j.collection(), v(fe, { addToList: Ee }), fe.emit(me("grabon")).emit(me("grab")); else { Ee = e.dragData.possibleDragElements = j.collection(); var Ce = j.$(function(Le) { return Le.isNode() && Le.selected() && e.nodeIsGrabbable(Le); }); p(Ce, { addToList: Ee }), fe.emit(me("grabon")), Ce.forEach(Te); } e.redrawHint("eles", !0), e.redrawHint("drag", !0); } e.hoverData.down = fe, e.hoverData.downs = ke, e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); } r(fe, ["mousedown", "tapstart", "vmousedown"], E, { x: ce[0], y: ce[1] }), fe == null ? (oe[4] = 1, e.data.bgActivePosistion = { x: ce[0], y: ce[1] }, e.redrawHint("select", !0), e.redraw()) : fe.pannable() && (oe[4] = 1), Ve(); } oe[0] = oe[2] = ce[0], oe[1] = oe[3] = ce[1]; } }, !1), e.registerBinding(t, "mousemove", function(E) { var j = e.hoverData.capture; if (!(!j && !T(E))) { var le = !1, ce = e.cy, oe = ce.zoom(), ke = [E.clientX, E.clientY], fe = e.projectIntoViewport(ke[0], ke[1]), Ee = e.hoverData.mdownPos, Ve = e.hoverData.mdownGPos, je = e.selection, me = null; !e.hoverData.draggingEles && !e.hoverData.dragging && !e.hoverData.selecting && (me = e.findNearestElement(fe[0], fe[1], !0, !1)); var Te = e.hoverData.last, Ce = e.hoverData.down, Le = [fe[0] - je[2], fe[1] - je[3]], bt = e.dragData.possibleDragElements, pt; if (Ve) { var Tt = ke[0] - Ve[0], wt = Tt * Tt, St = ke[1] - Ve[1], rn = St * St, Bt = wt + rn; e.hoverData.isOverThresholdDrag = pt = Bt >= e.desktopTapThreshold2; } var Gt = a(E); pt && (e.hoverData.tapholdCancelled = !0); var sn = function() { var _n = e.hoverData.dragDelta = e.hoverData.dragDelta || []; _n.length === 0 ? (_n.push(Le[0]), _n.push(Le[1])) : (_n[0] += Le[0], _n[1] += Le[1]); }; le = !0, r(me, ["mousemove", "vmousemove", "tapdrag"], E, { x: fe[0], y: fe[1] }); var an = function() { e.data.bgActivePosistion = void 0, e.hoverData.selecting || ce.emit({ originalEvent: E, type: "boxstart", position: { x: fe[0], y: fe[1] } }), je[4] = 1, e.hoverData.selecting = !0, e.redrawHint("select", !0), e.redraw(); }; if (e.hoverData.which === 3) { if (pt) { var Qt = { originalEvent: E, type: "cxtdrag", position: { x: fe[0], y: fe[1] } }; Ce ? Ce.emit(Qt) : ce.emit(Qt), e.hoverData.cxtDragged = !0, (!e.hoverData.cxtOver || me !== e.hoverData.cxtOver) && (e.hoverData.cxtOver && e.hoverData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: fe[0], y: fe[1] } }), e.hoverData.cxtOver = me, me && me.emit({ originalEvent: E, type: "cxtdragover", position: { x: fe[0], y: fe[1] } })); } } else if (e.hoverData.dragging) { if (le = !0, ce.panningEnabled() && ce.userPanningEnabled()) { var Sn; if (e.hoverData.justStartedPan) { var En = e.hoverData.mdownPos; Sn = { x: (fe[0] - En[0]) * oe, y: (fe[1] - En[1]) * oe }, e.hoverData.justStartedPan = !1; } else Sn = { x: Le[0] * oe, y: Le[1] * oe }; ce.panBy(Sn), ce.emit("dragpan"), e.hoverData.dragged = !0; } fe = e.projectIntoViewport(E.clientX, E.clientY); } else if (je[4] == 1 && (Ce == null || Ce.pannable())) { if (pt) { if (!e.hoverData.dragging && ce.boxSelectionEnabled() && (Gt || !ce.panningEnabled() || !ce.userPanningEnabled())) an(); else if (!e.hoverData.selecting && ce.panningEnabled() && ce.userPanningEnabled()) { var pn = o(Ce, e.hoverData.downs); pn && (e.hoverData.dragging = !0, e.hoverData.justStartedPan = !0, je[4] = 0, e.data.bgActivePosistion = Qp(Ee), e.redrawHint("select", !0), e.redraw()); } Ce && Ce.pannable() && Ce.active() && Ce.unactivate(); } } else { if (Ce && Ce.pannable() && Ce.active() && Ce.unactivate(), (!Ce || !Ce.grabbed()) && me != Te && (Te && r(Te, ["mouseout", "tapdragout"], E, { x: fe[0], y: fe[1] }), me && r(me, ["mouseover", "tapdragover"], E, { x: fe[0], y: fe[1] }), e.hoverData.last = me), Ce) if (pt) { if (ce.boxSelectionEnabled() && Gt) Ce && Ce.grabbed() && (m(bt), Ce.emit("freeon"), bt.emit("free"), e.dragData.didDrag && (Ce.emit("dragfreeon"), bt.emit("dragfree"))), an(); else if (Ce && Ce.grabbed() && e.nodeIsDraggable(Ce)) { var Et = !e.dragData.didDrag; Et && e.redrawHint("eles", !0), e.dragData.didDrag = !0, e.hoverData.draggingEles || p(bt, { inDragLayer: !0 }); var Rt = { x: 0, y: 0 }; if (ot(Le[0]) && ot(Le[1]) && (Rt.x += Le[0], Rt.y += Le[1], Et)) { var qt = e.hoverData.dragDelta; qt && ot(qt[0]) && ot(qt[1]) && (Rt.x += qt[0], Rt.y += qt[1]); } e.hoverData.draggingEles = !0, bt.silentShift(Rt).emit("position drag"), e.redrawHint("drag", !0), e.redraw(); } } else sn(); le = !0; } if (je[2] = fe[0], je[3] = fe[1], le) return E.stopPropagation && E.stopPropagation(), E.preventDefault && E.preventDefault(), !1; } }, !1); var F, A, I; e.registerBinding(t, "mouseup", function(E) { if (!(e.hoverData.which === 1 && E.which !== 1 && e.hoverData.capture)) { var j = e.hoverData.capture; if (j) { e.hoverData.capture = !1; var le = e.cy, ce = e.projectIntoViewport(E.clientX, E.clientY), oe = e.selection, ke = e.findNearestElement(ce[0], ce[1], !0, !1), fe = e.dragData.possibleDragElements, Ee = e.hoverData.down, Ve = a(E); if (e.data.bgActivePosistion && (e.redrawHint("select", !0), e.redraw()), e.hoverData.tapholdCancelled = !0, e.data.bgActivePosistion = void 0, Ee && Ee.unactivate(), e.hoverData.which === 3) { var je = { originalEvent: E, type: "cxttapend", position: { x: ce[0], y: ce[1] } }; if (Ee ? Ee.emit(je) : le.emit(je), !e.hoverData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: ce[0], y: ce[1] } }; Ee ? Ee.emit(me) : le.emit(me); } e.hoverData.cxtDragged = !1, e.hoverData.which = null; } else if (e.hoverData.which === 1) { if (r(ke, ["mouseup", "tapend", "vmouseup"], E, { x: ce[0], y: ce[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(Ee, ["click", "tap", "vclick"], E, { x: ce[0], y: ce[1] }), A = !1, E.timeStamp - I <= le.multiClickDebounceTime() ? (F && clearTimeout(F), A = !0, I = null, r(Ee, ["dblclick", "dbltap", "vdblclick"], E, { x: ce[0], y: ce[1] })) : (F = setTimeout(function() { A || r(Ee, ["oneclick", "onetap", "voneclick"], E, { x: ce[0], y: ce[1] }); }, le.multiClickDebounceTime()), I = E.timeStamp)), Ee == null && !e.dragData.didDrag && !e.hoverData.selecting && !e.hoverData.dragged && !a(E) && (le.$(n).unselect(["tapunselect"]), fe.length > 0 && e.redrawHint("eles", !0), e.dragData.possibleDragElements = fe = le.collection()), ke == Ee && !e.dragData.didDrag && !e.hoverData.selecting && ke != null && ke._private.selectable && (e.hoverData.dragging || (le.selectionType() === "additive" || Ve ? ke.selected() ? ke.unselect(["tapunselect"]) : ke.select(["tapselect"]) : Ve || (le.$(n).unmerge(ke).unselect(["tapunselect"]), ke.select(["tapselect"]))), e.redrawHint("eles", !0)), e.hoverData.selecting) { var Te = le.collection(e.getAllInBox(oe[0], oe[1], oe[2], oe[3])); e.redrawHint("select", !0), Te.length > 0 && e.redrawHint("eles", !0), le.emit({ type: "boxend", originalEvent: E, position: { x: ce[0], y: ce[1] } }); var Ce = function(bt) { return bt.selectable() && !bt.selected(); }; le.selectionType() === "additive" || Ve || le.$(n).unmerge(Te).unselect(), Te.emit("box").stdFilter(Ce).select().emit("boxselect"), e.redraw(); } if (e.hoverData.dragging && (e.hoverData.dragging = !1, e.redrawHint("select", !0), e.redrawHint("eles", !0), e.redraw()), !oe[4]) { e.redrawHint("drag", !0), e.redrawHint("eles", !0); var Le = Ee && Ee.grabbed(); m(fe), Le && (Ee.emit("freeon"), fe.emit("free"), e.dragData.didDrag && (Ee.emit("dragfreeon"), fe.emit("dragfree"))); } } oe[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 N = function(E) { if (!e.scrollingPage) { var j = e.cy, le = j.zoom(), ce = j.pan(), oe = e.projectIntoViewport(E.clientX, E.clientY), ke = [oe[0] * le + ce.x, oe[1] * le + ce.y]; if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || _()) { E.preventDefault(); return; } if (j.panningEnabled() && j.userPanningEnabled() && j.zoomingEnabled() && j.userZoomingEnabled()) { E.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 fe; E.deltaY != null ? fe = E.deltaY / -250 : E.wheelDeltaY != null ? fe = E.wheelDeltaY / 1e3 : fe = E.wheelDelta / 1e3, fe = fe * e.wheelSensitivity; var Ee = E.deltaMode === 1; Ee && (fe *= 33); var Ve = j.zoom() * Math.pow(10, fe); E.type === "gesturechange" && (Ve = e.gestureStartZoom * E.scale), j.zoom({ level: Ve, renderedPosition: { x: ke[0], y: ke[1] } }), j.emit(E.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); } } }; e.registerBinding(e.container, "wheel", N, !0), e.registerBinding(t, "scroll", function(E) { e.scrollingPage = !0, clearTimeout(e.scrollingPageTimeout), e.scrollingPageTimeout = setTimeout(function() { e.scrollingPage = !1; }, 250); }, !0), e.registerBinding(e.container, "gesturestart", function(E) { e.gestureStartZoom = e.cy.zoom(), e.hasTouchStarted || E.preventDefault(); }, !0), e.registerBinding(e.container, "gesturechange", function(E) { e.hasTouchStarted || N(E); }, !0), e.registerBinding(e.container, "mouseout", function(E) { var j = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseout", position: { x: j[0], y: j[1] } }); }, !1), e.registerBinding(e.container, "mouseover", function(E) { var j = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseover", position: { x: j[0], y: j[1] } }); }, !1); var L, z, P, D, M, V, Q, X, ee, ue, ve, ge, se, ne = function(E, j, le, ce) { return Math.sqrt((le - E) * (le - E) + (ce - j) * (ce - j)); }, W = function(E, j, le, ce) { return (le - E) * (le - E) + (ce - j) * (ce - j); }, Y; e.registerBinding(e.container, "touchstart", Y = function(E) { if (e.hasTouchStarted = !0, !!T(E)) { y(), e.touchData.capture = !0, e.data.bgActivePosistion = void 0; var j = e.cy, le = e.touchData.now, ce = e.touchData.earlier; if (E.touches[0]) { var oe = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); le[0] = oe[0], le[1] = oe[1]; } if (E.touches[1]) { var oe = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); le[2] = oe[0], le[3] = oe[1]; } if (E.touches[2]) { var oe = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); le[4] = oe[0], le[5] = oe[1]; } if (E.touches[1]) { e.touchData.singleTouchMoved = !0, m(e.dragData.touchDragEles); var ke = e.findContainerClientCoords(); ee = ke[0], ue = ke[1], ve = ke[2], ge = ke[3], L = E.touches[0].clientX - ee, z = E.touches[0].clientY - ue, P = E.touches[1].clientX - ee, D = E.touches[1].clientY - ue, se = 0 <= L && L <= ve && 0 <= P && P <= ve && 0 <= z && z <= ge && 0 <= D && D <= ge; var fe = j.pan(), Ee = j.zoom(); M = ne(L, z, P, D), V = W(L, z, P, D), Q = [(L + P) / 2, (z + D) / 2], X = [(Q[0] - fe.x) / Ee, (Q[1] - fe.y) / Ee]; var Ve = 200, je = Ve * Ve; if (V < je && !E.touches[2]) { var me = e.findNearestElement(le[0], le[1], !0, !0), Te = e.findNearestElement(le[2], le[3], !0, !0); me && me.isNode() ? (me.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[1] } }), e.touchData.start = me) : Te && Te.isNode() ? (Te.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[1] } }), e.touchData.start = Te) : j.emit({ originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[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 (E.touches[2]) j.boxSelectionEnabled() && E.preventDefault(); else if (!E.touches[1] && E.touches[0]) { var Ce = e.findNearestElements(le[0], le[1], !0, !0), Le = Ce[0]; if (Le != null && (Le.activate(), e.touchData.start = Le, e.touchData.starts = Ce, e.nodeIsGrabbable(Le))) { var bt = e.dragData.touchDragEles = j.collection(), pt = null; e.redrawHint("eles", !0), e.redrawHint("drag", !0), Le.selected() ? (pt = j.$(function(Bt) { return Bt.selected() && e.nodeIsGrabbable(Bt); }), p(pt, { addToList: bt })) : v(Le, { addToList: bt }), c(Le); var Tt = function(Bt) { return { originalEvent: E, type: Bt, position: { x: le[0], y: le[1] } }; }; Le.emit(Tt("grabon")), pt ? pt.forEach(function(Bt) { Bt.emit(Tt("grab")); }) : Le.emit(Tt("grab")); } r(Le, ["touchstart", "tapstart", "vmousedown"], E, { x: le[0], y: le[1] }), Le == null && (e.data.bgActivePosistion = { x: oe[0], y: oe[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"], E, { x: le[0], y: le[1] }); }, e.tapholdDuration); } if (E.touches.length >= 1) { for (var wt = e.touchData.startPosition = [null, null, null, null, null, null], St = 0; St < le.length; St++) wt[St] = ce[St] = le[St]; var rn = E.touches[0]; e.touchData.startGPosition = [rn.clientX, rn.clientY]; } } }, !1); var re; e.registerBinding(t, "touchmove", re = function(E) { var j = e.touchData.capture; if (!(!j && !T(E))) { var le = e.selection, ce = e.cy, oe = e.touchData.now, ke = e.touchData.earlier, fe = ce.zoom(); if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); oe[0] = Ee[0], oe[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); oe[2] = Ee[0], oe[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); oe[4] = Ee[0], oe[5] = Ee[1]; } var Ve = e.touchData.startGPosition, je; if (j && E.touches[0] && Ve) { for (var me = [], Te = 0; Te < oe.length; Te++) me[Te] = oe[Te] - ke[Te]; var Ce = E.touches[0].clientX - Ve[0], Le = Ce * Ce, bt = E.touches[0].clientY - Ve[1], pt = bt * bt, Tt = Le + pt; je = Tt >= e.touchTapThreshold2; } if (j && e.touchData.cxt) { E.preventDefault(); var wt = E.touches[0].clientX - ee, St = E.touches[0].clientY - ue, rn = E.touches[1].clientX - ee, Bt = E.touches[1].clientY - ue, Gt = W(wt, St, rn, Bt), sn = Gt / V, an = 150, Qt = an * an, Sn = 1.5, En = Sn * Sn; if (sn >= En || Gt >= Qt) { e.touchData.cxt = !1, e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var pn = { originalEvent: E, type: "cxttapend", position: { x: oe[0], y: oe[1] } }; e.touchData.start ? (e.touchData.start.unactivate().emit(pn), e.touchData.start = null) : ce.emit(pn); } } if (j && e.touchData.cxt) { var pn = { originalEvent: E, type: "cxtdrag", position: { x: oe[0], y: oe[1] } }; e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.touchData.start ? e.touchData.start.emit(pn) : ce.emit(pn), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxtDragged = !0; var Et = e.findNearestElement(oe[0], oe[1], !0, !0); (!e.touchData.cxtOver || Et !== e.touchData.cxtOver) && (e.touchData.cxtOver && e.touchData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: oe[0], y: oe[1] } }), e.touchData.cxtOver = Et, Et && Et.emit({ originalEvent: E, type: "cxtdragover", position: { x: oe[0], y: oe[1] } })); } else if (j && E.touches[2] && ce.boxSelectionEnabled()) E.preventDefault(), e.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e.touchData.selecting || ce.emit({ originalEvent: E, type: "boxstart", position: { x: oe[0], y: oe[1] } }), e.touchData.selecting = !0, e.touchData.didSelect = !0, le[4] = 1, !le || le.length === 0 || le[0] === void 0 ? (le[0] = (oe[0] + oe[2] + oe[4]) / 3, le[1] = (oe[1] + oe[3] + oe[5]) / 3, le[2] = (oe[0] + oe[2] + oe[4]) / 3 + 1, le[3] = (oe[1] + oe[3] + oe[5]) / 3 + 1) : (le[2] = (oe[0] + oe[2] + oe[4]) / 3, le[3] = (oe[1] + oe[3] + oe[5]) / 3), e.redrawHint("select", !0), e.redraw(); else if (j && E.touches[1] && !e.touchData.didSelect && ce.zoomingEnabled() && ce.panningEnabled() && ce.userZoomingEnabled() && ce.userPanningEnabled()) { E.preventDefault(), e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Rt = e.dragData.touchDragEles; if (Rt) { e.redrawHint("drag", !0); for (var qt = 0; qt < Rt.length; qt++) { var _n = Rt[qt]._private; _n.grabbed = !1, _n.rscratch.inDragLayer = !1; } } var $r = e.touchData.start, wt = E.touches[0].clientX - ee, St = E.touches[0].clientY - ue, rn = E.touches[1].clientX - ee, Bt = E.touches[1].clientY - ue, R = ne(wt, St, rn, Bt), ie = R / M; if (se) { var Ie = wt - L, Ke = St - z, Jt = rn - P, fn = Bt - D, cn = (Ie + Jt) / 2, tn = (Ke + fn) / 2, Xt = ce.zoom(), Ur = Xt * ie, zo = ce.pan(), bc = X[0] * Xt + zo.x, wc = X[1] * Xt + zo.y, yp = { x: -Ur / Xt * (bc - zo.x - cn) + bc, y: -Ur / Xt * (wc - zo.y - tn) + wc }; if ($r && $r.active()) { var Rt = e.dragData.touchDragEles; m(Rt), e.redrawHint("drag", !0), e.redrawHint("eles", !0), $r.unactivate().emit("freeon"), Rt.emit("free"), e.dragData.didDrag && ($r.emit("dragfreeon"), Rt.emit("dragfree")); } ce.viewport({ zoom: Ur, pan: yp, cancelOnFailedZoom: !0 }), ce.emit("pinchzoom"), M = R, L = wt, z = St, P = rn, D = Bt, e.pinching = !0; } if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); oe[0] = Ee[0], oe[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); oe[2] = Ee[0], oe[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); oe[4] = Ee[0], oe[5] = Ee[1]; } } else if (E.touches[0] && !e.touchData.didSelect) { var Yn = e.touchData.start, Hs = e.touchData.last, Et; if (!e.hoverData.draggingEles && !e.swipePanning && (Et = e.findNearestElement(oe[0], oe[1], !0, !0)), j && Yn != null && E.preventDefault(), j && Yn != null && e.nodeIsDraggable(Yn)) if (je) { var Rt = e.dragData.touchDragEles, xc = !e.dragData.didDrag; xc && p(Rt, { inDragLayer: !0 }), e.dragData.didDrag = !0; var So = { x: 0, y: 0 }; if (ot(me[0]) && ot(me[1]) && (So.x += me[0], So.y += me[1], xc)) { e.redrawHint("eles", !0); var Rn = e.touchData.dragDelta; Rn && ot(Rn[0]) && ot(Rn[1]) && (So.x += Rn[0], So.y += Rn[1]); } e.hoverData.draggingEles = !0, Rt.silentShift(So).emit("position drag"), e.redrawHint("drag", !0), e.touchData.startPosition[0] == ke[0] && e.touchData.startPosition[1] == ke[1] && e.redrawHint("eles", !0), e.redraw(); } else { var Rn = e.touchData.dragDelta = e.touchData.dragDelta || []; Rn.length === 0 ? (Rn.push(me[0]), Rn.push(me[1])) : (Rn[0] += me[0], Rn[1] += me[1]); } if (r(Yn || Et, ["touchmove", "tapdrag", "vmousemove"], E, { x: oe[0], y: oe[1] }), (!Yn || !Yn.grabbed()) && Et != Hs && (Hs && Hs.emit({ originalEvent: E, type: "tapdragout", position: { x: oe[0], y: oe[1] } }), Et && Et.emit({ originalEvent: E, type: "tapdragover", position: { x: oe[0], y: oe[1] } })), e.touchData.last = Et, j) for (var qt = 0; qt < oe.length; qt++) oe[qt] && e.touchData.startPosition[qt] && je && (e.touchData.singleTouchMoved = !0); if (j && (Yn == null || Yn.pannable()) && ce.panningEnabled() && ce.userPanningEnabled()) { var Xh = o(Yn, e.touchData.starts); Xh && (E.preventDefault(), e.data.bgActivePosistion || (e.data.bgActivePosistion = Qp(e.touchData.startPosition)), e.swipePanning ? (ce.panBy({ x: me[0] * fe, y: me[1] * fe }), ce.emit("dragpan")) : je && (e.swipePanning = !0, ce.panBy({ x: Ce * fe, y: bt * fe }), ce.emit("dragpan"), Yn && (Yn.unactivate(), e.redrawHint("select", !0), e.touchData.start = null))); var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); oe[0] = Ee[0], oe[1] = Ee[1]; } } for (var Te = 0; Te < oe.length; Te++) ke[Te] = oe[Te]; j && E.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 we; e.registerBinding(t, "touchcancel", we = function(E) { var j = e.touchData.start; e.touchData.capture = !1, j && j.unactivate(); }); var Oe, Ne, xe, Fe; if (e.registerBinding(t, "touchend", Oe = function(E) { var j = e.touchData.start, le = e.touchData.capture; if (le) E.touches.length === 0 && (e.touchData.capture = !1), E.preventDefault(); else return; var ce = e.selection; e.swipePanning = !1, e.hoverData.draggingEles = !1; var oe = e.cy, ke = oe.zoom(), fe = e.touchData.now, Ee = e.touchData.earlier; if (E.touches[0]) { var Ve = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); fe[0] = Ve[0], fe[1] = Ve[1]; } if (E.touches[1]) { var Ve = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); fe[2] = Ve[0], fe[3] = Ve[1]; } if (E.touches[2]) { var Ve = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); fe[4] = Ve[0], fe[5] = Ve[1]; } j && j.unactivate(); var je; if (e.touchData.cxt) { if (je = { originalEvent: E, type: "cxttapend", position: { x: fe[0], y: fe[1] } }, j ? j.emit(je) : oe.emit(je), !e.touchData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: fe[0], y: fe[1] } }; j ? j.emit(me) : oe.emit(me); } e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw(); return; } if (!E.touches[2] && oe.boxSelectionEnabled() && e.touchData.selecting) { e.touchData.selecting = !1; var Te = oe.collection(e.getAllInBox(ce[0], ce[1], ce[2], ce[3])); ce[0] = void 0, ce[1] = void 0, ce[2] = void 0, ce[3] = void 0, ce[4] = 0, e.redrawHint("select", !0), oe.emit({ type: "boxend", originalEvent: E, position: { x: fe[0], y: fe[1] } }); var Ce = function(an) { return an.selectable() && !an.selected(); }; Te.emit("box").stdFilter(Ce).select().emit("boxselect"), Te.nonempty() && e.redrawHint("eles", !0), e.redraw(); } if (j != null && j.unactivate(), E.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); else if (!E.touches[1] && !E.touches[0] && !E.touches[0]) { e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Le = e.dragData.touchDragEles; if (j != null) { var bt = j._private.grabbed; m(Le), e.redrawHint("drag", !0), e.redrawHint("eles", !0), bt && (j.emit("freeon"), Le.emit("free"), e.dragData.didDrag && (j.emit("dragfreeon"), Le.emit("dragfree"))), r(j, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }), j.unactivate(), e.touchData.start = null; } else { var pt = e.findNearestElement(fe[0], fe[1], !0, !0); r(pt, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }); } var Tt = e.touchData.startPosition[0] - fe[0], wt = Tt * Tt, St = e.touchData.startPosition[1] - fe[1], rn = St * St, Bt = wt + rn, Gt = Bt * ke * ke; e.touchData.singleTouchMoved || (j || oe.$(":selected").unselect(["tapunselect"]), r(j, ["tap", "vclick"], E, { x: fe[0], y: fe[1] }), Ne = !1, E.timeStamp - Fe <= oe.multiClickDebounceTime() ? (xe && clearTimeout(xe), Ne = !0, Fe = null, r(j, ["dbltap", "vdblclick"], E, { x: fe[0], y: fe[1] })) : (xe = setTimeout(function() { Ne || r(j, ["onetap", "voneclick"], E, { x: fe[0], y: fe[1] }); }, oe.multiClickDebounceTime()), Fe = E.timeStamp)), j != null && !e.dragData.didDrag && j._private.selectable && Gt < e.touchTapThreshold2 && !e.pinching && (oe.selectionType() === "single" ? (oe.$(n).unmerge(j).unselect(["tapunselect"]), j.select(["tapselect"])) : j.selected() ? j.unselect(["tapunselect"]) : j.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0; } for (var sn = 0; sn < fe.length; sn++) Ee[sn] = fe[sn]; e.dragData.didDrag = !1, E.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [null, null, null, null, null, null], e.touchData.startGPosition = null, e.touchData.didSelect = !1), E.touches.length < 2 && (E.touches.length === 1 && (e.touchData.startGPosition = [E.touches[0].clientX, E.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw()); }, !1), typeof TouchEvent > "u") { var Se = [], Pe = function(E) { return { clientX: E.clientX, clientY: E.clientY, force: 1, identifier: E.pointerId, pageX: E.pageX, pageY: E.pageY, radiusX: E.width / 2, radiusY: E.height / 2, screenX: E.screenX, screenY: E.screenY, target: E.target }; }, Me = function(E) { return { event: E, touch: Pe(E) }; }, He = function(E) { Se.push(Me(E)); }, De = function(E) { for (var j = 0; j < Se.length; j++) { var le = Se[j]; if (le.event.pointerId === E.pointerId) { Se.splice(j, 1); return; } } }, Xe = function(E) { var j = Se.filter(function(le) { return le.event.pointerId === E.pointerId; })[0]; j.event = E, j.touch = Pe(E); }, Ge = function(E) { E.touches = Se.map(function(j) { return j.touch; }); }, Ze = function(E) { return E.pointerType === "mouse" || E.pointerType === 4; }; e.registerBinding(e.container, "pointerdown", function(E) { Ze(E) || (E.preventDefault(), He(E), Ge(E), Y(E)); }), e.registerBinding(e.container, "pointerup", function(E) { Ze(E) || (De(E), Ge(E), Oe(E)); }), e.registerBinding(e.container, "pointercancel", function(E) { Ze(E) || (De(E), Ge(E), we(E)); }), e.registerBinding(e.container, "pointermove", function(E) { Ze(E) || (E.preventDefault(), Xe(E), Ge(E), re(E)); }); } }; var Ll = {}; Ll.generatePolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, draw: function(n, r, a, o, i, s) { this.renderer.nodeShapeImpl("polygon", n, r, a, o, i, this.points); }, intersectLine: function(n, r, a, o, i, s, l, u) { return L0(i, s, this.points, n, r, a / 2, o / 2, l); }, checkPoint: function(n, r, a, o, i, s, l, u) { return xl(n, r, this.points, s, l, o, i, [0, -1], a); } }; }; Ll.generateEllipse = function() { return this.nodeShapes.ellipse = { renderer: this, name: "ellipse", draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, i, s) { return Ege(a, o, e, t, n / 2 + i, r / 2 + i); }, checkPoint: function(e, t, n, r, a, o, i, s) { return Uc(e, t, r, a, o, i, n); } }; }; Ll.generateRoundPolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, getOrCreateCorners: function(n, r, a, o, 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 = a / 2, c = o / 2; i = i === "auto" ? CD(a, o) : 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] = pS(p, v, m, i), p = v, v = m; return s[l]; }, draw: function(n, r, a, o, i, s, l) { this.renderer.nodeShapeImpl("round-polygon", n, r, a, o, i, this.points, this.getOrCreateCorners(r, a, o, i, s, l, "drawCorners")); }, intersectLine: function(n, r, a, o, i, s, l, u, c) { return _ge(i, s, this.points, n, r, a, o, l, this.getOrCreateCorners(n, r, a, o, u, c, "corners")); }, checkPoint: function(n, r, a, o, i, s, l, u, c) { return Sge(n, r, this.points, s, l, o, i, this.getOrCreateCorners(s, l, o, i, u, c, "corners")); } }; }; Ll.generateRoundRectangle = function() { return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = { renderer: this, name: "round-rectangle", points: Ua(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { return xD(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = r / 2, u = a / 2; s = s === "auto" ? Cd(r, a) : s, s = Math.min(l, u, s); var c = s * 2; return !!(xl(e, t, this.points, o, i, r, a - c, [0, -1], n) || xl(e, t, this.points, o, i, r - c, a, [0, -1], n) || Uc(e, t, c, c, o - l + s, i - u + s, n) || Uc(e, t, c, c, o + l - s, i - u + s, n) || Uc(e, t, c, c, o + l - s, i + u - s, n) || Uc(e, t, c, c, o - l + s, i + u - s, n)); } }; }; Ll.generateCutRectangle = function() { return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = { renderer: this, name: "cut-rectangle", cornerLength: eS(), points: Ua(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, null, o); }, generateCutTrianglePts: function(e, t, n, r, a) { var o = a === "auto" ? this.cornerLength : a, i = t / 2, s = e / 2, l = n - s, u = n + s, c = r - i, d = r + i; return { topLeft: [l, c + o, l + o, c, l + o, c + o], topRight: [u - o, c, u, c + o, u - o, c + o], bottomRight: [u, d - o, u - o, d, u - o, d - o], bottomLeft: [l + o, d, l, d - o, l + o, d - o] }; }, intersectLine: function(e, t, n, r, a, o, 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 L0(a, o, u, e, t); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = s === "auto" ? this.cornerLength : s; if (xl(e, t, this.points, o, i, r, a - 2 * l, [0, -1], n) || xl(e, t, this.points, o, i, r - 2 * l, a, [0, -1], n)) return !0; var u = this.generateCutTrianglePts(r, a, o, i); return no(e, t, u.topLeft) || no(e, t, u.topRight) || no(e, t, u.bottomRight) || no(e, t, u.bottomLeft); } }; }; Ll.generateBarrel = function() { return this.nodeShapes.barrel = { renderer: this, name: "barrel", points: Ua(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, 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 = of({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, l), m = of({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, u), g = of({ 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 L0(a, o, h, e, t); }, generateBarrelBezierPts: function(e, t, n, r) { var a = t / 2, o = e / 2, i = n - o, s = n + o, l = r - a, u = r + a, c = n5(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, a, o, i, s) { var l = n5(r, a), u = l.heightOffset, c = l.widthOffset; if (xl(e, t, this.points, o, i, r, a - 2 * u, [0, -1], n) || xl(e, t, this.points, o, i, r - 2 * c, a, [0, -1], n)) return !0; for (var d = this.generateBarrelBezierPts(r, a, o, i), f = function(C, S, _) { var T = _[4], F = _[2], A = _[0], I = _[5], N = _[1], L = Math.min(T, A), z = Math.max(T, A), P = Math.min(I, N), D = Math.max(I, N); if (L <= C && C <= z && P <= S && S <= D) { var M = Tge(T, F, A), V = wge(M[0], M[1], M[2], C), Q = V.filter(function(X) { return 0 <= X && X <= 1; }); if (Q.length > 0) return Q[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 y = m[5], x = m[3], w = m[1], k = qr(y, x, w, g); if (m.isTop && k <= t || m.isBottom && t <= k) return !0; } } return !1; } }; }; Ll.generateBottomRoundrectangle = function() { return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { renderer: this, name: "bottom-round-rectangle", points: Ua(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { var l = e - (n / 2 + i), u = t - (r / 2 + i), c = u, d = e + (n / 2 + i), f = Tu(a, o, e, t, l, u, d, c, !1); return f.length > 0 ? f : xD(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { s = s === "auto" ? Cd(r, a) : s; var l = 2 * s; if (xl(e, t, this.points, o, i, r, a - l, [0, -1], n) || xl(e, t, this.points, o, i, r - l, a, [0, -1], n)) return !0; var u = r / 2 + 2 * n, c = a / 2 + 2 * n, d = [o - u, i - c, o - u, i, o + u, i, o + u, i - c]; return !!(no(e, t, d) || Uc(e, t, l, l, o + r / 2 - s, i + a / 2 - s, n) || Uc(e, t, l, l, o - r / 2 + s, i + a / 2 - s, n)); } }; }; Ll.registerNodeShapes = function() { var e = this.nodeShapes = {}, t = this; this.generateEllipse(), this.generatePolygon("triangle", Ua(3, 0)), this.generateRoundPolygon("round-triangle", Ua(3, 0)), this.generatePolygon("rectangle", Ua(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", Ua(5, 0)), this.generateRoundPolygon("round-pentagon", Ua(5, 0)), this.generatePolygon("hexagon", Ua(6, 0)), this.generateRoundPolygon("round-hexagon", Ua(6, 0)), this.generatePolygon("heptagon", Ua(7, 0)), this.generateRoundPolygon("round-heptagon", Ua(7, 0)), this.generatePolygon("octagon", Ua(8, 0)), this.generateRoundPolygon("round-octagon", Ua(8, 0)); var r = new Array(20); { var a = t5(5, 0), o = t5(5, Math.PI / 5), i = 0.5 * (3 - Math.sqrt(5)); i *= 1.57; for (var s = 0; s < o.length / 2; s++) o[s * 2] *= i, o[s * 2 + 1] *= i; for (var s = 0; s < 20 / 4; s++) r[s * 4] = a[s * 2], r[s * 4 + 1] = a[s * 2 + 1], r[s * 4 + 2] = o[s * 2], r[s * 4 + 3] = o[s * 2 + 1]; } r = kD(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 Qg = {}; Qg.timeToRender = function() { return this.redrawTotalTime / this.redrawCount; }; Qg.redraw = function(e) { e = e || gD(); 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; }; Qg.beforeRender = function(e, t) { if (!this.destroyed) { t == null && pr("Priority is not optional for beforeRender"); var n = this.beforeRenderCallbacks; n.push({ fn: e, priority: t }), n.sort(function(r, a) { return a.priority - r.priority; }); } }; var H$ = function(e, t, n) { for (var r = e.beforeRenderCallbacks, a = 0; a < r.length; a++) r[a].fn(t, n); }; Qg.startRenderLoop = function() { var e = this, t = e.cy; if (!e.renderLoopStarted) { e.renderLoopStarted = !0; var n = function r(a) { if (!e.destroyed) { if (!t.batching()) if (e.requestedFrame && !e.skipFrame) { H$(e, !0, a); var o = wl(); e.render(e.renderOptions); var i = e.lastDrawTime = wl(); e.averageRedrawTime === void 0 && (e.averageRedrawTime = i - o), e.redrawCount === void 0 && (e.redrawCount = 0), e.redrawCount++, e.redrawTotalTime === void 0 && (e.redrawTotalTime = 0); var s = i - o; e.redrawTotalTime += s, e.lastRedrawTime = s, e.averageRedrawTime = e.averageRedrawTime / 2 + s / 2, e.requestedFrame = !1; } else H$(e, !1, a); e.skipFrame = !1, ub(r); } }; ub(n); } }; var l2e = function(e) { this.init(e); }, xB = l2e, Sh = xB.prototype; Sh.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; Sh.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 a = r.document, o = a.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", l = a.getElementById(i) != null; if (n.className.indexOf(s) < 0 && (n.className = (n.className || "") + " " + s), !l) { var u = a.createElement("style"); u.id = i, u.textContent = "." + s + " { position: relative; }", o.insertBefore(u, o.children[0]); } var c = r.getComputedStyle(n), d = c.getPropertyValue("position"); d === "static" && Fn("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 = ot(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(); }; Sh.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(); } }; Sh.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, a = r.target; (a.off || a.removeEventListener).apply(a, 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 { } }; Sh.isHeadless = function() { return !1; }; [dS, bB, wB, Ch, Ll, Qg].forEach(function(e) { At(Sh, e); }); var gk = 1e3 / 60, kB = { setupDequeueing: function(e) { return function() { var t = this, n = this.renderer; if (!t.dequeueingSetup) { t.dequeueingSetup = !0; var r = Q2(function() { n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw(); }, e.deqRedrawThreshold), a = function(i, s) { var l = wl(), u = n.averageRedrawTime, c = n.lastRedrawTime, d = [], f = n.cy.extent(), h = n.getPixelRatio(); for (i || n.flushRenderedStyleQueue(); ; ) { var p = wl(), v = p - l, m = p - s; if (c < gk) { var g = gk - (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 * gk) break; var y = e.deq(t, h, f); if (y.length > 0) for (var x = 0; x < y.length; x++) d.push(y[x]); else break; } d.length > 0 && (e.onDeqd(t, d), !i && e.shouldRedraw(t, d, h, f) && r()); }, o = e.priority || Y4; n.beforeRender(a, o(t)); } }; } }, u2e = /* @__PURE__ */ function() { function e(t) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : cb; q4(this, e), this.idsByKey = new ds(), this.keyForId = new ds(), this.cachesByLvl = new ds(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n; } return W4(e, [{ key: "getIdsFor", value: function(t) { t == null && pr("Can not get id list for null key"); var n = this.idsByKey, r = this.idsByKey.get(t); return r || (r = new gh(), 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), a = this.getKey(t); this.deleteIdForKey(r, n), this.addIdForKey(a, n), this.keyForId.set(n, a); } }, { 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), a = this.getKey(t); return r !== a; } }, { key: "isInvalid", value: function(t) { return this.keyHasChangedFor(t) || this.doesEleInvalidateKey(t); } }, { key: "getCachesAt", value: function(t) { var n = this.cachesByLvl, r = this.lvls, a = n.get(t); return a || (a = new ds(), n.set(t, a), r.push(t)), a; } }, { key: "getCache", value: function(t, n) { return this.getCachesAt(n).get(t); } }, { key: "get", value: function(t, n) { var r = this.getKey(t), a = this.getCache(r, n); return a != null && this.updateKeyMappingFor(t), a; } }, { key: "getForCachedKey", value: function(t, n) { var r = this.keyForId.get(t.id()), a = this.getCache(r, n); return a; } }, { 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 a = this.getKey(t); this.setCache(a, 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 a = this.doesEleInvalidateKey(t); return a && this.invalidateKey(r), a || this.getNumberOfIdsForKey(r) === 0; } }]), e; }(), U$ = 25, c1 = 50, yy = -4, f5 = 3, c2e = 7.99, d2e = 8, p2e = 1024, f2e = 1024, h2e = 1024, v2e = 0.2, g2e = 0.8, m2e = 10, y2e = 0.15, b2e = 0.1, w2e = 0.9, x2e = 0.9, k2e = 100, C2e = 1, Jp = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" }, S2e = ba({ getKey: null, doesEleInvalidateKey: cb, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: hD, allowEdgeTxrCaching: !0, allowParentTxrCaching: !0 }), Mv = function(e, t) { var n = this; n.renderer = e, n.onDequeues = []; var r = S2e(t); At(n, r), n.lookup = new u2e(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing(); }, Vr = Mv.prototype; Vr.reasons = Jp; Vr.getTextureQueue = function(e) { var t = this; return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e] = t.eleImgCaches[e] || []; }; Vr.getRetiredTextureQueue = function(e) { var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e] = n[e] || []; return r; }; Vr.getElementQueue = function() { var e = this, t = e.eleCacheQueue = e.eleCacheQueue || new Gg(function(n, r) { return r.reqs - n.reqs; }); return t; }; Vr.getElementKeyToQueue = function() { var e = this, t = e.eleKeyToCacheQueue = e.eleKeyToCacheQueue || {}; return t; }; Vr.getElement = function(e, t, n, r, a) { var o = 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() || !o.allowEdgeTxrCaching && e.isEdge() || !o.allowParentTxrCaching && e.isParent()) return null; if (r == null && (r = Math.ceil(Q4(s * n))), r < yy) r = yy; else if (s >= c2e || r > f5) 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 <= U$ ? p = U$ : c <= c1 ? p = c1 : p = Math.ceil(c / c1) * c1, c > h2e || d > f2e) return null; var v = o.getTextureQueue(p), m = v[v.length - 2], g = function() { return o.recycleTexture(p, d) || o.addTexture(p, d); }; m || (m = v[v.length - 1]), m || (m = g()), m.width - m.usedWidth < d && (m = g()); for (var y = function(z) { return z && z.scaledLabelShown === f; }, x = a && a === Jp.dequeue, w = a && a === Jp.highQuality, k = a && a === Jp.downscale, C, S = r + 1; S <= f5; S++) { var _ = l.get(e, S); if (_) { C = _; break; } } var T = C && C.level === r + 1 ? C : null, F = function() { m.context.drawImage(T.texture.canvas, T.x, 0, T.width, T.height, m.usedWidth, 0, d, c); }; if (m.context.setTransform(1, 0, 0, 1, 0, 0), m.context.clearRect(m.usedWidth, 0, d, p), y(T)) F(); else if (y(C)) if (w) { for (var A = C.level; A > r; A--) T = o.getElement(e, t, n, A, Jp.downscale); F(); } else return o.queueElement(e, C.level - 1), C; else { var I; if (!x && !w && !k) for (var N = r - 1; N >= yy; N--) { var L = l.get(e, N); if (L) { I = L; break; } } if (y(I)) return o.queueElement(e, r), I; 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 + d2e), m.eleCaches.push(h), l.set(e, r, h), o.checkTextureFullness(m), h; }; Vr.invalidateElements = function(e) { for (var t = 0; t < e.length; t++) this.invalidateElement(e[t]); }; Vr.invalidateElement = function(e) { var t = this, n = t.lookup, r = [], a = n.isInvalid(e); if (a) { for (var o = yy; o <= f5; o++) { var i = n.getForCachedKey(e, o); 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); } }; Vr.checkTextureUtility = function(e) { e.invalidatedWidth >= v2e * e.width && this.retireTexture(e); }; Vr.checkTextureFullness = function(e) { var t = this, n = t.getTextureQueue(e.height); e.usedWidth / e.width > g2e && e.fullnessChecks >= m2e ? Hu(n, e) : e.fullnessChecks++; }; Vr.retireTexture = function(e) { var t = this, n = e.height, r = t.getTextureQueue(n), a = this.lookup; Hu(r, e), e.retired = !0; for (var o = e.eleCaches, i = 0; i < o.length; i++) { var s = o[i]; a.deleteCache(s.key, s.level); } Z4(o); var l = t.getRetiredTextureQueue(n); l.push(e); }; Vr.addTexture = function(e, t) { var n = this, r = n.getTextureQueue(e), a = {}; return r.push(a), a.eleCaches = [], a.height = e, a.width = Math.max(p2e, t), a.usedWidth = 0, a.invalidatedWidth = 0, a.fullnessChecks = 0, a.canvas = n.renderer.makeOffscreenCanvas(a.width, a.height), a.context = a.canvas.getContext("2d"), a; }; Vr.recycleTexture = function(e, t) { for (var n = this, r = n.getTextureQueue(e), a = n.getRetiredTextureQueue(e), o = 0; o < a.length; o++) { var i = a[o]; if (i.width >= t) return i.retired = !1, i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, Z4(i.eleCaches), i.context.setTransform(1, 0, 0, 1, 0, 0), i.context.clearRect(0, 0, i.width, i.height), Hu(a, i), r.push(i), i; } }; Vr.queueElement = function(e, t) { var n = this, r = n.getElementQueue(), a = n.getElementKeyToQueue(), o = this.getKey(e), i = a[o]; 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: o }; r.push(s), a[o] = s; } }; Vr.dequeue = function(e) { for (var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = [], o = t.lookup, i = 0; i < C2e && n.size() > 0; i++) { var s = n.pop(), l = s.key, u = s.eles[0], c = o.hasCache(u, s.level); if (r[l] = null, !c) { a.push(s); var d = t.getBoundingBox(u); t.getElement(u, d, e, s.level, Jp.dequeue); } } return a; }; Vr.removeFromQueue = function(e) { var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = this.getKey(e), o = r[a]; o != null && (o.eles.length === 1 ? (o.reqs = X4, n.updateItem(o), n.pop(), r[a] = null) : o.eles.unmerge(e)); }; Vr.onDequeue = function(e) { this.onDequeues.push(e); }; Vr.offDequeue = function(e) { Hu(this.onDequeues, e); }; Vr.setupDequeueing = kB.setupDequeueing({ deqRedrawThreshold: k2e, deqCost: y2e, deqAvgCost: b2e, deqNoDrawCost: w2e, deqFastCost: x2e, 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 a = 0; a < t.length; a++) for (var o = t[a].eles, i = 0; i < o.length; i++) { var s = o[i].boundingBox(); if (J4(s, r)) return !0; } return !1; }, priority: function(e) { return e.renderer.beforeRenderPriorities.eleTxrDeq; } }); var E2e = 1, Qv = -4, bb = 2, _2e = 3.99, T2e = 50, $2e = 50, O2e = 0.15, F2e = 0.1, A2e = 0.9, I2e = 0.9, P2e = 1, q$ = 250, L2e = 4e3 * 4e3, N2e = !0, CB = function(e) { var t = this, n = t.renderer = e, r = n.cy; t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = wl() - 2 * q$, t.skipping = !1, t.eleTxrDeqs = r.collection(), t.scheduleElementRefinement = Q2(function() { t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs); }, $2e), n.beforeRender(function(o, i) { i - t.lastInvalidationTime <= q$ ? t.skipping = !0 : t.skipping = !1; }, n.beforeRenderPriorities.lyrTxrSkip); var a = function(o, i) { return i.reqs - o.reqs; }; t.layersQueue = new Gg(a), t.setupDequeueing(); }, wa = CB.prototype, W$ = 0, M2e = Math.pow(2, 53) - 1; wa.makeLayer = function(e, t) { var n = Math.pow(2, t), r = Math.ceil(e.w * n), a = Math.ceil(e.h * n), o = this.renderer.makeOffscreenCanvas(r, a), i = { id: W$ = ++W$ % M2e, bb: e, level: t, width: r, height: a, canvas: o, context: o.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; }; wa.getLayers = function(e, t, n) { var r = this, a = r.renderer, o = a.cy, i = o.zoom(), s = r.firstGet; if (r.firstGet = !1, n == null) { if (n = Math.ceil(Q4(i * t)), n < Qv) n = Qv; else if (i >= _2e || n > bb) 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 T = function(N) { if (r.validateLayersElesOrdering(N, e), r.levelIsComplete(N, e)) return h = l[N], !0; }, F = function(N) { if (!h) for (var L = n + N; Qv <= L && L <= bb && !T(L); L += N) ; }; F(1), F(-1); for (var A = c.length - 1; A >= 0; A--) { var I = c[A]; I.invalid && Hu(c, I); } }; if (!f) p(); else return c; var v = function() { if (!d) { d = ko(); for (var T = 0; T < e.length; T++) bD(d, e[T].boundingBox()); } return d; }, m = function(T) { T = T || {}; var F = T.after; v(); var A = d.w * u * (d.h * u); if (A > L2e) return null; var I = r.makeLayer(d, n); if (F != null) { var N = c.indexOf(F) + 1; c.splice(N, 0, I); } else (T.insert === void 0 || T.insert) && c.unshift(I); return I; }; if (r.skipping && !s) return null; for (var g = null, y = e.length / E2e, x = !s, w = 0; w < e.length; w++) { var k = e[w], C = k._private.rscratch, S = C.imgLayerCaches = C.imgLayerCaches || {}, _ = S[n]; if (_) { g = _; continue; } if ((!g || g.eles.length >= y || !wD(g.bb, k.boundingBox())) && (g = m({ insert: !0, after: g }), !g)) return null; h || x ? r.queueLayer(g, k) : r.drawEleInLayer(g, k, n, t), g.eles.push(k), S[n] = g; } return h || (x ? null : c); }; wa.getEleLevelForLayerLevel = function(e, t) { return e; }; wa.drawEleInLayer = function(e, t, n, r) { var a = this, o = this.renderer, i = e.context, s = t.boundingBox(); s.w === 0 || s.h === 0 || !t.visible() || (n = a.getEleLevelForLayerLevel(n, r), o.setImgSmoothing(i, !1), o.drawCachedElement(i, t, null, null, n, N2e), o.setImgSmoothing(i, !0)); }; wa.levelIsComplete = function(e, t) { var n = this, r = n.layersByLevel[e]; if (!r || r.length === 0) return !1; for (var a = 0, o = 0; o < r.length; o++) { var i = r[o]; if (i.reqs > 0 || i.invalid) return !1; a += i.eles.length; } return a === t.length; }; wa.validateLayersElesOrdering = function(e, t) { var n = this.layersByLevel[e]; if (n) for (var r = 0; r < n.length; r++) { for (var a = n[r], o = -1, i = 0; i < t.length; i++) if (a.eles[0] === t[i]) { o = i; break; } if (o < 0) { this.invalidateLayer(a); continue; } for (var s = o, i = 0; i < a.eles.length; i++) if (a.eles[i] !== t[s + i]) { this.invalidateLayer(a); break; } } }; wa.updateElementsInLayers = function(e, t) { for (var n = this, r = Wg(e[0]), a = 0; a < e.length; a++) for (var o = r ? null : e[a], i = r ? e[a] : e[a].ele, s = i._private.rscratch, l = s.imgLayerCaches = s.imgLayerCaches || {}, u = Qv; u <= bb; u++) { var c = l[u]; c && (o && n.getEleLevelForLayerLevel(c.level) !== o.level || t(c, i, o)); } }; wa.haveLayers = function() { for (var e = this, t = !1, n = Qv; n <= bb; n++) { var r = e.layersByLevel[n]; if (r && r.length > 0) { t = !0; break; } } return t; }; wa.invalidateElements = function(e) { var t = this; e.length !== 0 && (t.lastInvalidationTime = wl(), !(e.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e, function(n, r, a) { t.invalidateLayer(n); })); }; wa.invalidateLayer = function(e) { if (this.lastInvalidationTime = wl(), !e.invalid) { var t = e.level, n = e.eles, r = this.layersByLevel[t]; Hu(r, e), e.elesQueue = [], e.invalid = !0, e.replacement && (e.replacement.invalid = !0); for (var a = 0; a < n.length; a++) { var o = n[a]._private.rscratch.imgLayerCaches; o && (o[t] = null); } } }; wa.refineElementTextures = function(e) { var t = this; t.updateElementsInLayers(e, function(n, r, a) { var o = n.replacement; if (o || (o = n.replacement = t.makeLayer(n.bb, n.level), o.replaces = n, o.eles = n.eles), !o.reqs) for (var i = 0; i < o.eles.length; i++) t.queueLayer(o, o.eles[i]); }); }; wa.enqueueElementRefinement = function(e) { this.eleTxrDeqs.merge(e), this.scheduleElementRefinement(); }; wa.queueLayer = function(e, t) { var n = this, r = n.layersQueue, a = e.elesQueue, o = a.hasId = a.hasId || {}; if (!e.replacement) { if (t) { if (o[t.id()]) return; a.push(t), o[t.id()] = !0; } e.reqs ? (e.reqs++, r.updateItem(e)) : (e.reqs = 1, r.push(e)); } }; wa.dequeue = function(e) { for (var t = this, n = t.layersQueue, r = [], a = 0; a < P2e && n.size() !== 0; ) { var o = n.peek(); if (o.replacement) { n.pop(); continue; } if (o.replaces && o !== o.replaces.replacement) { n.pop(); continue; } if (o.invalid) { n.pop(); continue; } var i = o.elesQueue.shift(); i && (t.drawEleInLayer(o, i, o.level, e), a++), r.length === 0 && r.push(!0), o.elesQueue.length === 0 && (n.pop(), o.reqs = 0, o.replaces && t.applyLayerReplacement(o), t.requestRedraw()); } return r; }; wa.applyLayerReplacement = function(e) { var t = this, n = t.layersByLevel[e.level], r = e.replaces, a = n.indexOf(r); if (!(a < 0 || r.invalid)) { n[a] = e; for (var o = 0; o < e.eles.length; o++) { var i = e.eles[o]._private, s = i.imgLayerCaches = i.imgLayerCaches || {}; s && (s[e.level] = e); } t.requestRedraw(); } }; wa.requestRedraw = Q2(function() { var e = this.renderer; e.redrawHint("eles", !0), e.redrawHint("drag", !0), e.redraw(); }, 100); wa.setupDequeueing = kB.setupDequeueing({ deqRedrawThreshold: T2e, deqCost: O2e, deqAvgCost: F2e, deqNoDrawCost: A2e, deqFastCost: I2e, deq: function(e, t) { return e.dequeue(t); }, onDeqd: Y4, shouldRedraw: hD, priority: function(e) { return e.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var SB = {}, K$; function D2e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.lineTo(r.x, r.y); } } function B2e(e, t, n) { for (var r, a = 0; a < t.length; a++) { var o = t[a]; a === 0 && (r = o), e.lineTo(o.x, o.y); } e.quadraticCurveTo(n.x, n.y, r.x, r.y); } function G$(e, t, n) { e.beginPath && e.beginPath(); for (var r = t, a = 0; a < r.length; a++) { var o = r[a]; e.lineTo(o.x, o.y); } var i = n, s = n[0]; e.moveTo(s.x, s.y); for (var a = 1; a < i.length; a++) { var o = i[a]; e.lineTo(o.x, o.y); } e.closePath && e.closePath(); } function R2e(e, t, n, r, a) { e.beginPath && e.beginPath(), e.arc(n, r, a, 0, Math.PI * 2, !1); var o = t, i = o[0]; e.moveTo(i.x, i.y); for (var s = 0; s < o.length; s++) { var l = o[s]; e.lineTo(l.x, l.y); } e.closePath && e.closePath(); } function z2e(e, t, n, r) { e.arc(t, n, r, 0, Math.PI * 2, !1); } SB.arrowShapeImpl = function(e) { return (K$ || (K$ = { polygon: D2e, "triangle-backcurve": B2e, "triangle-tee": G$, "circle-triangle": R2e, "triangle-cross": G$, circle: z2e }))[e]; }; var Rs = {}; Rs.drawElement = function(e, t, n, r, a, o) { var i = this; t.isNode() ? i.drawNode(e, t, n, r, a, o) : i.drawEdge(e, t, n, r, a, o); }; Rs.drawElementOverlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeOverlay(e, t) : n.drawEdgeOverlay(e, t); }; Rs.drawElementUnderlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeUnderlay(e, t) : n.drawEdgeUnderlay(e, t); }; Rs.drawCachedElementPortion = function(e, t, n, r, a, o, i, s) { var l = this, u = n.getBoundingBox(t); if (!(u.w === 0 || u.h === 0)) { var c = n.getElement(t, u, r, a, o); 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, y, x, w, k; if (f !== 0) { var C = n.getRotationPoint(t); x = C.x, w = C.y, e.translate(x, w), e.rotate(f), k = l.getImgSmoothing(e), k || l.setImgSmoothing(e, !0); var S = n.getRotationOffset(t); g = S.x, y = S.y; } else g = h, y = p; var _; d !== 1 && (_ = e.globalAlpha, e.globalAlpha = _ * d), e.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, y, v, m), d !== 1 && (e.globalAlpha = _), f !== 0 && (e.rotate(-f), e.translate(-x, -w), k || l.setImgSmoothing(e, !1)); } else n.drawElement(e, t); } }; var V2e = function() { return 0; }, j2e = function(e, t) { return e.getTextAngle(t, null); }, H2e = function(e, t) { return e.getTextAngle(t, "source"); }, U2e = function(e, t) { return e.getTextAngle(t, "target"); }, q2e = function(e, t) { return t.effectiveOpacity(); }, mk = function(e, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; Rs.drawCachedElement = function(e, t, n, r, a, o) { var i = this, s = i.data, l = s.eleTxrCache, u = s.lblTxrCache, c = s.slbTxrCache, d = s.tlbTxrCache, f = t.boundingBox(), h = o === !0 ? l.reasons.highQuality : null; if (!(f.w === 0 || f.h === 0 || !t.visible()) && (!r || J4(f, r))) { var p = t.isEdge(), v = t.element()._private.rscratch.badLine; i.drawElementUnderlay(e, t), i.drawCachedElementPortion(e, t, l, n, a, h, V2e, q2e), (!p || !v) && i.drawCachedElementPortion(e, t, u, n, a, h, j2e, mk), p && !v && (i.drawCachedElementPortion(e, t, c, n, a, h, H2e, mk), i.drawCachedElementPortion(e, t, d, n, a, h, U2e, mk)), i.drawElementOverlay(e, t); } }; Rs.drawElements = function(e, t) { for (var n = this, r = 0; r < t.length; r++) { var a = t[r]; n.drawElement(e, a); } }; Rs.drawCachedElements = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; a.drawCachedElement(e, i, n, r); } }; Rs.drawCachedNodes = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; i.isNode() && a.drawCachedElement(e, i, n, r); } }; Rs.drawLayeredElements = function(e, t, n, r) { var a = this, o = a.data.lyrTxrCache.getLayers(t, n); if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.bb; l.w === 0 || l.h === 0 || e.drawImage(s.canvas, l.x1, l.y1, l.w, l.h); } else a.drawCachedElements(e, t, n, r); }; var Nl = {}; Nl.drawEdge = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s = t._private.rscratch; if (!(o && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) { var l; n && (l = n, e.translate(-l.x1, -l.y1)); var u = o ? t.pstyle("opacity").value : 1, c = o ? 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, y = u * c, x = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; d === "straight-triangle" ? (i.eleStrokeStyle(e, t, L), i.drawEdgeTrianglePath(t, e, s.allpts)) : (e.lineWidth = h, e.lineCap = p, i.eleStrokeStyle(e, t, L), i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, w = function() { var L = 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], L); else { e.lineCap = "butt"; return; } d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e, s.allpts) : (i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, k = function() { a && i.drawEdgeOverlay(e, t); }, C = function() { a && i.drawEdgeUnderlay(e, t); }, S = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : y; i.drawArrowheads(e, t, L); }, _ = function() { i.drawElementText(e, t, null, r); }; e.lineJoin = "round"; var T = t.pstyle("ghost").value === "yes"; if (T) { var F = t.pstyle("ghost-offset-x").pfValue, A = t.pstyle("ghost-offset-y").pfValue, I = t.pstyle("ghost-opacity").value, N = g * I; e.translate(F, A), x(N), S(N), e.translate(-F, -A); } else w(); C(), x(), S(), k(), _(), n && e.translate(l.x1, l.y1); } }; var EB = 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 a = this, o = a.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" && !o ? t.lineCap = "butt" : t.lineCap = "round", a.colorStrokeStyle(t, u[0], u[1], u[2], r), a.drawEdgePath(n, t, i.allpts, "solid"); } } }; }; Nl.drawEdgeOverlay = EB("overlay"); Nl.drawEdgeUnderlay = EB("underlay"); Nl.drawEdgePath = function(e, t, n, r) { var a = e._private.rscratch, o = 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 = a.pathCacheKey && a.pathCacheKey === d; f ? (i = t = a.pathCache, s = !0) : (i = t = new Path2D(), a.pathCacheKey = d, a.pathCache = i); } if (o.setLineDash) switch (r) { case "dotted": o.setLineDash([1, 1]); break; case "dashed": o.setLineDash(u), o.lineDashOffset = c; break; case "solid": o.setLineDash([]); break; } if (!s && !a.badLine) switch (t.beginPath && t.beginPath(), t.moveTo(n[0], n[1]), a.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 (a.isRound) { var v = eD(a.roundCorners), m; try { for (v.s(); !(m = v.n()).done; ) { var g = m.value; hB(t, g); } } catch (x) { v.e(x); } finally { v.f(); } t.lineTo(n[n.length - 2], n[n.length - 1]); } else for (var y = 2; y + 1 < n.length; y += 2) t.lineTo(n[y], n[y + 1]); break; } t = o, l ? t.stroke(i) : t.stroke(), t.setLineDash && t.setLineDash([]); }; Nl.drawEdgeTrianglePath = function(e, t, n) { t.fillStyle = t.strokeStyle; for (var r = e.pstyle("width").pfValue, a = 0; a + 1 < n.length; a += 2) { var o = [n[a + 2] - n[a], n[a + 3] - n[a + 1]], i = Math.sqrt(o[0] * o[0] + o[1] * o[1]), s = [o[1] / i, -o[0] / i], l = [s[0] * r / 2, s[1] * r / 2]; t.beginPath(), t.moveTo(n[a] - l[0], n[a + 1] - l[1]), t.lineTo(n[a] + l[0], n[a + 1] + l[1]), t.lineTo(n[a + 2], n[a + 3]), t.closePath(), t.fill(); } }; Nl.drawArrowheads = function(e, t, n) { var r = t._private.rscratch, a = r.edgeType === "haystack"; a || 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), a || this.drawArrowhead(e, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n); }; Nl.drawArrowhead = function(e, t, n, r, a, o, i) { if (!(isNaN(r) || r == null || isNaN(a) || a == null || isNaN(o) || o == 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, a, o), 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, a, o); } } }; Nl.drawArrowShape = function(e, t, n, r, a, o, i, s, l) { var u = this, c = this.usePaths() && a !== "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[a]; if (c) { var y = u.arrowPathCache = u.arrowPathCache || [], x = xd(a), w = y[x]; w != null ? (f = t = w, d = !0) : (f = t = new Path2D(), y[x] = 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 = o / (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 hS = {}; hS.safeDrawImage = function(e, t, n, r, a, o, i, s, l, u) { if (!(a <= 0 || o <= 0 || l <= 0 || u <= 0)) try { e.drawImage(t, n, r, a, o, i, s, l, u); } catch (c) { Fn(c); } }; hS.drawInscribedImage = function(e, t, n, r, a) { var o = 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), y = n._private.rscratch, x = c(n, "background-clip", "value", r), w = x === "node", k = c(n, "background-image-opacity", "value", r) * a, C = 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, T = t.height || t.cachedH; (_ == null || T == null) && (document.body.appendChild(t), _ = t.cachedW = t.width || t.offsetWidth, T = t.cachedH = t.height || t.offsetHeight, document.body.removeChild(t)); var F = _, A = T; 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) === "%" ? A = c(n, "background-height", "pfValue", r) * g : A = c(n, "background-height", "pfValue", r)), !(F === 0 || A === 0)) { if (d === "contain") { var I = Math.min(m / F, g / A); F *= I, A *= I; } else if (d === "cover") { var I = Math.max(m / F, g / A); F *= I, A *= I; } var N = s - m / 2, L = c(n, "background-position-x", "units", r), z = c(n, "background-position-x", "pfValue", r); L === "%" ? N += (m - F) * z : N += z; var P = c(n, "background-offset-x", "units", r), D = c(n, "background-offset-x", "pfValue", r); P === "%" ? N += (m - F) * D : N += D; var M = l - g / 2, V = c(n, "background-position-y", "units", r), Q = c(n, "background-position-y", "pfValue", r); V === "%" ? M += (g - A) * Q : M += Q; var X = c(n, "background-offset-y", "units", r), ee = c(n, "background-offset-y", "pfValue", r); X === "%" ? M += (g - A) * ee : M += ee, y.pathCache && (N -= s, M -= l, s = 0, l = 0); var ue = e.globalAlpha; e.globalAlpha = k; var ve = o.getImgSmoothing(e), ge = !1; if (C === "no" && ve ? (o.setImgSmoothing(e, !1), ge = !0) : C === "yes" && !ve && (o.setImgSmoothing(e, !0), ge = !0), f === "no-repeat") w && (e.save(), y.pathCache ? e.clip(y.pathCache) : (o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.clip())), o.safeDrawImage(e, t, 0, 0, _, T, N, M, F, A), w && e.restore(); else { var se = e.createPattern(t, f); e.fillStyle = se, o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.translate(N, M), e.fill(), e.translate(-N, -M); } e.globalAlpha = ue, ge && o.setImgSmoothing(e, ve); } }; var rp = {}; rp.eleTextBiggerThanMin = function(e, t) { if (!t) { var n = e.cy().zoom(), r = this.getPixelRatio(), a = Math.ceil(Q4(n * r)); t = Math.pow(2, a); } var o = e.pstyle("font-size").pfValue * t, i = e.pstyle("min-zoomed-font-size").pfValue; return !(o < i); }; rp.drawElementText = function(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this; if (r == null) { if (o && !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)), a == null ? (i.drawText(e, t, null, h, o), t.isEdge() && (i.drawText(e, t, "source", h, o), i.drawText(e, t, "target", h, o))) : i.drawText(e, t, a, h, o), n && e.translate(p.x1, p.y1); }; rp.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; }; rp.setupTextStyle = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = t.pstyle("font-style").strValue, a = t.pstyle("font-size").pfValue + "px", o = 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 + " " + a + " " + o, e.lineJoin = "round", this.colorFillStyle(e, u[0], u[1], u[2], s), this.colorStrokeStyle(e, c[0], c[1], c[2], l); }; function yk(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0; e.beginPath(), e.moveTo(t + o, n), e.lineTo(t + r - o, n), e.quadraticCurveTo(t + r, n, t + r, n + o), e.lineTo(t + r, n + a - o), e.quadraticCurveTo(t + r, n + a, t + r - o, n + a), e.lineTo(t + o, n + a), e.quadraticCurveTo(t, n + a, t, n + a - o), e.lineTo(t, n + o), e.quadraticCurveTo(t, n, t + o, n), e.closePath(), i ? e.stroke() : e.fill(); } rp.getTextAngle = function(e, t) { var n, r = e._private, a = r.rscratch, o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = Ii(a, "labelAngle", t); return i.strValue === "autorotate" ? n = e.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n; }; rp.drawText = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = t._private, i = o.rscratch, s = a ? t.effectiveOpacity() : 1; if (!(a && (s === 0 || t.pstyle("text-opacity").value === 0))) { n === "main" && (n = null); var l = Ii(i, "labelX", n), u = Ii(i, "labelY", n), c, d, f = this.getLabelText(t, n); if (f != null && f !== "" && !isNaN(l) && !isNaN(u)) { this.setupTextStyle(e, t, a); var h = n ? n + "-" : "", p = Ii(i, "labelWidth", n), v = Ii(i, "labelHeight", n), m = t.pstyle(h + "text-margin-x").pfValue, g = t.pstyle(h + "text-margin-y").pfValue, y = t.isEdge(), x = t.pstyle("text-halign").value, w = t.pstyle("text-valign").value; y && (x = "center", w = "center"), l += m, u += g; var k; switch (r ? k = this.getTextAngle(t, n) : k = 0, k !== 0 && (c = l, d = u, e.translate(c, d), e.rotate(k), l = 0, u = 0), w) { case "top": break; case "center": u += v / 2; break; case "bottom": u += v; break; } var C = t.pstyle("text-background-opacity").value, S = t.pstyle("text-border-opacity").value, _ = t.pstyle("text-border-width").pfValue, T = t.pstyle("text-background-padding").pfValue, F = t.pstyle("text-background-shape").strValue, A = F.indexOf("round") === 0, I = 2; if (C > 0 || _ > 0 && S > 0) { var N = l - T; switch (x) { case "left": N -= p; break; case "center": N -= p / 2; break; } var L = u - v - T, z = p + 2 * T, P = v + 2 * T; if (C > 0) { var D = e.fillStyle, M = t.pstyle("text-background-color").value; e.fillStyle = "rgba(" + M[0] + "," + M[1] + "," + M[2] + "," + C * s + ")", A ? yk(e, N, L, z, P, I) : e.fillRect(N, L, z, P), e.fillStyle = D; } if (_ > 0 && S > 0) { var V = e.strokeStyle, Q = e.lineWidth, X = t.pstyle("text-border-color").value, ee = t.pstyle("text-border-style").value; if (e.strokeStyle = "rgba(" + X[0] + "," + X[1] + "," + X[2] + "," + S * s + ")", e.lineWidth = _, e.setLineDash) switch (ee) { 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 (A ? yk(e, N, L, z, P, I, "stroke") : e.strokeRect(N, L, z, P), ee === "double") { var ue = _ / 2; A ? yk(e, N + ue, L + ue, z - ue * 2, P - ue * 2, I, "stroke") : e.strokeRect(N + ue, L + ue, z - ue * 2, P - ue * 2); } e.setLineDash && e.setLineDash([]), e.lineWidth = Q, e.strokeStyle = V; } } var ve = 2 * t.pstyle("text-outline-width").pfValue; if (ve > 0 && (e.lineWidth = ve), t.pstyle("text-wrap").value === "wrap") { var ge = Ii(i, "labelWrapCachedLines", n), se = Ii(i, "labelLineHeight", n), ne = p / 2, W = this.getLabelJustification(t); switch (W === "auto" || (x === "left" ? W === "left" ? l += -p : W === "center" && (l += -ne) : x === "center" ? W === "left" ? l += -ne : W === "right" && (l += ne) : x === "right" && (W === "center" ? l += ne : W === "right" && (l += p))), w) { case "top": u -= (ge.length - 1) * se; break; case "center": case "bottom": u -= (ge.length - 1) * se; break; } for (var Y = 0; Y < ge.length; Y++) ve > 0 && e.strokeText(ge[Y], l, u), e.fillText(ge[Y], l, u), u += se; } else ve > 0 && e.strokeText(f, l, u), e.fillText(f, l, u); k !== 0 && (e.rotate(-k), e.translate(-c, -d)); } } }; var Eh = {}; Eh.drawNode = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s, l, u = t._private, c = u.rscratch, d = t.position(); if (!(!ot(d.x) || !ot(d.y)) && !(o && !t.visible())) { var f = o ? 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 y = t.pstyle("background-image"), x = y.value, w = new Array(x.length), k = new Array(x.length), C = 0, S = 0; S < x.length; S++) { var _ = x[S], T = w[S] = _ != null && _ !== "none"; if (T) { var F = t.cy().style().getIndexedStyle(t, "background-image-crossorigin", "value", S); C++, k[S] = i.getCachedImage(_, F, function() { u.backgroundTimestamp = Date.now(), t.emitAndNotify("background"); }); } } var A = t.pstyle("background-blacken").value, I = t.pstyle("border-width").pfValue, N = t.pstyle("background-opacity").value * f, L = t.pstyle("border-color").value, z = t.pstyle("border-style").value, P = t.pstyle("border-join").value, D = t.pstyle("border-cap").value, M = t.pstyle("border-position").value, V = t.pstyle("border-dash-pattern").pfValue, Q = t.pstyle("border-dash-offset").pfValue, X = t.pstyle("border-opacity").value * f, ee = t.pstyle("outline-width").pfValue, ue = t.pstyle("outline-color").value, ve = t.pstyle("outline-style").value, ge = t.pstyle("outline-opacity").value * f, se = t.pstyle("outline-offset").value, ne = t.pstyle("corner-radius").value; ne !== "auto" && (ne = t.pstyle("corner-radius").pfValue); var W = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : N; i.eleFillStyle(e, t, ke); }, Y = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : X; i.colorStrokeStyle(e, L[0], L[1], L[2], ke); }, re = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ge; i.colorStrokeStyle(e, ue[0], ue[1], ue[2], ke); }, we = function(ke, fe, Ee, Ve) { var je = i.nodePathCache = i.nodePathCache || [], me = fD(Ee === "polygon" ? Ee + "," + Ve.join(",") : Ee, "" + fe, "" + ke, "" + ne), Te = je[me], Ce, Le = !1; return Te != null ? (Ce = Te, Le = !0, c.pathCache = Ce) : (Ce = new Path2D(), je[me] = c.pathCache = Ce), { path: Ce, cacheHit: Le }; }, Oe = t.pstyle("shape").strValue, Ne = t.pstyle("shape-polygon-points").pfValue; if (h) { e.translate(d.x, d.y); var xe = we(s, l, Oe, Ne); p = xe.path, v = xe.cacheHit; } var Fe = function() { if (!v) { var ke = d; h && (ke = { x: 0, y: 0 }), i.nodeShapes[i.getNodeShape(t)].draw(p || e, ke.x, ke.y, s, l, ne, c); } h ? e.fill(p) : e.fill(); }, Se = function() { for (var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, Ee = u.backgrounding, Ve = 0, je = 0; je < k.length; je++) { var me = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", je); if (fe && me === "over" || !fe && me === "inside") { Ve++; continue; } w[je] && k[je].complete && !k[je].error && (Ve++, i.drawInscribedImage(e, k[je], t, je, ke)); } u.backgrounding = Ve !== C, Ee !== u.backgrounding && t.updateStyle(!1); }, Pe = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f; i.hasPie(t) && (i.drawPie(e, t, fe), ke && (h || i.nodeShapes[i.getNodeShape(t)].draw(e, d.x, d.y, s, l, ne, c))); }, Me = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = (A > 0 ? A : -A) * ke, Ee = A > 0 ? 0 : 255; A !== 0 && (i.colorFillStyle(e, Ee, Ee, Ee, fe), h ? e.fill(p) : e.fill()); }, He = function() { if (I > 0) { if (e.lineWidth = I, e.lineCap = D, e.lineJoin = P, e.setLineDash) switch (z) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash(V), e.lineDashOffset = Q; break; case "solid": case "double": e.setLineDash([]); break; } if (M !== "center") { if (e.save(), e.lineWidth *= 2, M === "inside") h ? e.clip(p) : e.clip(); else { var ke = new Path2D(); ke.rect(-s / 2 - I, -l / 2 - I, s + 2 * I, l + 2 * I), ke.addPath(p), e.clip(ke, "evenodd"); } h ? e.stroke(p) : e.stroke(), e.restore(); } else h ? e.stroke(p) : e.stroke(); if (z === "double") { e.lineWidth = I / 3; var fe = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(p) : e.stroke(), e.globalCompositeOperation = fe; } e.setLineDash && e.setLineDash([]); } }, De = function() { if (ee > 0) { if (e.lineWidth = ee, e.lineCap = "butt", e.setLineDash) switch (ve) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "solid": case "double": e.setLineDash([]); break; } var ke = d; h && (ke = { x: 0, y: 0 }); var fe = i.getNodeShape(t), Ee = I; M === "inside" && (Ee = 0), M === "outside" && (Ee *= 2); var Ve = (s + Ee + (ee + se)) / s, je = (l + Ee + (ee + se)) / l, me = s * Ve, Te = l * je, Ce = i.nodeShapes[fe].points, Le; if (h) { var bt = we(me, Te, fe, Ce); Le = bt.path; } if (fe === "ellipse") i.drawEllipsePath(Le || e, ke.x, ke.y, me, Te); else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(fe)) { var pt = 0, Tt = 0, wt = 0; fe === "round-diamond" ? pt = (Ee + se + ee) * 1.4 : fe === "round-heptagon" ? (pt = (Ee + se + ee) * 1.075, wt = -(Ee / 2 + se + ee) / 35) : fe === "round-hexagon" ? pt = (Ee + se + ee) * 1.12 : fe === "round-pentagon" ? (pt = (Ee + se + ee) * 1.13, wt = -(Ee / 2 + se + ee) / 15) : fe === "round-tag" ? (pt = (Ee + se + ee) * 1.12, Tt = (Ee / 2 + ee + se) * 0.07) : fe === "round-triangle" && (pt = (Ee + se + ee) * (Math.PI / 2), wt = -(Ee + se / 2 + ee) / Math.PI), pt !== 0 && (Ve = (s + pt) / s, me = s * Ve, ["round-hexagon", "round-tag"].includes(fe) || (je = (l + pt) / l, Te = l * je)), ne = ne === "auto" ? CD(me, Te) : ne; for (var St = me / 2, rn = Te / 2, Bt = ne + (Ee + ee + se) / 2, Gt = new Array(Ce.length / 2), sn = new Array(Ce.length / 2), an = 0; an < Ce.length / 2; an++) Gt[an] = { x: ke.x + Tt + St * Ce[an * 2], y: ke.y + wt + rn * Ce[an * 2 + 1] }; var Qt, Sn, En, pn, Et = Gt.length; for (Sn = Gt[Et - 1], Qt = 0; Qt < Et; Qt++) En = Gt[Qt % Et], pn = Gt[(Qt + 1) % Et], sn[Qt] = pS(Sn, En, pn, Bt), Sn = En, En = pn; i.drawRoundPolygonPath(Le || e, ke.x + Tt, ke.y + wt, s * Ve, l * je, Ce, sn); } else if (["roundrectangle", "round-rectangle"].includes(fe)) ne = ne === "auto" ? Cd(me, Te) : ne, i.drawRoundRectanglePath(Le || e, ke.x, ke.y, me, Te, ne + (Ee + ee + se) / 2); else if (["cutrectangle", "cut-rectangle"].includes(fe)) ne = ne === "auto" ? eS() : ne, i.drawCutRectanglePath(Le || e, ke.x, ke.y, me, Te, null, ne + (Ee + ee + se) / 4); else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(fe)) ne = ne === "auto" ? Cd(me, Te) : ne, i.drawBottomRoundRectanglePath(Le || e, ke.x, ke.y, me, Te, ne + (Ee + ee + se) / 2); else if (fe === "barrel") i.drawBarrelPath(Le || e, ke.x, ke.y, me, Te); else if (fe.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(fe)) { var Rt = (Ee + ee + se) / s; Ce = db(pb(Ce, Rt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } else { var qt = (Ee + ee + se) / s; Ce = db(pb(Ce, -qt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } if (h ? e.stroke(Le) : e.stroke(), ve === "double") { e.lineWidth = Ee / 3; var _n = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(Le) : e.stroke(), e.globalCompositeOperation = _n; } e.setLineDash && e.setLineDash([]); } }, Xe = function() { a && i.drawNodeOverlay(e, t, d, s, l); }, Ge = function() { a && i.drawNodeUnderlay(e, t, d, s, l); }, Ze = function() { i.drawElementText(e, t, null, r); }, E = t.pstyle("ghost").value === "yes"; if (E) { var j = t.pstyle("ghost-offset-x").pfValue, le = t.pstyle("ghost-offset-y").pfValue, ce = t.pstyle("ghost-opacity").value, oe = ce * f; e.translate(j, le), re(), De(), W(ce * N), Fe(), Se(oe, !0), Y(ce * X), He(), Pe(A !== 0 || I !== 0), Se(oe, !1), Me(oe), e.translate(-j, -le); } h && e.translate(-d.x, -d.y), Ge(), h && e.translate(d.x, d.y), re(), De(), W(), Fe(), Se(f, !0), Y(), He(), Pe(A !== 0 || I !== 0), Se(f, !1), Me(), h && e.translate(-d.x, -d.y), Ze(), Xe(), n && e.translate(g.x1, g.y1); } }; var _B = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n, r, a, o) { 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(), a == null || o == null) { var f = n.padding(); a = n.width() + 2 * f, o = n.height() + 2 * f; } i.colorFillStyle(t, u[0], u[1], u[2], l), i.nodeShapes[c].draw(t, r.x, r.y, a + s * 2, o + s * 2, d), t.fill(); } } }; }; Eh.drawNodeOverlay = _B("overlay"); Eh.drawNodeUnderlay = _B("underlay"); Eh.hasPie = function(e) { return e = e[0], e._private.hasPie; }; Eh.drawPie = function(e, t, n, r) { t = t[0], r = r || t.position(); var a = t.cy().style(), o = 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), o.units === "%" ? c = c * o.pfValue : o.pfValue !== void 0 && (c = o.pfValue / 2); for (var h = 1; h <= a.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 y = 1.5 * Math.PI + 2 * Math.PI * d, x = 2 * Math.PI * g, w = y + x; p === 0 || d >= 1 || d + g > 1 || (e.beginPath(), e.moveTo(i, s), e.arc(i, s, c, y, w), e.closePath(), this.colorFillStyle(e, v[0], v[1], v[2], m), e.fill(), d += g); } }; var Do = {}, W2e = 100; Do.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; }; Do.paintCache = function(e) { for (var t = this.paintCaches = this.paintCaches || [], n = !0, r, a = 0; a < t.length; a++) if (r = t[a], r.context === e) { n = !1; break; } return n && (r = { context: e }, t.push(r)), r; }; Do.createGradientStyleFor = function(e, t, n, r, a) { var o, 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 = kd(u, d), h = kd(c, d); o = 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(); o = e.createRadialGradient(p.x, p.y, 0, p.x, p.y, Math.max(v, m)); } else if (n.isEdge()) { var g = n.sourceEndpoint(), y = n.targetEndpoint(); o = e.createLinearGradient(g.x, g.y, y.x, y.y); } else { var x = i ? { x: 0, y: 0 } : n.position(), w = n.paddedWidth(), k = n.paddedHeight(), C = w / 2, S = k / 2, _ = n.pstyle("background-gradient-direction").value; switch (_) { case "to-bottom": o = e.createLinearGradient(x.x, x.y - S, x.x, x.y + S); break; case "to-top": o = e.createLinearGradient(x.x, x.y + S, x.x, x.y - S); break; case "to-left": o = e.createLinearGradient(x.x + C, x.y, x.x - C, x.y); break; case "to-right": o = e.createLinearGradient(x.x - C, x.y, x.x + C, x.y); break; case "to-bottom-right": case "to-right-bottom": o = e.createLinearGradient(x.x - C, x.y - S, x.x + C, x.y + S); break; case "to-top-right": case "to-right-top": o = e.createLinearGradient(x.x - C, x.y + S, x.x + C, x.y - S); break; case "to-bottom-left": case "to-left-bottom": o = e.createLinearGradient(x.x + C, x.y - S, x.x - C, x.y + S); break; case "to-top-left": case "to-left-top": o = e.createLinearGradient(x.x + C, x.y + S, x.x - C, x.y - S); break; } } if (!o) return null; for (var T = l.length === s.length, F = s.length, A = 0; A < F; A++) o.addColorStop(T ? l[A] : A / (F - 1), "rgba(" + s[A][0] + "," + s[A][1] + "," + s[A][2] + "," + a + ")"); return o; }; Do.gradientFillStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "background", t, n, r); if (!a) return null; e.fillStyle = a; }; Do.colorFillStyle = function(e, t, n, r, a) { e.fillStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Do.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 a = t.pstyle("background-color").value; this.colorFillStyle(e, a[0], a[1], a[2], n); } }; Do.gradientStrokeStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "line", t, n, r); if (!a) return null; e.strokeStyle = a; }; Do.colorStrokeStyle = function(e, t, n, r, a) { e.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Do.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 a = t.pstyle("line-color").value; this.colorStrokeStyle(e, a[0], a[1], a[2], n); } }; Do.matchCanvasSize = function(e) { var t = this, n = t.data, r = t.findContainerClientCoords(), a = r[2], o = 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 = a * i, u = o * i, c; if (!(l === t.canvasWidth && u === t.canvasHeight)) { t.fontCaches = null; var d = n.canvasContainer; d.style.width = a + "px", d.style.height = o + "px"; for (var f = 0; f < t.CANVAS_LAYERS; f++) c = n.canvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "px"; for (var f = 0; f < t.BUFFER_COUNT; f++) c = n.bufferCanvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "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; } }; Do.renderTo = function(e, t, n, r) { this.render({ forcedContext: e, forcedZoom: t, forcedPan: n, drawAllLayers: !0, forcedPxRatio: r }); }; Do.render = function(e) { e = e || gD(); var t = e.forcedContext, n = e.drawAllLayers, r = e.drawOnlyNodeLayer, a = e.forcedZoom, o = 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 y = l.style(), x = l.zoom(), w = a !== void 0 ? a : x, k = l.pan(), C = { x: k.x, y: k.y }, S = { zoom: x, pan: { x: k.x, y: k.y } }, _ = i.prevViewport, T = _ === void 0 || S.zoom !== _.zoom || S.pan.x !== _.pan.x || S.pan.y !== _.pan.y; !T && !(v && !p) && (i.motionBlurPxRatio = 1), o && (C = o), w *= s, C.x *= s, C.y *= s; var F = i.getCachedZSortedEles(); function A(xe, Fe, Se, Pe, Me) { var He = xe.globalCompositeOperation; xe.globalCompositeOperation = "destination-out", i.colorFillStyle(xe, 255, 255, 255, i.motionBlurTransparency), xe.fillRect(Fe, Se, Pe, Me), xe.globalCompositeOperation = He; } function I(xe, Fe) { var Se, Pe, Me, He; !i.clearingMotionBlur && (xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] || xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]) ? (Se = { x: k.x * h, y: k.y * h }, Pe = x * h, Me = i.canvasWidth * h, He = i.canvasHeight * h) : (Se = C, Pe = w, Me = i.canvasWidth, He = i.canvasHeight), xe.setTransform(1, 0, 0, 1, 0, 0), Fe === "motionBlur" ? A(xe, 0, 0, Me, He) : !t && (Fe === void 0 || Fe) && xe.clearRect(0, 0, Me, He), n || (xe.translate(Se.x, Se.y), xe.scale(Pe, Pe)), o && xe.translate(o.x, o.y), a && xe.scale(a, a); } 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 N = i.data.bufferContexts[i.TEXTURE_BUFFER]; N.setTransform(1, 0, 0, 1, 0, 0), N.clearRect(0, 0, i.canvasWidth * i.textureMult, i.canvasHeight * i.textureMult), i.render({ forcedContext: N, 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 L = u.contexts[i.NODE], z = i.textureCache.texture, S = i.textureCache.viewport; L.setTransform(1, 0, 0, 1, 0, 0), f ? A(L, 0, 0, S.width, S.height) : L.clearRect(0, 0, S.width, S.height); var P = y.core("outside-texture-bg-color").value, D = y.core("outside-texture-bg-opacity").value; i.colorFillStyle(L, P[0], P[1], P[2], D), L.fillRect(0, 0, S.width, S.height); var x = l.zoom(); I(L, !1), L.clearRect(S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s), L.drawImage(z, S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s); } else i.textureOnViewport && !t && (i.textureCache = null); var M = l.extent(), V = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), Q = i.hideEdgesOnViewport && V, X = []; if (X[i.NODE] = !c[i.NODE] && f && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, X[i.NODE] && (i.clearedForMotionBlur[i.NODE] = !0), X[i.DRAG] = !c[i.DRAG] && f && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, X[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = !0), c[i.NODE] || n || r || X[i.NODE]) { var ee = f && !X[i.NODE] && h !== 1, L = t || (ee ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] : u.contexts[i.NODE]), ue = f && !ee ? "motionBlur" : void 0; I(L, ue), Q ? i.drawCachedNodes(L, F.nondrag, s, M) : i.drawLayeredElements(L, F.nondrag, s, M), i.debug && i.drawDebugPoints(L, F.nondrag), !n && !f && (c[i.NODE] = !1); } if (!r && (c[i.DRAG] || n || X[i.DRAG])) { var ee = f && !X[i.DRAG] && h !== 1, L = t || (ee ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG] : u.contexts[i.DRAG]); I(L, f && !ee ? "motionBlur" : void 0), Q ? i.drawCachedNodes(L, F.drag, s, M) : i.drawCachedElements(L, F.drag, s, M), i.debug && i.drawDebugPoints(L, F.drag), !n && !f && (c[i.DRAG] = !1); } if (i.showFps || !r && c[i.SELECT_BOX] && !n) { var L = t || u.contexts[i.SELECT_BOX]; if (I(L), i.selection[4] == 1 && (i.hoverData.selecting || i.touchData.selecting)) { var x = i.cy.zoom(), ve = y.core("selection-box-border-width").value / x; L.lineWidth = ve, L.fillStyle = "rgba(" + y.core("selection-box-color").value[0] + "," + y.core("selection-box-color").value[1] + "," + y.core("selection-box-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.fillRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]), ve > 0 && (L.strokeStyle = "rgba(" + y.core("selection-box-border-color").value[0] + "," + y.core("selection-box-border-color").value[1] + "," + y.core("selection-box-border-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.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 x = i.cy.zoom(), ge = u.bgActivePosistion; L.fillStyle = "rgba(" + y.core("active-bg-color").value[0] + "," + y.core("active-bg-color").value[1] + "," + y.core("active-bg-color").value[2] + "," + y.core("active-bg-opacity").value + ")", L.beginPath(), L.arc(ge.x, ge.y, y.core("active-bg-size").pfValue / x, 0, 2 * Math.PI), L.fill(); } var se = i.lastRedrawTime; if (i.showFps && se) { se = Math.round(se); var ne = Math.round(1e3 / se); L.setTransform(1, 0, 0, 1, 0, 0), L.fillStyle = "rgba(255, 0, 0, 0.75)", L.strokeStyle = "rgba(255, 0, 0, 0.75)", L.lineWidth = 1, L.fillText("1 frame = " + se + " ms = " + ne + " fps", 0, 20); var W = 60; L.strokeRect(0, 30, 250, 20), L.fillRect(0, 30, 250 * Math.min(ne / W, 1), 20); } n || (c[i.SELECT_BOX] = !1); } if (f && h !== 1) { var Y = u.contexts[i.NODE], re = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE], we = u.contexts[i.DRAG], Oe = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG], Ne = function(xe, Fe, Se) { xe.setTransform(1, 0, 0, 1, 0, 0), Se || !g ? xe.clearRect(0, 0, i.canvasWidth, i.canvasHeight) : A(xe, 0, 0, i.canvasWidth, i.canvasHeight); var Pe = h; xe.drawImage( Fe, // img 0, 0, // sx, sy i.canvasWidth * Pe, i.canvasHeight * Pe, // sw, sh 0, 0, // x, y i.canvasWidth, i.canvasHeight // w, h ); }; (c[i.NODE] || X[i.NODE]) && (Ne(Y, re, X[i.NODE]), c[i.NODE] = !1), (c[i.DRAG] || X[i.DRAG]) && (Ne(we, Oe, X[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(); }, W2e)), t || l.emit("render"); }; var cc = {}; cc.drawPolygonPath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2; e.beginPath && e.beginPath(), e.moveTo(t + i * o[0], n + s * o[1]); for (var l = 1; l < o.length / 2; l++) e.lineTo(t + i * o[l * 2], n + s * o[l * 2 + 1]); e.closePath(); }; cc.drawRoundPolygonPath = function(e, t, n, r, a, o, i) { i.forEach(function(s) { return hB(e, s); }), e.closePath(); }; cc.drawRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? Cd(r, a) : Math.min(o, 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(); }; cc.drawBottomRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? Cd(r, a) : o; 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(); }; cc.drawCutRectanglePath = function(e, t, n, r, a, o, i) { var s = r / 2, l = a / 2, u = i === "auto" ? eS() : 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(); }; cc.drawBarrelPath = function(e, t, n, r, a) { var o = r / 2, i = a / 2, s = t - o, l = t + o, u = n - i, c = n + i, d = n5(r, a), 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 X$ = Math.sin(0), Y$ = Math.cos(0), h5 = {}, v5 = {}, TB = Math.PI / 40; for (var Fp = 0 * Math.PI; Fp < 2 * Math.PI; Fp += TB) h5[Fp] = Math.sin(Fp), v5[Fp] = Math.cos(Fp); cc.drawEllipsePath = function(e, t, n, r, a) { if (e.beginPath && e.beginPath(), e.ellipse) e.ellipse(t, n, r / 2, a / 2, 0, 0, 2 * Math.PI); else for (var o, i, s = r / 2, l = a / 2, u = 0 * Math.PI; u < 2 * Math.PI; u += TB) o = t - s * h5[u] * X$ + s * v5[u] * Y$, i = n + l * v5[u] * X$ + l * h5[u] * Y$, u === 0 ? e.moveTo(o, i) : e.lineTo(o, i); e.closePath(); }; var Jg = {}; Jg.createBuffer = function(e, t) { var n = document.createElement("canvas"); return n.width = e, n.height = t, [n, n.getContext("2d")]; }; Jg.bufferCanvasImage = function(e) { var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), a = this.findContainerClientCoords(), o = e.full ? Math.ceil(r.w) : a[2], i = e.full ? Math.ceil(r.h) : a[3], s = ot(e.maxWidth) || ot(e.maxHeight), l = this.getPixelRatio(), u = 1; if (e.scale !== void 0) o *= e.scale, i *= e.scale, u = e.scale; else if (s) { var c = 1 / 0, d = 1 / 0; ot(e.maxWidth) && (c = u * e.maxWidth / o), ot(e.maxHeight) && (d = u * e.maxHeight / i), u = Math.min(c, d), o *= u, i *= u; } s || (o *= l, i *= l, u *= l); var f = document.createElement("canvas"); f.width = o, f.height = i, f.style.width = o + "px", f.style.height = i + "px"; var h = f.getContext("2d"); if (o > 0 && i > 0) { h.clearRect(0, 0, o, 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, o, i), h.fill()); } return f; }; function K2e(e, t) { for (var n = atob(e), r = new ArrayBuffer(n.length), a = new Uint8Array(r), o = 0; o < n.length; o++) a[o] = n.charCodeAt(o); return new Blob([r], { type: t }); } function Z$(e) { var t = e.indexOf(","); return e.substr(t + 1); } function $B(e, t, n) { var r = function() { return t.toDataURL(n, e.quality); }; switch (e.output) { case "blob-promise": return new mh(function(a, o) { try { t.toBlob(function(i) { i != null ? a(i) : o(new Error("`canvas.toBlob()` sent a null value in its callback")); }, n, e.quality); } catch (i) { o(i); } }); case "blob": return K2e(Z$(r()), n); case "base64": return Z$(r()); case "base64uri": default: return r(); } } Jg.png = function(e) { return $B(e, this.bufferCanvasImage(e), "image/png"); }; Jg.jpg = function(e) { return $B(e, this.bufferCanvasImage(e), "image/jpeg"); }; var OB = {}; OB.nodeShapeImpl = function(e, t, n, r, a, o, i, s) { switch (e) { case "ellipse": return this.drawEllipsePath(t, n, r, a, o); case "polygon": return this.drawPolygonPath(t, n, r, a, o, i); case "round-polygon": return this.drawRoundPolygonPath(t, n, r, a, o, i, s); case "roundrectangle": case "round-rectangle": return this.drawRoundRectanglePath(t, n, r, a, o, s); case "cutrectangle": case "cut-rectangle": return this.drawCutRectanglePath(t, n, r, a, o, i, s); case "bottomroundrectangle": case "bottom-round-rectangle": return this.drawBottomRoundRectanglePath(t, n, r, a, o, s); case "barrel": return this.drawBarrelPath(t, n, r, a, o); } }; var G2e = FB, bn = FB.prototype; bn.CANVAS_LAYERS = 3; bn.SELECT_BOX = 0; bn.DRAG = 1; bn.NODE = 2; bn.BUFFER_COUNT = 3; bn.TEXTURE_BUFFER = 0; bn.MOTIONBLUR_BUFFER_NODE = 1; bn.MOTIONBLUR_BUFFER_DRAG = 2; function FB(e) { var t = this, n = t.cy.window(), r = n.document; t.data = { canvases: new Array(bn.CANVAS_LAYERS), contexts: new Array(bn.CANVAS_LAYERS), canvasNeedsRedraw: new Array(bn.CANVAS_LAYERS), bufferCanvases: new Array(bn.BUFFER_COUNT), bufferContexts: new Array(bn.CANVAS_LAYERS) }; var a = "-webkit-tap-highlight-color", o = "rgba(0,0,0,0)"; t.data.canvasContainer = r.createElement("div"); var i = t.data.canvasContainer.style; t.data.canvasContainer.style[a] = o, i.position = "relative", i.zIndex = "0", i.overflow = "hidden"; var s = e.cy.container(); s.appendChild(t.data.canvasContainer), s.style[a] = o; 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" }; Pve() && (l["-ms-touch-action"] = "none", l["touch-action"] = "none"); for (var u = 0; u < bn.CANVAS_LAYERS; u++) { var c = t.data.canvases[u] = r.createElement("canvas"); t.data.contexts[u] = c.getContext("2d"), Object.keys(l).forEach(function(W) { c.style[W] = l[W]; }), c.style.position = "absolute", c.setAttribute("data-id", "layer" + u), c.style.zIndex = String(bn.CANVAS_LAYERS - u), t.data.canvasContainer.appendChild(c), t.data.canvasNeedsRedraw[u] = !1; } t.data.topCanvas = t.data.canvases[0], t.data.canvases[bn.NODE].setAttribute("data-id", "layer" + bn.NODE + "-node"), t.data.canvases[bn.SELECT_BOX].setAttribute("data-id", "layer" + bn.SELECT_BOX + "-selectbox"), t.data.canvases[bn.DRAG].setAttribute("data-id", "layer" + bn.DRAG + "-drag"); for (var u = 0; u < bn.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 = ko(), f = function(W) { return { x: (W.x1 + W.x2) / 2, y: (W.y1 + W.y2) / 2 }; }, h = function(W) { return { x: -W.w / 2, y: -W.h / 2 }; }, p = function(W) { var Y = W[0]._private, re = Y.oldBackgroundTimestamp === Y.backgroundTimestamp; return !re; }, v = function(W) { return W[0]._private.nodeKey; }, m = function(W) { return W[0]._private.labelStyleKey; }, g = function(W) { return W[0]._private.sourceLabelStyleKey; }, y = function(W) { return W[0]._private.targetLabelStyleKey; }, x = function(W, Y, re, we, Oe) { return t.drawElement(W, Y, re, !1, !1, Oe); }, w = function(W, Y, re, we, Oe) { return t.drawElementText(W, Y, re, we, "main", Oe); }, k = function(W, Y, re, we, Oe) { return t.drawElementText(W, Y, re, we, "source", Oe); }, C = function(W, Y, re, we, Oe) { return t.drawElementText(W, Y, re, we, "target", Oe); }, S = function(W) { return W.boundingBox(), W[0]._private.bodyBounds; }, _ = function(W) { return W.boundingBox(), W[0]._private.labelBounds.main || d; }, T = function(W) { return W.boundingBox(), W[0]._private.labelBounds.source || d; }, F = function(W) { return W.boundingBox(), W[0]._private.labelBounds.target || d; }, A = function(W, Y) { return Y; }, I = function(W) { return f(S(W)); }, N = function(W, Y, re) { var we = W ? W + "-" : ""; return { x: Y.x + re.pstyle(we + "text-margin-x").pfValue, y: Y.y + re.pstyle(we + "text-margin-y").pfValue }; }, L = function(W, Y, re) { var we = W[0]._private.rscratch; return { x: we[Y], y: we[re] }; }, z = function(W) { return N("", L(W, "labelX", "labelY"), W); }, P = function(W) { return N("source", L(W, "sourceLabelX", "sourceLabelY"), W); }, D = function(W) { return N("target", L(W, "targetLabelX", "targetLabelY"), W); }, M = function(W) { return h(S(W)); }, V = function(W) { return h(T(W)); }, Q = function(W) { return h(F(W)); }, X = function(W) { var Y = _(W), re = h(_(W)); if (W.isNode()) { switch (W.pstyle("text-halign").value) { case "left": re.x = -Y.w; break; case "right": re.x = 0; break; } switch (W.pstyle("text-valign").value) { case "top": re.y = -Y.h; break; case "bottom": re.y = 0; break; } } return re; }, ee = t.data.eleTxrCache = new Mv(t, { getKey: v, doesEleInvalidateKey: p, drawElement: x, getBoundingBox: S, getRotationPoint: I, getRotationOffset: M, allowEdgeTxrCaching: !1, allowParentTxrCaching: !1 }), ue = t.data.lblTxrCache = new Mv(t, { getKey: m, drawElement: w, getBoundingBox: _, getRotationPoint: z, getRotationOffset: X, isVisible: A }), ve = t.data.slbTxrCache = new Mv(t, { getKey: g, drawElement: k, getBoundingBox: T, getRotationPoint: P, getRotationOffset: V, isVisible: A }), ge = t.data.tlbTxrCache = new Mv(t, { getKey: y, drawElement: C, getBoundingBox: F, getRotationPoint: D, getRotationOffset: Q, isVisible: A }), se = t.data.lyrTxrCache = new CB(t); t.onUpdateEleCalcs(function(W, Y) { ee.invalidateElements(Y), ue.invalidateElements(Y), ve.invalidateElements(Y), ge.invalidateElements(Y), se.invalidateElements(Y); for (var re = 0; re < Y.length; re++) { var we = Y[re]._private; we.oldBackgroundTimestamp = we.backgroundTimestamp; } }); var ne = function(W) { for (var Y = 0; Y < W.length; Y++) se.enqueueElementRefinement(W[Y].ele); }; ee.onDequeue(ne), ue.onDequeue(ne), ve.onDequeue(ne), ge.onDequeue(ne); } bn.redrawHint = function(e, t) { var n = this; switch (e) { case "eles": n.data.canvasNeedsRedraw[bn.NODE] = t; break; case "drag": n.data.canvasNeedsRedraw[bn.DRAG] = t; break; case "select": n.data.canvasNeedsRedraw[bn.SELECT_BOX] = t; break; } }; var X2e = typeof Path2D < "u"; bn.path2dEnabled = function(e) { if (e === void 0) return this.pathsEnabled; this.pathsEnabled = !!e; }; bn.usePaths = function() { return X2e && this.pathsEnabled; }; bn.setImgSmoothing = function(e, t) { e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled = t : (e.webkitImageSmoothingEnabled = t, e.mozImageSmoothingEnabled = t, e.msImageSmoothingEnabled = t); }; bn.getImgSmoothing = function(e) { return e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled : e.webkitImageSmoothingEnabled || e.mozImageSmoothingEnabled || e.msImageSmoothingEnabled; }; bn.makeOffscreenCanvas = function(e, t) { var n; if ((typeof OffscreenCanvas > "u" ? "undefined" : Rr(OffscreenCanvas)) !== "undefined") n = new OffscreenCanvas(e, t); else { var r = this.cy.window(), a = r.document; n = a.createElement("canvas"), n.width = e, n.height = t; } return n; }; [SB, Rs, Nl, hS, rp, Eh, Do, cc, Jg, OB].forEach(function(e) { At(bn, e); }); var Y2e = [{ name: "null", impl: dB }, { name: "base", impl: xB }, { name: "canvas", impl: G2e }], Z2e = [{ type: "layout", extensions: r2e }, { type: "renderer", extensions: Y2e }], AB = {}, IB = {}; function PB(e, t, n) { var r = n, a = function(S) { Fn("Can not register `" + t + "` for `" + e + "` since `" + S + "` already exists in the prototype and can not be overridden"); }; if (e === "core") { if (vb.prototype[t]) return a(t); vb.prototype[t] = n; } else if (e === "collection") { if (da.prototype[t]) return a(t); da.prototype[t] = n; } else if (e === "layout") { for (var o = function(S) { this.options = S, n.call(this, S), Cn(this._private) || (this._private = {}), this._private.cy = S.cy, this._private.listeners = [], this.createEmitter(); }, i = o.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 T = 0; T < _.length; T++) _[T].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); } }; At(i, { createEmitter: function() { return this._private.emitter = new iw(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; } }), $n.eventAliasesOn(i), r = o; } else if (e === "renderer" && t !== "null" && t !== "base") { var h = LB("renderer", "base"), p = h.prototype, v = n, m = n.prototype, g = function() { h.apply(this, arguments), v.apply(this, arguments); }, y = g.prototype; for (var x in p) { var w = p[x], k = m[x] != null; if (k) return a(x); y[x] = w; } for (var C in m) y[C] = m[C]; p.clientFunctions.forEach(function(S) { y[S] = y[S] || function() { pr("Renderer does not implement `renderer." + S + "()` on its prototype"); }; }), r = g; } else if (e === "__proto__" || e === "constructor" || e === "prototype") return pr(e + " is an illegal type to be registered, possibly lead to prototype pollutions"); return iD({ map: AB, keys: [e, t], value: r }); } function LB(e, t) { return sD({ map: AB, keys: [e, t] }); } function Q2e(e, t, n, r, a) { return iD({ map: IB, keys: [e, t, n, r], value: a }); } function J2e(e, t, n, r) { return sD({ map: IB, keys: [e, t, n, r] }); } var ewe = function() { if (arguments.length === 2) return LB.apply(null, arguments); if (arguments.length === 3) return PB.apply(null, arguments); if (arguments.length === 4) return J2e.apply(null, arguments); if (arguments.length === 5) return Q2e.apply(null, arguments); pr("Invalid extension access syntax"); }; vb.prototype.extension = ewe; Z2e.forEach(function(e) { e.extensions.forEach(function(t) { PB(e.type, t.name, t.impl); }); }); var twe = function e() { if (!(this instanceof e)) return new e(); this.length = 0; }, _d = twe.prototype; _d.instanceString = function() { return "stylesheet"; }; _d.selector = function(e) { var t = this.length++; return this[t] = { selector: e, properties: [] }, this; }; _d.css = function(e, t) { var n = this.length - 1; if (kt(e)) this[n].properties.push({ name: e, value: t }); else if (Cn(e)) for (var r = e, a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o], s = r[i]; if (s != null) { var l = Aa.properties[i] || Aa.properties[Y2(i)]; if (l != null) { var u = l.name, c = s; this[n].properties.push({ name: u, value: c }); } } } return this; }; _d.style = _d.css; _d.generateStyle = function(e) { var t = new Aa(e); return this.appendToStyle(t); }; _d.appendToStyle = function(e) { for (var t = 0; t < this.length; t++) { var n = this[t], r = n.selector, a = n.properties; e.selector(r); for (var o = 0; o < a.length; o++) { var i = a[o]; e.css(i.name, i.value); } } return e; }; const Q$ = "Copy to clipboard", nwe = "Copied!", rwe = "#8300bf", awe = { name: "CopyToClipboard", props: { content: { type: String, default: "" }, /** * `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: Q$, autoHideTimeout: 0, iconColor: rwe }; }, 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 || "", a = new Blob([t], { type: "text/html" }), o = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({ "text/html": a, "text/plain": o }); await navigator.clipboard.write([i]); } catch (t) { console.error( "Error when trying to use navigator.clipboard.write()", t ), e = !1; } e ? this.textLabel = nwe : this.textLabel = "Error trying to copy to clipboard!"; }, resetSettings: function() { this.autoHideTimeout = 0, this.textLabel = Q$; } } }, owe = { class: "visually-hidden" }; function iwe(e, t, n, r, a, o) { const i = Rle, s = Ta, l = Es, u = G2; return $(), ae(u, { content: e.textLabel, placement: "bottom", "hide-after": e.autoHideTimeout, effect: "clipboard-tooltip", onHide: o.resetSettings }, { default: q(() => [ Z(l, { class: H(["copy-clipboard-button", n.theme]), size: "small", onClick: o.copyToClipboard }, { default: q(() => [ Z(s, { color: e.iconColor }, { default: q(() => [ Z(i) ]), _: 1 }, 8, ["color"]), K("span", owe, _e(e.textLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content", "hide-after", "onHide"]); } const NB = /* @__PURE__ */ Ds(awe, [["render", iwe], ["__scopeId", "data-v-de3b5311"]]), swe = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, lwe = { 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"; }, capitalise: function(e) { return swe(e); }, handleTooltip: function(e) { this.tooltipId = this.tooltipId === e ? void 0 : e, this.$emit("featureTooltip", this.tooltipId); } } }, vS = (e) => (ma("data-v-8168ee98"), e = e(), ya(), e), uwe = { class: "dialog-container" }, cwe = /* @__PURE__ */ vS(() => /* @__PURE__ */ K("span", { class: "dialog-title" }, "Finalise drawing", -1)), dwe = /* @__PURE__ */ vS(() => /* @__PURE__ */ K("span", { class: "dialog-title" }, "Visualise connection", -1)), pwe = /* @__PURE__ */ vS(() => /* @__PURE__ */ K("b", null, [ /* @__PURE__ */ K("span", null, "Related Features") ], -1)); function fwe(e, t, n, r, a, o) { const i = Es, s = Bpe, l = X2, u = Hg, c = Hpe; return $(), B("div", uwe, [ Z(l, null, { default: q(() => [ Z(u, null, { default: q(() => [ n.inDrawing ? ($(), ae(l, { key: 0 }, { default: q(() => [ cwe, Z(s, null, { default: q(() => [ Z(i, { type: "primary", plain: "", onClick: t[0] || (t[0] = (d) => e.$emit("confirmDrawn", !0)) }, { default: q(() => [ ze(" Confirm ") ]), _: 1 }), Z(i, { type: "primary", plain: "", onClick: t[1] || (t[1] = (d) => e.$emit("cancelDrawn", !0)) }, { default: q(() => [ ze(" Cancel ") ]), _: 1 }) ]), _: 1 }) ]), _: 1 })) : ($(), ae(l, { key: 1 }, { default: q(() => [ dwe, Z(i, { type: "primary", plain: "", onClick: t[2] || (t[2] = (d) => e.$emit("dialogDisplay", !1)) }, { default: q(() => [ ze(" Close ") ]), _: 1 }) ]), _: 1 })) ]), _: 1 }) ]), _: 1 }), n.connectionExist ? ($(), ae(l, { key: 0 }, { default: q(() => [ Z(u, null, { default: q(() => [ pwe, ($(!0), B(Ue, null, yt(n.connectionEntry, (d, f) => ($(), ae(l, { key: f }, { default: q(() => [ Z(c, { shadow: o.shadowDisplay(f), onClick: (h) => o.handleTooltip(f) }, { default: q(() => [ K("span", null, _e(o.capitalise(d.label)), 1) ]), _: 2 }, 1032, ["shadow", "onClick"]) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 })) : te("", !0) ]); } const hwe = /* @__PURE__ */ Ds(lwe, [["render", fwe], ["__scopeId", "data-v-8168ee98"]]), MB = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, vwe = ["xlink:href"], gwe = { __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) => ($(), B("svg", { class: H(["map-icon", { "map-icon-spin": e.spin }]) }, [ K("use", { "xlink:href": `#${e.icon}` }, null, 8, vwe) ], 2)); } }, mwe = /* @__PURE__ */ MB(gwe, [["__scopeId", "data-v-e172d5ff"]]), DB = ` 2horpanel ? `, BB = ` 2vertpanel ? `, RB = ` 3panel ? `, zB = ` 4panel ? `, VB = ` 2horpanel ? `, jB = ` 2horpanel ? `, HB = ` 4panel ? `, UB = ` changeBckgd `, qB = ` close no bk `, WB = ` close `, KB = ` closeFullScreen `, GB = ` Comment `, XB = ` Connection `, YB = ` dock `, ZB = ` drawLine `, QB = ` drawPoint `, JB = ` drawPolygon `, eR = ` drawTrash `, tR = ` fitWindow `, nR = ` fullScreen `, rR = 'DataPortal-Icons', aR = ` magnifyingGlass `, oR = `Created by Wahyu Prihantorofrom the Noun Project`, iR = ` openMap `, sR = ` Artboard Copy 6 `, lR = ` permalink `, uR = ` play `, cR = ` resetZoom `, dR = ` singlepanel ? `, pR = ` tooltips ? `, fR = ` undock `, hR = ` zoomIn `, vR = ` zoomOut `, gR = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, mR = (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(), ywe = !0, bwe = !0, wwe = ["fill"], J$ = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": DB, "/assets/icons/2vertpanel.svg": BB, "/assets/icons/3panel.svg": RB, "/assets/icons/4panel.svg": zB, "/assets/icons/5panel.svg": VB, "/assets/icons/6panel.svg": jB, "/assets/icons/6panelVertical.svg": HB, "/assets/icons/changeBckgd.svg": UB, "/assets/icons/close-no-bk.svg": qB, "/assets/icons/close.svg": WB, "/assets/icons/closeFullScreen.svg": KB, "/assets/icons/comment.svg": GB, "/assets/icons/connection.svg": XB, "/assets/icons/dock.svg": YB, "/assets/icons/drawLine.svg": ZB, "/assets/icons/drawPoint.svg": QB, "/assets/icons/drawPolygon.svg": JB, "/assets/icons/drawTrash.svg": eR, "/assets/icons/fitWindow.svg": tR, "/assets/icons/fullScreen.svg": nR, "/assets/icons/help.svg": rR, "/assets/icons/magnifyingGlass.svg": aR, "/assets/icons/noun-filter.svg": oR, "/assets/icons/openMap.svg": iR, "/assets/icons/pause.svg": sR, "/assets/icons/permalink.svg": lR, "/assets/icons/play.svg": uR, "/assets/icons/resetZoom.svg": cR, "/assets/icons/singlepanel.svg": dR, "/assets/icons/tooltips.svg": pR, "/assets/icons/undock.svg": fR, "/assets/icons/zoomIn.svg": hR, "/assets/icons/zoomOut.svg": vR }), xwe = Object.keys(J$).map((e) => { const t = gR(J$[e], ywe, bwe, wwe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return mR(t).replace("", "symbol>"); }); xwe.join(` `); const g5 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": DB, "/assets/icons/2vertpanel.svg": BB, "/assets/icons/3panel.svg": RB, "/assets/icons/4panel.svg": zB, "/assets/icons/5panel.svg": VB, "/assets/icons/6panel.svg": jB, "/assets/icons/6panelVertical.svg": HB, "/assets/icons/changeBckgd.svg": UB, "/assets/icons/close-no-bk.svg": qB, "/assets/icons/close.svg": WB, "/assets/icons/closeFullScreen.svg": KB, "/assets/icons/comment.svg": GB, "/assets/icons/connection.svg": XB, "/assets/icons/dock.svg": YB, "/assets/icons/drawLine.svg": ZB, "/assets/icons/drawPoint.svg": QB, "/assets/icons/drawPolygon.svg": JB, "/assets/icons/drawTrash.svg": eR, "/assets/icons/fitWindow.svg": tR, "/assets/icons/fullScreen.svg": nR, "/assets/icons/help.svg": rR, "/assets/icons/magnifyingGlass.svg": aR, "/assets/icons/noun-filter.svg": oR, "/assets/icons/openMap.svg": iR, "/assets/icons/pause.svg": sR, "/assets/icons/permalink.svg": lR, "/assets/icons/play.svg": uR, "/assets/icons/resetZoom.svg": cR, "/assets/icons/singlepanel.svg": dR, "/assets/icons/tooltips.svg": pR, "/assets/icons/undock.svg": fR, "/assets/icons/zoomIn.svg": hR, "/assets/icons/zoomOut.svg": vR }), kwe = Object.keys(g5).map((e) => { const t = gR(g5[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return mR(t).replace("", "symbol>"); }), Cwe = { name: "MapSvgSpriteColor", svgContext: g5, svgSprite: kwe.join(` `) // concatenate all symbols into $options.svgSprite }, Swe = ["innerHTML"]; function Ewe(e, t, n, r, a, o) { return $(), B("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, Swe); } const _we = /* @__PURE__ */ MB(Cwe, [["render", Ewe]]), Twe = (e, t) => { let n, r, a, o, i, s; t.style.left = "", t.style.top = "", t.addEventListener( "mousedown", (u) => { u.preventDefault(), n = t.offsetLeft, r = t.offsetTop, a = u.clientX, o = u.clientY, t.addEventListener("mousemove", l, !1), document.addEventListener( "mouseup", () => { t.removeEventListener("mousemove", l, !1); }, !1 ); }, !1 ); function l(u) { u.preventDefault(), i = n - (a - u.clientX), s = r - (o - u.clientY), t.style.left = `${i}px`, t.style.top = `${s}px`; } }, $we = { name: "DrawToolbar", components: { MapSvgIcon: mwe, MapSvgSpriteColor: _we }, 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 }, { name: "Delete", active: !1, disabled: !1 }, { name: "Point", active: !1, disabled: !1 }, { name: "LineString", active: !1, disabled: !1 }, { name: "Polygon", active: !1, disabled: !1 }, { name: "Connection", active: !1, disabled: !0 } ], 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), e === "Delete" && (this.connectionDisplay = !1); }, activeDrawTool: function(e) { this.updateToolbarIcons(e), 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) { this.toolbarIcons.map((t) => { t.name === e ? t.active = !0 : t.active = !1; }), this.toolbarIcons.filter((t) => t.name !== "Connection" && t.name !== e).map((t) => { e ? t.disabled = !0 : t.disabled = !1; }), this.toolbarCssHacks(); }, disabledToolbarConnectionIcon: function(e) { this.toolbarIcons.filter((t) => t.name === "Connection").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.name === "Connection").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"); Twe(this.mapCanvas.containerHTML, e); let t, n; const r = this.mapCanvas.containerHTML.getBoundingClientRect(), a = e.getBoundingClientRect(); this.dialogPosition.x > r.width / 2 ? t = this.dialogPosition.x - a.width : t = this.dialogPosition.x, this.dialogPosition.y > r.height / 2 ? n = this.dialogPosition.y - a.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); } }, Owe = { class: "toolbar-container" }, Fwe = { class: "toolbar-icons" }; function Awe(e, t, n, r, a, o) { const i = lt("map-svg-sprite-color"), s = lt("map-svg-icon"), l = H4, u = hwe; return $(), B("div", Owe, [ Z(i), K("div", Fwe, [ o.showEditModeIcon ? ($(), ae(l, { key: 0, content: "Edit Mode", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[o.hoverIndex("editPopover")].value, ref: "editPopover" }, { reference: q(() => [ Z(s, { icon: "comment", class: "icon-button drawEdit", onClick: t[0] || (t[0] = (c) => o.modeClickEvent("Edit")), onMouseover: t[1] || (t[1] = (c) => o.showTooltip(o.hoverIndex("editPopover"))), onMouseout: t[2] || (t[2] = (c) => o.hideTooltip(o.hoverIndex("editPopover"))) }) ]), _: 1 }, 8, ["visible"])) : te("", !0), o.showDeleteModeIcon ? ($(), ae(l, { key: 1, content: "Delete Mode", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[o.hoverIndex("deletePopover")].value, ref: "deletePopover" }, { reference: q(() => [ Z(s, { icon: "drawTrash", class: "icon-button drawDelete", onClick: t[3] || (t[3] = (c) => o.modeClickEvent("Delete")), onMouseover: t[4] || (t[4] = (c) => o.showTooltip(o.hoverIndex("deletePopover"))), onMouseout: t[5] || (t[5] = (c) => o.hideTooltip(o.hoverIndex("deletePopover"))) }) ]), _: 1 }, 8, ["visible"])) : te("", !0), o.showDrawPointIcon ? ($(), ae(l, { key: 2, content: "Draw Point", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[o.hoverIndex("pointPopover")].value, ref: "pointPopover" }, { reference: q(() => [ Z(s, { icon: "drawPoint", class: "icon-button drawPoint", onClick: t[6] || (t[6] = (c) => o.toolClickEvent("Point")), onMouseover: t[7] || (t[7] = (c) => o.showTooltip(o.hoverIndex("pointPopover"))), onMouseout: t[8] || (t[8] = (c) => o.hideTooltip(o.hoverIndex("pointPopover"))) }) ]), _: 1 }, 8, ["visible"])) : te("", !0), o.showDrawLineStringIcon ? ($(), ae(l, { key: 3, content: "Draw LineString", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[o.hoverIndex("lineStringPopover")].value, ref: "drawLinePopover" }, { reference: q(() => [ Z(s, { icon: "drawLine", class: "icon-button drawLineString", onClick: t[9] || (t[9] = (c) => o.toolClickEvent("LineString")), onMouseover: t[10] || (t[10] = (c) => o.showTooltip(o.hoverIndex("lineStringPopover"))), onMouseout: t[11] || (t[11] = (c) => o.hideTooltip(o.hoverIndex("lineStringPopover"))) }) ]), _: 1 }, 8, ["visible"])) : te("", !0), o.showDrawPolygonIcon ? ($(), ae(l, { key: 4, content: "Draw Polygon", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[o.hoverIndex("polygonPopover")].value, ref: "polygonPopover" }, { reference: q(() => [ Z(s, { icon: "drawPolygon", class: "icon-button drawPolygon", onClick: t[12] || (t[12] = (c) => o.toolClickEvent("Polygon")), onMouseover: t[13] || (t[13] = (c) => o.showTooltip(o.hoverIndex("polygonPopover"))), onMouseout: t[14] || (t[14] = (c) => o.hideTooltip(o.hoverIndex("polygonPopover"))) }) ]), _: 1 }, 8, ["visible"])) : te("", !0), o.showConnectionIcon ? ($(), ae(l, { key: 5, content: "Connectivity", placement: "top", teleported: !1, trigger: "manual", width: "100", "popper-class": "flatmap-popper", visible: n.hoverVisibilities[o.hoverIndex("connectionPopover")].value, ref: "connectionPopover" }, { reference: q(() => [ Z(s, { icon: "connection", class: "icon-button drawConnection", onClick: t[15] || (t[15] = (c) => o.connectionClickEvent()), onMouseover: t[16] || (t[16] = (c) => o.showTooltip(o.hoverIndex("connectionPopover"))), onMouseout: t[17] || (t[17] = (c) => o.hideTooltip(o.hoverIndex("connectionPopover"))) }) ]), _: 1 }, 8, ["visible"])) : te("", !0) ]), n.mapCanvas ? qe(($(), ae(u, { key: 0, class: "connection-dialog", connectionEntry: n.connectionEntry, inDrawing: o.inDrawing, connectionExist: o.connectionExist, onDialogDisplay: t[18] || (t[18] = (c) => o.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"])), [ [ct, e.connectionDisplay] ]) : te("", !0) ]); } const vlt = /* @__PURE__ */ Ds($we, [["render", Awe], ["__scopeId", "data-v-6ac1a744"]]), Iwe = { 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" ), a = ((t = r == null ? void 0 : r.style) == null ? void 0 : t.transform) || "", o = this.extractMarkerPosition(a); n.forEach((i) => { const s = i.style.transform; this.extractMarkerPosition(s) === o && 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(), a = 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 || a.forEach((o) => { o.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) : ""; } } }, gS = (e) => (ma("data-v-3efb89fb"), e = e(), ya(), e), Pwe = /* @__PURE__ */ gS(() => /* @__PURE__ */ K("h4", null, "Help Mode", -1)), Lwe = /* @__PURE__ */ gS(() => /* @__PURE__ */ K("p", null, [ /* @__PURE__ */ ze(" All caught up! "), /* @__PURE__ */ K("br"), /* @__PURE__ */ ze(" Click 'Help' to restart. ") ], -1)), Nwe = /* @__PURE__ */ gS(() => /* @__PURE__ */ K("p", null, 'Click "Next" to see the next item.', -1)); function Mwe(e, t, n, r, a, o) { const i = Es; return $(), B("div", { class: H(["help-mode-dialog", { finish: n.lastItem }]) }, [ Pwe, n.lastItem ? ($(), B(Ue, { key: 0 }, [ Lwe, K("div", null, [ Z(i, { class: "button", onClick: o.finishHelpMode }, { default: q(() => [ ze(" Finish ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) : ($(), B(Ue, { key: 1 }, [ Nwe, K("div", null, [ Z(i, { class: "button", onClick: o.showNext }, { default: q(() => [ ze(" Next ") ]), _: 1 }, 8, ["onClick"]), Z(i, { class: "button secondary", onClick: o.finishHelpMode }, { default: q(() => [ ze(" Exit Help Mode ") ]), _: 1 }, 8, ["onClick"]) ]) ], 64)) ], 2); } const glt = /* @__PURE__ */ Ds(Iwe, [["render", Mwe], ["__scopeId", "data-v-3efb89fb"]]); function Dwe(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(a) { a(n); }), (r = e.get("*")) && r.slice().map(function(a) { a(t, n); }); } }; } const Jv = new Dwe(), Bwe = { name: "ExternalResourceCard", props: { resources: { type: Array, default: () => [] } }, data: function() { return { pubmeds: [], pubmedIds: [], ElIconNotebook: un(Yle) }; }, methods: { capitalise: function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, openUrl: function(e) { Jv.emit("open-pubmed-url", e), window.open(e, "_blank"); } } }, Rwe = { class: "resource-container" }; function zwe(e, t, n, r, a, o) { const i = Es; return $(), B("div", Rwe, [ ($(!0), B(Ue, null, yt(n.resources, (s) => ($(), B("div", { key: s.id, class: "resource" }, [ s.id === "pubmed" ? ($(), ae(i, { key: 0, class: "button", id: "open-pubmed-button", icon: e.ElIconNotebook, onClick: (l) => o.openUrl(s.url) }, { default: q(() => [ ze(" Open publications in PubMed ") ]), _: 2 }, 1032, ["icon", "onClick"])) : te("", !0) ]))), 128)) ]); } const Vwe = /* @__PURE__ */ Ds(Bwe, [["render", zwe], ["__scopeId", "data-v-4f8d8b0f"]]), jwe = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), Hwe = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, Uwe = { 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 jwe(e); }, capitalise: function(e) { return Hwe(e); }, openUrl: function(e) { window.open(e, "_blank"); }, openAll: function() { Jv.emit("onActionClick", { type: "Facets", labels: this.tooltipEntry.componentsWithDatasets.map((e) => e.name) }); }, openAxons: function() { Jv.emit("onActionClick", { type: "Facets", labels: this.tooltipEntry.destinationsWithDatasets.map((e) => e.name) }); }, openDendrites: function() { Jv.emit("onActionClick", { type: "Facets", labels: this.tooltipEntry.originsWithDatasets.map((e) => e.name) }); }, pubmedSearchUrlUpdate: function(e) { this.pubmedSearchUrl = e; } } }, _h = (e) => (ma("data-v-ef9a0f6d"), e = e(), ya(), e), qwe = { key: 0, class: "main" }, Wwe = { key: 0, class: "block" }, Kwe = { class: "title" }, Gwe = { key: 0, class: "subtitle" }, Xwe = { key: 1, class: "block" }, Ywe = { class: "title" }, Zwe = { key: 2, class: "attribute-title-container" }, Qwe = /* @__PURE__ */ _h(() => /* @__PURE__ */ K("span", { class: "attribute-title" }, "Alert", -1)), Jwe = { style: { "word-break": "keep-all" } }, exe = { class: "content-container scrollbar" }, txe = { key: 0, class: "block" }, nxe = { class: "attribute-title-container" }, rxe = /* @__PURE__ */ _h(() => /* @__PURE__ */ K("span", { class: "attribute-title" }, "Origin", -1)), axe = { style: { "word-break": "keep-all" } }, oxe = /* @__PURE__ */ _h(() => /* @__PURE__ */ K("i", null, "Origin", -1)), ixe = ["origin-item-label"], sxe = { key: 0, class: "separator" }, lxe = { key: 1, class: "block" }, uxe = /* @__PURE__ */ _h(() => /* @__PURE__ */ K("div", { class: "attribute-title-container" }, [ /* @__PURE__ */ K("div", { class: "attribute-title" }, "Components") ], -1)), cxe = ["component-item-label"], dxe = { key: 0, class: "separator" }, pxe = { key: 2, class: "block" }, fxe = { class: "attribute-title-container" }, hxe = /* @__PURE__ */ _h(() => /* @__PURE__ */ K("span", { class: "attribute-title" }, "Destination", -1)), vxe = /* @__PURE__ */ _h(() => /* @__PURE__ */ K("span", { style: { "word-break": "keep-all" } }, [ /* @__PURE__ */ K("i", null, "Destination"), /* @__PURE__ */ ze(" is where the axons terminate ") ], -1)), gxe = ["destination-item-label"], mxe = { key: 0, class: "separator" }; function yxe(e, t, n, r, a, o) { const i = eue, s = Ta, l = H4, u = XN, c = j2, d = Es, f = Vwe, h = ZM; return n.tooltipEntry ? qe(($(), B("div", qwe, [ n.tooltipEntry.title ? ($(), B("div", Wwe, [ K("div", Kwe, _e(o.capitalise(n.tooltipEntry.title)), 1), n.tooltipEntry.provenanceTaxonomyLabel && n.tooltipEntry.provenanceTaxonomyLabel.length > 0 ? ($(), B("div", Gwe, _e(o.provSpeciesDescription), 1)) : te("", !0) ])) : ($(), B("div", Xwe, [ K("div", Ywe, _e(n.tooltipEntry.featureId), 1) ])), o.featuresAlert ? ($(), B("div", Zwe, [ Qwe, Z(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: q(() => [ Z(s, { class: "info" }, { default: q(() => [ Z(i) ]), _: 1 }) ]), default: q(() => [ K("span", Jwe, _e(o.featuresAlert), 1) ]), _: 1 }) ])) : te("", !0), qe(K("div", { class: "hide", id: "hide-path-info", onClick: t[0] || (t[0] = (p) => e.showDetails = !1) }, [ ze(" Hide path information "), Z(s, null, { default: q(() => [ Z(u) ]), _: 1 }) ], 512), [ [ct, e.showDetails] ]), qe(K("div", { class: "hide", id: "show-path-info", onClick: t[1] || (t[1] = (p) => e.showDetails = !0) }, [ ze(" Show path information "), Z(s, null, { default: q(() => [ Z(c) ]), _: 1 }) ], 512), [ [ct, !e.showDetails] ]), Z(lr, { name: "slide-fade" }, { default: q(() => [ qe(K("div", exe, [ ze(_e(n.tooltipEntry.paths) + " ", 1), n.tooltipEntry.origins && n.tooltipEntry.origins.length > 0 ? ($(), B("div", txe, [ K("div", nxe, [ rxe, Z(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: q(() => [ Z(s, { class: "info" }, { default: q(() => [ Z(i) ]), _: 1 }) ]), default: q(() => [ K("span", axe, [ oxe, ze(" " + _e(o.originDescription), 1) ]) ]), _: 1 }) ]), ($(!0), B(Ue, null, yt(n.tooltipEntry.origins, (p, v) => ($(), B("div", { class: "attribute-content", "origin-item-label": p, key: p }, [ ze(_e(o.capitalise(p)) + " ", 1), v != n.tooltipEntry.origins.length - 1 ? ($(), B("div", sxe)) : te("", !0) ], 8, ixe))), 128)), qe(Z(d, { class: "button", id: "open-dendrites-button", onClick: o.openDendrites }, { default: q(() => [ ze(" Explore origin data ") ]), _: 1 }, 8, ["onClick"]), [ [ ct, n.tooltipEntry.originsWithDatasets && n.tooltipEntry.originsWithDatasets.length > 0 ] ]) ])) : te("", !0), n.tooltipEntry.components && n.tooltipEntry.components.length > 0 ? ($(), B("div", lxe, [ uxe, ($(!0), B(Ue, null, yt(n.tooltipEntry.components, (p, v) => ($(), B("div", { class: "attribute-content", "component-item-label": p, key: p }, [ ze(_e(o.capitalise(p)) + " ", 1), v != n.tooltipEntry.components.length - 1 ? ($(), B("div", dxe)) : te("", !0) ], 8, cxe))), 128)) ])) : te("", !0), n.tooltipEntry.destinations && n.tooltipEntry.destinations.length > 0 ? ($(), B("div", pxe, [ K("div", fxe, [ hxe, Z(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: q(() => [ Z(s, { class: "info" }, { default: q(() => [ Z(i) ]), _: 1 }) ]), default: q(() => [ vxe ]), _: 1 }) ]), ($(!0), B(Ue, null, yt(n.tooltipEntry.destinations, (p, v) => ($(), B("div", { class: "attribute-content", "destination-item-label": p, key: p }, [ ze(_e(o.capitalise(p)) + " ", 1), v != n.tooltipEntry.destinations.length - 1 ? ($(), B("div", mxe)) : te("", !0) ], 8, gxe))), 128)), qe(Z(d, { class: "button", onClick: o.openAxons }, { default: q(() => [ ze(" Explore destination data ") ]), _: 1 }, 8, ["onClick"]), [ [ ct, n.tooltipEntry.destinationsWithDatasets && n.tooltipEntry.destinationsWithDatasets.length > 0 ] ]) ])) : te("", !0), qe(Z(d, { class: "button", onClick: o.openAll }, { default: q(() => [ ze(" Search for data on components ") ]), _: 1 }, 8, ["onClick"]), [ [ ct, n.tooltipEntry.componentsWithDatasets && n.tooltipEntry.componentsWithDatasets.length > 0 ] ]), Z(f, { resources: o.resources }, null, 8, ["resources"]) ], 512), [ [ct, e.showDetails] ]) ]), _: 1 }) ])), [ [h, e.loading] ]) : te("", !0); } const bxe = /* @__PURE__ */ Ds(Uwe, [["render", yxe], ["__scopeId", "data-v-ef9a0f6d"]]), wxe = { name: "Tooltip", props: { tooltipEntry: { type: Object }, annotationDisplay: { type: Boolean, default: !1 }, annotationEntry: { type: Object } }, mounted: function() { Jv.on("onActionClick", (e) => { this.$emit("onActionClick", e); }); } }, xxe = { class: "tooltip-container", id: "tooltip-container" }; function kxe(e, t, n, r, a, o) { const i = vve, s = bxe; return $(), B("div", xxe, [ n.annotationDisplay ? ($(), ae(i, { key: 0, annotationEntry: n.annotationEntry, onAnnotation: t[0] || (t[0] = (l) => e.$emit("annotation", l)) }, null, 8, ["annotationEntry"])) : ($(), ae(s, { key: 1, tooltipEntry: n.tooltipEntry }, null, 8, ["tooltipEntry"])) ]); } const mlt = /* @__PURE__ */ Ds(wxe, [["render", kxe], ["__scopeId", "data-v-229b3988"]]), Cxe = { 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"), a = r.clientWidth, o = r.getBoundingClientRect().x, i = r.querySelector(".lastChildInItem"); let s = 0; if (i) { const u = i.getBoundingClientRect(); s = u.x + u.width - o; } const l = s > a; 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); } }, Sxe = { class: "selections-container" }, Exe = { class: "title-text" }, _xe = { class: "tree-container", ref: "treeContainer" }, Txe = { class: "tooltip-text" }, $xe = ["onClick", "onMouseover", "onMouseenter"], Oxe = ["onClick", "onMouseover", "onMouseenter"], Fxe = { class: "lastChildInItem" }, Axe = { key: 0, class: "node-options" }; function Ixe(e, t, n, r, a, o) { const i = Hg, s = jg, l = X2, u = H4, c = Kfe, d = Zhe, f = ZM; return $(), B("div", Sxe, [ n.title ? ($(), ae(l, { key: 0 }, { default: q(() => [ Z(i, { span: 12 }, { default: q(() => [ K("div", Exe, _e(n.title), 1) ]), _: 1 }), n.enableFilter ? ($(), ae(i, { key: 0, span: 12 }, { default: q(() => [ K("div", null, [ Z(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 })) : te("", !0) ]), _: 1 })) : te("", !0), K("div", _xe, [ K("div", { class: H(["tree-tooltip", e.tooltipAtBottom ? "bottom" : ""]) }, [ Z(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: q(() => [ K("div", Txe, _e(e.tooltipLabel), 1) ]), _: 1 }, 8, ["visible"]) ], 2), qe(($(), ae(d, { ref: "regionTree", "element-loading-background": "rgba(0, 0, 0, 0.3)", "show-checkbox": "", "node-key": o.nodeKey, data: n.treeData, "check-strictly": !1, "expand-on-click-node": !1, "render-after-expand": !1, "default-expanded-keys": o.expandedKeys, onCheck: o.checkChanged, indent: 8, "filter-node-method": o.filterNode, class: H([n.mapType === "flatmap" ? "hide_grandchildren_checkbox" : ""]) }, { default: q(({ node: h, data: p }) => [ n.mapType === "flatmap" ? ($(), B("span", { key: 0, class: H(["region-tree-node", { activeItem: o.nodeIsActive(p), hoverItem: o.nodeIsHover(p) }]), onClick: (v) => o.changeActiveByNode(p), onMouseover: (v) => o.changeHoverByNode(p, !1), onMouseenter: (v) => o.displayTooltip(h.label, !0, v), onMouseleave: t[1] || (t[1] = (v) => o.displayTooltip("", !1, v)) }, [ K("div", { style: Qe(o.getBackgroundStyles(p)), class: "lastChildInItem" }, _e(h.label), 5) ], 42, $xe)) : n.mapType === "scaffold" ? ($(), B("span", { key: 1, class: H(["region-tree-node", { activeItem: n.active.includes(p.id), hoverItem: n.hover.includes(p.id) }]), onClick: (v) => o.changeActiveByNode(p, !0), onMouseover: (v) => o.changeHoverByNode(p, !0, v), onMouseenter: (v) => o.displayTooltip(h.label, !0, v), onMouseleave: t[2] || (t[2] = (v) => o.displayTooltip("", !1, v)) }, [ p.isPrimitives ? ($(), ae(c, { key: 0, class: H({ "show-picker": n.showColourPicker }), modelValue: p.activeColour, "onUpdate:modelValue": (v) => p.activeColour = v, size: "small", "popper-class": e.myPopperClass, onChange: (v) => o.setColour(p, v) }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "popper-class", "onChange"])) : te("", !0), K("div", Fxe, [ K("span", null, _e(h.label), 1), p.isTextureSlides ? ($(), B("span", Axe, " (Texture) ")) : te("", !0) ]) ], 42, Oxe)) : te("", !0) ]), _: 1 }, 8, ["node-key", "data", "default-expanded-keys", "onCheck", "filter-node-method", "class"])), [ [f, !n.isReady] ]) ], 512) ]); } const ylt = /* @__PURE__ */ Ds(Cxe, [["render", Ixe], ["__scopeId", "data-v-823a8388"]]), Pxe = { 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 yR() { 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 ap = yR(); function Lxe(e) { ap = e; } const bR = /[&<>"']/, Nxe = new RegExp(bR.source, "g"), wR = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Mxe = new RegExp(wR.source, "g"), Dxe = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, eO = (e) => Dxe[e]; function Ea(e, t) { if (t) { if (bR.test(e)) return e.replace(Nxe, eO); } else if (wR.test(e)) return e.replace(Mxe, eO); return e; } const Bxe = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; function xR(e) { return e.replace(Bxe, (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 Rxe = /(^|[^\[])\^/g; function jn(e, t) { e = typeof e == "string" ? e : e.source, t = t || ""; const n = { replace: (r, a) => (a = a.source || a, a = a.replace(Rxe, "$1"), e = e.replace(r, a), n), getRegex: () => new RegExp(e, t) }; return n; } const zxe = /[^\w:]/g, Vxe = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; function tO(e, t, n) { if (e) { let r; try { r = decodeURIComponent(xR(n)).replace(zxe, "").toLowerCase(); } catch { return null; } if (r.indexOf("javascript:") === 0 || r.indexOf("vbscript:") === 0 || r.indexOf("data:") === 0) return null; } t && !Vxe.test(n) && (n = qxe(t, n)); try { n = encodeURI(n).replace(/%25/g, "%"); } catch { return null; } return n; } const d1 = {}, jxe = /^[^:]+:\/*[^/]*$/, Hxe = /^([^:]+:)[\s\S]*$/, Uxe = /^([^:]+:\/*[^/]*)[\s\S]*$/; function qxe(e, t) { d1[" " + e] || (jxe.test(e) ? d1[" " + e] = e + "/" : d1[" " + e] = by(e, "/", !0)), e = d1[" " + e]; const n = e.indexOf(":") === -1; return t.substring(0, 2) === "//" ? n ? t : e.replace(Hxe, "$1") + t : t.charAt(0) === "/" ? n ? t : e.replace(Uxe, "$1") + t : e + t; } const wb = { exec: function() { } }; function nO(e, t) { const n = e.replace(/\|/g, (o, i, s) => { let l = !1, u = i; for (; --u >= 0 && s[u] === "\\"; ) l = !l; return l ? "|" : " |"; }), r = n.split(/ \|/); let a = 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 (; a < r.length; a++) r[a] = r[a].trim().replace(/\\\|/g, "|"); return r; } function by(e, t, n) { const r = e.length; if (r === 0) return ""; let a = 0; for (; a < r; ) { const o = e.charAt(r - a - 1); if (o === t && !n) a++; else if (o !== t && n) a++; else break; } return e.slice(0, r - a); } function Wxe(e, t) { if (e.indexOf(t[1]) === -1) return -1; const n = e.length; let r = 0, a = 0; for (; a < n; a++) if (e[a] === "\\") a++; else if (e[a] === t[0]) r++; else if (e[a] === t[1] && (r--, r < 0)) return a; return -1; } function Kxe(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 rO(e, t) { if (t < 1) return ""; let n = ""; for (; t > 1; ) t & 1 && (n += e), t >>= 1, e += e; return n + e; } function aO(e, t, n, r) { const a = t.href, o = t.title ? Ea(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: a, title: o, text: i, tokens: r.inlineTokens(i) }; return r.state.inLink = !1, s; } return { type: "image", raw: n, href: a, title: o, text: Ea(i) }; } function Gxe(e, t) { const n = e.match(/^(\s+)(?:```)/); if (n === null) return t; const r = n[1]; return t.split(` `).map((a) => { const o = a.match(/^\s+/); if (o === null) return a; const [i] = o; return i.length >= r.length ? a.slice(r.length) : a; }).join(` `); } class mS { constructor(t) { this.options = t || ap; } 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 : by(r, ` `) }; } } fences(t) { const n = this.rules.block.fences.exec(t); if (n) { const r = n[0], a = Gxe(r, n[3] || ""); return { type: "code", raw: r, lang: n[2] ? n[2].trim().replace(this.rules.inline._escapes, "$1") : n[2], text: a }; } } heading(t) { const n = this.rules.block.heading.exec(t); if (n) { let r = n[2].trim(); if (/#$/.test(r)) { const a = by(r, "#"); (this.options.pedantic || !a || / $/.test(a)) && (r = a.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, ""), a = this.lexer.state.top; this.lexer.state.top = !0; const o = this.lexer.blockTokens(r); return this.lexer.state.top = a, { type: "blockquote", raw: n[0], tokens: o, text: r }; } } list(t) { let n = this.rules.block.list.exec(t); if (n) { let r, a, o, 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 y = new RegExp(`^( {0,3}${v})((?:[ ][^\\n]*)?(?:\\n|$))`); for (; t && (p = !1, !(!(n = y.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+/, (w) => " ".repeat(3 * w.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 w = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), k = new RegExp(`^ {0,${Math.min(3, i - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), C = 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, " ")), !(C.test(d) || S.test(d) || w.test(d) || k.test(t))); ) { if (d.search(/[^ ]/) >= i || !d.trim()) h += ` ` + d.slice(i); else { if (l || c.search(/[^ ]/) >= 4 || C.test(c) || S.test(c) || k.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 && (a = /^\[[ xX]\] /.exec(h), a && (o = a[0] !== "[ ] ", h = h.replace(/^\[[ xX]\] +/, ""))), g.items.push({ type: "list_item", raw: r, task: !!a, checked: o, 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 x = g.items.length; for (s = 0; s < x; s++) if (this.lexer.state.top = !1, g.items[s].tokens = this.lexer.blockTokens(g.items[s].text, []), !g.loose) { const w = g.items[s].tokens.filter((C) => C.type === "space"), k = w.length > 0 && w.some((C) => /\n.*\n/.test(C.raw)); g.loose = k; } if (g.loose) for (s = 0; s < x; 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 a = this.options.sanitizer ? this.options.sanitizer(n[0]) : Ea(n[0]); r.type = "paragraph", r.text = a, r.tokens = this.lexer.inline(a); } return r; } } def(t) { const n = this.rules.block.def.exec(t); if (n) { const r = n[1].toLowerCase().replace(/\s+/g, " "), a = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline._escapes, "$1") : "", o = 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: a, title: o }; } } table(t) { const n = this.rules.block.table.exec(t); if (n) { const r = { type: "table", header: nO(n[1]).map((a) => ({ text: a })), 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 a = r.align.length, o, i, s, l; for (o = 0; o < a; o++) /^ *-+: *$/.test(r.align[o]) ? r.align[o] = "right" : /^ *:-+: *$/.test(r.align[o]) ? r.align[o] = "center" : /^ *:-+ *$/.test(r.align[o]) ? r.align[o] = "left" : r.align[o] = null; for (a = r.rows.length, o = 0; o < a; o++) r.rows[o] = nO(r.rows[o], r.header.length).map((u) => ({ text: u })); for (a = r.header.length, i = 0; i < a; i++) r.header[i].tokens = this.lexer.inline(r.header[i].text); for (a = r.rows.length, i = 0; i < a; 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: Ea(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]) : Ea(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 = by(r.slice(0, -1), "\\"); if ((r.length - i.length) % 2 === 0) return; } else { const i = Wxe(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 a = n[2], o = ""; if (this.options.pedantic) { const i = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a); i && (a = i[1], o = i[3]); } else o = n[3] ? n[3].slice(1, -1) : ""; return a = a.trim(), /^$/.test(r) ? a = a.slice(1) : a = a.slice(1, -1)), aO(n, { href: a && a.replace(this.rules.inline._escapes, "$1"), title: o && o.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 a = (r[2] || r[1]).replace(/\s+/g, " "); if (a = n[a.toLowerCase()], !a) { const o = r[0].charAt(0); return { type: "text", raw: o, text: o }; } return aO(r, a, r[0], this.lexer); } } emStrong(t, n, r = "") { let a = this.rules.inline.emStrong.lDelim.exec(t); if (!a || a[3] && r.match(/[\p{L}\p{N}]/u)) return; const o = a[1] || a[2] || ""; if (!o || o && (r === "" || this.rules.inline.punctuation.exec(r))) { const i = a[0].length - 1; let s, l, u = i, c = 0; const d = a[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd; for (d.lastIndex = 0, n = n.slice(-1 * t.length + i); (a = d.exec(n)) != null; ) { if (s = a[1] || a[2] || a[3] || a[4] || a[5] || a[6], !s) continue; if (l = s.length, a[3] || a[4]) { u += l; continue; } else if ((a[5] || a[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 + a.index + (a[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 a = /[^ ]/.test(r), o = /^ /.test(r) && / $/.test(r); return a && o && (r = r.substring(1, r.length - 1)), r = Ea(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 a, o; return r[2] === "@" ? (a = Ea(this.options.mangle ? n(r[1]) : r[1]), o = "mailto:" + a) : (a = Ea(r[1]), o = a), { type: "link", raw: r[0], text: a, href: o, tokens: [ { type: "text", raw: a, text: a } ] }; } } url(t, n) { let r; if (r = this.rules.inline.url.exec(t)) { let a, o; if (r[2] === "@") a = Ea(this.options.mangle ? n(r[0]) : r[0]), o = "mailto:" + a; else { let i; do i = r[0], r[0] = this.rules.inline._backpedal.exec(r[0])[0]; while (i !== r[0]); a = Ea(r[0]), r[1] === "www." ? o = "http://" + r[0] : o = r[0]; } return { type: "link", raw: r[0], text: a, href: o, tokens: [ { type: "text", raw: a, text: a } ] }; } } inlineText(t, n) { const r = this.rules.inline.text.exec(t); if (r) { let a; return this.lexer.state.inRawBlock ? a = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(r[0]) : Ea(r[0]) : r[0] : a = Ea(this.options.smartypants ? n(r[0]) : r[0]), { type: "text", raw: r[0], text: a }; } } } const _t = { 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: wb, 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]+/ }; _t._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/; _t._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; _t.def = jn(_t.def).replace("label", _t._label).replace("title", _t._title).getRegex(); _t.bullet = /(?:[*+-]|\d{1,9}[.)])/; _t.listItemStart = jn(/^( *)(bull) */).replace("bull", _t.bullet).getRegex(); _t.list = jn(_t.list).replace(/bull/g, _t.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + _t.def.source + ")").getRegex(); _t._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"; _t._comment = /|$)/; _t.html = jn(_t.html, "i").replace("comment", _t._comment).replace("tag", _t._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); _t.paragraph = jn(_t._paragraph).replace("hr", _t.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", _t._tag).getRegex(); _t.blockquote = jn(_t.blockquote).replace("paragraph", _t.paragraph).getRegex(); _t.normal = { ..._t }; _t.gfm = { ..._t.normal, table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)" // Cells }; _t.gfm.table = jn(_t.gfm.table).replace("hr", _t.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", _t._tag).getRegex(); _t.gfm.paragraph = jn(_t._paragraph).replace("hr", _t.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", _t.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", _t._tag).getRegex(); _t.pedantic = { ..._t.normal, html: jn( `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))` ).replace("comment", _t._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: wb, // fences not supported lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: jn(_t.normal._paragraph).replace("hr", _t.hr).replace("heading", ` *#{1,6} *[^ ]`).replace("lheading", _t.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex() }; const vt = { escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, url: wb, 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: wb, text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"; vt.punctuation = jn(vt.punctuation).replace(/punctuation/g, vt._punctuation).getRegex(); vt.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g; vt.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g; vt._comment = jn(_t._comment).replace("(?:-->|$)", "-->").getRegex(); vt.emStrong.lDelim = jn(vt.emStrong.lDelim).replace(/punct/g, vt._punctuation).getRegex(); vt.emStrong.rDelimAst = jn(vt.emStrong.rDelimAst, "g").replace(/punct/g, vt._punctuation).getRegex(); vt.emStrong.rDelimUnd = jn(vt.emStrong.rDelimUnd, "g").replace(/punct/g, vt._punctuation).getRegex(); vt._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; vt._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; vt._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])?)+(?![-_])/; vt.autolink = jn(vt.autolink).replace("scheme", vt._scheme).replace("email", vt._email).getRegex(); vt._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; vt.tag = jn(vt.tag).replace("comment", vt._comment).replace("attribute", vt._attribute).getRegex(); vt._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; vt._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/; vt._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; vt.link = jn(vt.link).replace("label", vt._label).replace("href", vt._href).replace("title", vt._title).getRegex(); vt.reflink = jn(vt.reflink).replace("label", vt._label).replace("ref", _t._label).getRegex(); vt.nolink = jn(vt.nolink).replace("ref", _t._label).getRegex(); vt.reflinkSearch = jn(vt.reflinkSearch, "g").replace("reflink", vt.reflink).replace("nolink", vt.nolink).getRegex(); vt.normal = { ...vt }; vt.pedantic = { ...vt.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: jn(/^!?\[(label)\]\((.*?)\)/).replace("label", vt._label).getRegex(), reflink: jn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vt._label).getRegex() }; vt.gfm = { ...vt.normal, escape: jn(vt.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 Ku { constructor(t) { this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || ap, this.options.tokenizer = this.options.tokenizer || new mS(), 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: _t.normal, inline: vt.normal }; this.options.pedantic ? (n.block = _t.pedantic, n.inline = vt.pedantic) : this.options.gfm && (n.block = _t.gfm, this.options.breaks ? n.inline = vt.breaks : n.inline = vt.gfm), this.tokenizer.rules = n; } /** * Expose Rules */ static get rules() { return { block: _t, inline: vt }; } /** * Static Lex Method */ static lex(t, n) { return new Ku(n).lex(t); } /** * Static Lex Inline Method */ static lexInline(t, n) { return new Ku(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, a, o, 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), a = n[n.length - 1], a && (a.type === "paragraph" || a.type === "text") ? (a.raw += ` ` + r.raw, a.text += ` ` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = a.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), a = n[n.length - 1], a && (a.type === "paragraph" || a.type === "text") ? (a.raw += ` ` + r.raw, a.text += ` ` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = a.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 (o = 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 && (o = t.substring(0, s + 1)); } if (this.state.top && (r = this.tokenizer.paragraph(o))) { a = n[n.length - 1], i && a.type === "paragraph" ? (a.raw += ` ` + r.raw, a.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = a.text) : n.push(r), i = o.length !== t.length, t = t.substring(r.raw.length); continue; } if (r = this.tokenizer.text(t)) { t = t.substring(r.raw.length), a = n[n.length - 1], a && a.type === "text" ? (a.raw += ` ` + r.raw, a.text += ` ` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = a.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, a, o, 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) + "[" + rO("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) + "[" + rO("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), a = n[n.length - 1], a && r.type === "text" && a.type === "text" ? (a.raw += r.raw, a.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), a = n[n.length - 1], a && r.type === "text" && a.type === "text" ? (a.raw += r.raw, a.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, oO)) { t = t.substring(r.raw.length), n.push(r); continue; } if (!this.state.inLink && (r = this.tokenizer.url(t, oO))) { t = t.substring(r.raw.length), n.push(r); continue; } if (o = 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 && (o = t.substring(0, c + 1)); } if (r = this.tokenizer.inlineText(o, Xxe)) { t = t.substring(r.raw.length), r.raw.slice(-1) !== "_" && (u = r.raw.slice(-1)), l = !0, a = n[n.length - 1], a && a.type === "text" ? (a.raw += r.raw, a.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 yS { constructor(t) { this.options = t || ap; } code(t, n, r) { const a = (n || "").match(/\S*/)[0]; if (this.options.highlight) { const o = this.options.highlight(t, a); o != null && o !== t && (r = !0, t = o); } return t = t.replace(/\n$/, "") + ` `, a ? '
' + (r ? t : Ea(t, !0)) + `
` : "
" + (r ? t : Ea(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, a) { if (this.options.headerIds) { const o = this.options.headerPrefix + a.slug(r); return `${t} `; } return `${t} `; } hr() { return this.options.xhtml ? `
` : `
`; } list(t, n, r) { const a = n ? "ol" : "ul", o = n && r !== 1 ? ' start="' + r + '"' : ""; return "<" + a + o + `> ` + 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 = tO(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let a = '
    ", a; } /** * @param {string} href * @param {string} title * @param {string} text */ image(t, n, r) { if (t = tO(this.options.sanitize, this.options.baseUrl, t), t === null) return r; let a = `${r}" : ">", a; } text(t) { return t; } } class kR { // 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 CR { 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, a = 0; if (this.seen.hasOwnProperty(r)) { a = this.seen[t]; do a++, r = t + "-" + a; while (this.seen.hasOwnProperty(r)); } return n || (this.seen[t] = a, 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 Gu { constructor(t) { this.options = t || ap, this.options.renderer = this.options.renderer || new yS(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new kR(), this.slugger = new CR(); } /** * Static Parse Method */ static parse(t, n) { return new Gu(n).parse(t); } /** * Static Parse Inline Method */ static parseInline(t, n) { return new Gu(n).parseInline(t); } /** * Parse Loop */ parse(t, n = !0) { let r = "", a, o, i, s, l, u, c, d, f, h, p, v, m, g, y, x, w, k, C; const S = t.length; for (a = 0; a < S; a++) { if (h = t[a], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[h.type] && (C = this.options.extensions.renderers[h.type].call({ parser: this }, h), C !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(h.type))) { r += C || ""; 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, xR(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, o = 0; o < s; o++) c += this.renderer.tablecell( this.parseInline(h.header[o].tokens), { header: !0, align: h.align[o] } ); for (d += this.renderer.tablerow(c), f = "", s = h.rows.length, o = 0; o < s; o++) { for (u = h.rows[o], 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 = "", o = 0; o < s; o++) y = h.items[o], x = y.checked, w = y.task, g = "", y.task && (k = this.renderer.checkbox(x), m ? y.tokens.length > 0 && y.tokens[0].type === "paragraph" ? (y.tokens[0].text = k + " " + y.tokens[0].text, y.tokens[0].tokens && y.tokens[0].tokens.length > 0 && y.tokens[0].tokens[0].type === "text" && (y.tokens[0].tokens[0].text = k + " " + y.tokens[0].tokens[0].text)) : y.tokens.unshift({ type: "text", text: k }) : g += k), g += this.parse(y.tokens, m), f += this.renderer.listitem(g, w, x); 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; a + 1 < S && t[a + 1].type === "text"; ) h = t[++a], 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 = "", a, o, i; const s = t.length; for (a = 0; a < s; a++) { if (o = t[a], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type] && (i = this.options.extensions.renderers[o.type].call({ parser: this }, o), i !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(o.type))) { r += i || ""; continue; } switch (o.type) { case "escape": { r += n.text(o.text); break; } case "html": { r += n.html(o.text); break; } case "link": { r += n.link(o.href, o.title, this.parseInline(o.tokens, n)); break; } case "image": { r += n.image(o.href, o.title, o.text); break; } case "strong": { r += n.strong(this.parseInline(o.tokens, n)); break; } case "em": { r += n.em(this.parseInline(o.tokens, n)); break; } case "codespan": { r += n.codespan(o.text); break; } case "br": { r += n.br(); break; } case "del": { r += n.del(this.parseInline(o.tokens, n)); break; } case "text": { r += n.text(o.text); break; } default: { const l = 'Token with "' + o.type + '" type was not found.'; if (this.options.silent) { console.error(l); return; } else throw new Error(l); } } } return r; } } class xb { constructor(t) { this.options = t || ap; } /** * Process markdown before marked */ preprocess(t) { return t; } /** * Process HTML after marked is finished */ postprocess(t) { return t; } } Z_(xb, "passThroughHooks", /* @__PURE__ */ new Set([ "preprocess", "postprocess" ])); function Yxe(e, t, n) { return (r) => { if (r.message += ` Please report this to https://github.com/markedjs/marked.`, e) { const a = "

    An error occurred:

    " + Ea(r.message + "", !0) + "
    "; if (t) return Promise.resolve(a); if (n) { n(null, a); return; } return a; } if (t) return Promise.reject(r); if (n) { n(r); return; } throw r; }; } function SR(e, t) { return (n, r, a) => { typeof r == "function" && (a = r, r = null); const o = { ...r }; r = { ...$t.defaults, ...o }; const i = Yxe(r.silent, r.async, a); 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 (Kxe(r), r.hooks && (r.hooks.options = r), a) { 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 && $t.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) : a(null, f); }; if (!s || s.length < 3 || (delete r.highlight, !l.length)) return u(); let c = 0; $t.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($t.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 && $t.walkTokens(s, r.walkTokens); let l = t(s, r); return r.hooks && (l = r.hooks.postprocess(l)), l; } catch (s) { return i(s); } }; } function $t(e, t, n) { return SR(Ku.lex, Gu.parse)(e, t, n); } $t.options = $t.setOptions = function(e) { return $t.defaults = { ...$t.defaults, ...e }, Lxe($t.defaults), $t; }; $t.getDefaults = yR; $t.defaults = ap; $t.use = function(...e) { const t = $t.defaults.extensions || { renderers: {}, childTokens: {} }; e.forEach((n) => { const r = { ...n }; if (r.async = $t.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((a) => { if (!a.name) throw new Error("extension name required"); if (a.renderer) { const o = t.renderers[a.name]; o ? t.renderers[a.name] = function(...i) { let s = a.renderer.apply(this, i); return s === !1 && (s = o.apply(this, i)), s; } : t.renderers[a.name] = a.renderer; } if (a.tokenizer) { if (!a.level || a.level !== "block" && a.level !== "inline") throw new Error("extension level must be 'block' or 'inline'"); t[a.level] ? t[a.level].unshift(a.tokenizer) : t[a.level] = [a.tokenizer], a.start && (a.level === "block" ? t.startBlock ? t.startBlock.push(a.start) : t.startBlock = [a.start] : a.level === "inline" && (t.startInline ? t.startInline.push(a.start) : t.startInline = [a.start])); } a.childTokens && (t.childTokens[a.name] = a.childTokens); }), r.extensions = t), n.renderer) { const a = $t.defaults.renderer || new yS(); for (const o in n.renderer) { const i = a[o]; a[o] = (...s) => { let l = n.renderer[o].apply(a, s); return l === !1 && (l = i.apply(a, s)), l; }; } r.renderer = a; } if (n.tokenizer) { const a = $t.defaults.tokenizer || new mS(); for (const o in n.tokenizer) { const i = a[o]; a[o] = (...s) => { let l = n.tokenizer[o].apply(a, s); return l === !1 && (l = i.apply(a, s)), l; }; } r.tokenizer = a; } if (n.hooks) { const a = $t.defaults.hooks || new xb(); for (const o in n.hooks) { const i = a[o]; xb.passThroughHooks.has(o) ? a[o] = (s) => { if ($t.defaults.async) return Promise.resolve(n.hooks[o].call(a, s)).then((u) => i.call(a, u)); const l = n.hooks[o].call(a, s); return i.call(a, l); } : a[o] = (...s) => { let l = n.hooks[o].apply(a, s); return l === !1 && (l = i.apply(a, s)), l; }; } r.hooks = a; } if (n.walkTokens) { const a = $t.defaults.walkTokens; r.walkTokens = function(o) { let i = []; return i.push(n.walkTokens.call(this, o)), a && (i = i.concat(a.call(this, o))), i; }; } $t.setOptions(r); }); }; $t.walkTokens = function(e, t) { let n = []; for (const r of e) switch (n = n.concat(t.call($t, r)), r.type) { case "table": { for (const a of r.header) n = n.concat($t.walkTokens(a.tokens, t)); for (const a of r.rows) for (const o of a) n = n.concat($t.walkTokens(o.tokens, t)); break; } case "list": { n = n.concat($t.walkTokens(r.items, t)); break; } default: $t.defaults.extensions && $t.defaults.extensions.childTokens && $t.defaults.extensions.childTokens[r.type] ? $t.defaults.extensions.childTokens[r.type].forEach(function(a) { n = n.concat($t.walkTokens(r[a], t)); }) : r.tokens && (n = n.concat($t.walkTokens(r.tokens, t))); } return n; }; $t.parseInline = SR(Ku.lexInline, Gu.parseInline); $t.Parser = Gu; $t.parser = Gu.parse; $t.Renderer = yS; $t.TextRenderer = kR; $t.Lexer = Ku; $t.lexer = Ku.lex; $t.Tokenizer = mS; $t.Slugger = CR; $t.Hooks = xb; $t.parse = $t; $t.options; $t.setOptions; $t.use; $t.walkTokens; $t.parseInline; Gu.parse; Ku.lex; var m5 = { exports: {} }, ur = {}, y5 = { exports: {} }, op = {}; function ER() { 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 Zxe(e, t, n) { } function Qxe(e, t, n) { } var Jxe = /javascript\s*\:/img; function eke(e, t) { return Jxe.test(t) ? "" : t; } op.whiteList = ER(); op.getDefaultWhiteList = ER; op.onAttr = Zxe; op.onIgnoreAttr = Qxe; op.safeAttrValue = eke; var tke = { 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, a; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, a = e.length; r < a; 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, ""); } }, cv = tke; function nke(e, t) { e = cv.trimRight(e), e[e.length - 1] !== ";" && (e += ";"); var n = e.length, r = !1, a = 0, o = 0, i = ""; function s() { if (!r) { var c = cv.trim(e.slice(a, o)), d = c.indexOf(":"); if (d !== -1) { var f = cv.trim(c.slice(0, d)), h = cv.trim(c.slice(d + 1)); if (f) { var p = t(a, i.length, f, h, c); p && (i += p + "; "); } } } a = o + 1; } for (; o < n; o++) { var l = e[o]; if (l === "/" && e[o + 1] === "*") { var u = e.indexOf("*/", o + 2); if (u === -1) break; o = u + 1, a = o + 1, r = !1; } else l === "(" ? r = !0 : l === ")" ? r = !1 : l === ";" ? r || s() : l === ` ` && s(); } return cv.trim(i); } var rke = nke, p1 = op, ake = rke; function iO(e) { return e == null; } function oke(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function _R(e) { e = oke(e || {}), e.whiteList = e.whiteList || p1.whiteList, e.onAttr = e.onAttr || p1.onAttr, e.onIgnoreAttr = e.onIgnoreAttr || p1.onIgnoreAttr, e.safeAttrValue = e.safeAttrValue || p1.safeAttrValue, this.options = e; } _R.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, a = n.onAttr, o = n.onIgnoreAttr, i = n.safeAttrValue, s = ake(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 = a(c, d, v); return iO(m) ? c + ":" + d : m; } else { var m = o(c, d, v); if (!iO(m)) return m; } } }); return s; }; var ike = _R; (function(e, t) { var n = op, r = ike; function a(i, s) { var l = new r(s); return l.process(i); } t = e.exports = a, t.FilterCSS = r; for (var o in n) t[o] = n[o]; typeof window < "u" && (window.filterCSS = e.exports); })(y5, y5.exports); var bS = y5.exports, wS = { 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, a; if (Array.prototype.forEach) return e.forEach(t, n); for (r = 0, a = e.length; r < a; 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; } }, ske = bS.FilterCSS, lke = bS.getDefaultWhiteList, kb = wS; function TR() { 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 $R = new ske(); function uke(e, t, n) { } function cke(e, t, n) { } function dke(e, t, n) { } function pke(e, t, n) { } function OR(e) { return e.replace(hke, "<").replace(vke, ">"); } function fke(e, t, n, r) { if (n = NR(n), t === "href" || t === "src") { if (n = kb.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 (f1.lastIndex = 0, f1.test(n)) return ""; } else if (t === "style") { if (sO.lastIndex = 0, sO.test(n) || (lO.lastIndex = 0, lO.test(n) && (f1.lastIndex = 0, f1.test(n)))) return ""; r !== !1 && (r = r || $R, n = r.process(n)); } return n = MR(n), n; } var hke = //g, gke = /"/g, mke = /"/g, yke = /&#([a-zA-Z0-9]*);?/gim, bke = /:?/gim, wke = /&newline;?/gim, f1 = /((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, sO = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, lO = /u\s*r\s*l\s*\(.*/gi; function FR(e) { return e.replace(gke, """); } function AR(e) { return e.replace(mke, '"'); } function IR(e) { return e.replace(yke, function(n, r) { return r[0] === "x" || r[0] === "X" ? String.fromCharCode(parseInt(r.substr(1), 16)) : String.fromCharCode(parseInt(r, 10)); }); } function PR(e) { return e.replace(bke, ":").replace(wke, " "); } function LR(e) { for (var t = "", n = 0, r = e.length; n < r; n++) t += e.charCodeAt(n) < 32 ? " " : e.charAt(n); return kb.trim(t); } function NR(e) { return e = AR(e), e = IR(e), e = PR(e), e = LR(e), e; } function MR(e) { return e = FR(e), e = OR(e), e; } function xke() { return ""; } function kke(e, t) { typeof t != "function" && (t = function() { }); var n = !Array.isArray(e); function r(i) { return n ? !0 : kb.indexOf(e, i) !== -1; } var a = [], o = !1; return { onIgnoreTag: function(i, s, l) { if (r(i)) if (l.isClosing) { var u = "[/removed]", c = l.position + u.length; return a.push([ o !== !1 ? o : l.position, c ]), o = !1, u; } else return o || (o = l.position), "[removed]"; else return t(i, s, l); }, remove: function(i) { var s = "", l = 0; return kb.forEach(a, function(u) { s += i.slice(l, u[0]), l = u[1]; }), s += i.slice(l), s; } }; } function Cke(e) { for (var t = "", n = 0; n < e.length; ) { var r = e.indexOf("", r); if (a === -1) break; n = a + 3; } return t; } function Ske(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(""); } ur.whiteList = TR(); ur.getDefaultWhiteList = TR; ur.onTag = uke; ur.onIgnoreTag = cke; ur.onTagAttr = dke; ur.onIgnoreTagAttr = pke; ur.safeAttrValue = fke; ur.escapeHtml = OR; ur.escapeQuote = FR; ur.unescapeQuote = AR; ur.escapeHtmlEntities = IR; ur.escapeDangerHtml5Entities = PR; ur.clearNonPrintableCharacter = LR; ur.friendlyAttrValue = NR; ur.escapeAttrValue = MR; ur.onIgnoreTagStripAll = xke; ur.StripTagBody = kke; ur.stripCommentTag = Cke; ur.stripBlankChar = Ske; ur.cssFilter = $R; ur.getDefaultCSSWhiteList = lke; var hw = {}, vu = wS; function Eke(e) { var t = vu.spaceIndex(e), n; return t === -1 ? n = e.slice(1, -1) : n = e.slice(1, t + 1), n = vu.trim(n).toLowerCase(), n.slice(0, 1) === "/" && (n = n.slice(1)), n.slice(-1) === "/" && (n = n.slice(0, -1)), n; } function _ke(e) { return e.slice(0, 2) === "" || s === l - 1) { r += n(e.slice(a, o)), c = e.slice(o, s + 1), u = Eke(c), r += t( o, r.length, u, c, _ke(c) ), a = s + 1, o = !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 a < l && (r += n(e.substr(a))), r; } var $ke = /[^a-zA-Z0-9\\_:.-]/gim; function Oke(e, t) { var n = 0, r = 0, a = [], o = !1, i = e.length; function s(f, h) { if (f = vu.trim(f), f = f.replace($ke, "").toLowerCase(), !(f.length < 1)) { var p = t(f, h || ""); p && a.push(p); } } for (var l = 0; l < i; l++) { var u = e.charAt(l), c, d; if (o === !1 && u === "=") { o = e.slice(n, l), n = l + 1, r = e.charAt(n) === '"' || e.charAt(n) === "'" ? n : Ake(e, l + 1); continue; } if (o !== !1 && l === r) { if (d = e.indexOf(u, l + 1), d === -1) break; c = vu.trim(e.slice(r + 1, d)), s(o, c), o = !1, l = d, n = l + 1; continue; } if (/\s|\n|\t/.test(u)) if (e = e.replace(/\s|\n|\t/g, " "), o === !1) if (d = Fke(e, l), d === -1) { c = vu.trim(e.slice(n, l)), s(c), o = !1, n = l + 1; continue; } else { l = d - 1; continue; } else if (d = Ike(e, l - 1), d === -1) { c = vu.trim(e.slice(n, l)), c = uO(c), s(o, c), o = !1, n = l + 1; continue; } else continue; } return n < e.length && (o === !1 ? s(e.slice(n)) : s(o, uO(vu.trim(e.slice(n))))), vu.trim(a.join(" ")); } function Fke(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function Ake(e, t) { for (; t < e.length; t++) { var n = e[t]; if (n !== " ") return n === "'" || n === '"' ? t : -1; } } function Ike(e, t) { for (; t > 0; t--) { var n = e[t]; if (n !== " ") return n === "=" ? t : -1; } } function Pke(e) { return e[0] === '"' && e[e.length - 1] === '"' || e[0] === "'" && e[e.length - 1] === "'"; } function uO(e) { return Pke(e) ? e.substr(1, e.length - 2) : e; } hw.parseTag = Tke; hw.parseAttr = Oke; var Lke = bS.FilterCSS, Ti = ur, DR = hw, Nke = DR.parseTag, Mke = DR.parseAttr, wy = wS; function h1(e) { return e == null; } function Dke(e) { var t = wy.spaceIndex(e); if (t === -1) return { html: "", closing: e[e.length - 2] === "/" }; e = wy.trim(e.slice(t + 1, -1)); var n = e[e.length - 1] === "/"; return n && (e = wy.trim(e.slice(0, -1))), { html: e, closing: n }; } function Bke(e) { var t = {}; for (var n in e) t[n] = e[n]; return t; } function Rke(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 BR(e) { e = Bke(e || {}), e.stripIgnoreTag && (e.onIgnoreTag && console.error( 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time' ), e.onIgnoreTag = Ti.onIgnoreTagStripAll), e.whiteList || e.allowList ? e.whiteList = Rke(e.whiteList || e.allowList) : e.whiteList = Ti.whiteList, e.onTag = e.onTag || Ti.onTag, e.onTagAttr = e.onTagAttr || Ti.onTagAttr, e.onIgnoreTag = e.onIgnoreTag || Ti.onIgnoreTag, e.onIgnoreTagAttr = e.onIgnoreTagAttr || Ti.onIgnoreTagAttr, e.safeAttrValue = e.safeAttrValue || Ti.safeAttrValue, e.escapeHtml = e.escapeHtml || Ti.escapeHtml, this.options = e, e.css === !1 ? this.cssFilter = !1 : (e.css = e.css || {}, this.cssFilter = new Lke(e.css)); } BR.prototype.process = function(e) { if (e = e || "", e = e.toString(), !e) return ""; var t = this, n = t.options, r = n.whiteList, a = n.onTag, o = n.onIgnoreTag, i = n.onTagAttr, s = n.onIgnoreTagAttr, l = n.safeAttrValue, u = n.escapeHtml, c = t.cssFilter; n.stripBlankChar && (e = Ti.stripBlankChar(e)), n.allowCommentTag || (e = Ti.stripCommentTag(e)); var d = !1; n.stripIgnoreTagBody && (d = Ti.StripTagBody( n.stripIgnoreTagBody, o ), o = d.onIgnoreTag); var f = Nke( e, function(h, p, v, m, g) { var y = { sourcePosition: h, position: p, isClosing: g, isWhite: Object.prototype.hasOwnProperty.call(r, v) }, x = a(v, m, y); if (!h1(x)) return x; if (y.isWhite) { if (y.isClosing) return ""; var w = Dke(m), k = r[v], C = Mke(w.html, function(S, _) { var T = wy.indexOf(k, S) !== -1, F = i(v, S, _, T); return h1(F) ? T ? (_ = l(v, S, _, c), _ ? S + '="' + _ + '"' : S) : (F = s(v, S, _, T), h1(F) ? void 0 : F) : F; }); return m = "<" + v, C && (m += " " + C), w.closing && (m += " /"), m += ">", m; } else return x = o(v, m, y), h1(x) ? u(m) : x; }, u ); return d && (f = d.remove(f)), f; }; var zke = BR; (function(e, t) { var n = ur, r = hw, a = zke; function o(s, l) { var u = new a(l); return u.process(s); } t = e.exports = o, t.filterXSS = o, t.FilterXSS = a, 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); })(m5, m5.exports); var Vke = m5.exports; const jke = /* @__PURE__ */ cN(Vke), Ki = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, Hke = function(e) { return e.includes("files") ? e : "files/" + e; }, Uke = function(e) { return e = e.replaceAll("\\", "/"), e = e.replaceAll("\\\\", "/"), e; }, qke = { name: "contextCard", components: { CopyToClipboard: NB }, mixins: [Pxe], 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((o) => o.id)) || [], r = ((t = this.contextData.samples) == null ? void 0 : t.map((o) => o.view)) || [], a = n.filter((o) => r.includes(o)); if (n.length === a.length && a.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 a = []; this.contextData.views.forEach((o, i) => { const s = [], l = this.getFileFromPath(o.path); let u = `
    ${o.description}
    `; if (u += ` `, u += `
    ${l}
    `, s.push(u), this.samplesUnderViews) { let f = `
    ${this.samplesMatching(o.id).description}
    `; if (this.samplesMatching(o.id).path) { f += ` `; const h = this.generateFileLink(this.samplesMatching(o.id)); f += `
    ${h}
    `; } s.push(f); } const c = s.join(` `); a.push(`
  • ${c}
  • `); }), r += ` `, r += `
      ${a.join(` `)}
    `, e.push(r); } if (!this.samplesUnderViews && (n = this.contextData.samples) != null && n.length) { let r = "
    Samples on Scaffold
    "; const a = []; this.contextData.samples.forEach((o, i) => { let s = ""; if (s += `
    ${o.heading}
    `, s += ` `, s += `
    ${o.description}
    `, o.path) { const l = this.generateFileLink(o); s += ` `, s += `
    ${l}
    `; } a.push(`
  • ${s}
  • `); }), r += ` `, r += `
      ${a.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 = Uke(e), e = Hke(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 = jke($t.parse(e)); return this.$emit("context-ready"), t; }, openViewFile: function(e) { const t = this.getFileFromPath(e.path); this.$emit("scaffold-view-clicked", t); } } }, Th = (e) => (ma("data-v-48d3f7e3"), e = e(), ya(), e), Wke = { class: "context-card-container", ref: "container" }, Kke = { key: 0, class: "context-card" }, Gke = { class: "card-left" }, Xke = ["src"], Yke = { class: "card-right scrollbar" }, Zke = { class: "title" }, Qke = ["innerHTML"], Jke = { class: "card-bottom" }, eCe = { key: 0, class: "subtitle" }, tCe = ["onClick"], nCe = ["src"], rCe = { class: "view-description" }, aCe = /* @__PURE__ */ Th(() => /* @__PURE__ */ K("div", { class: "padding" }, null, -1)), oCe = /* @__PURE__ */ Th(() => /* @__PURE__ */ K("div", { style: { "margin-bottom": "16px" } }, null, -1)), iCe = { key: 1, class: "subtitle" }, sCe = ["onClick"], lCe = ["src"], uCe = /* @__PURE__ */ Th(() => /* @__PURE__ */ K("i", { class: "el-icon-warning-outline info" }, null, -1)), cCe = ["innerHTML"], dCe = ["href"], pCe = /* @__PURE__ */ Th(() => /* @__PURE__ */ K("div", { class: "padding" }, null, -1)), fCe = { key: 0, class: "subtitle" }, hCe = ["onClick"], vCe = ["src"], gCe = { class: "view-description" }, mCe = /* @__PURE__ */ Th(() => /* @__PURE__ */ K("i", { class: "el-icon-warning-outline info" }, null, -1)), yCe = ["innerHTML"], bCe = ["href"], wCe = /* @__PURE__ */ Th(() => /* @__PURE__ */ K("div", { class: "padding" }, null, -1)), xCe = { key: 2, class: "padding" }, kCe = { class: "float-button-container" }; function CCe(e, t, n, r, a, o) { const i = lt("CopyToClipboard"), s = Cf; return $(), B("div", Wke, [ qe(K("div", null, [ e.showDetails && Object.keys(e.contextData).length !== 0 ? qe(($(), B("div", Kke, [ K("div", Gke, [ K("img", { src: o.banner, class: "context-image" }, null, 8, Xke) ]), K("div", Yke, [ K("div", null, [ K("div", Zke, _e(e.contextData.heading), 1), K("div", { innerHTML: o.parseMarkdown(e.contextData.description) }, null, 8, Qke) ]) ]), K("div", Jke, [ K("div", null, [ o.samplesUnderViews ? ($(), B(Ue, { key: 1 }, [ e.contextData.views && e.contextData.views.length > 0 ? ($(), B("div", fCe, "Scaffold Views")) : te("", !0), ($(!0), B(Ue, null, yt(e.contextData.views, (l, u) => ($(), B(Ue, { key: u + "_1" }, [ K("span", { onClick: (c) => o.viewClicked(l, u), class: "context-card-view" }, [ K("img", { class: "view-image", src: o.getFileFromPath(l.thumbnail) }, null, 8, vCe), K("div", gCe, [ ze(_e(l.description), 1), mCe ]) ], 8, hCe), e.sampleDetails[u] ? ($(), B("div", { key: 0, innerHTML: o.samplesMatching(l.id).description }, null, 8, yCe)) : te("", !0), e.sampleDetails[u] && o.samplesMatching(l.id).path ? ($(), B("a", { key: u + "_5", href: o.generateFileLink(o.samplesMatching(l.id)), target: "_blank" }, "View Source", 8, bCe)) : te("", !0), wCe, e.sampleDetails[u] ? ($(), B("div", xCe)) : te("", !0) ], 64))), 128)) ], 64)) : ($(), B(Ue, { key: 0 }, [ e.contextData.views && e.contextData.views.length > 0 ? ($(), B("div", eCe, "Scaffold Views")) : te("", !0), ($(!0), B(Ue, null, yt(e.contextData.views, (l, u) => ($(), B(Ue, { key: u + "_1" }, [ K("div", { onClick: (c) => o.openViewFile(l), class: "context-card-view" }, [ K("img", { class: "view-image", src: o.getFileFromPath(l.thumbnail) }, null, 8, nCe), K("div", rCe, _e(l.description), 1) ], 8, tCe), aCe ], 64))), 128)), oCe, e.contextData.samples && e.contextData.samples.length > 0 ? ($(), B("div", iCe, "Samples on Scaffold")) : te("", !0), ($(!0), B(Ue, null, yt(e.contextData.samples, (l, u) => ($(), B(Ue, { key: u + "_3" }, [ K("span", { class: "context-card-item cursor-pointer", onClick: (c) => o.toggleSampleDetails(u) }, [ ($(), B("div", { key: u + "_6", style: { display: "flex" } }, [ l.color ? ($(), B("div", { key: 0, class: "color-box", style: Qe("background-color:" + l.color) }, null, 4)) : l.thumbnail ? ($(), B("img", { key: 1, class: "key-image", src: o.getFileFromPath(l.thumbnail) }, null, 8, lCe)) : te("", !0), ze(" " + _e(l.heading) + " ", 1), uCe ])) ], 8, sCe), e.sampleDetails[u] ? ($(), B("div", { key: 0, innerHTML: l.description }, null, 8, cCe)) : te("", !0), e.sampleDetails[u] && l.path ? ($(), B("a", { key: 1, href: o.generateFileLink(l), target: "_blank" }, "View Source", 8, dCe)) : te("", !0), pCe ], 64))), 128)) ], 64)) ]) ]) ])), [ [s, e.loading] ]) : te("", !0), K("div", kCe, [ Z(i, { content: o.updatedCopyContent, theme: "light" }, null, 8, ["content"]) ]) ], 512), [ [ct, e.showContextCard] ]) ], 512); } const RR = /* @__PURE__ */ Ki(qke, [["render", CCe], ["__scopeId", "data-v-48d3f7e3"]]), SCe = { name: "FlatmapContextCard", components: { Loading: EN, CopyToClipboard: NB }, 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 a = ((n = this.mapImpProv.sckan) != null && n.created ? this.mapImpProv.sckan.created : this.mapImpProv.sckan).replace(",", "."); e = new Date(a).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(`
    `); } } }, vw = (e) => (ma("data-v-c655abd4"), e = e(), ya(), e), ECe = { class: "flatmap-context-card" }, _Ce = { class: "card-right scrollbar" }, TCe = /* @__PURE__ */ vw(() => /* @__PURE__ */ K("div", { class: "title" }, "Flatmap Provenance", -1)), $Ce = ["href"], OCe = /* @__PURE__ */ vw(() => /* @__PURE__ */ K("br", null, null, -1)), FCe = /* @__PURE__ */ vw(() => /* @__PURE__ */ K("br", null, null, -1)), ACe = ["href"], ICe = /* @__PURE__ */ vw(() => /* @__PURE__ */ K("br", null, null, -1)), PCe = { class: "float-button-container" }; function LCe(e, t, n, r, a, o) { const i = lt("CopyToClipboard"), s = Cf; return qe(($(), B("div", ECe, [ K("div", _Ce, [ TCe, ze(" SCKAN version: "), K("a", { href: o.sckanReleaseLink, target: "_blank" }, _e(o.sckanReleaseDisplay), 9, $Ce), OCe, ze(" Published on: " + _e(o.flatmapPublishedDisplay) + " ", 1), FCe, ze(" View publication "), K("a", { href: o.flatmapSource, target: "_blank" }, "here", 8, ACe), ICe ]), K("div", PCe, [ Z(i, { content: e.copyContent, theme: "light" }, null, 8, ["content"]) ]) ])), [ [s, e.loading] ]); } const zR = /* @__PURE__ */ Ki(SCe, [["render", LCe], ["__scopeId", "data-v-c655abd4"]]); function NCe(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(a) { a(n); }), (r = e.get("*")) && r.slice().map(function(a) { a(t, n); }); } }; } const Tn = new NCe(), VR = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, MCe = ["xlink:href"], DCe = { __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) => ($(), B("svg", { class: H(["map-icon", { "map-icon-spin": e.spin }]) }, [ K("use", { "xlink:href": `#${e.icon}` }, null, 8, MCe) ], 2)); } }, xS = /* @__PURE__ */ VR(DCe, [["__scopeId", "data-v-e172d5ff"]]), jR = ` 2horpanel ? `, HR = ` 2vertpanel ? `, UR = ` 3panel ? `, qR = ` 4panel ? `, WR = ` 2horpanel ? `, KR = ` 2horpanel ? `, GR = ` 4panel ? `, XR = ` changeBckgd `, YR = ` close no bk `, ZR = ` close `, QR = ` closeFullScreen `, JR = ` Comment `, e7 = ` Connection `, t7 = ` dock `, n7 = ` drawLine `, r7 = ` drawPoint `, a7 = ` drawPolygon `, o7 = ` drawTrash `, i7 = ` fitWindow `, s7 = ` fullScreen `, l7 = 'DataPortal-Icons', u7 = ` magnifyingGlass `, c7 = `Created by Wahyu Prihantorofrom the Noun Project`, d7 = ` openMap `, p7 = ` Artboard Copy 6 `, f7 = ` permalink `, h7 = ` play `, v7 = ` resetZoom `, g7 = ` singlepanel ? `, m7 = ` tooltips ? `, y7 = ` undock `, b7 = ` zoomIn `, w7 = ` zoomOut `, x7 = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, k7 = (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(), BCe = !0, RCe = !0, zCe = ["fill"], b5 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": jR, "/assets/icons/2vertpanel.svg": HR, "/assets/icons/3panel.svg": UR, "/assets/icons/4panel.svg": qR, "/assets/icons/5panel.svg": WR, "/assets/icons/6panel.svg": KR, "/assets/icons/6panelVertical.svg": GR, "/assets/icons/changeBckgd.svg": XR, "/assets/icons/close-no-bk.svg": YR, "/assets/icons/close.svg": ZR, "/assets/icons/closeFullScreen.svg": QR, "/assets/icons/comment.svg": JR, "/assets/icons/connection.svg": e7, "/assets/icons/dock.svg": t7, "/assets/icons/drawLine.svg": n7, "/assets/icons/drawPoint.svg": r7, "/assets/icons/drawPolygon.svg": a7, "/assets/icons/drawTrash.svg": o7, "/assets/icons/fitWindow.svg": i7, "/assets/icons/fullScreen.svg": s7, "/assets/icons/help.svg": l7, "/assets/icons/magnifyingGlass.svg": u7, "/assets/icons/noun-filter.svg": c7, "/assets/icons/openMap.svg": d7, "/assets/icons/pause.svg": p7, "/assets/icons/permalink.svg": f7, "/assets/icons/play.svg": h7, "/assets/icons/resetZoom.svg": v7, "/assets/icons/singlepanel.svg": g7, "/assets/icons/tooltips.svg": m7, "/assets/icons/undock.svg": y7, "/assets/icons/zoomIn.svg": b7, "/assets/icons/zoomOut.svg": w7 }), VCe = Object.keys(b5).map((e) => { const t = x7(b5[e], BCe, RCe, zCe), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return k7(t).replace("", "symbol>"); }); VCe.join(` `); const w5 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": jR, "/assets/icons/2vertpanel.svg": HR, "/assets/icons/3panel.svg": UR, "/assets/icons/4panel.svg": qR, "/assets/icons/5panel.svg": WR, "/assets/icons/6panel.svg": KR, "/assets/icons/6panelVertical.svg": GR, "/assets/icons/changeBckgd.svg": XR, "/assets/icons/close-no-bk.svg": YR, "/assets/icons/close.svg": ZR, "/assets/icons/closeFullScreen.svg": QR, "/assets/icons/comment.svg": JR, "/assets/icons/connection.svg": e7, "/assets/icons/dock.svg": t7, "/assets/icons/drawLine.svg": n7, "/assets/icons/drawPoint.svg": r7, "/assets/icons/drawPolygon.svg": a7, "/assets/icons/drawTrash.svg": o7, "/assets/icons/fitWindow.svg": i7, "/assets/icons/fullScreen.svg": s7, "/assets/icons/help.svg": l7, "/assets/icons/magnifyingGlass.svg": u7, "/assets/icons/noun-filter.svg": c7, "/assets/icons/openMap.svg": d7, "/assets/icons/pause.svg": p7, "/assets/icons/permalink.svg": f7, "/assets/icons/play.svg": h7, "/assets/icons/resetZoom.svg": v7, "/assets/icons/singlepanel.svg": g7, "/assets/icons/tooltips.svg": m7, "/assets/icons/undock.svg": y7, "/assets/icons/zoomIn.svg": b7, "/assets/icons/zoomOut.svg": w7 }), jCe = Object.keys(w5).map((e) => { const t = x7(w5[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return k7(t).replace("", "symbol>"); }), HCe = { name: "MapSvgSpriteColor", svgContext: w5, svgSprite: jCe.join(` `) // concatenate all symbols into $options.svgSprite }, UCe = ["innerHTML"]; function qCe(e, t, n, r, a, o) { return $(), B("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, UCe); } const C7 = /* @__PURE__ */ VR(HCe, [["render", qCe]]), kS = () => ({ entries: [ { resource: "Human Male", type: "MultiFlatmap", mode: "main", id: 1, state: void 0, label: "", discoverId: void 0 } ] }), WCe = 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 S7(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; }, KCe = async (e, t) => { const n = kS(); 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 S7(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; }, cO = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), GCe = () => ({ "Human Female": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000383", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !0 }, "Human Male": { taxo: "NCBITaxon:9606", biologicalSex: "PATO:0000384", iconClass: "mapicon-icon_human", displayLatestChanges: !0, displayWarning: !0 }, Rat: { taxo: "NCBITaxon:10114", iconClass: "mapicon-icon_rat", displayLatestChanges: !0, displayWarning: !0 }, Mouse: { taxo: "NCBITaxon:10090", iconClass: "mapicon-icon_mouse", displayLatestChanges: !0, displayWarning: !0 }, Pig: { taxo: "NCBITaxon:9823", iconClass: "mapicon-icon_pig", displayLatestChanges: !0, displayWarning: !0 }, Cat: { taxo: "NCBITaxon:9685", iconClass: "mapicon-icon_cat", displayLatestChanges: !0, displayWarning: !0 } }), XCe = (e) => { if (e) { const t = GCe(); 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 ""; }, YCe = (e) => { if (e) { const t = e.split("//")[1]; if (t) { const n = t.split("/")[0], r = t.indexOf("/"), a = t.substring(r + 1); return { s3Bucket: n, s3Prefix: a }; } } }, S7 = async (e, t) => { let n = "", r; const a = await fetch(`${e}get_body_scaffold_info/${t}`); if (a.ok) { const o = await a.json(), i = YCe(o.s3uri); n = `${e}s3-resource/${i.s3Prefix}files/${o.path}?s3BucketName=${i.s3Bucket}`; const s = `${e}s3-resource/${i.s3Prefix}files/${o.contextinfo}?s3BucketName=${i.s3Bucket}`; r = { s3uri: o.s3uri, contextCardUrl: s, discoverId: o.id, version: o.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 }; }, ZCe = (e, t) => e.filter((n) => t.includes(n)), blt = (e) => Object.keys(e).map((t) => `${t}=${e[t]}`).join("&"), gw = v2("entries", { state: () => kS(), 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; } } }), R0 = v2("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 a = 0; for (a = r.length - 1; a >= 0; a -= 1) t[n].indexOf(r[a]) == -1 && r.splice(a, 1); } } }, updateNumberOfDatasetsForFacets(e) { this.numberOfDatasetsForFacets = e; }, updateUseHelpModeDialog(e) { this.useHelpModeDialog = e; }, updateConnectivityInfoSidebar(e) { this.connectivityInfoSidebar = e; }, updateAnnotationSidebar(e) { this.annotationSidebar = e; } } }), dv = [ { 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 QCe() { 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 JCe() { return QCe(); } function wlt(e) { if (e) for (let t = 0; t < dv.length; t++) { if (dv[t].id == e) return dv[t].centrelines; if (dv[t].centrelines.find((r) => r === e)) return [dv[t].id]; } return []; } function xlt(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 E7 = (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 } }; } }, e5e = (e, t) => { const n = [], r = []; for (const [a, o] of Object.entries(t)) o.content && (n.includes(o.id) ? r.push(a) : n.push(o.id)); r.forEach((a) => { let o = !1; for (let i = 0; i < e.length && !o; i++) n.includes(e[i].id) || (t[a].id = e[i].id, n.push(e.id), o = !0); }); }, t5e = (e) => { const t = {}; for (const [n, r] of Object.entries(e)) r.content && (t[n] = r); return t; }, v1 = (e, t) => { const n = t5e(e), r = E7(t); for (const [a, o] of Object.entries(n)) r[a] = o; return r; }, $c = (e, t) => Object.keys(e).find((n) => e[n].id === t), dO = () => ({ 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 }), ip = v2("splitFlow", { state: () => dO(), getters: { getPaneNameById: (e) => (t) => $c(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 = $c(this.customLayout, e.source), n = $c(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 = JCe(); 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((a) => { this.idNamePair[a.id.toUpperCase()] = a.name.charAt(0).toUpperCase() + a.name.slice(1); }); }); } }, toggleGlobalCallback(e) { this.globalCallback = e; }, updateActiveView(e) { if (this.syncMode) { const n = this.viewIcons.find( (a) => this.activeView === a.icon ), r = this.viewIcons.find( (a) => e.view === a.icon ); n.min == 2 && r.min == 2 || (this.syncMode = !1, this.globalCallback = !1); } this.activeView = e.view; const t = v1( this.customLayout, this.activeView ); e5e(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 = E7(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 = $c(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 = v1( this.customLayout, this.activeView ), n = $c(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 [a, o] of Object.entries(t)) this.customLayout[a] = o; this.syncMode = !0, this.globalCallback = !0; } else { this.activeView = "singlepanel"; const t = v1( 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 = dO(); 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++) $c(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 = v1( this.customLayout, this.activeView ); switch ($c(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 [o, i] of Object.entries(r)) this.customLayout[o] = i; } } } } }), n5e = { name: "ContentBar", components: { ElIconArrowDown: q3, ElIconArrowUp: SL, ElIconInfoFilled: ZQ, Input: F2, Option: CN, Popover: L2, Row: I2, Select: kN, ContextCard: RR, FlatmapContextCard: zR, MapSvgIcon: xS }, 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: { ...Kd(gw, R0, ip), 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 }), Tn.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((a) => a.title === n); if (r.length > 1) { const a = []; for (let i = 0; i < r.length; i++) { const s = this.getCharById(i); a.push({ id: r[i].id, title: r[i].title + s }); } const o = a.find((i) => i.id === t); if (o) return o.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(() => { Tn.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(); } }, r5e = { class: "toolbar-flex-container" }, a5e = { key: 1, class: "toolbar-title" }; function o5e(e, t, n, r, a, o) { const i = CN, s = kN, l = zR, u = RR, c = SL, d = Lr, f = q3, h = L2, p = lt("map-svg-icon"), v = I2; return $(), B("div", null, [ K("div", r5e, [ o.entries.length > 1 ? ($(), ae(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) => o.viewerChanged(m)) }, { default: q(() => [ ($(!0), B(Ue, null, yt(o.entries, (m) => ($(), ae(i, { key: m.id, label: o.getTitle(m), value: m.id }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["model-value"])) : ($(), B("div", a5e, _e(o.getEntryTitle(n.entry)), 1)) ]), Z(v, { class: "icon-group" }, { default: q(() => [ Z(h, { placement: "bottom", teleported: !1, trigger: "manual", width: o.setPopperWidth(e.slot.id), offset: 0, "popper-class": "context-card-popover", "popper-options": o.popperOptions, visible: e.contextCardVisible }, QP({ reference: q(() => [ qe(K("div", null, [ qe(K("div", { class: "hide", onClick: t[3] || (t[3] = (m) => e.contextCardVisible = !1) }, [ ze(" Hide information "), Z(d, null, { default: q(() => [ Z(c) ]), _: 1 }) ], 512), [ [ct, e.contextCardVisible] ]), qe(K("div", { class: "hide", onClick: t[4] || (t[4] = (m) => e.contextCardVisible = !0) }, [ ze(" Show information "), Z(d, null, { default: q(() => [ Z(f) ]), _: 1 }) ], 512), [ [ct, !e.contextCardVisible] ]) ], 512), [ [ct, e.contextCardEntry] ]) ]), _: 2 }, [ e.contextCardEntry ? { name: "default", fn: q(() => [ e.contextCardEntry.type == "Flatmap" || e.contextCardEntry.type == "MultiFlatmap" ? ($(), ae(l, { key: 0, class: "flatmap-context-card", mapImpProv: e.contextCardEntry.mapImpProv }, null, 8, ["mapImpProv"])) : te("", !0), e.contextCardEntry.type.toLowerCase() == "scaffold" ? ($(), ae(u, { key: 1, entry: e.contextCardEntry, envVars: o.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"])) : te("", !0) ]), key: "0" } : void 0 ]), 1032, ["width", "popper-options", "visible"]), Z(h, { class: "tooltip", content: "Close and remove", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ qe(Z(p, { icon: "close", class: "header-icon", onClick: t[5] || (t[5] = (m) => o.closeAndRemove()) }, null, 512), [ [ct, o.activeView !== "singlepanel" && n.entry.mode !== "main"] ]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]); } const _7 = /* @__PURE__ */ Ki(n5e, [["render", o5e], ["__scopeId", "data-v-885fc50f"]]), i5e = dh(() => import("./Flatmap-CmrDLAvS.js")), s5e = dh(() => import("./Iframe-Ca-rr7Wq.js")), l5e = dh(() => import("./MultiFlatmap-Cf9P7OvK.js")), u5e = dh(() => import("./Plot-CpydSV8P.js")), c5e = dh(() => import("./Scaffold-DA8r5lv5.js")), d5e = dh(() => import("./Simulation-RiZTqT-t.js")), p5e = { name: "ContentVuer", props: { /** * Object containing information for * the required viewing. */ entry: Object, visible: { type: Boolean, default: !0 } }, components: { //DatasetHeader, Button: d4, ContentBar: _7, Flatmap: i5e, Iframe: s5e, MultiFlatmap: l5e, Plot: u5e, Scaffold: c5e, Simulation: d5e }, 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: { ...Kd(gw, ip), syncMode() { return this.splitFlowStore.syncMode; }, viewerType() { switch (this.entry.type) { case "Biolucida": case "Iframe": case "Segmentation": return "Iframe"; default: return this.entry.type; } } } }, f5e = { class: "component-container", ref: "container" }; function h5e(e, t, n, r, a, o) { const i = _7; return $(), B("div", { class: "content-container", onMouseover: t[0] || (t[0] = (s) => e.mouseHovered = !0), onMouseleave: t[1] || (t[1] = (s) => e.mouseHovered = !1) }, [ Z(i, { class: "toolbar", entry: n.entry, ref: "contentBar", onChooserChanged: o.onResize, onScaffoldViewClicked: o.scaffoldViewClicked, onVnodeMounted: o.setPanesBoundary }, null, 8, ["entry", "onChooserChanged", "onScaffoldViewClicked", "onVnodeMounted"]), K("div", f5e, [ ($(), ae(wG, null, { default: q(() => [ ($(), ae(dt(o.viewerType), { entry: n.entry, mouseHovered: e.mouseHovered, visible: n.visible, lazy: !0, ref: "viewer", onFlatmapProvenanceReady: o.flatmapProvenacneReady, onResourceSelected: o.resourceSelected, onSpeciesChanged: o.speciesChanged }, null, 40, ["entry", "mouseHovered", "visible", "onFlatmapProvenanceReady", "onResourceSelected", "onSpeciesChanged"])) ]), _: 1 })) ], 512) ], 32); } const T7 = /* @__PURE__ */ Ki(p5e, [["render", h5e], ["__scopeId", "data-v-47023f68"]]); var $7 = { exports: {} }; (function(e, t) { (function(n, r) { e.exports = r(); })(typeof window < "u" ? window : Yne, 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); }, a = n.cancelAnimationFrame || n.mozCancelAnimationFrame || n.webkitCancelAnimationFrame || function(c) { n.clearTimeout(c); }; function o(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(y) { v.push(y); }; var m, g; this.call = function(y) { for (m = 0, g = v.length; m < g; m++) v[m].call(this, y); }, this.remove = function(y) { var x = []; for (m = 0, g = v.length; m < g; m++) v[m] !== y && x.push(v[m]); v = x; }, 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%" }, y = { position: "absolute", left: "0px", top: "0px", transition: "0s" }; s(v.resizeSensor, g); var x = document.createElement("div"); x.className = "resize-sensor-expand", s(x, g); var w = document.createElement("div"); s(w, y), x.appendChild(w); var k = document.createElement("div"); k.className = "resize-sensor-shrink", s(k, g); var C = document.createElement("div"); s(C, y), s(C, { width: "200%", height: "200%" }), k.appendChild(C), v.resizeSensor.appendChild(x), v.resizeSensor.appendChild(k), v.appendChild(v.resizeSensor); var S = window.getComputedStyle(v), _ = S ? S.getPropertyValue("position") : null; _ !== "absolute" && _ !== "relative" && _ !== "fixed" && _ !== "sticky" && (v.style.position = "relative"); var T = !1, F = 0, A = i(v), I = 0, N = 0, L = !0; f = 0; var z = function() { var Q = v.offsetWidth, X = v.offsetHeight; w.style.width = Q + 10 + "px", w.style.height = X + 10 + "px", x.scrollLeft = Q + 10, x.scrollTop = X + 10, k.scrollLeft = Q + 10, k.scrollTop = X + 10; }, P = function() { if (L) { var Q = v.offsetWidth === 0 && v.offsetHeight === 0; if (Q) { f || (f = r(function() { f = 0, P(); })); return; } else L = !1; } z(); }; v.resizeSensor.resetSensor = P; var D = function() { F = 0, T && (I = A.width, N = A.height, v.resizedAttached && v.resizedAttached.call(A)); }, M = function() { A = i(v), T = A.width !== I || A.height !== N, T && !F && (F = r(D)), P(); }, V = function(Q, X, ee) { Q.attachEvent ? Q.attachEvent("on" + X, ee) : Q.addEventListener(X, ee); }; V(x, "scroll", M), V(k, "scroll", M), f = r(function() { f = 0, P(); }); } } o(c, function(v) { p(v, d); }), this.detach = function(v) { f || (a(f), f = 0), l.detach(c, v); }, this.reset = function() { c.resizeSensor.resetSensor(); }; }; if (l.reset = function(c) { o(c, function(d) { d.resizeSensor.resetSensor(); }); }, l.detach = function(c, d) { o(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; }); })($7); var v5e = $7.exports; const g5e = /* @__PURE__ */ cN(v5e), m5e = { name: "ResizeSensor", methods: { activate: function() { this._sensor || (this._sensor = new g5e(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(); } }, y5e = { style: { height: "100%", width: "100%", position: "absolute" }, ref: "display" }; function b5e(e, t, n, r, a, o) { return $(), B("div", y5e, null, 512); } const O7 = /* @__PURE__ */ Ki(m5e, [["render", b5e]]), w5e = { 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, a) => (r.size = a === t ? r.max : r.min, a !== 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), a = 100 - (this.pushOtherPanes ? 0 : n.nextPanesSize), o = Math.max(Math.min(this.getCurrentDragPercentage(e), a), r); let i = [t, t + 1], s = this.panes[i[0]] || null, l = this.panes[i[1]] || null; const u = s.max < 100 && o >= s.max + n.prevPanesSize, c = l.max < 100 && o <= 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, o); 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(o - n.prevPanesSize - n.prevReachedMinPanes, s.min), s.max)), l !== null && (l.size = Math.min(Math.max(100 - o - 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((a, o) => { o > r[0] && o <= n && (a.size = a.min, e.prevReachedMinPanes += a.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((a, o) => { o > 0 && o <= n && (a.size = a.min, e.prevReachedMinPanes += a.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((a, o) => { o > n && o < r[1] && (a.size = a.min, e.nextReachedMinPanes += a.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((a, o) => { o < this.panesCount - 1 && o >= n + 1 && (a.size = a.min, e.nextReachedMinPanes += a.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, a = document.createElement("div"); a.classList.add("splitpanes__splitter"), n || (a.onmousedown = (o) => this.onMouseDown(o, r), typeof window < "u" && "ontouchstart" in window && (a.ontouchstart = (o) => this.onMouseDown(o, r)), a.onclick = (o) => this.onSplitterClick(o, r + 1)), this.dblClickSplitter && (a.ondblclick = (o) => this.onSplitterDblClick(o, r + 1)), t.parentNode.insertBefore(a, 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, a]) => n[r] = a); }, onPaneAdd(e) { let t = -1; Array.from(e.$el.parentNode.children).some((a) => (a.className.includes("splitpanes__pane") && t++, a === 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((a, o) => a.index = o), this.ready && this.$nextTick(() => { this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[t] }), this.$emit("pane-add", { index: t, panes: this.panes.map((a) => ({ min: a.min, max: a.max, size: a.size })) }); }); }, onPaneRemove(e) { const t = this.panes.findIndex((r) => r.id === e._.uid), n = this.panes.splice(t, 1)[0]; this.panes.forEach((r, a) => r.index = a), 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((a) => { a.size = Math.max(Math.min(e, a.max), a.min), t -= a.size, a.size >= a.max && n.push(a.id), a.size <= a.min && r.push(a.id); }), t > 0.1 && this.readjustSizes(t, n, r); }, initialPanesSizing() { let e = 100; const t = [], n = []; let r = 0; this.panes.forEach((o) => { e -= o.size, o.size !== null && r++, o.size >= o.max && t.push(o.id), o.size <= o.min && n.push(o.id); }); let a = 100; e > 0.1 && (this.panes.forEach((o) => { o.size === null && (o.size = Math.max(Math.min(e / (this.panesCount - r), o.max), o.min)), a -= o.size; }), a > 0.1 && this.readjustSizes(e, t, n)); }, equalizeAfterAddOrRemove({ addedPane: e, removedPane: t } = {}) { let n = 100 / this.panesCount, r = 0; const a = [], o = []; e && e.givenSize !== null && (n = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((i) => { r -= i.size, i.size >= i.max && a.push(i.id), i.size <= i.min && o.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 && a.push(i.id), i.size <= i.min && o.push(i.id); }), r > 0.1 && this.readjustSizes(r, a, o)); }, readjustSizes(e, t, n) { let r; e > 0 ? r = e / (this.panesCount - t.length) : r = e / (this.panesCount - n.length), this.panes.forEach((a, o) => { if (e > 0 && !t.includes(a.id)) { const i = Math.max(Math.min(a.size + r, a.max), a.min), s = i - a.size; e -= s, a.size = i; } else if (!n.includes(a.id)) { const i = Math.max(Math.min(a.size + r, a.max), a.min), s = i - a.size; e -= s, a.size = i; } a.update({ [this.horizontal ? "height" : "width"]: `${this.indexedPanes[a.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 nn( "div", { ref: "container", class: [ "splitpanes", `splitpanes--${this.horizontal ? "horizontal" : "vertical"}`, { "splitpanes--dragging": this.touch.dragging } ] }, this.$slots.default() ); } }, x5e = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, k5e = { 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 C5e(e, t, n, r, a, o) { return $(), B("div", { class: "splitpanes__pane", onClick: t[0] || (t[0] = (i) => o.onPaneClick(i, e._.uid)), style: Qe(e.style) }, [ he(e.$slots, "default") ], 4); } const S5e = /* @__PURE__ */ x5e(k5e, [["render", C5e]]), E5e = { name: "CustomSplitter", components: { Splitpanes: w5e, Pane: S5e, ResizeSensor: O7 }, 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(); Tn.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) { Tn.emit("PaneUnmounted", { refName: e }); } }, computed: { ...Kd(ip), children() { return this.customLayout[this.index].children; }, customLayout() { return this.splitFlowStore.customLayout; }, isHorizontal() { return this.customLayout[this.index].horizontal; } } }, _5e = { style: { height: "100%", width: "100%" } }; function T5e(e, t, n, r, a, o) { const i = O7, s = lt("custom-splitter", !0), l = lt("pane"), u = lt("splitpanes"); return $(), B("div", _5e, [ Z(i, { onResize: t[0] || (t[0] = (c) => o.calculateStyles(n.index)) }), Z(u, { class: "default-theme", horizontal: o.isHorizontal, "dbl-click-splitter": !1 }, { default: q(() => [ ($(!0), B(Ue, null, yt(o.children, (c) => ($(), ae(l, { key: c, ref_for: !0, ref: c, onVnodeBeforeUnmount: (d) => o.childUnmounted(c) }, { default: q(() => [ o.customLayout[c].content ? ($(), ae(i, { key: 0, onResize: (d) => o.calculateStyles(c) }, null, 8, ["onResize"])) : ($(), ae(s, { key: c, index: c }, null, 8, ["index"])) ]), _: 2 }, 1032, ["onVnodeBeforeUnmount"]))), 128)) ]), _: 1 }, 8, ["horizontal"]) ]); } const F7 = /* @__PURE__ */ Ki(E5e, [["render", T5e], ["__scopeId", "data-v-0667e71f"]]), $5e = { name: "SplitDialog", components: { ContentVuer: T7, CustomSplitter: F7 }, 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: { ...Kd(ip), 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() { Tn.on("PaneResize", (e) => { this.setStyles(e.refName, e.rect); }), Tn.on("PaneUnmounted", (e) => { this.hidePane(e.refName); }); } }, O5e = { class: "tab-container", ref: "tabContainer" }; function F5e(e, t, n, r, a, o) { const i = F7, s = T7; return $(), B("div", O5e, [ Z(i, { index: "split-1", key: "split-1" }), ($(!0), B(Ue, null, yt(n.entries, (l) => ($(), B("div", { key: l.id, style: Qe(o.getStyle(l.id)), class: H([o.getClass(l.id), "contentvuer"]) }, [ ($(), ae(s, { key: l.id, entry: l, ref_for: !0, ref: "content", onResourceSelected: o.resourceSelected, onSpeciesChanged: o.speciesChanged, visible: o.isIdVisible(l.id) }, null, 8, ["entry", "onResourceSelected", "onSpeciesChanged", "visible"])) ], 6))), 128)) ], 512); } const A7 = /* @__PURE__ */ Ki($5e, [["render", F5e], ["__scopeId", "data-v-32038eaa"]]), A5e = { name: "SearchControls", props: { failedSearch: void 0 }, components: { Autocomplete: iN, MapSvgIcon: xS }, methods: { fetchSuggestions: function(e, t) { e === "" ? t([]) : this.$emit("fetch-suggestions", { term: e, cb: t }); } }, data: function() { return { searchText: "" }; } }, I5e = (e) => (ma("data-v-eb3db1ae"), e = e(), ya(), e), P5e = { class: "search-container" }, L5e = /* @__PURE__ */ I5e(() => /* @__PURE__ */ K("div", { class: "text search-text" }, " Search within display ", -1)), N5e = { key: 0, class: "text not-found-text" }; function M5e(e, t, n, r, a, o) { const i = iN, s = lt("map-svg-icon"); return $(), B("div", P5e, [ L5e, Z(i, { class: "search-box", placeholder: "Search", modelValue: e.searchText, "onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchText = l), "fetch-suggestions": o.fetchSuggestions, onKeyup: t[1] || (t[1] = gn((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"]), Z(s, { icon: "magnifyingGlass", class: "magnify", onClick: t[3] || (t[3] = (l) => e.$emit("search", e.searchText)) }), n.failedSearch ? ($(), B("div", N5e, " '" + _e(n.failedSearch) + "' not found ", 1)) : te("", !0) ]); } const I7 = /* @__PURE__ */ Ki(A5e, [["render", M5e], ["__scopeId", "data-v-eb3db1ae"]]), D5e = { name: "DialogToolbarContent", components: { Button: d4, Col: pN, Icon: Lr, Input: F2, Popover: L2, Row: I2, Switch: SN, MapSvgIcon: xS, MapSvgSpriteColor: C7, SearchControls: I7, ElIconCopyDocument: D8 }, props: { /** * Array of titles. */ numberOfEntries: { type: Number, default: 0 }, /** * Display icons for docking, undocking and etc. */ showIcons: { type: Boolean, default: !1 } }, computed: { ...Kd(gw, R0, ip), 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: un(D8) }; }, methods: { titleClicked: function(e) { this.$emit("titleClicked", e); }, startHelp: function() { Tn.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, Tn.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 = un(this.$refs.activeViewRef), this.permalinkRef = un(this.$refs.permalinkRef), document.addEventListener("fullscreenchange", this.onFullscreenEsc); }, unmounted: function() { document.removeEventListener("fullscreenchange", this.onFullscreenEsc); } }, CS = (e) => (ma("data-v-3ca4906c"), e = e(), ya(), e), B5e = { class: "header" }, R5e = { key: 0, class: "switch-control" }, z5e = /* @__PURE__ */ CS(() => /* @__PURE__ */ K("br", null, null, -1)), V5e = /* @__PURE__ */ CS(() => /* @__PURE__ */ K("br", null, null, -1)), j5e = /* @__PURE__ */ CS(() => /* @__PURE__ */ K("br", null, null, -1)); function H5e(e, t, n, r, a, o) { const i = lt("map-svg-sprite-color"), s = I7, l = SN, u = lt("map-svg-icon"), c = L2, d = pN, f = I2, h = F2, p = d4, v = Cf; return $(), B("div", B5e, [ Z(i), Z(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"]), o.syncMode ? ($(), B("div", R5e, [ Z(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"]), Z(c, { class: "tooltip", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ Z(u, { icon: "help", class: "sync-help header-icon" }) ]), default: q(() => [ ze(" When in Linked mode the two maps will interact "), z5e, ze(" together. Select an organ in one and it will "), V5e, ze(" be automatically selected in the other. "), j5e, ze(' In Independent mode the maps will work separately." ') ]), _: 1 }, 8, ["show-after"]) ])) : te("", !0), Z(f, { class: "icon-group" }, { default: q(() => [ e.activeViewRef ? ($(), ae(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: q(() => [ ($(!0), B(Ue, null, yt(o.viewIcons, (m) => ($(), ae(f, { gutter: 20, key: m.name, class: H([ { active: m.icon == o.activeView }, { disabled: m.min > n.numberOfEntries }, "view-icon-row" ]), onClick: (g) => o.viewClicked(m.icon) }, { default: q(() => [ Z(d, { span: 4 }, { default: q(() => [ Z(u, { icon: m.icon, class: "view-icon" }, null, 8, ["icon"]) ]), _: 2 }, 1024), Z(d, { offset: 2, span: 18, class: "view-text" }, { default: q(() => [ ze(_e(m.name), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["class", "onClick"]))), 128)) ]), _: 1 }, 8, ["virtual-ref"])) : te("", !0), Z(c, { class: "tooltip", content: "Split screen", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ Z(u, { icon: o.activeView, ref: "activeViewRef", class: H([ { disabled: 1 >= n.numberOfEntries }, "header-icon" ]) }, null, 8, ["icon", "class"]) ]), _: 1 }, 8, ["show-after"]), Z(c, { class: "tooltip", content: "Help", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ Z(u, { icon: "tooltips", class: "header-icon", onClick: t[3] || (t[3] = (m) => o.startHelp()) }) ]), _: 1 }, 8, ["show-after"]), Z(c, { class: "tooltip", content: "Fullscreen", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ qe(Z(u, { icon: "fullScreen", class: "header-icon", onClick: o.onFullscreen }, null, 8, ["onClick"]), [ [ct, !e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), Z(c, { class: "tooltip", content: "Exit fullscreen", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ qe(Z(u, { icon: "closeFullScreen", class: "header-icon", onClick: o.onFullscreen }, null, 8, ["onClick"]), [ [ct, e.isFullscreen] ]) ]), _: 1 }, 8, ["show-after"]), e.permalinkRef ? ($(), ae(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: q(() => [ qe(($(), ae(f, { gutter: 20, "element-loading-text": "Creating link..." }, { default: q(() => [ Z(d, { span: 20 }, { default: q(() => [ Z(h, { class: "link-input", size: "small", placeholder: "Permanant Link Here", readonly: !0, modelValue: o.shareLink, "onUpdate:modelValue": t[4] || (t[4] = (m) => o.shareLink = m), ref: "linkInput" }, null, 8, ["modelValue"]) ]), _: 1 }), Z(d, { span: 4 }, { default: q(() => [ Z(c, { class: "tooltip", content: "Copy link", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ Z(p, { class: "copy-button", icon: e.ElIconCopyDocument, size: "small", onClick: o.copyShareLink }, null, 8, ["icon", "onClick"]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]), _: 1 })), [ [v, e.loadingLink] ]) ]), _: 1 }, 8, ["virtual-ref"])) : te("", !0), Z(c, { class: "tooltip", content: "Get permalink", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ qe(Z(u, { icon: "permalink", ref: "permalinkRef", class: "header-icon", onClick: o.getShareLink }, null, 8, ["onClick"]), [ [ct, o.shareLink] ]) ]), _: 1 }, 8, ["show-after"]), Z(c, { class: "tooltip", content: "Close", placement: "bottom-end", "show-after": o.helpDelay, teleported: !1, trigger: "hover", "popper-class": "header-popper" }, { reference: q(() => [ qe(Z(u, { icon: "close", class: "header-icon", onClick: o.close }, null, 8, ["onClick"]), [ [ct, n.showIcons] ]) ]), _: 1 }, 8, ["show-after"]) ]), _: 1 }) ]); } const P7 = /* @__PURE__ */ Ki(D5e, [["render", H5e], ["__scopeId", "data-v-3ca4906c"]]), Zs = { 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), Tn.emit("trackEvent", t); } }, L7 = (e) => !e.getAttribute("aria-owns"), N7 = (e, t, n) => { const { parentNode: r } = e; if (!r) return null; const a = r.querySelectorAll(n), o = Array.prototype.indexOf.call(a, e); return a[o + t] || null; }, xy = (e) => { e && (e.focus(), !L7(e) && e.click()); }, tl = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var pO; const ar = typeof window < "u", U5e = (e) => typeof e == "string", M7 = () => { }, x5 = ar && ((pO = window == null ? void 0 : window.navigator) == null ? void 0 : pO.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function z0(e) { return typeof e == "function" ? e() : b(e); } function q5e(e) { return e; } function em(e) { return xg() ? (lh(e), !0) : !1; } function W5e(e, t = !0) { tt() ? nt(e) : t ? e() : We(e); } function fO(e, t, n = {}) { const { immediate: r = !0 } = n, a = U(!1); let o = null; function i() { o && (clearTimeout(o), o = null); } function s() { a.value = !1, i(); } function l(...u) { i(), a.value = !0, o = setTimeout(() => { a.value = !1, o = null, e(...u); }, z0(t)); } return r && (a.value = !0, ar && l()), em(s), { isPending: ch(a), start: l, stop: s }; } function ps(e) { var t; const n = z0(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const tm = ar ? window : void 0; function Mi(...e) { let t, n, r, a; if (U5e(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = tm) : [t, n, r, a] = e, !t) return M7; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [ps(t), z0(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return em(u), u; } let hO = !1; function K5e(e, t, n = {}) { const { window: r = tm, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; x5 && !hO && (hO = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", M7))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = ps(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Mi(r, "click", (c) => { const d = ps(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: o }), Mi(r, "pointerdown", (c) => { const d = ps(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Mi(r, "blur", (c) => { var d; const f = ps(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 D7(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), W5e(r, t), n; } const vO = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, gO = "__vueuse_ssr_handlers__"; vO[gO] = vO[gO] || {}; function G5e(e, t, { window: n = tm, initialValue: r = "" } = {}) { const a = U(r), o = O(() => { var i; return ps(t) || ((i = n == null ? void 0 : n.document) == null ? void 0 : i.documentElement); }); return be([o, () => z0(e)], ([i, s]) => { var l; if (i && n) { const u = (l = n.getComputedStyle(i).getPropertyValue(s)) == null ? void 0 : l.trim(); a.value = u || r; } }, { immediate: !0 }), be(a, (i) => { var s; (s = o.value) != null && s.style && o.value.style.setProperty(z0(e), i); }), a; } var mO = Object.getOwnPropertySymbols, X5e = Object.prototype.hasOwnProperty, Y5e = Object.prototype.propertyIsEnumerable, Z5e = (e, t) => { var n = {}; for (var r in e) X5e.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && mO) for (var r of mO(e)) t.indexOf(r) < 0 && Y5e.call(e, r) && (n[r] = e[r]); return n; }; function us(e, t, n = {}) { const r = n, { window: a = tm } = r, o = Z5e(r, ["window"]); let i; const s = D7(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => ps(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return em(c), { isSupported: s, stop: c }; } var yO = Object.getOwnPropertySymbols, Q5e = Object.prototype.hasOwnProperty, J5e = Object.prototype.propertyIsEnumerable, e3e = (e, t) => { var n = {}; for (var r in e) Q5e.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && yO) for (var r of yO(e)) t.indexOf(r) < 0 && J5e.call(e, r) && (n[r] = e[r]); return n; }; function t3e(e, t, n = {}) { const r = n, { window: a = tm } = r, o = e3e(r, ["window"]); let i; const s = D7(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => ps(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return em(c), { isSupported: s, stop: c }; } var bO; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(bO || (bO = {})); var n3e = Object.defineProperty, wO = Object.getOwnPropertySymbols, r3e = Object.prototype.hasOwnProperty, a3e = Object.prototype.propertyIsEnumerable, xO = (e, t, n) => t in e ? n3e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, o3e = (e, t) => { for (var n in t || (t = {})) r3e.call(t, n) && xO(e, n, t[n]); if (wO) for (var n of wO(t)) a3e.call(t, n) && xO(e, n, t[n]); return e; }; const i3e = { 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] }; o3e({ linear: q5e }, i3e); const s3e = () => ar && /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 ml = () => { }, l3e = Object.prototype.hasOwnProperty, kO = (e, t) => l3e.call(e, t), Ka = Array.isArray, Mr = (e) => typeof e == "function", co = (e) => typeof e == "string", Gr = (e) => e !== null && typeof e == "object", u3e = (e) => (Gr(e) || Mr(e)) && Mr(e.then) && Mr(e.catch), c3e = Object.prototype.toString, d3e = (e) => c3e.call(e), bk = (e) => d3e(e).slice(8, -1), SS = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, p3e = /-(\w)/g, f3e = SS((e) => e.replace(p3e, (t, n) => n ? n.toUpperCase() : "")), h3e = /\B([A-Z])/g, v3e = SS( (e) => e.replace(h3e, "-$1").toLowerCase() ), g3e = SS((e) => e.charAt(0).toUpperCase() + e.slice(1)); var B7 = typeof global == "object" && global && global.Object === Object && global, m3e = typeof self == "object" && self && self.Object === Object && self, Gi = B7 || m3e || Function("return this")(), ii = Gi.Symbol, R7 = Object.prototype, y3e = R7.hasOwnProperty, b3e = R7.toString, pv = ii ? ii.toStringTag : void 0; function w3e(e) { var t = y3e.call(e, pv), n = e[pv]; try { e[pv] = void 0; var r = !0; } catch { } var a = b3e.call(e); return r && (t ? e[pv] = n : delete e[pv]), a; } var x3e = Object.prototype, k3e = x3e.toString; function C3e(e) { return k3e.call(e); } var S3e = "[object Null]", E3e = "[object Undefined]", CO = ii ? ii.toStringTag : void 0; function $h(e) { return e == null ? e === void 0 ? E3e : S3e : CO && CO in Object(e) ? w3e(e) : C3e(e); } function Xu(e) { return e != null && typeof e == "object"; } var _3e = "[object Symbol]"; function mw(e) { return typeof e == "symbol" || Xu(e) && $h(e) == _3e; } function T3e(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var si = Array.isArray, $3e = 1 / 0, SO = ii ? ii.prototype : void 0, EO = SO ? SO.toString : void 0; function z7(e) { if (typeof e == "string") return e; if (si(e)) return T3e(e, z7) + ""; if (mw(e)) return EO ? EO.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -$3e ? "-0" : t; } var O3e = /\s/; function F3e(e) { for (var t = e.length; t-- && O3e.test(e.charAt(t)); ) ; return t; } var A3e = /^\s+/; function I3e(e) { return e && e.slice(0, F3e(e) + 1).replace(A3e, ""); } function Ts(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var _O = NaN, P3e = /^[-+]0x[0-9a-f]+$/i, L3e = /^0b[01]+$/i, N3e = /^0o[0-7]+$/i, M3e = parseInt; function TO(e) { if (typeof e == "number") return e; if (mw(e)) return _O; if (Ts(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Ts(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = I3e(e); var n = L3e.test(e); return n || N3e.test(e) ? M3e(e.slice(2), n ? 2 : 8) : P3e.test(e) ? _O : +e; } function V7(e) { return e; } var D3e = "[object AsyncFunction]", B3e = "[object Function]", R3e = "[object GeneratorFunction]", z3e = "[object Proxy]"; function j7(e) { if (!Ts(e)) return !1; var t = $h(e); return t == B3e || t == R3e || t == D3e || t == z3e; } var wk = Gi["__core-js_shared__"], $O = function() { var e = /[^.]+$/.exec(wk && wk.keys && wk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function V3e(e) { return !!$O && $O in e; } var j3e = Function.prototype, H3e = j3e.toString; function sp(e) { if (e != null) { try { return H3e.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var U3e = /[\\^$.*+?()[\]{}|]/g, q3e = /^\[object .+?Constructor\]$/, W3e = Function.prototype, K3e = Object.prototype, G3e = W3e.toString, X3e = K3e.hasOwnProperty, Y3e = RegExp( "^" + G3e.call(X3e).replace(U3e, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Z3e(e) { if (!Ts(e) || V3e(e)) return !1; var t = j7(e) ? Y3e : q3e; return t.test(sp(e)); } function Q3e(e, t) { return e == null ? void 0 : e[t]; } function lp(e, t) { var n = Q3e(e, t); return Z3e(n) ? n : void 0; } var k5 = lp(Gi, "WeakMap"), OO = Object.create, J3e = /* @__PURE__ */ function() { function e() { } return function(t) { if (!Ts(t)) return {}; if (OO) return OO(t); e.prototype = t; var n = new e(); return e.prototype = void 0, n; }; }(); function e4e(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 t4e = 800, n4e = 16, r4e = Date.now; function a4e(e) { var t = 0, n = 0; return function() { var r = r4e(), a = n4e - (r - n); if (n = r, a > 0) { if (++t >= t4e) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function o4e(e) { return function() { return e; }; } var Cb = function() { try { var e = lp(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), i4e = Cb ? function(e, t) { return Cb(e, "toString", { configurable: !0, enumerable: !1, value: o4e(t), writable: !0 }); } : V7, s4e = a4e(i4e); function l4e(e, t) { for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; ) ; return e; } function u4e(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var c4e = 9007199254740991, d4e = /^(?:0|[1-9]\d*)$/; function ES(e, t) { var n = typeof e; return t = t ?? c4e, !!t && (n == "number" || n != "symbol" && d4e.test(e)) && e > -1 && e % 1 == 0 && e < t; } function p4e(e, t, n) { t == "__proto__" && Cb ? Cb(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function _S(e, t) { return e === t || e !== e && t !== t; } var f4e = Object.prototype, h4e = f4e.hasOwnProperty; function H7(e, t, n) { var r = e[t]; (!(h4e.call(e, t) && _S(r, n)) || n === void 0 && !(t in e)) && p4e(e, t, n); } var FO = Math.max; function v4e(e, t, n) { return t = FO(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = FO(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), e4e(e, this, s); }; } var g4e = 9007199254740991; function TS(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= g4e; } function m4e(e) { return e != null && TS(e.length) && !j7(e); } var y4e = Object.prototype; function U7(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || y4e; return e === n; } function b4e(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var w4e = "[object Arguments]"; function AO(e) { return Xu(e) && $h(e) == w4e; } var q7 = Object.prototype, x4e = q7.hasOwnProperty, k4e = q7.propertyIsEnumerable, $S = AO(/* @__PURE__ */ function() { return arguments; }()) ? AO : function(e) { return Xu(e) && x4e.call(e, "callee") && !k4e.call(e, "callee"); }; function C4e() { return !1; } var W7 = typeof exports == "object" && exports && !exports.nodeType && exports, IO = W7 && typeof module == "object" && module && !module.nodeType && module, S4e = IO && IO.exports === W7, PO = S4e ? Gi.Buffer : void 0, E4e = PO ? PO.isBuffer : void 0, Sb = E4e || C4e, _4e = "[object Arguments]", T4e = "[object Array]", $4e = "[object Boolean]", O4e = "[object Date]", F4e = "[object Error]", A4e = "[object Function]", I4e = "[object Map]", P4e = "[object Number]", L4e = "[object Object]", N4e = "[object RegExp]", M4e = "[object Set]", D4e = "[object String]", B4e = "[object WeakMap]", R4e = "[object ArrayBuffer]", z4e = "[object DataView]", V4e = "[object Float32Array]", j4e = "[object Float64Array]", H4e = "[object Int8Array]", U4e = "[object Int16Array]", q4e = "[object Int32Array]", W4e = "[object Uint8Array]", K4e = "[object Uint8ClampedArray]", G4e = "[object Uint16Array]", X4e = "[object Uint32Array]", Jn = {}; Jn[V4e] = Jn[j4e] = Jn[H4e] = Jn[U4e] = Jn[q4e] = Jn[W4e] = Jn[K4e] = Jn[G4e] = Jn[X4e] = !0; Jn[_4e] = Jn[T4e] = Jn[R4e] = Jn[$4e] = Jn[z4e] = Jn[O4e] = Jn[F4e] = Jn[A4e] = Jn[I4e] = Jn[P4e] = Jn[L4e] = Jn[N4e] = Jn[M4e] = Jn[D4e] = Jn[B4e] = !1; function Y4e(e) { return Xu(e) && TS(e.length) && !!Jn[$h(e)]; } function OS(e) { return function(t) { return e(t); }; } var K7 = typeof exports == "object" && exports && !exports.nodeType && exports, e0 = K7 && typeof module == "object" && module && !module.nodeType && module, Z4e = e0 && e0.exports === K7, xk = Z4e && B7.process, Mf = function() { try { var e = e0 && e0.require && e0.require("util").types; return e || xk && xk.binding && xk.binding("util"); } catch { } }(), LO = Mf && Mf.isTypedArray, G7 = LO ? OS(LO) : Y4e, Q4e = Object.prototype, J4e = Q4e.hasOwnProperty; function eSe(e, t) { var n = si(e), r = !n && $S(e), a = !n && !r && Sb(e), o = !n && !r && !a && G7(e), i = n || r || a || o, s = i ? b4e(e.length, String) : [], l = s.length; for (var u in e) J4e.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. ES(u, l))) && s.push(u); return s; } function X7(e, t) { return function(n) { return e(t(n)); }; } var tSe = X7(Object.keys, Object), nSe = Object.prototype, rSe = nSe.hasOwnProperty; function aSe(e) { if (!U7(e)) return tSe(e); var t = []; for (var n in Object(e)) rSe.call(e, n) && n != "constructor" && t.push(n); return t; } function Y7(e) { return m4e(e) ? eSe(e) : aSe(e); } var oSe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, iSe = /^\w*$/; function FS(e, t) { if (si(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || mw(e) ? !0 : iSe.test(e) || !oSe.test(e) || t != null && e in Object(t); } var V0 = lp(Object, "create"); function sSe() { this.__data__ = V0 ? V0(null) : {}, this.size = 0; } function lSe(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var uSe = "__lodash_hash_undefined__", cSe = Object.prototype, dSe = cSe.hasOwnProperty; function pSe(e) { var t = this.__data__; if (V0) { var n = t[e]; return n === uSe ? void 0 : n; } return dSe.call(t, e) ? t[e] : void 0; } var fSe = Object.prototype, hSe = fSe.hasOwnProperty; function vSe(e) { var t = this.__data__; return V0 ? t[e] !== void 0 : hSe.call(t, e); } var gSe = "__lodash_hash_undefined__"; function mSe(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = V0 && t === void 0 ? gSe : t, this; } function Td(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]); } } Td.prototype.clear = sSe; Td.prototype.delete = lSe; Td.prototype.get = pSe; Td.prototype.has = vSe; Td.prototype.set = mSe; function ySe() { this.__data__ = [], this.size = 0; } function yw(e, t) { for (var n = e.length; n--; ) if (_S(e[n][0], t)) return n; return -1; } var bSe = Array.prototype, wSe = bSe.splice; function xSe(e) { var t = this.__data__, n = yw(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : wSe.call(t, n, 1), --this.size, !0; } function kSe(e) { var t = this.__data__, n = yw(t, e); return n < 0 ? void 0 : t[n][1]; } function CSe(e) { return yw(this.__data__, e) > -1; } function SSe(e, t) { var n = this.__data__, r = yw(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Ml(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]); } } Ml.prototype.clear = ySe; Ml.prototype.delete = xSe; Ml.prototype.get = kSe; Ml.prototype.has = CSe; Ml.prototype.set = SSe; var j0 = lp(Gi, "Map"); function ESe() { this.size = 0, this.__data__ = { hash: new Td(), map: new (j0 || Ml)(), string: new Td() }; } function _Se(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function bw(e, t) { var n = e.__data__; return _Se(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function TSe(e) { var t = bw(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function $Se(e) { return bw(this, e).get(e); } function OSe(e) { return bw(this, e).has(e); } function FSe(e, t) { var n = bw(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function Dl(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]); } } Dl.prototype.clear = ESe; Dl.prototype.delete = TSe; Dl.prototype.get = $Se; Dl.prototype.has = OSe; Dl.prototype.set = FSe; var ASe = "Expected a function"; function AS(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(ASe); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (AS.Cache || Dl)(), n; } AS.Cache = Dl; var ISe = 500; function PSe(e) { var t = AS(e, function(r) { return n.size === ISe && n.clear(), r; }), n = t.cache; return t; } var LSe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, NSe = /\\(\\)?/g, MSe = PSe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(LSe, function(n, r, a, o) { t.push(a ? o.replace(NSe, "$1") : r || n); }), t; }); function DSe(e) { return e == null ? "" : z7(e); } function ww(e, t) { return si(e) ? e : FS(e, t) ? [e] : MSe(DSe(e)); } var BSe = 1 / 0; function nm(e) { if (typeof e == "string" || mw(e)) return e; var t = e + ""; return t == "0" && 1 / e == -BSe ? "-0" : t; } function IS(e, t) { t = ww(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[nm(t[n++])]; return n && n == r ? e : void 0; } function ul(e, t, n) { var r = e == null ? void 0 : IS(e, t); return r === void 0 ? n : r; } function Z7(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var NO = ii ? ii.isConcatSpreadable : void 0; function RSe(e) { return si(e) || $S(e) || !!(NO && e && e[NO]); } function PS(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = RSe), a || (a = []); ++o < i; ) { var s = e[o]; t > 0 && n(s) ? t > 1 ? PS(s, t - 1, n, r, a) : Z7(a, s) : a[a.length] = s; } return a; } function zSe(e) { var t = e == null ? 0 : e.length; return t ? PS(e, 1) : []; } function VSe(e) { return s4e(v4e(e, void 0, zSe), e + ""); } var jSe = X7(Object.getPrototypeOf, Object); function wu() { if (!arguments.length) return []; var e = arguments[0]; return si(e) ? e : [e]; } function HSe() { this.__data__ = new Ml(), this.size = 0; } function USe(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function qSe(e) { return this.__data__.get(e); } function WSe(e) { return this.__data__.has(e); } var KSe = 200; function GSe(e, t) { var n = this.__data__; if (n instanceof Ml) { var r = n.__data__; if (!j0 || r.length < KSe - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Dl(r); } return n.set(e, t), this.size = n.size, this; } function gs(e) { var t = this.__data__ = new Ml(e); this.size = t.size; } gs.prototype.clear = HSe; gs.prototype.delete = USe; gs.prototype.get = qSe; gs.prototype.has = WSe; gs.prototype.set = GSe; var Q7 = typeof exports == "object" && exports && !exports.nodeType && exports, MO = Q7 && typeof module == "object" && module && !module.nodeType && module, XSe = MO && MO.exports === Q7, DO = XSe ? Gi.Buffer : void 0; DO && DO.allocUnsafe; function YSe(e, t) { return e.slice(); } function ZSe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function QSe() { return []; } var JSe = Object.prototype, eEe = JSe.propertyIsEnumerable, BO = Object.getOwnPropertySymbols, tEe = BO ? function(e) { return e == null ? [] : (e = Object(e), ZSe(BO(e), function(t) { return eEe.call(e, t); })); } : QSe; function nEe(e, t, n) { var r = t(e); return si(e) ? r : Z7(r, n(e)); } function C5(e) { return nEe(e, Y7, tEe); } var S5 = lp(Gi, "DataView"), E5 = lp(Gi, "Promise"), _5 = lp(Gi, "Set"), RO = "[object Map]", rEe = "[object Object]", zO = "[object Promise]", VO = "[object Set]", jO = "[object WeakMap]", HO = "[object DataView]", aEe = sp(S5), oEe = sp(j0), iEe = sp(E5), sEe = sp(_5), lEe = sp(k5), Pi = $h; (S5 && Pi(new S5(new ArrayBuffer(1))) != HO || j0 && Pi(new j0()) != RO || E5 && Pi(E5.resolve()) != zO || _5 && Pi(new _5()) != VO || k5 && Pi(new k5()) != jO) && (Pi = function(e) { var t = $h(e), n = t == rEe ? e.constructor : void 0, r = n ? sp(n) : ""; if (r) switch (r) { case aEe: return HO; case oEe: return RO; case iEe: return zO; case sEe: return VO; case lEe: return jO; } return t; }); var uEe = Object.prototype, cEe = uEe.hasOwnProperty; function dEe(e) { var t = e.length, n = new e.constructor(t); return t && typeof e[0] == "string" && cEe.call(e, "index") && (n.index = e.index, n.input = e.input), n; } var Eb = Gi.Uint8Array; function LS(e) { var t = new e.constructor(e.byteLength); return new Eb(t).set(new Eb(e)), t; } function pEe(e, t) { var n = LS(e.buffer); return new e.constructor(n, e.byteOffset, e.byteLength); } var fEe = /\w*$/; function hEe(e) { var t = new e.constructor(e.source, fEe.exec(e)); return t.lastIndex = e.lastIndex, t; } var UO = ii ? ii.prototype : void 0, qO = UO ? UO.valueOf : void 0; function vEe(e) { return qO ? Object(qO.call(e)) : {}; } function gEe(e, t) { var n = LS(e.buffer); return new e.constructor(n, e.byteOffset, e.length); } var mEe = "[object Boolean]", yEe = "[object Date]", bEe = "[object Map]", wEe = "[object Number]", xEe = "[object RegExp]", kEe = "[object Set]", CEe = "[object String]", SEe = "[object Symbol]", EEe = "[object ArrayBuffer]", _Ee = "[object DataView]", TEe = "[object Float32Array]", $Ee = "[object Float64Array]", OEe = "[object Int8Array]", FEe = "[object Int16Array]", AEe = "[object Int32Array]", IEe = "[object Uint8Array]", PEe = "[object Uint8ClampedArray]", LEe = "[object Uint16Array]", NEe = "[object Uint32Array]"; function MEe(e, t, n) { var r = e.constructor; switch (t) { case EEe: return LS(e); case mEe: case yEe: return new r(+e); case _Ee: return pEe(e); case TEe: case $Ee: case OEe: case FEe: case AEe: case IEe: case PEe: case LEe: case NEe: return gEe(e); case bEe: return new r(); case wEe: case CEe: return new r(e); case xEe: return hEe(e); case kEe: return new r(); case SEe: return vEe(e); } } function DEe(e) { return typeof e.constructor == "function" && !U7(e) ? J3e(jSe(e)) : {}; } var BEe = "[object Map]"; function REe(e) { return Xu(e) && Pi(e) == BEe; } var WO = Mf && Mf.isMap, zEe = WO ? OS(WO) : REe, VEe = "[object Set]"; function jEe(e) { return Xu(e) && Pi(e) == VEe; } var KO = Mf && Mf.isSet, HEe = KO ? OS(KO) : jEe, UEe = 1, J7 = "[object Arguments]", qEe = "[object Array]", WEe = "[object Boolean]", KEe = "[object Date]", GEe = "[object Error]", ez = "[object Function]", XEe = "[object GeneratorFunction]", YEe = "[object Map]", ZEe = "[object Number]", tz = "[object Object]", QEe = "[object RegExp]", JEe = "[object Set]", e_e = "[object String]", t_e = "[object Symbol]", n_e = "[object WeakMap]", r_e = "[object ArrayBuffer]", a_e = "[object DataView]", o_e = "[object Float32Array]", i_e = "[object Float64Array]", s_e = "[object Int8Array]", l_e = "[object Int16Array]", u_e = "[object Int32Array]", c_e = "[object Uint8Array]", d_e = "[object Uint8ClampedArray]", p_e = "[object Uint16Array]", f_e = "[object Uint32Array]", Wn = {}; Wn[J7] = Wn[qEe] = Wn[r_e] = Wn[a_e] = Wn[WEe] = Wn[KEe] = Wn[o_e] = Wn[i_e] = Wn[s_e] = Wn[l_e] = Wn[u_e] = Wn[YEe] = Wn[ZEe] = Wn[tz] = Wn[QEe] = Wn[JEe] = Wn[e_e] = Wn[t_e] = Wn[c_e] = Wn[d_e] = Wn[p_e] = Wn[f_e] = !0; Wn[GEe] = Wn[ez] = Wn[n_e] = !1; function ky(e, t, n, r, a, o) { var i, s = t & UEe; if (i !== void 0) return i; if (!Ts(e)) return e; var l = si(e); if (l) i = dEe(e); else { var u = Pi(e), c = u == ez || u == XEe; if (Sb(e)) return YSe(e); if (u == tz || u == J7 || c && !a) i = c ? {} : DEe(e); else { if (!Wn[u]) return a ? e : {}; i = MEe(e, u); } } o || (o = new gs()); var d = o.get(e); if (d) return d; o.set(e, i), HEe(e) ? e.forEach(function(p) { i.add(ky(p, t, n, p, e, o)); }) : zEe(e) && e.forEach(function(p, v) { i.set(v, ky(p, t, n, v, e, o)); }); var f = C5, h = l ? void 0 : f(e); return l4e(h || e, function(p, v) { h && (v = p, p = e[v]), H7(i, v, ky(p, t, n, v, e, o)); }), i; } var h_e = 1, v_e = 4; function nz(e) { return ky(e, h_e | v_e); } var g_e = "__lodash_hash_undefined__"; function m_e(e) { return this.__data__.set(e, g_e), this; } function y_e(e) { return this.__data__.has(e); } function _b(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Dl(); ++t < n; ) this.add(e[t]); } _b.prototype.add = _b.prototype.push = m_e; _b.prototype.has = y_e; function b_e(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 w_e(e, t) { return e.has(t); } var x_e = 1, k_e = 2; function rz(e, t, n, r, a, o) { var i = n & x_e, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & k_e ? new _b() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!b_e(t, function(g, y) { if (!w_e(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function C_e(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function S_e(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var E_e = 1, __e = 2, T_e = "[object Boolean]", $_e = "[object Date]", O_e = "[object Error]", F_e = "[object Map]", A_e = "[object Number]", I_e = "[object RegExp]", P_e = "[object Set]", L_e = "[object String]", N_e = "[object Symbol]", M_e = "[object ArrayBuffer]", D_e = "[object DataView]", GO = ii ? ii.prototype : void 0, kk = GO ? GO.valueOf : void 0; function B_e(e, t, n, r, a, o, i) { switch (n) { case D_e: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case M_e: return !(e.byteLength != t.byteLength || !o(new Eb(e), new Eb(t))); case T_e: case $_e: case A_e: return _S(+e, +t); case O_e: return e.name == t.name && e.message == t.message; case I_e: case L_e: return e == t + ""; case F_e: var s = C_e; case P_e: var l = r & E_e; if (s || (s = S_e), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= __e, i.set(e, t); var c = rz(s(e), s(t), r, a, o, i); return i.delete(e), c; case N_e: if (kk) return kk.call(e) == kk.call(t); } return !1; } var R_e = 1, z_e = Object.prototype, V_e = z_e.hasOwnProperty; function j_e(e, t, n, r, a, o) { var i = n & R_e, s = C5(e), l = s.length, u = C5(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : V_e.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "constructor"); } if (v && !m) { var w = e.constructor, k = t.constructor; w != k && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof k == "function" && k instanceof k) && (v = !1); } return o.delete(e), o.delete(t), v; } var H_e = 1, XO = "[object Arguments]", YO = "[object Array]", g1 = "[object Object]", U_e = Object.prototype, ZO = U_e.hasOwnProperty; function q_e(e, t, n, r, a, o) { var i = si(e), s = si(t), l = i ? YO : Pi(e), u = s ? YO : Pi(t); l = l == XO ? g1 : l, u = u == XO ? g1 : u; var c = l == g1, d = u == g1, f = l == u; if (f && Sb(e)) { if (!Sb(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new gs()), i || G7(e) ? rz(e, t, n, r, a, o) : B_e(e, t, l, n, r, a, o); if (!(n & H_e)) { var h = c && ZO.call(e, "__wrapped__"), p = d && ZO.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new gs()), a(v, m, n, r, o); } } return f ? (o || (o = new gs()), j_e(e, t, n, r, a, o)) : !1; } function xw(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !Xu(e) && !Xu(t) ? e !== e && t !== t : q_e(e, t, n, r, xw, a); } var W_e = 1, K_e = 2; function G_e(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 gs(), d; if (!(d === void 0 ? xw(u, l, W_e | K_e, r, c) : d)) return !1; } } return !0; } function az(e) { return e === e && !Ts(e); } function X_e(e) { for (var t = Y7(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, az(a)]; } return t; } function oz(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function Y_e(e) { var t = X_e(e); return t.length == 1 && t[0][2] ? oz(t[0][0], t[0][1]) : function(n) { return n === e || G_e(n, e, t); }; } function Z_e(e, t) { return e != null && t in Object(e); } function Q_e(e, t, n) { t = ww(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = nm(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && TS(a) && ES(i, a) && (si(e) || $S(e))); } function iz(e, t) { return e != null && Q_e(e, t, Z_e); } var J_e = 1, e8e = 2; function t8e(e, t) { return FS(e) && az(t) ? oz(nm(e), t) : function(n) { var r = ul(n, e); return r === void 0 && r === t ? iz(n, e) : xw(t, r, J_e | e8e); }; } function n8e(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function r8e(e) { return function(t) { return IS(t, e); }; } function a8e(e) { return FS(e) ? n8e(nm(e)) : r8e(e); } function o8e(e) { return typeof e == "function" ? e : e == null ? V7 : typeof e == "object" ? si(e) ? t8e(e[0], e[1]) : Y_e(e) : a8e(e); } var Ck = function() { return Gi.Date.now(); }, i8e = "Expected a function", s8e = Math.max, l8e = Math.min; function sz(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(i8e); t = TO(t) || 0, Ts(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? s8e(TO(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? l8e(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Ck(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Ck()); } function k() { var C = Ck(), S = m(C); if (r = arguments, a = this, l = C, 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 k.cancel = x, k.flush = w, k; } function u8e(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return u4e(e, o8e(t), a); } var c8e = 1 / 0; function d8e(e) { var t = e == null ? 0 : e.length; return t ? PS(e, c8e) : []; } function Tb(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function ms(e, t) { return xw(e, t); } function rm(e) { return e == null; } function lz(e) { return e === void 0; } function p8e(e, t, n, r) { if (!Ts(e)) return e; t = ww(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = nm(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = Ts(c) ? c : ES(t[a + 1]) ? [] : {}); } H7(s, l, u), s = s[l]; } return e; } function f8e(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = IS(e, i); n(s, i) && p8e(o, ww(i, e), s); } return o; } function h8e(e, t) { return f8e(e, t, function(n, r) { return iz(e, r); }); } var uz = VSe(function(e, t) { return e == null ? {} : h8e(e, t); }); const fl = (e) => e === void 0, $s = (e) => typeof e == "boolean", Dn = (e) => typeof e == "number", T5 = (e) => !e && e !== 0 || Ka(e) && e.length === 0 || Gr(e) && !Object.keys(e).length, ad = (e) => typeof Element > "u" ? !1 : e instanceof Element, H0 = (e) => rm(e), v8e = (e) => co(e) ? !Number.isNaN(Number(e)) : !1, g8e = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), QO = (e) => g3e(e), JO = (e) => Object.keys(e); class cz extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function dz(e, t) { throw new cz(`[${e}] ${t}`); } function xr(e, t) { if (process.env.NODE_ENV !== "production") { const n = co(e) ? new cz(`[${e}] ${t}`) : e; console.warn(n); } } const m8e = "utils/dom/style", pz = (e = "") => e.split(" ").filter((t) => !!t.trim()), eF = (e, t) => { if (!e || !t) return !1; if (t.includes(" ")) throw new Error("className should not contain space."); return e.classList.contains(t); }, $5 = (e, t) => { !e || !t.trim() || e.classList.add(...pz(t)); }, U0 = (e, t) => { !e || !t.trim() || e.classList.remove(...pz(t)); }, Wp = (e, t) => { var n; if (!ar || !e || !t) return ""; let r = f3e(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function Df(e, t = "px") { if (!e) return ""; if (Dn(e) || v8e(e)) return `${e}${t}`; if (co(e)) return e; xr(m8e, "binding value must be a string or number"); } let m1; const y8e = (e) => { var t; if (!ar) return 0; if (m1 !== void 0) return m1; 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 a = document.createElement("div"); a.style.width = "100%", n.appendChild(a); const o = a.offsetWidth; return (t = n.parentNode) == null || t.removeChild(n), m1 = r - o, m1; }; function fz(e, t) { if (!ar) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var b8e = /* @__PURE__ */ G({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), NS = b8e, w8e = /* @__PURE__ */ G({ name: "ArrowLeft", __name: "arrow-left", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), MS = w8e, x8e = /* @__PURE__ */ G({ name: "ArrowRight", __name: "arrow-right", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), kw = x8e, k8e = /* @__PURE__ */ G({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), C8e = k8e, S8e = /* @__PURE__ */ G({ name: "Check", __name: "check", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), hz = S8e, E8e = /* @__PURE__ */ G({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), _8e = E8e, T8e = /* @__PURE__ */ G({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), Cw = T8e, $8e = /* @__PURE__ */ G({ name: "Close", __name: "close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), O5 = $8e, O8e = /* @__PURE__ */ G({ name: "DArrowLeft", __name: "d-arrow-left", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), F8e = O8e, A8e = /* @__PURE__ */ G({ name: "DArrowRight", __name: "d-arrow-right", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), I8e = A8e, P8e = /* @__PURE__ */ G({ name: "Delete", __name: "delete", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), tF = P8e, L8e = /* @__PURE__ */ G({ name: "Hide", __name: "hide", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), N8e = L8e, M8e = /* @__PURE__ */ G({ name: "Loading", __name: "loading", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), Sw = M8e, D8e = /* @__PURE__ */ G({ name: "Location", __name: "location", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), B8e = D8e, R8e = /* @__PURE__ */ G({ name: "MoreFilled", __name: "more-filled", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), nF = R8e, z8e = /* @__PURE__ */ G({ name: "Notebook", __name: "notebook", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("path", { fill: "currentColor", d: "M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32" }), K("path", { fill: "currentColor", d: "M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32" }) ])); } }), V8e = z8e, j8e = /* @__PURE__ */ G({ name: "View", __name: "view", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), vz = j8e, H8e = /* @__PURE__ */ G({ name: "WarnTriangleFilled", __name: "warn-triangle-filled", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", "xml:space": "preserve", style: { "enable-background": "new 0 0 1024 1024" }, viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), U8e = H8e, q8e = /* @__PURE__ */ G({ name: "Warning", __name: "warning", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), gz = q8e; const mz = "__epPropKey", mt = (e) => e, W8e = (e) => Gr(e) && !!e[mz], Ew = (e, t) => { if (!Gr(e) || W8e(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), kO(e, "default") && c.push(a), 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(", "); kg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [mz]: !0 }; return kO(e, "default") && (s.default = a), s; }, Vt = (e) => Tb(Object.entries(e).map(([t, n]) => [ t, Ew(n, t) ])), li = mt([ String, Object, Function ]), yz = { validating: Sw, success: _8e, error: Cw }, Tr = (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; }, K8e = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Xi = (e) => (e.install = ml, e), Ar = { 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" }, dr = "update:modelValue", $d = "change", _w = ["", "default", "small", "large"]; var Cy = /* @__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))(Cy || {}); const rF = (e) => [...new Set(e)], aF = (e) => !e && e !== 0 ? [] : Array.isArray(e) ? e : [e], G8e = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), xu = (e) => e, X8e = ["class", "style"], Y8e = /^on[A-Z]/, Z8e = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = O(() => ((n == null ? void 0 : n.value) || []).concat(X8e)), a = tt(); return a ? O(() => { var o; return Tb(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && Y8e.test(i)))); }) : (xr("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), O(() => ({}))); }, od = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && xr(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var Q8e = { 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 J8e = (e) => (t, n) => e6e(t, n, b(e)), e6e = (e, t, n) => ul(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), t6e = (e) => { const t = O(() => b(e).name), n = Kn(e) ? e : U(e); return { lang: t, locale: n, t: J8e(e) }; }, bz = Symbol("localeContextKey"), vi = (e) => { const t = e || $e(bz, U()); return t6e(O(() => t.value || Q8e)); }, t0 = "el", n6e = "is-", Oc = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, wz = Symbol("namespaceContextKey"), DS = (e) => { const t = e || (tt() ? $e(wz, U(t0)) : U(t0)); return O(() => b(t) || t0); }, Nt = (e, t) => { const n = DS(t); return { namespace: n, b: (r = "") => Oc(n.value, e, r, "", ""), e: (r) => r ? Oc(n.value, e, "", r, "") : "", m: (r) => r ? Oc(n.value, e, "", "", r) : "", be: (r, a) => r && a ? Oc(n.value, e, r, a, "") : "", em: (r, a) => r && a ? Oc(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? Oc(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? Oc(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${n6e}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, r6e = (e, t = {}) => { Kn(e) || dz("[useLockscreen]", "You need to pass a ref param to this function"); const n = t.ns || Nt("popup"), r = O(() => n.bm("parent", "hidden")); if (!ar || eF(document.body, r.value)) return; let a = 0, o = !1, i = "0"; const s = () => { setTimeout(() => { U0(document == null ? void 0 : document.body, r.value), o && document && (document.body.style.width = i); }, 200); }; be(e, (l) => { if (!l) { s(); return; } o = !eF(document.body, r.value), o && (i = document.body.style.width), a = y8e(n.namespace.value); const u = document.documentElement.clientHeight < document.body.scrollHeight, c = Wp(document.body, "overflowY"); a > 0 && (u || c === "scroll") && o && (document.body.style.width = `calc(100% - ${a}px)`), $5(document.body, r.value); }), lh(() => s()); }, a6e = Ew({ type: mt(Boolean), default: null }), o6e = Ew({ type: mt(Function) }), i6e = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: a6e, [n]: o6e }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = O(() => Mr(h[n])), v = O(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Mr(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Mr(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Mr(l) && !l()) return; const S = p.value && ar; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !ar) return; const S = p.value && ar; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { $s(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, xz = (e) => { const t = tt(); return O(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var po = "top", ui = "bottom", ci = "right", fo = "left", BS = "auto", am = [po, ui, ci, fo], Bf = "start", q0 = "end", s6e = "clippingParents", kz = "viewport", fv = "popper", l6e = "reference", oF = am.reduce(function(e, t) { return e.concat([t + "-" + Bf, t + "-" + q0]); }, []), om = [].concat(am, [BS]).reduce(function(e, t) { return e.concat([t, t + "-" + Bf, t + "-" + q0]); }, []), u6e = "beforeRead", c6e = "read", d6e = "afterRead", p6e = "beforeMain", f6e = "main", h6e = "afterMain", v6e = "beforeWrite", g6e = "write", m6e = "afterWrite", y6e = [u6e, c6e, d6e, p6e, f6e, h6e, v6e, g6e, m6e]; function Os(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Yi(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Rf(e) { var t = Yi(e).Element; return e instanceof t || e instanceof Element; } function Qo(e) { var t = Yi(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function RS(e) { if (typeof ShadowRoot > "u") return !1; var t = Yi(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function b6e(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Qo(o) || !Os(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function w6e(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 a = t.elements[r], o = 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; }, {}); !Qo(a) || !Os(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var Cz = { name: "applyStyles", enabled: !0, phase: "write", fn: b6e, effect: w6e, requires: ["computeStyles"] }; function ys(e) { return e.split("-")[0]; } var id = Math.max, $b = Math.min, zf = Math.round; function Vf(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (Qo(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = zf(n.width) / i || 1), o > 0 && (a = zf(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function zS(e) { var t = Vf(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 Sz(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && RS(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Cl(e) { return Yi(e).getComputedStyle(e); } function x6e(e) { return ["table", "td", "th"].indexOf(Os(e)) >= 0; } function dc(e) { return ((Rf(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function Tw(e) { return Os(e) === "html" ? e : e.assignedSlot || e.parentNode || (RS(e) ? e.host : null) || dc(e); } function iF(e) { return !Qo(e) || Cl(e).position === "fixed" ? null : e.offsetParent; } function k6e(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Qo(e)) { var r = Cl(e); if (r.position === "fixed") return null; } var a = Tw(e); for (RS(a) && (a = a.host); Qo(a) && ["html", "body"].indexOf(Os(a)) < 0; ) { var o = Cl(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function im(e) { for (var t = Yi(e), n = iF(e); n && x6e(n) && Cl(n).position === "static"; ) n = iF(n); return n && (Os(n) === "html" || Os(n) === "body" && Cl(n).position === "static") ? t : n || k6e(e) || t; } function VS(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function n0(e, t, n) { return id(e, $b(t, n)); } function C6e(e, t, n) { var r = n0(e, t, n); return r > n ? n : r; } function Ez() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function _z(e) { return Object.assign({}, Ez(), e); } function Tz(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var S6e = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, _z(typeof e != "number" ? e : Tz(e, am)); }; function E6e(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = ys(n.placement), l = VS(s), u = [fo, ci].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = S6e(a.padding, n), f = zS(o), h = l === "y" ? po : fo, p = l === "y" ? ui : ci, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = im(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = n0(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function _6e(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !Sz(t.elements.popper, a) || (t.elements.arrow = a)); } var T6e = { name: "arrow", enabled: !0, phase: "main", fn: E6e, effect: _6e, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function jf(e) { return e.split("-")[1]; } var $6e = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function O6e(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: zf(t * a) / a || 0, y: zf(n * a) / a || 0 }; } function sF(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = 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"), y = i.hasOwnProperty("y"), x = fo, w = po, k = window; if (u) { var C = im(n), S = "clientHeight", _ = "clientWidth"; if (C === Yi(n) && (C = dc(n), Cl(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === po || (a === fo || a === ci) && o === q0) { w = ui; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === fo || (a === po || a === ui) && o === q0) { x = ci; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && $6e), I = c === !0 ? O6e({ x: h, y: v }) : { x: h, y: v }; if (h = I.x, v = I.y, l) { var N; return Object.assign({}, A, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, A, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function F6e(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: ys(t.placement), variation: jf(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, sF(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, sF(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 $z = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: F6e, data: {} }, y1 = { passive: !0 }; function A6e(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Yi(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, y1); }), s && l.addEventListener("resize", n.update, y1), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, y1); }), s && l.removeEventListener("resize", n.update, y1); }; } var Oz = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: A6e, data: {} }, I6e = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Sy(e) { return e.replace(/left|right|bottom|top/g, function(t) { return I6e[t]; }); } var P6e = { start: "end", end: "start" }; function lF(e) { return e.replace(/start|end/g, function(t) { return P6e[t]; }); } function jS(e) { var t = Yi(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function HS(e) { return Vf(dc(e)).left + jS(e).scrollLeft; } function L6e(e) { var t = Yi(e), n = dc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + HS(e), y: s }; } function N6e(e) { var t, n = dc(e), r = jS(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = id(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = id(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + HS(e), l = -r.scrollTop; return Cl(a || n).direction === "rtl" && (s += id(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function US(e) { var t = Cl(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function Fz(e) { return ["html", "body", "#document"].indexOf(Os(e)) >= 0 ? e.ownerDocument.body : Qo(e) && US(e) ? e : Fz(Tw(e)); } function r0(e, t) { var n; t === void 0 && (t = []); var r = Fz(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Yi(r), i = a ? [o].concat(o.visualViewport || [], US(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(r0(Tw(i))); } function F5(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function M6e(e) { var t = Vf(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 uF(e, t) { return t === kz ? F5(L6e(e)) : Rf(t) ? M6e(t) : F5(N6e(dc(e))); } function D6e(e) { var t = r0(Tw(e)), n = ["absolute", "fixed"].indexOf(Cl(e).position) >= 0, r = n && Qo(e) ? im(e) : e; return Rf(r) ? t.filter(function(a) { return Rf(a) && Sz(a, r) && Os(a) !== "body"; }) : []; } function B6e(e, t, n) { var r = t === "clippingParents" ? D6e(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = uF(e, l); return s.top = id(u.top, s.top), s.right = $b(u.right, s.right), s.bottom = $b(u.bottom, s.bottom), s.left = id(u.left, s.left), s; }, uF(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function Az(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? ys(r) : null, o = r ? jf(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case po: l = { x: i, y: t.y - n.height }; break; case ui: l = { x: i, y: t.y + t.height }; break; case ci: l = { x: t.x + t.width, y: s }; break; case fo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? VS(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case Bf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case q0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function W0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? s6e : o, s = n.rootBoundary, l = s === void 0 ? kz : s, u = n.elementContext, c = u === void 0 ? fv : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = _z(typeof p != "number" ? p : Tz(p, am)), m = c === fv ? l6e : fv, g = e.rects.popper, y = e.elements[f ? m : c], x = B6e(Rf(y) ? y : y.contextElement || dc(e.elements.popper), i, l), w = Vf(e.elements.reference), k = Az({ reference: w, element: g, strategy: "absolute", placement: a }), C = F5(Object.assign({}, g, k)), S = c === fv ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === fv && T) { var F = T[a]; Object.keys(_).forEach(function(A) { var I = [ci, ui].indexOf(A) >= 0 ? 1 : -1, N = [po, ui].indexOf(A) >= 0 ? "y" : "x"; _[A] += F[N] * I; }); } return _; } function R6e(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? om : l, c = jf(r), d = c ? s ? oF : oF.filter(function(p) { return jf(p) === c; }) : am, 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] = W0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[ys(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function z6e(e) { if (ys(e) === BS) return []; var t = Sy(e); return [lF(e), t, lF(t)]; } function V6e(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = ys(m), y = g === m, x = l || (y || !p ? [Sy(m)] : z6e(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(ys(ge) === BS ? R6e(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], F = 0; F < w.length; F++) { var A = w[F], I = ys(A), N = jf(A) === Bf, L = [po, ui].indexOf(I) >= 0, z = L ? "width" : "height", P = W0(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), D = L ? N ? ci : fo : N ? ui : po; k[z] > C[z] && (D = Sy(D)); var M = Sy(D), V = []; if (o && V.push(P[I] <= 0), s && V.push(P[D] <= 0, P[M] <= 0), V.every(function(ve) { return ve; })) { T = A, _ = !1; break; } S.set(A, V); } if (_) for (var Q = p ? 3 : 1, X = function(ve) { var ge = w.find(function(se) { var ne = S.get(se); if (ne) return ne.slice(0, ve).every(function(W) { return W; }); }); if (ge) return T = ge, "break"; }, ee = Q; ee > 0; ee--) { var ue = X(ee); if (ue === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var j6e = { name: "flip", enabled: !0, phase: "main", fn: V6e, requiresIfExists: ["offset"], data: { _skip: !1 } }; function cF(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 dF(e) { return [po, ci, ui, fo].some(function(t) { return e[t] >= 0; }); } function H6e(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = W0(t, { elementContext: "reference" }), s = W0(t, { altBoundary: !0 }), l = cF(i, r), u = cF(s, a, o), c = dF(l), d = dF(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 U6e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: H6e }; function q6e(e, t, n) { var r = ys(e), a = [fo, po].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [fo, ci].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function W6e(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = om.reduce(function(c, d) { return c[d] = q6e(d, t.rects, o), 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 K6e = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: W6e }; function G6e(e) { var t = e.state, n = e.name; t.modifiersData[n] = Az({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var Iz = { name: "popperOffsets", enabled: !0, phase: "read", fn: G6e, data: {} }; function X6e(e) { return e === "x" ? "y" : "x"; } function Y6e(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = W0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = ys(t.placement), y = jf(t.placement), x = !y, w = VS(g), k = X6e(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, I = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? po : fo, z = w === "y" ? ui : ci, P = w === "y" ? "height" : "width", D = C[w], M = D + m[L], V = D - m[z], Q = h ? -_[P] / 2 : 0, X = y === Bf ? S[P] : _[P], ee = y === Bf ? -_[P] : -S[P], ue = t.elements.arrow, ve = h && ue ? zS(ue) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Ez(), se = ge[L], ne = ge[z], W = n0(0, S[P], ve[P]), Y = x ? S[P] / 2 - Q - W - se - F.mainAxis : X - W - se - F.mainAxis, re = x ? -S[P] / 2 + Q + W + ne + F.mainAxis : ee + W + ne + F.mainAxis, we = t.elements.arrow && im(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = A == null ? void 0 : A[w]) != null ? N : 0, xe = D + Y - Ne - Oe, Fe = D + re - Ne, Se = n0(h ? $b(M, xe) : M, D, h ? id(V, Fe) : V); C[w] = Se, I[w] = Se - D; } if (s) { var Pe, Me = w === "x" ? po : fo, He = w === "x" ? ui : ci, De = C[k], Xe = k === "y" ? "height" : "width", Ge = De + m[Me], Ze = De - m[He], E = [po, fo].indexOf(g) !== -1, j = (Pe = A == null ? void 0 : A[k]) != null ? Pe : 0, le = E ? Ge : De - S[Xe] - _[Xe] - j + F.altAxis, ce = E ? De + S[Xe] + _[Xe] - j - F.altAxis : Ze, oe = h && E ? C6e(le, De, ce) : n0(h ? le : Ge, De, h ? ce : Ze); C[k] = oe, I[k] = oe - De; } t.modifiersData[r] = I; } } var Z6e = { name: "preventOverflow", enabled: !0, phase: "main", fn: Y6e, requiresIfExists: ["offset"] }; function Q6e(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function J6e(e) { return e === Yi(e) || !Qo(e) ? jS(e) : Q6e(e); } function eTe(e) { var t = e.getBoundingClientRect(), n = zf(t.width) / e.offsetWidth || 1, r = zf(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function tTe(e, t, n) { n === void 0 && (n = !1); var r = Qo(t), a = Qo(t) && eTe(t), o = dc(t), i = Vf(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Os(t) !== "body" || US(o)) && (s = J6e(t)), Qo(t) ? (l = Vf(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = HS(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function nTe(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function rTe(e) { var t = nTe(e); return y6e.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function aTe(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function oTe(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var pF = { placement: "bottom", modifiers: [], strategy: "absolute" }; function fF() { 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 qS(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? pF : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, pF, o), 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({}, o, u.options, m), u.scrollParents = { reference: Rf(i) ? r0(i) : i.contextElement ? r0(i.contextElement) : [], popper: r0(s) }; var g = rTe(oTe([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (fF(m, g)) { u.rects = { reference: tTe(m, im(g), u.options.strategy === "fixed"), popper: zS(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: aTe(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!fF(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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } qS(); var iTe = [Oz, Iz, $z, Cz]; qS({ defaultModifiers: iTe }); var sTe = [Oz, Iz, $z, Cz, K6e, j6e, Z6e, T6e, U6e], lTe = qS({ defaultModifiers: sTe }); const uTe = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = cTe(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = O(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = un(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = lTe(l, u, b(a))); }), Ct(() => { s(); }), { state: O(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: O(() => b(i).styles), attributes: O(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: O(() => b(o)) }; }; function cTe(e) { const t = Object.keys(e.elements), n = Tb(t.map((a) => [a, e.styles[a] || {}])), r = Tb(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } const dTe = (e) => { if (!e) return { onClick: ml, onMousedown: ml, onMouseup: ml }; 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 hF() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return em(() => n()), { registerTimeout: t, cancelTimeout: n }; } const A5 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, pTe = Symbol("elIdInjection"), Pz = () => tt() ? $e(pTe, A5) : A5, Yu = (e) => { const t = Pz(); !ar && t === A5 && 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 = DS(); return O(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Kp = []; const vF = (e) => { const t = e; t.key === Ar.esc && Kp.forEach((n) => n(t)); }, fTe = (e) => { nt(() => { Kp.length === 0 && document.addEventListener("keydown", vF), ar && Kp.push(e); }), Ct(() => { Kp = Kp.filter((t) => t !== e), Kp.length === 0 && ar && document.removeEventListener("keydown", vF); }); }; let gF; const Lz = () => { const e = DS(), t = Pz(), n = O(() => `${e.value}-popper-container-${t.prefix}`), r = O(() => `#${n.value}`); return { id: n, selector: r }; }, hTe = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, vTe = () => { const { id: e, selector: t } = Lz(); return Cg(() => { ar && (process.env.NODE_ENV === "test" || !gF || !document.body.querySelector(t.value)) && (gF = hTe(e.value)); }), { id: e, selector: t }; }, gTe = Vt({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), mTe = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = hF(), { registerTimeout: i, cancelTimeout: s } = hF(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); Dn(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, Nz = Symbol("elForwardRef"), yTe = (e) => { rt(Nz, { setForwardRef: (t) => { e.value = t; } }); }, bTe = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), mF = { current: 0 }, yF = U(0), Mz = 2e3, bF = Symbol("elZIndexContextKey"), Dz = Symbol("zIndexContextKey"), WS = (e) => { const t = tt() ? $e(bF, mF) : mF, n = e || (tt() ? $e(Dz, void 0) : void 0), r = O(() => { const i = b(n); return Dn(i) ? i : Mz; }), a = O(() => r.value + yF.value), o = () => (t.current++, yF.value = t.current, a.value); return !ar && !$e(bF) && 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: a, nextZIndex: o }; }; function wTe(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Bl = Ew({ type: String, values: _w, required: !1 }), Bz = Symbol("size"), Rz = () => { const e = $e(Bz, {}); return O(() => b(e.size) || ""); }; function zz(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = un(), l = U(!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), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Mi(s, "focus", u, !0), Mi(s, "blur", c, !0), Mi(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = ad(e.value) ? e.value : document.querySelector("input,textarea"); f && (Mi(f, "focus", u, !0), Mi(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function KS({ afterComposition: e, emit: t }) { const n = U(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, a = (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 = !G8e(u); }, o = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, We(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? o(i) : a(i); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const Vz = Symbol("emptyValuesContextKey"), xTe = "use-empty-values", kTe = ["", void 0, null], CTe = void 0, jz = Vt({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Mr(e) ? !e() : !e } }), Hz = (e, t) => { const n = tt() ? $e(Vz, U({})) : U({}), r = O(() => e.emptyValues || n.value.emptyValues || kTe), a = 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 : CTe), o = (i) => r.value.includes(i); return r.value.includes(a.value) || xr(xTe, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, STe = Vt({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), pc = (e) => uz(STe, e), Uz = Symbol(), Ob = U(); function $w(e, t = void 0) { const n = tt() ? $e(Uz, Ob) : Ob; return e ? O(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function ETe(e, t) { const n = $w(), r = Nt(e, O(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || t0; })), a = vi(O(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = WS(O(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || Mz; })), i = O(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return _Te(O(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const _Te = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? $w() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { xr("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = O(() => { const l = b(e); return o != null && o.value ? TTe(o.value, l) : l; }); return i(Uz, s), i(bz, O(() => s.value.locale)), i(wz, O(() => s.value.namespace)), i(Dz, O(() => s.value.zIndex)), i(Bz, { size: O(() => s.value.size || "") }), i(Vz, O(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Ob.value) && (Ob.value = s.value), s; }, TTe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...JO(e), ...JO(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var Mt = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const $Te = Vt({ size: { type: mt([Number, String]) }, color: { type: String } }), OTe = G({ name: "ElIcon", inheritAttrs: !1 }), FTe = /* @__PURE__ */ G({ ...OTe, props: $Te, setup(e) { const t = e, n = Nt("icon"), r = O(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: fl(a) ? void 0 : Df(a), "--color": o }; }); return (a, o) => ($(), B("i", Dt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var ATe = /* @__PURE__ */ Mt(FTe, [["__file", "icon.vue"]]); const tr = Tr(ATe), GS = Symbol("formContextKey"), Fb = Symbol("formItemContextKey"), Zu = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : xz("size"), a = t.global ? n : Rz(), o = t.form ? { size: void 0 } : $e(GS, void 0), i = t.formItem ? { size: void 0 } : $e(Fb, void 0); return O(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, sm = (e) => { const t = xz("disabled"), n = $e(GS, void 0); return O(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, fc = () => { const e = $e(GS, void 0), t = $e(Fb, void 0); return { form: e, formItem: t }; }, lm = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = O(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([Pt(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : Yu().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), d2(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let bi; const ITe = ` height:0 !important; visibility:hidden !important; ${s3e() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, PTe = [ "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 LTe(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: PTe.map((o) => `${o}:${t.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function wF(e, t = 1, n) { var r; bi || (bi = document.createElement("textarea"), document.body.appendChild(bi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = LTe(e); bi.setAttribute("style", `${s};${ITe}`), bi.value = e.value || e.placeholder || ""; let l = bi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), bi.value = ""; const c = bi.scrollHeight - a; if (Dn(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (Dn(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = bi.parentNode) == null || r.removeChild(bi), bi = void 0, u; } const NTe = Vt({ id: { type: String, default: void 0 }, size: Bl, disabled: Boolean, modelValue: { type: mt([ 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: mt([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: li }, prefixIcon: { type: li }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: mt([Object, Array, String]), default: () => xu({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...pc(["ariaLabel"]) }), MTe = { [dr]: (e) => co(e), input: (e) => co(e), change: (e) => co(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 }, DTe = G({ name: "ElInput", inheritAttrs: !1 }), BTe = /* @__PURE__ */ G({ ...DTe, props: NTe, emits: MTe, setup(e, { expose: t, emit: n }) { const r = e, a = uh(), o = _r(), i = O(() => { const E = {}; return r.containerRole === "combobox" && (E["aria-haspopup"] = a["aria-haspopup"], E["aria-owns"] = a["aria-owns"], E["aria-expanded"] = a["aria-expanded"]), E; }), s = O(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", ue.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: V.value && Q.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = O(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = Z8e({ excludeKeys: O(() => Object.keys(i.value)) }), { form: c, formItem: d } = fc(), { inputId: f } = lm(r, { formItemContext: d }), h = Zu(), p = sm(), v = Nt("input"), m = Nt("textarea"), g = un(), y = un(), x = U(!1), w = U(!1), k = U(), C = un(r.inputStyle), S = O(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: F, handleBlur: A } = zz(S, { beforeFocus() { return p.value; }, afterBlur() { var E; r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "blur").catch((j) => xr(j))); } }), I = O(() => { var E; return (E = c == null ? void 0 : c.statusIcon) != null ? E : !1; }), N = O(() => (d == null ? void 0 : d.validateState) || ""), L = O(() => N.value && yz[N.value]), z = O(() => w.value ? vz : N8e), P = O(() => [ a.style ]), D = O(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = O(() => rm(r.modelValue) ? "" : String(r.modelValue)), V = O(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Q = O(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), X = O(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ee = O(() => M.value.length), ue = O(() => !!X.value && ee.value > Number(r.maxlength)), ve = O(() => !!o.suffix || !!r.suffixIcon || V.value || r.showPassword || X.value || !!N.value && I.value), [ge, se] = wTe(g); us(y, (E) => { if (W(), !X.value || r.resize !== "both") return; const j = E[0], { width: le } = j.contentRect; k.value = { right: `calc(100% - ${le + 15 + 6}px)` }; }); const ne = () => { const { type: E, autosize: j } = r; if (!(!ar || E !== "textarea" || !y.value)) if (j) { const le = Gr(j) ? j.minRows : void 0, ce = Gr(j) ? j.maxRows : void 0, oe = wF(y.value, le, ce); C.value = { overflowY: "hidden", ...oe }, We(() => { y.value.offsetHeight, C.value = oe; }); } else C.value = { minHeight: wF(y.value).minHeight }; }, W = /* @__PURE__ */ ((E) => { let j = !1; return () => { var le; j || !r.autosize || ((le = y.value) == null ? void 0 : le.offsetParent) === null || (E(), j = !0); }; })(ne), Y = () => { const E = S.value, j = r.formatter ? r.formatter(M.value) : M.value; !E || E.value === j || (E.value = j); }, re = async (E) => { ge(); let { value: j } = E.target; if (r.formatter && (j = r.parser ? r.parser(j) : j), !Oe.value) { if (j === M.value) { Y(); return; } n(dr, j), n("input", j), await We(), Y(), se(); } }, we = (E) => { n("change", E.target.value); }, { isComposing: Oe, handleCompositionStart: Ne, handleCompositionUpdate: xe, handleCompositionEnd: Fe } = KS({ emit: n, afterComposition: re }), Se = () => { w.value = !w.value, Pe(); }, Pe = async () => { var E; await We(), (E = S.value) == null || E.focus(); }, Me = () => { var E; return (E = S.value) == null ? void 0 : E.blur(); }, He = (E) => { x.value = !1, n("mouseleave", E); }, De = (E) => { x.value = !0, n("mouseenter", E); }, Xe = (E) => { n("keydown", E); }, Ge = () => { var E; (E = S.value) == null || E.select(); }, Ze = () => { n(dr, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var E; We(() => ne()), r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "change").catch((j) => xr(j))); }), be(M, () => Y()), be(() => r.type, async () => { await We(), Y(), ne(); }), nt(() => { !r.formatter && r.parser && xr("ElInput", "If you set the parser, you also need to set the formatter."), Y(), We(ne); }), t({ input: g, textarea: y, ref: S, textareaStyle: D, autosize: Pt(r, "autosize"), isComposing: Oe, focus: Pe, blur: Me, select: Ge, clear: Ze, resizeTextarea: ne }), (E, j) => ($(), B("div", Dt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: E.$slots.append, [b(v).bm("group", "prepend")]: E.$slots.prepend } ], style: b(P), role: E.containerRole, onMouseenter: De, onMouseleave: He }), [ te(" input "), E.type !== "textarea" ? ($(), B(Ue, { key: 0 }, [ te(" prepend slot "), E.$slots.prepend ? ($(), B("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(E.$slots, "prepend") ], 2)) : te("v-if", !0), K("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ te(" prefix slot "), E.$slots.prefix || E.prefixIcon ? ($(), B("span", { key: 0, class: H(b(v).e("prefix")) }, [ K("span", { class: H(b(v).e("prefix-inner")) }, [ he(E.$slots, "prefix"), E.prefixIcon ? ($(), ae(b(tr), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(E.prefixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0), K("input", Dt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: E.minlength, maxlength: E.maxlength, type: E.showPassword ? w.value ? "text" : "password" : E.type, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, tabindex: E.tabindex, "aria-label": E.ariaLabel, placeholder: E.placeholder, style: E.inputStyle, form: E.form, autofocus: E.autofocus, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b(Fe), onInput: re, onChange: we, onKeydown: Xe }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), te(" suffix slot "), b(ve) ? ($(), B("span", { key: 1, class: H(b(v).e("suffix")) }, [ K("span", { class: H(b(v).e("suffix-inner")) }, [ !b(V) || !b(Q) || !b(X) ? ($(), B(Ue, { key: 0 }, [ he(E.$slots, "suffix"), E.suffixIcon ? ($(), ae(b(tr), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(E.suffixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 64)) : te("v-if", !0), b(V) ? ($(), ae(b(tr), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: et(b(ml), ["prevent"]), onClick: Ze }, { default: q(() => [ Z(b(Cw)) ]), _: 1 }, 8, ["class", "onMousedown"])) : te("v-if", !0), b(Q) ? ($(), ae(b(tr), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Se }, { default: q(() => [ ($(), ae(dt(b(z)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), b(X) ? ($(), B("span", { key: 3, class: H(b(v).e("count")) }, [ K("span", { class: H(b(v).e("count-inner")) }, _e(b(ee)) + " / " + _e(E.maxlength), 3) ], 2)) : te("v-if", !0), b(N) && b(L) && b(I) ? ($(), ae(b(tr), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: q(() => [ ($(), ae(dt(b(L)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0) ], 2), te(" append slot "), E.$slots.append ? ($(), B("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(E.$slots, "append") ], 2)) : te("v-if", !0) ], 64)) : ($(), B(Ue, { key: 1 }, [ te(" textarea "), K("textarea", Dt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: E.minlength, maxlength: E.maxlength, tabindex: E.tabindex, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, style: b(D), "aria-label": E.ariaLabel, placeholder: E.placeholder, form: E.form, autofocus: E.autofocus, rows: E.rows, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b(Fe), onInput: re, onFocus: b(F), onBlur: b(A), onChange: we, onKeydown: Xe }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(X) ? ($(), B("span", { key: 0, style: Qe(k.value), class: H(b(v).e("count")) }, _e(b(ee)) + " / " + _e(E.maxlength), 7)) : te("v-if", !0) ], 64)) ], 16, ["role"])); } }); var RTe = /* @__PURE__ */ Mt(BTe, [["__file", "input.vue"]]); const Ow = Tr(RTe), Ap = 4, zTe = { 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" } }, VTe = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), XS = Symbol("scrollbarContextKey"), jTe = Vt({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), HTe = "Thumb", UTe = /* @__PURE__ */ G({ __name: "thumb", props: jTe, setup(e) { const t = e, n = $e(XS), r = Nt("scrollbar"); n || dz(HTe, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = ar ? document.onselectstart : null; const d = O(() => zTe[t.vertical ? "vertical" : "horizontal"]), f = O(() => VTe({ size: t.size, move: t.move, bar: d.value })), h = O(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.removeAllRanges(), m(C); const _ = C.currentTarget; _ && (i.value[d.value.axis] = _[d.value.offset] - (C[d.value.client] - _.getBoundingClientRect()[d.value.direction])); }, v = (C) => { if (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, F = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; Ct(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Mi(Pt(n, "scrollbarElement"), "mousemove", x), Mi(Pt(n, "scrollbarElement"), "mouseleave", w), (C, S) => ($(), ae(lr, { name: b(r).b("fade"), persisted: "" }, { default: q(() => [ qe(K("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ K("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Qe(b(f)), onMousedown: p }, null, 38) ], 34), [ [ct, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var xF = /* @__PURE__ */ Mt(UTe, [["__file", "thumb.vue"]]); const qTe = Vt({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), WTe = /* @__PURE__ */ G({ __name: "bar", props: qTe, setup(e, { expose: t }) { const n = e, r = $e(XS), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - Ap, f = c.offsetWidth - Ap; o.value = c.scrollTop * 100 / d * l.value, a.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - Ap, f = c.offsetWidth - Ap, 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 + Ap < d ? `${v}px` : "", i.value = m + Ap < f ? `${m}px` : ""; } }), (c, d) => ($(), B(Ue, null, [ Z(xF, { move: a.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), Z(xF, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var KTe = /* @__PURE__ */ Mt(WTe, [["__file", "bar.vue"]]); const GTe = Vt({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: mt([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, ...pc(["ariaLabel", "ariaOrientation"]) }), XTe = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(Dn) }, I5 = "ElScrollbar", YTe = G({ name: I5 }), ZTe = /* @__PURE__ */ G({ ...YTe, props: GTe, emits: XTe, setup(e, { expose: t, emit: n }) { const r = e, a = Nt("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = O(() => { const k = {}; return r.height && (k.height = Df(r.height)), r.maxHeight && (k.maxHeight = Df(r.maxHeight)), [r.wrapStyle, k]; }), p = O(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = O(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.value) == null || k.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(k, C) { Gr(k) ? c.value.scrollTo(k) : Dn(k) && Dn(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!Dn(k)) { xr(I5, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!Dn(k)) { xr(I5, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = us(d, w), i = Mi("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || We(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(XS, en({ scrollbarElement: u, wrapElement: c })), p2(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || We(() => { w(); }); }), qd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => ($(), B("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ K("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Qe(b(h)), tabindex: k.tabindex, onScroll: m }, [ ($(), ae(dt(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Qe(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: q(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? te("v-if", !0) : ($(), ae(KTe, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var QTe = /* @__PURE__ */ Mt(ZTe, [["__file", "scrollbar.vue"]]); const YS = Tr(QTe), ZS = Symbol("popper"), qz = Symbol("popperContent"), JTe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], Wz = Vt({ role: { type: String, values: JTe, default: "tooltip" } }), e$e = G({ name: "ElPopper", inheritAttrs: !1 }), t$e = /* @__PURE__ */ G({ ...e$e, props: Wz, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = O(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(ZS, l), (u, c) => he(u.$slots, "default"); } }); var n$e = /* @__PURE__ */ Mt(t$e, [["__file", "popper.vue"]]); const Kz = Vt({ arrowOffset: { type: Number, default: 5 } }), r$e = G({ name: "ElPopperArrow", inheritAttrs: !1 }), a$e = /* @__PURE__ */ G({ ...r$e, props: Kz, setup(e, { expose: t }) { const n = e, r = Nt("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = $e(qz, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), Ct(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => ($(), B("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Qe(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var o$e = /* @__PURE__ */ Mt(a$e, [["__file", "arrow.vue"]]); const Sk = "ElOnlyChild", i$e = G({ name: Sk, setup(e, { slots: t, attrs: n }) { var r; const a = $e(Nz), o = bTe((r = a == null ? void 0 : a.setForwardRef) != null ? r : ml); 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(Sk, "requires exact only one valid child."), null; const l = Gz(s); return l ? qe(Sg(l, n), [[o]]) : (xr(Sk, "no valid child node found"), null); }; } }); function Gz(e) { if (!e) return null; const t = e; for (const n of t) { if (Gr(n)) switch (n.type) { case Eg: continue; case Ls: case "svg": return kF(n); case Ue: return Gz(n.children); default: return n; } return kF(n); } return null; } function kF(e) { const t = Nt("only-child"); return Z("span", { class: t.e("content") }, [e]); } const Xz = Vt({ 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 }), s$e = G({ name: "ElPopperTrigger", inheritAttrs: !1 }), l$e = /* @__PURE__ */ G({ ...s$e, props: Xz, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = $e(ZS, void 0); yTe(a); const o = O(() => s.value ? n.id : void 0), i = O(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = O(() => { if (r && r.value !== "tooltip") return r.value; }), l = O(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = ps(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, ad(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 = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { rm(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), ad(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Ct(() => { if (u == null || u(), u = void 0, a.value && ad(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? te("v-if", !0) : ($(), ae(b(i$e), Dt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: q(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var u$e = /* @__PURE__ */ Mt(l$e, [["__file", "trigger.vue"]]); const Ek = "focus-trap.focus-after-trapped", _k = "focus-trap.focus-after-released", c$e = "focus-trap.focusout-prevented", CF = { cancelable: !0, bubbles: !1 }, d$e = { cancelable: !0, bubbles: !1 }, SF = "focusAfterTrapped", EF = "focusAfterReleased", p$e = Symbol("elFocusTrap"), QS = U(), Fw = U(0), JS = U(0); let b1 = 0; const Yz = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, _F = (e, t) => { for (const n of e) if (!f$e(n, t)) return n; }, f$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; }, h$e = (e) => { const t = Yz(e), n = _F(t, e), r = _F(t.reverse(), e); return [n, r]; }, v$e = (e) => e instanceof HTMLInputElement && "select" in e, su = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), JS.value = window.performance.now(), e !== n && v$e(e) && t && e.select(); } }; function TF(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const g$e = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = TF(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = TF(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, m$e = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (su(r, t), document.activeElement !== n) return; }, $F = g$e(), y$e = () => Fw.value > JS.value, w1 = () => { QS.value = "pointer", Fw.value = window.performance.now(); }, OF = () => { QS.value = "keyboard", Fw.value = window.performance.now(); }, b$e = () => (nt(() => { b1 === 0 && (document.addEventListener("mousedown", w1), document.addEventListener("touchstart", w1), document.addEventListener("keydown", OF)), b1++; }), Ct(() => { b1--, b1 <= 0 && (document.removeEventListener("mousedown", w1), document.removeEventListener("touchstart", w1), document.removeEventListener("keydown", OF)); }), { focusReason: QS, lastUserFocusTimestamp: Fw, lastAutomatedFocusTimestamp: JS }), x1 = (e) => new CustomEvent(c$e, { ...d$e, detail: e }), w$e = G({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ SF, EF, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = b$e(); fTe((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: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === Ar.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, F] = h$e(_); if (T && F) { if (!w && S === F) { const A = x1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && su(T, !0)); } else if (w && [T, _].includes(S)) { const A = x1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && su(F, !0)); } } else if (S === _) { const A = x1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || p.preventDefault(); } } }; rt(p$e, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([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(SF, p); }, u = (p) => t(EF, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : su(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !rm(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = x1({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || su(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await We(); const p = b(n); if (p) { $F.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(Ek, CF); p.addEventListener(Ek, l), p.dispatchEvent(m), m.defaultPrevented || We(() => { let g = e.focusStartEl; co(g) || (su(g), document.activeElement !== g && (g = "first")), g === "first" && m$e(Yz(p), !0), (document.activeElement === v || g === "container") && su(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(Ek, l); const v = new CustomEvent(_k, { ...CF, detail: { focusReason: o.value } }); p.addEventListener(_k, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !y$e() || p.contains(document.activeElement)) && su(r ?? document.body), p.removeEventListener(_k, u), $F.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), Ct(() => { 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 x$e(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var Zz = /* @__PURE__ */ Mt(w$e, [["render", x$e], ["__file", "focus-trap.vue"]]); const k$e = ["fixed", "absolute"], C$e = Vt({ 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: om, default: "bottom" }, popperOptions: { type: mt(Object), default: () => ({}) }, strategy: { type: String, values: k$e, default: "absolute" } }), Qz = Vt({ ...C$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, ...pc(["ariaLabel"]) }), S$e = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, E$e = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...T$e(e), ...t] }; return $$e(o, a == null ? void 0 : a.modifiers), o; }, _$e = (e) => { if (ar) return ps(e); }; function T$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 $$e(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const O$e = 0, F$e = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = $e(ZS, void 0), o = U(), i = U(), s = O(() => ({ name: "eventListeners", enabled: !!e.visible })), l = O(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : O$e; return { name: "arrow", enabled: !lz(y), options: { element: y, padding: x } }; }), u = O(() => ({ onFirstUpdate: () => { p(); }, ...E$e(e, [ b(l), b(s) ]) })), c = O(() => _$e(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = uTe(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, A$e = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = WS(), o = Nt("popper"), i = O(() => b(t).popper), s = U(Dn(e.zIndex) ? e.zIndex : a()), l = O(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = O(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = O(() => r.value === "dialog" ? "false" : void 0), d = O(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Dn(e.zIndex) ? e.zIndex : a(); } }; }, I$e = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, P$e = G({ name: "ElPopperContent" }), L$e = /* @__PURE__ */ G({ ...P$e, props: Qz, emits: S$e, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = I$e(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = F$e(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = A$e(r, { styles: p, attributes: d, role: m }), _ = $e(Fb, void 0), T = U(); rt(qz, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(Fb, { ..._, addInputId: ml, removeInputId: ml }); let F; const A = (N = !0) => { g(), N && S(); }, I = () => { A(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { F == null || F(), F = void 0; const z = b(N || h.value), P = b(L || h.value); ad(z) && (F = be([m, () => r.ariaLabel, y, () => r.id], (D) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, V) => { rm(D[V]) ? z.removeAttribute(M) : z.setAttribute(M, D[V]); }); }, { immediate: !0 })), P !== z && ad(P) && ["role", "aria-label", "aria-modal", "id"].forEach((D) => { P.removeAttribute(D); }); }, { immediate: !0 }), be(() => r.visible, I, { immediate: !0 }); }), Ct(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (N, L) => ($(), B("div", Dt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (z) => N.$emit("mouseenter", z), onMouseleave: (z) => N.$emit("mouseleave", z) }), [ Z(b(Zz), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: q(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var N$e = /* @__PURE__ */ Mt(L$e, [["__file", "content.vue"]]); const M$e = Tr(n$e), eE = Symbol("elTooltip"), eo = Vt({ ...gTe, ...Qz, 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, ...pc(["ariaLabel"]) }), K0 = Vt({ ...Xz, disabled: Boolean, trigger: { type: mt([String, Array]), default: "hover" }, triggerKeys: { type: mt(Array), default: () => [Ar.enter, Ar.space] } }), { useModelToggleProps: D$e, useModelToggleEmits: B$e, useModelToggle: R$e } = i6e("visible"), z$e = Vt({ ...Wz, ...D$e, ...eo, ...K0, ...Kz, showArrow: { type: Boolean, default: !0 } }), V$e = [ ...B$e, "before-show", "before-hide", "show", "hide", "open", "close" ], j$e = (e, t) => Ka(e) ? e.includes(t) : e === t, Ip = (e, t, n) => (r) => { j$e(b(e), t) && n(r); }, H$e = G({ name: "ElTooltipTrigger" }), U$e = /* @__PURE__ */ G({ ...H$e, props: K0, setup(e, { expose: t }) { const n = e, r = Nt("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = $e(eE, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = Pt(n, "trigger"), h = tl(d, Ip(f, "hover", s)), p = tl(d, Ip(f, "hover", l)), v = tl(d, Ip(f, "click", (w) => { w.button === 0 && u(w); })), m = tl(d, Ip(f, "focus", s)), g = tl(d, Ip(f, "focus", l)), y = tl(d, Ip(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = tl(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => ($(), ae(b(u$e), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: q(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var q$e = /* @__PURE__ */ Mt(U$e, [["__file", "trigger.vue"]]); const W$e = Vt({ to: { type: mt([String, Object]), required: !0 }, disabled: Boolean }), K$e = /* @__PURE__ */ G({ __name: "teleport", props: W$e, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : ($(), ae(_g, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var G$e = /* @__PURE__ */ Mt(K$e, [["__file", "teleport.vue"]]); const Jz = Tr(G$e), X$e = G({ name: "ElTooltipContent", inheritAttrs: !1 }), Y$e = /* @__PURE__ */ G({ ...X$e, props: eo, setup(e, { expose: t }) { const n = e, { selector: r } = Lz(), a = Nt("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = $e(eE, void 0), g = O(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = O(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Ct(() => { i == null || i(); }); const x = O(() => b(y) ? !0 : b(u)), w = O(() => n.disabled ? !1 : b(u)), k = O(() => n.appendTo || r.value), C = O(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, F = tl(T, () => { n.enterable && b(c) === "hover" && f(); }), A = tl(T, () => { b(c) === "hover" && d(); }), I = () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = K5e(O(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, z = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P); }), t({ contentRef: o }), (P, D) => ($(), ae(b(Jz), { disabled: !P.teleported, to: b(k) }, { default: q(() => [ Z(lr, { name: b(g), onAfterLeave: _, onBeforeEnter: I, onAfterEnter: L, onBeforeLeave: N }, { default: q(() => [ b(x) ? qe(($(), ae(b(N$e), Dt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(F), onMouseleave: b(A), onBlur: z, onClose: b(d) }), { default: q(() => [ he(P.$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"])), [ [ct, b(w)] ]) : te("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var Z$e = /* @__PURE__ */ Mt(Y$e, [["__file", "content.vue"]]); const Q$e = G({ name: "ElTooltip" }), J$e = /* @__PURE__ */ G({ ...Q$e, props: z$e, emits: V$e, setup(e, { expose: t, emit: n }) { const r = e; vTe(); const a = Yu(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = R$e({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = mTe({ showAfter: Pt(r, "showAfter"), hideAfter: Pt(r, "hideAfter"), autoClose: Pt(r, "autoClose"), open: c, close: d }), v = O(() => $s(r.visible) && !f.value); rt(eE, { controlled: v, id: a, open: ch(l), trigger: Pt(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return Tg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => ($(), ae(b(M$e), { ref_key: "popperRef", ref: o, role: g.role }, { default: q(() => [ Z(q$e, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: q(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : te("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), Z(Z$e, { 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: q(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? ($(), B("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : ($(), B("span", { key: 1 }, _e(g.content), 1)) ]), g.showArrow ? ($(), ae(b(o$e), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : te("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 eOe = /* @__PURE__ */ Mt(J$e, [["__file", "tooltip.vue"]]); const Ab = Tr(eOe), eV = Symbol("buttonGroupContextKey"), tOe = (e, t) => { od({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, O(() => e.type === "text")); const n = $e(eV, void 0), r = $w("button"), { form: a } = fc(), o = Zu(O(() => n == null ? void 0 : n.size)), i = sm(), s = U(), l = _r(), u = O(() => e.type || (n == null ? void 0 : n.type) || ""), c = O(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = O(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = O(() => { 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) === Ls) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, nOe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], rOe = ["button", "submit", "reset"], P5 = Vt({ size: Bl, disabled: Boolean, type: { type: String, values: nOe, default: "" }, icon: { type: li }, nativeType: { type: String, values: rOe, default: "button" }, loading: Boolean, loadingIcon: { type: li, default: () => Sw }, 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" } }), aOe = { click: (e) => e instanceof MouseEvent }; function pa(e, t) { oOe(e) && (e = "100%"); var n = iOe(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 k1(e) { return Math.min(1, Math.max(0, e)); } function oOe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function iOe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function tV(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function C1(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function qc(e) { return e.length === 1 ? "0" + e : String(e); } function sOe(e, t, n) { return { r: pa(e, 255) * 255, g: pa(t, 255) * 255, b: pa(n, 255) * 255 }; } function FF(e, t, n) { e = pa(e, 255), t = pa(t, 255), n = pa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function Tk(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 lOe(e, t, n) { var r, a, o; if (e = pa(e, 360), t = pa(t, 100), n = pa(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = Tk(s, i, e + 1 / 3), a = Tk(s, i, e), o = Tk(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function AF(e, t, n) { e = pa(e, 255), t = pa(t, 255), n = pa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function uOe(e, t, n) { e = pa(e, 360) * 6, t = pa(t, 100), n = pa(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function IF(e, t, n, r) { var a = [ qc(Math.round(e).toString(16)), qc(Math.round(t).toString(16)), qc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function cOe(e, t, n, r, a) { var o = [ qc(Math.round(e).toString(16)), qc(Math.round(t).toString(16)), qc(Math.round(n).toString(16)), qc(dOe(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function dOe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function PF(e) { return To(e) / 255; } function To(e) { return parseInt(e, 16); } function pOe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var L5 = { 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 fOe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = gOe(e)), typeof e == "object" && (Ks(e.r) && Ks(e.g) && Ks(e.b) ? (t = sOe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Ks(e.h) && Ks(e.s) && Ks(e.v) ? (r = C1(e.s), a = C1(e.v), t = uOe(e.h, r, a), i = !0, s = "hsv") : Ks(e.h) && Ks(e.s) && Ks(e.l) && (r = C1(e.s), o = C1(e.l), t = lOe(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = tV(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 hOe = "[-\\+]?\\d+%?", vOe = "[-\\+]?\\d*\\.\\d+%?", $u = "(?:".concat(vOe, ")|(?:").concat(hOe, ")"), $k = "[\\s|\\(]+(".concat($u, ")[,|\\s]+(").concat($u, ")[,|\\s]+(").concat($u, ")\\s*\\)?"), Ok = "[\\s|\\(]+(".concat($u, ")[,|\\s]+(").concat($u, ")[,|\\s]+(").concat($u, ")[,|\\s]+(").concat($u, ")\\s*\\)?"), Ci = { CSS_UNIT: new RegExp($u), rgb: new RegExp("rgb" + $k), rgba: new RegExp("rgba" + Ok), hsl: new RegExp("hsl" + $k), hsla: new RegExp("hsla" + Ok), hsv: new RegExp("hsv" + $k), hsva: new RegExp("hsva" + Ok), 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 gOe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (L5[e]) e = L5[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Ci.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ci.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ci.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ci.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ci.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ci.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ci.hex8.exec(e), n ? { r: To(n[1]), g: To(n[2]), b: To(n[3]), a: PF(n[4]), format: t ? "name" : "hex8" } : (n = Ci.hex6.exec(e), n ? { r: To(n[1]), g: To(n[2]), b: To(n[3]), format: t ? "name" : "hex" } : (n = Ci.hex4.exec(e), n ? { r: To(n[1] + n[1]), g: To(n[2] + n[2]), b: To(n[3] + n[3]), a: PF(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Ci.hex3.exec(e), n ? { r: To(n[1] + n[1]), g: To(n[2] + n[2]), b: To(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Ks(e) { return !!Ci.CSS_UNIT.exec(String(e)); } var mOe = ( /** @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 = pOe(t)), this.originalInput = t; var a = fOe(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.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, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = tV(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 = AF(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 = AF(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = FF(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 = FF(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), IF(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), cOe(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(pa(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(pa(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 = "#" + IF(this.r, this.g, this.b, !1), n = 0, r = Object.entries(L5); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = k1(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 = k1(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 = k1(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 = k1(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, 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, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Yl(e, t = 20) { return e.mix("#141414", t).toString(); } function yOe(e) { const t = sm(), n = Nt("button"); return O(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new mOe(a), s = e.dark ? i.tint(20).toString() : Yl(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Yl(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Yl(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Yl(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Yl(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Yl(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Yl(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": a, "text-color": u, "border-color": a, "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 ? Yl(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 bOe = G({ name: "ElButton" }), wOe = /* @__PURE__ */ G({ ...bOe, props: P5, emits: aOe, setup(e, { expose: t, emit: n }) { const r = e, a = yOe(r), o = Nt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = tOe(r, n), h = O(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => ($(), ae(dt(p.tag), Dt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: q(() => [ p.loading ? ($(), B(Ue, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : ($(), ae(b(tr), { key: 1, class: H(b(o).is("loading")) }, { default: q(() => [ ($(), ae(dt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? ($(), ae(b(tr), { key: 1 }, { default: q(() => [ p.icon ? ($(), ae(dt(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : te("v-if", !0), p.$slots.default ? ($(), B("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : te("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var xOe = /* @__PURE__ */ Mt(wOe, [["__file", "button.vue"]]); const kOe = { size: P5.size, type: P5.type }, COe = G({ name: "ElButtonGroup" }), SOe = /* @__PURE__ */ G({ ...COe, props: kOe, setup(e) { const t = e; rt(eV, en({ size: Pt(t, "size"), type: Pt(t, "type") })); const n = Nt("button"); return (r, a) => ($(), B("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var nV = /* @__PURE__ */ Mt(SOe, [["__file", "button-group.vue"]]); const Bo = Tr(xOe, { ButtonGroup: nV }); Xi(nV); var EOe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function _Oe(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } const lu = /* @__PURE__ */ new Map(); if (ar) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of lu.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function LF(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : ad(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.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 = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const rV = { beforeMount(e, t) { lu.has(e) || lu.set(e, []), lu.get(e).push({ documentHandler: LF(e, t), bindingFn: t.value }); }, updated(e, t) { lu.has(e) || lu.set(e, []); const n = lu.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: LF(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { lu.delete(e); } }, TOe = Vt({ 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" } }), $Oe = G({ name: "ElCard" }), OOe = /* @__PURE__ */ G({ ...$Oe, props: TOe, setup(e) { const t = Nt("card"); return (n, r) => ($(), B("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? ($(), B("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ ze(_e(n.header), 1) ]) ], 2)) : te("v-if", !0), K("div", { class: H([b(t).e("body"), n.bodyClass]), style: Qe(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? ($(), B("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ ze(_e(n.footer), 1) ]) ], 2)) : te("v-if", !0) ], 2)); } }); var FOe = /* @__PURE__ */ Mt(OOe, [["__file", "card.vue"]]); const aV = Tr(FOe), oV = { 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: Bl, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...pc(["ariaControls"]) }, iV = { [dr]: (e) => co(e) || Dn(e) || $s(e), change: (e) => co(e) || Dn(e) || $s(e) }, Oh = Symbol("checkboxGroupContextKey"), AOe = ({ model: e, isChecked: t }) => { const n = $e(Oh, void 0), r = O(() => { var a, o; const i = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, s = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value; return !fl(i) && e.value.length >= i && !t.value || !fl(s) && e.value.length <= s && t.value; }); return { isDisabled: sm(O(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, IOe = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: a, isLabeledByFormItem: o }) => { const i = $e(Oh, void 0), { formItem: s } = fc(), { emit: l } = tt(); function u(p) { var v, m, g, y; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (y = (g = e.falseValue) != null ? g : e.falseLabel) != null ? y : !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 && !a.value && o.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await We(), c(t.value, p))); } const h = O(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return be(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => xr(p))); }), { handleChange: d, onClickRoot: f }; }, POe = (e) => { const t = U(!1), { emit: n } = tt(), r = $e(Oh, void 0), a = O(() => fl(r) === !1), o = U(!1), i = O({ get() { var s, l; return a.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; a.value && Ka(s) ? (o.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, o.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(dr, s), t.value = s); } }); return { model: i, isGroup: a, isLimitExceeded: o }; }, LOe = (e, t, { model: n }) => { const r = $e(Oh, void 0), a = U(!1), o = O(() => H0(e.value) ? e.label : e.value), i = O(() => { const c = n.value; return $s(c) ? c : Ka(c) ? Gr(o.value) ? c.map(xo).some((d) => ms(d, o.value)) : c.map(xo).includes(o.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = Zu(O(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = Zu(O(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = O(() => !!t.default || !H0(o.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: a, checkboxSize: l, hasOwnLabel: u, actualValue: o }; }, sV = (e, t) => { const { formItem: n } = fc(), { model: r, isGroup: a, isLimitExceeded: o } = POe(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = LOe(e, t, { model: r }), { isDisabled: f } = AOe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = lm(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: a }), { handleChange: v, onClickRoot: m } = IOe(e, { model: r, isLimitExceeded: o, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var y, x; Ka(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (y = e.trueValue) != null ? y : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), od({ 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(() => a.value && H0(e.value))), od({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, O(() => !!e.trueLabel)), od({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, O(() => !!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 }; }, NOe = G({ name: "ElCheckbox" }), MOe = /* @__PURE__ */ G({ ...NOe, props: oV, emits: iV, setup(e) { const t = e, n = _r(), { inputId: r, isLabeledByFormItem: a, isChecked: o, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = sV(t, n), p = Nt("checkbox"), v = O(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", o.value) ]), m = O(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", o.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, y) => ($(), ae(dt(!b(u) && b(a) ? "span" : "label"), { class: H(b(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: b(h) }, { default: q(() => { var x, w, k, C; return [ K("span", { class: H(b(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? qe(($(), B("input", { key: 0, id: b(r), "onUpdate:modelValue": (S) => Kn(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: b(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0, "false-value": (C = (k = g.falseValue) != null ? k : g.falseLabel) != null ? C : !1, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]) : qe(($(), B("input", { key: 1, id: b(r), "onUpdate:modelValue": (S) => Kn(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: b(i), value: b(d), name: g.name, tabindex: g.tabindex, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]), K("span", { class: H(b(p).e("inner")) }, null, 2) ], 2), b(u) ? ($(), B("span", { key: 0, class: H(b(p).e("label")) }, [ he(g.$slots, "default"), g.$slots.default ? te("v-if", !0) : ($(), B(Ue, { key: 0 }, [ ze(_e(g.label), 1) ], 64)) ], 2)) : te("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var DOe = /* @__PURE__ */ Mt(MOe, [["__file", "checkbox.vue"]]); const BOe = G({ name: "ElCheckboxButton" }), ROe = /* @__PURE__ */ G({ ...BOe, props: oV, emits: iV, setup(e) { const t = e, n = _r(), { isFocused: r, isChecked: a, isDisabled: o, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = sV(t, n), c = $e(Oh, void 0), d = Nt("checkbox"), f = O(() => { var p, v, m, g; const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: y, borderColor: y, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: y ? `-1px 0 0 0 ${y}` : void 0 }; }), h = O(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", o.value), d.is("checked", a.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, y, x; return $(), B("label", { class: H(b(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? qe(($(), B("input", { key: 0, "onUpdate:modelValue": (w) => Kn(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (x = (y = p.falseValue) != null ? y : p.falseLabel) != null ? x : !1, onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]) : qe(($(), B("input", { key: 1, "onUpdate:modelValue": (w) => Kn(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), value: b(l), onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]), p.$slots.default || p.label ? ($(), B("span", { key: 2, class: H(b(d).be("button", "inner")), style: Qe(b(a) ? b(f) : void 0) }, [ he(p.$slots, "default", {}, () => [ ze(_e(p.label), 1) ]) ], 6)) : te("v-if", !0) ], 2); }; } }); var lV = /* @__PURE__ */ Mt(ROe, [["__file", "checkbox-button.vue"]]); const zOe = Vt({ modelValue: { type: mt(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Bl, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...pc(["ariaLabel"]) }), VOe = { [dr]: (e) => Ka(e), change: (e) => Ka(e) }, jOe = G({ name: "ElCheckboxGroup" }), HOe = /* @__PURE__ */ G({ ...jOe, props: zOe, emits: VOe, setup(e, { emit: t }) { const n = e, r = Nt("checkbox"), { formItem: a } = fc(), { inputId: o, isLabeledByFormItem: i } = lm(n, { formItemContext: a }), s = async (u) => { t(dr, u), await We(), t("change", u); }, l = O({ get() { return n.modelValue; }, set(u) { s(u); } }); return rt(Oh, { ...uz(gr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), be(() => n.modelValue, () => { n.validateEvent && (a == null || a.validate("change").catch((u) => xr(u))); }), (u, c) => { var d; return $(), ae(dt(u.tag), { id: b(o), class: H(b(r).b("group")), role: "group", "aria-label": b(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": b(i) ? (d = b(a)) == null ? void 0 : d.labelId : void 0 }, { default: q(() => [ he(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var uV = /* @__PURE__ */ Mt(HOe, [["__file", "checkbox-group.vue"]]); const UOe = Tr(DOe, { CheckboxButton: lV, CheckboxGroup: uV }); Xi(lV); Xi(uV); const cV = Vt({ modelValue: { type: [String, Number, Boolean], default: void 0 }, size: Bl, disabled: Boolean, label: { type: [String, Number, Boolean], default: void 0 }, value: { type: [String, Number, Boolean], default: void 0 }, name: { type: String, default: void 0 } }), qOe = Vt({ ...cV, border: Boolean }), dV = { [dr]: (e) => co(e) || Dn(e) || $s(e), [$d]: (e) => co(e) || Dn(e) || $s(e) }, pV = Symbol("radioGroupKey"), fV = (e, t) => { const n = U(), r = $e(pV, void 0), a = O(() => !!r), o = O(() => H0(e.value) ? e.label : e.value), i = O({ get() { return a.value ? r.modelValue : e.modelValue; }, set(d) { a.value ? r.changeEvent(d) : t && t(dr, d), n.value.checked = e.modelValue === o.value; } }), s = Zu(O(() => r == null ? void 0 : r.size)), l = sm(O(() => r == null ? void 0 : r.disabled)), u = U(!1), c = O(() => l.value || a.value && i.value !== o.value ? -1 : 0); return od({ 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(() => a.value && H0(e.value))), { radioRef: n, isGroup: a, radioGroup: r, focus: u, size: s, disabled: l, tabIndex: c, modelValue: i, actualValue: o }; }, WOe = G({ name: "ElRadio" }), KOe = /* @__PURE__ */ G({ ...WOe, props: qOe, emits: dV, setup(e, { emit: t }) { const n = e, r = Nt("radio"), { radioRef: a, radioGroup: o, focus: i, size: s, disabled: l, modelValue: u, actualValue: c } = fV(n, t); function d() { We(() => t("change", u.value)); } return (f, h) => { var p; return $(), B("label", { class: H([ b(r).b(), b(r).is("disabled", b(l)), b(r).is("focus", b(i)), b(r).is("bordered", f.border), b(r).is("checked", b(u) === b(c)), b(r).m(b(s)) ]) }, [ K("span", { class: H([ b(r).e("input"), b(r).is("disabled", b(l)), b(r).is("checked", b(u) === b(c)) ]) }, [ qe(K("input", { ref_key: "radioRef", ref: a, "onUpdate:modelValue": (v) => Kn(u) ? u.value = v : null, class: H(b(r).e("original")), value: b(c), name: f.name || ((p = b(o)) == null ? void 0 : p.name), disabled: b(l), checked: b(u) === b(c), type: "radio", onFocus: (v) => i.value = !0, onBlur: (v) => i.value = !1, onChange: d, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [ [eL, b(u)] ]), K("span", { class: H(b(r).e("inner")) }, null, 2) ], 2), K("span", { class: H(b(r).e("label")), onKeydown: et(() => { }, ["stop"]) }, [ he(f.$slots, "default", {}, () => [ ze(_e(f.label), 1) ]) ], 42, ["onKeydown"]) ], 2); }; } }); var GOe = /* @__PURE__ */ Mt(KOe, [["__file", "radio.vue"]]); const XOe = Vt({ ...cV }), YOe = G({ name: "ElRadioButton" }), ZOe = /* @__PURE__ */ G({ ...YOe, props: XOe, setup(e) { const t = e, n = Nt("radio"), { radioRef: r, focus: a, size: o, disabled: i, modelValue: s, radioGroup: l, actualValue: u } = fV(t), c = O(() => ({ 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 $(), B("label", { class: H([ b(n).b("button"), b(n).is("active", b(s) === b(u)), b(n).is("disabled", b(i)), b(n).is("focus", b(a)), b(n).bm("button", b(o)) ]) }, [ qe(K("input", { ref_key: "radioRef", ref: r, "onUpdate:modelValue": (p) => Kn(s) ? s.value = p : null, class: H(b(n).be("button", "original-radio")), value: b(u), type: "radio", name: d.name || ((h = b(l)) == null ? void 0 : h.name), disabled: b(i), onFocus: (p) => a.value = !0, onBlur: (p) => a.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [ [eL, b(s)] ]), K("span", { class: H(b(n).be("button", "inner")), style: Qe(b(s) === b(u) ? b(c) : {}), onKeydown: et(() => { }, ["stop"]) }, [ he(d.$slots, "default", {}, () => [ ze(_e(d.label), 1) ]) ], 46, ["onKeydown"]) ], 2); }; } }); var hV = /* @__PURE__ */ Mt(ZOe, [["__file", "radio-button.vue"]]); const QOe = Vt({ id: { type: String, default: void 0 }, size: Bl, 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 }, ...pc(["ariaLabel"]) }), JOe = dV, eFe = G({ name: "ElRadioGroup" }), tFe = /* @__PURE__ */ G({ ...eFe, props: QOe, emits: JOe, setup(e, { emit: t }) { const n = e, r = Nt("radio"), a = Yu(), o = U(), { formItem: i } = fc(), { inputId: s, isLabeledByFormItem: l } = lm(n, { formItemContext: i }), u = (d) => { t(dr, d), We(() => t("change", d)); }; nt(() => { const d = o.value.querySelectorAll("[type=radio]"), f = d[0]; !Array.from(d).some((h) => h.checked) && f && (f.tabIndex = 0); }); const c = O(() => n.name || a.value); return rt(pV, en({ ...gr(n), changeEvent: u, name: c })), be(() => n.modelValue, () => { n.validateEvent && (i == null || i.validate("change").catch((d) => xr(d))); }), (d, f) => ($(), B("div", { id: b(s), ref_key: "radioGroupRef", ref: o, class: H(b(r).b("group")), role: "radiogroup", "aria-label": b(l) ? void 0 : d.ariaLabel || "radio-group", "aria-labelledby": b(l) ? b(i).labelId : void 0 }, [ he(d.$slots, "default") ], 10, ["id", "aria-label", "aria-labelledby"])); } }); var vV = /* @__PURE__ */ Mt(tFe, [["__file", "radio-group.vue"]]); const nFe = Tr(GOe, { RadioButton: hV, RadioGroup: vV }); Xi(vV); Xi(hV); var rFe = G({ name: "NodeContent", setup() { return { ns: Nt("cascader-node") }; }, render() { const { ns: e } = this, { node: t, panel: n } = this.$parent, { data: r, label: a } = t, { renderLabelFn: o } = n; return nn("span", { class: e.e("label") }, o ? o({ node: t, data: r }) : a); } }); const tE = Symbol(), aFe = G({ name: "ElCascaderNode", components: { ElCheckbox: UOe, ElRadio: nFe, NodeContent: rFe, ElIcon: tr, Check: hz, Loading: Sw, ArrowRight: kw }, props: { node: { type: Object, required: !0 }, menuId: String }, emits: ["expand"], setup(e, { emit: t }) { const n = $e(tE), r = Nt("cascader-node"), a = O(() => n.isHoverMenu), o = O(() => n.config.multiple), i = O(() => n.config.checkStrictly), s = O(() => { var C; return (C = n.checkedNodes[0]) == null ? void 0 : C.uid; }), l = O(() => e.node.isDisabled), u = O(() => e.node.isLeaf), c = O(() => i.value && !u.value || !l.value), d = O(() => h(n.expandingNode)), f = O(() => i.value && n.checkedNodes.some(h)), h = (C) => { var S; const { level: _, uid: T } = e.node; return ((S = C == null ? void 0 : C.pathNodes[_ - 1]) == null ? void 0 : S.uid) === T; }, p = () => { d.value || n.expandNode(e.node); }, v = (C) => { const { node: S } = e; C !== S.checked && n.handleCheckChange(S, C); }, m = () => { n.lazyLoad(e.node, () => { u.value || p(); }); }, g = (C) => { a.value && (y(), !u.value && t("expand", C)); }, y = () => { const { node: C } = e; !c.value || C.loading || (C.loaded ? p() : m()); }, x = () => { a.value && !u.value || (u.value && !l.value && !i.value && !o.value ? k(!0) : y()); }, w = (C) => { i.value ? (v(C), e.node.loaded && p()) : k(C); }, k = (C) => { e.node.loaded ? (v(C), !i.value && p()) : m(); }; return { panel: n, isHoverMenu: a, multiple: o, checkStrictly: i, checkedNodeId: s, isDisabled: l, isLeaf: u, expandable: c, inExpandingPath: d, inCheckedPath: f, ns: r, handleHoverExpand: g, handleExpand: y, handleClick: x, handleCheck: k, handleSelectCheck: w }; } }); function oFe(e, t, n, r, a, o) { const i = lt("el-checkbox"), s = lt("el-radio"), l = lt("check"), u = lt("el-icon"), c = lt("node-content"), d = lt("loading"), f = lt("arrow-right"); return $(), B("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: H([ 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 }, [ te(" prefix "), e.multiple ? ($(), ae(i, { key: 0, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: e.isDisabled, onClick: et(() => { }, ["stop"]), "onUpdate:modelValue": e.handleSelectCheck }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onUpdate:modelValue"])) : e.checkStrictly ? ($(), ae(s, { key: 1, "model-value": e.checkedNodeId, label: e.node.uid, disabled: e.isDisabled, "onUpdate:modelValue": e.handleSelectCheck, onClick: et(() => { }, ["stop"]) }, { default: q(() => [ te(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `), K("span") ]), _: 1 }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue", "onClick"])) : e.isLeaf && e.node.checked ? ($(), ae(u, { key: 2, class: H(e.ns.e("prefix")) }, { default: q(() => [ Z(l) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), te(" content "), Z(c), te(" postfix "), e.isLeaf ? te("v-if", !0) : ($(), B(Ue, { key: 3 }, [ e.node.loading ? ($(), ae(u, { key: 0, class: H([e.ns.is("loading"), e.ns.e("postfix")]) }, { default: q(() => [ Z(d) ]), _: 1 }, 8, ["class"])) : ($(), ae(u, { key: 1, class: H(["arrow-right", e.ns.e("postfix")]) }, { default: q(() => [ Z(f) ]), _: 1 }, 8, ["class"])) ], 64)) ], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex", "onMouseenter", "onFocus", "onClick"]); } var iFe = /* @__PURE__ */ Mt(aFe, [["render", oFe], ["__file", "node.vue"]]); const sFe = G({ name: "ElCascaderMenu", components: { Loading: Sw, ElIcon: tr, ElScrollbar: YS, ElCascaderNode: iFe }, props: { nodes: { type: Array, required: !0 }, index: { type: Number, required: !0 } }, setup(e) { const t = tt(), n = Nt("cascader-menu"), { t: r } = vi(), a = Yu(); let o = null, i = null; const s = $e(tE), l = U(null), u = O(() => !e.nodes.length), c = O(() => !s.initialLoaded), d = O(() => `${a.value}-${e.index}`), f = (m) => { o = m.target; }, h = (m) => { if (!(!s.isHoverMenu || !o || !l.value)) if (o.contains(m.target)) { p(); const g = t.vnode.el, { left: y } = g.getBoundingClientRect(), { offsetWidth: x, offsetHeight: w } = g, k = m.clientX - y, C = o.offsetTop, S = C + o.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 lFe(e, t, n, r, a, o) { const i = lt("el-cascader-node"), s = lt("loading"), l = lt("el-icon"), u = lt("el-scrollbar"); return $(), ae(u, { key: e.menuId, tag: "ul", role: "menu", class: H(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: q(() => { var c; return [ ($(!0), B(Ue, null, yt(e.nodes, (d) => ($(), ae(i, { key: d.uid, node: d, "menu-id": e.menuId, onExpand: e.handleExpand }, null, 8, ["node", "menu-id", "onExpand"]))), 128)), e.isLoading ? ($(), B("div", { key: 0, class: H(e.ns.e("empty-text")) }, [ Z(l, { size: "14", class: H(e.ns.is("loading")) }, { default: q(() => [ Z(s) ]), _: 1 }, 8, ["class"]), ze(" " + _e(e.t("el.cascader.loading")), 1) ], 2)) : e.isEmpty ? ($(), B("div", { key: 1, class: H(e.ns.e("empty-text")) }, [ he(e.$slots, "empty", {}, () => [ ze(_e(e.t("el.cascader.noData")), 1) ]) ], 2)) : (c = e.panel) != null && c.isHoverMenu ? ($(), B("svg", { key: 2, ref: "hoverZone", class: H(e.ns.e("hover-zone")) }, null, 2)) : te("v-if", !0) ]; }), _: 3 }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]); } var uFe = /* @__PURE__ */ Mt(sFe, [["render", lFe], ["__file", "menu.vue"]]); let cFe = 0; const dFe = (e) => { const t = [e]; let { parent: n } = e; for (; n; ) t.unshift(n), n = n.parent; return t; }; class Hf { constructor(t, n, r, a = !1) { this.data = t, this.config = n, this.parent = r, this.root = a, this.uid = cFe++, this.checked = !1, this.indeterminate = !1, this.loading = !1; const { value: o, label: i, children: s } = n, l = t[s], u = dFe(this); this.level = a ? 0 : r ? r.level + 1 : 1, this.value = t[o], 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 Hf(c, n, this)), this.loaded = !n.lazy || this.isLeaf || !T5(l); } get isDisabled() { const { data: t, parent: n, config: r } = this, { disabled: a, checkStrictly: o } = r; return (Mr(a) ? a(t, this) : !!t[a]) || !o && (n == null ? void 0 : n.isDisabled); } get isLeaf() { const { data: t, config: n, childrenData: r, loaded: a } = this, { lazy: o, leaf: i } = n, s = Mr(i) ? i(t, this) : t[i]; return fl(s) ? o && !a ? !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, a = new Hf(t, this.config, this); return Array.isArray(n) ? n.push(t) : this.childrenData = [t], r.push(a), a; } calcText(t, n) { const r = t ? this.pathLabels.join(n) : this.label; return this.text = r, r; } broadcast(t, ...n) { const r = `onParent${QO(t)}`; this.children.forEach((a) => { a && (a.broadcast(t, ...n), a[r] && a[r](...n)); }); } emit(t, ...n) { const { parent: r } = this, a = `onChild${QO(t)}`; r && (r[a] && r[a](...n), r.emit(t, ...n)); } onParentCheck(t) { this.isDisabled || this.setCheckState(t); } onChildCheck() { const { children: t } = this, n = t.filter((a) => !a.isDisabled), r = n.length ? n.every((a) => a.checked) : !1; this.setCheckState(r); } setCheckState(t) { const n = this.children.length, r = this.children.reduce((a, o) => { const i = o.checked ? 1 : o.indeterminate ? 0.5 : 0; return a + i; }, 0); this.checked = this.loaded && this.children.filter((a) => !a.isDisabled).every((a) => a.loaded && a.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 N5 = (e, t) => e.reduce((n, r) => (r.isLeaf ? n.push(r) : (!t && n.push(r), n = n.concat(N5(r.children, t))), n), []); class NF { constructor(t, n) { this.config = n; const r = (t || []).map((a) => new Hf(a, this.config)); this.nodes = r, this.allNodes = N5(r, !1), this.leafNodes = N5(r, !0); } getNodes() { return this.nodes; } getFlattedNodes(t) { return t ? this.leafNodes : this.allNodes; } appendNode(t, n) { const r = n ? n.appendChild(t) : new Hf(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) => ms(r.value, t) || ms(r.pathValues, t)) || null; } getSameNode(t) { return t && this.getFlattedNodes(!1).find(({ value: n, level: r }) => ms(t.value, n) && t.level === r) || null; } } const gV = Vt({ modelValue: { type: mt([Number, String, Array]) }, options: { type: mt(Array), default: () => [] }, props: { type: mt(Object), default: () => ({}) } }), pFe = { expandTrigger: "click", multiple: !1, checkStrictly: !1, emitPath: !0, lazy: !1, lazyLoad: ml, value: "value", label: "label", children: "children", leaf: "leaf", disabled: "disabled", hoverThreshold: 500 }, fFe = (e) => O(() => ({ ...pFe, ...e.props })), MF = (e) => { if (!e) return 0; const t = e.id.split("-"); return Number(t[t.length - 2]); }, hFe = (e) => { if (!e) return; const t = e.querySelector("input"); t ? t.click() : L7(e) && e.click(); }, vFe = (e, t) => { const n = t.slice(0), r = n.map((o) => o.uid), a = e.reduce((o, i) => { const s = r.indexOf(i.uid); return s > -1 && (o.push(i), n.splice(s, 1), r.splice(s, 1)), o; }, []); return a.push(...n), a; }, gFe = G({ name: "ElCascaderPanel", components: { ElCascaderMenu: uFe }, props: { ...gV, border: { type: Boolean, default: !0 }, renderLabel: Function }, emits: [dr, $d, "close", "expand-change"], setup(e, { emit: t, slots: n }) { let r = !1; const a = Nt("cascader"), o = fFe(e); let i = null; const s = U(!0), l = U([]), u = U(null), c = U([]), d = U(null), f = U([]), h = O(() => o.value.expandTrigger === "hover"), p = O(() => e.renderLabel || n.default), v = () => { const { options: I } = e, N = o.value; r = !1, i = new NF(I, N), c.value = [i.getNodes()], N.lazy && T5(e.options) ? (s.value = !1, m(void 0, (L) => { L && (i = new NF(L, N), c.value = [i.getNodes()]), s.value = !0, _(!1, !0); })) : _(!1, !0); }, m = (I, N) => { const L = o.value; I = I || new Hf({}, L, void 0, !0), I.loading = !0; const z = (P) => { const D = I, M = D.root ? null : D; P && (i == null || i.appendNodes(P, M)), D.loading = !1, D.loaded = !0, D.childrenData = D.childrenData || [], N && N(P); }; L.lazyLoad(I, z); }, g = (I, N) => { var L; const { level: z } = I, P = c.value.slice(0, z); let D; I.isLeaf ? D = I.pathNodes[z - 2] : (D = I, P.push(I.children)), ((L = d.value) == null ? void 0 : L.uid) !== (D == null ? void 0 : D.uid) && (d.value = I, c.value = P, !N && t("expand-change", (I == null ? void 0 : I.pathValues) || [])); }, y = (I, N, L = !0) => { const { checkStrictly: z, multiple: P } = o.value, D = f.value[0]; r = !0, !P && (D == null || D.doCheck(!1)), I.doCheck(N), S(), L && !P && !z && t("close"), !L && !P && !z && x(I); }, x = (I) => { I && (I = I.parent, x(I), I && g(I)); }, w = (I) => i == null ? void 0 : i.getFlattedNodes(I), k = (I) => { var N; return (N = w(I)) == null ? void 0 : N.filter((L) => L.checked !== !1); }, C = () => { f.value.forEach((I) => I.doCheck(!1)), S(), c.value = c.value.slice(0, 1), d.value = null, t("expand-change", []); }, S = () => { var I; const { checkStrictly: N, multiple: L } = o.value, z = f.value, P = k(!N), D = vFe(z, P), M = D.map((V) => V.valueByOption); f.value = D, u.value = L ? M : (I = M[0]) != null ? I : null; }, _ = (I = !1, N = !1) => { const { modelValue: L } = e, { lazy: z, multiple: P, checkStrictly: D } = o.value, M = !D; if (!(!s.value || r || !N && ms(L, u.value))) if (z && !I) { const V = rF(d8e(aF(L))).map((Q) => i == null ? void 0 : i.getNodeByValue(Q)).filter((Q) => !!Q && !Q.loaded && !Q.loading); V.length ? V.forEach((Q) => { m(Q, () => _(!1, N)); }) : _(!0, N); } else { const V = P ? aF(L) : [L], Q = rF(V.map((X) => i == null ? void 0 : i.getNodeByValue(X, M))); T(Q, N), u.value = nz(L); } }, T = (I, N = !0) => { const { checkStrictly: L } = o.value, z = f.value, P = I.filter((V) => !!V && (L || V.isLeaf)), D = i == null ? void 0 : i.getSameNode(d.value), M = N && D || P[0]; M ? M.pathNodes.forEach((V) => g(V, !0)) : d.value = null, z.forEach((V) => V.doCheck(!1)), en(P).forEach((V) => V.doCheck(!0)), f.value = P, We(F); }, F = () => { ar && l.value.forEach((I) => { const N = I == null ? void 0 : I.$el; if (N) { const L = N.querySelector(`.${a.namespace.value}-scrollbar__wrap`), z = N.querySelector(`.${a.b("node")}.${a.is("active")}`) || N.querySelector(`.${a.b("node")}.in-active-path`); fz(L, z); } }); }, A = (I) => { const N = I.target, { code: L } = I; switch (L) { case Ar.up: case Ar.down: { I.preventDefault(); const z = L === Ar.up ? -1 : 1; xy(N7(N, z, `.${a.b("node")}[tabindex="-1"]`)); break; } case Ar.left: { I.preventDefault(); const z = l.value[MF(N) - 1], P = z == null ? void 0 : z.$el.querySelector(`.${a.b("node")}[aria-expanded="true"]`); xy(P); break; } case Ar.right: { I.preventDefault(); const z = l.value[MF(N) + 1], P = z == null ? void 0 : z.$el.querySelector(`.${a.b("node")}[tabindex="-1"]`); xy(P); break; } case Ar.enter: hFe(N); break; } }; return rt(tE, en({ config: o, expandingNode: d, checkedNodes: f, isHoverMenu: h, initialLoaded: s, renderLabelFn: p, lazyLoad: m, expandNode: g, handleCheckChange: y })), be([o, () => e.options], v, { deep: !0, immediate: !0 }), be(() => e.modelValue, () => { r = !1, _(); }, { deep: !0 }), be(() => u.value, (I) => { ms(I, e.modelValue) || (t(dr, I), t($d, I)); }), xG(() => l.value = []), nt(() => !T5(e.modelValue) && _()), { ns: a, menuList: l, menus: c, checkedNodes: f, handleKeyDown: A, handleCheckChange: y, getFlattedNodes: w, getCheckedNodes: k, clearCheckedNodes: C, calculateCheckedValue: S, scrollToExpandingNode: F }; } }); function mFe(e, t, n, r, a, o) { const i = lt("el-cascader-menu"); return $(), B("div", { class: H([e.ns.b("panel"), e.ns.is("bordered", e.border)]), onKeydown: e.handleKeyDown }, [ ($(!0), B(Ue, null, yt(e.menus, (s, l) => ($(), ae(i, { key: l, ref_for: !0, ref: (u) => e.menuList[l] = u, index: l, nodes: [...s] }, { empty: q(() => [ he(e.$slots, "empty") ]), _: 2 }, 1032, ["index", "nodes"]))), 128)) ], 42, ["onKeydown"]); } var yFe = /* @__PURE__ */ Mt(gFe, [["render", mFe], ["__file", "index.vue"]]); const bFe = Tr(yFe), G0 = Vt({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: _w }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), wFe = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, xFe = G({ name: "ElTag" }), kFe = /* @__PURE__ */ G({ ...xFe, props: G0, emits: wFe, setup(e, { emit: t }) { const n = e, r = Zu(), a = Nt("tag"), o = O(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? ($(), B("span", { key: 0, class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b(tr), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(O5)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6)) : ($(), ae(lr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: q(() => [ K("span", { class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b(tr), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(O5)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var CFe = /* @__PURE__ */ Mt(kFe, [["__file", "tag.vue"]]); const Uf = Tr(CFe), SFe = Vt({ ...gV, size: Bl, placeholder: String, disabled: Boolean, clearable: Boolean, filterable: Boolean, filterMethod: { type: mt(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: mt(Function), default: () => !0 }, placement: { type: mt(String), values: om, default: "bottom-start" }, fallbackPlacements: { type: mt(Array), default: ["bottom-start", "bottom", "top-start", "top", "right", "left"] }, popperClass: { type: String, default: "" }, teleported: eo.teleported, tagType: { ...G0.type, default: "info" }, tagEffect: { ...G0.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, persistent: { type: Boolean, default: !0 }, ...jz }), EFe = { [dr]: (e) => !0, [$d]: (e) => !0, focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent, clear: () => !0, visibleChange: (e) => $s(e), expandChange: (e) => !!e, removeTag: (e) => !!e }, _Fe = "ElCascader", TFe = G({ name: _Fe }), $Fe = /* @__PURE__ */ G({ ...TFe, props: SFe, emits: EFe, setup(e, { expose: t, emit: n }) { const r = e, a = { modifiers: [ { name: "arrowPosition", enabled: !0, phase: "main", fn: ({ state: me }) => { const { modifiersData: Te, placement: Ce } = me; ["right", "left", "bottom", "top"].includes(Ce) || (Te.arrow.x = 35); }, requires: ["arrow"] } ] }, o = uh(); let i = 0, s = 0; const l = Nt("cascader"), u = Nt("input"), { t: c } = vi(), { form: d, formItem: f } = fc(), { valueOnClear: h } = Hz(r), { isComposing: p, handleComposition: v } = KS({ afterComposition(me) { var Te; const Ce = (Te = me.target) == null ? void 0 : Te.value; Ve(Ce); } }), m = U(null), g = U(null), y = U(null), x = U(null), w = U(null), k = U(!1), C = U(!1), S = U(!1), _ = U(!1), T = U(""), F = U(""), A = U([]), I = U([]), N = U([]), L = O(() => o.style), z = O(() => r.disabled || (d == null ? void 0 : d.disabled)), P = O(() => r.placeholder || c("el.cascader.placeholder")), D = O(() => F.value || A.value.length > 0 || p.value ? "" : P.value), M = Zu(), V = O(() => ["small"].includes(M.value) ? "small" : "default"), Q = O(() => !!r.props.multiple), X = O(() => !r.filterable || Q.value), ee = O(() => Q.value ? F.value : T.value), ue = O(() => { var me; return ((me = x.value) == null ? void 0 : me.checkedNodes) || []; }), ve = O(() => !r.clearable || z.value || S.value || !C.value ? !1 : !!ue.value.length), ge = O(() => { const { showAllLevels: me, separator: Te } = r, Ce = ue.value; return Ce.length ? Q.value ? "" : Ce[0].calcText(me, Te) : ""; }), se = O(() => (f == null ? void 0 : f.validateState) || ""), ne = O({ get() { return nz(r.modelValue); }, set(me) { const Te = me ?? h.value; n(dr, Te), n($d, Te), r.validateEvent && (f == null || f.validate("change").catch((Ce) => xr(Ce))); } }), W = O(() => [ l.b(), l.m(M.value), l.is("disabled", z.value), o.class ]), Y = O(() => [ u.e("icon"), "icon-arrow-down", l.is("reverse", k.value) ]), re = O(() => l.is("focus", k.value || _.value)), we = O(() => { var me, Te; return (Te = (me = m.value) == null ? void 0 : me.popperRef) == null ? void 0 : Te.contentRef; }), Oe = (me) => { var Te, Ce, Le; z.value || (me = me ?? !k.value, me !== k.value && (k.value = me, (Ce = (Te = g.value) == null ? void 0 : Te.input) == null || Ce.setAttribute("aria-expanded", `${me}`), me ? (Ne(), We((Le = x.value) == null ? void 0 : Le.scrollToExpandingNode)) : r.filterable && j(), n("visibleChange", me))); }, Ne = () => { We(() => { var me; (me = m.value) == null || me.updatePopper(); }); }, xe = () => { S.value = !1; }, Fe = (me) => { const { showAllLevels: Te, separator: Ce } = r; return { node: me, key: me.uid, text: me.calcText(Te, Ce), hitState: !1, closable: !z.value && !me.isDisabled, isCollapseTag: !1 }; }, Se = (me) => { var Te; const Ce = me.node; Ce.doCheck(!1), (Te = x.value) == null || Te.calculateCheckedValue(), n("removeTag", Ce.valueByOption); }, Pe = () => { if (!Q.value) return; const me = ue.value, Te = [], Ce = []; if (me.forEach((Le) => Ce.push(Fe(Le))), I.value = Ce, me.length) { me.slice(0, r.maxCollapseTags).forEach((pt) => Te.push(Fe(pt))); const Le = me.slice(r.maxCollapseTags), bt = Le.length; bt && (r.collapseTags ? Te.push({ key: -1, text: `+ ${bt}`, closable: !1, isCollapseTag: !0 }) : Le.forEach((pt) => Te.push(Fe(pt)))); } A.value = Te; }, Me = () => { var me, Te; const { filterMethod: Ce, showAllLevels: Le, separator: bt } = r, pt = (Te = (me = x.value) == null ? void 0 : me.getFlattedNodes(!r.props.checkStrictly)) == null ? void 0 : Te.filter((Tt) => Tt.isDisabled ? !1 : (Tt.calcText(Le, bt), Ce(Tt, ee.value))); Q.value && (A.value.forEach((Tt) => { Tt.hitState = !1; }), I.value.forEach((Tt) => { Tt.hitState = !1; })), S.value = !0, N.value = pt, Ne(); }, He = () => { var me; let Te; S.value && w.value ? Te = w.value.$el.querySelector(`.${l.e("suggestion-item")}`) : Te = (me = x.value) == null ? void 0 : me.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`), Te && (Te.focus(), !S.value && Te.click()); }, De = () => { var me, Te; const Ce = (me = g.value) == null ? void 0 : me.input, Le = y.value, bt = (Te = w.value) == null ? void 0 : Te.$el; if (!(!ar || !Ce)) { if (bt) { const pt = bt.querySelector(`.${l.e("suggestion-list")}`); pt.style.minWidth = `${Ce.offsetWidth}px`; } if (Le) { const { offsetHeight: pt } = Le, Tt = A.value.length > 0 ? `${Math.max(pt + 6, i)}px` : `${i}px`; Ce.style.height = Tt, Ne(); } } }, Xe = (me) => { var Te; return (Te = x.value) == null ? void 0 : Te.getCheckedNodes(me); }, Ge = (me) => { Ne(), n("expandChange", me); }, Ze = (me) => { if (!p.value) switch (me.code) { case Ar.enter: Oe(); break; case Ar.down: Oe(!0), We(He), me.preventDefault(); break; case Ar.esc: k.value === !0 && (me.preventDefault(), me.stopPropagation(), Oe(!1)); break; case Ar.tab: Oe(!1); break; } }, E = () => { var me; (me = x.value) == null || me.clearCheckedNodes(), !k.value && r.filterable && j(), Oe(!1), n("clear"); }, j = () => { const { value: me } = ge; T.value = me, F.value = me; }, le = (me) => { var Te, Ce; const { checked: Le } = me; Q.value ? (Te = x.value) == null || Te.handleCheckChange(me, !Le, !1) : (!Le && ((Ce = x.value) == null || Ce.handleCheckChange(me, !0, !1)), Oe(!1)); }, ce = (me) => { const Te = me.target, { code: Ce } = me; switch (Ce) { case Ar.up: case Ar.down: { const Le = Ce === Ar.up ? -1 : 1; xy(N7(Te, Le, `.${l.e("suggestion-item")}[tabindex="-1"]`)); break; } case Ar.enter: Te.click(); break; } }, oe = () => { const me = A.value, Te = me[me.length - 1]; s = F.value ? 0 : s + 1, !(!Te || !s || r.collapseTags && me.length > 1) && (Te.hitState ? Se(Te) : Te.hitState = !0); }, ke = (me) => { const Te = me.target, Ce = l.e("search-input"); Te.className === Ce && (_.value = !0), n("focus", me); }, fe = (me) => { _.value = !1, n("blur", me); }, Ee = sz(() => { const { value: me } = ee; if (!me) return; const Te = r.beforeFilter(me); u3e(Te) ? Te.then(Me).catch(() => { }) : Te !== !1 ? Me() : xe(); }, r.debounce), Ve = (me, Te) => { !k.value && Oe(!0), !(Te != null && Te.isComposing) && (me ? Ee() : xe()); }, je = (me) => Number.parseFloat(G5e(u.cssVarName("input-height"), me).value) - 2; return be(S, Ne), be([ue, z, () => r.collapseTags], Pe), be(A, () => { We(() => De()); }), be(M, async () => { await We(); const me = g.value.input; i = je(me) || i, De(); }), be(ge, j, { immediate: !0 }), nt(() => { const me = g.value.input, Te = je(me); i = me.offsetHeight || Te, us(me, De); }), t({ getCheckedNodes: Xe, cascaderPanelRef: x, togglePopperVisible: Oe, contentRef: we, presentText: ge }), (me, Te) => ($(), ae(b(Ab), { ref_key: "tooltipRef", ref: m, visible: k.value, teleported: me.teleported, "popper-class": [b(l).e("dropdown"), me.popperClass], "popper-options": a, "fallback-placements": me.fallbackPlacements, "stop-popper-mouse-event": !1, "gpu-acceleration": !1, placement: me.placement, transition: `${b(l).namespace.value}-zoom-in-top`, effect: "light", pure: "", persistent: me.persistent, onHide: xe }, { default: q(() => [ qe(($(), B("div", { class: H(b(W)), style: Qe(b(L)), onClick: () => Oe(b(X) ? void 0 : !0), onKeydown: Ze, onMouseenter: (Ce) => C.value = !0, onMouseleave: (Ce) => C.value = !1 }, [ Z(b(Ow), { ref_key: "input", ref: g, modelValue: T.value, "onUpdate:modelValue": (Ce) => T.value = Ce, placeholder: b(D), readonly: b(X), disabled: b(z), "validate-event": !1, size: b(M), class: H(b(re)), tabindex: b(Q) && me.filterable && !b(z) ? -1 : void 0, onCompositionstart: b(v), onCompositionupdate: b(v), onCompositionend: b(v), onFocus: ke, onBlur: fe, onInput: Ve }, { suffix: q(() => [ b(ve) ? ($(), ae(b(tr), { key: "clear", class: H([b(u).e("icon"), "icon-circle-close"]), onClick: et(E, ["stop"]) }, { default: q(() => [ Z(b(Cw)) ]), _: 1 }, 8, ["class", "onClick"])) : ($(), ae(b(tr), { key: "arrow-down", class: H(b(Y)), onClick: et((Ce) => Oe(), ["stop"]) }, { default: q(() => [ Z(b(NS)) ]), _: 1 }, 8, ["class", "onClick"])) ]), _: 1 }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), b(Q) ? ($(), B("div", { key: 0, ref_key: "tagWrapper", ref: y, class: H([ b(l).e("tags"), b(l).is("validate", !!b(se)) ]) }, [ ($(!0), B(Ue, null, yt(A.value, (Ce) => ($(), ae(b(Uf), { key: Ce.key, type: me.tagType, size: b(V), effect: me.tagEffect, hit: Ce.hitState, closable: Ce.closable, "disable-transitions": "", onClose: (Le) => Se(Ce) }, { default: q(() => [ Ce.isCollapseTag === !1 ? ($(), B("span", { key: 0 }, _e(Ce.text), 1)) : ($(), ae(b(Ab), { key: 1, disabled: k.value || !me.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], placement: "bottom", effect: "light" }, { default: q(() => [ K("span", null, _e(Ce.text), 1) ]), content: q(() => [ K("div", { class: H(b(l).e("collapse-tags")) }, [ ($(!0), B(Ue, null, yt(I.value.slice(me.maxCollapseTags), (Le, bt) => ($(), B("div", { key: bt, class: H(b(l).e("collapse-tag")) }, [ ($(), ae(b(Uf), { key: Le.key, class: "in-tooltip", type: me.tagType, size: b(V), effect: me.tagEffect, hit: Le.hitState, closable: Le.closable, "disable-transitions": "", onClose: (pt) => Se(Le) }, { default: q(() => [ K("span", null, _e(Le.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)), me.filterable && !b(z) ? qe(($(), B("input", { key: 0, "onUpdate:modelValue": (Ce) => F.value = Ce, type: "text", class: H(b(l).e("search-input")), placeholder: b(ge) ? "" : b(P), onInput: (Ce) => Ve(F.value, Ce), onClick: et((Ce) => Oe(!0), ["stop"]), onKeydown: gn(oe, ["delete"]), onCompositionstart: b(v), onCompositionupdate: b(v), onCompositionend: b(v), onFocus: ke, onBlur: fe }, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [ [$g, F.value] ]) : te("v-if", !0) ], 2)) : te("v-if", !0) ], 46, ["onClick", "onMouseenter", "onMouseleave"])), [ [b(rV), () => Oe(!1), b(we)] ]) ]), content: q(() => [ qe(Z(b(bFe), { ref_key: "cascaderPanelRef", ref: x, modelValue: b(ne), "onUpdate:modelValue": (Ce) => Kn(ne) ? ne.value = Ce : null, options: me.options, props: r.props, border: !1, "render-label": me.$slots.default, onExpandChange: Ge, onClose: (Ce) => me.$nextTick(() => Oe(!1)) }, { empty: q(() => [ he(me.$slots, "empty") ]), _: 3 }, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [ [ct, !S.value] ]), me.filterable ? qe(($(), ae(b(YS), { key: 0, ref_key: "suggestionPanel", ref: w, tag: "ul", class: H(b(l).e("suggestion-panel")), "view-class": b(l).e("suggestion-list"), onKeydown: ce }, { default: q(() => [ N.value.length ? ($(!0), B(Ue, { key: 0 }, yt(N.value, (Ce) => ($(), B("li", { key: Ce.uid, class: H([ b(l).e("suggestion-item"), b(l).is("checked", Ce.checked) ]), tabindex: -1, onClick: (Le) => le(Ce) }, [ K("span", null, _e(Ce.text), 1), Ce.checked ? ($(), ae(b(tr), { key: 0 }, { default: q(() => [ Z(b(hz)) ]), _: 1 })) : te("v-if", !0) ], 10, ["onClick"]))), 128)) : he(me.$slots, "empty", { key: 1 }, () => [ K("li", { class: H(b(l).e("empty-text")) }, _e(b(c)("el.cascader.noMatch")), 3) ]) ]), _: 3 }, 8, ["class", "view-class"])), [ [ct, S.value] ]) : te("v-if", !0) ]), _: 3 }, 8, ["visible", "teleported", "popper-class", "fallback-placements", "placement", "transition", "persistent"])); } }); var OFe = /* @__PURE__ */ Mt($Fe, [["__file", "cascader.vue"]]); const mV = Tr(OFe), yV = Symbol("rowContextKey"), FFe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], AFe = ["top", "middle", "bottom"], IFe = Vt({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: FFe, default: "start" }, align: { type: String, values: AFe } }), PFe = G({ name: "ElRow" }), LFe = /* @__PURE__ */ G({ ...PFe, props: IFe, setup(e) { const t = e, n = Nt("row"), r = O(() => t.gutter); rt(yV, { gutter: r }); const a = O(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = O(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var NFe = /* @__PURE__ */ Mt(LFe, [["__file", "row.vue"]]); const bV = Tr(NFe), MFe = Vt({ 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: mt([Number, Object]), default: () => xu({}) }, sm: { type: mt([Number, Object]), default: () => xu({}) }, md: { type: mt([Number, Object]), default: () => xu({}) }, lg: { type: mt([Number, Object]), default: () => xu({}) }, xl: { type: mt([Number, Object]), default: () => xu({}) } }), DFe = G({ name: "ElCol" }), BFe = /* @__PURE__ */ G({ ...DFe, props: MFe, setup(e) { const t = e, { gutter: n } = $e(yV, { gutter: O(() => 0) }), r = Nt("col"), a = O(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = O(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; Dn(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) => { Dn(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : Gr(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) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var RFe = /* @__PURE__ */ Mt(BFe, [["__file", "col.vue"]]); const wV = Tr(RFe), zFe = G({ name: "ElContainer" }), VFe = /* @__PURE__ */ G({ ...zFe, props: { direction: { type: String } }, setup(e) { const t = e, n = _r(), r = Nt("container"), a = O(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((o) => { const i = o.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (o, i) => ($(), B("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var jFe = /* @__PURE__ */ Mt(VFe, [["__file", "container.vue"]]); const HFe = G({ name: "ElAside" }), UFe = /* @__PURE__ */ G({ ...HFe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Nt("aside"), r = O(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => ($(), B("aside", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var xV = /* @__PURE__ */ Mt(UFe, [["__file", "aside.vue"]]); const qFe = G({ name: "ElFooter" }), WFe = /* @__PURE__ */ G({ ...qFe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Nt("footer"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("footer", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var kV = /* @__PURE__ */ Mt(WFe, [["__file", "footer.vue"]]); const KFe = G({ name: "ElHeader" }), GFe = /* @__PURE__ */ G({ ...KFe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Nt("header"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("header", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var CV = /* @__PURE__ */ Mt(GFe, [["__file", "header.vue"]]); const XFe = G({ name: "ElMain" }), YFe = /* @__PURE__ */ G({ ...XFe, setup(e) { const t = Nt("main"); return (n, r) => ($(), B("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var SV = /* @__PURE__ */ Mt(YFe, [["__file", "main.vue"]]); const ZFe = Tr(jFe, { Aside: xV, Footer: kV, Header: CV, Main: SV }); Xi(xV); Xi(kV); Xi(CV); Xi(SV); const QFe = Vt({ mask: { type: Boolean, default: !0 }, customMaskEvent: Boolean, overlayClass: { type: mt([ String, Array, Object ]) }, zIndex: { type: mt([String, Number]) } }), JFe = { click: (e) => e instanceof MouseEvent }, eAe = "overlay"; var tAe = G({ name: "ElOverlay", props: QFe, emits: JFe, setup(e, { slots: t, emit: n }) { const r = Nt(eAe), a = (l) => { n("click", l); }, { onClick: o, onMousedown: i, onMouseup: s } = dTe(e.customMaskEvent ? void 0 : a); return () => e.mask ? Z("div", { class: [r.b(), e.overlayClass], style: { zIndex: e.zIndex }, onClick: o, onMousedown: i, onMouseup: s }, [he(t, "default")], Cy.STYLE | Cy.CLASS | Cy.PROPS, ["onClick", "onMouseup", "onMousedown"]) : nn("div", { class: e.overlayClass, style: { zIndex: e.zIndex, position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px" } }, [he(t, "default")]); } }); const nAe = tAe, rAe = Vt({ center: Boolean, alignCenter: Boolean, closeIcon: { type: li }, draggable: Boolean, overflow: Boolean, fullscreen: Boolean, showClose: { type: Boolean, default: !0 }, title: { type: String, default: "" }, ariaLevel: { type: String, default: "2" } }), aAe = Vt({ ...rAe, appendToBody: Boolean, appendTo: { type: mt([String, Object]), default: "body" }, beforeClose: { type: mt(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" } }), oAe = { open: () => !0, opened: () => !0, close: () => !0, closed: () => !0, [dr]: (e) => $s(e), openAutoFocus: () => !0, closeAutoFocus: () => !0 }, iAe = (e, t) => { var n; const r = tt().emit, { nextZIndex: a } = WS(); let o = ""; const i = Yu(), s = Yu(), l = U(!1), u = U(!1), c = U(!1), d = U((n = e.zIndex) != null ? n : a()); let f, h; const p = $w("namespace", t0), v = O(() => { const L = {}, z = `--${p.value}-dialog`; return e.fullscreen || (e.top && (L[`${z}-margin-top`] = e.top), e.width && (L[`${z}-width`] = Df(e.width))), L; }), m = O(() => e.alignCenter ? { display: "flex" } : {}); function g() { r("opened"); } function y() { r("closed"), r(dr, !1), e.destroyOnClose && (c.value = !1); } function x() { r("close"); } function w() { h == null || h(), f == null || f(), e.openDelay && e.openDelay > 0 ? { stop: f } = fO(() => _(), e.openDelay) : _(); } function k() { f == null || f(), h == null || h(), e.closeDelay && e.closeDelay > 0 ? { stop: h } = fO(() => T(), e.closeDelay) : T(); } function C() { function L(z) { z || (u.value = !0, l.value = !1); } e.beforeClose ? e.beforeClose(L) : k(); } function S() { e.closeOnClickModal && C(); } function _() { ar && (l.value = !0); } function T() { l.value = !1; } function F() { r("openAutoFocus"); } function A() { r("closeAutoFocus"); } function I(L) { var z; ((z = L.detail) == null ? void 0 : z.focusReason) === "pointer" && L.preventDefault(); } e.lockScroll && r6e(l); function N() { e.closeOnPressEscape && C(); } return be(() => e.modelValue, (L) => { L ? (u.value = !1, w(), c.value = !0, d.value = lz(e.zIndex) ? a() : d.value++, We(() => { r("open"), t.value && (t.value.scrollTop = 0); })) : l.value && k(); }), be(() => e.fullscreen, (L) => { t.value && (L ? (o = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = o); }), nt(() => { e.modelValue && (l.value = !0, c.value = !0, w()); }), { afterEnter: g, afterLeave: y, beforeLeave: x, handleClose: C, onModalClick: S, close: k, doClose: T, onOpenAutoFocus: F, onCloseAutoFocus: A, onCloseRequested: N, onFocusoutPrevented: I, titleId: i, bodyId: s, closed: u, style: v, overlayDialogStyle: m, rendered: c, visible: l, zIndex: d }; }, sAe = Vt({ ...aAe, 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" } }), lAe = oAe, uAe = G({ name: "ElDrawer", inheritAttrs: !1 }), cAe = /* @__PURE__ */ G({ ...uAe, props: sAe, emits: lAe, setup(e, { expose: t }) { const n = e, r = _r(); od({ 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" }, O(() => !!r.title)); const a = U(), o = U(), i = Nt("drawer"), { t: s } = vi(), { afterEnter: l, afterLeave: u, beforeLeave: c, visible: d, rendered: f, titleId: h, bodyId: p, zIndex: v, onModalClick: m, onOpenAutoFocus: g, onCloseAutoFocus: y, onFocusoutPrevented: x, onCloseRequested: w, handleClose: k } = iAe(n, a), C = O(() => n.direction === "rtl" || n.direction === "ltr"), S = O(() => Df(n.size)); return t({ handleClose: k, afterEnter: l, afterLeave: u }), (_, T) => ($(), ae(b(Jz), { to: _.appendTo, disabled: _.appendTo !== "body" ? !1 : !_.appendToBody }, { default: q(() => [ Z(lr, { name: b(i).b("fade"), onAfterEnter: b(l), onAfterLeave: b(u), onBeforeLeave: b(c), persisted: "" }, { default: q(() => [ qe(Z(b(nAe), { mask: _.modal, "overlay-class": _.modalClass, "z-index": b(v), onClick: b(m) }, { default: q(() => [ Z(b(Zz), { loop: "", trapped: b(d), "focus-trap-el": a.value, "focus-start-el": o.value, onFocusAfterTrapped: b(g), onFocusAfterReleased: b(y), onFocusoutPrevented: b(x), onReleaseRequested: b(w) }, { default: q(() => [ K("div", Dt({ ref_key: "drawerRef", ref: a, "aria-modal": "true", "aria-label": _.title || void 0, "aria-labelledby": _.title ? void 0 : b(h), "aria-describedby": b(p) }, _.$attrs, { class: [b(i).b(), _.direction, b(d) && "open"], style: b(C) ? "width: " + b(S) : "height: " + b(S), role: "dialog", onClick: et(() => { }, ["stop"]) }), [ K("span", { ref_key: "focusStartRef", ref: o, class: H(b(i).e("sr-focus")), tabindex: "-1" }, null, 2), _.withHeader ? ($(), B("header", { key: 0, class: H(b(i).e("header")) }, [ _.$slots.title ? he(_.$slots, "title", { key: 1 }, () => [ te(" DEPRECATED SLOT ") ]) : he(_.$slots, "header", { key: 0, close: b(k), titleId: b(h), titleClass: b(i).e("title") }, () => [ _.$slots.title ? te("v-if", !0) : ($(), B("span", { key: 0, id: b(h), role: "heading", "aria-level": _.headerAriaLevel, class: H(b(i).e("title")) }, _e(_.title), 11, ["id", "aria-level"])) ]), _.showClose ? ($(), B("button", { key: 2, "aria-label": b(s)("el.drawer.close"), class: H(b(i).e("close-btn")), type: "button", onClick: b(k) }, [ Z(b(tr), { class: H(b(i).e("close")) }, { default: q(() => [ Z(b(O5)) ]), _: 1 }, 8, ["class"]) ], 10, ["aria-label", "onClick"])) : te("v-if", !0) ], 2)) : te("v-if", !0), b(f) ? ($(), B("div", { key: 1, id: b(p), class: H(b(i).e("body")) }, [ he(_.$slots, "default") ], 10, ["id"])) : te("v-if", !0), _.$slots.footer ? ($(), B("div", { key: 2, class: H(b(i).e("footer")) }, [ he(_.$slots, "footer") ], 2)) : te("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"]), [ [ct, b(d)] ]) ]), _: 3 }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"]) ]), _: 3 }, 8, ["to", "disabled"])); } }); var dAe = /* @__PURE__ */ Mt(cAe, [["__file", "drawer.vue"]]); const nE = Tr(dAe), pAe = /* @__PURE__ */ G({ inheritAttrs: !1 }); function fAe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var hAe = /* @__PURE__ */ Mt(pAe, [["render", fAe], ["__file", "collection.vue"]]); const vAe = /* @__PURE__ */ G({ name: "ElCollectionItem", inheritAttrs: !1 }); function gAe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var mAe = /* @__PURE__ */ Mt(vAe, [["render", gAe], ["__file", "collection-item.vue"]]); const yAe = "data-el-collection-item", bAe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...hAe, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${yAe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...mAe, name: n, setup(s, { attrs: l }) { const u = U(null), c = $e(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Ct(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, Fk = Vt({ trigger: K0.trigger, effect: { ...eo.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: eo.teleported }); Vt({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: li } }); Vt({ onKeydown: { type: mt(Function) } }); bAe("Dropdown"); const EV = Symbol("elPaginationKey"), wAe = Vt({ disabled: Boolean, currentPage: { type: Number, default: 1 }, prevText: { type: String }, prevIcon: { type: li } }), xAe = { click: (e) => e instanceof MouseEvent }, kAe = G({ name: "ElPaginationPrev" }), CAe = /* @__PURE__ */ G({ ...kAe, props: wAe, emits: xAe, setup(e) { const t = e, { t: n } = vi(), r = O(() => t.disabled || t.currentPage <= 1); return (a, o) => ($(), B("button", { type: "button", class: "btn-prev", disabled: b(r), "aria-label": a.prevText || b(n)("el.pagination.prev"), "aria-disabled": b(r), onClick: (i) => a.$emit("click", i) }, [ a.prevText ? ($(), B("span", { key: 0 }, _e(a.prevText), 1)) : ($(), ae(b(tr), { key: 1 }, { default: q(() => [ ($(), ae(dt(a.prevIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var SAe = /* @__PURE__ */ Mt(CAe, [["__file", "prev.vue"]]); const EAe = Vt({ disabled: Boolean, currentPage: { type: Number, default: 1 }, pageCount: { type: Number, default: 50 }, nextText: { type: String }, nextIcon: { type: li } }), _Ae = G({ name: "ElPaginationNext" }), TAe = /* @__PURE__ */ G({ ..._Ae, props: EAe, emits: ["click"], setup(e) { const t = e, { t: n } = vi(), r = O(() => t.disabled || t.currentPage === t.pageCount || t.pageCount === 0); return (a, o) => ($(), B("button", { type: "button", class: "btn-next", disabled: b(r), "aria-label": a.nextText || b(n)("el.pagination.next"), "aria-disabled": b(r), onClick: (i) => a.$emit("click", i) }, [ a.nextText ? ($(), B("span", { key: 0 }, _e(a.nextText), 1)) : ($(), ae(b(tr), { key: 1 }, { default: q(() => [ ($(), ae(dt(a.nextIcon))) ]), _: 1 })) ], 8, ["disabled", "aria-label", "aria-disabled", "onClick"])); } }); var $Ae = /* @__PURE__ */ Mt(TAe, [["__file", "next.vue"]]); const _V = Symbol("ElSelectGroup"), Aw = Symbol("ElSelect"); function OAe(e, t) { const n = $e(Aw), r = $e(_V, { disabled: !1 }), a = O(() => c(wu(n.props.modelValue), e.value)), o = O(() => { var h; if (n.props.multiple) { const p = wu((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = O(() => e.label || (Gr(e.value) ? "" : e.value)), s = O(() => e.value || e.label || ""), l = O(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (Gr(e.value)) { const v = n.props.valueKey; return h && h.some((m) => xo(ul(m, v)) === ul(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(g8e(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => 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 && Gr(h) && Gr(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const FAe = G({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = Nt("select"), n = Yu(), r = O(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = en({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = OAe(e, a), { visible: d, hover: f } = gr(a), h = tt().proxy; l.onOptionCreate(h), Ct(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((y) => y.value === h.value); We(() => { 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: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function AAe(e, t, n, r, a, o) { return qe(($(), B("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: et(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ K("span", null, _e(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ct, e.visible] ]); } var rE = /* @__PURE__ */ Mt(FAe, [["render", AAe], ["__file", "option.vue"]]); const IAe = G({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = $e(Aw), t = Nt("select"), n = O(() => e.props.popperClass), r = O(() => e.props.multiple), a = O(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), us(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function PAe(e, t, n, r, a, o) { return $(), B("div", { class: H([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Qe({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : te("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? ($(), B("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : te("v-if", !0) ], 6); } var LAe = /* @__PURE__ */ Mt(IAe, [["render", PAe], ["__file", "select-dropdown.vue"]]); const NAe = 11, MAe = (e, t) => { const { t: n } = vi(), r = Yu(), a = Nt("select"), o = Nt("input"), i = en({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = KS({ afterComposition: (R) => ce(R) }), { wrapperRef: S, isFocused: _ } = zz(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(R) { var ie, Ie; return ((ie = u.value) == null ? void 0 : ie.isFocusInsideContent(R)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(R)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), F = U(), { form: A, formItem: I } = fc(), { inputId: N } = lm(e, { formItemContext: I }), { valueOnClear: L, isEmptyValue: z } = Hz(e), P = O(() => e.disabled || (A == null ? void 0 : A.disabled)), D = O(() => Ka(e.modelValue) ? e.modelValue.length > 0 : !z(e.modelValue)), M = O(() => e.clearable && !P.value && i.inputHovering && D.value), V = O(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Q = O(() => a.is("reverse", V.value && T.value)), X = O(() => (I == null ? void 0 : I.validateState) || ""), ee = O(() => yz[X.value]), ue = O(() => e.remote ? 300 : 0), ve = O(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = O(() => se.value.filter((R) => R.visible).length), se = O(() => { const R = Array.from(i.options.values()), ie = []; return i.optionValues.forEach((Ie) => { const Ke = R.findIndex((Jt) => Jt.value === Ie); Ke > -1 && ie.push(R[Ke]); }), ie.length >= R.length ? ie : R; }), ne = O(() => Array.from(i.cachedOptions.values())), W = O(() => { const R = se.value.filter((ie) => !ie.created).some((ie) => ie.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !R; }), Y = () => { e.filterable && Mr(e.filterMethod) || e.filterable && e.remote && Mr(e.remoteMethod) || se.value.forEach((R) => { var ie; (ie = R.updateOption) == null || ie.call(R, i.inputValue); }); }, re = Zu(), we = O(() => ["small"].includes(re.value) ? "small" : "default"), Oe = O({ get() { return T.value && ve.value !== !1; }, set(R) { T.value = R; } }), Ne = O(() => { if (e.multiple && !fl(e.modelValue)) return wu(e.modelValue).length === 0 && !i.inputValue; const R = Ka(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || fl(R) ? !i.inputValue : !0; }), xe = O(() => { var R; const ie = (R = e.placeholder) != null ? R : n("el.select.placeholder"); return e.multiple || !D.value ? ie : i.selectedLabel; }), Fe = O(() => x5 ? null : "mouseenter"); be(() => e.modelValue, (R, ie) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !ms(R, ie) && e.validateEvent && (I == null || I.validate("change").catch((Ie) => xr(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (R) => { R ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", R); }), be(() => i.options.entries(), () => { var R; if (!ar) return; const ie = ((R = s.value) == null ? void 0 : R.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !fl(e.modelValue) || !Array.from(ie).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (R) => { Dn(R) && R > -1 ? F.value = se.value[R] || {} : F.value = {}, se.value.forEach((ie) => { ie.hover = F.value === ie; }); }), Wd(() => { i.isBeforeHide || Y(); }); const Se = (R) => { i.previousQuery === R || x.value || (i.previousQuery = R, e.filterable && Mr(e.filterMethod) ? e.filterMethod(R) : e.filterable && e.remote && Mr(e.remoteMethod) && e.remoteMethod(R), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? We(Pe) : We(De)); }, Pe = () => { const R = se.value.filter((Ke) => Ke.visible && !Ke.disabled && !Ke.states.groupDisabled), ie = R.find((Ke) => Ke.created), Ie = R[0]; i.hoveringIndex = Te(se.value, ie || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ie = Ka(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = He(ie); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const R = []; fl(e.modelValue) || wu(e.modelValue).forEach((ie) => { R.push(He(ie)); }), i.selected = R; }, He = (R) => { let ie; const Ie = bk(R).toLowerCase() === "object", Ke = bk(R).toLowerCase() === "null", Jt = bk(R).toLowerCase() === "undefined"; for (let cn = i.cachedOptions.size - 1; cn >= 0; cn--) { const tn = ne.value[cn]; if (Ie ? ul(tn.value, e.valueKey) === ul(R, e.valueKey) : tn.value === R) { ie = { value: R, currentLabel: tn.currentLabel, get isDisabled() { return tn.isDisabled; } }; break; } } if (ie) return ie; const fn = Ie ? R.label : !Ke && !Jt ? R : ""; return { value: R, currentLabel: fn }; }, De = () => { i.hoveringIndex = se.value.findIndex((R) => i.selected.some((ie) => Qt(ie) === Qt(R))); }, Xe = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, Ge = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ze = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var R, ie; (ie = (R = u.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, j = () => { var R, ie; (ie = (R = c.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, le = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, ce = (R) => { if (i.inputValue = R.target.value, e.remote) oe(); else return le(); }, oe = sz(() => { le(); }, ue.value), ke = (R) => { ms(e.modelValue, R) || t($d, R); }, fe = (R) => u8e(R, (ie) => !i.disabledOptions.has(ie)), Ee = (R) => { if (e.multiple && R.code !== Ar.delete && R.target.value.length <= 0) { const ie = wu(e.modelValue).slice(), Ie = fe(ie); if (Ie < 0) return; const Ke = ie[Ie]; ie.splice(Ie, 1), t(dr, ie), ke(ie), t("remove-tag", Ke); } }, Ve = (R, ie) => { const Ie = i.selected.indexOf(ie); if (Ie > -1 && !P.value) { const Ke = wu(e.modelValue).slice(); Ke.splice(Ie, 1), t(dr, Ke), ke(Ke), t("remove-tag", ie.value); } R.stopPropagation(), wt(); }, je = (R) => { R.stopPropagation(); const ie = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ie.push(Ie.value); t(dr, ie), ke(ie), i.hoveringIndex = -1, T.value = !1, t("clear"), wt(); }, me = (R) => { var ie; if (e.multiple) { const Ie = wu((ie = e.modelValue) != null ? ie : []).slice(), Ke = Te(Ie, R.value); Ke > -1 ? Ie.splice(Ke, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(R.value), t(dr, Ie), ke(Ie), R.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(dr, R.value), ke(R.value), T.value = !1; wt(), !T.value && We(() => { Ce(R); }); }, Te = (R = [], ie) => { if (!Gr(ie)) return R.indexOf(ie); const Ie = e.valueKey; let Ke = -1; return R.some((Jt, fn) => xo(ul(Jt, Ie)) === ul(ie, Ie) ? (Ke = fn, !0) : !1), Ke; }, Ce = (R) => { var ie, Ie, Ke, Jt, fn; const cn = Ka(R) ? R[0] : R; let tn = null; if (cn != null && cn.value) { const Xt = se.value.filter((Ur) => Ur.value === cn.value); Xt.length > 0 && (tn = Xt[0].$el); } if (u.value && tn) { const Xt = (Jt = (Ke = (Ie = (ie = u.value) == null ? void 0 : ie.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : Ke.querySelector) == null ? void 0 : Jt.call(Ke, `.${a.be("dropdown", "wrap")}`); Xt && fz(Xt, tn); } (fn = y.value) == null || fn.handleScroll(); }, Le = (R) => { i.options.set(R.value, R), i.cachedOptions.set(R.value, R), R.disabled && i.disabledOptions.set(R.value, R); }, bt = (R, ie) => { i.options.get(R) === ie && i.options.delete(R); }, pt = O(() => { var R, ie; return (ie = (R = u.value) == null ? void 0 : R.popperRef) == null ? void 0 : ie.contentRef; }), Tt = () => { i.isBeforeHide = !1, We(() => Ce(i.selected)); }, wt = () => { var R; (R = d.value) == null || R.focus(); }, St = () => { var R; (R = d.value) == null || R.blur(); }, rn = (R) => { je(R); }, Bt = () => { T.value = !1, _.value && St(); }, Gt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, sn = () => { P.value || (x5 && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, an = () => { T.value ? se.value[i.hoveringIndex] && me(se.value[i.hoveringIndex]) : sn(); }, Qt = (R) => Gr(R.value) ? ul(R.value, e.valueKey) : R.value, Sn = O(() => se.value.filter((R) => R.visible).every((R) => R.disabled)), En = O(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = O(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Et = (R) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { R === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : R === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ie = se.value[i.hoveringIndex]; (ie.disabled === !0 || ie.states.groupDisabled === !0 || !ie.visible) && Et(R), We(() => Ce(F.value)); } }, Rt = () => { if (!l.value) return 0; const R = window.getComputedStyle(l.value); return Number.parseFloat(R.gap || "6px"); }, qt = O(() => { const R = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - R : i.selectionWidth}px` }; }), _n = O(() => ({ maxWidth: `${i.selectionWidth}px` })), $r = O(() => ({ width: `${Math.max(i.calculatorWidth, NAe)}px` })); return us(l, Xe), us(f, Ge), us(v, E), us(S, E), us(m, j), us(g, Ze), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: se, hoverOption: F, selectSize: re, filteredOptionsCount: ge, resetCalculatorWidth: Ge, updateTooltip: E, updateTagTooltip: j, debouncedOnInputChange: oe, onInput: ce, deletePrevTag: Ee, deleteTag: Ve, deleteSelected: je, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: D, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: Fe, showClose: M, iconComponent: V, iconReverse: Q, validateState: X, validateIcon: ee, showNewOption: W, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: bt, handleMenuEnter: Tt, focus: wt, blur: St, handleClearClick: rn, handleClickOutside: Bt, handleEsc: Gt, toggleMenu: sn, selectOption: an, getValueKey: Qt, navigateOptions: Et, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: $r, popperRef: pt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var DAe = G({ name: "ElOptions", setup(e, { slots: t }) { const n = $e(Aw); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.call(t), s = []; function l(u) { Ka(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(!co(c.children) && !Ka(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) : Ka(c.children) && l(c.children); }); } return i.length && l((o = i[0]) == null ? void 0 : o.children), ms(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const BAe = Vt({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Bl, effect: { type: mt(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: mt(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: li, default: Cw }, fitInputWidth: Boolean, suffixIcon: { type: li, default: NS }, tagType: { ...G0.type, default: "info" }, tagEffect: { ...G0.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: mt(String), values: om, default: "bottom-start" }, fallbackPlacements: { type: mt(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...jz, ...pc(["ariaLabel"]) }), DF = "ElSelect", RAe = G({ name: DF, componentName: DF, components: { ElSelectMenu: LAe, ElOption: rE, ElOptions: DAe, ElTag: Uf, ElScrollbar: YS, ElTooltip: Ab, ElIcon: tr }, directives: { ClickOutside: rV }, props: BAe, emits: [ dr, $d, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = O(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return Ka(o) ? i ? o : s : i ? s : o; }), r = en({ ...gr(e), modelValue: n }), a = MAe(r, t); return rt(Aw, en({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function zAe(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = f2("click-outside"); return qe(($(), B("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [h2(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ Z(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: q(() => { var p; return [ K("div", { ref: "wrapperRef", class: H([ 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: et(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? ($(), B("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : te("v-if", !0), K("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ ($(!0), B(Ue, null, yt(e.showTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? ($(), ae(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: q(() => [ K("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.collapseTagStyle) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + _e(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: q(() => [ K("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ ($(!0), B(Ue, null, yt(e.collapseTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(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: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : te("v-if", !0) ]) : te("v-if", !0), e.selectDisabled ? te("v-if", !0) : ($(), B("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ qe(K("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: H([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Qe(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: [ gn(et((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(et((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(et(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(et(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(et(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: et(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"]), [ [$g, e.states.inputValue] ]), e.filterable ? ($(), B("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: _e(e.states.inputValue) }, null, 10, ["textContent"])) : te("v-if", !0) ], 2)), e.shouldShowPlaceholder ? ($(), B("div", { key: 2, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ K("span", null, _e(e.currentPlaceholder), 1) ]) : ($(), B("span", { key: 1 }, _e(e.currentPlaceholder), 1)) ], 2)) : te("v-if", !0) ], 2), K("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? ($(), ae(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: q(() => [ ($(), ae(dt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), e.showClose && e.clearIcon ? ($(), ae(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: q(() => [ ($(), ae(dt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0), e.validateState && e.validateIcon ? ($(), ae(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: q(() => [ ($(), ae(dt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: q(() => [ Z(f, { ref: "menuRef" }, { default: q(() => [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : te("v-if", !0), qe(Z(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: H([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: q(() => [ e.showNewOption ? ($(), ae(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : te("v-if", !0), Z(c, null, { default: q(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ct, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? ($(), B("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? ($(), B("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ K("span", null, _e(e.emptyText), 1) ]) ], 2)) : te("v-if", !0), e.$slots.footer ? ($(), B("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : te("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 VAe = /* @__PURE__ */ Mt(RAe, [["render", zAe], ["__file", "select.vue"]]); const jAe = G({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Nt("select"), n = U(null), r = tt(), a = U([]); rt(_V, en({ ...gr(e) })); const o = O(() => a.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 = wu(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 = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), t3e(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function HAe(e, t, n, r, a, o) { return qe(($(), B("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ K("li", { class: H(e.ns.be("group", "title")) }, _e(e.label), 3), K("li", null, [ K("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [ct, e.visible] ]); } var TV = /* @__PURE__ */ Mt(jAe, [["render", HAe], ["__file", "option-group.vue"]]); const um = Tr(VAe, { Option: rE, OptionGroup: TV }), Iw = Xi(rE); Xi(TV); const aE = () => $e(EV, {}), UAe = Vt({ pageSize: { type: Number, required: !0 }, pageSizes: { type: mt(Array), default: () => xu([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String }, disabled: Boolean, teleported: Boolean, size: { type: String, values: _w }, appendSizeTo: String }), qAe = G({ name: "ElPaginationSizes" }), WAe = /* @__PURE__ */ G({ ...qAe, props: UAe, emits: ["page-size-change"], setup(e, { emit: t }) { const n = e, { t: r } = vi(), a = Nt("pagination"), o = aE(), i = U(n.pageSize); be(() => n.pageSizes, (u, c) => { if (!ms(u, c) && Array.isArray(u)) { const d = u.includes(n.pageSize) ? n.pageSize : n.pageSizes[0]; t("page-size-change", d); } }), be(() => n.pageSize, (u) => { i.value = u; }); const s = O(() => n.pageSizes); function l(u) { var c; u !== i.value && (i.value = u, (c = o.handleSizeChange) == null || c.call(o, Number(u))); } return (u, c) => ($(), B("span", { class: H(b(a).e("sizes")) }, [ Z(b(um), { "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: q(() => [ ($(!0), B(Ue, null, yt(b(s), (d) => ($(), ae(b(Iw), { key: d, value: d, label: d + b(r)("el.pagination.pagesize") }, null, 8, ["value", "label"]))), 128)) ]), _: 1 }, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"]) ], 2)); } }); var KAe = /* @__PURE__ */ Mt(WAe, [["__file", "sizes.vue"]]); const GAe = Vt({ size: { type: String, values: _w } }), XAe = G({ name: "ElPaginationJumper" }), YAe = /* @__PURE__ */ G({ ...XAe, props: GAe, setup(e) { const { t } = vi(), n = Nt("pagination"), { pageCount: r, disabled: a, currentPage: o, changeEvent: i } = aE(), s = U(), l = O(() => { var d; return (d = s.value) != null ? d : o == null ? void 0 : o.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) => ($(), B("span", { class: H(b(n).e("jump")), disabled: b(a) }, [ K("span", { class: H([b(n).e("goto")]) }, _e(b(t)("el.pagination.goto")), 3), Z(b(Ow), { size: d.size, class: H([b(n).e("editor"), b(n).is("in-pagination")]), min: 1, max: b(r), disabled: b(a), "model-value": b(l), "validate-event": !1, "aria-label": b(t)("el.pagination.page"), type: "number", "onUpdate:modelValue": u, onChange: c }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]), K("span", { class: H([b(n).e("classifier")]) }, _e(b(t)("el.pagination.pageClassifier")), 3) ], 10, ["disabled"])); } }); var ZAe = /* @__PURE__ */ Mt(YAe, [["__file", "jumper.vue"]]); const QAe = Vt({ total: { type: Number, default: 1e3 } }), JAe = G({ name: "ElPaginationTotal" }), eIe = /* @__PURE__ */ G({ ...JAe, props: QAe, setup(e) { const { t } = vi(), n = Nt("pagination"), { disabled: r } = aE(); return (a, o) => ($(), B("span", { class: H(b(n).e("total")), disabled: b(r) }, _e(b(t)("el.pagination.total", { total: a.total })), 11, ["disabled"])); } }); var tIe = /* @__PURE__ */ Mt(eIe, [["__file", "total.vue"]]); const nIe = Vt({ currentPage: { type: Number, default: 1 }, pageCount: { type: Number, required: !0 }, pagerCount: { type: Number, default: 7 }, disabled: Boolean }), rIe = G({ name: "ElPaginationPager" }), aIe = /* @__PURE__ */ G({ ...rIe, props: nIe, emits: ["change"], setup(e, { emit: t }) { const n = e, r = Nt("pager"), a = Nt("icon"), { t: o } = vi(), i = U(!1), s = U(!1), l = U(!1), u = U(!1), c = U(!1), d = U(!1), f = O(() => { const w = n.pagerCount, k = (w - 1) / 2, C = Number(n.currentPage), S = Number(n.pageCount); let _ = !1, T = !1; S > w && (C > w - k && (_ = !0), C < S - k && (T = !0)); const F = []; if (_ && !T) { const A = S - (w - 2); for (let I = A; I < S; I++) F.push(I); } else if (!_ && T) for (let A = 2; A < w; A++) F.push(A); else if (_ && T) { const A = Math.floor(w / 2) - 1; for (let I = C - A; I <= C + A; I++) F.push(I); } else for (let A = 2; A < S; A++) F.push(A); return F; }), h = O(() => [ "more", "btn-quickprev", a.b(), r.is("disabled", n.disabled) ]), p = O(() => [ "more", "btn-quicknext", a.b(), r.is("disabled", n.disabled) ]), v = O(() => n.disabled ? -1 : 0); Wd(() => { const w = (n.pagerCount - 1) / 2; i.value = !1, s.value = !1, n.pageCount > n.pagerCount && (n.currentPage > n.pagerCount - w && (i.value = !0), n.currentPage < n.pageCount - w && (s.value = !0)); }); function m(w = !1) { n.disabled || (w ? l.value = !0 : u.value = !0); } function g(w = !1) { w ? c.value = !0 : d.value = !0; } function y(w) { const k = w.target; if (k.tagName.toLowerCase() === "li" && Array.from(k.classList).includes("number")) { const C = Number(k.textContent); C !== n.currentPage && t("change", C); } else k.tagName.toLowerCase() === "li" && Array.from(k.classList).includes("more") && x(w); } function x(w) { const k = w.target; if (k.tagName.toLowerCase() === "ul" || n.disabled) return; let C = Number(k.textContent); const S = n.pageCount, _ = n.currentPage, T = n.pagerCount - 2; k.className.includes("more") && (k.className.includes("quickprev") ? C = _ - T : k.className.includes("quicknext") && (C = _ + T)), Number.isNaN(+C) || (C < 1 && (C = 1), C > S && (C = S)), C !== _ && t("change", C); } return (w, k) => ($(), B("ul", { class: H(b(r).b()), onClick: x, onKeyup: gn(y, ["enter"]) }, [ w.pageCount > 0 ? ($(), B("li", { key: 0, class: H([[ b(r).is("active", w.currentPage === 1), b(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === 1, "aria-label": b(o)("el.pagination.currentPage", { pager: 1 }), tabindex: b(v) }, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : te("v-if", !0), i.value ? ($(), B("li", { key: 1, class: H(b(h)), tabindex: b(v), "aria-label": b(o)("el.pagination.prevPages", { pager: w.pagerCount - 2 }), onMouseenter: (C) => m(!0), onMouseleave: (C) => l.value = !1, onFocus: (C) => g(!0), onBlur: (C) => c.value = !1 }, [ (l.value || c.value) && !w.disabled ? ($(), ae(b(F8e), { key: 0 })) : ($(), ae(b(nF), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : te("v-if", !0), ($(!0), B(Ue, null, yt(b(f), (C) => ($(), B("li", { key: C, class: H([[ b(r).is("active", w.currentPage === C), b(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === C, "aria-label": b(o)("el.pagination.currentPage", { pager: C }), tabindex: b(v) }, _e(C), 11, ["aria-current", "aria-label", "tabindex"]))), 128)), s.value ? ($(), B("li", { key: 2, class: H(b(p)), tabindex: b(v), "aria-label": b(o)("el.pagination.nextPages", { pager: w.pagerCount - 2 }), onMouseenter: (C) => m(), onMouseleave: (C) => u.value = !1, onFocus: (C) => g(), onBlur: (C) => d.value = !1 }, [ (u.value || d.value) && !w.disabled ? ($(), ae(b(I8e), { key: 0 })) : ($(), ae(b(nF), { key: 1 })) ], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : te("v-if", !0), w.pageCount > 1 ? ($(), B("li", { key: 3, class: H([[ b(r).is("active", w.currentPage === w.pageCount), b(r).is("disabled", w.disabled) ], "number"]), "aria-current": w.currentPage === w.pageCount, "aria-label": b(o)("el.pagination.currentPage", { pager: w.pageCount }), tabindex: b(v) }, _e(w.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : te("v-if", !0) ], 42, ["onKeyup"])); } }); var oIe = /* @__PURE__ */ Mt(aIe, [["__file", "pager.vue"]]); const Ha = (e) => typeof e != "number", iIe = Vt({ pageSize: Number, defaultPageSize: Number, total: Number, pageCount: Number, pagerCount: { type: Number, validator: (e) => Dn(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: mt(Array), default: () => xu([10, 20, 30, 40, 50, 100]) }, popperClass: { type: String, default: "" }, prevText: { type: String, default: "" }, prevIcon: { type: li, default: () => MS }, nextText: { type: String, default: "" }, nextIcon: { type: li, default: () => kw }, teleported: { type: Boolean, default: !0 }, small: Boolean, size: Bl, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean, appendSizeTo: String }), sIe = { "update:current-page": (e) => Dn(e), "update:page-size": (e) => Dn(e), "size-change": (e) => Dn(e), change: (e, t) => Dn(e) && Dn(t), "current-change": (e) => Dn(e), "prev-click": (e) => Dn(e), "next-click": (e) => Dn(e) }, BF = "ElPagination"; var lIe = G({ name: BF, props: iIe, emits: sIe, setup(e, { emit: t, slots: n }) { const { t: r } = vi(), a = Nt("pagination"), o = tt().vnode.props || {}, i = Rz(), s = O(() => { var k; return e.small ? "small" : (k = e.size) != null ? k : i.value; }); od({ from: "small", replacement: "size", version: "3.0.0", scope: "el-pagination", ref: "https://element-plus.org/zh-CN/component/pagination.html" }, O(() => !!e.small)); const l = "onUpdate:currentPage" in o || "onUpdate:current-page" in o || "onCurrentChange" in o, u = "onUpdate:pageSize" in o || "onUpdate:page-size" in o || "onSizeChange" in o, c = O(() => { if (Ha(e.total) && Ha(e.pageCount) || !Ha(e.currentPage) && !l) return !1; if (e.layout.includes("sizes")) { if (Ha(e.pageCount)) { if (!Ha(e.total) && !Ha(e.pageSize) && !u) return !1; } else if (!u) return !1; } return !0; }), d = U(Ha(e.defaultPageSize) ? 10 : e.defaultPageSize), f = U(Ha(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), h = O({ get() { return Ha(e.pageSize) ? d.value : e.pageSize; }, set(k) { Ha(e.pageSize) && (d.value = k), u && (t("update:page-size", k), t("size-change", k)); } }), p = O(() => { let k = 0; return Ha(e.pageCount) ? Ha(e.total) || (k = Math.max(1, Math.ceil(e.total / h.value))) : k = e.pageCount, k; }), v = O({ get() { return Ha(e.currentPage) ? f.value : e.currentPage; }, set(k) { let C = k; k < 1 ? C = 1 : k > p.value && (C = p.value), Ha(e.currentPage) && (f.value = C), l && (t("update:current-page", C), t("current-change", C)); } }); be(p, (k) => { v.value > k && (v.value = k); }), be([v, h], (k) => { t("change", ...k); }, { flush: "post" }); function m(k) { v.value = k; } function g(k) { h.value = k; const C = p.value; v.value > C && (v.value = C); } function y() { e.disabled || (v.value -= 1, t("prev-click", v.value)); } function x() { e.disabled || (v.value += 1, t("next-click", v.value)); } function w(k, C) { k && (k.props || (k.props = {}), k.props.class = [k.props.class, C].join(" ")); } return rt(EV, { pageCount: p, disabled: O(() => e.disabled), currentPage: v, changeEvent: m, handleSizeChange: g }), () => { var k, C; if (!c.value) return xr(BF, r("el.pagination.deprecationWarning")), null; if (!e.layout || e.hideOnSinglePage && p.value <= 1) return null; const S = [], _ = [], T = nn("div", { class: a.e("rightwrapper") }, _), F = { prev: nn(SAe, { disabled: e.disabled, currentPage: v.value, prevText: e.prevText, prevIcon: e.prevIcon, onClick: y }), jumper: nn(ZAe, { size: s.value }), pager: nn(oIe, { currentPage: v.value, pageCount: p.value, pagerCount: e.pagerCount, onChange: m, disabled: e.disabled }), next: nn($Ae, { disabled: e.disabled, currentPage: v.value, pageCount: p.value, nextText: e.nextText, nextIcon: e.nextIcon, onClick: x }), sizes: nn(KAe, { pageSize: h.value, pageSizes: e.pageSizes, popperClass: e.popperClass, disabled: e.disabled, teleported: e.teleported, size: s.value, appendSizeTo: e.appendSizeTo }), slot: (C = (k = n == null ? void 0 : n.default) == null ? void 0 : k.call(n)) != null ? C : null, total: nn(tIe, { total: Ha(e.total) ? 0 : e.total }) }, A = e.layout.split(",").map((N) => N.trim()); let I = !1; return A.forEach((N) => { if (N === "->") { I = !0; return; } I ? _.push(F[N]) : S.push(F[N]); }), w(S[0], a.is("first")), w(S[S.length - 1], a.is("last")), I && _.length > 0 && (w(_[0], a.is("first")), w(_[_.length - 1], a.is("last")), S.push(T)), nn("div", { class: [ a.b(), a.is("background", e.background), a.m(s.value) ] }, S); }; } }); const $V = Tr(lIe), uIe = Vt({ trigger: K0.trigger, placement: Fk.placement, disabled: K0.disabled, visible: eo.visible, transition: eo.transition, popperOptions: Fk.popperOptions, tabindex: Fk.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 } }), cIe = { "update:visible": (e) => $s(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, dIe = "onUpdate:visible", pIe = G({ name: "ElPopover" }), fIe = /* @__PURE__ */ G({ ...pIe, props: uIe, emits: cIe, setup(e, { expose: t, emit: n }) { const r = e, a = O(() => r[dIe]), o = Nt("popover"), i = U(), s = O(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = O(() => [ { width: Df(r.width) }, r.popperStyle ]), u = O(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = O(() => r.transition === `${o.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) => ($(), ae(b(Ab), Dt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: q(() => [ m.title ? ($(), B("div", { key: 0, class: H(b(o).e("title")), role: "title" }, _e(m.title), 3)) : te("v-if", !0), he(m.$slots, "default", {}, () => [ ze(_e(m.content), 1) ]) ]), default: q(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : te("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 hIe = /* @__PURE__ */ Mt(fIe, [["__file", "popover.vue"]]); const RF = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var vIe = { mounted(e, t) { RF(e, t); }, updated(e, t) { RF(e, t); } }; const gIe = "popover", mIe = K8e(vIe, gIe), oE = Tr(hIe, { directive: mIe }); function yIe(e) { let t; const n = U(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { 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()) : (U0(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), U0(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, o(); } const u = G({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = ETe("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = nn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ nn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? nn("p", { class: p.b("text") }, [r.text]) : void 0; return nn(lr, { name: p.b("fade"), onAfterLeave: l }, { default: q(() => [ qe(Z("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ nn("div", { class: p.b("spinner") }, [g, y]) ]), [[ct, r.visible]]) ]) }); }; } }), c = Og(u), d = c.mount(document.createElement("div")); return { ...gr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let S1; const bIe = function(e = {}) { if (!ar) return; const t = wIe(e); if (t.fullscreen && S1) return S1; const n = yIe({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (S1 = void 0); } }); xIe(t, t.parent, n), zF(t, t.parent, n), t.parent.vLoadingAddClassList = () => zF(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), We(() => n.visible.value = t.visible), t.fullscreen && (S1 = n), n; }, wIe = (e) => { var t, n, r, a; let o; return co(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, xIe = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = Wp(document.body, "position"), n.originalOverflow.value = Wp(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = Wp(document.body, "position"), await We(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(Wp(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = Wp(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, zF = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? U0(t, r.bm("parent", "relative")) : $5(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? $5(t, r.bm("parent", "hidden")) : U0(t, r.bm("parent", "hidden")); }, Ey = Symbol("ElLoading"), VF = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => Gr(t.value) ? t.value[f] : void 0, l = (f) => { const h = co(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${v3e(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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[Ey] = { options: d, instance: bIe(d) }; }, kIe = (e, t) => { for (const n of Object.keys(t)) Kn(t[n]) && (t[n].value = e[n]); }, Pw = { mounted(e, t) { t.value && VF(e, t); }, updated(e, t) { const n = e[Ey]; t.oldValue !== t.value && (t.value && !t.oldValue ? VF(e, t) : t.value && t.oldValue ? Gr(t.value) && kIe(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Ey]) == null || t.instance.close(), e[Ey] = null; } }, Zi = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, CIe = { 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); } } } }, SIe = (e) => (ma("data-v-da8a77c1"), e = e(), ya(), e), EIe = { key: 0, class: "container", ref: "container" }, _Ie = /* @__PURE__ */ SIe(() => /* @__PURE__ */ K("div", null, "View data types:", -1)); function TIe(e, t, n, r, a, o) { const i = Bo; return e.categories.All.size > 1 ? ($(), B("div", EIe, [ _Ie, ($(!0), B(Ue, null, yt(e.categories, (s, l) => ($(), B(Ue, null, [ s.size > 0 ? ($(), ae(i, { class: H([{ active: l == e.active }, "tag-button"]), onClick: (u) => o.categoryClicked(l), size: "small", key: l }, { default: q(() => [ ze(_e(l + " (" + s.size + ")"), 1) ]), _: 2 }, 1032, ["class", "onClick"])) : te("", !0) ], 64))), 256)) ], 512)) : te("", !0); } const OV = /* @__PURE__ */ Zi(CIe, [["render", TIe], ["__scopeId", "data-v-da8a77c1"]]); function FV(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: $Ie } = Object.prototype, { getPrototypeOf: iE } = Object, Lw = /* @__PURE__ */ ((e) => (t) => { const n = $Ie.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Qi = (e) => (e = e.toLowerCase(), (t) => Lw(t) === e), Nw = (e) => (t) => typeof t === e, { isArray: Fh } = Array, X0 = Nw("undefined"); function OIe(e) { return e !== null && !X0(e) && e.constructor !== null && !X0(e.constructor) && Io(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const AV = Qi("ArrayBuffer"); function FIe(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && AV(e.buffer), t; } const AIe = Nw("string"), Io = Nw("function"), IV = Nw("number"), Mw = (e) => e !== null && typeof e == "object", IIe = (e) => e === !0 || e === !1, _y = (e) => { if (Lw(e) !== "object") return !1; const t = iE(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, PIe = Qi("Date"), LIe = Qi("File"), NIe = Qi("Blob"), MIe = Qi("FileList"), DIe = (e) => Mw(e) && Io(e.pipe), BIe = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || Io(e.append) && ((t = Lw(e)) === "formdata" || // detect form-data instance t === "object" && Io(e.toString) && e.toString() === "[object FormData]")); }, RIe = Qi("URLSearchParams"), [zIe, VIe, jIe, HIe] = ["ReadableStream", "Request", "Response", "Headers"].map(Qi), UIe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function cm(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, a; if (typeof e != "object" && (e = [e]), Fh(e)) for (r = 0, a = e.length; r < a; r++) t.call(null, e[r], r, e); else { const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length; let s; for (r = 0; r < i; r++) s = o[r], t.call(null, e[s], s, e); } } function PV(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, a; for (; r-- > 0; ) if (a = n[r], t === a.toLowerCase()) return a; return null; } const Wc = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, LV = (e) => !X0(e) && e !== Wc; function M5() { const { caseless: e } = LV(this) && this || {}, t = {}, n = (r, a) => { const o = e && PV(t, a) || a; _y(t[o]) && _y(r) ? t[o] = M5(t[o], r) : _y(r) ? t[o] = M5({}, r) : Fh(r) ? t[o] = r.slice() : t[o] = r; }; for (let r = 0, a = arguments.length; r < a; r++) arguments[r] && cm(arguments[r], n); return t; } const qIe = (e, t, n, { allOwnKeys: r } = {}) => (cm(t, (a, o) => { n && Io(a) ? e[o] = FV(a, n) : e[o] = a; }, { allOwnKeys: r }), e), WIe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), KIe = (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); }, GIe = (e, t, n, r) => { let a, o, i; const s = {}; if (t = t || {}, e == null) return t; do { for (a = Object.getOwnPropertyNames(e), o = a.length; o-- > 0; ) i = a[o], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && iE(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, XIe = (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; }, YIe = (e) => { if (!e) return null; if (Fh(e)) return e; let t = e.length; if (!IV(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, ZIe = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && iE(Uint8Array)), QIe = (e, t) => { const n = (e && e[Symbol.iterator]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const a = r.value; t.call(e, a[0], a[1]); } }, JIe = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, e9e = Qi("HTMLFormElement"), t9e = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), jF = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), n9e = Qi("RegExp"), NV = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; cm(n, (a, o) => { let i; (i = t(a, o, e)) !== !1 && (r[o] = i || a); }), Object.defineProperties(e, r); }, r9e = (e) => { NV(e, (t, n) => { if (Io(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (Io(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 + "'"); }); } }); }, a9e = (e, t) => { const n = {}, r = (a) => { a.forEach((o) => { n[o] = !0; }); }; return Fh(e) ? r(e) : r(String(e).split(t)), n; }, o9e = () => { }, i9e = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Ak = "abcdefghijklmnopqrstuvwxyz", HF = "0123456789", MV = { DIGIT: HF, ALPHA: Ak, ALPHA_DIGIT: Ak + Ak.toUpperCase() + HF }, s9e = (e = 16, t = MV.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function l9e(e) { return !!(e && Io(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const u9e = (e) => { const t = new Array(10), n = (r, a) => { if (Mw(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[a] = r; const o = Fh(r) ? [] : {}; return cm(r, (i, s) => { const l = n(i, a + 1); !X0(l) && (o[s] = l); }), t[a] = void 0, o; } } return r; }; return n(e, 0); }, c9e = Qi("AsyncFunction"), d9e = (e) => e && (Mw(e) || Io(e)) && Io(e.then) && Io(e.catch), DV = ((e, t) => e ? setImmediate : t ? ((n, r) => (Wc.addEventListener("message", ({ source: a, data: o }) => { a === Wc && o === n && r.length && r.shift()(); }, !1), (a) => { r.push(a), Wc.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Io(Wc.postMessage) ), p9e = typeof queueMicrotask < "u" ? queueMicrotask.bind(Wc) : typeof process < "u" && process.nextTick || DV, Re = { isArray: Fh, isArrayBuffer: AV, isBuffer: OIe, isFormData: BIe, isArrayBufferView: FIe, isString: AIe, isNumber: IV, isBoolean: IIe, isObject: Mw, isPlainObject: _y, isReadableStream: zIe, isRequest: VIe, isResponse: jIe, isHeaders: HIe, isUndefined: X0, isDate: PIe, isFile: LIe, isBlob: NIe, isRegExp: n9e, isFunction: Io, isStream: DIe, isURLSearchParams: RIe, isTypedArray: ZIe, isFileList: MIe, forEach: cm, merge: M5, extend: qIe, trim: UIe, stripBOM: WIe, inherits: KIe, toFlatObject: GIe, kindOf: Lw, kindOfTest: Qi, endsWith: XIe, toArray: YIe, forEachEntry: QIe, matchAll: JIe, isHTMLForm: e9e, hasOwnProperty: jF, hasOwnProp: jF, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: NV, freezeMethods: r9e, toObjectSet: a9e, toCamelCase: t9e, noop: o9e, toFiniteNumber: i9e, findKey: PV, global: Wc, isContextDefined: LV, ALPHABET: MV, generateString: s9e, isSpecCompliantForm: l9e, toJSONObject: u9e, isAsyncFn: c9e, isThenable: d9e, setImmediate: DV, asap: p9e }; function Yt(e, t, n, r, a) { 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), a && (this.response = a); } Re.inherits(Yt, 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: Re.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; } }); const BV = Yt.prototype, RV = {}; [ "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) => { RV[e] = { value: e }; }); Object.defineProperties(Yt, RV); Object.defineProperty(BV, "isAxiosError", { value: !0 }); Yt.from = (e, t, n, r, a, o) => { const i = Object.create(BV); return Re.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Yt.call(i, e.message, t, n, r, a), i.cause = e, i.name = e.name, o && Object.assign(i, o), i; }; const f9e = null; function D5(e) { return Re.isPlainObject(e) || Re.isArray(e); } function zV(e) { return Re.endsWith(e, "[]") ? e.slice(0, -2) : e; } function UF(e, t, n) { return e ? e.concat(t).map(function(r, a) { return r = zV(r), !n && a ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function h9e(e) { return Re.isArray(e) && !e.some(D5); } const v9e = Re.toFlatObject(Re, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function Dw(e, t, n) { if (!Re.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = Re.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, p) { return !Re.isUndefined(p[h]); }); const r = n.metaTokens, a = n.visitor || u, o = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && Re.isSpecCompliantForm(t); if (!Re.isFunction(a)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if (Re.isDate(h)) return h.toISOString(); if (!s && Re.isBlob(h)) throw new Yt("Blob is not supported. Use a Buffer instead."); return Re.isArrayBuffer(h) || Re.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 (Re.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), h = JSON.stringify(h); else if (Re.isArray(h) && h9e(h) || (Re.isFileList(h) || Re.endsWith(p, "[]")) && (m = Re.toArray(h))) return p = zV(p), m.forEach(function(g, y) { !(Re.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? UF([p], y, o) : i === null ? p : p + "[]", l(g) ); }), !1; } return D5(h) ? !0 : (t.append(UF(v, p, o), l(h)), !1); } const c = [], d = Object.assign(v9e, { defaultVisitor: u, convertValue: l, isVisitable: D5 }); function f(h, p) { if (!Re.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + p.join(".")); c.push(h), Re.forEach(h, function(v, m) { (!(Re.isUndefined(v) || v === null) && a.call( t, v, Re.isString(m) ? m.trim() : m, p, d )) === !0 && f(v, p ? p.concat(m) : [m]); }), c.pop(); } } if (!Re.isObject(e)) throw new TypeError("data must be an object"); return f(e), t; } function qF(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function sE(e, t) { this._pairs = [], e && Dw(e, this, t); } const VV = sE.prototype; VV.append = function(e, t) { this._pairs.push([e, t]); }; VV.toString = function(e) { const t = e ? function(n) { return e.call(this, n, qF); } : qF; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function g9e(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function jV(e, t, n) { if (!t) return e; const r = n && n.encode || g9e, a = n && n.serialize; let o; if (a ? o = a(t, n) : o = Re.isURLSearchParams(t) ? t.toString() : new sE(t, n).toString(r), o) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o; } return e; } class WF { 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) { Re.forEach(this.handlers, function(n) { n !== null && t(n); }); } } const HV = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, m9e = typeof URLSearchParams < "u" ? URLSearchParams : sE, y9e = typeof FormData < "u" ? FormData : null, b9e = typeof Blob < "u" ? Blob : null, w9e = { isBrowser: !0, classes: { URLSearchParams: m9e, FormData: y9e, Blob: b9e }, protocols: ["http", "https", "file", "blob", "url", "data"] }, lE = typeof window < "u" && typeof document < "u", x9e = ((e) => lE && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), k9e = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", C9e = lE && window.location.href || "http://localhost", S9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: lE, hasStandardBrowserEnv: x9e, hasStandardBrowserWebWorkerEnv: k9e, origin: C9e }, Symbol.toStringTag, { value: "Module" })), zi = { ...S9e, ...w9e }; function E9e(e, t) { return Dw(e, new zi.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, a, o) { return zi.isNode && Re.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, t)); } function _9e(e) { return Re.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function T9e(e) { const t = {}, n = Object.keys(e); let r; const a = n.length; let o; for (r = 0; r < a; r++) o = n[r], t[o] = e[o]; return t; } function UV(e) { function t(n, r, a, o) { let i = n[o++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = o >= n.length; return i = !i && Re.isArray(a) ? a.length : i, l ? (Re.hasOwnProp(a, i) ? a[i] = [a[i], r] : a[i] = r, !s) : ((!a[i] || !Re.isObject(a[i])) && (a[i] = []), t(n, r, a[i], o) && Re.isArray(a[i]) && (a[i] = T9e(a[i])), !s); } if (Re.isFormData(e) && Re.isFunction(e.entries)) { const n = {}; return Re.forEachEntry(e, (r, a) => { t(_9e(r), a, n, 0); }), n; } return null; } function $9e(e, t, n) { if (Re.isString(e)) try { return (t || JSON.parse)(e), Re.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const dm = { transitional: HV, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, a = Re.isObject(e); if (a && Re.isHTMLForm(e) && (e = new FormData(e)), Re.isFormData(e)) return r ? JSON.stringify(UV(e)) : e; if (Re.isArrayBuffer(e) || Re.isBuffer(e) || Re.isStream(e) || Re.isFile(e) || Re.isBlob(e) || Re.isReadableStream(e)) return e; if (Re.isArrayBufferView(e)) return e.buffer; if (Re.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let o; if (a) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return E9e(e, this.formSerializer).toString(); if ((o = Re.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return Dw( o ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return a || r ? (t.setContentType("application/json", !1), $9e(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || dm.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (Re.isResponse(e) || Re.isReadableStream(e)) return e; if (e && Re.isString(e) && (n && !this.responseType || r)) { const a = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (o) { if (a) throw o.name === "SyntaxError" ? Yt.from(o, Yt.ERR_BAD_RESPONSE, this, null, this.response) : o; } } 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: zi.classes.FormData, Blob: zi.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; Re.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { dm.headers[e] = {}; }); const O9e = Re.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" ]), F9e = (e) => { const t = {}; let n, r, a; return e && e.split(` `).forEach(function(o) { a = o.indexOf(":"), n = o.substring(0, a).trim().toLowerCase(), r = o.substring(a + 1).trim(), !(!n || t[n] && O9e[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, KF = Symbol("internals"); function hv(e) { return e && String(e).trim().toLowerCase(); } function Ty(e) { return e === !1 || e == null ? e : Re.isArray(e) ? e.map(Ty) : String(e); } function A9e(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 I9e = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Ik(e, t, n, r, a) { if (Re.isFunction(r)) return r.call(this, t, n); if (a && (t = n), !!Re.isString(t)) { if (Re.isString(r)) return t.indexOf(r) !== -1; if (Re.isRegExp(r)) return r.test(t); } } function P9e(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function L9e(e, t) { const n = Re.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(a, o, i) { return this[r].call(this, t, a, o, i); }, configurable: !0 }); }); } class ho { constructor(t) { t && this.set(t); } set(t, n, r) { const a = this; function o(s, l, u) { const c = hv(l); if (!c) throw new Error("header name must be a non-empty string"); const d = Re.findKey(a, c); (!d || a[d] === void 0 || u === !0 || u === void 0 && a[d] !== !1) && (a[d || l] = Ty(s)); } const i = (s, l) => Re.forEach(s, (u, c) => o(u, c, l)); if (Re.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (Re.isString(t) && (t = t.trim()) && !I9e(t)) i(F9e(t), n); else if (Re.isHeaders(t)) for (const [s, l] of t.entries()) o(l, s, r); else t != null && o(n, t, r); return this; } get(t, n) { if (t = hv(t), t) { const r = Re.findKey(this, t); if (r) { const a = this[r]; if (!n) return a; if (n === !0) return A9e(a); if (Re.isFunction(n)) return n.call(this, a, r); if (Re.isRegExp(n)) return n.exec(a); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = hv(t), t) { const r = Re.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || Ik(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let a = !1; function o(i) { if (i = hv(i), i) { const s = Re.findKey(r, i); s && (!n || Ik(r, r[s], s, n)) && (delete r[s], a = !0); } } return Re.isArray(t) ? t.forEach(o) : o(t), a; } clear(t) { const n = Object.keys(this); let r = n.length, a = !1; for (; r--; ) { const o = n[r]; (!t || Ik(this, this[o], o, t, !0)) && (delete this[o], a = !0); } return a; } normalize(t) { const n = this, r = {}; return Re.forEach(this, (a, o) => { const i = Re.findKey(r, o); if (i) { n[i] = Ty(a), delete n[o]; return; } const s = t ? P9e(o) : String(o).trim(); s !== o && delete n[o], n[s] = Ty(a), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return Re.forEach(this, (r, a) => { r != null && r !== !1 && (n[a] = t && Re.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((a) => r.set(a)), r; } static accessor(t) { const n = (this[KF] = this[KF] = { accessors: {} }).accessors, r = this.prototype; function a(o) { const i = hv(o); n[i] || (L9e(r, o), n[i] = !0); } return Re.isArray(t) ? t.forEach(a) : a(t), this; } } ho.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); Re.reduceDescriptors(ho.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); Re.freezeMethods(ho); function Pk(e, t) { const n = this || dm, r = t || n, a = ho.from(r.headers); let o = r.data; return Re.forEach(e, function(i) { o = i.call(n, o, a.normalize(), t ? t.status : void 0); }), a.normalize(), o; } function qV(e) { return !!(e && e.__CANCEL__); } function Ah(e, t, n) { Yt.call(this, e ?? "canceled", Yt.ERR_CANCELED, t, n), this.name = "CanceledError"; } Re.inherits(Ah, Yt, { __CANCEL__: !0 }); function WV(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Yt( "Request failed with status code " + n.status, [Yt.ERR_BAD_REQUEST, Yt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function N9e(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function M9e(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let a = 0, o = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[o]; i || (i = l), n[a] = s, r[a] = l; let c = o, d = 0; for (; c !== a; ) d += n[c++], c = c % e; if (a = (a + 1) % e, a === o && (o = (o + 1) % e), l - i < t) return; const f = u && l - u; return f ? Math.round(d * 1e3 / f) : void 0; }; } function D9e(e, t) { let n = 0, r = 1e3 / t, a, o; const i = (s, l = Date.now()) => { n = l, a = null, o && (clearTimeout(o), o = null), e.apply(null, s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (a = s, o || (o = setTimeout(() => { o = null, i(a); }, r - u))); }, () => a && i(a)]; } const Ib = (e, t, n = 3) => { let r = 0; const a = M9e(50, 250); return D9e((o) => { const i = o.loaded, s = o.lengthComputable ? o.total : void 0, l = i - r, u = a(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: o, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, GF = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, XF = (e) => (...t) => Re.asap(() => e(...t)), B9e = zi.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(a) { let o = a; return e && (t.setAttribute("href", o), o = t.href), t.setAttribute("href", o), { 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(a) { const o = Re.isString(a) ? r(a) : a; return o.protocol === n.protocol && o.host === n.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), R9e = zi.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, a, o) { const i = [e + "=" + encodeURIComponent(t)]; Re.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), Re.isString(r) && i.push("path=" + r), Re.isString(a) && i.push("domain=" + a), o === !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 z9e(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function V9e(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function KV(e, t) { return e && !z9e(t) ? V9e(e, t) : t; } const YF = (e) => e instanceof ho ? { ...e } : e; function Od(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return Re.isPlainObject(u) && Re.isPlainObject(c) ? Re.merge.call({ caseless: d }, u, c) : Re.isPlainObject(c) ? Re.merge({}, c) : Re.isArray(c) ? c.slice() : c; } function a(u, c, d) { if (Re.isUndefined(c)) { if (!Re.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function o(u, c) { if (!Re.isUndefined(c)) return r(void 0, c); } function i(u, c) { if (Re.isUndefined(c)) { if (!Re.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: o, method: o, data: o, 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) => a(YF(u), YF(c), !0) }; return Re.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const c = l[u] || a, d = c(e[u], t[u], u); Re.isUndefined(d) && c !== s || (n[u] = d); }), n; } const GV = (e) => { const t = Od({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: a, xsrfCookieName: o, headers: i, auth: s } = t; t.headers = i = ho.from(i), t.url = jV(KV(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 (Re.isFormData(n)) { if (zi.hasStandardBrowserEnv || zi.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 (zi.hasStandardBrowserEnv && (r && Re.isFunction(r) && (r = r(t)), r || r !== !1 && B9e(t.url))) { const u = a && o && R9e.read(o); u && i.set(a, u); } return t; }, j9e = typeof XMLHttpRequest < "u", H9e = j9e && function(e) { return new Promise(function(t, n) { const r = GV(e); let a = r.data; const o = ho.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 y = ho.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), x = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: y, config: e, request: v }; WV(function(w) { t(w), p(); }, function(w) { n(w), p(); }, x), 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 Yt("Request aborted", Yt.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new Yt("Network Error", Yt.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let y = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const x = r.transitional || HV; r.timeoutErrorMessage && (y = r.timeoutErrorMessage), n(new Yt( y, x.clarifyTimeoutError ? Yt.ETIMEDOUT : Yt.ECONNABORTED, e, v )), v = null; }, a === void 0 && o.setContentType(null), "setRequestHeader" in v && Re.forEach(o.toJSON(), function(y, x) { v.setRequestHeader(x, y); }), Re.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = Ib(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, f] = Ib(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (u = (y) => { v && (n(!y || y.type ? new Ah(null, e, v) : y), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = N9e(r.url); if (g && zi.protocols.indexOf(g) === -1) { n(new Yt("Unsupported protocol " + g + ":", Yt.ERR_BAD_REQUEST, e)); return; } v.send(a || null); }); }, U9e = (e, t) => { let n = new AbortController(), r; const a = function(l) { if (!r) { r = !0, i(); const u = l instanceof Error ? l : this.reason; n.abort(u instanceof Yt ? u : new Ah(u instanceof Error ? u.message : u)); } }; let o = t && setTimeout(() => { a(new Yt(`timeout ${t} of ms exceeded`, Yt.ETIMEDOUT)); }, t); const i = () => { e && (o && clearTimeout(o), o = null, e.forEach((l) => { l && (l.removeEventListener ? l.removeEventListener("abort", a) : l.unsubscribe(a)); }), e = null); }; e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", a)); const { signal: s } = n; return s.unsubscribe = i, [s, () => { o && clearTimeout(o), o = null; }]; }, q9e = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, a; for (; r < n; ) a = r + t, yield e.slice(r, a), r = a; }, W9e = async function* (e, t, n) { for await (const r of e) yield* q9e(ArrayBuffer.isView(r) ? r : await n(String(r)), t); }, ZF = (e, t, n, r, a) => { const o = W9e(e, t, a); 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 o.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), o.return(); } }, { highWaterMark: 2 }); }, Bw = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", XV = Bw && typeof ReadableStream == "function", B5 = Bw && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), YV = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, K9e = XV && YV(() => { let e = !1; const t = new Request(zi.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), QF = 64 * 1024, R5 = XV && YV(() => Re.isReadableStream(new Response("").body)), Pb = { stream: R5 && ((e) => e.body) }; Bw && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !Pb[t] && (Pb[t] = Re.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Yt(`Response type '${t}' is not supported`, Yt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const G9e = async (e) => { if (e == null) return 0; if (Re.isBlob(e)) return e.size; if (Re.isSpecCompliantForm(e)) return (await new Request(e).arrayBuffer()).byteLength; if (Re.isArrayBufferView(e) || Re.isArrayBuffer(e)) return e.byteLength; if (Re.isURLSearchParams(e) && (e = e + ""), Re.isString(e)) return (await B5(e)).byteLength; }, X9e = async (e, t) => Re.toFiniteNumber(e.getContentLength()) ?? G9e(t), Y9e = Bw && (async (e) => { let { url: t, method: n, data: r, signal: a, cancelToken: o, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = GV(e); u = u ? (u + "").toLowerCase() : "text"; let [h, p] = a || o || i ? U9e([a, o], i) : [], v, m; const g = () => { !v && setTimeout(() => { h && h.unsubscribe(); }), v = !0; }; let y; try { if (l && K9e && n !== "get" && n !== "head" && (y = await X9e(c, r)) !== 0) { let C = new Request(t, { method: "POST", body: r, duplex: "half" }), S; if (Re.isFormData(r) && (S = C.headers.get("content-type")) && c.setContentType(S), C.body) { const [_, T] = GF( y, Ib(XF(l)) ); r = ZF(C.body, QF, _, T, B5); } } Re.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 x = await fetch(m); const w = R5 && (u === "stream" || u === "response"); if (R5 && (s || w)) { const C = {}; ["status", "statusText", "headers"].forEach((F) => { C[F] = x[F]; }); const S = Re.toFiniteNumber(x.headers.get("content-length")), [_, T] = s && GF( S, Ib(XF(s), !0) ) || []; x = new Response( ZF(x.body, QF, _, () => { T && T(), w && g(); }, B5), C ); } u = u || "text"; let k = await Pb[Re.findKey(Pb, u) || "text"](x, e); return !w && g(), p && p(), await new Promise((C, S) => { WV(C, S, { data: k, headers: ho.from(x.headers), status: x.status, statusText: x.statusText, config: e, request: m }); }); } catch (x) { throw g(), x && x.name === "TypeError" && /fetch/i.test(x.message) ? Object.assign( new Yt("Network Error", Yt.ERR_NETWORK, e, m), { cause: x.cause || x } ) : Yt.from(x, x && x.code, e, m); } }), z5 = { http: f9e, xhr: H9e, fetch: Y9e }; Re.forEach(z5, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const JF = (e) => `- ${e}`, Z9e = (e) => Re.isFunction(e) || e === null || e === !1, ZV = { getAdapter: (e) => { e = Re.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const a = {}; for (let o = 0; o < t; o++) { n = e[o]; let i; if (r = n, !Z9e(n) && (r = z5[(i = String(n)).toLowerCase()], r === void 0)) throw new Yt(`Unknown adapter '${i}'`); if (r) break; a[i || "#" + o] = r; } if (!r) { const o = Object.entries(a).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? o.length > 1 ? `since : ` + o.map(JF).join(` `) : " " + JF(o[0]) : "as no adapter specified"; throw new Yt( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: z5 }; function Lk(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Ah(null, e); } function eA(e) { return Lk(e), e.headers = ho.from(e.headers), e.data = Pk.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ZV.getAdapter(e.adapter || dm.adapter)(e).then(function(t) { return Lk(e), t.data = Pk.call( e, e.transformResponse, t ), t.headers = ho.from(t.headers), t; }, function(t) { return qV(t) || (Lk(e), t && t.response && (t.response.data = Pk.call( e, e.transformResponse, t.response ), t.response.headers = ho.from(t.response.headers))), Promise.reject(t); }); } const QV = "1.7.4", uE = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { uE[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const tA = {}; uE.transitional = function(e, t, n) { function r(a, o) { return "[Axios v" + QV + "] Transitional option '" + a + "'" + o + (n ? ". " + n : ""); } return (a, o, i) => { if (e === !1) throw new Yt( r(o, " has been removed" + (t ? " in " + t : "")), Yt.ERR_DEPRECATED ); return t && !tA[o] && (tA[o] = !0, console.warn( r( o, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(a, o, i) : !0; }; }; function Q9e(e, t, n) { if (typeof e != "object") throw new Yt("options must be an object", Yt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let a = r.length; for (; a-- > 0; ) { const o = r[a], i = t[o]; if (i) { const s = e[o], l = s === void 0 || i(s, o, e); if (l !== !0) throw new Yt("option " + o + " must be " + l, Yt.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Yt("Unknown option " + o, Yt.ERR_BAD_OPTION); } } const V5 = { assertOptions: Q9e, validators: uE }, Zl = V5.validators; class sd { constructor(t) { this.defaults = t, this.interceptors = { request: new WF(), response: new WF() }; } /** * 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 a; Error.captureStackTrace ? Error.captureStackTrace(a = {}) : a = new Error(); const o = a.stack ? a.stack.replace(/^.+\n/, "") : ""; try { r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + o) : r.stack = o; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Od(this.defaults, n); const { transitional: r, paramsSerializer: a, headers: o } = n; r !== void 0 && V5.assertOptions(r, { silentJSONParsing: Zl.transitional(Zl.boolean), forcedJSONParsing: Zl.transitional(Zl.boolean), clarifyTimeoutError: Zl.transitional(Zl.boolean) }, !1), a != null && (Re.isFunction(a) ? n.paramsSerializer = { serialize: a } : V5.assertOptions(a, { encode: Zl.function, serialize: Zl.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = o && Re.merge( o.common, o[n.method] ); o && Re.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (p) => { delete o[p]; } ), n.headers = ho.concat(i, o); 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 = [eA.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 = eA.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 = Od(this.defaults, t); const n = KV(t.baseURL, t.url); return jV(n, t.params, t.paramsSerializer); } } Re.forEach(["delete", "get", "head", "options"], function(e) { sd.prototype[e] = function(t, n) { return this.request(Od(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); Re.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, a, o) { return this.request(Od(o || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: a })); }; } sd.prototype[e] = t(), sd.prototype[e + "Form"] = t(!0); }); class cE { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(a) { n = a; }); const r = this; this.promise.then((a) => { if (!r._listeners) return; let o = r._listeners.length; for (; o-- > 0; ) r._listeners[o](a); r._listeners = null; }), this.promise.then = (a) => { let o; const i = new Promise((s) => { r.subscribe(s), o = s; }).then(a); return i.cancel = function() { r.unsubscribe(o); }, i; }, t(function(a, o, i) { r.reason || (r.reason = new Ah(a, o, 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 cE(function(n) { t = n; }), cancel: t }; } } function J9e(e) { return function(t) { return e.apply(null, t); }; } function ePe(e) { return Re.isObject(e) && e.isAxiosError === !0; } const j5 = { 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(j5).forEach(([e, t]) => { j5[t] = e; }); function JV(e) { const t = new sd(e), n = FV(sd.prototype.request, t); return Re.extend(n, sd.prototype, t, { allOwnKeys: !0 }), Re.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return JV(Od(e, r)); }, n; } const Sr = JV(dm); Sr.Axios = sd; Sr.CanceledError = Ah; Sr.CancelToken = cE; Sr.isCancel = qV; Sr.VERSION = QV; Sr.toFormData = Dw; Sr.AxiosError = Yt; Sr.Cancel = Sr.CanceledError; Sr.all = function(e) { return Promise.all(e); }; Sr.spread = J9e; Sr.isAxiosError = ePe; Sr.mergeConfig = Od; Sr.AxiosHeaders = ho; Sr.formToJSON = (e) => UV(Re.isHTMLForm(e) ? new FormData(e) : e); Sr.getAdapter = ZV.getAdapter; Sr.HttpStatusCode = j5; Sr.default = Sr; const tPe = "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", nPe = { //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: tPe }; }, methods: { async getRequest(e, t, n) { return await Sr({ 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 a; if (e && t) { const o = this.findEntryWithPathInArray(t, e.datacite.isSourceOf.path[0]); o && (a = this.findEntryWithPathInArray(n, o.datacite.isSourceOf.path[0])); } if (a) return a; 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}`, a = {}; this.getRequest(r, a, 2e4).then( (o) => { let i = t.find((l) => l.id === n.id); const s = o.name; s && (i.title = s); }, (o) => (o.message.includes("timeout") && o.message.includes("exceeded") && n.fetchAttempts < 3 && (n.fetchAttempts += 1, this.getImageInfoFromBiolucida(e, t, n)), Promise.reject("Maximum iterations reached.")) ); } } }, dE = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, rPe = { class: "indicator-container" }, aPe = ["onClick"], oPe = { __name: "IndexIndicator", props: { count: { type: Number, default: 0 }, current: { type: Number, default: 0 } }, emits: ["clicked"], setup(e, { emit: t }) { const n = t; return (r, a) => ($(), B("div", rPe, [ ($(!0), B(Ue, null, yt(e.count, (o, i) => ($(), B("div", { key: "indicator_" + o, class: H(["indicator", { active: e.current === i }]), onClick: (s) => n("clicked", i) }, null, 10, aPe))), 128)) ])); } }, iPe = /* @__PURE__ */ dE(oPe, [["__scopeId", "data-v-afcfce15"]]), nl = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var nA; const Po = typeof window < "u", sPe = (e) => typeof e == "string", ej = () => { }, lPe = Po && ((nA = window == null ? void 0 : window.navigator) == null ? void 0 : nA.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function tj(e) { return typeof e == "function" ? e() : b(e); } function uPe(e) { return e; } function nj(e) { return xg() ? (lh(e), !0) : !1; } function Kc(e) { var t; const n = tj(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const rj = Po ? window : void 0; function Nk(...e) { let t, n, r, a; if (sPe(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = rj) : [t, n, r, a] = e, !t) return ej; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [Kc(t), tj(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return nj(u), u; } let rA = !1; function cPe(e, t, n = {}) { const { window: r = rj, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; lPe && !rA && (rA = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", ej))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = Kc(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Nk(r, "click", (c) => { const d = Kc(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: o }), Nk(r, "pointerdown", (c) => { const d = Kc(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Nk(r, "blur", (c) => { var d; const f = Kc(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 aA = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, oA = "__vueuse_ssr_handlers__"; aA[oA] = aA[oA] || {}; var iA; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(iA || (iA = {})); var dPe = Object.defineProperty, sA = Object.getOwnPropertySymbols, pPe = Object.prototype.hasOwnProperty, fPe = Object.prototype.propertyIsEnumerable, lA = (e, t, n) => t in e ? dPe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, hPe = (e, t) => { for (var n in t || (t = {})) pPe.call(t, n) && lA(e, n, t[n]); if (sA) for (var n of sA(t)) fPe.call(t, n) && lA(e, n, t[n]); return e; }; const vPe = { 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] }; hPe({ linear: uPe }, vPe); /** * @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 Lb = () => { }, gPe = Object.prototype.hasOwnProperty, uA = (e, t) => gPe.call(e, t), mPe = Array.isArray, Dv = (e) => typeof e == "function", Ih = (e) => typeof e == "string", pm = (e) => e !== null && typeof e == "object", aj = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, yPe = /-(\w)/g, bPe = aj((e) => e.replace(yPe, (t, n) => n ? n.toUpperCase() : "")), wPe = /\B([A-Z])/g, xPe = aj( (e) => e.replace(wPe, "-$1").toLowerCase() ); var kPe = typeof global == "object" && global && global.Object === Object && global, CPe = typeof self == "object" && self && self.Object === Object && self, pE = kPe || CPe || Function("return this")(), Qu = pE.Symbol, oj = Object.prototype, SPe = oj.hasOwnProperty, EPe = oj.toString, vv = Qu ? Qu.toStringTag : void 0; function _Pe(e) { var t = SPe.call(e, vv), n = e[vv]; try { e[vv] = void 0; var r = !0; } catch { } var a = EPe.call(e); return r && (t ? e[vv] = n : delete e[vv]), a; } var TPe = Object.prototype, $Pe = TPe.toString; function OPe(e) { return $Pe.call(e); } var FPe = "[object Null]", APe = "[object Undefined]", cA = Qu ? Qu.toStringTag : void 0; function fE(e) { return e == null ? e === void 0 ? APe : FPe : cA && cA in Object(e) ? _Pe(e) : OPe(e); } function hE(e) { return e != null && typeof e == "object"; } var IPe = "[object Symbol]"; function vE(e) { return typeof e == "symbol" || hE(e) && fE(e) == IPe; } function PPe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var fm = Array.isArray, LPe = 1 / 0, dA = Qu ? Qu.prototype : void 0, pA = dA ? dA.toString : void 0; function ij(e) { if (typeof e == "string") return e; if (fm(e)) return PPe(e, ij) + ""; if (vE(e)) return pA ? pA.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -LPe ? "-0" : t; } function Nb(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } function NPe(e) { return e; } var MPe = "[object AsyncFunction]", DPe = "[object Function]", BPe = "[object GeneratorFunction]", RPe = "[object Proxy]"; function zPe(e) { if (!Nb(e)) return !1; var t = fE(e); return t == DPe || t == BPe || t == MPe || t == RPe; } var Mk = pE["__core-js_shared__"], fA = function() { var e = /[^.]+$/.exec(Mk && Mk.keys && Mk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function VPe(e) { return !!fA && fA in e; } var jPe = Function.prototype, HPe = jPe.toString; function UPe(e) { if (e != null) { try { return HPe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var qPe = /[\\^$.*+?()[\]{}|]/g, WPe = /^\[object .+?Constructor\]$/, KPe = Function.prototype, GPe = Object.prototype, XPe = KPe.toString, YPe = GPe.hasOwnProperty, ZPe = RegExp( "^" + XPe.call(YPe).replace(qPe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function QPe(e) { if (!Nb(e) || VPe(e)) return !1; var t = zPe(e) ? ZPe : WPe; return t.test(UPe(e)); } function JPe(e, t) { return e == null ? void 0 : e[t]; } function gE(e, t) { var n = JPe(e, t); return QPe(n) ? n : void 0; } function eLe(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 tLe = 800, nLe = 16, rLe = Date.now; function aLe(e) { var t = 0, n = 0; return function() { var r = rLe(), a = nLe - (r - n); if (n = r, a > 0) { if (++t >= tLe) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function oLe(e) { return function() { return e; }; } var Mb = function() { try { var e = gE(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), iLe = Mb ? function(e, t) { return Mb(e, "toString", { configurable: !0, enumerable: !1, value: oLe(t), writable: !0 }); } : NPe, sLe = aLe(iLe), lLe = 9007199254740991, uLe = /^(?:0|[1-9]\d*)$/; function sj(e, t) { var n = typeof e; return t = t ?? lLe, !!t && (n == "number" || n != "symbol" && uLe.test(e)) && e > -1 && e % 1 == 0 && e < t; } function cLe(e, t, n) { t == "__proto__" && Mb ? Mb(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function lj(e, t) { return e === t || e !== e && t !== t; } var dLe = Object.prototype, pLe = dLe.hasOwnProperty; function fLe(e, t, n) { var r = e[t]; (!(pLe.call(e, t) && lj(r, n)) || n === void 0 && !(t in e)) && cLe(e, t, n); } var hA = Math.max; function hLe(e, t, n) { return t = hA(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = hA(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), eLe(e, this, s); }; } var vLe = 9007199254740991; function gLe(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= vLe; } var mLe = "[object Arguments]"; function vA(e) { return hE(e) && fE(e) == mLe; } var uj = Object.prototype, yLe = uj.hasOwnProperty, bLe = uj.propertyIsEnumerable, cj = vA(/* @__PURE__ */ function() { return arguments; }()) ? vA : function(e) { return hE(e) && yLe.call(e, "callee") && !bLe.call(e, "callee"); }, wLe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, xLe = /^\w*$/; function kLe(e, t) { if (fm(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || vE(e) ? !0 : xLe.test(e) || !wLe.test(e) || t != null && e in Object(t); } var Y0 = gE(Object, "create"); function CLe() { this.__data__ = Y0 ? Y0(null) : {}, this.size = 0; } function SLe(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var ELe = "__lodash_hash_undefined__", _Le = Object.prototype, TLe = _Le.hasOwnProperty; function $Le(e) { var t = this.__data__; if (Y0) { var n = t[e]; return n === ELe ? void 0 : n; } return TLe.call(t, e) ? t[e] : void 0; } var OLe = Object.prototype, FLe = OLe.hasOwnProperty; function ALe(e) { var t = this.__data__; return Y0 ? t[e] !== void 0 : FLe.call(t, e); } var ILe = "__lodash_hash_undefined__"; function PLe(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = Y0 && t === void 0 ? ILe : t, this; } function Fd(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]); } } Fd.prototype.clear = CLe; Fd.prototype.delete = SLe; Fd.prototype.get = $Le; Fd.prototype.has = ALe; Fd.prototype.set = PLe; function LLe() { this.__data__ = [], this.size = 0; } function Rw(e, t) { for (var n = e.length; n--; ) if (lj(e[n][0], t)) return n; return -1; } var NLe = Array.prototype, MLe = NLe.splice; function DLe(e) { var t = this.__data__, n = Rw(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : MLe.call(t, n, 1), --this.size, !0; } function BLe(e) { var t = this.__data__, n = Rw(t, e); return n < 0 ? void 0 : t[n][1]; } function RLe(e) { return Rw(this.__data__, e) > -1; } function zLe(e, t) { var n = this.__data__, r = Rw(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Ph(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]); } } Ph.prototype.clear = LLe; Ph.prototype.delete = DLe; Ph.prototype.get = BLe; Ph.prototype.has = RLe; Ph.prototype.set = zLe; var VLe = gE(pE, "Map"); function jLe() { this.size = 0, this.__data__ = { hash: new Fd(), map: new (VLe || Ph)(), string: new Fd() }; } function HLe(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function zw(e, t) { var n = e.__data__; return HLe(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function ULe(e) { var t = zw(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function qLe(e) { return zw(this, e).get(e); } function WLe(e) { return zw(this, e).has(e); } function KLe(e, t) { var n = zw(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function up(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]); } } up.prototype.clear = jLe; up.prototype.delete = ULe; up.prototype.get = qLe; up.prototype.has = WLe; up.prototype.set = KLe; var GLe = "Expected a function"; function mE(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(GLe); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (mE.Cache || up)(), n; } mE.Cache = up; var XLe = 500; function YLe(e) { var t = mE(e, function(r) { return n.size === XLe && n.clear(), r; }), n = t.cache; return t; } var ZLe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, QLe = /\\(\\)?/g, JLe = YLe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(ZLe, function(n, r, a, o) { t.push(a ? o.replace(QLe, "$1") : r || n); }), t; }); function eNe(e) { return e == null ? "" : ij(e); } function Vw(e, t) { return fm(e) ? e : kLe(e, t) ? [e] : JLe(eNe(e)); } var tNe = 1 / 0; function yE(e) { if (typeof e == "string" || vE(e)) return e; var t = e + ""; return t == "0" && 1 / e == -tNe ? "-0" : t; } function dj(e, t) { t = Vw(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[yE(t[n++])]; return n && n == r ? e : void 0; } function nNe(e, t, n) { var r = e == null ? void 0 : dj(e, t); return r === void 0 ? n : r; } function rNe(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var gA = Qu ? Qu.isConcatSpreadable : void 0; function aNe(e) { return fm(e) || cj(e) || !!(gA && e && e[gA]); } function oNe(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = aNe), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? rNe(a, s) : a[a.length] = s; } return a; } function iNe(e) { var t = e == null ? 0 : e.length; return t ? oNe(e) : []; } function sNe(e) { return sLe(hLe(e, void 0, iNe), e + ""); } function lNe(e, t) { return e != null && t in Object(e); } function uNe(e, t, n) { t = Vw(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = yE(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && gLe(a) && sj(i, a) && (fm(e) || cj(e))); } function cNe(e, t) { return e != null && uNe(e, t, lNe); } function H5(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function bE(e) { return e == null; } function dNe(e) { return e === void 0; } function pNe(e, t, n, r) { if (!Nb(e)) return e; t = Vw(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = yE(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = Nb(c) ? c : sj(t[a + 1]) ? [] : {}); } fLe(s, l, u), s = s[l]; } return e; } function fNe(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = dj(e, i); n(s, i) && pNe(o, Vw(i, e), s); } return o; } function hNe(e, t) { return fNe(e, t, function(n, r) { return cNe(e, r); }); } var vNe = sNe(function(e, t) { return e == null ? {} : hNe(e, t); }); const gNe = (e) => e === void 0, wE = (e) => typeof e == "boolean", Z0 = (e) => typeof e == "number", a0 = (e) => typeof Element > "u" ? !1 : e instanceof Element, mNe = (e) => Ih(e) ? !Number.isNaN(Number(e)) : !1, mA = (e) => Object.keys(e); class yNe extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function Ad(e, t) { if (process.env.NODE_ENV !== "production") { const n = Ih(e) ? new yNe(`[${e}] ${t}`) : e; console.warn(n); } } const bNe = "utils/dom/style", pj = (e = "") => e.split(" ").filter((t) => !!t.trim()), yA = (e, t) => { !e || !t.trim() || e.classList.add(...pj(t)); }, Db = (e, t) => { !e || !t.trim() || e.classList.remove(...pj(t)); }, gv = (e, t) => { var n; if (!Po || !e || !t) return ""; let r = bPe(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function fj(e, t = "px") { if (!e) return ""; if (Z0(e) || mNe(e)) return `${e}${t}`; if (Ih(e)) return e; Ad(bNe, "binding value must be a string or number"); } /*! Element Plus Icons Vue v2.3.1 */ var wNe = /* @__PURE__ */ G({ name: "Loading", __name: "loading", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), xNe = wNe; const hj = "__epPropKey", ln = (e) => e, kNe = (e) => pm(e) && !!e[hj], jw = (e, t) => { if (!pm(e) || kNe(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), uA(e, "default") && c.push(a), 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(", "); kg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [hj]: !0 }; return uA(e, "default") && (s.default = a), s; }, jr = (e) => H5(Object.entries(e).map(([t, n]) => [ t, jw(n, t) ])), U5 = ln([ String, Object, Function ]), cp = (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; }, CNe = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), SNe = (e) => (e.install = Lb, e), Bb = { 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" }, ENe = ["", "default", "small", "large"], _Ne = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && Ad(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var TNe = { 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 $Ne = (e) => (t, n) => ONe(t, n, b(e)), ONe = (e, t, n) => nNe(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), FNe = (e) => { const t = O(() => b(e).name), n = Kn(e) ? e : U(e); return { lang: t, locale: n, t: $Ne(e) }; }, vj = Symbol("localeContextKey"), ANe = (e) => { const t = e || $e(vj, U()); return FNe(O(() => t.value || TNe)); }, $y = "el", INe = "is-", Fc = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, gj = Symbol("namespaceContextKey"), xE = (e) => { const t = e || (tt() ? $e(gj, U($y)) : U($y)); return O(() => b(t) || $y); }, gi = (e, t) => { const n = xE(t); return { namespace: n, b: (r = "") => Fc(n.value, e, r, "", ""), e: (r) => r ? Fc(n.value, e, "", r, "") : "", m: (r) => r ? Fc(n.value, e, "", "", r) : "", be: (r, a) => r && a ? Fc(n.value, e, r, a, "") : "", em: (r, a) => r && a ? Fc(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? Fc(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? Fc(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${INe}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, PNe = jw({ type: ln(Boolean), default: null }), LNe = jw({ type: ln(Function) }), NNe = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: PNe, [n]: LNe }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = O(() => Dv(h[n])), v = O(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Dv(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Dv(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Dv(l) && !l()) return; const S = p.value && Po; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !Po) return; const S = p.value && Po; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { wE(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, mj = (e) => { const t = tt(); return O(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var vo = "top", di = "bottom", pi = "right", go = "left", kE = "auto", hm = [vo, di, pi, go], qf = "start", Q0 = "end", MNe = "clippingParents", yj = "viewport", mv = "popper", DNe = "reference", bA = hm.reduce(function(e, t) { return e.concat([t + "-" + qf, t + "-" + Q0]); }, []), CE = [].concat(hm, [kE]).reduce(function(e, t) { return e.concat([t, t + "-" + qf, t + "-" + Q0]); }, []), BNe = "beforeRead", RNe = "read", zNe = "afterRead", VNe = "beforeMain", jNe = "main", HNe = "afterMain", UNe = "beforeWrite", qNe = "write", WNe = "afterWrite", KNe = [BNe, RNe, zNe, VNe, jNe, HNe, UNe, qNe, WNe]; function Fs(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function Ji(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function Wf(e) { var t = Ji(e).Element; return e instanceof t || e instanceof Element; } function Jo(e) { var t = Ji(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function SE(e) { if (typeof ShadowRoot > "u") return !1; var t = Ji(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function GNe(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !Jo(o) || !Fs(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function XNe(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 a = t.elements[r], o = 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(a) || !Fs(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var bj = { name: "applyStyles", enabled: !0, phase: "write", fn: GNe, effect: XNe, requires: ["computeStyles"] }; function bs(e) { return e.split("-")[0]; } var ld = Math.max, Rb = Math.min, Kf = Math.round; function Gf(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (Jo(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = Kf(n.width) / i || 1), o > 0 && (a = Kf(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function EE(e) { var t = Gf(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 wj(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && SE(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function Sl(e) { return Ji(e).getComputedStyle(e); } function YNe(e) { return ["table", "td", "th"].indexOf(Fs(e)) >= 0; } function hc(e) { return ((Wf(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function Hw(e) { return Fs(e) === "html" ? e : e.assignedSlot || e.parentNode || (SE(e) ? e.host : null) || hc(e); } function wA(e) { return !Jo(e) || Sl(e).position === "fixed" ? null : e.offsetParent; } function ZNe(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && Jo(e)) { var r = Sl(e); if (r.position === "fixed") return null; } var a = Hw(e); for (SE(a) && (a = a.host); Jo(a) && ["html", "body"].indexOf(Fs(a)) < 0; ) { var o = Sl(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function vm(e) { for (var t = Ji(e), n = wA(e); n && YNe(n) && Sl(n).position === "static"; ) n = wA(n); return n && (Fs(n) === "html" || Fs(n) === "body" && Sl(n).position === "static") ? t : n || ZNe(e) || t; } function _E(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function o0(e, t, n) { return ld(e, Rb(t, n)); } function QNe(e, t, n) { var r = o0(e, t, n); return r > n ? n : r; } function xj() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function kj(e) { return Object.assign({}, xj(), e); } function Cj(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var JNe = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, kj(typeof e != "number" ? e : Cj(e, hm)); }; function eMe(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = bs(n.placement), l = _E(s), u = [go, pi].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = JNe(a.padding, n), f = EE(o), h = l === "y" ? vo : go, p = l === "y" ? di : pi, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = vm(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = o0(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function tMe(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !wj(t.elements.popper, a) || (t.elements.arrow = a)); } var nMe = { name: "arrow", enabled: !0, phase: "main", fn: eMe, effect: tMe, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function Xf(e) { return e.split("-")[1]; } var rMe = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function aMe(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: Kf(t * a) / a || 0, y: Kf(n * a) / a || 0 }; } function xA(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = 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"), y = i.hasOwnProperty("y"), x = go, w = vo, k = window; if (u) { var C = vm(n), S = "clientHeight", _ = "clientWidth"; if (C === Ji(n) && (C = hc(n), Sl(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === vo || (a === go || a === pi) && o === Q0) { w = di; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === go || (a === vo || a === di) && o === Q0) { x = pi; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && rMe), I = c === !0 ? aMe({ x: h, y: v }) : { x: h, y: v }; if (h = I.x, v = I.y, l) { var N; return Object.assign({}, A, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, A, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function oMe(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: bs(t.placement), variation: Xf(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, xA(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, xA(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 Sj = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: oMe, data: {} }, E1 = { passive: !0 }; function iMe(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = Ji(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, E1); }), s && l.addEventListener("resize", n.update, E1), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, E1); }), s && l.removeEventListener("resize", n.update, E1); }; } var Ej = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: iMe, data: {} }, sMe = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Oy(e) { return e.replace(/left|right|bottom|top/g, function(t) { return sMe[t]; }); } var lMe = { start: "end", end: "start" }; function kA(e) { return e.replace(/start|end/g, function(t) { return lMe[t]; }); } function TE(e) { var t = Ji(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function $E(e) { return Gf(hc(e)).left + TE(e).scrollLeft; } function uMe(e) { var t = Ji(e), n = hc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + $E(e), y: s }; } function cMe(e) { var t, n = hc(e), r = TE(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = ld(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = ld(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + $E(e), l = -r.scrollTop; return Sl(a || n).direction === "rtl" && (s += ld(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function OE(e) { var t = Sl(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function _j(e) { return ["html", "body", "#document"].indexOf(Fs(e)) >= 0 ? e.ownerDocument.body : Jo(e) && OE(e) ? e : _j(Hw(e)); } function i0(e, t) { var n; t === void 0 && (t = []); var r = _j(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = Ji(r), i = a ? [o].concat(o.visualViewport || [], OE(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(i0(Hw(i))); } function q5(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function dMe(e) { var t = Gf(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 CA(e, t) { return t === yj ? q5(uMe(e)) : Wf(t) ? dMe(t) : q5(cMe(hc(e))); } function pMe(e) { var t = i0(Hw(e)), n = ["absolute", "fixed"].indexOf(Sl(e).position) >= 0, r = n && Jo(e) ? vm(e) : e; return Wf(r) ? t.filter(function(a) { return Wf(a) && wj(a, r) && Fs(a) !== "body"; }) : []; } function fMe(e, t, n) { var r = t === "clippingParents" ? pMe(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = CA(e, l); return s.top = ld(u.top, s.top), s.right = Rb(u.right, s.right), s.bottom = Rb(u.bottom, s.bottom), s.left = ld(u.left, s.left), s; }, CA(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function Tj(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? bs(r) : null, o = r ? Xf(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case vo: l = { x: i, y: t.y - n.height }; break; case di: l = { x: i, y: t.y + t.height }; break; case pi: l = { x: t.x + t.width, y: s }; break; case go: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? _E(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case qf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case Q0: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function J0(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? MNe : o, s = n.rootBoundary, l = s === void 0 ? yj : s, u = n.elementContext, c = u === void 0 ? mv : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = kj(typeof p != "number" ? p : Cj(p, hm)), m = c === mv ? DNe : mv, g = e.rects.popper, y = e.elements[f ? m : c], x = fMe(Wf(y) ? y : y.contextElement || hc(e.elements.popper), i, l), w = Gf(e.elements.reference), k = Tj({ reference: w, element: g, strategy: "absolute", placement: a }), C = q5(Object.assign({}, g, k)), S = c === mv ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === mv && T) { var F = T[a]; Object.keys(_).forEach(function(A) { var I = [pi, di].indexOf(A) >= 0 ? 1 : -1, N = [vo, di].indexOf(A) >= 0 ? "y" : "x"; _[A] += F[N] * I; }); } return _; } function hMe(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? CE : l, c = Xf(r), d = c ? s ? bA : bA.filter(function(p) { return Xf(p) === c; }) : hm, 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] = J0(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[bs(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function vMe(e) { if (bs(e) === kE) return []; var t = Oy(e); return [kA(e), t, kA(t)]; } function gMe(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = bs(m), y = g === m, x = l || (y || !p ? [Oy(m)] : vMe(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(bs(ge) === kE ? hMe(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], F = 0; F < w.length; F++) { var A = w[F], I = bs(A), N = Xf(A) === qf, L = [vo, di].indexOf(I) >= 0, z = L ? "width" : "height", P = J0(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), D = L ? N ? pi : go : N ? di : vo; k[z] > C[z] && (D = Oy(D)); var M = Oy(D), V = []; if (o && V.push(P[I] <= 0), s && V.push(P[D] <= 0, P[M] <= 0), V.every(function(ve) { return ve; })) { T = A, _ = !1; break; } S.set(A, V); } if (_) for (var Q = p ? 3 : 1, X = function(ve) { var ge = w.find(function(se) { var ne = S.get(se); if (ne) return ne.slice(0, ve).every(function(W) { return W; }); }); if (ge) return T = ge, "break"; }, ee = Q; ee > 0; ee--) { var ue = X(ee); if (ue === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var mMe = { name: "flip", enabled: !0, phase: "main", fn: gMe, requiresIfExists: ["offset"], data: { _skip: !1 } }; function SA(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 EA(e) { return [vo, pi, di, go].some(function(t) { return e[t] >= 0; }); } function yMe(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = J0(t, { elementContext: "reference" }), s = J0(t, { altBoundary: !0 }), l = SA(i, r), u = SA(s, a, o), c = EA(l), d = EA(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 bMe = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: yMe }; function wMe(e, t, n) { var r = bs(e), a = [go, vo].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [go, pi].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function xMe(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = CE.reduce(function(c, d) { return c[d] = wMe(d, t.rects, o), 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 kMe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: xMe }; function CMe(e) { var t = e.state, n = e.name; t.modifiersData[n] = Tj({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var $j = { name: "popperOffsets", enabled: !0, phase: "read", fn: CMe, data: {} }; function SMe(e) { return e === "x" ? "y" : "x"; } function EMe(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = J0(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = bs(t.placement), y = Xf(t.placement), x = !y, w = _E(g), k = SMe(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, I = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? vo : go, z = w === "y" ? di : pi, P = w === "y" ? "height" : "width", D = C[w], M = D + m[L], V = D - m[z], Q = h ? -_[P] / 2 : 0, X = y === qf ? S[P] : _[P], ee = y === qf ? -_[P] : -S[P], ue = t.elements.arrow, ve = h && ue ? EE(ue) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : xj(), se = ge[L], ne = ge[z], W = o0(0, S[P], ve[P]), Y = x ? S[P] / 2 - Q - W - se - F.mainAxis : X - W - se - F.mainAxis, re = x ? -S[P] / 2 + Q + W + ne + F.mainAxis : ee + W + ne + F.mainAxis, we = t.elements.arrow && vm(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = A == null ? void 0 : A[w]) != null ? N : 0, xe = D + Y - Ne - Oe, Fe = D + re - Ne, Se = o0(h ? Rb(M, xe) : M, D, h ? ld(V, Fe) : V); C[w] = Se, I[w] = Se - D; } if (s) { var Pe, Me = w === "x" ? vo : go, He = w === "x" ? di : pi, De = C[k], Xe = k === "y" ? "height" : "width", Ge = De + m[Me], Ze = De - m[He], E = [vo, go].indexOf(g) !== -1, j = (Pe = A == null ? void 0 : A[k]) != null ? Pe : 0, le = E ? Ge : De - S[Xe] - _[Xe] - j + F.altAxis, ce = E ? De + S[Xe] + _[Xe] - j - F.altAxis : Ze, oe = h && E ? QNe(le, De, ce) : o0(h ? le : Ge, De, h ? ce : Ze); C[k] = oe, I[k] = oe - De; } t.modifiersData[r] = I; } } var _Me = { name: "preventOverflow", enabled: !0, phase: "main", fn: EMe, requiresIfExists: ["offset"] }; function TMe(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function $Me(e) { return e === Ji(e) || !Jo(e) ? TE(e) : TMe(e); } function OMe(e) { var t = e.getBoundingClientRect(), n = Kf(t.width) / e.offsetWidth || 1, r = Kf(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function FMe(e, t, n) { n === void 0 && (n = !1); var r = Jo(t), a = Jo(t) && OMe(t), o = hc(t), i = Gf(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Fs(t) !== "body" || OE(o)) && (s = $Me(t)), Jo(t) ? (l = Gf(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = $E(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function AMe(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function IMe(e) { var t = AMe(e); return KNe.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function PMe(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function LMe(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var _A = { placement: "bottom", modifiers: [], strategy: "absolute" }; function TA() { 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 FE(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? _A : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, _A, o), 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({}, o, u.options, m), u.scrollParents = { reference: Wf(i) ? i0(i) : i.contextElement ? i0(i.contextElement) : [], popper: i0(s) }; var g = IMe(LMe([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (TA(m, g)) { u.rects = { reference: FMe(m, vm(g), u.options.strategy === "fixed"), popper: EE(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: PMe(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!TA(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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } FE(); var NMe = [Ej, $j, Sj, bj]; FE({ defaultModifiers: NMe }); var MMe = [Ej, $j, Sj, bj, kMe, mMe, _Me, nMe, bMe], DMe = FE({ defaultModifiers: MMe }); const BMe = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = RMe(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = O(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = un(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = DMe(l, u, b(a))); }), Ct(() => { s(); }), { state: O(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: O(() => b(i).styles), attributes: O(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: O(() => b(o)) }; }; function RMe(e) { const t = Object.keys(e.elements), n = H5(t.map((a) => [a, e.styles[a] || {}])), r = H5(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function $A() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return nj(() => n()), { registerTimeout: t, cancelTimeout: n }; } const W5 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, zMe = Symbol("elIdInjection"), Oj = () => tt() ? $e(zMe, W5) : W5, VMe = (e) => { const t = Oj(); !Po && t === W5 && Ad("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 = xE(); return O(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Gp = []; const OA = (e) => { const t = e; t.key === Bb.esc && Gp.forEach((n) => n(t)); }, jMe = (e) => { nt(() => { Gp.length === 0 && document.addEventListener("keydown", OA), Po && Gp.push(e); }), Ct(() => { Gp = Gp.filter((t) => t !== e), Gp.length === 0 && Po && document.removeEventListener("keydown", OA); }); }; let FA; const Fj = () => { const e = xE(), t = Oj(), n = O(() => `${e.value}-popper-container-${t.prefix}`), r = O(() => `#${n.value}`); return { id: n, selector: r }; }, HMe = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, UMe = () => { const { id: e, selector: t } = Fj(); return Cg(() => { Po && (process.env.NODE_ENV === "test" || !FA || !document.body.querySelector(t.value)) && (FA = HMe(e.value)); }), { id: e, selector: t }; }, qMe = jr({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), WMe = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = $A(), { registerTimeout: i, cancelTimeout: s } = $A(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); Z0(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, Aj = Symbol("elForwardRef"), KMe = (e) => { rt(Aj, { setForwardRef: (t) => { e.value = t; } }); }, GMe = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), AA = { current: 0 }, IA = U(0), Ij = 2e3, PA = Symbol("elZIndexContextKey"), Pj = Symbol("zIndexContextKey"), Lj = (e) => { const t = tt() ? $e(PA, AA) : AA, n = e || (tt() ? $e(Pj, void 0) : void 0), r = O(() => { const i = b(n); return Z0(i) ? i : Ij; }), a = O(() => r.value + IA.value), o = () => (t.current++, IA.value = t.current, a.value); return !Po && !$e(PA) && Ad("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: a, nextZIndex: o }; }, XMe = jw({ type: String, values: ENe, required: !1 }), Nj = Symbol("size"), YMe = () => { const e = $e(Nj, {}); return O(() => b(e.size) || ""); }, ZMe = Symbol("emptyValuesContextKey"); jr({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Dv(e) ? !e() : !e } }); const QMe = jr({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), Mj = (e) => vNe(QMe, e), Dj = Symbol(), zb = U(); function AE(e, t = void 0) { const n = tt() ? $e(Dj, zb) : zb; return e ? O(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function JMe(e, t) { const n = AE(), r = gi(e, O(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || $y; })), a = ANe(O(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = Lj(O(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || Ij; })), i = O(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return eDe(O(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const eDe = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? AE() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { Ad("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = O(() => { const l = b(e); return o != null && o.value ? tDe(o.value, l) : l; }); return i(Dj, s), i(vj, O(() => s.value.locale)), i(gj, O(() => s.value.namespace)), i(Pj, O(() => s.value.zIndex)), i(Nj, { size: O(() => s.value.size || "") }), i(ZMe, O(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !zb.value) && (zb.value = s.value), s; }, tDe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...mA(e), ...mA(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var za = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const nDe = jr({ size: { type: ln([Number, String]) }, color: { type: String } }), rDe = G({ name: "ElIcon", inheritAttrs: !1 }), aDe = /* @__PURE__ */ G({ ...rDe, props: nDe, setup(e) { const t = e, n = gi("icon"), r = O(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: gNe(a) ? void 0 : fj(a), "--color": o }; }); return (a, o) => ($(), B("i", Dt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var oDe = /* @__PURE__ */ za(aDe, [["__file", "icon.vue"]]); const LA = cp(oDe), IE = Symbol("formContextKey"), Vb = Symbol("formItemContextKey"), iDe = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : mj("size"), a = t.global ? n : YMe(), o = t.form ? { size: void 0 } : $e(IE, void 0), i = t.formItem ? { size: void 0 } : $e(Vb, void 0); return O(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, Bj = (e) => { const t = mj("disabled"), n = $e(IE, void 0); return O(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, sDe = () => { const e = $e(IE, void 0), t = $e(Vb, void 0); return { form: e, formItem: t }; }, PE = Symbol("popper"), Rj = Symbol("popperContent"), lDe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], zj = jr({ role: { type: String, values: lDe, default: "tooltip" } }), uDe = G({ name: "ElPopper", inheritAttrs: !1 }), cDe = /* @__PURE__ */ G({ ...uDe, props: zj, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = O(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(PE, l), (u, c) => he(u.$slots, "default"); } }); var dDe = /* @__PURE__ */ za(cDe, [["__file", "popper.vue"]]); const Vj = jr({ arrowOffset: { type: Number, default: 5 } }), pDe = G({ name: "ElPopperArrow", inheritAttrs: !1 }), fDe = /* @__PURE__ */ G({ ...pDe, props: Vj, setup(e, { expose: t }) { const n = e, r = gi("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = $e(Rj, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), Ct(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => ($(), B("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Qe(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var hDe = /* @__PURE__ */ za(fDe, [["__file", "arrow.vue"]]); const Dk = "ElOnlyChild", vDe = G({ name: Dk, setup(e, { slots: t, attrs: n }) { var r; const a = $e(Aj), o = GMe((r = a == null ? void 0 : a.setForwardRef) != null ? r : Lb); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Ad(Dk, "requires exact only one valid child."), null; const l = jj(s); return l ? qe(Sg(l, n), [[o]]) : (Ad(Dk, "no valid child node found"), null); }; } }); function jj(e) { if (!e) return null; const t = e; for (const n of t) { if (pm(n)) switch (n.type) { case Eg: continue; case Ls: case "svg": return NA(n); case Ue: return jj(n.children); default: return n; } return NA(n); } return null; } function NA(e) { const t = gi("only-child"); return Z("span", { class: t.e("content") }, [e]); } const Hj = jr({ virtualRef: { type: ln(Object) }, virtualTriggering: Boolean, onMouseenter: { type: ln(Function) }, onMouseleave: { type: ln(Function) }, onClick: { type: ln(Function) }, onKeydown: { type: ln(Function) }, onFocus: { type: ln(Function) }, onBlur: { type: ln(Function) }, onContextmenu: { type: ln(Function) }, id: String, open: Boolean }), gDe = G({ name: "ElPopperTrigger", inheritAttrs: !1 }), mDe = /* @__PURE__ */ G({ ...gDe, props: Hj, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = $e(PE, void 0); KMe(a); const o = O(() => s.value ? n.id : void 0), i = O(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = O(() => { if (r && r.value !== "tooltip") return r.value; }), l = O(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = Kc(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, a0(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 = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { bE(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), a0(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Ct(() => { if (u == null || u(), u = void 0, a.value && a0(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? te("v-if", !0) : ($(), ae(b(vDe), Dt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: q(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var yDe = /* @__PURE__ */ za(mDe, [["__file", "trigger.vue"]]); const Bk = "focus-trap.focus-after-trapped", Rk = "focus-trap.focus-after-released", bDe = "focus-trap.focusout-prevented", MA = { cancelable: !0, bubbles: !1 }, wDe = { cancelable: !0, bubbles: !1 }, DA = "focusAfterTrapped", BA = "focusAfterReleased", xDe = Symbol("elFocusTrap"), LE = U(), Uw = U(0), NE = U(0); let _1 = 0; const Uj = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, RA = (e, t) => { for (const n of e) if (!kDe(n, t)) return n; }, kDe = (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; }, CDe = (e) => { const t = Uj(e), n = RA(t, e), r = RA(t.reverse(), e); return [n, r]; }, SDe = (e) => e instanceof HTMLInputElement && "select" in e, uu = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), NE.value = window.performance.now(), e !== n && SDe(e) && t && e.select(); } }; function zA(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const EDe = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = zA(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = zA(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, _De = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (uu(r, t), document.activeElement !== n) return; }, VA = EDe(), TDe = () => Uw.value > NE.value, T1 = () => { LE.value = "pointer", Uw.value = window.performance.now(); }, jA = () => { LE.value = "keyboard", Uw.value = window.performance.now(); }, $De = () => (nt(() => { _1 === 0 && (document.addEventListener("mousedown", T1), document.addEventListener("touchstart", T1), document.addEventListener("keydown", jA)), _1++; }), Ct(() => { _1--, _1 <= 0 && (document.removeEventListener("mousedown", T1), document.removeEventListener("touchstart", T1), document.removeEventListener("keydown", jA)); }), { focusReason: LE, lastUserFocusTimestamp: Uw, lastAutomatedFocusTimestamp: NE }), $1 = (e) => new CustomEvent(bDe, { ...wDe, detail: e }), ODe = G({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ DA, BA, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = $De(); jMe((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: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === Bb.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, F] = CDe(_); if (T && F) { if (!w && S === F) { const A = $1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && uu(T, !0)); } else if (w && [T, _].includes(S)) { const A = $1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && uu(F, !0)); } } else if (S === _) { const A = $1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || p.preventDefault(); } } }; rt(xDe, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([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(DA, p); }, u = (p) => t(BA, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : uu(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !bE(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = $1({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || uu(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await We(); const p = b(n); if (p) { VA.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(Bk, MA); p.addEventListener(Bk, l), p.dispatchEvent(m), m.defaultPrevented || We(() => { let g = e.focusStartEl; Ih(g) || (uu(g), document.activeElement !== g && (g = "first")), g === "first" && _De(Uj(p), !0), (document.activeElement === v || g === "container") && uu(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(Bk, l); const v = new CustomEvent(Rk, { ...MA, detail: { focusReason: o.value } }); p.addEventListener(Rk, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !TDe() || p.contains(document.activeElement)) && uu(r ?? document.body), p.removeEventListener(Rk, u), VA.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), Ct(() => { 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 FDe(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var ADe = /* @__PURE__ */ za(ODe, [["render", FDe], ["__file", "focus-trap.vue"]]); const IDe = ["fixed", "absolute"], PDe = jr({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: ln(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: CE, default: "bottom" }, popperOptions: { type: ln(Object), default: () => ({}) }, strategy: { type: String, values: IDe, default: "absolute" } }), qj = jr({ ...PDe, id: String, style: { type: ln([String, Array, Object]) }, className: { type: ln([String, Array, Object]) }, effect: { type: ln(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: ln([String, Array, Object]) }, popperStyle: { type: ln([String, Array, Object]) }, referenceEl: { type: ln(Object) }, triggerTargetEl: { type: ln(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...Mj(["ariaLabel"]) }), LDe = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, NDe = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...DDe(e), ...t] }; return BDe(o, a == null ? void 0 : a.modifiers), o; }, MDe = (e) => { if (Po) return Kc(e); }; function DDe(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 BDe(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const RDe = 0, zDe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = $e(PE, void 0), o = U(), i = U(), s = O(() => ({ name: "eventListeners", enabled: !!e.visible })), l = O(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : RDe; return { name: "arrow", enabled: !dNe(y), options: { element: y, padding: x } }; }), u = O(() => ({ onFirstUpdate: () => { p(); }, ...NDe(e, [ b(l), b(s) ]) })), c = O(() => MDe(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = BMe(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, VDe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = Lj(), o = gi("popper"), i = O(() => b(t).popper), s = U(Z0(e.zIndex) ? e.zIndex : a()), l = O(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = O(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = O(() => r.value === "dialog" ? "false" : void 0), d = O(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = Z0(e.zIndex) ? e.zIndex : a(); } }; }, jDe = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, HDe = G({ name: "ElPopperContent" }), UDe = /* @__PURE__ */ G({ ...HDe, props: qj, emits: LDe, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = jDe(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = zDe(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = VDe(r, { styles: p, attributes: d, role: m }), _ = $e(Vb, void 0), T = U(); rt(Rj, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(Vb, { ..._, addInputId: Lb, removeInputId: Lb }); let F; const A = (N = !0) => { g(), N && S(); }, I = () => { A(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { F == null || F(), F = void 0; const z = b(N || h.value), P = b(L || h.value); a0(z) && (F = be([m, () => r.ariaLabel, y, () => r.id], (D) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, V) => { bE(D[V]) ? z.removeAttribute(M) : z.setAttribute(M, D[V]); }); }, { immediate: !0 })), P !== z && a0(P) && ["role", "aria-label", "aria-modal", "id"].forEach((D) => { P.removeAttribute(D); }); }, { immediate: !0 }), be(() => r.visible, I, { immediate: !0 }); }), Ct(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (N, L) => ($(), B("div", Dt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (z) => N.$emit("mouseenter", z), onMouseleave: (z) => N.$emit("mouseleave", z) }), [ Z(b(ADe), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: q(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var qDe = /* @__PURE__ */ za(UDe, [["__file", "content.vue"]]); const WDe = cp(dDe), ME = Symbol("elTooltip"), Ho = jr({ ...qMe, ...qj, appendTo: { type: ln([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: ln(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...Mj(["ariaLabel"]) }), eg = jr({ ...Hj, disabled: Boolean, trigger: { type: ln([String, Array]), default: "hover" }, triggerKeys: { type: ln(Array), default: () => [Bb.enter, Bb.space] } }), { useModelToggleProps: KDe, useModelToggleEmits: GDe, useModelToggle: XDe } = NNe("visible"), YDe = jr({ ...zj, ...KDe, ...Ho, ...eg, ...Vj, showArrow: { type: Boolean, default: !0 } }), ZDe = [ ...GDe, "before-show", "before-hide", "show", "hide", "open", "close" ], QDe = (e, t) => mPe(e) ? e.includes(t) : e === t, Pp = (e, t, n) => (r) => { QDe(b(e), t) && n(r); }, JDe = G({ name: "ElTooltipTrigger" }), eBe = /* @__PURE__ */ G({ ...JDe, props: eg, setup(e, { expose: t }) { const n = e, r = gi("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = $e(ME, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = Pt(n, "trigger"), h = nl(d, Pp(f, "hover", s)), p = nl(d, Pp(f, "hover", l)), v = nl(d, Pp(f, "click", (w) => { w.button === 0 && u(w); })), m = nl(d, Pp(f, "focus", s)), g = nl(d, Pp(f, "focus", l)), y = nl(d, Pp(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = nl(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => ($(), ae(b(yDe), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: q(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var tBe = /* @__PURE__ */ za(eBe, [["__file", "trigger.vue"]]); const nBe = jr({ to: { type: ln([String, Object]), required: !0 }, disabled: Boolean }), rBe = /* @__PURE__ */ G({ __name: "teleport", props: nBe, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : ($(), ae(_g, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var aBe = /* @__PURE__ */ za(rBe, [["__file", "teleport.vue"]]); const oBe = cp(aBe), iBe = G({ name: "ElTooltipContent", inheritAttrs: !1 }), sBe = /* @__PURE__ */ G({ ...iBe, props: Ho, setup(e, { expose: t }) { const n = e, { selector: r } = Fj(), a = gi("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = $e(ME, void 0), g = O(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = O(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Ct(() => { i == null || i(); }); const x = O(() => b(y) ? !0 : b(u)), w = O(() => n.disabled ? !1 : b(u)), k = O(() => n.appendTo || r.value), C = O(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, F = nl(T, () => { n.enterable && b(c) === "hover" && f(); }), A = nl(T, () => { b(c) === "hover" && d(); }), I = () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = cPe(O(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, z = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P); }), t({ contentRef: o }), (P, D) => ($(), ae(b(oBe), { disabled: !P.teleported, to: b(k) }, { default: q(() => [ Z(lr, { name: b(g), onAfterLeave: _, onBeforeEnter: I, onAfterEnter: L, onBeforeLeave: N }, { default: q(() => [ b(x) ? qe(($(), ae(b(qDe), Dt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(F), onMouseleave: b(A), onBlur: z, onClose: b(d) }), { default: q(() => [ he(P.$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"])), [ [ct, b(w)] ]) : te("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var lBe = /* @__PURE__ */ za(sBe, [["__file", "content.vue"]]); const uBe = G({ name: "ElTooltip" }), cBe = /* @__PURE__ */ G({ ...uBe, props: YDe, emits: ZDe, setup(e, { expose: t, emit: n }) { const r = e; UMe(); const a = VMe(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = XDe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = WMe({ showAfter: Pt(r, "showAfter"), hideAfter: Pt(r, "hideAfter"), autoClose: Pt(r, "autoClose"), open: c, close: d }), v = O(() => wE(r.visible) && !f.value); rt(ME, { controlled: v, id: a, open: ch(l), trigger: Pt(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return Tg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => ($(), ae(b(WDe), { ref_key: "popperRef", ref: o, role: g.role }, { default: q(() => [ Z(tBe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: q(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : te("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), Z(lBe, { 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: q(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? ($(), B("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : ($(), B("span", { key: 1 }, _e(g.content), 1)) ]), g.showArrow ? ($(), ae(b(hDe), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : te("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 dBe = /* @__PURE__ */ za(cBe, [["__file", "tooltip.vue"]]); const pBe = cp(dBe), Wj = Symbol("buttonGroupContextKey"), fBe = (e, t) => { _Ne({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, O(() => e.type === "text")); const n = $e(Wj, void 0), r = AE("button"), { form: a } = sDe(), o = iDe(O(() => n == null ? void 0 : n.size)), i = Bj(), s = U(), l = _r(), u = O(() => e.type || (n == null ? void 0 : n.type) || ""), c = O(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = O(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = O(() => { 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) === Ls) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, hBe = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], vBe = ["button", "submit", "reset"], K5 = jr({ size: XMe, disabled: Boolean, type: { type: String, values: hBe, default: "" }, icon: { type: U5 }, nativeType: { type: String, values: vBe, default: "button" }, loading: Boolean, loadingIcon: { type: U5, default: () => xNe }, 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: ln([String, Object]), default: "button" } }), gBe = { click: (e) => e instanceof MouseEvent }; function fa(e, t) { mBe(e) && (e = "100%"); var n = yBe(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 O1(e) { return Math.min(1, Math.max(0, e)); } function mBe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function yBe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function Kj(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function F1(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Gc(e) { return e.length === 1 ? "0" + e : String(e); } function bBe(e, t, n) { return { r: fa(e, 255) * 255, g: fa(t, 255) * 255, b: fa(n, 255) * 255 }; } function HA(e, t, n) { e = fa(e, 255), t = fa(t, 255), n = fa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function zk(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 wBe(e, t, n) { var r, a, o; if (e = fa(e, 360), t = fa(t, 100), n = fa(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = zk(s, i, e + 1 / 3), a = zk(s, i, e), o = zk(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function UA(e, t, n) { e = fa(e, 255), t = fa(t, 255), n = fa(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function xBe(e, t, n) { e = fa(e, 360) * 6, t = fa(t, 100), n = fa(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function qA(e, t, n, r) { var a = [ Gc(Math.round(e).toString(16)), Gc(Math.round(t).toString(16)), Gc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function kBe(e, t, n, r, a) { var o = [ Gc(Math.round(e).toString(16)), Gc(Math.round(t).toString(16)), Gc(Math.round(n).toString(16)), Gc(CBe(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function CBe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function WA(e) { return $o(e) / 255; } function $o(e) { return parseInt(e, 16); } function SBe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var G5 = { 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 EBe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = $Be(e)), typeof e == "object" && (Gs(e.r) && Gs(e.g) && Gs(e.b) ? (t = bBe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Gs(e.h) && Gs(e.s) && Gs(e.v) ? (r = F1(e.s), a = F1(e.v), t = xBe(e.h, r, a), i = !0, s = "hsv") : Gs(e.h) && Gs(e.s) && Gs(e.l) && (r = F1(e.s), o = F1(e.l), t = wBe(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Kj(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 _Be = "[-\\+]?\\d+%?", TBe = "[-\\+]?\\d*\\.\\d+%?", Ou = "(?:".concat(TBe, ")|(?:").concat(_Be, ")"), Vk = "[\\s|\\(]+(".concat(Ou, ")[,|\\s]+(").concat(Ou, ")[,|\\s]+(").concat(Ou, ")\\s*\\)?"), jk = "[\\s|\\(]+(".concat(Ou, ")[,|\\s]+(").concat(Ou, ")[,|\\s]+(").concat(Ou, ")[,|\\s]+(").concat(Ou, ")\\s*\\)?"), Si = { CSS_UNIT: new RegExp(Ou), rgb: new RegExp("rgb" + Vk), rgba: new RegExp("rgba" + jk), hsl: new RegExp("hsl" + Vk), hsla: new RegExp("hsla" + jk), hsv: new RegExp("hsv" + Vk), hsva: new RegExp("hsva" + jk), 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 $Be(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (G5[e]) e = G5[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Si.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Si.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Si.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Si.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Si.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Si.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Si.hex8.exec(e), n ? { r: $o(n[1]), g: $o(n[2]), b: $o(n[3]), a: WA(n[4]), format: t ? "name" : "hex8" } : (n = Si.hex6.exec(e), n ? { r: $o(n[1]), g: $o(n[2]), b: $o(n[3]), format: t ? "name" : "hex" } : (n = Si.hex4.exec(e), n ? { r: $o(n[1] + n[1]), g: $o(n[2] + n[2]), b: $o(n[3] + n[3]), a: WA(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Si.hex3.exec(e), n ? { r: $o(n[1] + n[1]), g: $o(n[2] + n[2]), b: $o(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Gs(e) { return !!Si.CSS_UNIT.exec(String(e)); } var OBe = ( /** @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 = SBe(t)), this.originalInput = t; var a = EBe(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.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, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = Kj(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 = UA(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 = UA(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = HA(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 = HA(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), qA(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), kBe(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(fa(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(fa(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 = "#" + qA(this.r, this.g, this.b, !1), n = 0, r = Object.entries(G5); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = O1(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 = O1(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 = O1(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 = O1(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, 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, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function Ql(e, t = 20) { return e.mix("#141414", t).toString(); } function FBe(e) { const t = Bj(), n = gi("button"); return O(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new OBe(a), s = e.dark ? i.tint(20).toString() : Ql(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? Ql(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? Ql(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? Ql(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? Ql(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? Ql(i, 80) : i.tint(80).toString()); else { const l = e.dark ? Ql(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": a, "text-color": u, "border-color": a, "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 ? Ql(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 ABe = G({ name: "ElButton" }), IBe = /* @__PURE__ */ G({ ...ABe, props: K5, emits: gBe, setup(e, { expose: t, emit: n }) { const r = e, a = FBe(r), o = gi("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = fBe(r, n), h = O(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => ($(), ae(dt(p.tag), Dt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: q(() => [ p.loading ? ($(), B(Ue, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : ($(), ae(b(LA), { key: 1, class: H(b(o).is("loading")) }, { default: q(() => [ ($(), ae(dt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? ($(), ae(b(LA), { key: 1 }, { default: q(() => [ p.icon ? ($(), ae(dt(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : te("v-if", !0), p.$slots.default ? ($(), B("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : te("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var PBe = /* @__PURE__ */ za(IBe, [["__file", "button.vue"]]); const LBe = { size: K5.size, type: K5.type }, NBe = G({ name: "ElButtonGroup" }), MBe = /* @__PURE__ */ G({ ...NBe, props: LBe, setup(e) { const t = e; rt(Wj, en({ size: Pt(t, "size"), type: Pt(t, "type") })); const n = gi("button"); return (r, a) => ($(), B("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var Gj = /* @__PURE__ */ za(MBe, [["__file", "button-group.vue"]]); const DBe = cp(PBe, { ButtonGroup: Gj }); SNe(Gj); const BBe = jr({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: ln([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), RBe = G({ name: "ElCard" }), zBe = /* @__PURE__ */ G({ ...RBe, props: BBe, setup(e) { const t = gi("card"); return (n, r) => ($(), B("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? ($(), B("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ ze(_e(n.header), 1) ]) ], 2)) : te("v-if", !0), K("div", { class: H([b(t).e("body"), n.bodyClass]), style: Qe(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? ($(), B("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ ze(_e(n.footer), 1) ]) ], 2)) : te("v-if", !0) ], 2)); } }); var VBe = /* @__PURE__ */ za(zBe, [["__file", "card.vue"]]); const jBe = cp(VBe), HBe = /* @__PURE__ */ G({ inheritAttrs: !1 }); function UBe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var qBe = /* @__PURE__ */ za(HBe, [["render", UBe], ["__file", "collection.vue"]]); const WBe = /* @__PURE__ */ G({ name: "ElCollectionItem", inheritAttrs: !1 }); function KBe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var GBe = /* @__PURE__ */ za(WBe, [["render", KBe], ["__file", "collection-item.vue"]]); const XBe = "data-el-collection-item", YBe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...qBe, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${XBe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...GBe, name: n, setup(s, { attrs: l }) { const u = U(null), c = $e(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Ct(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, Hk = jr({ trigger: eg.trigger, effect: { ...Ho.effect, default: "light" }, type: { type: ln(String) }, placement: { type: ln(String), default: "bottom" }, popperOptions: { type: ln(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: ln([Number, String]), default: 0 }, maxHeight: { type: ln([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: ln(Object) }, teleported: Ho.teleported }); jr({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: U5 } }); jr({ onKeydown: { type: ln(Function) } }); YBe("Dropdown"); const ZBe = jr({ trigger: eg.trigger, placement: Hk.placement, disabled: eg.disabled, visible: Ho.visible, transition: Ho.transition, popperOptions: Hk.popperOptions, tabindex: Hk.tabindex, content: Ho.content, popperStyle: Ho.popperStyle, popperClass: Ho.popperClass, enterable: { ...Ho.enterable, default: !0 }, effect: { ...Ho.effect, default: "light" }, teleported: Ho.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 } }), QBe = { "update:visible": (e) => wE(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, JBe = "onUpdate:visible", eRe = G({ name: "ElPopover" }), tRe = /* @__PURE__ */ G({ ...eRe, props: ZBe, emits: QBe, setup(e, { expose: t, emit: n }) { const r = e, a = O(() => r[JBe]), o = gi("popover"), i = U(), s = O(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = O(() => [ { width: fj(r.width) }, r.popperStyle ]), u = O(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = O(() => r.transition === `${o.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) => ($(), ae(b(pBe), Dt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: q(() => [ m.title ? ($(), B("div", { key: 0, class: H(b(o).e("title")), role: "title" }, _e(m.title), 3)) : te("v-if", !0), he(m.$slots, "default", {}, () => [ ze(_e(m.content), 1) ]) ]), default: q(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : te("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 nRe = /* @__PURE__ */ za(tRe, [["__file", "popover.vue"]]); const KA = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var rRe = { mounted(e, t) { KA(e, t); }, updated(e, t) { KA(e, t); } }; const aRe = "popover", oRe = CNe(rRe, aRe), iRe = cp(nRe, { directive: oRe }); function sRe(e) { let t; const n = U(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { 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()) : (Db(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), Db(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, o(); } const u = G({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = JMe("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = nn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ nn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? nn("p", { class: p.b("text") }, [r.text]) : void 0; return nn(lr, { name: p.b("fade"), onAfterLeave: l }, { default: q(() => [ qe(Z("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ nn("div", { class: p.b("spinner") }, [g, y]) ]), [[ct, r.visible]]) ]) }); }; } }), c = Og(u), d = c.mount(document.createElement("div")); return { ...gr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let A1; const lRe = function(e = {}) { if (!Po) return; const t = uRe(e); if (t.fullscreen && A1) return A1; const n = sRe({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (A1 = void 0); } }); cRe(t, t.parent, n), GA(t, t.parent, n), t.parent.vLoadingAddClassList = () => GA(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), We(() => n.visible.value = t.visible), t.fullscreen && (A1 = n), n; }, uRe = (e) => { var t, n, r, a; let o; return Ih(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, cRe = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = gv(document.body, "position"), n.originalOverflow.value = gv(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = gv(document.body, "position"), await We(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(gv(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = gv(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, GA = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Db(t, r.bm("parent", "relative")) : yA(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? yA(t, r.bm("parent", "hidden")) : Db(t, r.bm("parent", "hidden")); }, Fy = Symbol("ElLoading"), XA = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => pm(t.value) ? t.value[f] : void 0, l = (f) => { const h = Ih(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${xPe(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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[Fy] = { options: d, instance: lRe(d) }; }, dRe = (e, t) => { for (const n of Object.keys(t)) Kn(t[n]) && (t[n].value = e[n]); }, pRe = { mounted(e, t) { t.value && XA(e, t); }, updated(e, t) { const n = e[Fy]; t.oldValue !== t.value && (t.value && !t.oldValue ? XA(e, t) : t.value && t.oldValue ? pm(t.value) && dRe(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Fy]) == null || t.instance.close(), e[Fy] = null; } }; function Xj(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: fRe } = Object.prototype, { getPrototypeOf: DE } = Object, qw = /* @__PURE__ */ ((e) => (t) => { const n = fRe.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), es = (e) => (e = e.toLowerCase(), (t) => qw(t) === e), Ww = (e) => (t) => typeof t === e, { isArray: Lh } = Array, tg = Ww("undefined"); function hRe(e) { return e !== null && !tg(e) && e.constructor !== null && !tg(e.constructor) && Lo(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const Yj = es("ArrayBuffer"); function vRe(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Yj(e.buffer), t; } const gRe = Ww("string"), Lo = Ww("function"), Zj = Ww("number"), Kw = (e) => e !== null && typeof e == "object", mRe = (e) => e === !0 || e === !1, Ay = (e) => { if (qw(e) !== "object") return !1; const t = DE(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, yRe = es("Date"), bRe = es("File"), wRe = es("Blob"), xRe = es("FileList"), kRe = (e) => Kw(e) && Lo(e.pipe), CRe = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || Lo(e.append) && ((t = qw(e)) === "formdata" || // detect form-data instance t === "object" && Lo(e.toString) && e.toString() === "[object FormData]")); }, SRe = es("URLSearchParams"), [ERe, _Re, TRe, $Re] = ["ReadableStream", "Request", "Response", "Headers"].map(es), ORe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function gm(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, a; if (typeof e != "object" && (e = [e]), Lh(e)) for (r = 0, a = e.length; r < a; r++) t.call(null, e[r], r, e); else { const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length; let s; for (r = 0; r < i; r++) s = o[r], t.call(null, e[s], s, e); } } function Qj(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, a; for (; r-- > 0; ) if (a = n[r], t === a.toLowerCase()) return a; return null; } const Xc = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Jj = (e) => !tg(e) && e !== Xc; function X5() { const { caseless: e } = Jj(this) && this || {}, t = {}, n = (r, a) => { const o = e && Qj(t, a) || a; Ay(t[o]) && Ay(r) ? t[o] = X5(t[o], r) : Ay(r) ? t[o] = X5({}, r) : Lh(r) ? t[o] = r.slice() : t[o] = r; }; for (let r = 0, a = arguments.length; r < a; r++) arguments[r] && gm(arguments[r], n); return t; } const FRe = (e, t, n, { allOwnKeys: r } = {}) => (gm(t, (a, o) => { n && Lo(a) ? e[o] = Xj(a, n) : e[o] = a; }, { allOwnKeys: r }), e), ARe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), IRe = (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); }, PRe = (e, t, n, r) => { let a, o, i; const s = {}; if (t = t || {}, e == null) return t; do { for (a = Object.getOwnPropertyNames(e), o = a.length; o-- > 0; ) i = a[o], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && DE(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, LRe = (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; }, NRe = (e) => { if (!e) return null; if (Lh(e)) return e; let t = e.length; if (!Zj(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, MRe = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && DE(Uint8Array)), DRe = (e, t) => { const n = (e && e[Symbol.iterator]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const a = r.value; t.call(e, a[0], a[1]); } }, BRe = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, RRe = es("HTMLFormElement"), zRe = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), YA = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), VRe = es("RegExp"), eH = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; gm(n, (a, o) => { let i; (i = t(a, o, e)) !== !1 && (r[o] = i || a); }), Object.defineProperties(e, r); }, jRe = (e) => { eH(e, (t, n) => { if (Lo(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (Lo(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 + "'"); }); } }); }, HRe = (e, t) => { const n = {}, r = (a) => { a.forEach((o) => { n[o] = !0; }); }; return Lh(e) ? r(e) : r(String(e).split(t)), n; }, URe = () => { }, qRe = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Uk = "abcdefghijklmnopqrstuvwxyz", ZA = "0123456789", tH = { DIGIT: ZA, ALPHA: Uk, ALPHA_DIGIT: Uk + Uk.toUpperCase() + ZA }, WRe = (e = 16, t = tH.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function KRe(e) { return !!(e && Lo(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const GRe = (e) => { const t = new Array(10), n = (r, a) => { if (Kw(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[a] = r; const o = Lh(r) ? [] : {}; return gm(r, (i, s) => { const l = n(i, a + 1); !tg(l) && (o[s] = l); }), t[a] = void 0, o; } } return r; }; return n(e, 0); }, XRe = es("AsyncFunction"), YRe = (e) => e && (Kw(e) || Lo(e)) && Lo(e.then) && Lo(e.catch), nH = ((e, t) => e ? setImmediate : t ? ((n, r) => (Xc.addEventListener("message", ({ source: a, data: o }) => { a === Xc && o === n && r.length && r.shift()(); }, !1), (a) => { r.push(a), Xc.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Lo(Xc.postMessage) ), ZRe = typeof queueMicrotask < "u" ? queueMicrotask.bind(Xc) : typeof process < "u" && process.nextTick || nH, Be = { isArray: Lh, isArrayBuffer: Yj, isBuffer: hRe, isFormData: CRe, isArrayBufferView: vRe, isString: gRe, isNumber: Zj, isBoolean: mRe, isObject: Kw, isPlainObject: Ay, isReadableStream: ERe, isRequest: _Re, isResponse: TRe, isHeaders: $Re, isUndefined: tg, isDate: yRe, isFile: bRe, isBlob: wRe, isRegExp: VRe, isFunction: Lo, isStream: kRe, isURLSearchParams: SRe, isTypedArray: MRe, isFileList: xRe, forEach: gm, merge: X5, extend: FRe, trim: ORe, stripBOM: ARe, inherits: IRe, toFlatObject: PRe, kindOf: qw, kindOfTest: es, endsWith: LRe, toArray: NRe, forEachEntry: DRe, matchAll: BRe, isHTMLForm: RRe, hasOwnProperty: YA, hasOwnProp: YA, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: eH, freezeMethods: jRe, toObjectSet: HRe, toCamelCase: zRe, noop: URe, toFiniteNumber: qRe, findKey: Qj, global: Xc, isContextDefined: Jj, ALPHABET: tH, generateString: WRe, isSpecCompliantForm: KRe, toJSONObject: GRe, isAsyncFn: XRe, isThenable: YRe, setImmediate: nH, asap: ZRe }; function Zt(e, t, n, r, a) { 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), a && (this.response = a, this.status = a.status ? a.status : null); } Be.inherits(Zt, 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: Be.toJSONObject(this.config), code: this.code, status: this.status }; } }); const rH = Zt.prototype, aH = {}; [ "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) => { aH[e] = { value: e }; }); Object.defineProperties(Zt, aH); Object.defineProperty(rH, "isAxiosError", { value: !0 }); Zt.from = (e, t, n, r, a, o) => { const i = Object.create(rH); return Be.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Zt.call(i, e.message, t, n, r, a), i.cause = e, i.name = e.name, o && Object.assign(i, o), i; }; const QRe = null; function Y5(e) { return Be.isPlainObject(e) || Be.isArray(e); } function oH(e) { return Be.endsWith(e, "[]") ? e.slice(0, -2) : e; } function QA(e, t, n) { return e ? e.concat(t).map(function(r, a) { return r = oH(r), !n && a ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function JRe(e) { return Be.isArray(e) && !e.some(Y5); } const e7e = Be.toFlatObject(Be, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function Gw(e, t, n) { if (!Be.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = Be.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, p) { return !Be.isUndefined(p[h]); }); const r = n.metaTokens, a = n.visitor || u, o = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && Be.isSpecCompliantForm(t); if (!Be.isFunction(a)) throw new TypeError("visitor must be a function"); function l(h) { if (h === null) return ""; if (Be.isDate(h)) return h.toISOString(); if (!s && Be.isBlob(h)) throw new Zt("Blob is not supported. Use a Buffer instead."); return Be.isArrayBuffer(h) || Be.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 (Be.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), h = JSON.stringify(h); else if (Be.isArray(h) && JRe(h) || (Be.isFileList(h) || Be.endsWith(p, "[]")) && (m = Be.toArray(h))) return p = oH(p), m.forEach(function(g, y) { !(Be.isUndefined(g) || g === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? QA([p], y, o) : i === null ? p : p + "[]", l(g) ); }), !1; } return Y5(h) ? !0 : (t.append(QA(v, p, o), l(h)), !1); } const c = [], d = Object.assign(e7e, { defaultVisitor: u, convertValue: l, isVisitable: Y5 }); function f(h, p) { if (!Be.isUndefined(h)) { if (c.indexOf(h) !== -1) throw Error("Circular reference detected in " + p.join(".")); c.push(h), Be.forEach(h, function(v, m) { (!(Be.isUndefined(v) || v === null) && a.call( t, v, Be.isString(m) ? m.trim() : m, p, d )) === !0 && f(v, p ? p.concat(m) : [m]); }), c.pop(); } } if (!Be.isObject(e)) throw new TypeError("data must be an object"); return f(e), t; } function JA(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function BE(e, t) { this._pairs = [], e && Gw(e, this, t); } const iH = BE.prototype; iH.append = function(e, t) { this._pairs.push([e, t]); }; iH.toString = function(e) { const t = e ? function(n) { return e.call(this, n, JA); } : JA; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function t7e(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function sH(e, t, n) { if (!t) return e; const r = n && n.encode || t7e, a = n && n.serialize; let o; if (a ? o = a(t, n) : o = Be.isURLSearchParams(t) ? t.toString() : new BE(t, n).toString(r), o) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o; } return e; } let eI = class { 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(e, t, n) { return this.handlers.push({ fulfilled: e, rejected: t, synchronous: n ? n.synchronous : !1, runWhen: n ? n.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(e) { this.handlers[e] && (this.handlers[e] = 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(e) { Be.forEach(this.handlers, function(t) { t !== null && e(t); }); } }; const lH = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, n7e = typeof URLSearchParams < "u" ? URLSearchParams : BE, r7e = typeof FormData < "u" ? FormData : null, a7e = typeof Blob < "u" ? Blob : null, o7e = { isBrowser: !0, classes: { URLSearchParams: n7e, FormData: r7e, Blob: a7e }, protocols: ["http", "https", "file", "blob", "url", "data"] }, RE = typeof window < "u" && typeof document < "u", Z5 = typeof navigator == "object" && navigator || void 0, i7e = RE && (!Z5 || ["ReactNative", "NativeScript", "NS"].indexOf(Z5.product) < 0), s7e = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", l7e = RE && window.location.href || "http://localhost", u7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: RE, hasStandardBrowserEnv: i7e, hasStandardBrowserWebWorkerEnv: s7e, navigator: Z5, origin: l7e }, Symbol.toStringTag, { value: "Module" })), mo = { ...u7e, ...o7e }; function c7e(e, t) { return Gw(e, new mo.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, a, o) { return mo.isNode && Be.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, t)); } function d7e(e) { return Be.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function p7e(e) { const t = {}, n = Object.keys(e); let r; const a = n.length; let o; for (r = 0; r < a; r++) o = n[r], t[o] = e[o]; return t; } function uH(e) { function t(n, r, a, o) { let i = n[o++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), l = o >= n.length; return i = !i && Be.isArray(a) ? a.length : i, l ? (Be.hasOwnProp(a, i) ? a[i] = [a[i], r] : a[i] = r, !s) : ((!a[i] || !Be.isObject(a[i])) && (a[i] = []), t(n, r, a[i], o) && Be.isArray(a[i]) && (a[i] = p7e(a[i])), !s); } if (Be.isFormData(e) && Be.isFunction(e.entries)) { const n = {}; return Be.forEachEntry(e, (r, a) => { t(d7e(r), a, n, 0); }), n; } return null; } function f7e(e, t, n) { if (Be.isString(e)) try { return (t || JSON.parse)(e), Be.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const mm = { transitional: lH, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, a = Be.isObject(e); if (a && Be.isHTMLForm(e) && (e = new FormData(e)), Be.isFormData(e)) return r ? JSON.stringify(uH(e)) : e; if (Be.isArrayBuffer(e) || Be.isBuffer(e) || Be.isStream(e) || Be.isFile(e) || Be.isBlob(e) || Be.isReadableStream(e)) return e; if (Be.isArrayBufferView(e)) return e.buffer; if (Be.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let o; if (a) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return c7e(e, this.formSerializer).toString(); if ((o = Be.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return Gw( o ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return a || r ? (t.setContentType("application/json", !1), f7e(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || mm.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (Be.isResponse(e) || Be.isReadableStream(e)) return e; if (e && Be.isString(e) && (n && !this.responseType || r)) { const a = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (o) { if (a) throw o.name === "SyntaxError" ? Zt.from(o, Zt.ERR_BAD_RESPONSE, this, null, this.response) : o; } } 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: mo.classes.FormData, Blob: mo.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; Be.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { mm.headers[e] = {}; }); const h7e = Be.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" ]), v7e = (e) => { const t = {}; let n, r, a; return e && e.split(` `).forEach(function(o) { a = o.indexOf(":"), n = o.substring(0, a).trim().toLowerCase(), r = o.substring(a + 1).trim(), !(!n || t[n] && h7e[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, tI = Symbol("internals"); function yv(e) { return e && String(e).trim().toLowerCase(); } function Iy(e) { return e === !1 || e == null ? e : Be.isArray(e) ? e.map(Iy) : String(e); } function g7e(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 m7e = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function qk(e, t, n, r, a) { if (Be.isFunction(r)) return r.call(this, t, n); if (a && (t = n), !!Be.isString(t)) { if (Be.isString(r)) return t.indexOf(r) !== -1; if (Be.isRegExp(r)) return r.test(t); } } function y7e(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function b7e(e, t) { const n = Be.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(a, o, i) { return this[r].call(this, t, a, o, i); }, configurable: !0 }); }); } class yo { constructor(t) { t && this.set(t); } set(t, n, r) { const a = this; function o(s, l, u) { const c = yv(l); if (!c) throw new Error("header name must be a non-empty string"); const d = Be.findKey(a, c); (!d || a[d] === void 0 || u === !0 || u === void 0 && a[d] !== !1) && (a[d || l] = Iy(s)); } const i = (s, l) => Be.forEach(s, (u, c) => o(u, c, l)); if (Be.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (Be.isString(t) && (t = t.trim()) && !m7e(t)) i(v7e(t), n); else if (Be.isHeaders(t)) for (const [s, l] of t.entries()) o(l, s, r); else t != null && o(n, t, r); return this; } get(t, n) { if (t = yv(t), t) { const r = Be.findKey(this, t); if (r) { const a = this[r]; if (!n) return a; if (n === !0) return g7e(a); if (Be.isFunction(n)) return n.call(this, a, r); if (Be.isRegExp(n)) return n.exec(a); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = yv(t), t) { const r = Be.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || qk(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let a = !1; function o(i) { if (i = yv(i), i) { const s = Be.findKey(r, i); s && (!n || qk(r, r[s], s, n)) && (delete r[s], a = !0); } } return Be.isArray(t) ? t.forEach(o) : o(t), a; } clear(t) { const n = Object.keys(this); let r = n.length, a = !1; for (; r--; ) { const o = n[r]; (!t || qk(this, this[o], o, t, !0)) && (delete this[o], a = !0); } return a; } normalize(t) { const n = this, r = {}; return Be.forEach(this, (a, o) => { const i = Be.findKey(r, o); if (i) { n[i] = Iy(a), delete n[o]; return; } const s = t ? y7e(o) : String(o).trim(); s !== o && delete n[o], n[s] = Iy(a), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return Be.forEach(this, (r, a) => { r != null && r !== !1 && (n[a] = t && Be.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((a) => r.set(a)), r; } static accessor(t) { const n = (this[tI] = this[tI] = { accessors: {} }).accessors, r = this.prototype; function a(o) { const i = yv(o); n[i] || (b7e(r, o), n[i] = !0); } return Be.isArray(t) ? t.forEach(a) : a(t), this; } } yo.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); Be.reduceDescriptors(yo.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); Be.freezeMethods(yo); function Wk(e, t) { const n = this || mm, r = t || n, a = yo.from(r.headers); let o = r.data; return Be.forEach(e, function(i) { o = i.call(n, o, a.normalize(), t ? t.status : void 0); }), a.normalize(), o; } function cH(e) { return !!(e && e.__CANCEL__); } function Nh(e, t, n) { Zt.call(this, e ?? "canceled", Zt.ERR_CANCELED, t, n), this.name = "CanceledError"; } Be.inherits(Nh, Zt, { __CANCEL__: !0 }); function dH(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Zt( "Request failed with status code " + n.status, [Zt.ERR_BAD_REQUEST, Zt.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function w7e(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function x7e(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let a = 0, o = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const l = Date.now(), u = r[o]; i || (i = l), n[a] = s, r[a] = l; let c = o, d = 0; for (; c !== a; ) d += n[c++], c = c % e; if (a = (a + 1) % e, a === o && (o = (o + 1) % e), l - i < t) return; const f = u && l - u; return f ? Math.round(d * 1e3 / f) : void 0; }; } function k7e(e, t) { let n = 0, r = 1e3 / t, a, o; const i = (s, l = Date.now()) => { n = l, a = null, o && (clearTimeout(o), o = null), e.apply(null, s); }; return [(...s) => { const l = Date.now(), u = l - n; u >= r ? i(s, l) : (a = s, o || (o = setTimeout(() => { o = null, i(a); }, r - u))); }, () => a && i(a)]; } const jb = (e, t, n = 3) => { let r = 0; const a = x7e(50, 250); return k7e((o) => { const i = o.loaded, s = o.lengthComputable ? o.total : void 0, l = i - r, u = a(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: o, lengthComputable: s != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, nI = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, rI = (e) => (...t) => Be.asap(() => e(...t)), C7e = mo.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 = mo.navigator && /(msie|trident)/i.test(mo.navigator.userAgent), t = document.createElement("a"); let n; function r(a) { let o = a; return e && (t.setAttribute("href", o), o = t.href), t.setAttribute("href", o), { 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(a) { const o = Be.isString(a) ? r(a) : a; return o.protocol === n.protocol && o.host === n.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), S7e = mo.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, a, o) { const i = [e + "=" + encodeURIComponent(t)]; Be.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), Be.isString(r) && i.push("path=" + r), Be.isString(a) && i.push("domain=" + a), o === !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 E7e(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function _7e(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function pH(e, t) { return e && !E7e(t) ? _7e(e, t) : t; } const aI = (e) => e instanceof yo ? { ...e } : e; function Id(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return Be.isPlainObject(u) && Be.isPlainObject(c) ? Be.merge.call({ caseless: d }, u, c) : Be.isPlainObject(c) ? Be.merge({}, c) : Be.isArray(c) ? c.slice() : c; } function a(u, c, d) { if (Be.isUndefined(c)) { if (!Be.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function o(u, c) { if (!Be.isUndefined(c)) return r(void 0, c); } function i(u, c) { if (Be.isUndefined(c)) { if (!Be.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: o, method: o, data: o, 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) => a(aI(u), aI(c), !0) }; return Be.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const c = l[u] || a, d = c(e[u], t[u], u); Be.isUndefined(d) && c !== s || (n[u] = d); }), n; } const fH = (e) => { const t = Id({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: a, xsrfCookieName: o, headers: i, auth: s } = t; t.headers = i = yo.from(i), t.url = sH(pH(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 (Be.isFormData(n)) { if (mo.hasStandardBrowserEnv || mo.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 (mo.hasStandardBrowserEnv && (r && Be.isFunction(r) && (r = r(t)), r || r !== !1 && C7e(t.url))) { const u = a && o && S7e.read(o); u && i.set(a, u); } return t; }, T7e = typeof XMLHttpRequest < "u", $7e = T7e && function(e) { return new Promise(function(t, n) { const r = fH(e); let a = r.data; const o = yo.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 y = yo.from( "getAllResponseHeaders" in v && v.getAllResponseHeaders() ), x = { data: !i || i === "text" || i === "json" ? v.responseText : v.response, status: v.status, statusText: v.statusText, headers: y, config: e, request: v }; dH(function(w) { t(w), p(); }, function(w) { n(w), p(); }, x), 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 Zt("Request aborted", Zt.ECONNABORTED, e, v)), v = null); }, v.onerror = function() { n(new Zt("Network Error", Zt.ERR_NETWORK, e, v)), v = null; }, v.ontimeout = function() { let y = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const x = r.transitional || lH; r.timeoutErrorMessage && (y = r.timeoutErrorMessage), n(new Zt( y, x.clarifyTimeoutError ? Zt.ETIMEDOUT : Zt.ECONNABORTED, e, v )), v = null; }, a === void 0 && o.setContentType(null), "setRequestHeader" in v && Be.forEach(o.toJSON(), function(y, x) { v.setRequestHeader(x, y); }), Be.isUndefined(r.withCredentials) || (v.withCredentials = !!r.withCredentials), i && i !== "json" && (v.responseType = r.responseType), l && ([d, h] = jb(l, !0), v.addEventListener("progress", d)), s && v.upload && ([c, f] = jb(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (u = (y) => { v && (n(!y || y.type ? new Nh(null, e, v) : y), v.abort(), v = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const g = w7e(r.url); if (g && mo.protocols.indexOf(g) === -1) { n(new Zt("Unsupported protocol " + g + ":", Zt.ERR_BAD_REQUEST, e)); return; } v.send(a || null); }); }, O7e = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), a; const o = function(u) { if (!a) { a = !0, s(); const c = u instanceof Error ? u : this.reason; r.abort(c instanceof Zt ? c : new Nh(c instanceof Error ? c.message : c)); } }; let i = t && setTimeout(() => { i = null, o(new Zt(`timeout ${t} of ms exceeded`, Zt.ETIMEDOUT)); }, t); const s = () => { e && (i && clearTimeout(i), i = null, e.forEach((u) => { u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o); }), e = null); }; e.forEach((u) => u.addEventListener("abort", o)); const { signal: l } = r; return l.unsubscribe = () => Be.asap(s), l; } }, F7e = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, a; for (; r < n; ) a = r + t, yield e.slice(r, a), r = a; }, A7e = async function* (e, t) { for await (const n of I7e(e)) yield* F7e(n, t); }, I7e = 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(); } }, oI = (e, t, n, r) => { const a = A7e(e, t); let o = 0, i, s = (l) => { i || (i = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: u, value: c } = await a.next(); if (u) { s(), l.close(); return; } let d = c.byteLength; if (n) { let f = o += d; n(f); } l.enqueue(new Uint8Array(c)); } catch (u) { throw s(u), u; } }, cancel(l) { return s(l), a.return(); } }, { highWaterMark: 2 }); }, Xw = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", hH = Xw && typeof ReadableStream == "function", P7e = Xw && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), vH = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, L7e = hH && vH(() => { let e = !1; const t = new Request(mo.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), iI = 64 * 1024, Q5 = hH && vH(() => Be.isReadableStream(new Response("").body)), Hb = { stream: Q5 && ((e) => e.body) }; Xw && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !Hb[t] && (Hb[t] = Be.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Zt(`Response type '${t}' is not supported`, Zt.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const N7e = async (e) => { if (e == null) return 0; if (Be.isBlob(e)) return e.size; if (Be.isSpecCompliantForm(e)) return (await new Request(mo.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (Be.isArrayBufferView(e) || Be.isArrayBuffer(e)) return e.byteLength; if (Be.isURLSearchParams(e) && (e = e + ""), Be.isString(e)) return (await P7e(e)).byteLength; }, M7e = async (e, t) => Be.toFiniteNumber(e.getContentLength()) ?? N7e(t), D7e = Xw && (async (e) => { let { url: t, method: n, data: r, signal: a, cancelToken: o, timeout: i, onDownloadProgress: s, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = fH(e); u = u ? (u + "").toLowerCase() : "text"; let h = O7e([a, o && o.toAbortSignal()], i), p; const v = h && h.unsubscribe && (() => { h.unsubscribe(); }); let m; try { if (l && L7e && n !== "get" && n !== "head" && (m = await M7e(c, r)) !== 0) { let k = new Request(t, { method: "POST", body: r, duplex: "half" }), C; if (Be.isFormData(r) && (C = k.headers.get("content-type")) && c.setContentType(C), k.body) { const [S, _] = nI( m, jb(rI(l)) ); r = oI(k.body, iI, S, _); } } Be.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 y = await fetch(p); const x = Q5 && (u === "stream" || u === "response"); if (Q5 && (s || x && v)) { const k = {}; ["status", "statusText", "headers"].forEach((T) => { k[T] = y[T]; }); const C = Be.toFiniteNumber(y.headers.get("content-length")), [S, _] = s && nI( C, jb(rI(s), !0) ) || []; y = new Response( oI(y.body, iI, S, () => { _ && _(), v && v(); }), k ); } u = u || "text"; let w = await Hb[Be.findKey(Hb, u) || "text"](y, e); return !x && v && v(), await new Promise((k, C) => { dH(k, C, { data: w, headers: yo.from(y.headers), status: y.status, statusText: y.statusText, config: e, request: p }); }); } catch (g) { throw v && v(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign( new Zt("Network Error", Zt.ERR_NETWORK, e, p), { cause: g.cause || g } ) : Zt.from(g, g && g.code, e, p); } }), J5 = { http: QRe, xhr: $7e, fetch: D7e }; Be.forEach(J5, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const sI = (e) => `- ${e}`, B7e = (e) => Be.isFunction(e) || e === null || e === !1, gH = { getAdapter: (e) => { e = Be.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const a = {}; for (let o = 0; o < t; o++) { n = e[o]; let i; if (r = n, !B7e(n) && (r = J5[(i = String(n)).toLowerCase()], r === void 0)) throw new Zt(`Unknown adapter '${i}'`); if (r) break; a[i || "#" + o] = r; } if (!r) { const o = Object.entries(a).map( ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? o.length > 1 ? `since : ` + o.map(sI).join(` `) : " " + sI(o[0]) : "as no adapter specified"; throw new Zt( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: J5 }; function Kk(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Nh(null, e); } function lI(e) { return Kk(e), e.headers = yo.from(e.headers), e.data = Wk.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gH.getAdapter(e.adapter || mm.adapter)(e).then(function(t) { return Kk(e), t.data = Wk.call( e, e.transformResponse, t ), t.headers = yo.from(t.headers), t; }, function(t) { return cH(t) || (Kk(e), t && t.response && (t.response.data = Wk.call( e, e.transformResponse, t.response ), t.response.headers = yo.from(t.response.headers))), Promise.reject(t); }); } const mH = "1.7.7", zE = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { zE[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const uI = {}; zE.transitional = function(e, t, n) { function r(a, o) { return "[Axios v" + mH + "] Transitional option '" + a + "'" + o + (n ? ". " + n : ""); } return (a, o, i) => { if (e === !1) throw new Zt( r(o, " has been removed" + (t ? " in " + t : "")), Zt.ERR_DEPRECATED ); return t && !uI[o] && (uI[o] = !0, console.warn( r( o, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(a, o, i) : !0; }; }; function R7e(e, t, n) { if (typeof e != "object") throw new Zt("options must be an object", Zt.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let a = r.length; for (; a-- > 0; ) { const o = r[a], i = t[o]; if (i) { const s = e[o], l = s === void 0 || i(s, o, e); if (l !== !0) throw new Zt("option " + o + " must be " + l, Zt.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Zt("Unknown option " + o, Zt.ERR_BAD_OPTION); } } const e3 = { assertOptions: R7e, validators: zE }, Jl = e3.validators; class ud { constructor(t) { this.defaults = t, this.interceptors = { request: new eI(), response: new eI() }; } /** * 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 a; Error.captureStackTrace ? Error.captureStackTrace(a = {}) : a = new Error(); const o = a.stack ? a.stack.replace(/^.+\n/, "") : ""; try { r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + o) : r.stack = o; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Id(this.defaults, n); const { transitional: r, paramsSerializer: a, headers: o } = n; r !== void 0 && e3.assertOptions(r, { silentJSONParsing: Jl.transitional(Jl.boolean), forcedJSONParsing: Jl.transitional(Jl.boolean), clarifyTimeoutError: Jl.transitional(Jl.boolean) }, !1), a != null && (Be.isFunction(a) ? n.paramsSerializer = { serialize: a } : e3.assertOptions(a, { encode: Jl.function, serialize: Jl.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = o && Be.merge( o.common, o[n.method] ); o && Be.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (p) => { delete o[p]; } ), n.headers = yo.concat(i, o); 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 = [lI.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 = lI.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 = Id(this.defaults, t); const n = pH(t.baseURL, t.url); return sH(n, t.params, t.paramsSerializer); } } Be.forEach(["delete", "get", "head", "options"], function(e) { ud.prototype[e] = function(t, n) { return this.request(Id(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); Be.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, a, o) { return this.request(Id(o || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: a })); }; } ud.prototype[e] = t(), ud.prototype[e + "Form"] = t(!0); }); class VE { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(a) { n = a; }); const r = this; this.promise.then((a) => { if (!r._listeners) return; let o = r._listeners.length; for (; o-- > 0; ) r._listeners[o](a); r._listeners = null; }), this.promise.then = (a) => { let o; const i = new Promise((s) => { r.subscribe(s), o = s; }).then(a); return i.cancel = function() { r.unsubscribe(o); }, i; }, t(function(a, o, i) { r.reason || (r.reason = new Nh(a, o, 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 VE(function(n) { t = n; }), cancel: t }; } } function z7e(e) { return function(t) { return e.apply(null, t); }; } function V7e(e) { return Be.isObject(e) && e.isAxiosError === !0; } const t3 = { 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(t3).forEach(([e, t]) => { t3[t] = e; }); function yH(e) { const t = new ud(e), n = Xj(ud.prototype.request, t); return Be.extend(n, ud.prototype, t, { allOwnKeys: !0 }), Be.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return yH(Id(e, r)); }, n; } const Er = yH(mm); Er.Axios = ud; Er.CanceledError = Nh; Er.CancelToken = VE; Er.isCancel = cH; Er.VERSION = mH; Er.toFormData = Gw; Er.AxiosError = Zt; Er.Cancel = Er.CanceledError; Er.all = function(e) { return Promise.all(e); }; Er.spread = z7e; Er.isAxiosError = V7e; Er.mergeConfig = Id; Er.AxiosHeaders = yo; Er.formToJSON = (e) => uH(Be.isHTMLForm(e) ? new FormData(e) : e); Er.getAdapter = gH.getAdapter; Er.HttpStatusCode = t3; Er.default = Er; const j7e = "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 H7e() { const e = j7e; async function t(n, r, a) { return await Er({ method: "get", url: n, params: r, timeout: a }); } return { defaultImg: e, getRequest: t }; } const U7e = ["src"], q7e = ["src"], W7e = { key: 1, class: "details" }, K7e = { key: 0 }, G7e = { class: "title text-placeholder" }, X7e = { __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 y; try { y = new URL(g); } catch { return !1; } return y.protocol === "http:" || y.protocol === "https:"; } const { defaultImg: r, getRequest: a } = H7e(), o = U(); U(null), U(4); const i = U(void 0), s = U(!1), l = U(!1), u = U(!1), c = e, d = t, f = O(() => c.data.title && ((i ? i.value : !1) || s.value) && (c.data.link || c.data.userData)); O(() => showCardDetails ? height * 0.525 : height), O(() => width - 2 * h), O(() => height * 0.237); const h = O(() => height * 0.076); O(() => showCardDetails ? height * 0.525 : height), be( () => 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, We(() => { m(); }); }, { immediate: !0 } ), qd(() => { We(() => { 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, y) { a(g, {}, 11e3).then( (x) => { let w = x.data; typeof w == "string" && w.startsWith("data:") ? i.value = x.data : c.data.mimetype ? i.value = `data:${c.data.mimetype};base64,${x.data}` : i.value = x.data; }, (x) => { x.message.includes("timeout") && x.message.includes("exceeded") && y.fetchAttempts < 3 ? (y.fetchAttempts += 1, v(g, y)) : s.value = !0; } ); } function m() { if (c.data.hideTitle) l.value = !0, u.value = !0; else { const g = o; 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, y) => { const x = iRe, w = DBe, k = jBe, C = pRe; return $(), ae(k, { shadow: e.shadow, "body-style": e.bodyStyle, style: Qe({ padding: "0px", maxWidth: e.width + "rem" }), class: "card" }, { default: q(() => [ qe(($(), B("div", null, [ K("div", { class: "cursor-pointer", style: Qe(e.imageContainerStyle), onClick: et(p, ["prevent"]) }, [ s.value ? ($(), B("img", { key: 0, src: b(r), style: Qe(e.imageStyle) }, null, 12, U7e)) : ($(), B("img", { key: 1, src: i.value, alt: "thumbnail loading ...", style: Qe(e.imageStyle) }, null, 12, q7e)) ], 4), te("", !0), e.showCardDetails ? ($(), B("div", W7e, [ e.data.hideType ? te("", !0) : ($(), B("p", K7e, [ K("b", null, _e(e.data.type), 1) ])), Z(x, { "virtual-ref": o.value, disabled: l.value, content: e.data.title, placement: "top", trigger: "hover", "popper-class": "gallery-popper", "virtual-triggering": "" }, null, 8, ["virtual-ref", "disabled", "content"]), qe(K("p", { ref_key: "titleText", ref: o, class: "title" }, _e(e.data.title), 513), [ [ct, !e.data.hideTitle] ]), qe(K("p", G7e, null, 512), [ [ct, e.data.hideTitle] ]), Z(w, { class: "button", onClick: et(p, ["prevent"]), size: "large" }, { default: q(() => [ ze(" View " + _e(e.data.type), 1) ]), _: 1 }) ])) : te("", !0) ])), [ [C, !f.value] ]) ]), _: 1 }, 8, ["shadow", "body-style", "style"]); }; } }, Y7e = /* @__PURE__ */ dE(X7e, [["__scopeId", "data-v-8306387d"]]), Yw = (e) => (ma("data-v-e745b327"), e = e(), ya(), e), Z7e = { ref: "myButton", class: "gallery" }, Q7e = { class: "gallery-strip" }, J7e = /* @__PURE__ */ Yw(() => /* @__PURE__ */ K("span", { class: "progress-button" }, "‹", -1)), eze = [ J7e ], tze = { key: 1, style: { width: "2rem" } }, nze = /* @__PURE__ */ Yw(() => /* @__PURE__ */ K("div", { class: "filler" }, null, -1)), rze = { class: "card-line" }, aze = /* @__PURE__ */ Yw(() => /* @__PURE__ */ K("div", { class: "filler" }, null, -1)), oze = /* @__PURE__ */ Yw(() => /* @__PURE__ */ K("span", { class: "progress-button" }, "›", -1)), ize = [ oze ], sze = { key: 3, style: { width: "2rem" } }, lze = { __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 a = e, o = n, i = U(0), s = U(0), l = U(2), u = U(2), c = O(() => a.items.length), d = O(() => s.value > 0), f = O(() => s.value < c.value - 1), h = O(() => 0.78 * a.cardWidth); O(() => c.value * (a.cardWidth + 0.25) - 0.25); const p = O(() => { const _ = r(0.5), T = r(2), F = r(a.cardWidth), A = (a.maxWidth - 2 * T - 2 * _) / (1.1 * F); return Math.max(1, Math.floor(A)); }), v = O(() => { const _ = r(1), T = a.maxWidth / (_ * c.value); return a.showIndicatorBar && T > 0.1 && c.value > 1; }), m = O(() => { const _ = Math.floor(p.value / 2); let T = s.value - _; return T < 0 ? T = 0 : T + p.value > c.value && (T = c.value - p.value), T; }), g = O(() => { let _ = []; for (let T = 0; T < p.value; T++) _.push(a.items[T + m.value]); return _; }); function y(_) { o("card-clicked", _); } function x(_) { o("datalink-clicked", _); } function w(_) { return s.value - m.value === _ && a.highlightActive; } function k() { s.value += 1; } function C() { s.value -= 1; } function S(_) { s.value !== _ && (s.value = _); } return t({ count: i, currentIndex: s, controlHeight: l, controlWidth: u, cardClicked: y, isActive: w, goNext: k, goPrev: C, indicatorClicked: S }), (_, T) => ($(), B("div", Z7e, [ K("div", Q7e, [ e.items.length > 1 ? ($(), B("a", { key: 0, href: "#", class: H(["oval", "prev", { disabled: !d.value }]), onClick: et(C, ["prevent"]) }, eze, 2)) : ($(), B("div", tze)), nze, K("div", rze, [ ($(!0), B(Ue, null, yt(g.value, (F, A) => ($(), B("span", { key: "card_" + A, class: H(["key-image-span", { active: w(A) }]) }, [ F ? ($(), ae(Y7e, { 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: y, onDatalinkClicked: x }, null, 8, ["data", "body-style", "image-container-style", "image-style", "width", "height", "shadow", "show-card-details"])) : te("", !0) ], 2))), 128)) ]), aze, e.items.length > 1 ? ($(), B("a", { key: 2, href: "#", class: H(["oval", "next", { disabled: !f.value }]), onClick: et(k, ["prevent"]) }, ize, 2)) : ($(), B("div", sze)) ]), K("div", { style: Qe(e.bottomSpacer) }, null, 4), v.value ? ($(), ae(iPe, { key: 0, count: c.value, current: s.value, onClicked: S }, null, 8, ["count", "current"])) : te("", !0) ], 512)); } }, uze = /* @__PURE__ */ dE(lze, [["__scopeId", "data-v-e745b327"]]), cze = { 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; } } }, I1 = (e) => e.split("\\").pop().split("/").pop(), bv = function(e) { return e.replace(/\b\w/g, (t) => t.toUpperCase()); }, dze = { name: "ImageGallery", components: { Gallery: uze }, mixins: [nPe, cze], 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: I1(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 a, o = ""; r && (a = this.getImageURL(this.envVars.API_LOCATION, { id: n, prefix: this.getS3Prefix(), file_path: r.dataset.path, s3Bucket: this.s3Bucket }), o = 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: bv(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: I1(t), type: "Plot", thumbnail: a, userData: f, hideType: !0, mimetype: o }); }); }, createScaffoldItems: function() { if (this.entry.scaffolds) { let e = 0; this.entry.scaffolds.forEach((t, n) => { const r = t.dataset.path, a = t.identifier, o = this.getThumbnailForScaffold( t, this.entry.scaffoldViews, this.entry.thumbnails, e ); let i = "", s; o && (s = this.getImageURL(this.envVars.API_LOCATION, { id: a, prefix: this.getS3Prefix(), file_path: o.dataset.path, s3Bucket: this.s3Bucket }), i = o.mimetype.name); let l = { label: bv(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: a, title: I1(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 a = { label: bv(this.label), resource: r, datasetId: this.datasetId, s3uri: this.entry.s3uri, title: "View segmentation", type: "Segmentation" }; const o = 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: I1(n), type: "Segmentation", thumbnail: o, userData: a, 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 } ), a = { share_link: n.share_link, id: n.image_id, itemId: n.sourcepkg_id }; let o = { label: bv(this.label), resource: a, datasetId: this.datasetId, title: "View image", name: bv(this.label), type: "Biolucida" }; return { id: n.image_id, title: "Image", type: "Image", thumbnail: r, userData: o, mimetype: "image/png", hideType: !0 }; }) ), this.items.Images = t; } } }, mounted() { this.ro = new ResizeObserver(this.onResize).observe(this.$el); }, unmounted() { delete this.ro; } }, pze = { class: "full-size" }; function fze(e, t, n, r, a, o) { const i = lt("Gallery"); return $(), B("div", pze, [ Z(i, { bottomSpacer: a.bottomSpacer, cardWidth: 10, items: o.galleryItems, "max-width": a.maxWidth, "show-indicator-bar": !1, "show-card-details": !0, "highlight-active": !1, "image-style": a.imageStyle, "image-container-style": a.imageContainerStyle, "body-style": a.bodyStyle, shadow: a.shadow, onCardClicked: o.cardClicked, onDatalinkClicked: o.datalinkClicked, ref: "gallery" }, null, 8, ["bottomSpacer", "items", "max-width", "image-style", "image-container-style", "body-style", "shadow", "onCardClicked", "onDatalinkClicked"]) ]); } const bH = /* @__PURE__ */ Zi(dze, [["render", fze], ["__scopeId", "data-v-7e45605c"]]); function hze(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(a) { a(n); }), (r = e.get("*")) && r.slice().map(function(a) { a(t, n); }); } }; } const yr = new hze(), Ub = { "homo sapiens": "Human", "rattus norvegicus": "Rat", "mus musculus": "Mouse", "sus scrofa domesticus": "Pig", "sus scrofa": "Boar", "felis catus": "Cat" }, cI = "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"; var vze = Object.defineProperty, gze = (e, t, n) => t in e ? vze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ls = (e, t, n) => gze(e, typeof t != "symbol" ? t + "" : t, n); const rl = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => { const a = e == null ? void 0 : e(r); if (n === !1 || !a) return t == null ? void 0 : t(r); }; var dI; const kr = typeof window < "u", mze = (e) => typeof e == "string", wH = () => { }, n3 = kr && ((dI = window == null ? void 0 : window.navigator) == null ? void 0 : dI.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function xH(e) { return typeof e == "function" ? e() : b(e); } function yze(e) { return e; } function Zw(e) { return xg() ? (lh(e), !0) : !1; } function bze(e, t = !0) { tt() ? nt(e) : t ? e() : We(e); } function hl(e) { var t; const n = xH(e); return (t = n == null ? void 0 : n.$el) != null ? t : n; } const Qw = kr ? window : void 0; function Ko(...e) { let t, n, r, a; if (mze(e[0]) || Array.isArray(e[0]) ? ([n, r, a] = e, t = Qw) : [t, n, r, a] = e, !t) return wH; Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]); const o = [], i = () => { o.forEach((c) => c()), o.length = 0; }, s = (c, d, f, h) => (c.addEventListener(d, f, h), () => c.removeEventListener(d, f, h)), l = be(() => [hl(t), xH(a)], ([c, d]) => { i(), c && o.push(...n.flatMap((f) => r.map((h) => s(c, f, h, d)))); }, { immediate: !0, flush: "post" }), u = () => { l(), i(); }; return Zw(u), u; } let pI = !1; function wze(e, t, n = {}) { const { window: r = Qw, ignore: a = [], capture: o = !0, detectIframe: i = !1 } = n; if (!r) return; n3 && !pI && (pI = !0, Array.from(r.document.body.children).forEach((c) => c.addEventListener("click", wH))); let s = !0; const l = (c) => a.some((d) => { if (typeof d == "string") return Array.from(r.document.querySelectorAll(d)).some((f) => f === c.target || c.composedPath().includes(f)); { const f = hl(d); return f && (c.target === f || c.composedPath().includes(f)); } }), u = [ Ko(r, "click", (c) => { const d = hl(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: o }), Ko(r, "pointerdown", (c) => { const d = hl(e); d && (s = !c.composedPath().includes(d) && !l(c)); }, { passive: !0 }), i && Ko(r, "blur", (c) => { var d; const f = hl(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 kH(e, t = !1) { const n = U(), r = () => n.value = !!e(); return r(), bze(r, t), n; } const fI = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, hI = "__vueuse_ssr_handlers__"; fI[hI] = fI[hI] || {}; var vI = Object.getOwnPropertySymbols, xze = Object.prototype.hasOwnProperty, kze = Object.prototype.propertyIsEnumerable, Cze = (e, t) => { var n = {}; for (var r in e) xze.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && vI) for (var r of vI(e)) t.indexOf(r) < 0 && kze.call(e, r) && (n[r] = e[r]); return n; }; function il(e, t, n = {}) { const r = n, { window: a = Qw } = r, o = Cze(r, ["window"]); let i; const s = kH(() => a && "ResizeObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => hl(e), (d) => { l(), s.value && a && d && (i = new ResizeObserver(t), i.observe(d, o)); }, { immediate: !0, flush: "post" }), c = () => { l(), u(); }; return Zw(c), { isSupported: s, stop: c }; } var gI = Object.getOwnPropertySymbols, Sze = Object.prototype.hasOwnProperty, Eze = Object.prototype.propertyIsEnumerable, _ze = (e, t) => { var n = {}; for (var r in e) Sze.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && gI) for (var r of gI(e)) t.indexOf(r) < 0 && Eze.call(e, r) && (n[r] = e[r]); return n; }; function Tze(e, t, n = {}) { const r = n, { window: a = Qw } = r, o = _ze(r, ["window"]); let i; const s = kH(() => a && "MutationObserver" in a), l = () => { i && (i.disconnect(), i = void 0); }, u = be(() => hl(e), (d) => { l(), s.value && a && d && (i = new MutationObserver(t), i.observe(d, o)); }, { immediate: !0 }), c = () => { l(), u(); }; return Zw(c), { isSupported: s, stop: c }; } var mI; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; })(mI || (mI = {})); var $ze = Object.defineProperty, yI = Object.getOwnPropertySymbols, Oze = Object.prototype.hasOwnProperty, Fze = Object.prototype.propertyIsEnumerable, bI = (e, t, n) => t in e ? $ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Aze = (e, t) => { for (var n in t || (t = {})) Oze.call(t, n) && bI(e, n, t[n]); if (yI) for (var n of yI(t)) Fze.call(t, n) && bI(e, n, t[n]); return e; }; const Ize = { 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] }; Aze({ linear: yze }, Ize); const Pze = () => kr && /firefox/i.test(window.navigator.userAgent), jE = (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 ng = () => { }, Lze = Object.prototype.hasOwnProperty, Pd = (e, t) => Lze.call(e, t), oo = Array.isArray, Ga = (e) => typeof e == "function", Ia = (e) => typeof e == "string", oa = (e) => e !== null && typeof e == "object", Nze = Object.prototype.toString, Mze = (e) => Nze.call(e), Gk = (e) => Mze(e).slice(8, -1), CH = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, Dze = /-(\w)/g, Bze = CH((e) => e.replace(Dze, (t, n) => n ? n.toUpperCase() : "")), Rze = /\B([A-Z])/g, zze = CH( (e) => e.replace(Rze, "-$1").toLowerCase() ); var SH = typeof global == "object" && global && global.Object === Object && global, Vze = typeof self == "object" && self && self.Object === Object && self, zs = SH || Vze || Function("return this")(), As = zs.Symbol, EH = Object.prototype, jze = EH.hasOwnProperty, Hze = EH.toString, wv = As ? As.toStringTag : void 0; function Uze(e) { var t = jze.call(e, wv), n = e[wv]; try { e[wv] = void 0; var r = !0; } catch { } var a = Hze.call(e); return r && (t ? e[wv] = n : delete e[wv]), a; } var qze = Object.prototype, Wze = qze.toString; function Kze(e) { return Wze.call(e); } var Gze = "[object Null]", Xze = "[object Undefined]", wI = As ? As.toStringTag : void 0; function Mh(e) { return e == null ? e === void 0 ? Xze : Gze : wI && wI in Object(e) ? Uze(e) : Kze(e); } function Yf(e) { return e != null && typeof e == "object"; } var Yze = "[object Symbol]"; function Jw(e) { return typeof e == "symbol" || Yf(e) && Mh(e) == Yze; } function Zze(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var qi = Array.isArray, Qze = 1 / 0, xI = As ? As.prototype : void 0, kI = xI ? xI.toString : void 0; function _H(e) { if (typeof e == "string") return e; if (qi(e)) return Zze(e, _H) + ""; if (Jw(e)) return kI ? kI.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -Qze ? "-0" : t; } var Jze = /\s/; function eVe(e) { for (var t = e.length; t-- && Jze.test(e.charAt(t)); ) ; return t; } var tVe = /^\s+/; function nVe(e) { return e && e.slice(0, eVe(e) + 1).replace(tVe, ""); } function Ju(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var CI = NaN, rVe = /^[-+]0x[0-9a-f]+$/i, aVe = /^0b[01]+$/i, oVe = /^0o[0-7]+$/i, iVe = parseInt; function SI(e) { if (typeof e == "number") return e; if (Jw(e)) return CI; if (Ju(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Ju(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = nVe(e); var n = aVe.test(e); return n || oVe.test(e) ? iVe(e.slice(2), n ? 2 : 8) : rVe.test(e) ? CI : +e; } function TH(e) { return e; } var sVe = "[object AsyncFunction]", lVe = "[object Function]", uVe = "[object GeneratorFunction]", cVe = "[object Proxy]"; function $H(e) { if (!Ju(e)) return !1; var t = Mh(e); return t == lVe || t == uVe || t == sVe || t == cVe; } var Xk = zs["__core-js_shared__"], EI = function() { var e = /[^.]+$/.exec(Xk && Xk.keys && Xk.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function dVe(e) { return !!EI && EI in e; } var pVe = Function.prototype, fVe = pVe.toString; function dp(e) { if (e != null) { try { return fVe.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var hVe = /[\\^$.*+?()[\]{}|]/g, vVe = /^\[object .+?Constructor\]$/, gVe = Function.prototype, mVe = Object.prototype, yVe = gVe.toString, bVe = mVe.hasOwnProperty, wVe = RegExp( "^" + yVe.call(bVe).replace(hVe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function xVe(e) { if (!Ju(e) || dVe(e)) return !1; var t = $H(e) ? wVe : vVe; return t.test(dp(e)); } function kVe(e, t) { return e == null ? void 0 : e[t]; } function pp(e, t) { var n = kVe(e, t); return xVe(n) ? n : void 0; } var r3 = pp(zs, "WeakMap"); function CVe(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 SVe = 800, EVe = 16, _Ve = Date.now; function TVe(e) { var t = 0, n = 0; return function() { var r = _Ve(), a = EVe - (r - n); if (n = r, a > 0) { if (++t >= SVe) return arguments[0]; } else t = 0; return e.apply(void 0, arguments); }; } function $Ve(e) { return function() { return e; }; } var qb = function() { try { var e = pp(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), OVe = qb ? function(e, t) { return qb(e, "toString", { configurable: !0, enumerable: !1, value: $Ve(t), writable: !0 }); } : TH, FVe = TVe(OVe); function AVe(e, t, n, r) { e.length; for (var a = n + 1; a--; ) if (t(e[a], a, e)) return a; return -1; } var IVe = 9007199254740991, PVe = /^(?:0|[1-9]\d*)$/; function HE(e, t) { var n = typeof e; return t = t ?? IVe, !!t && (n == "number" || n != "symbol" && PVe.test(e)) && e > -1 && e % 1 == 0 && e < t; } function LVe(e, t, n) { t == "__proto__" && qb ? qb(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } function UE(e, t) { return e === t || e !== e && t !== t; } var NVe = Object.prototype, MVe = NVe.hasOwnProperty; function DVe(e, t, n) { var r = e[t]; (!(MVe.call(e, t) && UE(r, n)) || n === void 0 && !(t in e)) && LVe(e, t, n); } var _I = Math.max; function BVe(e, t, n) { return t = _I(t === void 0 ? e.length - 1 : t, 0), function() { for (var r = arguments, a = -1, o = _I(r.length - t, 0), i = Array(o); ++a < o; ) i[a] = r[t + a]; a = -1; for (var s = Array(t + 1); ++a < t; ) s[a] = r[a]; return s[t] = n(i), CVe(e, this, s); }; } var RVe = 9007199254740991; function qE(e) { return typeof e == "number" && e > -1 && e % 1 == 0 && e <= RVe; } function zVe(e) { return e != null && qE(e.length) && !$H(e); } var VVe = Object.prototype; function jVe(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || VVe; return e === n; } function HVe(e, t) { for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n); return r; } var UVe = "[object Arguments]"; function TI(e) { return Yf(e) && Mh(e) == UVe; } var OH = Object.prototype, qVe = OH.hasOwnProperty, WVe = OH.propertyIsEnumerable, WE = TI(/* @__PURE__ */ function() { return arguments; }()) ? TI : function(e) { return Yf(e) && qVe.call(e, "callee") && !WVe.call(e, "callee"); }; function KVe() { return !1; } var FH = typeof exports == "object" && exports && !exports.nodeType && exports, $I = FH && typeof module == "object" && module && !module.nodeType && module, GVe = $I && $I.exports === FH, OI = GVe ? zs.Buffer : void 0, XVe = OI ? OI.isBuffer : void 0, a3 = XVe || KVe, YVe = "[object Arguments]", ZVe = "[object Array]", QVe = "[object Boolean]", JVe = "[object Date]", eje = "[object Error]", tje = "[object Function]", nje = "[object Map]", rje = "[object Number]", aje = "[object Object]", oje = "[object RegExp]", ije = "[object Set]", sje = "[object String]", lje = "[object WeakMap]", uje = "[object ArrayBuffer]", cje = "[object DataView]", dje = "[object Float32Array]", pje = "[object Float64Array]", fje = "[object Int8Array]", hje = "[object Int16Array]", vje = "[object Int32Array]", gje = "[object Uint8Array]", mje = "[object Uint8ClampedArray]", yje = "[object Uint16Array]", bje = "[object Uint32Array]", er = {}; er[dje] = er[pje] = er[fje] = er[hje] = er[vje] = er[gje] = er[mje] = er[yje] = er[bje] = !0; er[YVe] = er[ZVe] = er[uje] = er[QVe] = er[cje] = er[JVe] = er[eje] = er[tje] = er[nje] = er[rje] = er[aje] = er[oje] = er[ije] = er[sje] = er[lje] = !1; function wje(e) { return Yf(e) && qE(e.length) && !!er[Mh(e)]; } function xje(e) { return function(t) { return e(t); }; } var AH = typeof exports == "object" && exports && !exports.nodeType && exports, s0 = AH && typeof module == "object" && module && !module.nodeType && module, kje = s0 && s0.exports === AH, Yk = kje && SH.process, FI = function() { try { var e = s0 && s0.require && s0.require("util").types; return e || Yk && Yk.binding && Yk.binding("util"); } catch { } }(), AI = FI && FI.isTypedArray, IH = AI ? xje(AI) : wje, Cje = Object.prototype, Sje = Cje.hasOwnProperty; function Eje(e, t) { var n = qi(e), r = !n && WE(e), a = !n && !r && a3(e), o = !n && !r && !a && IH(e), i = n || r || a || o, s = i ? HVe(e.length, String) : [], l = s.length; for (var u in e) Sje.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. a && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. HE(u, l))) && s.push(u); return s; } function _je(e, t) { return function(n) { return e(t(n)); }; } var Tje = _je(Object.keys, Object), $je = Object.prototype, Oje = $je.hasOwnProperty; function Fje(e) { if (!jVe(e)) return Tje(e); var t = []; for (var n in Object(e)) Oje.call(e, n) && n != "constructor" && t.push(n); return t; } function PH(e) { return zVe(e) ? Eje(e) : Fje(e); } var Aje = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ije = /^\w*$/; function KE(e, t) { if (qi(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || Jw(e) ? !0 : Ije.test(e) || !Aje.test(e) || t != null && e in Object(t); } var rg = pp(Object, "create"); function Pje() { this.__data__ = rg ? rg(null) : {}, this.size = 0; } function Lje(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var Nje = "__lodash_hash_undefined__", Mje = Object.prototype, Dje = Mje.hasOwnProperty; function Bje(e) { var t = this.__data__; if (rg) { var n = t[e]; return n === Nje ? void 0 : n; } return Dje.call(t, e) ? t[e] : void 0; } var Rje = Object.prototype, zje = Rje.hasOwnProperty; function Vje(e) { var t = this.__data__; return rg ? t[e] !== void 0 : zje.call(t, e); } var jje = "__lodash_hash_undefined__"; function Hje(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = rg && t === void 0 ? jje : t, this; } function Ld(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]); } } Ld.prototype.clear = Pje; Ld.prototype.delete = Lje; Ld.prototype.get = Bje; Ld.prototype.has = Vje; Ld.prototype.set = Hje; function Uje() { this.__data__ = [], this.size = 0; } function ex(e, t) { for (var n = e.length; n--; ) if (UE(e[n][0], t)) return n; return -1; } var qje = Array.prototype, Wje = qje.splice; function Kje(e) { var t = this.__data__, n = ex(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : Wje.call(t, n, 1), --this.size, !0; } function Gje(e) { var t = this.__data__, n = ex(t, e); return n < 0 ? void 0 : t[n][1]; } function Xje(e) { return ex(this.__data__, e) > -1; } function Yje(e, t) { var n = this.__data__, r = ex(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } function Rl(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]); } } Rl.prototype.clear = Uje; Rl.prototype.delete = Kje; Rl.prototype.get = Gje; Rl.prototype.has = Xje; Rl.prototype.set = Yje; var ag = pp(zs, "Map"); function Zje() { this.size = 0, this.__data__ = { hash: new Ld(), map: new (ag || Rl)(), string: new Ld() }; } function Qje(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function tx(e, t) { var n = e.__data__; return Qje(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } function Jje(e) { var t = tx(this, e).delete(e); return this.size -= t ? 1 : 0, t; } function eHe(e) { return tx(this, e).get(e); } function tHe(e) { return tx(this, e).has(e); } function nHe(e, t) { var n = tx(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } function zl(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]); } } zl.prototype.clear = Zje; zl.prototype.delete = Jje; zl.prototype.get = eHe; zl.prototype.has = tHe; zl.prototype.set = nHe; var rHe = "Expected a function"; function GE(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(rHe); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (GE.Cache || zl)(), n; } GE.Cache = zl; var aHe = 500; function oHe(e) { var t = GE(e, function(r) { return n.size === aHe && n.clear(), r; }), n = t.cache; return t; } var iHe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, sHe = /\\(\\)?/g, lHe = oHe(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(iHe, function(n, r, a, o) { t.push(a ? o.replace(sHe, "$1") : r || n); }), t; }); function uHe(e) { return e == null ? "" : _H(e); } function nx(e, t) { return qi(e) ? e : KE(e, t) ? [e] : lHe(uHe(e)); } var cHe = 1 / 0; function ym(e) { if (typeof e == "string" || Jw(e)) return e; var t = e + ""; return t == "0" && 1 / e == -cHe ? "-0" : t; } function XE(e, t) { t = nx(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[ym(t[n++])]; return n && n == r ? e : void 0; } function cl(e, t, n) { var r = e == null ? void 0 : XE(e, t); return r === void 0 ? n : r; } function LH(e, t) { for (var n = -1, r = t.length, a = e.length; ++n < r; ) e[a + n] = t[n]; return e; } var II = As ? As.isConcatSpreadable : void 0; function dHe(e) { return qi(e) || WE(e) || !!(II && e && e[II]); } function pHe(e, t, n, r, a) { var o = -1, i = e.length; for (n || (n = dHe), a || (a = []); ++o < i; ) { var s = e[o]; n(s) ? LH(a, s) : a[a.length] = s; } return a; } function fHe(e) { var t = e == null ? 0 : e.length; return t ? pHe(e) : []; } function hHe(e) { return FVe(BVe(e, void 0, fHe), e + ""); } function ku() { if (!arguments.length) return []; var e = arguments[0]; return qi(e) ? e : [e]; } function vHe() { this.__data__ = new Rl(), this.size = 0; } function gHe(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function mHe(e) { return this.__data__.get(e); } function yHe(e) { return this.__data__.has(e); } var bHe = 200; function wHe(e, t) { var n = this.__data__; if (n instanceof Rl) { var r = n.__data__; if (!ag || r.length < bHe - 1) return r.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new zl(r); } return n.set(e, t), this.size = n.size, this; } function yl(e) { var t = this.__data__ = new Rl(e); this.size = t.size; } yl.prototype.clear = vHe; yl.prototype.delete = gHe; yl.prototype.get = mHe; yl.prototype.has = yHe; yl.prototype.set = wHe; function xHe(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = 0, o = []; ++n < r; ) { var i = e[n]; t(i, n, e) && (o[a++] = i); } return o; } function kHe() { return []; } var CHe = Object.prototype, SHe = CHe.propertyIsEnumerable, PI = Object.getOwnPropertySymbols, EHe = PI ? function(e) { return e == null ? [] : (e = Object(e), xHe(PI(e), function(t) { return SHe.call(e, t); })); } : kHe; function _He(e, t, n) { var r = t(e); return qi(e) ? r : LH(r, n(e)); } function LI(e) { return _He(e, PH, EHe); } var o3 = pp(zs, "DataView"), i3 = pp(zs, "Promise"), s3 = pp(zs, "Set"), NI = "[object Map]", THe = "[object Object]", MI = "[object Promise]", DI = "[object Set]", BI = "[object WeakMap]", RI = "[object DataView]", $He = dp(o3), OHe = dp(ag), FHe = dp(i3), AHe = dp(s3), IHe = dp(r3), gu = Mh; (o3 && gu(new o3(new ArrayBuffer(1))) != RI || ag && gu(new ag()) != NI || i3 && gu(i3.resolve()) != MI || s3 && gu(new s3()) != DI || r3 && gu(new r3()) != BI) && (gu = function(e) { var t = Mh(e), n = t == THe ? e.constructor : void 0, r = n ? dp(n) : ""; if (r) switch (r) { case $He: return RI; case OHe: return NI; case FHe: return MI; case AHe: return DI; case IHe: return BI; } return t; }); var zI = zs.Uint8Array, PHe = "__lodash_hash_undefined__"; function LHe(e) { return this.__data__.set(e, PHe), this; } function NHe(e) { return this.__data__.has(e); } function Wb(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new zl(); ++t < n; ) this.add(e[t]); } Wb.prototype.add = Wb.prototype.push = LHe; Wb.prototype.has = NHe; function MHe(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 DHe(e, t) { return e.has(t); } var BHe = 1, RHe = 2; function NH(e, t, n, r, a, o) { var i = n & BHe, s = e.length, l = t.length; if (s != l && !(i && l > s)) return !1; var u = o.get(e), c = o.get(t); if (u && c) return u == t && c == e; var d = -1, f = !0, h = n & RHe ? new Wb() : void 0; for (o.set(e, t), o.set(t, e); ++d < s; ) { var p = e[d], v = t[d]; if (r) var m = i ? r(v, p, d, t, e, o) : r(p, v, d, e, t, o); if (m !== void 0) { if (m) continue; f = !1; break; } if (h) { if (!MHe(t, function(g, y) { if (!DHe(h, y) && (p === g || a(p, g, n, r, o))) return h.push(y); })) { f = !1; break; } } else if (!(p === v || a(p, v, n, r, o))) { f = !1; break; } } return o.delete(e), o.delete(t), f; } function zHe(e) { var t = -1, n = Array(e.size); return e.forEach(function(r, a) { n[++t] = [a, r]; }), n; } function VHe(e) { var t = -1, n = Array(e.size); return e.forEach(function(r) { n[++t] = r; }), n; } var jHe = 1, HHe = 2, UHe = "[object Boolean]", qHe = "[object Date]", WHe = "[object Error]", KHe = "[object Map]", GHe = "[object Number]", XHe = "[object RegExp]", YHe = "[object Set]", ZHe = "[object String]", QHe = "[object Symbol]", JHe = "[object ArrayBuffer]", eUe = "[object DataView]", VI = As ? As.prototype : void 0, Zk = VI ? VI.valueOf : void 0; function tUe(e, t, n, r, a, o, i) { switch (n) { case eUe: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case JHe: return !(e.byteLength != t.byteLength || !o(new zI(e), new zI(t))); case UHe: case qHe: case GHe: return UE(+e, +t); case WHe: return e.name == t.name && e.message == t.message; case XHe: case ZHe: return e == t + ""; case KHe: var s = zHe; case YHe: var l = r & jHe; if (s || (s = VHe), e.size != t.size && !l) return !1; var u = i.get(e); if (u) return u == t; r |= HHe, i.set(e, t); var c = NH(s(e), s(t), r, a, o, i); return i.delete(e), c; case QHe: if (Zk) return Zk.call(e) == Zk.call(t); } return !1; } var nUe = 1, rUe = Object.prototype, aUe = rUe.hasOwnProperty; function oUe(e, t, n, r, a, o) { var i = n & nUe, s = LI(e), l = s.length, u = LI(t), c = u.length; if (l != c && !i) return !1; for (var d = l; d--; ) { var f = s[d]; if (!(i ? f in t : aUe.call(t, f))) return !1; } var h = o.get(e), p = o.get(t); if (h && p) return h == t && p == e; var v = !0; o.set(e, t), o.set(t, e); for (var m = i; ++d < l; ) { f = s[d]; var g = e[f], y = t[f]; if (r) var x = i ? r(y, g, f, t, e, o) : r(g, y, f, e, t, o); if (!(x === void 0 ? g === y || a(g, y, n, r, o) : x)) { v = !1; break; } m || (m = f == "constructor"); } if (v && !m) { var w = e.constructor, k = t.constructor; w != k && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof k == "function" && k instanceof k) && (v = !1); } return o.delete(e), o.delete(t), v; } var iUe = 1, jI = "[object Arguments]", HI = "[object Array]", P1 = "[object Object]", sUe = Object.prototype, UI = sUe.hasOwnProperty; function lUe(e, t, n, r, a, o) { var i = qi(e), s = qi(t), l = i ? HI : gu(e), u = s ? HI : gu(t); l = l == jI ? P1 : l, u = u == jI ? P1 : u; var c = l == P1, d = u == P1, f = l == u; if (f && a3(e)) { if (!a3(t)) return !1; i = !0, c = !1; } if (f && !c) return o || (o = new yl()), i || IH(e) ? NH(e, t, n, r, a, o) : tUe(e, t, l, n, r, a, o); if (!(n & iUe)) { var h = c && UI.call(e, "__wrapped__"), p = d && UI.call(t, "__wrapped__"); if (h || p) { var v = h ? e.value() : e, m = p ? t.value() : t; return o || (o = new yl()), a(v, m, n, r, o); } } return f ? (o || (o = new yl()), oUe(e, t, n, r, a, o)) : !1; } function rx(e, t, n, r, a) { return e === t ? !0 : e == null || t == null || !Yf(e) && !Yf(t) ? e !== e && t !== t : lUe(e, t, n, r, rx, a); } var uUe = 1, cUe = 2; function dUe(e, t, n, r) { var a = n.length, o = a; if (e == null) return !o; for (e = Object(e); a--; ) { var i = n[a]; if (i[2] ? i[1] !== e[i[0]] : !(i[0] in e)) return !1; } for (; ++a < o; ) { i = n[a]; 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 yl(), d; if (!(d === void 0 ? rx(u, l, uUe | cUe, r, c) : d)) return !1; } } return !0; } function MH(e) { return e === e && !Ju(e); } function pUe(e) { for (var t = PH(e), n = t.length; n--; ) { var r = t[n], a = e[r]; t[n] = [r, a, MH(a)]; } return t; } function DH(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } function fUe(e) { var t = pUe(e); return t.length == 1 && t[0][2] ? DH(t[0][0], t[0][1]) : function(n) { return n === e || dUe(n, e, t); }; } function hUe(e, t) { return e != null && t in Object(e); } function vUe(e, t, n) { t = nx(t, e); for (var r = -1, a = t.length, o = !1; ++r < a; ) { var i = ym(t[r]); if (!(o = e != null && n(e, i))) break; e = e[i]; } return o || ++r != a ? o : (a = e == null ? 0 : e.length, !!a && qE(a) && HE(i, a) && (qi(e) || WE(e))); } function BH(e, t) { return e != null && vUe(e, t, hUe); } var gUe = 1, mUe = 2; function yUe(e, t) { return KE(e) && MH(t) ? DH(ym(e), t) : function(n) { var r = cl(n, e); return r === void 0 && r === t ? BH(n, e) : rx(t, r, gUe | mUe); }; } function bUe(e) { return function(t) { return t == null ? void 0 : t[e]; }; } function wUe(e) { return function(t) { return XE(t, e); }; } function xUe(e) { return KE(e) ? bUe(ym(e)) : wUe(e); } function kUe(e) { return typeof e == "function" ? e : e == null ? TH : typeof e == "object" ? qi(e) ? yUe(e[0], e[1]) : fUe(e) : xUe(e); } var Qk = function() { return zs.Date.now(); }, CUe = "Expected a function", SUe = Math.max, EUe = Math.min; function RH(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(CUe); t = SI(t) || 0, Ju(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? SUe(SI(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? EUe(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = Qk(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(Qk()); } function k() { var C = Qk(), S = m(C); if (r = arguments, a = this, l = C, 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 k.cancel = x, k.flush = w, k; } function _Ue(e, t, n) { var r = e == null ? 0 : e.length; if (!r) return -1; var a = r - 1; return AVe(e, kUe(t), a); } function Kb(e) { for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) { var a = e[t]; r[a[0]] = a[1]; } return r; } function Gb(e, t) { return rx(e, t); } function Mu(e) { return e == null; } function TUe(e) { return e === void 0; } function $Ue(e, t, n, r) { if (!Ju(e)) return e; t = nx(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = ym(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = void 0, u === void 0 && (u = Ju(c) ? c : HE(t[a + 1]) ? [] : {}); } DVe(s, l, u), s = s[l]; } return e; } function OUe(e, t, n) { for (var r = -1, a = t.length, o = {}; ++r < a; ) { var i = t[r], s = XE(e, i); n(s, i) && $Ue(o, nx(i, e), s); } return o; } function FUe(e, t) { return OUe(e, t, function(n, r) { return BH(e, r); }); } var zH = hHe(function(e, t) { return e == null ? {} : FUe(e, t); }); const Fu = (e) => e === void 0, Zf = (e) => typeof e == "boolean", ia = (e) => typeof e == "number", cd = (e) => typeof Element > "u" ? !1 : e instanceof Element, Xb = (e) => Mu(e), AUe = (e) => Ia(e) ? !Number.isNaN(Number(e)) : !1, IUe = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), qI = (e) => Object.keys(e); class VH extends Error { constructor(t) { super(t), this.name = "ElementPlusError"; } } function PUe(e, t) { throw new VH(`[${e}] ${t}`); } function Cr(e, t) { if (process.env.NODE_ENV !== "production") { const n = Ia(e) ? new VH(`[${e}] ${t}`) : e; console.warn(n); } } const LUe = "utils/dom/style", jH = (e = "") => e.split(" ").filter((t) => !!t.trim()), l3 = (e, t) => { !e || !t.trim() || e.classList.add(...jH(t)); }, dd = (e, t) => { !e || !t.trim() || e.classList.remove(...jH(t)); }, xv = (e, t) => { var n; if (!kr || !e || !t) return ""; let r = Bze(t); r === "float" && (r = "cssFloat"); try { const a = e.style[r]; if (a) return a; const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, ""); return o ? o[r] : ""; } catch { return e.style[r]; } }; function Qf(e, t = "px") { if (!e) return ""; if (ia(e) || AUe(e)) return `${e}${t}`; if (Ia(e)) return e; Cr(LUe, "binding value must be a string or number"); } function NUe(e, t) { if (!kr) 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 a = t.offsetTop + n.reduce((l, u) => l + u.offsetTop, 0), o = a + t.offsetHeight, i = e.scrollTop, s = i + e.clientHeight; a < i ? e.scrollTop = a : o > s && (e.scrollTop = o - e.clientHeight); } /*! Element Plus Icons Vue v2.3.1 */ var MUe = /* @__PURE__ */ G({ name: "Aim", __name: "aim", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), DUe = MUe, BUe = /* @__PURE__ */ G({ name: "ArrowDown", __name: "arrow-down", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), YE = BUe, RUe = /* @__PURE__ */ G({ name: "ArrowUp", __name: "arrow-up", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), zUe = RUe, VUe = /* @__PURE__ */ G({ name: "CaretRight", __name: "caret-right", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("path", { fill: "currentColor", d: "M384 192v640l384-320.064z" }) ])); } }), jUe = VUe, HUe = /* @__PURE__ */ G({ name: "CircleCheck", __name: "circle-check", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), UUe = HUe, qUe = /* @__PURE__ */ G({ name: "CircleClose", __name: "circle-close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), ZE = qUe, WUe = /* @__PURE__ */ G({ name: "Close", __name: "close", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), Yb = WUe, KUe = /* @__PURE__ */ G({ name: "CopyDocument", __name: "copy-document", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), GUe = KUe, XUe = /* @__PURE__ */ G({ name: "Delete", __name: "delete", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), YUe = XUe, ZUe = /* @__PURE__ */ G({ name: "Edit", __name: "edit", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), QUe = ZUe, JUe = /* @__PURE__ */ G({ name: "Finished", __name: "finished", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), eqe = JUe, tqe = /* @__PURE__ */ G({ name: "Hide", __name: "hide", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), nqe = tqe, rqe = /* @__PURE__ */ G({ name: "Loading", __name: "loading", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), QE = rqe, aqe = /* @__PURE__ */ G({ name: "Lock", __name: "lock", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), oqe = aqe, iqe = /* @__PURE__ */ G({ name: "Unlock", __name: "unlock", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }), K("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" }) ])); } }), sqe = iqe, lqe = /* @__PURE__ */ G({ name: "View", __name: "view", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), uqe = lqe, cqe = /* @__PURE__ */ G({ name: "ZoomIn", __name: "zoom-in", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), dqe = cqe, pqe = /* @__PURE__ */ G({ name: "ZoomOut", __name: "zoom-out", setup(e) { return (t, n) => ($(), B("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [ K("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" }) ])); } }), fqe = pqe; const HH = "__epPropKey", Ft = (e) => e, hqe = (e) => oa(e) && !!e[HH], ax = (e, t) => { if (!oa(e) || hqe(e)) return e; const { values: n, required: r, default: a, type: o, validator: i } = e, s = { type: o, required: !!r, validator: n || i ? (l) => { let u = !1, c = []; if (n && (c = Array.from(n), Pd(e, "default") && c.push(a), 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(", "); kg(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`); } return u; } : void 0, [HH]: !0 }; return Pd(e, "default") && (s.default = a), s; }, Ln = (e) => Kb(Object.entries(e).map(([t, n]) => [ t, ax(n, t) ])), ec = Ft([ String, Object, Function ]), UH = { validating: QE, success: UUe, error: ZE }, Yr = (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; }, vqe = (e, t) => (e.install = (n) => { n.directive(t, e); }, e), Vl = (e) => (e.install = ng, e), Pr = { 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" }, ea = "update:modelValue", JE = "change", qH = ["", "default", "small", "large"], gqe = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Xp = (e) => e, mqe = ["class", "style"], yqe = /^on[A-Z]/, bqe = (e = {}) => { const { excludeListeners: t = !1, excludeKeys: n } = e, r = O(() => ((n == null ? void 0 : n.value) || []).concat(mqe)), a = tt(); return a ? O(() => { var o; return Kb(Object.entries((o = a.proxy) == null ? void 0 : o.$attrs).filter(([i]) => !r.value.includes(i) && !(t && yqe.test(i)))); }) : (Cr("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), O(() => ({}))); }, Py = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: o = "API" }, i) => { be(() => b(i), (s) => { s && Cr(n, `[${o}] ${e} is about to be deprecated in version ${r}, please use ${t} instead. For more detail, please visit: ${a} `); }, { immediate: !0 }); }; var wqe = { 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 xqe = (e) => (t, n) => kqe(t, n, b(e)), kqe = (e, t, n) => cl(n, e, e).replace(/\{(\w+)\}/g, (r, a) => { var o; return `${(o = t == null ? void 0 : t[a]) != null ? o : `{${a}}`}`; }), Cqe = (e) => { const t = O(() => b(e).name), n = Kn(e) ? e : U(e); return { lang: t, locale: n, t: xqe(e) }; }, WH = Symbol("localeContextKey"), bm = (e) => { const t = e || $e(WH, U()); return Cqe(O(() => t.value || wqe)); }, Ly = "el", Sqe = "is-", Ac = (e, t, n, r, a) => { let o = `${e}-${t}`; return n && (o += `-${n}`), r && (o += `__${r}`), a && (o += `--${a}`), o; }, KH = Symbol("namespaceContextKey"), e_ = (e) => { const t = e || (tt() ? $e(KH, U(Ly)) : U(Ly)); return O(() => b(t) || Ly); }, Kt = (e, t) => { const n = e_(t); return { namespace: n, b: (r = "") => Ac(n.value, e, r, "", ""), e: (r) => r ? Ac(n.value, e, "", r, "") : "", m: (r) => r ? Ac(n.value, e, "", "", r) : "", be: (r, a) => r && a ? Ac(n.value, e, r, a, "") : "", em: (r, a) => r && a ? Ac(n.value, e, "", r, a) : "", bm: (r, a) => r && a ? Ac(n.value, e, r, "", a) : "", bem: (r, a, o) => r && a && o ? Ac(n.value, e, r, a, o) : "", is: (r, ...a) => { const o = a.length >= 1 ? a[0] : !0; return r && o ? `${Sqe}${r}` : ""; }, cssVar: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${o}`] = r[o]); return a; }, cssVarName: (r) => `--${n.value}-${r}`, cssVarBlock: (r) => { const a = {}; for (const o in r) r[o] && (a[`--${n.value}-${e}-${o}`] = r[o]); return a; }, cssVarBlockName: (r) => `--${n.value}-${e}-${r}` }; }, Eqe = ax({ type: Ft(Boolean), default: null }), _qe = ax({ type: Ft(Function) }), Tqe = (e) => { const t = `update:${e}`, n = `onUpdate:${e}`, r = [t], a = { [e]: Eqe, [n]: _qe }; return { useModelToggle: ({ indicator: o, toggleReason: i, shouldHideWhenRouteChanges: s, shouldProceed: l, onShow: u, onHide: c }) => { const d = tt(), { emit: f } = d, h = d.props, p = O(() => Ga(h[n])), v = O(() => h[e] === null), m = (C) => { o.value !== !0 && (o.value = !0, i && (i.value = C), Ga(u) && u(C)); }, g = (C) => { o.value !== !1 && (o.value = !1, i && (i.value = C), Ga(c) && c(C)); }, y = (C) => { if (h.disabled === !0 || Ga(l) && !l()) return; const S = p.value && kr; S && f(t, !0), (v.value || !S) && m(C); }, x = (C) => { if (h.disabled === !0 || !kr) return; const S = p.value && kr; S && f(t, !1), (v.value || !S) && g(C); }, w = (C) => { Zf(C) && (h.disabled && C ? p.value && f(t, !1) : o.value !== C && (C ? m() : g())); }, k = () => { o.value ? x() : y(); }; return be(() => h[e], w), s && d.appContext.config.globalProperties.$route !== void 0 && be(() => ({ ...d.proxy.$route }), () => { s.value && o.value && x(); }), nt(() => { w(h[e]); }), { hide: x, show: y, toggle: k, hasUpdateHandler: p }; }, useModelToggleProps: a, useModelToggleEmits: r }; }, GH = (e) => { const t = tt(); return O(() => { var n, r; return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e]; }); }; var bo = "top", fi = "bottom", hi = "right", wo = "left", t_ = "auto", wm = [bo, fi, hi, wo], Jf = "start", og = "end", $qe = "clippingParents", XH = "viewport", kv = "popper", Oqe = "reference", WI = wm.reduce(function(e, t) { return e.concat([t + "-" + Jf, t + "-" + og]); }, []), ox = [].concat(wm, [t_]).reduce(function(e, t) { return e.concat([t, t + "-" + Jf, t + "-" + og]); }, []), Fqe = "beforeRead", Aqe = "read", Iqe = "afterRead", Pqe = "beforeMain", Lqe = "main", Nqe = "afterMain", Mqe = "beforeWrite", Dqe = "write", Bqe = "afterWrite", Rqe = [Fqe, Aqe, Iqe, Pqe, Lqe, Nqe, Mqe, Dqe, Bqe]; function Is(e) { return e ? (e.nodeName || "").toLowerCase() : null; } function ts(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { var t = e.ownerDocument; return t && t.defaultView || window; } return e; } function eh(e) { var t = ts(e).Element; return e instanceof t || e instanceof Element; } function ei(e) { var t = ts(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } function n_(e) { if (typeof ShadowRoot > "u") return !1; var t = ts(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } function zqe(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, a = t.attributes[n] || {}, o = t.elements[n]; !ei(o) || !Is(o) || (Object.assign(o.style, r), Object.keys(a).forEach(function(i) { var s = a[i]; s === !1 ? o.removeAttribute(i) : o.setAttribute(i, s === !0 ? "" : s); })); }); } function Vqe(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 a = t.elements[r], o = 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; }, {}); !ei(a) || !Is(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(l) { a.removeAttribute(l); })); }); }; } var YH = { name: "applyStyles", enabled: !0, phase: "write", fn: zqe, effect: Vqe, requires: ["computeStyles"] }; function ws(e) { return e.split("-")[0]; } var pd = Math.max, Zb = Math.min, th = Math.round; function nh(e, t) { t === void 0 && (t = !1); var n = e.getBoundingClientRect(), r = 1, a = 1; if (ei(e) && t) { var o = e.offsetHeight, i = e.offsetWidth; i > 0 && (r = th(n.width) / i || 1), o > 0 && (a = th(n.height) / o || 1); } return { width: n.width / r, height: n.height / a, top: n.top / a, right: n.right / r, bottom: n.bottom / a, left: n.left / r, x: n.left / r, y: n.top / a }; } function r_(e) { var t = nh(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 ZH(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; if (n && n_(n)) { var r = t; do { if (r && e.isSameNode(r)) return !0; r = r.parentNode || r.host; } while (r); } return !1; } function El(e) { return ts(e).getComputedStyle(e); } function jqe(e) { return ["table", "td", "th"].indexOf(Is(e)) >= 0; } function vc(e) { return ((eh(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function ix(e) { return Is(e) === "html" ? e : e.assignedSlot || e.parentNode || (n_(e) ? e.host : null) || vc(e); } function KI(e) { return !ei(e) || El(e).position === "fixed" ? null : e.offsetParent; } function Hqe(e) { var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; if (n && ei(e)) { var r = El(e); if (r.position === "fixed") return null; } var a = ix(e); for (n_(a) && (a = a.host); ei(a) && ["html", "body"].indexOf(Is(a)) < 0; ) { var o = El(a); if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none") return a; a = a.parentNode; } return null; } function xm(e) { for (var t = ts(e), n = KI(e); n && jqe(n) && El(n).position === "static"; ) n = KI(n); return n && (Is(n) === "html" || Is(n) === "body" && El(n).position === "static") ? t : n || Hqe(e) || t; } function a_(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function l0(e, t, n) { return pd(e, Zb(t, n)); } function Uqe(e, t, n) { var r = l0(e, t, n); return r > n ? n : r; } function QH() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function JH(e) { return Object.assign({}, QH(), e); } function eU(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } var qqe = function(e, t) { return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, JH(typeof e != "number" ? e : eU(e, wm)); }; function Wqe(e) { var t, n = e.state, r = e.name, a = e.options, o = n.elements.arrow, i = n.modifiersData.popperOffsets, s = ws(n.placement), l = a_(s), u = [wo, hi].indexOf(s) >= 0, c = u ? "height" : "width"; if (!(!o || !i)) { var d = qqe(a.padding, n), f = r_(o), h = l === "y" ? bo : wo, p = l === "y" ? fi : hi, v = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], m = i[l] - n.rects.reference[l], g = xm(o), y = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = v / 2 - m / 2, w = d[h], k = y - f[c] - d[p], C = y / 2 - f[c] / 2 + x, S = l0(w, C, k), _ = l; n.modifiersData[r] = (t = {}, t[_] = S, t.centerOffset = S - C, t); } } function Kqe(e) { var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r; a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || !ZH(t.elements.popper, a) || (t.elements.arrow = a)); } var Gqe = { name: "arrow", enabled: !0, phase: "main", fn: Wqe, effect: Kqe, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function rh(e) { return e.split("-")[1]; } var Xqe = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; function Yqe(e) { var t = e.x, n = e.y, r = window, a = r.devicePixelRatio || 1; return { x: th(t * a) / a || 0, y: th(n * a) / a || 0 }; } function GI(e) { var t, n = e.popper, r = e.popperRect, a = e.placement, o = 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"), y = i.hasOwnProperty("y"), x = wo, w = bo, k = window; if (u) { var C = xm(n), S = "clientHeight", _ = "clientWidth"; if (C === ts(n) && (C = vc(n), El(C).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), C = C, a === bo || (a === wo || a === hi) && o === og) { w = fi; var T = d && C === k && k.visualViewport ? k.visualViewport.height : C[S]; v -= T - r.height, v *= l ? 1 : -1; } if (a === wo || (a === bo || a === fi) && o === og) { x = hi; var F = d && C === k && k.visualViewport ? k.visualViewport.width : C[_]; h -= F - r.width, h *= l ? 1 : -1; } } var A = Object.assign({ position: s }, u && Xqe), I = c === !0 ? Yqe({ x: h, y: v }) : { x: h, y: v }; if (h = I.x, v = I.y, l) { var N; return Object.assign({}, A, (N = {}, N[w] = y ? "0" : "", N[x] = g ? "0" : "", N.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", N)); } return Object.assign({}, A, (t = {}, t[w] = y ? v + "px" : "", t[x] = g ? h + "px" : "", t.transform = "", t)); } function Zqe(e) { var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, o = n.adaptive, i = o === void 0 ? !0 : o, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: ws(t.placement), variation: rh(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: a, isFixed: t.options.strategy === "fixed" }; t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, GI(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, GI(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 tU = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: Zqe, data: {} }, L1 = { passive: !0 }; function Qqe(e) { var t = e.state, n = e.instance, r = e.options, a = r.scroll, o = a === void 0 ? !0 : a, i = r.resize, s = i === void 0 ? !0 : i, l = ts(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return o && u.forEach(function(c) { c.addEventListener("scroll", n.update, L1); }), s && l.addEventListener("resize", n.update, L1), function() { o && u.forEach(function(c) { c.removeEventListener("scroll", n.update, L1); }), s && l.removeEventListener("resize", n.update, L1); }; } var nU = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, effect: Qqe, data: {} }, Jqe = { left: "right", right: "left", bottom: "top", top: "bottom" }; function Ny(e) { return e.replace(/left|right|bottom|top/g, function(t) { return Jqe[t]; }); } var eWe = { start: "end", end: "start" }; function XI(e) { return e.replace(/start|end/g, function(t) { return eWe[t]; }); } function o_(e) { var t = ts(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } function i_(e) { return nh(vc(e)).left + o_(e).scrollLeft; } function tWe(e) { var t = ts(e), n = vc(e), r = t.visualViewport, a = n.clientWidth, o = n.clientHeight, i = 0, s = 0; return r && (a = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (i = r.offsetLeft, s = r.offsetTop)), { width: a, height: o, x: i + i_(e), y: s }; } function nWe(e) { var t, n = vc(e), r = o_(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = pd(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = pd(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -r.scrollLeft + i_(e), l = -r.scrollTop; return El(a || n).direction === "rtl" && (s += pd(n.clientWidth, a ? a.clientWidth : 0) - o), { width: o, height: i, x: s, y: l }; } function s_(e) { var t = El(e), n = t.overflow, r = t.overflowX, a = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + a + r); } function rU(e) { return ["html", "body", "#document"].indexOf(Is(e)) >= 0 ? e.ownerDocument.body : ei(e) && s_(e) ? e : rU(ix(e)); } function u0(e, t) { var n; t === void 0 && (t = []); var r = rU(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), o = ts(r), i = a ? [o].concat(o.visualViewport || [], s_(r) ? r : []) : r, s = t.concat(i); return a ? s : s.concat(u0(ix(i))); } function u3(e) { return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); } function rWe(e) { var t = nh(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 YI(e, t) { return t === XH ? u3(tWe(e)) : eh(t) ? rWe(t) : u3(nWe(vc(e))); } function aWe(e) { var t = u0(ix(e)), n = ["absolute", "fixed"].indexOf(El(e).position) >= 0, r = n && ei(e) ? xm(e) : e; return eh(r) ? t.filter(function(a) { return eh(a) && ZH(a, r) && Is(a) !== "body"; }) : []; } function oWe(e, t, n) { var r = t === "clippingParents" ? aWe(e) : [].concat(t), a = [].concat(r, [n]), o = a[0], i = a.reduce(function(s, l) { var u = YI(e, l); return s.top = pd(u.top, s.top), s.right = Zb(u.right, s.right), s.bottom = Zb(u.bottom, s.bottom), s.left = pd(u.left, s.left), s; }, YI(e, o)); return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i; } function aU(e) { var t = e.reference, n = e.element, r = e.placement, a = r ? ws(r) : null, o = r ? rh(r) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l; switch (a) { case bo: l = { x: i, y: t.y - n.height }; break; case fi: l = { x: i, y: t.y + t.height }; break; case hi: l = { x: t.x + t.width, y: s }; break; case wo: l = { x: t.x - n.width, y: s }; break; default: l = { x: t.x, y: t.y }; } var u = a ? a_(a) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (o) { case Jf: l[u] = l[u] - (t[c] / 2 - n[c] / 2); break; case og: l[u] = l[u] + (t[c] / 2 - n[c] / 2); break; } } return l; } function ig(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = r === void 0 ? e.placement : r, o = n.boundary, i = o === void 0 ? $qe : o, s = n.rootBoundary, l = s === void 0 ? XH : s, u = n.elementContext, c = u === void 0 ? kv : u, d = n.altBoundary, f = d === void 0 ? !1 : d, h = n.padding, p = h === void 0 ? 0 : h, v = JH(typeof p != "number" ? p : eU(p, wm)), m = c === kv ? Oqe : kv, g = e.rects.popper, y = e.elements[f ? m : c], x = oWe(eh(y) ? y : y.contextElement || vc(e.elements.popper), i, l), w = nh(e.elements.reference), k = aU({ reference: w, element: g, strategy: "absolute", placement: a }), C = u3(Object.assign({}, g, k)), S = c === kv ? C : w, _ = { top: x.top - S.top + v.top, bottom: S.bottom - x.bottom + v.bottom, left: x.left - S.left + v.left, right: S.right - x.right + v.right }, T = e.modifiersData.offset; if (c === kv && T) { var F = T[a]; Object.keys(_).forEach(function(A) { var I = [hi, fi].indexOf(A) >= 0 ? 1 : -1, N = [bo, fi].indexOf(A) >= 0 ? "y" : "x"; _[A] += F[N] * I; }); } return _; } function iWe(e, t) { t === void 0 && (t = {}); var n = t, r = n.placement, a = n.boundary, o = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? ox : l, c = rh(r), d = c ? s ? WI : WI.filter(function(p) { return rh(p) === c; }) : wm, 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] = ig(e, { placement: v, boundary: a, rootBoundary: o, padding: i })[ws(v)], p; }, {}); return Object.keys(h).sort(function(p, v) { return h[p] - h[v]; }); } function sWe(e) { if (ws(e) === t_) return []; var t = Ny(e); return [XI(e), t, XI(t)]; } function lWe(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { for (var a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = ws(m), y = g === m, x = l || (y || !p ? [Ny(m)] : sWe(m)), w = [m].concat(x).reduce(function(ve, ge) { return ve.concat(ws(ge) === t_ ? iWe(t, { placement: ge, boundary: c, rootBoundary: d, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ge); }, []), k = t.rects.reference, C = t.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, T = w[0], F = 0; F < w.length; F++) { var A = w[F], I = ws(A), N = rh(A) === Jf, L = [bo, fi].indexOf(I) >= 0, z = L ? "width" : "height", P = ig(t, { placement: A, boundary: c, rootBoundary: d, altBoundary: f, padding: u }), D = L ? N ? hi : wo : N ? fi : bo; k[z] > C[z] && (D = Ny(D)); var M = Ny(D), V = []; if (o && V.push(P[I] <= 0), s && V.push(P[D] <= 0, P[M] <= 0), V.every(function(ve) { return ve; })) { T = A, _ = !1; break; } S.set(A, V); } if (_) for (var Q = p ? 3 : 1, X = function(ve) { var ge = w.find(function(se) { var ne = S.get(se); if (ne) return ne.slice(0, ve).every(function(W) { return W; }); }); if (ge) return T = ge, "break"; }, ee = Q; ee > 0; ee--) { var ue = X(ee); if (ue === "break") break; } t.placement !== T && (t.modifiersData[r]._skip = !0, t.placement = T, t.reset = !0); } } var uWe = { name: "flip", enabled: !0, phase: "main", fn: lWe, requiresIfExists: ["offset"], data: { _skip: !1 } }; function ZI(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 QI(e) { return [bo, hi, fi, wo].some(function(t) { return e[t] >= 0; }); } function cWe(e) { var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, i = ig(t, { elementContext: "reference" }), s = ig(t, { altBoundary: !0 }), l = ZI(i, r), u = ZI(s, a, o), c = QI(l), d = QI(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 dWe = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: cWe }; function pWe(e, t, n) { var r = ws(e), a = [wo, bo].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, i = o[0], s = o[1]; return i = i || 0, s = (s || 0) * a, [wo, hi].indexOf(r) >= 0 ? { x: s, y: i } : { x: i, y: s }; } function fWe(e) { var t = e.state, n = e.options, r = e.name, a = n.offset, o = a === void 0 ? [0, 0] : a, i = ox.reduce(function(c, d) { return c[d] = pWe(d, t.rects, o), 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 hWe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: fWe }; function vWe(e) { var t = e.state, n = e.name; t.modifiersData[n] = aU({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } var oU = { name: "popperOffsets", enabled: !0, phase: "read", fn: vWe, data: {} }; function gWe(e) { return e === "x" ? "y" : "x"; } function mWe(e) { var t = e.state, n = e.options, r = e.name, a = n.mainAxis, o = a === void 0 ? !0 : a, 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 = ig(t, { boundary: l, rootBoundary: u, padding: d, altBoundary: c }), g = ws(t.placement), y = rh(t.placement), x = !y, w = a_(g), k = gWe(w), C = t.modifiersData.popperOffsets, S = t.rects.reference, _ = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, { placement: t.placement })) : v, F = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, I = { x: 0, y: 0 }; if (C) { if (o) { var N, L = w === "y" ? bo : wo, z = w === "y" ? fi : hi, P = w === "y" ? "height" : "width", D = C[w], M = D + m[L], V = D - m[z], Q = h ? -_[P] / 2 : 0, X = y === Jf ? S[P] : _[P], ee = y === Jf ? -_[P] : -S[P], ue = t.elements.arrow, ve = h && ue ? r_(ue) : { width: 0, height: 0 }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : QH(), se = ge[L], ne = ge[z], W = l0(0, S[P], ve[P]), Y = x ? S[P] / 2 - Q - W - se - F.mainAxis : X - W - se - F.mainAxis, re = x ? -S[P] / 2 + Q + W + ne + F.mainAxis : ee + W + ne + F.mainAxis, we = t.elements.arrow && xm(t.elements.arrow), Oe = we ? w === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Ne = (N = A == null ? void 0 : A[w]) != null ? N : 0, xe = D + Y - Ne - Oe, Fe = D + re - Ne, Se = l0(h ? Zb(M, xe) : M, D, h ? pd(V, Fe) : V); C[w] = Se, I[w] = Se - D; } if (s) { var Pe, Me = w === "x" ? bo : wo, He = w === "x" ? fi : hi, De = C[k], Xe = k === "y" ? "height" : "width", Ge = De + m[Me], Ze = De - m[He], E = [bo, wo].indexOf(g) !== -1, j = (Pe = A == null ? void 0 : A[k]) != null ? Pe : 0, le = E ? Ge : De - S[Xe] - _[Xe] - j + F.altAxis, ce = E ? De + S[Xe] + _[Xe] - j - F.altAxis : Ze, oe = h && E ? Uqe(le, De, ce) : l0(h ? le : Ge, De, h ? ce : Ze); C[k] = oe, I[k] = oe - De; } t.modifiersData[r] = I; } } var yWe = { name: "preventOverflow", enabled: !0, phase: "main", fn: mWe, requiresIfExists: ["offset"] }; function bWe(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } function wWe(e) { return e === ts(e) || !ei(e) ? o_(e) : bWe(e); } function xWe(e) { var t = e.getBoundingClientRect(), n = th(t.width) / e.offsetWidth || 1, r = th(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } function kWe(e, t, n) { n === void 0 && (n = !1); var r = ei(t), a = ei(t) && xWe(t), o = vc(t), i = nh(e, a), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; return (r || !r && !n) && ((Is(t) !== "body" || s_(o)) && (s = wWe(t)), ei(t) ? (l = nh(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = i_(o))), { x: i.left + s.scrollLeft - l.x, y: i.top + s.scrollTop - l.y, width: i.width, height: i.height }; } function CWe(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(o) { t.set(o.name, o); }); function a(o) { n.add(o.name); var i = [].concat(o.requires || [], o.requiresIfExists || []); i.forEach(function(s) { if (!n.has(s)) { var l = t.get(s); l && a(l); } }), r.push(o); } return e.forEach(function(o) { n.has(o.name) || a(o); }), r; } function SWe(e) { var t = CWe(e); return Rqe.reduce(function(n, r) { return n.concat(t.filter(function(a) { return a.phase === r; })); }, []); } function EWe(e) { var t; return function() { return t || (t = new Promise(function(n) { Promise.resolve().then(function() { t = void 0, n(e()); }); })), t; }; } function _We(e) { var t = e.reduce(function(n, r) { var a = n[r.name]; return n[r.name] = a ? Object.assign({}, a, r, { options: Object.assign({}, a.options, r.options), data: Object.assign({}, a.data, r.data) }) : r, n; }, {}); return Object.keys(t).map(function(n) { return t[n]; }); } var JI = { placement: "bottom", modifiers: [], strategy: "absolute" }; function e9() { 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 l_(e) { e === void 0 && (e = {}); var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, o = a === void 0 ? JI : a; return function(i, s, l) { l === void 0 && (l = o); var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, JI, o), 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({}, o, u.options, m), u.scrollParents = { reference: eh(i) ? u0(i) : i.contextElement ? u0(i.contextElement) : [], popper: u0(s) }; var g = SWe(_We([].concat(r, u.options.modifiers))); return u.orderedModifiers = g.filter(function(y) { return y.enabled; }), h(), f.update(); }, forceUpdate: function() { if (!d) { var v = u.elements, m = v.reference, g = v.popper; if (e9(m, g)) { u.rects = { reference: kWe(m, xm(g), u.options.strategy === "fixed"), popper: r_(g) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) { return u.modifiersData[_.name] = Object.assign({}, _.data); }); for (var y = 0; y < u.orderedModifiers.length; y++) { if (u.reset === !0) { u.reset = !1, y = -1; continue; } var x = u.orderedModifiers[y], w = x.fn, k = x.options, C = k === void 0 ? {} : k, S = x.name; typeof w == "function" && (u = w({ state: u, options: C, name: S, instance: f }) || u); } } } }, update: EWe(function() { return new Promise(function(v) { f.forceUpdate(), v(u); }); }), destroy: function() { p(), d = !0; } }; if (!e9(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, y = g === void 0 ? {} : g, x = v.effect; if (typeof x == "function") { var w = x({ state: u, name: m, instance: f, options: y }), k = function() { }; c.push(w || k); } }); } function p() { c.forEach(function(v) { return v(); }), c = []; } return f; }; } l_(); var TWe = [nU, oU, tU, YH]; l_({ defaultModifiers: TWe }); var $We = [nU, oU, tU, YH, hWe, uWe, yWe, Gqe, dWe], OWe = l_({ defaultModifiers: $We }); const FWe = (e, t, n = {}) => { const r = { name: "updateState", enabled: !0, phase: "write", fn: ({ state: l }) => { const u = AWe(l); Object.assign(i.value, u); }, requires: ["computeStyles"] }, a = O(() => { const { onFirstUpdate: l, placement: u, strategy: c, modifiers: d } = b(n); return { onFirstUpdate: l, placement: u || "bottom", strategy: c || "absolute", modifiers: [ ...d || [], r, { name: "applyStyles", enabled: !1 } ] }; }), o = un(), i = U({ styles: { popper: { position: b(a).strategy, left: "0", top: "0" }, arrow: { position: "absolute" } }, attributes: {} }), s = () => { o.value && (o.value.destroy(), o.value = void 0); }; return be(a, (l) => { const u = b(o); u && u.setOptions(l); }, { deep: !0 }), be([e, t], ([l, u]) => { s(), !(!l || !u) && (o.value = OWe(l, u, b(a))); }), Ct(() => { s(); }), { state: O(() => { var l; return { ...((l = b(o)) == null ? void 0 : l.state) || {} }; }), styles: O(() => b(i).styles), attributes: O(() => b(i).attributes), update: () => { var l; return (l = b(o)) == null ? void 0 : l.update(); }, forceUpdate: () => { var l; return (l = b(o)) == null ? void 0 : l.forceUpdate(); }, instanceRef: O(() => b(o)) }; }; function AWe(e) { const t = Object.keys(e.elements), n = Kb(t.map((a) => [a, e.styles[a] || {}])), r = Kb(t.map((a) => [a, e.attributes[a]])); return { styles: n, attributes: r }; } function t9() { let e; const t = (r, a) => { n(), e = window.setTimeout(r, a); }, n = () => window.clearTimeout(e); return Zw(() => n()), { registerTimeout: t, cancelTimeout: n }; } const c3 = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, IWe = Symbol("elIdInjection"), iU = () => tt() ? $e(IWe, c3) : c3, sx = (e) => { const t = iU(); !kr && t === c3 && Cr("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 = e_(); return O(() => b(e) || `${n.value}-id-${t.prefix}-${t.current++}`); }; let Yp = []; const n9 = (e) => { const t = e; t.key === Pr.esc && Yp.forEach((n) => n(t)); }, PWe = (e) => { nt(() => { Yp.length === 0 && document.addEventListener("keydown", n9), kr && Yp.push(e); }), Ct(() => { Yp = Yp.filter((t) => t !== e), Yp.length === 0 && kr && document.removeEventListener("keydown", n9); }); }; let r9; const sU = () => { const e = e_(), t = iU(), n = O(() => `${e.value}-popper-container-${t.prefix}`), r = O(() => `#${n.value}`); return { id: n, selector: r }; }, LWe = (e) => { const t = document.createElement("div"); return t.id = e, document.body.appendChild(t), t; }, NWe = () => { const { id: e, selector: t } = sU(); return Cg(() => { kr && (process.env.NODE_ENV === "test" || !r9 || !document.body.querySelector(t.value)) && (r9 = LWe(e.value)); }), { id: e, selector: t }; }, MWe = Ln({ showAfter: { type: Number, default: 0 }, hideAfter: { type: Number, default: 200 }, autoClose: { type: Number, default: 0 } }), DWe = ({ showAfter: e, hideAfter: t, autoClose: n, open: r, close: a }) => { const { registerTimeout: o } = t9(), { registerTimeout: i, cancelTimeout: s } = t9(); return { onOpen: (l) => { o(() => { r(l); const u = b(n); ia(u) && u > 0 && i(() => { a(l); }, u); }, b(e)); }, onClose: (l) => { s(), o(() => { a(l); }, b(t)); } }; }, lU = Symbol("elForwardRef"), BWe = (e) => { rt(lU, { setForwardRef: (t) => { e.value = t; } }); }, RWe = (e) => ({ mounted(t) { e(t); }, updated(t) { e(t); }, unmounted() { e(null); } }), a9 = { current: 0 }, o9 = U(0), uU = 2e3, i9 = Symbol("elZIndexContextKey"), cU = Symbol("zIndexContextKey"), dU = (e) => { const t = tt() ? $e(i9, a9) : a9, n = e || (tt() ? $e(cU, void 0) : void 0), r = O(() => { const i = b(n); return ia(i) ? i : uU; }), a = O(() => r.value + o9.value), o = () => (t.current++, o9.value = t.current, a.value); return !kr && !$e(i9) && Cr("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: a, nextZIndex: o }; }; function zWe(e) { let t; function n() { if (e.value == null) return; const { selectionStart: a, selectionEnd: o, value: i } = e.value; if (a == null || o == null) return; const s = i.slice(0, Math.max(0, a)), l = i.slice(Math.max(0, o)); t = { selectionStart: a, selectionEnd: o, value: i, beforeTxt: s, afterTxt: l }; } function r() { if (e.value == null || t == null) return; const { value: a } = e.value, { beforeTxt: o, afterTxt: i, selectionStart: s } = t; if (o == null || i == null || s == null) return; let l = a.length; if (a.endsWith(i)) l = a.length - i.length; else if (a.startsWith(o)) l = o.length; else { const u = o[s - 1], c = a.indexOf(u, s - 1); c !== -1 && (l = c + 1); } e.value.setSelectionRange(l, l); } return [n, r]; } const Dh = ax({ type: String, values: qH, required: !1 }), pU = Symbol("size"), VWe = () => { const e = $e(pU, {}); return O(() => b(e.size) || ""); }; function u_(e, { beforeFocus: t, afterFocus: n, beforeBlur: r, afterBlur: a } = {}) { const o = tt(), { emit: i } = o, s = un(), l = U(!1), u = (f) => { Ga(t) && t(f) || l.value || (l.value = !0, i("focus", f), n == null || n()); }, c = (f) => { var h; Ga(r) && r(f) || f.relatedTarget && (h = s.value) != null && h.contains(f.relatedTarget) || (l.value = !1, i("blur", f), a == null || a()); }, d = () => { var f, h; (f = s.value) != null && f.contains(document.activeElement) && s.value !== document.activeElement || (h = e.value) == null || h.focus(); }; return be(s, (f) => { f && f.setAttribute("tabindex", "-1"); }), Ko(s, "focus", u, !0), Ko(s, "blur", c, !0), Ko(s, "click", d, !0), process.env.NODE_ENV === "test" && nt(() => { const f = cd(e.value) ? e.value : document.querySelector("input,textarea"); f && (Ko(f, "focus", u, !0), Ko(f, "blur", c, !0)); }), { isFocused: l, wrapperRef: s, handleFocus: u, handleBlur: c }; } function fU({ afterComposition: e, emit: t }) { const n = U(!1), r = (i) => { t == null || t("compositionstart", i), n.value = !0; }, a = (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 = !gqe(u); }, o = (i) => { t == null || t("compositionend", i), n.value && (n.value = !1, We(() => e(i))); }; return { isComposing: n, handleComposition: (i) => { i.type === "compositionend" ? o(i) : a(i); }, handleCompositionStart: r, handleCompositionUpdate: a, handleCompositionEnd: o }; } const hU = Symbol("emptyValuesContextKey"), jWe = "use-empty-values", HWe = ["", void 0, null], UWe = void 0, qWe = Ln({ emptyValues: Array, valueOnClear: { type: [String, Number, Boolean, Function], default: void 0, validator: (e) => Ga(e) ? !e() : !e } }), WWe = (e, t) => { const n = tt() ? $e(hU, U({})) : U({}), r = O(() => e.emptyValues || n.value.emptyValues || HWe), a = O(() => Ga(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Ga(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : UWe), o = (i) => r.value.includes(i); return r.value.includes(a.value) || Cr(jWe, "value-on-clear should be a value of empty-values"), { emptyValues: r, valueOnClear: a, isEmptyValue: o }; }, KWe = Ln({ ariaLabel: String, ariaOrientation: { type: String, values: ["horizontal", "vertical", "undefined"] }, ariaControls: String }), gc = (e) => zH(KWe, e), vU = Symbol(), Qb = U(); function c_(e, t = void 0) { const n = tt() ? $e(vU, Qb) : Qb; return e ? O(() => { var r, a; return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t; }) : n; } function GWe(e, t) { const n = c_(), r = Kt(e, O(() => { var s; return ((s = n.value) == null ? void 0 : s.namespace) || Ly; })), a = bm(O(() => { var s; return (s = n.value) == null ? void 0 : s.locale; })), o = dU(O(() => { var s; return ((s = n.value) == null ? void 0 : s.zIndex) || uU; })), i = O(() => { var s; return b(t) || ((s = n.value) == null ? void 0 : s.size) || ""; }); return XWe(O(() => b(n) || {})), { ns: r, locale: a, zIndex: o, size: i }; } const XWe = (e, t, n = !1) => { var r; const a = !!tt(), o = a ? c_() : void 0, i = (r = void 0) != null ? r : a ? rt : void 0; if (!i) { Cr("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = O(() => { const l = b(e); return o != null && o.value ? YWe(o.value, l) : l; }); return i(vU, s), i(WH, O(() => s.value.locale)), i(KH, O(() => s.value.namespace)), i(cU, O(() => s.value.zIndex)), i(pU, { size: O(() => s.value.size || "") }), i(hU, O(() => ({ emptyValues: s.value.emptyValues, valueOnClear: s.value.valueOnClear }))), (n || !Qb.value) && (Qb.value = s.value), s; }, YWe = (e, t) => { const n = [.../* @__PURE__ */ new Set([...qI(e), ...qI(t)])], r = {}; for (const a of n) r[a] = t[a] !== void 0 ? t[a] : e[a]; return r; }; var Ut = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }; const ZWe = Ln({ size: { type: Ft([Number, String]) }, color: { type: String } }), QWe = G({ name: "ElIcon", inheritAttrs: !1 }), JWe = /* @__PURE__ */ G({ ...QWe, props: ZWe, setup(e) { const t = e, n = Kt("icon"), r = O(() => { const { size: a, color: o } = t; return !a && !o ? {} : { fontSize: Fu(a) ? void 0 : Qf(a), "--color": o }; }); return (a, o) => ($(), B("i", Dt({ class: b(n).b(), style: b(r) }, a.$attrs), [ he(a.$slots, "default") ], 16)); } }); var eKe = /* @__PURE__ */ Ut(JWe, [["__file", "icon.vue"]]); const $a = Yr(eKe), d_ = Symbol("formContextKey"), sg = Symbol("formItemContextKey"), Nd = (e, t = {}) => { const n = U(void 0), r = t.prop ? n : GH("size"), a = t.global ? n : VWe(), o = t.form ? { size: void 0 } : $e(d_, void 0), i = t.formItem ? { size: void 0 } : $e(sg, void 0); return O(() => r.value || b(e) || (i == null ? void 0 : i.size) || (o == null ? void 0 : o.size) || a.value || ""); }, km = (e) => { const t = GH("disabled"), n = $e(d_, void 0); return O(() => t.value || b(e) || (n == null ? void 0 : n.disabled) || !1); }, fp = () => { const e = $e(d_, void 0), t = $e(sg, void 0); return { form: e, formItem: t }; }, Cm = (e, { formItemContext: t, disableIdGeneration: n, disableIdManagement: r }) => { n || (n = U(!1)), r || (r = U(!1)); const a = U(); let o; const i = O(() => { var s; return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1); }); return nt(() => { o = be([Pt(e, "id"), n], ([s, l]) => { const u = s ?? (l ? void 0 : sx().value); u !== a.value && (t != null && t.removeInputId && (a.value && t.removeInputId(a.value), !(r != null && r.value) && !l && u && t.addInputId(u)), a.value = u); }, { immediate: !0 }); }), d2(() => { o && o(), t != null && t.removeInputId && a.value && t.removeInputId(a.value); }), { isLabeledByFormItem: i, inputId: a }; }; let wi; const tKe = ` height:0 !important; visibility:hidden !important; ${Pze() ? "" : "overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `, nKe = [ "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 rKe(e) { const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), r = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width")); return { contextStyle: nKe.map((o) => `${o}:${t.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: a, boxSizing: n }; } function s9(e, t = 1, n) { var r; wi || (wi = document.createElement("textarea"), document.body.appendChild(wi)); const { paddingSize: a, borderSize: o, boxSizing: i, contextStyle: s } = rKe(e); wi.setAttribute("style", `${s};${tKe}`), wi.value = e.value || e.placeholder || ""; let l = wi.scrollHeight; const u = {}; i === "border-box" ? l = l + o : i === "content-box" && (l = l - a), wi.value = ""; const c = wi.scrollHeight - a; if (ia(t)) { let d = c * t; i === "border-box" && (d = d + a + o), l = Math.max(d, l), u.minHeight = `${d}px`; } if (ia(n)) { let d = c * n; i === "border-box" && (d = d + a + o), l = Math.min(d, l); } return u.height = `${l}px`, (r = wi.parentNode) == null || r.removeChild(wi), wi = void 0, u; } const aKe = Ln({ id: { type: String, default: void 0 }, size: Dh, disabled: Boolean, modelValue: { type: Ft([ 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: Ft([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: ec }, prefixIcon: { type: ec }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: !0 }, inputStyle: { type: Ft([Object, Array, String]), default: () => Xp({}) }, autofocus: Boolean, rows: { type: Number, default: 2 }, ...gc(["ariaLabel"]) }), oKe = { [ea]: (e) => Ia(e), input: (e) => Ia(e), change: (e) => Ia(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 }, iKe = G({ name: "ElInput", inheritAttrs: !1 }), sKe = /* @__PURE__ */ G({ ...iKe, props: aKe, emits: oKe, setup(e, { expose: t, emit: n }) { const r = e, a = uh(), o = _r(), i = O(() => { const E = {}; return r.containerRole === "combobox" && (E["aria-haspopup"] = a["aria-haspopup"], E["aria-owns"] = a["aria-owns"], E["aria-expanded"] = a["aria-expanded"]), E; }), s = O(() => [ r.type === "textarea" ? m.b() : v.b(), v.m(h.value), v.is("disabled", p.value), v.is("exceed", ue.value), { [v.b("group")]: o.prepend || o.append, [v.m("prefix")]: o.prefix || r.prefixIcon, [v.m("suffix")]: o.suffix || r.suffixIcon || r.clearable || r.showPassword, [v.bm("suffix", "password-clear")]: V.value && Q.value, [v.b("hidden")]: r.type === "hidden" }, a.class ]), l = O(() => [ v.e("wrapper"), v.is("focus", T.value) ]), u = bqe({ excludeKeys: O(() => Object.keys(i.value)) }), { form: c, formItem: d } = fp(), { inputId: f } = Cm(r, { formItemContext: d }), h = Nd(), p = km(), v = Kt("input"), m = Kt("textarea"), g = un(), y = un(), x = U(!1), w = U(!1), k = U(), C = un(r.inputStyle), S = O(() => g.value || y.value), { wrapperRef: _, isFocused: T, handleFocus: F, handleBlur: A } = u_(S, { beforeFocus() { return p.value; }, afterBlur() { var E; r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "blur").catch((j) => Cr(j))); } }), I = O(() => { var E; return (E = c == null ? void 0 : c.statusIcon) != null ? E : !1; }), N = O(() => (d == null ? void 0 : d.validateState) || ""), L = O(() => N.value && UH[N.value]), z = O(() => w.value ? uqe : nqe), P = O(() => [ a.style ]), D = O(() => [ r.inputStyle, C.value, { resize: r.resize } ]), M = O(() => Mu(r.modelValue) ? "" : String(r.modelValue)), V = O(() => r.clearable && !p.value && !r.readonly && !!M.value && (T.value || x.value)), Q = O(() => r.showPassword && !p.value && !r.readonly && !!M.value && (!!M.value || T.value)), X = O(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ee = O(() => M.value.length), ue = O(() => !!X.value && ee.value > Number(r.maxlength)), ve = O(() => !!o.suffix || !!r.suffixIcon || V.value || r.showPassword || X.value || !!N.value && I.value), [ge, se] = zWe(g); il(y, (E) => { if (W(), !X.value || r.resize !== "both") return; const j = E[0], { width: le } = j.contentRect; k.value = { right: `calc(100% - ${le + 15 + 6}px)` }; }); const ne = () => { const { type: E, autosize: j } = r; if (!(!kr || E !== "textarea" || !y.value)) if (j) { const le = oa(j) ? j.minRows : void 0, ce = oa(j) ? j.maxRows : void 0, oe = s9(y.value, le, ce); C.value = { overflowY: "hidden", ...oe }, We(() => { y.value.offsetHeight, C.value = oe; }); } else C.value = { minHeight: s9(y.value).minHeight }; }, W = /* @__PURE__ */ ((E) => { let j = !1; return () => { var le; j || !r.autosize || ((le = y.value) == null ? void 0 : le.offsetParent) === null || (E(), j = !0); }; })(ne), Y = () => { const E = S.value, j = r.formatter ? r.formatter(M.value) : M.value; !E || E.value === j || (E.value = j); }, re = async (E) => { ge(); let { value: j } = E.target; if (r.formatter && (j = r.parser ? r.parser(j) : j), !Oe.value) { if (j === M.value) { Y(); return; } n(ea, j), n("input", j), await We(), Y(), se(); } }, we = (E) => { n("change", E.target.value); }, { isComposing: Oe, handleCompositionStart: Ne, handleCompositionUpdate: xe, handleCompositionEnd: Fe } = fU({ emit: n, afterComposition: re }), Se = () => { w.value = !w.value, Pe(); }, Pe = async () => { var E; await We(), (E = S.value) == null || E.focus(); }, Me = () => { var E; return (E = S.value) == null ? void 0 : E.blur(); }, He = (E) => { x.value = !1, n("mouseleave", E); }, De = (E) => { x.value = !0, n("mouseenter", E); }, Xe = (E) => { n("keydown", E); }, Ge = () => { var E; (E = S.value) == null || E.select(); }, Ze = () => { n(ea, ""), n("change", ""), n("clear"), n("input", ""); }; return be(() => r.modelValue, () => { var E; We(() => ne()), r.validateEvent && ((E = d == null ? void 0 : d.validate) == null || E.call(d, "change").catch((j) => Cr(j))); }), be(M, () => Y()), be(() => r.type, async () => { await We(), Y(), ne(); }), nt(() => { !r.formatter && r.parser && Cr("ElInput", "If you set the parser, you also need to set the formatter."), Y(), We(ne); }), t({ input: g, textarea: y, ref: S, textareaStyle: D, autosize: Pt(r, "autosize"), isComposing: Oe, focus: Pe, blur: Me, select: Ge, clear: Ze, resizeTextarea: ne }), (E, j) => ($(), B("div", Dt(b(i), { class: [ b(s), { [b(v).bm("group", "append")]: E.$slots.append, [b(v).bm("group", "prepend")]: E.$slots.prepend } ], style: b(P), role: E.containerRole, onMouseenter: De, onMouseleave: He }), [ te(" input "), E.type !== "textarea" ? ($(), B(Ue, { key: 0 }, [ te(" prepend slot "), E.$slots.prepend ? ($(), B("div", { key: 0, class: H(b(v).be("group", "prepend")) }, [ he(E.$slots, "prepend") ], 2)) : te("v-if", !0), K("div", { ref_key: "wrapperRef", ref: _, class: H(b(l)) }, [ te(" prefix slot "), E.$slots.prefix || E.prefixIcon ? ($(), B("span", { key: 0, class: H(b(v).e("prefix")) }, [ K("span", { class: H(b(v).e("prefix-inner")) }, [ he(E.$slots, "prefix"), E.prefixIcon ? ($(), ae(b($a), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(E.prefixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0), K("input", Dt({ id: b(f), ref_key: "input", ref: g, class: b(v).e("inner") }, b(u), { minlength: E.minlength, maxlength: E.maxlength, type: E.showPassword ? w.value ? "text" : "password" : E.type, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, tabindex: E.tabindex, "aria-label": E.ariaLabel, placeholder: E.placeholder, style: E.inputStyle, form: E.form, autofocus: E.autofocus, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b(Fe), onInput: re, onChange: we, onKeydown: Xe }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), te(" suffix slot "), b(ve) ? ($(), B("span", { key: 1, class: H(b(v).e("suffix")) }, [ K("span", { class: H(b(v).e("suffix-inner")) }, [ !b(V) || !b(Q) || !b(X) ? ($(), B(Ue, { key: 0 }, [ he(E.$slots, "suffix"), E.suffixIcon ? ($(), ae(b($a), { key: 0, class: H(b(v).e("icon")) }, { default: q(() => [ ($(), ae(dt(E.suffixIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 64)) : te("v-if", !0), b(V) ? ($(), ae(b($a), { key: 1, class: H([b(v).e("icon"), b(v).e("clear")]), onMousedown: et(b(ng), ["prevent"]), onClick: Ze }, { default: q(() => [ Z(b(ZE)) ]), _: 1 }, 8, ["class", "onMousedown"])) : te("v-if", !0), b(Q) ? ($(), ae(b($a), { key: 2, class: H([b(v).e("icon"), b(v).e("password")]), onClick: Se }, { default: q(() => [ ($(), ae(dt(b(z)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), b(X) ? ($(), B("span", { key: 3, class: H(b(v).e("count")) }, [ K("span", { class: H(b(v).e("count-inner")) }, _e(b(ee)) + " / " + _e(E.maxlength), 3) ], 2)) : te("v-if", !0), b(N) && b(L) && b(I) ? ($(), ae(b($a), { key: 4, class: H([ b(v).e("icon"), b(v).e("validateIcon"), b(v).is("loading", b(N) === "validating") ]) }, { default: q(() => [ ($(), ae(dt(b(L)))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 2)) : te("v-if", !0) ], 2), te(" append slot "), E.$slots.append ? ($(), B("div", { key: 1, class: H(b(v).be("group", "append")) }, [ he(E.$slots, "append") ], 2)) : te("v-if", !0) ], 64)) : ($(), B(Ue, { key: 1 }, [ te(" textarea "), K("textarea", Dt({ id: b(f), ref_key: "textarea", ref: y, class: [b(m).e("inner"), b(v).is("focus", b(T))] }, b(u), { minlength: E.minlength, maxlength: E.maxlength, tabindex: E.tabindex, disabled: b(p), readonly: E.readonly, autocomplete: E.autocomplete, style: b(D), "aria-label": E.ariaLabel, placeholder: E.placeholder, form: E.form, autofocus: E.autofocus, rows: E.rows, onCompositionstart: b(Ne), onCompositionupdate: b(xe), onCompositionend: b(Fe), onInput: re, onFocus: b(F), onBlur: b(A), onChange: we, onKeydown: Xe }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]), b(X) ? ($(), B("span", { key: 0, style: Qe(k.value), class: H(b(v).e("count")) }, _e(b(ee)) + " / " + _e(E.maxlength), 7)) : te("v-if", !0) ], 64)) ], 16, ["role"])); } }); var lKe = /* @__PURE__ */ Ut(sKe, [["__file", "input.vue"]]); const lx = Yr(lKe), Lp = 4, uKe = { 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" } }, cKe = ({ move: e, size: t, bar: n }) => ({ [n.size]: t, transform: `translate${n.axis}(${e}%)` }), p_ = Symbol("scrollbarContextKey"), dKe = Ln({ vertical: Boolean, size: String, move: Number, ratio: { type: Number, required: !0 }, always: Boolean }), pKe = "Thumb", fKe = /* @__PURE__ */ G({ __name: "thumb", props: dKe, setup(e) { const t = e, n = $e(p_), r = Kt("scrollbar"); n || PUe(pKe, "can not inject scrollbar context"); const a = U(), o = U(), i = U({}), s = U(!1); let l = !1, u = !1, c = kr ? document.onselectstart : null; const d = O(() => uKe[t.vertical ? "vertical" : "horizontal"]), f = O(() => cKe({ size: t.size, move: t.move, bar: d.value })), h = O(() => a.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / o.value[d.value.offset]), p = (C) => { var S; if (C.stopPropagation(), C.ctrlKey || [1, 2].includes(C.button)) return; (S = window.getSelection()) == null || S.removeAllRanges(), m(C); const _ = C.currentTarget; _ && (i.value[d.value.axis] = _[d.value.offset] - (C[d.value.client] - _.getBoundingClientRect()[d.value.direction])); }, v = (C) => { if (!o.value || !a.value || !n.wrapElement) return; const S = Math.abs(C.target.getBoundingClientRect()[d.value.direction] - C[d.value.client]), _ = o.value[d.value.offset] / 2, T = (S - _) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = T * n.wrapElement[d.value.scrollSize] / 100; }, m = (C) => { C.stopImmediatePropagation(), l = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", y), c = document.onselectstart, document.onselectstart = () => !1; }, g = (C) => { if (!a.value || !o.value || l === !1) return; const S = i.value[d.value.axis]; if (!S) return; const _ = (a.value.getBoundingClientRect()[d.value.direction] - C[d.value.client]) * -1, T = o.value[d.value.offset] - S, F = (_ - T) * 100 * h.value / a.value[d.value.offset]; n.wrapElement[d.value.scroll] = F * n.wrapElement[d.value.scrollSize] / 100; }, y = () => { l = !1, i.value[d.value.axis] = 0, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", y), k(), u && (s.value = !1); }, x = () => { u = !1, s.value = !!t.size; }, w = () => { u = !0, s.value = l; }; Ct(() => { k(), document.removeEventListener("mouseup", y); }); const k = () => { document.onselectstart !== c && (document.onselectstart = c); }; return Ko(Pt(n, "scrollbarElement"), "mousemove", x), Ko(Pt(n, "scrollbarElement"), "mouseleave", w), (C, S) => ($(), ae(lr, { name: b(r).b("fade"), persisted: "" }, { default: q(() => [ qe(K("div", { ref_key: "instance", ref: a, class: H([b(r).e("bar"), b(r).is(b(d).key)]), onMousedown: v }, [ K("div", { ref_key: "thumb", ref: o, class: H(b(r).e("thumb")), style: Qe(b(f)), onMousedown: p }, null, 38) ], 34), [ [ct, C.always || s.value] ]) ]), _: 1 }, 8, ["name"])); } }); var l9 = /* @__PURE__ */ Ut(fKe, [["__file", "thumb.vue"]]); const hKe = Ln({ always: { type: Boolean, default: !0 }, minSize: { type: Number, required: !0 } }), vKe = /* @__PURE__ */ G({ __name: "bar", props: hKe, setup(e, { expose: t }) { const n = e, r = $e(p_), a = U(0), o = U(0), i = U(""), s = U(""), l = U(1), u = U(1); return t({ handleScroll: (c) => { if (c) { const d = c.offsetHeight - Lp, f = c.offsetWidth - Lp; o.value = c.scrollTop * 100 / d * l.value, a.value = c.scrollLeft * 100 / f * u.value; } }, update: () => { const c = r == null ? void 0 : r.wrapElement; if (!c) return; const d = c.offsetHeight - Lp, f = c.offsetWidth - Lp, 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 + Lp < d ? `${v}px` : "", i.value = m + Lp < f ? `${m}px` : ""; } }), (c, d) => ($(), B(Ue, null, [ Z(l9, { move: a.value, ratio: u.value, size: i.value, always: c.always }, null, 8, ["move", "ratio", "size", "always"]), Z(l9, { move: o.value, ratio: l.value, size: s.value, vertical: "", always: c.always }, null, 8, ["move", "ratio", "size", "always"]) ], 64)); } }); var gKe = /* @__PURE__ */ Ut(vKe, [["__file", "bar.vue"]]); const mKe = Ln({ height: { type: [String, Number], default: "" }, maxHeight: { type: [String, Number], default: "" }, native: { type: Boolean, default: !1 }, wrapStyle: { type: Ft([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, ...gc(["ariaLabel", "ariaOrientation"]) }), yKe = { scroll: ({ scrollTop: e, scrollLeft: t }) => [e, t].every(ia) }, d3 = "ElScrollbar", bKe = G({ name: d3 }), wKe = /* @__PURE__ */ G({ ...bKe, props: mKe, emits: yKe, setup(e, { expose: t, emit: n }) { const r = e, a = Kt("scrollbar"); let o, i, s = 0, l = 0; const u = U(), c = U(), d = U(), f = U(), h = O(() => { const k = {}; return r.height && (k.height = Qf(r.height)), r.maxHeight && (k.maxHeight = Qf(r.maxHeight)), [r.wrapStyle, k]; }), p = O(() => [ r.wrapClass, a.e("wrap"), { [a.em("wrap", "hidden-default")]: !r.native } ]), v = O(() => [a.e("view"), r.viewClass]), m = () => { var k; c.value && ((k = f.value) == null || k.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", { scrollTop: c.value.scrollTop, scrollLeft: c.value.scrollLeft })); }; function g(k, C) { oa(k) ? c.value.scrollTo(k) : ia(k) && ia(C) && c.value.scrollTo(k, C); } const y = (k) => { if (!ia(k)) { Cr(d3, "value must be a number"); return; } c.value.scrollTop = k; }, x = (k) => { if (!ia(k)) { Cr(d3, "value must be a number"); return; } c.value.scrollLeft = k; }, w = () => { var k; (k = f.value) == null || k.update(); }; return be(() => r.noresize, (k) => { k ? (o == null || o(), i == null || i()) : ({ stop: o } = il(d, w), i = Ko("resize", w)); }, { immediate: !0 }), be(() => [r.maxHeight, r.height], () => { r.native || We(() => { var k; w(), c.value && ((k = f.value) == null || k.handleScroll(c.value)); }); }), rt(p_, en({ scrollbarElement: u, wrapElement: c })), p2(() => { c.value && (c.value.scrollTop = s, c.value.scrollLeft = l); }), nt(() => { r.native || We(() => { w(); }); }), qd(() => w()), t({ wrapRef: c, update: w, scrollTo: g, setScrollTop: y, setScrollLeft: x, handleScroll: m }), (k, C) => ($(), B("div", { ref_key: "scrollbarRef", ref: u, class: H(b(a).b()) }, [ K("div", { ref_key: "wrapRef", ref: c, class: H(b(p)), style: Qe(b(h)), tabindex: k.tabindex, onScroll: m }, [ ($(), ae(dt(k.tag), { id: k.id, ref_key: "resizeRef", ref: d, class: H(b(v)), style: Qe(k.viewStyle), role: k.role, "aria-label": k.ariaLabel, "aria-orientation": k.ariaOrientation }, { default: q(() => [ he(k.$slots, "default") ]), _: 3 }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) ], 46, ["tabindex"]), k.native ? te("v-if", !0) : ($(), ae(gKe, { key: 0, ref_key: "barRef", ref: f, always: k.always, "min-size": k.minSize }, null, 8, ["always", "min-size"])) ], 2)); } }); var xKe = /* @__PURE__ */ Ut(wKe, [["__file", "scrollbar.vue"]]); const kKe = Yr(xKe), f_ = Symbol("popper"), gU = Symbol("popperContent"), CKe = [ "dialog", "grid", "group", "listbox", "menu", "navigation", "tooltip", "tree" ], mU = Ln({ role: { type: String, values: CKe, default: "tooltip" } }), SKe = G({ name: "ElPopper", inheritAttrs: !1 }), EKe = /* @__PURE__ */ G({ ...SKe, props: mU, setup(e, { expose: t }) { const n = e, r = U(), a = U(), o = U(), i = U(), s = O(() => n.role), l = { triggerRef: r, popperInstanceRef: a, contentRef: o, referenceRef: i, role: s }; return t(l), rt(f_, l), (u, c) => he(u.$slots, "default"); } }); var _Ke = /* @__PURE__ */ Ut(EKe, [["__file", "popper.vue"]]); const yU = Ln({ arrowOffset: { type: Number, default: 5 } }), TKe = G({ name: "ElPopperArrow", inheritAttrs: !1 }), $Ke = /* @__PURE__ */ G({ ...TKe, props: yU, setup(e, { expose: t }) { const n = e, r = Kt("popper"), { arrowOffset: a, arrowRef: o, arrowStyle: i } = $e(gU, void 0); return be(() => n.arrowOffset, (s) => { a.value = s; }), Ct(() => { o.value = void 0; }), t({ arrowRef: o }), (s, l) => ($(), B("span", { ref_key: "arrowRef", ref: o, class: H(b(r).e("arrow")), style: Qe(b(i)), "data-popper-arrow": "" }, null, 6)); } }); var OKe = /* @__PURE__ */ Ut($Ke, [["__file", "arrow.vue"]]); const Jk = "ElOnlyChild", FKe = G({ name: Jk, setup(e, { slots: t, attrs: n }) { var r; const a = $e(lU), o = RWe((r = a == null ? void 0 : a.setForwardRef) != null ? r : ng); return () => { var i; const s = (i = t.default) == null ? void 0 : i.call(t, n); if (!s) return null; if (s.length > 1) return Cr(Jk, "requires exact only one valid child."), null; const l = bU(s); return l ? qe(Sg(l, n), [[o]]) : (Cr(Jk, "no valid child node found"), null); }; } }); function bU(e) { if (!e) return null; const t = e; for (const n of t) { if (oa(n)) switch (n.type) { case Eg: continue; case Ls: case "svg": return u9(n); case Ue: return bU(n.children); default: return n; } return u9(n); } return null; } function u9(e) { const t = Kt("only-child"); return Z("span", { class: t.e("content") }, [e]); } const wU = Ln({ virtualRef: { type: Ft(Object) }, virtualTriggering: Boolean, onMouseenter: { type: Ft(Function) }, onMouseleave: { type: Ft(Function) }, onClick: { type: Ft(Function) }, onKeydown: { type: Ft(Function) }, onFocus: { type: Ft(Function) }, onBlur: { type: Ft(Function) }, onContextmenu: { type: Ft(Function) }, id: String, open: Boolean }), AKe = G({ name: "ElPopperTrigger", inheritAttrs: !1 }), IKe = /* @__PURE__ */ G({ ...AKe, props: wU, setup(e, { expose: t }) { const n = e, { role: r, triggerRef: a } = $e(f_, void 0); BWe(a); const o = O(() => s.value ? n.id : void 0), i = O(() => { if (r && r.value === "tooltip") return n.open && n.id ? n.id : void 0; }), s = O(() => { if (r && r.value !== "tooltip") return r.value; }), l = O(() => s.value ? `${n.open}` : void 0); let u; const c = [ "onMouseenter", "onMouseleave", "onClick", "onKeydown", "onFocus", "onBlur", "onContextmenu" ]; return nt(() => { be(() => n.virtualRef, (d) => { d && (a.value = hl(d)); }, { immediate: !0 }), be(a, (d, f) => { u == null || u(), u = void 0, cd(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 = be([o, i, s, l], (h) => { [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((p, v) => { Mu(h[v]) ? d.removeAttribute(p) : d.setAttribute(p, h[v]); }); }, { immediate: !0 })), cd(f) && [ "aria-controls", "aria-describedby", "aria-haspopup", "aria-expanded" ].forEach((h) => f.removeAttribute(h)); }, { immediate: !0 }); }), Ct(() => { if (u == null || u(), u = void 0, a.value && cd(a.value)) { const d = a.value; c.forEach((f) => { const h = n[f]; h && d.removeEventListener(f.slice(2).toLowerCase(), h); }), a.value = void 0; } }), t({ triggerRef: a }), (d, f) => d.virtualTriggering ? te("v-if", !0) : ($(), ae(b(FKe), Dt({ key: 0 }, d.$attrs, { "aria-controls": b(o), "aria-describedby": b(i), "aria-expanded": b(l), "aria-haspopup": b(s) }), { default: q(() => [ he(d.$slots, "default") ]), _: 3 }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])); } }); var PKe = /* @__PURE__ */ Ut(IKe, [["__file", "trigger.vue"]]); const eC = "focus-trap.focus-after-trapped", tC = "focus-trap.focus-after-released", LKe = "focus-trap.focusout-prevented", c9 = { cancelable: !0, bubbles: !1 }, NKe = { cancelable: !0, bubbles: !1 }, d9 = "focusAfterTrapped", p9 = "focusAfterReleased", MKe = Symbol("elFocusTrap"), h_ = U(), ux = U(0), v_ = U(0); let N1 = 0; const xU = (e) => { const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (r) => { const a = r.tagName === "INPUT" && r.type === "hidden"; return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; } }); for (; n.nextNode(); ) t.push(n.currentNode); return t; }, f9 = (e, t) => { for (const n of e) if (!DKe(n, t)) return n; }, DKe = (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; }, BKe = (e) => { const t = xU(e), n = f9(t, e), r = f9(t.reverse(), e); return [n, r]; }, RKe = (e) => e instanceof HTMLInputElement && "select" in e, cu = (e, t) => { if (e && e.focus) { const n = document.activeElement; e.focus({ preventScroll: !0 }), v_.value = window.performance.now(), e !== n && RKe(e) && t && e.select(); } }; function h9(e, t) { const n = [...e], r = e.indexOf(t); return r !== -1 && n.splice(r, 1), n; } const zKe = () => { let e = []; return { push: (t) => { const n = e[0]; n && t !== n && n.pause(), e = h9(e, t), e.unshift(t); }, remove: (t) => { var n, r; e = h9(e, t), (r = (n = e[0]) == null ? void 0 : n.resume) == null || r.call(n); } }; }, VKe = (e, t = !1) => { const n = document.activeElement; for (const r of e) if (cu(r, t), document.activeElement !== n) return; }, v9 = zKe(), jKe = () => ux.value > v_.value, M1 = () => { h_.value = "pointer", ux.value = window.performance.now(); }, g9 = () => { h_.value = "keyboard", ux.value = window.performance.now(); }, HKe = () => (nt(() => { N1 === 0 && (document.addEventListener("mousedown", M1), document.addEventListener("touchstart", M1), document.addEventListener("keydown", g9)), N1++; }), Ct(() => { N1--, N1 <= 0 && (document.removeEventListener("mousedown", M1), document.removeEventListener("touchstart", M1), document.removeEventListener("keydown", g9)); }), { focusReason: h_, lastUserFocusTimestamp: ux, lastAutomatedFocusTimestamp: v_ }), D1 = (e) => new CustomEvent(LKe, { ...NKe, detail: e }), UKe = G({ name: "ElFocusTrap", inheritAttrs: !1, props: { loop: Boolean, trapped: Boolean, focusTrapEl: Object, focusStartEl: { type: [Object, String], default: "first" } }, emits: [ d9, p9, "focusin", "focusout", "focusout-prevented", "release-requested" ], setup(e, { emit: t }) { const n = U(); let r, a; const { focusReason: o } = HKe(); PWe((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: y, currentTarget: x, shiftKey: w } = p, { loop: k } = e, C = v === Pr.tab && !m && !g && !y, S = document.activeElement; if (C && S) { const _ = x, [T, F] = BKe(_); if (T && F) { if (!w && S === F) { const A = D1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && cu(T, !0)); } else if (w && [T, _].includes(S)) { const A = D1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || (p.preventDefault(), k && cu(F, !0)); } } else if (S === _) { const A = D1({ focusReason: o.value }); t("focusout-prevented", A), A.defaultPrevented || p.preventDefault(); } } }; rt(MKe, { focusTrapRef: n, onKeydown: s }), be(() => e.focusTrapEl, (p) => { p && (n.value = p); }, { immediate: !0 }), be([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(d9, p); }, u = (p) => t(p9, p), c = (p) => { const v = b(n); if (!v) return; const m = p.target, g = p.relatedTarget, y = m && v.contains(m); e.trapped || g && v.contains(g) || (r = g), y && t("focusin", p), !i.paused && e.trapped && (y ? a = m : cu(a, !0)); }, d = (p) => { const v = b(n); if (!(i.paused || !v)) if (e.trapped) { const m = p.relatedTarget; !Mu(m) && !v.contains(m) && setTimeout(() => { if (!i.paused && e.trapped) { const g = D1({ focusReason: o.value }); t("focusout-prevented", g), g.defaultPrevented || cu(a, !0); } }, 0); } else { const m = p.target; m && v.contains(m) || t("focusout", p); } }; async function f() { await We(); const p = b(n); if (p) { v9.push(i); const v = p.contains(document.activeElement) ? r : document.activeElement; if (r = v, !p.contains(v)) { const m = new Event(eC, c9); p.addEventListener(eC, l), p.dispatchEvent(m), m.defaultPrevented || We(() => { let g = e.focusStartEl; Ia(g) || (cu(g), document.activeElement !== g && (g = "first")), g === "first" && VKe(xU(p), !0), (document.activeElement === v || g === "container") && cu(p); }); } } } function h() { const p = b(n); if (p) { p.removeEventListener(eC, l); const v = new CustomEvent(tC, { ...c9, detail: { focusReason: o.value } }); p.addEventListener(tC, u), p.dispatchEvent(v), !v.defaultPrevented && (o.value == "keyboard" || !jKe() || p.contains(document.activeElement)) && cu(r ?? document.body), p.removeEventListener(tC, u), v9.remove(i); } } return nt(() => { e.trapped && f(), be(() => e.trapped, (p) => { p ? f() : h(); }); }), Ct(() => { 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 qKe(e, t, n, r, a, o) { return he(e.$slots, "default", { handleKeydown: e.onKeydown }); } var WKe = /* @__PURE__ */ Ut(UKe, [["render", qKe], ["__file", "focus-trap.vue"]]); const KKe = ["fixed", "absolute"], GKe = Ln({ boundariesPadding: { type: Number, default: 0 }, fallbackPlacements: { type: Ft(Array), default: void 0 }, gpuAcceleration: { type: Boolean, default: !0 }, offset: { type: Number, default: 12 }, placement: { type: String, values: ox, default: "bottom" }, popperOptions: { type: Ft(Object), default: () => ({}) }, strategy: { type: String, values: KKe, default: "absolute" } }), kU = Ln({ ...GKe, id: String, style: { type: Ft([String, Array, Object]) }, className: { type: Ft([String, Array, Object]) }, effect: { type: Ft(String), default: "dark" }, visible: Boolean, enterable: { type: Boolean, default: !0 }, pure: Boolean, focusOnShow: { type: Boolean, default: !1 }, trapping: { type: Boolean, default: !1 }, popperClass: { type: Ft([String, Array, Object]) }, popperStyle: { type: Ft([String, Array, Object]) }, referenceEl: { type: Ft(Object) }, triggerTargetEl: { type: Ft(Object) }, stopPopperMouseEvent: { type: Boolean, default: !0 }, virtualTriggering: Boolean, zIndex: Number, ...gc(["ariaLabel"]) }), XKe = { mouseenter: (e) => e instanceof MouseEvent, mouseleave: (e) => e instanceof MouseEvent, focus: () => !0, blur: () => !0, close: () => !0 }, YKe = (e, t = []) => { const { placement: n, strategy: r, popperOptions: a } = e, o = { placement: n, strategy: r, ...a, modifiers: [...QKe(e), ...t] }; return JKe(o, a == null ? void 0 : a.modifiers), o; }, ZKe = (e) => { if (kr) return hl(e); }; function QKe(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 JKe(e, t) { t && (e.modifiers = [...e.modifiers, ...t ?? []]); } const eGe = 0, tGe = (e) => { const { popperInstanceRef: t, contentRef: n, triggerRef: r, role: a } = $e(f_, void 0), o = U(), i = U(), s = O(() => ({ name: "eventListeners", enabled: !!e.visible })), l = O(() => { var g; const y = b(o), x = (g = b(i)) != null ? g : eGe; return { name: "arrow", enabled: !TUe(y), options: { element: y, padding: x } }; }), u = O(() => ({ onFirstUpdate: () => { p(); }, ...YKe(e, [ b(l), b(s) ]) })), c = O(() => ZKe(e.referenceEl) || b(r)), { attributes: d, state: f, styles: h, update: p, forceUpdate: v, instanceRef: m } = FWe(c, n, u); return be(m, (g) => t.value = g), nt(() => { be(() => { var g; return (g = b(c)) == null ? void 0 : g.getBoundingClientRect(); }, () => { p(); }); }), { attributes: d, arrowRef: o, contentRef: n, instanceRef: m, state: f, styles: h, role: a, forceUpdate: v, update: p }; }, nGe = (e, { attributes: t, styles: n, role: r }) => { const { nextZIndex: a } = dU(), o = Kt("popper"), i = O(() => b(t).popper), s = U(ia(e.zIndex) ? e.zIndex : a()), l = O(() => [ o.b(), o.is("pure", e.pure), o.is(e.effect), e.popperClass ]), u = O(() => [ { zIndex: b(s) }, b(n).popper, e.popperStyle || {} ]), c = O(() => r.value === "dialog" ? "false" : void 0), d = O(() => b(n).arrow || {}); return { ariaModal: c, arrowStyle: d, contentAttrs: i, contentClass: l, contentStyle: u, contentZIndex: s, updateZIndex: () => { s.value = ia(e.zIndex) ? e.zIndex : a(); } }; }, rGe = (e, t) => { const n = U(!1), r = U(); return { focusStartRef: r, trapped: n, onFocusAfterReleased: (a) => { var o; ((o = a.detail) == null ? void 0 : o.focusReason) !== "pointer" && (r.value = "first", t("blur")); }, onFocusAfterTrapped: () => { t("focus"); }, onFocusInTrap: (a) => { e.visible && !n.value && (a.target && (r.value = a.target), n.value = !0); }, onFocusoutPrevented: (a) => { e.trapping || (a.detail.focusReason === "pointer" && a.preventDefault(), n.value = !1); }, onReleaseRequested: () => { n.value = !1, t("close"); } }; }, aGe = G({ name: "ElPopperContent" }), oGe = /* @__PURE__ */ G({ ...aGe, props: kU, emits: XKe, setup(e, { expose: t, emit: n }) { const r = e, { focusStartRef: a, trapped: o, onFocusAfterReleased: i, onFocusAfterTrapped: s, onFocusInTrap: l, onFocusoutPrevented: u, onReleaseRequested: c } = rGe(r, n), { attributes: d, arrowRef: f, contentRef: h, styles: p, instanceRef: v, role: m, update: g } = tGe(r), { ariaModal: y, arrowStyle: x, contentAttrs: w, contentClass: k, contentStyle: C, updateZIndex: S } = nGe(r, { styles: p, attributes: d, role: m }), _ = $e(sg, void 0), T = U(); rt(gU, { arrowStyle: x, arrowRef: f, arrowOffset: T }), _ && rt(sg, { ..._, addInputId: ng, removeInputId: ng }); let F; const A = (N = !0) => { g(), N && S(); }, I = () => { A(!1), r.visible && r.focusOnShow ? o.value = !0 : r.visible === !1 && (o.value = !1); }; return nt(() => { be(() => r.triggerTargetEl, (N, L) => { F == null || F(), F = void 0; const z = b(N || h.value), P = b(L || h.value); cd(z) && (F = be([m, () => r.ariaLabel, y, () => r.id], (D) => { ["role", "aria-label", "aria-modal", "id"].forEach((M, V) => { Mu(D[V]) ? z.removeAttribute(M) : z.setAttribute(M, D[V]); }); }, { immediate: !0 })), P !== z && cd(P) && ["role", "aria-label", "aria-modal", "id"].forEach((D) => { P.removeAttribute(D); }); }, { immediate: !0 }), be(() => r.visible, I, { immediate: !0 }); }), Ct(() => { F == null || F(), F = void 0; }), t({ popperContentRef: h, popperInstanceRef: v, updatePopper: A, contentStyle: C }), (N, L) => ($(), B("div", Dt({ ref_key: "contentRef", ref: h }, b(w), { style: b(C), class: b(k), tabindex: "-1", onMouseenter: (z) => N.$emit("mouseenter", z), onMouseleave: (z) => N.$emit("mouseleave", z) }), [ Z(b(WKe), { trapped: b(o), "trap-on-focus-in": !0, "focus-trap-el": b(h), "focus-start-el": b(a), onFocusAfterTrapped: b(s), onFocusAfterReleased: b(i), onFocusin: b(l), onFocusoutPrevented: b(u), onReleaseRequested: b(c) }, { default: q(() => [ he(N.$slots, "default") ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) ], 16, ["onMouseenter", "onMouseleave"])); } }); var iGe = /* @__PURE__ */ Ut(oGe, [["__file", "content.vue"]]); const sGe = Yr(_Ke), g_ = Symbol("elTooltip"), to = Ln({ ...MWe, ...kU, appendTo: { type: Ft([String, Object]) }, content: { type: String, default: "" }, rawContent: Boolean, persistent: Boolean, visible: { type: Ft(Boolean), default: null }, transition: String, teleported: { type: Boolean, default: !0 }, disabled: Boolean, ...gc(["ariaLabel"]) }), lg = Ln({ ...wU, disabled: Boolean, trigger: { type: Ft([String, Array]), default: "hover" }, triggerKeys: { type: Ft(Array), default: () => [Pr.enter, Pr.space] } }), { useModelToggleProps: lGe, useModelToggleEmits: uGe, useModelToggle: cGe } = Tqe("visible"), dGe = Ln({ ...mU, ...lGe, ...to, ...lg, ...yU, showArrow: { type: Boolean, default: !0 } }), pGe = [ ...uGe, "before-show", "before-hide", "show", "hide", "open", "close" ], fGe = (e, t) => oo(e) ? e.includes(t) : e === t, Np = (e, t, n) => (r) => { fGe(b(e), t) && n(r); }, hGe = G({ name: "ElTooltipTrigger" }), vGe = /* @__PURE__ */ G({ ...hGe, props: lg, setup(e, { expose: t }) { const n = e, r = Kt("tooltip"), { controlled: a, id: o, open: i, onOpen: s, onClose: l, onToggle: u } = $e(g_, void 0), c = U(null), d = () => { if (b(a) || n.disabled) return !0; }, f = Pt(n, "trigger"), h = rl(d, Np(f, "hover", s)), p = rl(d, Np(f, "hover", l)), v = rl(d, Np(f, "click", (w) => { w.button === 0 && u(w); })), m = rl(d, Np(f, "focus", s)), g = rl(d, Np(f, "focus", l)), y = rl(d, Np(f, "contextmenu", (w) => { w.preventDefault(), u(w); })), x = rl(d, (w) => { const { code: k } = w; n.triggerKeys.includes(k) && (w.preventDefault(), u(w)); }); return t({ triggerRef: c }), (w, k) => ($(), ae(b(PKe), { id: b(o), "virtual-ref": w.virtualRef, open: b(i), "virtual-triggering": w.virtualTriggering, class: H(b(r).e("trigger")), onBlur: b(g), onClick: b(v), onContextmenu: b(y), onFocus: b(m), onMouseenter: b(h), onMouseleave: b(p), onKeydown: b(x) }, { default: q(() => [ he(w.$slots, "default") ]), _: 3 }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"])); } }); var gGe = /* @__PURE__ */ Ut(vGe, [["__file", "trigger.vue"]]); const mGe = Ln({ to: { type: Ft([String, Object]), required: !0 }, disabled: Boolean }), yGe = /* @__PURE__ */ G({ __name: "teleport", props: mGe, setup(e) { return (t, n) => t.disabled ? he(t.$slots, "default", { key: 0 }) : ($(), ae(_g, { key: 1, to: t.to }, [ he(t.$slots, "default") ], 8, ["to"])); } }); var bGe = /* @__PURE__ */ Ut(yGe, [["__file", "teleport.vue"]]); const wGe = Yr(bGe), xGe = G({ name: "ElTooltipContent", inheritAttrs: !1 }), kGe = /* @__PURE__ */ G({ ...xGe, props: to, setup(e, { expose: t }) { const n = e, { selector: r } = sU(), a = Kt("tooltip"), o = U(null); let i; const { controlled: s, id: l, open: u, trigger: c, onClose: d, onOpen: f, onShow: h, onHide: p, onBeforeShow: v, onBeforeHide: m } = $e(g_, void 0), g = O(() => n.transition || `${a.namespace.value}-fade-in-linear`), y = O(() => process.env.NODE_ENV === "test" ? !0 : n.persistent); Ct(() => { i == null || i(); }); const x = O(() => b(y) ? !0 : b(u)), w = O(() => n.disabled ? !1 : b(u)), k = O(() => n.appendTo || r.value), C = O(() => { var P; return (P = n.style) != null ? P : {}; }), S = U(!0), _ = () => { p(), S.value = !0; }, T = () => { if (b(s)) return !0; }, F = rl(T, () => { n.enterable && b(c) === "hover" && f(); }), A = rl(T, () => { b(c) === "hover" && d(); }), I = () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P), v == null || v(); }, N = () => { m == null || m(); }, L = () => { h(), i = wze(O(() => { var P; return (P = o.value) == null ? void 0 : P.popperContentRef; }), () => { b(s) || b(c) !== "hover" && d(); }); }, z = () => { n.virtualTriggering || d(); }; return be(() => b(u), (P) => { P ? S.value = !1 : i == null || i(); }, { flush: "post" }), be(() => n.content, () => { var P, D; (D = (P = o.value) == null ? void 0 : P.updatePopper) == null || D.call(P); }), t({ contentRef: o }), (P, D) => ($(), ae(b(wGe), { disabled: !P.teleported, to: b(k) }, { default: q(() => [ Z(lr, { name: b(g), onAfterLeave: _, onBeforeEnter: I, onAfterEnter: L, onBeforeLeave: N }, { default: q(() => [ b(x) ? qe(($(), ae(b(iGe), Dt({ key: 0, id: b(l), ref_key: "contentRef", ref: o }, P.$attrs, { "aria-label": P.ariaLabel, "aria-hidden": S.value, "boundaries-padding": P.boundariesPadding, "fallback-placements": P.fallbackPlacements, "gpu-acceleration": P.gpuAcceleration, offset: P.offset, placement: P.placement, "popper-options": P.popperOptions, strategy: P.strategy, effect: P.effect, enterable: P.enterable, pure: P.pure, "popper-class": P.popperClass, "popper-style": [P.popperStyle, b(C)], "reference-el": P.referenceEl, "trigger-target-el": P.triggerTargetEl, visible: b(w), "z-index": P.zIndex, onMouseenter: b(F), onMouseleave: b(A), onBlur: z, onClose: b(d) }), { default: q(() => [ he(P.$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"])), [ [ct, b(w)] ]) : te("v-if", !0) ]), _: 3 }, 8, ["name"]) ]), _: 3 }, 8, ["disabled", "to"])); } }); var CGe = /* @__PURE__ */ Ut(kGe, [["__file", "content.vue"]]); const SGe = G({ name: "ElTooltip" }), EGe = /* @__PURE__ */ G({ ...SGe, props: dGe, emits: pGe, setup(e, { expose: t, emit: n }) { const r = e; NWe(); const a = sx(), o = U(), i = U(), s = () => { var g; const y = b(o); y && ((g = y.popperInstanceRef) == null || g.update()); }, l = U(!1), u = U(), { show: c, hide: d, hasUpdateHandler: f } = cGe({ indicator: l, toggleReason: u }), { onOpen: h, onClose: p } = DWe({ showAfter: Pt(r, "showAfter"), hideAfter: Pt(r, "hideAfter"), autoClose: Pt(r, "autoClose"), open: c, close: d }), v = O(() => Zf(r.visible) && !f.value); rt(g_, { controlled: v, id: a, open: ch(l), trigger: Pt(r, "trigger"), onOpen: (g) => { h(g); }, onClose: (g) => { p(g); }, onToggle: (g) => { b(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 }), be(() => r.disabled, (g) => { g && l.value && (l.value = !1); }); const m = (g) => { var y, x; const w = (x = (y = i.value) == null ? void 0 : y.contentRef) == null ? void 0 : x.popperContentRef, k = (g == null ? void 0 : g.relatedTarget) || document.activeElement; return w && w.contains(k); }; return Tg(() => l.value && d()), t({ popperRef: o, contentRef: i, isFocusInsideContent: m, updatePopper: s, onOpen: h, onClose: p, hide: d }), (g, y) => ($(), ae(b(sGe), { ref_key: "popperRef", ref: o, role: g.role }, { default: q(() => [ Z(gGe, { disabled: g.disabled, trigger: g.trigger, "trigger-keys": g.triggerKeys, "virtual-ref": g.virtualRef, "virtual-triggering": g.virtualTriggering }, { default: q(() => [ g.$slots.default ? he(g.$slots, "default", { key: 0 }) : te("v-if", !0) ]), _: 3 }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]), Z(CGe, { 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: q(() => [ he(g.$slots, "content", {}, () => [ g.rawContent ? ($(), B("span", { key: 0, innerHTML: g.content }, null, 8, ["innerHTML"])) : ($(), B("span", { key: 1 }, _e(g.content), 1)) ]), g.showArrow ? ($(), ae(b(OKe), { key: 0, "arrow-offset": g.arrowOffset }, null, 8, ["arrow-offset"])) : te("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 _Ge = /* @__PURE__ */ Ut(EGe, [["__file", "tooltip.vue"]]); const Sm = Yr(_Ge), CU = Symbol("buttonGroupContextKey"), TGe = (e, t) => { Py({ from: "type.text", replacement: "link", version: "3.0.0", scope: "props", ref: "https://element-plus.org/en-US/component/button.html#button-attributes" }, O(() => e.type === "text")); const n = $e(CU, void 0), r = c_("button"), { form: a } = fp(), o = Nd(O(() => n == null ? void 0 : n.size)), i = km(), s = U(), l = _r(), u = O(() => e.type || (n == null ? void 0 : n.type) || ""), c = O(() => { var h, p, v; return (v = (p = e.autoInsertSpace) != null ? p : (h = r.value) == null ? void 0 : h.autoInsertSpace) != null ? v : !1; }), d = O(() => e.tag === "button" ? { ariaDisabled: i.value || e.loading, disabled: i.value || e.loading, autofocus: e.autofocus, type: e.nativeType } : {}), f = O(() => { 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) === Ls) { const m = v.children; return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim()); } } return !1; }); return { _disabled: i, _size: o, _type: u, _ref: s, _props: d, shouldAddSpace: f, handleClick: (h) => { if (i.value || e.loading) { h.stopPropagation(); return; } e.nativeType === "reset" && (a == null || a.resetFields()), t("click", h); } }; }, $Ge = [ "default", "primary", "success", "warning", "info", "danger", "text", "" ], OGe = ["button", "submit", "reset"], p3 = Ln({ size: Dh, disabled: Boolean, type: { type: String, values: $Ge, default: "" }, icon: { type: ec }, nativeType: { type: String, values: OGe, default: "button" }, loading: Boolean, loadingIcon: { type: ec, default: () => QE }, 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: Ft([String, Object]), default: "button" } }), FGe = { click: (e) => e instanceof MouseEvent }; function ha(e, t) { AGe(e) && (e = "100%"); var n = IGe(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 B1(e) { return Math.min(1, Math.max(0, e)); } function AGe(e) { return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1; } function IGe(e) { return typeof e == "string" && e.indexOf("%") !== -1; } function SU(e) { return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e; } function R1(e) { return e <= 1 ? "".concat(Number(e) * 100, "%") : e; } function Yc(e) { return e.length === 1 ? "0" + e : String(e); } function PGe(e, t, n) { return { r: ha(e, 255) * 255, g: ha(t, 255) * 255, b: ha(n, 255) * 255 }; } function m9(e, t, n) { e = ha(e, 255), t = ha(t, 255), n = ha(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = 0, s = (r + a) / 2; if (r === a) i = 0, o = 0; else { var l = r - a; switch (i = s > 0.5 ? l / (2 - r - a) : l / (r + a), r) { case e: o = (t - n) / l + (t < n ? 6 : 0); break; case t: o = (n - e) / l + 2; break; case n: o = (e - t) / l + 4; break; } o /= 6; } return { h: o, s: i, l: s }; } function nC(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 LGe(e, t, n) { var r, a, o; if (e = ha(e, 360), t = ha(t, 100), n = ha(n, 100), t === 0) a = n, o = n, r = n; else { var i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i; r = nC(s, i, e + 1 / 3), a = nC(s, i, e), o = nC(s, i, e - 1 / 3); } return { r: r * 255, g: a * 255, b: o * 255 }; } function y9(e, t, n) { e = ha(e, 255), t = ha(t, 255), n = ha(n, 255); var r = Math.max(e, t, n), a = Math.min(e, t, n), o = 0, i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: o = (t - n) / s + (t < n ? 6 : 0); break; case t: o = (n - e) / s + 2; break; case n: o = (e - t) / s + 4; break; } o /= 6; } return { h: o, s: l, v: i }; } function NGe(e, t, n) { e = ha(e, 360) * 6, t = ha(t, 100), n = ha(n, 100); var r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: u * 255, g: c * 255, b: d * 255 }; } function b9(e, t, n, r) { var a = [ Yc(Math.round(e).toString(16)), Yc(Math.round(t).toString(16)), Yc(Math.round(n).toString(16)) ]; return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join(""); } function MGe(e, t, n, r, a) { var o = [ Yc(Math.round(e).toString(16)), Yc(Math.round(t).toString(16)), Yc(Math.round(n).toString(16)), Yc(DGe(r)) ]; return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join(""); } function DGe(e) { return Math.round(parseFloat(e) * 255).toString(16); } function w9(e) { return Oo(e) / 255; } function Oo(e) { return parseInt(e, 16); } function BGe(e) { return { r: e >> 16, g: (e & 65280) >> 8, b: e & 255 }; } var f3 = { 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 RGe(e) { var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, o = null, i = !1, s = !1; return typeof e == "string" && (e = jGe(e)), typeof e == "object" && (Xs(e.r) && Xs(e.g) && Xs(e.b) ? (t = PGe(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : Xs(e.h) && Xs(e.s) && Xs(e.v) ? (r = R1(e.s), a = R1(e.v), t = NGe(e.h, r, a), i = !0, s = "hsv") : Xs(e.h) && Xs(e.s) && Xs(e.l) && (r = R1(e.s), o = R1(e.l), t = LGe(e.h, r, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = SU(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 zGe = "[-\\+]?\\d+%?", VGe = "[-\\+]?\\d*\\.\\d+%?", Au = "(?:".concat(VGe, ")|(?:").concat(zGe, ")"), rC = "[\\s|\\(]+(".concat(Au, ")[,|\\s]+(").concat(Au, ")[,|\\s]+(").concat(Au, ")\\s*\\)?"), aC = "[\\s|\\(]+(".concat(Au, ")[,|\\s]+(").concat(Au, ")[,|\\s]+(").concat(Au, ")[,|\\s]+(").concat(Au, ")\\s*\\)?"), Ei = { CSS_UNIT: new RegExp(Au), rgb: new RegExp("rgb" + rC), rgba: new RegExp("rgba" + aC), hsl: new RegExp("hsl" + rC), hsla: new RegExp("hsla" + aC), hsv: new RegExp("hsv" + rC), hsva: new RegExp("hsva" + aC), 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 jGe(e) { if (e = e.trim().toLowerCase(), e.length === 0) return !1; var t = !1; if (f3[e]) e = f3[e], t = !0; else if (e === "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; var n = Ei.rgb.exec(e); return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ei.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ei.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ei.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ei.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ei.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ei.hex8.exec(e), n ? { r: Oo(n[1]), g: Oo(n[2]), b: Oo(n[3]), a: w9(n[4]), format: t ? "name" : "hex8" } : (n = Ei.hex6.exec(e), n ? { r: Oo(n[1]), g: Oo(n[2]), b: Oo(n[3]), format: t ? "name" : "hex" } : (n = Ei.hex4.exec(e), n ? { r: Oo(n[1] + n[1]), g: Oo(n[2] + n[2]), b: Oo(n[3] + n[3]), a: w9(n[4] + n[4]), format: t ? "name" : "hex8" } : (n = Ei.hex3.exec(e), n ? { r: Oo(n[1] + n[1]), g: Oo(n[2] + n[2]), b: Oo(n[3] + n[3]), format: t ? "name" : "hex" } : !1))))))))); } function Xs(e) { return !!Ei.CSS_UNIT.exec(String(e)); } var HGe = ( /** @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 = BGe(t)), this.originalInput = t; var a = RGe(t); this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.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 = a.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, a, o = t.r / 255, i = t.g / 255, s = t.b / 255; return o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 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 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * a; }, e.prototype.getAlpha = function() { return this.a; }, e.prototype.setAlpha = function(t) { return this.a = SU(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 = y9(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 = y9(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100); return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHsl = function() { var t = m9(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 = m9(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100); return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")"); }, e.prototype.toHex = function(t) { return t === void 0 && (t = !1), b9(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), MGe(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(ha(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(ha(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 = "#" + b9(this.r, this.g, this.b, !1), n = 0, r = Object.entries(f3); n < r.length; n++) { var a = r[n], o = a[0], i = a[1]; if (t === i) return o; } return !1; }, e.prototype.toString = function(t) { var n = !!t; t = t ?? this.format; var r = !1, a = this.a < 1 && this.a >= 0, o = !n && a && (t.startsWith("hex") || t === "name"); return o ? 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 = B1(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 = B1(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 = B1(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 = B1(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(), a = new e(t).toRgb(), o = n / 100, i = { r: (a.r - r.r) * o + r.r, g: (a.g - r.g) * o + r.g, b: (a.b - r.b) * o + r.b, a: (a.a - r.a) * o + 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(), a = 360 / n, o = [this]; for (r.h = (r.h - (a * t >> 1) + 720) % 360; --t; ) r.h = (r.h + a) % 360, o.push(new e(r)); return o; }, 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, a = n.s, o = n.v, i = [], s = 1 / t; t--; ) i.push(new e({ h: r, s: a, v: o })), o = (o + 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(), a = n.a + r.a * (1 - n.a); return new e({ r: (n.r * n.a + r.r * r.a * (1 - n.a)) / a, g: (n.g * n.a + r.g * r.a * (1 - n.a)) / a, b: (n.b * n.a + r.b * r.a * (1 - n.a)) / a, a }); }, 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, a = [this], o = 360 / t, i = 1; i < t; i++) a.push(new e({ h: (r + i * o) % 360, s: n.s, l: n.l })); return a; }, e.prototype.equals = function(t) { return this.toRgbString() === new e(t).toRgbString(); }, e; }() ); function eu(e, t = 20) { return e.mix("#141414", t).toString(); } function UGe(e) { const t = km(), n = Kt("button"); return O(() => { let r = {}, a = e.color; if (a) { const o = a.match(/var\((.*?)\)/); o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1])); const i = new HGe(a), s = e.dark ? i.tint(20).toString() : eu(i, 20); if (e.plain) r = n.cssVarBlock({ "bg-color": e.dark ? eu(i, 90) : i.tint(90).toString(), "text-color": a, "border-color": e.dark ? eu(i, 50) : i.tint(50).toString(), "hover-text-color": `var(${n.cssVarName("color-white")})`, "hover-bg-color": a, "hover-border-color": a, "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 ? eu(i, 90) : i.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? eu(i, 50) : i.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? eu(i, 80) : i.tint(80).toString()); else { const l = e.dark ? eu(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": a, "text-color": u, "border-color": a, "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 ? eu(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 qGe = G({ name: "ElButton" }), WGe = /* @__PURE__ */ G({ ...qGe, props: p3, emits: FGe, setup(e, { expose: t, emit: n }) { const r = e, a = UGe(r), o = Kt("button"), { _ref: i, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: d, handleClick: f } = TGe(r, n), h = O(() => [ o.b(), o.m(l.value), o.m(s.value), o.is("disabled", u.value), o.is("loading", r.loading), o.is("plain", r.plain), o.is("round", r.round), o.is("circle", r.circle), o.is("text", r.text), o.is("link", r.link), o.is("has-bg", r.bg) ]); return t({ ref: i, size: s, type: l, disabled: u, shouldAddSpace: d }), (p, v) => ($(), ae(dt(p.tag), Dt({ ref_key: "_ref", ref: i }, b(c), { class: b(h), style: b(a), onClick: b(f) }), { default: q(() => [ p.loading ? ($(), B(Ue, { key: 0 }, [ p.$slots.loading ? he(p.$slots, "loading", { key: 0 }) : ($(), ae(b($a), { key: 1, class: H(b(o).is("loading")) }, { default: q(() => [ ($(), ae(dt(p.loadingIcon))) ]), _: 1 }, 8, ["class"])) ], 64)) : p.icon || p.$slots.icon ? ($(), ae(b($a), { key: 1 }, { default: q(() => [ p.icon ? ($(), ae(dt(p.icon), { key: 0 })) : he(p.$slots, "icon", { key: 1 }) ]), _: 3 })) : te("v-if", !0), p.$slots.default ? ($(), B("span", { key: 2, class: H({ [b(o).em("text", "expand")]: b(d) }) }, [ he(p.$slots, "default") ], 2)) : te("v-if", !0) ]), _: 3 }, 16, ["class", "style", "onClick"])); } }); var KGe = /* @__PURE__ */ Ut(WGe, [["__file", "button.vue"]]); const GGe = { size: p3.size, type: p3.type }, XGe = G({ name: "ElButtonGroup" }), YGe = /* @__PURE__ */ G({ ...XGe, props: GGe, setup(e) { const t = e; rt(CU, en({ size: Pt(t, "size"), type: Pt(t, "type") })); const n = Kt("button"); return (r, a) => ($(), B("div", { class: H(b(n).b("group")) }, [ he(r.$slots, "default") ], 2)); } }); var EU = /* @__PURE__ */ Ut(YGe, [["__file", "button-group.vue"]]); const Md = Yr(KGe, { ButtonGroup: EU }); Vl(EU); const du = /* @__PURE__ */ new Map(); if (kr) { let e; document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => { if (e) { for (const n of du.values()) for (const { documentHandler: r } of n) r(t, e); e = void 0; } }); } function x9(e, t) { let n = []; return Array.isArray(t.arg) ? n = t.arg : cd(t.arg) && n.push(t.arg), function(r, a) { const o = t.instance.popperRef, i = r.target, s = a == null ? void 0 : a.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 = o && (o.contains(i) || o.contains(s)); l || u || c || d || f || h || t.value(r, a); }; } const _U = { beforeMount(e, t) { du.has(e) || du.set(e, []), du.get(e).push({ documentHandler: x9(e, t), bindingFn: t.value }); }, updated(e, t) { du.has(e) || du.set(e, []); const n = du.get(e), r = n.findIndex((o) => o.bindingFn === t.oldValue), a = { documentHandler: x9(e, t), bindingFn: t.value }; r >= 0 ? n.splice(r, 1, a) : n.push(a); }, unmounted(e) { du.delete(e); } }, ZGe = Ln({ header: { type: String, default: "" }, footer: { type: String, default: "" }, bodyStyle: { type: Ft([String, Object, Array]), default: "" }, bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], default: "always" } }), QGe = G({ name: "ElCard" }), JGe = /* @__PURE__ */ G({ ...QGe, props: ZGe, setup(e) { const t = Kt("card"); return (n, r) => ($(), B("div", { class: H([b(t).b(), b(t).is(`${n.shadow}-shadow`)]) }, [ n.$slots.header || n.header ? ($(), B("div", { key: 0, class: H(b(t).e("header")) }, [ he(n.$slots, "header", {}, () => [ ze(_e(n.header), 1) ]) ], 2)) : te("v-if", !0), K("div", { class: H([b(t).e("body"), n.bodyClass]), style: Qe(n.bodyStyle) }, [ he(n.$slots, "default") ], 6), n.$slots.footer || n.footer ? ($(), B("div", { key: 1, class: H(b(t).e("footer")) }, [ he(n.$slots, "footer", {}, () => [ ze(_e(n.footer), 1) ]) ], 2)) : te("v-if", !0) ], 2)); } }); var eXe = /* @__PURE__ */ Ut(JGe, [["__file", "card.vue"]]); Yr(eXe); const TU = { 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: Dh, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...gc(["ariaControls"]) }, $U = { [ea]: (e) => Ia(e) || ia(e) || Zf(e), change: (e) => Ia(e) || ia(e) || Zf(e) }, Bh = Symbol("checkboxGroupContextKey"), tXe = ({ model: e, isChecked: t }) => { const n = $e(Bh, void 0), r = O(() => { var a, o; const i = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, s = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value; return !Fu(i) && e.value.length >= i && !t.value || !Fu(s) && e.value.length <= s && t.value; }); return { isDisabled: km(O(() => (n == null ? void 0 : n.disabled.value) || r.value)), isLimitDisabled: r }; }, nXe = (e, { model: t, isLimitExceeded: n, hasOwnLabel: r, isDisabled: a, isLabeledByFormItem: o }) => { const i = $e(Bh, void 0), { formItem: s } = fp(), { emit: l } = tt(); function u(p) { var v, m, g, y; return [!0, e.trueValue, e.trueLabel].includes(p) ? (m = (v = e.trueValue) != null ? v : e.trueLabel) != null ? m : !0 : (y = (g = e.falseValue) != null ? g : e.falseLabel) != null ? y : !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 && !a.value && o.value && (p.composedPath().some((v) => v.tagName === "LABEL") || (t.value = u([!1, e.falseValue, e.falseLabel].includes(t.value)), await We(), c(t.value, p))); } const h = O(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent); return be(() => e.modelValue, () => { h.value && (s == null || s.validate("change").catch((p) => Cr(p))); }), { handleChange: d, onClickRoot: f }; }, rXe = (e) => { const t = U(!1), { emit: n } = tt(), r = $e(Bh, void 0), a = O(() => Fu(r) === !1), o = U(!1), i = O({ get() { var s, l; return a.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; a.value && oo(s) ? (o.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, o.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(ea, s), t.value = s); } }); return { model: i, isGroup: a, isLimitExceeded: o }; }, aXe = (e, t, { model: n }) => { const r = $e(Bh, void 0), a = U(!1), o = O(() => Xb(e.value) ? e.label : e.value), i = O(() => { const c = n.value; return Zf(c) ? c : oo(c) ? oa(o.value) ? c.map(xo).some((d) => Gb(d, o.value)) : c.map(xo).includes(o.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c; }), s = Nd(O(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; }), { prop: !0 }), l = Nd(O(() => { var c; return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value; })), u = O(() => !!t.default || !Xb(o.value)); return { checkboxButtonSize: s, isChecked: i, isFocused: a, checkboxSize: l, hasOwnLabel: u, actualValue: o }; }, OU = (e, t) => { const { formItem: n } = fp(), { model: r, isGroup: a, isLimitExceeded: o } = rXe(e), { isFocused: i, isChecked: s, checkboxButtonSize: l, checkboxSize: u, hasOwnLabel: c, actualValue: d } = aXe(e, t, { model: r }), { isDisabled: f } = tXe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Cm(e, { formItemContext: n, disableIdGeneration: c, disableIdManagement: a }), { handleChange: v, onClickRoot: m } = nXe(e, { model: r, isLimitExceeded: o, hasOwnLabel: c, isDisabled: f, isLabeledByFormItem: p }); return (() => { function g() { var y, x; oo(r.value) && !r.value.includes(d.value) ? r.value.push(d.value) : r.value = (x = (y = e.trueValue) != null ? y : e.trueLabel) != null ? x : !0; } e.checked && g(); })(), Py({ 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(() => a.value && Xb(e.value))), Py({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, O(() => !!e.trueLabel)), Py({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, O(() => !!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 }; }, oXe = G({ name: "ElCheckbox" }), iXe = /* @__PURE__ */ G({ ...oXe, props: TU, emits: $U, setup(e) { const t = e, n = _r(), { inputId: r, isLabeledByFormItem: a, isChecked: o, isDisabled: i, isFocused: s, checkboxSize: l, hasOwnLabel: u, model: c, actualValue: d, handleChange: f, onClickRoot: h } = OU(t, n), p = Kt("checkbox"), v = O(() => [ p.b(), p.m(l.value), p.is("disabled", i.value), p.is("bordered", t.border), p.is("checked", o.value) ]), m = O(() => [ p.e("input"), p.is("disabled", i.value), p.is("checked", o.value), p.is("indeterminate", t.indeterminate), p.is("focus", s.value) ]); return (g, y) => ($(), ae(dt(!b(u) && b(a) ? "span" : "label"), { class: H(b(v)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: b(h) }, { default: q(() => { var x, w, k, C; return [ K("span", { class: H(b(m)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? qe(($(), B("input", { key: 0, id: b(r), "onUpdate:modelValue": (S) => Kn(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: b(i), "true-value": (w = (x = g.trueValue) != null ? x : g.trueLabel) != null ? w : !0, "false-value": (C = (k = g.falseValue) != null ? k : g.falseLabel) != null ? C : !1, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]) : qe(($(), B("input", { key: 1, id: b(r), "onUpdate:modelValue": (S) => Kn(c) ? c.value = S : null, class: H(b(p).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: b(i), value: b(d), name: g.name, tabindex: g.tabindex, onChange: b(f), onFocus: (S) => s.value = !0, onBlur: (S) => s.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(c)] ]), K("span", { class: H(b(p).e("inner")) }, null, 2) ], 2), b(u) ? ($(), B("span", { key: 0, class: H(b(p).e("label")) }, [ he(g.$slots, "default"), g.$slots.default ? te("v-if", !0) : ($(), B(Ue, { key: 0 }, [ ze(_e(g.label), 1) ], 64)) ], 2)) : te("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var sXe = /* @__PURE__ */ Ut(iXe, [["__file", "checkbox.vue"]]); const lXe = G({ name: "ElCheckboxButton" }), uXe = /* @__PURE__ */ G({ ...lXe, props: TU, emits: $U, setup(e) { const t = e, n = _r(), { isFocused: r, isChecked: a, isDisabled: o, checkboxButtonSize: i, model: s, actualValue: l, handleChange: u } = OU(t, n), c = $e(Bh, void 0), d = Kt("checkbox"), f = O(() => { var p, v, m, g; const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : ""; return { backgroundColor: y, borderColor: y, color: (g = (m = c == null ? void 0 : c.textColor) == null ? void 0 : m.value) != null ? g : "", boxShadow: y ? `-1px 0 0 0 ${y}` : void 0 }; }), h = O(() => [ d.b("button"), d.bm("button", i.value), d.is("disabled", o.value), d.is("checked", a.value), d.is("focus", r.value) ]); return (p, v) => { var m, g, y, x; return $(), B("label", { class: H(b(h)) }, [ p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? qe(($(), B("input", { key: 0, "onUpdate:modelValue": (w) => Kn(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), "true-value": (g = (m = p.trueValue) != null ? m : p.trueLabel) != null ? g : !0, "false-value": (x = (y = p.falseValue) != null ? y : p.falseLabel) != null ? x : !1, onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]) : qe(($(), B("input", { key: 1, "onUpdate:modelValue": (w) => Kn(s) ? s.value = w : null, class: H(b(d).be("button", "original")), type: "checkbox", name: p.name, tabindex: p.tabindex, disabled: b(o), value: b(l), onChange: b(u), onFocus: (w) => r.value = !0, onBlur: (w) => r.value = !1, onClick: et(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ti, b(s)] ]), p.$slots.default || p.label ? ($(), B("span", { key: 2, class: H(b(d).be("button", "inner")), style: Qe(b(a) ? b(f) : void 0) }, [ he(p.$slots, "default", {}, () => [ ze(_e(p.label), 1) ]) ], 6)) : te("v-if", !0) ], 2); }; } }); var FU = /* @__PURE__ */ Ut(uXe, [["__file", "checkbox-button.vue"]]); const cXe = Ln({ modelValue: { type: Ft(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Dh, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...gc(["ariaLabel"]) }), dXe = { [ea]: (e) => oo(e), change: (e) => oo(e) }, pXe = G({ name: "ElCheckboxGroup" }), fXe = /* @__PURE__ */ G({ ...pXe, props: cXe, emits: dXe, setup(e, { emit: t }) { const n = e, r = Kt("checkbox"), { formItem: a } = fp(), { inputId: o, isLabeledByFormItem: i } = Cm(n, { formItemContext: a }), s = async (u) => { t(ea, u), await We(), t("change", u); }, l = O({ get() { return n.modelValue; }, set(u) { s(u); } }); return rt(Bh, { ...zH(gr(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: l, changeEvent: s }), be(() => n.modelValue, () => { n.validateEvent && (a == null || a.validate("change").catch((u) => Cr(u))); }), (u, c) => { var d; return $(), ae(dt(u.tag), { id: b(o), class: H(b(r).b("group")), role: "group", "aria-label": b(i) ? void 0 : u.ariaLabel || "checkbox-group", "aria-labelledby": b(i) ? (d = b(a)) == null ? void 0 : d.labelId : void 0 }, { default: q(() => [ he(u.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var AU = /* @__PURE__ */ Ut(fXe, [["__file", "checkbox-group.vue"]]); const hXe = Yr(sXe, { CheckboxButton: FU, CheckboxGroup: AU }); Vl(FU); Vl(AU); const h3 = Ln({ type: { type: String, values: ["primary", "success", "info", "warning", "danger"], default: "primary" }, closable: Boolean, disableTransitions: Boolean, hit: Boolean, color: String, size: { type: String, values: qH }, effect: { type: String, values: ["dark", "light", "plain"], default: "light" }, round: Boolean }), vXe = { close: (e) => e instanceof MouseEvent, click: (e) => e instanceof MouseEvent }, gXe = G({ name: "ElTag" }), mXe = /* @__PURE__ */ G({ ...gXe, props: h3, emits: vXe, setup(e, { emit: t }) { const n = e, r = Nd(), a = Kt("tag"), o = O(() => { const { type: u, hit: c, effect: d, closable: f, round: h } = n; return [ a.b(), a.is("closable", f), a.m(u || "primary"), a.m(r.value), a.m(d), a.is("hit", c), a.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 ? ($(), B("span", { key: 0, class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b($a), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(Yb)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6)) : ($(), ae(lr, { key: 1, name: `${b(a).namespace.value}-zoom-in-center`, appear: "", onVnodeMounted: l }, { default: q(() => [ K("span", { class: H(b(o)), style: Qe({ backgroundColor: u.color }), onClick: s }, [ K("span", { class: H(b(a).e("content")) }, [ he(u.$slots, "default") ], 2), u.closable ? ($(), ae(b($a), { key: 0, class: H(b(a).e("close")), onClick: et(i, ["stop"]) }, { default: q(() => [ Z(b(Yb)) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0) ], 6) ]), _: 3 }, 8, ["name"])); } }); var yXe = /* @__PURE__ */ Ut(mXe, [["__file", "tag.vue"]]); const bXe = Yr(yXe), IU = Symbol("rowContextKey"), wXe = [ "start", "center", "end", "space-around", "space-between", "space-evenly" ], xXe = ["top", "middle", "bottom"], kXe = Ln({ tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, values: wXe, default: "start" }, align: { type: String, values: xXe } }), CXe = G({ name: "ElRow" }), SXe = /* @__PURE__ */ G({ ...CXe, props: kXe, setup(e) { const t = e, n = Kt("row"), r = O(() => t.gutter); rt(IU, { gutter: r }); const a = O(() => { const i = {}; return t.gutter && (i.marginRight = i.marginLeft = `-${t.gutter / 2}px`), i; }), o = O(() => [ n.b(), n.is(`justify-${t.justify}`, t.justify !== "start"), n.is(`align-${t.align}`, !!t.align) ]); return (i, s) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var EXe = /* @__PURE__ */ Ut(SXe, [["__file", "row.vue"]]); const PU = Yr(EXe), _Xe = Ln({ 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: Ft([Number, Object]), default: () => Xp({}) }, sm: { type: Ft([Number, Object]), default: () => Xp({}) }, md: { type: Ft([Number, Object]), default: () => Xp({}) }, lg: { type: Ft([Number, Object]), default: () => Xp({}) }, xl: { type: Ft([Number, Object]), default: () => Xp({}) } }), TXe = G({ name: "ElCol" }), $Xe = /* @__PURE__ */ G({ ...TXe, props: _Xe, setup(e) { const t = e, { gutter: n } = $e(IU, { gutter: O(() => 0) }), r = Kt("col"), a = O(() => { const i = {}; return n.value && (i.paddingLeft = i.paddingRight = `${n.value / 2}px`), i; }), o = O(() => { const i = []; return ["span", "offset", "pull", "push"].forEach((s) => { const l = t[s]; ia(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) => { ia(t[s]) ? i.push(r.b(`${s}-${t[s]}`)) : oa(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) => ($(), ae(dt(i.tag), { class: H(b(o)), style: Qe(b(a)) }, { default: q(() => [ he(i.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var OXe = /* @__PURE__ */ Ut($Xe, [["__file", "col.vue"]]); const m_ = Yr(OXe), FXe = G({ name: "ElCollapseTransition" }), AXe = /* @__PURE__ */ G({ ...FXe, setup(e) { const t = Kt("collapse-transition"), n = (a) => { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom; }, r = { beforeEnter(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.style.height && (a.dataset.elExistsHeight = a.style.height), a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0; }, enter(a) { requestAnimationFrame(() => { a.dataset.oldOverflow = a.style.overflow, a.dataset.elExistsHeight ? a.style.maxHeight = a.dataset.elExistsHeight : a.scrollHeight !== 0 ? a.style.maxHeight = `${a.scrollHeight}px` : a.style.maxHeight = 0, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom, a.style.overflow = "hidden"; }); }, afterEnter(a) { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow; }, enterCancelled(a) { n(a); }, beforeLeave(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.dataset.oldOverflow = a.style.overflow, a.style.maxHeight = `${a.scrollHeight}px`, a.style.overflow = "hidden"; }, leave(a) { a.scrollHeight !== 0 && (a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0); }, afterLeave(a) { n(a); }, leaveCancelled(a) { n(a); } }; return (a, o) => ($(), ae(lr, Dt({ name: b(t).b() }, JP(r)), { default: q(() => [ he(a.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var IXe = /* @__PURE__ */ Ut(AXe, [["__file", "collapse-transition.vue"]]); const PXe = Yr(IXe), LXe = Ln({ color: { type: Ft(Object), required: !0 }, vertical: { type: Boolean, default: !1 } }); let oC = !1; function ug(e, t) { if (!kr) return; const n = function(o) { var i; (i = t.drag) == null || i.call(t, o); }, r = function(o) { var i; document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, oC = !1, (i = t.end) == null || i.call(t, o); }, a = function(o) { var i; oC || (o.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), oC = !0, (i = t.start) == null || i.call(t, o)); }; e.addEventListener("mousedown", a), e.addEventListener("touchstart", a, { passive: !1 }); } const NXe = (e) => { const t = tt(), { t: n } = bm(), r = un(), a = un(), o = O(() => e.color.get("alpha")), i = O(() => 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 (!a.value || !r.value) return; const f = t.vnode.el.getBoundingClientRect(), { clientX: h, clientY: p } = jE(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 Pr.left: case Pr.down: d.preventDefault(), d.stopPropagation(), c(-p); break; case Pr.right: case Pr.up: d.preventDefault(), d.stopPropagation(), c(p); break; } } function c(d) { let f = o.value + d; f = f < 0 ? 0 : f > 100 ? 100 : f, e.color.set("alpha", f); } return { thumb: r, bar: a, alpha: o, alphaLabel: i, handleDrag: l, handleClick: s, handleKeydown: u }; }, MXe = (e, { bar: t, thumb: n, handleDrag: r }) => { const a = tt(), o = Kt("color-alpha-slider"), i = U(0), s = U(0), l = U(); function u() { if (!n.value || e.vertical) return 0; const y = a.vnode.el, x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0; } function c() { if (!n.value) return 0; const y = a.vnode.el; if (!e.vertical) return 0; const x = e.color.get("alpha"); return y ? Math.round(x * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0; } function d() { if (e.color && e.color.value) { const { r: y, g: x, b: w } = e.color.toRgb(); return `linear-gradient(to right, rgba(${y}, ${x}, ${w}, 0) 0%, rgba(${y}, ${x}, ${w}, 1) 100%)`; } return ""; } function f() { i.value = u(), s.value = c(), l.value = d(); } nt(() => { if (!t.value || !n.value) return; const y = { drag: (x) => { r(x); }, end: (x) => { r(x); } }; ug(t.value, y), ug(n.value, y), f(); }), be(() => e.color.get("alpha"), () => f()), be(() => e.color.value, () => f()); const h = O(() => [o.b(), o.is("vertical", e.vertical)]), p = O(() => o.e("bar")), v = O(() => o.e("thumb")), m = O(() => ({ background: l.value })), g = O(() => ({ left: Qf(i.value), top: Qf(s.value) })); return { rootKls: h, barKls: p, barStyle: m, thumbKls: v, thumbStyle: g, update: f }; }, DXe = "ElColorAlphaSlider", BXe = G({ name: DXe }), RXe = /* @__PURE__ */ G({ ...BXe, props: LXe, setup(e, { expose: t }) { const n = e, { alpha: r, alphaLabel: a, bar: o, thumb: i, handleDrag: s, handleClick: l, handleKeydown: u } = NXe(n), { rootKls: c, barKls: d, barStyle: f, thumbKls: h, thumbStyle: p, update: v } = MXe(n, { bar: o, thumb: i, handleDrag: s }); return t({ update: v, bar: o, thumb: i }), (m, g) => ($(), B("div", { class: H(b(c)) }, [ K("div", { ref_key: "bar", ref: o, class: H(b(d)), style: Qe(b(f)), onClick: b(l) }, null, 14, ["onClick"]), K("div", { ref_key: "thumb", ref: i, class: H(b(h)), style: Qe(b(p)), "aria-label": b(a), "aria-valuenow": b(r), "aria-orientation": m.vertical ? "vertical" : "horizontal", "aria-valuemin": "0", "aria-valuemax": "100", role: "slider", tabindex: "0", onKeydown: b(u) }, null, 46, ["aria-label", "aria-valuenow", "aria-orientation", "onKeydown"]) ], 2)); } }); var zXe = /* @__PURE__ */ Ut(RXe, [["__file", "alpha-slider.vue"]]); const VXe = G({ name: "ElColorHueSlider", props: { color: { type: Object, required: !0 }, vertical: Boolean }, setup(e) { const t = Kt("color-hue-slider"), n = tt(), r = U(), a = U(), o = U(0), i = U(0), s = O(() => e.color.get("hue")); be(() => s.value, () => { f(); }); function l(h) { h.target !== r.value && u(h); } function u(h) { if (!a.value || !r.value) return; const p = n.vnode.el.getBoundingClientRect(), { clientX: v, clientY: m } = jE(h); let g; if (e.vertical) { let y = m - p.top; y = Math.min(y, p.height - r.value.offsetHeight / 2), y = Math.max(r.value.offsetHeight / 2, y), g = Math.round((y - r.value.offsetHeight / 2) / (p.height - r.value.offsetHeight) * 360); } else { let y = v - p.left; y = Math.min(y, p.width - r.value.offsetWidth / 2), y = Math.max(r.value.offsetWidth / 2, y), g = Math.round((y - 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() { o.value = c(), i.value = d(); } return nt(() => { if (!a.value || !r.value) return; const h = { drag: (p) => { u(p); }, end: (p) => { u(p); } }; ug(a.value, h), ug(r.value, h), f(); }), { bar: a, thumb: r, thumbLeft: o, thumbTop: i, hueValue: s, handleClick: l, update: f, ns: t }; } }); function jXe(e, t, n, r, a, o) { return $(), B("div", { class: H([e.ns.b(), e.ns.is("vertical", e.vertical)]) }, [ K("div", { ref: "bar", class: H(e.ns.e("bar")), onClick: e.handleClick }, null, 10, ["onClick"]), K("div", { ref: "thumb", class: H(e.ns.e("thumb")), style: Qe({ left: e.thumbLeft + "px", top: e.thumbTop + "px" }) }, null, 6) ], 2); } var HXe = /* @__PURE__ */ Ut(VXe, [["render", jXe], ["__file", "hue-slider.vue"]]); const UXe = Ln({ modelValue: String, id: String, showAlpha: Boolean, colorFormat: String, disabled: Boolean, size: Dh, popperClass: { type: String, default: "" }, tabindex: { type: [String, Number], default: 0 }, teleported: to.teleported, predefine: { type: Ft(Array) }, validateEvent: { type: Boolean, default: !0 }, ...gc(["ariaLabel"]) }), qXe = { [ea]: (e) => Ia(e) || Mu(e), [JE]: (e) => Ia(e) || Mu(e), activeChange: (e) => Ia(e) || Mu(e), focus: (e) => e instanceof FocusEvent, blur: (e) => e instanceof FocusEvent }, LU = Symbol("colorPickerContextKey"), k9 = function(e, t, n) { return [ e, t * n / ((e = (2 - t) * n) < 1 ? e : 2 - e) || 0, e / 2 ]; }, WXe = function(e) { return typeof e == "string" && e.includes(".") && Number.parseFloat(e) === 1; }, KXe = function(e) { return typeof e == "string" && e.includes("%"); }, cf = function(e, t) { WXe(e) && (e = "100%"); const n = KXe(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); }, C9 = { 10: "A", 11: "B", 12: "C", 13: "D", 14: "E", 15: "F" }, My = (e) => { e = Math.min(Math.round(e), 255); const t = Math.floor(e / 16), n = e % 16; return `${C9[t] || t}${C9[n] || n}`; }, S9 = function({ r: e, g: t, b: n }) { return Number.isNaN(+e) || Number.isNaN(+t) || Number.isNaN(+n) ? "" : `#${My(e)}${My(t)}${My(n)}`; }, iC = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 }, Ic = function(e) { return e.length === 2 ? (iC[e[0].toUpperCase()] || +e[0]) * 16 + (iC[e[1].toUpperCase()] || +e[1]) : iC[e[1].toUpperCase()] || +e[1]; }, GXe = function(e, t, n) { t = t / 100, n = n / 100; let r = t; const a = Math.max(n, 0.01); n *= 2, t *= n <= 1 ? n : 2 - n, r *= a <= 1 ? a : 2 - a; const o = (n + t) / 2, i = n === 0 ? 2 * r / (a + r) : 2 * t / (n + t); return { h: e, s: i * 100, v: o * 100 }; }, E9 = (e, t, n) => { e = cf(e, 255), t = cf(t, 255), n = cf(n, 255); const r = Math.max(e, t, n), a = Math.min(e, t, n); let o; const i = r, s = r - a, l = r === 0 ? 0 : s / r; if (r === a) o = 0; else { switch (r) { case e: { o = (t - n) / s + (t < n ? 6 : 0); break; } case t: { o = (n - e) / s + 2; break; } case n: { o = (e - t) / s + 4; break; } } o /= 6; } return { h: o * 360, s: l * 100, v: i * 100 }; }, Cv = function(e, t, n) { e = cf(e, 360) * 6, t = cf(t, 100), n = cf(n, 100); const r = Math.floor(e), a = e - r, o = n * (1 - t), i = n * (1 - a * t), s = n * (1 - (1 - a) * t), l = r % 6, u = [n, i, o, o, s, n][l], c = [s, n, n, i, o, o][l], d = [o, o, s, n, n, i][l]; return { r: Math.round(u * 255), g: Math.round(c * 255), b: Math.round(d * 255) }; }; class c0 { 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) Pd(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) Pd(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 Cv(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, a, o) => { this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, a)), this._value = Math.max(0, Math.min(100, o)), this.doOnChange(); }; if (t.includes("hsl")) { const r = t.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = GXe(r[0], r[1], r[2]); n(a, o, i); } } else if (t.includes("hsv")) { const r = t.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 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((a) => a !== "").map((a, o) => o > 2 ? Number.parseFloat(a) : Number.parseInt(a, 10)); if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) { const { h: a, s: o, v: i } = E9(r[0], r[1], r[2]); n(a, o, 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 a, o, i; r.length === 3 ? (a = Ic(r[0] + r[0]), o = Ic(r[1] + r[1]), i = Ic(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (a = Ic(r.slice(0, 2)), o = Ic(r.slice(2, 4)), i = Ic(r.slice(4, 6))), r.length === 8 ? this._alpha = Ic(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100); const { h: s, s: l, v: u } = E9(a, o, 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: a, format: o } = this; if (this.enableAlpha) switch (o) { case "hsl": { const i = k9(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 = `${S9(Cv(t, n, r))}${My(a * 255 / 100)}`; break; } default: { const { r: i, g: s, b: l } = Cv(t, n, r); this.value = `rgba(${i}, ${s}, ${l}, ${this.get("alpha") / 100})`; } } else switch (o) { case "hsl": { const i = k9(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 } = Cv(t, n, r); this.value = `rgb(${i}, ${s}, ${l})`; break; } default: this.value = S9(Cv(t, n, r)); } } } const XXe = G({ props: { colors: { type: Array, required: !0 }, color: { type: Object, required: !0 }, enableAlpha: { type: Boolean, required: !0 } }, setup(e) { const t = Kt("color-predefine"), { currentColor: n } = $e(LU), r = U(o(e.colors, e.color)); be(() => n.value, (i) => { const s = new c0(); s.fromString(i), r.value.forEach((l) => { l.selected = s.compare(l); }); }), Wd(() => { r.value = o(e.colors, e.color); }); function a(i) { e.color.fromString(e.colors[i]); } function o(i, s) { return i.map((l) => { const u = new c0(); return u.enableAlpha = e.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u; }); } return { rgbaColors: r, handleSelect: a, ns: t }; } }); function YXe(e, t, n, r, a, o) { return $(), B("div", { class: H(e.ns.b()) }, [ K("div", { class: H(e.ns.e("colors")) }, [ ($(!0), B(Ue, null, yt(e.rgbaColors, (i, s) => ($(), B("div", { key: e.colors[s], class: H([ e.ns.e("color-selector"), e.ns.is("alpha", i._alpha < 100), { selected: i.selected } ]), onClick: (l) => e.handleSelect(s) }, [ K("div", { style: Qe({ backgroundColor: i.value }) }, null, 4) ], 10, ["onClick"]))), 128)) ], 2) ], 2); } var ZXe = /* @__PURE__ */ Ut(XXe, [["render", YXe], ["__file", "predefine.vue"]]); const QXe = G({ name: "ElSlPanel", props: { color: { type: Object, required: !0 } }, setup(e) { const t = Kt("color-svpanel"), n = tt(), r = U(0), a = U(0), o = U("hsl(0, 100%, 50%)"), i = O(() => { 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; a.value = u * f / 100, r.value = (100 - c) * h / 100, o.value = `hsl(${e.color.get("hue")}, 100%, 50%)`; } function l(u) { const c = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: f } = jE(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), a.value = h, r.value = p, e.color.set({ saturation: h / c.width * 100, value: 100 - p / c.height * 100 }); } return be(() => i.value, () => { s(); }), nt(() => { ug(n.vnode.el, { drag: (u) => { l(u); }, end: (u) => { l(u); } }), s(); }), { cursorTop: r, cursorLeft: a, background: o, colorValue: i, handleDrag: l, update: s, ns: t }; } }); function JXe(e, t, n, r, a, o) { return $(), B("div", { class: H(e.ns.b()), style: Qe({ backgroundColor: e.background }) }, [ K("div", { class: H(e.ns.e("white")) }, null, 2), K("div", { class: H(e.ns.e("black")) }, null, 2), K("div", { class: H(e.ns.e("cursor")), style: Qe({ top: e.cursorTop + "px", left: e.cursorLeft + "px" }) }, [ K("div") ], 6) ], 6); } var eYe = /* @__PURE__ */ Ut(QXe, [["render", JXe], ["__file", "sv-panel.vue"]]); const tYe = G({ name: "ElColorPicker" }), nYe = /* @__PURE__ */ G({ ...tYe, props: UXe, emits: qXe, setup(e, { expose: t, emit: n }) { const r = e, { t: a } = bm(), o = Kt("color"), { formItem: i } = fp(), s = Nd(), l = km(), { inputId: u, isLabeledByFormItem: c } = Cm(r, { formItemContext: i }), d = U(), f = U(), h = U(), p = U(), v = U(), m = U(), { isFocused: g, handleFocus: y, handleBlur: x } = u_(v, { beforeFocus() { return l.value; }, beforeBlur(Y) { var re; return (re = p.value) == null ? void 0 : re.isFocusInsideContent(Y); }, afterBlur() { z(!1), V(); } }); let w = !0; const k = en(new c0({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue })), C = U(!1), S = U(!1), _ = U(""), T = O(() => !r.modelValue && !S.value ? "transparent" : L(k, r.showAlpha)), F = O(() => !r.modelValue && !S.value ? "" : k.value), A = O(() => c.value ? void 0 : r.ariaLabel || a("el.colorpicker.defaultLabel")), I = O(() => c.value ? i == null ? void 0 : i.labelId : void 0), N = O(() => [ o.b("picker"), o.is("disabled", l.value), o.bm("picker", s.value), o.is("focused", g.value) ]); function L(Y, re) { if (!(Y instanceof c0)) throw new TypeError("color should be instance of _color Class"); const { r: we, g: Oe, b: Ne } = Y.toRgb(); return re ? `rgba(${we}, ${Oe}, ${Ne}, ${Y.get("alpha") / 100})` : `rgb(${we}, ${Oe}, ${Ne})`; } function z(Y) { C.value = Y; } const P = RH(z, 100, { leading: !0 }); function D() { l.value || z(!0); } function M() { P(!1), V(); } function V() { We(() => { r.modelValue ? k.fromString(r.modelValue) : (k.value = "", We(() => { S.value = !1; })); }); } function Q() { l.value || P(!C.value); } function X() { k.fromString(_.value); } function ee() { const Y = k.value; n(ea, Y), n("change", Y), r.validateEvent && (i == null || i.validate("change").catch((re) => Cr(re))), P(!1), We(() => { const re = new c0({ enableAlpha: r.showAlpha, format: r.colorFormat || "", value: r.modelValue }); k.compare(re) || V(); }); } function ue() { P(!1), n(ea, null), n("change", null), r.modelValue !== null && r.validateEvent && (i == null || i.validate("change").catch((Y) => Cr(Y))), V(); } function ve() { C.value && (M(), g.value && ne()); } function ge(Y) { Y.preventDefault(), Y.stopPropagation(), z(!1), V(); } function se(Y) { switch (Y.code) { case Pr.enter: case Pr.space: Y.preventDefault(), Y.stopPropagation(), D(), m.value.focus(); break; case Pr.esc: ge(Y); break; } } function ne() { v.value.focus(); } function W() { v.value.blur(); } return nt(() => { r.modelValue && (_.value = F.value); }), be(() => r.modelValue, (Y) => { Y ? Y && Y !== k.value && (w = !1, k.fromString(Y)) : S.value = !1; }), be(() => [r.colorFormat, r.showAlpha], () => { k.enableAlpha = r.showAlpha, k.format = r.colorFormat || k.format, k.doOnChange(), n(ea, k.value); }), be(() => F.value, (Y) => { _.value = Y, w && n("activeChange", Y), w = !0; }), be(() => k.value, () => { !r.modelValue && !S.value && (S.value = !0); }), be(() => C.value, () => { We(() => { var Y, re, we; (Y = d.value) == null || Y.update(), (re = f.value) == null || re.update(), (we = h.value) == null || we.update(); }); }), rt(LU, { currentColor: F }), t({ color: k, show: D, hide: M, focus: ne, blur: W }), (Y, re) => ($(), ae(b(Sm), { ref_key: "popper", ref: p, visible: C.value, "show-arrow": !1, "fallback-placements": ["bottom", "top", "right", "left"], offset: 0, "gpu-acceleration": !1, "popper-class": [b(o).be("picker", "panel"), b(o).b("dropdown"), Y.popperClass], "stop-popper-mouse-event": !1, effect: "light", trigger: "click", teleported: Y.teleported, transition: `${b(o).namespace.value}-zoom-in-top`, persistent: "", onHide: (we) => z(!1) }, { content: q(() => [ qe(($(), B("div", { onKeydown: gn(ge, ["esc"]) }, [ K("div", { class: H(b(o).be("dropdown", "main-wrapper")) }, [ Z(HXe, { ref_key: "hue", ref: d, class: "hue-slider", color: b(k), vertical: "" }, null, 8, ["color"]), Z(eYe, { ref_key: "sv", ref: f, color: b(k) }, null, 8, ["color"]) ], 2), Y.showAlpha ? ($(), ae(zXe, { key: 0, ref_key: "alpha", ref: h, color: b(k) }, null, 8, ["color"])) : te("v-if", !0), Y.predefine ? ($(), ae(ZXe, { key: 1, ref: "predefine", "enable-alpha": Y.showAlpha, color: b(k), colors: Y.predefine }, null, 8, ["enable-alpha", "color", "colors"])) : te("v-if", !0), K("div", { class: H(b(o).be("dropdown", "btns")) }, [ K("span", { class: H(b(o).be("dropdown", "value")) }, [ Z(b(lx), { ref_key: "inputRef", ref: m, modelValue: _.value, "onUpdate:modelValue": (we) => _.value = we, "validate-event": !1, size: "small", onKeyup: gn(X, ["enter"]), onBlur: X }, null, 8, ["modelValue", "onUpdate:modelValue", "onKeyup"]) ], 2), Z(b(Md), { class: H(b(o).be("dropdown", "link-btn")), text: "", size: "small", onClick: ue }, { default: q(() => [ ze(_e(b(a)("el.colorpicker.clear")), 1) ]), _: 1 }, 8, ["class"]), Z(b(Md), { plain: "", size: "small", class: H(b(o).be("dropdown", "btn")), onClick: ee }, { default: q(() => [ ze(_e(b(a)("el.colorpicker.confirm")), 1) ]), _: 1 }, 8, ["class"]) ], 2) ], 40, ["onKeydown"])), [ [b(_U), ve] ]) ]), default: q(() => [ K("div", Dt({ id: b(u), ref_key: "triggerRef", ref: v }, Y.$attrs, { class: b(N), role: "button", "aria-label": b(A), "aria-labelledby": b(I), "aria-description": b(a)("el.colorpicker.description", { color: Y.modelValue || "" }), "aria-disabled": b(l), tabindex: b(l) ? -1 : Y.tabindex, onKeydown: se, onFocus: b(y), onBlur: b(x) }), [ b(l) ? ($(), B("div", { key: 0, class: H(b(o).be("picker", "mask")) }, null, 2)) : te("v-if", !0), K("div", { class: H(b(o).be("picker", "trigger")), onClick: Q }, [ K("span", { class: H([b(o).be("picker", "color"), b(o).is("alpha", Y.showAlpha)]) }, [ K("span", { class: H(b(o).be("picker", "color-inner")), style: Qe({ backgroundColor: b(T) }) }, [ qe(Z(b($a), { class: H([b(o).be("picker", "icon"), b(o).is("icon-arrow-down")]) }, { default: q(() => [ Z(b(YE)) ]), _: 1 }, 8, ["class"]), [ [ct, Y.modelValue || S.value] ]), qe(Z(b($a), { class: H([b(o).be("picker", "empty"), b(o).is("icon-close")]) }, { default: q(() => [ Z(b(Yb)) ]), _: 1 }, 8, ["class"]), [ [ct, !Y.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 rYe = /* @__PURE__ */ Ut(nYe, [["__file", "color-picker.vue"]]); Yr(rYe); const aYe = G({ name: "ElContainer" }), oYe = /* @__PURE__ */ G({ ...aYe, props: { direction: { type: String } }, setup(e) { const t = e, n = _r(), r = Kt("container"), a = O(() => t.direction === "vertical" ? !0 : t.direction === "horizontal" ? !1 : n && n.default ? n.default().some((o) => { const i = o.type.name; return i === "ElHeader" || i === "ElFooter"; }) : !1); return (o, i) => ($(), B("section", { class: H([b(r).b(), b(r).is("vertical", b(a))]) }, [ he(o.$slots, "default") ], 2)); } }); var iYe = /* @__PURE__ */ Ut(oYe, [["__file", "container.vue"]]); const sYe = G({ name: "ElAside" }), lYe = /* @__PURE__ */ G({ ...sYe, props: { width: { type: String, default: null } }, setup(e) { const t = e, n = Kt("aside"), r = O(() => t.width ? n.cssVarBlock({ width: t.width }) : {}); return (a, o) => ($(), B("aside", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var NU = /* @__PURE__ */ Ut(lYe, [["__file", "aside.vue"]]); const uYe = G({ name: "ElFooter" }), cYe = /* @__PURE__ */ G({ ...uYe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Kt("footer"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("footer", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var MU = /* @__PURE__ */ Ut(cYe, [["__file", "footer.vue"]]); const dYe = G({ name: "ElHeader" }), pYe = /* @__PURE__ */ G({ ...dYe, props: { height: { type: String, default: null } }, setup(e) { const t = e, n = Kt("header"), r = O(() => t.height ? n.cssVarBlock({ height: t.height }) : {}); return (a, o) => ($(), B("header", { class: H(b(n).b()), style: Qe(b(r)) }, [ he(a.$slots, "default") ], 6)); } }); var DU = /* @__PURE__ */ Ut(pYe, [["__file", "header.vue"]]); const fYe = G({ name: "ElMain" }), hYe = /* @__PURE__ */ G({ ...fYe, setup(e) { const t = Kt("main"); return (n, r) => ($(), B("main", { class: H(b(t).b()) }, [ he(n.$slots, "default") ], 2)); } }); var BU = /* @__PURE__ */ Ut(hYe, [["__file", "main.vue"]]); const RU = Yr(iYe, { Aside: NU, Footer: MU, Header: DU, Main: BU }); Vl(NU); Vl(MU); const zU = Vl(DU), y_ = Vl(BU), vYe = /* @__PURE__ */ G({ inheritAttrs: !1 }); function gYe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var mYe = /* @__PURE__ */ Ut(vYe, [["render", gYe], ["__file", "collection.vue"]]); const yYe = /* @__PURE__ */ G({ name: "ElCollectionItem", inheritAttrs: !1 }); function bYe(e, t, n, r, a, o) { return he(e.$slots, "default"); } var wYe = /* @__PURE__ */ Ut(yYe, [["render", bYe], ["__file", "collection-item.vue"]]); const xYe = "data-el-collection-item", kYe = (e) => { const t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), a = Symbol(n), o = { ...mYe, name: t, setup() { const s = U(null), l = /* @__PURE__ */ new Map(); rt(r, { itemMap: l, getItems: () => { const u = b(s); if (!u) return []; const c = Array.from(u.querySelectorAll(`[${xYe}]`)); return [...l.values()].sort((d, f) => c.indexOf(d.ref) - c.indexOf(f.ref)); }, collectionRef: s }); } }, i = { ...wYe, name: n, setup(s, { attrs: l }) { const u = U(null), c = $e(r, void 0); rt(a, { collectionItemRef: u }), nt(() => { const d = b(u); d && c.itemMap.set(d, { ref: d, ...l }); }), Ct(() => { const d = b(u); c.itemMap.delete(d); }); } }; return { COLLECTION_INJECTION_KEY: r, COLLECTION_ITEM_INJECTION_KEY: a, ElCollection: o, ElCollectionItem: i }; }, sC = Ln({ trigger: lg.trigger, effect: { ...to.effect, default: "light" }, type: { type: Ft(String) }, placement: { type: Ft(String), default: "bottom" }, popperOptions: { type: Ft(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: Ft([Number, String]), default: 0 }, maxHeight: { type: Ft([Number, String]), default: "" }, popperClass: { type: String, default: "" }, disabled: Boolean, role: { type: String, default: "menu" }, buttonProps: { type: Ft(Object) }, teleported: to.teleported }); Ln({ command: { type: [Object, String, Number], default: () => ({}) }, disabled: Boolean, divided: Boolean, textValue: String, icon: { type: ec } }); Ln({ onKeydown: { type: Ft(Function) } }); kYe("Dropdown"); const VU = Symbol("ElSelectGroup"), Em = Symbol("ElSelect"); function CYe(e, t) { const n = $e(Em), r = $e(VU, { disabled: !1 }), a = O(() => c(ku(n.props.modelValue), e.value)), o = O(() => { var h; if (n.props.multiple) { const p = ku((h = n.props.modelValue) != null ? h : []); return !a.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0; } else return !1; }), i = O(() => e.label || (oa(e.value) ? "" : e.value)), s = O(() => e.value || e.label || ""), l = O(() => e.disabled || t.groupDisabled || o.value), u = tt(), c = (h = [], p) => { if (oa(e.value)) { const v = n.props.valueKey; return h && h.some((m) => xo(cl(m, v)) === cl(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(IUe(h), "i"); t.visible = p.test(i.value) || e.created; }; return be(() => i.value, () => { !e.created && !n.props.remote && n.setSelected(); }), be(() => 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 && oa(h) && oa(p) && h[m] === p[m]) return; n.setSelected(); } }), be(() => r.disabled, () => { t.groupDisabled = r.disabled; }, { immediate: !0 }), { select: n, currentLabel: i, currentValue: s, itemSelected: a, isDisabled: l, hoverItem: d, updateOption: f }; } const SYe = G({ name: "ElOption", componentName: "ElOption", props: { value: { required: !0, type: [String, Number, Boolean, Object] }, label: [String, Number], created: Boolean, disabled: Boolean }, setup(e) { const t = Kt("select"), n = sx(), r = O(() => [ t.be("dropdown", "item"), t.is("disabled", b(s)), t.is("selected", b(i)), t.is("hovering", b(f)) ]), a = en({ index: -1, groupDisabled: !1, visible: !0, hover: !1 }), { currentLabel: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c } = CYe(e, a), { visible: d, hover: f } = gr(a), h = tt().proxy; l.onOptionCreate(h), Ct(() => { const v = h.value, { selected: m } = l.states, g = (l.props.multiple ? m : [m]).some((y) => y.value === h.value); We(() => { 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: o, itemSelected: i, isDisabled: s, select: l, hoverItem: u, updateOption: c, visible: d, hover: f, selectOptionClick: p, states: a }; } }); function EYe(e, t, n, r, a, o) { return qe(($(), B("li", { id: e.id, class: H(e.containerKls), role: "option", "aria-disabled": e.isDisabled || void 0, "aria-selected": e.itemSelected, onMouseenter: e.hoverItem, onClick: et(e.selectOptionClick, ["stop"]) }, [ he(e.$slots, "default", {}, () => [ K("span", null, _e(e.currentLabel), 1) ]) ], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [ [ct, e.visible] ]); } var b_ = /* @__PURE__ */ Ut(SYe, [["render", EYe], ["__file", "option.vue"]]); const _Ye = G({ name: "ElSelectDropdown", componentName: "ElSelectDropdown", setup() { const e = $e(Em), t = Kt("select"), n = O(() => e.props.popperClass), r = O(() => e.props.multiple), a = O(() => e.props.fitInputWidth), o = U(""); function i() { var s; o.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`; } return nt(() => { i(), il(e.selectRef, i); }), { ns: t, minWidth: o, popperClass: n, isMultiple: r, isFitInputWidth: a }; } }); function TYe(e, t, n, r, a, o) { return $(), B("div", { class: H([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]), style: Qe({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth }) }, [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.ns.be("dropdown", "header")) }, [ he(e.$slots, "header") ], 2)) : te("v-if", !0), he(e.$slots, "default"), e.$slots.footer ? ($(), B("div", { key: 1, class: H(e.ns.be("dropdown", "footer")) }, [ he(e.$slots, "footer") ], 2)) : te("v-if", !0) ], 6); } var $Ye = /* @__PURE__ */ Ut(_Ye, [["render", TYe], ["__file", "select-dropdown.vue"]]); const OYe = 11, FYe = (e, t) => { const { t: n } = bm(), r = sx(), a = Kt("select"), o = Kt("input"), i = en({ 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 = U(null), l = U(null), u = U(null), c = U(null), d = U(null), f = U(null), h = U(null), p = U(null), v = U(null), m = U(null), g = U(null), y = U(null), { isComposing: x, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C } = fU({ afterComposition: (R) => ce(R) }), { wrapperRef: S, isFocused: _ } = u_(d, { beforeFocus() { return P.value; }, afterFocus() { e.automaticDropdown && !T.value && (T.value = !0, i.menuVisibleOnFocus = !0); }, beforeBlur(R) { var ie, Ie; return ((ie = u.value) == null ? void 0 : ie.isFocusInsideContent(R)) || ((Ie = c.value) == null ? void 0 : Ie.isFocusInsideContent(R)); }, afterBlur() { T.value = !1, i.menuVisibleOnFocus = !1; } }), T = U(!1), F = U(), { form: A, formItem: I } = fp(), { inputId: N } = Cm(e, { formItemContext: I }), { valueOnClear: L, isEmptyValue: z } = WWe(e), P = O(() => e.disabled || (A == null ? void 0 : A.disabled)), D = O(() => oo(e.modelValue) ? e.modelValue.length > 0 : !z(e.modelValue)), M = O(() => e.clearable && !P.value && i.inputHovering && D.value), V = O(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Q = O(() => a.is("reverse", V.value && T.value)), X = O(() => (I == null ? void 0 : I.validateState) || ""), ee = O(() => UH[X.value]), ue = O(() => e.remote ? 300 : 0), ve = O(() => 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 && ge.value === 0 ? e.noMatchText || n("el.select.noMatch") : i.options.size === 0 ? e.noDataText || n("el.select.noData") : null), ge = O(() => se.value.filter((R) => R.visible).length), se = O(() => { const R = Array.from(i.options.values()), ie = []; return i.optionValues.forEach((Ie) => { const Ke = R.findIndex((Jt) => Jt.value === Ie); Ke > -1 && ie.push(R[Ke]); }), ie.length >= R.length ? ie : R; }), ne = O(() => Array.from(i.cachedOptions.values())), W = O(() => { const R = se.value.filter((ie) => !ie.created).some((ie) => ie.currentLabel === i.inputValue); return e.filterable && e.allowCreate && i.inputValue !== "" && !R; }), Y = () => { e.filterable && Ga(e.filterMethod) || e.filterable && e.remote && Ga(e.remoteMethod) || se.value.forEach((R) => { var ie; (ie = R.updateOption) == null || ie.call(R, i.inputValue); }); }, re = Nd(), we = O(() => ["small"].includes(re.value) ? "small" : "default"), Oe = O({ get() { return T.value && ve.value !== !1; }, set(R) { T.value = R; } }), Ne = O(() => { if (e.multiple && !Fu(e.modelValue)) return ku(e.modelValue).length === 0 && !i.inputValue; const R = oo(e.modelValue) ? e.modelValue[0] : e.modelValue; return e.filterable || Fu(R) ? !i.inputValue : !0; }), xe = O(() => { var R; const ie = (R = e.placeholder) != null ? R : n("el.select.placeholder"); return e.multiple || !D.value ? ie : i.selectedLabel; }), Fe = O(() => n3 ? null : "mouseenter"); be(() => e.modelValue, (R, ie) => { e.multiple && e.filterable && !e.reserveKeyword && (i.inputValue = "", Se("")), Me(), !Gb(R, ie) && e.validateEvent && (I == null || I.validate("change").catch((Ie) => Cr(Ie))); }, { flush: "post", deep: !0 }), be(() => T.value, (R) => { R ? Se(i.inputValue) : (i.inputValue = "", i.previousQuery = null, i.isBeforeHide = !0), t("visible-change", R); }), be(() => i.options.entries(), () => { var R; if (!kr) return; const ie = ((R = s.value) == null ? void 0 : R.querySelectorAll("input")) || []; (!e.filterable && !e.defaultFirstOption && !Fu(e.modelValue) || !Array.from(ie).includes(document.activeElement)) && Me(), e.defaultFirstOption && (e.filterable || e.remote) && ge.value && Pe(); }, { flush: "post" }), be(() => i.hoveringIndex, (R) => { ia(R) && R > -1 ? F.value = se.value[R] || {} : F.value = {}, se.value.forEach((ie) => { ie.hover = F.value === ie; }); }), Wd(() => { i.isBeforeHide || Y(); }); const Se = (R) => { i.previousQuery === R || x.value || (i.previousQuery = R, e.filterable && Ga(e.filterMethod) ? e.filterMethod(R) : e.filterable && e.remote && Ga(e.remoteMethod) && e.remoteMethod(R), e.defaultFirstOption && (e.filterable || e.remote) && ge.value ? We(Pe) : We(De)); }, Pe = () => { const R = se.value.filter((Ke) => Ke.visible && !Ke.disabled && !Ke.states.groupDisabled), ie = R.find((Ke) => Ke.created), Ie = R[0]; i.hoveringIndex = Te(se.value, ie || Ie); }, Me = () => { if (e.multiple) i.selectedLabel = ""; else { const ie = oo(e.modelValue) ? e.modelValue[0] : e.modelValue, Ie = He(ie); i.selectedLabel = Ie.currentLabel, i.selected = [Ie]; return; } const R = []; Fu(e.modelValue) || ku(e.modelValue).forEach((ie) => { R.push(He(ie)); }), i.selected = R; }, He = (R) => { let ie; const Ie = Gk(R).toLowerCase() === "object", Ke = Gk(R).toLowerCase() === "null", Jt = Gk(R).toLowerCase() === "undefined"; for (let cn = i.cachedOptions.size - 1; cn >= 0; cn--) { const tn = ne.value[cn]; if (Ie ? cl(tn.value, e.valueKey) === cl(R, e.valueKey) : tn.value === R) { ie = { value: R, currentLabel: tn.currentLabel, get isDisabled() { return tn.isDisabled; } }; break; } } if (ie) return ie; const fn = Ie ? R.label : !Ke && !Jt ? R : ""; return { value: R, currentLabel: fn }; }, De = () => { i.hoveringIndex = se.value.findIndex((R) => i.selected.some((ie) => Qt(ie) === Qt(R))); }, Xe = () => { i.selectionWidth = l.value.getBoundingClientRect().width; }, Ge = () => { i.calculatorWidth = f.value.getBoundingClientRect().width; }, Ze = () => { i.collapseItemWidth = g.value.getBoundingClientRect().width; }, E = () => { var R, ie; (ie = (R = u.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, j = () => { var R, ie; (ie = (R = c.value) == null ? void 0 : R.updatePopper) == null || ie.call(R); }, le = () => { i.inputValue.length > 0 && !T.value && (T.value = !0), Se(i.inputValue); }, ce = (R) => { if (i.inputValue = R.target.value, e.remote) oe(); else return le(); }, oe = RH(() => { le(); }, ue.value), ke = (R) => { Gb(e.modelValue, R) || t(JE, R); }, fe = (R) => _Ue(R, (ie) => !i.disabledOptions.has(ie)), Ee = (R) => { if (e.multiple && R.code !== Pr.delete && R.target.value.length <= 0) { const ie = ku(e.modelValue).slice(), Ie = fe(ie); if (Ie < 0) return; const Ke = ie[Ie]; ie.splice(Ie, 1), t(ea, ie), ke(ie), t("remove-tag", Ke); } }, Ve = (R, ie) => { const Ie = i.selected.indexOf(ie); if (Ie > -1 && !P.value) { const Ke = ku(e.modelValue).slice(); Ke.splice(Ie, 1), t(ea, Ke), ke(Ke), t("remove-tag", ie.value); } R.stopPropagation(), wt(); }, je = (R) => { R.stopPropagation(); const ie = e.multiple ? [] : L.value; if (e.multiple) for (const Ie of i.selected) Ie.isDisabled && ie.push(Ie.value); t(ea, ie), ke(ie), i.hoveringIndex = -1, T.value = !1, t("clear"), wt(); }, me = (R) => { var ie; if (e.multiple) { const Ie = ku((ie = e.modelValue) != null ? ie : []).slice(), Ke = Te(Ie, R.value); Ke > -1 ? Ie.splice(Ke, 1) : (e.multipleLimit <= 0 || Ie.length < e.multipleLimit) && Ie.push(R.value), t(ea, Ie), ke(Ie), R.created && Se(""), e.filterable && !e.reserveKeyword && (i.inputValue = ""); } else t(ea, R.value), ke(R.value), T.value = !1; wt(), !T.value && We(() => { Ce(R); }); }, Te = (R = [], ie) => { if (!oa(ie)) return R.indexOf(ie); const Ie = e.valueKey; let Ke = -1; return R.some((Jt, fn) => xo(cl(Jt, Ie)) === cl(ie, Ie) ? (Ke = fn, !0) : !1), Ke; }, Ce = (R) => { var ie, Ie, Ke, Jt, fn; const cn = oo(R) ? R[0] : R; let tn = null; if (cn != null && cn.value) { const Xt = se.value.filter((Ur) => Ur.value === cn.value); Xt.length > 0 && (tn = Xt[0].$el); } if (u.value && tn) { const Xt = (Jt = (Ke = (Ie = (ie = u.value) == null ? void 0 : ie.popperRef) == null ? void 0 : Ie.contentRef) == null ? void 0 : Ke.querySelector) == null ? void 0 : Jt.call(Ke, `.${a.be("dropdown", "wrap")}`); Xt && NUe(Xt, tn); } (fn = y.value) == null || fn.handleScroll(); }, Le = (R) => { i.options.set(R.value, R), i.cachedOptions.set(R.value, R), R.disabled && i.disabledOptions.set(R.value, R); }, bt = (R, ie) => { i.options.get(R) === ie && i.options.delete(R); }, pt = O(() => { var R, ie; return (ie = (R = u.value) == null ? void 0 : R.popperRef) == null ? void 0 : ie.contentRef; }), Tt = () => { i.isBeforeHide = !1, We(() => Ce(i.selected)); }, wt = () => { var R; (R = d.value) == null || R.focus(); }, St = () => { var R; (R = d.value) == null || R.blur(); }, rn = (R) => { je(R); }, Bt = () => { T.value = !1, _.value && St(); }, Gt = () => { i.inputValue.length > 0 ? i.inputValue = "" : T.value = !1; }, sn = () => { P.value || (n3 && (i.inputHovering = !0), i.menuVisibleOnFocus ? i.menuVisibleOnFocus = !1 : T.value = !T.value); }, an = () => { T.value ? se.value[i.hoveringIndex] && me(se.value[i.hoveringIndex]) : sn(); }, Qt = (R) => oa(R.value) ? cl(R.value, e.valueKey) : R.value, Sn = O(() => se.value.filter((R) => R.visible).every((R) => R.disabled)), En = O(() => e.multiple ? e.collapseTags ? i.selected.slice(0, e.maxCollapseTags) : i.selected : []), pn = O(() => e.multiple ? e.collapseTags ? i.selected.slice(e.maxCollapseTags) : [] : []), Et = (R) => { if (!T.value) { T.value = !0; return; } if (!(i.options.size === 0 || i.filteredOptionsCount === 0 || x.value) && !Sn.value) { R === "next" ? (i.hoveringIndex++, i.hoveringIndex === i.options.size && (i.hoveringIndex = 0)) : R === "prev" && (i.hoveringIndex--, i.hoveringIndex < 0 && (i.hoveringIndex = i.options.size - 1)); const ie = se.value[i.hoveringIndex]; (ie.disabled === !0 || ie.states.groupDisabled === !0 || !ie.visible) && Et(R), We(() => Ce(F.value)); } }, Rt = () => { if (!l.value) return 0; const R = window.getComputedStyle(l.value); return Number.parseFloat(R.gap || "6px"); }, qt = O(() => { const R = Rt(); return { maxWidth: `${g.value && e.maxCollapseTags === 1 ? i.selectionWidth - i.collapseItemWidth - R : i.selectionWidth}px` }; }), _n = O(() => ({ maxWidth: `${i.selectionWidth}px` })), $r = O(() => ({ width: `${Math.max(i.calculatorWidth, OYe)}px` })); return il(l, Xe), il(f, Ge), il(v, E), il(S, E), il(m, j), il(g, Ze), nt(() => { Me(); }), { inputId: N, contentId: r, nsSelect: a, nsInput: o, states: i, isFocused: _, expanded: T, optionsArray: se, hoverOption: F, selectSize: re, filteredOptionsCount: ge, resetCalculatorWidth: Ge, updateTooltip: E, updateTagTooltip: j, debouncedOnInputChange: oe, onInput: ce, deletePrevTag: Ee, deleteTag: Ve, deleteSelected: je, handleOptionSelect: me, scrollToOption: Ce, hasModelValue: D, shouldShowPlaceholder: Ne, currentPlaceholder: xe, mouseEnterEventName: Fe, showClose: M, iconComponent: V, iconReverse: Q, validateState: X, validateIcon: ee, showNewOption: W, updateOptions: Y, collapseTagSize: we, setSelected: Me, selectDisabled: P, emptyText: ve, handleCompositionStart: w, handleCompositionUpdate: k, handleCompositionEnd: C, onOptionCreate: Le, onOptionDestroy: bt, handleMenuEnter: Tt, focus: wt, blur: St, handleClearClick: rn, handleClickOutside: Bt, handleEsc: Gt, toggleMenu: sn, selectOption: an, getValueKey: Qt, navigateOptions: Et, dropdownMenuVisible: Oe, showTagList: En, collapseTagList: pn, tagStyle: qt, collapseTagStyle: _n, inputStyle: $r, popperRef: pt, inputRef: d, tooltipRef: u, tagTooltipRef: c, calculatorRef: f, prefixRef: h, suffixRef: p, selectRef: s, wrapperRef: S, selectionRef: l, scrollbarRef: y, menuRef: v, tagMenuRef: m, collapseItemRef: g }; }; var AYe = G({ name: "ElOptions", setup(e, { slots: t }) { const n = $e(Em); let r = []; return () => { var a, o; const i = (a = t.default) == null ? void 0 : a.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(!Ia(c.children) && !oo(c.children) && Ga((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((o = i[0]) == null ? void 0 : o.children), Gb(s, r) || (r = s, n && (n.states.optionValues = s)), i; }; } }); const IYe = Ln({ name: String, id: String, modelValue: { type: [Array, String, Number, Boolean, Object], default: void 0 }, autocomplete: { type: String, default: "off" }, automaticDropdown: Boolean, size: Dh, effect: { type: Ft(String), default: "light" }, disabled: Boolean, clearable: Boolean, filterable: Boolean, allowCreate: Boolean, loading: Boolean, popperClass: { type: String, default: "" }, popperOptions: { type: Ft(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: ec, default: ZE }, fitInputWidth: Boolean, suffixIcon: { type: ec, default: YE }, tagType: { ...h3.type, default: "info" }, tagEffect: { ...h3.effect, default: "light" }, validateEvent: { type: Boolean, default: !0 }, remoteShowSuffix: Boolean, placement: { type: Ft(String), values: ox, default: "bottom-start" }, fallbackPlacements: { type: Ft(Array), default: ["bottom-start", "top-start", "right", "left"] }, appendTo: String, ...qWe, ...gc(["ariaLabel"]) }), _9 = "ElSelect", PYe = G({ name: _9, componentName: _9, components: { ElSelectMenu: $Ye, ElOption: b_, ElOptions: AYe, ElTag: bXe, ElScrollbar: kKe, ElTooltip: Sm, ElIcon: $a }, directives: { ClickOutside: _U }, props: IYe, emits: [ ea, JE, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(e, { emit: t }) { const n = O(() => { const { modelValue: o, multiple: i } = e, s = i ? [] : void 0; return oo(o) ? i ? o : s : i ? s : o; }), r = en({ ...gr(e), modelValue: n }), a = FYe(r, t); return rt(Em, en({ props: r, states: a.states, optionsArray: a.optionsArray, handleOptionSelect: a.handleOptionSelect, onOptionCreate: a.onOptionCreate, onOptionDestroy: a.onOptionDestroy, selectRef: a.selectRef, setSelected: a.setSelected })), { ...a, modelValue: n }; } }); function LYe(e, t, n, r, a, o) { const i = lt("el-tag"), s = lt("el-tooltip"), l = lt("el-icon"), u = lt("el-option"), c = lt("el-options"), d = lt("el-scrollbar"), f = lt("el-select-menu"), h = f2("click-outside"); return qe(($(), B("div", { ref: "selectRef", class: H([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]), [h2(e.mouseEnterEventName)]: (p) => e.states.inputHovering = !0, onMouseleave: (p) => e.states.inputHovering = !1 }, [ Z(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: q(() => { var p; return [ K("div", { ref: "wrapperRef", class: H([ 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: et(e.toggleMenu, ["prevent"]) }, [ e.$slots.prefix ? ($(), B("div", { key: 0, ref: "prefixRef", class: H(e.nsSelect.e("prefix")) }, [ he(e.$slots, "prefix") ], 2)) : te("v-if", !0), K("div", { ref: "selectionRef", class: H([ e.nsSelect.e("selection"), e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length) ]) }, [ e.multiple ? he(e.$slots, "tag", { key: 0 }, () => [ ($(!0), B(Ue, null, yt(e.showTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !e.selectDisabled && !v.isDisabled, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.tagStyle), onClose: (m) => e.deleteTag(m, v) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) ], 2))), 128)), e.collapseTags && e.states.selected.length > e.maxCollapseTags ? ($(), ae(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: q(() => [ K("div", { ref: "collapseItemRef", class: H(e.nsSelect.e("selected-item")) }, [ Z(i, { closable: !1, size: e.collapseTagSize, type: e.tagType, effect: e.tagEffect, "disable-transitions": "", style: Qe(e.collapseTagStyle) }, { default: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, " + " + _e(e.states.selected.length - e.maxCollapseTags), 3) ]), _: 1 }, 8, ["size", "type", "effect", "style"]) ], 2) ]), content: q(() => [ K("div", { ref: "tagMenuRef", class: H(e.nsSelect.e("selection")) }, [ ($(!0), B(Ue, null, yt(e.collapseTagList, (v) => ($(), B("div", { key: e.getValueKey(v), class: H(e.nsSelect.e("selected-item")) }, [ Z(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: q(() => [ K("span", { class: H(e.nsSelect.e("tags-text")) }, [ he(e.$slots, "label", { label: v.currentLabel, value: v.value }, () => [ ze(_e(v.currentLabel), 1) ]) ], 2) ]), _: 2 }, 1032, ["closable", "size", "type", "effect", "onClose"]) ], 2))), 128)) ], 2) ]), _: 3 }, 8, ["disabled", "effect", "teleported"])) : te("v-if", !0) ]) : te("v-if", !0), e.selectDisabled ? te("v-if", !0) : ($(), B("div", { key: 1, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("input-wrapper"), e.nsSelect.is("hidden", !e.filterable) ]) }, [ qe(K("input", { id: e.inputId, ref: "inputRef", "onUpdate:modelValue": (v) => e.states.inputValue = v, type: "text", name: e.name, class: H([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]), disabled: e.selectDisabled, autocomplete: e.autocomplete, style: Qe(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: [ gn(et((v) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]), gn(et((v) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]), gn(et(e.handleEsc, ["stop", "prevent"]), ["esc"]), gn(et(e.selectOption, ["stop", "prevent"]), ["enter"]), gn(et(e.deletePrevTag, ["stop"]), ["delete"]) ], onCompositionstart: e.handleCompositionStart, onCompositionupdate: e.handleCompositionUpdate, onCompositionend: e.handleCompositionEnd, onInput: e.onInput, onClick: et(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"]), [ [$g, e.states.inputValue] ]), e.filterable ? ($(), B("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: H(e.nsSelect.e("input-calculator")), textContent: _e(e.states.inputValue) }, null, 10, ["textContent"])) : te("v-if", !0) ], 2)), e.shouldShowPlaceholder ? ($(), B("div", { key: 2, class: H([ e.nsSelect.e("selected-item"), e.nsSelect.e("placeholder"), e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue) ]) }, [ e.hasModelValue ? he(e.$slots, "label", { key: 0, label: e.currentPlaceholder, value: e.modelValue }, () => [ K("span", null, _e(e.currentPlaceholder), 1) ]) : ($(), B("span", { key: 1 }, _e(e.currentPlaceholder), 1)) ], 2)) : te("v-if", !0) ], 2), K("div", { ref: "suffixRef", class: H(e.nsSelect.e("suffix")) }, [ e.iconComponent && !e.showClose ? ($(), ae(l, { key: 0, class: H([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse]) }, { default: q(() => [ ($(), ae(dt(e.iconComponent))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), e.showClose && e.clearIcon ? ($(), ae(l, { key: 1, class: H([ e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.nsSelect.e("clear") ]), onClick: e.handleClearClick }, { default: q(() => [ ($(), ae(dt(e.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0), e.validateState && e.validateIcon ? ($(), ae(l, { key: 2, class: H([e.nsInput.e("icon"), e.nsInput.e("validateIcon")]) }, { default: q(() => [ ($(), ae(dt(e.validateIcon))) ]), _: 1 }, 8, ["class"])) : te("v-if", !0) ], 2) ], 10, ["onClick"]) ]; }), content: q(() => [ Z(f, { ref: "menuRef" }, { default: q(() => [ e.$slots.header ? ($(), B("div", { key: 0, class: H(e.nsSelect.be("dropdown", "header")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "header") ], 10, ["onClick"])) : te("v-if", !0), qe(Z(d, { id: e.contentId, ref: "scrollbarRef", tag: "ul", "wrap-class": e.nsSelect.be("dropdown", "wrap"), "view-class": e.nsSelect.be("dropdown", "list"), class: H([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]), role: "listbox", "aria-label": e.ariaLabel, "aria-orientation": "vertical" }, { default: q(() => [ e.showNewOption ? ($(), ae(u, { key: 0, value: e.states.inputValue, created: !0 }, null, 8, ["value"])) : te("v-if", !0), Z(c, null, { default: q(() => [ he(e.$slots, "default") ]), _: 3 }) ]), _: 3 }, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [ [ct, e.states.options.size > 0 && !e.loading] ]), e.$slots.loading && e.loading ? ($(), B("div", { key: 1, class: H(e.nsSelect.be("dropdown", "loading")) }, [ he(e.$slots, "loading") ], 2)) : e.loading || e.filteredOptionsCount === 0 ? ($(), B("div", { key: 2, class: H(e.nsSelect.be("dropdown", "empty")) }, [ he(e.$slots, "empty", {}, () => [ K("span", null, _e(e.emptyText), 1) ]) ], 2)) : te("v-if", !0), e.$slots.footer ? ($(), B("div", { key: 3, class: H(e.nsSelect.be("dropdown", "footer")), onClick: et(() => { }, ["stop"]) }, [ he(e.$slots, "footer") ], 10, ["onClick"])) : te("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 NYe = /* @__PURE__ */ Ut(PYe, [["render", LYe], ["__file", "select.vue"]]); const MYe = G({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: Boolean }, setup(e) { const t = Kt("select"), n = U(null), r = tt(), a = U([]); rt(VU, en({ ...gr(e) })); const o = O(() => a.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 = ku(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 = () => { a.value = s(r.subTree); }; return nt(() => { l(); }), Tze(n, l, { attributes: !0, subtree: !0, childList: !0 }), { groupRef: n, visible: o, ns: t }; } }); function DYe(e, t, n, r, a, o) { return qe(($(), B("ul", { ref: "groupRef", class: H(e.ns.be("group", "wrap")) }, [ K("li", { class: H(e.ns.be("group", "title")) }, _e(e.label), 3), K("li", null, [ K("ul", { class: H(e.ns.b("group")) }, [ he(e.$slots, "default") ], 2) ]) ], 2)), [ [ct, e.visible] ]); } var jU = /* @__PURE__ */ Ut(MYe, [["render", DYe], ["__file", "option-group.vue"]]); const BYe = Yr(NYe, { Option: b_, OptionGroup: jU }), RYe = Vl(b_); Vl(jU); const zYe = Ln({ trigger: lg.trigger, placement: sC.placement, disabled: lg.disabled, visible: to.visible, transition: to.transition, popperOptions: sC.popperOptions, tabindex: sC.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 } }), VYe = { "update:visible": (e) => Zf(e), "before-enter": () => !0, "before-leave": () => !0, "after-enter": () => !0, "after-leave": () => !0 }, jYe = "onUpdate:visible", HYe = G({ name: "ElPopover" }), UYe = /* @__PURE__ */ G({ ...HYe, props: zYe, emits: VYe, setup(e, { expose: t, emit: n }) { const r = e, a = O(() => r[jYe]), o = Kt("popover"), i = U(), s = O(() => { var m; return (m = b(i)) == null ? void 0 : m.popperRef; }), l = O(() => [ { width: Qf(r.width) }, r.popperStyle ]), u = O(() => [o.b(), r.popperClass, { [o.m("plain")]: !!r.content }]), c = O(() => r.transition === `${o.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) => ($(), ae(b(Sm), Dt({ 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": b(u), "popper-style": b(l), teleported: m.teleported, persistent: m.persistent, "gpu-acceleration": b(c), "onUpdate:visible": b(a), onBeforeShow: f, onBeforeHide: h, onShow: p, onHide: v }), { content: q(() => [ m.title ? ($(), B("div", { key: 0, class: H(b(o).e("title")), role: "title" }, _e(m.title), 3)) : te("v-if", !0), he(m.$slots, "default", {}, () => [ ze(_e(m.content), 1) ]) ]), default: q(() => [ m.$slots.reference ? he(m.$slots, "reference", { key: 0 }) : te("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 qYe = /* @__PURE__ */ Ut(UYe, [["__file", "popover.vue"]]); const T9 = (e, t) => { const n = t.arg || t.value, r = n == null ? void 0 : n.popperRef; r && (r.triggerRef = e); }; var WYe = { mounted(e, t) { T9(e, t); }, updated(e, t) { T9(e, t); } }; const KYe = "popover", GYe = vqe(WYe, KYe); Yr(qYe, { directive: GYe }); const df = "$treeNodeId", $9 = function(e, t) { !t || t[df] || Object.defineProperty(t, df, { value: e.id, enumerable: !1, configurable: !1, writable: !1 }); }, w_ = function(e, t) { return e ? t[e] : t[df]; }, v3 = (e, t, n) => { const r = e.value.currentNode; n(); const a = e.value.currentNode; r !== a && t("current-change", a ? a.data : null, a); }, g3 = (e) => { let t = !0, n = !0, r = !0; for (let a = 0, o = e.length; a < o; a++) { const i = e[a]; (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 }; }, Bv = function(e) { if (e.childNodes.length === 0 || e.loading) return; const { all: t, none: n, half: r } = g3(e.childNodes); t ? (e.checked = !0, e.indeterminate = !1) : r ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1); const a = e.parent; !a || a.level === 0 || e.store.checkStrictly || Bv(a); }, z1 = function(e, t) { const n = e.store.props, r = e.data || {}, a = n[t]; if (typeof a == "function") return a(r, e); if (typeof a == "string") return r[a]; if (typeof a > "u") { const o = r[t]; return o === void 0 ? "" : o; } }; let XYe = 0; class fd { constructor(t) { this.id = XYe++, 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) Pd(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 o = z1(this, "isLeaf"); typeof o == "boolean" && (this.isLeafByUser = o); } 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) || $9(this, this.data), !this.data) return; const r = t.defaultExpandedKeys, a = t.key; a && r && r.includes(this.key) && this.expand(null, t.autoExpandParent), a && 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) || $9(this, t), this.data = t, this.childNodes = []; let n; this.level === 0 && Array.isArray(this.data) ? n = this.data : n = z1(this, "children") || []; for (let r = 0, a = n.length; r < a; r++) this.insertChild({ data: n[r] }); } get label() { return z1(this, "label"); } get key() { const t = this.store.key; return this.data ? this.data[t] : null; } get disabled() { return z1(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 fd)) { if (!r) { const a = this.getChildren(!0); a.includes(t.data) || (typeof n > "u" || n < 0 ? a.push(t.data) : a.splice(n, 0, t.data)); } Object.assign(t, { parent: this, store: this.store }), t = en(new fd(t)), t instanceof fd && 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 a = this.childNodes.indexOf(t); a > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(a, 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 a = this.parent; for (; a.level > 0; ) a.expanded = !0, a = a.parent; } this.expanded = !0, t && t(), this.childNodes.forEach((a) => { a.canFocus = !0; }); }; this.shouldLoadData() ? this.loadData((a) => { Array.isArray(a) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || Bv(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, a) { if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: i, allWithoutDisable: s } = g3(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]; a = a || t !== !1; const v = p.disabled ? p.checked : a; p.setChecked(v, n, !0, a); } const { half: c, all: d } = g3(u); d || (this.checked = d, this.indeterminate = c); } }; if (this.shouldLoadData()) { this.loadData(() => { l(), Bv(this); }, { checked: t !== !1 }); return; } else l(); } const o = this.parent; !o || o.level === 0 || r || Bv(o); } getChildren(t = !1) { if (this.level === 0) return this.data; const n = this.data; if (!n) return null; const r = this.store.props; let a = "children"; return r && (a = r.children || "children"), n[a] === void 0 && (n[a] = null), t && !n[a] && (n[a] = []), n[a]; } updateChildren() { const t = this.getChildren() || [], n = this.childNodes.map((o) => o.data), r = {}, a = []; t.forEach((o, i) => { const s = o[df]; s && n.findIndex((l) => l[df] === s) >= 0 ? r[s] = { index: i, data: o } : a.push({ index: i, data: o }); }), this.store.lazy || n.forEach((o) => { r[o[df]] || this.removeChildByData(o); }), a.forEach(({ index: o, data: i }) => { this.insertChild({ data: i }, o); }), 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 = (o) => { this.childNodes = [], this.doCreateChildren(o, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, o); }, a = () => { this.loading = !1; }; this.store.load(this, r, a); } 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 || Bv(this); } } class YYe { constructor(t) { this.currentNode = null, this.currentNodeKey = null; for (const n in t) Pd(t, n) && (this[n] = t[n]); this.nodesMap = {}; } initialize() { if (this.root = new fd({ 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, a = function(o) { const i = o.root ? o.root.childNodes : o.childNodes; if (i.forEach((s) => { s.visible = n.call(s, t, s.data, s), a(s); }), !o.visible && i.length) { let s = !0; s = !i.some((l) => l.visible), o.root ? o.root.visible = s === !1 : o.visible = s === !1; } t && o.visible && !o.isLeaf && (!r || o.loaded) && o.expand(); }; a(this); } setData(t) { t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes()) : this.root.updateChildren(); } getNode(t) { if (t instanceof fd) return t; const n = oa(t) ? w_(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 = Xb(n) ? this.root : this.getNode(n); r && r.insertChild({ data: t }); } _initDefaultCheckedNodes() { const t = this.defaultCheckedKeys || [], n = this.nodesMap; t.forEach((r) => { const a = n[r]; a && a.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 = [], a = function(o) { (o.root ? o.root.childNodes : o.childNodes).forEach((i) => { (i.checked || n && i.indeterminate) && (!t || t && i.isLeaf) && r.push(i.data), a(i); }); }; return a(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((a) => { a.indeterminate && t.push(a.data), n(a); }); }; return n(this), t; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]); } _getAllNodes() { const t = [], n = this.nodesMap; for (const r in n) Pd(n, r) && t.push(n[r]); return t; } updateChildren(t, n) { const r = this.nodesMap[t]; if (!r) return; const a = r.childNodes; for (let o = a.length - 1; o >= 0; o--) { const i = a[o]; this.remove(i.data); } for (let o = 0, i = n.length; o < i; o++) { const s = n[o]; this.append(s, r.data); } } _setCheckedKeys(t, n = !1, r) { const a = this._getAllNodes().sort((l, u) => l.level - u.level), o = /* @__PURE__ */ Object.create(null), i = Object.keys(r); a.forEach((l) => l.setChecked(!1, !1)); const s = (l) => { l.childNodes.forEach((u) => { var c; o[u.data[t]] = !0, (c = u.childNodes) != null && c.length && s(u); }); }; for (let l = 0, u = a.length; l < u; l++) { const c = a[l], d = c.data[t].toString(); if (!i.includes(d)) { c.checked && !o[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, a = {}; t.forEach((o) => { a[(o || {})[r]] = !0; }), this._setCheckedKeys(r, n, a); } setCheckedKeys(t, n = !1) { this.defaultCheckedKeys = t; const r = this.key, a = {}; t.forEach((o) => { a[o] = !0; }), this._setCheckedKeys(r, n, a); } 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 a = this.getNode(t); a && a.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], a = this.nodesMap[r]; this.setCurrentNode(a), 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 ZYe = G({ name: "ElTreeNodeContent", props: { node: { type: Object, required: !0 }, renderContent: Function }, setup(e) { const t = Kt("tree"), n = $e("NodeInstance"), r = $e("RootTree"); return () => { const a = e.node, { data: o, store: i } = a; return e.renderContent ? e.renderContent(nn, { _self: n, node: a, data: o, store: i }) : he(r.ctx.slots, "default", { node: a, data: o }, () => [ nn("span", { class: t.be("node", "label") }, [a.label]) ]); }; } }); var QYe = /* @__PURE__ */ Ut(ZYe, [["__file", "tree-node-content.vue"]]); function HU(e) { const t = $e("TreeNodeMap", null), n = { treeNodeExpand: (r) => { e.node !== r && e.node.collapse(); }, children: [] }; return t && t.children.push(n), rt("TreeNodeMap", n), { broadcastExpanded: (r) => { if (e.accordion) for (const a of n.children) a.treeNodeExpand(r); } }; } const UU = Symbol("dragEvents"); function JYe({ props: e, ctx: t, el$: n, dropIndicator$: r, store: a }) { const o = Kt("tree"), i = U({ showDropIndicator: !1, draggingNode: null, dropNode: null, allowDrop: !0, dropType: null }); return rt(UU, { 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 && dd(c.$el, o.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(`.${o.be("node", "content")}`).getBoundingClientRect(), g = n.value.getBoundingClientRect(); let y; const x = f ? h ? 0.25 : p ? 0.45 : 1 : -1, w = p ? h ? 0.75 : f ? 0.55 : 0 : 1; let k = -9999; const C = s.clientY - m.top; C < m.height * x ? y = "before" : C > m.height * w ? y = "after" : h ? y = "inner" : y = "none"; const S = u.$el.querySelector(`.${o.be("node", "expand-icon")}`).getBoundingClientRect(), _ = r.value; y === "before" ? k = S.top - g.top : y === "after" && (k = S.bottom - g.top), _.style.top = `${k}px`, _.style.left = `${S.right - g.left}px`, y === "inner" ? l3(u.$el, o.is("drop-inner")) : dd(u.$el, o.is("drop-inner")), i.value.showDropIndicator = y === "before" || y === "after", i.value.allowDrop = i.value.showDropIndicator || v, i.value.dropType = y, 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" && (a.value.registerNode(d), a.value.key && l.node.eachNode((f) => { var h; (h = a.value.nodesMap[f.data[a.value.key]]) == null || h.setChecked(f.checked, !a.value.checkStrictly); })), dd(c.$el, o.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 eZe = G({ name: "ElTreeNode", components: { ElCollapseTransition: PXe, ElCheckbox: hXe, NodeContent: QYe, ElIcon: $a, Loading: QE }, props: { node: { type: fd, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: !1 } }, emits: ["node-expand"], setup(e, t) { const n = Kt("tree"), { broadcastExpanded: r } = HU(e), a = $e("RootTree"), o = U(!1), i = U(!1), s = U(null), l = U(null), u = U(null), c = $e(UU), d = tt(); rt("NodeInstance", d), a || Cr("Tree", "Can not find node's tree."), e.node.expanded && (o.value = !0, i.value = !0); const f = a.props.props.children || "children"; be(() => { const w = e.node.data[f]; return w && [...w]; }, () => { e.node.updateChildren(); }), be(() => e.node.indeterminate, (w) => { v(e.node.checked, w); }), be(() => e.node.checked, (w) => { v(w, e.node.indeterminate); }), be(() => e.node.childNodes.length, () => e.node.reInitChecked()), be(() => e.node.expanded, (w) => { We(() => o.value = w), w && (i.value = !0); }); const h = (w) => w_(a.props.nodeKey, w.data), p = (w) => { const k = e.props.class; if (!k) return {}; let C; if (Ga(k)) { const { data: S } = w; C = k(S, w); } else C = k; return Ia(C) ? { [C]: !0 } : C; }, v = (w, k) => { (s.value !== w || l.value !== k) && a.ctx.emit("check-change", e.node.data, w, k), s.value = w, l.value = k; }, m = (w) => { v3(a.store, a.ctx.emit, () => a.store.value.setCurrentNode(e.node)), a.currentNode.value = e.node, a.props.expandOnClickNode && y(), a.props.checkOnClickNode && !e.node.disabled && x(null, { target: { checked: !e.node.checked } }), a.ctx.emit("node-click", e.node.data, e.node, d, w); }, g = (w) => { a.instance.vnode.props.onNodeContextmenu && (w.stopPropagation(), w.preventDefault()), a.ctx.emit("node-contextmenu", w, e.node.data, e.node, d); }, y = () => { e.node.isLeaf || (o.value ? (a.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); })); }, x = (w, k) => { e.node.setChecked(k.target.checked, !a.props.checkStrictly), We(() => { const C = a.store.value; a.ctx.emit("check", e.node.data, { checkedNodes: C.getCheckedNodes(), checkedKeys: C.getCheckedKeys(), halfCheckedNodes: C.getHalfCheckedNodes(), halfCheckedKeys: C.getHalfCheckedKeys() }); }); }; return { ns: n, node$: u, tree: a, expanded: o, childNodeRendered: i, oldChecked: s, oldIndeterminate: l, getNodeKey: h, getNodeClass: p, handleSelectChange: v, handleClick: m, handleContextMenu: g, handleExpandIconClick: y, handleCheckChange: x, handleChildNodeExpand: (w, k, C) => { r(k), a.ctx.emit("node-expand", w, k, C); }, handleDragStart: (w) => { a.props.draggable && c.treeNodeDragStart({ event: w, treeNode: e }); }, handleDragOver: (w) => { w.preventDefault(), a.props.draggable && c.treeNodeDragOver({ event: w, treeNode: { $el: u.value, node: e.node } }); }, handleDrop: (w) => { w.preventDefault(); }, handleDragEnd: (w) => { a.props.draggable && c.treeNodeDragEnd(w); }, CaretRight: jUe }; } }); function tZe(e, t, n, r, a, o) { const i = lt("el-icon"), s = lt("el-checkbox"), l = lt("loading"), u = lt("node-content"), c = lt("el-tree-node"), d = lt("el-collapse-transition"); return qe(($(), B("div", { ref: "node$", class: H([ 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: et(e.handleClick, ["stop"]), onContextmenu: e.handleContextMenu, onDragstart: et(e.handleDragStart, ["stop"]), onDragover: et(e.handleDragOver, ["stop"]), onDragend: et(e.handleDragEnd, ["stop"]), onDrop: et(e.handleDrop, ["stop"]) }, [ K("div", { class: H(e.ns.be("node", "content")), style: Qe({ paddingLeft: (e.node.level - 1) * e.tree.props.indent + "px" }) }, [ e.tree.props.icon || e.CaretRight ? ($(), ae(i, { key: 0, class: H([ e.ns.be("node", "expand-icon"), e.ns.is("leaf", e.node.isLeaf), { expanded: !e.node.isLeaf && e.expanded } ]), onClick: et(e.handleExpandIconClick, ["stop"]) }, { default: q(() => [ ($(), ae(dt(e.tree.props.icon || e.CaretRight))) ]), _: 1 }, 8, ["class", "onClick"])) : te("v-if", !0), e.showCheckbox ? ($(), ae(s, { key: 1, "model-value": e.node.checked, indeterminate: e.node.indeterminate, disabled: !!e.node.disabled, onClick: et(() => { }, ["stop"]), onChange: e.handleCheckChange }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : te("v-if", !0), e.node.loading ? ($(), ae(i, { key: 2, class: H([e.ns.be("node", "loading-icon"), e.ns.is("loading")]) }, { default: q(() => [ Z(l) ]), _: 1 }, 8, ["class"])) : te("v-if", !0), Z(u, { node: e.node, "render-content": e.renderContent }, null, 8, ["node", "render-content"]) ], 6), Z(d, null, { default: q(() => [ !e.renderAfterExpand || e.childNodeRendered ? qe(($(), B("div", { key: 0, class: H(e.ns.be("node", "children")), role: "group", "aria-expanded": e.expanded }, [ ($(!0), B(Ue, null, yt(e.node.childNodes, (f) => ($(), ae(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"])), [ [ct, e.expanded] ]) : te("v-if", !0) ]), _: 1 }) ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [ [ct, e.node.visible] ]); } var nZe = /* @__PURE__ */ Ut(eZe, [["render", tZe], ["__file", "tree-node.vue"]]); function rZe({ el$: e }, t) { const n = Kt("tree"), r = un([]), a = un([]); nt(() => { o(); }), qd(() => { r.value = Array.from(e.value.querySelectorAll("[role=treeitem]")), a.value = Array.from(e.value.querySelectorAll("input[type=checkbox]")); }), be(a, (i) => { i.forEach((s) => { s.setAttribute("tabindex", "-1"); }); }), Ko(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 ([Pr.up, Pr.down].includes(l)) { if (i.preventDefault(), l === Pr.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(); } [Pr.left, Pr.right].includes(l) && (i.preventDefault(), s.click()); const d = s.querySelector('[type="checkbox"]'); [Pr.enter, Pr.space].includes(l) && d && (i.preventDefault(), d.click()); }); const o = () => { var i; r.value = Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), a.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 aZe = G({ name: "ElTree", components: { ElTreeNode: nZe }, 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: ec } }, 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 } = bm(), r = Kt("tree"), a = $e(Em, null), o = U(new YYe({ 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 })); o.value.initialize(); const i = U(o.value.root), s = U(null), l = U(null), u = U(null), { broadcastExpanded: c } = HU(e), { dragState: d } = JYe({ props: e, ctx: t, el$: l, dropIndicator$: u, store: o }); rZe({ el$: l }, o); const f = O(() => { const { childNodes: M } = i.value, V = a ? a.hasFilteredOptions !== 0 : !1; return (!M || M.length === 0 || M.every(({ visible: Q }) => !Q)) && !V; }); be(() => e.currentNodeKey, (M) => { o.value.setCurrentNodeKey(M); }), be(() => e.defaultCheckedKeys, (M) => { o.value.setDefaultCheckedKey(M); }), be(() => e.defaultExpandedKeys, (M) => { o.value.setDefaultExpandedKeys(M); }), be(() => e.data, (M) => { o.value.setData(M); }, { deep: !0 }), be(() => e.checkStrictly, (M) => { o.value.checkStrictly = M; }); const h = (M) => { if (!e.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); o.value.filter(M); }, p = (M) => w_(e.nodeKey, M.data), v = (M) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getNodePath"); const V = o.value.getNode(M); if (!V) return []; const Q = [V.data]; let X = V.parent; for (; X && X !== i.value; ) Q.push(X.data), X = X.parent; return Q.reverse(); }, m = (M, V) => o.value.getCheckedNodes(M, V), g = (M) => o.value.getCheckedKeys(M), y = () => { const M = o.value.getCurrentNode(); return M ? M.data : null; }, x = () => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const M = y(); return M ? M[e.nodeKey] : null; }, w = (M, V) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); o.value.setCheckedNodes(M, V); }, k = (M, V) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedKeys"); o.value.setCheckedKeys(M, V); }, C = (M, V, Q) => { o.value.setChecked(M, V, Q); }, S = () => o.value.getHalfCheckedNodes(), _ = () => o.value.getHalfCheckedKeys(), T = (M, V = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); v3(o, t.emit, () => { c(M), o.value.setUserCurrentNode(M, V); }); }, F = (M, V = !0) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); v3(o, t.emit, () => { c(), o.value.setCurrentNodeKey(M, V); }); }, A = (M) => o.value.getNode(M), I = (M) => { o.value.remove(M); }, N = (M, V) => { o.value.append(M, V); }, L = (M, V) => { o.value.insertBefore(M, V); }, z = (M, V) => { o.value.insertAfter(M, V); }, P = (M, V, Q) => { c(V), t.emit("node-expand", M, V, Q); }, D = (M, V) => { if (!e.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); o.value.updateChildren(M, V); }; return rt("RootTree", { ctx: t, props: e, store: o, root: i, currentNode: s, instance: tt() }), rt(sg, void 0), { ns: r, store: o, root: i, currentNode: s, dragState: d, el$: l, dropIndicator$: u, isEmpty: f, filter: h, getNodeKey: p, getNodePath: v, getCheckedNodes: m, getCheckedKeys: g, getCurrentNode: y, getCurrentKey: x, setCheckedNodes: w, setCheckedKeys: k, setChecked: C, getHalfCheckedNodes: S, getHalfCheckedKeys: _, setCurrentNode: T, setCurrentKey: F, t: n, getNode: A, remove: I, append: N, insertBefore: L, insertAfter: z, handleNodeExpand: P, updateKeyChildren: D }; } }); function oZe(e, t, n, r, a, o) { const i = lt("el-tree-node"); return $(), B("div", { ref: "el$", class: H([ 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" }, [ ($(!0), B(Ue, null, yt(e.root.childNodes, (s) => ($(), ae(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 ? ($(), B("div", { key: 0, class: H(e.ns.e("empty-block")) }, [ he(e.$slots, "empty", {}, () => { var s; return [ K("span", { class: H(e.ns.e("empty-text")) }, _e((s = e.emptyText) != null ? s : e.t("el.tree.emptyText")), 3) ]; }) ], 2)) : te("v-if", !0), qe(K("div", { ref: "dropIndicator$", class: H(e.ns.e("drop-indicator")) }, null, 2), [ [ct, e.dragState.showDropIndicator] ]) ], 2); } var iZe = /* @__PURE__ */ Ut(aZe, [["render", oZe], ["__file", "tree.vue"]]); Yr(iZe); function sZe(e) { let t; const n = U(!1), r = en({ ...e, originalPosition: "", originalOverflow: "", visible: !1 }); function a(f) { r.text = f; } function o() { 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()) : (dd(f, h.bm("parent", "relative")), f.removeAttribute("loading-number")), dd(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, o(); } const u = G({ name: "ElLoading", setup(f, { expose: h }) { const { ns: p, zIndex: v } = GWe("loading"); return h({ ns: p, zIndex: v }), () => { const m = r.spinner || r.svg, g = nn("svg", { class: "circular", viewBox: r.svgViewBox ? r.svgViewBox : "0 0 50 50", ...m ? { innerHTML: m } : {} }, [ nn("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none" }) ]), y = r.text ? nn("p", { class: p.b("text") }, [r.text]) : void 0; return nn(lr, { name: p.b("fade"), onAfterLeave: l }, { default: q(() => [ qe(Z("div", { style: { backgroundColor: r.background || "" }, class: [ p.b("mask"), r.customClass, r.fullscreen ? "is-fullscreen" : "" ] }, [ nn("div", { class: p.b("spinner") }, [g, y]) ]), [[ct, r.visible]]) ]) }); }; } }), c = Og(u), d = c.mount(document.createElement("div")); return { ...gr(r), setText: a, removeElLoadingChild: i, close: s, handleAfterLeave: l, vm: d, get $el() { return d.$el; } }; } let V1; const lZe = function(e = {}) { if (!kr) return; const t = uZe(e); if (t.fullscreen && V1) return V1; const n = sZe({ ...t, closed: () => { var a; (a = t.closed) == null || a.call(t), t.fullscreen && (V1 = void 0); } }); cZe(t, t.parent, n), O9(t, t.parent, n), t.parent.vLoadingAddClassList = () => O9(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), We(() => n.visible.value = t.visible), t.fullscreen && (V1 = n), n; }, uZe = (e) => { var t, n, r, a; let o; return Ia(e.target) ? o = (t = document.querySelector(e.target)) != null ? t : document.body : o = e.target || document.body, { parent: o === document.body || e.body ? document.body : o, background: e.background || "", svg: e.svg || "", svgViewBox: e.svgViewBox || "", spinner: e.spinner || !1, text: e.text || "", fullscreen: o === document.body && ((n = e.fullscreen) != null ? n : !0), lock: (r = e.lock) != null ? r : !1, customClass: e.customClass || "", visible: (a = e.visible) != null ? a : !0, beforeClose: e.beforeClose, closed: e.closed, target: o }; }, cZe = async (e, t, n) => { const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, a = {}; if (e.fullscreen) n.originalPosition.value = xv(document.body, "position"), n.originalOverflow.value = xv(document.body, "overflow"), a.zIndex = r(); else if (e.parent === document.body) { n.originalPosition.value = xv(document.body, "position"), await We(); for (const o of ["top", "left"]) { const i = o === "top" ? "scrollTop" : "scrollLeft"; a[o] = `${e.target.getBoundingClientRect()[o] + document.body[i] + document.documentElement[i] - Number.parseInt(xv(document.body, `margin-${o}`), 10)}px`; } for (const o of ["height", "width"]) a[o] = `${e.target.getBoundingClientRect()[o]}px`; } else n.originalPosition.value = xv(t, "position"); for (const [o, i] of Object.entries(a)) n.$el.style[o] = i; }, O9 = (e, t, n) => { const r = n.vm.ns || n.vm._.exposed.ns; ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? dd(t, r.bm("parent", "relative")) : l3(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? l3(t, r.bm("parent", "hidden")) : dd(t, r.bm("parent", "hidden")); }, Dy = Symbol("ElLoading"), F9 = (e, t) => { var n, r, a, o; const i = t.instance, s = (f) => oa(t.value) ? t.value[f] : void 0, l = (f) => { const h = Ia(f) && (i == null ? void 0 : i[f]) || f; return h && U(h); }, u = (f) => l(s(f) || e.getAttribute(`element-loading-${zze(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: (a = s("body")) != null ? a : t.modifiers.body, lock: (o = s("lock")) != null ? o : t.modifiers.lock }; e[Dy] = { options: d, instance: lZe(d) }; }, dZe = (e, t) => { for (const n of Object.keys(t)) Kn(t[n]) && (t[n].value = e[n]); }, pZe = { mounted(e, t) { t.value && F9(e, t); }, updated(e, t) { const n = e[Dy]; t.oldValue !== t.value && (t.value && !t.oldValue ? F9(e, t) : t.value && t.oldValue ? oa(t.value) && dZe(t.value, n.options) : n == null || n.instance.close()); }, unmounted(e) { var t; (t = e[Dy]) == null || t.instance.close(), e[Dy] = null; } }, cx = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, fZe = { name: "AnnotationPopup", props: { annotationEntry: { type: Object } }, inject: ["$annotator", "userApiKey"], data: function() { return { displayPair: { "Feature ID": "featureId", Tooltip: "label", Models: "models", Name: "name", Resource: "resourceId" }, editing: !1, evidencePrefixes: ["", "DOI:", "PMID:"], evidencePrefix: "", evidence: [], authenticated: !1, newEvidence: "", comment: "", prevSubs: [], showSubmissions: !0, errorMessage: "", creator: void 0 }; }, 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"; } }, methods: { 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 a = r.replace("DOI:", "https://doi.org/"); t.push(new URL(a)); } else if (r.includes("PMID:")) { const a = r.replace( "PMID:", "https://pubmed.ncbi.nlm.nih.gov/" ); t.push(new URL(a)); } 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 = ""; } }, 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 = ""; }); } }, hp = (e) => (ma("data-v-9930ef40"), e = e(), ya(), e), hZe = { class: "block" }, vZe = /* @__PURE__ */ hp(() => /* @__PURE__ */ K("div", { class: "title" }, "Feature Annotations", -1)), gZe = /* @__PURE__ */ hp(() => /* @__PURE__ */ K("strong", { class: "sub-title" }, "Previous submissions:", -1)), mZe = /* @__PURE__ */ hp(() => /* @__PURE__ */ K("strong", null, "Evidence: ", -1)), yZe = ["href"], bZe = /* @__PURE__ */ hp(() => /* @__PURE__ */ K("strong", null, "Comment: ", -1)), wZe = /* @__PURE__ */ hp(() => /* @__PURE__ */ K("strong", { class: "sub-title" }, "Suggest changes:", -1)), xZe = /* @__PURE__ */ hp(() => /* @__PURE__ */ K("strong", null, "Evidence:", -1)), kZe = /* @__PURE__ */ hp(() => /* @__PURE__ */ K("strong", null, "Comment:", -1)), CZe = { class: "sub-title" }; function SZe(e, t, n, r, a, o) { const i = PU, s = zUe, l = $a, u = YE, c = QUe, d = YUe, f = eqe, h = m_, p = Yb, v = RYe, m = BYe, g = lx, y = Md, x = y_; return $(), ae(x, { class: "main" }, { default: q(() => [ K("div", hZe, [ Z(i, { class: "info-field" }, { default: q(() => [ vZe ]), _: 1 }), n.annotationEntry ? ($(), B(Ue, { key: 0 }, [ ($(!0), B(Ue, null, yt(e.displayPair, (w, k) => qe(($(), ae(i, { class: "dialog-text", key: w }, { default: q(() => [ K("strong", null, _e(k) + ": ", 1), ze(" " + _e(n.annotationEntry[w]), 1) ]), _: 2 }, 1024)), [ [ct, n.annotationEntry[w]] ])), 128)), e.prevSubs.length > 0 ? ($(), B(Ue, { key: 0 }, [ qe(K("div", { class: "hide", onClick: t[0] || (t[0] = (w) => e.showSubmissions = !1) }, [ ze(" Hide previous submissions "), Z(l, null, { default: q(() => [ Z(s) ]), _: 1 }) ], 512), [ [ct, e.showSubmissions] ]), qe(K("div", { class: "hide", onClick: t[1] || (t[1] = (w) => e.showSubmissions = !0) }, [ ze(" Show previous " + _e(e.prevSubs.length) + " submission(s) ", 1), Z(l, null, { default: q(() => [ Z(u) ]), _: 1 }) ], 512), [ [ct, !e.showSubmissions] ]), e.showSubmissions ? ($(), B(Ue, { key: 0 }, [ Z(i, { class: "dialog-spacer" }), Z(i, { class: "dialog-text" }, { default: q(() => [ gZe ]), _: 1 }), ($(!0), B(Ue, null, yt(e.prevSubs, (w, k) => ($(), B("div", { class: "entry", key: k }, [ Z(i, { class: "dialog-text" }, { default: q(() => [ K("strong", null, _e(o.formatTime(w.created)), 1), ze(" " + _e(w.creator.name), 1) ]), _: 2 }, 1024), Z(i, { class: "dialog-text" }, { default: q(() => [ mZe, ($(!0), B(Ue, null, yt(w.body.evidence, (C) => ($(), ae(i, { key: C, class: "dialog-text" }, { default: q(() => [ K("a", { href: C, target: "_blank" }, _e(C), 9, yZe) ]), _: 2 }, 1024))), 128)) ]), _: 2 }, 1024), Z(i, { class: "dialog-text" }, { default: q(() => [ bZe, ze(" " + _e(w.body.comment), 1) ]), _: 2 }, 1024) ]))), 128)) ], 64)) : te("", !0) ], 64)) : te("", !0), e.authenticated ? ($(), B(Ue, { key: 1 }, [ o.isEditable ? ($(), B(Ue, { key: 0 }, [ Z(i, { class: "dialog-spacer" }), e.editing ? ($(), B(Ue, { key: 1 }, [ Z(i, { class: "dialog-text" }, { default: q(() => [ wZe ]), _: 1 }), o.isDeleted ? te("", !0) : ($(), B(Ue, { key: 0 }, [ Z(i, { class: "dialog-text" }, { default: q(() => [ xZe ]), _: 1 }), ($(!0), B(Ue, null, yt(e.evidence, (w, k) => ($(), ae(i, { key: w }, { default: q(() => [ Z(h, { span: 20 }, { default: q(() => [ ze(_e(e.evidence[k]), 1) ]), _: 2 }, 1024), Z(h, { span: 4 }, { default: q(() => [ Z(l, { class: "standard-icon" }, { default: q(() => [ Z(p, { onClick: (C) => o.removeEvidence(k) }, null, 8, ["onClick"]) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1024))), 128)), Z(i, null, { default: q(() => [ Z(g, { size: "small", placeholder: "Enter", modelValue: e.newEvidence, "onUpdate:modelValue": t[4] || (t[4] = (w) => e.newEvidence = w), onChange: t[5] || (t[5] = (w) => o.evidenceEntered(w)) }, { prepend: q(() => [ Z(m, { teleported: !1, modelValue: e.evidencePrefix, "onUpdate:modelValue": t[3] || (t[3] = (w) => e.evidencePrefix = w), placeholder: "No Prefix", class: "select-box", "popper-class": "flatmap_dropdown" }, { default: q(() => [ ($(!0), B(Ue, null, yt(e.evidencePrefixes, (w) => ($(), ae(v, { key: w, label: w, value: w }, { default: q(() => [ Z(i, null, { default: q(() => [ Z(h, { span: 12 }, { default: q(() => [ ze(_e(w), 1) ]), _: 2 }, 1024) ]), _: 2 }, 1024) ]), _: 2 }, 1032, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }) ], 64)), Z(i, null, { default: q(() => [ kZe ]), _: 1 }), Z(i, { class: "dialog-text" }, { default: q(() => [ Z(g, { 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 }), Z(i, { class: "dialog-text" }, { default: q(() => [ Z(y, { class: "button", type: "primary", plain: "", onClick: o.submit }, { default: q(() => [ ze(" Submit ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ], 64)) : ($(), ae(i, { key: 0 }, { default: q(() => [ Z(l, { class: "standard-icon" }, { default: q(() => [ Z(c, { onClick: t[2] || (t[2] = (w) => e.editing = !0) }) ]), _: 1 }), o.isDeleted ? ($(), ae(l, { key: 0, class: "standard-icon" }, { default: q(() => [ Z(d, { onClick: o.submit }, null, 8, ["onClick"]) ]), _: 1 })) : o.isPositionUpdated ? ($(), ae(l, { key: 1, class: "standard-icon" }, { default: q(() => [ Z(f, { onClick: o.submit }, null, 8, ["onClick"]) ]), _: 1 })) : te("", !0) ]), _: 1 })), e.errorMessage ? ($(), ae(i, { key: 2, class: "dialog-text" }, { default: q(() => [ K("strong", CZe, _e(e.errorMessage), 1) ]), _: 1 })) : te("", !0) ], 64)) : te("", !0) ], 64)) : te("", !0) ], 64)) : te("", !0) ]) ]), _: 1 }); } const EZe = /* @__PURE__ */ cx(fZe, [["render", SZe], ["__scopeId", "data-v-9930ef40"]]), _Ze = { name: "CreateTooltipContent", components: { Button: Md, Col: m_, Container: RU, Header: zU, Input: lx, Main: y_ }, 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"); } } }, TZe = (e) => (ma("data-v-d61c5879"), e = e(), ya(), e), $Ze = /* @__PURE__ */ TZe(() => /* @__PURE__ */ K("span", { class: "create-text" }, " Primitives will be created in the __annotation region ", -1)); function OZe(e, t, n, r, a, o) { const i = zU, s = m_, l = PU, u = lx, c = Md, d = y_, f = RU; return $(), ae(f, { class: "create-container" }, { default: q(() => [ Z(i, { height: "30px", class: "header" }, { default: q(() => [ K("div", null, "Create " + _e(n.createData.shape), 1) ]), _: 1 }), Z(d, { class: "slides-block" }, { default: q(() => [ $Ze, qe(Z(l, { class: "row" }, { default: q(() => [ Z(s, { offset: 0, span: 8 }, { default: q(() => [ ze(" Position: ") ]), _: 1 }), Z(s, { offset: 0, span: 16 }, { default: q(() => [ ($(!0), B(Ue, null, yt(n.createData.points, ({ value: h, i: p }) => ($(), ae(l, { key: p, class: "value" }, { default: q(() => [ ze(_e(p), 1) ]), _: 2 }, 1024))), 128)) ]), _: 1 }) ]), _: 1 }, 512), [ [ct, e.showPoint] ]), Z(l, { class: "row" }, { default: q(() => [ Z(s, { offset: 0, span: 8 }, { default: q(() => [ ze(" Region: ") ]), _: 1 }), Z(s, { offset: 0, span: 16 }, { default: q(() => [ Z(u, { modelValue: e.region, "onUpdate:modelValue": t[0] || (t[0] = (h) => e.region = h), placeholder: "__annotation", size: "small" }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }), Z(l, { class: "row" }, { default: q(() => [ Z(s, { offset: 0, span: 8 }, { default: q(() => [ ze(" Group: ") ]), _: 1 }), Z(s, { offset: 0, span: 16 }, { default: q(() => [ Z(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 }), Z(l, null, { default: q(() => [ Z(s, { offset: 0, span: 12 }, { default: q(() => [ Z(c, { type: "primary", plain: "", onClick: o.confirm }, { default: q(() => [ ze(_e(o.confirmText), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }), Z(s, { offset: 0, span: 12 }, { default: q(() => [ Z(c, { type: "primary", plain: "", onClick: o.cancel }, { default: q(() => [ ze(" Cancel ") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ]), _: 1 }); } const FZe = /* @__PURE__ */ cx(_Ze, [["render", OZe], ["__scopeId", "data-v-d61c5879"]]); function zr(e) { "@babel/helpers - typeof"; return zr = 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; }, zr(e); } function x_(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function AZe(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 k_(e, t, n) { return t && AZe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function qU(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function $i(e, t) { return IZe(e) || PZe(e, t) || WU(e, t) || LZe(); } function IZe(e) { if (Array.isArray(e)) return e; } function PZe(e, t) { var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n != null) { var r = [], a = !0, o = !1, i, s; try { for (n = n.call(e); !(a = (i = n.next()).done) && (r.push(i.value), !(t && r.length === t)); a = !0) ; } catch (l) { o = !0, s = l; } finally { try { !a && n.return != null && n.return(); } finally { if (o) throw s; } } return r; } } function WU(e, t) { if (e) { if (typeof e == "string") return A9(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 A9(e, t); } } function A9(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 LZe() { 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 KU(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (!n) { if (Array.isArray(e) || (n = WU(e)) || t) { n && (e = n); var r = 0, a = function() { }; return { s: a, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }, e: function(l) { throw l; }, f: a }; } 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 o = !0, i = !1, s; return { s: function() { n = n.call(e); }, n: function() { var l = n.next(); return o = l.done, l; }, e: function(l) { i = !0, s = l; }, f: function() { try { !o && n.return != null && n.return(); } finally { if (i) throw s; } } }; } var Fr = typeof window > "u" ? null : window, I9 = Fr ? Fr.navigator : null; Fr && Fr.document; var NZe = zr(""), GU = zr({}), MZe = zr(function() { }), DZe = typeof HTMLElement > "u" ? "undefined" : zr(HTMLElement), _m = function(e) { return e && e.instanceString && sr(e.instanceString) ? e.instanceString() : null; }, xt = function(e) { return e != null && zr(e) == NZe; }, sr = function(e) { return e != null && zr(e) === MZe; }, Vn = function(e) { return !No(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, mn = function(e) { return e != null && zr(e) === GU && !Vn(e) && e.constructor === Object; }, BZe = function(e) { return e != null && zr(e) === GU; }, it = function(e) { return e != null && zr(e) === zr(1) && !isNaN(e); }, RZe = function(e) { return it(e) && Math.floor(e) === e; }, Jb = function(e) { if (DZe !== "undefined") return e != null && e instanceof HTMLElement; }, No = function(e) { return Tm(e) || XU(e); }, Tm = function(e) { return _m(e) === "collection" && e._private.single; }, XU = function(e) { return _m(e) === "collection" && !e._private.single; }, C_ = function(e) { return _m(e) === "core"; }, YU = function(e) { return _m(e) === "stylesheet"; }, zZe = function(e) { return _m(e) === "event"; }, tc = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, VZe = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, jZe = function(e) { return mn(e) && it(e.x1) && it(e.x2) && it(e.y1) && it(e.y2); }, HZe = function(e) { return BZe(e) && sr(e.then); }, UZe = function() { return I9 && I9.userAgent.match(/msie|trident|edge/i); }, cg = function(e, t) { t || (t = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var r = [], a = 0; a < arguments.length; a++) r.push(arguments[a]); return r.join("$"); }); var n = function r() { var a = this, o = arguments, i, s = t.apply(a, o), l = r.cache; return (i = l[s]) || (i = l[s] = e.apply(a, o)), i; }; return n.cache = {}, n; }, S_ = cg(function(e) { return e.replace(/([A-Z])/g, function(t) { return "-" + t.toLowerCase(); }); }), dx = cg(function(e) { return e.replace(/(-\w)/g, function(t) { return t[1].toUpperCase(); }); }), ZU = cg(function(e, t) { return e + t[0].toUpperCase() + t.substring(1); }, function(e, t) { return e + "$" + t; }), P9 = function(e) { return tc(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, Dr = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", qZe = "rgb[a]?\\((" + Dr + "[%]?)\\s*,\\s*(" + Dr + "[%]?)\\s*,\\s*(" + Dr + "[%]?)(?:\\s*,\\s*(" + Dr + "))?\\)", WZe = "rgb[a]?\\((?:" + Dr + "[%]?)\\s*,\\s*(?:" + Dr + "[%]?)\\s*,\\s*(?:" + Dr + "[%]?)(?:\\s*,\\s*(?:" + Dr + "))?\\)", KZe = "hsl[a]?\\((" + Dr + ")\\s*,\\s*(" + Dr + "[%])\\s*,\\s*(" + Dr + "[%])(?:\\s*,\\s*(" + Dr + "))?\\)", GZe = "hsl[a]?\\((?:" + Dr + ")\\s*,\\s*(?:" + Dr + "[%])\\s*,\\s*(?:" + Dr + "[%])(?:\\s*,\\s*(?:" + Dr + "))?\\)", XZe = "\\#[0-9a-fA-F]{3}", YZe = "\\#[0-9a-fA-F]{6}", QU = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; }, ZZe = function(e, t) { return -1 * QU(e, t); }, It = 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 a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o]; e[i] = r[i]; } } return e; }, QZe = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var t = e.length === 4, n, r, a, o = 16; return t ? (n = parseInt(e[1] + e[1], o), r = parseInt(e[2] + e[2], o), a = parseInt(e[3] + e[3], o)) : (n = parseInt(e[1] + e[2], o), r = parseInt(e[3] + e[4], o), a = parseInt(e[5] + e[6], o)), [n, r, a]; } }, JZe = function(e) { var t, n, r, a, o, 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("^" + KZe + "$").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, a = parseFloat(c[3]), a < 0 || a > 100) || (a = a / 100, o = c[4], o !== void 0 && (o = parseFloat(o), o < 0 || o > 1))) return; if (r === 0) i = s = l = Math.round(a * 255); else { var d = a < 0.5 ? a * (1 + r) : a + r - a * r, f = 2 * a - 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, o]; } return t; }, eQe = function(e) { var t, n = new RegExp("^" + qZe + "$").exec(e); if (n) { t = []; for (var r = [], a = 1; a <= 3; a++) { var o = n[a]; if (o[o.length - 1] === "%" && (r[a] = !0), o = parseFloat(o), r[a] && (o = o / 100 * 255), o < 0 || o > 255) return; t.push(Math.floor(o)); } 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; }, tQe = function(e) { return rQe[e.toLowerCase()]; }, nQe = function(e) { return (Vn(e) ? e : null) || tQe(e) || QZe(e) || eQe(e) || JZe(e); }, rQe = { // 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] }, JU = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (mn(o)) throw Error("Tried to set map with object key"); a < n.length - 1 ? (t[o] == null && (t[o] = {}), t = t[o]) : t[o] = e.value; } }, eq = function(e) { for (var t = e.map, n = e.keys, r = n.length, a = 0; a < r; a++) { var o = n[a]; if (mn(o)) throw Error("Tried to get map with object key"); if (t = t[o], t == null) return t; } return t; }; function aQe(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } var Dd = aQe, Rv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function oQe(e, t) { return t = { exports: {} }, e(t, t.exports), t.exports; } var iQe = typeof Rv == "object" && Rv && Rv.Object === Object && Rv, sQe = iQe, lQe = typeof self == "object" && self && self.Object === Object && self, uQe = sQe || lQe || Function("return this")(), px = uQe, cQe = function() { return px.Date.now(); }, lC = cQe, dQe = /\s/; function pQe(e) { for (var t = e.length; t-- && dQe.test(e.charAt(t)); ) ; return t; } var fQe = pQe, hQe = /^\s+/; function vQe(e) { return e && e.slice(0, fQe(e) + 1).replace(hQe, ""); } var gQe = vQe, mQe = px.Symbol, ah = mQe, tq = Object.prototype, yQe = tq.hasOwnProperty, bQe = tq.toString, Sv = ah ? ah.toStringTag : void 0; function wQe(e) { var t = yQe.call(e, Sv), n = e[Sv]; try { e[Sv] = void 0; var r = !0; } catch { } var a = bQe.call(e); return r && (t ? e[Sv] = n : delete e[Sv]), a; } var xQe = wQe, kQe = Object.prototype, CQe = kQe.toString; function SQe(e) { return CQe.call(e); } var EQe = SQe, _Qe = "[object Null]", TQe = "[object Undefined]", L9 = ah ? ah.toStringTag : void 0; function $Qe(e) { return e == null ? e === void 0 ? TQe : _Qe : L9 && L9 in Object(e) ? xQe(e) : EQe(e); } var nq = $Qe; function OQe(e) { return e != null && typeof e == "object"; } var FQe = OQe, AQe = "[object Symbol]"; function IQe(e) { return typeof e == "symbol" || FQe(e) && nq(e) == AQe; } var $m = IQe, N9 = NaN, PQe = /^[-+]0x[0-9a-f]+$/i, LQe = /^0b[01]+$/i, NQe = /^0o[0-7]+$/i, MQe = parseInt; function DQe(e) { if (typeof e == "number") return e; if ($m(e)) return N9; if (Dd(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = Dd(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; e = gQe(e); var n = LQe.test(e); return n || NQe.test(e) ? MQe(e.slice(2), n ? 2 : 8) : PQe.test(e) ? N9 : +e; } var M9 = DQe, BQe = "Expected a function", RQe = Math.max, zQe = Math.min; function VQe(e, t, n) { var r, a, o, i, s, l, u = 0, c = !1, d = !1, f = !0; if (typeof e != "function") throw new TypeError(BQe); t = M9(t) || 0, Dd(n) && (c = !!n.leading, d = "maxWait" in n, o = d ? RQe(M9(n.maxWait) || 0, t) : o, f = "trailing" in n ? !!n.trailing : f); function h(C) { var S = r, _ = a; return r = a = void 0, u = C, i = e.apply(_, S), i; } function p(C) { return u = C, s = setTimeout(g, t), c ? h(C) : i; } function v(C) { var S = C - l, _ = C - u, T = t - S; return d ? zQe(T, o - _) : T; } function m(C) { var S = C - l, _ = C - u; return l === void 0 || S >= t || S < 0 || d && _ >= o; } function g() { var C = lC(); if (m(C)) return y(C); s = setTimeout(g, v(C)); } function y(C) { return s = void 0, f && r ? h(C) : (r = a = void 0, i); } function x() { s !== void 0 && clearTimeout(s), u = 0, r = l = a = s = void 0; } function w() { return s === void 0 ? i : y(lC()); } function k() { var C = lC(), S = m(C); if (r = arguments, a = this, l = C, 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 k.cancel = x, k.flush = w, k; } var fx = VQe, uC = Fr ? Fr.performance : null, rq = uC && uC.now ? function() { return uC.now(); } : function() { return Date.now(); }, jQe = function() { if (Fr) { if (Fr.requestAnimationFrame) return function(e) { Fr.requestAnimationFrame(e); }; if (Fr.mozRequestAnimationFrame) return function(e) { Fr.mozRequestAnimationFrame(e); }; if (Fr.webkitRequestAnimationFrame) return function(e) { Fr.webkitRequestAnimationFrame(e); }; if (Fr.msRequestAnimationFrame) return function(e) { Fr.msRequestAnimationFrame(e); }; } return function(e) { e && setTimeout(function() { e(rq()); }, 1e3 / 60); }; }(), e2 = function(e) { return jQe(e); }, _l = rq, ef = 9261, aq = 65599, zv = 5381, oq = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ef, n = t, r; r = e.next(), !r.done; ) n = n * aq + r.value | 0; return n; }, dg = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ef; return t * aq + e | 0; }, pg = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : zv; return (t << 5) + t + e | 0; }, HQe = function(e, t) { return e * 2097152 + t; }, tu = function(e) { return e[0] * 2097152 + e[1]; }, j1 = function(e, t) { return [dg(e[0], t[0]), pg(e[1], t[1])]; }, UQe = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e[r++] : n.done = !0, n; } }; return oq(o, t); }, Bd = function(e, t) { var n = { value: 0, done: !1 }, r = 0, a = e.length, o = { next: function() { return r < a ? n.value = e.charCodeAt(r++) : n.done = !0, n; } }; return oq(o, t); }, iq = function() { return qQe(arguments); }, qQe = function(e) { for (var t, n = 0; n < e.length; n++) { var r = e[n]; n === 0 ? t = Bd(r) : t = Bd(r, t); } return t; }, D9 = !0, WQe = console.warn != null, KQe = console.trace != null, E_ = Number.MAX_SAFE_INTEGER || 9007199254740991, sq = function() { return !0; }, t2 = function() { return !1; }, B9 = function() { return 0; }, __ = function() { }, fr = function(e) { throw new Error(e); }, lq = function(e) { if (e !== void 0) D9 = !!e; else return D9; }, An = function(e) { lq() && (WQe ? console.warn(e) : (console.log(e), KQe && console.trace())); }, GQe = function(e) { return It({}, e); }, fs = function(e) { return e == null ? e : Vn(e) ? e.slice() : mn(e) ? GQe(e) : e; }, XQe = function(e) { return e.slice(); }, uq = 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; }, YQe = {}, cq = function() { return YQe; }, xa = function(e) { var t = Object.keys(e); return function(n) { for (var r = {}, a = 0; a < t.length; a++) { var o = t[a], i = n == null ? void 0 : n[o]; r[o] = i === void 0 ? e[o] : i; } return r; }; }, nc = function(e, t, n) { for (var r = e.length - 1; r >= 0; r--) e[r] === t && e.splice(r, 1); }, T_ = function(e) { e.splice(0, e.length); }, ZQe = function(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.push(r); } }, Li = function(e, t, n) { return n && (t = ZU(n, t)), e[t]; }, Cu = function(e, t, n, r) { n && (t = ZU(n, t)), e[t] = r; }, QQe = /* @__PURE__ */ function() { function e() { x_(this, e), this._obj = {}; } return k_(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; }(), hs = typeof Map < "u" ? Map : QQe, JQe = "undefined", eJe = /* @__PURE__ */ function() { function e(t) { if (x_(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 k_(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; }(), Rh = (typeof Set > "u" ? "undefined" : zr(Set)) !== JQe ? Set : eJe, hx = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; if (e === void 0 || t === void 0 || !C_(e)) { fr("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") { fr("An element must be of type `nodes` or `edges`; you specified `" + r + "`"); return; } this.length = 1, this[0] = this; var a = 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 Rh(), // 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 (a.position.x == null && (a.position.x = 0), a.position.y == null && (a.position.y = 0), t.renderedPosition) { var o = t.renderedPosition, i = e.pan(), s = e.zoom(); a.position = { x: (o.x - i.x) / s, y: (o.y - i.y) / s }; } var l = []; Vn(t.classes) ? l = t.classes : xt(t.classes) && (l = t.classes.split(/\s+/)); for (var u = 0, c = l.length; u < c; u++) { var d = l[u]; !d || d === "" || a.classes.add(d); } this.createEmitter(); var f = t.style || t.css; f && (An("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(); }, R9 = function(e) { return e = { bfs: e.bfs || !e.dfs, dfs: e.dfs || !e.bfs }, function(t, n, r) { var a; mn(t) && !No(t) && (a = t, t = a.roots || a.root, n = a.visit, r = a.directed), r = arguments.length === 2 && !sr(n) ? n : r, n = sr(n) ? n : function() { }; for (var o = this._private.cy, i = t = xt(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 y = i[g], x = y.id(); y.isNode() && (s.unshift(y), e.bfs && (d[x] = !0, l.push(y)), c[x] = 0); } for (var w = function() { var F = e.bfs ? s.shift() : s.pop(), A = F.id(); if (e.dfs) { if (d[A]) return "continue"; d[A] = !0, l.push(F); } var I = c[A], N = u[A], L = N != null ? N.source() : null, z = N != null ? N.target() : null, P = N == null ? void 0 : F.same(L) ? z[0] : L[0], D = void 0; if (D = n(F, N, P, f++, I), D === !0) return h = F, "break"; if (D === !1) return "break"; for (var M = F.connectedEdges().filter(function(ue) { return (!r || ue.source().same(F)) && m.has(ue); }), V = 0; V < M.length; V++) { var Q = M[V], X = Q.connectedNodes().filter(function(ue) { return !ue.same(F) && v.has(ue); }), ee = X.id(); X.length !== 0 && !d[ee] && (X = X[0], s.push(X), e.bfs && (d[ee] = !0, l.push(X)), u[ee] = Q, c[ee] = c[A] + 1); } }; s.length !== 0; ) { var k = w(); if (k !== "continue" && k === "break") break; } for (var C = o.collection(), S = 0; S < l.length; S++) { var _ = l[S], T = u[_.id()]; T != null && C.push(T), C.push(_); } return { path: o.collection(C), found: o.collection(h) }; }; }, fg = { breadthFirstSearch: R9({ bfs: !0 }), depthFirstSearch: R9({ dfs: !0 }) }; fg.bfs = fg.breadthFirstSearch; fg.dfs = fg.depthFirstSearch; var tJe = oQe(function(e, t) { (function() { var n, r, a, o, i, s, l, u, c, d, f, h, p, v, m; a = Math.floor, d = Math.min, r = function(g, y) { return g < y ? -1 : g > y ? 1 : 0; }, c = function(g, y, x, w, k) { var C; if (x == null && (x = 0), k == null && (k = r), x < 0) throw new Error("lo must be non-negative"); for (w == null && (w = g.length); x < w; ) C = a((x + w) / 2), k(y, g[C]) < 0 ? w = C : x = C + 1; return [].splice.apply(g, [x, x - x].concat(y)), y; }, s = function(g, y, x) { return x == null && (x = r), g.push(y), v(g, 0, g.length - 1, x); }, i = function(g, y) { var x, w; return y == null && (y = r), x = g.pop(), g.length ? (w = g[0], g[0] = x, m(g, 0, y)) : w = x, w; }, u = function(g, y, x) { var w; return x == null && (x = r), w = g[0], g[0] = y, m(g, 0, x), w; }, l = function(g, y, x) { var w; return x == null && (x = r), g.length && x(g[0], y) < 0 && (w = [g[0], y], y = w[0], g[0] = w[1], m(g, 0, x)), y; }, o = function(g, y) { var x, w, k, C, S, _; for (y == null && (y = r), C = (function() { _ = []; for (var T = 0, F = a(g.length / 2); 0 <= F ? T < F : T > F; 0 <= F ? T++ : T--) _.push(T); return _; }).apply(this).reverse(), S = [], w = 0, k = C.length; w < k; w++) x = C[w], S.push(m(g, x, y)); return S; }, p = function(g, y, x) { var w; if (x == null && (x = r), w = g.indexOf(y), w !== -1) return v(g, 0, w, x), m(g, w, x); }, f = function(g, y, x) { var w, k, C, S, _; if (x == null && (x = r), k = g.slice(0, y), !k.length) return k; for (o(k, x), _ = g.slice(y), C = 0, S = _.length; C < S; C++) w = _[C], l(k, w, x); return k.sort(x).reverse(); }, h = function(g, y, x) { var w, k, C, S, _, T, F, A, I; if (x == null && (x = r), y * 10 <= g.length) { if (C = g.slice(0, y).sort(x), !C.length) return C; for (k = C[C.length - 1], F = g.slice(y), S = 0, T = F.length; S < T; S++) w = F[S], x(w, k) < 0 && (c(C, w, 0, null, x), C.pop(), k = C[C.length - 1]); return C; } for (o(g, x), I = [], _ = 0, A = d(y, g.length); 0 <= A ? _ < A : _ > A; 0 <= A ? ++_ : --_) I.push(i(g, x)); return I; }, v = function(g, y, x, w) { var k, C, S; for (w == null && (w = r), k = g[x]; x > y; ) { if (S = x - 1 >> 1, C = g[S], w(k, C) < 0) { g[x] = C, x = S; continue; } break; } return g[x] = k; }, m = function(g, y, x) { var w, k, C, S, _; for (x == null && (x = r), k = g.length, _ = y, C = g[y], w = 2 * y + 1; w < k; ) S = w + 1, S < k && !(x(g[w], g[S]) < 0) && (w = S), g[y] = g[w], y = w, w = 2 * y + 1; return g[y] = C, v(g, _, y, x); }, n = function() { g.push = s, g.pop = i, g.replace = u, g.pushpop = l, g.heapify = o, g.updateItem = p, g.nlargest = f, g.nsmallest = h; function g(y) { this.cmp = y ?? r, this.nodes = []; } return g.prototype.push = function(y) { return s(this.nodes, y, this.cmp); }, g.prototype.pop = function() { return i(this.nodes, this.cmp); }, g.prototype.peek = function() { return this.nodes[0]; }, g.prototype.contains = function(y) { return this.nodes.indexOf(y) !== -1; }, g.prototype.replace = function(y) { return u(this.nodes, y, this.cmp); }, g.prototype.pushpop = function(y) { return l(this.nodes, y, this.cmp); }, g.prototype.heapify = function() { return o(this.nodes, this.cmp); }, g.prototype.updateItem = function(y) { return p(this.nodes, y, 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 y; return y = new g(), y.nodes = this.nodes.slice(0), y; }, 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, y) { return e.exports = y(); }(this, function() { return n; }); }).call(Rv); }), Om = tJe, nJe = xa({ root: null, weight: function(e) { return 1; }, directed: !1 }), rJe = { dijkstra: function(e) { if (!mn(e)) { var t = arguments; e = { root: t[0], weight: t[1], directed: t[2] }; } var n = nJe(e), r = n.root, a = n.weight, o = n.directed, i = this, s = a, l = xt(r) ? this.filter(r)[0] : r[0], u = {}, c = {}, d = {}, f = this.byGroup(), h = f.nodes, p = f.edges; p.unmergeBy(function(L) { return L.isLoop(); }); for (var v = function(L) { return u[L.id()]; }, m = function(L, z) { u[L.id()] = z, g.updateItem(L); }, g = new Om(function(L, z) { return v(L) - v(z); }), y = 0; y < h.length; y++) { var x = h[y]; u[x.id()] = x.same(l) ? 0 : 1 / 0, g.push(x); } for (var w = function(L, z) { for (var P = (o ? L.edgesTo(z) : L.edgesWith(z)).intersect(p), D = 1 / 0, M, V = 0; V < P.length; V++) { var Q = P[V], X = s(Q); (X < D || !M) && (D = X, M = Q); } return { edge: M, dist: D }; }; g.size() > 0; ) { var k = g.pop(), C = v(k), S = k.id(); if (d[S] = C, C !== 1 / 0) for (var _ = k.neighborhood().intersect(h), T = 0; T < _.length; T++) { var F = _[T], A = F.id(), I = w(k, F), N = C + I.dist; N < v(F) && (m(F, N), c[A] = { node: k, edge: I.edge }); } } return { distanceTo: function(L) { var z = xt(L) ? h.filter(L)[0] : L[0]; return d[z.id()]; }, pathTo: function(L) { var z = xt(L) ? h.filter(L)[0] : L[0], P = [], D = z, M = D.id(); if (z.length > 0) for (P.unshift(z); c[M]; ) { var V = c[M]; P.unshift(V.edge), P.unshift(V.node), D = V.node, M = D.id(); } return i.spawn(P); } }; } }, aJe = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e) { e = e || function(y) { return 1; }; for (var t = this.byGroup(), n = t.nodes, r = t.edges, a = n.length, o = new Array(a), i = n, s = function(y) { for (var x = 0; x < o.length; x++) { var w = o[x]; if (w.has(y)) return x; } }, l = 0; l < a; l++) o[l] = this.spawn(n[l]); for (var u = r.sort(function(y, x) { return e(y) - e(x); }), 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 = o[p], g = o[v]; p !== v && (i.merge(d), m.merge(g), o.splice(v, 1)); } return i; } }, oJe = xa({ root: null, goal: null, weight: function(e) { return 1; }, heuristic: function(e) { return 0; }, directed: !1 }), iJe = { // Implemented from pseudocode from wikipedia aStar: function(e) { var t = this.cy(), n = oJe(e), r = n.root, a = n.goal, o = n.heuristic, i = n.directed, s = n.weight; r = t.collection(r)[0], a = t.collection(a)[0]; var l = r.id(), u = a.id(), c = {}, d = {}, f = {}, h = new Om(function(V, Q) { return d[V.id()] - d[Q.id()]; }), p = new Rh(), v = {}, m = {}, g = function(V, Q) { h.push(V), p.add(Q); }, y, x, w = function() { y = h.pop(), x = y.id(), p.delete(x); }, k = function(V) { return p.has(V); }; g(r, l), c[l] = 0, d[l] = o(r); for (var C = 0; h.size() > 0; ) { if (w(), C++, x === u) { for (var S = [], _ = a, T = u, F = m[T]; S.unshift(_), F != null && S.unshift(F), _ = v[T], _ != null; ) T = _.id(), F = m[T]; return { found: !0, distance: c[x], path: this.spawn(S), steps: C }; } f[x] = !0; for (var A = y._private.edges, I = 0; I < A.length; I++) { var N = A[I]; if (this.hasElementWithId(N.id()) && !(i && N.data("source") !== x)) { var L = N.source(), z = N.target(), P = L.id() !== x ? L : z, D = P.id(); if (this.hasElementWithId(D) && !f[D]) { var M = c[x] + s(N); if (!k(D)) { c[D] = M, d[D] = M + o(P), g(P, D), v[D] = y, m[D] = N; continue; } M < c[D] && (c[D] = M, d[D] = M + o(P), v[D] = y, m[D] = N); } } } } return { found: !1, distance: void 0, path: void 0, steps: C }; } }, sJe = xa({ weight: function(e) { return 1; }, directed: !1 }), lJe = { // Implemented from pseudocode from wikipedia floydWarshall: function(e) { for (var t = this.cy(), n = sJe(e), r = n.weight, a = n.directed, o = r, i = this.byGroup(), s = i.nodes, l = i.edges, u = s.length, c = u * u, d = function(X) { return s.indexOf(X); }, f = function(X) { return s[X]; }, 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), y = new Array(c), x = 0; x < l.length; x++) { var w = l[x], k = w.source()[0], C = w.target()[0]; if (k !== C) { var S = d(k), _ = d(C), T = S * u + _, F = o(w); if (h[T] > F && (h[T] = F, g[T] = _, y[T] = w), !a) { var A = _ * u + S; !a && h[A] > F && (h[A] = F, g[A] = S, y[A] = w); } } } for (var I = 0; I < u; I++) for (var N = 0; N < u; N++) for (var L = N * u + I, z = 0; z < u; z++) { var P = N * u + z, D = I * u + z; h[L] + h[D] < h[P] && (h[P] = h[L] + h[D], g[P] = g[L]); } var M = function(X) { return (xt(X) ? t.filter(X) : X)[0]; }, V = function(X) { return d(M(X)); }, Q = { distance: function(X, ee) { var ue = V(X), ve = V(ee); return h[ue * u + ve]; }, path: function(X, ee) { var ue = V(X), ve = V(ee), ge = f(ue); if (ue === ve) return ge.collection(); if (g[ue * u + ve] == null) return t.collection(); var se = t.collection(), ne = ue, W; for (se.merge(ge); ue !== ve; ) ne = ue, ue = g[ue * u + ve], W = y[ne * u + ue], se.merge(W), se.merge(f(ue)); return se; } }; return Q; } // floydWarshall }, uJe = xa({ weight: function(e) { return 1; }, directed: !1, root: null }), cJe = { // Implemented from pseudocode from wikipedia bellmanFord: function(e) { var t = this, n = uJe(e), r = n.weight, a = n.directed, o = n.root, i = r, s = this, l = this.cy(), u = this.byGroup(), c = u.edges, d = u.nodes, f = d.length, h = new hs(), p = !1, v = []; o = l.collection(o)[0], c.unmergeBy(function(Se) { return Se.isLoop(); }); for (var m = c.length, g = function(Se) { var Pe = h.get(Se.id()); return Pe || (Pe = {}, h.set(Se.id(), Pe)), Pe; }, y = function(Se) { return (xt(Se) ? l.$(Se) : Se)[0]; }, x = function(Se) { return g(y(Se)).dist; }, w = function(Se) { for (var Pe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : o, Me = y(Se), He = [], De = Me; ; ) { if (De == null) return t.spawn(); var Xe = g(De), Ge = Xe.edge, Ze = Xe.pred; if (He.unshift(De[0]), De.same(Pe) && He.length > 0) break; Ge != null && He.unshift(Ge), De = Ze; } return s.spawn(He); }, k = 0; k < f; k++) { var C = d[k], S = g(C); C.same(o) ? S.dist = 0 : S.dist = 1 / 0, S.pred = null, S.edge = null; } for (var _ = !1, T = function(Se, Pe, Me, He, De, Xe) { var Ge = He.dist + Xe; Ge < De.dist && !Me.same(He.edge) && (De.dist = Ge, De.pred = Se, De.edge = Me, _ = !0); }, F = 1; F < f; F++) { _ = !1; for (var A = 0; A < m; A++) { var I = c[A], N = I.source(), L = I.target(), z = i(I), P = g(N), D = g(L); T(N, L, I, P, D, z), a || T(L, N, I, D, P, z); } if (!_) break; } if (_) for (var M = [], V = 0; V < m; V++) { var Q = c[V], X = Q.source(), ee = Q.target(), ue = i(Q), ve = g(X).dist, ge = g(ee).dist; if (ve + ue < ge || !a && ge + ue < ve) if (p || (An("Graph contains a negative weight cycle for Bellman-Ford"), p = !0), e.findNegativeWeightCycles !== !1) { var se = []; ve + ue < ge && se.push(X), !a && ge + ue < ve && se.push(ee); for (var ne = se.length, W = 0; W < ne; W++) { var Y = se[W], re = [Y]; re.push(g(Y).edge); for (var we = g(Y).pred; re.indexOf(we) === -1; ) re.push(we), re.push(g(we).edge), we = g(we).pred; re = re.slice(re.indexOf(we)); for (var Oe = re[0].id(), Ne = 0, xe = 2; xe < re.length; xe += 2) re[xe].id() < Oe && (Oe = re[xe].id(), Ne = xe); re = re.slice(Ne).concat(re.slice(0, Ne)), re.push(re[0]); var Fe = re.map(function(Se) { return Se.id(); }).join(","); M.indexOf(Fe) === -1 && (v.push(s.spawn(re)), M.push(Fe)); } } else break; } return { distanceTo: x, pathTo: w, hasNegativeWeightCycle: p, negativeWeightCycles: v }; } // bellmanFord }, dJe = Math.sqrt(2), pJe = function(e, t, n) { n.length === 0 && fr("Karger-Stein must be run on a connected (sub)graph"); for (var r = n[e], a = r[1], o = r[2], i = t[a], s = t[o], 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; }, cC = function(e, t, n, r) { for (; n > r; ) { var a = Math.floor(Math.random() * t.length); t = pJe(a, e, t), n--; } return t; }, fJe = { // 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(D) { return D.isLoop(); }); var a = n.length, o = r.length, i = Math.ceil(Math.pow(Math.log(a) / Math.LN2, 2)), s = Math.floor(a / dJe); if (a < 2) { fr("At least 2 nodes are required for Karger-Stein algorithm"); return; } for (var l = [], u = 0; u < o; 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(a), p = new Array(a), v = new Array(a), m = function(D, M) { for (var V = 0; V < a; V++) M[V] = D[V]; }, g = 0; g <= i; g++) { for (var y = 0; y < a; y++) p[y] = y; var x = cC(p, l.slice(), a, s), w = x.slice(); m(p, v); var k = cC(p, x, s, 2), C = cC(v, w, s, 2); k.length <= C.length && k.length < d ? (d = k.length, f = k, m(p, h)) : C.length <= k.length && C.length < d && (d = C.length, f = C, m(v, h)); } for (var S = this.spawn(f.map(function(D) { return r[D[0]]; })), _ = this.spawn(), T = this.spawn(), F = h[0], A = 0; A < h.length; A++) { var I = h[A], N = n[A]; I === F ? _.merge(N) : T.merge(N); } var L = function(D) { var M = e.spawn(); return D.forEach(function(V) { M.merge(V), V.connectedEdges().forEach(function(Q) { e.contains(Q) && !S.contains(Q) && M.merge(Q); }); }), M; }, z = [L(_), L(T)], P = { cut: S, components: z, // n.b. partitions are included to be compatible with the old api spec // (could be removed in a future major version) partition1: _, partition2: T }; return P; } }, hJe = function(e) { return { x: e.x, y: e.y }; }, vx = function(e, t, n) { return { x: e.x * t + n.x, y: e.y * t + n.y }; }, dq = function(e, t, n) { return { x: (e.x - n.x) / t, y: (e.y - n.y) / t }; }, tf = function(e) { return { x: e[0], y: e[1] }; }, vJe = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.min(o, r)); } return r; }, gJe = 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, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (r = Math.max(o, r)); } return r; }, mJe = 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, a = 0, o = t; o < n; o++) { var i = e[o]; isFinite(i) && (r += i, a++); } return r / a; }, yJe = 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, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = 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]; o ? isFinite(l) || (e[s] = -1 / 0, i++) : e.splice(s, 1); } a && 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; }, bJe = function(e) { return Math.PI * e / 180; }, H1 = function(e, t) { return Math.atan2(t, e) - Math.PI / 2; }, $_ = Math.log2 || function(e) { return Math.log(e) / Math.log(2); }, pq = function(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; }, Rd = function(e, t) { return Math.sqrt(Dc(e, t)); }, Dc = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return n * n + r * r; }, wJe = function(e) { for (var t = e.length, n = 0, r = 0; r < t; r++) n += e[r]; for (var a = 0; a < t; a++) e[a] = e[a] / n; return e; }, Wr = function(e, t, n, r) { return (1 - r) * (1 - r) * e + 2 * (1 - r) * r * t + r * r * n; }, pf = function(e, t, n, r) { return { x: Wr(e.x, t.x, n.x, r), y: Wr(e.y, t.y, n.y, r) }; }, xJe = function(e, t, n, r) { var a = { x: t.x - e.x, y: t.y - e.y }, o = Rd(e, t), i = { x: a.x / o, y: a.y / o }; return n = n ?? 0, r = r ?? n * o, { x: e.x + i.x * r, y: e.y + i.y * r }; }, hg = function(e, t, n) { return Math.max(e, Math.min(n, t)); }, Co = 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 }; } }, kJe = function(e) { return { x1: e.x1, x2: e.x2, w: e.w, y1: e.y1, y2: e.y2, h: e.h }; }, CJe = function(e) { e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; }, SJe = 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 }; }, fq = 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; }, EJe = 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; }, By = 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; }, Ry = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], n, r, a, o; if (t.length === 1) n = r = a = o = t[0]; else if (t.length === 2) n = a = t[0], o = r = t[1]; else if (t.length === 4) { var i = $i(t, 4); n = i[0], r = i[1], a = i[2], o = i[3]; } return e.x1 -= o, e.x2 += r, e.y1 -= n, e.y2 += a, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; }, z9 = 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; }, O_ = 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); }, oh = function(e, t, n) { return e.x1 <= t && t <= e.x2 && e.y1 <= n && n <= e.y2; }, _Je = function(e, t) { return oh(e, t.x, t.y); }, hq = function(e, t) { return oh(e, t.x1, t.y1) && oh(e, t.x2, t.y2); }, vq = function(e, t, n, r, a, o, i) { var s = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "auto", l = s === "auto" ? zd(a, o) : s, u = a / 2, c = o / 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 = Iu(e, t, n, r, p, v, m, g, !1), h.length > 0) return h; } if (f) { var y = n + u + i, x = r - c + l - i, w = y, k = r + c - l + i; if (h = Iu(e, t, n, r, y, x, w, k, !1), h.length > 0) return h; } if (d) { var C = n - u + l - i, S = r + c + i, _ = n + u - l + i, T = S; if (h = Iu(e, t, n, r, C, S, _, T, !1), h.length > 0) return h; } if (f) { var F = n - u - i, A = r - c + l - i, I = F, N = r + c - l + i; if (h = Iu(e, t, n, r, F, A, I, N, !1), h.length > 0) return h; } var L; { var z = n - u + l, P = r - c + l; if (L = Vv(e, t, n, r, z, P, l + i), L.length > 0 && L[0] <= z && L[1] <= P) return [L[0], L[1]]; } { var D = n + u - l, M = r - c + l; if (L = Vv(e, t, n, r, D, M, l + i), L.length > 0 && L[0] >= D && L[1] <= M) return [L[0], L[1]]; } { var V = n + u - l, Q = r + c - l; if (L = Vv(e, t, n, r, V, Q, l + i), L.length > 0 && L[0] >= V && L[1] >= Q) return [L[0], L[1]]; } { var X = n - u + l, ee = r + c - l; if (L = Vv(e, t, n, r, X, ee, l + i), L.length > 0 && L[0] <= X && L[1] >= ee) return [L[0], L[1]]; } return []; }, TJe = function(e, t, n, r, a, o, i) { var s = i, l = Math.min(n, a), u = Math.max(n, a), c = Math.min(r, o), d = Math.max(r, o); return l - s <= e && e <= u + s && c - s <= t && t <= d + s; }, $Je = function(e, t, n, r, a, o, i, s, l) { var u = { x1: Math.min(n, i, a) - l, x2: Math.max(n, i, a) + l, y1: Math.min(r, s, o) - l, y2: Math.max(r, s, o) + l }; return !(e < u.x1 || e > u.x2 || t < u.y1 || t > u.y2); }, OJe = function(e, t, n, r) { n -= r; var a = t * t - 4 * e * n; if (a < 0) return []; var o = Math.sqrt(a), i = 2 * e, s = (-t + o) / i, l = (-t - o) / i; return [s, l]; }, FJe = function(e, t, n, r, a) { var o = 1e-5; e === 0 && (e = o), 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, a[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), a[0] = -f + c + d, f += (c + d) / 2, a[4] = a[2] = -f, f = Math.sqrt(3) * (-d + c) / 2, a[3] = f, a[5] = -f; return; } if (a[5] = a[3] = 0, i === 0) { h = l < 0 ? -Math.pow(-l, 1 / 3) : Math.pow(l, 1 / 3), a[0] = -f + 2 * h, a[4] = a[2] = -(h + f); return; } s = -s, u = s * s * s, u = Math.acos(l / Math.sqrt(u)), h = 2 * Math.sqrt(s), a[0] = -f + h * Math.cos(u / 3), a[2] = -f + h * Math.cos((u + 2 * Math.PI) / 3), a[4] = -f + h * Math.cos((u + 4 * Math.PI) / 3); }, AJe = function(e, t, n, r, a, o, i, s) { var l = 1 * n * n - 4 * n * a + 2 * n * i + 4 * a * a - 4 * a * i + i * i + r * r - 4 * r * o + 2 * r * s + 4 * o * o - 4 * o * s + s * s, u = 1 * 9 * n * a - 3 * n * n - 3 * n * i - 6 * a * a + 3 * a * i + 9 * r * o - 3 * r * r - 3 * r * s - 6 * o * o + 3 * o * s, c = 1 * 3 * n * n - 6 * n * a + n * i - n * e + 2 * a * a + 2 * a * e - i * e + 3 * r * r - 6 * r * o + r * s - r * t + 2 * o * o + 2 * o * t - s * t, d = 1 * n * a - n * n + n * e - a * e + r * o - r * r + r * t - o * t, f = []; FJe(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, y, x, w = 0; w < p.length; w++) g = Math.pow(1 - p[w], 2) * n + 2 * (1 - p[w]) * p[w] * a + p[w] * p[w] * i, y = Math.pow(1 - p[w], 2) * r + 2 * (1 - p[w]) * p[w] * o + p[w] * p[w] * s, x = Math.pow(g - e, 2) + Math.pow(y - t, 2), m >= 0 ? x < m && (m = x) : m = x; return m; }, IJe = function(e, t, n, r, a, o) { var i = [e - n, t - r], s = [a - n, o - 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 - a) * (e - a) + (t - o) * (t - o) : u - d; }, ro = function(e, t, n) { for (var r, a, o, i, s, l = 0, u = 0; u < n.length / 2; u++) if (r = n[u * 2], a = n[u * 2 + 1], u + 1 < n.length / 2 ? (o = n[(u + 1) * 2], i = n[(u + 1) * 2 + 1]) : (o = n[(u + 1 - n.length / 2) * 2], i = n[(u + 1 - n.length / 2) * 2 + 1]), !(r == e && o == e)) if (r >= e && e >= o || r <= e && e <= o) s = (e - r) / (o - r) * (i - a) + a, s > t && l++; else continue; return l % 2 !== 0; }, Tl = function(e, t, n, r, a, o, 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] = o / 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] += a; var p; if (l > 0) { var v = r2(u, -l); p = n2(v); } else p = u; return ro(e, t, p); }, PJe = function(e, t, n, r, a, o, 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); }, n2 = function(e) { for (var t = new Array(e.length / 2), n, r, a, o, i, s, l, u, c = 0; c < e.length / 4; c++) { n = e[c * 4], r = e[c * 4 + 1], a = e[c * 4 + 2], o = 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 = Iu(n, r, a, o, i, s, l, u, !0); t[c * 2] = d[0], t[c * 2 + 1] = d[1]; } return t; }, r2 = function(e, t) { for (var n = new Array(e.length * 2), r, a, o, i, s = 0; s < e.length / 2; s++) { r = e[s * 2], a = e[s * 2 + 1], s < e.length / 2 - 1 ? (o = e[(s + 1) * 2], i = e[(s + 1) * 2 + 1]) : (o = e[0], i = e[1]); var l = i - a, u = -(o - r), c = Math.sqrt(l * l + u * u), d = l / c, f = u / c; n[s * 4] = r + d * t, n[s * 4 + 1] = a + f * t, n[s * 4 + 2] = o + d * t, n[s * 4 + 3] = i + f * t; } return n; }, LJe = function(e, t, n, r, a, o) { var i = n - e, s = r - t; i /= a, s /= o; 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]; }, Zc = function(e, t, n, r, a, o, i) { return e -= a, t -= o, e /= n / 2 + i, t /= r / 2 + i, e * e + t * t <= 1; }, Vv = function(e, t, n, r, a, o, i) { var s = [n - e, r - t], l = [e - a, t - o], 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 y = g[0] * s[0] + e, x = g[0] * s[1] + t; if (g.length > 1) { if (g[0] == g[1]) return [y, x]; var w = g[1] * s[0] + e, k = g[1] * s[1] + t; return [y, x, w, k]; } else return [y, x]; }, dC = function(e, t, n) { return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n; }, Iu = function(e, t, n, r, a, o, i, s, l) { var u = e - a, c = n - e, d = i - a, f = t - o, h = r - t, p = s - o, v = d * f - p * u, m = c * f - h * u, g = p * c - d * h; if (g !== 0) { var y = v / g, x = m / g, w = 1e-3, k = 0 - w, C = 1 + w; return k <= y && y <= C && k <= x && x <= C ? [e + y * c, t + y * h] : l ? [e + y * c, t + y * h] : []; } else return v === 0 || m === 0 ? dC(e, n, i) === i ? [i, s] : dC(e, n, a) === a ? [a, o] : dC(a, i, n) === n ? [n, r] : [] : []; }, vg = function(e, t, n, r, a, o, i, s) { var l = [], u, c = new Array(n.length), d = !0; o == null && (d = !1); var f; if (d) { for (var h = 0; h < c.length / 2; h++) c[h * 2] = n[h * 2] * o + r, c[h * 2 + 1] = n[h * 2 + 1] * i + a; if (s > 0) { var p = r2(c, -s); f = n2(p); } else f = c; } else f = n; for (var v, m, g, y, x = 0; x < f.length / 2; x++) v = f[x * 2], m = f[x * 2 + 1], x < f.length / 2 - 1 ? (g = f[(x + 1) * 2], y = f[(x + 1) * 2 + 1]) : (g = f[0], y = f[1]), u = Iu(e, t, r, a, v, m, g, y), u.length !== 0 && l.push(u[0], u[1]); return l; }, NJe = function(e, t, n, r, a, o, i, s, l) { var u = [], c, d = new Array(n.length * 2); l.forEach(function(g, y) { y === 0 ? (d[d.length - 2] = g.startX, d[d.length - 1] = g.startY) : (d[y * 4 - 2] = g.startX, d[y * 4 - 1] = g.startY), d[y * 4] = g.stopX, d[y * 4 + 1] = g.stopY, c = Vv(e, t, r, a, 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 = Iu(e, t, r, a, 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; }, U1 = function(e, t, n) { var r = [e[0] - t[0], e[1] - t[1]], a = Math.sqrt(r[0] * r[0] + r[1] * r[1]), o = (a - n) / a; return o < 0 && (o = 1e-5), [t[0] + o * r[0], t[1] + o * r[1]]; }, qa = function(e, t) { var n = m3(e, t); return n = gq(n), n; }, gq = function(e) { for (var t, n, r = e.length / 2, a = 1 / 0, o = 1 / 0, i = -1 / 0, s = -1 / 0, l = 0; l < r; l++) t = e[2 * l], n = e[2 * l + 1], a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); for (var u = 2 / (i - a), c = 2 / (s - o), d = 0; d < r; d++) t = e[2 * d] = e[2 * d] * u, n = e[2 * d + 1] = e[2 * d + 1] * c, a = Math.min(a, t), i = Math.max(i, t), o = Math.min(o, n), s = Math.max(s, n); if (o < -1) for (var f = 0; f < r; f++) n = e[2 * f + 1] = e[2 * f + 1] + (-1 - o); return e; }, m3 = 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 a = new Array(e * 2), o, i = 0; i < e; i++) o = i * n + r, a[2 * i] = Math.cos(o), a[2 * i + 1] = Math.sin(-o); return a; }, zd = function(e, t) { return Math.min(e / 4, t / 4, 8); }, mq = function(e, t) { return Math.min(e / 10, t / 10, 8); }, F_ = function() { return 8; }, MJe = function(e, t, n) { return [e - 2 * t + n, 2 * (t - e), e]; }, y3 = function(e, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e), ctrlPtOffsetPct: 0.05 }; }, DJe = xa({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e) { return 1; } }), BJe = { pageRank: function(e) { for (var t = DJe(e), n = t.dampingFactor, r = t.precision, a = t.iterations, o = 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 y = m * c + g; h[y] = 0; } p[m] = 0; } for (var x = 0; x < f; x++) { var w = u[x], k = w.data("source"), C = w.data("target"); if (k !== C) { var S = l.indexOfId(k), _ = l.indexOfId(C), T = o(w), F = _ * c + S; h[F] += T, p[S] += T; } } for (var A = 1 / c + v, I = 0; I < c; I++) if (p[I] === 0) for (var N = 0; N < c; N++) { var L = N * c + I; h[L] = A; } else for (var z = 0; z < c; z++) { var P = z * c + I; h[P] = h[P] / p[I] + v; } for (var D = new Array(c), M = new Array(c), V, Q = 0; Q < c; Q++) D[Q] = 1; for (var X = 0; X < a; X++) { for (var ee = 0; ee < c; ee++) M[ee] = 0; for (var ue = 0; ue < c; ue++) for (var ve = 0; ve < c; ve++) { var ge = ue * c + ve; M[ue] += h[ge] * D[ve]; } wJe(M), V = D, D = M, M = V; for (var se = 0, ne = 0; ne < c; ne++) { var W = V[ne] - D[ne]; se += W * W; } if (se < r) break; } var Y = { rank: function(re) { return re = i.collection(re)[0], D[l.indexOf(re)]; } }; return Y; } // pageRank }, V9 = xa({ root: null, weight: function(e) { return 1; }, directed: !1, alpha: 0 }), ff = { degreeCentralityNormalized: function(e) { e = V9(e); var t = this.cy(), n = this.nodes(), r = n.length; if (e.directed) { for (var a = {}, o = {}, 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), a[c] = d.indegree, o[c] = d.outdegree; } return { indegree: function(g) { return i == 0 ? 0 : (xt(g) && (g = t.filter(g)), a[g.id()] / i); }, outdegree: function(g) { return s === 0 ? 0 : (xt(g) && (g = t.filter(g)), o[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 : (xt(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 = V9(e); var t = this.cy(), n = this, r = e, a = r.root, o = r.weight, i = r.directed, s = r.alpha; if (a = t.collection(a)[0], i) { for (var l = a.connectedEdges(), u = l.filter(function(k) { return k.target().same(a) && n.has(k); }), c = l.filter(function(k) { return k.source().same(a) && n.has(k); }), d = u.length, f = c.length, h = 0, p = 0, v = 0; v < u.length; v++) h += o(u[v]); for (var m = 0; m < c.length; m++) p += o(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 = a.connectedEdges().intersection(n), y = g.length, x = 0, w = 0; w < g.length; w++) x += o(g[w]); return { degree: Math.pow(y, 1 - s) * Math.pow(x, s) }; } } // degreeCentrality }; ff.dc = ff.degreeCentrality; ff.dcn = ff.degreeCentralityNormalised = ff.degreeCentralityNormalized; var j9 = xa({ harmonic: !0, weight: function() { return 1; }, directed: !1, root: null }), hf = { closenessCentralityNormalized: function(e) { for (var t = j9(e), n = t.harmonic, r = t.weight, a = t.directed, o = this.cy(), i = {}, s = 0, l = this.nodes(), u = this.floydWarshall({ weight: r, directed: a }), 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 : (xt(v) ? v = o.filter(v)[0].id() : v = v.id(), i[v] / s); } }; }, // Implemented from pseudocode from wikipedia closenessCentrality: function(e) { var t = j9(e), n = t.root, r = t.weight, a = t.directed, o = t.harmonic; n = this.filter(n)[0]; for (var i = this.dijkstra({ root: n, weight: r, directed: a }), s = 0, l = this.nodes(), u = 0; u < l.length; u++) { var c = l[u]; if (!c.same(n)) { var d = i.distanceTo(c); o ? s += 1 / d : s += d; } } return o ? s : 1 / s; } // closenessCentrality }; hf.cc = hf.closenessCentrality; hf.ccn = hf.closenessCentralityNormalised = hf.closenessCentralityNormalized; var RJe = xa({ weight: null, directed: !1 }), b3 = { // 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 = RJe(e), n = t.directed, r = t.weight, a = r != null, o = this.cy(), i = this.nodes(), s = {}, l = {}, u = 0, c = { set: function(g, y) { l[g] = y, y > u && (u = y); }, 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 y = i[g].id(), x = [], w = {}, k = {}, C = {}, S = new Om(function(ue, ve) { return C[ue] - C[ve]; }), _ = 0; _ < i.length; _++) { var T = i[_].id(); w[T] = [], k[T] = 0, C[T] = 1 / 0; } for (k[y] = 1, C[y] = 0, S.push(y); !S.empty(); ) { var F = S.pop(); if (x.push(F), a) for (var A = 0; A < s[F].length; A++) { var I = s[F][A], N = o.getElementById(F), L = void 0; N.edgesTo(I).length > 0 ? L = N.edgesTo(I)[0] : L = I.edgesTo(N)[0]; var z = r(L); I = I.id(), C[I] > C[F] + z && (C[I] = C[F] + z, S.nodes.indexOf(I) < 0 ? S.push(I) : S.updateItem(I), k[I] = 0, w[I] = []), C[I] == C[F] + z && (k[I] = k[I] + k[F], w[I].push(F)); } else for (var P = 0; P < s[F].length; P++) { var D = s[F][P].id(); C[D] == 1 / 0 && (S.push(D), C[D] = C[F] + 1), C[D] == C[F] + 1 && (k[D] = k[D] + k[F], w[D].push(F)); } } for (var M = {}, V = 0; V < i.length; V++) M[i[V].id()] = 0; for (; x.length > 0; ) { for (var Q = x.pop(), X = 0; X < w[Q].length; X++) { var ee = w[Q][X]; M[ee] = M[ee] + k[ee] / k[Q] * (1 + M[Q]); } Q != i[g].id() && c.set(Q, c.get(Q) + M[Q]); } }, v = 0; v < i.length; v++) p(v); var m = { betweenness: function(g) { var y = o.collection(g).id(); return c.get(y); }, betweennessNormalized: function(g) { if (u == 0) return 0; var y = o.collection(g).id(); return c.get(y) / u; } }; return m.betweennessNormalised = m.betweennessNormalized, m; } // betweennessCentrality }; b3.bc = b3.betweennessCentrality; var zJe = xa({ 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; } ] }), VJe = function(e) { return zJe(e); }, jJe = function(e, t) { for (var n = 0, r = 0; r < t.length; r++) n += t[r](e); return n; }, HJe = function(e, t, n) { for (var r = 0; r < t; r++) e[r * t + r] = n; }, yq = function(e, t) { for (var n, r = 0; r < t; r++) { n = 0; for (var a = 0; a < t; a++) n += e[a * t + r]; for (var o = 0; o < t; o++) e[o * t + r] = e[o * t + r] / n; } }, UJe = function(e, t, n) { for (var r = new Array(n * n), a = 0; a < n; a++) { for (var o = 0; o < n; o++) r[a * n + o] = 0; for (var i = 0; i < n; i++) for (var s = 0; s < n; s++) r[a * n + s] += e[a * n + i] * t[i * n + s]; } return r; }, qJe = function(e, t, n) { for (var r = e.slice(0), a = 1; a < n; a++) e = UJe(e, r, t); return e; }, WJe = function(e, t, n) { for (var r = new Array(t * t), a = 0; a < t * t; a++) r[a] = Math.pow(e[a], n); return yq(r, t), r; }, KJe = function(e, t, n, r) { for (var a = 0; a < n; a++) { var o = Math.round(e[a] * Math.pow(10, r)) / Math.pow(10, r), i = Math.round(t[a] * Math.pow(10, r)) / Math.pow(10, r); if (o !== i) return !1; } return !0; }, GJe = function(e, t, n, r) { for (var a = [], o = 0; o < t; o++) { for (var i = [], s = 0; s < t; s++) Math.round(e[o * t + s] * 1e3) / 1e3 > 0 && i.push(n[s]); i.length !== 0 && a.push(r.collection(i)); } return a; }, XJe = function(e, t) { for (var n = 0; n < e.length; n++) if (!t[n] || e[n].id() !== t[n].id()) return !1; return !0; }, YJe = function(e) { for (var t = 0; t < e.length; t++) for (var n = 0; n < e.length; n++) t != n && XJe(e[t], e[n]) && e.splice(n, 1); return e; }, H9 = function(e) { for (var t = this.nodes(), n = this.edges(), r = this.cy(), a = VJe(e), o = {}, i = 0; i < t.length; i++) o[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 = o[h.source().id()], v = o[h.target().id()], m = jJe(h, a.attributes); u[p * s + v] += m, u[v * s + p] += m; } HJe(u, s, a.multFactor), yq(u, s); for (var g = !0, y = 0; g && y < a.maxIterations; ) g = !1, c = qJe(u, s, a.expandFactor), u = WJe(c, s, a.inflateFactor), KJe(u, c, l, 4) || (g = !0), y++; var x = GJe(u, s, t, r); return x = YJe(x), x; }, ZJe = { markovClustering: H9, mcl: H9 }, QJe = function(e) { return e; }, bq = function(e, t) { return Math.abs(t - e); }, U9 = function(e, t, n) { return e + bq(t, n); }, q9 = function(e, t, n) { return e + Math.pow(n - t, 2); }, JJe = function(e) { return Math.sqrt(e); }, eet = function(e, t, n) { return Math.max(e, bq(t, n)); }, Ev = function(e, t, n, r, a) { for (var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : QJe, i = r, s, l, u = 0; u < e; u++) s = t(u), l = n(u), i = a(i, s, l); return o(i); }, ih = { euclidean: function(e, t, n) { return e >= 2 ? Ev(e, t, n, 0, q9, JJe) : Ev(e, t, n, 0, U9); }, squaredEuclidean: function(e, t, n) { return Ev(e, t, n, 0, q9); }, manhattan: function(e, t, n) { return Ev(e, t, n, 0, U9); }, max: function(e, t, n) { return Ev(e, t, n, -1 / 0, eet); } }; ih["squared-euclidean"] = ih.squaredEuclidean; ih.squaredeuclidean = ih.squaredEuclidean; function gx(e, t, n, r, a, o) { var i; return sr(e) ? i = e : i = ih[e] || ih.euclidean, t === 0 && sr(e) ? i(a, o) : i(t, n, r, a, o); } var tet = xa({ k: 2, m: 2, sensitivityThreshold: 1e-4, distance: "euclidean", maxIterations: 10, attributes: [], testMode: !1, testCentroids: null }), A_ = function(e) { return tet(e); }, a2 = function(e, t, n, r, a) { var o = a !== "kMedoids", i = o ? function(c) { return n[c]; } : function(c) { return r[c](n); }, s = function(c) { return r[c](t); }, l = n, u = t; return gx(e, r.length, i, s, l, u); }, pC = function(e, t, n) { for (var r = n.length, a = new Array(r), o = new Array(r), i = new Array(t), s = null, l = 0; l < r; l++) a[l] = e.min(n[l]).value, o[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() * (o[c] - a[c]) + a[c]; i[u] = s; } return i; }, wq = function(e, t, n, r, a) { for (var o = 1 / 0, i = 0, s = 0; s < t.length; s++) { var l = a2(n, e, t[s], r, a); l < o && (o = l, i = s); } return i; }, xq = function(e, t, n) { for (var r = [], a = null, o = 0; o < t.length; o++) a = t[o], n[a.id()] === e && r.push(a); return r; }, net = function(e, t, n) { return Math.abs(t - e) <= n; }, ret = function(e, t, n) { for (var r = 0; r < e.length; r++) for (var a = 0; a < e[r].length; a++) { var o = Math.abs(e[r][a] - t[r][a]); if (o > n) return !1; } return !0; }, aet = function(e, t, n) { for (var r = 0; r < n; r++) if (e === t[r]) return !0; return !1; }, W9 = function(e, t) { var n = new Array(t); if (e.length < 50) for (var r = 0; r < t; r++) { for (var a = e[Math.floor(Math.random() * e.length)]; aet(a, n, r); ) a = e[Math.floor(Math.random() * e.length)]; n[r] = a; } else for (var o = 0; o < t; o++) n[o] = e[Math.floor(Math.random() * e.length)]; return n; }, K9 = function(e, t, n) { for (var r = 0, a = 0; a < t.length; a++) r += a2("manhattan", t[a], e, n, "kMedoids"); return r; }, oet = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = A_(e), o = new Array(a.k), i = {}, s; a.testMode ? typeof a.testCentroids == "number" ? (a.testCentroids, s = pC(n, a.k, a.attributes)) : zr(a.testCentroids) === "object" ? s = a.testCentroids : s = pC(n, a.k, a.attributes) : s = pC(n, a.k, a.attributes); for (var l = !0, u = 0; l && u < a.maxIterations; ) { for (var c = 0; c < n.length; c++) r = n[c], i[r.id()] = wq(r, s, a.distance, a.attributes, "kMeans"); l = !1; for (var d = 0; d < a.k; d++) { var f = xq(d, n, i); if (f.length !== 0) { for (var h = a.attributes.length, p = s[d], v = new Array(h), m = new Array(h), g = 0; g < h; g++) { m[g] = 0; for (var y = 0; y < f.length; y++) r = f[y], m[g] += a.attributes[g](r); v[g] = m[g] / f.length, net(v[g], p[g], a.sensitivityThreshold) || (l = !0); } s[d] = v, o[d] = t.collection(f); } } u++; } return o; }, iet = function(e) { var t = this.cy(), n = this.nodes(), r = null, a = A_(e), o = new Array(a.k), i, s = {}, l, u = new Array(a.k); a.testMode ? typeof a.testCentroids == "number" || (zr(a.testCentroids) === "object" ? i = a.testCentroids : i = W9(n, a.k)) : i = W9(n, a.k); for (var c = !0, d = 0; c && d < a.maxIterations; ) { for (var f = 0; f < n.length; f++) r = n[f], s[r.id()] = wq(r, i, a.distance, a.attributes, "kMedoids"); c = !1; for (var h = 0; h < i.length; h++) { var p = xq(h, n, s); if (p.length !== 0) { u[h] = K9(i[h], p, a.attributes); for (var v = 0; v < p.length; v++) l = K9(p[v], p, a.attributes), l < u[h] && (u[h] = l, i[h] = p[v], c = !0); o[h] = t.collection(p); } } d++; } return o; }, set = function(e, t, n, r, a) { for (var o, i, s = 0; s < t.length; s++) for (var l = 0; l < e.length; l++) r[s][l] = Math.pow(n[s][l], a.m); for (var u = 0; u < e.length; u++) for (var c = 0; c < a.attributes.length; c++) { o = 0, i = 0; for (var d = 0; d < t.length; d++) o += r[d][u] * a.attributes[c](t[d]), i += r[d][u]; e[u][c] = o / i; } }, uet = function(e, t, n, r, a) { for (var o = 0; o < e.length; o++) t[o] = e[o].slice(); for (var i, s, l, u = 2 / (a.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 = a2(a.distance, r[d], n[c], a.attributes, "cmeans"), l = a2(a.distance, r[d], n[f], a.attributes, "cmeans"), i += Math.pow(s / l, u); e[d][c] = 1 / i; } }, cet = function(e, t, n, r) { for (var a = new Array(n.k), o = 0; o < a.length; o++) a[o] = []; 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); a[s].push(e[l]); } for (var c = 0; c < a.length; c++) a[c] = r.collection(a[c]); return a; }, G9 = function(e) { var t = this.cy(), n = this.nodes(), r = A_(e), a, o, 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; } o = new Array(r.k); for (var v = 0; v < r.k; v++) o[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, y = 0; g && y < r.maxIterations; ) g = !1, set(o, n, i, l, r), uet(i, s, o, n, r), ret(i, s, r.sensitivityThreshold) || (g = !0), y++; return a = cet(n, i, r, t), { clusters: a, degreeOfMembership: i }; }, det = { kMeans: oet, kMedoids: iet, fuzzyCMeans: G9, fcm: G9 }, pet = xa({ 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 }), fet = { single: "min", complete: "max" }, het = function(e) { var t = pet(e), n = fet[t.linkage]; return n != null && (t.linkage = n), t; }, X9 = function(e, t, n, r, a) { for (var o = 0, i = 1 / 0, s, l = a.attributes, u = function(S, _) { return gx(a.distance, l.length, function(T) { return l[T](S); }, function(T) { return l[T](_); }, S, _); }, c = 0; c < e.length; c++) { var d = e[c].key, f = n[d][r[d]]; f < i && (o = d, i = f); } if (a.mode === "threshold" && i >= a.threshold || a.mode === "dendrogram" && e.length === 1) return !1; var h = t[o], p = t[r[o]], v; a.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 : a.linkage === "min" ? (s = n[h.key][g.key], n[h.key][g.key] > n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "max" ? (s = n[h.key][g.key], n[h.key][g.key] < n[p.key][g.key] && (s = n[p.key][g.key])) : a.linkage === "mean" ? s = (n[h.key][g.key] * h.size + n[p.key][g.key] * p.size) / (h.size + p.size) : a.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 y = 0; y < e.length; y++) { var x = e[y].key; if (r[x] === h.key || r[x] === p.key) { for (var w = x, k = 0; k < e.length; k++) { var C = e[k].key; n[x][C] < n[x][w] && (w = C); } r[x] = w; } e[y].index = y; } return h.key = p.key = h.index = p.index = null, !0; }, q1 = function e(t, n, r) { t && (t.value ? n.push(t.value) : (t.left && e(t.left, n), t.right && e(t.right, n))); }, vet = function e(t, n) { if (!t) return ""; if (t.left && t.right) { var r = e(t.left, n), a = e(t.right, n), o = n.add({ group: "nodes", data: { id: r + "," + a } }); return n.add({ group: "edges", data: { source: r, target: o.id() } }), n.add({ group: "edges", data: { source: a, target: o.id() } }), o.id(); } else if (t.value) return t.value.id(); }, get = function e(t, n, r) { if (!t) return []; var a = [], o = [], i = []; return n === 0 ? (t.left && q1(t.left, a), t.right && q1(t.right, o), i = a.concat(o), [r.collection(i)]) : n === 1 ? t.value ? [r.collection(t.value)] : (t.left && q1(t.left, a), t.right && q1(t.right, o), [r.collection(a), r.collection(o)]) : t.value ? [r.collection(t.value)] : (t.left && (a = e(t.left, n - 1, r)), t.right && (o = e(t.right, n - 1, r)), a.concat(o)); }, Y9 = function(e) { for (var t = this.cy(), n = this.nodes(), r = het(e), a = r.attributes, o = function(g, y) { return gx(r.distance, a.length, function(x) { return a[x](g); }, function(x) { return a[x](y); }, g, y); }, 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 : o(i[f].value, i[h].value) : p = f === h ? 1 / 0 : o(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 = X9(i, u, s, l, r); v; ) v = X9(i, u, s, l, r); var m; return r.mode === "dendrogram" ? (m = get(i[0], r.dendrogramDepth, t), r.addDendrogram && vet(i[0], t)) : (m = new Array(i.length), i.forEach(function(g, y) { g.key = g.index = null, m[y] = t.collection(g.value); })), m; }, met = { hierarchicalClustering: Y9, hca: Y9 }, yet = xa({ 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') ] }), bet = function(e) { var t = e.damping, n = e.preference; 0.5 <= t && t < 1 || fr("Damping must range on [0.5, 1). Got: ".concat(t)); var r = ["median", "mean", "min", "max"]; return r.some(function(a) { return a === n; }) || it(n) || fr("Preference must be one of [".concat(r.map(function(a) { return "'".concat(a, "'"); }).join(", "), "] or a number. Got: ").concat(n)), yet(e); }, wet = function(e, t, n, r) { var a = function(o, i) { return r[i](o); }; return -gx(e, r.length, function(o) { return a(t, o); }, function(o) { return a(n, o); }, t, n); }, xet = function(e, t) { var n = null; return t === "median" ? n = yJe(e) : t === "mean" ? n = mJe(e) : t === "min" ? n = vJe(e) : t === "max" ? n = gJe(e) : n = t, n; }, ket = function(e, t, n) { for (var r = [], a = 0; a < e; a++) t[a * e + a] + n[a * e + a] > 0 && r.push(a); return r; }, Z9 = function(e, t, n) { for (var r = [], a = 0; a < e; a++) { for (var o = -1, i = -1 / 0, s = 0; s < n.length; s++) { var l = n[s]; t[a * e + l] > i && (o = l, i = t[a * e + l]); } o > 0 && r.push(o); } for (var u = 0; u < n.length; u++) r[n[u]] = n[u]; return r; }, Cet = function(e, t, n) { for (var r = Z9(e, t, n), a = 0; a < n.length; a++) { for (var o = [], i = 0; i < r.length; i++) r[i] === n[a] && o.push(i); for (var s = -1, l = -1 / 0, u = 0; u < o.length; u++) { for (var c = 0, d = 0; d < o.length; d++) c += t[o[d] * e + o[u]]; c > l && (s = u, l = c); } n[a] = o[s]; } return r = Z9(e, t, n), r; }, Q9 = function(e) { for (var t = this.cy(), n = this.nodes(), r = bet(e), a = {}, o = 0; o < n.length; o++) a[n[o].id()] = o; 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] = wet(r.distance, n[h], n[p], r.attributes)); u = xet(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 y = new Array(i), x = new Array(i), w = new Array(i), k = 0; k < i; k++) y[k] = 0, x[k] = 0, w[k] = 0; for (var C = new Array(i * r.minIterations), S = 0; S < C.length; S++) C[S] = 0; var _; for (_ = 0; _ < r.maxIterations; _++) { for (var T = 0; T < i; T++) { for (var F = -1 / 0, A = -1 / 0, I = -1, N = 0, L = 0; L < i; L++) y[L] = c[T * i + L], N = d[T * i + L] + l[T * i + L], N >= F ? (A = F, F = N, I = L) : N > A && (A = N); for (var z = 0; z < i; z++) c[T * i + z] = (1 - r.damping) * (l[T * i + z] - F) + r.damping * y[z]; c[T * i + I] = (1 - r.damping) * (l[T * i + I] - A) + r.damping * y[I]; } for (var P = 0; P < i; P++) { for (var D = 0, M = 0; M < i; M++) y[M] = d[M * i + P], x[M] = Math.max(0, c[M * i + P]), D += x[M]; D -= x[P], x[P] = c[P * i + P], D += x[P]; for (var V = 0; V < i; V++) d[V * i + P] = (1 - r.damping) * Math.min(0, D - x[V]) + r.damping * y[V]; d[P * i + P] = (1 - r.damping) * (D - x[P]) + r.damping * y[P]; } for (var Q = 0, X = 0; X < i; X++) { var ee = d[X * i + X] + c[X * i + X] > 0 ? 1 : 0; C[_ % r.minIterations * i + X] = ee, Q += ee; } if (Q > 0 && (_ >= r.minIterations - 1 || _ == r.maxIterations - 1)) { for (var ue = 0, ve = 0; ve < i; ve++) { w[ve] = 0; for (var ge = 0; ge < r.minIterations; ge++) w[ve] += C[ge * i + ve]; (w[ve] === 0 || w[ve] === r.minIterations) && ue++; } if (ue === i) break; } } for (var se = ket(i, c, d), ne = Cet(i, l, se), W = {}, Y = 0; Y < se.length; Y++) W[se[Y]] = []; for (var re = 0; re < n.length; re++) { var we = a[n[re].id()], Oe = ne[we]; Oe != null && W[Oe].push(n[re]); } for (var Ne = new Array(se.length), xe = 0; xe < se.length; xe++) Ne[xe] = t.collection(W[se[xe]]); return Ne; }, Eet = { affinityPropagation: Q9, ap: Q9 }, _et = xa({ root: void 0, directed: !1 }), Tet = { hierholzer: function(e) { if (!mn(e)) { var t = arguments; e = { root: t[0], directed: t[1] }; } var n = _et(e), r = n.root, a = n.directed, o = this, i = !1, s, l, u; r && (u = xt(r) ? this.filter(r)[0].id() : r[0].id()); var c = {}, d = {}; a ? o.forEach(function(g) { var y = g.id(); if (g.isNode()) { var x = g.indegree(!0), w = g.outdegree(!0), k = x - w, C = w - x; k == 1 ? s ? i = !0 : s = y : C == 1 ? l ? i = !0 : l = y : (C > 1 || k > 1) && (i = !0), c[y] = [], g.outgoers().forEach(function(S) { S.isEdge() && c[y].push(S.id()); }); } else d[y] = [void 0, g.target().id()]; }) : o.forEach(function(g) { var y = g.id(); if (g.isNode()) { var x = g.degree(!0); x % 2 && (s ? l ? i = !0 : l = y : s = y), c[y] = [], g.connectedEdges().forEach(function(w) { return c[y].push(w.id()); }); } else d[y] = [g.source().id(), g.target().id()]; }); var f = { found: !1, trail: void 0 }; if (i) return f; if (l && s) if (a) { if (u && l != u) return f; u = l; } else { if (u && l != u && s != u) return f; u || (u = l); } else u || (u = o[0].id()); var h = function(g) { for (var y = g, x = [g], w, k, C; c[y].length; ) w = c[y].shift(), k = d[w][0], C = d[w][1], y != C ? (c[C] = c[C].filter(function(S) { return S != w; }), y = C) : !a && y != k && (c[k] = c[k].filter(function(S) { return S != w; }), y = k), x.unshift(w), x.unshift(y); return x; }, p = [], v = []; for (v = h(u); v.length != 1; ) c[v[0]].length == 0 ? (p.unshift(o.getElementById(v.shift())), p.unshift(o.getElementById(v.shift()))) : v = h(v.shift()).concat(v); p.unshift(o.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; } }, W1 = function() { var e = this, t = {}, n = 0, r = 0, a = [], o = [], i = {}, s = function(c, d) { for (var f = o.length - 1, h = [], p = e.spawn(); o[f].x != c || o[f].y != d; ) h.push(o.pop().edge), f--; h.push(o.pop().edge), h.forEach(function(v) { var m = v.connectedNodes().intersection(e); p.merge(v), m.forEach(function(g) { var y = g.id(), x = g.connectedEdges().intersection(e); p.merge(g), t[y].cutVertex ? p.merge(x.filter(function(w) { return w.isLoop(); })) : p.merge(x); }); }), a.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) a.push(e.spawn(e.getElementById(f))); else { var v, m, g, y; p.forEach(function(x) { v = x.source().id(), m = x.target().id(), g = v === f ? m : v, g !== h && (y = x.id(), i[y] || (i[y] = !0, o.push({ x: f, y: g, edge: x })), 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: a }; }, $et = { hopcroftTarjanBiconnected: W1, htbc: W1, htb: W1, hopcroftTarjanBiconnectedComponents: W1 }, K1 = function() { var e = this, t = {}, n = 0, r = [], a = [], o = e.spawn(e), i = function s(l) { a.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 = a.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), o = o.difference(h); } }; return e.forEach(function(s) { if (s.isNode()) { var l = s.id(); l in t || i(l); } }), { cut: o, components: r }; }, Oet = { tarjanStronglyConnected: K1, tsc: K1, tscc: K1, tarjanStronglyConnectedComponents: K1 }, kq = {}; [fg, rJe, aJe, iJe, lJe, cJe, fJe, BJe, ff, hf, b3, ZJe, det, met, Eet, Tet, $et, Oet].forEach(function(e) { It(kq, 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 Cq = 0, Sq = 1, Eq = 2, $l = function e(t) { if (!(this instanceof e)) return new e(t); this.id = "Thenable/1.0.7", this.state = Cq, 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)); }; $l.prototype = { /* promise resolving methods */ fulfill: function(e) { return J9(this, Sq, "fulfillValue", e); }, reject: function(e) { return J9(this, Eq, "rejectReason", e); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function(e, t) { var n = this, r = new $l(); return n.onFulfilled.push(tP(e, r, "fulfill")), n.onRejected.push(tP(t, r, "reject")), _q(n), r.proxy; } }; var J9 = function(e, t, n, r) { return e.state === Cq && (e.state = t, e[n] = r, _q(e)), e; }, _q = function(e) { e.state === Sq ? eP(e, "onFulfilled", e.fulfillValue) : e.state === Eq && eP(e, "onRejected", e.rejectReason); }, eP = function(e, t, n) { if (e[t].length !== 0) { var r = e[t]; e[t] = []; var a = function() { for (var o = 0; o < r.length; o++) r[o](n); }; typeof setImmediate == "function" ? setImmediate(a) : setTimeout(a, 0); } }, tP = function(e, t, n) { return function(r) { if (typeof e != "function") t[n].call(t, r); else { var a; try { a = e(r); } catch (o) { t.reject(o); return; } Fet(t, a); } }; }, Fet = function e(t, n) { if (t === n || t.proxy === n) { t.reject(new TypeError("cannot resolve promise with itself")); return; } var r; if (zr(n) === "object" && n !== null || typeof n == "function") try { r = n.then; } catch (o) { t.reject(o); return; } if (typeof r == "function") { var a = !1; try { r.call( n, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function(o) { a || (a = !0, o === n ? t.reject(new TypeError("circular thenable chain")) : e(t, o)); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function(o) { a || (a = !0, t.reject(o)); } ); } catch (o) { a || t.reject(o); } return; } t.fulfill(n); }; $l.all = function(e) { return new $l(function(t, n) { for (var r = new Array(e.length), a = 0, o = function(s, l) { r[s] = l, a++, a === 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) { o(s, d); }, function(d) { n(d); }); else { var c = l; o(s, c); } })(i); }); }; $l.resolve = function(e) { return new $l(function(t, n) { t(e); }); }; $l.reject = function(e) { return new $l(function(t, n) { n(e); }); }; var zh = typeof Promise < "u" ? Promise : $l, w3 = function(e, t, n) { var r = C_(e), a = !r, o = this._private = It({ duration: 1e3 }, t, n); if (o.target = e, o.style = o.style || o.css, o.started = !1, o.playing = !1, o.hooked = !1, o.applying = !1, o.progress = 0, o.completes = [], o.frames = [], o.complete && sr(o.complete) && o.completes.push(o.complete), a) { var i = e.position(); o.startPosition = o.startPosition || { x: i.x, y: i.y }, o.startStyle = o.startStyle || e.cy().style().getAnimationStartStyle(e, o.style); } if (r) { var s = e.pan(); o.startPan = { x: s.x, y: s.y }, o.startZoom = e.zoom(); } this.length = 1, this[0] = this; }, Vd = w3.prototype; It(Vd, { 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), No(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 a = e.style[r], o = a.name, i = e.startStyle[o]; e.startStyle[o] = a, 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 zh(function(r, a) { n.push(function() { r(); }); }); } }); Vd.complete = Vd.completed; Vd.run = Vd.play; Vd.running = Vd.playing; var Aet = { 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 a = n[0]; if (a) return a._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 a = 0; a < n.length; a++) { var o = n[a]; o._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, a = r ? n : [n], o = this._private.cy || this, i = !r, s = !i; if (!o.styleEnabled()) return this; var l = o.style(); e = It({}, e, t); var u = Object.keys(e).length === 0; if (u) return new w3(a[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 = o.pan(), f = o.zoom(); e.position = dq(c, f, d); } if (i && e.panBy != null) { var h = e.panBy, p = o.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 = o.getCenterPan(v.eles, e.zoom); m != null && (e.pan = m); } if (i && e.fit != null) { var g = e.fit, y = o.getFitViewport(g.eles || g.boundingBox, g.padding); y != null && (e.pan = y.pan, e.zoom = y.zoom); } if (i && mn(e.zoom)) { var x = o.getZoomedViewport(e.zoom); x != null ? (x.zoomed && (e.zoom = x.zoom), x.panned && (e.pan = x.pan)) : e.zoom = null; } return new w3(a[0], e); }; }, // animate animate: function() { return function(e, t) { var n = this, r = n.length !== void 0, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; t && (e = It({}, e, t)); for (var i = 0; i < a.length; i++) { var s = a[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, a = r ? n : [n], o = this._private.cy || this; if (!o.styleEnabled()) return this; for (var i = 0; i < a.length; i++) { for (var s = a[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 o.notify("draw"), this; }; } // stop }, Iet = Array.isArray, mx = Iet, Pet = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Let = /^\w*$/; function Net(e, t) { if (mx(e)) return !1; var n = typeof e; return n == "number" || n == "symbol" || n == "boolean" || e == null || $m(e) ? !0 : Let.test(e) || !Pet.test(e) || t != null && e in Object(t); } var Met = Net, Det = "[object AsyncFunction]", Bet = "[object Function]", Ret = "[object GeneratorFunction]", zet = "[object Proxy]"; function Vet(e) { if (!Dd(e)) return !1; var t = nq(e); return t == Bet || t == Ret || t == Det || t == zet; } var jet = Vet, Het = px["__core-js_shared__"], fC = Het, nP = function() { var e = /[^.]+$/.exec(fC && fC.keys && fC.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); function Uet(e) { return !!nP && nP in e; } var qet = Uet, Wet = Function.prototype, Ket = Wet.toString; function Get(e) { if (e != null) { try { return Ket.call(e); } catch { } try { return e + ""; } catch { } } return ""; } var Xet = Get, Yet = /[\\^$.*+?()[\]{}|]/g, Zet = /^\[object .+?Constructor\]$/, Qet = Function.prototype, Jet = Object.prototype, ett = Qet.toString, ttt = Jet.hasOwnProperty, ntt = RegExp( "^" + ett.call(ttt).replace(Yet, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function rtt(e) { if (!Dd(e) || qet(e)) return !1; var t = jet(e) ? ntt : Zet; return t.test(Xet(e)); } var att = rtt; function ott(e, t) { return e == null ? void 0 : e[t]; } var itt = ott; function stt(e, t) { var n = itt(e, t); return att(n) ? n : void 0; } var I_ = stt, ltt = I_(Object, "create"), gg = ltt; function utt() { this.__data__ = gg ? gg(null) : {}, this.size = 0; } var ctt = utt; function dtt(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } var ptt = dtt, ftt = "__lodash_hash_undefined__", htt = Object.prototype, vtt = htt.hasOwnProperty; function gtt(e) { var t = this.__data__; if (gg) { var n = t[e]; return n === ftt ? void 0 : n; } return vtt.call(t, e) ? t[e] : void 0; } var mtt = gtt, ytt = Object.prototype, btt = ytt.hasOwnProperty; function wtt(e) { var t = this.__data__; return gg ? t[e] !== void 0 : btt.call(t, e); } var xtt = wtt, ktt = "__lodash_hash_undefined__"; function Ctt(e, t) { var n = this.__data__; return this.size += this.has(e) ? 0 : 1, n[e] = gg && t === void 0 ? ktt : t, this; } var Stt = Ctt; function Vh(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]); } } Vh.prototype.clear = ctt; Vh.prototype.delete = ptt; Vh.prototype.get = mtt; Vh.prototype.has = xtt; Vh.prototype.set = Stt; var rP = Vh; function Ett() { this.__data__ = [], this.size = 0; } var _tt = Ett; function Ttt(e, t) { return e === t || e !== e && t !== t; } var Tq = Ttt; function $tt(e, t) { for (var n = e.length; n--; ) if (Tq(e[n][0], t)) return n; return -1; } var yx = $tt, Ott = Array.prototype, Ftt = Ott.splice; function Att(e) { var t = this.__data__, n = yx(t, e); if (n < 0) return !1; var r = t.length - 1; return n == r ? t.pop() : Ftt.call(t, n, 1), --this.size, !0; } var Itt = Att; function Ptt(e) { var t = this.__data__, n = yx(t, e); return n < 0 ? void 0 : t[n][1]; } var Ltt = Ptt; function Ntt(e) { return yx(this.__data__, e) > -1; } var Mtt = Ntt; function Dtt(e, t) { var n = this.__data__, r = yx(n, e); return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this; } var Btt = Dtt; function jh(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]); } } jh.prototype.clear = _tt; jh.prototype.delete = Itt; jh.prototype.get = Ltt; jh.prototype.has = Mtt; jh.prototype.set = Btt; var Rtt = jh, ztt = I_(px, "Map"), Vtt = ztt; function jtt() { this.size = 0, this.__data__ = { hash: new rP(), map: new (Vtt || Rtt)(), string: new rP() }; } var Htt = jtt; function Utt(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } var qtt = Utt; function Wtt(e, t) { var n = e.__data__; return qtt(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map; } var bx = Wtt; function Ktt(e) { var t = bx(this, e).delete(e); return this.size -= t ? 1 : 0, t; } var Gtt = Ktt; function Xtt(e) { return bx(this, e).get(e); } var Ytt = Xtt; function Ztt(e) { return bx(this, e).has(e); } var Qtt = Ztt; function Jtt(e, t) { var n = bx(this, e), r = n.size; return n.set(e, t), this.size += n.size == r ? 0 : 1, this; } var ent = Jtt; function Hh(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]); } } Hh.prototype.clear = Htt; Hh.prototype.delete = Gtt; Hh.prototype.get = Ytt; Hh.prototype.has = Qtt; Hh.prototype.set = ent; var $q = Hh, tnt = "Expected a function"; function P_(e, t) { if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(tnt); var n = function() { var r = arguments, a = t ? t.apply(this, r) : r[0], o = n.cache; if (o.has(a)) return o.get(a); var i = e.apply(this, r); return n.cache = o.set(a, i) || o, i; }; return n.cache = new (P_.Cache || $q)(), n; } P_.Cache = $q; var nnt = P_, rnt = 500; function ant(e) { var t = nnt(e, function(r) { return n.size === rnt && n.clear(), r; }), n = t.cache; return t; } var ont = ant, int = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, snt = /\\(\\)?/g, lnt = ont(function(e) { var t = []; return e.charCodeAt(0) === 46 && t.push(""), e.replace(int, function(n, r, a, o) { t.push(a ? o.replace(snt, "$1") : r || n); }), t; }), Oq = lnt; function unt(e, t) { for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; ) a[n] = t(e[n], n, e); return a; } var Fq = unt, cnt = 1 / 0, aP = ah ? ah.prototype : void 0, oP = aP ? aP.toString : void 0; function Aq(e) { if (typeof e == "string") return e; if (mx(e)) return Fq(e, Aq) + ""; if ($m(e)) return oP ? oP.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -cnt ? "-0" : t; } var dnt = Aq; function pnt(e) { return e == null ? "" : dnt(e); } var Iq = pnt; function fnt(e, t) { return mx(e) ? e : Met(e, t) ? [e] : Oq(Iq(e)); } var Pq = fnt, hnt = 1 / 0; function vnt(e) { if (typeof e == "string" || $m(e)) return e; var t = e + ""; return t == "0" && 1 / e == -hnt ? "-0" : t; } var L_ = vnt; function gnt(e, t) { t = Pq(t, e); for (var n = 0, r = t.length; e != null && n < r; ) e = e[L_(t[n++])]; return n && n == r ? e : void 0; } var mnt = gnt; function ynt(e, t, n) { var r = e == null ? void 0 : mnt(e, t); return r === void 0 ? n : r; } var bnt = ynt, wnt = function() { try { var e = I_(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(), iP = wnt; function xnt(e, t, n) { t == "__proto__" && iP ? iP(e, t, { configurable: !0, enumerable: !0, value: n, writable: !0 }) : e[t] = n; } var knt = xnt, Cnt = Object.prototype, Snt = Cnt.hasOwnProperty; function Ent(e, t, n) { var r = e[t]; (!(Snt.call(e, t) && Tq(r, n)) || n === void 0 && !(t in e)) && knt(e, t, n); } var _nt = Ent, Tnt = 9007199254740991, $nt = /^(?:0|[1-9]\d*)$/; function Ont(e, t) { var n = typeof e; return t = t ?? Tnt, !!t && (n == "number" || n != "symbol" && $nt.test(e)) && e > -1 && e % 1 == 0 && e < t; } var Fnt = Ont; function Ant(e, t, n, r) { if (!Dd(e)) return e; t = Pq(t, e); for (var a = -1, o = t.length, i = o - 1, s = e; s != null && ++a < o; ) { var l = L_(t[a]), u = n; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (a != i) { var c = s[l]; u = r ? r(c, l, s) : void 0, u === void 0 && (u = Dd(c) ? c : Fnt(t[a + 1]) ? [] : {}); } _nt(s, l, u), s = s[l]; } return e; } var Int = Ant; function Pnt(e, t, n) { return e == null ? e : Int(e, t, n); } var Lnt = Pnt; function Nnt(e, t) { var n = -1, r = e.length; for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; return t; } var Mnt = Nnt; function Dnt(e) { return mx(e) ? Fq(e, L_) : $m(e) ? [e] : Mnt(Oq(Iq(e))); } var Bnt = Dnt, Rnt = { // 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 = It({}, t, e), function(n, r) { var a = e, o = this, i = o.length !== void 0, s = i ? o : [o], l = i ? o[0] : o; if (xt(n)) { var u = n.indexOf(".") !== -1, c = u && Bnt(n); if (a.allowGetting && r === void 0) { var d; return l && (a.beforeGet(l), c && l._private[a.field][n] === void 0 ? d = bnt(l._private[a.field], c) : d = l._private[a.field][n]), d; } else if (a.allowSetting && r !== void 0) { var f = !a.immutableKeys[n]; if (f) { var h = qU({}, n, r); a.beforeSet(o, h); for (var p = 0, v = s.length; p < v; p++) { var m = s[p]; a.canSet(m) && (c && l._private[a.field][n] === void 0 ? Lnt(m._private[a.field], c, r) : m._private[a.field][n] = r); } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } } } else if (a.allowSetting && mn(n)) { var g = n, y, x, w = Object.keys(g); a.beforeSet(o, g); for (var k = 0; k < w.length; k++) { y = w[k], x = g[y]; var C = !a.immutableKeys[y]; if (C) for (var S = 0; S < s.length; S++) { var _ = s[S]; a.canSet(_) && (_._private[a.field][y] = x); } } a.updateStyle && o.updateStyle(), a.onSet(o), a.settingTriggersEvent && o[a.triggerFnName](a.settingEvent); } else if (a.allowBinding && sr(n)) { var T = n; o.on(a.bindingEvent, T); } else if (a.allowGetting && n === void 0) { var F; return l && (a.beforeGet(l), F = l._private[a.field]), F; } return o; }; }, // data // remove data field removeData: function(e) { var t = { field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !1, immutableKeys: {} // key => true if immutable }; return e = It({}, t, e), function(n) { var r = e, a = this, o = a.length !== void 0, i = o ? a : [a]; if (xt(n)) { for (var s = n.split(/\s+/), l = s.length, u = 0; u < l; u++) { var c = s[u]; if (!tc(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 && a[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), y = 0; y < g.length; y++) { var x = g[y], w = !r.immutableKeys[x]; w && (m[x] = void 0); } r.triggerEvent && a[r.triggerFnName](r.event); } return a; }; } // removeData }, znt = { 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 a = this, o = Array.prototype.slice.call(arguments, 0); return new zh(function(i, s) { var l = function(d) { a.off.apply(a, c), i(d); }, u = o.concat([l]), c = u.concat([]); a.on.apply(a, u); }); }; } }, On = {}; [Aet, Rnt, znt].forEach(function(e) { It(On, e); }); var Vnt = { animate: On.animate(), animation: On.animation(), animated: On.animated(), clearQueue: On.clearQueue(), delay: On.delay(), delayAnimation: On.delayAnimation(), stop: On.stop() }, zy = { 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 Vn(e) || (e = (e || "").match(/\S+/g) || []); for (var r = [], a = new Rh(e), o = 0; o < t.length; o++) { for (var i = t[o], 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 = a, 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) { Vn(e) || (e = e.match(/\S+/g) || []); for (var n = this, r = t === void 0, a = [], o = 0, i = n.length; o < i; o++) for (var s = n[o], 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 && (a.push(s), u = !0); } return a.length > 0 && this.spawn(a).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; } }; zy.className = zy.classNames = zy.classes; var vn = { 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: Dr, // 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+" }; vn.variable = "(?:[\\w-.]|(?:\\\\" + vn.metaChar + "))+"; vn.className = "(?:[\\w-]|(?:\\\\" + vn.metaChar + "))+"; vn.value = vn.string + "|" + vn.number; vn.id = vn.variable; (function() { var e, t, n; for (e = vn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], vn.comparatorOp += "|@" + t; for (e = vn.comparatorOp.split("|"), n = 0; n < e.length; n++) t = e[n], !(t.indexOf("!") >= 0) && t !== "=" && (vn.comparatorOp += "|\\!" + t); })(); var Mn = function() { return { checks: [] }; }, ht = { /** 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 }, x3 = [{ 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 ZZe(e.selector, t.selector); }), jnt = function() { for (var e = {}, t, n = 0; n < x3.length; n++) t = x3[n], e[t.selector] = t.matches; return e; }(), Hnt = function(e, t) { return jnt[e](t); }, Unt = "(" + x3.map(function(e) { return e.selector; }).join("|") + ")", Mp = function(e) { return e.replace(new RegExp("\\\\(" + vn.metaChar + ")", "g"), function(t, n) { return n; }); }, nu = function(e, t, n) { e[e.length - 1] = n; }, k3 = [{ name: "group", // just used for identifying when debugging query: !0, regex: "(" + vn.group + ")", populate: function(e, t, n) { var r = $i(n, 1), a = r[0]; t.checks.push({ type: ht.GROUP, value: a === "*" ? a : a + "s" }); } }, { name: "state", query: !0, regex: Unt, populate: function(e, t, n) { var r = $i(n, 1), a = r[0]; t.checks.push({ type: ht.STATE, value: a }); } }, { name: "id", query: !0, regex: "\\#(" + vn.id + ")", populate: function(e, t, n) { var r = $i(n, 1), a = r[0]; t.checks.push({ type: ht.ID, value: Mp(a) }); } }, { name: "className", query: !0, regex: "\\.(" + vn.className + ")", populate: function(e, t, n) { var r = $i(n, 1), a = r[0]; t.checks.push({ type: ht.CLASS, value: Mp(a) }); } }, { name: "dataExists", query: !0, regex: "\\[\\s*(" + vn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = $i(n, 1), a = r[0]; t.checks.push({ type: ht.DATA_EXIST, field: Mp(a) }); } }, { name: "dataCompare", query: !0, regex: "\\[\\s*(" + vn.variable + ")\\s*(" + vn.comparatorOp + ")\\s*(" + vn.value + ")\\s*\\]", populate: function(e, t, n) { var r = $i(n, 3), a = r[0], o = r[1], i = r[2], s = new RegExp("^" + vn.string + "$").exec(i) != null; s ? i = i.substring(1, i.length - 1) : i = parseFloat(i), t.checks.push({ type: ht.DATA_COMPARE, field: Mp(a), operator: o, value: i }); } }, { name: "dataBool", query: !0, regex: "\\[\\s*(" + vn.boolOp + ")\\s*(" + vn.variable + ")\\s*\\]", populate: function(e, t, n) { var r = $i(n, 2), a = r[0], o = r[1]; t.checks.push({ type: ht.DATA_BOOL, field: Mp(o), operator: a }); } }, { name: "metaCompare", query: !0, regex: "\\[\\[\\s*(" + vn.meta + ")\\s*(" + vn.comparatorOp + ")\\s*(" + vn.number + ")\\s*\\]\\]", populate: function(e, t, n) { var r = $i(n, 3), a = r[0], o = r[1], i = r[2]; t.checks.push({ type: ht.META_COMPARE, field: Mp(a), operator: o, value: parseFloat(i) }); } }, { name: "nextQuery", separator: !0, regex: vn.separator, populate: function(e, t) { var n = e.currentSubject, r = e.edgeCount, a = e.compoundCount, o = e[e.length - 1]; n != null && (o.subject = n, e.currentSubject = null), o.edgeCount = r, o.compoundCount = a, e.edgeCount = 0, e.compoundCount = 0; var i = e[e.length++] = Mn(); return i; } }, { name: "directedEdge", separator: !0, regex: vn.directedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = t, a = Mn(); return n.checks.push({ type: ht.DIRECTED_EDGE, source: r, target: a }), nu(e, t, n), e.edgeCount++, a; } else { var o = Mn(), i = t, s = Mn(); return o.checks.push({ type: ht.NODE_SOURCE, source: i, target: s }), nu(e, t, o), e.edgeCount++, s; } } }, { name: "undirectedEdge", separator: !0, regex: vn.undirectedEdge, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = t, a = Mn(); return n.checks.push({ type: ht.UNDIRECTED_EDGE, nodes: [r, a] }), nu(e, t, n), e.edgeCount++, a; } else { var o = Mn(), i = t, s = Mn(); return o.checks.push({ type: ht.NODE_NEIGHBOR, node: i, neighbor: s }), nu(e, t, o), s; } } }, { name: "child", separator: !0, regex: vn.child, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = Mn(), a = e[e.length - 1]; return n.checks.push({ type: ht.CHILD, parent: a, child: r }), nu(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Mn(), i = e[e.length - 1], s = Mn(), l = Mn(), u = Mn(), c = Mn(); return o.checks.push({ type: ht.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ht.TRUE }], c.checks.push({ type: ht.TRUE }), s.checks.push({ type: ht.PARENT, // type is swapped on right side queries parent: c, child: u // empty for now }), nu(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Mn(), f = Mn(), h = [{ type: ht.PARENT, parent: d, child: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "descendant", separator: !0, regex: vn.descendant, populate: function(e, t) { if (e.currentSubject == null) { var n = Mn(), r = Mn(), a = e[e.length - 1]; return n.checks.push({ type: ht.DESCENDANT, ancestor: a, descendant: r }), nu(e, t, n), e.compoundCount++, r; } else if (e.currentSubject === t) { var o = Mn(), i = e[e.length - 1], s = Mn(), l = Mn(), u = Mn(), c = Mn(); return o.checks.push({ type: ht.COMPOUND_SPLIT, left: i, right: s, subject: l }), l.checks = t.checks, t.checks = [{ type: ht.TRUE }], c.checks.push({ type: ht.TRUE }), s.checks.push({ type: ht.ANCESTOR, // type is swapped on right side queries ancestor: c, descendant: u // empty for now }), nu(e, i, o), e.currentSubject = l, e.compoundCount++, u; } else { var d = Mn(), f = Mn(), h = [{ type: ht.ANCESTOR, ancestor: d, descendant: f }]; return d.checks = t.checks, t.checks = h, e.compoundCount++, f; } } }, { name: "subject", modifier: !0, regex: vn.subject, populate: function(e, t) { if (e.currentSubject != null && e.currentSubject !== t) return An("Redefinition of subject in selector `" + e.toString() + "`"), !1; e.currentSubject = t; var n = e[e.length - 1], r = n.checks[0], a = r == null ? null : r.type; a === ht.DIRECTED_EDGE ? r.type = ht.NODE_TARGET : a === ht.UNDIRECTED_EDGE && (r.type = ht.NODE_NEIGHBOR, r.node = r.nodes[1], r.neighbor = r.nodes[0], r.nodes = null); } }]; k3.forEach(function(e) { return e.regexObj = new RegExp("^" + e.regex); }); var qnt = function(e) { for (var t, n, r, a = 0; a < k3.length; a++) { var o = k3[a], i = o.name, s = e.match(o.regexObj); if (s != null) { n = s, t = o, r = i; var l = s[0]; e = e.substring(l.length); break; } } return { expr: t, match: n, name: r, remaining: e }; }, Wnt = function(e) { var t = e.match(/^\s+/); if (t) { var n = t[0]; e = e.substring(n.length); } return e; }, Knt = function(e) { var t = this, n = t.inputText = e, r = t[0] = Mn(); for (t.length = 1, n = Wnt(n); ; ) { var a = qnt(n); if (a.expr == null) return An("The selector `" + e + "`is invalid"), !1; var o = a.match.slice(1), i = a.expr.populate(t, r, o); if (i === !1) return !1; if (i != null && (r = i), n = a.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 An("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1; if (u.edgeCount > 1) return An("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1; u.edgeCount === 1 && An("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; }, Gnt = function() { if (this.toStringCache != null) return this.toStringCache; for (var e = function(l) { return l ?? ""; }, t = function(l) { return xt(l) ? '"' + l + '"' : e(l); }, n = function(l) { return " " + l + " "; }, r = function(l, u) { var c = l.type, d = l.value; switch (c) { case ht.GROUP: { var f = e(d); return f.substring(0, f.length - 1); } case ht.DATA_COMPARE: { var h = l.field, p = l.operator; return "[" + h + n(e(p)) + t(d) + "]"; } case ht.DATA_BOOL: { var v = l.operator, m = l.field; return "[" + e(v) + m + "]"; } case ht.DATA_EXIST: { var g = l.field; return "[" + g + "]"; } case ht.META_COMPARE: { var y = l.operator, x = l.field; return "[[" + x + n(e(y)) + t(d) + "]]"; } case ht.STATE: return d; case ht.ID: return "#" + d; case ht.CLASS: return "." + d; case ht.PARENT: case ht.CHILD: return a(l.parent, u) + n(">") + a(l.child, u); case ht.ANCESTOR: case ht.DESCENDANT: return a(l.ancestor, u) + " " + a(l.descendant, u); case ht.COMPOUND_SPLIT: { var w = a(l.left, u), k = a(l.subject, u), C = a(l.right, u); return w + (w.length > 0 ? " " : "") + k + C; } case ht.TRUE: return ""; } }, a = function(l, u) { return l.checks.reduce(function(c, d, f) { return c + (u === l && f === 0 ? "$" : "") + r(d, u); }, ""); }, o = "", i = 0; i < this.length; i++) { var s = this[i]; o += a(s, s.subject), this.length > 1 && i < this.length - 1 && (o += ", "); } return this.toStringCache = o, o; }, Xnt = { parse: Knt, toString: Gnt }, Lq = function(e, t, n) { var r, a = xt(e), o = it(e), i = xt(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), (a || i || u) && (s = !a && !o ? "" : "" + 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; }, Ynt = function(e, t) { switch (t) { case "?": return !!e; case "!": return !e; case "^": return e === void 0; } }, Znt = function(e) { return e !== void 0; }, N_ = function(e, t) { return e.data(t); }, Qnt = function(e, t) { return e[t](); }, vr = [], rr = function(e, t) { return e.checks.every(function(n) { return vr[n.type](n, t); }); }; vr[ht.GROUP] = function(e, t) { var n = e.value; return n === "*" || n === t.group(); }; vr[ht.STATE] = function(e, t) { var n = e.value; return Hnt(n, t); }; vr[ht.ID] = function(e, t) { var n = e.value; return t.id() === n; }; vr[ht.CLASS] = function(e, t) { var n = e.value; return t.hasClass(n); }; vr[ht.META_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return Lq(Qnt(t, n), r, a); }; vr[ht.DATA_COMPARE] = function(e, t) { var n = e.field, r = e.operator, a = e.value; return Lq(N_(t, n), r, a); }; vr[ht.DATA_BOOL] = function(e, t) { var n = e.field, r = e.operator; return Ynt(N_(t, n), r); }; vr[ht.DATA_EXIST] = function(e, t) { var n = e.field; return e.operator, Znt(N_(t, n)); }; vr[ht.UNDIRECTED_EDGE] = function(e, t) { var n = e.nodes[0], r = e.nodes[1], a = t.source(), o = t.target(); return rr(n, a) && rr(r, o) || rr(r, a) && rr(n, o); }; vr[ht.NODE_NEIGHBOR] = function(e, t) { return rr(e.node, t) && t.neighborhood().some(function(n) { return n.isNode() && rr(e.neighbor, n); }); }; vr[ht.DIRECTED_EDGE] = function(e, t) { return rr(e.source, t.source()) && rr(e.target, t.target()); }; vr[ht.NODE_SOURCE] = function(e, t) { return rr(e.source, t) && t.outgoers().some(function(n) { return n.isNode() && rr(e.target, n); }); }; vr[ht.NODE_TARGET] = function(e, t) { return rr(e.target, t) && t.incomers().some(function(n) { return n.isNode() && rr(e.source, n); }); }; vr[ht.CHILD] = function(e, t) { return rr(e.child, t) && rr(e.parent, t.parent()); }; vr[ht.PARENT] = function(e, t) { return rr(e.parent, t) && t.children().some(function(n) { return rr(e.child, n); }); }; vr[ht.DESCENDANT] = function(e, t) { return rr(e.descendant, t) && t.ancestors().some(function(n) { return rr(e.ancestor, n); }); }; vr[ht.ANCESTOR] = function(e, t) { return rr(e.ancestor, t) && t.descendants().some(function(n) { return rr(e.descendant, n); }); }; vr[ht.COMPOUND_SPLIT] = function(e, t) { return rr(e.subject, t) && rr(e.left, t) && rr(e.right, t); }; vr[ht.TRUE] = function() { return !0; }; vr[ht.COLLECTION] = function(e, t) { var n = e.value; return n.has(t); }; vr[ht.FILTER] = function(e, t) { var n = e.value; return n(t); }; var Jnt = function(e) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === ht.ID) return e.getElementById(t[0].checks[0].value).collection(); var n = function(r) { for (var a = 0; a < t.length; a++) { var o = t[a]; if (rr(o, r)) return !0; } return !1; }; return t.text() == null && (n = function() { return !0; }), e.filter(n); }, ert = function(e) { for (var t = this, n = 0; n < t.length; n++) { var r = t[n]; if (rr(r, e)) return !0; } return !1; }, trt = { matches: ert, filter: Jnt }, rc = function(e) { this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || xt(e) && e.match(/^\s*$/) || (No(e) ? this.addQuery({ checks: [{ type: ht.COLLECTION, value: e.collection() }] }) : sr(e) ? this.addQuery({ checks: [{ type: ht.FILTER, value: e }] }) : xt(e) ? this.parse(e) || (this.invalid = !0) : fr("A selector must be created from a string; found ")); }, ac = rc.prototype; [Xnt, trt].forEach(function(e) { return It(ac, e); }); ac.text = function() { return this.inputText; }; ac.size = function() { return this.length; }; ac.eq = function(e) { return this[e]; }; ac.sameText = function(e) { return !this.invalid && !e.invalid && this.text() === e.text(); }; ac.addQuery = function(e) { this[this.length++] = e; }; ac.selector = ac.toString; var Du = { allAre: function(e) { var t = new rc(e); return this.every(function(n) { return t.matches(n); }); }, is: function(e) { var t = new rc(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()); }); } }; Du.allAreNeighbours = Du.allAreNeighbors; Du.has = Du.contains; Du.equal = Du.equals = Du.same; var Yo = function(e, t) { return function(n, r, a, o) { var i = n, s = this, l; if (i == null ? l = "" : No(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 = Bd(l), h = d[f]; return h || (d[f] = e.call(s, n, r, a, o)); } else return e.call(s, n, r, a, o); }; }, sh = { 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 a = this[r], o = a._private.parent; o && t.push(o); } 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 a = n[r]; t.push(a); } 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], a = r.parents(); t = t || a, t = t.intersect(a); } 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: Yo(function(e) { for (var t = [], n = 0; n < this.length; n++) for (var r = this[n], a = r._private.children, o = 0; o < a.length; o++) t.push(a[o]); 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 a = 0; a < r.length; a++) { var o = r[a]; t.push(o), o.children().nonempty() && n(o.children()); } } return n(this.children()), this.spawn(t, !0).filter(e); } }; function M_(e, t, n, r) { for (var a = [], o = new Rh(), i = e.cy(), s = i.hasCompoundNodes(), l = 0; l < e.length; l++) { var u = e[l]; n ? a.push(u) : s && r(a, o, u); } for (; a.length > 0; ) { var c = a.shift(); t(c), o.add(c.id()), s && r(a, o, c); } return e; } function Nq(e, t, n) { if (n.isParent()) for (var r = n._private.children, a = 0; a < r.length; a++) { var o = r[a]; t.has(o.id()) || e.push(o); } } sh.forEachDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return M_(this, e, t, Nq); }; function Mq(e, t, n) { if (n.isChild()) { var r = n._private.parent; t.has(r.id()) || e.push(r); } } sh.forEachUp = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return M_(this, e, t, Mq); }; function nrt(e, t, n) { Mq(e, t, n), Nq(e, t, n); } sh.forEachUpAndDown = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return M_(this, e, t, nrt); }; sh.ancestors = sh.parents; var mg, Dq; mg = Dq = { data: On.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: On.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, immutableKeys: { id: !0, source: !0, target: !0, parent: !0 }, updateStyle: !0 }), scratch: On.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: On.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), rscratch: On.data({ field: "rscratch", allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !0 }), removeRscratch: On.removeData({ field: "rscratch", triggerEvent: !1 }), id: function() { var e = this[0]; if (e) return e._private.data.id; } }; mg.attr = mg.data; mg.removeAttr = mg.removeData; var rrt = Dq, wx = {}; function hC(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, a = n[0], o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; !t && s.isLoop() || (r += e(a, s)); } return r; } else return; }; } It(wx, { degree: hC(function(e, t) { return t.source().same(t.target()) ? 2 : 1; }), indegree: hC(function(e, t) { return t.target().same(e) ? 1 : 0; }), outdegree: hC(function(e, t) { return t.source().same(e) ? 1 : 0; }) }); function Dp(e, t) { return function(n) { for (var r, a = this.nodes(), o = 0; o < a.length; o++) { var i = a[o], s = i[e](n); s !== void 0 && (r === void 0 || t(s, r)) && (r = s); } return r; }; } It(wx, { minDegree: Dp("degree", function(e, t) { return e < t; }), maxDegree: Dp("degree", function(e, t) { return e > t; }), minIndegree: Dp("indegree", function(e, t) { return e < t; }), maxIndegree: Dp("indegree", function(e, t) { return e > t; }), minOutdegree: Dp("outdegree", function(e, t) { return e < t; }), maxOutdegree: Dp("outdegree", function(e, t) { return e > t; }) }); It(wx, { totalDegree: function(e) { for (var t = 0, n = this.nodes(), r = 0; r < n.length; r++) t += n[r].degree(e); return t; } }); var Vi, Bq, Rq = function(e, t, n) { for (var r = 0; r < e.length; r++) { var a = e[r]; if (!a.locked()) { var o = a._private.position, i = { x: t.x != null ? t.x - o.x : 0, y: t.y != null ? t.y - o.y : 0 }; a.isParent() && !(i.x === 0 && i.y === 0) && a.children().shift(i, n), a.dirtyBoundingBoxCache(); } } }, sP = { 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) { Rq(e, t, !1); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); }, canSet: function(e) { return !e.locked(); } }; Vi = Bq = { position: On.data(sP), // position but no notification to renderer silentPosition: On.data(It({}, sP, { allowBinding: !1, allowSetting: !0, settingTriggersEvent: !1, allowGetting: !1, beforeSet: function(e, t) { Rq(e, t, !0); }, onSet: function(e) { e.dirtyCompoundBoundsCache(); } })), positions: function(e, t) { if (mn(e)) t ? this.silentPosition(e) : this.position(e); else if (sr(e)) { var n = e, r = this.cy(); r.startBatch(); for (var a = 0; a < this.length; a++) { var o = this[a], i = void 0; (i = n(o, a)) && (t ? o.silentPosition(i) : o.position(i)); } r.endBatch(); } return this; }, silentPositions: function(e) { return this.positions(e, !0); }, shift: function(e, t, n) { var r; if (mn(e) ? (r = { x: it(e.x) ? e.x : 0, y: it(e.y) ? e.y : 0 }, n = t) : xt(e) && it(t) && (r = { x: 0, y: 0 }, r[e] = t), r != null) { var a = this.cy(); a.startBatch(); for (var o = 0; o < this.length; o++) { var i = this[o]; if (!(a.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); } } a.endBatch(); } return this; }, silentShift: function(e, t) { return mn(e) ? this.shift(e, !0) : xt(e) && it(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(), a = r.zoom(), o = r.pan(), i = mn(e) ? e : void 0, s = i !== void 0 || t !== void 0 && xt(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 - o[e]) / a) : i !== void 0 && u.position(dq(i, a, o)); } else { var c = n.position(); return i = vx(c, a, o), 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(), a = mn(e) ? e : void 0, o = a !== void 0 || t !== void 0 && xt(e), i = r.hasCompoundNodes(); if (n && n.isNode()) if (o) 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]) : a !== void 0 && l.position({ x: a.x + f.x, y: a.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 a = { x: h.x - g.x, y: h.y - g.y }, e === void 0 ? a : a[e]; } else if (!o) return; return this; } }; Vi.modelPosition = Vi.point = Vi.position; Vi.modelPositions = Vi.points = Vi.positions; Vi.renderedPoint = Vi.renderedPosition; Vi.relativePoint = Vi.relativePosition; var art = Bq, vf, mc; vf = mc = {}; mc.renderedBoundingBox = function(e) { var t = this.boundingBox(e), n = this.cy(), r = n.zoom(), a = n.pan(), o = t.x1 * r + a.x, i = t.x2 * r + a.x, s = t.y1 * r + a.y, l = t.y2 * r + a.y; return { x1: o, x2: i, y1: s, y2: l, w: i - o, h: l - s }; }; mc.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); }; mc.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(T, F, A) { var I = 0, N = 0, L = F + A; return T > 0 && L > 0 && (I = F / L * T, N = A / L * T), { biasDiff: I, biasComplementDiff: N }; } function p(T, F, A, I) { if (A.units === "%") switch (I) { case "width": return T > 0 ? A.pfValue * T : 0; case "height": return F > 0 ? A.pfValue * F : 0; case "average": return T > 0 && F > 0 ? A.pfValue * (T + F) / 2 : 0; case "min": return T > 0 && F > 0 ? T > F ? A.pfValue * F : A.pfValue * T : 0; case "max": return T > 0 && F > 0 ? T > F ? A.pfValue * T : A.pfValue * F : 0; default: return 0; } else return A.units === "px" ? A.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 y = c.height.bottom.value; c.height.bottom.units === "px" && c.height.val > 0 && (y = y * 100 / c.height.val); var x = h(c.width.val - d.w, v, m), w = x.biasDiff, k = x.biasComplementDiff, C = h(c.height.val - d.h, g, y), S = C.biasDiff, _ = C.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 = (-w + d.x1 + d.x2 + k) / 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 a = this[r], o = a._private; (!o.compoundBoundsClean || e) && (n(a), t.batching() || (o.compoundBoundsClean = !0)); } return this; }; var qo = function(e) { return e === 1 / 0 || e === -1 / 0 ? 0 : e; }, Ai = function(e, t, n, r, a) { r - t === 0 || a - n === 0 || t == null || n == null || r == null || a == 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 = a > e.y2 ? a : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1); }, Bc = function(e, t) { return t == null ? e : Ai(e, t.x1, t.y1, t.x2, t.y2); }, _v = function(e, t, n) { return Li(e, t, n); }, G1 = function(e, t, n) { if (!t.cy().headless()) { var r = t._private, a = r.rstyle, o = a.arrowWidth / 2, i = t.pstyle(n + "-arrow-shape").value, s, l; if (i !== "none") { n === "source" ? (s = a.srcX, l = a.srcY) : n === "target" ? (s = a.tgtX, l = a.tgtY) : (s = a.midX, l = a.midY); var u = r.arrowBounds = r.arrowBounds || {}, c = u[n] = u[n] || {}; c.x1 = s - o, c.y1 = l - o, c.x2 = s + o, c.y2 = l + o, c.w = c.x2 - c.x1, c.h = c.y2 - c.y1, By(c, 1), Ai(e, c.x1, c.y1, c.x2, c.y2); } } }, vC = function(e, t, n) { if (!t.cy().headless()) { var r; n ? r = n + "-" : r = ""; var a = t._private, o = a.rstyle, i = t.pstyle(r + "label").strValue; if (i) { var s = t.pstyle("text-halign"), l = t.pstyle("text-valign"), u = _v(o, "labelWidth", n), c = _v(o, "labelHeight", n), d = _v(o, "labelX", n), f = _v(o, "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, y = t.pstyle("text-border-width").pfValue, x = y / 2, w = t.pstyle("text-background-padding").pfValue, k = 2, C = c, S = u, _ = S / 2, T = C / 2, F, A, I, N; if (v) F = d - _, A = d + _, I = f - T, N = f + T; else { switch (s.value) { case "left": F = d - S, A = d; break; case "center": F = d - _, A = d + _; break; case "right": F = d, A = d + S; break; } switch (l.value) { case "top": I = f - C, N = f; break; case "center": I = f - T, N = f + T; break; case "bottom": I = f, N = f + C; break; } } F += h - Math.max(g, x) - w - k, A += h + Math.max(g, x) + w + k, I += p - Math.max(g, x) - w - k, N += p + Math.max(g, x) + w + k; var L = n || "main", z = a.labelBounds, P = z[L] = z[L] || {}; P.x1 = F, P.y1 = I, P.x2 = A, P.y2 = N, P.w = A - F, P.h = N - I; var D = v && m.strValue === "autorotate", M = m.pfValue != null && m.pfValue !== 0; if (D || M) { var V = D ? _v(a.rstyle, "labelAngle", n) : m.pfValue, Q = Math.cos(V), X = Math.sin(V), ee = (F + A) / 2, ue = (I + N) / 2; if (!v) { switch (s.value) { case "left": ee = A; break; case "right": ee = F; break; } switch (l.value) { case "top": ue = N; break; case "bottom": ue = I; break; } } var ve = function(we, Oe) { return we = we - ee, Oe = Oe - ue, { x: we * Q - Oe * X + ee, y: we * X + Oe * Q + ue }; }, ge = ve(F, I), se = ve(F, N), ne = ve(A, I), W = ve(A, N); F = Math.min(ge.x, se.x, ne.x, W.x), A = Math.max(ge.x, se.x, ne.x, W.x), I = Math.min(ge.y, se.y, ne.y, W.y), N = Math.max(ge.y, se.y, ne.y, W.y); } var Y = L + "Rot", re = z[Y] = z[Y] || {}; re.x1 = F, re.y1 = I, re.x2 = A, re.y2 = N, re.w = A - F, re.h = N - I, Ai(e, F, I, A, N), Ai(a.labelBounds.all, F, I, A, N); } return e; } }, ort = 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 a = t.pstyle("outline-offset").value, o = t.pstyle("shape").value, i = r + a, s = (e.w + i * 2) / e.w, l = (e.h + i * 2) / e.h, u = 0, c = 0; ["diamond", "pentagon", "round-triangle"].includes(o) ? (s = (e.w + i * 2.4) / e.w, c = -i / 3.6) : ["concave-hexagon", "rhomboid", "right-rhomboid"].includes(o) ? s = (e.w + i * 2.4) / e.w : o === "star" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.6) / e.h, c = -i / 3.8) : o === "triangle" ? (s = (e.w + i * 2.8) / e.w, l = (e.h + i * 2.4) / e.h, c = -i / 1.4) : o === "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 (Ry(e, [Math.ceil(d / 2), Math.ceil(f / 2)]), u != 0 || c !== 0) { var h = SJe(e, u, c); fq(e, h); } } } }, irt = function(e, t) { var n = e._private.cy, r = n.styleEnabled(), a = n.headless(), o = Co(), 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(xe) { return xe.pstyle("display").value !== "none"; }, y = !r || g(e) && (!l || g(e.source()) && g(e.target())); if (y) { var x = 0, w = 0; r && t.includeOverlays && (x = e.pstyle("overlay-opacity").value, x !== 0 && (w = e.pstyle("overlay-padding").value)); var k = 0, C = 0; r && t.includeUnderlays && (k = e.pstyle("underlay-opacity").value, k !== 0 && (C = e.pstyle("underlay-padding").value)); var S = Math.max(w, C), _ = 0, T = 0; if (r && (_ = e.pstyle("width").pfValue, T = _ / 2), s && t.includeNodes) { var F = e.position(); h = F.x, p = F.y; var A = e.outerWidth(), I = A / 2, N = e.outerHeight(), L = N / 2; u = h - I, c = h + I, d = p - L, f = p + L, Ai(o, u, d, c, f), r && t.includeOutlines && ort(o, e); } else if (l && t.includeEdges) if (r && !a) { var z = 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 -= T, c += T, d -= T, f += T, Ai(o, u, d, c, f), z === "haystack") { var P = v.haystackPts; if (P && P.length === 2) { if (u = P[0].x, d = P[0].y, c = P[1].x, f = P[1].y, u > c) { var D = u; u = c, c = D; } if (d > f) { var M = d; d = f, f = M; } Ai(o, u - T, d - T, c + T, f + T); } } else if (z === "bezier" || z === "unbundled-bezier" || z.endsWith("segments") || z.endsWith("taxi")) { var V; switch (z) { case "bezier": case "unbundled-bezier": V = v.bezierPts; break; case "segments": case "taxi": case "round-segments": case "round-taxi": V = v.linePts; break; } if (V != null) for (var Q = 0; Q < V.length; Q++) { var X = V[Q]; u = X.x - T, c = X.x + T, d = X.y - T, f = X.y + T, Ai(o, u, d, c, f); } } } else { var ee = e.source(), ue = ee.position(), ve = e.target(), ge = ve.position(); if (u = ue.x, c = ge.x, d = ue.y, f = ge.y, u > c) { var se = u; u = c, c = se; } if (d > f) { var ne = d; d = f, f = ne; } u -= T, c += T, d -= T, f += T, Ai(o, u, d, c, f); } if (r && t.includeEdges && l && (G1(o, e, "mid-source"), G1(o, e, "mid-target"), G1(o, e, "source"), G1(o, e, "target")), r) { var W = e.pstyle("ghost").value === "yes"; if (W) { var Y = e.pstyle("ghost-offset-x").pfValue, re = e.pstyle("ghost-offset-y").pfValue; Ai(o, o.x1 + Y, o.y1 + re, o.x2 + Y, o.y2 + re); } } var we = i.bodyBounds = i.bodyBounds || {}; z9(we, o), Ry(we, m), By(we, 1), r && (u = o.x1, c = o.x2, d = o.y1, f = o.y2, Ai(o, u - S, d - S, c + S, f + S)); var Oe = i.overlayBounds = i.overlayBounds || {}; z9(Oe, o), Ry(Oe, m), By(Oe, 1); var Ne = i.labelBounds = i.labelBounds || {}; Ne.all != null ? CJe(Ne.all) : Ne.all = Co(), r && t.includeLabels && (t.includeMainLabels && vC(o, e, null), l && (t.includeSourceLabels && vC(o, e, "source"), t.includeTargetLabels && vC(o, e, "target"))); } return o.x1 = qo(o.x1), o.y1 = qo(o.y1), o.x2 = qo(o.x2), o.y2 = qo(o.y2), o.w = qo(o.x2 - o.x1), o.h = qo(o.y2 - o.y1), o.w > 0 && o.h > 0 && y && (Ry(o, m), By(o, 1)), o; }, zq = function(e) { var t = 0, n = function(a) { return (a ? 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; }, Vq = function(e) { if (e.isEdge()) { var t = e.source().position(), n = e.target().position(), r = function(a) { return Math.round(a); }; return UQe([r(t.x), r(t.y), r(n.x), r(n.y)]); } else return 0; }, lP = function(e, t) { var n = e._private, r, a = e.isEdge(), o = t == null ? uP : zq(t), i = o === uP, s = Vq(e), l = n.bbCachePosKey === s, u = t.useCache && l, c = function(h) { return h._private.bbCache == null || h._private.styleDirty; }, d = !u || c(e) || a && c(e.source()) || c(e.target()); if (d ? (l || e.recalculateRenderedStyle(u), r = irt(e, yg), n.bbCache = r, n.bbCachePosKey = s) : r = n.bbCache, !i) { var f = e.isNode(); r = Co(), (t.includeNodes && f || t.includeEdges && !f) && (t.includeOverlays ? Bc(r, n.overlayBounds) : Bc(r, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!a || t.includeSourceLabels && t.includeTargetLabels) ? Bc(r, n.labelBounds.all) : (t.includeMainLabels && Bc(r, n.labelBounds.mainRot), t.includeSourceLabels && Bc(r, n.labelBounds.sourceRot), t.includeTargetLabels && Bc(r, n.labelBounds.targetRot))), r.w = r.x2 - r.x1, r.h = r.y2 - r.y1; } return r; }, yg = { includeNodes: !0, includeEdges: !0, includeLabels: !0, includeMainLabels: !0, includeSourceLabels: !0, includeTargetLabels: !0, includeOverlays: !0, includeUnderlays: !0, includeOutlines: !0, useCache: !0 }, uP = zq(yg), cP = xa(yg); mc.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 = yg : e = cP(e), t = lP(this[0], e); else { t = Co(), e = e || yg; var n = cP(e), r = this, a = r.cy(), o = a.styleEnabled(); if (o) for (var i = 0; i < r.length; i++) { var s = r[i], l = s._private, u = Vq(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]; Bc(t, lP(h, n)); } } return t.x1 = qo(t.x1), t.y1 = qo(t.y1), t.x2 = qo(t.x2), t.y2 = qo(t.y2), t.w = qo(t.x2 - t.x1), t.h = qo(t.y2 - t.y1), t; }; mc.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; }; mc.boundingBoxAt = function(e) { var t = this.nodes(), n = this.cy(), r = n.hasCompoundNodes(), a = n.collection(); if (r && (a = t.filter(function(u) { return u.isParent(); }), t = t.not(a)), mn(e)) { var o = e; e = function() { return o; }; } 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 && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)); var l = kJe(this.boundingBox({ useCache: !1 })); return t.silentPositions(s), r && (a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), a.updateCompoundBounds(!0)), n.endBatch(), l; }; vf.boundingbox = vf.bb = vf.boundingBox; vf.renderedBoundingbox = vf.renderedBoundingBox; var srt = mc, jv, Fm; jv = Fm = {}; var jq = function(e) { e.uppercaseName = P9(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = P9(e.outerName), jv[e.name] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { if (t.isParent()) return t.updateCompoundBounds(), n[e.autoName] || 0; var o = t.pstyle(e.name); switch (o.strValue) { case "label": return t.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0; default: return o.pfValue; } } else return 1; }, jv["outer" + e.uppercaseName] = function() { var t = this[0], n = t._private, r = n.cy, a = r._private.styleEnabled; if (t) if (a) { var o = t[e.name](), i = t.pstyle("border-width").pfValue, s = 2 * t.padding(); return o + i + s; } else return 1; }, jv["rendered" + e.uppercaseName] = function() { var t = this[0]; if (t) { var n = t[e.name](); return n * this.cy().zoom(); } }, jv["rendered" + e.uppercaseOuterName] = function() { var t = this[0]; if (t) { var n = t[e.outerName](); return n * this.cy().zoom(); } }; }; jq({ name: "width" }); jq({ name: "height" }); Fm.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; }; Fm.paddedHeight = function() { var e = this[0]; return e.height() + 2 * e.padding(); }; Fm.paddedWidth = function() { var e = this[0]; return e.width() + 2 * e.padding(); }; var lrt = Fm, urt = function(e, t) { if (e.isEdge()) return t(e); }, crt = function(e, t) { if (e.isEdge()) { var n = e.cy(); return vx(t(e), n.zoom(), n.pan()); } }, drt = function(e, t) { if (e.isEdge()) { var n = e.cy(), r = n.pan(), a = n.zoom(); return t(e).map(function(o) { return vx(o, a, r); }); } }, prt = function(e) { return e.renderer().getControlPoints(e); }, frt = function(e) { return e.renderer().getSegmentPoints(e); }, hrt = function(e) { return e.renderer().getSourceEndpoint(e); }, vrt = function(e) { return e.renderer().getTargetEndpoint(e); }, grt = function(e) { return e.renderer().getEdgeMidpoint(e); }, dP = { controlPoints: { get: prt, mult: !0 }, segmentPoints: { get: frt, mult: !0 }, sourceEndpoint: { get: hrt }, targetEndpoint: { get: vrt }, midpoint: { get: grt } }, mrt = function(e) { return "rendered" + e[0].toUpperCase() + e.substr(1); }, yrt = Object.keys(dP).reduce(function(e, t) { var n = dP[t], r = mrt(t); return e[t] = function() { return urt(this, n.get); }, n.mult ? e[r] = function() { return drt(this, n.get); } : e[r] = function() { return crt(this, n.get); }, e; }, {}), brt = It({}, art, srt, lrt, yrt); /*! 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 Hq = function(e, t) { this.recycle(e, t); }; function Tv() { return !1; } function X1() { return !0; } Hq.prototype = { instanceString: function() { return "event"; }, recycle: function(e, t) { if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = Tv, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? X1 : Tv) : 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(), a = this.cy.pan(); this.renderedPosition = { x: n.x * r + a.x, y: n.y * r + a.y }; } this.timeStamp = e && e.timeStamp || Date.now(); }, preventDefault: function() { this.isDefaultPrevented = X1; var e = this.originalEvent; e && e.preventDefault && e.preventDefault(); }, stopPropagation: function() { this.isPropagationStopped = X1; var e = this.originalEvent; e && e.stopPropagation && e.stopPropagation(); }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = X1, this.stopPropagation(); }, isDefaultPrevented: Tv, isPropagationStopped: Tv, isImmediatePropagationStopped: Tv }; var Uq = /^([^.]+)(\.(?:[^.]+))?$/, wrt = ".*", qq = { 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 }, pP = Object.keys(qq), xrt = {}; function xx() { for (var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : xrt, t = arguments.length > 1 ? arguments[1] : void 0, n = 0; n < pP.length; n++) { var r = pP[n]; this[r] = e[r] || qq[r]; } this.context = t || this.context, this.listeners = [], this.emitting = 0; } var oc = xx.prototype, Wq = function(e, t, n, r, a, o, i) { sr(r) && (a = r, r = null), i && (o == null ? o = i : o = It({}, o, i)); for (var s = Vn(n) ? n : n.split(/\s+/), l = 0; l < s.length; l++) { var u = s[l]; if (!tc(u)) { var c = u.match(Uq); if (c) { var d = c[1], f = c[2] ? c[2] : null, h = t(e, u, d, f, r, a, o); if (h === !1) break; } } } }, fP = function(e, t) { return e.addEventFields(e.context, t), new Hq(t.type, t); }, krt = function(e, t, n) { if (zZe(n)) { t(e, n); return; } else if (mn(n)) { t(e, fP(e, n)); return; } for (var r = Vn(n) ? n : n.split(/\s+/), a = 0; a < r.length; a++) { var o = r[a]; if (!tc(o)) { var i = o.match(Uq); if (i) { var s = i[1], l = i[2] ? i[2] : null, u = fP(e, { type: s, namespace: l, target: e.context }); t(e, u); } } } }; oc.on = oc.addListener = function(e, t, n, r, a) { return Wq(this, function(o, i, s, l, u, c, d) { sr(c) && o.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, a), this; }; oc.one = function(e, t, n, r) { return this.on(e, t, n, r, { one: !0 }); }; oc.removeListener = oc.off = function(e, t, n, r) { var a = this; this.emitting !== 0 && (this.listeners = XQe(this.listeners)); for (var o = this.listeners, i = function(l) { var u = o[l]; Wq(a, 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 o.splice(l, 1), !1; }, e, t, n, r); }, s = o.length - 1; s >= 0; s--) i(s); return this; }; oc.removeAllListeners = function() { return this.removeListener("*"); }; oc.emit = oc.trigger = function(e, t, n) { var r = this.listeners, a = r.length; return this.emitting++, Vn(t) || (t = [t]), krt(this, function(o, i) { n != null && (r = [{ event: i.event, type: i.type, namespace: i.namespace, callback: n }], a = r.length); for (var s = function(u) { var c = r[u]; if (c.type === i.type && (!c.namespace || c.namespace === i.namespace || c.namespace === wrt) && o.eventMatches(o.context, c, i)) { var d = [i]; t != null && ZQe(d, t), o.beforeEmit(o.context, c, i), c.conf && c.conf.one && (o.listeners = o.listeners.filter(function(p) { return p !== c; })); var f = o.callbackContext(o.context, c, i), h = c.callback.apply(f, d); o.afterEmit(o.context, c, i), h === !1 && (i.stopPropagation(), i.preventDefault()); } }, l = 0; l < a; l++) s(l); o.bubble(o.context) && !i.isPropagationStopped() && o.parent(o.context).emit(i, t); }, e), this.emitting--, this; }; var Crt = { 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 && Tm(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(); } }, Y1 = function(e) { return xt(e) ? new rc(e) : e; }, Kq = { createEmitter: function() { for (var e = 0; e < this.length; e++) { var t = this[e], n = t._private; n.emitter || (n.emitter = new xx(Crt, t)); } return this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { for (var r = Y1(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().on(e, r, n); } return this; }, removeListener: function(e, t, n) { for (var r = Y1(t), a = 0; a < this.length; a++) { var o = this[a]; o.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 = Y1(t), a = 0; a < this.length; a++) { var o = this[a]; o.emitter().one(e, r, n); } return this; }, once: function(e, t, n) { for (var r = Y1(t), a = 0; a < this.length; a++) { var o = this[a]; o.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; } }; On.eventAliasesOn(Kq); var Gq = { 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 (xt(e) || No(e)) return new rc(e).filter(this); if (sr(e)) { for (var n = this.spawn(), r = this, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); i && n.push(o); } return n; } return this.spawn(); }, not: function(e) { if (e) { xt(e) && (e = this.filter(e)); for (var t = this.spawn(), n = 0; n < this.length; n++) { var r = this[n], a = e.has(r); a || t.push(r); } return t; } else return this; }, absoluteComplement: function() { var e = this.cy(); return e.mutableElements().not(this); }, intersect: function(e) { if (xt(e)) { var t = e; return this.filter(t); } for (var n = this.spawn(), r = this, a = e, o = this.length < e.length, i = o ? r : a, s = o ? a : 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; xt(e) && (e = t.$(e)); var n = this.spawn(), r = this, a = e, o = 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 o(r, a), o(a, r), n; }, diff: function(e) { var t = this._private.cy; xt(e) && (e = t.$(e)); var n = this.spawn(), r = this.spawn(), a = this.spawn(), o = 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 ? a.merge(f) : c.push(f); } }; return s(o, i, n), s(i, o, r), { left: n, right: r, both: a }; }, add: function(e) { var t = this._private.cy; if (!e) return this; if (xt(e)) { var n = e; e = t.mutableElements().filter(n); } for (var r = this.spawnSelf(), a = 0; a < e.length; a++) { var o = e[a], i = !this.has(o); i && r.push(o); } return r; }, // in place merge on calling collection merge: function(e) { var t = this._private, n = t.cy; if (!e) return this; if (e && xt(e)) { var r = e; e = n.mutableElements().filter(r); } for (var a = t.map, o = 0; o < e.length; o++) { var i = e[o], s = i._private.data.id, l = !a.has(s); if (l) { var u = this.length++; this[u] = i, a.set(s, { ele: i, index: u }); } } return this; }, unmergeAt: function(e) { var t = this[e], n = t.id(), r = this._private, a = r.map; this[e] = void 0, a.delete(n); var o = e === this.length - 1; if (this.length > 1 && !o) { var i = this.length - 1, s = this[i], l = s._private.data.id; this[i] = void 0, this[e] = s, a.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, a = r.get(n); if (!a) return this; var o = a.index; return this.unmergeAt(o), this; }, // remove eles in place on calling collection unmerge: function(e) { var t = this._private.cy; if (!e) return this; if (e && xt(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, a = 0; a < r.length; a++) { var o = r[a], i = t ? e.apply(t, [o, a, r]) : e(o, a, r); n.push(i); } return n; }, reduce: function(e, t) { for (var n = t, r = this, a = 0; a < r.length; a++) n = e(n, r[a], a, r); return n; }, max: function(e, t) { for (var n = -1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s > n && (n = s, r = i); } return { value: n, ele: r }; }, min: function(e, t) { for (var n = 1 / 0, r, a = this, o = 0; o < a.length; o++) { var i = a[o], s = t ? e.apply(t, [i, o, a]) : e(i, o, a); s < n && (n = s, r = i); } return { value: n, ele: r }; } }, kn = Gq; kn.u = kn["|"] = kn["+"] = kn.union = kn.or = kn.add; kn["\\"] = kn["!"] = kn["-"] = kn.difference = kn.relativeComplement = kn.subtract = kn.not; kn.n = kn["&"] = kn["."] = kn.and = kn.intersection = kn.intersect; kn["^"] = kn["(+)"] = kn["(-)"] = kn.symmetricDifference = kn.symdiff = kn.xor; kn.fnFilter = kn.filterFn = kn.stdFilter = kn.filter; kn.complement = kn.abscomp = kn.absoluteComplement; var Srt = { 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; } }, Xq = function(e, t) { var n = e.cy(), r = n.hasCompoundNodes(); function a(u) { var c = u.pstyle("z-compound-depth"); return c.value === "auto" ? r ? u.zDepth() : 0 : c.value === "bottom" ? -1 : c.value === "top" ? E_ : 0; } var o = a(e) - a(t); if (o !== 0) return o; 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(); }, o2 = { forEach: function(e, t) { if (sr(e)) for (var n = this.length, r = 0; r < n; r++) { var a = this[r], o = t ? e.apply(t, [a, r, this]) : e(a, r, this); if (o === !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 a = e; a >= 0 && a < t && a < r; a++) n.push(this[a]); 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 (!sr(e)) return this; var t = this.toArray().sort(e); return this.spawn(t); }, sortByZIndex: function() { return this.sort(Xq); }, 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 : E_ - 1; } else { var a = t.source, o = t.target, i = a.zDepth(), s = o.zDepth(); return Math.max(i, s, 0); } } } }; o2.each = o2.forEach; var Ert = function() { var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : zr(Symbol)) != e && zr(Symbol.iterator) != e; t && (o2[Symbol.iterator] = function() { var n = this, r = { value: void 0, done: !1 }, a = 0, o = this.length; return qU({ next: function() { return a < o ? r.value = n[a++] : (r.value = void 0, r.done = !0), r; } }, Symbol.iterator, function() { return this; }); }); }; Ert(); var _rt = xa({ nodeDimensionsIncludeLabels: !1 }), Vy = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e) { e = _rt(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(w) { return !w.isParent(); }), a = this.cy(), o = t.eles, i = function(w) { return w.id(); }, s = cg(n, i); e.emit({ type: "layoutstart", layout: e }), e.animations = []; var l = function(w, k, C) { var S = { x: k.x1 + k.w / 2, y: k.y1 + k.h / 2 }, _ = { // scale from center of bounding box (not necessarily 0,0) x: (C.x - S.x) * w, y: (C.y - S.y) * w }; return { x: S.x + _.x, y: S.y + _.y }; }, u = t.spacingFactor && t.spacingFactor !== 1, c = function() { if (!u) return null; for (var w = Co(), k = 0; k < r.length; k++) { var C = r[k], S = s(C, k); EJe(w, S.x, S.y); } return w; }, d = c(), f = cg(function(w, k) { var C = s(w, k); if (u) { var S = Math.abs(t.spacingFactor); C = l(S, d, C); } return t.transform != null && (C = t.transform(w, C)), C; }, 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 y = a.animation({ fit: { boundingBox: o.boundingBoxAt(f), padding: t.padding }, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(y); } else if (t.zoom !== void 0 && t.pan !== void 0) { var x = a.animation({ zoom: t.zoom, pan: t.pan, duration: t.animationDuration, easing: t.animationEasing }); e.animations.push(x); } e.animations.forEach(function(w) { return w.play(); }), e.one("layoutready", t.ready), e.emit({ type: "layoutready", layout: e }), zh.all(e.animations.map(function(w) { return w.promise(); })).then(function() { e.one("layoutstop", t.stop), e.emit({ type: "layoutstop", layout: e }); }); } else r.positions(f), t.fit && a.fit(t.eles, t.padding), t.zoom != null && a.zoom(t.zoom), t.pan && a.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(It({}, e, { eles: this })); } }; Vy.createLayout = Vy.makeLayout = Vy.layout; function Yq(e, t, n) { var r = n._private, a = r.styleCache = r.styleCache || [], o; return (o = a[e]) != null || (o = a[e] = t(n)), o; } function kx(e, t) { return e = Bd(e), function(n) { return Yq(e, t, n); }; } function Cx(e, t) { e = Bd(e); var n = function(r) { return t.call(r); }; return function() { var r = this[0]; if (r) return Yq(e, n, r); }; } var va = { 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(), a = this; e = !!(e || e === void 0), r && (a = this.spawnSelf().merge(this.descendants()).merge(this.parents())); var o = a; return e ? o.emitAndNotify("style") : o.emit("style"), a.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 a = n._private.style[e]; return a ?? (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, a = n.style(); if (mn(e)) { var o = e; a.applyBypass(this, o, r), this.emitAndNotify("style"); } else if (xt(e)) if (t === void 0) { var i = this[0]; return i ? a.getStylePropertyValue(i, e) : void 0; } else a.applyBypass(this, e, t, r), this.emitAndNotify("style"); else if (e === void 0) { var s = this[0]; return s ? a.getRawStyle(s) : void 0; } return this; }, removeStyle: function(e) { var t = this.cy(); if (!t.styleEnabled()) return this; var n = !1, r = t.style(), a = this; if (e === void 0) for (var o = 0; o < a.length; o++) { var i = a[o]; r.removeAllBypasses(i, n); } else { e = e.split(/\s+/); for (var s = 0; s < a.length; s++) { var l = a[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, a = n.pstyle("opacity").value; if (!t) return a; var o = r.data.parent ? n.parents() : null; if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.pstyle("opacity").value; a = l * a; } return a; } }, 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 gC(e, t) { var n = e._private, r = n.data.parent ? e.parents() : null; if (r) for (var a = 0; a < r.length; a++) { var o = r[a]; if (!t(o)) return !1; } return !0; } function D_(e) { var t = e.ok, n = e.edgeOkViaNode || e.ok, r = e.parentOk || e.ok; return function() { var a = this.cy(); if (!a.styleEnabled()) return !0; var o = this[0], i = a.hasCompoundNodes(); if (o) { var s = o._private; if (!t(o)) return !1; if (o.isNode()) return !i || gC(o, r); var l = s.source, u = s.target; return n(l) && (!i || gC(l, n)) && (l === u || n(u) && (!i || gC(u, n))); } }; } var Uh = kx("eleTakesUpSpace", function(e) { return e.pstyle("display").value === "element" && e.width() !== 0 && (e.isNode() ? e.height() !== 0 : !0); }); va.takesUpSpace = Cx("takesUpSpace", D_({ ok: Uh })); var Trt = kx("eleInteractive", function(e) { return e.pstyle("events").value === "yes" && e.pstyle("visibility").value === "visible" && Uh(e); }), $rt = kx("parentInteractive", function(e) { return e.pstyle("visibility").value === "visible" && Uh(e); }); va.interactive = Cx("interactive", D_({ ok: Trt, parentOk: $rt, edgeOkViaNode: Uh })); va.noninteractive = function() { var e = this[0]; if (e) return !e.interactive(); }; var Ort = kx("eleVisible", function(e) { return e.pstyle("visibility").value === "visible" && e.pstyle("opacity").pfValue !== 0 && Uh(e); }), Frt = Uh; va.visible = Cx("visible", D_({ ok: Ort, edgeOkViaNode: Frt })); va.hidden = function() { var e = this[0]; if (e) return !e.visible(); }; va.isBundledBezier = Cx("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; }); va.bypass = va.css = va.style; va.renderedCss = va.renderedStyle; va.removeBypass = va.removeCss = va.removeStyle; va.pstyle = va.parsedStyle; var Bu = {}; function hP(e) { return function() { var t = arguments, n = []; if (t.length === 2) { var r = t[0], a = t[1]; this.on(e.event, r, a); } else if (t.length === 1 && sr(t[0])) { var o = t[0]; this.on(e.event, o); } else if (t.length === 0 || t.length === 1 && Vn(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 qh(e) { Bu[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]; } }, Bu[e.on] = hP({ event: e.on, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !0 }), Bu[e.off] = hP({ event: e.off, field: e.field, ableField: e.ableField, overrideAble: e.overrideAble, value: !1 }); } qh({ field: "locked", overrideField: function(e) { return e.cy().autolock() ? !0 : void 0; }, on: "lock", off: "unlock" }); qh({ field: "grabbable", overrideField: function(e) { return e.cy().autoungrabify() || e.pannable() ? !1 : void 0; }, on: "grabify", off: "ungrabify" }); qh({ field: "selected", ableField: "selectable", overrideAble: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "select", off: "unselect" }); qh({ field: "selectable", overrideField: function(e) { return e.cy().autounselectify() ? !1 : void 0; }, on: "selectify", off: "unselectify" }); Bu.deselect = Bu.unselect; Bu.grabbed = function() { var e = this[0]; if (e) return e._private.grabbed; }; qh({ field: "active", on: "activate", off: "unactivate" }); qh({ field: "pannable", on: "panify", off: "unpanify" }); Bu.inactive = function() { var e = this[0]; if (e) return !e._private.active; }; var Ma = {}, vP = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) { for (var i = !1, s = o.connectedEdges(), l = 0; l < s.length; l++) { var u = s[l], c = u.source(), d = u.target(); if (e.noIncomingEdges && d === o && c !== o || e.noOutgoingEdges && c === o && d !== o) { i = !0; break; } } i || r.push(o); } } return this.spawn(r, !0).filter(t); }; }, gP = function(e) { return function(t) { for (var n = this, r = [], a = 0; a < n.length; a++) { var o = n[a]; if (o.isNode()) for (var i = o.connectedEdges(), s = 0; s < i.length; s++) { var l = i[s], u = l.source(), c = l.target(); e.outgoing && u === o ? (r.push(l), r.push(c)) : e.incoming && c === o && (r.push(l), r.push(u)); } } return this.spawn(r, !0).filter(t); }; }, mP = function(e) { return function(t) { for (var n = this, r = [], a = {}; ; ) { var o = e.outgoing ? n.outgoers() : n.incomers(); if (o.length === 0) break; for (var i = !1, s = 0; s < o.length; s++) { var l = o[s], u = l.id(); a[u] || (a[u] = !0, r.push(l), i = !0); } if (!i) break; n = o; } return this.spawn(r, !0).filter(t); }; }; Ma.clearTraversalCache = function() { for (var e = 0; e < this.length; e++) this[e]._private.traversalCache = null; }; It(Ma, { // get the root nodes in the DAG roots: vP({ noIncomingEdges: !0 }), // get the leaf nodes in the DAG leaves: vP({ noOutgoingEdges: !0 }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: Yo(gP({ outgoing: !0 }), "outgoers"), // aka DAG descendants successors: mP({ outgoing: !0 }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: Yo(gP({ incoming: !0 }), "incomers"), // aka DAG ancestors predecessors: mP({ incoming: !0 }) }); It(Ma, { neighborhood: Yo(function(e) { for (var t = [], n = this.nodes(), r = 0; r < n.length; r++) for (var a = n[r], o = a.connectedEdges(), i = 0; i < o.length; i++) { var s = o[i], l = s.source(), u = s.target(), c = a === 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); } }); Ma.neighbourhood = Ma.neighborhood; Ma.closedNeighbourhood = Ma.closedNeighborhood; Ma.openNeighbourhood = Ma.openNeighborhood; It(Ma, { source: Yo(function(e) { var t = this[0], n; return t && (n = t._private.source || t.cy().collection()), n && e ? n.filter(e) : n; }, "source"), target: Yo(function(e) { var t = this[0], n; return t && (n = t._private.target || t.cy().collection()), n && e ? n.filter(e) : n; }, "target"), sources: yP({ attr: "source" }), targets: yP({ attr: "target" }) }); function yP(e) { return function(t) { for (var n = [], r = 0; r < this.length; r++) { var a = this[r], o = a._private[e.attr]; o && n.push(o); } return this.spawn(n, !0).filter(t); }; } It(Ma, { edgesWith: Yo(bP(), "edgesWith"), edgesTo: Yo(bP({ thisIsSrc: !0 }), "edgesTo") }); function bP(e) { return function(t) { var n = [], r = this._private.cy, a = e || {}; xt(t) && (t = r.$(t)); for (var o = 0; o < t.length; o++) for (var i = t[o]._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 && ((a.thisIsSrc || a.thisIsTgt) && (a.thisIsSrc && !c || a.thisIsTgt && !d) || n.push(l)); } return this.spawn(n, !0); }; } It(Ma, { connectedEdges: Yo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; if (a.isNode()) for (var o = a._private.edges, i = 0; i < o.length; i++) { var s = o[i]; t.push(s); } } return this.spawn(t, !0).filter(e); }, "connectedEdges"), connectedNodes: Yo(function(e) { for (var t = [], n = this, r = 0; r < n.length; r++) { var a = n[r]; a.isEdge() && (t.push(a.source()[0]), t.push(a.target()[0])); } return this.spawn(t, !0).filter(e); }, "connectedNodes"), parallelEdges: Yo(wP(), "parallelEdges"), codirectedEdges: Yo(wP({ codirected: !0 }), "codirectedEdges") }); function wP(e) { var t = { codirected: !1 }; return e = It({}, t, e), function(n) { for (var r = [], a = this.edges(), o = e, i = 0; i < a.length; i++) for (var s = a[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, y = m === d && g === c, x = c === m && d === g; (o.codirected && y || !o.codirected && (y || x)) && r.push(p); } return this.spawn(r, !0).filter(n); }; } It(Ma, { components: function(e) { var t = this, n = t.cy(), r = n.collection(), a = e == null ? t.nodes() : e.nodes(), o = []; e != null && a.empty() && (a = e.sources()); var i = function(l, u) { r.merge(l), a.unmerge(l), u.merge(l); }; if (a.empty()) return t.spawn(); var s = function() { var l = n.collection(); o.push(l); var u = a[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 (a.length > 0); return o; }, component: function() { var e = this[0]; return e.cy().mutableElements().components(e)[0]; } }); Ma.componentsOf = Ma.components; var ga = 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) { fr("A collection must have a reference to the core"); return; } var a = new hs(), o = !1; if (!t) t = []; else if (t.length > 0 && mn(t[0]) && !Tm(t[0])) { o = !0; for (var i = [], s = new Rh(), 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 = uq(); else if (e.hasElementWithId(d.id) || s.has(d.id)) continue; var f = new hx(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 || !a.has(m)) && (n && a.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 hs(), y = this.eles, x = 0; x < y.length; x++) { var w = y[x]; g.set(w.id(), { index: x, ele: w }); } } }, n && (this._private.map = a), o && !r && this.restore(); }, Xn = hx.prototype = ga.prototype = Object.create(Array.prototype); Xn.instanceString = function() { return "collection"; }; Xn.spawn = function(e, t) { return new ga(this.cy(), e, t); }; Xn.spawnSelf = function() { return this.spawn(this); }; Xn.cy = function() { return this._private.cy; }; Xn.renderer = function() { return this._private.cy.renderer(); }; Xn.element = function() { return this[0]; }; Xn.collection = function() { return XU(this) ? this : new ga(this._private.cy, [this]); }; Xn.unique = function() { return new ga(this._private.cy, this, !0); }; Xn.hasElementWithId = function(e) { return e = "" + e, this._private.map.has(e); }; Xn.getElementById = function(e) { e = "" + e; var t = this._private.cy, n = this._private.map.get(e); return n ? n.ele : new ga(t); }; Xn.$id = Xn.getElementById; Xn.poolIndex = function() { var e = this._private.cy, t = e._private.elements, n = this[0]._private.data.id; return t._private.map.get(n).index; }; Xn.indexOf = function(e) { var t = e[0]._private.data.id; return this._private.map.get(t).index; }; Xn.indexOfId = function(e) { return e = "" + e, this._private.map.get(e).index; }; Xn.json = function(e) { var t = this.element(), n = this.cy(); if (t == null && e) return this; if (t != null) { var r = t._private; if (mn(e)) { if (n.startBatch(), e.data) { t.data(e.data); var a = r.data; if (t.isEdge()) { var o = !1, i = {}, s = e.data.source, l = e.data.target; s != null && s != a.source && (i.source = "" + s, o = !0), l != null && l != a.target && (i.target = "" + l, o = !0), o && (t = t.move(i)); } else { var u = "parent" in e.data, c = e.data.parent; u && (c != null || a.parent != null) && c != a.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: fs(r.data), position: fs(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; } } }; Xn.jsons = function() { for (var e = [], t = 0; t < this.length; t++) { var n = this[t], r = n.json(); e.push(r); } return e; }; Xn.clone = function() { for (var e = this.cy(), t = [], n = 0; n < this.length; n++) { var r = this[n], a = r.json(), o = new hx(e, a, !1); t.push(o); } return new ga(e, t); }; Xn.copy = Xn.clone; Xn.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(), a = r._private, o = [], i = [], s, l = 0, u = n.length; l < u; l++) { var c = n[l]; t && !c.removed() || (c.isNode() ? o.push(c) : i.push(c)); } s = o.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 = uq(); else if (it(v.id)) v.id = "" + v.id; else if (tc(v.id) || !xt(v.id)) { fr("Can not create element with invalid string ID `" + v.id + "`"), f(); continue; } else if (r.hasElementWithId(v.id)) { fr("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 y = h, x = ["source", "target"], w = x.length, k = !1, C = 0; C < w; C++) { var S = x[C], _ = v[S]; it(_) && (_ = v[S] = "" + v[S]), _ == null || _ === "" ? (fr("Can not create edge `" + m + "` with unspecified " + S), k = !0) : r.hasElementWithId(_) || (fr("Can not create edge `" + m + "` with nonexistant " + S + " `" + _ + "`"), k = !0); } if (k) { f(); continue; } var T = r.getElementById(v.source), F = r.getElementById(v.target); T.same(F) ? T._private.edges.push(y) : (T._private.edges.push(y), F._private.edges.push(y)), y._private.source = T, y._private.target = F; } p.map = new hs(), p.map.set(m, { ele: h, index: 0 }), p.removed = !1, t && r.addToPool(h); } for (var A = 0; A < o.length; A++) { var I = o[A], N = I._private.data; it(N.parent) && (N.parent = "" + N.parent); var L = N.parent, z = L != null; if (z || I._private.parent) { var P = I._private.parent ? r.collection().merge(I._private.parent) : r.getElementById(L); if (P.empty()) N.parent = void 0; else if (P[0].removed()) An("Node added with missing parent, reference to parent removed"), N.parent = void 0, I._private.parent = null; else { for (var D = !1, M = P; !M.empty(); ) { if (I.same(M)) { D = !0, N.parent = void 0; break; } M = M.parent(); } D || (P[0]._private.children.push(I), I._private.parent = P[0], a.hasCompoundNodes = !0); } } } if (s.length > 0) { for (var V = s.length === n.length ? n : new ga(r, s), Q = 0; Q < V.length; Q++) { var X = V[Q]; X.isNode() || (X.parallelEdges().clearTraversalCache(), X.source().clearTraversalCache(), X.target().clearTraversalCache()); } var ee; a.hasCompoundNodes ? ee = r.collection().merge(V).merge(V.connectedNodes()).merge(V.parent()) : ee = V, ee.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e), e ? V.emitAndNotify("add") : t && V.emit("add"); } return n; }; Xn.removed = function() { var e = this[0]; return e && e._private.removed; }; Xn.inside = function() { var e = this[0]; return e && !e._private.removed; }; Xn.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 = [], a = {}, o = n._private.cy; function i(L) { for (var z = L._private.edges, P = 0; P < z.length; P++) l(z[P]); } function s(L) { for (var z = L._private.children, P = 0; P < z.length; P++) l(z[P]); } function l(L) { var z = a[L.id()]; t && L.removed() || z || (a[L.id()] = !0, L.isNode() ? (r.push(L), i(L), s(L)) : r.unshift(L)); } for (var u = 0, c = n.length; u < c; u++) { var d = n[u]; l(d); } function f(L, z) { var P = L._private.edges; nc(P, z), L.clearTraversalCache(); } function h(L) { L.clearTraversalCache(); } var p = []; p.ids = {}; function v(L, z) { z = z[0], L = L[0]; var P = L._private.children, D = L.id(); nc(P, z), z._private.parent = null, p.ids[D] || (p.ids[D] = !0, p.push(L)); } n.dirtyCompoundBoundsCache(), t && o.removeFromPool(r); for (var m = 0; m < r.length; m++) { var g = r[m]; if (g.isEdge()) { var y = g.source()[0], x = g.target()[0]; f(y, g), f(x, g); for (var w = g.parallelEdges(), k = 0; k < w.length; k++) { var C = w[k]; h(C), C.isBundledBezier() && C.dirtyBoundingBoxCache(); } } else { var S = g.parent(); S.length !== 0 && v(S, g); } t && (g._private.removed = !0); } var _ = o._private.elements; o._private.hasCompoundNodes = !1; for (var T = 0; T < _.length; T++) { var F = _[T]; if (F.isParent()) { o._private.hasCompoundNodes = !0; break; } } var A = new ga(this.cy(), r); A.size() > 0 && (e ? A.emitAndNotify("remove") : t && A.emit("remove")); for (var I = 0; I < p.length; I++) { var N = p[I]; (!t || !N.removed()) && N.updateStyle(); } return A; }; Xn.move = function(e) { var t = this._private.cy, n = this, r = !1, a = !1, o = function(h) { return h == null ? h : "" + h; }; if (e.source !== void 0 || e.target !== void 0) { var i = o(e.source), s = o(e.target), l = i != null && t.hasElementWithId(i), u = s != null && t.hasElementWithId(s); (l || u) && (t.batch(function() { n.remove(r, a), 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, a); }), n.emitAndNotify("move")); } else if (e.parent !== void 0) { var c = o(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, a); 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, a); }), n.emitAndNotify("move"); } } return this; }; [kq, Vnt, zy, Du, sh, rrt, wx, brt, Kq, Gq, Srt, o2, Vy, va, Bu, Ma].forEach(function(e) { It(Xn, e); }); var Art = { add: function(e) { var t, n = this; if (No(e)) { var r = e; if (r._private.cy === n) t = r.restore(); else { for (var a = [], o = 0; o < r.length; o++) { var i = r[o]; a.push(i.json()); } t = new ga(n, a); } } else if (Vn(e)) { var s = e; t = new ga(n, s); } else if (mn(e) && (Vn(e.nodes) || Vn(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 (Vn(p)) for (var v = 0, m = p.length; v < m; v++) { var g = It({ group: h }, p[v]); u.push(g); } } t = new ga(n, u); } else { var y = e; t = new hx(n, y).collection(); } return t; }, remove: function(e) { if (!No(e) && xt(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 Irt(e, t, n, r) { var a = 4, o = 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, A) { return 1 - 3 * A + 3 * F; } function p(F, A) { return 3 * A - 6 * F; } function v(F) { return 3 * F; } function m(F, A, I) { return ((h(A, I) * F + p(A, I)) * F + v(A)) * F; } function g(F, A, I) { return 3 * h(A, I) * F * F + 2 * p(A, I) * F + v(A); } function y(F, A) { for (var I = 0; I < a; ++I) { var N = g(A, e, n); if (N === 0) return A; var L = m(A, e, n) - F; A -= L / N; } return A; } function x() { for (var F = 0; F < l; ++F) f[F] = m(F * u, e, n); } function w(F, A, I) { var N, L, z = 0; do L = A + (I - A) / 2, N = m(L, e, n) - F, N > 0 ? I = L : A = L; while (Math.abs(N) > i && ++z < s); return L; } function k(F) { for (var A = 0, I = 1, N = l - 1; I !== N && f[I] <= F; ++I) A += u; --I; var L = (F - f[I]) / (f[I + 1] - f[I]), z = A + L * u, P = g(z, e, n); return P >= o ? y(F, z) : P === 0 ? z : w(F, A, A + u); } var C = !1; function S() { C = !0, (e !== t || n !== r) && x(); } var _ = function(F) { return C || S(), e === t && n === r ? F : F === 0 ? 0 : F === 1 ? 1 : m(k(F), t, r); }; _.getControlPoints = function() { return [{ x: e, y: t }, { x: n, y: r }]; }; var T = "generateBezier(" + [e, t, n, r] + ")"; return _.toString = function() { return T; }, _; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ var Prt = /* @__PURE__ */ function() { function e(r) { return -r.tension * r.x - r.friction * r.v; } function t(r, a, o) { var i = { x: r.x + o.dx * a, v: r.v + o.dv * a, tension: r.tension, friction: r.friction }; return { dx: i.v, dv: e(i) }; } function n(r, a) { var o = { dx: r.v, dv: e(r) }, i = t(r, a * 0.5, o), s = t(r, a * 0.5, i), l = t(r, a, s), u = 1 / 6 * (o.dx + 2 * (i.dx + s.dx) + l.dx), c = 1 / 6 * (o.dv + 2 * (i.dv + s.dv) + l.dv); return r.x = r.x + u * a, r.v = r.v + c * a, r; } return function r(a, o, 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 (a = parseFloat(a) || 500, o = parseFloat(o) || 20, i = i || null, s.tension = a, s.friction = o, f = i !== null, f ? (u = r(a, o), 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; }; }(), qn = function(e, t, n, r) { var a = Irt(e, t, n, r); return function(o, i, s) { return o + (i - o) * a(s); }; }, jy = { linear: function(e, t, n) { return e + (t - e) * n; }, // default easings ease: qn(0.25, 0.1, 0.25, 1), "ease-in": qn(0.42, 0, 1, 1), "ease-out": qn(0, 0, 0.58, 1), "ease-in-out": qn(0.42, 0, 0.58, 1), // sine "ease-in-sine": qn(0.47, 0, 0.745, 0.715), "ease-out-sine": qn(0.39, 0.575, 0.565, 1), "ease-in-out-sine": qn(0.445, 0.05, 0.55, 0.95), // quad "ease-in-quad": qn(0.55, 0.085, 0.68, 0.53), "ease-out-quad": qn(0.25, 0.46, 0.45, 0.94), "ease-in-out-quad": qn(0.455, 0.03, 0.515, 0.955), // cubic "ease-in-cubic": qn(0.55, 0.055, 0.675, 0.19), "ease-out-cubic": qn(0.215, 0.61, 0.355, 1), "ease-in-out-cubic": qn(0.645, 0.045, 0.355, 1), // quart "ease-in-quart": qn(0.895, 0.03, 0.685, 0.22), "ease-out-quart": qn(0.165, 0.84, 0.44, 1), "ease-in-out-quart": qn(0.77, 0, 0.175, 1), // quint "ease-in-quint": qn(0.755, 0.05, 0.855, 0.06), "ease-out-quint": qn(0.23, 1, 0.32, 1), "ease-in-out-quint": qn(0.86, 0, 0.07, 1), // expo "ease-in-expo": qn(0.95, 0.05, 0.795, 0.035), "ease-out-expo": qn(0.19, 1, 0.22, 1), "ease-in-out-expo": qn(1, 0, 0, 1), // circ "ease-in-circ": qn(0.6, 0.04, 0.98, 0.335), "ease-out-circ": qn(0.075, 0.82, 0.165, 1), "ease-in-out-circ": qn(0.785, 0.135, 0.15, 0.86), // user param easings... spring: function(e, t, n) { if (n === 0) return jy.linear; var r = Prt(e, t, n); return function(a, o, i) { return a + (o - a) * r(i); }; }, "cubic-bezier": qn }; function xP(e, t, n, r, a) { if (r === 1 || t === n) return n; var o = a(t, n, r); return e == null || ((e.roundValue || e.color) && (o = Math.round(o)), e.min !== void 0 && (o = Math.max(o, e.min)), e.max !== void 0 && (o = Math.min(o, e.max))), o; } function kP(e, t) { return e.pfValue != null || e.value != null ? e.pfValue != null && (t == null || t.type.units !== "%") ? e.pfValue : e.value : e; } function Bp(e, t, n, r, a) { var o = a != null ? a.type : null; n < 0 ? n = 0 : n > 1 && (n = 1); var i = kP(e, a), s = kP(t, a); if (it(i) && it(s)) return xP(o, i, s, n, r); if (Vn(i) && Vn(s)) { for (var l = [], u = 0; u < s.length; u++) { var c = i[u], d = s[u]; if (c != null && d != null) { var f = xP(o, c, d, n, r); l.push(f); } else l.push(d); } return l; } } function Lrt(e, t, n, r) { var a = !r, o = 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 = jy.linear; else { var d; if (xt(s)) { var f = c.parse("transition-timing-function", s); d = f.value; } else d = s; var h, p; xt(d) ? (h = d, p = []) : (h = d[1], p = d.slice(2).map(function(V) { return +V; })), p.length > 0 ? (h === "spring" && p.push(i.duration), i.easingImpl = jy[h].apply(null, p)) : i.easingImpl = jy[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, y = i.position; if (y && a && !e.locked()) { var x = {}; $v(g.x, y.x) && (x.x = Bp(g.x, y.x, m, v)), $v(g.y, y.y) && (x.y = Bp(g.y, y.y, m, v)), e.position(x); } var w = i.startPan, k = i.pan, C = o.pan, S = k != null && r; S && ($v(w.x, k.x) && (C.x = Bp(w.x, k.x, m, v)), $v(w.y, k.y) && (C.y = Bp(w.y, k.y, m, v)), e.emit("pan")); var _ = i.startZoom, T = i.zoom, F = T != null && r; F && ($v(_, T) && (o.zoom = hg(o.minZoom, Bp(_, T, m, v), o.maxZoom)), e.emit("zoom")), (S || F) && e.emit("viewport"); var A = i.style; if (A && A.length > 0 && a) { for (var I = 0; I < A.length; I++) { var N = A[I], L = N.name, z = N, P = i.startStyle[L], D = c.properties[P.name], M = Bp(P, z, m, v, D); c.overrideBypass(e, L, M); } e.emit("style"); } } return i.progress = m, m; } function $v(e, t) { return e == null || t == null ? !1 : it(e) && it(t) ? !0 : !!(e && t); } function Nrt(e, t, n, r) { var a = t._private; a.started = !0, a.startTime = n - a.progress * a.duration; } function CP(e, t) { var n = t._private.aniEles, r = []; function a(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(k) { for (var C = k.length - 1; C >= 0; C--) { var S = k[C]; S(); } k.splice(0, k.length); }, y = h.length - 1; y >= 0; y--) { var x = h[y], w = x._private; if (w.stopped) { h.splice(y, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.frames); continue; } !w.playing && !w.applying || (w.playing && w.applying && (w.applying = !1), w.started || Nrt(c, x, e), Lrt(c, x, e, d), w.applying && (w.applying = !1), g(w.frames), w.step != null && w.step(e), x.completed() && (h.splice(y, 1), w.hooked = !1, w.playing = !1, w.started = !1, g(w.completes)), v = !0); } return !d && h.length === 0 && p.length === 0 && r.push(c), v; } for (var o = !1, i = 0; i < n.length; i++) { var s = n[i], l = a(s); o = o || l; } var u = a(t, !0); (o || u) && (n.length > 0 ? t.notify("draw", n) : t.notify("draw")), n.unmerge(r), t.emit("step"); } var Mrt = { // pull in animation functions animate: On.animate(), animation: On.animation(), animated: On.animated(), clearQueue: On.clearQueue(), delay: On.delay(), delayAnimation: On.delayAnimation(), stop: On.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 && e2(function(r) { CP(r, e), t(); }); } var n = e.renderer(); n && n.beforeRender ? n.beforeRender(function(r, a) { CP(a, e); }, n.beforeRenderPriorities.animations) : t(); } }, Drt = { 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 && Tm(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; } }, Z1 = function(e) { return xt(e) ? new rc(e) : e; }, Zq = { createEmitter: function() { var e = this._private; return e.emitter || (e.emitter = new xx(Drt, this)), this; }, emitter: function() { return this._private.emitter; }, on: function(e, t, n) { return this.emitter().on(e, Z1(t), n), this; }, removeListener: function(e, t, n) { return this.emitter().removeListener(e, Z1(t), n), this; }, removeAllListeners: function() { return this.emitter().removeAllListeners(), this; }, one: function(e, t, n) { return this.emitter().one(e, Z1(t), n), this; }, once: function(e, t, n) { return this.emitter().one(e, Z1(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; } }; On.eventAliasesOn(Zq); var C3 = { 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); } }; C3.jpeg = C3.jpg; var Hy = { layout: function(e) { var t = this; if (e == null) { fr("Layout options must be specified to make a layout"); return; } if (e.name == null) { fr("A `name` must be specified to make a layout"); return; } var n = e.name, r = t.extension("layout", n); if (r == null) { fr("No such layout `" + n + "` found. Did you forget to import it and `cytoscape.use()` it?"); return; } var a; xt(e.eles) ? a = t.$(e.eles) : a = e.eles != null ? e.eles : t.$(); var o = new r(It({}, e, { cy: t, eles: a })); return o; } }; Hy.createLayout = Hy.makeLayout = Hy.layout; var Brt = { 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 a = this.renderer(); this.destroyed() || !a || a.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 a = n[r], o = e[a], i = t.getElementById(a); i.data(o); } }); } }, Rrt = xa({ hideEdgesOnViewport: !1, textureOnViewport: !1, motionBlur: !1, motionBlurOpacity: 0.05, pixelRatio: void 0, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: !1, showFps: !1 }), S3 = { renderTo: function(e, t, n, r) { var a = this._private.renderer; return a.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) { fr("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 && An("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 = Rrt(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); } }; S3.invalidateDimensions = S3.resize; var Uy = { // 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 xt(e) ? this.$(e) : No(e) ? e.collection() : Vn(e) ? (t || (t = {}), new ga(this, e, t.unique, t.removed)) : new ga(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; } }; Uy.elements = Uy.filter = Uy.$; var Va = {}, d0 = "t", zrt = "f"; Va.apply = function(e) { for (var t = this, n = t._private, r = n.cy, a = r.collection(), o = 0; o < e.length; o++) { var i = e[o], 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 && a.push(i); } } return a; }; Va.getPropertiesDiff = function(e, t) { var n = this, r = n._private.propDiffs = n._private.propDiffs || {}, a = e + "-" + t, o = r[a]; if (o) return o; for (var i = [], s = {}, l = 0; l < n.length; l++) { var u = n[l], c = e[l] === d0, d = t[l] === d0, 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, y = !1, x = l + 1; x < n.length; x++) { var w = n[x], k = t[x] === d0; if (k && (y = w.properties[m.name] != null, y)) break; } !s[g] && !y && (s[g] = !0, i.push(g)); } } } return r[a] = i, i; }; Va.getContextMeta = function(e) { for (var t = this, n = "", r, a = e._private.styleCxtKey || "", o = 0; o < t.length; o++) { var i = t[o], s = i.selector && i.selector.matches(e); s ? n += d0 : n += zrt; } return r = t.getPropertiesDiff(a, n), e._private.styleCxtKey = n, { key: n, diffPropNames: r, empty: r.length === 0 }; }; Va.getContextStyle = function(e) { var t = e.key, n = this, r = this._private.contextStyles = this._private.contextStyles || {}; if (r[t]) return r[t]; for (var a = { _private: { key: t } }, o = 0; o < n.length; o++) { var i = n[o], s = t[o] === d0; if (s) for (var l = 0; l < i.properties.length; l++) { var u = i.properties[l]; a[u.name] = u; } } return r[t] = a, a; }; Va.applyContextStyle = function(e, t, n) { for (var r = this, a = e.diffPropNames, o = {}, i = r.types, s = 0; s < a.length; s++) { var l = a[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 = o[l] = { prev: c }; r.applyParsedProperty(n, u), h.next = n.pstyle(l), h.next && h.next.bypass && (h.next = h.next.bypassed); } } return { diffProps: o }; }; Va.updateStyleHints = function(e) { var t = e._private, n = this, r = n.propertyGroupNames, a = n.propertyGroupKeys, o = function(re, we, Oe) { return n.getPropertiesHash(re, we, Oe); }, 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 < a.length; u++) { var c = a[u]; t.styleKeys[c] = [ef, zv]; } for (var d = function(re, we) { return t.styleKeys[we][0] = dg(re, t.styleKeys[we][0]); }, f = function(re, we) { return t.styleKeys[we][1] = pg(re, t.styleKeys[we][1]); }, h = function(re, we) { d(re, we), f(re, we); }, p = function(re, we) { for (var Oe = 0; Oe < re.length; Oe++) { var Ne = re.charCodeAt(Oe); d(Ne, we), f(Ne, we); } }, v = 2e9, m = function(re) { return -128 < re && re < 128 && Math.floor(re) !== re ? v - (re * 1024 | 0) : re; }, g = 0; g < r.length; g++) { var y = r[g], x = l[y]; if (x != null) { var w = this.properties[y], k = w.type, C = w.groupKey, S = void 0; w.hashOverride != null ? S = w.hashOverride(e, x) : x.pfValue != null && (S = x.pfValue); var _ = w.enums == null ? x.value : null, T = S != null, F = _ != null, A = T || F, I = x.units; if (k.number && A && !k.multiple) { var N = T ? S : _; h(m(N), C), !T && I != null && p(I, C); } else p(x.strValue, C); } } for (var L = [ef, zv], z = 0; z < a.length; z++) { var P = a[z], D = t.styleKeys[P]; L[0] = dg(D[0], L[0]), L[1] = pg(D[1], L[1]); } t.styleKey = HQe(L[0], L[1]); var M = t.styleKeys; t.labelDimsKey = tu(M.labelDimensions); var V = o(e, ["label"], M.labelDimensions); if (t.labelKey = tu(V), t.labelStyleKey = tu(j1(M.commonLabel, V)), !s) { var Q = o(e, ["source-label"], M.labelDimensions); t.sourceLabelKey = tu(Q), t.sourceLabelStyleKey = tu(j1(M.commonLabel, Q)); var X = o(e, ["target-label"], M.labelDimensions); t.targetLabelKey = tu(X), t.targetLabelStyleKey = tu(j1(M.commonLabel, X)); } if (s) { var ee = t.styleKeys, ue = ee.nodeBody, ve = ee.nodeBorder, ge = ee.nodeOutline, se = ee.backgroundImage, ne = ee.compound, W = ee.pie, Y = [ue, ve, ge, se, ne, W].filter(function(re) { return re != null; }).reduce(j1, [ef, zv]); t.nodeKey = tu(Y), t.hasPie = W != null && W[0] !== ef && W[1] !== zv; } return i !== t.styleKey; }; Va.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; }; Va.applyParsedProperty = function(e, t) { var n = this, r = t, a = e._private.style, o, i = n.types, s = n.properties[r.name].type, l = r.bypass, u = a[r.name], c = u && u.bypass, d = e._private, f = "mapping", h = function(ee) { return ee == null ? null : ee.pfValue != null ? ee.pfValue : ee.value; }, p = function() { var ee = h(u), ue = h(r); n.checkTriggers(e, r.name, ee, ue); }; 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 a[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 ? (a[r.name] = u.bypassed, p(), !0) : !1 : (p(), !0); var v = function() { An("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, y = 0; y < m.length && g; y++) { var x = m[y]; g = g[x]; } if (g == null) return v(), !1; var w; if (it(g)) { var k = r.fieldMax - r.fieldMin; k === 0 ? w = 0 : w = (g - r.fieldMin) / k; } else return An("Do not use continuous mappers without specifying numeric data (i.e. `" + r.field + ": " + g + "` for `" + e.id() + "` is non-numeric)"), !1; if (w < 0 ? w = 0 : w > 1 && (w = 1), s.color) { var C = r.valueMin[0], S = r.valueMax[0], _ = r.valueMin[1], T = r.valueMax[1], F = r.valueMin[2], A = r.valueMax[2], I = r.valueMin[3] == null ? 1 : r.valueMin[3], N = r.valueMax[3] == null ? 1 : r.valueMax[3], L = [Math.round(C + (S - C) * w), Math.round(_ + (T - _) * w), Math.round(F + (A - F) * w), Math.round(I + (N - I) * w)]; o = { // 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: L, strValue: "rgb(" + L[0] + ", " + L[1] + ", " + L[2] + ")" }; } else if (s.number) { var z = r.valueMin + (r.valueMax - r.valueMin) * w; o = this.parse(r.name, z, r.bypass, f); } else return !1; if (!o) return v(), !1; o.mapping = r, r = o; break; } case i.data: { for (var P = r.field.split("."), D = d.data, M = 0; M < P.length && D; M++) { var V = P[M]; D = D[V]; } if (D != null && (o = this.parse(r.name, D, r.bypass, f)), !o) return v(), !1; o.mapping = r, r = o; break; } case i.fn: { var Q = r.value, X = r.fnValue != null ? r.fnValue : Q(e); if (r.prevFnValue = X, X == null) return An("Custom function mappers may not return null (i.e. `" + r.name + "` for ele `" + e.id() + "` is null)"), !1; if (o = this.parse(r.name, X, r.bypass, f), !o) return An("Custom function mappers may not return invalid values for the property type (i.e. `" + r.name + "` for ele `" + e.id() + "` is invalid)"), !1; o.mapping = fs(r), r = o; break; } case void 0: break; default: return !1; } return l ? (c ? r.bypassed = u.bypassed : r.bypassed = u, a[r.name] = r) : c ? u.bypassed = r : a[r.name] = r, p(), !0; }; Va.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 a = r._private.style, o = Object.keys(a), i = 0; i < o.length; i++) { var s = o[i], l = a[s]; l != null && (l.bypass ? l.bypassed = null : a[s] = null); } } }; Va.update = function() { var e = this._private.cy, t = e.mutableElements(); t.updateStyle(); }; Va.updateTransitions = function(e, t) { var n = this, r = e._private, a = e.pstyle("transition-property").value, o = e.pstyle("transition-duration").pfValue, i = e.pstyle("transition-delay").pfValue; if (a.length > 0 && o > 0) { for (var s = {}, l = !1, u = 0; u < a.length; u++) { var c = a[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, y = 1e-6; p && (it(p.pfValue) && it(v.pfValue) ? (m = v.pfValue - p.pfValue, g = p.pfValue + y * m) : it(p.value) && it(v.value) ? (m = v.value - p.value, g = p.value + y * m) : Vn(p.value) && Vn(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 zh(function(x) { i > 0 ? e.delayAnimation(i).play().promise().then(x) : x(); }).then(function() { return e.animation({ style: s, duration: o, easing: e.pstyle("transition-timing-function").value, queue: !1 }).play().promise(); }).then(function() { n.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1; }); } else r.transitioning && (this.removeBypasses(e, a), e.emitAndNotify("style"), r.transitioning = !1); }; Va.checkTrigger = function(e, t, n, r, a, o) { var i = this.properties[t], s = a(i); s != null && s(n, r) && o(i); }; Va.checkZOrderTrigger = function(e, t, n, r) { var a = this; this.checkTrigger(e, t, n, r, function(o) { return o.triggersZOrder; }, function() { a._private.cy.notify("zorder", e); }); }; Va.checkBoundsTrigger = function(e, t, n, r) { this.checkTrigger(e, t, n, r, function(a) { return a.triggersBounds; }, function(a) { e.dirtyCompoundBoundsCache(), e.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected a.triggersBoundsOfParallelBeziers && t === "curve-style" && (n === "bezier" || r === "bezier") && e.parallelEdges().forEach(function(o) { o.isBundledBezier() && o.dirtyBoundingBoxCache(); }), a.triggersBoundsOfConnectedEdges && t === "display" && (n === "none" || r === "none") && e.connectedEdges().forEach(function(o) { o.dirtyBoundingBoxCache(); }); }); }; Va.checkTriggers = function(e, t, n, r) { e.dirtyStyleCache(), this.checkZOrderTrigger(e, t, n, r), this.checkBoundsTrigger(e, t, n, r); }; var Am = {}; Am.applyBypass = function(e, t, n, r) { var a = this, o = [], i = !0; if (t === "*" || t === "**") { if (n !== void 0) for (var s = 0; s < a.properties.length; s++) { var l = a.properties[s], u = l.name, c = this.parse(u, n, !0); c && o.push(c); } } else if (xt(t)) { var d = this.parse(t, n, !0); d && o.push(d); } else if (mn(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[dx(v)]), m !== void 0) { var g = this.parse(v, m, !0); g && o.push(g); } } } else return !1; if (o.length === 0) return !1; for (var y = !1, x = 0; x < e.length; x++) { for (var w = e[x], k = {}, C = void 0, S = 0; S < o.length; S++) { var _ = o[S]; if (r) { var T = w.pstyle(_.name); C = k[_.name] = { prev: T }; } y = this.applyParsedProperty(w, fs(_)) || y, r && (C.next = w.pstyle(_.name)); } y && this.updateStyleHints(w), r && this.updateTransitions(w, k, i); } return y; }; Am.overrideBypass = function(e, t, n) { t = S_(t); for (var r = 0; r < e.length; r++) { var a = e[r], o = a._private.style[t], i = this.properties[t].type, s = i.color, l = i.mutiple, u = o ? o.pfValue != null ? o.pfValue : o.value : null; !o || !o.bypass ? this.applyBypass(a, t, n) : (o.value = n, o.pfValue != null && (o.pfValue = n), s ? o.strValue = "rgb(" + n.join(",") + ")" : l ? o.strValue = n.join(" ") : o.strValue = "" + n, this.updateStyleHints(a)), this.checkTriggers(a, t, u, n); } }; Am.removeAllBypasses = function(e, t) { return this.removeBypasses(e, this.propertyNames, t); }; Am.removeBypasses = function(e, t, n) { for (var r = !0, a = 0; a < e.length; a++) { for (var o = e[a], i = {}, s = 0; s < t.length; s++) { var l = t[s], u = this.properties[l], c = o.pstyle(u.name); if (!(!c || !c.bypass)) { var d = "", f = this.parse(l, d, !0), h = i[u.name] = { prev: c }; this.applyParsedProperty(o, f), h.next = o.pstyle(u.name); } } this.updateStyleHints(o), n && this.updateTransitions(o, i, r); } }; var B_ = {}; B_.getEmSizeInPixels = function() { var e = this.containerCss("font-size"); return e != null ? parseFloat(e) : 1; }; B_.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 Ps = {}; Ps.getRenderedStyle = function(e, t) { return t ? this.getStylePropertyValue(e, t, !0) : this.getRawStyle(e, !0); }; Ps.getRawStyle = function(e, t) { var n = this; if (e = e[0], e) { for (var r = {}, a = 0; a < n.properties.length; a++) { var o = n.properties[a], i = n.getStylePropertyValue(e, o.name, t); i != null && (r[o.name] = i, r[dx(o.name)] = i); } return r; } }; Ps.getIndexedStyle = function(e, t, n, r) { var a = e.pstyle(t)[n][r]; return a ?? e.cy().style().getDefaultProperty(t)[n][0]; }; Ps.getStylePropertyValue = function(e, t, n) { var r = this; if (e = e[0], e) { var a = r.properties[t]; a.alias && (a = a.pointsTo); var o = a.type, i = e.pstyle(a.name); if (i) { var s = i.value, l = i.units, u = i.strValue; if (n && o.number && s != null && it(s)) { var c = e.cy().zoom(), d = function(v) { return v * c; }, f = function(v, m) { return d(v) + m; }, h = Vn(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 xt(v) ? v : "" + d(v); }).join(" ") : "" + d(s); } else if (u != null) return u; } return null; } }; Ps.getAnimationStartStyle = function(e, t) { for (var n = {}, r = 0; r < t.length; r++) { var a = t[r], o = a.name, i = e.pstyle(o); i !== void 0 && (mn(i) ? i = this.parse(o, i.strValue) : i = this.parse(o, i)), i && (n[o] = i); } return n; }; Ps.getPropsList = function(e) { var t = this, n = [], r = e, a = t.properties; if (r) for (var o = Object.keys(r), i = 0; i < o.length; i++) { var s = o[i], l = r[s], u = a[s] || a[S_(s)], c = this.parse(u.name, l); c && n.push(c); } return n; }; Ps.getNonDefaultPropertiesHash = function(e, t, n) { var r = n.slice(), a, o, i, s, l, u; for (l = 0; l < t.length; l++) if (a = t[l], o = e.pstyle(a, !1), o != null) if (o.pfValue != null) r[0] = dg(s, r[0]), r[1] = pg(s, r[1]); else for (i = o.strValue, u = 0; u < i.length; u++) s = i.charCodeAt(u), r[0] = dg(s, r[0]), r[1] = pg(s, r[1]); return r; }; Ps.getPropertiesHash = Ps.getNonDefaultPropertiesHash; var Sx = {}; Sx.appendFromJson = function(e) { for (var t = this, n = 0; n < e.length; n++) { var r = e[n], a = r.selector, o = r.style || r.css, i = Object.keys(o); t.selector(a); for (var s = 0; s < i.length; s++) { var l = i[s], u = o[l]; t.css(l, u); } } return t; }; Sx.fromJson = function(e) { var t = this; return t.resetToDefault(), t.appendFromJson(e), t; }; Sx.json = function() { for (var e = [], t = this.defaultLength; t < this.length; t++) { for (var n = this[t], r = n.selector, a = n.properties, o = {}, i = 0; i < a.length; i++) { var s = a[i]; o[s.name] = s.strValue; } e.push({ selector: r ? r.toString() : "core", style: o }); } return e; }; var R_ = {}; R_.appendFromString = function(e) { var t = this, n = this, r = "" + e, a, o, i; r = r.replace(/[/][*](\s|.)+?[*][/]/g, ""); function s() { r.length > a.length ? r = r.substr(a.length) : r = ""; } function l() { o.length > i.length ? o = o.substr(i.length) : o = ""; } for (; ; ) { var u = r.match(/^\s*$/); if (u) break; var c = r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!c) { An("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + r); break; } a = c[0]; var d = c[1]; if (d !== "core") { var f = new rc(d); if (f.invalid) { An("Skipping parsing of block: Invalid selector found in string stylesheet: " + d), s(); continue; } } var h = c[2], p = !1; o = h; for (var v = []; ; ) { var m = o.match(/^\s*$/); if (m) break; var g = o.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!g) { An("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + h), p = !0; break; } i = g[0]; var y = g[1], x = g[2], w = t.properties[y]; if (!w) { An("Skipping property: Invalid property name in: " + i), l(); continue; } var k = n.parse(y, x); if (!k) { An("Skipping property: Invalid property definition in: " + i), l(); continue; } v.push({ name: y, val: x }), l(); } if (p) { s(); break; } n.selector(d); for (var C = 0; C < v.length; C++) { var S = v[C]; n.css(S.name, S.val); } s(); } return n; }; R_.fromString = function(e) { var t = this; return t.resetToDefault(), t.appendFromString(e), t; }; var Qr = {}; (function() { var e = Dr, t = WZe, n = GZe, r = XZe, a = YZe, o = function(W) { return "^" + W + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, i = function(W) { var Y = e + "|\\w+|" + t + "|" + n + "|" + r + "|" + a; return "^" + W + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + e + ")\\s*\\,\\s*(" + e + ")\\s*,\\s*(" + Y + ")\\s*\\,\\s*(" + Y + ")\\)$"; }, s = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; Qr.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: o("data") }, layoutData: { mapping: !0, regex: o("layoutData") }, scratch: { mapping: !0, regex: o("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(W, Y) { switch (W.length) { case 2: return Y[0] !== "deg" && Y[0] !== "rad" && Y[1] !== "deg" && Y[1] !== "rad"; case 1: return xt(W[0]) || Y[0] === "deg" || Y[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(W) { var Y = W.length; return Y === 1 || Y === 2 || Y === 4; } } }; var l = { zeroNonZero: function(W, Y) { return (W == null || Y == null) && W !== Y || W == 0 && Y != 0 ? !0 : W != 0 && Y == 0; }, any: function(W, Y) { return W != Y; }, emptyNonEmpty: function(W, Y) { var re = tc(W), we = tc(Y); return re && !we || !re && we; } }, u = Qr.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 }], y = [{ 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 }], x = [{ 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 }], w = function(W, Y) { return Y.value === "label" ? -W.poolIndex() : Y.pfValue; }, k = [{ name: "height", type: u.nodeSize, triggersBounds: l.any, hashOverride: w }, { name: "width", type: u.nodeSize, triggersBounds: l.any, hashOverride: w }, { 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 }], C = [{ 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 }], T = [{ 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 }], A = [{ 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 }], I = [{ 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 }], N = []; Qr.pieBackgroundN = 16, N.push({ name: "pie-size", type: u.sizeMaybePercent }); for (var L = 1; L <= Qr.pieBackgroundN; L++) N.push({ name: "pie-" + L + "-background-color", type: u.color }), N.push({ name: "pie-" + L + "-background-size", type: u.percent }), N.push({ name: "pie-" + L + "-background-opacity", type: u.zeroOneNumber }); var z = [], P = Qr.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(W) { P.forEach(function(Y) { var re = Y + "-" + W.name, we = W.type, Oe = W.triggersBounds; z.push({ name: re, type: we, triggersBounds: Oe }); }); }, {}); var D = Qr.properties = [].concat(v, x, m, g, y, A, p, h, c, d, f, k, C, S, _, N, T, F, z, I), M = Qr.propertyGroups = { // common to all eles behavior: v, transition: x, visibility: m, overlay: g, underlay: y, ghost: A, // labels commonLabel: p, labelDimensions: h, mainLabel: c, sourceLabel: d, targetLabel: f, // node props nodeBody: k, nodeBorder: C, nodeOutline: S, backgroundImage: _, pie: N, compound: T, // edge props edgeLine: F, edgeArrow: z, core: I }, V = Qr.propertyGroupNames = {}, Q = Qr.propertyGroupKeys = Object.keys(M); Q.forEach(function(W) { V[W] = M[W].map(function(Y) { return Y.name; }), M[W].forEach(function(Y) { return Y.groupKey = W; }); }); var X = Qr.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" }]; Qr.propertyNames = D.map(function(W) { return W.name; }); for (var ee = 0; ee < D.length; ee++) { var ue = D[ee]; D[ue.name] = ue; } for (var ve = 0; ve < X.length; ve++) { var ge = X[ve], se = D[ge.pointsTo], ne = { name: ge.name, alias: !0, pointsTo: se }; D.push(ne), D[ge.name] = ne; } })(); Qr.getDefaultProperty = function(e) { return this.getDefaultProperties()[e]; }; Qr.getDefaultProperties = function() { var e = this._private; if (e.defaultProperties != null) return e.defaultProperties; for (var t = It({ // 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 <= Qr.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 Qr.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 a = this.properties[r]; if (!a.pointsTo) { var o = a.name, i = t[o], s = this.parse(o, i); n[o] = s; } } return e.defaultProperties = n, e.defaultProperties; }; Qr.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 Ex = {}; Ex.parse = function(e, t, n, r) { var a = this; if (sr(t)) return a.parseImplWarn(e, t, n, r); var o = r === "mapping" || r === !0 || r === !1 || r == null ? "dontcare" : r, i = n ? "t" : "f", s = "" + t, l = iq(e, s, i, o), u = a.propCache = a.propCache || [], c; return (c = u[l]) || (c = u[l] = a.parseImplWarn(e, t, n, r)), (n || r === "mapping") && (c = fs(c), c && (c.value = fs(c.value))), c; }; Ex.parseImplWarn = function(e, t, n, r) { var a = this.parseImpl(e, t, n, r); return !a && t != null && An("The style property `".concat(e, ": ").concat(t, "` is invalid")), a && (a.name === "width" || a.name === "height") && t === "label" && An("The style value of `label` is deprecated for `" + a.name + "`"), a; }; Ex.parseImpl = function(e, t, n, r) { var a = this; e = S_(e); var o = a.properties[e], i = t, s = a.types; if (!o || t === void 0) return null; o.alias && (o = o.pointsTo, e = o.name); var l = xt(t); l && (t = t.trim()); var u = o.type; if (!u) return null; if (n && (t === "" || t === null)) return { name: e, value: t, bypass: !0, deleteBypass: !0 }; if (sr(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 An("`" + 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, y = 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 (y) 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 x; if (l ? x = t.split(/\s+/) : Vn(t) ? x = t : x = [t], u.evenMultiple && x.length % 2 !== 0) return null; for (var w = [], k = [], C = [], S = "", _ = !1, T = 0; T < x.length; T++) { var F = a.parse(e, x[T], n, "multiple"); _ = _ || xt(F.value), w.push(F.value), C.push(F.pfValue != null ? F.pfValue : F.value), k.push(F.units), S += (T > 0 ? " " : "") + F.strValue; } return u.validate && !u.validate(w, k) ? null : u.singleEnum && _ ? w.length === 1 && xt(w[0]) ? { name: e, value: w[0], strValue: w[0], bypass: n } : null : { name: e, value: w, pfValue: C, strValue: S, bypass: n, units: k }; } var A = function() { for (var W = 0; W < u.enums.length; W++) { var Y = u.enums[W]; if (Y === t) return { name: e, value: t, strValue: "" + t, bypass: n }; } return null; }; if (u.number) { var I, N = "px"; if (u.units && (I = u.units), u.implicitUnits && (N = u.implicitUnits), !u.unitless) if (l) { var L = "px|em" + (u.allowPercent ? "|\\%" : ""); I && (L = I); var z = t.match("^(" + Dr + ")(" + L + ")?$"); z && (t = z[1], I = z[2] || N); } else (!I || u.implicitUnits) && (I = N); if (t = parseFloat(t), isNaN(t) && u.enums === void 0) return null; if (isNaN(t) && u.enums !== void 0) return t = i, A(); if (u.integer && !RZe(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 P = { name: e, value: t, strValue: "" + t + (I || ""), units: I, bypass: n }; return u.unitless || I !== "px" && I !== "em" ? P.pfValue = t : P.pfValue = I === "px" || !I ? t : this.getEmSizeInPixels() * t, (I === "ms" || I === "s") && (P.pfValue = I === "ms" ? t : 1e3 * t), (I === "deg" || I === "rad") && (P.pfValue = I === "rad" ? t : bJe(t)), I === "%" && (P.pfValue = t / 100), P; } else if (u.propList) { var D = [], M = "" + t; if (M !== "none") { for (var V = M.split(/\s*,\s*|\s+/), Q = 0; Q < V.length; Q++) { var X = V[Q].trim(); a.properties[X] ? D.push(X) : An("`" + X + "` is not a valid property name"); } if (D.length === 0) return null; } return { name: e, value: D, strValue: D.length === 0 ? "none" : D.join(" "), bypass: n }; } else if (u.color) { var ee = nQe(t); return ee ? { name: e, value: ee, pfValue: ee, strValue: "rgb(" + ee[0] + "," + ee[1] + "," + ee[2] + ")", // n.b. no spaces b/c of multiple support bypass: n } : null; } else if (u.regex || u.regexes) { if (u.enums) { var ue = A(); if (ue) return ue; } for (var ve = u.regexes ? u.regexes : [u.regex], ge = 0; ge < ve.length; ge++) { var se = new RegExp(ve[ge]), ne = se.exec(t); if (ne) return { name: e, value: u.singleRegexMatchValue ? ne[1] : ne, strValue: "" + t, bypass: n }; } return null; } else return u.string ? { name: e, value: "" + t, strValue: "" + t, bypass: n } : u.enums ? A() : null; }; var Pa = function e(t) { if (!(this instanceof e)) return new e(t); if (!C_(t)) { fr("A style must have a core reference"); return; } this._private = { cy: t, coreStyle: {} }, this.length = 0, this.resetToDefault(); }, Da = Pa.prototype; Da.instanceString = function() { return "style"; }; Da.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(a) { var o = a[0]._private; o.styleDirty = !0, o.appliedInitStyle = !1; }), this; }; Da.resetToDefault = function() { return this.clear(), this.addDefaultStylesheet(), this; }; Da.core = function(e) { return this._private.coreStyle[e] || this.getDefaultProperty(e); }; Da.selector = function(e) { var t = e === "core" ? null : new rc(e), n = this.length++; return this[n] = { selector: t, properties: [], mappedProperties: [], index: n }, this; }; Da.css = function() { var e = this, t = arguments; if (t.length === 1) for (var n = t[0], r = 0; r < e.properties.length; r++) { var a = e.properties[r], o = n[a.name]; o === void 0 && (o = n[dx(a.name)]), o !== void 0 && this.cssRule(a.name, o); } else t.length === 2 && this.cssRule(t[0], t[1]); return this; }; Da.style = Da.css; Da.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 a = !this[r].selector; a && (this._private.coreStyle[n.name] = n); } return this; }; Da.append = function(e) { return YU(e) ? e.appendToStyle(this) : Vn(e) ? this.appendFromJson(e) : xt(e) && this.appendFromString(e), this; }; Pa.fromJson = function(e, t) { var n = new Pa(e); return n.fromJson(t), n; }; Pa.fromString = function(e, t) { return new Pa(e).fromString(t); }; [Va, Am, B_, Ps, Sx, R_, Qr, Ex].forEach(function(e) { It(Da, e); }); Pa.types = Da.types; Pa.properties = Da.properties; Pa.propertyGroups = Da.propertyGroups; Pa.propertyGroupNames = Da.propertyGroupNames; Pa.propertyGroupKeys = Da.propertyGroupKeys; var Vrt = { style: function(e) { if (e) { var t = this.setStyle(e); t.update(); } return this._private.style; }, setStyle: function(e) { var t = this._private; return YU(e) ? t.style = e.generateStyle(this) : Vn(e) ? t.style = Pa.fromJson(this, e) : xt(e) ? t.style = Pa.fromString(this, e) : t.style = Pa(this), t.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function() { this.mutableElements().updateStyle(); } }, jrt = "single", jd = { 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 = jrt), 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, a, o, i; switch (e.length) { case 0: return t; case 1: if (xt(e[0])) return n = e[0], t[n]; if (mn(e[0])) { if (!this._private.panningEnabled) return this; a = e[0], o = a.x, i = a.y, it(o) && (t.x = o), it(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") && it(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, a, o, i, s, l; if (!this._private.panningEnabled) return this; switch (n.length) { case 1: mn(e) && (i = n[0], s = i.x, l = i.y, it(s) && (r.x += s), it(l) && (r.y += l), this.emit("pan viewport")); break; case 2: a = e, o = t, (a === "x" || a === "y") && it(o) && (r[a] += o), 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 (it(e) && t === void 0 && (t = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { var n; if (xt(e)) { var r = e; e = this.$(r); } else if (jZe(e)) { var a = e; n = { x1: a.x1, y1: a.y1, x2: a.x2, y2: a.y2 }, n.w = n.x2 - n.x1, n.h = n.y2 - n.y1; } else No(e) || (e = this.mutableElements()); if (!(No(e) && e.empty())) { n = n || e.boundingBox(); var o = this.width(), i = this.height(), s; if (t = it(t) ? t : 0, !isNaN(o) && !isNaN(i) && o > 0 && i > 0 && !isNaN(n.w) && !isNaN(n.h) && n.w > 0 && n.h > 0) { s = Math.min((o - 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: (o - 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 it(e) && it(t) && e <= t ? (n.minZoom = e, n.maxZoom = t) : it(e) && t === void 0 && e <= n.maxZoom ? n.minZoom = e : it(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, a, o, i = !1; if (t.zoomingEnabled || (i = !0), it(e) ? o = e : mn(e) && (o = e.level, e.position != null ? a = vx(e.position, r, n) : e.renderedPosition != null && (a = e.renderedPosition), a != null && !t.panningEnabled && (i = !0)), o = o > t.maxZoom ? t.maxZoom : o, o = o < t.minZoom ? t.minZoom : o, i || !it(o) || o === r || a != null && (!it(a.x) || !it(a.y))) return null; if (a != null) { var s = n, l = r, u = o, c = { x: -u / l * (a.x - s.x) + a.x, y: -u / l * (a.y - s.y) + a.y }; return { zoomed: !0, panned: !0, zoom: u, pan: c }; } else return { zoomed: !0, panned: !1, zoom: o, 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, a = [], o = !1, i = !1; if (!e) return this; if (it(e.zoom) || (n = !1), mn(e.pan) || (r = !1), !n && !r) return this; if (n) { var s = e.zoom; s < t.minZoom || s > t.maxZoom || !t.zoomingEnabled ? o = !0 : (t.zoom = s, a.push("zoom")); } if (r && (!o || !e.cancelOnFailedZoom) && t.panningEnabled) { var l = e.pan; it(l.x) && (t.pan.x = l.x, i = !1), it(l.y) && (t.pan.y = l.y, i = !1), i || a.push("pan"); } return a.length > 0 && (a.push("viewport"), this.emit(a.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 (xt(e)) { var n = e; e = this.mutableElements().filter(n); } else No(e) || (e = this.mutableElements()); if (e.length !== 0) { var r = e.boundingBox(), a = this.width(), o = this.height(); t = t === void 0 ? this._private.zoom : t; var i = { // middle x: (a - t * (r.x1 + r.x2)) / 2, y: (o - 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), a = function(o) { return parseFloat(r.getPropertyValue(o)); }; return { width: t.clientWidth - a("padding-left") - a("padding-right"), height: t.clientHeight - a("padding-top") - a("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; } }; jd.centre = jd.center; jd.autolockNodes = jd.autolock; jd.autoungrabifyNodes = jd.autoungrabify; var bg = { data: On.data({ field: "data", bindingEvent: "data", allowBinding: !0, allowSetting: !0, settingEvent: "data", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeData: On.removeData({ field: "data", event: "data", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }), scratch: On.data({ field: "scratch", bindingEvent: "scratch", allowBinding: !0, allowSetting: !0, settingEvent: "scratch", settingTriggersEvent: !0, triggerFnName: "trigger", allowGetting: !0, updateStyle: !0 }), removeScratch: On.removeData({ field: "scratch", event: "scratch", triggerFnName: "trigger", triggerEvent: !0, updateStyle: !0 }) }; bg.attr = bg.data; bg.removeAttr = bg.removeData; var wg = function(e) { var t = this; e = It({}, e); var n = e.container; n && !Jb(n) && Jb(n[0]) && (n = n[0]); var r = n ? n._cyreg : null; r = r || {}, r && r.cy && (r.cy.destroy(), r = {}); var a = r.readies = r.readies || []; n && (n._cyreg = r), r.cy = t; var o = Fr !== void 0 && n !== void 0 && !e.headless, i = e; i.layout = It({ name: o ? "grid" : "null" }, i.layout), i.renderer = It({ name: o ? "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 ga(this), // elements in the graph listeners: [], // list of listeners aniEles: new ga(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 ? o : i.styleEnabled, zoom: it(i.zoom) ? i.zoom : 1, pan: { x: mn(i.pan) && it(i.pan.x) ? i.pan.x : 0, y: mn(i.pan) && it(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(HZe); if (p) return zh.all(f).then(h); h(f); }; l.styleEnabled && t.setStyle([]); var c = It({}, 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 && (mn(f) || Vn(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 = It({}, 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, sr(i.ready) && t.on("ready", i.ready); for (var v = 0; v < a.length; v++) { var m = a[v]; t.on("ready", m); } r && (r.readies = []), t.emit("ready"); }, i.done); }); }, i2 = wg.prototype; It(i2, { 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 Fr; var t = this._private.container.ownerDocument; return t === void 0 || t == null ? Fr : t.defaultView || Fr; }, mount: function(e) { if (e != null) { var t = this, n = t._private, r = n.options; return !Jb(e) && Jb(e[0]) && (e = e[0]), t.stopAnimationLoop(), t.destroyRenderer(), n.container = e, n.styleEnabled = !0, t.invalidateSize(), t.initRenderer(It({}, 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 fs(this._private.options); }, json: function(e) { var t = this, n = t._private, r = t.mutableElements(), a = function(y) { return t.getElementById(y.id()); }; if (mn(e)) { if (t.startBatch(), e.elements) { var o = {}, i = function(y, x) { for (var w = [], k = [], C = 0; C < y.length; C++) { var S = y[C]; if (!S.data.id) { An("cy.json() cannot handle elements without an ID attribute"); continue; } var _ = "" + S.data.id, T = t.getElementById(_); o[_] = !0, T.length !== 0 ? k.push({ ele: T, json: S }) : (x && (S.group = x), w.push(S)); } t.add(w); for (var F = 0; F < k.length; F++) { var A = k[F], I = A.ele, N = A.json; I.json(N); } }; if (Vn(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]; Vn(c) && i(c, u); } var d = t.collection(); r.filter(function(y) { return !o[y.id()]; }).forEach(function(y) { y.isParent() ? d.merge(y) : y.remove(); }), d.forEach(function(y) { return y.children().move({ parent: null }); }), d.forEach(function(y) { return a(y).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(y) { return y.json(); }) : (m.elements = {}, r.forEach(function(y) { var x = y.group(); m.elements[x] || (m.elements[x] = []), m.elements[x].push(y.json()); })), this._private.styleEnabled && (m.style = t.style().json()), m.data = fs(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 = fs(n.pan), m.boxSelectionEnabled = n.boxSelectionEnabled, m.renderer = fs(g.renderer), m.hideEdgesOnViewport = g.hideEdgesOnViewport, m.textureOnViewport = g.textureOnViewport, m.wheelSensitivity = g.wheelSensitivity, m.motionBlur = g.motionBlur, m.multiClickDebounceTime = g.multiClickDebounceTime, m; } } }); i2.$id = i2.getElementById; [Art, Mrt, Zq, C3, Hy, Brt, S3, Uy, Vrt, jd, bg].forEach(function(e) { It(i2, e); }); var Hrt = { 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 }, Urt = { 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 }, Rp = function(e) { return e.scratch("breadthfirst"); }, SP = function(e, t) { return e.scratch("breadthfirst", t); }; function Qq(e) { this.options = It({}, Hrt, Urt, e); } Qq.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().filter(function(xe) { return !xe.isParent(); }), o = r, i = t.directed, s = t.acyclic || t.maximal || t.maximalAdjustments > 0, l = Co(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }), u; if (No(t.roots)) u = t.roots; else if (Vn(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 (xt(t.roots)) u = n.$(t.roots); else if (i) u = a.roots(); else { var p = r.components(); u = n.collection(); for (var v = function(xe) { var Fe = p[xe], Se = Fe.maxDegree(!1), Pe = Fe.filter(function(Me) { return Me.degree(!1) === Se; }); u = u.add(Pe); }, m = 0; m < p.length; m++) v(m); } var g = [], y = {}, x = function(xe, Fe) { g[Fe] == null && (g[Fe] = []); var Se = g[Fe].length; g[Fe].push(xe), SP(xe, { index: Se, depth: Fe }); }, w = function(xe, Fe) { var Se = Rp(xe), Pe = Se.depth, Me = Se.index; g[Pe][Me] = null, x(xe, Fe); }; o.bfs({ roots: u, directed: t.directed, visit: function(xe, Fe, Se, Pe, Me) { var He = xe[0], De = He.id(); x(He, Me), y[De] = !0; } }); for (var k = [], C = 0; C < a.length; C++) { var S = a[C]; y[S.id()] || k.push(S); } var _ = function(xe) { for (var Fe = g[xe], Se = 0; Se < Fe.length; Se++) { var Pe = Fe[Se]; if (Pe == null) { Fe.splice(Se, 1), Se--; continue; } SP(Pe, { depth: xe, index: Se }); } }, T = function() { for (var xe = 0; xe < g.length; xe++) _(xe); }, F = function(xe, Fe) { for (var Se = Rp(xe), Pe = xe.incomers().filter(function(E) { return E.isNode() && r.has(E); }), Me = -1, He = xe.id(), De = 0; De < Pe.length; De++) { var Xe = Pe[De], Ge = Rp(Xe); Me = Math.max(Me, Ge.depth); } if (Se.depth <= Me) { if (!t.acyclic && Fe[He]) return null; var Ze = Me + 1; return w(xe, Ze), Fe[He] = Ze, !0; } return !1; }; if (i && s) { var A = [], I = {}, N = function(xe) { return A.push(xe); }, L = function() { return A.shift(); }; for (a.forEach(function(xe) { return A.push(xe); }); A.length > 0; ) { var z = L(), P = F(z, I); if (P) z.outgoers().filter(function(xe) { return xe.isNode() && r.has(xe); }).forEach(N); else if (P === null) { An("Detected double maximal shift for node `" + z.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); break; } } } T(); var D = 0; if (t.avoidOverlap) for (var M = 0; M < a.length; M++) { var V = a[M], Q = V.layoutDimensions(t), X = Q.w, ee = Q.h; D = Math.max(D, X, ee); } var ue = {}, ve = function(xe) { if (ue[xe.id()]) return ue[xe.id()]; for (var Fe = Rp(xe).depth, Se = xe.neighborhood(), Pe = 0, Me = 0, He = 0; He < Se.length; He++) { var De = Se[He]; if (!(De.isEdge() || De.isParent() || !a.has(De))) { var Xe = Rp(De); if (Xe != null) { var Ge = Xe.index, Ze = Xe.depth; if (!(Ge == null || Ze == null)) { var E = g[Ze].length; Ze < Fe && (Pe += Ge / E, Me++); } } } } return Me = Math.max(1, Me), Pe = Pe / Me, Me === 0 && (Pe = 0), ue[xe.id()] = Pe, Pe; }, ge = function(xe, Fe) { var Se = ve(xe), Pe = ve(Fe), Me = Se - Pe; return Me === 0 ? QU(xe.id(), Fe.id()) : Me; }; t.depthSort !== void 0 && (ge = t.depthSort); for (var se = 0; se < g.length; se++) g[se].sort(ge), _(se); for (var ne = [], W = 0; W < k.length; W++) ne.push(k[W]); g.unshift(ne), T(); for (var Y = 0, re = 0; re < g.length; re++) Y = Math.max(g[re].length, Y); var we = { x: l.x1 + l.w / 2, y: l.x1 + l.h / 2 }, Oe = g.reduce(function(xe, Fe) { return Math.max(xe, Fe.length); }, 0), Ne = function(xe) { var Fe = Rp(xe), Se = Fe.depth, Pe = Fe.index, Me = g[Se].length, He = Math.max(l.w / ((t.grid ? Oe : Me) + 1), D), De = Math.max(l.h / (g.length + 1), D), Xe = Math.min(l.w / 2 / g.length, l.h / 2 / g.length); if (Xe = Math.max(Xe, D), t.circle) { var Ge = Xe * Se + Xe - (g.length > 0 && g[0].length <= 3 ? Xe / 2 : 0), Ze = 2 * Math.PI / g[Se].length * Pe; return Se === 0 && g[0].length === 1 && (Ge = 1), { x: we.x + Ge * Math.cos(Ze), y: we.y + Ge * Math.sin(Ze) }; } else { var E = { x: we.x + (Pe + 1 - (Me + 1) / 2) * He, y: (Se + 1) * De }; return E; } }; return r.nodes().layoutPositions(this, t, Ne), this; }; var qrt = { 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 Jq(e) { this.options = It({}, qrt, e); } Jq.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, o = r.nodes().not(":parent"); t.sort && (o = o.sort(t.sort)); for (var i = Co(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 / o.length : t.sweep, u = l / Math.max(1, o.length - 1), c, d = 0, f = 0; f < o.length; f++) { var h = o[f], p = h.layoutDimensions(t), v = p.w, m = p.h; d = Math.max(d, v, m); } if (it(t.radius) ? c = t.radius : o.length <= 1 ? c = 0 : c = Math.min(i.h, i.w) / 2 - d, o.length > 1 && t.avoidOverlap) { d *= 1.75; var g = Math.cos(u) - Math.cos(0), y = Math.sin(u) - Math.sin(0), x = Math.sqrt(d * d / (g * g + y * y)); c = Math.max(x, c); } var w = function(k, C) { var S = t.startAngle + C * u * (a ? 1 : -1), _ = c * Math.cos(S), T = c * Math.sin(S), F = { x: s.x + _, y: s.y + T }; return F; }; return r.nodes().layoutPositions(this, t, w), this; }; var Wrt = { 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 eW(e) { this.options = It({}, Wrt, e); } eW.prototype.run = function() { for (var e = this.options, t = e, n = t.counterclockwise !== void 0 ? !t.counterclockwise : t.clockwise, r = e.cy, a = t.eles, o = a.nodes().not(":parent"), i = Co(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 < o.length; c++) { var d = o[c], f = void 0; f = t.concentric(d), l.push({ value: f, node: d }), d._private.scratch.concentric = f; } o.updateStyle(); for (var h = 0; h < o.length; h++) { var p = o[h], v = p.layoutDimensions(t); u = Math.max(u, v.w, v.h); } l.sort(function(xe, Fe) { return Fe.value - xe.value; }); for (var m = t.levelWidth(o), g = [[]], y = g[0], x = 0; x < l.length; x++) { var w = l[x]; if (y.length > 0) { var k = Math.abs(y[0].value - w.value); k >= m && (y = [], g.push(y)); } y.push(w); } var C = u + t.minNodeSpacing; if (!t.avoidOverlap) { var S = g.length > 0 && g[0].length > 1, _ = Math.min(i.w, i.h) / 2 - C, T = _ / (g.length + S ? 1 : 0); C = Math.min(C, T); } for (var F = 0, A = 0; A < g.length; A++) { var I = g[A], N = t.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / I.length : t.sweep, L = I.dTheta = N / Math.max(1, I.length - 1); if (I.length > 1 && t.avoidOverlap) { var z = Math.cos(L) - Math.cos(0), P = Math.sin(L) - Math.sin(0), D = Math.sqrt(C * C / (z * z + P * P)); F = Math.max(D, F); } I.r = F, F += C; } if (t.equidistant) { for (var M = 0, V = 0, Q = 0; Q < g.length; Q++) { var X = g[Q], ee = X.r - V; M = Math.max(M, ee); } V = 0; for (var ue = 0; ue < g.length; ue++) { var ve = g[ue]; ue === 0 && (V = ve.r), ve.r = V, V += M; } } for (var ge = {}, se = 0; se < g.length; se++) for (var ne = g[se], W = ne.dTheta, Y = ne.r, re = 0; re < ne.length; re++) { var we = ne[re], Oe = t.startAngle + (n ? 1 : -1) * W * re, Ne = { x: s.x + Y * Math.cos(Oe), y: s.y + Y * Math.sin(Oe) }; ge[we.node.id()] = Ne; } return a.nodes().layoutPositions(this, t, function(xe) { var Fe = xe.id(); return ge[Fe]; }), this; }; var mC, Krt = { // 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 _x(e) { this.options = It({}, Krt, e), this.options.layout = this; var t = this.options.eles.nodes(), n = this.options.eles.edges(), r = n.filter(function(a) { var o = a.source().data("id"), i = a.target().data("id"), s = t.some(function(u) { return u.data("id") === o; }), l = t.some(function(u) { return u.data("id") === i; }); return !s || !l; }); this.options.eles = this.options.eles.not(r); } _x.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 ? mC = !0 : mC = !1; var r = Grt(t, n, e); mC && Zrt(r), e.randomize && Qrt(r); var a = _l(), o = function() { Jrt(r, t, e), e.fit === !0 && t.fit(e.padding); }, i = function(d) { return !(n.stopped || d >= e.numIter || (eat(r, e), r.temperature = r.temperature * e.coolingFactor, r.temperature < e.minTemp)); }, s = function() { if (e.animate === !0 || e.animate === !1) o(), n.one("layoutstop", e.stop), n.emit({ type: "layoutstop", layout: n }); else { var d = e.eles.nodes(), f = tW(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) _P(r, e), s(); else { var h = _l(); h - a >= e.animationThreshold && o(), e2(d); } }; c(); } else { for (; u; ) u = i(l), l++; _P(r, e), s(); } return this; }; _x.prototype.stop = function() { return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; _x.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; var Grt = function(e, t, n) { for (var r = n.eles.edges(), a = n.eles.nodes(), o = Co(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, w: e.width(), h: e.height() }), i = { isCompound: e.hasCompoundNodes(), layoutNodes: [], idToIndex: {}, nodeSize: a.size(), graphSet: [], indexToGraph: [], layoutEdges: [], edgeSize: r.size(), temperature: n.initialTemp, clientWidth: o.w, clientHeight: o.h, boundingBox: o }, 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 = a[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 = sr(n.nodeRepulsion) ? n.nodeRepulsion(h) : n.nodeRepulsion, i.layoutNodes.push(v), i.idToIndex[v.id] = u; } for (var m = [], g = 0, y = -1, x = [], u = 0; u < i.nodeSize; u++) { var h = i.layoutNodes[u], w = h.parentId; w != null ? i.layoutNodes[i.idToIndex[w]].children.push(h.id) : (m[++y] = h.id, x.push(h.id)); } for (i.graphSet.push(x); g <= y; ) { var k = m[g++], C = i.idToIndex[k], f = i.layoutNodes[C], S = f.children; if (S.length > 0) { i.graphSet.push(S); for (var u = 0; u < S.length; u++) m[++y] = S[u]; } } for (var u = 0; u < i.graphSet.length; u++) for (var _ = i.graphSet[u], d = 0; d < _.length; d++) { var T = i.idToIndex[_[d]]; i.indexToGraph[T] = u; } for (var u = 0; u < i.edgeSize; u++) { var F = r[u], A = {}; A.id = F.data("id"), A.sourceId = F.data("source"), A.targetId = F.data("target"); var I = sr(n.idealEdgeLength) ? n.idealEdgeLength(F) : n.idealEdgeLength, N = sr(n.edgeElasticity) ? n.edgeElasticity(F) : n.edgeElasticity, L = i.idToIndex[A.sourceId], z = i.idToIndex[A.targetId], P = i.indexToGraph[L], D = i.indexToGraph[z]; if (P != D) { for (var M = Xrt(A.sourceId, A.targetId, i), V = i.graphSet[M], Q = 0, v = i.layoutNodes[L]; V.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Q++; for (v = i.layoutNodes[z]; V.indexOf(v.id) === -1; ) v = i.layoutNodes[i.idToIndex[v.parentId]], Q++; I *= Q * n.nestingFactor; } A.idealLength = I, A.elasticity = N, i.layoutEdges.push(A); } return i; }, Xrt = function(e, t, n) { var r = Yrt(e, t, 0, n); return 2 > r.count ? 0 : r.graph; }, Yrt = function e(t, n, r, a) { var o = a.graphSet[r]; if (-1 < o.indexOf(t) && -1 < o.indexOf(n)) return { count: 2, graph: r }; for (var i = 0, s = 0; s < o.length; s++) { var l = o[s], u = a.idToIndex[l], c = a.layoutNodes[u].children; if (c.length !== 0) { var d = a.indexToGraph[a.idToIndex[c[0]]], f = e(t, n, d, a); if (f.count !== 0) if (f.count === 1) { if (i++, i === 2) break; } else return f; } } return { count: i, graph: r }; }, Zrt, Qrt = function(e, t) { for (var n = e.clientWidth, r = e.clientHeight, a = 0; a < e.nodeSize; a++) { var o = e.layoutNodes[a]; o.children.length === 0 && !o.isLocked && (o.positionX = Math.random() * n, o.positionY = Math.random() * r); } }, tW = function(e, t, n) { var r = e.boundingBox, a = { x1: 1 / 0, x2: -1 / 0, y1: 1 / 0, y2: -1 / 0 }; return t.boundingBox && (n.forEach(function(o) { var i = e.layoutNodes[e.idToIndex[o.data("id")]]; a.x1 = Math.min(a.x1, i.positionX), a.x2 = Math.max(a.x2, i.positionX), a.y1 = Math.min(a.y1, i.positionY), a.y2 = Math.max(a.y2, i.positionY); }), a.w = a.x2 - a.x1, a.h = a.y2 - a.y1), function(o, i) { var s = e.layoutNodes[e.idToIndex[o.data("id")]]; if (t.boundingBox) { var l = (s.positionX - a.x1) / a.w, u = (s.positionY - a.y1) / a.h; return { x: r.x1 + l * r.w, y: r.y1 + u * r.h }; } else return { x: s.positionX, y: s.positionY }; }; }, Jrt = function(e, t, n) { var r = n.layout, a = n.eles.nodes(), o = tW(e, n, a); a.positions(o), e.ready !== !0 && (e.ready = !0, r.one("layoutready", n.ready), r.emit({ type: "layoutready", layout: this })); }, eat = function(e, t, n) { tat(e, t), aat(e), oat(e, t), iat(e), sat(e); }, tat = function(e, t) { for (var n = 0; n < e.graphSet.length; n++) for (var r = e.graphSet[n], a = r.length, o = 0; o < a; o++) for (var i = e.layoutNodes[e.idToIndex[r[o]]], s = o + 1; s < a; s++) { var l = e.layoutNodes[e.idToIndex[r[s]]]; nat(i, l, e, t); } }, EP = function(e) { return -e + 2 * e * Math.random(); }, nat = function(e, t, n, r) { var a = e.cmptId, o = t.cmptId; if (!(a !== o && !n.isCompound)) { var i = t.positionX - e.positionX, s = t.positionY - e.positionY, l = 1; i === 0 && s === 0 && (i = EP(l), s = EP(l)); var u = rat(e, t, i, s); if (u > 0) var m = r.nodeOverlap * u, v = Math.sqrt(i * i + s * s), g = m * i / v, y = m * s / v; else var c = s2(e, i, s), d = s2(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, y = m * h / v; e.isLocked || (e.offsetX -= g, e.offsetY -= y), t.isLocked || (t.offsetX += g, t.offsetY += y); } }, rat = function(e, t, n, r) { if (n > 0) var a = e.maxX - t.minX; else var a = t.maxX - e.minX; if (r > 0) var o = e.maxY - t.minY; else var o = t.maxY - e.minY; return a >= 0 && o >= 0 ? Math.sqrt(a * a + o * o) : 0; }, s2 = function(e, t, n) { var r = e.positionX, a = e.positionY, o = e.height || 1, i = e.width || 1, s = n / t, l = o / i, u = {}; return t === 0 && 0 < n || t === 0 && 0 > n ? (u.x = r, u.y = a + o / 2, u) : 0 < t && -1 * l <= s && s <= l ? (u.x = r + i / 2, u.y = a + i * n / 2 / t, u) : 0 > t && -1 * l <= s && s <= l ? (u.x = r - i / 2, u.y = a - i * n / 2 / t, u) : 0 < n && (s <= -1 * l || s >= l) ? (u.x = r + o * t / 2 / n, u.y = a + o / 2, u) : (0 > n && (s <= -1 * l || s >= l) && (u.x = r - o * t / 2 / n, u.y = a - o / 2), u); }, aat = function(e, t) { for (var n = 0; n < e.edgeSize; n++) { var r = e.layoutEdges[n], a = e.idToIndex[r.sourceId], o = e.layoutNodes[a], i = e.idToIndex[r.targetId], s = e.layoutNodes[i], l = s.positionX - o.positionX, u = s.positionY - o.positionY; if (!(l === 0 && u === 0)) { var c = s2(o, l, u), d = s2(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; o.isLocked || (o.offsetX += m, o.offsetY += g), s.isLocked || (s.offsetX -= m, s.offsetY -= g); } } }, oat = function(e, t) { if (t.gravity !== 0) for (var n = 1, r = 0; r < e.graphSet.length; r++) { var a = e.graphSet[r], o = a.length; if (r === 0) var l = e.clientHeight / 2, u = e.clientWidth / 2; else var i = e.layoutNodes[e.idToIndex[a[0]]], s = e.layoutNodes[e.idToIndex[i.parentId]], l = s.positionX, u = s.positionY; for (var c = 0; c < o; c++) { var d = e.layoutNodes[e.idToIndex[a[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; } } } } }, iat = function(e, t) { var n = [], r = 0, a = -1; for (n.push.apply(n, e.graphSet[0]), a += e.graphSet[0].length; r <= a; ) { var o = n[r++], i = e.idToIndex[o], 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[++a] = l[d]; } s.offsetX = 0, s.offsetY = 0; } } }, sat = 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 a = lat(r.offsetX, r.offsetY, e.temperature); r.positionX += a.x, r.positionY += a.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, uat(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); } }, lat = function(e, t, n) { var r = Math.sqrt(e * e + t * t); if (r > n) var a = { x: n * e / r, y: n * t / r }; else var a = { x: e, y: t }; return a; }, uat = function e(t, n) { var r = t.parentId; if (r != null) { var a = n.layoutNodes[n.idToIndex[r]], o = !1; if ((a.maxX == null || t.maxX + a.padRight > a.maxX) && (a.maxX = t.maxX + a.padRight, o = !0), (a.minX == null || t.minX - a.padLeft < a.minX) && (a.minX = t.minX - a.padLeft, o = !0), (a.maxY == null || t.maxY + a.padBottom > a.maxY) && (a.maxY = t.maxY + a.padBottom, o = !0), (a.minY == null || t.minY - a.padTop < a.minY) && (a.minY = t.minY - a.padTop, o = !0), o) return e(a, n); } }, _P = function(e, t) { for (var n = e.layoutNodes, r = [], a = 0; a < n.length; a++) { var o = n[a], i = o.cmptId, s = r[i] = r[i] || []; s.push(o); } for (var l = 0, a = 0; a < r.length; a++) { var u = r[a]; 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, y) { return y.w * y.h - g.w * g.h; }); for (var f = 0, h = 0, p = 0, v = 0, m = Math.sqrt(l) * e.clientWidth / e.clientHeight, a = 0; a < r.length; a++) { var u = r[a]; 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); } } }, cat = { 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 nW(e) { this.options = It({}, cat, e); } nW.prototype.run = function() { var e = this.options, t = e, n = e.cy, r = t.eles, a = r.nodes().not(":parent"); t.sort && (a = a.sort(t.sort)); var o = Co(t.boundingBox ? t.boundingBox : { x1: 0, y1: 0, w: n.width(), h: n.height() }); if (o.h === 0 || o.w === 0) r.nodes().layoutPositions(this, t, function(ue) { return { x: o.x1, y: o.y1 }; }); else { var i = a.size(), s = Math.sqrt(i * o.h / o.w), l = Math.round(s), u = Math.round(o.w / o.h * s), c = function(ue) { if (ue == null) return Math.min(l, u); var ve = Math.min(l, u); ve == l ? l = ue : u = ue; }, d = function(ue) { if (ue == null) return Math.max(l, u); var ve = Math.max(l, u); ve == l ? l = ue : u = ue; }, 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 y = o.w / u, x = o.h / l; if (t.condense && (y = 0, x = 0), t.avoidOverlap) for (var w = 0; w < a.length; w++) { var k = a[w], C = k._private.position; (C.x == null || C.y == null) && (C.x = 0, C.y = 0); var S = k.layoutDimensions(t), _ = t.avoidOverlapPadding, T = S.w + _, F = S.h + _; y = Math.max(y, T), x = Math.max(x, F); } for (var A = {}, I = function(ue, ve) { return !!A["c-" + ue + "-" + ve]; }, N = function(ue, ve) { A["c-" + ue + "-" + ve] = !0; }, L = 0, z = 0, P = function() { z++, z >= u && (z = 0, L++); }, D = {}, M = 0; M < a.length; M++) { var V = a[M], Q = t.position(V); if (Q && (Q.row !== void 0 || Q.col !== void 0)) { var X = { row: Q.row, col: Q.col }; if (X.col === void 0) for (X.col = 0; I(X.row, X.col); ) X.col++; else if (X.row === void 0) for (X.row = 0; I(X.row, X.col); ) X.row++; D[V.id()] = X, N(X.row, X.col); } } var ee = function(ue, ve) { var ge, se; if (ue.locked() || ue.isParent()) return !1; var ne = D[ue.id()]; if (ne) ge = ne.col * y + y / 2 + o.x1, se = ne.row * x + x / 2 + o.y1; else { for (; I(L, z); ) P(); ge = z * y + y / 2 + o.x1, se = L * x + x / 2 + o.y1, N(L, z), P(); } return { x: ge, y: se }; }; a.layoutPositions(this, t, ee); } return this; }; var dat = { ready: function() { }, // on layoutready stop: function() { } // on layoutstop }; function z_(e) { this.options = It({}, dat, e); } z_.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; }; z_.prototype.stop = function() { return this; }; var pat = { 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 rW(e) { this.options = It({}, pat, e); } rW.prototype.run = function() { var e = this.options, t = e.eles, n = t.nodes(), r = sr(e.positions); function a(o) { if (e.positions == null) return hJe(o.position()); if (r) return e.positions(o); var i = e.positions[o._private.data.id]; return i ?? null; } return n.layoutPositions(this, e, function(o, i) { var s = a(o); return o.locked() || s == null ? !1 : s; }), this; }; var fat = { 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 aW(e) { this.options = It({}, fat, e); } aW.prototype.run = function() { var e = this.options, t = e.cy, n = e.eles, r = Co(e.boundingBox ? e.boundingBox : { x1: 0, y1: 0, w: t.width(), h: t.height() }), a = function(o, 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, a), this; }; var hat = [{ name: "breadthfirst", impl: Qq }, { name: "circle", impl: Jq }, { name: "concentric", impl: eW }, { name: "cose", impl: _x }, { name: "grid", impl: nW }, { name: "null", impl: z_ }, { name: "preset", impl: rW }, { name: "random", impl: aW }]; function oW(e) { this.options = e, this.notifications = 0; } var TP = function() { }, $P = function() { throw new Error("A headless instance can not render images"); }; oW.prototype = { recalculateRenderedStyle: TP, notify: function() { this.notifications++; }, init: TP, isHeadless: function() { return !0; }, png: $P, jpg: $P }; var V_ = {}; V_.arrowShapeWidth = 0.3; V_.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, y = f.y + c / 2 + p, x = v <= l && l <= m && g <= u && u <= y; return x; }, 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, y = m + f.y; return { x: g, y }; }, a = 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; }, o = 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) { xt(u) && (u = e[u]), e[l] = It({ 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 = o(a(this.points, f + 2 * v, h, p)), g = ro(c, d, m); return g; }, roughCollide: n, draw: function(c, d, f, h) { var p = a(this.points, d, f, h); t.arrowShapeImpl("polygon")(c, p); }, spacing: function(c) { return 0; }, gap: i }, u); }; s("none", { collide: t2, roughCollide: t2, draw: __, spacing: B9, gap: B9 }), 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 = a(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 = o(a(this.points, c + 2 * p, d, f)), m = o(a(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 = a(this.points, u, c, d), p = a(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 = o(a(this.points, c + 2 * p, d, f)); return ro(l, u, g) || m; }, draw: function(l, u, c, d, f) { var h = a(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 = o(a(this.points, c + 2 * p, d, f)), m = o(a(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 = a(this.points, u, c, d), p = a(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 vp = {}; vp.projectIntoViewport = function(e, t) { var n = this.cy, r = this.findContainerClientCoords(), a = r[0], o = r[1], i = r[4], s = n.pan(), l = n.zoom(), u = ((e - a) / i - s.x) / l, c = ((t - o) / i - s.y) / l; return [u, c]; }; vp.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)); }, a = { left: r("padding-left"), right: r("padding-right"), top: r("padding-top"), bottom: r("padding-bottom") }, o = { 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 = a.left + a.right, u = a.top + a.bottom, c = o.left + o.right, d = t.width / (i + c), f = i - l, h = s - u, p = t.left + a.left + o.left, v = t.top + a.top + o.top; return this.containerBB = [p, v, f, h, d]; }; vp.invalidateContainerClientCoordsCache = function() { this.containerBB = null; }; vp.findNearestElement = function(e, t, n, r) { return this.findNearestElements(e, t, n, r)[0]; }; vp.findNearestElements = function(e, t, n, r) { var a = this, o = this, i = o.getCachedZSortedEles(), s = [], l = o.cy.zoom(), u = o.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 T = 0; T < s.length; T++) if (s[T].isEdge()) { s[T] = S, p = S, h = _ ?? h; break; } } } else s.push(S), p = S, h = _ ?? h; } function g(S) { var _ = S.outerWidth() + 2 * d, T = S.outerHeight() + 2 * d, F = _ / 2, A = T / 2, I = S.position(), N = S.pstyle("corner-radius").value === "auto" ? "auto" : S.pstyle("corner-radius").pfValue, L = S._private.rscratch; if (I.x - F <= e && e <= I.x + F && I.y - A <= t && t <= I.y + A) { var z = o.nodeShapes[a.getNodeShape(S)]; if (z.checkPoint(e, t, 0, _, T, I.x, I.y, N, L)) return m(S, 0), !0; } } function y(S) { var _ = S._private, T = _.rscratch, F = S.pstyle("width").pfValue, A = S.pstyle("arrow-scale").value, I = F / 2 + c, N = I * I, L = I * 2, z = _.source, P = _.target, D; if (T.edgeType === "segments" || T.edgeType === "straight" || T.edgeType === "haystack") { for (var M = T.allpts, V = 0; V + 3 < M.length; V += 2) if (TJe(e, t, M[V], M[V + 1], M[V + 2], M[V + 3], L) && N > (D = IJe(e, t, M[V], M[V + 1], M[V + 2], M[V + 3]))) return m(S, D), !0; } else if (T.edgeType === "bezier" || T.edgeType === "multibezier" || T.edgeType === "self" || T.edgeType === "compound") { for (var M = T.allpts, V = 0; V + 5 < T.allpts.length; V += 4) if ($Je(e, t, M[V], M[V + 1], M[V + 2], M[V + 3], M[V + 4], M[V + 5], L) && N > (D = AJe(e, t, M[V], M[V + 1], M[V + 2], M[V + 3], M[V + 4], M[V + 5]))) return m(S, D), !0; } for (var z = z || _.source, P = P || _.target, Q = a.getArrowWidth(F, A), X = [{ name: "source", x: T.arrowStartX, y: T.arrowStartY, angle: T.srcArrowAngle }, { name: "target", x: T.arrowEndX, y: T.arrowEndY, angle: T.tgtArrowAngle }, { name: "mid-source", x: T.midX, y: T.midY, angle: T.midsrcArrowAngle }, { name: "mid-target", x: T.midX, y: T.midY, angle: T.midtgtArrowAngle }], V = 0; V < X.length; V++) { var ee = X[V], ue = o.arrowShapes[S.pstyle(ee.name + "-arrow-shape").value], ve = S.pstyle("width").pfValue; if (ue.roughCollide(e, t, Q, ee.angle, { x: ee.x, y: ee.y }, ve, c) && ue.collide(e, t, Q, ee.angle, { x: ee.x, y: ee.y }, ve, c)) return m(S), !0; } u && s.length > 0 && (g(z), g(P)); } function x(S, _, T) { return Li(S, _, T); } function w(S, _) { var T = S._private, F = f, A; _ ? A = _ + "-" : A = "", S.boundingBox(); var I = T.labelBounds[_ || "main"], N = S.pstyle(A + "label").value, L = S.pstyle("text-events").strValue === "yes"; if (!(!L || !N)) { var z = x(T.rscratch, "labelX", _), P = x(T.rscratch, "labelY", _), D = x(T.rscratch, "labelAngle", _), M = S.pstyle(A + "text-margin-x").pfValue, V = S.pstyle(A + "text-margin-y").pfValue, Q = I.x1 - F - M, X = I.x2 + F - M, ee = I.y1 - F - V, ue = I.y2 + F - V; if (D) { var ve = Math.cos(D), ge = Math.sin(D), se = function(Oe, Ne) { return Oe = Oe - z, Ne = Ne - P, { x: Oe * ve - Ne * ge + z, y: Oe * ge + Ne * ve + P }; }, ne = se(Q, ee), W = se(Q, ue), Y = se(X, ee), re = se(X, ue), we = [ // with the margin added after the rotation is applied ne.x + M, ne.y + V, Y.x + M, Y.y + V, re.x + M, re.y + V, W.x + M, W.y + V ]; if (ro(e, t, we)) return m(S), !0; } else if (oh(I, e, t)) return m(S), !0; } } for (var k = i.length - 1; k >= 0; k--) { var C = i[k]; C.isNode() ? g(C) || w(C) : y(C) || w(C) || w(C, "source") || w(C, "target"); } return s; }; vp.getAllInBox = function(e, t, n, r) { var a = this.getCachedZSortedEles().interactive, o = [], 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 = Co({ x1: e, y1: t, x2: n, y2: r }), d = 0; d < a.length; d++) { var f = a[d]; if (f.isNode()) { var h = f, p = h.boundingBox({ includeNodes: !0, includeEdges: !1, includeLabels: !1 }); O_(c, p) && !hq(p, c) && o.push(h); } else { var v = f, m = v._private, g = m.rscratch; if (g.startX != null && g.startY != null && !oh(c, g.startX, g.startY) || g.endX != null && g.endY != null && !oh(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 y = m.rstyle.bezierPts || m.rstyle.linePts || m.rstyle.haystackPts, x = !0, w = 0; w < y.length; w++) if (!_Je(c, y[w])) { x = !1; break; } x && o.push(v); } else (g.edgeType === "haystack" || g.edgeType === "straight") && o.push(v); } } return o; }; var l2 = {}; l2.calculateArrowAngles = function(e) { var t = e._private.rscratch, n = t.edgeType === "haystack", r = t.edgeType === "bezier", a = t.edgeType === "multibezier", o = t.edgeType === "segments", i = t.edgeType === "compound", s = t.edgeType === "self", l, u, c, d, f, h, g, y; 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, y = t.midY, o) l = c - t.segpts[0], u = d - t.segpts[1]; else if (a || i || s || r) { var p = t.allpts, v = Wr(p[0], p[2], p[4], 0.1), m = Wr(p[1], p[3], p[5], 0.1); l = c - v, u = d - m; } else l = c - g, u = d - y; t.srcArrowAngle = H1(l, u); var g = t.midX, y = t.midY; if (n && (g = (c + f) / 2, y = (d + h) / 2), l = f - c, u = h - d, o) { var p = t.allpts; if (p.length / 2 % 2 === 0) { var x = p.length / 2, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } else if (t.isRound) l = t.midVector[1], u = -t.midVector[0]; else { var x = p.length / 2 - 1, w = x - 2; l = p[x] - p[w], u = p[x + 1] - p[w + 1]; } } else if (a || i || s) { var p = t.allpts, k = t.ctrlpts, C, S, _, T; if (k.length / 2 % 2 === 0) { var F = p.length / 2 - 1, A = F + 2, I = A + 2; C = Wr(p[F], p[A], p[I], 0), S = Wr(p[F + 1], p[A + 1], p[I + 1], 0), _ = Wr(p[F], p[A], p[I], 1e-4), T = Wr(p[F + 1], p[A + 1], p[I + 1], 1e-4); } else { var A = p.length / 2 - 1, F = A - 2, I = A + 2; C = Wr(p[F], p[A], p[I], 0.4999), S = Wr(p[F + 1], p[A + 1], p[I + 1], 0.4999), _ = Wr(p[F], p[A], p[I], 0.5), T = Wr(p[F + 1], p[A + 1], p[I + 1], 0.5); } l = _ - C, u = T - S; } if (t.midtgtArrowAngle = H1(l, u), t.midDispX = l, t.midDispY = u, l *= -1, u *= -1, o) { var p = t.allpts; if (p.length / 2 % 2 !== 0 && !t.isRound) { var x = p.length / 2 - 1, N = x + 2; l = -(p[N] - p[x]), u = -(p[N + 1] - p[x + 1]); } } if (t.midsrcArrowAngle = H1(l, u), o) l = f - t.segpts[t.segpts.length - 2], u = h - t.segpts[t.segpts.length - 1]; else if (a || i || s || r) { var p = t.allpts, L = p.length, v = Wr(p[L - 6], p[L - 4], p[L - 2], 0.9), m = Wr(p[L - 5], p[L - 3], p[L - 1], 0.9); l = f - v, u = h - m; } else l = f - g, u = h - y; t.tgtArrowAngle = H1(l, u); }; l2.getArrowWidth = l2.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 E3, _3, os = {}, jo = {}, OP, FP, Vc, qy, Ys, Pc, Rc, rs, zp, Q1, iW, sW, T3, $3, AP, IP = 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); }, vat = 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; }, gat = function(e, t, n, r, a) { if (e !== AP ? IP(t, e, os) : vat(jo, os), IP(t, n, jo), OP = os.nx * jo.ny - os.ny * jo.nx, FP = os.nx * jo.nx - os.ny * -jo.ny, Ys = Math.asin(Math.max(-1, Math.min(1, OP))), Math.abs(Ys) < 1e-6) { E3 = t.x, _3 = t.y, Rc = zp = 0; return; } Vc = 1, qy = !1, FP < 0 ? Ys < 0 ? Ys = Math.PI + Ys : (Ys = Math.PI - Ys, Vc = -1, qy = !0) : Ys > 0 && (Vc = -1, qy = !0), t.radius !== void 0 ? zp = t.radius : zp = r, Pc = Ys / 2, Q1 = Math.min(os.len / 2, jo.len / 2), a ? (rs = Math.abs(Math.cos(Pc) * zp / Math.sin(Pc)), rs > Q1 ? (rs = Q1, Rc = Math.abs(rs * Math.sin(Pc) / Math.cos(Pc))) : Rc = zp) : (rs = Math.min(Q1, zp), Rc = Math.abs(rs * Math.sin(Pc) / Math.cos(Pc))), T3 = t.x + jo.nx * rs, $3 = t.y + jo.ny * rs, E3 = T3 - jo.ny * Rc * Vc, _3 = $3 + jo.nx * Rc * Vc, iW = t.x + os.nx * rs, sW = t.y + os.ny * rs, AP = t; }; function lW(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 j_(e, t, n, r) { var a = 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 } : (gat(e, t, n, r, a), { cx: E3, cy: _3, radius: Rc, startX: iW, startY: sW, stopX: T3, stopY: $3, startAngle: os.ang + Math.PI / 2 * Vc, endAngle: jo.ang - Math.PI / 2 * Vc, counterClockwise: qy }); } var ja = {}; ja.findMidptPtsEtc = function(e, t) { var n = t.posPts, r = t.intersectionPts, a = t.vectorNormInverse, o, i = e.pstyle("source-endpoint"), s = e.pstyle("target-endpoint"), l = i.units != null && s.units != null, u = function(w, k, C, S) { var _ = S - k, T = C - w, F = Math.sqrt(T * T + _ * _); return { x: -_ / F, y: T / F }; }, c = e.pstyle("edge-distances").value; switch (c) { case "node-position": o = n; break; case "intersection": o = r; break; case "endpoints": { if (l) { var d = this.manualEndptToPx(e.source()[0], i), f = $i(d, 2), h = f[0], p = f[1], v = this.manualEndptToPx(e.target()[0], s), m = $i(v, 2), g = m[0], y = m[1], x = { x1: h, y1: p, x2: g, y2: y }; a = u(h, p, g, y), o = x; } else An("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).")), o = r; break; } } return { midptPts: o, vectorNormInverse: a }; }; ja.findHaystackPoints = function(e) { for (var t = 0; t < e.length; t++) { var n = e[t], r = n._private, a = r.rscratch; if (!a.haystack) { var o = Math.random() * 2 * Math.PI; a.source = { x: Math.cos(o), y: Math.sin(o) }, o = Math.random() * 2 * Math.PI, a.target = { x: Math.cos(o), y: Math.sin(o) }; } 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; a.haystackPts = a.allpts = [a.source.x * c * v + l.x, a.source.y * f * v + l.y, a.target.x * d * v + u.x, a.target.y * h * v + u.y], a.midX = (a.allpts[0] + a.allpts[2]) / 2, a.midY = (a.allpts[1] + a.allpts[3]) / 2, a.edgeType = "haystack", a.haystack = !0, this.storeEdgeProjections(n), this.calculateArrowAngles(n), this.recalculateEdgeLabelProjections(n), this.calculateLabelAngles(n); } }; ja.findSegmentsPoints = function(e, t) { var n = e._private.rscratch, r = e.pstyle("segment-weights"), a = e.pstyle("segment-distances"), o = e.pstyle("segment-radii"), i = e.pstyle("radius-type"), s = Math.min(r.pfValue.length, a.pfValue.length), l = o.pfValue[o.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 = a.pfValue[c], h = 1 - d, p = d, v = this.findMidptPtsEtc(e, t), m = v.midptPts, g = v.vectorNormInverse, y = { x: m.x1 * h + m.x2 * p, y: m.y1 * h + m.y2 * p }; n.segpts.push(y.x + g.x * f, y.y + g.y * f), n.radii.push(o.pfValue[c] !== void 0 ? o.pfValue[c] : l), n.isArcRadius.push((i.pfValue[c] !== void 0 ? i.pfValue[c] : u) === "arc-radius"); } }; ja.findLoopPoints = function(e, t, n, r) { var a = e._private.rscratch, o = 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; a.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 = o[g] === void 0 ? o[g] = 0 : ++o[g], a.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)]; }; ja.findCompoundLoopPoints = function(e, t, n, r) { var a = e._private.rscratch; a.edgeType = "compound"; var o = 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: o.x - s / 2, y: o.y - l / 2 }, y = { x: i.x - u / 2, y: i.y - c / 2 }, x = { x: Math.min(g.x, y.x), y: Math.min(g.y, y.y) }, w = 0.5, k = Math.max(w, Math.log(s * 0.01)), C = Math.max(w, Math.log(u * 0.01)); a.ctrlpts = [x.x, x.y - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * k, x.x - (1 + Math.pow(m, 1.12) / 100) * v * (p / 3 + 1) * C, x.y]; }; ja.findStraightEdgePoints = function(e) { e._private.rscratch.edgeType = "straight"; }; ja.findBezierPoints = function(e, t, n, r, a) { var o = 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; o.edgeType = f ? "multibezier" : "bezier", o.ctrlpts = []; for (var h = 0; h < u; h++) { var p = (0.5 - t.eles.length / 2 + n) * i * (a ? -1 : 1), v = void 0, m = pq(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, y = 1 - d, x = d, w = this.findMidptPtsEtc(e, t), k = w.midptPts, C = w.vectorNormInverse, S = { x: k.x1 * y + k.x2 * x, y: k.y1 * y + k.y2 * x }; o.ctrlpts.push(S.x + C.x * g, S.y + C.y * g); } }; ja.findTaxiPoints = function(e, t) { var n = e._private.rscratch; n.edgeType = "segments"; var r = "vertical", a = "horizontal", o = "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, y = g, x = e.pstyle("taxi-turn"), w = x.units === "%", k = x.pfValue, C = k < 0, S = e.pstyle("taxi-turn-min-distance").pfValue, _ = m ? (d + h) / 2 : 0, T = m ? (f + p) / 2 : 0, F = c.x2 - c.x1, A = c.y2 - c.y1, I = function(Ve, je) { return Ve > 0 ? Math.max(Ve - je, 0) : Math.min(Ve + je, 0); }, N = I(F, _), L = I(A, T), z = !1; y === u ? g = Math.abs(N) > Math.abs(L) ? a : r : y === l || y === s ? (g = r, z = !0) : (y === o || y === i) && (g = a, z = !0); var P = g === r, D = P ? L : N, M = P ? A : F, V = pq(M), Q = !1; !(z && (w || C)) && (y === s && M < 0 || y === l && M > 0 || y === o && M > 0 || y === i && M < 0) && (V *= -1, D = V * Math.abs(D), Q = !0); var X; if (w) { var ee = k < 0 ? 1 + k : k; X = ee * D; } else { var ue = k < 0 ? D : 0; X = ue + k * V; } var ve = function(Ve) { return Math.abs(Ve) < S || Math.abs(Ve) >= Math.abs(D); }, ge = ve(X), se = ve(Math.abs(D) - Math.abs(X)), ne = ge || se; if (ne && !Q) if (P) { var W = Math.abs(M) <= f / 2, Y = Math.abs(F) <= h / 2; if (W) { var re = (c.x1 + c.x2) / 2, we = c.y1, Oe = c.y2; n.segpts = [re, we, re, Oe]; } else if (Y) { var Ne = (c.y1 + c.y2) / 2, xe = c.x1, Fe = c.x2; n.segpts = [xe, Ne, Fe, Ne]; } else n.segpts = [c.x1, c.y2]; } else { var Se = Math.abs(M) <= d / 2, Pe = Math.abs(A) <= p / 2; if (Se) { var Me = (c.y1 + c.y2) / 2, He = c.x1, De = c.x2; n.segpts = [He, Me, De, Me]; } else if (Pe) { var Xe = (c.x1 + c.x2) / 2, Ge = c.y1, Ze = c.y2; n.segpts = [Xe, Ge, Xe, Ze]; } else n.segpts = [c.x2, c.y1]; } else if (P) { var E = c.y1 + X + (m ? f / 2 * V : 0), j = c.x1, le = c.x2; n.segpts = [j, E, le, E]; } else { var ce = c.x1 + X + (m ? d / 2 * V : 0), oe = c.y1, ke = c.y2; n.segpts = [ce, oe, ce, ke]; } if (n.isRound) { var fe = e.pstyle("taxi-radius").value, Ee = e.pstyle("radius-type").value[0] === "arc-radius"; n.radii = new Array(n.segpts.length / 2).fill(fe), n.isArcRadius = new Array(n.segpts.length / 2).fill(Ee); } }; ja.tryToCorrectInvalidPoints = function(e, t) { var n = e._private.rscratch; if (n.edgeType === "bezier") { var r = t.srcPos, a = t.tgtPos, o = 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 = !it(n.startX) || !it(n.startY), m = !it(n.arrowStartX) || !it(n.arrowStartY), g = !it(n.endX) || !it(n.endY), y = !it(n.arrowEndX) || !it(n.arrowEndY), x = 3, w = this.getArrowWidth(e.pstyle("width").pfValue, e.pstyle("arrow-scale").value) * this.arrowShapeWidth, k = x * w, C = Rd({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.startX, y: n.startY }), S = C < k, _ = Rd({ x: n.ctrlpts[0], y: n.ctrlpts[1] }, { x: n.endX, y: n.endY }), T = _ < k, F = !1; if (v || m || S) { F = !0; var A = { // delta x: n.ctrlpts[0] - r.x, y: n.ctrlpts[1] - r.y }, I = Math.sqrt(A.x * A.x + A.y * A.y), N = { // normalised delta x: A.x / I, y: A.y / I }, L = Math.max(o, i), z = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + N.x * 2 * L, y: n.ctrlpts[1] + N.y * 2 * L }, P = u.intersectLine(r.x, r.y, o, i, z.x, z.y, 0, d, h); S ? (n.ctrlpts[0] = n.ctrlpts[0] + N.x * (k - C), n.ctrlpts[1] = n.ctrlpts[1] + N.y * (k - C)) : (n.ctrlpts[0] = P[0] + N.x * k, n.ctrlpts[1] = P[1] + N.y * k); } if (g || y || T) { F = !0; var D = { // delta x: n.ctrlpts[0] - a.x, y: n.ctrlpts[1] - a.y }, M = Math.sqrt(D.x * D.x + D.y * D.y), V = { // normalised delta x: D.x / M, y: D.y / M }, Q = Math.max(o, i), X = { // *2 radius guarantees outside shape x: n.ctrlpts[0] + V.x * 2 * Q, y: n.ctrlpts[1] + V.y * 2 * Q }, ee = c.intersectLine(a.x, a.y, s, l, X.x, X.y, 0, f, p); T ? (n.ctrlpts[0] = n.ctrlpts[0] + V.x * (k - _), n.ctrlpts[1] = n.ctrlpts[1] + V.y * (k - _)) : (n.ctrlpts[0] = ee[0] + V.x * k, n.ctrlpts[1] = ee[1] + V.y * k); } F && this.findEndpoints(e); } }; ja.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, a; 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, a = 0.5, t.midX = Wr(t.allpts[r], t.allpts[r + 2], t.allpts[r + 4], a), t.midY = Wr(t.allpts[r + 1], t.allpts[r + 3], t.allpts[r + 5], a)); } 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 o = 2; o + 3 < t.allpts.length; o += 2) { var i = t.radii[o / 2 - 1], s = t.isArcRadius[o / 2 - 1]; t.roundCorners.push(j_({ x: t.allpts[o - 2], y: t.allpts[o - 1] }, { x: t.allpts[o], y: t.allpts[o + 1], radius: i }, { x: t.allpts[o + 2], y: t.allpts[o + 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; } } } }; ja.checkForInvalidEdgeWarning = function(e) { var t = e[0]._private.rscratch; t.nodesOverlap || it(t.startX) && it(t.startY) && it(t.endX) && it(t.endY) ? t.loggedErr = !1 : t.loggedErr || (t.loggedErr = !0, An("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.")); }; ja.findEdgeControlPoints = function(e) { var t = this; if (!(!e || e.length === 0)) { for (var n = this, r = n.cy, a = r.hasCompoundNodes(), o = { map: new hs(), get: function(C) { var S = this.map.get(C[0]); return S != null ? S.get(C[1]) : null; }, set: function(C, S) { var _ = this.map.get(C[0]); _ == null && (_ = new hs(), this.map.set(C[0], _)), _.set(C[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(), y = [m, g].sort(), x = o.get(y); x == null && (x = { eles: [] }, o.set(y, x), i.push(y)), x.eles.push(u), f && (x.hasUnbundled = !0), h && (x.hasBezier = !0); } } for (var w = function(C) { var S = i[C], _ = o.get(S), T = void 0; if (!_.hasUnbundled) { var F = _.eles[0].parallelEdges().filter(function(le) { return le.isBundledBezier(); }); T_(_.eles), F.forEach(function(le) { return _.eles.push(le); }), _.eles.sort(function(le, ce) { return le.poolIndex() - ce.poolIndex(); }); } var A = _.eles[0], I = A.source(), N = A.target(); if (I.poolIndex() > N.poolIndex()) { var L = I; I = N, N = L; } var z = _.srcPos = I.position(), P = _.tgtPos = N.position(), D = _.srcW = I.outerWidth(), M = _.srcH = I.outerHeight(), V = _.tgtW = N.outerWidth(), Q = _.tgtH = N.outerHeight(), X = _.srcShape = n.nodeShapes[t.getNodeShape(I)], ee = _.tgtShape = n.nodeShapes[t.getNodeShape(N)], ue = _.srcCornerRadius = I.pstyle("corner-radius").value === "auto" ? "auto" : I.pstyle("corner-radius").pfValue, ve = _.tgtCornerRadius = N.pstyle("corner-radius").value === "auto" ? "auto" : N.pstyle("corner-radius").pfValue, ge = _.tgtRs = N._private.rscratch, se = _.srcRs = I._private.rscratch; _.dirCounts = { north: 0, west: 0, south: 0, east: 0, northwest: 0, southwest: 0, northeast: 0, southeast: 0 }; for (var ne = 0; ne < _.eles.length; ne++) { var W = _.eles[ne], Y = W[0]._private.rscratch, re = W.pstyle("curve-style").value, we = re === "unbundled-bezier" || re.endsWith("segments") || re.endsWith("taxi"), Oe = !I.same(W.source()); if (!_.calculatedIntersection && I !== N && (_.hasBezier || _.hasUnbundled)) { _.calculatedIntersection = !0; var Ne = X.intersectLine(z.x, z.y, D, M, P.x, P.y, 0, ue, se), xe = _.srcIntn = Ne, Fe = ee.intersectLine(P.x, P.y, V, Q, z.x, z.y, 0, ve, ge), Se = _.tgtIntn = Fe, Pe = _.intersectionPts = { x1: Ne[0], x2: Fe[0], y1: Ne[1], y2: Fe[1] }, Me = _.posPts = { x1: z.x, x2: P.x, y1: z.y, y2: P.y }, He = Fe[1] - Ne[1], De = Fe[0] - Ne[0], Xe = Math.sqrt(De * De + He * He), Ge = _.vector = { x: De, y: He }, Ze = _.vectorNorm = { x: Ge.x / Xe, y: Ge.y / Xe }, E = { x: -Ze.y, y: Ze.x }; _.nodesOverlap = !it(Xe) || ee.checkPoint(Ne[0], Ne[1], 0, V, Q, P.x, P.y, ve, ge) || X.checkPoint(Fe[0], Fe[1], 0, D, M, z.x, z.y, ue, se), _.vectorNormInverse = E, T = { nodesOverlap: _.nodesOverlap, dirCounts: _.dirCounts, calculatedIntersection: !0, hasBezier: _.hasBezier, hasUnbundled: _.hasUnbundled, eles: _.eles, srcPos: P, tgtPos: z, srcW: V, srcH: Q, tgtW: D, tgtH: M, srcIntn: Se, tgtIntn: xe, srcShape: ee, tgtShape: X, posPts: { x1: Me.x2, y1: Me.y2, x2: Me.x1, y2: Me.y1 }, intersectionPts: { x1: Pe.x2, y1: Pe.y2, x2: Pe.x1, y2: Pe.y1 }, vector: { x: -Ge.x, y: -Ge.y }, vectorNorm: { x: -Ze.x, y: -Ze.y }, vectorNormInverse: { x: -E.x, y: -E.y } }; } var j = Oe ? T : _; Y.nodesOverlap = j.nodesOverlap, Y.srcIntn = j.srcIntn, Y.tgtIntn = j.tgtIntn, Y.isRound = re.startsWith("round"), a && (I.isParent() || I.isChild() || N.isParent() || N.isChild()) && (I.parents().anySame(N) || N.parents().anySame(I) || I.same(N) && I.isParent()) ? t.findCompoundLoopPoints(W, j, ne, we) : I === N ? t.findLoopPoints(W, j, ne, we) : re.endsWith("segments") ? t.findSegmentsPoints(W, j) : re.endsWith("taxi") ? t.findTaxiPoints(W, j) : re === "straight" || !we && _.eles.length % 2 === 1 && ne === Math.floor(_.eles.length / 2) ? t.findStraightEdgePoints(W) : t.findBezierPoints(W, j, ne, we, Oe), t.findEndpoints(W), t.tryToCorrectInvalidPoints(W, j), t.checkForInvalidEdgeWarning(W), t.storeAllpts(W), t.storeEdgeProjections(W), t.calculateArrowAngles(W), t.recalculateEdgeLabelProjections(W), t.calculateLabelAngles(W); } }, k = 0; k < i.length; k++) w(k); this.findHaystackPoints(s); } }; function uW(e) { var t = []; if (e != null) { for (var n = 0; n < e.length; n += 2) { var r = e[n], a = e[n + 1]; t.push({ x: r, y: a }); } return t; } } ja.getSegmentPoints = function(e) { var t = e[0]._private.rscratch, n = t.edgeType; if (n === "segments") return this.recalculateRenderedStyle(e), uW(t.segpts); }; ja.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), uW(t.ctrlpts); }; ja.getEdgeMidpoint = function(e) { var t = e[0]._private.rscratch; return this.recalculateRenderedStyle(e), { x: t.midX, y: t.midY }; }; var Im = {}; Im.manualEndptToPx = function(e, t) { var n = this, r = e.position(), a = e.outerWidth(), o = 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] * a), t.units[1] === "%" && (s[1] = s[1] * o), 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(a, o), c = [r.x + Math.cos(l) * u, r.y + Math.sin(l) * u]; return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x, r.y, a, o, c[0], c[1], 0, e.pstyle("corner-radius").value === "auto" ? "auto" : e.pstyle("corner-radius").pfValue, i); } }; Im.findEndpoints = function(e) { var t = this, n, r = e.source()[0], a = e.target()[0], o = r.position(), i = a.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 = a._private.rscratch, h = e.pstyle("curve-style").value, p = e._private.rscratch, v = p.edgeType, m = h === "taxi", g = v === "self" || v === "compound", y = v === "bezier" || v === "multibezier" || g, x = v !== "bezier", w = v === "straight" || v === "segments", k = v === "segments", C = y || x || w, S = g || m, _ = e.pstyle("source-endpoint"), T = S ? "outside-to-node" : _.value, F = r.pstyle("corner-radius").value === "auto" ? "auto" : r.pstyle("corner-radius").pfValue, A = e.pstyle("target-endpoint"), I = S ? "outside-to-node" : A.value, N = a.pstyle("corner-radius").value === "auto" ? "auto" : a.pstyle("corner-radius").pfValue; p.srcManEndpt = _, p.tgtManEndpt = A; var L, z, P, D; if (y) { var M = [p.ctrlpts[0], p.ctrlpts[1]], V = x ? [p.ctrlpts[p.ctrlpts.length - 2], p.ctrlpts[p.ctrlpts.length - 1]] : M; L = V, z = M; } else if (w) { var Q = k ? p.segpts.slice(0, 2) : [i.x, i.y], X = k ? p.segpts.slice(p.segpts.length - 2) : [o.x, o.y]; L = X, z = Q; } if (I === "inside-to-node") n = [i.x, i.y]; else if (A.units) n = this.manualEndptToPx(a, A); else if (I === "outside-to-line") n = p.tgtIntn; else if (I === "outside-to-node" || I === "outside-to-node-or-label" ? P = L : (I === "outside-to-line" || I === "outside-to-line-or-label") && (P = [o.x, o.y]), n = t.nodeShapes[this.getNodeShape(a)].intersectLine(i.x, i.y, a.outerWidth(), a.outerHeight(), P[0], P[1], 0, N, f), I === "outside-to-node-or-label" || I === "outside-to-line-or-label") { var ee = a._private.rscratch, ue = ee.labelWidth, ve = ee.labelHeight, ge = ee.labelX, se = ee.labelY, ne = ue / 2, W = ve / 2, Y = a.pstyle("text-valign").value; Y === "top" ? se -= W : Y === "bottom" && (se += W); var re = a.pstyle("text-halign").value; re === "left" ? ge -= ne : re === "right" && (ge += ne); var we = vg(P[0], P[1], [ge - ne, se - W, ge + ne, se - W, ge + ne, se + W, ge - ne, se + W], i.x, i.y); if (we.length > 0) { var Oe = o, Ne = Dc(Oe, tf(n)), xe = Dc(Oe, tf(we)), Fe = Ne; if (xe < Ne && (n = we, Fe = xe), we.length > 2) { var Se = Dc(Oe, { x: we[2], y: we[3] }); Se < Fe && (n = [we[2], we[3]]); } } } var Pe = U1(n, L, t.arrowShapes[s].spacing(e) + u), Me = U1(n, L, t.arrowShapes[s].gap(e) + u); if (p.endX = Me[0], p.endY = Me[1], p.arrowEndX = Pe[0], p.arrowEndY = Pe[1], T === "inside-to-node") n = [o.x, o.y]; else if (_.units) n = this.manualEndptToPx(r, _); else if (T === "outside-to-line") n = p.srcIntn; else if (T === "outside-to-node" || T === "outside-to-node-or-label" ? D = z : (T === "outside-to-line" || T === "outside-to-line-or-label") && (D = [i.x, i.y]), n = t.nodeShapes[this.getNodeShape(r)].intersectLine(o.x, o.y, r.outerWidth(), r.outerHeight(), D[0], D[1], 0, F, d), T === "outside-to-node-or-label" || T === "outside-to-line-or-label") { var He = r._private.rscratch, De = He.labelWidth, Xe = He.labelHeight, Ge = He.labelX, Ze = He.labelY, E = De / 2, j = Xe / 2, le = r.pstyle("text-valign").value; le === "top" ? Ze -= j : le === "bottom" && (Ze += j); var ce = r.pstyle("text-halign").value; ce === "left" ? Ge -= E : ce === "right" && (Ge += E); var oe = vg(D[0], D[1], [Ge - E, Ze - j, Ge + E, Ze - j, Ge + E, Ze + j, Ge - E, Ze + j], o.x, o.y); if (oe.length > 0) { var ke = i, fe = Dc(ke, tf(n)), Ee = Dc(ke, tf(oe)), Ve = fe; if (Ee < fe && (n = [oe[0], oe[1]], Ve = Ee), oe.length > 2) { var je = Dc(ke, { x: oe[2], y: oe[3] }); je < Ve && (n = [oe[2], oe[3]]); } } } var me = U1(n, z, t.arrowShapes[l].spacing(e) + c), Te = U1(n, z, t.arrowShapes[l].gap(e) + c); p.startX = Te[0], p.startY = Te[1], p.arrowStartX = me[0], p.arrowStartY = me[1], C && (!it(p.startX) || !it(p.startY) || !it(p.endX) || !it(p.endY) ? p.badLine = !0 : p.badLine = !1); }; Im.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 }; } }; Im.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 H_ = {}; function mat(e, t, n) { for (var r = function(l, u, c, d) { return Wr(l, u, c, d); }, a = t._private, o = a.rstyle.bezierPts, i = 0; i < e.bezierProjPcts.length; i++) { var s = e.bezierProjPcts[i]; o.push({ x: r(n[0], n[2], n[4], s), y: r(n[1], n[3], n[5], s) }); } } H_.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 a = 0; a + 5 < n.allpts.length; a += 4) mat(this, e, n.allpts.slice(a, a + 6)); } else if (r === "segments") for (var o = t.rstyle.linePts = [], a = 0; a + 1 < n.allpts.length; a += 2) o.push({ x: n.allpts[a], y: n.allpts[a + 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; }; H_.recalculateEdgeProjections = function(e) { this.findEdgeControlPoints(e); }; var Vs = {}; Vs.recalculateNodeLabelProjection = function(e) { var t = e.pstyle("label").strValue; if (!tc(t)) { var n, r, a = e._private, o = e.width(), i = e.height(), s = e.padding(), l = e.position(), u = e.pstyle("text-halign").strValue, c = e.pstyle("text-valign").strValue, d = a.rscratch, f = a.rstyle; switch (u) { case "left": n = l.x - o / 2 - s; break; case "right": n = l.x + o / 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 cW = function(e, t) { var n = Math.atan(t / e); return e === 0 && n < 0 && (n = n * -1), n; }, dW = function(e, t) { var n = t.x - e.x, r = t.y - e.y; return cW(n, r); }, yat = function(e, t, n, r) { var a = hg(0, r - 1e-3, 1), o = hg(0, r + 1e-3, 1), i = pf(e, t, n, a), s = pf(e, t, n, o); return dW(i, s); }; Vs.recalculateEdgeLabelProjections = function(e) { var t, n = e._private, r = n.rscratch, a = this, o = { mid: e.pstyle("label").strValue, source: e.pstyle("source-label").strValue, target: e.pstyle("target-label").strValue }; if (o.mid || o.source || o.target) { t = { x: r.midX, y: r.midY }; var i = function(c, d, f) { Cu(n.rscratch, c, d, f), Cu(n.rstyle, c, d, f); }; i("labelX", null, t.x), i("labelY", null, t.y); var s = cW(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 = a.bezierProjPcts.length; function y(S, _, T, F, A) { var I = Rd(_, T), N = S.segments[S.segments.length - 1], L = { p0: _, p1: T, t0: F, t1: A, startDist: N ? N.startDist + N.length : 0, length: I }; S.segments.push(L), S.length += I; } for (var x = 0; x < d.length; x++) { var w = d[x], k = d[x - 1]; k && (w.startDist = k.startDist + k.length), y(w, w.p0, m[x * g], 0, a.bezierProjPcts[0]); for (var C = 0; C < g - 1; C++) y(w, m[x * g + C], m[x * g + C + 1], a.bezierProjPcts[C], a.bezierProjPcts[C + 1]); y(w, m[x * g + g - 1], w.p2, a.bezierProjPcts[g - 1], 1); } return c.cache = d; }, u = function(c) { var d, f = c === "source"; if (o[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, y = 0; y < p.length; y++) { for (var x = p[f ? y : p.length - 1 - y], w = 0; w < x.segments.length; w++) { var k = x.segments[f ? w : x.segments.length - 1 - w], C = y === p.length - 1 && w === x.segments.length - 1; if (m = g, g += k.length, g >= h || C) { v = { cp: x, segment: k }; break; } } if (v) break; } var S = v.cp, _ = v.segment, T = (h - m) / _.length, F = _.t1 - _.t0, A = f ? _.t0 + F * T : _.t1 - F * T; A = hg(0, A, 1), t = pf(S.p0, S.p1, S.p2, A), d = yat(S.p0, S.p1, S.p2, A); break; } case "straight": case "segments": case "haystack": { for (var I = 0, N, L, z, P, D = r.allpts.length, M = 0; M + 3 < D && (f ? (z = { x: r.allpts[M], y: r.allpts[M + 1] }, P = { x: r.allpts[M + 2], y: r.allpts[M + 3] }) : (z = { x: r.allpts[D - 2 - M], y: r.allpts[D - 1 - M] }, P = { x: r.allpts[D - 4 - M], y: r.allpts[D - 3 - M] }), N = Rd(z, P), L = I, I += N, !(I >= h)); M += 2) ; var V = h - L, Q = V / N; Q = hg(0, Q, 1), t = xJe(z, P, Q), d = dW(z, P); break; } } i("labelX", c, t.x), i("labelY", c, t.y), i("labelAutoAngle", c, d); } }; u("source"), u("target"), this.applyLabelDimensions(e); } }; Vs.applyLabelDimensions = function(e) { this.applyPrefixedLabelDimensions(e), e.isEdge() && (this.applyPrefixedLabelDimensions(e, "source"), this.applyPrefixedLabelDimensions(e, "target")); }; Vs.applyPrefixedLabelDimensions = function(e, t) { var n = e._private, r = this.getLabelText(e, t), a = this.calculateLabelDimensions(e, r), o = e.pstyle("line-height").pfValue, i = e.pstyle("text-wrap").strValue, s = Li(n.rscratch, "labelWrapCachedLines", t) || [], l = i !== "wrap" ? 1 : Math.max(s.length, 1), u = a.height / l, c = u * o, d = a.width, f = a.height + (l - 1) * (o - 1) * u; Cu(n.rstyle, "labelWidth", t, d), Cu(n.rscratch, "labelWidth", t, d), Cu(n.rstyle, "labelHeight", t, f), Cu(n.rscratch, "labelHeight", t, f), Cu(n.rscratch, "labelLineHeight", t, c); }; Vs.getLabelText = function(e, t) { var n = e._private, r = t ? t + "-" : "", a = e.pstyle(r + "label").strValue, o = e.pstyle("text-transform").value, i = function(ee, ue) { return ue ? (Cu(n.rscratch, ee, t, ue), ue) : Li(n.rscratch, ee, t); }; if (!a) return ""; o == "none" || (o == "uppercase" ? a = a.toUpperCase() : o == "lowercase" && (a = a.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 = a.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], y = this.calculateLabelDimensions(e, g), x = y.width; if (h) { var w = g.split("").join(u); g = w; } if (x > d) { var k = g.matchAll(v), C = "", S = 0, _ = KU(k), T; try { for (_.s(); !(T = _.n()).done; ) { var F = T.value, A = F[0], I = g.substring(S, F.index); S = F.index + A.length; var N = C.length === 0 ? I : C + I + A, L = this.calculateLabelDimensions(e, N), z = L.width; z <= d ? C += I + A : (C && p.push(C), C = I + A); } } catch (ee) { _.e(ee); } finally { _.f(); } C.match(/^[\s\u200b]+$/) || p.push(C); } else p.push(g); } i("labelWrapCachedLines", p), a = i("labelWrapCachedText", p.join(` `)), i("labelWrapKey", l); } else if (s === "ellipsis") { var P = e.pstyle("text-max-width").pfValue, D = "", M = "…", V = !1; if (this.calculateLabelDimensions(e, a).width < P) return a; for (var Q = 0; Q < a.length; Q++) { var X = this.calculateLabelDimensions(e, D + a[Q] + M).width; if (X > P) break; D += a[Q], Q === a.length - 1 && (V = !0); } return V || (D += M), D; } return a; }; Vs.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; }; Vs.calculateLabelDimensions = function(e, t) { var n = this, r = n.cy.window(), a = r.document, o = Bd(t, e._private.labelDimsKey), i = n.labelDimCache || (n.labelDimCache = []), s = i[o]; 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 = a.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, y = t.split(` `), x = 0; x < y.length; x++) { var w = y[x], k = p.measureText(w), C = Math.ceil(k.width), S = c; m = Math.max(C, m), g += S; } return m += l, g += l, i[o] = { width: m, height: g }; }; Vs.calculateLabelAngle = function(e, t) { var n = e._private, r = n.rscratch, a = e.isEdge(), o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = i.strValue; return s === "none" ? 0 : a && s === "autorotate" ? r.labelAutoAngle : s === "autorotate" ? 0 : i.pfValue; }; Vs.calculateLabelAngles = function(e) { var t = this, n = e.isEdge(), r = e._private, a = r.rscratch; a.labelAngle = t.calculateLabelAngle(e), n && (a.sourceLabelAngle = t.calculateLabelAngle(e, "source"), a.targetLabelAngle = t.calculateLabelAngle(e, "target")); }; var pW = {}, PP = 28, LP = !1; pW.getNodeShape = function(e) { var t = this, n = e.pstyle("shape").value; if (n === "cutrectangle" && (e.width() < PP || e.height() < PP)) return LP || (An("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), LP = !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 Tx = {}; Tx.registerCalculationListeners = function() { var e = this.cy, t = e.collection(), n = this, r = function(o) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; if (t.merge(o), i) for (var s = 0; s < o.length; s++) { var l = o[s], u = l._private, c = u.rstyle; c.clean = !1, c.cleanConnected = !1; } }; n.binder(e).on("bounds.* dirty.*", function(o) { var i = o.target; r(i); }).on("style.* background.*", function(o) { var i = o.target; r(i, !1); }); var a = function(o) { if (o) { 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(o, t); } n.recalculateRenderedStyle(t), t = e.collection(); } }; n.flushRenderedStyleQueue = function() { a(!0); }, n.beforeRender(a, n.beforeRenderPriorities.eleCalcs); }; Tx.onUpdateEleCalcs = function(e) { var t = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; t.push(e); }; Tx.recalculateRenderedStyle = function(e, t) { var n = function(x) { return x._private.rstyle.cleanConnected; }, r = [], a = []; if (!this.destroyed) { t === void 0 && (t = !0); for (var o = 0; o < e.length; o++) { var i = e[o], 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" ? a.push(i) : r.push(i), l.clean = !0); } for (var u = 0; u < a.length; u++) { var c = a[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, y = m.rscratch; g.srcX = y.arrowStartX, g.srcY = y.arrowStartY, g.tgtX = y.arrowEndX, g.tgtY = y.arrowEndY, g.midX = y.midX, g.midY = y.midY, g.labelAngle = y.labelAngle, g.sourceLabelAngle = y.sourceLabelAngle, g.targetLabelAngle = y.targetLabelAngle; } } }; var $x = {}; $x.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], a = r._private.rscratch; r.grabbed() && !r.isParent() ? t.push(r) : a.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); } } }; $x.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; $x.getCachedZSortedEles = function(e) { if (e || !this.cachedZSortedEles) { var t = this.cy.mutableElements().toArray(); t.sort(Xq), t.interactive = t.filter(function(n) { return n.interactive(); }), this.cachedZSortedEles = t, this.updateCachedGrabbedEles(); } else t = this.cachedZSortedEles; return t; }; var fW = {}; [vp, l2, ja, Im, H_, Vs, pW, Tx, $x].forEach(function(e) { It(fW, e); }); var hW = {}; hW.getCachedImage = function(e, t, n) { var r = this, a = r.imageCache = r.imageCache || {}, o = a[e]; if (o) return o.image.complete || o.image.addEventListener("load", n), o.image; o = a[e] = a[e] || {}; var i = o.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 Wh = {}; Wh.registerBinding = function(e, t, n, r) { var a = Array.prototype.slice.apply(arguments, [1]), o = this.binder(e); return o.on.apply(o, a); }; Wh.binder = function(e) { var t = this, n = t.cy.window(), r = e === n || e === n.document || e === n.document.body || VZe(e); if (t.supportsPassiveEvents == null) { var a = !1; try { var o = Object.defineProperty({}, "passive", { get: function() { return a = !0, !0; } }); n.addEventListener("test", null, o); } catch { } t.supportsPassiveEvents = a; } 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 }; }; Wh.nodeIsDraggable = function(e) { return e && e.isNode() && !e.locked() && e.grabbable(); }; Wh.nodeIsGrabbable = function(e) { return this.nodeIsDraggable(e) && e.interactive(); }; Wh.load = function() { var e = this, t = e.cy.window(), n = function(E) { return E.selected(); }, r = function(E, j, le, ce) { E == null && (E = e.cy); for (var oe = 0; oe < j.length; oe++) { var ke = j[oe]; E.emit({ originalEvent: le, type: ke, position: ce }); } }, a = function(E) { return E.shiftKey || E.metaKey || E.ctrlKey; }, o = function(E, j) { var le = !0; if (e.cy.hasCompoundNodes() && E && E.pannable()) for (var ce = 0; j && ce < j.length; ce++) { var E = j[ce]; if (E.isNode() && E.isParent() && !E.pannable()) { le = !1; break; } } else le = !0; return le; }, i = function(E) { E[0]._private.grabbed = !0; }, s = function(E) { E[0]._private.grabbed = !1; }, l = function(E) { E[0]._private.rscratch.inDragLayer = !0; }, u = function(E) { E[0]._private.rscratch.inDragLayer = !1; }, c = function(E) { E[0]._private.rscratch.isGrabTarget = !0; }, d = function(E) { E[0]._private.rscratch.isGrabTarget = !1; }, f = function(E, j) { var le = j.addToList, ce = le.has(E); !ce && E.grabbable() && !E.locked() && (le.merge(E), i(E)); }, h = function(E, j) { if (E.cy().hasCompoundNodes() && !(j.inDragLayer == null && j.addToList == null)) { var le = E.descendants(); j.inDragLayer && (le.forEach(l), le.connectedEdges().forEach(l)), j.addToList && f(le, j); } }, p = function(E, j) { j = j || {}; var le = E.cy().hasCompoundNodes(); j.inDragLayer && (E.forEach(l), E.neighborhood().stdFilter(function(ce) { return !le || ce.isEdge(); }).forEach(l)), j.addToList && E.forEach(function(ce) { f(ce, j); }), h(E, j), g(E, { inDragLayer: j.inDragLayer }), e.updateCachedGrabbedEles(); }, v = p, m = function(E) { E && (e.getCachedZSortedEles().forEach(function(j) { s(j), u(j), d(j); }), e.updateCachedGrabbedEles()); }, g = function(E, j) { if (!(j.inDragLayer == null && j.addToList == null) && E.cy().hasCompoundNodes()) { var le = E.ancestors().orphans(); if (!le.same(E)) { var ce = le.descendants().spawnSelf().merge(le).unmerge(E).unmerge(E.descendants()), oe = ce.connectedEdges(); j.inDragLayer && (oe.forEach(l), ce.forEach(l)), j.addToList && ce.forEach(function(ke) { f(ke, j); }); } } }, y = function() { document.activeElement != null && document.activeElement.blur != null && document.activeElement.blur(); }, x = typeof MutationObserver < "u", w = typeof ResizeObserver < "u"; x ? (e.removeObserver = new MutationObserver(function(E) { for (var j = 0; j < E.length; j++) { var le = E[j], ce = le.removedNodes; if (ce) for (var oe = 0; oe < ce.length; oe++) { var ke = ce[oe]; if (ke === e.container) { e.destroy(); break; } } } }), e.container.parentNode && e.removeObserver.observe(e.container.parentNode, { childList: !0 })) : e.registerBinding(e.container, "DOMNodeRemoved", function(E) { e.destroy(); }); var k = fx(function() { e.cy.resize(); }, 100); x && (e.styleObserver = new MutationObserver(k), e.styleObserver.observe(e.container, { attributes: !0 })), e.registerBinding(t, "resize", k), w && (e.resizeObserver = new ResizeObserver(k), e.resizeObserver.observe(e.container)); var C = function(E, j) { for (; E != null; ) j(E), E = E.parentNode; }, S = function() { e.invalidateContainerClientCoordsCache(); }; C(e.container, function(E) { e.registerBinding(E, "transitionend", S), e.registerBinding(E, "animationend", S), e.registerBinding(E, "scroll", S); }), e.registerBinding(e.container, "contextmenu", function(E) { E.preventDefault(); }); var _ = function() { return e.selection[4] !== 0; }, T = function(E) { for (var j = e.findContainerClientCoords(), le = j[0], ce = j[1], oe = j[2], ke = j[3], fe = E.touches ? E.touches : [E], Ee = !1, Ve = 0; Ve < fe.length; Ve++) { var je = fe[Ve]; if (le <= je.clientX && je.clientX <= le + oe && ce <= je.clientY && je.clientY <= ce + ke) { Ee = !0; break; } } if (!Ee) return !1; for (var me = e.container, Te = E.target, Ce = Te.parentNode, Le = !1; Ce; ) { if (Ce === me) { Le = !0; break; } Ce = Ce.parentNode; } return !!Le; }; e.registerBinding(e.container, "mousedown", function(E) { if (T(E) && !(e.hoverData.which === 1 && E.which !== 1)) { E.preventDefault(), y(), e.hoverData.capture = !0, e.hoverData.which = E.which; var j = e.cy, le = [E.clientX, E.clientY], ce = e.projectIntoViewport(le[0], le[1]), oe = e.selection, ke = e.findNearestElements(ce[0], ce[1], !0, !1), fe = ke[0], Ee = e.dragData.possibleDragElements; e.hoverData.mdownPos = ce, e.hoverData.mdownGPos = le; var Ve = function() { e.hoverData.tapholdCancelled = !1, clearTimeout(e.hoverData.tapholdTimeout), e.hoverData.tapholdTimeout = setTimeout(function() { if (!e.hoverData.tapholdCancelled) { var Le = e.hoverData.down; Le ? Le.emit({ originalEvent: E, type: "taphold", position: { x: ce[0], y: ce[1] } }) : j.emit({ originalEvent: E, type: "taphold", position: { x: ce[0], y: ce[1] } }); } }, e.tapholdDuration); }; if (E.which == 3) { e.hoverData.cxtStarted = !0; var je = { originalEvent: E, type: "cxttapstart", position: { x: ce[0], y: ce[1] } }; fe ? (fe.activate(), fe.emit(je), e.hoverData.down = fe) : j.emit(je), e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), e.hoverData.cxtDragged = !1; } else if (E.which == 1) { fe && fe.activate(); { if (fe != null && e.nodeIsGrabbable(fe)) { var me = function(Le) { return { originalEvent: E, type: Le, position: { x: ce[0], y: ce[1] } }; }, Te = function(Le) { Le.emit(me("grab")); }; if (c(fe), !fe.selected()) Ee = e.dragData.possibleDragElements = j.collection(), v(fe, { addToList: Ee }), fe.emit(me("grabon")).emit(me("grab")); else { Ee = e.dragData.possibleDragElements = j.collection(); var Ce = j.$(function(Le) { return Le.isNode() && Le.selected() && e.nodeIsGrabbable(Le); }); p(Ce, { addToList: Ee }), fe.emit(me("grabon")), Ce.forEach(Te); } e.redrawHint("eles", !0), e.redrawHint("drag", !0); } e.hoverData.down = fe, e.hoverData.downs = ke, e.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); } r(fe, ["mousedown", "tapstart", "vmousedown"], E, { x: ce[0], y: ce[1] }), fe == null ? (oe[4] = 1, e.data.bgActivePosistion = { x: ce[0], y: ce[1] }, e.redrawHint("select", !0), e.redraw()) : fe.pannable() && (oe[4] = 1), Ve(); } oe[0] = oe[2] = ce[0], oe[1] = oe[3] = ce[1]; } }, !1), e.registerBinding(t, "mousemove", function(E) { var j = e.hoverData.capture; if (!(!j && !T(E))) { var le = !1, ce = e.cy, oe = ce.zoom(), ke = [E.clientX, E.clientY], fe = e.projectIntoViewport(ke[0], ke[1]), Ee = e.hoverData.mdownPos, Ve = e.hoverData.mdownGPos, je = e.selection, me = null; !e.hoverData.draggingEles && !e.hoverData.dragging && !e.hoverData.selecting && (me = e.findNearestElement(fe[0], fe[1], !0, !1)); var Te = e.hoverData.last, Ce = e.hoverData.down, Le = [fe[0] - je[2], fe[1] - je[3]], bt = e.dragData.possibleDragElements, pt; if (Ve) { var Tt = ke[0] - Ve[0], wt = Tt * Tt, St = ke[1] - Ve[1], rn = St * St, Bt = wt + rn; e.hoverData.isOverThresholdDrag = pt = Bt >= e.desktopTapThreshold2; } var Gt = a(E); pt && (e.hoverData.tapholdCancelled = !0); var sn = function() { var _n = e.hoverData.dragDelta = e.hoverData.dragDelta || []; _n.length === 0 ? (_n.push(Le[0]), _n.push(Le[1])) : (_n[0] += Le[0], _n[1] += Le[1]); }; le = !0, r(me, ["mousemove", "vmousemove", "tapdrag"], E, { x: fe[0], y: fe[1] }); var an = function() { e.data.bgActivePosistion = void 0, e.hoverData.selecting || ce.emit({ originalEvent: E, type: "boxstart", position: { x: fe[0], y: fe[1] } }), je[4] = 1, e.hoverData.selecting = !0, e.redrawHint("select", !0), e.redraw(); }; if (e.hoverData.which === 3) { if (pt) { var Qt = { originalEvent: E, type: "cxtdrag", position: { x: fe[0], y: fe[1] } }; Ce ? Ce.emit(Qt) : ce.emit(Qt), e.hoverData.cxtDragged = !0, (!e.hoverData.cxtOver || me !== e.hoverData.cxtOver) && (e.hoverData.cxtOver && e.hoverData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: fe[0], y: fe[1] } }), e.hoverData.cxtOver = me, me && me.emit({ originalEvent: E, type: "cxtdragover", position: { x: fe[0], y: fe[1] } })); } } else if (e.hoverData.dragging) { if (le = !0, ce.panningEnabled() && ce.userPanningEnabled()) { var Sn; if (e.hoverData.justStartedPan) { var En = e.hoverData.mdownPos; Sn = { x: (fe[0] - En[0]) * oe, y: (fe[1] - En[1]) * oe }, e.hoverData.justStartedPan = !1; } else Sn = { x: Le[0] * oe, y: Le[1] * oe }; ce.panBy(Sn), ce.emit("dragpan"), e.hoverData.dragged = !0; } fe = e.projectIntoViewport(E.clientX, E.clientY); } else if (je[4] == 1 && (Ce == null || Ce.pannable())) { if (pt) { if (!e.hoverData.dragging && ce.boxSelectionEnabled() && (Gt || !ce.panningEnabled() || !ce.userPanningEnabled())) an(); else if (!e.hoverData.selecting && ce.panningEnabled() && ce.userPanningEnabled()) { var pn = o(Ce, e.hoverData.downs); pn && (e.hoverData.dragging = !0, e.hoverData.justStartedPan = !0, je[4] = 0, e.data.bgActivePosistion = tf(Ee), e.redrawHint("select", !0), e.redraw()); } Ce && Ce.pannable() && Ce.active() && Ce.unactivate(); } } else { if (Ce && Ce.pannable() && Ce.active() && Ce.unactivate(), (!Ce || !Ce.grabbed()) && me != Te && (Te && r(Te, ["mouseout", "tapdragout"], E, { x: fe[0], y: fe[1] }), me && r(me, ["mouseover", "tapdragover"], E, { x: fe[0], y: fe[1] }), e.hoverData.last = me), Ce) if (pt) { if (ce.boxSelectionEnabled() && Gt) Ce && Ce.grabbed() && (m(bt), Ce.emit("freeon"), bt.emit("free"), e.dragData.didDrag && (Ce.emit("dragfreeon"), bt.emit("dragfree"))), an(); else if (Ce && Ce.grabbed() && e.nodeIsDraggable(Ce)) { var Et = !e.dragData.didDrag; Et && e.redrawHint("eles", !0), e.dragData.didDrag = !0, e.hoverData.draggingEles || p(bt, { inDragLayer: !0 }); var Rt = { x: 0, y: 0 }; if (it(Le[0]) && it(Le[1]) && (Rt.x += Le[0], Rt.y += Le[1], Et)) { var qt = e.hoverData.dragDelta; qt && it(qt[0]) && it(qt[1]) && (Rt.x += qt[0], Rt.y += qt[1]); } e.hoverData.draggingEles = !0, bt.silentShift(Rt).emit("position drag"), e.redrawHint("drag", !0), e.redraw(); } } else sn(); le = !0; } if (je[2] = fe[0], je[3] = fe[1], le) return E.stopPropagation && E.stopPropagation(), E.preventDefault && E.preventDefault(), !1; } }, !1); var F, A, I; e.registerBinding(t, "mouseup", function(E) { if (!(e.hoverData.which === 1 && E.which !== 1 && e.hoverData.capture)) { var j = e.hoverData.capture; if (j) { e.hoverData.capture = !1; var le = e.cy, ce = e.projectIntoViewport(E.clientX, E.clientY), oe = e.selection, ke = e.findNearestElement(ce[0], ce[1], !0, !1), fe = e.dragData.possibleDragElements, Ee = e.hoverData.down, Ve = a(E); if (e.data.bgActivePosistion && (e.redrawHint("select", !0), e.redraw()), e.hoverData.tapholdCancelled = !0, e.data.bgActivePosistion = void 0, Ee && Ee.unactivate(), e.hoverData.which === 3) { var je = { originalEvent: E, type: "cxttapend", position: { x: ce[0], y: ce[1] } }; if (Ee ? Ee.emit(je) : le.emit(je), !e.hoverData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: ce[0], y: ce[1] } }; Ee ? Ee.emit(me) : le.emit(me); } e.hoverData.cxtDragged = !1, e.hoverData.which = null; } else if (e.hoverData.which === 1) { if (r(ke, ["mouseup", "tapend", "vmouseup"], E, { x: ce[0], y: ce[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(Ee, ["click", "tap", "vclick"], E, { x: ce[0], y: ce[1] }), A = !1, E.timeStamp - I <= le.multiClickDebounceTime() ? (F && clearTimeout(F), A = !0, I = null, r(Ee, ["dblclick", "dbltap", "vdblclick"], E, { x: ce[0], y: ce[1] })) : (F = setTimeout(function() { A || r(Ee, ["oneclick", "onetap", "voneclick"], E, { x: ce[0], y: ce[1] }); }, le.multiClickDebounceTime()), I = E.timeStamp)), Ee == null && !e.dragData.didDrag && !e.hoverData.selecting && !e.hoverData.dragged && !a(E) && (le.$(n).unselect(["tapunselect"]), fe.length > 0 && e.redrawHint("eles", !0), e.dragData.possibleDragElements = fe = le.collection()), ke == Ee && !e.dragData.didDrag && !e.hoverData.selecting && ke != null && ke._private.selectable && (e.hoverData.dragging || (le.selectionType() === "additive" || Ve ? ke.selected() ? ke.unselect(["tapunselect"]) : ke.select(["tapselect"]) : Ve || (le.$(n).unmerge(ke).unselect(["tapunselect"]), ke.select(["tapselect"]))), e.redrawHint("eles", !0)), e.hoverData.selecting) { var Te = le.collection(e.getAllInBox(oe[0], oe[1], oe[2], oe[3])); e.redrawHint("select", !0), Te.length > 0 && e.redrawHint("eles", !0), le.emit({ type: "boxend", originalEvent: E, position: { x: ce[0], y: ce[1] } }); var Ce = function(bt) { return bt.selectable() && !bt.selected(); }; le.selectionType() === "additive" || Ve || le.$(n).unmerge(Te).unselect(), Te.emit("box").stdFilter(Ce).select().emit("boxselect"), e.redraw(); } if (e.hoverData.dragging && (e.hoverData.dragging = !1, e.redrawHint("select", !0), e.redrawHint("eles", !0), e.redraw()), !oe[4]) { e.redrawHint("drag", !0), e.redrawHint("eles", !0); var Le = Ee && Ee.grabbed(); m(fe), Le && (Ee.emit("freeon"), fe.emit("free"), e.dragData.didDrag && (Ee.emit("dragfreeon"), fe.emit("dragfree"))); } } oe[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 N = function(E) { if (!e.scrollingPage) { var j = e.cy, le = j.zoom(), ce = j.pan(), oe = e.projectIntoViewport(E.clientX, E.clientY), ke = [oe[0] * le + ce.x, oe[1] * le + ce.y]; if (e.hoverData.draggingEles || e.hoverData.dragging || e.hoverData.cxtStarted || _()) { E.preventDefault(); return; } if (j.panningEnabled() && j.userPanningEnabled() && j.zoomingEnabled() && j.userZoomingEnabled()) { E.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 fe; E.deltaY != null ? fe = E.deltaY / -250 : E.wheelDeltaY != null ? fe = E.wheelDeltaY / 1e3 : fe = E.wheelDelta / 1e3, fe = fe * e.wheelSensitivity; var Ee = E.deltaMode === 1; Ee && (fe *= 33); var Ve = j.zoom() * Math.pow(10, fe); E.type === "gesturechange" && (Ve = e.gestureStartZoom * E.scale), j.zoom({ level: Ve, renderedPosition: { x: ke[0], y: ke[1] } }), j.emit(E.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); } } }; e.registerBinding(e.container, "wheel", N, !0), e.registerBinding(t, "scroll", function(E) { e.scrollingPage = !0, clearTimeout(e.scrollingPageTimeout), e.scrollingPageTimeout = setTimeout(function() { e.scrollingPage = !1; }, 250); }, !0), e.registerBinding(e.container, "gesturestart", function(E) { e.gestureStartZoom = e.cy.zoom(), e.hasTouchStarted || E.preventDefault(); }, !0), e.registerBinding(e.container, "gesturechange", function(E) { e.hasTouchStarted || N(E); }, !0), e.registerBinding(e.container, "mouseout", function(E) { var j = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseout", position: { x: j[0], y: j[1] } }); }, !1), e.registerBinding(e.container, "mouseover", function(E) { var j = e.projectIntoViewport(E.clientX, E.clientY); e.cy.emit({ originalEvent: E, type: "mouseover", position: { x: j[0], y: j[1] } }); }, !1); var L, z, P, D, M, V, Q, X, ee, ue, ve, ge, se, ne = function(E, j, le, ce) { return Math.sqrt((le - E) * (le - E) + (ce - j) * (ce - j)); }, W = function(E, j, le, ce) { return (le - E) * (le - E) + (ce - j) * (ce - j); }, Y; e.registerBinding(e.container, "touchstart", Y = function(E) { if (e.hasTouchStarted = !0, !!T(E)) { y(), e.touchData.capture = !0, e.data.bgActivePosistion = void 0; var j = e.cy, le = e.touchData.now, ce = e.touchData.earlier; if (E.touches[0]) { var oe = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); le[0] = oe[0], le[1] = oe[1]; } if (E.touches[1]) { var oe = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); le[2] = oe[0], le[3] = oe[1]; } if (E.touches[2]) { var oe = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); le[4] = oe[0], le[5] = oe[1]; } if (E.touches[1]) { e.touchData.singleTouchMoved = !0, m(e.dragData.touchDragEles); var ke = e.findContainerClientCoords(); ee = ke[0], ue = ke[1], ve = ke[2], ge = ke[3], L = E.touches[0].clientX - ee, z = E.touches[0].clientY - ue, P = E.touches[1].clientX - ee, D = E.touches[1].clientY - ue, se = 0 <= L && L <= ve && 0 <= P && P <= ve && 0 <= z && z <= ge && 0 <= D && D <= ge; var fe = j.pan(), Ee = j.zoom(); M = ne(L, z, P, D), V = W(L, z, P, D), Q = [(L + P) / 2, (z + D) / 2], X = [(Q[0] - fe.x) / Ee, (Q[1] - fe.y) / Ee]; var Ve = 200, je = Ve * Ve; if (V < je && !E.touches[2]) { var me = e.findNearestElement(le[0], le[1], !0, !0), Te = e.findNearestElement(le[2], le[3], !0, !0); me && me.isNode() ? (me.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[1] } }), e.touchData.start = me) : Te && Te.isNode() ? (Te.activate().emit({ originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[1] } }), e.touchData.start = Te) : j.emit({ originalEvent: E, type: "cxttapstart", position: { x: le[0], y: le[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 (E.touches[2]) j.boxSelectionEnabled() && E.preventDefault(); else if (!E.touches[1] && E.touches[0]) { var Ce = e.findNearestElements(le[0], le[1], !0, !0), Le = Ce[0]; if (Le != null && (Le.activate(), e.touchData.start = Le, e.touchData.starts = Ce, e.nodeIsGrabbable(Le))) { var bt = e.dragData.touchDragEles = j.collection(), pt = null; e.redrawHint("eles", !0), e.redrawHint("drag", !0), Le.selected() ? (pt = j.$(function(Bt) { return Bt.selected() && e.nodeIsGrabbable(Bt); }), p(pt, { addToList: bt })) : v(Le, { addToList: bt }), c(Le); var Tt = function(Bt) { return { originalEvent: E, type: Bt, position: { x: le[0], y: le[1] } }; }; Le.emit(Tt("grabon")), pt ? pt.forEach(function(Bt) { Bt.emit(Tt("grab")); }) : Le.emit(Tt("grab")); } r(Le, ["touchstart", "tapstart", "vmousedown"], E, { x: le[0], y: le[1] }), Le == null && (e.data.bgActivePosistion = { x: oe[0], y: oe[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"], E, { x: le[0], y: le[1] }); }, e.tapholdDuration); } if (E.touches.length >= 1) { for (var wt = e.touchData.startPosition = [null, null, null, null, null, null], St = 0; St < le.length; St++) wt[St] = ce[St] = le[St]; var rn = E.touches[0]; e.touchData.startGPosition = [rn.clientX, rn.clientY]; } } }, !1); var re; e.registerBinding(t, "touchmove", re = function(E) { var j = e.touchData.capture; if (!(!j && !T(E))) { var le = e.selection, ce = e.cy, oe = e.touchData.now, ke = e.touchData.earlier, fe = ce.zoom(); if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); oe[0] = Ee[0], oe[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); oe[2] = Ee[0], oe[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); oe[4] = Ee[0], oe[5] = Ee[1]; } var Ve = e.touchData.startGPosition, je; if (j && E.touches[0] && Ve) { for (var me = [], Te = 0; Te < oe.length; Te++) me[Te] = oe[Te] - ke[Te]; var Ce = E.touches[0].clientX - Ve[0], Le = Ce * Ce, bt = E.touches[0].clientY - Ve[1], pt = bt * bt, Tt = Le + pt; je = Tt >= e.touchTapThreshold2; } if (j && e.touchData.cxt) { E.preventDefault(); var wt = E.touches[0].clientX - ee, St = E.touches[0].clientY - ue, rn = E.touches[1].clientX - ee, Bt = E.touches[1].clientY - ue, Gt = W(wt, St, rn, Bt), sn = Gt / V, an = 150, Qt = an * an, Sn = 1.5, En = Sn * Sn; if (sn >= En || Gt >= Qt) { e.touchData.cxt = !1, e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var pn = { originalEvent: E, type: "cxttapend", position: { x: oe[0], y: oe[1] } }; e.touchData.start ? (e.touchData.start.unactivate().emit(pn), e.touchData.start = null) : ce.emit(pn); } } if (j && e.touchData.cxt) { var pn = { originalEvent: E, type: "cxtdrag", position: { x: oe[0], y: oe[1] } }; e.data.bgActivePosistion = void 0, e.redrawHint("select", !0), e.touchData.start ? e.touchData.start.emit(pn) : ce.emit(pn), e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxtDragged = !0; var Et = e.findNearestElement(oe[0], oe[1], !0, !0); (!e.touchData.cxtOver || Et !== e.touchData.cxtOver) && (e.touchData.cxtOver && e.touchData.cxtOver.emit({ originalEvent: E, type: "cxtdragout", position: { x: oe[0], y: oe[1] } }), e.touchData.cxtOver = Et, Et && Et.emit({ originalEvent: E, type: "cxtdragover", position: { x: oe[0], y: oe[1] } })); } else if (j && E.touches[2] && ce.boxSelectionEnabled()) E.preventDefault(), e.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), e.touchData.selecting || ce.emit({ originalEvent: E, type: "boxstart", position: { x: oe[0], y: oe[1] } }), e.touchData.selecting = !0, e.touchData.didSelect = !0, le[4] = 1, !le || le.length === 0 || le[0] === void 0 ? (le[0] = (oe[0] + oe[2] + oe[4]) / 3, le[1] = (oe[1] + oe[3] + oe[5]) / 3, le[2] = (oe[0] + oe[2] + oe[4]) / 3 + 1, le[3] = (oe[1] + oe[3] + oe[5]) / 3 + 1) : (le[2] = (oe[0] + oe[2] + oe[4]) / 3, le[3] = (oe[1] + oe[3] + oe[5]) / 3), e.redrawHint("select", !0), e.redraw(); else if (j && E.touches[1] && !e.touchData.didSelect && ce.zoomingEnabled() && ce.panningEnabled() && ce.userZoomingEnabled() && ce.userPanningEnabled()) { E.preventDefault(), e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Rt = e.dragData.touchDragEles; if (Rt) { e.redrawHint("drag", !0); for (var qt = 0; qt < Rt.length; qt++) { var _n = Rt[qt]._private; _n.grabbed = !1, _n.rscratch.inDragLayer = !1; } } var $r = e.touchData.start, wt = E.touches[0].clientX - ee, St = E.touches[0].clientY - ue, rn = E.touches[1].clientX - ee, Bt = E.touches[1].clientY - ue, R = ne(wt, St, rn, Bt), ie = R / M; if (se) { var Ie = wt - L, Ke = St - z, Jt = rn - P, fn = Bt - D, cn = (Ie + Jt) / 2, tn = (Ke + fn) / 2, Xt = ce.zoom(), Ur = Xt * ie, zo = ce.pan(), bc = X[0] * Xt + zo.x, wc = X[1] * Xt + zo.y, yp = { x: -Ur / Xt * (bc - zo.x - cn) + bc, y: -Ur / Xt * (wc - zo.y - tn) + wc }; if ($r && $r.active()) { var Rt = e.dragData.touchDragEles; m(Rt), e.redrawHint("drag", !0), e.redrawHint("eles", !0), $r.unactivate().emit("freeon"), Rt.emit("free"), e.dragData.didDrag && ($r.emit("dragfreeon"), Rt.emit("dragfree")); } ce.viewport({ zoom: Ur, pan: yp, cancelOnFailedZoom: !0 }), ce.emit("pinchzoom"), M = R, L = wt, z = St, P = rn, D = Bt, e.pinching = !0; } if (E.touches[0]) { var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); oe[0] = Ee[0], oe[1] = Ee[1]; } if (E.touches[1]) { var Ee = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); oe[2] = Ee[0], oe[3] = Ee[1]; } if (E.touches[2]) { var Ee = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); oe[4] = Ee[0], oe[5] = Ee[1]; } } else if (E.touches[0] && !e.touchData.didSelect) { var Yn = e.touchData.start, Hs = e.touchData.last, Et; if (!e.hoverData.draggingEles && !e.swipePanning && (Et = e.findNearestElement(oe[0], oe[1], !0, !0)), j && Yn != null && E.preventDefault(), j && Yn != null && e.nodeIsDraggable(Yn)) if (je) { var Rt = e.dragData.touchDragEles, xc = !e.dragData.didDrag; xc && p(Rt, { inDragLayer: !0 }), e.dragData.didDrag = !0; var So = { x: 0, y: 0 }; if (it(me[0]) && it(me[1]) && (So.x += me[0], So.y += me[1], xc)) { e.redrawHint("eles", !0); var Rn = e.touchData.dragDelta; Rn && it(Rn[0]) && it(Rn[1]) && (So.x += Rn[0], So.y += Rn[1]); } e.hoverData.draggingEles = !0, Rt.silentShift(So).emit("position drag"), e.redrawHint("drag", !0), e.touchData.startPosition[0] == ke[0] && e.touchData.startPosition[1] == ke[1] && e.redrawHint("eles", !0), e.redraw(); } else { var Rn = e.touchData.dragDelta = e.touchData.dragDelta || []; Rn.length === 0 ? (Rn.push(me[0]), Rn.push(me[1])) : (Rn[0] += me[0], Rn[1] += me[1]); } if (r(Yn || Et, ["touchmove", "tapdrag", "vmousemove"], E, { x: oe[0], y: oe[1] }), (!Yn || !Yn.grabbed()) && Et != Hs && (Hs && Hs.emit({ originalEvent: E, type: "tapdragout", position: { x: oe[0], y: oe[1] } }), Et && Et.emit({ originalEvent: E, type: "tapdragover", position: { x: oe[0], y: oe[1] } })), e.touchData.last = Et, j) for (var qt = 0; qt < oe.length; qt++) oe[qt] && e.touchData.startPosition[qt] && je && (e.touchData.singleTouchMoved = !0); if (j && (Yn == null || Yn.pannable()) && ce.panningEnabled() && ce.userPanningEnabled()) { var Xh = o(Yn, e.touchData.starts); Xh && (E.preventDefault(), e.data.bgActivePosistion || (e.data.bgActivePosistion = tf(e.touchData.startPosition)), e.swipePanning ? (ce.panBy({ x: me[0] * fe, y: me[1] * fe }), ce.emit("dragpan")) : je && (e.swipePanning = !0, ce.panBy({ x: Ce * fe, y: bt * fe }), ce.emit("dragpan"), Yn && (Yn.unactivate(), e.redrawHint("select", !0), e.touchData.start = null))); var Ee = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); oe[0] = Ee[0], oe[1] = Ee[1]; } } for (var Te = 0; Te < oe.length; Te++) ke[Te] = oe[Te]; j && E.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 we; e.registerBinding(t, "touchcancel", we = function(E) { var j = e.touchData.start; e.touchData.capture = !1, j && j.unactivate(); }); var Oe, Ne, xe, Fe; if (e.registerBinding(t, "touchend", Oe = function(E) { var j = e.touchData.start, le = e.touchData.capture; if (le) E.touches.length === 0 && (e.touchData.capture = !1), E.preventDefault(); else return; var ce = e.selection; e.swipePanning = !1, e.hoverData.draggingEles = !1; var oe = e.cy, ke = oe.zoom(), fe = e.touchData.now, Ee = e.touchData.earlier; if (E.touches[0]) { var Ve = e.projectIntoViewport(E.touches[0].clientX, E.touches[0].clientY); fe[0] = Ve[0], fe[1] = Ve[1]; } if (E.touches[1]) { var Ve = e.projectIntoViewport(E.touches[1].clientX, E.touches[1].clientY); fe[2] = Ve[0], fe[3] = Ve[1]; } if (E.touches[2]) { var Ve = e.projectIntoViewport(E.touches[2].clientX, E.touches[2].clientY); fe[4] = Ve[0], fe[5] = Ve[1]; } j && j.unactivate(); var je; if (e.touchData.cxt) { if (je = { originalEvent: E, type: "cxttapend", position: { x: fe[0], y: fe[1] } }, j ? j.emit(je) : oe.emit(je), !e.touchData.cxtDragged) { var me = { originalEvent: E, type: "cxttap", position: { x: fe[0], y: fe[1] } }; j ? j.emit(me) : oe.emit(me); } e.touchData.start && (e.touchData.start._private.grabbed = !1), e.touchData.cxt = !1, e.touchData.start = null, e.redraw(); return; } if (!E.touches[2] && oe.boxSelectionEnabled() && e.touchData.selecting) { e.touchData.selecting = !1; var Te = oe.collection(e.getAllInBox(ce[0], ce[1], ce[2], ce[3])); ce[0] = void 0, ce[1] = void 0, ce[2] = void 0, ce[3] = void 0, ce[4] = 0, e.redrawHint("select", !0), oe.emit({ type: "boxend", originalEvent: E, position: { x: fe[0], y: fe[1] } }); var Ce = function(an) { return an.selectable() && !an.selected(); }; Te.emit("box").stdFilter(Ce).select().emit("boxselect"), Te.nonempty() && e.redrawHint("eles", !0), e.redraw(); } if (j != null && j.unactivate(), E.touches[2]) e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); else if (!E.touches[1] && !E.touches[0] && !E.touches[0]) { e.data.bgActivePosistion = void 0, e.redrawHint("select", !0); var Le = e.dragData.touchDragEles; if (j != null) { var bt = j._private.grabbed; m(Le), e.redrawHint("drag", !0), e.redrawHint("eles", !0), bt && (j.emit("freeon"), Le.emit("free"), e.dragData.didDrag && (j.emit("dragfreeon"), Le.emit("dragfree"))), r(j, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }), j.unactivate(), e.touchData.start = null; } else { var pt = e.findNearestElement(fe[0], fe[1], !0, !0); r(pt, ["touchend", "tapend", "vmouseup", "tapdragout"], E, { x: fe[0], y: fe[1] }); } var Tt = e.touchData.startPosition[0] - fe[0], wt = Tt * Tt, St = e.touchData.startPosition[1] - fe[1], rn = St * St, Bt = wt + rn, Gt = Bt * ke * ke; e.touchData.singleTouchMoved || (j || oe.$(":selected").unselect(["tapunselect"]), r(j, ["tap", "vclick"], E, { x: fe[0], y: fe[1] }), Ne = !1, E.timeStamp - Fe <= oe.multiClickDebounceTime() ? (xe && clearTimeout(xe), Ne = !0, Fe = null, r(j, ["dbltap", "vdblclick"], E, { x: fe[0], y: fe[1] })) : (xe = setTimeout(function() { Ne || r(j, ["onetap", "voneclick"], E, { x: fe[0], y: fe[1] }); }, oe.multiClickDebounceTime()), Fe = E.timeStamp)), j != null && !e.dragData.didDrag && j._private.selectable && Gt < e.touchTapThreshold2 && !e.pinching && (oe.selectionType() === "single" ? (oe.$(n).unmerge(j).unselect(["tapunselect"]), j.select(["tapselect"])) : j.selected() ? j.unselect(["tapunselect"]) : j.select(["tapselect"]), e.redrawHint("eles", !0)), e.touchData.singleTouchMoved = !0; } for (var sn = 0; sn < fe.length; sn++) Ee[sn] = fe[sn]; e.dragData.didDrag = !1, E.touches.length === 0 && (e.touchData.dragDelta = [], e.touchData.startPosition = [null, null, null, null, null, null], e.touchData.startGPosition = null, e.touchData.didSelect = !1), E.touches.length < 2 && (E.touches.length === 1 && (e.touchData.startGPosition = [E.touches[0].clientX, E.touches[0].clientY]), e.pinching = !1, e.redrawHint("eles", !0), e.redraw()); }, !1), typeof TouchEvent > "u") { var Se = [], Pe = function(E) { return { clientX: E.clientX, clientY: E.clientY, force: 1, identifier: E.pointerId, pageX: E.pageX, pageY: E.pageY, radiusX: E.width / 2, radiusY: E.height / 2, screenX: E.screenX, screenY: E.screenY, target: E.target }; }, Me = function(E) { return { event: E, touch: Pe(E) }; }, He = function(E) { Se.push(Me(E)); }, De = function(E) { for (var j = 0; j < Se.length; j++) { var le = Se[j]; if (le.event.pointerId === E.pointerId) { Se.splice(j, 1); return; } } }, Xe = function(E) { var j = Se.filter(function(le) { return le.event.pointerId === E.pointerId; })[0]; j.event = E, j.touch = Pe(E); }, Ge = function(E) { E.touches = Se.map(function(j) { return j.touch; }); }, Ze = function(E) { return E.pointerType === "mouse" || E.pointerType === 4; }; e.registerBinding(e.container, "pointerdown", function(E) { Ze(E) || (E.preventDefault(), He(E), Ge(E), Y(E)); }), e.registerBinding(e.container, "pointerup", function(E) { Ze(E) || (De(E), Ge(E), Oe(E)); }), e.registerBinding(e.container, "pointercancel", function(E) { Ze(E) || (De(E), Ge(E), we(E)); }), e.registerBinding(e.container, "pointermove", function(E) { Ze(E) || (E.preventDefault(), Xe(E), Ge(E), re(E)); }); } }; var jl = {}; jl.generatePolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, draw: function(n, r, a, o, i, s) { this.renderer.nodeShapeImpl("polygon", n, r, a, o, i, this.points); }, intersectLine: function(n, r, a, o, i, s, l, u) { return vg(i, s, this.points, n, r, a / 2, o / 2, l); }, checkPoint: function(n, r, a, o, i, s, l, u) { return Tl(n, r, this.points, s, l, o, i, [0, -1], a); } }; }; jl.generateEllipse = function() { return this.nodeShapes.ellipse = { renderer: this, name: "ellipse", draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, i, s) { return LJe(a, o, e, t, n / 2 + i, r / 2 + i); }, checkPoint: function(e, t, n, r, a, o, i, s) { return Zc(e, t, r, a, o, i, n); } }; }; jl.generateRoundPolygon = function(e, t) { return this.nodeShapes[e] = { renderer: this, name: e, points: t, getOrCreateCorners: function(n, r, a, o, 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 = a / 2, c = o / 2; i = i === "auto" ? mq(a, o) : 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] = j_(p, v, m, i), p = v, v = m; return s[l]; }, draw: function(n, r, a, o, i, s, l) { this.renderer.nodeShapeImpl("round-polygon", n, r, a, o, i, this.points, this.getOrCreateCorners(r, a, o, i, s, l, "drawCorners")); }, intersectLine: function(n, r, a, o, i, s, l, u, c) { return NJe(i, s, this.points, n, r, a, o, l, this.getOrCreateCorners(n, r, a, o, u, c, "corners")); }, checkPoint: function(n, r, a, o, i, s, l, u, c) { return PJe(n, r, this.points, s, l, o, i, this.getOrCreateCorners(s, l, o, i, u, c, "corners")); } }; }; jl.generateRoundRectangle = function() { return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = { renderer: this, name: "round-rectangle", points: qa(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { return vq(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = r / 2, u = a / 2; s = s === "auto" ? zd(r, a) : s, s = Math.min(l, u, s); var c = s * 2; return !!(Tl(e, t, this.points, o, i, r, a - c, [0, -1], n) || Tl(e, t, this.points, o, i, r - c, a, [0, -1], n) || Zc(e, t, c, c, o - l + s, i - u + s, n) || Zc(e, t, c, c, o + l - s, i - u + s, n) || Zc(e, t, c, c, o + l - s, i + u - s, n) || Zc(e, t, c, c, o - l + s, i + u - s, n)); } }; }; jl.generateCutRectangle = function() { return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = { renderer: this, name: "cut-rectangle", cornerLength: F_(), points: qa(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, null, o); }, generateCutTrianglePts: function(e, t, n, r, a) { var o = a === "auto" ? this.cornerLength : a, i = t / 2, s = e / 2, l = n - s, u = n + s, c = r - i, d = r + i; return { topLeft: [l, c + o, l + o, c, l + o, c + o], topRight: [u - o, c, u, c + o, u - o, c + o], bottomRight: [u, d - o, u - o, d, u - o, d - o], bottomLeft: [l + o, d, l, d - o, l + o, d - o] }; }, intersectLine: function(e, t, n, r, a, o, 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 vg(a, o, u, e, t); }, checkPoint: function(e, t, n, r, a, o, i, s) { var l = s === "auto" ? this.cornerLength : s; if (Tl(e, t, this.points, o, i, r, a - 2 * l, [0, -1], n) || Tl(e, t, this.points, o, i, r - 2 * l, a, [0, -1], n)) return !0; var u = this.generateCutTrianglePts(r, a, o, i); return ro(e, t, u.topLeft) || ro(e, t, u.topRight) || ro(e, t, u.bottomRight) || ro(e, t, u.bottomLeft); } }; }; jl.generateBarrel = function() { return this.nodeShapes.barrel = { renderer: this, name: "barrel", points: qa(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a); }, intersectLine: function(e, t, n, r, a, o, 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 = pf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, l), m = pf({ x: p[0], y: p[1] }, { x: p[2], y: p[3] }, { x: p[4], y: p[5] }, u), g = pf({ 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 vg(a, o, h, e, t); }, generateBarrelBezierPts: function(e, t, n, r) { var a = t / 2, o = e / 2, i = n - o, s = n + o, l = r - a, u = r + a, c = y3(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, a, o, i, s) { var l = y3(r, a), u = l.heightOffset, c = l.widthOffset; if (Tl(e, t, this.points, o, i, r, a - 2 * u, [0, -1], n) || Tl(e, t, this.points, o, i, r - 2 * c, a, [0, -1], n)) return !0; for (var d = this.generateBarrelBezierPts(r, a, o, i), f = function(C, S, _) { var T = _[4], F = _[2], A = _[0], I = _[5], N = _[1], L = Math.min(T, A), z = Math.max(T, A), P = Math.min(I, N), D = Math.max(I, N); if (L <= C && C <= z && P <= S && S <= D) { var M = MJe(T, F, A), V = OJe(M[0], M[1], M[2], C), Q = V.filter(function(X) { return 0 <= X && X <= 1; }); if (Q.length > 0) return Q[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 y = m[5], x = m[3], w = m[1], k = Wr(y, x, w, g); if (m.isTop && k <= t || m.isBottom && t <= k) return !0; } } return !1; } }; }; jl.generateBottomRoundrectangle = function() { return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { renderer: this, name: "bottom-round-rectangle", points: qa(4, 0), draw: function(e, t, n, r, a, o) { this.renderer.nodeShapeImpl(this.name, e, t, n, r, a, this.points, o); }, intersectLine: function(e, t, n, r, a, o, i, s) { var l = e - (n / 2 + i), u = t - (r / 2 + i), c = u, d = e + (n / 2 + i), f = Iu(a, o, e, t, l, u, d, c, !1); return f.length > 0 ? f : vq(a, o, e, t, n, r, i, s); }, checkPoint: function(e, t, n, r, a, o, i, s) { s = s === "auto" ? zd(r, a) : s; var l = 2 * s; if (Tl(e, t, this.points, o, i, r, a - l, [0, -1], n) || Tl(e, t, this.points, o, i, r - l, a, [0, -1], n)) return !0; var u = r / 2 + 2 * n, c = a / 2 + 2 * n, d = [o - u, i - c, o - u, i, o + u, i, o + u, i - c]; return !!(ro(e, t, d) || Zc(e, t, l, l, o + r / 2 - s, i + a / 2 - s, n) || Zc(e, t, l, l, o - r / 2 + s, i + a / 2 - s, n)); } }; }; jl.registerNodeShapes = function() { var e = this.nodeShapes = {}, t = this; this.generateEllipse(), this.generatePolygon("triangle", qa(3, 0)), this.generateRoundPolygon("round-triangle", qa(3, 0)), this.generatePolygon("rectangle", qa(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", qa(5, 0)), this.generateRoundPolygon("round-pentagon", qa(5, 0)), this.generatePolygon("hexagon", qa(6, 0)), this.generateRoundPolygon("round-hexagon", qa(6, 0)), this.generatePolygon("heptagon", qa(7, 0)), this.generateRoundPolygon("round-heptagon", qa(7, 0)), this.generatePolygon("octagon", qa(8, 0)), this.generateRoundPolygon("round-octagon", qa(8, 0)); var r = new Array(20); { var a = m3(5, 0), o = m3(5, Math.PI / 5), i = 0.5 * (3 - Math.sqrt(5)); i *= 1.57; for (var s = 0; s < o.length / 2; s++) o[s * 2] *= i, o[s * 2 + 1] *= i; for (var s = 0; s < 20 / 4; s++) r[s * 4] = a[s * 2], r[s * 4 + 1] = a[s * 2 + 1], r[s * 4 + 2] = o[s * 2], r[s * 4 + 3] = o[s * 2 + 1]; } r = gq(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 Pm = {}; Pm.timeToRender = function() { return this.redrawTotalTime / this.redrawCount; }; Pm.redraw = function(e) { e = e || cq(); 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; }; Pm.beforeRender = function(e, t) { if (!this.destroyed) { t == null && fr("Priority is not optional for beforeRender"); var n = this.beforeRenderCallbacks; n.push({ fn: e, priority: t }), n.sort(function(r, a) { return a.priority - r.priority; }); } }; var NP = function(e, t, n) { for (var r = e.beforeRenderCallbacks, a = 0; a < r.length; a++) r[a].fn(t, n); }; Pm.startRenderLoop = function() { var e = this, t = e.cy; if (!e.renderLoopStarted) { e.renderLoopStarted = !0; var n = function r(a) { if (!e.destroyed) { if (!t.batching()) if (e.requestedFrame && !e.skipFrame) { NP(e, !0, a); var o = _l(); e.render(e.renderOptions); var i = e.lastDrawTime = _l(); e.averageRedrawTime === void 0 && (e.averageRedrawTime = i - o), e.redrawCount === void 0 && (e.redrawCount = 0), e.redrawCount++, e.redrawTotalTime === void 0 && (e.redrawTotalTime = 0); var s = i - o; e.redrawTotalTime += s, e.lastRedrawTime = s, e.averageRedrawTime = e.averageRedrawTime / 2 + s / 2, e.requestedFrame = !1; } else NP(e, !1, a); e.skipFrame = !1, e2(r); } }; e2(n); } }; var bat = function(e) { this.init(e); }, vW = bat, Kh = vW.prototype; Kh.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; Kh.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 a = r.document, o = a.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", l = a.getElementById(i) != null; if (n.className.indexOf(s) < 0 && (n.className = (n.className || "") + " " + s), !l) { var u = a.createElement("style"); u.id = i, u.textContent = "." + s + " { position: relative; }", o.insertBefore(u, o.children[0]); } var c = r.getComputedStyle(n), d = c.getPropertyValue("position"); d === "static" && An("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 = it(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(); }; Kh.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(); } }; Kh.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, a = r.target; (a.off || a.removeEventListener).apply(a, 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 { } }; Kh.isHeadless = function() { return !1; }; [V_, fW, hW, Wh, jl, Pm].forEach(function(e) { It(Kh, e); }); var yC = 1e3 / 60, gW = { setupDequeueing: function(e) { return function() { var t = this, n = this.renderer; if (!t.dequeueingSetup) { t.dequeueingSetup = !0; var r = fx(function() { n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw(); }, e.deqRedrawThreshold), a = function(i, s) { var l = _l(), u = n.averageRedrawTime, c = n.lastRedrawTime, d = [], f = n.cy.extent(), h = n.getPixelRatio(); for (i || n.flushRenderedStyleQueue(); ; ) { var p = _l(), v = p - l, m = p - s; if (c < yC) { var g = yC - (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 * yC) break; var y = e.deq(t, h, f); if (y.length > 0) for (var x = 0; x < y.length; x++) d.push(y[x]); else break; } d.length > 0 && (e.onDeqd(t, d), !i && e.shouldRedraw(t, d, h, f) && r()); }, o = e.priority || __; n.beforeRender(a, o(t)); } }; } }, wat = /* @__PURE__ */ function() { function e(t) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t2; x_(this, e), this.idsByKey = new hs(), this.keyForId = new hs(), this.cachesByLvl = new hs(), this.lvls = [], this.getKey = t, this.doesEleInvalidateKey = n; } return k_(e, [{ key: "getIdsFor", value: function(t) { t == null && fr("Can not get id list for null key"); var n = this.idsByKey, r = this.idsByKey.get(t); return r || (r = new Rh(), 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), a = this.getKey(t); this.deleteIdForKey(r, n), this.addIdForKey(a, n), this.keyForId.set(n, a); } }, { 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), a = this.getKey(t); return r !== a; } }, { key: "isInvalid", value: function(t) { return this.keyHasChangedFor(t) || this.doesEleInvalidateKey(t); } }, { key: "getCachesAt", value: function(t) { var n = this.cachesByLvl, r = this.lvls, a = n.get(t); return a || (a = new hs(), n.set(t, a), r.push(t)), a; } }, { key: "getCache", value: function(t, n) { return this.getCachesAt(n).get(t); } }, { key: "get", value: function(t, n) { var r = this.getKey(t), a = this.getCache(r, n); return a != null && this.updateKeyMappingFor(t), a; } }, { key: "getForCachedKey", value: function(t, n) { var r = this.keyForId.get(t.id()), a = this.getCache(r, n); return a; } }, { 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 a = this.getKey(t); this.setCache(a, 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 a = this.doesEleInvalidateKey(t); return a && this.invalidateKey(r), a || this.getNumberOfIdsForKey(r) === 0; } }]), e; }(), MP = 25, J1 = 50, Wy = -4, O3 = 3, xat = 7.99, kat = 8, Cat = 1024, Sat = 1024, Eat = 1024, _at = 0.2, Tat = 0.8, $at = 10, Oat = 0.15, Fat = 0.1, Aat = 0.9, Iat = 0.9, Pat = 100, Lat = 1, nf = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" }, Nat = xa({ getKey: null, doesEleInvalidateKey: t2, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: sq, allowEdgeTxrCaching: !0, allowParentTxrCaching: !0 }), Hv = function(e, t) { var n = this; n.renderer = e, n.onDequeues = []; var r = Nat(t); It(n, r), n.lookup = new wat(r.getKey, r.doesEleInvalidateKey), n.setupDequeueing(); }, Hr = Hv.prototype; Hr.reasons = nf; Hr.getTextureQueue = function(e) { var t = this; return t.eleImgCaches = t.eleImgCaches || {}, t.eleImgCaches[e] = t.eleImgCaches[e] || []; }; Hr.getRetiredTextureQueue = function(e) { var t = this, n = t.eleImgCaches.retired = t.eleImgCaches.retired || {}, r = n[e] = n[e] || []; return r; }; Hr.getElementQueue = function() { var e = this, t = e.eleCacheQueue = e.eleCacheQueue || new Om(function(n, r) { return r.reqs - n.reqs; }); return t; }; Hr.getElementKeyToQueue = function() { var e = this, t = e.eleKeyToCacheQueue = e.eleKeyToCacheQueue || {}; return t; }; Hr.getElement = function(e, t, n, r, a) { var o = 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() || !o.allowEdgeTxrCaching && e.isEdge() || !o.allowParentTxrCaching && e.isParent()) return null; if (r == null && (r = Math.ceil($_(s * n))), r < Wy) r = Wy; else if (s >= xat || r > O3) 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 <= MP ? p = MP : c <= J1 ? p = J1 : p = Math.ceil(c / J1) * J1, c > Eat || d > Sat) return null; var v = o.getTextureQueue(p), m = v[v.length - 2], g = function() { return o.recycleTexture(p, d) || o.addTexture(p, d); }; m || (m = v[v.length - 1]), m || (m = g()), m.width - m.usedWidth < d && (m = g()); for (var y = function(z) { return z && z.scaledLabelShown === f; }, x = a && a === nf.dequeue, w = a && a === nf.highQuality, k = a && a === nf.downscale, C, S = r + 1; S <= O3; S++) { var _ = l.get(e, S); if (_) { C = _; break; } } var T = C && C.level === r + 1 ? C : null, F = function() { m.context.drawImage(T.texture.canvas, T.x, 0, T.width, T.height, m.usedWidth, 0, d, c); }; if (m.context.setTransform(1, 0, 0, 1, 0, 0), m.context.clearRect(m.usedWidth, 0, d, p), y(T)) F(); else if (y(C)) if (w) { for (var A = C.level; A > r; A--) T = o.getElement(e, t, n, A, nf.downscale); F(); } else return o.queueElement(e, C.level - 1), C; else { var I; if (!x && !w && !k) for (var N = r - 1; N >= Wy; N--) { var L = l.get(e, N); if (L) { I = L; break; } } if (y(I)) return o.queueElement(e, r), I; 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 + kat), m.eleCaches.push(h), l.set(e, r, h), o.checkTextureFullness(m), h; }; Hr.invalidateElements = function(e) { for (var t = 0; t < e.length; t++) this.invalidateElement(e[t]); }; Hr.invalidateElement = function(e) { var t = this, n = t.lookup, r = [], a = n.isInvalid(e); if (a) { for (var o = Wy; o <= O3; o++) { var i = n.getForCachedKey(e, o); 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); } }; Hr.checkTextureUtility = function(e) { e.invalidatedWidth >= _at * e.width && this.retireTexture(e); }; Hr.checkTextureFullness = function(e) { var t = this, n = t.getTextureQueue(e.height); e.usedWidth / e.width > Tat && e.fullnessChecks >= $at ? nc(n, e) : e.fullnessChecks++; }; Hr.retireTexture = function(e) { var t = this, n = e.height, r = t.getTextureQueue(n), a = this.lookup; nc(r, e), e.retired = !0; for (var o = e.eleCaches, i = 0; i < o.length; i++) { var s = o[i]; a.deleteCache(s.key, s.level); } T_(o); var l = t.getRetiredTextureQueue(n); l.push(e); }; Hr.addTexture = function(e, t) { var n = this, r = n.getTextureQueue(e), a = {}; return r.push(a), a.eleCaches = [], a.height = e, a.width = Math.max(Cat, t), a.usedWidth = 0, a.invalidatedWidth = 0, a.fullnessChecks = 0, a.canvas = n.renderer.makeOffscreenCanvas(a.width, a.height), a.context = a.canvas.getContext("2d"), a; }; Hr.recycleTexture = function(e, t) { for (var n = this, r = n.getTextureQueue(e), a = n.getRetiredTextureQueue(e), o = 0; o < a.length; o++) { var i = a[o]; if (i.width >= t) return i.retired = !1, i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, T_(i.eleCaches), i.context.setTransform(1, 0, 0, 1, 0, 0), i.context.clearRect(0, 0, i.width, i.height), nc(a, i), r.push(i), i; } }; Hr.queueElement = function(e, t) { var n = this, r = n.getElementQueue(), a = n.getElementKeyToQueue(), o = this.getKey(e), i = a[o]; 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: o }; r.push(s), a[o] = s; } }; Hr.dequeue = function(e) { for (var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = [], o = t.lookup, i = 0; i < Lat && n.size() > 0; i++) { var s = n.pop(), l = s.key, u = s.eles[0], c = o.hasCache(u, s.level); if (r[l] = null, !c) { a.push(s); var d = t.getBoundingBox(u); t.getElement(u, d, e, s.level, nf.dequeue); } } return a; }; Hr.removeFromQueue = function(e) { var t = this, n = t.getElementQueue(), r = t.getElementKeyToQueue(), a = this.getKey(e), o = r[a]; o != null && (o.eles.length === 1 ? (o.reqs = E_, n.updateItem(o), n.pop(), r[a] = null) : o.eles.unmerge(e)); }; Hr.onDequeue = function(e) { this.onDequeues.push(e); }; Hr.offDequeue = function(e) { nc(this.onDequeues, e); }; Hr.setupDequeueing = gW.setupDequeueing({ deqRedrawThreshold: Pat, deqCost: Oat, deqAvgCost: Fat, deqNoDrawCost: Aat, deqFastCost: Iat, 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 a = 0; a < t.length; a++) for (var o = t[a].eles, i = 0; i < o.length; i++) { var s = o[i].boundingBox(); if (O_(s, r)) return !0; } return !1; }, priority: function(e) { return e.renderer.beforeRenderPriorities.eleTxrDeq; } }); var Mat = 1, p0 = -4, u2 = 2, Dat = 3.99, Bat = 50, Rat = 50, zat = 0.15, Vat = 0.1, jat = 0.9, Hat = 0.9, Uat = 1, DP = 250, qat = 4e3 * 4e3, Wat = !0, mW = function(e) { var t = this, n = t.renderer = e, r = n.cy; t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = _l() - 2 * DP, t.skipping = !1, t.eleTxrDeqs = r.collection(), t.scheduleElementRefinement = fx(function() { t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs); }, Rat), n.beforeRender(function(o, i) { i - t.lastInvalidationTime <= DP ? t.skipping = !0 : t.skipping = !1; }, n.beforeRenderPriorities.lyrTxrSkip); var a = function(o, i) { return i.reqs - o.reqs; }; t.layersQueue = new Om(a), t.setupDequeueing(); }, ka = mW.prototype, BP = 0, Kat = Math.pow(2, 53) - 1; ka.makeLayer = function(e, t) { var n = Math.pow(2, t), r = Math.ceil(e.w * n), a = Math.ceil(e.h * n), o = this.renderer.makeOffscreenCanvas(r, a), i = { id: BP = ++BP % Kat, bb: e, level: t, width: r, height: a, canvas: o, context: o.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; }; ka.getLayers = function(e, t, n) { var r = this, a = r.renderer, o = a.cy, i = o.zoom(), s = r.firstGet; if (r.firstGet = !1, n == null) { if (n = Math.ceil($_(i * t)), n < p0) n = p0; else if (i >= Dat || n > u2) 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 T = function(N) { if (r.validateLayersElesOrdering(N, e), r.levelIsComplete(N, e)) return h = l[N], !0; }, F = function(N) { if (!h) for (var L = n + N; p0 <= L && L <= u2 && !T(L); L += N) ; }; F(1), F(-1); for (var A = c.length - 1; A >= 0; A--) { var I = c[A]; I.invalid && nc(c, I); } }; if (!f) p(); else return c; var v = function() { if (!d) { d = Co(); for (var T = 0; T < e.length; T++) fq(d, e[T].boundingBox()); } return d; }, m = function(T) { T = T || {}; var F = T.after; v(); var A = d.w * u * (d.h * u); if (A > qat) return null; var I = r.makeLayer(d, n); if (F != null) { var N = c.indexOf(F) + 1; c.splice(N, 0, I); } else (T.insert === void 0 || T.insert) && c.unshift(I); return I; }; if (r.skipping && !s) return null; for (var g = null, y = e.length / Mat, x = !s, w = 0; w < e.length; w++) { var k = e[w], C = k._private.rscratch, S = C.imgLayerCaches = C.imgLayerCaches || {}, _ = S[n]; if (_) { g = _; continue; } if ((!g || g.eles.length >= y || !hq(g.bb, k.boundingBox())) && (g = m({ insert: !0, after: g }), !g)) return null; h || x ? r.queueLayer(g, k) : r.drawEleInLayer(g, k, n, t), g.eles.push(k), S[n] = g; } return h || (x ? null : c); }; ka.getEleLevelForLayerLevel = function(e, t) { return e; }; ka.drawEleInLayer = function(e, t, n, r) { var a = this, o = this.renderer, i = e.context, s = t.boundingBox(); s.w === 0 || s.h === 0 || !t.visible() || (n = a.getEleLevelForLayerLevel(n, r), o.setImgSmoothing(i, !1), o.drawCachedElement(i, t, null, null, n, Wat), o.setImgSmoothing(i, !0)); }; ka.levelIsComplete = function(e, t) { var n = this, r = n.layersByLevel[e]; if (!r || r.length === 0) return !1; for (var a = 0, o = 0; o < r.length; o++) { var i = r[o]; if (i.reqs > 0 || i.invalid) return !1; a += i.eles.length; } return a === t.length; }; ka.validateLayersElesOrdering = function(e, t) { var n = this.layersByLevel[e]; if (n) for (var r = 0; r < n.length; r++) { for (var a = n[r], o = -1, i = 0; i < t.length; i++) if (a.eles[0] === t[i]) { o = i; break; } if (o < 0) { this.invalidateLayer(a); continue; } for (var s = o, i = 0; i < a.eles.length; i++) if (a.eles[i] !== t[s + i]) { this.invalidateLayer(a); break; } } }; ka.updateElementsInLayers = function(e, t) { for (var n = this, r = Tm(e[0]), a = 0; a < e.length; a++) for (var o = r ? null : e[a], i = r ? e[a] : e[a].ele, s = i._private.rscratch, l = s.imgLayerCaches = s.imgLayerCaches || {}, u = p0; u <= u2; u++) { var c = l[u]; c && (o && n.getEleLevelForLayerLevel(c.level) !== o.level || t(c, i, o)); } }; ka.haveLayers = function() { for (var e = this, t = !1, n = p0; n <= u2; n++) { var r = e.layersByLevel[n]; if (r && r.length > 0) { t = !0; break; } } return t; }; ka.invalidateElements = function(e) { var t = this; e.length !== 0 && (t.lastInvalidationTime = _l(), !(e.length === 0 || !t.haveLayers()) && t.updateElementsInLayers(e, function(n, r, a) { t.invalidateLayer(n); })); }; ka.invalidateLayer = function(e) { if (this.lastInvalidationTime = _l(), !e.invalid) { var t = e.level, n = e.eles, r = this.layersByLevel[t]; nc(r, e), e.elesQueue = [], e.invalid = !0, e.replacement && (e.replacement.invalid = !0); for (var a = 0; a < n.length; a++) { var o = n[a]._private.rscratch.imgLayerCaches; o && (o[t] = null); } } }; ka.refineElementTextures = function(e) { var t = this; t.updateElementsInLayers(e, function(n, r, a) { var o = n.replacement; if (o || (o = n.replacement = t.makeLayer(n.bb, n.level), o.replaces = n, o.eles = n.eles), !o.reqs) for (var i = 0; i < o.eles.length; i++) t.queueLayer(o, o.eles[i]); }); }; ka.enqueueElementRefinement = function(e) { this.eleTxrDeqs.merge(e), this.scheduleElementRefinement(); }; ka.queueLayer = function(e, t) { var n = this, r = n.layersQueue, a = e.elesQueue, o = a.hasId = a.hasId || {}; if (!e.replacement) { if (t) { if (o[t.id()]) return; a.push(t), o[t.id()] = !0; } e.reqs ? (e.reqs++, r.updateItem(e)) : (e.reqs = 1, r.push(e)); } }; ka.dequeue = function(e) { for (var t = this, n = t.layersQueue, r = [], a = 0; a < Uat && n.size() !== 0; ) { var o = n.peek(); if (o.replacement) { n.pop(); continue; } if (o.replaces && o !== o.replaces.replacement) { n.pop(); continue; } if (o.invalid) { n.pop(); continue; } var i = o.elesQueue.shift(); i && (t.drawEleInLayer(o, i, o.level, e), a++), r.length === 0 && r.push(!0), o.elesQueue.length === 0 && (n.pop(), o.reqs = 0, o.replaces && t.applyLayerReplacement(o), t.requestRedraw()); } return r; }; ka.applyLayerReplacement = function(e) { var t = this, n = t.layersByLevel[e.level], r = e.replaces, a = n.indexOf(r); if (!(a < 0 || r.invalid)) { n[a] = e; for (var o = 0; o < e.eles.length; o++) { var i = e.eles[o]._private, s = i.imgLayerCaches = i.imgLayerCaches || {}; s && (s[e.level] = e); } t.requestRedraw(); } }; ka.requestRedraw = fx(function() { var e = this.renderer; e.redrawHint("eles", !0), e.redrawHint("drag", !0), e.redraw(); }, 100); ka.setupDequeueing = gW.setupDequeueing({ deqRedrawThreshold: Bat, deqCost: zat, deqAvgCost: Vat, deqNoDrawCost: jat, deqFastCost: Hat, deq: function(e, t) { return e.dequeue(t); }, onDeqd: __, shouldRedraw: sq, priority: function(e) { return e.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var yW = {}, RP; function Gat(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.lineTo(r.x, r.y); } } function Xat(e, t, n) { for (var r, a = 0; a < t.length; a++) { var o = t[a]; a === 0 && (r = o), e.lineTo(o.x, o.y); } e.quadraticCurveTo(n.x, n.y, r.x, r.y); } function zP(e, t, n) { e.beginPath && e.beginPath(); for (var r = t, a = 0; a < r.length; a++) { var o = r[a]; e.lineTo(o.x, o.y); } var i = n, s = n[0]; e.moveTo(s.x, s.y); for (var a = 1; a < i.length; a++) { var o = i[a]; e.lineTo(o.x, o.y); } e.closePath && e.closePath(); } function Yat(e, t, n, r, a) { e.beginPath && e.beginPath(), e.arc(n, r, a, 0, Math.PI * 2, !1); var o = t, i = o[0]; e.moveTo(i.x, i.y); for (var s = 0; s < o.length; s++) { var l = o[s]; e.lineTo(l.x, l.y); } e.closePath && e.closePath(); } function Zat(e, t, n, r) { e.arc(t, n, r, 0, Math.PI * 2, !1); } yW.arrowShapeImpl = function(e) { return (RP || (RP = { polygon: Gat, "triangle-backcurve": Xat, "triangle-tee": zP, "circle-triangle": Yat, "triangle-cross": zP, circle: Zat }))[e]; }; var js = {}; js.drawElement = function(e, t, n, r, a, o) { var i = this; t.isNode() ? i.drawNode(e, t, n, r, a, o) : i.drawEdge(e, t, n, r, a, o); }; js.drawElementOverlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeOverlay(e, t) : n.drawEdgeOverlay(e, t); }; js.drawElementUnderlay = function(e, t) { var n = this; t.isNode() ? n.drawNodeUnderlay(e, t) : n.drawEdgeUnderlay(e, t); }; js.drawCachedElementPortion = function(e, t, n, r, a, o, i, s) { var l = this, u = n.getBoundingBox(t); if (!(u.w === 0 || u.h === 0)) { var c = n.getElement(t, u, r, a, o); 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, y, x, w, k; if (f !== 0) { var C = n.getRotationPoint(t); x = C.x, w = C.y, e.translate(x, w), e.rotate(f), k = l.getImgSmoothing(e), k || l.setImgSmoothing(e, !0); var S = n.getRotationOffset(t); g = S.x, y = S.y; } else g = h, y = p; var _; d !== 1 && (_ = e.globalAlpha, e.globalAlpha = _ * d), e.drawImage(c.texture.canvas, c.x, 0, c.width, c.height, g, y, v, m), d !== 1 && (e.globalAlpha = _), f !== 0 && (e.rotate(-f), e.translate(-x, -w), k || l.setImgSmoothing(e, !1)); } else n.drawElement(e, t); } }; var Qat = function() { return 0; }, Jat = function(e, t) { return e.getTextAngle(t, null); }, eot = function(e, t) { return e.getTextAngle(t, "source"); }, tot = function(e, t) { return e.getTextAngle(t, "target"); }, not = function(e, t) { return t.effectiveOpacity(); }, bC = function(e, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; js.drawCachedElement = function(e, t, n, r, a, o) { var i = this, s = i.data, l = s.eleTxrCache, u = s.lblTxrCache, c = s.slbTxrCache, d = s.tlbTxrCache, f = t.boundingBox(), h = o === !0 ? l.reasons.highQuality : null; if (!(f.w === 0 || f.h === 0 || !t.visible()) && (!r || O_(f, r))) { var p = t.isEdge(), v = t.element()._private.rscratch.badLine; i.drawElementUnderlay(e, t), i.drawCachedElementPortion(e, t, l, n, a, h, Qat, not), (!p || !v) && i.drawCachedElementPortion(e, t, u, n, a, h, Jat, bC), p && !v && (i.drawCachedElementPortion(e, t, c, n, a, h, eot, bC), i.drawCachedElementPortion(e, t, d, n, a, h, tot, bC)), i.drawElementOverlay(e, t); } }; js.drawElements = function(e, t) { for (var n = this, r = 0; r < t.length; r++) { var a = t[r]; n.drawElement(e, a); } }; js.drawCachedElements = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; a.drawCachedElement(e, i, n, r); } }; js.drawCachedNodes = function(e, t, n, r) { for (var a = this, o = 0; o < t.length; o++) { var i = t[o]; i.isNode() && a.drawCachedElement(e, i, n, r); } }; js.drawLayeredElements = function(e, t, n, r) { var a = this, o = a.data.lyrTxrCache.getLayers(t, n); if (o) for (var i = 0; i < o.length; i++) { var s = o[i], l = s.bb; l.w === 0 || l.h === 0 || e.drawImage(s.canvas, l.x1, l.y1, l.w, l.h); } else a.drawCachedElements(e, t, n, r); }; var Hl = {}; Hl.drawEdge = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s = t._private.rscratch; if (!(o && !t.visible()) && !(s.badLine || s.allpts == null || isNaN(s.allpts[0]))) { var l; n && (l = n, e.translate(-l.x1, -l.y1)); var u = o ? t.pstyle("opacity").value : 1, c = o ? 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, y = u * c, x = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; d === "straight-triangle" ? (i.eleStrokeStyle(e, t, L), i.drawEdgeTrianglePath(t, e, s.allpts)) : (e.lineWidth = h, e.lineCap = p, i.eleStrokeStyle(e, t, L), i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, w = function() { var L = 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], L); else { e.lineCap = "butt"; return; } d === "straight-triangle" ? i.drawEdgeTrianglePath(t, e, s.allpts) : (i.drawEdgePath(t, e, s.allpts, f), e.lineCap = "butt"); }, k = function() { a && i.drawEdgeOverlay(e, t); }, C = function() { a && i.drawEdgeUnderlay(e, t); }, S = function() { var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : y; i.drawArrowheads(e, t, L); }, _ = function() { i.drawElementText(e, t, null, r); }; e.lineJoin = "round"; var T = t.pstyle("ghost").value === "yes"; if (T) { var F = t.pstyle("ghost-offset-x").pfValue, A = t.pstyle("ghost-offset-y").pfValue, I = t.pstyle("ghost-opacity").value, N = g * I; e.translate(F, A), x(N), S(N), e.translate(-F, -A); } else w(); C(), x(), S(), k(), _(), n && e.translate(l.x1, l.y1); } }; var bW = 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 a = this, o = a.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" && !o ? t.lineCap = "butt" : t.lineCap = "round", a.colorStrokeStyle(t, u[0], u[1], u[2], r), a.drawEdgePath(n, t, i.allpts, "solid"); } } }; }; Hl.drawEdgeOverlay = bW("overlay"); Hl.drawEdgeUnderlay = bW("underlay"); Hl.drawEdgePath = function(e, t, n, r) { var a = e._private.rscratch, o = 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 = a.pathCacheKey && a.pathCacheKey === d; f ? (i = t = a.pathCache, s = !0) : (i = t = new Path2D(), a.pathCacheKey = d, a.pathCache = i); } if (o.setLineDash) switch (r) { case "dotted": o.setLineDash([1, 1]); break; case "dashed": o.setLineDash(u), o.lineDashOffset = c; break; case "solid": o.setLineDash([]); break; } if (!s && !a.badLine) switch (t.beginPath && t.beginPath(), t.moveTo(n[0], n[1]), a.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 (a.isRound) { var v = KU(a.roundCorners), m; try { for (v.s(); !(m = v.n()).done; ) { var g = m.value; lW(t, g); } } catch (x) { v.e(x); } finally { v.f(); } t.lineTo(n[n.length - 2], n[n.length - 1]); } else for (var y = 2; y + 1 < n.length; y += 2) t.lineTo(n[y], n[y + 1]); break; } t = o, l ? t.stroke(i) : t.stroke(), t.setLineDash && t.setLineDash([]); }; Hl.drawEdgeTrianglePath = function(e, t, n) { t.fillStyle = t.strokeStyle; for (var r = e.pstyle("width").pfValue, a = 0; a + 1 < n.length; a += 2) { var o = [n[a + 2] - n[a], n[a + 3] - n[a + 1]], i = Math.sqrt(o[0] * o[0] + o[1] * o[1]), s = [o[1] / i, -o[0] / i], l = [s[0] * r / 2, s[1] * r / 2]; t.beginPath(), t.moveTo(n[a] - l[0], n[a + 1] - l[1]), t.lineTo(n[a] + l[0], n[a + 1] + l[1]), t.lineTo(n[a + 2], n[a + 3]), t.closePath(), t.fill(); } }; Hl.drawArrowheads = function(e, t, n) { var r = t._private.rscratch, a = r.edgeType === "haystack"; a || 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), a || this.drawArrowhead(e, t, "target", r.arrowEndX, r.arrowEndY, r.tgtArrowAngle, n); }; Hl.drawArrowhead = function(e, t, n, r, a, o, i) { if (!(isNaN(r) || r == null || isNaN(a) || a == null || isNaN(o) || o == 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, a, o), 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, a, o); } } }; Hl.drawArrowShape = function(e, t, n, r, a, o, i, s, l) { var u = this, c = this.usePaths() && a !== "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[a]; if (c) { var y = u.arrowPathCache = u.arrowPathCache || [], x = Bd(a), w = y[x]; w != null ? (f = t = w, d = !0) : (f = t = new Path2D(), y[x] = 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 = o / (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 U_ = {}; U_.safeDrawImage = function(e, t, n, r, a, o, i, s, l, u) { if (!(a <= 0 || o <= 0 || l <= 0 || u <= 0)) try { e.drawImage(t, n, r, a, o, i, s, l, u); } catch (c) { An(c); } }; U_.drawInscribedImage = function(e, t, n, r, a) { var o = 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), y = n._private.rscratch, x = c(n, "background-clip", "value", r), w = x === "node", k = c(n, "background-image-opacity", "value", r) * a, C = 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, T = t.height || t.cachedH; (_ == null || T == null) && (document.body.appendChild(t), _ = t.cachedW = t.width || t.offsetWidth, T = t.cachedH = t.height || t.offsetHeight, document.body.removeChild(t)); var F = _, A = T; 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) === "%" ? A = c(n, "background-height", "pfValue", r) * g : A = c(n, "background-height", "pfValue", r)), !(F === 0 || A === 0)) { if (d === "contain") { var I = Math.min(m / F, g / A); F *= I, A *= I; } else if (d === "cover") { var I = Math.max(m / F, g / A); F *= I, A *= I; } var N = s - m / 2, L = c(n, "background-position-x", "units", r), z = c(n, "background-position-x", "pfValue", r); L === "%" ? N += (m - F) * z : N += z; var P = c(n, "background-offset-x", "units", r), D = c(n, "background-offset-x", "pfValue", r); P === "%" ? N += (m - F) * D : N += D; var M = l - g / 2, V = c(n, "background-position-y", "units", r), Q = c(n, "background-position-y", "pfValue", r); V === "%" ? M += (g - A) * Q : M += Q; var X = c(n, "background-offset-y", "units", r), ee = c(n, "background-offset-y", "pfValue", r); X === "%" ? M += (g - A) * ee : M += ee, y.pathCache && (N -= s, M -= l, s = 0, l = 0); var ue = e.globalAlpha; e.globalAlpha = k; var ve = o.getImgSmoothing(e), ge = !1; if (C === "no" && ve ? (o.setImgSmoothing(e, !1), ge = !0) : C === "yes" && !ve && (o.setImgSmoothing(e, !0), ge = !0), f === "no-repeat") w && (e.save(), y.pathCache ? e.clip(y.pathCache) : (o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.clip())), o.safeDrawImage(e, t, 0, 0, _, T, N, M, F, A), w && e.restore(); else { var se = e.createPattern(t, f); e.fillStyle = se, o.nodeShapes[o.getNodeShape(n)].draw(e, s, l, m, g, S, y), e.translate(N, M), e.fill(), e.translate(-N, -M); } e.globalAlpha = ue, ge && o.setImgSmoothing(e, ve); } }; var gp = {}; gp.eleTextBiggerThanMin = function(e, t) { if (!t) { var n = e.cy().zoom(), r = this.getPixelRatio(), a = Math.ceil($_(n * r)); t = Math.pow(2, a); } var o = e.pstyle("font-size").pfValue * t, i = e.pstyle("min-zoomed-font-size").pfValue; return !(o < i); }; gp.drawElementText = function(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this; if (r == null) { if (o && !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)), a == null ? (i.drawText(e, t, null, h, o), t.isEdge() && (i.drawText(e, t, "source", h, o), i.drawText(e, t, "target", h, o))) : i.drawText(e, t, a, h, o), n && e.translate(p.x1, p.y1); }; gp.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; }; gp.setupTextStyle = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = t.pstyle("font-style").strValue, a = t.pstyle("font-size").pfValue + "px", o = 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 + " " + a + " " + o, e.lineJoin = "round", this.colorFillStyle(e, u[0], u[1], u[2], s), this.colorStrokeStyle(e, c[0], c[1], c[2], l); }; function wC(e, t, n, r, a) { var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5, i = arguments.length > 6 ? arguments[6] : void 0; e.beginPath(), e.moveTo(t + o, n), e.lineTo(t + r - o, n), e.quadraticCurveTo(t + r, n, t + r, n + o), e.lineTo(t + r, n + a - o), e.quadraticCurveTo(t + r, n + a, t + r - o, n + a), e.lineTo(t + o, n + a), e.quadraticCurveTo(t, n + a, t, n + a - o), e.lineTo(t, n + o), e.quadraticCurveTo(t, n, t + o, n), e.closePath(), i ? e.stroke() : e.fill(); } gp.getTextAngle = function(e, t) { var n, r = e._private, a = r.rscratch, o = t ? t + "-" : "", i = e.pstyle(o + "text-rotation"), s = Li(a, "labelAngle", t); return i.strValue === "autorotate" ? n = e.isEdge() ? s : 0 : i.strValue === "none" ? n = 0 : n = i.pfValue, n; }; gp.drawText = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = t._private, i = o.rscratch, s = a ? t.effectiveOpacity() : 1; if (!(a && (s === 0 || t.pstyle("text-opacity").value === 0))) { n === "main" && (n = null); var l = Li(i, "labelX", n), u = Li(i, "labelY", n), c, d, f = this.getLabelText(t, n); if (f != null && f !== "" && !isNaN(l) && !isNaN(u)) { this.setupTextStyle(e, t, a); var h = n ? n + "-" : "", p = Li(i, "labelWidth", n), v = Li(i, "labelHeight", n), m = t.pstyle(h + "text-margin-x").pfValue, g = t.pstyle(h + "text-margin-y").pfValue, y = t.isEdge(), x = t.pstyle("text-halign").value, w = t.pstyle("text-valign").value; y && (x = "center", w = "center"), l += m, u += g; var k; switch (r ? k = this.getTextAngle(t, n) : k = 0, k !== 0 && (c = l, d = u, e.translate(c, d), e.rotate(k), l = 0, u = 0), w) { case "top": break; case "center": u += v / 2; break; case "bottom": u += v; break; } var C = t.pstyle("text-background-opacity").value, S = t.pstyle("text-border-opacity").value, _ = t.pstyle("text-border-width").pfValue, T = t.pstyle("text-background-padding").pfValue, F = t.pstyle("text-background-shape").strValue, A = F.indexOf("round") === 0, I = 2; if (C > 0 || _ > 0 && S > 0) { var N = l - T; switch (x) { case "left": N -= p; break; case "center": N -= p / 2; break; } var L = u - v - T, z = p + 2 * T, P = v + 2 * T; if (C > 0) { var D = e.fillStyle, M = t.pstyle("text-background-color").value; e.fillStyle = "rgba(" + M[0] + "," + M[1] + "," + M[2] + "," + C * s + ")", A ? wC(e, N, L, z, P, I) : e.fillRect(N, L, z, P), e.fillStyle = D; } if (_ > 0 && S > 0) { var V = e.strokeStyle, Q = e.lineWidth, X = t.pstyle("text-border-color").value, ee = t.pstyle("text-border-style").value; if (e.strokeStyle = "rgba(" + X[0] + "," + X[1] + "," + X[2] + "," + S * s + ")", e.lineWidth = _, e.setLineDash) switch (ee) { 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 (A ? wC(e, N, L, z, P, I, "stroke") : e.strokeRect(N, L, z, P), ee === "double") { var ue = _ / 2; A ? wC(e, N + ue, L + ue, z - ue * 2, P - ue * 2, I, "stroke") : e.strokeRect(N + ue, L + ue, z - ue * 2, P - ue * 2); } e.setLineDash && e.setLineDash([]), e.lineWidth = Q, e.strokeStyle = V; } } var ve = 2 * t.pstyle("text-outline-width").pfValue; if (ve > 0 && (e.lineWidth = ve), t.pstyle("text-wrap").value === "wrap") { var ge = Li(i, "labelWrapCachedLines", n), se = Li(i, "labelLineHeight", n), ne = p / 2, W = this.getLabelJustification(t); switch (W === "auto" || (x === "left" ? W === "left" ? l += -p : W === "center" && (l += -ne) : x === "center" ? W === "left" ? l += -ne : W === "right" && (l += ne) : x === "right" && (W === "center" ? l += ne : W === "right" && (l += p))), w) { case "top": u -= (ge.length - 1) * se; break; case "center": case "bottom": u -= (ge.length - 1) * se; break; } for (var Y = 0; Y < ge.length; Y++) ve > 0 && e.strokeText(ge[Y], l, u), e.fillText(ge[Y], l, u), u += se; } else ve > 0 && e.strokeText(f, l, u), e.fillText(f, l, u); k !== 0 && (e.rotate(-k), e.translate(-c, -d)); } } }; var Gh = {}; Gh.drawNode = function(e, t, n) { var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, i = this, s, l, u = t._private, c = u.rscratch, d = t.position(); if (!(!it(d.x) || !it(d.y)) && !(o && !t.visible())) { var f = o ? 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 y = t.pstyle("background-image"), x = y.value, w = new Array(x.length), k = new Array(x.length), C = 0, S = 0; S < x.length; S++) { var _ = x[S], T = w[S] = _ != null && _ !== "none"; if (T) { var F = t.cy().style().getIndexedStyle(t, "background-image-crossorigin", "value", S); C++, k[S] = i.getCachedImage(_, F, function() { u.backgroundTimestamp = Date.now(), t.emitAndNotify("background"); }); } } var A = t.pstyle("background-blacken").value, I = t.pstyle("border-width").pfValue, N = t.pstyle("background-opacity").value * f, L = t.pstyle("border-color").value, z = t.pstyle("border-style").value, P = t.pstyle("border-join").value, D = t.pstyle("border-cap").value, M = t.pstyle("border-position").value, V = t.pstyle("border-dash-pattern").pfValue, Q = t.pstyle("border-dash-offset").pfValue, X = t.pstyle("border-opacity").value * f, ee = t.pstyle("outline-width").pfValue, ue = t.pstyle("outline-color").value, ve = t.pstyle("outline-style").value, ge = t.pstyle("outline-opacity").value * f, se = t.pstyle("outline-offset").value, ne = t.pstyle("corner-radius").value; ne !== "auto" && (ne = t.pstyle("corner-radius").pfValue); var W = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : N; i.eleFillStyle(e, t, ke); }, Y = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : X; i.colorStrokeStyle(e, L[0], L[1], L[2], ke); }, re = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ge; i.colorStrokeStyle(e, ue[0], ue[1], ue[2], ke); }, we = function(ke, fe, Ee, Ve) { var je = i.nodePathCache = i.nodePathCache || [], me = iq(Ee === "polygon" ? Ee + "," + Ve.join(",") : Ee, "" + fe, "" + ke, "" + ne), Te = je[me], Ce, Le = !1; return Te != null ? (Ce = Te, Le = !0, c.pathCache = Ce) : (Ce = new Path2D(), je[me] = c.pathCache = Ce), { path: Ce, cacheHit: Le }; }, Oe = t.pstyle("shape").strValue, Ne = t.pstyle("shape-polygon-points").pfValue; if (h) { e.translate(d.x, d.y); var xe = we(s, l, Oe, Ne); p = xe.path, v = xe.cacheHit; } var Fe = function() { if (!v) { var ke = d; h && (ke = { x: 0, y: 0 }), i.nodeShapes[i.getNodeShape(t)].draw(p || e, ke.x, ke.y, s, l, ne, c); } h ? e.fill(p) : e.fill(); }, Se = function() { for (var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, Ee = u.backgrounding, Ve = 0, je = 0; je < k.length; je++) { var me = t.cy().style().getIndexedStyle(t, "background-image-containment", "value", je); if (fe && me === "over" || !fe && me === "inside") { Ve++; continue; } w[je] && k[je].complete && !k[je].error && (Ve++, i.drawInscribedImage(e, k[je], t, je, ke)); } u.backgrounding = Ve !== C, Ee !== u.backgrounding && t.updateStyle(!1); }, Pe = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f; i.hasPie(t) && (i.drawPie(e, t, fe), ke && (h || i.nodeShapes[i.getNodeShape(t)].draw(e, d.x, d.y, s, l, ne, c))); }, Me = function() { var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : f, fe = (A > 0 ? A : -A) * ke, Ee = A > 0 ? 0 : 255; A !== 0 && (i.colorFillStyle(e, Ee, Ee, Ee, fe), h ? e.fill(p) : e.fill()); }, He = function() { if (I > 0) { if (e.lineWidth = I, e.lineCap = D, e.lineJoin = P, e.setLineDash) switch (z) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash(V), e.lineDashOffset = Q; break; case "solid": case "double": e.setLineDash([]); break; } if (M !== "center") { if (e.save(), e.lineWidth *= 2, M === "inside") h ? e.clip(p) : e.clip(); else { var ke = new Path2D(); ke.rect(-s / 2 - I, -l / 2 - I, s + 2 * I, l + 2 * I), ke.addPath(p), e.clip(ke, "evenodd"); } h ? e.stroke(p) : e.stroke(), e.restore(); } else h ? e.stroke(p) : e.stroke(); if (z === "double") { e.lineWidth = I / 3; var fe = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(p) : e.stroke(), e.globalCompositeOperation = fe; } e.setLineDash && e.setLineDash([]); } }, De = function() { if (ee > 0) { if (e.lineWidth = ee, e.lineCap = "butt", e.setLineDash) switch (ve) { case "dotted": e.setLineDash([1, 1]); break; case "dashed": e.setLineDash([4, 2]); break; case "solid": case "double": e.setLineDash([]); break; } var ke = d; h && (ke = { x: 0, y: 0 }); var fe = i.getNodeShape(t), Ee = I; M === "inside" && (Ee = 0), M === "outside" && (Ee *= 2); var Ve = (s + Ee + (ee + se)) / s, je = (l + Ee + (ee + se)) / l, me = s * Ve, Te = l * je, Ce = i.nodeShapes[fe].points, Le; if (h) { var bt = we(me, Te, fe, Ce); Le = bt.path; } if (fe === "ellipse") i.drawEllipsePath(Le || e, ke.x, ke.y, me, Te); else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(fe)) { var pt = 0, Tt = 0, wt = 0; fe === "round-diamond" ? pt = (Ee + se + ee) * 1.4 : fe === "round-heptagon" ? (pt = (Ee + se + ee) * 1.075, wt = -(Ee / 2 + se + ee) / 35) : fe === "round-hexagon" ? pt = (Ee + se + ee) * 1.12 : fe === "round-pentagon" ? (pt = (Ee + se + ee) * 1.13, wt = -(Ee / 2 + se + ee) / 15) : fe === "round-tag" ? (pt = (Ee + se + ee) * 1.12, Tt = (Ee / 2 + ee + se) * 0.07) : fe === "round-triangle" && (pt = (Ee + se + ee) * (Math.PI / 2), wt = -(Ee + se / 2 + ee) / Math.PI), pt !== 0 && (Ve = (s + pt) / s, me = s * Ve, ["round-hexagon", "round-tag"].includes(fe) || (je = (l + pt) / l, Te = l * je)), ne = ne === "auto" ? mq(me, Te) : ne; for (var St = me / 2, rn = Te / 2, Bt = ne + (Ee + ee + se) / 2, Gt = new Array(Ce.length / 2), sn = new Array(Ce.length / 2), an = 0; an < Ce.length / 2; an++) Gt[an] = { x: ke.x + Tt + St * Ce[an * 2], y: ke.y + wt + rn * Ce[an * 2 + 1] }; var Qt, Sn, En, pn, Et = Gt.length; for (Sn = Gt[Et - 1], Qt = 0; Qt < Et; Qt++) En = Gt[Qt % Et], pn = Gt[(Qt + 1) % Et], sn[Qt] = j_(Sn, En, pn, Bt), Sn = En, En = pn; i.drawRoundPolygonPath(Le || e, ke.x + Tt, ke.y + wt, s * Ve, l * je, Ce, sn); } else if (["roundrectangle", "round-rectangle"].includes(fe)) ne = ne === "auto" ? zd(me, Te) : ne, i.drawRoundRectanglePath(Le || e, ke.x, ke.y, me, Te, ne + (Ee + ee + se) / 2); else if (["cutrectangle", "cut-rectangle"].includes(fe)) ne = ne === "auto" ? F_() : ne, i.drawCutRectanglePath(Le || e, ke.x, ke.y, me, Te, null, ne + (Ee + ee + se) / 4); else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(fe)) ne = ne === "auto" ? zd(me, Te) : ne, i.drawBottomRoundRectanglePath(Le || e, ke.x, ke.y, me, Te, ne + (Ee + ee + se) / 2); else if (fe === "barrel") i.drawBarrelPath(Le || e, ke.x, ke.y, me, Te); else if (fe.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(fe)) { var Rt = (Ee + ee + se) / s; Ce = n2(r2(Ce, Rt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } else { var qt = (Ee + ee + se) / s; Ce = n2(r2(Ce, -qt)), i.drawPolygonPath(Le || e, ke.x, ke.y, s, l, Ce); } if (h ? e.stroke(Le) : e.stroke(), ve === "double") { e.lineWidth = Ee / 3; var _n = e.globalCompositeOperation; e.globalCompositeOperation = "destination-out", h ? e.stroke(Le) : e.stroke(), e.globalCompositeOperation = _n; } e.setLineDash && e.setLineDash([]); } }, Xe = function() { a && i.drawNodeOverlay(e, t, d, s, l); }, Ge = function() { a && i.drawNodeUnderlay(e, t, d, s, l); }, Ze = function() { i.drawElementText(e, t, null, r); }, E = t.pstyle("ghost").value === "yes"; if (E) { var j = t.pstyle("ghost-offset-x").pfValue, le = t.pstyle("ghost-offset-y").pfValue, ce = t.pstyle("ghost-opacity").value, oe = ce * f; e.translate(j, le), re(), De(), W(ce * N), Fe(), Se(oe, !0), Y(ce * X), He(), Pe(A !== 0 || I !== 0), Se(oe, !1), Me(oe), e.translate(-j, -le); } h && e.translate(-d.x, -d.y), Ge(), h && e.translate(d.x, d.y), re(), De(), W(), Fe(), Se(f, !0), Y(), He(), Pe(A !== 0 || I !== 0), Se(f, !1), Me(), h && e.translate(-d.x, -d.y), Ze(), Xe(), n && e.translate(g.x1, g.y1); } }; var wW = function(e) { if (!["overlay", "underlay"].includes(e)) throw new Error("Invalid state"); return function(t, n, r, a, o) { 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(), a == null || o == null) { var f = n.padding(); a = n.width() + 2 * f, o = n.height() + 2 * f; } i.colorFillStyle(t, u[0], u[1], u[2], l), i.nodeShapes[c].draw(t, r.x, r.y, a + s * 2, o + s * 2, d), t.fill(); } } }; }; Gh.drawNodeOverlay = wW("overlay"); Gh.drawNodeUnderlay = wW("underlay"); Gh.hasPie = function(e) { return e = e[0], e._private.hasPie; }; Gh.drawPie = function(e, t, n, r) { t = t[0], r = r || t.position(); var a = t.cy().style(), o = 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), o.units === "%" ? c = c * o.pfValue : o.pfValue !== void 0 && (c = o.pfValue / 2); for (var h = 1; h <= a.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 y = 1.5 * Math.PI + 2 * Math.PI * d, x = 2 * Math.PI * g, w = y + x; p === 0 || d >= 1 || d + g > 1 || (e.beginPath(), e.moveTo(i, s), e.arc(i, s, c, y, w), e.closePath(), this.colorFillStyle(e, v[0], v[1], v[2], m), e.fill(), d += g); } }; var Ro = {}, rot = 100; Ro.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; }; Ro.paintCache = function(e) { for (var t = this.paintCaches = this.paintCaches || [], n = !0, r, a = 0; a < t.length; a++) if (r = t[a], r.context === e) { n = !1; break; } return n && (r = { context: e }, t.push(r)), r; }; Ro.createGradientStyleFor = function(e, t, n, r, a) { var o, 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 = Rd(u, d), h = Rd(c, d); o = 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(); o = e.createRadialGradient(p.x, p.y, 0, p.x, p.y, Math.max(v, m)); } else if (n.isEdge()) { var g = n.sourceEndpoint(), y = n.targetEndpoint(); o = e.createLinearGradient(g.x, g.y, y.x, y.y); } else { var x = i ? { x: 0, y: 0 } : n.position(), w = n.paddedWidth(), k = n.paddedHeight(), C = w / 2, S = k / 2, _ = n.pstyle("background-gradient-direction").value; switch (_) { case "to-bottom": o = e.createLinearGradient(x.x, x.y - S, x.x, x.y + S); break; case "to-top": o = e.createLinearGradient(x.x, x.y + S, x.x, x.y - S); break; case "to-left": o = e.createLinearGradient(x.x + C, x.y, x.x - C, x.y); break; case "to-right": o = e.createLinearGradient(x.x - C, x.y, x.x + C, x.y); break; case "to-bottom-right": case "to-right-bottom": o = e.createLinearGradient(x.x - C, x.y - S, x.x + C, x.y + S); break; case "to-top-right": case "to-right-top": o = e.createLinearGradient(x.x - C, x.y + S, x.x + C, x.y - S); break; case "to-bottom-left": case "to-left-bottom": o = e.createLinearGradient(x.x + C, x.y - S, x.x - C, x.y + S); break; case "to-top-left": case "to-left-top": o = e.createLinearGradient(x.x + C, x.y + S, x.x - C, x.y - S); break; } } if (!o) return null; for (var T = l.length === s.length, F = s.length, A = 0; A < F; A++) o.addColorStop(T ? l[A] : A / (F - 1), "rgba(" + s[A][0] + "," + s[A][1] + "," + s[A][2] + "," + a + ")"); return o; }; Ro.gradientFillStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "background", t, n, r); if (!a) return null; e.fillStyle = a; }; Ro.colorFillStyle = function(e, t, n, r, a) { e.fillStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Ro.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 a = t.pstyle("background-color").value; this.colorFillStyle(e, a[0], a[1], a[2], n); } }; Ro.gradientStrokeStyle = function(e, t, n, r) { var a = this.createGradientStyleFor(e, "line", t, n, r); if (!a) return null; e.strokeStyle = a; }; Ro.colorStrokeStyle = function(e, t, n, r, a) { e.strokeStyle = "rgba(" + t + "," + n + "," + r + "," + a + ")"; }; Ro.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 a = t.pstyle("line-color").value; this.colorStrokeStyle(e, a[0], a[1], a[2], n); } }; Ro.matchCanvasSize = function(e) { var t = this, n = t.data, r = t.findContainerClientCoords(), a = r[2], o = 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 = a * i, u = o * i, c; if (!(l === t.canvasWidth && u === t.canvasHeight)) { t.fontCaches = null; var d = n.canvasContainer; d.style.width = a + "px", d.style.height = o + "px"; for (var f = 0; f < t.CANVAS_LAYERS; f++) c = n.canvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "px"; for (var f = 0; f < t.BUFFER_COUNT; f++) c = n.bufferCanvases[f], c.width = l, c.height = u, c.style.width = a + "px", c.style.height = o + "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; } }; Ro.renderTo = function(e, t, n, r) { this.render({ forcedContext: e, forcedZoom: t, forcedPan: n, drawAllLayers: !0, forcedPxRatio: r }); }; Ro.render = function(e) { e = e || cq(); var t = e.forcedContext, n = e.drawAllLayers, r = e.drawOnlyNodeLayer, a = e.forcedZoom, o = 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 y = l.style(), x = l.zoom(), w = a !== void 0 ? a : x, k = l.pan(), C = { x: k.x, y: k.y }, S = { zoom: x, pan: { x: k.x, y: k.y } }, _ = i.prevViewport, T = _ === void 0 || S.zoom !== _.zoom || S.pan.x !== _.pan.x || S.pan.y !== _.pan.y; !T && !(v && !p) && (i.motionBlurPxRatio = 1), o && (C = o), w *= s, C.x *= s, C.y *= s; var F = i.getCachedZSortedEles(); function A(xe, Fe, Se, Pe, Me) { var He = xe.globalCompositeOperation; xe.globalCompositeOperation = "destination-out", i.colorFillStyle(xe, 255, 255, 255, i.motionBlurTransparency), xe.fillRect(Fe, Se, Pe, Me), xe.globalCompositeOperation = He; } function I(xe, Fe) { var Se, Pe, Me, He; !i.clearingMotionBlur && (xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] || xe === u.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]) ? (Se = { x: k.x * h, y: k.y * h }, Pe = x * h, Me = i.canvasWidth * h, He = i.canvasHeight * h) : (Se = C, Pe = w, Me = i.canvasWidth, He = i.canvasHeight), xe.setTransform(1, 0, 0, 1, 0, 0), Fe === "motionBlur" ? A(xe, 0, 0, Me, He) : !t && (Fe === void 0 || Fe) && xe.clearRect(0, 0, Me, He), n || (xe.translate(Se.x, Se.y), xe.scale(Pe, Pe)), o && xe.translate(o.x, o.y), a && xe.scale(a, a); } 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 N = i.data.bufferContexts[i.TEXTURE_BUFFER]; N.setTransform(1, 0, 0, 1, 0, 0), N.clearRect(0, 0, i.canvasWidth * i.textureMult, i.canvasHeight * i.textureMult), i.render({ forcedContext: N, 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 L = u.contexts[i.NODE], z = i.textureCache.texture, S = i.textureCache.viewport; L.setTransform(1, 0, 0, 1, 0, 0), f ? A(L, 0, 0, S.width, S.height) : L.clearRect(0, 0, S.width, S.height); var P = y.core("outside-texture-bg-color").value, D = y.core("outside-texture-bg-opacity").value; i.colorFillStyle(L, P[0], P[1], P[2], D), L.fillRect(0, 0, S.width, S.height); var x = l.zoom(); I(L, !1), L.clearRect(S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s), L.drawImage(z, S.mpan.x, S.mpan.y, S.width / S.zoom / s, S.height / S.zoom / s); } else i.textureOnViewport && !t && (i.textureCache = null); var M = l.extent(), V = i.pinching || i.hoverData.dragging || i.swipePanning || i.data.wheelZooming || i.hoverData.draggingEles || i.cy.animated(), Q = i.hideEdgesOnViewport && V, X = []; if (X[i.NODE] = !c[i.NODE] && f && !i.clearedForMotionBlur[i.NODE] || i.clearingMotionBlur, X[i.NODE] && (i.clearedForMotionBlur[i.NODE] = !0), X[i.DRAG] = !c[i.DRAG] && f && !i.clearedForMotionBlur[i.DRAG] || i.clearingMotionBlur, X[i.DRAG] && (i.clearedForMotionBlur[i.DRAG] = !0), c[i.NODE] || n || r || X[i.NODE]) { var ee = f && !X[i.NODE] && h !== 1, L = t || (ee ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE] : u.contexts[i.NODE]), ue = f && !ee ? "motionBlur" : void 0; I(L, ue), Q ? i.drawCachedNodes(L, F.nondrag, s, M) : i.drawLayeredElements(L, F.nondrag, s, M), i.debug && i.drawDebugPoints(L, F.nondrag), !n && !f && (c[i.NODE] = !1); } if (!r && (c[i.DRAG] || n || X[i.DRAG])) { var ee = f && !X[i.DRAG] && h !== 1, L = t || (ee ? i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG] : u.contexts[i.DRAG]); I(L, f && !ee ? "motionBlur" : void 0), Q ? i.drawCachedNodes(L, F.drag, s, M) : i.drawCachedElements(L, F.drag, s, M), i.debug && i.drawDebugPoints(L, F.drag), !n && !f && (c[i.DRAG] = !1); } if (i.showFps || !r && c[i.SELECT_BOX] && !n) { var L = t || u.contexts[i.SELECT_BOX]; if (I(L), i.selection[4] == 1 && (i.hoverData.selecting || i.touchData.selecting)) { var x = i.cy.zoom(), ve = y.core("selection-box-border-width").value / x; L.lineWidth = ve, L.fillStyle = "rgba(" + y.core("selection-box-color").value[0] + "," + y.core("selection-box-color").value[1] + "," + y.core("selection-box-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.fillRect(i.selection[0], i.selection[1], i.selection[2] - i.selection[0], i.selection[3] - i.selection[1]), ve > 0 && (L.strokeStyle = "rgba(" + y.core("selection-box-border-color").value[0] + "," + y.core("selection-box-border-color").value[1] + "," + y.core("selection-box-border-color").value[2] + "," + y.core("selection-box-opacity").value + ")", L.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 x = i.cy.zoom(), ge = u.bgActivePosistion; L.fillStyle = "rgba(" + y.core("active-bg-color").value[0] + "," + y.core("active-bg-color").value[1] + "," + y.core("active-bg-color").value[2] + "," + y.core("active-bg-opacity").value + ")", L.beginPath(), L.arc(ge.x, ge.y, y.core("active-bg-size").pfValue / x, 0, 2 * Math.PI), L.fill(); } var se = i.lastRedrawTime; if (i.showFps && se) { se = Math.round(se); var ne = Math.round(1e3 / se); L.setTransform(1, 0, 0, 1, 0, 0), L.fillStyle = "rgba(255, 0, 0, 0.75)", L.strokeStyle = "rgba(255, 0, 0, 0.75)", L.lineWidth = 1, L.fillText("1 frame = " + se + " ms = " + ne + " fps", 0, 20); var W = 60; L.strokeRect(0, 30, 250, 20), L.fillRect(0, 30, 250 * Math.min(ne / W, 1), 20); } n || (c[i.SELECT_BOX] = !1); } if (f && h !== 1) { var Y = u.contexts[i.NODE], re = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE], we = u.contexts[i.DRAG], Oe = i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG], Ne = function(xe, Fe, Se) { xe.setTransform(1, 0, 0, 1, 0, 0), Se || !g ? xe.clearRect(0, 0, i.canvasWidth, i.canvasHeight) : A(xe, 0, 0, i.canvasWidth, i.canvasHeight); var Pe = h; xe.drawImage( Fe, // img 0, 0, // sx, sy i.canvasWidth * Pe, i.canvasHeight * Pe, // sw, sh 0, 0, // x, y i.canvasWidth, i.canvasHeight // w, h ); }; (c[i.NODE] || X[i.NODE]) && (Ne(Y, re, X[i.NODE]), c[i.NODE] = !1), (c[i.DRAG] || X[i.DRAG]) && (Ne(we, Oe, X[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(); }, rot)), t || l.emit("render"); }; var yc = {}; yc.drawPolygonPath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2; e.beginPath && e.beginPath(), e.moveTo(t + i * o[0], n + s * o[1]); for (var l = 1; l < o.length / 2; l++) e.lineTo(t + i * o[l * 2], n + s * o[l * 2 + 1]); e.closePath(); }; yc.drawRoundPolygonPath = function(e, t, n, r, a, o, i) { i.forEach(function(s) { return lW(e, s); }), e.closePath(); }; yc.drawRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? zd(r, a) : Math.min(o, 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(); }; yc.drawBottomRoundRectanglePath = function(e, t, n, r, a, o) { var i = r / 2, s = a / 2, l = o === "auto" ? zd(r, a) : o; 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(); }; yc.drawCutRectanglePath = function(e, t, n, r, a, o, i) { var s = r / 2, l = a / 2, u = i === "auto" ? F_() : 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(); }; yc.drawBarrelPath = function(e, t, n, r, a) { var o = r / 2, i = a / 2, s = t - o, l = t + o, u = n - i, c = n + i, d = y3(r, a), 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 VP = Math.sin(0), jP = Math.cos(0), F3 = {}, A3 = {}, xW = Math.PI / 40; for (var Vp = 0 * Math.PI; Vp < 2 * Math.PI; Vp += xW) F3[Vp] = Math.sin(Vp), A3[Vp] = Math.cos(Vp); yc.drawEllipsePath = function(e, t, n, r, a) { if (e.beginPath && e.beginPath(), e.ellipse) e.ellipse(t, n, r / 2, a / 2, 0, 0, 2 * Math.PI); else for (var o, i, s = r / 2, l = a / 2, u = 0 * Math.PI; u < 2 * Math.PI; u += xW) o = t - s * F3[u] * VP + s * A3[u] * jP, i = n + l * A3[u] * VP + l * F3[u] * jP, u === 0 ? e.moveTo(o, i) : e.lineTo(o, i); e.closePath(); }; var Lm = {}; Lm.createBuffer = function(e, t) { var n = document.createElement("canvas"); return n.width = e, n.height = t, [n, n.getContext("2d")]; }; Lm.bufferCanvasImage = function(e) { var t = this.cy, n = t.mutableElements(), r = n.boundingBox(), a = this.findContainerClientCoords(), o = e.full ? Math.ceil(r.w) : a[2], i = e.full ? Math.ceil(r.h) : a[3], s = it(e.maxWidth) || it(e.maxHeight), l = this.getPixelRatio(), u = 1; if (e.scale !== void 0) o *= e.scale, i *= e.scale, u = e.scale; else if (s) { var c = 1 / 0, d = 1 / 0; it(e.maxWidth) && (c = u * e.maxWidth / o), it(e.maxHeight) && (d = u * e.maxHeight / i), u = Math.min(c, d), o *= u, i *= u; } s || (o *= l, i *= l, u *= l); var f = document.createElement("canvas"); f.width = o, f.height = i, f.style.width = o + "px", f.style.height = i + "px"; var h = f.getContext("2d"); if (o > 0 && i > 0) { h.clearRect(0, 0, o, 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, o, i), h.fill()); } return f; }; function aot(e, t) { for (var n = atob(e), r = new ArrayBuffer(n.length), a = new Uint8Array(r), o = 0; o < n.length; o++) a[o] = n.charCodeAt(o); return new Blob([r], { type: t }); } function HP(e) { var t = e.indexOf(","); return e.substr(t + 1); } function kW(e, t, n) { var r = function() { return t.toDataURL(n, e.quality); }; switch (e.output) { case "blob-promise": return new zh(function(a, o) { try { t.toBlob(function(i) { i != null ? a(i) : o(new Error("`canvas.toBlob()` sent a null value in its callback")); }, n, e.quality); } catch (i) { o(i); } }); case "blob": return aot(HP(r()), n); case "base64": return HP(r()); case "base64uri": default: return r(); } } Lm.png = function(e) { return kW(e, this.bufferCanvasImage(e), "image/png"); }; Lm.jpg = function(e) { return kW(e, this.bufferCanvasImage(e), "image/jpeg"); }; var CW = {}; CW.nodeShapeImpl = function(e, t, n, r, a, o, i, s) { switch (e) { case "ellipse": return this.drawEllipsePath(t, n, r, a, o); case "polygon": return this.drawPolygonPath(t, n, r, a, o, i); case "round-polygon": return this.drawRoundPolygonPath(t, n, r, a, o, i, s); case "roundrectangle": case "round-rectangle": return this.drawRoundRectanglePath(t, n, r, a, o, s); case "cutrectangle": case "cut-rectangle": return this.drawCutRectanglePath(t, n, r, a, o, i, s); case "bottomroundrectangle": case "bottom-round-rectangle": return this.drawBottomRoundRectanglePath(t, n, r, a, o, s); case "barrel": return this.drawBarrelPath(t, n, r, a, o); } }; var oot = SW, wn = SW.prototype; wn.CANVAS_LAYERS = 3; wn.SELECT_BOX = 0; wn.DRAG = 1; wn.NODE = 2; wn.BUFFER_COUNT = 3; wn.TEXTURE_BUFFER = 0; wn.MOTIONBLUR_BUFFER_NODE = 1; wn.MOTIONBLUR_BUFFER_DRAG = 2; function SW(e) { var t = this, n = t.cy.window(), r = n.document; t.data = { canvases: new Array(wn.CANVAS_LAYERS), contexts: new Array(wn.CANVAS_LAYERS), canvasNeedsRedraw: new Array(wn.CANVAS_LAYERS), bufferCanvases: new Array(wn.BUFFER_COUNT), bufferContexts: new Array(wn.CANVAS_LAYERS) }; var a = "-webkit-tap-highlight-color", o = "rgba(0,0,0,0)"; t.data.canvasContainer = r.createElement("div"); var i = t.data.canvasContainer.style; t.data.canvasContainer.style[a] = o, i.position = "relative", i.zIndex = "0", i.overflow = "hidden"; var s = e.cy.container(); s.appendChild(t.data.canvasContainer), s.style[a] = o; 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" }; UZe() && (l["-ms-touch-action"] = "none", l["touch-action"] = "none"); for (var u = 0; u < wn.CANVAS_LAYERS; u++) { var c = t.data.canvases[u] = r.createElement("canvas"); t.data.contexts[u] = c.getContext("2d"), Object.keys(l).forEach(function(W) { c.style[W] = l[W]; }), c.style.position = "absolute", c.setAttribute("data-id", "layer" + u), c.style.zIndex = String(wn.CANVAS_LAYERS - u), t.data.canvasContainer.appendChild(c), t.data.canvasNeedsRedraw[u] = !1; } t.data.topCanvas = t.data.canvases[0], t.data.canvases[wn.NODE].setAttribute("data-id", "layer" + wn.NODE + "-node"), t.data.canvases[wn.SELECT_BOX].setAttribute("data-id", "layer" + wn.SELECT_BOX + "-selectbox"), t.data.canvases[wn.DRAG].setAttribute("data-id", "layer" + wn.DRAG + "-drag"); for (var u = 0; u < wn.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 = Co(), f = function(W) { return { x: (W.x1 + W.x2) / 2, y: (W.y1 + W.y2) / 2 }; }, h = function(W) { return { x: -W.w / 2, y: -W.h / 2 }; }, p = function(W) { var Y = W[0]._private, re = Y.oldBackgroundTimestamp === Y.backgroundTimestamp; return !re; }, v = function(W) { return W[0]._private.nodeKey; }, m = function(W) { return W[0]._private.labelStyleKey; }, g = function(W) { return W[0]._private.sourceLabelStyleKey; }, y = function(W) { return W[0]._private.targetLabelStyleKey; }, x = function(W, Y, re, we, Oe) { return t.drawElement(W, Y, re, !1, !1, Oe); }, w = function(W, Y, re, we, Oe) { return t.drawElementText(W, Y, re, we, "main", Oe); }, k = function(W, Y, re, we, Oe) { return t.drawElementText(W, Y, re, we, "source", Oe); }, C = function(W, Y, re, we, Oe) { return t.drawElementText(W, Y, re, we, "target", Oe); }, S = function(W) { return W.boundingBox(), W[0]._private.bodyBounds; }, _ = function(W) { return W.boundingBox(), W[0]._private.labelBounds.main || d; }, T = function(W) { return W.boundingBox(), W[0]._private.labelBounds.source || d; }, F = function(W) { return W.boundingBox(), W[0]._private.labelBounds.target || d; }, A = function(W, Y) { return Y; }, I = function(W) { return f(S(W)); }, N = function(W, Y, re) { var we = W ? W + "-" : ""; return { x: Y.x + re.pstyle(we + "text-margin-x").pfValue, y: Y.y + re.pstyle(we + "text-margin-y").pfValue }; }, L = function(W, Y, re) { var we = W[0]._private.rscratch; return { x: we[Y], y: we[re] }; }, z = function(W) { return N("", L(W, "labelX", "labelY"), W); }, P = function(W) { return N("source", L(W, "sourceLabelX", "sourceLabelY"), W); }, D = function(W) { return N("target", L(W, "targetLabelX", "targetLabelY"), W); }, M = function(W) { return h(S(W)); }, V = function(W) { return h(T(W)); }, Q = function(W) { return h(F(W)); }, X = function(W) { var Y = _(W), re = h(_(W)); if (W.isNode()) { switch (W.pstyle("text-halign").value) { case "left": re.x = -Y.w; break; case "right": re.x = 0; break; } switch (W.pstyle("text-valign").value) { case "top": re.y = -Y.h; break; case "bottom": re.y = 0; break; } } return re; }, ee = t.data.eleTxrCache = new Hv(t, { getKey: v, doesEleInvalidateKey: p, drawElement: x, getBoundingBox: S, getRotationPoint: I, getRotationOffset: M, allowEdgeTxrCaching: !1, allowParentTxrCaching: !1 }), ue = t.data.lblTxrCache = new Hv(t, { getKey: m, drawElement: w, getBoundingBox: _, getRotationPoint: z, getRotationOffset: X, isVisible: A }), ve = t.data.slbTxrCache = new Hv(t, { getKey: g, drawElement: k, getBoundingBox: T, getRotationPoint: P, getRotationOffset: V, isVisible: A }), ge = t.data.tlbTxrCache = new Hv(t, { getKey: y, drawElement: C, getBoundingBox: F, getRotationPoint: D, getRotationOffset: Q, isVisible: A }), se = t.data.lyrTxrCache = new mW(t); t.onUpdateEleCalcs(function(W, Y) { ee.invalidateElements(Y), ue.invalidateElements(Y), ve.invalidateElements(Y), ge.invalidateElements(Y), se.invalidateElements(Y); for (var re = 0; re < Y.length; re++) { var we = Y[re]._private; we.oldBackgroundTimestamp = we.backgroundTimestamp; } }); var ne = function(W) { for (var Y = 0; Y < W.length; Y++) se.enqueueElementRefinement(W[Y].ele); }; ee.onDequeue(ne), ue.onDequeue(ne), ve.onDequeue(ne), ge.onDequeue(ne); } wn.redrawHint = function(e, t) { var n = this; switch (e) { case "eles": n.data.canvasNeedsRedraw[wn.NODE] = t; break; case "drag": n.data.canvasNeedsRedraw[wn.DRAG] = t; break; case "select": n.data.canvasNeedsRedraw[wn.SELECT_BOX] = t; break; } }; var iot = typeof Path2D < "u"; wn.path2dEnabled = function(e) { if (e === void 0) return this.pathsEnabled; this.pathsEnabled = !!e; }; wn.usePaths = function() { return iot && this.pathsEnabled; }; wn.setImgSmoothing = function(e, t) { e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled = t : (e.webkitImageSmoothingEnabled = t, e.mozImageSmoothingEnabled = t, e.msImageSmoothingEnabled = t); }; wn.getImgSmoothing = function(e) { return e.imageSmoothingEnabled != null ? e.imageSmoothingEnabled : e.webkitImageSmoothingEnabled || e.mozImageSmoothingEnabled || e.msImageSmoothingEnabled; }; wn.makeOffscreenCanvas = function(e, t) { var n; if ((typeof OffscreenCanvas > "u" ? "undefined" : zr(OffscreenCanvas)) !== "undefined") n = new OffscreenCanvas(e, t); else { var r = this.cy.window(), a = r.document; n = a.createElement("canvas"), n.width = e, n.height = t; } return n; }; [yW, js, Hl, U_, gp, Gh, Ro, yc, Lm, CW].forEach(function(e) { It(wn, e); }); var sot = [{ name: "null", impl: oW }, { name: "base", impl: vW }, { name: "canvas", impl: oot }], lot = [{ type: "layout", extensions: hat }, { type: "renderer", extensions: sot }], EW = {}, _W = {}; function TW(e, t, n) { var r = n, a = function(S) { An("Can not register `" + t + "` for `" + e + "` since `" + S + "` already exists in the prototype and can not be overridden"); }; if (e === "core") { if (wg.prototype[t]) return a(t); wg.prototype[t] = n; } else if (e === "collection") { if (ga.prototype[t]) return a(t); ga.prototype[t] = n; } else if (e === "layout") { for (var o = function(S) { this.options = S, n.call(this, S), mn(this._private) || (this._private = {}), this._private.cy = S.cy, this._private.listeners = [], this.createEmitter(); }, i = o.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 T = 0; T < _.length; T++) _[T].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); } }; It(i, { createEmitter: function() { return this._private.emitter = new xx(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; } }), On.eventAliasesOn(i), r = o; } else if (e === "renderer" && t !== "null" && t !== "base") { var h = $W("renderer", "base"), p = h.prototype, v = n, m = n.prototype, g = function() { h.apply(this, arguments), v.apply(this, arguments); }, y = g.prototype; for (var x in p) { var w = p[x], k = m[x] != null; if (k) return a(x); y[x] = w; } for (var C in m) y[C] = m[C]; p.clientFunctions.forEach(function(S) { y[S] = y[S] || function() { fr("Renderer does not implement `renderer." + S + "()` on its prototype"); }; }), r = g; } else if (e === "__proto__" || e === "constructor" || e === "prototype") return fr(e + " is an illegal type to be registered, possibly lead to prototype pollutions"); return JU({ map: EW, keys: [e, t], value: r }); } function $W(e, t) { return eq({ map: EW, keys: [e, t] }); } function uot(e, t, n, r, a) { return JU({ map: _W, keys: [e, t, n, r], value: a }); } function cot(e, t, n, r) { return eq({ map: _W, keys: [e, t, n, r] }); } var I3 = function() { if (arguments.length === 2) return $W.apply(null, arguments); if (arguments.length === 3) return TW.apply(null, arguments); if (arguments.length === 4) return cot.apply(null, arguments); if (arguments.length === 5) return uot.apply(null, arguments); fr("Invalid extension access syntax"); }; wg.prototype.extension = I3; lot.forEach(function(e) { e.extensions.forEach(function(t) { TW(e.type, t.name, t.impl); }); }); var OW = function e() { if (!(this instanceof e)) return new e(); this.length = 0; }, Hd = OW.prototype; Hd.instanceString = function() { return "stylesheet"; }; Hd.selector = function(e) { var t = this.length++; return this[t] = { selector: e, properties: [] }, this; }; Hd.css = function(e, t) { var n = this.length - 1; if (xt(e)) this[n].properties.push({ name: e, value: t }); else if (mn(e)) for (var r = e, a = Object.keys(r), o = 0; o < a.length; o++) { var i = a[o], s = r[i]; if (s != null) { var l = Pa.properties[i] || Pa.properties[dx(i)]; if (l != null) { var u = l.name, c = s; this[n].properties.push({ name: u, value: c }); } } } return this; }; Hd.style = Hd.css; Hd.generateStyle = function(e) { var t = new Pa(e); return this.appendToStyle(t); }; Hd.appendToStyle = function(e) { for (var t = 0; t < this.length; t++) { var n = this[t], r = n.selector, a = n.properties; e.selector(r); for (var o = 0; o < a.length; o++) { var i = a[o]; e.css(i.name, i.value); } } return e; }; var dot = "3.30.2", Ud = function(e) { if (e === void 0 && (e = {}), mn(e)) return new wg(e); if (xt(e)) return I3.apply(I3, arguments); }; Ud.use = function(e) { var t = Array.prototype.slice.call(arguments, 1); return t.unshift(Ud), e.apply(null, t), this; }; Ud.warnings = function(e) { return lq(e); }; Ud.version = dot; Ud.stylesheet = Ud.Stylesheet = OW; let pot = class extends EventTarget { constructor(e, t) { super(), ls(this, "cyg", null), ls(this, "nodes", []), ls(this, "edges", []), ls(this, "axons", []), ls(this, "dendrites", []), ls(this, "somas", []), ls(this, "labelCache", /* @__PURE__ */ new Map()), ls(this, "graphCanvas", null), this.labelCache = e, this.graphCanvas = t; } async addConnectivity(e) { var t; if (this.axons = e.axons.map((n) => JSON.stringify(n)), this.dendrites = e.dendrites.map((n) => JSON.stringify(n)), (t = e.somas) != null && t.length && (this.somas = e.somas.map((n) => JSON.stringify(n))), e.connectivity.length) for (const n of e.connectivity) { const r = await this.graphNode(n[0]), a = await this.graphNode(n[1]); this.nodes.push(r), this.nodes.push(a), this.edges.push({ id: `${r.id}_${a.id}`, source: r.id, target: a.id }); } else this.nodes.push({ id: "MISSING", label: "NO PATHS" }); } showConnectivity(e) { this.cyg = new yot(this, e), this.cyg.on("tap-node", (t) => { const n = new CustomEvent("tap-node", { detail: t.detail }); this.dispatchEvent(n); }); } selectConnectivity(e) { var t; if ((t = this.cyg) != null && t.cy) { let n = ""; this.cyg.cy.elements().forEach((r) => { const a = r.data("label"), o = P3(a); mot(e, o) && (n = r.id()); }), n && this.cyg.cy.$id(n).select(); } } clearConnectivity() { var e; (e = this.cyg) != null && e.cy && (this.cyg.cy.remove(), this.cyg.cy = null); } reset() { var e; (e = this.cyg) != null && e.cy && this.cyg.cy.reset(); } zoom(e) { var t; if ((t = this.cyg) != null && t.cy) { const n = this.cyg.cy.zoom(), r = this.cyg.cy.width(), a = this.cyg.cy.height(), o = { x: r / 2, y: a / 2 }; this.cyg.cy.zoom({ level: n + e, renderedPosition: o }); } } enableZoom(e) { var t; (t = this.cyg) != null && t.cy && this.cyg.cy.userZoomingEnabled(e); } get elements() { return [ ...this.nodes.map((e) => ({ data: e })), ...this.edges.map((e) => ({ data: e })) ]; } get roots() { return [ ...this.dendrites, ...this.somas ]; } async graphNode(e) { const t = JSON.stringify(e), n = [e[0], ...e[1]], r = []; for (const o of n) { const i = this.labelCache.has(o) ? this.labelCache.get(o) : ""; r.push(i); } n.push(...r); const a = { id: t, label: n.join(` `) }; return this.axons.includes(t) ? this.dendrites.includes(t) || this.somas.includes(t) ? a["both-a-d"] = !0 : a.axon = !0 : (this.dendrites.includes(t) || this.somas.includes(t)) && (a.dendrite = !0), a; } on(e, t) { this.addEventListener(e, t); } }; const fot = "#8300bf", hot = "#f3ecf6", vot = [ { selector: "node", style: { label: function(e) { return got(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": fot, "background-color": hot, "background-opacity": 0.75 } } ]; function got(e) { const t = e.split(` `), n = t.length / 2, r = t.slice(n); return FW(r.join(` `)); } function FW(e) { return e.split(` `).map((t) => t && t[0] >= "a" && t[0] <= "z" ? t.charAt(0).toUpperCase() + t.slice(1) : t).join(` `); } function P3(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 mot(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; } class yot extends EventTarget { constructor(t, n) { var r; super(), ls(this, "cy"), ls(this, "tooltip"), this.cy = Ud({ container: n, elements: t.elements, layout: { name: "breadthfirst", circle: !1, roots: t.roots }, directed: !0, style: vot, minZoom: 0.5, 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, a = P3(r).map((o) => o.label + " (" + o.id + ")"); this.tooltip.innerText = FW(a.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, a = r.data(); let { label: o } = a; n ? r.addClass("active") : (r.removeClass("active"), o = "", setTimeout(() => { r.unselect(); })); const i = P3(o), s = new CustomEvent("tap-node", { detail: i }); this.dispatchEvent(s); } on(t, n) { this.addEventListener(t, n); } } const bot = 1.3, wot = 24 * 60 * 60 * 1e3, xot = "Reset position", UP = "Lock zoom", kot = "Unlock zoom", Cot = "Zoom in", Sot = "Zoom out", qP = 0.25, Eot = "#8300bf", _ot = 3e3, Tot = { 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: xot, zoomLockLabel: UP, zoomInLabel: Cot, zoomOutLabel: Sot, iconColor: Eot, zoomEnabled: !1, connectivityError: null, timeoutID: void 0 }; }, mounted() { this.refreshCache(), this.loadCacheData(), this.run().then((e) => { this.showGraph(this.entry); }); }, methods: { 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 a = JSON.parse(t); this.labelCache = new Map(Object.entries(a)); } 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() + wot; 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 < bot) { 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 pot(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 a = 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 (!a.ok) throw new Error(`Cannot access ${n}`); return await a.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, a] of e.values) if (r !== t) { const o = JSON.parse(a); this.labelCache.set(r, o.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(qP); }, zoomOut: function() { this.connectivityGraph.zoom(-qP); }, /** * Enable/disable user zoom for scrolling */ toggleZoom: function() { this.zoomEnabled = !this.zoomEnabled, this.zoomLockLabel = this.zoomEnabled ? kot : UP, this.connectivityGraph.enableZoom(!this.zoomEnabled); }, showErrorMessage: function(e) { this.connectivityError = { ...e }, this.timeoutID && clearTimeout(this.timeoutID), this.timeoutID = setTimeout(() => { this.connectivityError = null; }, _ot); } } }, $ot = { class: "connectivity-graph" }, Oot = { ref: "graphCanvas", class: "graph-canvas" }, Fot = { class: "control-panel control-panel-tools" }, Aot = { class: "visually-hidden" }, Iot = { class: "visually-hidden" }, Pot = { class: "visually-hidden" }, Lot = { class: "visually-hidden" }, Not = /* @__PURE__ */ kG('
    Origin
    Components
    Destination
    ', 1), Mot = { key: 0, class: "connectivity-graph-error" }, Dot = { key: 0 }; function Bot(e, t, n, r, a, o) { const i = DUe, s = $a, l = Md, u = Sm, c = oqe, d = sqe, f = dqe, h = fqe, p = pZe; return qe(($(), B("div", $ot, [ K("div", Oot, null, 512), K("div", Fot, [ K("div", { class: H(["tools", { "zoom-locked": e.zoomEnabled }]) }, [ Z(u, { content: e.resetLabel, placement: "top", effect: "control-tooltip" }, { default: q(() => [ Z(l, { class: "control-button", size: "small", onClick: o.reset }, { default: q(() => [ Z(s, { color: "white" }, { default: q(() => [ Z(i) ]), _: 1 }), K("span", Aot, _e(e.resetLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content"]), Z(u, { content: e.zoomLockLabel, placement: "top", effect: "control-tooltip" }, { default: q(() => [ Z(l, { class: "control-button", size: "small", onClick: o.toggleZoom }, { default: q(() => [ Z(s, { color: "white" }, { default: q(() => [ e.zoomEnabled ? ($(), ae(c, { key: 0 })) : ($(), ae(d, { key: 1 })) ]), _: 1 }), K("span", Iot, _e(e.zoomLockLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content"]), Z(u, { content: e.zoomInLabel, placement: "left", effect: "control-tooltip" }, { default: q(() => [ Z(l, { class: "control-button", size: "small", onClick: o.zoomIn }, { default: q(() => [ Z(s, { color: "white" }, { default: q(() => [ Z(f) ]), _: 1 }), K("span", Pot, _e(e.zoomInLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content"]), Z(u, { content: e.zoomOutLabel, placement: "left", effect: "control-tooltip" }, { default: q(() => [ Z(l, { class: "control-button", size: "small", onClick: o.zoomOut }, { default: q(() => [ Z(s, { color: "white" }, { default: q(() => [ Z(h) ]), _: 1 }), K("span", Lot, _e(e.zoomOutLabel), 1) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["content"]) ], 2) ]), Not, e.connectivityError ? ($(), B("div", Mot, [ e.connectivityError.errorConnectivities ? ($(), B("strong", Dot, _e(e.connectivityError.errorConnectivities), 1)) : te("", !0), ze(" " + _e(e.connectivityError.errorMessage), 1) ])) : te("", !0) ])), [ [p, e.loading] ]); } const Rot = /* @__PURE__ */ cx(Tot, [["render", Bot], ["__scopeId", "data-v-6acf6401"]]), WP = "Copy to clipboard", zot = "Copied!", Vot = "#8300bf", jot = { name: "CopyToClipboard", props: { content: { type: String, default: "" }, /** * `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: WP, autoHideTimeout: 0, iconColor: Vot }; }, 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 || "", a = new Blob([t], { type: "text/html" }), o = new Blob([r], { type: "text/plain" }), i = new ClipboardItem({ "text/html": a, "text/plain": o }); await navigator.clipboard.write([i]); } catch (t) { console.error( "Error when trying to use navigator.clipboard.write()", t ), e = !1; } e ? this.textLabel = zot : this.textLabel = "Error trying to copy to clipboard!"; }, resetSettings: function() { this.autoHideTimeout = 0, this.textLabel = WP; } } }, Hot = { class: "visually-hidden" }; function Uot(e, t, n, r, a, o) { const i = GUe, s = $a, l = Md, u = Sm; return $(), ae(u, { content: e.textLabel, placement: "bottom", "hide-after": e.autoHideTimeout, effect: "clipboard-tooltip", onHide: o.resetSettings }, { default: q(() => [ Z(l, { class: H(["copy-clipboard-button", n.theme]), size: "small", onClick: o.copyToClipboard }, { default: q(() => [ Z(s, { color: e.iconColor }, { default: q(() => [ Z(i) ]), _: 1 }, 8, ["color"]), K("span", Hot, _e(e.textLabel), 1) ]), _: 1 }, 8, ["class", "onClick"]) ]), _: 1 }, 8, ["content", "hide-after", "onHide"]); } const AW = /* @__PURE__ */ cx(jot, [["render", Uot], ["__scopeId", "data-v-de3b5311"]]), IW = ` 2horpanel ? `, PW = ` 2vertpanel ? `, LW = ` 3panel ? `, NW = ` 4panel ? `, MW = ` 2horpanel ? `, DW = ` 2horpanel ? `, BW = ` 4panel ? `, RW = ` changeBckgd `, zW = ` close no bk `, VW = ` close `, jW = ` closeFullScreen `, HW = ` Comment `, UW = ` Connection `, qW = ` dock `, WW = ` drawLine `, KW = ` drawPoint `, GW = ` drawPolygon `, XW = ` drawTrash `, YW = ` fitWindow `, ZW = ` fullScreen `, QW = 'DataPortal-Icons', JW = ` magnifyingGlass `, eK = `Created by Wahyu Prihantorofrom the Noun Project`, tK = ` openMap `, nK = ` Artboard Copy 6 `, rK = ` permalink `, aK = ` play `, oK = ` resetZoom `, iK = ` singlepanel ? `, sK = ` tooltips ? `, lK = ` undock `, uK = ` zoomIn `, cK = ` zoomOut `, dK = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, pK = (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(), qot = !0, Wot = !0, Kot = ["fill"], KP = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": IW, "/assets/icons/2vertpanel.svg": PW, "/assets/icons/3panel.svg": LW, "/assets/icons/4panel.svg": NW, "/assets/icons/5panel.svg": MW, "/assets/icons/6panel.svg": DW, "/assets/icons/6panelVertical.svg": BW, "/assets/icons/changeBckgd.svg": RW, "/assets/icons/close-no-bk.svg": zW, "/assets/icons/close.svg": VW, "/assets/icons/closeFullScreen.svg": jW, "/assets/icons/comment.svg": HW, "/assets/icons/connection.svg": UW, "/assets/icons/dock.svg": qW, "/assets/icons/drawLine.svg": WW, "/assets/icons/drawPoint.svg": KW, "/assets/icons/drawPolygon.svg": GW, "/assets/icons/drawTrash.svg": XW, "/assets/icons/fitWindow.svg": YW, "/assets/icons/fullScreen.svg": ZW, "/assets/icons/help.svg": QW, "/assets/icons/magnifyingGlass.svg": JW, "/assets/icons/noun-filter.svg": eK, "/assets/icons/openMap.svg": tK, "/assets/icons/pause.svg": nK, "/assets/icons/permalink.svg": rK, "/assets/icons/play.svg": aK, "/assets/icons/resetZoom.svg": oK, "/assets/icons/singlepanel.svg": iK, "/assets/icons/tooltips.svg": sK, "/assets/icons/undock.svg": lK, "/assets/icons/zoomIn.svg": uK, "/assets/icons/zoomOut.svg": cK }), Got = Object.keys(KP).map((e) => { const t = dK(KP[e], qot, Wot, Kot), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return pK(t).replace("", "symbol>"); }); Got.join(` `); const GP = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": IW, "/assets/icons/2vertpanel.svg": PW, "/assets/icons/3panel.svg": LW, "/assets/icons/4panel.svg": NW, "/assets/icons/5panel.svg": MW, "/assets/icons/6panel.svg": DW, "/assets/icons/6panelVertical.svg": BW, "/assets/icons/changeBckgd.svg": RW, "/assets/icons/close-no-bk.svg": zW, "/assets/icons/close.svg": VW, "/assets/icons/closeFullScreen.svg": jW, "/assets/icons/comment.svg": HW, "/assets/icons/connection.svg": UW, "/assets/icons/dock.svg": qW, "/assets/icons/drawLine.svg": WW, "/assets/icons/drawPoint.svg": KW, "/assets/icons/drawPolygon.svg": GW, "/assets/icons/drawTrash.svg": XW, "/assets/icons/fitWindow.svg": YW, "/assets/icons/fullScreen.svg": ZW, "/assets/icons/help.svg": QW, "/assets/icons/magnifyingGlass.svg": JW, "/assets/icons/noun-filter.svg": eK, "/assets/icons/openMap.svg": tK, "/assets/icons/pause.svg": nK, "/assets/icons/permalink.svg": rK, "/assets/icons/play.svg": aK, "/assets/icons/resetZoom.svg": oK, "/assets/icons/singlepanel.svg": iK, "/assets/icons/tooltips.svg": sK, "/assets/icons/undock.svg": lK, "/assets/icons/zoomIn.svg": uK, "/assets/icons/zoomOut.svg": cK }), Xot = Object.keys(GP).map((e) => { const t = dK(GP[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return pK(t).replace("", "symbol>"); }); Xot.join(` `); const Yot = { data() { return { ElIconView: vz }; }, name: "DatasetCard", components: { BadgesGroup: OV, ImageGallery: bH, Button: Bo, Icon: tr, CopyToClipboard: AW }, props: { /** * Object containing information for * the required viewing. */ entry: { type: Object, default: () => { } }, envVars: { type: Object, default: () => { } } }, data: function() { return { thumbnail: cI, 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 && (Ub[this.entry.species[0].toLowerCase()] ? e = `${Ub[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) { yr.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) { yr.emit("PopoverActionClick", e), yr.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 = cI, 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(); } } }, Zot = (e) => (ma("data-v-541a51e6"), e = e(), ya(), e), Qot = { class: "dataset-card-container", ref: "container" }, Jot = { class: "dataset-card", ref: "card" }, eit = /* @__PURE__ */ Zot(() => /* @__PURE__ */ K("div", { class: "seperator-path" }, null, -1)), tit = { class: "card" }, nit = { class: "card-left" }, rit = { class: "card-right" }, ait = { class: "details" }, oit = { class: "details" }, iit = { key: 0, class: "details loading-icon" }, sit = { class: "badges-container" }, lit = { class: "float-button-container" }; function uit(e, t, n, r, a, o) { const i = bH, s = Bo, l = OV, u = lt("CopyToClipboard"), c = Pw; return $(), B("div", Qot, [ K("div", Jot, [ eit, qe(($(), B("div", tit, [ K("span", nit, [ !e.loading && e.discoverId ? ($(), ae(i, { key: 0, datasetId: e.discoverId, datasetVersion: e.version, entry: n.entry, envVars: n.envVars, label: o.label, datasetThumbnail: e.thumbnail, "dataset-biolucida": e.biolucidaData, category: e.currentCategory, onCardClicked: o.galleryClicked, onDatalinkClicked: o.galleryDatalinkClicked }, null, 8, ["datasetId", "datasetVersion", "entry", "envVars", "label", "datasetThumbnail", "dataset-biolucida", "category", "onCardClicked", "onDatalinkClicked"])) : te("", !0) ]), K("div", rit, [ K("div", { class: "title", onClick: t[0] || (t[0] = (...d) => o.cardClicked && o.cardClicked(...d)) }, _e(n.entry.name), 1), K("div", ait, _e(o.contributors) + " " + _e(n.entry.publishDate ? `(${o.publishYear})` : ""), 1), K("div", oit, _e(o.samples), 1), n.entry.detailsReady ? te("", !0) : qe(($(), B("div", iit, null, 512)), [ [c, !n.entry.detailsReady] ]), K("div", null, [ n.entry.simulation ? ($(), ae(s, { key: 0, onClick: o.openRepository, size: "small", class: "button", icon: a.ElIconView }, { default: q(() => [ ze("View repository") ]), _: 1 }, 8, ["onClick", "icon"])) : te("", !0) ]), K("div", sit, [ Z(l, { entry: n.entry, "dataset-biolucida": e.biolucidaData, onCategoryChanged: o.categoryChanged }, null, 8, ["entry", "dataset-biolucida", "onCategoryChanged"]) ]), K("div", lit, [ Z(u, { content: e.copyContent }, null, 8, ["content"]) ]) ]) ])), [ [c, e.loading] ]) ], 512) ], 512); } const fK = /* @__PURE__ */ Zi(Yot, [["render", uit], ["__scopeId", "data-v-541a51e6"]]), XP = function(e) { return [...new Set(e.map((t) => JSON.stringify(t)))].map( (t) => JSON.parse(t) ); }, cit = { name: "SearchHistory", components: { Tag: Uf, Select: um }, data() { return { searchHistory: [], selectValue: "Full search history" }; }, computed: { reversedSearchHistory: function() { return XP( this.searchHistory.slice().reverse().filter((e) => e.search !== "") ); }, cascaderOptions: function() { return this.reversedSearchHistory.map((e) => ({ value: e.search, label: e.search })); } }, 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 = []; }, addSearchToHistory(e, t) { e = [], t = t.trim(); let n = JSON.parse( localStorage.getItem("sparc.science-sidebar-search-history") ); n ? (n.push({ filters: e, search: t }), this.searchHistory = XP(n), localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify(n) )) : localStorage.setItem( "sparc.science-sidebar-search-history", JSON.stringify([{ filters: e, search: t }]) ); }, search: function(e) { this.$emit("search", e); }, selectChange: function(e) { this.selectValue = e, this.search({ search: e }); } }, mounted: function() { this.getSearchHistory(), yr.on("search-changed", (e) => { this.setSearchHistory(e); }); } }, dit = { class: "history-container" }; function pit(e, t, n, r, a, o) { const i = Uf, s = Iw, l = um; return $(), B("div", dit, [ ($(!0), B(Ue, null, yt(o.reversedSearchHistory, (u, c) => ($(), B(Ue, null, [ c < 3 ? ($(), ae(i, { class: "search-tag", key: c, onClick: (d) => o.search(u), size: "large" }, { default: q(() => [ ze(_e(u.search), 1) ]), _: 2 }, 1032, ["onClick"])) : te("", !0) ], 64))), 256)), o.reversedSearchHistory.length > 0 ? ($(), ae(l, { key: 0, "model-value": a.selectValue, class: "m-2 search-select", placeholder: "Full search History", "popper-class": "sidebar-search-select-popper", onChange: o.selectChange, teleported: !1 }, { default: q(() => [ ($(!0), B(Ue, null, yt(o.cascaderOptions, (u, c) => ($(), ae(s, { key: c, label: u.label, value: u.value }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["model-value", "onChange"])) : te("", !0) ]); } const hK = /* @__PURE__ */ Zi(cit, [["render", pit], ["__scopeId", "data-v-def88150"]]), vK = (e, t) => { const n = e.__vccOpts || e; for (const [r, a] of t) n[r] = a; return n; }, fit = ["xlink:href"], hit = { __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) => ($(), B("svg", { class: H(["map-icon", { "map-icon-spin": e.spin }]) }, [ K("use", { "xlink:href": `#${e.icon}` }, null, 8, fit) ], 2)); } }, vit = /* @__PURE__ */ vK(hit, [["__scopeId", "data-v-e172d5ff"]]), gK = ` 2horpanel ? `, mK = ` 2vertpanel ? `, yK = ` 3panel ? `, bK = ` 4panel ? `, wK = ` 2horpanel ? `, xK = ` 2horpanel ? `, kK = ` 4panel ? `, CK = ` changeBckgd `, SK = ` close no bk `, EK = ` close `, _K = ` closeFullScreen `, TK = ` Comment `, $K = ` Connection `, OK = ` dock `, FK = ` drawLine `, AK = ` drawPoint `, IK = ` drawPolygon `, PK = ` drawTrash `, LK = ` fitWindow `, NK = ` fullScreen `, MK = 'DataPortal-Icons', DK = ` magnifyingGlass `, BK = `Created by Wahyu Prihantorofrom the Noun Project`, RK = ` openMap `, zK = ` Artboard Copy 6 `, VK = ` permalink `, jK = ` play `, HK = ` resetZoom `, UK = ` singlepanel ? `, qK = ` tooltips ? `, WK = ` undock `, KK = ` zoomIn `, GK = ` zoomOut `, XK = (e, t, n, r) => { const a = ["title", "desc", "defs", "style"], o = ["width", "height"], i = r || []; let s = document.createElement("div"); s.innerHTML = e, a.map((u) => { const c = s.querySelector(u); c && c.remove(); }), o.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; }, YK = (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(), git = !0, mit = !0, yit = ["fill"], YP = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": gK, "/assets/icons/2vertpanel.svg": mK, "/assets/icons/3panel.svg": yK, "/assets/icons/4panel.svg": bK, "/assets/icons/5panel.svg": wK, "/assets/icons/6panel.svg": xK, "/assets/icons/6panelVertical.svg": kK, "/assets/icons/changeBckgd.svg": CK, "/assets/icons/close-no-bk.svg": SK, "/assets/icons/close.svg": EK, "/assets/icons/closeFullScreen.svg": _K, "/assets/icons/comment.svg": TK, "/assets/icons/connection.svg": $K, "/assets/icons/dock.svg": OK, "/assets/icons/drawLine.svg": FK, "/assets/icons/drawPoint.svg": AK, "/assets/icons/drawPolygon.svg": IK, "/assets/icons/drawTrash.svg": PK, "/assets/icons/fitWindow.svg": LK, "/assets/icons/fullScreen.svg": NK, "/assets/icons/help.svg": MK, "/assets/icons/magnifyingGlass.svg": DK, "/assets/icons/noun-filter.svg": BK, "/assets/icons/openMap.svg": RK, "/assets/icons/pause.svg": zK, "/assets/icons/permalink.svg": VK, "/assets/icons/play.svg": jK, "/assets/icons/resetZoom.svg": HK, "/assets/icons/singlepanel.svg": UK, "/assets/icons/tooltips.svg": qK, "/assets/icons/undock.svg": WK, "/assets/icons/zoomIn.svg": KK, "/assets/icons/zoomOut.svg": GK }), bit = Object.keys(YP).map((e) => { const t = XK(YP[e], git, mit, yit), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return YK(t).replace("", "symbol>"); }); bit.join(` `); const L3 = /* @__PURE__ */ Object.assign({ "/assets/icons/2horpanel.svg": gK, "/assets/icons/2vertpanel.svg": mK, "/assets/icons/3panel.svg": yK, "/assets/icons/4panel.svg": bK, "/assets/icons/5panel.svg": wK, "/assets/icons/6panel.svg": xK, "/assets/icons/6panelVertical.svg": kK, "/assets/icons/changeBckgd.svg": CK, "/assets/icons/close-no-bk.svg": SK, "/assets/icons/close.svg": EK, "/assets/icons/closeFullScreen.svg": _K, "/assets/icons/comment.svg": TK, "/assets/icons/connection.svg": $K, "/assets/icons/dock.svg": OK, "/assets/icons/drawLine.svg": FK, "/assets/icons/drawPoint.svg": AK, "/assets/icons/drawPolygon.svg": IK, "/assets/icons/drawTrash.svg": PK, "/assets/icons/fitWindow.svg": LK, "/assets/icons/fullScreen.svg": NK, "/assets/icons/help.svg": MK, "/assets/icons/magnifyingGlass.svg": DK, "/assets/icons/noun-filter.svg": BK, "/assets/icons/openMap.svg": RK, "/assets/icons/pause.svg": zK, "/assets/icons/permalink.svg": VK, "/assets/icons/play.svg": jK, "/assets/icons/resetZoom.svg": HK, "/assets/icons/singlepanel.svg": UK, "/assets/icons/tooltips.svg": qK, "/assets/icons/undock.svg": WK, "/assets/icons/zoomIn.svg": KK, "/assets/icons/zoomOut.svg": GK }), wit = Object.keys(L3).map((e) => { const t = XK(L3[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1"); return YK(t).replace("", "symbol>"); }), xit = { name: "MapSvgSpriteColor", svgContext: L3, svgSprite: wit.join(` `) // concatenate all symbols into $options.svgSprite }, kit = ["innerHTML"]; function Cit(e, t, n, r, a, o) { return $(), B("svg", { width: "0", height: "0", style: { display: "none" }, innerHTML: e.$options.svgSprite }, null, 8, kit); } const Sit = /* @__PURE__ */ vK(xit, [["render", Cit]]); var ZK = { 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(); })(EOe, function() { function n(J, de, pe) { return de in J ? Object.defineProperty(J, de, { value: pe, enumerable: !0, configurable: !0, writable: !0 }) : J[de] = pe, J; } function r(J, de) { var pe = Object.keys(J); if (Object.getOwnPropertySymbols) { var ye = Object.getOwnPropertySymbols(J); de && (ye = ye.filter(function(Ae) { return Object.getOwnPropertyDescriptor(J, Ae).enumerable; })), pe.push.apply(pe, ye); } return pe; } function a(J) { for (var de = 1; de < arguments.length; de++) { var pe = arguments[de] != null ? arguments[de] : {}; de % 2 ? r(Object(pe), !0).forEach(function(ye) { n(J, ye, pe[ye]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(J, Object.getOwnPropertyDescriptors(pe)) : r(Object(pe)).forEach(function(ye) { Object.defineProperty(J, ye, Object.getOwnPropertyDescriptor(pe, ye)); }); } return J; } function o(J, de) { if (J == null) return {}; var pe, ye, Ae = function(st, Ye) { if (st == null) return {}; var at, gt, ut = {}, jt = Object.keys(st); for (gt = 0; gt < jt.length; gt++) at = jt[gt], Ye.indexOf(at) >= 0 || (ut[at] = st[at]); return ut; }(J, de); if (Object.getOwnPropertySymbols) { var Je = Object.getOwnPropertySymbols(J); for (ye = 0; ye < Je.length; ye++) pe = Je[ye], de.indexOf(pe) >= 0 || Object.prototype.propertyIsEnumerable.call(J, pe) && (Ae[pe] = J[pe]); } return Ae; } function i(J, de) { return function(pe) { if (Array.isArray(pe)) return pe; }(J) || function(pe, ye) { if (Symbol.iterator in Object(pe) || Object.prototype.toString.call(pe) === "[object Arguments]") { var Ae = [], Je = !0, st = !1, Ye = void 0; try { for (var at, gt = pe[Symbol.iterator](); !(Je = (at = gt.next()).done) && (Ae.push(at.value), !ye || Ae.length !== ye); Je = !0) ; } catch (ut) { st = !0, Ye = ut; } finally { try { Je || gt.return == null || gt.return(); } finally { if (st) throw Ye; } } return Ae; } }(J, de) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }(); } function s(J) { return function(de) { if (Array.isArray(de)) { for (var pe = 0, ye = new Array(de.length); pe < de.length; pe++) ye[pe] = de[pe]; return ye; } }(J) || function(de) { if (Symbol.iterator in Object(de) || Object.prototype.toString.call(de) === "[object Arguments]") return Array.from(de); }(J) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }(); } function l(J) { var de, pe = "algoliasearch-client-js-".concat(J.key), ye = function() { return de === void 0 && (de = J.localStorage || window.localStorage), de; }, Ae = function() { return JSON.parse(ye().getItem(pe) || "{}"); }, Je = function(Ye) { ye().setItem(pe, JSON.stringify(Ye)); }, st = function() { var Ye = J.timeToLive ? 1e3 * J.timeToLive : null, at = Ae(), gt = Object.fromEntries(Object.entries(at).filter(function(jt) { return i(jt, 2)[1].timestamp !== void 0; })); if (Je(gt), Ye) { var ut = Object.fromEntries(Object.entries(gt).filter(function(jt) { var zt = i(jt, 2)[1], dn = (/* @__PURE__ */ new Date()).getTime(); return !(zt.timestamp + Ye < dn); })); Je(ut); } }; return { get: function(Ye, at) { var gt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return Promise.resolve().then(function() { st(); var ut = JSON.stringify(Ye); return Ae()[ut]; }).then(function(ut) { return Promise.all([ut ? ut.value : at(), ut !== void 0]); }).then(function(ut) { var jt = i(ut, 2), zt = jt[0], dn = jt[1]; return Promise.all([zt, dn || gt.miss(zt)]); }).then(function(ut) { return i(ut, 1)[0]; }); }, set: function(Ye, at) { return Promise.resolve().then(function() { var gt = Ae(); return gt[JSON.stringify(Ye)] = { timestamp: (/* @__PURE__ */ new Date()).getTime(), value: at }, ye().setItem(pe, JSON.stringify(gt)), at; }); }, delete: function(Ye) { return Promise.resolve().then(function() { var at = Ae(); delete at[JSON.stringify(Ye)], ye().setItem(pe, JSON.stringify(at)); }); }, clear: function() { return Promise.resolve().then(function() { ye().removeItem(pe); }); } }; } function u(J) { var de = s(J.caches), pe = de.shift(); return pe === void 0 ? { get: function(ye, Ae) { var Je = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, st = Ae(); return st.then(function(Ye) { return Promise.all([Ye, Je.miss(Ye)]); }).then(function(Ye) { return i(Ye, 1)[0]; }); }, set: function(ye, Ae) { return Promise.resolve(Ae); }, delete: function(ye) { return Promise.resolve(); }, clear: function() { return Promise.resolve(); } } : { get: function(ye, Ae) { var Je = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }; return pe.get(ye, Ae, Je).catch(function() { return u({ caches: de }).get(ye, Ae, Je); }); }, set: function(ye, Ae) { return pe.set(ye, Ae).catch(function() { return u({ caches: de }).set(ye, Ae); }); }, delete: function(ye) { return pe.delete(ye).catch(function() { return u({ caches: de }).delete(ye); }); }, clear: function() { return pe.clear().catch(function() { return u({ caches: de }).clear(); }); } }; } function c() { var J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { serializable: !0 }, de = {}; return { get: function(pe, ye) { var Ae = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { miss: function() { return Promise.resolve(); } }, Je = JSON.stringify(pe); if (Je in de) return Promise.resolve(J.serializable ? JSON.parse(de[Je]) : de[Je]); var st = ye(), Ye = Ae && Ae.miss || function() { return Promise.resolve(); }; return st.then(function(at) { return Ye(at); }).then(function() { return st; }); }, set: function(pe, ye) { return de[JSON.stringify(pe)] = J.serializable ? JSON.stringify(ye) : ye, Promise.resolve(ye); }, delete: function(pe) { return delete de[JSON.stringify(pe)], Promise.resolve(); }, clear: function() { return de = {}, Promise.resolve(); } }; } function d(J, de, pe) { var ye = { "x-algolia-api-key": pe, "x-algolia-application-id": de }; return { headers: function() { return J === g.WithinHeaders ? ye : {}; }, queryParameters: function() { return J === g.WithinQueryParameters ? ye : {}; } }; } function f(J) { var de = 0; return J(function pe() { return de++, new Promise(function(ye) { setTimeout(function() { ye(J(pe)); }, Math.min(100 * de, 1e3)); }); }); } function h(J) { var de = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(pe, ye) { return Promise.resolve(); }; return Object.assign(J, { wait: function(pe) { return h(J.then(function(ye) { return Promise.all([de(ye, pe), ye]); }).then(function(ye) { return ye[1]; })); } }); } function p(J) { for (var de = J.length - 1; de > 0; de--) { var pe = Math.floor(Math.random() * (de + 1)), ye = J[de]; J[de] = J[pe], J[pe] = ye; } return J; } function v(J, de) { return de && Object.keys(de).forEach(function(pe) { J[pe] = de[pe](J); }), J; } function m(J) { for (var de = arguments.length, pe = new Array(de > 1 ? de - 1 : 0), ye = 1; ye < de; ye++) pe[ye - 1] = arguments[ye]; var Ae = 0; return J.replace(/%s/g, function() { return encodeURIComponent(pe[Ae++]); }); } var g = { WithinQueryParameters: 0, WithinHeaders: 1 }; function y(J, de) { var pe = J || {}, ye = pe.data || {}; return Object.keys(pe).forEach(function(Ae) { ["timeout", "headers", "queryParameters", "data", "cacheable"].indexOf(Ae) === -1 && (ye[Ae] = pe[Ae]); }), { data: Object.entries(ye).length > 0 ? ye : void 0, timeout: pe.timeout || de, headers: pe.headers || {}, queryParameters: pe.queryParameters || {}, cacheable: pe.cacheable }; } var x = { Read: 1, Write: 2, Any: 3 }, w = 1, k = 2, C = 3; function S(J) { var de = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : w; return a(a({}, J), {}, { status: de, lastUpdate: Date.now() }); } function _(J) { return typeof J == "string" ? { protocol: "https", url: J, accept: x.Any } : { protocol: J.protocol || "https", url: J.url, accept: J.accept || x.Any }; } var T = "DELETE", F = "GET", A = "POST", I = "PUT"; function N(J, de) { return Promise.all(de.map(function(pe) { return J.get(pe, function() { return Promise.resolve(S(pe)); }); })).then(function(pe) { var ye = pe.filter(function(st) { return function(Ye) { return Ye.status === w || Date.now() - Ye.lastUpdate > 12e4; }(st); }), Ae = pe.filter(function(st) { return function(Ye) { return Ye.status === C && Date.now() - Ye.lastUpdate <= 12e4; }(st); }), Je = [].concat(s(ye), s(Ae)); return { getTimeout: function(st, Ye) { return (Ae.length === 0 && st === 0 ? 1 : Ae.length + 3 + st) * Ye; }, statelessHosts: Je.length > 0 ? Je.map(function(st) { return _(st); }) : de }; }); } function L(J, de, pe, ye) { var Ae = [], Je = function(zt, dn) { if (!(zt.method === F || zt.data === void 0 && dn.data === void 0)) { var on = Array.isArray(zt.data) ? zt.data : a(a({}, zt.data), dn.data); return JSON.stringify(on); } }(pe, ye), st = function(zt, dn) { var on = a(a({}, zt.headers), dn.headers), Hn = {}; return Object.keys(on).forEach(function(or) { var Ya = on[or]; Hn[or.toLowerCase()] = Ya; }), Hn; }(J, ye), Ye = pe.method, at = pe.method !== F ? {} : a(a({}, pe.data), ye.data), gt = a(a(a({ "x-algolia-agent": J.userAgent.value }, J.queryParameters), at), ye.queryParameters), ut = 0, jt = function zt(dn, on) { var Hn = dn.pop(); if (Hn === void 0) throw { name: "RetryError", message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.", transporterStackTrace: V(Ae) }; var or = { data: Je, headers: st, method: Ye, url: D(Hn, pe.path, gt), connectTimeout: on(ut, J.timeouts.connect), responseTimeout: on(ut, ye.timeout) }, Ya = function(Za) { var Ca = { request: or, response: Za, host: Hn, triesLeft: dn.length }; return Ae.push(Ca), Ca; }, Yh = { onSuccess: function(Za) { return function(Ca) { try { return JSON.parse(Ca.content); } catch (kc) { throw /* @__PURE__ */ function(Ul, wp) { return { name: "DeserializationError", message: Ul, response: wp }; }(kc.message, Ca); } }(Za); }, onRetry: function(Za) { var Ca = Ya(Za); return Za.isTimedOut && ut++, Promise.all([J.logger.info("Retryable failure", Q(Ca)), J.hostsCache.set(Hn, S(Hn, Za.isTimedOut ? C : k))]).then(function() { return zt(dn, on); }); }, onFail: function(Za) { throw Ya(Za), function(Ca, kc) { var Ul = Ca.content, wp = Ca.status, Zh = Ul; try { Zh = JSON.parse(Ul).message; } catch { } return /* @__PURE__ */ function(Ix, Px, mG) { return { name: "ApiError", message: Ix, status: Px, transporterStackTrace: mG }; }(Zh, wp, kc); }(Za, V(Ae)); } }; return J.requester.send(or).then(function(Za) { return function(Ca, kc) { return function(Ul) { var wp = Ul.status; return Ul.isTimedOut || function(Zh) { var Ix = Zh.isTimedOut, Px = Zh.status; return !Ix && ~~Px == 0; }(Ul) || ~~(wp / 100) != 2 && ~~(wp / 100) != 4; }(Ca) ? kc.onRetry(Ca) : ~~(Ca.status / 100) == 2 ? kc.onSuccess(Ca) : kc.onFail(Ca); }(Za, Yh); }); }; return N(J.hostsCache, de).then(function(zt) { return jt(s(zt.statelessHosts).reverse(), zt.getTimeout); }); } function z(J) { var de = J.hostsCache, pe = J.logger, ye = J.requester, Ae = J.requestsCache, Je = J.responsesCache, st = J.timeouts, Ye = J.userAgent, at = J.hosts, gt = J.queryParameters, ut = { hostsCache: de, logger: pe, requester: ye, requestsCache: Ae, responsesCache: Je, timeouts: st, userAgent: Ye, headers: J.headers, queryParameters: gt, hosts: at.map(function(jt) { return _(jt); }), read: function(jt, zt) { var dn = y(zt, ut.timeouts.read), on = function() { return L(ut, ut.hosts.filter(function(or) { return (or.accept & x.Read) != 0; }), jt, dn); }; if ((dn.cacheable !== void 0 ? dn.cacheable : jt.cacheable) !== !0) return on(); var Hn = { request: jt, mappedRequestOptions: dn, transporter: { queryParameters: ut.queryParameters, headers: ut.headers } }; return ut.responsesCache.get(Hn, function() { return ut.requestsCache.get(Hn, function() { return ut.requestsCache.set(Hn, on()).then(function(or) { return Promise.all([ut.requestsCache.delete(Hn), or]); }, function(or) { return Promise.all([ut.requestsCache.delete(Hn), Promise.reject(or)]); }).then(function(or) { var Ya = i(or, 2); return Ya[0], Ya[1]; }); }); }, { miss: function(or) { return ut.responsesCache.set(Hn, or); } }); }, write: function(jt, zt) { return L(ut, ut.hosts.filter(function(dn) { return (dn.accept & x.Write) != 0; }), jt, y(zt, ut.timeouts.write)); } }; return ut; } function P(J) { var de = { value: "Algolia for JavaScript (".concat(J, ")"), add: function(pe) { var ye = "; ".concat(pe.segment).concat(pe.version !== void 0 ? " (".concat(pe.version, ")") : ""); return de.value.indexOf(ye) === -1 && (de.value = "".concat(de.value).concat(ye)), de; } }; return de; } function D(J, de, pe) { var ye = M(pe), Ae = "".concat(J.protocol, "://").concat(J.url, "/").concat(de.charAt(0) === "/" ? de.substr(1) : de); return ye.length && (Ae += "?".concat(ye)), Ae; } function M(J) { return Object.keys(J).map(function(de) { return m("%s=%s", de, (pe = J[de], Object.prototype.toString.call(pe) === "[object Object]" || Object.prototype.toString.call(pe) === "[object Array]" ? JSON.stringify(J[de]) : J[de])); var pe; }).join("&"); } function V(J) { return J.map(function(de) { return Q(de); }); } function Q(J) { var de = J.request.headers["x-algolia-api-key"] ? { "x-algolia-api-key": "*****" } : {}; return a(a({}, J), {}, { request: a(a({}, J.request), {}, { headers: a(a({}, J.request.headers), de) }) }); } var X = function(J) { return function(de, pe) { return J.transporter.write({ method: A, path: "2/abtests", data: de }, pe); }; }, ee = function(J) { return function(de, pe) { return J.transporter.write({ method: T, path: m("2/abtests/%s", de) }, pe); }; }, ue = function(J) { return function(de, pe) { return J.transporter.read({ method: F, path: m("2/abtests/%s", de) }, pe); }; }, ve = function(J) { return function(de) { return J.transporter.read({ method: F, path: "2/abtests" }, de); }; }, ge = function(J) { return function(de, pe) { return J.transporter.write({ method: A, path: m("2/abtests/%s/stop", de) }, pe); }; }, se = function(J) { return function(de) { return J.transporter.read({ method: F, path: "1/strategies/personalization" }, de); }; }, ne = function(J) { return function(de, pe) { return J.transporter.write({ method: A, path: "1/strategies/personalization", data: de }, pe); }; }; function W(J) { return function de(pe) { return J.request(pe).then(function(ye) { if (J.batch !== void 0 && J.batch(ye.hits), !J.shouldStop(ye)) return ye.cursor ? de({ cursor: ye.cursor }) : de({ page: (pe.page || 0) + 1 }); }); }({}); } var Y = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.queryParameters, Je = o(ye, ["queryParameters"]), st = a({ acl: de }, Ae !== void 0 ? { queryParameters: Ae } : {}); return h(J.transporter.write({ method: A, path: "1/keys", data: st }, Je), function(Ye, at) { return f(function(gt) { return De(J)(Ye.key, at).catch(function(ut) { if (ut.status !== 404) throw ut; return gt(); }); }); }); }; }, re = function(J) { return function(de, pe, ye) { var Ae = y(ye); return Ae.queryParameters["X-Algolia-User-ID"] = de, J.transporter.write({ method: A, path: "1/clusters/mapping", data: { cluster: pe } }, Ae); }; }, we = function(J) { return function(de, pe, ye) { return J.transporter.write({ method: A, path: "1/clusters/mapping/batch", data: { users: de, cluster: pe } }, ye); }; }, Oe = function(J) { return function(de, pe) { return h(J.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", de), data: { clearExistingDictionaryEntries: !0, requests: { action: "addEntry", body: [] } } }, pe), function(ye, Ae) { return Gt(J)(ye.taskID, Ae); }); }; }, Ne = function(J) { return function(de, pe, ye) { return h(J.transporter.write({ method: A, path: m("1/indexes/%s/operation", de), data: { operation: "copy", destination: pe } }, ye), function(Ae, Je) { return ce(J)(de, { methods: { waitTask: mr } }).waitTask(Ae.taskID, Je); }); }; }, xe = function(J) { return function(de, pe, ye) { return Ne(J)(de, pe, a(a({}, ye), {}, { scope: [Ax.Rules] })); }; }, Fe = function(J) { return function(de, pe, ye) { return Ne(J)(de, pe, a(a({}, ye), {}, { scope: [Ax.Settings] })); }; }, Se = function(J) { return function(de, pe, ye) { return Ne(J)(de, pe, a(a({}, ye), {}, { scope: [Ax.Synonyms] })); }; }, Pe = function(J) { return function(de, pe) { return de.method === F ? J.transporter.read(de, pe) : J.transporter.write(de, pe); }; }, Me = function(J) { return function(de, pe) { return h(J.transporter.write({ method: T, path: m("1/keys/%s", de) }, pe), function(ye, Ae) { return f(function(Je) { return De(J)(de, Ae).then(Je).catch(function(st) { if (st.status !== 404) throw st; }); }); }); }; }, He = function(J) { return function(de, pe, ye) { var Ae = pe.map(function(Je) { return { action: "deleteEntry", body: { objectID: Je } }; }); return h(J.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", de), data: { clearExistingDictionaryEntries: !1, requests: Ae } }, ye), function(Je, st) { return Gt(J)(Je.taskID, st); }); }; }, De = function(J) { return function(de, pe) { return J.transporter.read({ method: F, path: m("1/keys/%s", de) }, pe); }; }, Xe = function(J) { return function(de, pe) { return J.transporter.read({ method: F, path: m("1/task/%s", de.toString()) }, pe); }; }, Ge = function(J) { return function(de) { return J.transporter.read({ method: F, path: "/1/dictionaries/*/settings" }, de); }; }, Ze = function(J) { return function(de) { return J.transporter.read({ method: F, path: "1/logs" }, de); }; }, E = function(J) { return function(de) { return J.transporter.read({ method: F, path: "1/clusters/mapping/top" }, de); }; }, j = function(J) { return function(de, pe) { return J.transporter.read({ method: F, path: m("1/clusters/mapping/%s", de) }, pe); }; }, le = function(J) { return function(de) { var pe = de || {}, ye = pe.retrieveMappings, Ae = o(pe, ["retrieveMappings"]); return ye === !0 && (Ae.getClusters = !0), J.transporter.read({ method: F, path: "1/clusters/mapping/pending" }, Ae); }; }, ce = function(J) { return function(de) { var pe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ye = { transporter: J.transporter, appId: J.appId, indexName: de }; return v(ye, pe.methods); }; }, oe = function(J) { return function(de) { return J.transporter.read({ method: F, path: "1/keys" }, de); }; }, ke = function(J) { return function(de) { return J.transporter.read({ method: F, path: "1/clusters" }, de); }; }, fe = function(J) { return function(de) { return J.transporter.read({ method: F, path: "1/indexes" }, de); }; }, Ee = function(J) { return function(de) { return J.transporter.read({ method: F, path: "1/clusters/mapping" }, de); }; }, Ve = function(J) { return function(de, pe, ye) { return h(J.transporter.write({ method: A, path: m("1/indexes/%s/operation", de), data: { operation: "move", destination: pe } }, ye), function(Ae, Je) { return ce(J)(de, { methods: { waitTask: mr } }).waitTask(Ae.taskID, Je); }); }; }, je = function(J) { return function(de, pe) { return h(J.transporter.write({ method: A, path: "1/indexes/*/batch", data: { requests: de } }, pe), function(ye, Ae) { return Promise.all(Object.keys(ye.taskID).map(function(Je) { return ce(J)(Je, { methods: { waitTask: mr } }).waitTask(ye.taskID[Je], Ae); })); }); }; }, me = function(J) { return function(de, pe) { return J.transporter.read({ method: A, path: "1/indexes/*/objects", data: { requests: de } }, pe); }; }, Te = function(J) { return function(de, pe) { var ye = de.map(function(Ae) { return a(a({}, Ae), {}, { params: M(Ae.params || {}) }); }); return J.transporter.read({ method: A, path: "1/indexes/*/queries", data: { requests: ye }, cacheable: !0 }, pe); }; }, Ce = function(J) { return function(de, pe) { return Promise.all(de.map(function(ye) { var Ae = ye.params, Je = Ae.facetName, st = Ae.facetQuery, Ye = o(Ae, ["facetName", "facetQuery"]); return ce(J)(ye.indexName, { methods: { searchForFacetValues: K_ } }).searchForFacetValues(Je, st, a(a({}, pe), Ye)); })); }; }, Le = function(J) { return function(de, pe) { var ye = y(pe); return ye.queryParameters["X-Algolia-User-ID"] = de, J.transporter.write({ method: T, path: "1/clusters/mapping" }, ye); }; }, bt = function(J) { return function(de, pe, ye) { var Ae = pe.map(function(Je) { return { action: "addEntry", body: Je }; }); return h(J.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", de), data: { clearExistingDictionaryEntries: !0, requests: Ae } }, ye), function(Je, st) { return Gt(J)(Je.taskID, st); }); }; }, pt = function(J) { return function(de, pe) { return h(J.transporter.write({ method: A, path: m("1/keys/%s/restore", de) }, pe), function(ye, Ae) { return f(function(Je) { return De(J)(de, Ae).catch(function(st) { if (st.status !== 404) throw st; return Je(); }); }); }); }; }, Tt = function(J) { return function(de, pe, ye) { var Ae = pe.map(function(Je) { return { action: "addEntry", body: Je }; }); return h(J.transporter.write({ method: A, path: m("/1/dictionaries/%s/batch", de), data: { clearExistingDictionaryEntries: !1, requests: Ae } }, ye), function(Je, st) { return Gt(J)(Je.taskID, st); }); }; }, wt = function(J) { return function(de, pe, ye) { return J.transporter.read({ method: A, path: m("/1/dictionaries/%s/search", de), data: { query: pe }, cacheable: !0 }, ye); }; }, St = function(J) { return function(de, pe) { return J.transporter.read({ method: A, path: "1/clusters/mapping/search", data: { query: de } }, pe); }; }, rn = function(J) { return function(de, pe) { return h(J.transporter.write({ method: I, path: "/1/dictionaries/*/settings", data: de }, pe), function(ye, Ae) { return Gt(J)(ye.taskID, Ae); }); }; }, Bt = function(J) { return function(de, pe) { var ye = Object.assign({}, pe), Ae = pe || {}, Je = Ae.queryParameters, st = o(Ae, ["queryParameters"]), Ye = Je ? { queryParameters: Je } : {}, at = ["acl", "indexes", "referers", "restrictSources", "queryParameters", "description", "maxQueriesPerIPPerHour", "maxHitsPerQuery"]; return h(J.transporter.write({ method: I, path: m("1/keys/%s", de), data: Ye }, st), function(gt, ut) { return f(function(jt) { return De(J)(de, ut).then(function(zt) { return function(dn) { return Object.keys(ye).filter(function(on) { return at.indexOf(on) !== -1; }).every(function(on) { if (Array.isArray(dn[on]) && Array.isArray(ye[on])) { var Hn = dn[on]; return Hn.length === ye[on].length && Hn.every(function(or, Ya) { return or === ye[on][Ya]; }); } return dn[on] === ye[on]; }); }(zt) ? Promise.resolve() : jt(); }); }); }); }; }, Gt = function(J) { return function(de, pe) { return f(function(ye) { return Xe(J)(de, pe).then(function(Ae) { return Ae.status !== "published" ? ye() : void 0; }); }); }; }, sn = function(J) { return function(de, pe) { return h(J.transporter.write({ method: A, path: m("1/indexes/%s/batch", J.indexName), data: { requests: de } }, pe), function(ye, Ae) { return mr(J)(ye.taskID, Ae); }); }; }, an = function(J) { return function(de) { return W(a(a({ shouldStop: function(pe) { return pe.cursor === void 0; } }, de), {}, { request: function(pe) { return J.transporter.read({ method: A, path: m("1/indexes/%s/browse", J.indexName), data: pe }, de); } })); }; }, Qt = function(J) { return function(de) { var pe = a({ hitsPerPage: 1e3 }, de); return W(a(a({ shouldStop: function(ye) { return ye.hits.length < pe.hitsPerPage; } }, pe), {}, { request: function(ye) { return G_(J)("", a(a({}, pe), ye)).then(function(Ae) { return a(a({}, Ae), {}, { hits: Ae.hits.map(function(Je) { return delete Je._highlightResult, Je; }) }); }); } })); }; }, Sn = function(J) { return function(de) { var pe = a({ hitsPerPage: 1e3 }, de); return W(a(a({ shouldStop: function(ye) { return ye.hits.length < pe.hitsPerPage; } }, pe), {}, { request: function(ye) { return X_(J)("", a(a({}, pe), ye)).then(function(Ae) { return a(a({}, Ae), {}, { hits: Ae.hits.map(function(Je) { return delete Je._highlightResult, Je; }) }); }); } })); }; }, En = function(J) { return function(de, pe, ye) { var Ae = ye || {}, Je = Ae.batchSize, st = o(Ae, ["batchSize"]), Ye = { taskIDs: [], objectIDs: [] }; return h(function at() { var gt, ut = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, jt = []; for (gt = ut; gt < de.length && (jt.push(de[gt]), jt.length !== (Je || 1e3)); gt++) ; return jt.length === 0 ? Promise.resolve(Ye) : sn(J)(jt.map(function(zt) { return { action: pe, body: zt }; }), st).then(function(zt) { return Ye.objectIDs = Ye.objectIDs.concat(zt.objectIDs), Ye.taskIDs.push(zt.taskID), gt++, at(gt); }); }(), function(at, gt) { return Promise.all(at.taskIDs.map(function(ut) { return mr(J)(ut, gt); })); }); }; }, pn = function(J) { return function(de) { return h(J.transporter.write({ method: A, path: m("1/indexes/%s/clear", J.indexName) }, de), function(pe, ye) { return mr(J)(pe.taskID, ye); }); }; }, Et = function(J) { return function(de) { var pe = de || {}, ye = pe.forwardToReplicas, Ae = y(o(pe, ["forwardToReplicas"])); return ye && (Ae.queryParameters.forwardToReplicas = 1), h(J.transporter.write({ method: A, path: m("1/indexes/%s/rules/clear", J.indexName) }, Ae), function(Je, st) { return mr(J)(Je.taskID, st); }); }; }, Rt = function(J) { return function(de) { var pe = de || {}, ye = pe.forwardToReplicas, Ae = y(o(pe, ["forwardToReplicas"])); return ye && (Ae.queryParameters.forwardToReplicas = 1), h(J.transporter.write({ method: A, path: m("1/indexes/%s/synonyms/clear", J.indexName) }, Ae), function(Je, st) { return mr(J)(Je.taskID, st); }); }; }, qt = function(J) { return function(de, pe) { return h(J.transporter.write({ method: A, path: m("1/indexes/%s/deleteByQuery", J.indexName), data: de }, pe), function(ye, Ae) { return mr(J)(ye.taskID, Ae); }); }; }, _n = function(J) { return function(de) { return h(J.transporter.write({ method: T, path: m("1/indexes/%s", J.indexName) }, de), function(pe, ye) { return mr(J)(pe.taskID, ye); }); }; }, $r = function(J) { return function(de, pe) { return h(R(J)([de], pe).then(function(ye) { return { taskID: ye.taskIDs[0] }; }), function(ye, Ae) { return mr(J)(ye.taskID, Ae); }); }; }, R = function(J) { return function(de, pe) { var ye = de.map(function(Ae) { return { objectID: Ae }; }); return En(J)(ye, bp.DeleteObject, pe); }; }, ie = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Je = y(o(ye, ["forwardToReplicas"])); return Ae && (Je.queryParameters.forwardToReplicas = 1), h(J.transporter.write({ method: T, path: m("1/indexes/%s/rules/%s", J.indexName, de) }, Je), function(st, Ye) { return mr(J)(st.taskID, Ye); }); }; }, Ie = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Je = y(o(ye, ["forwardToReplicas"])); return Ae && (Je.queryParameters.forwardToReplicas = 1), h(J.transporter.write({ method: T, path: m("1/indexes/%s/synonyms/%s", J.indexName, de) }, Je), function(st, Ye) { return mr(J)(st.taskID, Ye); }); }; }, Ke = function(J) { return function(de) { return zo(J)(de).then(function() { return !0; }).catch(function(pe) { if (pe.status !== 404) throw pe; return !1; }); }; }, Jt = function(J) { return function(de, pe, ye) { return J.transporter.read({ method: A, path: m("1/answers/%s/prediction", J.indexName), data: { query: de, queryLanguages: pe }, cacheable: !0 }, ye); }; }, fn = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.query, Je = ye.paginate, st = o(ye, ["query", "paginate"]), Ye = 0; return function at() { return W_(J)(Ae || "", a(a({}, st), {}, { page: Ye })).then(function(gt) { for (var ut = 0, jt = Object.entries(gt.hits); ut < jt.length; ut++) { var zt = i(jt[ut], 2), dn = zt[0], on = zt[1]; if (de(on)) return { object: on, position: parseInt(dn, 10), page: Ye }; } if (Ye++, Je === !1 || Ye >= gt.nbPages) throw { name: "ObjectNotFoundError", message: "Object not found." }; return at(); }); }(); }; }, cn = function(J) { return function(de, pe) { return J.transporter.read({ method: F, path: m("1/indexes/%s/%s", J.indexName, de) }, pe); }; }, tn = function() { return function(J, de) { for (var pe = 0, ye = Object.entries(J.hits); pe < ye.length; pe++) { var Ae = i(ye[pe], 2), Je = Ae[0]; if (Ae[1].objectID === de) return parseInt(Je, 10); } return -1; }; }, Xt = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.attributesToRetrieve, Je = o(ye, ["attributesToRetrieve"]), st = de.map(function(Ye) { return a({ indexName: J.indexName, objectID: Ye }, Ae ? { attributesToRetrieve: Ae } : {}); }); return J.transporter.read({ method: A, path: "1/indexes/*/objects", data: { requests: st } }, Je); }; }, Ur = function(J) { return function(de, pe) { return J.transporter.read({ method: F, path: m("1/indexes/%s/rules/%s", J.indexName, de) }, pe); }; }, zo = function(J) { return function(de) { return J.transporter.read({ method: F, path: m("1/indexes/%s/settings", J.indexName), data: { getVersion: 2 } }, de); }; }, bc = function(J) { return function(de, pe) { return J.transporter.read({ method: F, path: m("1/indexes/%s/synonyms/%s", J.indexName, de) }, pe); }; }, wc = function(J) { return function(de, pe) { return h(yp(J)([de], pe).then(function(ye) { return { objectID: ye.objectIDs[0], taskID: ye.taskIDs[0] }; }), function(ye, Ae) { return mr(J)(ye.taskID, Ae); }); }; }, yp = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.createIfNotExists, Je = o(ye, ["createIfNotExists"]), st = Ae ? bp.PartialUpdateObject : bp.PartialUpdateObjectNoCreate; return En(J)(de, st, Je); }; }, Yn = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.safe, Je = ye.autoGenerateObjectIDIfNotExist, st = ye.batchSize, Ye = o(ye, ["safe", "autoGenerateObjectIDIfNotExist", "batchSize"]), at = function(on, Hn, or, Ya) { return h(J.transporter.write({ method: A, path: m("1/indexes/%s/operation", on), data: { operation: or, destination: Hn } }, Ya), function(Yh, Za) { return mr(J)(Yh.taskID, Za); }); }, gt = Math.random().toString(36).substring(7), ut = "".concat(J.indexName, "_tmp_").concat(gt), jt = Rn({ appId: J.appId, transporter: J.transporter, indexName: ut }), zt = [], dn = at(J.indexName, ut, "copy", a(a({}, Ye), {}, { scope: ["settings", "synonyms", "rules"] })); return zt.push(dn), h((Ae ? dn.wait(Ye) : dn).then(function() { var on = jt(de, a(a({}, Ye), {}, { autoGenerateObjectIDIfNotExist: Je, batchSize: st })); return zt.push(on), Ae ? on.wait(Ye) : on; }).then(function() { var on = at(ut, J.indexName, "move", Ye); return zt.push(on), Ae ? on.wait(Ye) : on; }).then(function() { return Promise.all(zt); }).then(function(on) { var Hn = i(on, 3), or = Hn[0], Ya = Hn[1], Yh = Hn[2]; return { objectIDs: Ya.objectIDs, taskIDs: [or.taskID].concat(s(Ya.taskIDs), [Yh.taskID]) }; }), function(on, Hn) { return Promise.all(zt.map(function(or) { return or.wait(Hn); })); }); }; }, Hs = function(J) { return function(de, pe) { return Ox(J)(de, a(a({}, pe), {}, { clearExistingRules: !0 })); }; }, xc = function(J) { return function(de, pe) { return Fx(J)(de, a(a({}, pe), {}, { clearExistingSynonyms: !0 })); }; }, So = function(J) { return function(de, pe) { return h(Rn(J)([de], pe).then(function(ye) { return { objectID: ye.objectIDs[0], taskID: ye.taskIDs[0] }; }), function(ye, Ae) { return mr(J)(ye.taskID, Ae); }); }; }, Rn = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.autoGenerateObjectIDIfNotExist, Je = o(ye, ["autoGenerateObjectIDIfNotExist"]), st = Ae ? bp.AddObject : bp.UpdateObject; if (st === bp.UpdateObject) { var Ye = !0, at = !1, gt = void 0; try { for (var ut, jt = de[Symbol.iterator](); !(Ye = (ut = jt.next()).done); Ye = !0) if (ut.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 (zt) { at = !0, gt = zt; } finally { try { Ye || jt.return == null || jt.return(); } finally { if (at) throw gt; } } } return En(J)(de, st, Je); }; }, Xh = function(J) { return function(de, pe) { return Ox(J)([de], pe); }; }, Ox = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Je = ye.clearExistingRules, st = y(o(ye, ["forwardToReplicas", "clearExistingRules"])); return Ae && (st.queryParameters.forwardToReplicas = 1), Je && (st.queryParameters.clearExistingRules = 1), h(J.transporter.write({ method: A, path: m("1/indexes/%s/rules/batch", J.indexName), data: de }, st), function(Ye, at) { return mr(J)(Ye.taskID, at); }); }; }, iG = function(J) { return function(de, pe) { return Fx(J)([de], pe); }; }, Fx = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Je = ye.clearExistingSynonyms, st = ye.replaceExistingSynonyms, Ye = y(o(ye, ["forwardToReplicas", "clearExistingSynonyms", "replaceExistingSynonyms"])); return Ae && (Ye.queryParameters.forwardToReplicas = 1), (st || Je) && (Ye.queryParameters.replaceExistingSynonyms = 1), h(J.transporter.write({ method: A, path: m("1/indexes/%s/synonyms/batch", J.indexName), data: de }, Ye), function(at, gt) { return mr(J)(at.taskID, gt); }); }; }, W_ = function(J) { return function(de, pe) { return J.transporter.read({ method: A, path: m("1/indexes/%s/query", J.indexName), data: { query: de }, cacheable: !0 }, pe); }; }, K_ = function(J) { return function(de, pe, ye) { return J.transporter.read({ method: A, path: m("1/indexes/%s/facets/%s/query", J.indexName, de), data: { facetQuery: pe }, cacheable: !0 }, ye); }; }, G_ = function(J) { return function(de, pe) { return J.transporter.read({ method: A, path: m("1/indexes/%s/rules/search", J.indexName), data: { query: de } }, pe); }; }, X_ = function(J) { return function(de, pe) { return J.transporter.read({ method: A, path: m("1/indexes/%s/synonyms/search", J.indexName), data: { query: de } }, pe); }; }, sG = function(J) { return function(de, pe) { var ye = pe || {}, Ae = ye.forwardToReplicas, Je = y(o(ye, ["forwardToReplicas"])); return Ae && (Je.queryParameters.forwardToReplicas = 1), h(J.transporter.write({ method: I, path: m("1/indexes/%s/settings", J.indexName), data: de }, Je), function(st, Ye) { return mr(J)(st.taskID, Ye); }); }; }, mr = function(J) { return function(de, pe) { return f(function(ye) { return (/* @__PURE__ */ function(Ae) { return function(Je, st) { return Ae.transporter.read({ method: F, path: m("1/indexes/%s/task/%s", Ae.indexName, Je.toString()) }, st); }; }(J))(de, pe).then(function(Ae) { return Ae.status !== "published" ? ye() : void 0; }); }); }; }, bp = { AddObject: "addObject", UpdateObject: "updateObject", PartialUpdateObject: "partialUpdateObject", PartialUpdateObjectNoCreate: "partialUpdateObjectNoCreate", DeleteObject: "deleteObject", DeleteIndex: "delete", ClearIndex: "clear" }, Ax = { Settings: "settings", Synonyms: "synonyms", Rules: "rules" }, lG = 1, uG = 2, cG = 3, Nm = function(J) { return function(de, pe) { var ye = de.map(function(Ae) { return a(a({}, Ae), {}, { threshold: Ae.threshold || 0 }); }); return J.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }, dG = function(J) { return function(de, pe) { return Nm(J)(de.map(function(ye) { return a(a({}, ye), {}, { fallbackParameters: {}, model: "bought-together" }); }), pe); }; }, pG = function(J) { return function(de, pe) { return Nm(J)(de.map(function(ye) { return a(a({}, ye), {}, { model: "related-products" }); }), pe); }; }, fG = function(J) { return function(de, pe) { var ye = de.map(function(Ae) { return a(a({}, Ae), {}, { model: "trending-facets", threshold: Ae.threshold || 0 }); }); return J.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }, hG = function(J) { return function(de, pe) { var ye = de.map(function(Ae) { return a(a({}, Ae), {}, { model: "trending-items", threshold: Ae.threshold || 0 }); }); return J.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }, vG = function(J) { return function(de, pe) { return Nm(J)(de.map(function(ye) { return a(a({}, ye), {}, { model: "looking-similar" }); }), pe); }; }, gG = function(J) { return function(de, pe) { var ye = de.map(function(Ae) { return a(a({}, Ae), {}, { model: "recommended-for-you", threshold: Ae.threshold || 0 }); }); return J.transporter.read({ method: A, path: "1/indexes/*/recommendations", data: { requests: ye }, cacheable: !0 }, pe); }; }; function Y_(J, de, pe) { var ye, Ae = { appId: J, apiKey: de, timeouts: { connect: 1, read: 2, write: 30 }, requester: { send: function(Ye) { return new Promise(function(at) { var gt = new XMLHttpRequest(); gt.open(Ye.method, Ye.url, !0), Object.keys(Ye.headers).forEach(function(dn) { return gt.setRequestHeader(dn, Ye.headers[dn]); }); var ut, jt = function(dn, on) { return setTimeout(function() { gt.abort(), at({ status: 0, content: on, isTimedOut: !0 }); }, 1e3 * dn); }, zt = jt(Ye.connectTimeout, "Connection timeout"); gt.onreadystatechange = function() { gt.readyState > gt.OPENED && ut === void 0 && (clearTimeout(zt), ut = jt(Ye.responseTimeout, "Socket timeout")); }, gt.onerror = function() { gt.status === 0 && (clearTimeout(zt), clearTimeout(ut), at({ content: gt.responseText || "Network request failed", status: gt.status, isTimedOut: !1 })); }, gt.onload = function() { clearTimeout(zt), clearTimeout(ut), at({ content: gt.responseText, status: gt.status, isTimedOut: !1 }); }, gt.send(Ye.data); }); } }, logger: (ye = cG, { debug: function(Ye, at) { return lG >= ye && console.debug(Ye, at), Promise.resolve(); }, info: function(Ye, at) { return uG >= ye && console.info(Ye, at), Promise.resolve(); }, error: function(Ye, at) { return console.error(Ye, at), Promise.resolve(); } }), responsesCache: c(), requestsCache: c({ serializable: !1 }), hostsCache: u({ caches: [l({ key: "".concat("4.23.2", "-").concat(J) }), c()] }), userAgent: P("4.23.2").add({ segment: "Browser" }) }, Je = a(a({}, Ae), pe), st = function() { return function(Ye) { return function(at) { var gt = at.region || "us", ut = d(g.WithinHeaders, at.appId, at.apiKey), jt = z(a(a({ hosts: [{ url: "personalization.".concat(gt, ".algolia.com") }] }, at), {}, { headers: a(a(a({}, ut.headers()), { "content-type": "application/json" }), at.headers), queryParameters: a(a({}, ut.queryParameters()), at.queryParameters) })); return v({ appId: at.appId, transporter: jt }, at.methods); }(a(a(a({}, Ae), Ye), {}, { methods: { getPersonalizationStrategy: se, setPersonalizationStrategy: ne } })); }; }; return function(Ye) { var at = Ye.appId, gt = d(Ye.authMode !== void 0 ? Ye.authMode : g.WithinHeaders, at, Ye.apiKey), ut = z(a(a({ hosts: [{ url: "".concat(at, "-dsn.algolia.net"), accept: x.Read }, { url: "".concat(at, ".algolia.net"), accept: x.Write }].concat(p([{ url: "".concat(at, "-1.algolianet.com") }, { url: "".concat(at, "-2.algolianet.com") }, { url: "".concat(at, "-3.algolianet.com") }])) }, Ye), {}, { headers: a(a(a({}, gt.headers()), { "content-type": "application/x-www-form-urlencoded" }), Ye.headers), queryParameters: a(a({}, gt.queryParameters()), Ye.queryParameters) })); return v({ transporter: ut, appId: at, addAlgoliaAgent: function(jt, zt) { ut.userAgent.add({ segment: jt, version: zt }); }, clearCache: function() { return Promise.all([ut.requestsCache.clear(), ut.responsesCache.clear()]).then(function() { }); } }, Ye.methods); }(a(a({}, Je), {}, { methods: { search: Te, searchForFacetValues: Ce, multipleBatch: je, multipleGetObjects: me, multipleQueries: Te, copyIndex: Ne, copySettings: Fe, copySynonyms: Se, copyRules: xe, moveIndex: Ve, listIndices: fe, getLogs: Ze, listClusters: ke, multipleSearchForFacetValues: Ce, getApiKey: De, addApiKey: Y, listApiKeys: oe, updateApiKey: Bt, deleteApiKey: Me, restoreApiKey: pt, assignUserID: re, assignUserIDs: we, getUserID: j, searchUserIDs: St, listUserIDs: Ee, getTopUserIDs: E, removeUserID: Le, hasPendingMappings: le, clearDictionaryEntries: Oe, deleteDictionaryEntries: He, getDictionarySettings: Ge, getAppTask: Xe, replaceDictionaryEntries: bt, saveDictionaryEntries: Tt, searchDictionaryEntries: wt, setDictionarySettings: rn, waitAppTask: Gt, customRequest: Pe, initIndex: function(Ye) { return function(at) { return ce(Ye)(at, { methods: { batch: sn, delete: _n, findAnswers: Jt, getObject: cn, getObjects: Xt, saveObject: So, saveObjects: Rn, search: W_, searchForFacetValues: K_, waitTask: mr, setSettings: sG, getSettings: zo, partialUpdateObject: wc, partialUpdateObjects: yp, deleteObject: $r, deleteObjects: R, deleteBy: qt, clearObjects: pn, browseObjects: an, getObjectPosition: tn, findObject: fn, exists: Ke, saveSynonym: iG, saveSynonyms: Fx, getSynonym: bc, searchSynonyms: X_, browseSynonyms: Sn, deleteSynonym: Ie, clearSynonyms: Rt, replaceAllObjects: Yn, replaceAllSynonyms: xc, searchRules: G_, getRule: Ur, deleteRule: ie, saveRule: Xh, saveRules: Ox, replaceAllRules: Hs, browseRules: Qt, clearRules: Et } }); }; }, initAnalytics: function() { return function(Ye) { return function(at) { var gt = at.region || "us", ut = d(g.WithinHeaders, at.appId, at.apiKey), jt = z(a(a({ hosts: [{ url: "analytics.".concat(gt, ".algolia.com") }] }, at), {}, { headers: a(a(a({}, ut.headers()), { "content-type": "application/json" }), at.headers), queryParameters: a(a({}, ut.queryParameters()), at.queryParameters) })); return v({ appId: at.appId, transporter: jt }, at.methods); }(a(a(a({}, Ae), Ye), {}, { methods: { addABTest: X, getABTest: ue, getABTests: ve, stopABTest: ge, deleteABTest: ee } })); }; }, initPersonalization: st, initRecommendation: function() { return function(Ye) { return Je.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."), st()(Ye); }; }, getRecommendations: Nm, getFrequentlyBoughtTogether: dG, getLookingSimilar: vG, getRecommendedForYou: gG, getRelatedProducts: pG, getTrendingFacets: fG, getTrendingItems: hG } })); } return Y_.version = "4.23.2", Y_; }); })(ZK); var Eit = ZK.exports; const _it = /* @__PURE__ */ _Oe(Eit); class QK { constructor(t, n, r = "https://api.pennsieve.io") { this.client = _it( 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 a = [], o = 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 y = g.split("."); return y.length !== 2 || h === y[0] && m.push({ label: y[1], id: o++, facetPropPath: `${l ? l.facetSubpropPath : void 0}` }), m; }, []); let v = { label: h, id: o++, facetPropPath: s }; p.length > 0 && (v.children = p), u.push(v); }), u.length > 0 && a.push({ label: l ? l.label : "", id: o++, children: u, key: s }); }), a)); } // 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((a) => a.json()).then((a) => { r(a.map((o) => o.doi)); }); }); } // Get all dois given a list of discoverIds _expandDois(t, n = "https://api.pennsieve.io") { return new Promise((r) => { let a = t.map((o) => this._discoverAllDois(o, n)); Promise.all(a).then((o) => { r(o.flat()); }); }); } _processResultsForCards(t) { let n = [], r = {}; for (let a of t) r = { ...a }, r = { anatomy: a.anatomy ? a.anatomy.organ.map((o) => o.curie) : void 0, doi: a.item.curie.split(":")[1], name: a.item.name, description: a.item.description, updated: a.pennsieve ? a.pennsieve.updatedAt : void 0, publishDate: a.pennsieve ? a.pennsieve.publishDate : void 0, datasetId: a.objectID, detailsReady: !1 }, n.push(r); return n; } _processAnatomy(t) { let n = [], r = [], a = [], o = []; 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)); }); }), o = [...new Set(n)], a = [...new Set(r)], this.anatomyFacetLabels = a, o; } _processUberonURL(t) { return t.split("/").pop().replace("_", ":"); } /** * Get Search results * This is using fetch from the Algolia API */ search(t, n = "", r = 10, a = 1) { return new Promise((o) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: a - 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]) }; o(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, a = 1) { return new Promise((o) => { this.index.search(n, { facets: ["*"], hitsPerPage: r, page: a - 1, filters: t, attributesToHighlight: [], attributesToRetrieve: [ "objectID", "item.keywords.keyword", "anatomy.organ.name", "anatomy.organ.curie" ] }).then((i) => { o({ 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((a) => { a.name && (n[a.name] ? n[a.name]++ : n[a.name] = 1); }); }), n; } } const q_ = [ { 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" } ]; function ZP(e = void 0) { if (e === void 0) return "NOT item.published.status:embargo"; e.forEach((r) => r.label = r.facet); let t = Tit(e), n = "NOT item.published.status:embargo"; return n = `(${n}) AND `, q_.map((r) => r.facetPropPath).map((r) => { let a = t.filter( (s) => s.facetPropPath == r ), o = "", i = ""; a.map((s) => { let l = s.facetSubPropPath ? s.facetSubPropPath : r; s.AND ? i += `AND "${l}":"${s.label}"` : o += `"${l}":"${s.label}" OR `; }), !(o == "" && i == "") && (o = `(${o.substring(0, o.lastIndexOf(" OR "))})`, n += `${o + i} AND `, n = n.split("()AND ").join("")); }), n.substring(0, n.lastIndexOf(" AND ")); } function Tit(e) { return e.filter((t) => t.label !== "Show all"); } const c2 = function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, xC = function(e) { const t = e.toLowerCase(); return Ub[t] ? c2(Ub[t]) : c2(t); }, $it = { name: "SearchFilters", components: { MapSvgIcon: vit, MapSvgSpriteColor: Sit, Option: Iw, Select: um, Popover: oE, Cascader: mV }, 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: [], 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 = Oi({}), t = Oi({ 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(q_).then((t) => { this.facets = t, yr.emit("available-facets", t), this.options = t, this.options.forEach((n, r) => { this.options[r].total = this.countTotalFacet(n), this.options[r].label = xC(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((a, o) => { this.options[r].children[o].label = xC( a.label ), this.options[r].children[o].value = this.createCascaderItemValue(n.label, a.label), this.options[r].children[o].children && this.options[r].children[o].children.length > 0 && this.options[r].children[o].children.forEach((i, s) => { this.options[r].children[o].children[s].label = xC(i.label), this.options[r].children[o].children[s].value = this.createCascaderItemValue( n.label, a.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], a = n[1], o = this.options.filter((s) => s.label == r)[0], i = o.key; for (let s = 0; s < o.children.length; s++) { const l = o.children[s], u = l.label, c = l.value; if (Array.isArray(a)) if (a.length === 0 && u.toLowerCase() === "show all") { t.push([i, c]); break; } else u !== e && a.includes(u) && t.push([i, c]); else Object.entries(a).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: a } = t; this.correctnessCheck.term.has(a) && this.correctnessCheck.facet.has(n) && (r ? this.correctnessCheck.facet2.has(r) && (a in this.cascaderTags ? n in this.cascaderTags[a] ? this.cascaderTags[a][n].push(r) : this.cascaderTags[a][n] = [r] : (this.cascaderTags[a] = {}, this.cascaderTags[a][n] = [r])) : a in this.cascaderTags && a !== "Anatomical structure" ? this.cascaderTags[a].push(n) : n.toLowerCase() !== "show all" ? this.cascaderTags[a] = [n] : this.cascaderTags[a] = []); }), 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, a = n.children.filter((i) => i.label === "Show all")[0].value, o = n.total; t[r] === o && (e = e.filter((i) => i[0] !== n.key), delete t[r]), r in t || e.unshift([r, a]); }), 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 a = 0; this.__expandItem__.length > 1 && (a = 1); const o = t.filter((s) => s[a] == this.__expandItem__[a]), i = t.filter((s) => s[a] !== this.__expandItem__[a]); t = [...o, ...i]; } let n = t.filter((a) => a !== void 0).map((a) => { let { hString: o, bString: i } = this.findHierarachyStringAndBooleanString(a), { facet: s, facet2: l, term: u } = this.getFacetsFromHierarchyString(o); return { facetPropPath: a[0], facet: s, facet2: l, term: u, AND: i // for setting the boolean }; }), r = t.filter((a) => a !== void 0).map((a) => { let o, i = a[0].includes("duplicate") ? a[0].split("duplicate")[0] : a[0], { hString: s, bString: l } = this.findHierarachyStringAndBooleanString(a), { facet: u, facet2: c, term: d } = this.getFacetsFromHierarchyString(s); return c && (u = c, o = "anatomy.organ.name"), { facetPropPath: i, facet: u, term: d, AND: l, // for setting the boolean facetSubPropPath: o // will be used for filters if we are at the third level of the cascader }; }); this.$emit("loading", !0), this.$emit("filterResults", r), this.setCascader(n), this.cssMods(); } }, //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, a = e.split(">"); return a.length == 3 ? (r = a[2], t = a[1], n = a[0]) : (t = a[1], n = a[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 a; for (let o = n[r].length - 1; o >= 0; o--) if (n[r][o][1].toLowerCase().includes("show all")) { a = n[r].splice(o, 1)[0]; break; } a ? this.previousShowAllChecked[r] && n[r].length > 0 ? t.push(...n[r]) : t.push(a) : t.push(...n[r]); } return t.sort((r, a) => this.__expandItem__ ? r[0] == this.__expandItem__ ? a[0] == this.__expandItem__ ? 0 : -1 : a[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(c2(n.term), n.facet) ]; return n.facet2 && r.push( this.createCascaderItemValue( c2(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) { if (e && e.facet && e.term) { if (e.facet2) return e; for (const t of this.options) if (t.value === e.facetPropPath) for (const n of t.children) { if (n.label === e.facet) return e; if (n.children && n.children.length > 0) { for (const r of n.children) if (r.label === e.facet) return e.facet2 = r.label, e.facet = n.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 = Oi(new QK( 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"); }); } }, Oit = (e) => (ma("data-v-88a79b0f"), e = e(), ya(), e), Fit = { class: "filters" }, Ait = { key: 0, class: "cascader-tag" }, Iit = { class: "el-tags-container" }, Pit = { class: "el-tags-container" }, Lit = { class: "search-filters transition-box" }, Nit = { key: 0, class: "filter-default-value" }, Mit = /* @__PURE__ */ Oit(() => /* @__PURE__ */ K("div", null, [ /* @__PURE__ */ K("strong", null, "Within categories:"), /* @__PURE__ */ ze(" OR "), /* @__PURE__ */ K("br"), /* @__PURE__ */ ze(" example: 'heart' OR 'colon' "), /* @__PURE__ */ K("br"), /* @__PURE__ */ K("br"), /* @__PURE__ */ K("strong", null, "Between categories:"), /* @__PURE__ */ ze(" AND "), /* @__PURE__ */ K("br"), /* @__PURE__ */ ze(" example: 'rat' AND 'lung' ") ], -1)), Dit = { class: "dataset-shown" }, Bit = { class: "dataset-results-feedback" }; function Rit(e, t, n, r, a, o) { const i = lt("MapSvgSpriteColor"), s = Uf, l = oE, u = mV, c = lt("MapSvgIcon"), d = Iw, f = um, h = Pw; return $(), B("div", Fit, [ Z(i), e.presentTags.length > 0 ? ($(), B("div", Ait, [ Z(s, { class: "ml-2", type: "info", closable: "", onClose: t[0] || (t[0] = (p) => o.cascadeTagClose(e.presentTags[0])) }, { default: q(() => [ ze(_e(e.presentTags[0]), 1) ]), _: 1 }), e.presentTags.length > 1 ? ($(), ae(l, { key: 0, placement: "bottom-start", width: 200, trigger: "hover" }, { default: q(() => [ K("div", Iit, [ ($(!0), B(Ue, null, yt(e.presentTags.slice(1), (p, v) => ($(), ae(s, { key: v, class: "ml-2", type: "info", closable: "", onClose: (m) => o.cascadeTagClose(p) }, { default: q(() => [ ze(_e(p), 1) ]), _: 2 }, 1032, ["onClose"]))), 128)) ]) ]), reference: q(() => [ K("div", Pit, [ e.presentTags.length > 1 ? ($(), ae(s, { key: 0, class: "ml-2", type: "info" }, { default: q(() => [ ze(" +" + _e(e.presentTags.length - 1), 1) ]), _: 1 })) : te("", !0) ]) ]), _: 1 })) : te("", !0) ])) : te("", !0), Z(lr, { name: "el-zoom-in-top" }, { default: q(() => [ qe(($(), B("span", Lit, [ Z(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) => o.cascadeEvent(p)), onExpandChange: o.cascadeExpandChange, "show-all-levels": !0, "popper-class": "sidebar-cascader-popper" }, null, 8, ["modelValue", "options", "props", "onExpandChange"]), e.showFiltersText ? ($(), B("div", Nit, "Filters")) : te("", !0), Z(l, { title: "How do filters work?", width: "250", trigger: "hover", "append-to-body": !1, "popper-class": "popover" }, { reference: q(() => [ Z(c, { icon: "help", class: "help" }) ]), default: q(() => [ Mit ]), _: 1 }) ])), [ [ct, e.showFilters], [h, !e.cascaderIsReady] ]) ]), _: 1 }), K("div", Dit, [ K("span", Bit, _e(o.numberOfResultsText), 1), Z(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) => o.numberShownChanged(p)) }, { default: q(() => [ ($(!0), B(Ue, null, yt(e.numberDatasetsShown, (p) => ($(), ae(d, { key: p, label: p, value: p }, null, 8, ["label", "value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]); } const JK = /* @__PURE__ */ Zi($it, [["render", Rit], ["__scopeId", "data-v-88a79b0f"]]); var zit = async function(e) { if (!e.ok) { let t = await e.json(); throw t ? new Error(t.message) : new Error(e); } return e; }, Vit = { searchInput: "", lastSearch: "", results: [], numberOfHits: 0, filter: [], loadingCards: !1, numberPerPage: 10, page: 1, pageModel: 1, start: 0, hasSearched: !1, contextCardEnabled: !1 }; const jit = { components: { SearchFilters: JK, DatasetCard: fK, SearchHistory: hK, Button: Bo, Card: aV, Drawer: nE, Icon: tr, Input: Ow, Pagination: $V }, name: "SideBarContent", props: { visible: { type: Boolean, default: !1 }, isDrawer: { type: Boolean, default: !0 }, entry: { type: Object, default: () => Vit }, 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 = "") { 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 && (this.searchAlgolia(this.filter, t), this.$refs.filtersRef.setCascader(this.filter))) : (this.filter = e, (!e || e.length == 0) && 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.resetPageNavigation(), this.searchAlgolia(this.filters, this.searchInput), this.$refs.searchHistory.selectValue = "Full search history"; }, searchEvent: function(e = !1) { (e.keyCode === 13 || e instanceof MouseEvent) && (this.resetPageNavigation(), this.searchAlgolia(this.filters, this.searchInput), this.$refs.searchHistory.selectValue = "Full search history", this.$refs.searchHistory.addSearchToHistory( this.filters, this.searchInput )); }, filterUpdate: function(e) { this.filters = [...e], this.resetPageNavigation(), this.searchAlgolia(e, this.searchInput), this.$emit("search-changed", { value: e, type: "filter-update" }); }, searchAlgolia(e, t = "") { this.loadingCards = !0, this.algoliaClient.anatomyInSearch(ZP(e), t).then((n) => { yr.emit("anatomy-in-datasets", n.forFlatmap), yr.emit("number-of-datasets-for-anatomies", n.forScaffold); }), this.algoliaClient.search(ZP(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, a) => { let o = this.envVars.API_LOCATION + this.searchEndpoint + "?" + this.createfilterParams(t); fetch(o, { signal: n }).then(zit).then((i) => i.json()).then((i) => r(i)).catch((i) => a(i)); }); }, getAlgoliaFacets: async function() { return await this.algoliaClient.getAlgoliaFacets( q_ ); }, searchHistorySearch: function(e) { this.searchInput = e.search, this.filters = e.filters, this.openSearch(e.filters, e.search); } }, mounted: function() { this.algoliaClient = Oi(new QK( 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/"; } }, Hit = { class: "header" }, Uit = { class: "content scrollbar", ref: "content" }, qit = { key: 0, class: "error-feedback" }; function Wit(e, t, n, r, a, o) { const i = Ow, s = Bo, l = JK, u = hK, c = fK, d = $V, f = aV, h = Pw; return $(), ae(f, { "body-style": e.bodyStyle, class: "content-card" }, { header: q(() => [ K("div", Hit, [ Z(i, { class: "search-input", placeholder: "Search", modelValue: e.searchInput, "onUpdate:modelValue": t[0] || (t[0] = (p) => e.searchInput = p), onKeyup: o.searchEvent, clearable: "", onClear: o.clearSearchClicked }, null, 8, ["modelValue", "onKeyup", "onClear"]), Z(s, { type: "primary", class: "button", onClick: o.searchEvent, size: "large" }, { default: q(() => [ ze(" Search ") ]), _: 1 }, 8, ["onClick"]) ]) ]), default: q(() => [ Z(l, { class: "filters", ref: "filtersRef", entry: o.filterEntry, envVars: n.envVars, onFilterResults: o.filterUpdate, onNumberPerPage: o.numberPerPageUpdate, onLoading: o.filtersLoading, onCascaderReady: o.cascaderReady }, null, 8, ["entry", "envVars", "onFilterResults", "onNumberPerPage", "onLoading", "onCascaderReady"]), Z(u, { ref: "searchHistory", onSearch: o.searchHistorySearch }, null, 8, ["onSearch"]), qe(($(), B("div", Uit, [ e.results.length === 0 && !e.loadingCards ? ($(), B("div", qit, " No results found - Please change your search / filter criteria. ")) : te("", !0), ($(!0), B(Ue, null, yt(e.results, (p) => ($(), B("div", { key: p.doi, class: "step-item" }, [ Z(c, { class: "dataset-card", entry: p, envVars: n.envVars, onMouseenter: (v) => o.hoverChanged(p), onMouseleave: t[1] || (t[1] = (v) => o.hoverChanged(void 0)) }, null, 8, ["entry", "envVars", "onMouseenter"]) ]))), 128)), Z(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: o.pageChange }, null, 8, ["current-page", "page-size", "total", "onCurrentChange"]) ])), [ [h, e.loadingCards] ]) ]), _: 1 }, 8, ["body-style"]); } const eG = /* @__PURE__ */ Zi(jit, [["render", Wit], ["__scopeId", "data-v-7574b21a"]]), Kit = { name: "AnnotationTool", components: { AnnotationPopup: EZe, Button: Bo, CreateTooltipContent: FZe, Col: wV, ElIconDelete: tF, Icon: tr, Row: bV }, props: { annotationEntry: { type: Object }, createData: { type: Object, default: {} } }, data: function() { return { ElIconDelete: un(tF) }; } }, Git = { class: "annotation-tool scrollbar" }, Xit = { key: 1, class: "delete-container" }; function Yit(e, t, n, r, a, o) { const i = lt("CreateTooltipContent"), s = lt("annotation-popup"), l = wV, u = Bo, c = bV; return $(), B("div", Git, [ qe(Z(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"]), [ [ct, n.createData && n.createData.toBeConfirmed] ]), n.annotationEntry && (!n.createData || !n.createData.toBeConfirmed) ? ($(), ae(s, { key: 0, class: "annotation-popup", annotationEntry: n.annotationEntry, onAnnotation: t[2] || (t[2] = (d) => e.$emit("annotation", d)) }, null, 8, ["annotationEntry"])) : te("", !0), n.createData && n.createData.toBeDeleted ? ($(), B("div", Xit, [ Z(c, null, { default: q(() => [ Z(l, { offset: 1, span: 6 }, { default: q(() => [ ze("Delete this feature?") ]), _: 1 }), Z(l, { offset: 1, span: 3 }, { default: q(() => [ Z(u, { class: "delete-button", icon: e.ElIconDelete, onClick: t[3] || (t[3] = (d) => e.$emit("confirm-delete")) }, { default: q(() => [ ze(" Delete ") ]), _: 1 }, 8, ["icon"]) ]), _: 1 }), Z(l, { offset: 1, span: 2 }, { default: q(() => [ Z(u, { class: "delete-button", onClick: t[4] || (t[4] = (d) => e.$emit("cancel-create")) }, { default: q(() => [ ze(" Dismiss ") ]), _: 1 }) ]), _: 1 }) ]), _: 1 }) ])) : te("", !0) ]); } const tG = /* @__PURE__ */ Zi(Kit, [["render", Yit], ["__scopeId", "data-v-de83d649"]]), Zit = { name: "ExternalResourceCard", components: { Button: Bo }, props: { resources: { type: Array, default: () => [] } }, data: function() { return { pubmeds: [], pubmedIds: [], ElIconNotebook: un(V8e) }; }, methods: { capitalise: function(e) { return e.charAt(0).toUpperCase() + e.slice(1); }, openUrl: function(e) { yr.emit("open-pubmed-url", e), window.open(e, "_blank"); } } }, Qit = { class: "resource-container" }; function Jit(e, t, n, r, a, o) { const i = Bo; return $(), B("div", Qit, [ ($(!0), B(Ue, null, yt(n.resources, (s) => ($(), B("div", { key: s.id, class: "resource" }, [ s.id === "pubmed" ? ($(), ae(i, { key: 0, class: "button", id: "open-pubmed-button", icon: e.ElIconNotebook, onClick: (l) => o.openUrl(s.url) }, { default: q(() => [ ze(" Open publications in PubMed ") ]), _: 2 }, 1032, ["icon", "onClick"])) : te("", !0) ]))), 128)) ]); } const nG = /* @__PURE__ */ Zi(Zit, [["render", Jit], ["__scopeId", "data-v-e726c314"]]), est = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), Ov = function(e) { return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""; }, tst = 3e3, nst = { name: "ConnectivityInfo", components: { Button: Bo, Container: ZFe, Icon: tr, ElIconArrowUp: C8e, ElIconArrowDown: NS, ElIconWarning: gz, ExternalResourceCard: nG, CopyToClipboard: AW, ConnectivityGraph: Rot }, 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 }; }, watch: { availableAnatomyFacets: { handler: function(e) { this.convertFacetsToList(e); }, immediate: !0, deep: !0 } }, computed: { updatedCopyContent: function() { return this.getUpdateCopyContent(); }, 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 est(e); }, capitalise: function(e) { return Ov(e); }, openUrl: function(e) { window.open(e, "_blank"); }, openAll: function() { yr.emit("onConnectivityActionClick", { type: "Facets", labels: this.entry.componentsWithDatasets.map((e) => e.name.toLowerCase()) }); }, openAxons: function() { yr.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() { yr.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) { if (this.activeView = e, e === "graphView") { const t = this.$refs.connectivityGraphRef; t && t.$el && t.$el.scrollIntoView({ behavior: "smooth" }); } }, onTapNode: function(e) { const t = e.map((n) => n.label).join(", "); this.toggleConnectivityTooltip(t, { show: !0 }); }, getUpdateCopyContent: function() { var e, t, n, r, a; if (!this.entry) return ""; const o = []; if (this.entry.title ? o.push(`
    ${Ov(this.entry.title)}
    `) : o.push(`
    ${this.entry.featureId}
    `), (e = this.entry.provenanceTaxonomyLabel) != null && e.length && o.push(`
    ${this.provSpeciesDescription}
    `), (t = this.resources) != null && t.length) { const s = []; this.resources.forEach((l) => { let u = ""; l.id === "pubmed" && (u += "
    PubMed URL:
    ", u += ` `, u += ``), s.push(u); }), o.push(s.join(`
    `)); } this.entry.paths && o.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(`${Ov(v)} (${m.id})`) : p.push(`${Ov(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); o.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); o.push(c); } if ((a = this.entry.destinations) != null && a.length) { const s = "Destination", l = this.entry.destinations, u = this.entry.destinationsWithDatasets, c = i(s, l, u); o.push(c); } return o.join(`
    `); }, toggleConnectivityTooltip: function(e, t) { const n = [ ...this.entry.componentsWithDatasets, ...this.entry.destinationsWithDatasets, ...this.entry.originsWithDatasets ], r = e.split(","), a = []; t.show && r.forEach((o) => { const i = n.find( (s) => s.name.toLowerCase().trim() === o.toLowerCase().trim() ); i && a.push({ id: i.id, label: i.name }); }), this.$emit("connectivity-component-click", a); }, getErrorConnectivities: function(e) { const t = [...new Set(e)]; let n = ""; return t.forEach((r, a) => { const { label: o } = r; n += a === 0 ? Ov(o) : o, t.length > 1 && (a + 2 === t.length ? n += " and " : a + 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; }, tst); } }, mounted: function() { yr.on("connectivity-graph-error", (e) => { this.pushConnectivityError(e); }); } }, mp = (e) => (ma("data-v-50c6e446"), e = e(), ya(), e), rst = { key: 0, class: "main" }, ast = { class: "connectivity-info-title" }, ost = { key: 0, class: "block" }, ist = { class: "title" }, sst = { style: { "word-break": "keep-all" } }, lst = { key: 0, class: "subtitle" }, ust = { key: 1, class: "block" }, cst = { class: "title" }, dst = { key: 2, class: "block" }, pst = { class: "title-buttons" }, fst = /* @__PURE__ */ mp(() => /* @__PURE__ */ K("span", null, " Show connectivity on map ", -1)), hst = { class: "content-container population-display" }, vst = /* @__PURE__ */ mp(() => /* @__PURE__ */ K("div", { class: "block attribute-title-container" }, [ /* @__PURE__ */ K("span", { class: "attribute-title" }, "Population Display") ], -1)), gst = { class: "block buttons-row" }, mst = { key: 0, class: "content-container content-container-connectivity" }, yst = { key: 0, class: "block" }, bst = { class: "attribute-title-container" }, wst = /* @__PURE__ */ mp(() => /* @__PURE__ */ K("span", { class: "attribute-title" }, "Origin", -1)), xst = { style: { "word-break": "keep-all" } }, kst = /* @__PURE__ */ mp(() => /* @__PURE__ */ K("i", null, "Origin", -1)), Cst = ["origin-item-label", "onMouseenter", "onMouseleave"], Sst = { key: 1, class: "block" }, Est = /* @__PURE__ */ mp(() => /* @__PURE__ */ K("div", { class: "attribute-title-container" }, [ /* @__PURE__ */ K("div", { class: "attribute-title" }, "Components") ], -1)), _st = ["component-item-label", "onMouseenter", "onMouseleave"], Tst = { key: 2, class: "block" }, $st = { class: "attribute-title-container" }, Ost = /* @__PURE__ */ mp(() => /* @__PURE__ */ K("span", { class: "attribute-title" }, "Destination", -1)), Fst = /* @__PURE__ */ mp(() => /* @__PURE__ */ K("span", { style: { "word-break": "keep-all" } }, [ /* @__PURE__ */ K("i", null, "Destination"), /* @__PURE__ */ ze(" is where the axons terminate ") ], -1)), Ast = ["destination-item-label", "onMouseenter", "onMouseleave"], Ist = { class: "block" }, Pst = { key: 3, class: "connectivity-error-container" }, Lst = { class: "connectivity-error" }, Nst = { key: 0 }, Mst = { key: 1, class: "content-container" }; function Dst(e, t, n, r, a, o) { const i = U8e, s = tr, l = oE, u = nG, c = B8e, d = Bo, f = lt("CopyToClipboard"), h = gz, p = lt("connectivity-graph"), v = Pw; return n.entry ? qe(($(), B("div", rst, [ K("div", ast, [ K("div", null, [ n.entry.title ? ($(), B("div", ost, [ K("div", ist, [ ze(_e(o.capitalise(n.entry.title)) + " ", 1), n.entry.featuresAlert ? ($(), ae(l, { key: 0, width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: q(() => [ Z(s, { class: "alert" }, { default: q(() => [ Z(i) ]), _: 1 }) ]), default: q(() => [ K("span", sst, _e(n.entry.featuresAlert), 1) ]), _: 1 })) : te("", !0) ]), n.entry.provenanceTaxonomyLabel && n.entry.provenanceTaxonomyLabel.length > 0 ? ($(), B("div", lst, _e(o.provSpeciesDescription), 1)) : te("", !0) ])) : ($(), B("div", ust, [ K("div", cst, _e(n.entry.featureId), 1) ])), o.resources.length ? ($(), B("div", dst, [ Z(u, { resources: o.resources }, null, 8, ["resources"]) ])) : te("", !0) ]), K("div", pst, [ Z(l, { width: "auto", trigger: "hover", teleported: !1, "popper-class": "popover-map-pin" }, { reference: q(() => [ Z(d, { class: "button-circle", circle: "", onClick: t[0] || (t[0] = (m) => o.showConnectivity(n.entry)) }, { default: q(() => [ Z(s, { color: "white" }, { default: q(() => [ Z(c) ]), _: 1 }) ]), _: 1 }) ]), default: q(() => [ fst ]), _: 1 }), Z(f, { content: o.updatedCopyContent }, null, 8, ["content"]) ]) ]), K("div", hst, [ vst, K("div", gst, [ Z(d, { class: H(e.activeView === "listView" ? "button" : "el-button-secondary"), onClick: t[1] || (t[1] = (m) => o.switchConnectivityView("listView")) }, { default: q(() => [ ze(" List view ") ]), _: 1 }, 8, ["class"]), Z(d, { class: H(e.activeView === "graphView" ? "button" : "el-button-secondary"), onClick: t[2] || (t[2] = (m) => o.switchConnectivityView("graphView")) }, { default: q(() => [ ze(" Graph view ") ]), _: 1 }, 8, ["class"]) ]) ]), e.activeView === "listView" ? ($(), B("div", mst, [ ze(_e(n.entry.paths) + " ", 1), n.entry.origins && n.entry.origins.length > 0 ? ($(), B("div", yst, [ K("div", bst, [ wst, Z(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: q(() => [ Z(s, { class: "info" }, { default: q(() => [ Z(h) ]), _: 1 }) ]), default: q(() => [ K("span", xst, [ kst, ze(" " + _e(o.originDescription), 1) ]) ]), _: 1 }) ]), ($(!0), B(Ue, null, yt(n.entry.origins, (m, g) => ($(), B("div", { class: "attribute-content", "origin-item-label": m, key: m, onMouseenter: (y) => o.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (y) => o.toggleConnectivityTooltip(m, { show: !1 }) }, _e(o.capitalise(m)), 41, Cst))), 128)), qe(Z(d, { class: "button", id: "open-dendrites-button", onClick: o.openDendrites }, { default: q(() => [ ze(" Explore origin data ") ]), _: 1 }, 8, ["onClick"]), [ [ ct, n.entry.originsWithDatasets && n.entry.originsWithDatasets.length > 0 && o.shouldShowExploreButton(n.entry.originsWithDatasets) ] ]) ])) : te("", !0), n.entry.components && n.entry.components.length > 0 ? ($(), B("div", Sst, [ Est, ($(!0), B(Ue, null, yt(n.entry.components, (m, g) => ($(), B("div", { class: "attribute-content", "component-item-label": m, key: m, onMouseenter: (y) => o.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (y) => o.toggleConnectivityTooltip(m, { show: !1 }) }, _e(o.capitalise(m)), 41, _st))), 128)) ])) : te("", !0), n.entry.destinations && n.entry.destinations.length > 0 ? ($(), B("div", Tst, [ K("div", $st, [ Ost, Z(l, { width: "250", trigger: "hover", teleported: !1, "popper-class": "popover-origin-help" }, { reference: q(() => [ Z(s, { class: "info" }, { default: q(() => [ Z(h) ]), _: 1 }) ]), default: q(() => [ Fst ]), _: 1 }) ]), ($(!0), B(Ue, null, yt(n.entry.destinations, (m, g) => ($(), B("div", { class: "attribute-content", "destination-item-label": m, key: m, onMouseenter: (y) => o.toggleConnectivityTooltip(m, { show: !0 }), onMouseleave: (y) => o.toggleConnectivityTooltip(m, { show: !1 }) }, _e(o.capitalise(m)), 41, Ast))), 128)), qe(Z(d, { class: "button", onClick: o.openAxons }, { default: q(() => [ ze(" Explore destination data ") ]), _: 1 }, 8, ["onClick"]), [ [ ct, n.entry.destinationsWithDatasets && n.entry.destinationsWithDatasets.length > 0 && o.shouldShowExploreButton(n.entry.destinationsWithDatasets) ] ]) ])) : te("", !0), qe(K("div", Ist, [ Z(d, { class: "button", onClick: o.openAll }, { default: q(() => [ ze(" Search for data on components ") ]), _: 1 }, 8, ["onClick"]) ], 512), [ [ ct, n.entry.componentsWithDatasets && n.entry.componentsWithDatasets.length > 0 && o.shouldShowExploreButton(n.entry.componentsWithDatasets) ] ]), e.connectivityError ? ($(), B("div", Pst, [ K("div", Lst, [ e.connectivityError.errorConnectivities ? ($(), B("strong", Nst, _e(e.connectivityError.errorConnectivities), 1)) : te("", !0), ze(" " + _e(e.connectivityError.errorMessage), 1) ]) ])) : te("", !0) ])) : te("", !0), e.activeView === "graphView" ? ($(), B("div", Mst, [ Z(p, { entry: n.entry.featureId[0], mapServer: n.envVars.FLATMAPAPI_LOCATION, onTapNode: o.onTapNode, ref: "connectivityGraphRef" }, null, 8, ["entry", "mapServer", "onTapNode"]) ])) : te("", !0) ])), [ [v, e.loading] ]) : te("", !0); } const rG = /* @__PURE__ */ Zi(nst, [["render", Dst], ["__scopeId", "data-v-50c6e446"]]), Bst = { 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); } } }, Rst = (e) => (ma("data-v-ed1ce6dc"), e = e(), ya(), e), zst = { class: "tab-container" }, Vst = ["onClick"], jst = { class: "title-text" }, Hst = /* @__PURE__ */ Rst(() => /* @__PURE__ */ K("span", { class: "visually-hidden" }, "Close", -1)); function Ust(e, t, n, r, a, o) { const i = Bo; return $(), B("div", zst, [ ($(!0), B(Ue, null, yt(n.tabTitles, (s) => ($(), B("div", { class: H(["title", { "active-tab": s.id == n.activeId }]), key: s.id }, [ K("div", { class: H(["title-text-table", { highlightText: s.id == n.activeId }]), onClick: (l) => o.titleClicked(s.id, s.type) }, [ K("div", jst, _e(s.title), 1) ], 10, Vst), s.id > 1 ? ($(), ae(i, { key: 0, onClick: (l) => o.tabClose(s.id), class: "button-tab-close", "aria-label": "Close" }, { default: q(() => [ ze(" × "), Hst ]), _: 2 }, 1032, ["onClick"])) : te("", !0) ], 2))), 128)) ]); } const aG = /* @__PURE__ */ Zi(Bst, [["render", Ust], ["__scopeId", "data-v-ed1ce6dc"]]), qst = { components: { SidebarContent: eG, Tabs: aG, ElIconArrowLeft: MS, ElIconArrowRight: kw, Drawer: nE, Icon: tr, ConnectivityInfo: rG, AnnotationTool: tG }, 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", a = this.tabs.find((i) => i.id === n && i.type === r), o = this.tabs[0]; return a || o; }, /** * 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) { yr.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() { yr.on("PopoverActionClick", (e) => { this.$emit("actionClick", e); }), yr.on("number-of-datasets-for-anatomies", (e) => { this.$emit("number-of-datasets-for-anatomies", e); }), yr.on("anatomy-in-datasets", (e) => { this.$emit("anatomy-in-datasets", e); }), yr.on("contextUpdate", (e) => { this.$emit("contextUpdate", e); }), yr.on("datalink-clicked", (e) => { this.$emit("datalink-clicked", e); }), yr.on("onConnectivityActionClick", (e) => { this.tabClicked({ id: 1, type: "search" }), this.$emit("actionClick", e); }), yr.on("available-facets", (e) => { this.availableAnatomyFacets = e.find((t) => t.label === "Anatomical Structure").children; }); } }, Wst = { ref: "container" }, Kst = { class: "box-card" }, Gst = { class: "sidebar-container" }; function Xst(e, t, n, r, a, o) { const i = MS, s = tr, l = kw, u = aG, c = rG, d = tG, f = eG, h = nE; return $(), B("div", Wst, [ e.drawerOpen ? te("", !0) : ($(), B("div", { key: 0, onClick: t[0] || (t[0] = (...p) => o.toggleDrawer && o.toggleDrawer(...p)), class: "open-tab" }, [ Z(s, null, { default: q(() => [ Z(i) ]), _: 1 }) ])), Z(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: q(() => [ K("div", Kst, [ e.drawerOpen ? ($(), B("div", { key: 0, onClick: t[1] || (t[1] = (...p) => o.close && o.close(...p)), class: "close-tab" }, [ Z(s, null, { default: q(() => [ Z(l) ]), _: 1 }) ])) : te("", !0), K("div", Gst, [ o.activeTabs.length > 1 ? ($(), ae(u, { key: 0, tabTitles: o.activeTabs, activeId: n.activeTabId, onTitleClicked: o.tabClicked, onTabClose: o.tabClose }, null, 8, ["tabTitles", "activeId", "onTitleClicked", "onTabClose"])) : te("", !0), ($(!0), B(Ue, null, yt(n.tabs, (p) => ($(), B(Ue, { key: "tab.id" }, [ p.type === "connectivity" && n.connectivityInfo ? ($(), B(Ue, { key: 0 }, [ p.id === n.activeTabId ? ($(), ae(c, { key: 0, entry: n.connectivityInfo, availableAnatomyFacets: e.availableAnatomyFacets, envVars: n.envVars, ref_for: !0, ref: "connectivityTab_" + p.id, onShowConnectivity: o.showConnectivity, onConnectivityComponentClick: o.onConnectivityComponentClick }, null, 8, ["entry", "availableAnatomyFacets", "envVars", "onShowConnectivity", "onConnectivityComponentClick"])) : te("", !0) ], 64)) : p.type === "annotation" ? qe(($(), ae(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"])), [ [ct, p.id === n.activeTabId] ]) : qe(($(), ae(f, { key: 2, class: "sidebar-content-container", contextCardEntry: p.contextCard, envVars: n.envVars, ref_for: !0, ref: "searchTab_" + p.id, onSearchChanged: (v) => o.searchChanged(p.id, v), onHoverChanged: t[6] || (t[6] = (v) => o.hoverChanged(v)) }, null, 8, ["contextCardEntry", "envVars", "onSearchChanged"])), [ [ct, p.id === n.activeTabId] ]) ], 64))), 128)) ]) ]) ]), _: 1 }, 8, ["modelValue"]) ], 512); } const Yst = /* @__PURE__ */ Zi(qst, [["render", Xst], ["__scopeId", "data-v-319adc7d"]]); /*! js-cookie v3.0.5 | MIT */ function ey(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 Zst = { 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 N3(e, t) { function n(a, o, i) { if (!(typeof document > "u")) { i = ey({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), a = encodeURIComponent(a).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 = a + "=" + e.write(o, a) + s; } } function r(a) { if (!(typeof document > "u" || arguments.length && !a)) { for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, s = 0; s < o.length; s++) { var l = o[s].split("="), u = l.slice(1).join("="); try { var c = decodeURIComponent(l[0]); if (i[c] = e.read(u, c), a === c) break; } catch { } } return a ? i[a] : i; } } return Object.create( { set: n, get: r, remove: function(a, o) { n( a, "", ey({}, o, { expires: -1 }) ); }, withAttributes: function(a) { return N3(this.converter, ey({}, this.attributes, a)); }, withConverter: function(a) { return N3(ey({}, this.converter, a), this.attributes); } }, { attributes: { value: Object.freeze(t) }, converter: { value: Object.freeze(e) } } ); } var M3 = N3(Zst, { path: "/" }), is = function(e, t, n, r, a) { if (r === "m") throw new TypeError("Private method is not writable"); if (r === "a" && !a) throw new TypeError("Private accessor was defined without a setter"); if (typeof t == "function" ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return r === "a" ? a.call(e, n) : a ? a.value = n : t.set(e, n), n; }, cr = 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); }, Qs, f0, ss, Sa, pu; const Qst = 1e4; class Jst { /** * @param serverEndpoint The URL of a map annotation service. */ constructor(t) { Qs.add(this), f0.set(this, void 0), ss.set(this, null), Sa.set( this, null /** * @param serverEndpoint The URL of a map annotation service. */ ), t.slice(-1) === "/" ? is(this, f0, t.slice(0, -1), "f") : is(this, f0, t, "f"); } /** * Get information about the logged-in SPARC user. * * Requires {@linkcode authenticate} to first be called. */ get currentUser() { return cr(this, ss, "f"); } /** * Get information about any error from the last call * to {@linkcode authenticate}. */ get currentError() { return cr(this, Sa, "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) { is(this, Sa, null, "f"), is(this, ss, null, "f"); const n = await cr(this, Qs, "m", pu).call(this, t, "authenticate"); return "error" in n ? (M3.remove("annotation-key"), Promise.resolve(cr(this, Sa, "f"))) : (M3.set("annotation-key", n.session, { secure: !0, expires: 1 }), is(this, ss, n.data, "f"), Promise.resolve(cr(this, ss, "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) { is(this, Sa, null, "f"), is(this, ss, null, "f"); const n = await cr(this, Qs, "m", pu).call(this, t, "unauthenticate"); return "success" in n ? Promise.resolve(n) : Promise.resolve(cr(this, Sa, "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, a) { const o = { resource: n }; r !== void 0 && (o.user = r), a !== void 0 && (o.participated = a); const i = await cr(this, Qs, "m", pu).call(this, t, "items/", "GET", o); return "error" in i ? Promise.resolve(cr(this, Sa, "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 a = { resource: n }; r !== void 0 && (a.items = r); const o = await cr(this, Qs, "m", pu).call(this, t, "features/", "GET", a); return "error" in o ? Promise.resolve(cr(this, Sa, "f")) : Promise.resolve(o); } /** * 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 a = await cr(this, Qs, "m", pu).call(this, t, "annotations/", "GET", { resource: n, item: r }); return "error" in a ? Promise.resolve(cr(this, Sa, "f")) : Promise.resolve(a); } /** * 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 cr(this, Qs, "m", pu).call(this, t, "annotation/", "GET", { annotation: n }); return "error" in r ? Promise.resolve(cr(this, Sa, "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 (cr(this, ss, "f") && cr(this, ss, "f").canUpdate) { const r = Object.assign({ creator: cr(this, ss, "f"), created: (/* @__PURE__ */ new Date()).toISOString() }, n), a = await cr(this, Qs, "m", pu).call(this, t, "annotation/", "POST", { data: r }); if (!("error" in a)) return Promise.resolve(a); is(this, Sa, a, "f"); } else is(this, Sa, { error: "user cannot add annotation" }, "f"); return Promise.resolve(cr(this, Sa, "f")); } } f0 = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), Sa = /* @__PURE__ */ new WeakMap(), Qs = /* @__PURE__ */ new WeakSet(), pu = async function(t, n, r = "GET", a = {}) { let o = !0; const i = new AbortController(); setTimeout(() => { o && (console.log("Annotation server timeout..."), i.abort()); }, Qst); const s = { method: r, signal: i.signal }; let l = `${cr(this, f0, "f")}/${n}`; const u = M3.get("annotation-key") || ""; if (r === "GET") { const d = []; for (const [f, h] of Object.entries(a)) 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 }, a); 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 o = !1, c.ok ? Promise.resolve(await c.json()) : (is(this, Sa, { error: `${c.status} ${c.statusText}` }, "f"), Promise.resolve(cr(this, Sa, "f"))); }; const elt = v2("main", { state: () => ({ userProfile: { token: "" } }), getters: { userToken(e) { return e.userProfile.token; } }, actions: { setUserToken(e) { this.userProfile.token = e; } } }), tlt = { name: "SplitFlow", components: { Container: mN, Header: yN, Main: bN, DialogToolbarContent: P7, SplitDialog: A7, SideBar: Yst }, setup() { const e = elt(); rt("userApiKey", e.userToken); const t = R0(); let n = Oi(new Jst(`${t.flatmapAPI}annotator`)); return rt("$annotator", n), { annotator: n }; }, props: { state: { type: Object, default: void 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"; Zs.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; Zs.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: cO(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: cO(n), term: "Anatomical structure", facetPropPath: "anatomy.organ.category.name" })) ), this.$refs.sideBar) { this.closeConnectivityInfo(), this.$refs.sideBar.openSearch(t, ""); const r = ZCe(this.availableFacets, e.labels).join(", "); Zs.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: a, discoverId: o, resource: i } = e; let s = "", l = a || o; n && t.push(n), r && t.push(r), a && t.push("(" + l + ")"), i && (r === "Plot" ? s = i.dataSource.url : s = typeof i == "string" ? i : i.share_link), Zs.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((a) => { a.search(e.term) && (t = !0); }), this.$refs.dialogToolbar.setFailedSearch(t ? void 0 : e.term), Zs.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 a = []; t.forEach((i) => { a.push(i.replaceAll('"', "")); }); const o = new Set(a); t.length = 0; for (const i of o) 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) || ""; Tn.emit("show-connectivity", { featureIds: e, offset: n === "singlepanel" || n === "2horpanel" }); }, onConnectivityComponentClick: function(e) { Tn.emit("connectivity-component-click", { connectivityInfo: this.connectivityInfo, data: e }); }, onNeuronConnectionChange: function(e) { Tn.emit("neuron-connection-change", e); }, hoverChanged: function(e) { const t = e && e.anatomy ? e.anatomy : [], n = e && e.organs ? e.organs : []; this.settingsStore.updateHoverFeatures(t, n), Tn.emit("hoverUpdate"); }, searchChanged: function(e) { if (e && e.type == "query-update" && (this.search = e.value, this.search && !this.filterTriggered && Zs.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( (a) => a.facet && a.facet.toLowerCase() !== "show all" ).map((a) => a.facet).join(", "); Zs.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), Tn.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 WCe(e, this.settingsStore.sparcApi); this.createNewEntry(t), t.contextCard && Tn.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(kS()); }, 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 a = e.entries[r]; a.state = n[r], a.type === "Scaffold" && "viewUrl" in a && delete a.viewUrl, a.type === "MultiFlatmap" && "uberonId" in a && delete a.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) { Tn.emit("contextUpdate", e); }, datalinkClicked: function(e) { const t = e || "", n = "datasets/", a = t.substring( t.indexOf(n) + n.length, t.indexOf("?type=dataset") ); Zs.sendEvent({ event: "interaction_event", event_name: "portal_maps_gallery_click", category: t, location: "map_sidebar_gallery", dataset_id: a || "" }); }, 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 && Tn.emit("connectivity-info-close"), e === 3 && Tn.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() { Tn.on("RemoveEntryRequest", (e) => { this.removeEntry(e); }), Tn.on("SyncModeRequest", (e) => { this.toggleSyncMode(e); }), Tn.on("PopoverActionClick", (e) => { this.actionClick(e); }), Tn.on("annotation-open", (e) => { this.annotationEntry = e.annotationEntry, this.annotationCallback = Oi(e.commitCallback), e.createData ? this.createData = Oi(e.createData) : this.createData = Oi({}), this.confirmCreateCallback = Oi(e.confirmCreate), this.cancelCreateCallback = Oi(e.cancelCreate), this.confirmDeleteCallback = Oi(e.confirmDelete), this.$refs.sideBar && (this.tabClicked({ id: 3, type: "annotation" }), this.$refs.sideBar.setDrawerOpen(!0)); }), Tn.on("annotation-close", (e) => { this.tabClicked({ id: 1, type: "search" }), this.annotationEntry = {}, this.createData = {}, this.$refs.sideBar && this.$refs.sideBar.setDrawerOpen(!1); }), Tn.on("connectivity-info-open", (e) => { this.connectivityInfo = e, this.$refs.sideBar && (this.tabClicked({ id: 2, type: "connectivity" }), this.$refs.sideBar.setDrawerOpen(!0)); }), Tn.on("connectivity-info-close", (e) => { this.tabClicked({ id: 1, type: "search" }), this.connectivityInfo = null, this.resetActivePathways(); }), Tn.on("connectivity-graph-error", (e) => { this.$refs.sideBar && this.$refs.sideBar.updateConnectivityGraphError(e.data); }), Tn.on("OpenNewMap", (e) => { this.openNewMap(e); }), Tn.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: { ...Kd(gw, R0, ip), 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; } } }, nlt = { style: { width: "100%", height: "100%", position: "relative", overflow: "hidden" } }; function rlt(e, t, n, r, a, o) { const i = P7, s = yN, l = lt("SideBar"), u = A7, c = bN, d = mN; return $(), ae(d, { style: { height: "100%", background: "white" } }, { default: q(() => [ Z(s, { ref: "header", style: { "text-align": "left", "font-size": "14px", padding: "0" }, height: "32px", class: "dialog-header" }, { default: q(() => [ Z(i, { numberOfEntries: o.entries.length, onOnFullscreen: o.onFullscreen, onLocalSearch: o.onDisplaySearch, onFetchSuggestions: o.fetchSuggestions, ref: "dialogToolbar" }, null, 8, ["numberOfEntries", "onOnFullscreen", "onLocalSearch", "onFetchSuggestions"]) ]), _: 1 }, 512), Z(c, { class: "dialog-main" }, { default: q(() => [ K("div", nlt, [ Z(l, { ref: "sideBar", envVars: o.envVars, visible: e.sideBarVisibility, class: H(["side-bar", { "start-up": e.startUp }]), activeTabId: e.activeDockedId, "open-at-start": e.startUp, annotationEntry: e.annotationEntry, createData: e.createData, connectivityInfo: e.connectivityInfo, onTabClose: o.onSidebarTabClose, onActionClick: o.actionClick, onTabClicked: o.tabClicked, onSearchChanged: t[0] || (t[0] = (f) => o.searchChanged(f)), onAnatomyInDatasets: t[1] || (t[1] = (f) => o.updateMarkers(f)), onAnnotationSubmitted: o.onAnnotationSubmitted, onConfirmCreate: o.onConfirmCreate, onCancelCreate: o.onCancelCreate, onConfirmDelete: o.onConfirmDelete, onNumberOfDatasetsForAnatomies: t[2] || (t[2] = (f) => o.updateScaffoldMarkers(f)), onHoverChanged: t[3] || (t[3] = (f) => o.hoverChanged(f)), onContextUpdate: t[4] || (t[4] = (f) => o.contextUpdate(f)), onDatalinkClicked: t[5] || (t[5] = (f) => o.datalinkClicked(f)), onShowConnectivity: o.onShowConnectivity, onConnectivityComponentClick: o.onConnectivityComponentClick, onNeuronConnectionChange: o.onNeuronConnectionChange }, null, 8, ["envVars", "visible", "class", "activeTabId", "open-at-start", "annotationEntry", "createData", "connectivityInfo", "onTabClose", "onActionClick", "onTabClicked", "onAnnotationSubmitted", "onConfirmCreate", "onCancelCreate", "onConfirmDelete", "onShowConnectivity", "onConnectivityComponentClick", "onNeuronConnectionChange"]), Z(u, { entries: o.entries, ref: "splitdialog", onResourceSelected: o.resourceSelected, onSpeciesChanged: o.speciesChanged }, null, 8, ["entries", "onResourceSelected", "onSpeciesChanged"]) ]) ]), _: 1 }) ]), _: 1 }); } const oG = /* @__PURE__ */ Ki(tlt, [["render", rlt], ["__scopeId", "data-v-f2cfe1f2"]]), alt = { // Note that the setting store is included in MapContent.vue methods: { retrieveContextCardFromUrl: async function(e) { const [t, n, r, a] = this.splitInfoFromUrl(e), o = await this.getContextFileFromScicrunch(t, r); if (!o.success) return {}; const i = n + o.contextFile + a; return { s3uri: o.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], a = "?" + e.split("?")[1]; const o = t.split("/"); return o.shift(), [o[0], n, r, a]; }, 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 a = r.results[0]["abi-contextual-information"]; if (a && a.length === 1) return { success: !0, contextFile: a[0], s3uri: r.results[0].s3uri }; if (a && a.length > 1) { let o = this.findContextInforForFilePath(r.results[0]["abi-context-file"], t); if (o) return { success: !0, contextFile: o, 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((a) => a.datacite.isDerivedFrom.path.includes(t)); return (r = n == null ? void 0 : n.dataset) == null ? void 0 : r.path; } } }, olt = { name: "MapContent", components: { MapSvgSpriteColor: C7, Loading: EN, SplitFlow: oG }, mixins: [alt], 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 } }, 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() { this.isFullscreen() && (document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen()); }, /** * @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(); }, 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 = XCe(e); if (t) { const n = this.getState(); if (n && n.entries) for (let r = 0; r < n.entries.length; r++) { const a = n.entries[r]; if (a.type === "MultiFlatmap") { a.resource = t, a.state = { species: t }, (e.organ || e.uuid) && (a.state.state = { searchTerm: e.organ, uuid: e.uuid }, e.uuid && (a.state.state.entry = e.taxo)), this.$refs.flow.setState(n), this.$refs.flow.setIdToPrimaryPane(a.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"), Zs.sendEvent({ event: "interaction_event", event_name: "portal_maps_page_view", category: this.startingMap }); } }, computed: { ...Kd(R0, ip), 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() { Tn.on("updateShareLinkRequested", () => { this.$emit("updateShareLinkRequested"); }), Tn.on("trackEvent", (e) => { this.$emit("trackEvent", e); }), this.state || (this.initialState = await KCe(this.startingMap, this.options.sparcApi)), Tn.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); } }, ilt = { ref: "MapApp", class: "mapcontent", "element-loading-text": "Loading...", "element-loading-background": "rgba(0, 0, 0, 0.3)" }; function slt(e, t, n, r, a, o) { const i = lt("map-svg-sprite-color"), s = oG, l = Cf; return qe(($(), B("div", ilt, [ Z(i), e.isReady ? ($(), ae(s, { key: 0, onOnFullscreen: o.onFullscreen, state: o.stateToSet, ref: "flow", onVnodeMounted: o.flowMounted }, null, 8, ["onOnFullscreen", "state", "onVnodeMounted"])) : te("", !0) ])), [ [l, !e.isReady] ]); } const klt = /* @__PURE__ */ Ki(olt, [["render", slt], ["__scopeId", "data-v-c1341ff7"]]); export { Tn as E, ylt as G, glt as K, klt as M, hlt as R, Zs as T, mlt as U, Ki as _, GCe as a, ip as b, wlt as c, xlt as d, S7 as g, C7 as h, vlt as q, blt as t, R0 as u, xS as w };