| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529 |
- import { ref as Ft, reactive as yn, watch as gn, onMounted as bn, openBlock as mn, createElementBlock as wn, createElementVNode as vn, createVNode as Tn } from "vue";
- import { al as An, am as V, k as Sn, ai as Cn, aj as Vt, ak as On } from "./index2.js";
- var k = { exports: {} };
- k.exports;
- (function(p, d) {
- var O = 200, m = "__lodash_hash_undefined__", a = 9007199254740991, _ = "[object Arguments]", W = "[object Array]", $ = "[object Boolean]", c = "[object Date]", u = "[object Error]", s = "[object Function]", h = "[object GeneratorFunction]", w = "[object Map]", B = "[object Number]", T = "[object Object]", M = "[object Promise]", at = "[object RegExp]", G = "[object Set]", st = "[object String]", it = "[object Symbol]", q = "[object WeakMap]", ct = "[object ArrayBuffer]", R = "[object DataView]", ut = "[object Float32Array]", ft = "[object Float64Array]", lt = "[object Int8Array]", pt = "[object Int16Array]", ht = "[object Int32Array]", dt = "[object Uint8Array]", _t = "[object Uint8ClampedArray]", yt = "[object Uint16Array]", gt = "[object Uint32Array]", kt = /[\\^$.*+?()[\]{}|]/g, Wt = /\w*$/, qt = /^\[object .+?Constructor\]$/, zt = /^(?:0|[1-9]\d*)$/, o = {};
- o[_] = o[W] = o[ct] = o[R] = o[$] = o[c] = o[ut] = o[ft] = o[lt] = o[pt] = o[ht] = o[w] = o[B] = o[T] = o[at] = o[G] = o[st] = o[it] = o[dt] = o[_t] = o[yt] = o[gt] = !0, o[u] = o[s] = o[q] = !1;
- var Jt = typeof V == "object" && V && V.Object === Object && V, Xt = typeof self == "object" && self && self.Object === Object && self, y = Jt || Xt || Function("return this")(), bt = d && !d.nodeType && d, mt = bt && !0 && p && !p.nodeType && p, Yt = mt && mt.exports === bt;
- function Zt(t, e) {
- return t.set(e[0], e[1]), t;
- }
- function Qt(t, e) {
- return t.add(e), t;
- }
- function te(t, e) {
- for (var n = -1, r = t ? t.length : 0; ++n < r && e(t[n], n, t) !== !1; )
- ;
- return t;
- }
- function ee(t, e) {
- for (var n = -1, r = e.length, i = t.length; ++n < r; )
- t[i + n] = e[n];
- return t;
- }
- function wt(t, e, n, r) {
- for (var i = -1, f = t ? t.length : 0; ++i < f; )
- n = e(n, t[i], i, t);
- return n;
- }
- function ne(t, e) {
- for (var n = -1, r = Array(t); ++n < t; )
- r[n] = e(n);
- return r;
- }
- function re(t, e) {
- return t == null ? void 0 : t[e];
- }
- function vt(t) {
- var e = !1;
- if (t != null && typeof t.toString != "function")
- try {
- e = !!(t + "");
- } catch (n) {
- }
- return e;
- }
- function Tt(t) {
- var e = -1, n = Array(t.size);
- return t.forEach(function(r, i) {
- n[++e] = [i, r];
- }), n;
- }
- function z(t, e) {
- return function(n) {
- return t(e(n));
- };
- }
- function At(t) {
- var e = -1, n = Array(t.size);
- return t.forEach(function(r) {
- n[++e] = r;
- }), n;
- }
- var oe = Array.prototype, ae = Function.prototype, U = Object.prototype, J = y["__core-js_shared__"], St = function() {
- var t = /[^.]+$/.exec(J && J.keys && J.keys.IE_PROTO || "");
- return t ? "Symbol(src)_1." + t : "";
- }(), Ct = ae.toString, v = U.hasOwnProperty, H = U.toString, se = RegExp(
- "^" + Ct.call(v).replace(kt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- ), Ot = Yt ? y.Buffer : void 0, xt = y.Symbol, Kt = y.Uint8Array, ie = z(Object.getPrototypeOf, Object), ce = Object.create, ue = U.propertyIsEnumerable, fe = oe.splice, jt = Object.getOwnPropertySymbols, le = Ot ? Ot.isBuffer : void 0, pe = z(Object.keys, Object), X = j(y, "DataView"), I = j(y, "Map"), Y = j(y, "Promise"), Z = j(y, "Set"), Q = j(y, "WeakMap"), P = j(Object, "create"), he = C(X), de = C(I), _e = C(Y), ye = C(Z), ge = C(Q), Et = xt ? xt.prototype : void 0, Mt = Et ? Et.valueOf : void 0;
- function A(t) {
- var e = -1, n = t ? t.length : 0;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- function be() {
- this.__data__ = P ? P(null) : {};
- }
- function me(t) {
- return this.has(t) && delete this.__data__[t];
- }
- function we(t) {
- var e = this.__data__;
- if (P) {
- var n = e[t];
- return n === m ? void 0 : n;
- }
- return v.call(e, t) ? e[t] : void 0;
- }
- function ve(t) {
- var e = this.__data__;
- return P ? e[t] !== void 0 : v.call(e, t);
- }
- function Te(t, e) {
- var n = this.__data__;
- return n[t] = P && e === void 0 ? m : e, this;
- }
- A.prototype.clear = be, A.prototype.delete = me, A.prototype.get = we, A.prototype.has = ve, A.prototype.set = Te;
- function g(t) {
- var e = -1, n = t ? t.length : 0;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- function Ae() {
- this.__data__ = [];
- }
- function Se(t) {
- var e = this.__data__, n = L(e, t);
- if (n < 0)
- return !1;
- var r = e.length - 1;
- return n == r ? e.pop() : fe.call(e, n, 1), !0;
- }
- function Ce(t) {
- var e = this.__data__, n = L(e, t);
- return n < 0 ? void 0 : e[n][1];
- }
- function Oe(t) {
- return L(this.__data__, t) > -1;
- }
- function xe(t, e) {
- var n = this.__data__, r = L(n, t);
- return r < 0 ? n.push([t, e]) : n[r][1] = e, this;
- }
- g.prototype.clear = Ae, g.prototype.delete = Se, g.prototype.get = Ce, g.prototype.has = Oe, g.prototype.set = xe;
- function x(t) {
- var e = -1, n = t ? t.length : 0;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- function Ke() {
- this.__data__ = {
- hash: new A(),
- map: new (I || g)(),
- string: new A()
- };
- }
- function je(t) {
- return N(this, t).delete(t);
- }
- function Ee(t) {
- return N(this, t).get(t);
- }
- function Me(t) {
- return N(this, t).has(t);
- }
- function Ie(t, e) {
- return N(this, t).set(t, e), this;
- }
- x.prototype.clear = Ke, x.prototype.delete = je, x.prototype.get = Ee, x.prototype.has = Me, x.prototype.set = Ie;
- function K(t) {
- this.__data__ = new g(t);
- }
- function Pe() {
- this.__data__ = new g();
- }
- function $e(t) {
- return this.__data__.delete(t);
- }
- function Be(t) {
- return this.__data__.get(t);
- }
- function Ge(t) {
- return this.__data__.has(t);
- }
- function Re(t, e) {
- var n = this.__data__;
- if (n instanceof g) {
- var r = n.__data__;
- if (!I || r.length < O - 1)
- return r.push([t, e]), this;
- n = this.__data__ = new x(r);
- }
- return n.set(t, e), this;
- }
- K.prototype.clear = Pe, K.prototype.delete = $e, K.prototype.get = Be, K.prototype.has = Ge, K.prototype.set = Re;
- function Ue(t, e) {
- var n = nt(t) || un(t) ? ne(t.length, String) : [], r = n.length, i = !!r;
- for (var f in t)
- v.call(t, f) && !(i && (f == "length" || on(f, r))) && n.push(f);
- return n;
- }
- function It(t, e, n) {
- var r = t[e];
- (!(v.call(t, e) && Gt(r, n)) || n === void 0 && !(e in t)) && (t[e] = n);
- }
- function L(t, e) {
- for (var n = t.length; n--; )
- if (Gt(t[n][0], e))
- return n;
- return -1;
- }
- function He(t, e) {
- return t && Pt(e, rt(e), t);
- }
- function tt(t, e, n, r, i, f, b) {
- var l;
- if (r && (l = f ? r(t, i, f, b) : r(t)), l !== void 0)
- return l;
- if (!D(t))
- return t;
- var Ht = nt(t);
- if (Ht) {
- if (l = en(t), !e)
- return Ze(t, l);
- } else {
- var E = S(t), Lt = E == s || E == h;
- if (ln(t))
- return ke(t, e);
- if (E == T || E == _ || Lt && !f) {
- if (vt(t))
- return f ? t : {};
- if (l = nn(Lt ? {} : t), !e)
- return Qe(t, He(l, t));
- } else {
- if (!o[E])
- return f ? t : {};
- l = rn(t, E, tt, e);
- }
- }
- b || (b = new K());
- var Nt = b.get(t);
- if (Nt)
- return Nt;
- if (b.set(t, l), !Ht)
- var Dt = n ? tn(t) : rt(t);
- return te(Dt || t, function(ot, F) {
- Dt && (F = ot, ot = t[F]), It(l, F, tt(ot, e, n, r, F, t, b));
- }), l;
- }
- function Le(t) {
- return D(t) ? ce(t) : {};
- }
- function Ne(t, e, n) {
- var r = e(t);
- return nt(t) ? r : ee(r, n(t));
- }
- function De(t) {
- return H.call(t);
- }
- function Fe(t) {
- if (!D(t) || sn(t))
- return !1;
- var e = Ut(t) || vt(t) ? se : qt;
- return e.test(C(t));
- }
- function Ve(t) {
- if (!Bt(t))
- return pe(t);
- var e = [];
- for (var n in Object(t))
- v.call(t, n) && n != "constructor" && e.push(n);
- return e;
- }
- function ke(t, e) {
- if (e)
- return t.slice();
- var n = new t.constructor(t.length);
- return t.copy(n), n;
- }
- function et(t) {
- var e = new t.constructor(t.byteLength);
- return new Kt(e).set(new Kt(t)), e;
- }
- function We(t, e) {
- var n = e ? et(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.byteLength);
- }
- function qe(t, e, n) {
- var r = e ? n(Tt(t), !0) : Tt(t);
- return wt(r, Zt, new t.constructor());
- }
- function ze(t) {
- var e = new t.constructor(t.source, Wt.exec(t));
- return e.lastIndex = t.lastIndex, e;
- }
- function Je(t, e, n) {
- var r = e ? n(At(t), !0) : At(t);
- return wt(r, Qt, new t.constructor());
- }
- function Xe(t) {
- return Mt ? Object(Mt.call(t)) : {};
- }
- function Ye(t, e) {
- var n = e ? et(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.length);
- }
- function Ze(t, e) {
- var n = -1, r = t.length;
- for (e || (e = Array(r)); ++n < r; )
- e[n] = t[n];
- return e;
- }
- function Pt(t, e, n, r) {
- n || (n = {});
- for (var i = -1, f = e.length; ++i < f; ) {
- var b = e[i], l = void 0;
- It(n, b, l === void 0 ? t[b] : l);
- }
- return n;
- }
- function Qe(t, e) {
- return Pt(t, $t(t), e);
- }
- function tn(t) {
- return Ne(t, rt, $t);
- }
- function N(t, e) {
- var n = t.__data__;
- return an(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
- }
- function j(t, e) {
- var n = re(t, e);
- return Fe(n) ? n : void 0;
- }
- var $t = jt ? z(jt, Object) : dn, S = De;
- (X && S(new X(new ArrayBuffer(1))) != R || I && S(new I()) != w || Y && S(Y.resolve()) != M || Z && S(new Z()) != G || Q && S(new Q()) != q) && (S = function(t) {
- var e = H.call(t), n = e == T ? t.constructor : void 0, r = n ? C(n) : void 0;
- if (r)
- switch (r) {
- case he:
- return R;
- case de:
- return w;
- case _e:
- return M;
- case ye:
- return G;
- case ge:
- return q;
- }
- return e;
- });
- function en(t) {
- var e = t.length, n = t.constructor(e);
- return e && typeof t[0] == "string" && v.call(t, "index") && (n.index = t.index, n.input = t.input), n;
- }
- function nn(t) {
- return typeof t.constructor == "function" && !Bt(t) ? Le(ie(t)) : {};
- }
- function rn(t, e, n, r) {
- var i = t.constructor;
- switch (e) {
- case ct:
- return et(t);
- case $:
- case c:
- return new i(+t);
- case R:
- return We(t, r);
- case ut:
- case ft:
- case lt:
- case pt:
- case ht:
- case dt:
- case _t:
- case yt:
- case gt:
- return Ye(t, r);
- case w:
- return qe(t, r, n);
- case B:
- case st:
- return new i(t);
- case at:
- return ze(t);
- case G:
- return Je(t, r, n);
- case it:
- return Xe(t);
- }
- }
- function on(t, e) {
- return e = e == null ? a : e, !!e && (typeof t == "number" || zt.test(t)) && t > -1 && t % 1 == 0 && t < e;
- }
- function an(t) {
- var e = typeof t;
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
- }
- function sn(t) {
- return !!St && St in t;
- }
- function Bt(t) {
- var e = t && t.constructor, n = typeof e == "function" && e.prototype || U;
- return t === n;
- }
- function C(t) {
- if (t != null) {
- try {
- return Ct.call(t);
- } catch (e) {
- }
- try {
- return t + "";
- } catch (e) {
- }
- }
- return "";
- }
- function cn(t) {
- return tt(t, !0, !0);
- }
- function Gt(t, e) {
- return t === e || t !== t && e !== e;
- }
- function un(t) {
- return fn(t) && v.call(t, "callee") && (!ue.call(t, "callee") || H.call(t) == _);
- }
- var nt = Array.isArray;
- function Rt(t) {
- return t != null && pn(t.length) && !Ut(t);
- }
- function fn(t) {
- return hn(t) && Rt(t);
- }
- var ln = le || _n;
- function Ut(t) {
- var e = D(t) ? H.call(t) : "";
- return e == s || e == h;
- }
- function pn(t) {
- return typeof t == "number" && t > -1 && t % 1 == 0 && t <= a;
- }
- function D(t) {
- var e = typeof t;
- return !!t && (e == "object" || e == "function");
- }
- function hn(t) {
- return !!t && typeof t == "object";
- }
- function rt(t) {
- return Rt(t) ? Ue(t) : Ve(t);
- }
- function dn() {
- return [];
- }
- function _n() {
- return !1;
- }
- p.exports = cn;
- })(k, k.exports);
- var xn = k.exports;
- const Kn = /* @__PURE__ */ An(xn);
- function jn(p) {
- if (!p) return null;
- p = Kn(p);
- let d = Array.isArray(p) ? p.concat() : [p];
- for (; d.length; ) {
- const O = d.length;
- for (let m = 0; m < O; m++) {
- const a = d.shift();
- !a.children || !a.children.length || (a.children.forEach((_) => {
- _.path[0] !== "/" && !_.path.startsWith("http") && (_.path = a.path.replace(/(\w*)[/]*$/, `$1/${_.path}`));
- }), d = d.concat(a.children));
- }
- }
- return p;
- }
- const En = { class: "s-menu-top-common" }, Mn = { class: "menu-wrap" }, In = {
- __name: "STopMenu",
- setup(p) {
- const d = Cn(), O = Ft([]), m = Ft(""), a = yn({
- collapsed: !1,
- selectedKeys: [],
- openKeys: [],
- preOpenKeys: []
- });
- gn(
- () => a.openKeys,
- (c, u) => {
- a.preOpenKeys = u;
- }
- );
- const _ = (c) => c.map((s) => {
- const h = {
- key: s.path,
- // icon: item.icon ? () => h(item.icon) : null,
- icon: null,
- label: s.name || s.meta.title,
- title: s.name || s,
- path: s.path
- };
- return s.children && (h.children = _(s.children)), h;
- }), W = (c) => {
- d.push(c.key), a.selectedKeys = [c.key], window.$utils.ls.set("selectedKeys", a.selectedKeys);
- }, $ = (c) => {
- const u = c.filter((w) => !a.preOpenKeys.includes(w)), s = u[u.length - 1];
- a.openKeys = [s], Vt().setMenuOpenKeys(a.openKeys);
- };
- return bn(() => {
- m.value = window.$utils.env.VITE_APP_MENU_THEME || "dark";
- const c = Vt(), u = c.dynamics, s = jn(u.find((T) => T.path === "/")), h = s && s.children || [];
- O.value = _([...h].filter((T) => {
- var M;
- return !((M = T.meta) != null && M.hidden);
- }));
- const w = location.pathname;
- window.$utils.ls.set("selectedKeys", [w]), a.selectedKeys = window.$utils.ls.get("selectedKeys") || [];
- const B = c.openKeys || [];
- a.openKeys = B;
- }), (c, u) => {
- const s = On;
- return mn(), wn("div", En, [
- vn("div", Mn, [
- Tn(s, {
- openKeys: a.openKeys,
- "onUpdate:openKeys": u[0] || (u[0] = (h) => a.openKeys = h),
- selectedKeys: a.selectedKeys,
- "onUpdate:selectedKeys": u[1] || (u[1] = (h) => a.selectedKeys = h),
- mode: "horizontal",
- theme: m.value,
- items: O.value,
- onSelect: W,
- onOpenChange: $
- }, null, 8, ["openKeys", "selectedKeys", "theme", "items"])
- ])
- ]);
- };
- }
- }, Bn = /* @__PURE__ */ Sn(In, [["__scopeId", "data-v-ad258b82"]]);
- export {
- Bn as default
- };
|