import '@das-fed/upf-ui/packages/components/tree/style.css';
import { defineComponent as cr, openBlock as T, createBlock as Ge, unref as s, createElementBlock as A, createElementVNode as ze, renderSlot as D, createTextVNode as Ae, toDisplayString as ge, ref as U, computed as z, watch as $t, nextTick as pe, onMounted as Pa, onBeforeUnmount as zn, useAttrs as Un, normalizeStyle as Er, normalizeClass as Ze, mergeProps as Kr, isRef as Gn, createSlots as wt, withCtx as je, createVNode as vt, createCommentVNode as j, withDirectives as ve, withModifiers as Qe, Fragment as Ce, vShow as Rn, renderList as ht } from "vue";
import { withInstall as La } from "@das-fed/upf-utils/with-install/index";
import { t as be, setI18nRule as Vn } from "@das-fed/upf-web/packages/i18n/index";
import { DasAutoRegisterIcon as Hn, DasIcon as yt } from "@das-fed/upf-ui/packages/components/icon/index";
import { DasInput as Wn } from "@das-fed/upf-ui/packages/components/input/index";
import { vOverlay as Wt } from "@das-fed/upf-ui/packages/components/overlay/index";
import { vDasTooltip as Ne } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
import { vDasLoading as qn } from "@das-fed/upf-ui/packages/components/loading/index";
import { ElLoading as Nr, ElTree as Jn, ElPopover as Yn } from "element-plus";
import "element-plus/es/components/popover/style/css";
import "element-plus/es/components/tree/style/css";
import { DasIconCaretRight as Xn } from "@das-fed/upf-ui/packages/icons/caret-right/index";
import { arrUnique as Zt } from "@das-fed/upf-utils/common-tools";
import "element-plus/es/components/loading/style/css";
const Zn = /* @__PURE__ */ cr({
  __name: "expand-icon",
  setup(e) {
    return (t, r) => (T(), Ge(s(Xn), {
      class: "das-tree__expand-icon",
      size: "medium"
    }));
  }
}), Ea = (e, t) => {
  const r = e.__vccOpts || e;
  for (const [a, c] of t)
    r[a] = c;
  return r;
}, Qn = /* @__PURE__ */ Ea(Zn, [["__scopeId", "data-v-e225c8a8"]]), eo = { class: "tree-empty-block" }, to = { class: "tree-empty-text" }, ro = /* @__PURE__ */ cr({
  __name: "empty",
  props: {
    emptyText: {}
  },
  setup(e) {
    return (t, r) => (T(), A("div", eo, [
      ze("div", to, [
        D(t.$slots, "default", {}, () => [
          Ae(
            ge(e.emptyText),
            1
            /* TEXT */
          )
        ], !0)
      ])
    ]));
  }
}), jt = /* @__PURE__ */ Ea(ro, [["__scopeId", "data-v-04eb8a79"]]), ao = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|%)$/.test(e), no = (e) => typeof e == "string" && ao(e) ? e : e + "px", Qt = (e, t = "children") => Array.isArray(e) && e.length ? e.reduce((r, a) => {
  let c = a[t], d = { ...a };
  return delete d[t], c && c.length ? r.concat(d, Qt(c, t)) : r.concat(d);
}, []) : [];
function oo() {
  this.__data__ = [], this.size = 0;
}
function Ka(e, t) {
  return e === t || e !== e && t !== t;
}
function Pt(e, t) {
  for (var r = e.length; r--; )
    if (Ka(e[r][0], t))
      return r;
  return -1;
}
var io = Array.prototype, so = io.splice;
function lo(e) {
  var t = this.__data__, r = Pt(t, e);
  if (r < 0)
    return !1;
  var a = t.length - 1;
  return r == a ? t.pop() : so.call(t, r, 1), --this.size, !0;
}
function co(e) {
  var t = this.__data__, r = Pt(t, e);
  return r < 0 ? void 0 : t[r][1];
}
function uo(e) {
  return Pt(this.__data__, e) > -1;
}
function fo(e, t) {
  var r = this.__data__, a = Pt(r, e);
  return a < 0 ? (++this.size, r.push([e, t])) : r[a][1] = t, this;
}
function De(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
De.prototype.clear = oo;
De.prototype.delete = lo;
De.prototype.get = co;
De.prototype.has = uo;
De.prototype.set = fo;
function vo() {
  this.__data__ = new De(), this.size = 0;
}
function ho(e) {
  var t = this.__data__, r = t.delete(e);
  return this.size = t.size, r;
}
function yo(e) {
  return this.__data__.get(e);
}
function go(e) {
  return this.__data__.has(e);
}
var Na = typeof global == "object" && global && global.Object === Object && global, po = typeof self == "object" && self && self.Object === Object && self, Te = Na || po || Function("return this")(), tt = Te.Symbol, Ma = Object.prototype, bo = Ma.hasOwnProperty, $o = Ma.toString, gt = tt ? tt.toStringTag : void 0;
function _o(e) {
  var t = bo.call(e, gt), r = e[gt];
  try {
    e[gt] = void 0;
    var a = !0;
  } catch {
  }
  var c = $o.call(e);
  return a && (t ? e[gt] = r : delete e[gt]), c;
}
var mo = Object.prototype, Co = mo.toString;
function To(e) {
  return Co.call(e);
}
var wo = "[object Null]", Oo = "[object Undefined]", Mr = tt ? tt.toStringTag : void 0;
function at(e) {
  return e == null ? e === void 0 ? Oo : wo : Mr && Mr in Object(e) ? _o(e) : To(e);
}
function Ue(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var jo = "[object AsyncFunction]", Ao = "[object Function]", So = "[object GeneratorFunction]", ko = "[object Proxy]";
function Da(e) {
  if (!Ue(e))
    return !1;
  var t = at(e);
  return t == Ao || t == So || t == jo || t == ko;
}
var qt = Te["__core-js_shared__"], Dr = function() {
  var e = /[^.]+$/.exec(qt && qt.keys && qt.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function Io(e) {
  return !!Dr && Dr in e;
}
var xo = Function.prototype, Po = xo.toString;
function We(e) {
  if (e != null) {
    try {
      return Po.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var Lo = /[\\^$.*+?()[\]{}|]/g, Eo = /^\[object .+?Constructor\]$/, Ko = Function.prototype, No = Object.prototype, Mo = Ko.toString, Do = No.hasOwnProperty, Fo = RegExp(
  "^" + Mo.call(Do).replace(Lo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Bo(e) {
  if (!Ue(e) || Io(e))
    return !1;
  var t = Da(e) ? Fo : Eo;
  return t.test(We(e));
}
function zo(e, t) {
  return e == null ? void 0 : e[t];
}
function qe(e, t) {
  var r = zo(e, t);
  return Bo(r) ? r : void 0;
}
var _t = qe(Te, "Map"), mt = qe(Object, "create");
function Uo() {
  this.__data__ = mt ? mt(null) : {}, this.size = 0;
}
function Go(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var Ro = "__lodash_hash_undefined__", Vo = Object.prototype, Ho = Vo.hasOwnProperty;
function Wo(e) {
  var t = this.__data__;
  if (mt) {
    var r = t[e];
    return r === Ro ? void 0 : r;
  }
  return Ho.call(t, e) ? t[e] : void 0;
}
var qo = Object.prototype, Jo = qo.hasOwnProperty;
function Yo(e) {
  var t = this.__data__;
  return mt ? t[e] !== void 0 : Jo.call(t, e);
}
var Xo = "__lodash_hash_undefined__";
function Zo(e, t) {
  var r = this.__data__;
  return this.size += this.has(e) ? 0 : 1, r[e] = mt && t === void 0 ? Xo : t, this;
}
function He(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
He.prototype.clear = Uo;
He.prototype.delete = Go;
He.prototype.get = Wo;
He.prototype.has = Yo;
He.prototype.set = Zo;
function Qo() {
  this.size = 0, this.__data__ = {
    hash: new He(),
    map: new (_t || De)(),
    string: new He()
  };
}
function ei(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function Lt(e, t) {
  var r = e.__data__;
  return ei(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
}
function ti(e) {
  var t = Lt(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
function ri(e) {
  return Lt(this, e).get(e);
}
function ai(e) {
  return Lt(this, e).has(e);
}
function ni(e, t) {
  var r = Lt(this, e), a = r.size;
  return r.set(e, t), this.size += r.size == a ? 0 : 1, this;
}
function nt(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
nt.prototype.clear = Qo;
nt.prototype.delete = ti;
nt.prototype.get = ri;
nt.prototype.has = ai;
nt.prototype.set = ni;
var oi = 200;
function ii(e, t) {
  var r = this.__data__;
  if (r instanceof De) {
    var a = r.__data__;
    if (!_t || a.length < oi - 1)
      return a.push([e, t]), this.size = ++r.size, this;
    r = this.__data__ = new nt(a);
  }
  return r.set(e, t), this.size = r.size, this;
}
function ot(e) {
  var t = this.__data__ = new De(e);
  this.size = t.size;
}
ot.prototype.clear = vo;
ot.prototype.delete = ho;
ot.prototype.get = yo;
ot.prototype.has = go;
ot.prototype.set = ii;
function si(e, t) {
  for (var r = -1, a = e == null ? 0 : e.length; ++r < a && t(e[r], r, e) !== !1; )
    ;
  return e;
}
var Fr = function() {
  try {
    var e = qe(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
}();
function Fa(e, t, r) {
  t == "__proto__" && Fr ? Fr(e, t, {
    configurable: !0,
    enumerable: !0,
    value: r,
    writable: !0
  }) : e[t] = r;
}
var li = Object.prototype, ci = li.hasOwnProperty;
function Ba(e, t, r) {
  var a = e[t];
  (!(ci.call(e, t) && Ka(a, r)) || r === void 0 && !(t in e)) && Fa(e, t, r);
}
function Et(e, t, r, a) {
  var c = !r;
  r || (r = {});
  for (var d = -1, o = t.length; ++d < o; ) {
    var g = t[d], p = void 0;
    p === void 0 && (p = e[g]), c ? Fa(r, g, p) : Ba(r, g, p);
  }
  return r;
}
function ui(e, t) {
  for (var r = -1, a = Array(e); ++r < e; )
    a[r] = t(r);
  return a;
}
function it(e) {
  return e != null && typeof e == "object";
}
var fi = "[object Arguments]";
function Br(e) {
  return it(e) && at(e) == fi;
}
var za = Object.prototype, di = za.hasOwnProperty, vi = za.propertyIsEnumerable, hi = Br(/* @__PURE__ */ function() {
  return arguments;
}()) ? Br : function(e) {
  return it(e) && di.call(e, "callee") && !vi.call(e, "callee");
}, ur = Array.isArray;
function yi() {
  return !1;
}
var Ua = typeof exports == "object" && exports && !exports.nodeType && exports, zr = Ua && typeof module == "object" && module && !module.nodeType && module, gi = zr && zr.exports === Ua, Ur = gi ? Te.Buffer : void 0, pi = Ur ? Ur.isBuffer : void 0, Ga = pi || yi, bi = 9007199254740991, $i = /^(?:0|[1-9]\d*)$/;
function _i(e, t) {
  var r = typeof e;
  return t = t ?? bi, !!t && (r == "number" || r != "symbol" && $i.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
var mi = 9007199254740991;
function Ra(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= mi;
}
var Ci = "[object Arguments]", Ti = "[object Array]", wi = "[object Boolean]", Oi = "[object Date]", ji = "[object Error]", Ai = "[object Function]", Si = "[object Map]", ki = "[object Number]", Ii = "[object Object]", xi = "[object RegExp]", Pi = "[object Set]", Li = "[object String]", Ei = "[object WeakMap]", Ki = "[object ArrayBuffer]", Ni = "[object DataView]", Mi = "[object Float32Array]", Di = "[object Float64Array]", Fi = "[object Int8Array]", Bi = "[object Int16Array]", zi = "[object Int32Array]", Ui = "[object Uint8Array]", Gi = "[object Uint8ClampedArray]", Ri = "[object Uint16Array]", Vi = "[object Uint32Array]", R = {};
R[Mi] = R[Di] = R[Fi] = R[Bi] = R[zi] = R[Ui] = R[Gi] = R[Ri] = R[Vi] = !0;
R[Ci] = R[Ti] = R[Ki] = R[wi] = R[Ni] = R[Oi] = R[ji] = R[Ai] = R[Si] = R[ki] = R[Ii] = R[xi] = R[Pi] = R[Li] = R[Ei] = !1;
function Hi(e) {
  return it(e) && Ra(e.length) && !!R[at(e)];
}
function fr(e) {
  return function(t) {
    return e(t);
  };
}
var Va = typeof exports == "object" && exports && !exports.nodeType && exports, bt = Va && typeof module == "object" && module && !module.nodeType && module, Wi = bt && bt.exports === Va, Jt = Wi && Na.process, rt = function() {
  try {
    var e = bt && bt.require && bt.require("util").types;
    return e || Jt && Jt.binding && Jt.binding("util");
  } catch {
  }
}(), Gr = rt && rt.isTypedArray, qi = Gr ? fr(Gr) : Hi, Ji = Object.prototype, Yi = Ji.hasOwnProperty;
function Ha(e, t) {
  var r = ur(e), a = !r && hi(e), c = !r && !a && Ga(e), d = !r && !a && !c && qi(e), o = r || a || c || d, g = o ? ui(e.length, String) : [], p = g.length;
  for (var v in e)
    (t || Yi.call(e, v)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (v == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    c && (v == "offset" || v == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    d && (v == "buffer" || v == "byteLength" || v == "byteOffset") || // Skip index properties.
    _i(v, p))) && g.push(v);
  return g;
}
var Xi = Object.prototype;
function dr(e) {
  var t = e && e.constructor, r = typeof t == "function" && t.prototype || Xi;
  return e === r;
}
function Wa(e, t) {
  return function(r) {
    return e(t(r));
  };
}
var Zi = Wa(Object.keys, Object), Qi = Object.prototype, es = Qi.hasOwnProperty;
function ts(e) {
  if (!dr(e))
    return Zi(e);
  var t = [];
  for (var r in Object(e))
    es.call(e, r) && r != "constructor" && t.push(r);
  return t;
}
function qa(e) {
  return e != null && Ra(e.length) && !Da(e);
}
function vr(e) {
  return qa(e) ? Ha(e) : ts(e);
}
function rs(e, t) {
  return e && Et(t, vr(t), e);
}
function as(e) {
  var t = [];
  if (e != null)
    for (var r in Object(e))
      t.push(r);
  return t;
}
var ns = Object.prototype, os = ns.hasOwnProperty;
function is(e) {
  if (!Ue(e))
    return as(e);
  var t = dr(e), r = [];
  for (var a in e)
    a == "constructor" && (t || !os.call(e, a)) || r.push(a);
  return r;
}
function hr(e) {
  return qa(e) ? Ha(e, !0) : is(e);
}
function ss(e, t) {
  return e && Et(t, hr(t), e);
}
var Ja = typeof exports == "object" && exports && !exports.nodeType && exports, Rr = Ja && typeof module == "object" && module && !module.nodeType && module, ls = Rr && Rr.exports === Ja, Vr = ls ? Te.Buffer : void 0, Hr = Vr ? Vr.allocUnsafe : void 0;
function cs(e, t) {
  if (t)
    return e.slice();
  var r = e.length, a = Hr ? Hr(r) : new e.constructor(r);
  return e.copy(a), a;
}
function us(e, t) {
  var r = -1, a = e.length;
  for (t || (t = Array(a)); ++r < a; )
    t[r] = e[r];
  return t;
}
function fs(e, t) {
  for (var r = -1, a = e == null ? 0 : e.length, c = 0, d = []; ++r < a; ) {
    var o = e[r];
    t(o, r, e) && (d[c++] = o);
  }
  return d;
}
function Ya() {
  return [];
}
var ds = Object.prototype, vs = ds.propertyIsEnumerable, Wr = Object.getOwnPropertySymbols, yr = Wr ? function(e) {
  return e == null ? [] : (e = Object(e), fs(Wr(e), function(t) {
    return vs.call(e, t);
  }));
} : Ya;
function hs(e, t) {
  return Et(e, yr(e), t);
}
function Xa(e, t) {
  for (var r = -1, a = t.length, c = e.length; ++r < a; )
    e[c + r] = t[r];
  return e;
}
var Za = Wa(Object.getPrototypeOf, Object), ys = Object.getOwnPropertySymbols, Qa = ys ? function(e) {
  for (var t = []; e; )
    Xa(t, yr(e)), e = Za(e);
  return t;
} : Ya;
function gs(e, t) {
  return Et(e, Qa(e), t);
}
function en(e, t, r) {
  var a = t(e);
  return ur(e) ? a : Xa(a, r(e));
}
function ps(e) {
  return en(e, vr, yr);
}
function bs(e) {
  return en(e, hr, Qa);
}
var er = qe(Te, "DataView"), tr = qe(Te, "Promise"), rr = qe(Te, "Set"), ar = qe(Te, "WeakMap"), qr = "[object Map]", $s = "[object Object]", Jr = "[object Promise]", Yr = "[object Set]", Xr = "[object WeakMap]", Zr = "[object DataView]", _s = We(er), ms = We(_t), Cs = We(tr), Ts = We(rr), ws = We(ar), Me = at;
(er && Me(new er(new ArrayBuffer(1))) != Zr || _t && Me(new _t()) != qr || tr && Me(tr.resolve()) != Jr || rr && Me(new rr()) != Yr || ar && Me(new ar()) != Xr) && (Me = function(e) {
  var t = at(e), r = t == $s ? e.constructor : void 0, a = r ? We(r) : "";
  if (a)
    switch (a) {
      case _s:
        return Zr;
      case ms:
        return qr;
      case Cs:
        return Jr;
      case Ts:
        return Yr;
      case ws:
        return Xr;
    }
  return t;
});
var Os = Object.prototype, js = Os.hasOwnProperty;
function As(e) {
  var t = e.length, r = new e.constructor(t);
  return t && typeof e[0] == "string" && js.call(e, "index") && (r.index = e.index, r.input = e.input), r;
}
var Qr = Te.Uint8Array;
function gr(e) {
  var t = new e.constructor(e.byteLength);
  return new Qr(t).set(new Qr(e)), t;
}
function Ss(e, t) {
  var r = t ? gr(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.byteLength);
}
var ks = /\w*$/;
function Is(e) {
  var t = new e.constructor(e.source, ks.exec(e));
  return t.lastIndex = e.lastIndex, t;
}
var ea = tt ? tt.prototype : void 0, ta = ea ? ea.valueOf : void 0;
function xs(e) {
  return ta ? Object(ta.call(e)) : {};
}
function Ps(e, t) {
  var r = t ? gr(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.length);
}
var Ls = "[object Boolean]", Es = "[object Date]", Ks = "[object Map]", Ns = "[object Number]", Ms = "[object RegExp]", Ds = "[object Set]", Fs = "[object String]", Bs = "[object Symbol]", zs = "[object ArrayBuffer]", Us = "[object DataView]", Gs = "[object Float32Array]", Rs = "[object Float64Array]", Vs = "[object Int8Array]", Hs = "[object Int16Array]", Ws = "[object Int32Array]", qs = "[object Uint8Array]", Js = "[object Uint8ClampedArray]", Ys = "[object Uint16Array]", Xs = "[object Uint32Array]";
function Zs(e, t, r) {
  var a = e.constructor;
  switch (t) {
    case zs:
      return gr(e);
    case Ls:
    case Es:
      return new a(+e);
    case Us:
      return Ss(e, r);
    case Gs:
    case Rs:
    case Vs:
    case Hs:
    case Ws:
    case qs:
    case Js:
    case Ys:
    case Xs:
      return Ps(e, r);
    case Ks:
      return new a();
    case Ns:
    case Fs:
      return new a(e);
    case Ms:
      return Is(e);
    case Ds:
      return new a();
    case Bs:
      return xs(e);
  }
}
var ra = Object.create, Qs = /* @__PURE__ */ function() {
  function e() {
  }
  return function(t) {
    if (!Ue(t))
      return {};
    if (ra)
      return ra(t);
    e.prototype = t;
    var r = new e();
    return e.prototype = void 0, r;
  };
}();
function el(e) {
  return typeof e.constructor == "function" && !dr(e) ? Qs(Za(e)) : {};
}
var tl = "[object Map]";
function rl(e) {
  return it(e) && Me(e) == tl;
}
var aa = rt && rt.isMap, al = aa ? fr(aa) : rl, nl = "[object Set]";
function ol(e) {
  return it(e) && Me(e) == nl;
}
var na = rt && rt.isSet, il = na ? fr(na) : ol, sl = 1, ll = 2, cl = 4, tn = "[object Arguments]", ul = "[object Array]", fl = "[object Boolean]", dl = "[object Date]", vl = "[object Error]", rn = "[object Function]", hl = "[object GeneratorFunction]", yl = "[object Map]", gl = "[object Number]", an = "[object Object]", pl = "[object RegExp]", bl = "[object Set]", $l = "[object String]", _l = "[object Symbol]", ml = "[object WeakMap]", Cl = "[object ArrayBuffer]", Tl = "[object DataView]", wl = "[object Float32Array]", Ol = "[object Float64Array]", jl = "[object Int8Array]", Al = "[object Int16Array]", Sl = "[object Int32Array]", kl = "[object Uint8Array]", Il = "[object Uint8ClampedArray]", xl = "[object Uint16Array]", Pl = "[object Uint32Array]", F = {};
F[tn] = F[ul] = F[Cl] = F[Tl] = F[fl] = F[dl] = F[wl] = F[Ol] = F[jl] = F[Al] = F[Sl] = F[yl] = F[gl] = F[an] = F[pl] = F[bl] = F[$l] = F[_l] = F[kl] = F[Il] = F[xl] = F[Pl] = !0;
F[vl] = F[rn] = F[ml] = !1;
function At(e, t, r, a, c, d) {
  var o, g = t & sl, p = t & ll, v = t & cl;
  if (o !== void 0)
    return o;
  if (!Ue(e))
    return e;
  var E = ur(e);
  if (E) {
    if (o = As(e), !g)
      return us(e, o);
  } else {
    var C = Me(e), L = C == rn || C == hl;
    if (Ga(e))
      return cs(e, g);
    if (C == an || C == tn || L && !c) {
      if (o = p || L ? {} : el(e), !g)
        return p ? gs(e, ss(o, e)) : hs(e, rs(o, e));
    } else {
      if (!F[C])
        return c ? e : {};
      o = Zs(e, C, g);
    }
  }
  d || (d = new ot());
  var O = d.get(e);
  if (O)
    return O;
  d.set(e, o), il(e) ? e.forEach(function(x) {
    o.add(At(x, t, r, x, e, d));
  }) : al(e) && e.forEach(function(x, G) {
    o.set(G, At(x, t, r, G, e, d));
  });
  var ie = v ? p ? bs : ps : p ? hr : vr, Z = E ? void 0 : ie(e);
  return si(Z || e, function(x, G) {
    Z && (G = x, x = e[G]), Ba(o, G, At(x, t, r, G, e, d));
  }), o;
}
var Ll = 1, El = 4;
function Re(e) {
  return At(e, Ll | El);
}
var Yt = function() {
  return Te.Date.now();
}, Kl = /\s/;
function Nl(e) {
  for (var t = e.length; t-- && Kl.test(e.charAt(t)); )
    ;
  return t;
}
var Ml = /^\s+/;
function Dl(e) {
  return e && e.slice(0, Nl(e) + 1).replace(Ml, "");
}
var Fl = "[object Symbol]";
function Bl(e) {
  return typeof e == "symbol" || it(e) && at(e) == Fl;
}
var oa = NaN, zl = /^[-+]0x[0-9a-f]+$/i, Ul = /^0b[01]+$/i, Gl = /^0o[0-7]+$/i, Rl = parseInt;
function ia(e) {
  if (typeof e == "number")
    return e;
  if (Bl(e))
    return oa;
  if (Ue(e)) {
    var t = typeof e.valueOf == "function" ? e.valueOf() : e;
    e = Ue(t) ? t + "" : t;
  }
  if (typeof e != "string")
    return e === 0 ? e : +e;
  e = Dl(e);
  var r = Ul.test(e);
  return r || Gl.test(e) ? Rl(e.slice(2), r ? 2 : 8) : zl.test(e) ? oa : +e;
}
var Vl = "Expected a function", Hl = Math.max, Wl = Math.min;
function ql(e, t, r) {
  var a, c, d, o, g, p, v = 0, E = !1, C = !1, L = !0;
  if (typeof e != "function")
    throw new TypeError(Vl);
  t = ia(t) || 0, Ue(r) && (E = !!r.leading, C = "maxWait" in r, d = C ? Hl(ia(r.maxWait) || 0, t) : d, L = "trailing" in r ? !!r.trailing : L);
  function O(_) {
    var Q = a, ce = c;
    return a = c = void 0, v = _, o = e.apply(ce, Q), o;
  }
  function ie(_) {
    return v = _, g = setTimeout(G, t), E ? O(_) : o;
  }
  function Z(_) {
    var Q = _ - p, ce = _ - v, ee = t - Q;
    return C ? Wl(ee, d - ce) : ee;
  }
  function x(_) {
    var Q = _ - p, ce = _ - v;
    return p === void 0 || Q >= t || Q < 0 || C && ce >= d;
  }
  function G() {
    var _ = Yt();
    if (x(_))
      return ke(_);
    g = setTimeout(G, Z(_));
  }
  function ke(_) {
    return g = void 0, L && a ? O(_) : (a = c = void 0, o);
  }
  function $e() {
    g !== void 0 && clearTimeout(g), v = 0, a = p = c = g = void 0;
  }
  function he() {
    return g === void 0 ? o : ke(Yt());
  }
  function ye() {
    var _ = Yt(), Q = x(_);
    if (a = arguments, c = this, p = _, Q) {
      if (g === void 0)
        return ie(p);
      if (C)
        return clearTimeout(g), g = setTimeout(G, t), O(p);
    }
    return g === void 0 && (g = setTimeout(G, t)), o;
  }
  return ye.cancel = $e, ye.flush = he, ye;
}
const Jl = (e, t, r, a, c, d, o, g, p, v) => {
  const E = U(null), C = U([]), L = U(!1), O = z(() => ({
    label: "name",
    children: "children",
    parentId: "parentId",
    pathName: "pathName",
    disabled: "disabled",
    isLeaf: "leaf",
    allowUnSelect: "allowUnSelect",
    ...e.props
  })), ie = z(() => {
    let n = "100%";
    return e.height && (n = no(e.height)), n;
  }), Z = (n, u, l) => {
    if (!e.operationsLabel) return;
    const y = e.operationsLabel[n];
    if (y)
      return typeof y == "function" ? y(u, l) : y;
  }, x = U({}), G = (n, u) => {
    n && (x.value[u] = n);
  }, ke = U(null), $e = U(null), he = U({ node: null, data: null }), ye = (n, u) => {
    $e.value = x.value[u[e.nodeKey]], he.value = {
      node: n,
      data: u
    };
  }, _ = () => {
    var n;
    (n = ke.value) == null || n.hide();
  }, Q = U(""), ce = (n) => {
    Q.value = n ? he.value.data[e.nodeKey] : "";
  }, ee = (n, u) => {
    var w, X, N, Oe;
    let l = {};
    const y = "bottom";
    return e.showOperations && ((w = e.mergeOprations) != null && w.list ? typeof e.mergeOprations.list != "function" ? (X = e.mergeOprations) != null && X.list && e.mergeOprations.list.length && (l.list = e.mergeOprations.list) : l.list = e.mergeOprations.list(n, u) : l.list = [], (N = l.list) != null && N.length && (l.list = l.list.filter((zt) => !zt.hidden)), (Oe = e.mergeOprations) != null && Oe.position ? (typeof e.mergeOprations.position != "function" ? l.position = e.mergeOprations.position : l.position = e.mergeOprations.position(n, u), l.position === "left" && (l.position = "top"), l.position === "right" && (l.position = "bottom")) : l.position = y), l;
  }, Ie = (n, u) => {
    let l = [], y = [];
    if (e.showOperations && (!e.operations || !e.operations.length ? y = [
      {
        value: "add",
        label: Z("add", n, u) ?? be("新增同级"),
        icon: "add"
      },
      {
        value: "addItem",
        label: Z("addItem", n, u) ?? be("新增子级"),
        icon: "addItem"
      },
      {
        value: "edit",
        label: Z("edit", n, u) ?? be("编辑"),
        icon: "edit"
      },
      {
        value: "delete",
        label: Z("delete", n, u) ?? be("删除"),
        icon: "delete"
      }
    ] : typeof e.operations == "function" ? y = e.operations(n, u) : y = e.operations), !y || !y.length) return [];
    if (e.operations)
      l = y;
    else {
      let w = [];
      e.operationsLayout && (typeof e.operationsLayout == "string" ? w = e.operationsLayout.split(",") : typeof e.operationsLayout(n, u) == "string" ? w = e.operationsLayout(n, u).split(",") : w = ["add", "addItem", "edit", "delete"]), y != null && y.length && (w != null && w.length) && w.forEach((X) => {
        const N = y.find((Oe) => Oe.value === X);
        N && l.push(N);
      });
    }
    return n.level === Number(e.maxNodeLevel) && (l = l.filter((w) => w.icon !== "addItem" && w.name !== be("新增子级"))), l.length && (l = l.filter((w) => !w.hidden)), l;
  }, xe = (n, u, l) => {
    n.disabled || (_(), Q.value = "", setTimeout(() => t("handleOperation", n, u, l), 0));
  }, Pe = (n, u) => u[O.value.label].toLowerCase().includes(n.toLowerCase()), Le = z(() => (e == null ? void 0 : e.filterNodeMethod) ?? Pe), Ee = z({
    get: () => e.filterValue,
    set: (n) => {
      t("update:filterValue", n);
    }
  }), fe = () => {
    const n = Ee.value, u = O.value.children;
    n && e.data ? C.value = Qt(e.data, u).filter((l) => Le.value(n, l)) : e.data && (C.value = Qt(e.data, u)), C.value.length || C.value.push({ [O.value.label]: be("暂无数据"), id: "nodata" });
  }, dt = () => {
    C.value = [];
  }, Fe = (n, u) => {
    var l;
    return n ? u[(l = O.value) == null ? void 0 : l.label].includes(n) : !0;
  }, Ke = (n, u) => {
    let l = !1;
    return typeof O.value.disabled == "string" ? l = n[O.value.disabled] ?? !1 : typeof O.value.disabled == "function" && (l = O.value.disabled(n, u) ?? !1), l;
  }, de = (n, u = "parentId") => {
    var N;
    const l = n[u], y = (N = r.value) == null ? void 0 : N.store.nodesMap, w = (y == null ? void 0 : y[l]) ?? null;
    if (!w) return [null, null];
    if (!Ke(w.data, w)) return [w.data, w];
    const X = de(w.data, u);
    if (X) return X;
  }, _e = (n, u) => {
    let l = !1;
    return typeof O.value.isLeaf == "string" ? l = n[O.value.isLeaf] ?? !1 : typeof O.value.isLeaf == "function" && (l = O.value.isLeaf(n, u) ?? !1), l;
  }, we = (n) => {
    let u = !1;
    return typeof O.value.allowUnSelect == "string" ? u = n[O.value.allowUnSelect] ?? !1 : typeof O.value.allowUnSelect == "function" && (u = O.value.allowUnSelect(n) ?? !1), u;
  }, Be = (n) => e.draggable ? e.allowDrag ? e.allowDrag(n) : !0 : !1, Ye = (n, u) => {
    if (typeof e.filterItemClass == "string")
      return e.filterItemClass;
    if (typeof e.filterItemClass == "function")
      return e.filterItemClass(n, u);
  };
  let b = 0;
  const k = z(() => {
    const n = !!v["onNode-db-click"] || !!v.onNodeDbClick, u = !!v["onCheck-node-db-click"] || !!v.onCheckNodeDbClick;
    return n || u;
  }), I = async (n, u) => {
    var y;
    if ((y = E.value) == null || y.click(), Ke(n, u)) return;
    let l = !0;
    if (e.changeNodeConfirm && (l = await e.changeNodeConfirm(n)), !!l) {
      if (!k.value) {
        me(n, u);
        return;
      }
      b++, re(n, u);
    }
  }, re = ql((...n) => {
    const [u, l] = n;
    b > 1 ? K(u, l) : me(u, l), b = 0;
  }, 500), K = (n, u) => {
    e.showCheckbox ? t("check-node-db-click", n, u) : t("node-db-click", n, u);
  }, me = (n, u) => {
    var l;
    e.showCheckbox ? t("check-node-click", n, u) : (L.value = !0, c.value = n[e.nodeKey], (l = r.value) == null || l.setCurrentKey(c.value), n.path && (a.value = n.path), t("change", n[e.nodeKey], n), t("node-click", n, u), t("node-change", n));
  }, se = async (n, u) => {
    await pe(), !(d.value && !e.showCheckbox && c.value && n[e.nodeKey] !== c.value) && t("current-change", n, u);
  }, te = (n, u = !1) => {
    let l = !1;
    return e != null && e.nodeKey && (e.showCheckbox ? u && (l = !!c.value.includes(n[e.nodeKey])) : l = c.value === n[e.nodeKey]), l;
  }, ue = async (n) => {
    var u, l, y;
    if (!Ke(n, null)) {
      if (!e.showCheckbox)
        I(n);
      else {
        const w = (u = e.data) == null ? void 0 : u.find((X) => X[e.nodeKey] === n[e.nodeKey]);
        if (!te(n, !0) || !(e.hideRootCheckbox && w)) {
          const X = c.value || [];
          if (e != null && e.nodeKey && !X.includes(n[e.nodeKey])) {
            const N = X.concat(n[e.nodeKey]) || [];
            e.showCheckbox && ((l = r.value) == null || l.setCheckedKeys(N)), g(n, { checkedKeys: [...N] }, !0);
          }
        }
        (y = r.value) == null || y.setCurrentKey(n[e.nodeKey]);
      }
      C.value = [], Ee.value = "", t("filter-node-click", n);
    }
  }, ae = (n, u) => {
    let l = "", y = "";
    return O.value.class && (typeof O.value.class == "string" ? y = O.value.class : y = O.value.class(n, u)), y && (l = `${l} ${y}`), te(n) && (l = `${l} is-active`), Be(u) && (l = `${l} show-draggable-icon`), l;
  }, H = async () => {
    var n;
    return await pe(), L.value ? L.value = !1 : (e.showCheckbox || (n = r.value) == null || n.setCurrentKey(c.value, !0), !0);
  };
  return $t(
    () => e.data,
    (n, u) => {
      if (!d.value) {
        if (!e.showOperations)
          if (n && n.length) {
            const l = n.find(
              (y) => y[O.value.children] && y[O.value.children].length
            );
            p.value = !l;
          } else
            p.value = !1;
        if (JSON.stringify(n) !== JSON.stringify(u)) {
          if (n && n.length && e.defaultExpandRoot) {
            const l = n.map((y) => y[e.nodeKey]);
            o.value = Re(l);
          }
          H();
        }
      }
    },
    { immediate: !0, deep: !0 }
  ), {
    realHeight: ie,
    dasTree: E,
    treeRef: r,
    oprationVisibleChange: ce,
    getOperations: Ie,
    handleOperation: xe,
    filterInnerValue: Ee,
    filterMethod: Fe,
    filterList: C,
    selectItem: ue,
    nodeClass: ae,
    innerValue: c,
    nodeClick: I,
    defaultProps: O,
    filterSeach: fe,
    filterNodeMethodFn: Le,
    filterClear: dt,
    isActive: te,
    expandParent: H,
    disabledFlag: Ke,
    currentOprationKey: Q,
    getMergeOperations: ee,
    setOprationsMoreBtnRefs: G,
    oprationsPopoverRef: ke,
    currentMoreBtnRef: $e,
    moreBtnEnter: ye,
    currentOprationItem: he,
    isLeafFlag: _e,
    filterCustomClass: Ye,
    allowUnSelectFlag: we,
    findSelectableParentNode: de,
    currentChange: se
  };
};
var Ot = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Yl(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Xl() {
  this.__data__ = [], this.size = 0;
}
var Zl = Xl;
function Ql(e, t) {
  return e === t || e !== e && t !== t;
}
var nn = Ql, ec = nn;
function tc(e, t) {
  for (var r = e.length; r--; )
    if (ec(e[r][0], t))
      return r;
  return -1;
}
var Kt = tc, rc = Kt, ac = Array.prototype, nc = ac.splice;
function oc(e) {
  var t = this.__data__, r = rc(t, e);
  if (r < 0)
    return !1;
  var a = t.length - 1;
  return r == a ? t.pop() : nc.call(t, r, 1), --this.size, !0;
}
var ic = oc, sc = Kt;
function lc(e) {
  var t = this.__data__, r = sc(t, e);
  return r < 0 ? void 0 : t[r][1];
}
var cc = lc, uc = Kt;
function fc(e) {
  return uc(this.__data__, e) > -1;
}
var dc = fc, vc = Kt;
function hc(e, t) {
  var r = this.__data__, a = vc(r, e);
  return a < 0 ? (++this.size, r.push([e, t])) : r[a][1] = t, this;
}
var yc = hc, gc = Zl, pc = ic, bc = cc, $c = dc, _c = yc;
function st(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
st.prototype.clear = gc;
st.prototype.delete = pc;
st.prototype.get = bc;
st.prototype.has = $c;
st.prototype.set = _c;
var Nt = st, mc = Nt;
function Cc() {
  this.__data__ = new mc(), this.size = 0;
}
var Tc = Cc;
function wc(e) {
  var t = this.__data__, r = t.delete(e);
  return this.size = t.size, r;
}
var Oc = wc;
function jc(e) {
  return this.__data__.get(e);
}
var Ac = jc;
function Sc(e) {
  return this.__data__.has(e);
}
var kc = Sc, Ic = typeof Ot == "object" && Ot && Ot.Object === Object && Ot, on = Ic, xc = on, Pc = typeof self == "object" && self && self.Object === Object && self, Lc = xc || Pc || Function("return this")(), Se = Lc, Ec = Se, Kc = Ec.Symbol, pr = Kc, sa = pr, sn = Object.prototype, Nc = sn.hasOwnProperty, Mc = sn.toString, pt = sa ? sa.toStringTag : void 0;
function Dc(e) {
  var t = Nc.call(e, pt), r = e[pt];
  try {
    e[pt] = void 0;
    var a = !0;
  } catch {
  }
  var c = Mc.call(e);
  return a && (t ? e[pt] = r : delete e[pt]), c;
}
var Fc = Dc, Bc = Object.prototype, zc = Bc.toString;
function Uc(e) {
  return zc.call(e);
}
var Gc = Uc, la = pr, Rc = Fc, Vc = Gc, Hc = "[object Null]", Wc = "[object Undefined]", ca = la ? la.toStringTag : void 0;
function qc(e) {
  return e == null ? e === void 0 ? Wc : Hc : ca && ca in Object(e) ? Rc(e) : Vc(e);
}
var Mt = qc;
function Jc(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var Ct = Jc, Yc = Mt, Xc = Ct, Zc = "[object AsyncFunction]", Qc = "[object Function]", eu = "[object GeneratorFunction]", tu = "[object Proxy]";
function ru(e) {
  if (!Xc(e))
    return !1;
  var t = Yc(e);
  return t == Qc || t == eu || t == Zc || t == tu;
}
var ln = ru, au = Se, nu = au["__core-js_shared__"], ou = nu, Xt = ou, ua = function() {
  var e = /[^.]+$/.exec(Xt && Xt.keys && Xt.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function iu(e) {
  return !!ua && ua in e;
}
var su = iu, lu = Function.prototype, cu = lu.toString;
function uu(e) {
  if (e != null) {
    try {
      return cu.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var cn = uu, fu = ln, du = su, vu = Ct, hu = cn, yu = /[\\^$.*+?()[\]{}|]/g, gu = /^\[object .+?Constructor\]$/, pu = Function.prototype, bu = Object.prototype, $u = pu.toString, _u = bu.hasOwnProperty, mu = RegExp(
  "^" + $u.call(_u).replace(yu, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Cu(e) {
  if (!vu(e) || du(e))
    return !1;
  var t = fu(e) ? mu : gu;
  return t.test(hu(e));
}
var Tu = Cu;
function wu(e, t) {
  return e == null ? void 0 : e[t];
}
var Ou = wu, ju = Tu, Au = Ou;
function Su(e, t) {
  var r = Au(e, t);
  return ju(r) ? r : void 0;
}
var Je = Su, ku = Je, Iu = Se, xu = ku(Iu, "Map"), br = xu, Pu = Je, Lu = Pu(Object, "create"), Dt = Lu, fa = Dt;
function Eu() {
  this.__data__ = fa ? fa(null) : {}, this.size = 0;
}
var Ku = Eu;
function Nu(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var Mu = Nu, Du = Dt, Fu = "__lodash_hash_undefined__", Bu = Object.prototype, zu = Bu.hasOwnProperty;
function Uu(e) {
  var t = this.__data__;
  if (Du) {
    var r = t[e];
    return r === Fu ? void 0 : r;
  }
  return zu.call(t, e) ? t[e] : void 0;
}
var Gu = Uu, Ru = Dt, Vu = Object.prototype, Hu = Vu.hasOwnProperty;
function Wu(e) {
  var t = this.__data__;
  return Ru ? t[e] !== void 0 : Hu.call(t, e);
}
var qu = Wu, Ju = Dt, Yu = "__lodash_hash_undefined__";
function Xu(e, t) {
  var r = this.__data__;
  return this.size += this.has(e) ? 0 : 1, r[e] = Ju && t === void 0 ? Yu : t, this;
}
var Zu = Xu, Qu = Ku, ef = Mu, tf = Gu, rf = qu, af = Zu;
function lt(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
lt.prototype.clear = Qu;
lt.prototype.delete = ef;
lt.prototype.get = tf;
lt.prototype.has = rf;
lt.prototype.set = af;
var nf = lt, da = nf, of = Nt, sf = br;
function lf() {
  this.size = 0, this.__data__ = {
    hash: new da(),
    map: new (sf || of)(),
    string: new da()
  };
}
var cf = lf;
function uf(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
var ff = uf, df = ff;
function vf(e, t) {
  var r = e.__data__;
  return df(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
}
var Ft = vf, hf = Ft;
function yf(e) {
  var t = hf(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
var gf = yf, pf = Ft;
function bf(e) {
  return pf(this, e).get(e);
}
var $f = bf, _f = Ft;
function mf(e) {
  return _f(this, e).has(e);
}
var Cf = mf, Tf = Ft;
function wf(e, t) {
  var r = Tf(this, e), a = r.size;
  return r.set(e, t), this.size += r.size == a ? 0 : 1, this;
}
var Of = wf, jf = cf, Af = gf, Sf = $f, kf = Cf, If = Of;
function ct(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var a = e[t];
    this.set(a[0], a[1]);
  }
}
ct.prototype.clear = jf;
ct.prototype.delete = Af;
ct.prototype.get = Sf;
ct.prototype.has = kf;
ct.prototype.set = If;
var xf = ct, Pf = Nt, Lf = br, Ef = xf, Kf = 200;
function Nf(e, t) {
  var r = this.__data__;
  if (r instanceof Pf) {
    var a = r.__data__;
    if (!Lf || a.length < Kf - 1)
      return a.push([e, t]), this.size = ++r.size, this;
    r = this.__data__ = new Ef(a);
  }
  return r.set(e, t), this.size = r.size, this;
}
var Mf = Nf, Df = Nt, Ff = Tc, Bf = Oc, zf = Ac, Uf = kc, Gf = Mf;
function ut(e) {
  var t = this.__data__ = new Df(e);
  this.size = t.size;
}
ut.prototype.clear = Ff;
ut.prototype.delete = Bf;
ut.prototype.get = zf;
ut.prototype.has = Uf;
ut.prototype.set = Gf;
var Rf = ut;
function Vf(e, t) {
  for (var r = -1, a = e == null ? 0 : e.length; ++r < a && t(e[r], r, e) !== !1; )
    ;
  return e;
}
var Hf = Vf, Wf = Je, qf = function() {
  try {
    var e = Wf(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
}(), Jf = qf, va = Jf;
function Yf(e, t, r) {
  t == "__proto__" && va ? va(e, t, {
    configurable: !0,
    enumerable: !0,
    value: r,
    writable: !0
  }) : e[t] = r;
}
var un = Yf, Xf = un, Zf = nn, Qf = Object.prototype, ed = Qf.hasOwnProperty;
function td(e, t, r) {
  var a = e[t];
  (!(ed.call(e, t) && Zf(a, r)) || r === void 0 && !(t in e)) && Xf(e, t, r);
}
var fn = td, rd = fn, ad = un;
function nd(e, t, r, a) {
  var c = !r;
  r || (r = {});
  for (var d = -1, o = t.length; ++d < o; ) {
    var g = t[d], p = a ? a(r[g], e[g], g, r, e) : void 0;
    p === void 0 && (p = e[g]), c ? ad(r, g, p) : rd(r, g, p);
  }
  return r;
}
var Bt = nd;
function od(e, t) {
  for (var r = -1, a = Array(e); ++r < e; )
    a[r] = t(r);
  return a;
}
var id = od;
function sd(e) {
  return e != null && typeof e == "object";
}
var Tt = sd, ld = Mt, cd = Tt, ud = "[object Arguments]";
function fd(e) {
  return cd(e) && ld(e) == ud;
}
var dd = fd, ha = dd, vd = Tt, dn = Object.prototype, hd = dn.hasOwnProperty, yd = dn.propertyIsEnumerable, gd = ha(/* @__PURE__ */ function() {
  return arguments;
}()) ? ha : function(e) {
  return vd(e) && hd.call(e, "callee") && !yd.call(e, "callee");
}, pd = gd, bd = Array.isArray, $r = bd, kt = { exports: {} };
function $d() {
  return !1;
}
var _d = $d;
kt.exports;
(function(e, t) {
  var r = Se, a = _d, c = t && !t.nodeType && t, d = c && !0 && e && !e.nodeType && e, o = d && d.exports === c, g = o ? r.Buffer : void 0, p = g ? g.isBuffer : void 0, v = p || a;
  e.exports = v;
})(kt, kt.exports);
var vn = kt.exports, md = 9007199254740991, Cd = /^(?:0|[1-9]\d*)$/;
function Td(e, t) {
  var r = typeof e;
  return t = t ?? md, !!t && (r == "number" || r != "symbol" && Cd.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
var wd = Td, Od = 9007199254740991;
function jd(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Od;
}
var hn = jd, Ad = Mt, Sd = hn, kd = Tt, Id = "[object Arguments]", xd = "[object Array]", Pd = "[object Boolean]", Ld = "[object Date]", Ed = "[object Error]", Kd = "[object Function]", Nd = "[object Map]", Md = "[object Number]", Dd = "[object Object]", Fd = "[object RegExp]", Bd = "[object Set]", zd = "[object String]", Ud = "[object WeakMap]", Gd = "[object ArrayBuffer]", Rd = "[object DataView]", Vd = "[object Float32Array]", Hd = "[object Float64Array]", Wd = "[object Int8Array]", qd = "[object Int16Array]", Jd = "[object Int32Array]", Yd = "[object Uint8Array]", Xd = "[object Uint8ClampedArray]", Zd = "[object Uint16Array]", Qd = "[object Uint32Array]", V = {};
V[Vd] = V[Hd] = V[Wd] = V[qd] = V[Jd] = V[Yd] = V[Xd] = V[Zd] = V[Qd] = !0;
V[Id] = V[xd] = V[Gd] = V[Pd] = V[Rd] = V[Ld] = V[Ed] = V[Kd] = V[Nd] = V[Md] = V[Dd] = V[Fd] = V[Bd] = V[zd] = V[Ud] = !1;
function ev(e) {
  return kd(e) && Sd(e.length) && !!V[Ad(e)];
}
var tv = ev;
function rv(e) {
  return function(t) {
    return e(t);
  };
}
var _r = rv, It = { exports: {} };
It.exports;
(function(e, t) {
  var r = on, a = t && !t.nodeType && t, c = a && !0 && e && !e.nodeType && e, d = c && c.exports === a, o = d && r.process, g = function() {
    try {
      var p = c && c.require && c.require("util").types;
      return p || o && o.binding && o.binding("util");
    } catch {
    }
  }();
  e.exports = g;
})(It, It.exports);
var mr = It.exports, av = tv, nv = _r, ya = mr, ga = ya && ya.isTypedArray, ov = ga ? nv(ga) : av, iv = ov, sv = id, lv = pd, cv = $r, uv = vn, fv = wd, dv = iv, vv = Object.prototype, hv = vv.hasOwnProperty;
function yv(e, t) {
  var r = cv(e), a = !r && lv(e), c = !r && !a && uv(e), d = !r && !a && !c && dv(e), o = r || a || c || d, g = o ? sv(e.length, String) : [], p = g.length;
  for (var v in e)
    (t || hv.call(e, v)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (v == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    c && (v == "offset" || v == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    d && (v == "buffer" || v == "byteLength" || v == "byteOffset") || // Skip index properties.
    fv(v, p))) && g.push(v);
  return g;
}
var yn = yv, gv = Object.prototype;
function pv(e) {
  var t = e && e.constructor, r = typeof t == "function" && t.prototype || gv;
  return e === r;
}
var Cr = pv;
function bv(e, t) {
  return function(r) {
    return e(t(r));
  };
}
var gn = bv, $v = gn, _v = $v(Object.keys, Object), mv = _v, Cv = Cr, Tv = mv, wv = Object.prototype, Ov = wv.hasOwnProperty;
function jv(e) {
  if (!Cv(e))
    return Tv(e);
  var t = [];
  for (var r in Object(e))
    Ov.call(e, r) && r != "constructor" && t.push(r);
  return t;
}
var Av = jv, Sv = ln, kv = hn;
function Iv(e) {
  return e != null && kv(e.length) && !Sv(e);
}
var pn = Iv, xv = yn, Pv = Av, Lv = pn;
function Ev(e) {
  return Lv(e) ? xv(e) : Pv(e);
}
var Tr = Ev, Kv = Bt, Nv = Tr;
function Mv(e, t) {
  return e && Kv(t, Nv(t), e);
}
var Dv = Mv;
function Fv(e) {
  var t = [];
  if (e != null)
    for (var r in Object(e))
      t.push(r);
  return t;
}
var Bv = Fv, zv = Ct, Uv = Cr, Gv = Bv, Rv = Object.prototype, Vv = Rv.hasOwnProperty;
function Hv(e) {
  if (!zv(e))
    return Gv(e);
  var t = Uv(e), r = [];
  for (var a in e)
    a == "constructor" && (t || !Vv.call(e, a)) || r.push(a);
  return r;
}
var Wv = Hv, qv = yn, Jv = Wv, Yv = pn;
function Xv(e) {
  return Yv(e) ? qv(e, !0) : Jv(e);
}
var wr = Xv, Zv = Bt, Qv = wr;
function eh(e, t) {
  return e && Zv(t, Qv(t), e);
}
var th = eh, xt = { exports: {} };
xt.exports;
(function(e, t) {
  var r = Se, a = t && !t.nodeType && t, c = a && !0 && e && !e.nodeType && e, d = c && c.exports === a, o = d ? r.Buffer : void 0, g = o ? o.allocUnsafe : void 0;
  function p(v, E) {
    if (E)
      return v.slice();
    var C = v.length, L = g ? g(C) : new v.constructor(C);
    return v.copy(L), L;
  }
  e.exports = p;
})(xt, xt.exports);
var rh = xt.exports;
function ah(e, t) {
  var r = -1, a = e.length;
  for (t || (t = Array(a)); ++r < a; )
    t[r] = e[r];
  return t;
}
var nh = ah;
function oh(e, t) {
  for (var r = -1, a = e == null ? 0 : e.length, c = 0, d = []; ++r < a; ) {
    var o = e[r];
    t(o, r, e) && (d[c++] = o);
  }
  return d;
}
var ih = oh;
function sh() {
  return [];
}
var bn = sh, lh = ih, ch = bn, uh = Object.prototype, fh = uh.propertyIsEnumerable, pa = Object.getOwnPropertySymbols, dh = pa ? function(e) {
  return e == null ? [] : (e = Object(e), lh(pa(e), function(t) {
    return fh.call(e, t);
  }));
} : ch, Or = dh, vh = Bt, hh = Or;
function yh(e, t) {
  return vh(e, hh(e), t);
}
var gh = yh;
function ph(e, t) {
  for (var r = -1, a = t.length, c = e.length; ++r < a; )
    e[c + r] = t[r];
  return e;
}
var $n = ph, bh = gn, $h = bh(Object.getPrototypeOf, Object), _n = $h, _h = $n, mh = _n, Ch = Or, Th = bn, wh = Object.getOwnPropertySymbols, Oh = wh ? function(e) {
  for (var t = []; e; )
    _h(t, Ch(e)), e = mh(e);
  return t;
} : Th, mn = Oh, jh = Bt, Ah = mn;
function Sh(e, t) {
  return jh(e, Ah(e), t);
}
var kh = Sh, Ih = $n, xh = $r;
function Ph(e, t, r) {
  var a = t(e);
  return xh(e) ? a : Ih(a, r(e));
}
var Cn = Ph, Lh = Cn, Eh = Or, Kh = Tr;
function Nh(e) {
  return Lh(e, Kh, Eh);
}
var Mh = Nh, Dh = Cn, Fh = mn, Bh = wr;
function zh(e) {
  return Dh(e, Bh, Fh);
}
var Uh = zh, Gh = Je, Rh = Se, Vh = Gh(Rh, "DataView"), Hh = Vh, Wh = Je, qh = Se, Jh = Wh(qh, "Promise"), Yh = Jh, Xh = Je, Zh = Se, Qh = Xh(Zh, "Set"), ey = Qh, ty = Je, ry = Se, ay = ty(ry, "WeakMap"), ny = ay, nr = Hh, or = br, ir = Yh, sr = ey, lr = ny, Tn = Mt, ft = cn, ba = "[object Map]", oy = "[object Object]", $a = "[object Promise]", _a = "[object Set]", ma = "[object WeakMap]", Ca = "[object DataView]", iy = ft(nr), sy = ft(or), ly = ft(ir), cy = ft(sr), uy = ft(lr), Ve = Tn;
(nr && Ve(new nr(new ArrayBuffer(1))) != Ca || or && Ve(new or()) != ba || ir && Ve(ir.resolve()) != $a || sr && Ve(new sr()) != _a || lr && Ve(new lr()) != ma) && (Ve = function(e) {
  var t = Tn(e), r = t == oy ? e.constructor : void 0, a = r ? ft(r) : "";
  if (a)
    switch (a) {
      case iy:
        return Ca;
      case sy:
        return ba;
      case ly:
        return $a;
      case cy:
        return _a;
      case uy:
        return ma;
    }
  return t;
});
var jr = Ve, fy = Object.prototype, dy = fy.hasOwnProperty;
function vy(e) {
  var t = e.length, r = new e.constructor(t);
  return t && typeof e[0] == "string" && dy.call(e, "index") && (r.index = e.index, r.input = e.input), r;
}
var hy = vy, yy = Se, gy = yy.Uint8Array, py = gy, Ta = py;
function by(e) {
  var t = new e.constructor(e.byteLength);
  return new Ta(t).set(new Ta(e)), t;
}
var Ar = by, $y = Ar;
function _y(e, t) {
  var r = t ? $y(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.byteLength);
}
var my = _y, Cy = /\w*$/;
function Ty(e) {
  var t = new e.constructor(e.source, Cy.exec(e));
  return t.lastIndex = e.lastIndex, t;
}
var wy = Ty, wa = pr, Oa = wa ? wa.prototype : void 0, ja = Oa ? Oa.valueOf : void 0;
function Oy(e) {
  return ja ? Object(ja.call(e)) : {};
}
var jy = Oy, Ay = Ar;
function Sy(e, t) {
  var r = t ? Ay(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.length);
}
var ky = Sy, Iy = Ar, xy = my, Py = wy, Ly = jy, Ey = ky, Ky = "[object Boolean]", Ny = "[object Date]", My = "[object Map]", Dy = "[object Number]", Fy = "[object RegExp]", By = "[object Set]", zy = "[object String]", Uy = "[object Symbol]", Gy = "[object ArrayBuffer]", Ry = "[object DataView]", Vy = "[object Float32Array]", Hy = "[object Float64Array]", Wy = "[object Int8Array]", qy = "[object Int16Array]", Jy = "[object Int32Array]", Yy = "[object Uint8Array]", Xy = "[object Uint8ClampedArray]", Zy = "[object Uint16Array]", Qy = "[object Uint32Array]";
function eg(e, t, r) {
  var a = e.constructor;
  switch (t) {
    case Gy:
      return Iy(e);
    case Ky:
    case Ny:
      return new a(+e);
    case Ry:
      return xy(e, r);
    case Vy:
    case Hy:
    case Wy:
    case qy:
    case Jy:
    case Yy:
    case Xy:
    case Zy:
    case Qy:
      return Ey(e, r);
    case My:
      return new a();
    case Dy:
    case zy:
      return new a(e);
    case Fy:
      return Py(e);
    case By:
      return new a();
    case Uy:
      return Ly(e);
  }
}
var tg = eg, rg = Ct, Aa = Object.create, ag = /* @__PURE__ */ function() {
  function e() {
  }
  return function(t) {
    if (!rg(t))
      return {};
    if (Aa)
      return Aa(t);
    e.prototype = t;
    var r = new e();
    return e.prototype = void 0, r;
  };
}(), ng = ag, og = ng, ig = _n, sg = Cr;
function lg(e) {
  return typeof e.constructor == "function" && !sg(e) ? og(ig(e)) : {};
}
var cg = lg, ug = jr, fg = Tt, dg = "[object Map]";
function vg(e) {
  return fg(e) && ug(e) == dg;
}
var hg = vg, yg = hg, gg = _r, Sa = mr, ka = Sa && Sa.isMap, pg = ka ? gg(ka) : yg, bg = pg, $g = jr, _g = Tt, mg = "[object Set]";
function Cg(e) {
  return _g(e) && $g(e) == mg;
}
var Tg = Cg, wg = Tg, Og = _r, Ia = mr, xa = Ia && Ia.isSet, jg = xa ? Og(xa) : wg, Ag = jg, Sg = Rf, kg = Hf, Ig = fn, xg = Dv, Pg = th, Lg = rh, Eg = nh, Kg = gh, Ng = kh, Mg = Mh, Dg = Uh, Fg = jr, Bg = hy, zg = tg, Ug = cg, Gg = $r, Rg = vn, Vg = bg, Hg = Ct, Wg = Ag, qg = Tr, Jg = wr, Yg = 1, Xg = 2, Zg = 4, wn = "[object Arguments]", Qg = "[object Array]", ep = "[object Boolean]", tp = "[object Date]", rp = "[object Error]", On = "[object Function]", ap = "[object GeneratorFunction]", np = "[object Map]", op = "[object Number]", jn = "[object Object]", ip = "[object RegExp]", sp = "[object Set]", lp = "[object String]", cp = "[object Symbol]", up = "[object WeakMap]", fp = "[object ArrayBuffer]", dp = "[object DataView]", vp = "[object Float32Array]", hp = "[object Float64Array]", yp = "[object Int8Array]", gp = "[object Int16Array]", pp = "[object Int32Array]", bp = "[object Uint8Array]", $p = "[object Uint8ClampedArray]", _p = "[object Uint16Array]", mp = "[object Uint32Array]", B = {};
B[wn] = B[Qg] = B[fp] = B[dp] = B[ep] = B[tp] = B[vp] = B[hp] = B[yp] = B[gp] = B[pp] = B[np] = B[op] = B[jn] = B[ip] = B[sp] = B[lp] = B[cp] = B[bp] = B[$p] = B[_p] = B[mp] = !0;
B[rp] = B[On] = B[up] = !1;
function St(e, t, r, a, c, d) {
  var o, g = t & Yg, p = t & Xg, v = t & Zg;
  if (r && (o = c ? r(e, a, c, d) : r(e)), o !== void 0)
    return o;
  if (!Hg(e))
    return e;
  var E = Gg(e);
  if (E) {
    if (o = Bg(e), !g)
      return Eg(e, o);
  } else {
    var C = Fg(e), L = C == On || C == ap;
    if (Rg(e))
      return Lg(e, g);
    if (C == jn || C == wn || L && !c) {
      if (o = p || L ? {} : Ug(e), !g)
        return p ? Ng(e, Pg(o, e)) : Kg(e, xg(o, e));
    } else {
      if (!B[C])
        return c ? e : {};
      o = zg(e, C, g);
    }
  }
  d || (d = new Sg());
  var O = d.get(e);
  if (O)
    return O;
  d.set(e, o), Wg(e) ? e.forEach(function(x) {
    o.add(St(x, t, r, x, e, d));
  }) : Vg(e) && e.forEach(function(x, G) {
    o.set(G, St(x, t, r, G, e, d));
  });
  var ie = v ? p ? Dg : Mg : p ? Jg : qg, Z = E ? void 0 : ie(e);
  return kg(Z || e, function(x, G) {
    Z && (G = x, x = e[G]), Ig(o, G, St(x, t, r, G, e, d));
  }), o;
}
var Cp = St, Tp = Cp, wp = 1, Op = 4;
function jp(e) {
  return Tp(e, wp | Op);
}
var Ap = jp;
const et = /* @__PURE__ */ Yl(Ap), Sp = (e, t, r, a, c, d, o, g, p, v, E, C, L, O, ie, Z, x, G, ke) => {
  const $e = U([]), he = U(!1), ye = U(null), _ = U(null);
  $t(
    () => he.value,
    (b) => {
      if (!b) {
        _.value && _.value.close();
        return;
      }
      _.value = a.value && Nr.service({
        target: a.value
      });
    }
  );
  const Q = async (b, k) => {
    if (e.load)
      return await e.load(b, k);
  }, ce = async () => {
    if (e.search)
      return await e.search(d.value);
  }, ee = U([]), Ie = U([]), xe = U([]), Pe = U(!1), Le = async () => {
    var b, k;
    if (!(!e.batchLoad || !ee.value.length))
      try {
        await E(), await pe();
        const I = (k = (b = r.value) == null ? void 0 : b.store) == null ? void 0 : k.nodesMap;
        if (!I)
          return;
        const re = ee.value.map((se) => se[e.nodeKey]), K = await e.batchLoad(re);
        await pe();
        let me = 0;
        for (const se of re) {
          const te = I[se];
          if (!te)
            continue;
          const ue = K[se] || [];
          te.loaded = !0, te.loading = !1, ue.length > 0 && (te.childNodes = [], te.doCreateChildren(ue), ie.value = Zt([...ie.value, ...ue], e.nodeKey), me++);
        }
      } catch {
      }
  }, Ee = async (b, k, I = !1) => {
    var te, ue;
    await pe(), !ye.value && a.value && (Pe.value = !0, ye.value = Nr.service({
      target: a.value
    }));
    let re = {};
    O(b.data, b) ? re = { data: [] } : re = await Q(b.data, b.level), ye.value && (ye.value.close(), Pe.value = !1);
    let { data: K } = re;
    K || (K = []);
    let me = [];
    const se = ((te = b == null ? void 0 : b.childNodes) == null ? void 0 : te.map((ae) => ae.data)) || [];
    if (K && se.length && K.length && se.length === K.length) {
      const ae = Object.keys(K[0]), H = se.map((l) => {
        let y = {};
        return ae.forEach((w) => y[w] = l[w]), y;
      }), n = K.map((l) => {
        let y = {};
        return ae.forEach((w) => y[w] = l[w]), y;
      });
      if (JSON.stringify(H) === JSON.stringify(n))
        return b.loaded = !0, b.loading = !1, [];
    }
    if (b.level === 0) {
      if (ee.value = K, e.defaultExpandRoot) {
        const ae = (ue = ee.value) == null ? void 0 : ue.map((H) => H[e.nodeKey]);
        e.batchLoad && ee.value.length > 0 ? setTimeout(async () => {
          await Le(), await pe(), x.value = et(ae);
        }, 100) : x.value = et(ae);
      }
      I || (Ie.value.push(b), xe.value.push(k));
    }
    return ie.value = Zt([...ie.value, ...K, ...me], e.nodeKey), k && k(K), K;
  }, fe = U(!1), dt = async () => {
    fe.value = !0;
    const b = await ce() || [];
    (!b || !(b != null && b.length)) && b.push({ [g.value.label]: be("暂无数据"), id: "nodata" }), $e.value = b, fe.value = !1;
  }, Fe = () => {
    $e.value = [];
  }, Ke = async (b, k = !1) => {
    var se, te, ue, ae, H, n, u;
    let I = b ?? {};
    if ($e.value = [], d.value = "", he.value || k && C(I, null) || (I.path || (I.path = I[e.nodeKey] ?? ""), !I.path)) return;
    const re = I.path.split(/[\/,]/);
    re[0] !== e.rootNodeId && re.unshift(e.rootNodeId + "");
    const K = (se = r.value) == null ? void 0 : se.store.nodesMap;
    if (I[e.nodeKey] ? K[I[e.nodeKey]] : null) {
      if (!e.showCheckbox)
        v(I);
      else if (k) {
        const l = (H = ee.value) == null ? void 0 : H.find((y) => y[e.nodeKey] === I[e.nodeKey]);
        if (!(e.hideRootCheckbox && l)) {
          const y = o.value.includes(I[e.nodeKey]) ? et(o.value) : et([...o.value, I[e.nodeKey]]);
          (n = r.value) == null || n.setCheckedKeys(y), Z(I, { checkedKeys: [...y] }, k);
        }
        I[e.nodeKey] && ((u = r.value) == null || u.setCurrentKey(I[e.nodeKey]));
      }
      t("filter-node-click", I);
    } else {
      let l = "", y = {};
      he.value = !0;
      for (const w of re) {
        await pe();
        const X = (te = r.value) == null ? void 0 : te.store.nodesMap, N = X == null ? void 0 : X[w];
        if (!N) continue;
        if (N.loaded) {
          l = w;
          continue;
        }
        N.loading = !0, N.childNodes = [], N.shouldLoadData();
        const Oe = await Ee(N);
        Oe && Oe.length && N.doCreateChildren(Oe), N.loaded = !0, N.loading = !1, N.expand(), await pe(), l = w, y = N.data;
      }
      if (k && y) {
        if (!e.showCheckbox)
          v(y);
        else {
          const w = o.value.includes(l) ? et(o.value) : et([...o.value, l]);
          (ue = r.value) == null || ue.setCheckedKeys(w), Z(y, { checkedKeys: [...w] }, k), y[e.nodeKey] && ((ae = r.value) == null || ae.setCurrentKey(y[e.nodeKey]));
        }
        t("filter-node-click", y);
      }
    }
    return he.value = !1, !0;
  }, de = async () => {
    let b = e.defaultExpandedPaths || [];
    if (e.showCheckbox ? p.value && p.value.length && (b = [...b, ...p.value]) : p.value && (b = b == null ? void 0 : b.concat(p.value)), b.length) {
      b = Array.from(new Set(b));
      for (const k of b)
        await Ke({ path: k });
    }
    return !0;
  }, _e = () => new Promise((b) => {
    const k = () => {
      if (ee.value && ee.value.length) return b(!0);
      setTimeout(() => k(), 50);
    };
    k();
  }), we = async () => {
    await _e();
    const b = ee.value.find((k) => !O(k));
    ke.value = !b;
  }, Be = async () => {
    await E(), await de(), e.showOperations || await we();
  }, Ye = async () => {
    var b, k;
    if ((k = (b = r.value) == null ? void 0 : b.store) != null && k.nodesMap && (r.value.store.nodesMap = {}), Ie.value.length) {
      for (let I = 0; I < Ie.value.length; I++)
        Ie.value[I].childNodes = [], await Ee(Ie.value[I], xe.value[I], !0);
      return await Be(), !0;
    }
  };
  return $t(
    () => e.renderDom,
    (b) => {
      b && Ye();
    }
  ), Pa(async () => {
    c.value && await Be();
  }), {
    rootLevelData: ee,
    searchLoading: fe,
    searchData: $e,
    firstLoading: Pe,
    lazyLoad: Ee,
    search: ce,
    handleSearch: dt,
    handleSearchClear: Fe,
    handleSearchResultItemClick: Ke,
    resetLazyLoad: Ye
  };
}, kp = (e, t, r) => {
  let a = 0, c = "";
  const d = (p = "visible", v) => {
    var L;
    if (!r.isEllipsis) return;
    const E = (L = t.value) == null ? void 0 : L.$el.querySelectorAll(".el-tree-node__children"), C = (E == null ? void 0 : E.length) ?? 0;
    !v && c === p && a === C || (a = C, c = p, E && E.length && E.forEach((O) => {
      O.classList.remove(c === "visible" ? "overflow-hide" : "overflow-visible"), O.classList.add(c === "visible" ? "overflow-visible" : "overflow-hide");
    }));
  }, o = new AbortController(), { signal: g } = o;
  return Pa(() => {
    var v;
    if (!r.isEllipsis) return;
    const p = (v = e.value) == null ? void 0 : v.querySelector(".das-tree-container");
    p && p.addEventListener("mousemove", () => d("visible"), { signal: g });
  }), zn(() => {
    r.isEllipsis && o.abort();
  }), { setTreeNodeChildrenOverflow: d };
}, Ip = { class: "das-tree-box" }, xp = { class: "das-tree-container das-ce-scrollbar" }, Pp = {
  ref: "treeParentRef",
  class: "tree-parent-container"
}, Lp = {
  key: 0,
  class: "tree-oprations-node"
}, Ep = {
  key: 0,
  class: "tree-oprations-label"
}, Kp = {
  key: 1,
  class: "tree-oprations-label"
}, Np = ["onMouseenter"], Mp = {
  key: 0,
  class: "tree-normal-node"
}, Dp = {
  key: 1,
  class: "tree-normal-node"
}, Fp = {
  key: 0,
  class: "empty-box"
}, Bp = {
  key: 0,
  class: "search-result-container das-ce-scrollbar"
}, zp = ["onMousedown"], Up = { class: "name" }, Gp = {
  key: 0,
  class: "path-name"
}, Rp = {
  key: 1,
  class: "search-result-container"
}, Vp = {
  key: 0,
  class: "search-result-container das-ce-scrollbar"
}, Hp = ["onMousedown"], Wp = { class: "name" }, qp = {
  key: 0,
  class: "path-name"
}, Jp = {
  key: 1,
  class: "search-result-container"
}, Yp = {
  key: 0,
  class: "opration-list"
}, Xp = ["disabled", "onClick"], Zp = { class: "icon" }, Qp = { class: "label" }, eb = ["disabled", "onClick"], tb = { class: "icon" }, rb = { class: "label" }, ab = ["disabled", "onClick"], nb = { class: "icon" }, ob = { class: "label" }, ib = {
  name: "DasTree",
  inheritAttrs: !1
}, sb = /* @__PURE__ */ cr({
  ...ib,
  props: {
    data: { default: () => [] },
    loading: { type: Boolean },
    nodeKey: { default: "id" },
    modelValue: { default: "" },
    path: {},
    height: {},
    isEllipsis: { type: Boolean },
    draggable: { type: Boolean },
    allowDrag: {},
    currentNodeKey: { default: "" },
    defaultCheckedKeys: {},
    defaultExpandedKeys: { default: () => [] },
    defaultExpandedPaths: { default: () => [] },
    defaultExpandRoot: { type: Boolean, default: !0 },
    expandOnClickNode: { type: Boolean, default: void 0 },
    checkStrictly: { type: Boolean, default: void 0 },
    parentLinkChildrenStrictly: { type: Boolean },
    dataLinkView: { type: Boolean, default: !0 },
    getGrandChildren: {},
    childLinkParentStrictly: { type: Boolean },
    props: { default: () => ({}) },
    showCheckbox: { type: Boolean },
    hideRootCheckbox: { type: Boolean },
    showOperations: { type: Boolean },
    operations: {},
    mergeOprations: {},
    operationsLayout: { type: [String, Function], default: "add,addItem,edit,delete,preview,view" },
    operationsLabel: {},
    maxNodeLevel: { default: 12 },
    showFilterInput: { type: Boolean, default: !0 },
    isFilter: { type: Boolean },
    filterNodeMethod: {},
    filterValue: {},
    filterItemClass: {},
    inputOptions: { default: () => ({}) },
    emptyText: { default: "" },
    searchEmptyText: { default: "" },
    rootNodeId: { default: "-1" },
    load: {},
    batchLoad: {},
    search: {},
    renderDom: { type: Boolean, default: !0 },
    overlayZIndex: { default: "1" },
    keepSelected: { type: Boolean },
    notAutoresetLazyLoad: { type: Boolean },
    changeNodeConfirm: {}
  },
  emits: ["update:filterValue", "update:modelValue", "update:path", "change", "handleOperation", "filter-value-change", "filter-node-click", "node-change", "check-node-change", "node-click", "check-node-click", "node-db-click", "check-node-db-click", "current-change"],
  setup(e, { expose: t, emit: r }) {
    const a = e, c = r;
    Hn({
      gengduocaozuo: import("@das-fed/upf-ui/packages/icons/gengduocaozuo"),
      search: import("@das-fed/upf-ui/packages/icons/search"),
      add: import("@das-fed/upf-ui/packages/icons/add"),
      addItem: import("@das-fed/upf-ui/packages/icons/add-item"),
      edit: import("@das-fed/upf-ui/packages/icons/edit"),
      delete: import("@das-fed/upf-ui/packages/icons/delete"),
      preview: import("@das-fed/upf-ui/packages/icons/preview"),
      view: import("@das-fed/upf-ui/packages/icons/view")
    });
    const d = Un(), o = U(), g = z(() => a.emptyText || be("暂无数据")), p = z(() => a.searchEmptyText || be("noDataTryAnotherKeyword")), v = z(() => d.lazy ?? !!E.value), E = z(() => a.load ?? void 0), C = U([]), L = z(() => a.search ?? void 0), O = z(() => a.showCheckbox ? _.value : []), ie = z(() => a.showCheckbox ? a.currentNodeKey : _.value), Z = z(() => String(a.renderDom)), x = z(() => !!v.value), G = z(() => !!(v.value || Mn.value)), ke = z(() => !!(a.expandOnClickNode ?? a.showCheckbox)), $e = z(() => Array.isArray(ie.value) ? void 0 : ie.value), he = z(
      () => Array.isArray(O.value) ? O.value : []
    ), ye = z(() => ({ ...H.value, class: te })), _ = z({
      get() {
        return a.showCheckbox && !a.modelValue ? [] : a.modelValue;
      },
      set(i) {
        c("update:modelValue", i);
      }
    }), Q = z({
      get: () => a.path,
      set: (i) => {
        c("update:path", i);
      }
    }), ce = U([]), ee = z(() => {
      let i = [...ce.value, ...a.defaultExpandedKeys];
      return Array.from(new Set(i));
    }), Ie = () => new Promise((i) => {
      const f = () => {
        var S, h, $, P;
        if ((h = (S = o.value) == null ? void 0 : S.store) != null && h.nodesMap && ((P = Object.keys(($ = o.value) == null ? void 0 : $.store.nodesMap)) == null ? void 0 : P.length) > 0)
          return i(!0);
        setTimeout(() => f(), 50);
      };
      f();
    }), xe = (i) => new Promise((f) => {
      let S = 0;
      const h = () => {
        if (!(!C.value || !C.value.length)) {
          if (Array.isArray(i)) {
            const $ = C.value.filter((P) => i.includes(P[a.nodeKey]));
            if ($.length === i.length) return f($);
          } else {
            const $ = C.value.find((P) => P[a.nodeKey] === i);
            if ($) return f($);
          }
          if (setTimeout(() => {
            h(), S += 50;
          }, 50), S >= 6e3)
            return Array.isArray(i) ? f([]) : f({});
        }
      };
      h();
    }), Pe = async (i) => a.getGrandChildren ? await a.getGrandChildren(i) : [], Le = (i, f) => {
      var h;
      let S = i.childNodes.length;
      if (S > 0)
        for (let $ = 0; $ < S; $++) {
          const P = f, Y = i.childNodes[$];
          if (w(Y.data, Y)) {
            Le({ ...Y, checked: P }, f);
            continue;
          }
          Y.checked !== P && (Y.checked = P), Le(Y, f);
        }
      o.value && (_.value = (h = o.value) == null ? void 0 : h.getCheckedKeys());
    }, Ee = async (i, f) => {
      var P, Y, ne;
      if (kr(i, null)) {
        if (f)
          _.value.includes(i[a.nodeKey]) || _.value.push(i[a.nodeKey]);
        else {
          const oe = _.value.findIndex((W) => W === i[a.nodeKey]);
          oe > -1 && _.value.splice(oe, 1);
        }
        return (P = o.value) == null || P.setCheckedKeys(_.value), _e.value = !0, [];
      }
      let S = await Pe(i);
      C.value = Zt([...C.value, ...S], a.nodeKey);
      const h = S.concat(i), $ = Array.from(new Set(h.map((oe) => oe[a.nodeKey])));
      if (f) {
        const oe = _.value ?? [], W = Re([...oe, ...$]);
        _.value = Array.from(new Set(W)), (Y = o.value) == null || Y.setCheckedKeys(W);
      } else {
        const W = (_.value ?? []).filter((q) => !$.includes(q));
        _.value = Array.from(new Set(W)), (ne = o.value) == null || ne.setCheckedKeys(W);
      }
      return S;
    }, fe = U([]), dt = async (i, f) => {
      var h;
      if (v.value) {
        const $ = await Ee(i, f);
        return c("check-node-change", _.value, i, f), fe.value = $.map((P) => P[a.nodeKey]), $;
      }
      await pe();
      const S = (h = o.value) == null ? void 0 : h.getNode(i[a.nodeKey]);
      return Le(S, f), [];
    }, Fe = (i, f) => {
      const S = i == null ? void 0 : i.parent;
      if (!S) return;
      const h = f;
      if (w(S.data, S)) {
        Fe({ ...S, checked: h }, f);
        return;
      }
      S.checked !== h && (S.checked = h), Fe(S, f);
    }, Ke = async (i, f) => {
      var h, $;
      await pe();
      const S = (h = o.value) == null ? void 0 : h.getNode(i[a.nodeKey]);
      return Fe(S, f), o.value && (_.value = ($ = o.value) == null ? void 0 : $.getCheckedKeys()), !0;
    }, de = U(!1), _e = U(!1), we = async (i, f, S = !1) => {
      var W, q;
      _e.value = !0;
      const { checkedKeys: h } = f, $ = h.includes(i[a.nodeKey]), P = _.value.includes(i[a.nodeKey]), Y = a.keepSelected && !Sn(i) && P && !$;
      await pe();
      let ne = ((W = o.value) == null ? void 0 : W.getCheckedKeys()) || [];
      if (Y && (ne = Re([...ne, i[a.nodeKey]]), a.showCheckbox && ((q = o.value) == null || q.setCheckedKeys(ne))), a.parentLinkChildrenStrictly || (_.value = ne), $ && a.childLinkParentStrictly && !de.value) {
        const M = _.value ?? [];
        await Ke(i, $), _.value = Array.from(/* @__PURE__ */ new Set([...M, ..._.value]));
      }
      let oe = [];
      a.parentLinkChildrenStrictly && !de.value && (oe = await dt(i, $)), a.parentLinkChildrenStrictly && v.value || (await pe(), c("check-node-change", _.value, i, $)), S && c("change", _.value, i, $, oe);
    }, Be = U(!1), {
      realHeight: Ye,
      dasTree: b,
      getMergeOperations: k,
      getOperations: I,
      handleOperation: re,
      filterInnerValue: K,
      filterList: me,
      selectItem: se,
      nodeClass: te,
      nodeClick: ue,
      isActive: ae,
      defaultProps: H,
      filterNodeMethodFn: n,
      filterSeach: u,
      filterClear: l,
      expandParent: y,
      disabledFlag: w,
      currentOprationKey: X,
      oprationVisibleChange: N,
      setOprationsMoreBtnRefs: Oe,
      oprationsPopoverRef: zt,
      moreBtnEnter: An,
      currentMoreBtnRef: Sr,
      currentOprationItem: J,
      isLeafFlag: kr,
      filterCustomClass: Ir,
      allowUnSelectFlag: Sn,
      findSelectableParentNode: kn,
      currentChange: In
    } = Jl(a, c, o, Q, _, v, ce, we, Be, d), {
      rootLevelData: xn,
      searchLoading: Ut,
      searchData: Gt,
      lazyLoad: Pn,
      firstLoading: Ln,
      handleSearch: xr,
      handleSearchClear: En,
      handleSearchResultItemClick: Kn,
      resetLazyLoad: Rt
    } = Sp(
      a,
      c,
      o,
      b,
      v,
      K,
      _,
      H,
      Q,
      ue,
      Ie,
      w,
      ae,
      kr,
      C,
      we,
      ce,
      Pe,
      Be
    ), Nn = () => {
      L.value ? xr() : u();
    };
    $t(
      () => K.value,
      (i) => {
        c("filter-value-change", i), Nn();
      }
    );
    const Xe = U(null);
    $t(
      () => _.value,
      (i) => {
        var h, $, P, Y, ne, oe;
        const f = a.showCheckbox ? i ?? [] : i ?? void 0, S = a.showCheckbox ? Xe.value ?? [] : Xe.value ?? void 0;
        if (JSON.stringify(f) !== JSON.stringify(S)) {
          if (a.showCheckbox) {
            if (f.length === 0) {
              ($ = o.value) == null || $.setCheckedKeys([]), Xe.value = Re(f);
              return;
            }
          } else if (!f) {
            (h = o.value) == null || h.setCurrentKey(), Xe.value = Re(f);
            return;
          }
          if (_e.value) {
            _e.value = !1, Xe.value = Re(f);
            return;
          }
          if (!v.value)
            a.showCheckbox ? (P = o.value) == null || P.setCheckedKeys(f) : y();
          else if (a.showCheckbox)
            if (!a.parentLinkChildrenStrictly || !a.dataLinkView) {
              const W = C.value.map((M) => M[a.nodeKey]), q = f.filter((M) => !W.includes(M));
              q && q.length ? Rt().then(() => {
                var M;
                o.value && ((M = o.value) == null || M.setCheckedKeys(f));
              }) : o.value && ((ne = o.value) == null || ne.setCheckedKeys(f));
            } else {
              if (o.value && ((oe = o.value) == null || oe.setCheckedKeys([])), f.length && S.length === 0)
                for (let W of f) {
                  const q = fe.value.findIndex((M) => M === W);
                  q !== -1 && fe.value.splice(q, 1), xe(W).then((M) => {
                    M && (de.value = !0, we(M, { checkedKeys: [...f] }).then(() => {
                      _e.value = !1, de.value = !1;
                    }));
                  });
                }
              if (f.length && S.length) {
                const W = S.filter((M) => !f.includes(M)), q = f.filter((M) => !S.includes(M));
                if (W && W.length)
                  for (let M of W) {
                    const m = fe.value.findIndex((le) => le === M);
                    m !== -1 && fe.value.splice(m, 1), xe(M).then(async (le) => {
                      le && (de.value = !0, we(le, { checkedKeys: [...f] }).then(() => {
                        _e.value = !1, de.value = !1;
                      }));
                    });
                  }
                if (q && q.length)
                  for (let M of q) {
                    const m = fe.value.findIndex((le) => le === M);
                    m !== -1 && fe.value.splice(m, 1), xe(M).then((le) => {
                      le && (de.value = !0, we(le, { checkedKeys: [...f] }).then(() => {
                        _e.value = !1, de.value = !1;
                      }));
                    });
                  }
              }
            }
          else if (C.value.find((q) => q[a.nodeKey] === f))
            (Y = o.value) == null || Y.setCurrentKey(f);
          else {
            if (a.notAutoresetLazyLoad) return;
            Rt().then(() => {
              var q;
              (q = o.value) == null || q.setCurrentKey(f);
            });
          }
          Xe.value = Re(f);
        }
      },
      { immediate: !0, deep: !0 }
    );
    const Vt = () => {
      L.value ? En() : l();
    }, Mn = z(() => a.parentLinkChildrenStrictly || a.childLinkParentStrictly ? !0 : !!(a.checkStrictly ?? v.value)), Dn = z(() => v.value ? !!Ln.value : a.loading), Ht = z(() => {
      var i, f;
      return v.value ? !((i = xn.value) != null && i.length) : !((f = a.data) != null && f.length);
    }), Pr = z(() => {
      var i;
      if (L.value)
        return !Ut.value && ((i = Gt.value) == null ? void 0 : i.length) === 1 && Gt.value[0][H.value.label] === be("暂无数据");
      if (a.isFilter)
        return me.value.length === 1 && me.value[0][H.value.label] === be("暂无数据");
    }), { setTreeNodeChildrenOverflow: Fn } = kp(b, o, a), Bn = () => {
      a.isEllipsis && Fn("hidden");
    };
    return t({
      /** el-tree实例 */
      treeRef: o,
      /** 数据是否为空 */
      treeIsEmpty: Ht,
      /** 获取可选的父级节点，递归往上查找 */
      findSelectableParentNode: kn,
      /** 非懒加载：子级联动父级 */
      childLinkParent: Fe,
      /** 非懒加载：父级联动子级 */
      parentLinkChild: Le,
      /** 清空搜索框并重新加载整棵树方法(用于懒加载重新请求整颗树的数据) */
      resetLazyLoad: async () => ((L.value || a.isFilter) && (K.value = "", Vt()), await Rt(), !0),
      /** 自动展开父节点方法 */
      autoExpand: y,
      /** 清空搜索值，回到tree面板 */
      searchClear: Vt,
      /** 懒加载获取到的所有平铺数据 */
      lazyData: C,
      /** 判断懒加载指定节点、节点集合是否全部加载完成 */
      lazyDataNextTick: xe,
      /** 非懒加载模式触发搜索 */
      filterSeach: u,
      /** 懒加载模式触发搜索 */
      handleSearch: xr,
      /** 根据父级获取所有子孙节点(提供给tree-select组件使用) */
      getGrandChildrenFn: Pe
    }), (i, f) => {
      var S;
      return T(), A(
        "div",
        {
          ref_key: "dasTree",
          ref: b,
          style: Er({ height: s(Ye) }),
          class: Ze({
            "das-ui-tree": !0,
            "is-checkbox": e.showCheckbox,
            "is-ellipsis": e.isEllipsis,
            "is-operations": e.showOperations,
            "is-draggable": e.draggable,
            "root-checkbox_hide": e.hideRootCheckbox
          })
        },
        [
          (e.isFilter || L.value) && e.showFilterInput ? (T(), Ge(s(Wn), Kr({
            key: 0,
            class: "das-tree-filter-input",
            modelValue: s(K),
            "onUpdate:modelValue": f[0] || (f[0] = (h) => Gn(K) ? K.value = h : null),
            borderType: "bordered",
            size: "table"
          }, e.inputOptions, {
            placeholder: (S = e.inputOptions) != null && S.placeholder ? e.inputOptions.placeholder : s(be)("请搜索"),
            onClear: Vt,
            clearable: "",
            filterSpace: !1
          }), wt({
            prefix: je(() => [
              D(i.$slots, "prefix", {}, () => [
                vt(s(yt), {
                  icon: "search",
                  customSize: 19,
                  iconColor: "var(--upf-text-disabled)",
                  style: { cursor: "pointer" }
                })
              ])
            ]),
            _: 2
            /* DYNAMIC */
          }, [
            i.$slots.suffix ? {
              name: "suffix",
              fn: je(() => [
                D(i.$slots, "suffix")
              ]),
              key: "0"
            } : void 0,
            i.$slots.prepend ? {
              name: "prepend",
              fn: je(() => [
                D(i.$slots, "prepend")
              ]),
              key: "1"
            } : void 0,
            i.$slots.append ? {
              name: "append",
              fn: je(() => [
                D(i.$slots, "append")
              ]),
              key: "2"
            } : void 0
          ]), 1040, ["modelValue", "placeholder"])) : j("v-if", !0),
          i.$slots["container-top"] ? D(i.$slots, "container-top", { key: 1 }) : j("v-if", !0),
          ve((T(), A("div", Ip, [
            j(" das-ce-scrollbar开头的样式不要删除  web componets引用了该组件，有用的！！！ "),
            ve((T(), A("div", xp, [
              i.$slots.top ? D(i.$slots, "top", { key: 0 }) : j("v-if", !0),
              ze(
                "div",
                Pp,
                [
                  (T(), Ge(s(Jn), Kr({
                    ref_key: "treeRef",
                    ref: o,
                    key: Z.value,
                    class: { "is-root-all-left": Be.value },
                    icon: Qn,
                    data: e.renderDom ? e.data : [],
                    lazy: x.value,
                    load: E.value ? s(Pn) : void 0,
                    "check-strictly": G.value,
                    "node-key": e.nodeKey,
                    "current-node-key": $e.value,
                    "default-checked-keys": he.value,
                    "default-expanded-keys": ee.value,
                    props: ye.value,
                    "show-checkbox": e.showCheckbox,
                    "expand-on-click-node": ke.value,
                    "filter-node-method": s(n),
                    draggable: e.draggable,
                    "allow-drag": e.allowDrag
                  }, { ...s(d), onCurrentChange: void 0 }, {
                    onCurrentChange: s(In),
                    onNodeClick: s(ue),
                    onCheck: f[2] || (f[2] = (h, $) => {
                      we(h, $, !0);
                    }),
                    onNodeCollapse: Bn
                  }), {
                    default: je(({ node: h, data: $ }) => [
                      D(i.$slots, "default", {
                        node: h,
                        data: $
                      }, () => {
                        var P, Y;
                        return [
                          f[5] || (f[5] = ze(
                            "div",
                            null,
                            null,
                            -1
                            /* CACHED */
                          )),
                          j(" 有操作项 "),
                          e.showOperations ? (T(), A("div", Lp, [
                            D(i.$slots, "oprations-label", {
                              node: h,
                              data: $
                            }, () => [
                              e.isEllipsis ? ve((T(), A("div", Ep, [
                                Ae(
                                  ge($[s(H).label]),
                                  1
                                  /* TEXT */
                                )
                              ])), [
                                [s(Ne)]
                              ]) : j("v-if", !0),
                              e.isEllipsis ? j("v-if", !0) : (T(), A(
                                "div",
                                Kp,
                                ge($[s(H).label]),
                                1
                                /* TEXT */
                              ))
                            ]),
                            !s(w)($, h) && ((Y = (P = s(k)(h, $)) == null ? void 0 : P.list) != null && Y.length || s(I)(h, $).length) ? (T(), A("div", {
                              key: 0,
                              class: "oprations-box",
                              onMouseenter: (ne) => s(An)(h, $)
                            }, [
                              ze(
                                "div",
                                {
                                  class: "more-icon",
                                  ref: (ne) => s(Oe)(ne, $[e.nodeKey]),
                                  style: Er(s(X) === $[e.nodeKey] ? "opacity: 1" : ""),
                                  onClick: f[1] || (f[1] = Qe(() => {
                                  }, ["stop"]))
                                },
                                [
                                  vt(s(yt), {
                                    icon: "gengduocaozuo",
                                    iconColor: "var(--upf-color-primary)",
                                    size: "medium"
                                  })
                                ],
                                4
                                /* STYLE */
                              )
                            ], 40, Np)) : j("v-if", !0)
                          ])) : j("v-if", !0),
                          j(" 无操作项 "),
                          e.showOperations ? j("v-if", !0) : (T(), A(
                            Ce,
                            { key: 1 },
                            [
                              e.isEllipsis ? ve((T(), A("div", Mp, [
                                Ae(
                                  ge($[s(H).label]),
                                  1
                                  /* TEXT */
                                )
                              ])), [
                                [s(Ne)]
                              ]) : (T(), A(
                                "div",
                                Dp,
                                ge($[s(H).label]),
                                1
                                /* TEXT */
                              ))
                            ],
                            64
                            /* STABLE_FRAGMENT */
                          ))
                        ];
                      })
                    ]),
                    _: 3
                    /* FORWARDED */
                  }, 16, ["class", "data", "lazy", "load", "check-strictly", "node-key", "current-node-key", "default-checked-keys", "default-expanded-keys", "props", "show-checkbox", "expand-on-click-node", "filter-node-method", "draggable", "allow-drag", "onCurrentChange", "onNodeClick"]))
                ],
                512
                /* NEED_PATCH */
              ),
              i.$slots.bottom ? D(i.$slots, "bottom", { key: 1 }) : j("v-if", !0)
            ])), [
              [s(Wt)],
              [Rn, !Ht.value]
            ]),
            j(" 空状态 "),
            Ht.value && !Dn.value ? (T(), A("div", Fp, [
              i.$slots.top ? D(i.$slots, "top", { key: 0 }) : j("v-if", !0),
              vt(jt, { "empty-text": g.value }, wt({
                _: 2
                /* DYNAMIC */
              }, [
                i.$slots["empty-text"] ? {
                  name: "default",
                  fn: je(() => [
                    D(i.$slots, "empty-text")
                  ]),
                  key: "0"
                } : void 0
              ]), 1032, ["empty-text"]),
              i.$slots.bottom ? D(i.$slots, "bottom", { key: 1 }) : j("v-if", !0)
            ])) : j("v-if", !0),
            j(" 懒加载：搜索节点 "),
            s(K) && !s(Ut) && L.value ? (T(), A(
              Ce,
              { key: 1 },
              [
                Pr.value ? (T(), A("div", Rp, [
                  i.$slots.top ? D(i.$slots, "top", { key: 0 }) : j("v-if", !0),
                  vt(jt, { "empty-text": p.value }, wt({
                    _: 2
                    /* DYNAMIC */
                  }, [
                    i.$slots["search-empty-text"] ? {
                      name: "default",
                      fn: je(() => [
                        D(i.$slots, "search-empty-text")
                      ]),
                      key: "0"
                    } : void 0
                  ]), 1032, ["empty-text"]),
                  i.$slots.bottom ? D(i.$slots, "bottom", { key: 1 }) : j("v-if", !0)
                ])) : ve((T(), A("ul", Bp, [
                  i.$slots.top ? D(i.$slots, "top", { key: 0 }) : j("v-if", !0),
                  (T(!0), A(
                    Ce,
                    null,
                    ht(s(Gt), (h, $) => (T(), A("li", {
                      key: h[e.nodeKey],
                      class: Ze([
                        "search-result-item",
                        s(ae)(h, !0) ? "is-active" : "",
                        s(w)(h, null) ? "is-disabled" : "",
                        s(Ir)(h, $)
                      ]),
                      onMousedown: Qe((P) => s(Kn)(h, !0), ["stop"])
                    }, [
                      D(i.$slots, "search-result-item", {
                        item: h,
                        index: $
                      }, () => [
                        ve((T(), A("div", Up, [
                          Ae(
                            ge(h[s(H).label]),
                            1
                            /* TEXT */
                          )
                        ])), [
                          [s(Ne)]
                        ]),
                        h[s(H).pathName] ? ve((T(), A("div", Gp, [
                          Ae(
                            ge(h[s(H).pathName]),
                            1
                            /* TEXT */
                          )
                        ])), [
                          [s(Ne)]
                        ]) : j("v-if", !0)
                      ])
                    ], 42, zp))),
                    128
                    /* KEYED_FRAGMENT */
                  )),
                  i.$slots.bottom ? D(i.$slots, "bottom", { key: 1 }) : j("v-if", !0)
                ])), [
                  [s(Wt)]
                ])
              ],
              64
              /* STABLE_FRAGMENT */
            )) : s(K) && e.isFilter ? (T(), A(
              Ce,
              { key: 2 },
              [
                j(" 非懒加载：搜索节点 "),
                Pr.value ? (T(), A("div", Jp, [
                  i.$slots.top ? D(i.$slots, "top", { key: 0 }) : j("v-if", !0),
                  vt(jt, { "empty-text": p.value }, wt({
                    _: 2
                    /* DYNAMIC */
                  }, [
                    i.$slots["search-empty-text"] ? {
                      name: "default",
                      fn: je(() => [
                        D(i.$slots, "search-empty-text")
                      ]),
                      key: "0"
                    } : void 0
                  ]), 1032, ["empty-text"]),
                  i.$slots.bottom ? D(i.$slots, "bottom", { key: 1 }) : j("v-if", !0)
                ])) : ve((T(), A("ul", Vp, [
                  i.$slots.top ? D(i.$slots, "top", { key: 0 }) : j("v-if", !0),
                  (T(!0), A(
                    Ce,
                    null,
                    ht(s(me), (h, $) => (T(), A("li", {
                      key: h[e.nodeKey],
                      class: Ze([
                        "search-result-item",
                        s(ae)(h, !0) ? "is-active" : "",
                        s(w)(h, null) ? "is-disabled" : "",
                        s(Ir)(h, $)
                      ]),
                      onMousedown: Qe((P) => s(se)(h), ["stop"])
                    }, [
                      D(i.$slots, "search-result-item", {
                        item: h,
                        index: $
                      }, () => [
                        ve((T(), A("div", Wp, [
                          Ae(
                            ge(h[s(H).label]),
                            1
                            /* TEXT */
                          )
                        ])), [
                          [s(Ne)]
                        ]),
                        h[s(H).pathName] ? ve((T(), A("div", qp, [
                          Ae(
                            ge(h[s(H).pathName]),
                            1
                            /* TEXT */
                          )
                        ])), [
                          [s(Ne)]
                        ]) : j("v-if", !0)
                      ])
                    ], 42, Hp))),
                    128
                    /* KEYED_FRAGMENT */
                  )),
                  i.$slots.bottom ? D(i.$slots, "bottom", { key: 1 }) : j("v-if", !0)
                ])), [
                  [s(Wt)]
                ])
              ],
              64
              /* STABLE_FRAGMENT */
            )) : j("v-if", !0)
          ])), [
            [s(qn), v.value && s(Ut)]
          ]),
          i.$slots["container-bottom"] ? D(i.$slots, "container-bottom", { key: 2 }) : j("v-if", !0),
          j(" 操作项（单例，解决dom渲染性能问题） "),
          s(Sr) ? (T(), Ge(s(Yn), {
            key: 3,
            "popper-class": "das-tree-operation-dropdown",
            ref_key: "oprationsPopoverRef",
            ref: zt,
            "virtual-ref": s(Sr),
            placement: "bottom-start",
            "show-arrow": !1,
            trigger: "hover",
            "virtual-triggering": "",
            onShow: f[3] || (f[3] = (h) => s(N)(!0)),
            onHide: f[4] || (f[4] = (h) => s(N)(!1))
          }, {
            reference: je(() => [...f[6] || (f[6] = [
              ze(
                "span",
                { class: "virtual-ref-placeholder" },
                " ",
                -1
                /* CACHED */
              )
            ])]),
            default: je(() => {
              var h, $, P, Y, ne, oe, W, q, M;
              return [
                (h = s(J)) != null && h.node ? (T(), A("ul", Yp, [
                  (P = ($ = s(k)(s(J).node, s(J).data)) == null ? void 0 : $.list) != null && P.length && ((Y = s(k)(s(J).node, s(J).data)) == null ? void 0 : Y.position) === "top" ? (T(!0), A(
                    Ce,
                    { key: 0 },
                    ht((ne = s(k)(s(J).node, s(J).data)) == null ? void 0 : ne.list, (m, le) => (T(), A(
                      Ce,
                      {
                        key: m.value
                      },
                      [
                        m.hidden ? j("v-if", !0) : (T(), A("li", {
                          class: Ze(["opration-item", m.disabled ? "is-disabled" : ""]),
                          key: m.value || le,
                          disabled: m.disabled,
                          onClick: Qe((Lr) => s(re)(m, s(J).node, s(J).data), ["stop"])
                        }, [
                          ze("div", Zp, [
                            m.icon ? (T(), Ge(s(yt), {
                              key: 0,
                              icon: m.icon,
                              size: "small",
                              iconColor: m.disabled ? "var(--upf-text-disabled)" : m.iconColor ? m.iconColor : "var(--upf-color-primary)"
                            }, null, 8, ["icon", "iconColor"])) : j("v-if", !0)
                          ]),
                          ve((T(), A("div", Qp, [
                            Ae(
                              ge(m.label || m.value),
                              1
                              /* TEXT */
                            )
                          ])), [
                            [s(Ne)]
                          ])
                        ], 10, Xp))
                      ],
                      64
                      /* STABLE_FRAGMENT */
                    ))),
                    128
                    /* KEYED_FRAGMENT */
                  )) : j("v-if", !0),
                  (T(!0), A(
                    Ce,
                    null,
                    ht(s(I)(s(J).node, s(J).data), (m, le) => (T(), A(
                      Ce,
                      {
                        key: m.value
                      },
                      [
                        m.hidden ? j("v-if", !0) : (T(), A("li", {
                          class: Ze(["opration-item", m.disabled ? "is-disabled" : ""]),
                          key: m.value || le,
                          disabled: m.disabled,
                          onClick: Qe((Lr) => s(re)(m, s(J).node, s(J).data), ["stop"])
                        }, [
                          ze("div", tb, [
                            m.icon ? (T(), Ge(s(yt), {
                              key: 0,
                              icon: m.icon,
                              size: "small",
                              iconColor: m.disabled ? "var(--upf-text-disabled)" : m.iconColor ? m.iconColor : "var(--upf-color-primary)"
                            }, null, 8, ["icon", "iconColor"])) : j("v-if", !0)
                          ]),
                          ve((T(), A("div", rb, [
                            Ae(
                              ge(m.label || m.value),
                              1
                              /* TEXT */
                            )
                          ])), [
                            [s(Ne)]
                          ])
                        ], 10, eb))
                      ],
                      64
                      /* STABLE_FRAGMENT */
                    ))),
                    128
                    /* KEYED_FRAGMENT */
                  )),
                  (W = (oe = s(k)(s(J).node, s(J).data)) == null ? void 0 : oe.list) != null && W.length && ((q = s(k)(s(J).node, s(J).data)) == null ? void 0 : q.position) === "bottom" ? (T(!0), A(
                    Ce,
                    { key: 1 },
                    ht((M = s(k)(s(J).node, s(J).data)) == null ? void 0 : M.list, (m, le) => (T(), A(
                      Ce,
                      {
                        key: m.value
                      },
                      [
                        m.hidden ? j("v-if", !0) : (T(), A("li", {
                          class: Ze(["opration-item", m.disabled ? "is-disabled" : ""]),
                          key: m.value || le,
                          disabled: m.disabled,
                          onClick: Qe((Lr) => s(re)(m, s(J).node, s(J).data), ["stop"])
                        }, [
                          ze("div", nb, [
                            m.icon ? (T(), Ge(s(yt), {
                              key: 0,
                              icon: m.icon,
                              size: "small",
                              iconColor: m.disabled ? "var(--upf-text-disabled)" : m.iconColor ? m.iconColor : "var(--upf-color-primary)"
                            }, null, 8, ["icon", "iconColor"])) : j("v-if", !0)
                          ]),
                          ve((T(), A("div", ob, [
                            Ae(
                              ge(m.label || m.value),
                              1
                              /* TEXT */
                            )
                          ])), [
                            [s(Ne)]
                          ])
                        ], 10, ab))
                      ],
                      64
                      /* STABLE_FRAGMENT */
                    ))),
                    128
                    /* KEYED_FRAGMENT */
                  )) : j("v-if", !0)
                ])) : j("v-if", !0)
              ];
            }),
            _: 1
            /* STABLE */
          }, 8, ["virtual-ref"])) : j("v-if", !0)
        ],
        6
        /* CLASS, STYLE */
      );
    };
  }
}), lb = {
  请搜索: { "zh-CN": "请搜索", en: "Please search", "zh-MO": "請搜索", _appCode: "framework" },
  "搜索中...": { "zh-CN": "搜索中...", en: "Search...", "zh-MO": "搜尋中...", _appCode: "framework" },
  新增同级: { "zh-CN": "新增同级", en: "Add Sibling", "zh-MO": "新增同級", _appCode: "framework" },
  新增子级: { "zh-CN": "新增子级", en: "Add Child", "zh-MO": "新增子級", _appCode: "framework" },
  编辑: { "zh-CN": "编辑", en: "Edit", "zh-MO": "編輯", _appCode: "framework" },
  删除: { "zh-CN": "删除", en: "Delete", "zh-MO": "刪除", _appCode: "framework" },
  请选择: { "zh-CN": "请选择", en: "Please Select", "zh-MO": "請選擇", _appCode: "framework" },
  暂无数据: { "zh-CN": "暂无数据", en: "No Data", "zh-MO": "暫無數據", _appCode: "framework" },
  noDataTryAnotherKeyword: {
    "zh-CN": "未查询到相关数据，换个关键词试试吧！",
    en: "No relevant data found, try a different keyword!",
    "zh-MO": "未查詢到相關數據，換個關鍵詞試試吧！",
    _appCode: "framework"
  }
};
Vn(lb);
const Tb = La(sb), wb = La(jt), Ob = () => U(null), jb = { name: "Tree 树" };
export {
  Tb as DasTree,
  wb as DasTreeEmpty,
  Ob as DasTreeRef,
  jb as default
};
