import '@das-fed/ui/packages/components/search-form/style.css';
import { defineComponent as Ee, watch as Ua, ref as A, createElementBlock as _, openBlock as g, normalizeClass as G, unref as c, createCommentVNode as h, createVNode as q, normalizeStyle as Ma, withDirectives as Ue, createTextVNode as Ba, toDisplayString as ae, mergeProps as j, isRef as pe, createBlock as P, Fragment as z, useCssVars as wt, computed as da, onMounted as St, createElementVNode as N, renderSlot as W, withCtx as E, renderList as ge, vShow as Tt, nextTick as Re } from "vue";
import { withInstall as Vt } from "@das-fed/utils/with-install/index";
import { DasCustomSearchItem as At } from "@das-fed/ui/packages/components/custom-search-item/index";
import { DasForm as fa } from "@das-fed/ui/packages/components/form/index";
import { DasFormItem as ee } from "@das-fed/ui/packages/components/form-item/index";
import { DasAutoRegisterIcon as Ot, DasIcon as kt } from "@das-fed/ui/packages/components/icon/index";
import { DasSearch as jt } from "@das-fed/ui/packages/components/search/index";
import { DasSelectInput as Pt } from "@das-fed/ui/packages/components/select-input/index";
import { DasTag as Rt } from "@das-fed/ui/packages/components/tag/index";
import { vScrollbar as Dt } from "@das-fed/ui/packages/components/scrollbar/index";
import { useModelValue as Q } from "@das-fed/utils/vue";
import { ElCollapseTransition as Lt } from "element-plus";
import { DasInputDialogSelect as mt } from "@das-fed/ui/packages/components/input-dialog-select/index";
import { vDasTooltip as za } from "@das-fed/ui/packages/components/text-tooltip/index";
import { t as L, currentLang as I, setI18nRule as It } from "@das-fed/web/packages/i18n/index";
import De from "dayjs";
import { DasSelect as Ft } from "@das-fed/ui/packages/components/select/index";
import { DasDateRangePicker as Kt, DasRangePicker as Nt, DasTimeRangePicker as Et } from "@das-fed/ui/packages/components/date-picker/index";
import { setThemeRule as Ut } from "@das-fed/web/packages/theme/index";
const Mt = (e, r) => ({ innerValue: Q(e, "modelValue"), openDialogHandle: () => {
  r("openDialogHandle");
} }), Me = (e, r) => {
  if (r === "top")
    return "100%";
  let o = 4;
  return typeof e == "string" ? o = parseInt(e) : typeof e == "number" && (o = e), `${o * 12}px`;
}, Bt = (e, r) => e ? De.isDayjs(De(e)) ? De(e).format(r) : e : "", zt = (e) => {
  const r = (o, s, y) => {
    const f = e != null && e.format ? e.format.replace("QQ", "qQ") : y[s];
    let p = o ? Bt(o, f) : "";
    return p && (I.value === "zh-CN" && s === "week" && (p = p.replace("th", L("周")).replace("nd", L("周"))), s === "quarter" && (p = p.replace("q", "Q"))), p;
  };
  if (e != null && e.type.endsWith("Range")) {
    const o = {
      default: "YYYY/MM/DD HH:mm:ss"
    };
    return ((e == null ? void 0 : e.value) || (e == null ? void 0 : e.storageValue) || ["", ""]).map((y) => r(y, "default", o)).join(L("至"));
  } else {
    const o = {
      date: "YYYY/MM/DD",
      dateTime: "YYYY/MM/DD HH:mm:ss",
      week: "YYYY-wo",
      month: "YYYY-MM",
      quarter: "YYYY-qQ",
      year: "YYYY"
    };
    return r(e == null ? void 0 : e.tagName, e == null ? void 0 : e.type, o);
  }
}, Gt = { class: "label-context" }, Ht = { key: 0 }, xt = /* @__PURE__ */ Ee({
  __name: "InputSelect",
  props: {
    optionsLabelKey: { default: "name" },
    optionsValueKey: { default: "id" },
    modelValue: {},
    labelLength: {},
    labelPosition: {},
    label: { default: "" },
    selectedOptions: { default: [] },
    showFilterPanel: { type: Boolean, default: !1 }
  },
  emits: ["update:modelValue", "dateRangeChange", "update:optionValue", "selectChange", "openDialogHandle", "openDialogChange"],
  setup(e, { emit: r }) {
    const o = e, s = r, { innerValue: y, openDialogHandle: f } = Mt(o, s);
    Ua(
      () => o.selectedOptions,
      (d) => {
        s("openDialogChange", d);
      }
    );
    const p = A(Me(o.labelLength, o.labelPosition));
    return (d, C) => (g(), _(
      "div",
      {
        class: G(["das-input-select-search-container", { "das-input-select-search-container-en": c(I) != "zh-CN" }])
      },
      [
        d.label ? (g(), _(
          "div",
          {
            key: 0,
            class: "label",
            style: Ma({ width: p.value })
          },
          [
            Ue((g(), _("div", Gt, [
              Ba(
                ae(d.label),
                1
                /* TEXT */
              )
            ])), [
              [c(za)]
            ]),
            o.showFilterPanel ? (g(), _("span", Ht, "：")) : h("v-if", !0)
          ],
          4
          /* STYLE */
        )) : h("v-if", !0),
        q(c(mt), j({
          "selected-options": d.selectedOptions,
          width: "200px",
          optionsLabelKey: d.optionsLabelKey,
          optionsValueKey: d.optionsValueKey,
          onOpenDialog: c(f),
          modelValue: c(y),
          "onUpdate:modelValue": C[0] || (C[0] = ($) => pe(y) ? y.value = $ : null)
        }, d.$attrs), null, 16, ["selected-options", "optionsLabelKey", "optionsValueKey", "onOpenDialog", "modelValue"])
      ],
      2
      /* CLASS */
    ));
  }
}), Be = (e, r) => {
  const o = e.__vccOpts || e;
  for (const [s, y] of r)
    o[s] = y;
  return o;
}, Yt = /* @__PURE__ */ Be(xt, [["__scopeId", "data-v-72fa1cba"]]);
var he = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Wt(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Jt() {
  this.__data__ = [], this.size = 0;
}
var qt = Jt;
function Qt(e, r) {
  return e === r || e !== e && r !== r;
}
var Ga = Qt, Xt = Ga;
function Zt(e, r) {
  for (var o = e.length; o--; )
    if (Xt(e[o][0], r))
      return o;
  return -1;
}
var _e = Zt, er = _e, ar = Array.prototype, tr = ar.splice;
function rr(e) {
  var r = this.__data__, o = er(r, e);
  if (o < 0)
    return !1;
  var s = r.length - 1;
  return o == s ? r.pop() : tr.call(r, o, 1), --this.size, !0;
}
var nr = rr, or = _e;
function lr(e) {
  var r = this.__data__, o = or(r, e);
  return o < 0 ? void 0 : r[o][1];
}
var sr = lr, ir = _e;
function ur(e) {
  return ir(this.__data__, e) > -1;
}
var cr = ur, pr = _e;
function dr(e, r) {
  var o = this.__data__, s = pr(o, e);
  return s < 0 ? (++this.size, o.push([e, r])) : o[s][1] = r, this;
}
var fr = dr, yr = qt, gr = nr, hr = sr, vr = cr, br = fr;
function te(e) {
  var r = -1, o = e == null ? 0 : e.length;
  for (this.clear(); ++r < o; ) {
    var s = e[r];
    this.set(s[0], s[1]);
  }
}
te.prototype.clear = yr;
te.prototype.delete = gr;
te.prototype.get = hr;
te.prototype.has = vr;
te.prototype.set = br;
var we = te, $r = we;
function Cr() {
  this.__data__ = new $r(), this.size = 0;
}
var _r = Cr;
function wr(e) {
  var r = this.__data__, o = r.delete(e);
  return this.size = r.size, o;
}
var Sr = wr;
function Tr(e) {
  return this.__data__.get(e);
}
var Vr = Tr;
function Ar(e) {
  return this.__data__.has(e);
}
var Or = Ar, kr = typeof he == "object" && he && he.Object === Object && he, Ha = kr, jr = Ha, Pr = typeof self == "object" && self && self.Object === Object && self, Rr = jr || Pr || Function("return this")(), U = Rr, Dr = U, Lr = Dr.Symbol, ze = Lr, ya = ze, xa = Object.prototype, mr = xa.hasOwnProperty, Ir = xa.toString, ce = ya ? ya.toStringTag : void 0;
function Fr(e) {
  var r = mr.call(e, ce), o = e[ce];
  try {
    e[ce] = void 0;
    var s = !0;
  } catch {
  }
  var y = Ir.call(e);
  return s && (r ? e[ce] = o : delete e[ce]), y;
}
var Kr = Fr, Nr = Object.prototype, Er = Nr.toString;
function Ur(e) {
  return Er.call(e);
}
var Mr = Ur, ga = ze, Br = Kr, zr = Mr, Gr = "[object Null]", Hr = "[object Undefined]", ha = ga ? ga.toStringTag : void 0;
function xr(e) {
  return e == null ? e === void 0 ? Hr : Gr : ha && ha in Object(e) ? Br(e) : zr(e);
}
var Se = xr;
function Yr(e) {
  var r = typeof e;
  return e != null && (r == "object" || r == "function");
}
var de = Yr, Wr = Se, Jr = de, qr = "[object AsyncFunction]", Qr = "[object Function]", Xr = "[object GeneratorFunction]", Zr = "[object Proxy]";
function en(e) {
  if (!Jr(e))
    return !1;
  var r = Wr(e);
  return r == Qr || r == Xr || r == qr || r == Zr;
}
var Ya = en, an = U, tn = an["__core-js_shared__"], rn = tn, Le = rn, va = function() {
  var e = /[^.]+$/.exec(Le && Le.keys && Le.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function nn(e) {
  return !!va && va in e;
}
var on = nn, ln = Function.prototype, sn = ln.toString;
function un(e) {
  if (e != null) {
    try {
      return sn.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var Wa = un, cn = Ya, pn = on, dn = de, fn = Wa, yn = /[\\^$.*+?()[\]{}|]/g, gn = /^\[object .+?Constructor\]$/, hn = Function.prototype, vn = Object.prototype, bn = hn.toString, $n = vn.hasOwnProperty, Cn = RegExp(
  "^" + bn.call($n).replace(yn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function _n(e) {
  if (!dn(e) || pn(e))
    return !1;
  var r = cn(e) ? Cn : gn;
  return r.test(fn(e));
}
var wn = _n;
function Sn(e, r) {
  return e == null ? void 0 : e[r];
}
var Tn = Sn, Vn = wn, An = Tn;
function On(e, r) {
  var o = An(e, r);
  return Vn(o) ? o : void 0;
}
var X = On, kn = X, jn = U, Pn = kn(jn, "Map"), Ge = Pn, Rn = X, Dn = Rn(Object, "create"), Te = Dn, ba = Te;
function Ln() {
  this.__data__ = ba ? ba(null) : {}, this.size = 0;
}
var mn = Ln;
function In(e) {
  var r = this.has(e) && delete this.__data__[e];
  return this.size -= r ? 1 : 0, r;
}
var Fn = In, Kn = Te, Nn = "__lodash_hash_undefined__", En = Object.prototype, Un = En.hasOwnProperty;
function Mn(e) {
  var r = this.__data__;
  if (Kn) {
    var o = r[e];
    return o === Nn ? void 0 : o;
  }
  return Un.call(r, e) ? r[e] : void 0;
}
var Bn = Mn, zn = Te, Gn = Object.prototype, Hn = Gn.hasOwnProperty;
function xn(e) {
  var r = this.__data__;
  return zn ? r[e] !== void 0 : Hn.call(r, e);
}
var Yn = xn, Wn = Te, Jn = "__lodash_hash_undefined__";
function qn(e, r) {
  var o = this.__data__;
  return this.size += this.has(e) ? 0 : 1, o[e] = Wn && r === void 0 ? Jn : r, this;
}
var Qn = qn, Xn = mn, Zn = Fn, eo = Bn, ao = Yn, to = Qn;
function re(e) {
  var r = -1, o = e == null ? 0 : e.length;
  for (this.clear(); ++r < o; ) {
    var s = e[r];
    this.set(s[0], s[1]);
  }
}
re.prototype.clear = Xn;
re.prototype.delete = Zn;
re.prototype.get = eo;
re.prototype.has = ao;
re.prototype.set = to;
var ro = re, $a = ro, no = we, oo = Ge;
function lo() {
  this.size = 0, this.__data__ = {
    hash: new $a(),
    map: new (oo || no)(),
    string: new $a()
  };
}
var so = lo;
function io(e) {
  var r = typeof e;
  return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? e !== "__proto__" : e === null;
}
var uo = io, co = uo;
function po(e, r) {
  var o = e.__data__;
  return co(r) ? o[typeof r == "string" ? "string" : "hash"] : o.map;
}
var Ve = po, fo = Ve;
function yo(e) {
  var r = fo(this, e).delete(e);
  return this.size -= r ? 1 : 0, r;
}
var go = yo, ho = Ve;
function vo(e) {
  return ho(this, e).get(e);
}
var bo = vo, $o = Ve;
function Co(e) {
  return $o(this, e).has(e);
}
var _o = Co, wo = Ve;
function So(e, r) {
  var o = wo(this, e), s = o.size;
  return o.set(e, r), this.size += o.size == s ? 0 : 1, this;
}
var To = So, Vo = so, Ao = go, Oo = bo, ko = _o, jo = To;
function ne(e) {
  var r = -1, o = e == null ? 0 : e.length;
  for (this.clear(); ++r < o; ) {
    var s = e[r];
    this.set(s[0], s[1]);
  }
}
ne.prototype.clear = Vo;
ne.prototype.delete = Ao;
ne.prototype.get = Oo;
ne.prototype.has = ko;
ne.prototype.set = jo;
var Po = ne, Ro = we, Do = Ge, Lo = Po, mo = 200;
function Io(e, r) {
  var o = this.__data__;
  if (o instanceof Ro) {
    var s = o.__data__;
    if (!Do || s.length < mo - 1)
      return s.push([e, r]), this.size = ++o.size, this;
    o = this.__data__ = new Lo(s);
  }
  return o.set(e, r), this.size = o.size, this;
}
var Fo = Io, Ko = we, No = _r, Eo = Sr, Uo = Vr, Mo = Or, Bo = Fo;
function oe(e) {
  var r = this.__data__ = new Ko(e);
  this.size = r.size;
}
oe.prototype.clear = No;
oe.prototype.delete = Eo;
oe.prototype.get = Uo;
oe.prototype.has = Mo;
oe.prototype.set = Bo;
var zo = oe;
function Go(e, r) {
  for (var o = -1, s = e == null ? 0 : e.length; ++o < s && r(e[o], o, e) !== !1; )
    ;
  return e;
}
var Ho = Go, xo = X, Yo = function() {
  try {
    var e = xo(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
}(), Wo = Yo, Ca = Wo;
function Jo(e, r, o) {
  r == "__proto__" && Ca ? Ca(e, r, {
    configurable: !0,
    enumerable: !0,
    value: o,
    writable: !0
  }) : e[r] = o;
}
var Ja = Jo, qo = Ja, Qo = Ga, Xo = Object.prototype, Zo = Xo.hasOwnProperty;
function el(e, r, o) {
  var s = e[r];
  (!(Zo.call(e, r) && Qo(s, o)) || o === void 0 && !(r in e)) && qo(e, r, o);
}
var qa = el, al = qa, tl = Ja;
function rl(e, r, o, s) {
  var y = !o;
  o || (o = {});
  for (var f = -1, p = r.length; ++f < p; ) {
    var d = r[f], C = s ? s(o[d], e[d], d, o, e) : void 0;
    C === void 0 && (C = e[d]), y ? tl(o, d, C) : al(o, d, C);
  }
  return o;
}
var Ae = rl;
function nl(e, r) {
  for (var o = -1, s = Array(e); ++o < e; )
    s[o] = r(o);
  return s;
}
var ol = nl;
function ll(e) {
  return e != null && typeof e == "object";
}
var fe = ll, sl = Se, il = fe, ul = "[object Arguments]";
function cl(e) {
  return il(e) && sl(e) == ul;
}
var pl = cl, _a = pl, dl = fe, Qa = Object.prototype, fl = Qa.hasOwnProperty, yl = Qa.propertyIsEnumerable, gl = _a(/* @__PURE__ */ function() {
  return arguments;
}()) ? _a : function(e) {
  return dl(e) && fl.call(e, "callee") && !yl.call(e, "callee");
}, hl = gl, vl = Array.isArray, He = vl, be = { exports: {} };
function bl() {
  return !1;
}
var $l = bl;
be.exports;
(function(e, r) {
  var o = U, s = $l, y = r && !r.nodeType && r, f = y && !0 && e && !e.nodeType && e, p = f && f.exports === y, d = p ? o.Buffer : void 0, C = d ? d.isBuffer : void 0, $ = C || s;
  e.exports = $;
})(be, be.exports);
var Xa = be.exports, Cl = 9007199254740991, _l = /^(?:0|[1-9]\d*)$/;
function wl(e, r) {
  var o = typeof e;
  return r = r ?? Cl, !!r && (o == "number" || o != "symbol" && _l.test(e)) && e > -1 && e % 1 == 0 && e < r;
}
var Sl = wl, Tl = 9007199254740991;
function Vl(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Tl;
}
var Za = Vl, Al = Se, Ol = Za, kl = fe, jl = "[object Arguments]", Pl = "[object Array]", Rl = "[object Boolean]", Dl = "[object Date]", Ll = "[object Error]", ml = "[object Function]", Il = "[object Map]", Fl = "[object Number]", Kl = "[object Object]", Nl = "[object RegExp]", El = "[object Set]", Ul = "[object String]", Ml = "[object WeakMap]", Bl = "[object ArrayBuffer]", zl = "[object DataView]", Gl = "[object Float32Array]", Hl = "[object Float64Array]", xl = "[object Int8Array]", Yl = "[object Int16Array]", Wl = "[object Int32Array]", Jl = "[object Uint8Array]", ql = "[object Uint8ClampedArray]", Ql = "[object Uint16Array]", Xl = "[object Uint32Array]", T = {};
T[Gl] = T[Hl] = T[xl] = T[Yl] = T[Wl] = T[Jl] = T[ql] = T[Ql] = T[Xl] = !0;
T[jl] = T[Pl] = T[Bl] = T[Rl] = T[zl] = T[Dl] = T[Ll] = T[ml] = T[Il] = T[Fl] = T[Kl] = T[Nl] = T[El] = T[Ul] = T[Ml] = !1;
function Zl(e) {
  return kl(e) && Ol(e.length) && !!T[Al(e)];
}
var es = Zl;
function as(e) {
  return function(r) {
    return e(r);
  };
}
var xe = as, $e = { exports: {} };
$e.exports;
(function(e, r) {
  var o = Ha, s = r && !r.nodeType && r, y = s && !0 && e && !e.nodeType && e, f = y && y.exports === s, p = f && o.process, d = function() {
    try {
      var C = y && y.require && y.require("util").types;
      return C || p && p.binding && p.binding("util");
    } catch {
    }
  }();
  e.exports = d;
})($e, $e.exports);
var Ye = $e.exports, ts = es, rs = xe, wa = Ye, Sa = wa && wa.isTypedArray, ns = Sa ? rs(Sa) : ts, os = ns, ls = ol, ss = hl, is = He, us = Xa, cs = Sl, ps = os, ds = Object.prototype, fs = ds.hasOwnProperty;
function ys(e, r) {
  var o = is(e), s = !o && ss(e), y = !o && !s && us(e), f = !o && !s && !y && ps(e), p = o || s || y || f, d = p ? ls(e.length, String) : [], C = d.length;
  for (var $ in e)
    (r || fs.call(e, $)) && !(p && // Safari 9 has enumerable `arguments.length` in strict mode.
    ($ == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    y && ($ == "offset" || $ == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    f && ($ == "buffer" || $ == "byteLength" || $ == "byteOffset") || // Skip index properties.
    cs($, C))) && d.push($);
  return d;
}
var et = ys, gs = Object.prototype;
function hs(e) {
  var r = e && e.constructor, o = typeof r == "function" && r.prototype || gs;
  return e === o;
}
var We = hs;
function vs(e, r) {
  return function(o) {
    return e(r(o));
  };
}
var at = vs, bs = at, $s = bs(Object.keys, Object), Cs = $s, _s = We, ws = Cs, Ss = Object.prototype, Ts = Ss.hasOwnProperty;
function Vs(e) {
  if (!_s(e))
    return ws(e);
  var r = [];
  for (var o in Object(e))
    Ts.call(e, o) && o != "constructor" && r.push(o);
  return r;
}
var As = Vs, Os = Ya, ks = Za;
function js(e) {
  return e != null && ks(e.length) && !Os(e);
}
var tt = js, Ps = et, Rs = As, Ds = tt;
function Ls(e) {
  return Ds(e) ? Ps(e) : Rs(e);
}
var Je = Ls, ms = Ae, Is = Je;
function Fs(e, r) {
  return e && ms(r, Is(r), e);
}
var Ks = Fs;
function Ns(e) {
  var r = [];
  if (e != null)
    for (var o in Object(e))
      r.push(o);
  return r;
}
var Es = Ns, Us = de, Ms = We, Bs = Es, zs = Object.prototype, Gs = zs.hasOwnProperty;
function Hs(e) {
  if (!Us(e))
    return Bs(e);
  var r = Ms(e), o = [];
  for (var s in e)
    s == "constructor" && (r || !Gs.call(e, s)) || o.push(s);
  return o;
}
var xs = Hs, Ys = et, Ws = xs, Js = tt;
function qs(e) {
  return Js(e) ? Ys(e, !0) : Ws(e);
}
var qe = qs, Qs = Ae, Xs = qe;
function Zs(e, r) {
  return e && Qs(r, Xs(r), e);
}
var ei = Zs, Ce = { exports: {} };
Ce.exports;
(function(e, r) {
  var o = U, s = r && !r.nodeType && r, y = s && !0 && e && !e.nodeType && e, f = y && y.exports === s, p = f ? o.Buffer : void 0, d = p ? p.allocUnsafe : void 0;
  function C($, M) {
    if (M)
      return $.slice();
    var v = $.length, k = d ? d(v) : new $.constructor(v);
    return $.copy(k), k;
  }
  e.exports = C;
})(Ce, Ce.exports);
var ai = Ce.exports;
function ti(e, r) {
  var o = -1, s = e.length;
  for (r || (r = Array(s)); ++o < s; )
    r[o] = e[o];
  return r;
}
var ri = ti;
function ni(e, r) {
  for (var o = -1, s = e == null ? 0 : e.length, y = 0, f = []; ++o < s; ) {
    var p = e[o];
    r(p, o, e) && (f[y++] = p);
  }
  return f;
}
var oi = ni;
function li() {
  return [];
}
var rt = li, si = oi, ii = rt, ui = Object.prototype, ci = ui.propertyIsEnumerable, Ta = Object.getOwnPropertySymbols, pi = Ta ? function(e) {
  return e == null ? [] : (e = Object(e), si(Ta(e), function(r) {
    return ci.call(e, r);
  }));
} : ii, Qe = pi, di = Ae, fi = Qe;
function yi(e, r) {
  return di(e, fi(e), r);
}
var gi = yi;
function hi(e, r) {
  for (var o = -1, s = r.length, y = e.length; ++o < s; )
    e[y + o] = r[o];
  return e;
}
var nt = hi, vi = at, bi = vi(Object.getPrototypeOf, Object), ot = bi, $i = nt, Ci = ot, _i = Qe, wi = rt, Si = Object.getOwnPropertySymbols, Ti = Si ? function(e) {
  for (var r = []; e; )
    $i(r, _i(e)), e = Ci(e);
  return r;
} : wi, lt = Ti, Vi = Ae, Ai = lt;
function Oi(e, r) {
  return Vi(e, Ai(e), r);
}
var ki = Oi, ji = nt, Pi = He;
function Ri(e, r, o) {
  var s = r(e);
  return Pi(e) ? s : ji(s, o(e));
}
var st = Ri, Di = st, Li = Qe, mi = Je;
function Ii(e) {
  return Di(e, mi, Li);
}
var Fi = Ii, Ki = st, Ni = lt, Ei = qe;
function Ui(e) {
  return Ki(e, Ei, Ni);
}
var Mi = Ui, Bi = X, zi = U, Gi = Bi(zi, "DataView"), Hi = Gi, xi = X, Yi = U, Wi = xi(Yi, "Promise"), Ji = Wi, qi = X, Qi = U, Xi = qi(Qi, "Set"), Zi = Xi, eu = X, au = U, tu = eu(au, "WeakMap"), ru = tu, me = Hi, Ie = Ge, Fe = Ji, Ke = Zi, Ne = ru, it = Se, le = Wa, Va = "[object Map]", nu = "[object Object]", Aa = "[object Promise]", Oa = "[object Set]", ka = "[object WeakMap]", ja = "[object DataView]", ou = le(me), lu = le(Ie), su = le(Fe), iu = le(Ke), uu = le(Ne), J = it;
(me && J(new me(new ArrayBuffer(1))) != ja || Ie && J(new Ie()) != Va || Fe && J(Fe.resolve()) != Aa || Ke && J(new Ke()) != Oa || Ne && J(new Ne()) != ka) && (J = function(e) {
  var r = it(e), o = r == nu ? e.constructor : void 0, s = o ? le(o) : "";
  if (s)
    switch (s) {
      case ou:
        return ja;
      case lu:
        return Va;
      case su:
        return Aa;
      case iu:
        return Oa;
      case uu:
        return ka;
    }
  return r;
});
var Xe = J, cu = Object.prototype, pu = cu.hasOwnProperty;
function du(e) {
  var r = e.length, o = new e.constructor(r);
  return r && typeof e[0] == "string" && pu.call(e, "index") && (o.index = e.index, o.input = e.input), o;
}
var fu = du, yu = U, gu = yu.Uint8Array, hu = gu, Pa = hu;
function vu(e) {
  var r = new e.constructor(e.byteLength);
  return new Pa(r).set(new Pa(e)), r;
}
var Ze = vu, bu = Ze;
function $u(e, r) {
  var o = r ? bu(e.buffer) : e.buffer;
  return new e.constructor(o, e.byteOffset, e.byteLength);
}
var Cu = $u, _u = /\w*$/;
function wu(e) {
  var r = new e.constructor(e.source, _u.exec(e));
  return r.lastIndex = e.lastIndex, r;
}
var Su = wu, Ra = ze, Da = Ra ? Ra.prototype : void 0, La = Da ? Da.valueOf : void 0;
function Tu(e) {
  return La ? Object(La.call(e)) : {};
}
var Vu = Tu, Au = Ze;
function Ou(e, r) {
  var o = r ? Au(e.buffer) : e.buffer;
  return new e.constructor(o, e.byteOffset, e.length);
}
var ku = Ou, ju = Ze, Pu = Cu, Ru = Su, Du = Vu, Lu = ku, mu = "[object Boolean]", Iu = "[object Date]", Fu = "[object Map]", Ku = "[object Number]", Nu = "[object RegExp]", Eu = "[object Set]", Uu = "[object String]", Mu = "[object Symbol]", Bu = "[object ArrayBuffer]", zu = "[object DataView]", Gu = "[object Float32Array]", Hu = "[object Float64Array]", xu = "[object Int8Array]", Yu = "[object Int16Array]", Wu = "[object Int32Array]", Ju = "[object Uint8Array]", qu = "[object Uint8ClampedArray]", Qu = "[object Uint16Array]", Xu = "[object Uint32Array]";
function Zu(e, r, o) {
  var s = e.constructor;
  switch (r) {
    case Bu:
      return ju(e);
    case mu:
    case Iu:
      return new s(+e);
    case zu:
      return Pu(e, o);
    case Gu:
    case Hu:
    case xu:
    case Yu:
    case Wu:
    case Ju:
    case qu:
    case Qu:
    case Xu:
      return Lu(e, o);
    case Fu:
      return new s();
    case Ku:
    case Uu:
      return new s(e);
    case Nu:
      return Ru(e);
    case Eu:
      return new s();
    case Mu:
      return Du(e);
  }
}
var ec = Zu, ac = de, ma = Object.create, tc = /* @__PURE__ */ function() {
  function e() {
  }
  return function(r) {
    if (!ac(r))
      return {};
    if (ma)
      return ma(r);
    e.prototype = r;
    var o = new e();
    return e.prototype = void 0, o;
  };
}(), rc = tc, nc = rc, oc = ot, lc = We;
function sc(e) {
  return typeof e.constructor == "function" && !lc(e) ? nc(oc(e)) : {};
}
var ic = sc, uc = Xe, cc = fe, pc = "[object Map]";
function dc(e) {
  return cc(e) && uc(e) == pc;
}
var fc = dc, yc = fc, gc = xe, Ia = Ye, Fa = Ia && Ia.isMap, hc = Fa ? gc(Fa) : yc, vc = hc, bc = Xe, $c = fe, Cc = "[object Set]";
function _c(e) {
  return $c(e) && bc(e) == Cc;
}
var wc = _c, Sc = wc, Tc = xe, Ka = Ye, Na = Ka && Ka.isSet, Vc = Na ? Tc(Na) : Sc, Ac = Vc, Oc = zo, kc = Ho, jc = qa, Pc = Ks, Rc = ei, Dc = ai, Lc = ri, mc = gi, Ic = ki, Fc = Fi, Kc = Mi, Nc = Xe, Ec = fu, Uc = ec, Mc = ic, Bc = He, zc = Xa, Gc = vc, Hc = de, xc = Ac, Yc = Je, Wc = qe, Jc = 1, qc = 2, Qc = 4, ut = "[object Arguments]", Xc = "[object Array]", Zc = "[object Boolean]", ep = "[object Date]", ap = "[object Error]", ct = "[object Function]", tp = "[object GeneratorFunction]", rp = "[object Map]", np = "[object Number]", pt = "[object Object]", op = "[object RegExp]", lp = "[object Set]", sp = "[object String]", ip = "[object Symbol]", up = "[object WeakMap]", cp = "[object ArrayBuffer]", pp = "[object DataView]", dp = "[object Float32Array]", fp = "[object Float64Array]", yp = "[object Int8Array]", gp = "[object Int16Array]", hp = "[object Int32Array]", vp = "[object Uint8Array]", bp = "[object Uint8ClampedArray]", $p = "[object Uint16Array]", Cp = "[object Uint32Array]", w = {};
w[ut] = w[Xc] = w[cp] = w[pp] = w[Zc] = w[ep] = w[dp] = w[fp] = w[yp] = w[gp] = w[hp] = w[rp] = w[np] = w[pt] = w[op] = w[lp] = w[sp] = w[ip] = w[vp] = w[bp] = w[$p] = w[Cp] = !0;
w[ap] = w[ct] = w[up] = !1;
function ve(e, r, o, s, y, f) {
  var p, d = r & Jc, C = r & qc, $ = r & Qc;
  if (o && (p = y ? o(e, s, y, f) : o(e)), p !== void 0)
    return p;
  if (!Hc(e))
    return e;
  var M = Bc(e);
  if (M) {
    if (p = Ec(e), !d)
      return Lc(e, p);
  } else {
    var v = Nc(e), k = v == ct || v == tp;
    if (zc(e))
      return Dc(e, d);
    if (v == pt || v == ut || k && !y) {
      if (p = C || k ? {} : Mc(e), !d)
        return C ? Ic(e, Rc(p, e)) : mc(e, Pc(p, e));
    } else {
      if (!w[v])
        return y ? e : {};
      p = Uc(e, v, d);
    }
  }
  f || (f = new Oc());
  var R = f.get(e);
  if (R)
    return R;
  f.set(e, p), xc(e) ? e.forEach(function(K) {
    p.add(ve(K, r, o, K, e, f));
  }) : Gc(e) && e.forEach(function(K, D) {
    p.set(D, ve(K, r, o, D, e, f));
  });
  var se = $ ? C ? Kc : Fc : C ? Wc : Yc, O = M ? void 0 : se(e);
  return kc(O || e, function(K, D) {
    O && (D = K, K = e[D]), jc(p, D, ve(K, r, o, D, e, f));
  }), p;
}
var _p = ve, wp = _p, Sp = 1, Tp = 4;
function Vp(e) {
  return wp(e, Sp | Tp);
}
var Ap = Vp;
const Op = /* @__PURE__ */ Wt(Ap), kp = (e, r) => {
  const o = Q(e, "modelValue"), s = Q(e, "optionValue"), y = (d) => {
    d == "custom" && r("update:modelValue", ""), r("update:optionValue", d), r("selectChange", d);
  }, f = A(null);
  return { innerValue: o, selectValue: s, selectChangeHandler: y, dateRangeChangeHandler: (d) => {
    JSON.stringify(d) !== JSON.stringify(f.value) && (f.value = Op(d), r("update:modelValue", d), r("dateRangeChange", d));
  } };
}, jp = { class: "label-context" }, Pp = { key: 0 }, Rp = { key: 1 }, Dp = /* @__PURE__ */ Ee({
  __name: "SearchDateRange",
  props: {
    options: { default: [] },
    optionValue: { default: "" },
    optionsLabelKey: { default: "label" },
    optionsValueKey: { default: "value" },
    modelValue: { default: [] },
    mode: { default: "default" },
    type: { default: "" },
    labelLength: {},
    labelPosition: {},
    label: { default: "" },
    showFilterPanel: { type: Boolean, default: !1 },
    isNeedSelect: { type: Boolean, default: !0 },
    labelWidth: { default: "" }
  },
  emits: ["update:modelValue", "dateRangeChange", "update:optionValue", "selectChange", "openDialogHandle", "openDialogChange"],
  setup(e, { emit: r }) {
    const o = e, s = Q(o, "labelWidth"), y = r, { innerValue: f, selectValue: p, dateRangeChangeHandler: d, selectChangeHandler: C } = kp(o, y), $ = A("200px");
    A(null);
    const M = A();
    return M.value = s.value ? s.value + "!important" : Me(o.labelLength, o.labelPosition), (v, k) => (g(), _(
      "div",
      {
        class: G(["das-select-date-range", [{ "das-select-date-range-en-filter": c(I) != "zh-CN" && o.showFilterPanel }, { "das-select-date-range-en-nonefilter": c(I) != "zh-CN" && !o.showFilterPanel }]]),
        id: "das-select-date-range"
      },
      [
        v.label ? (g(), _(
          "div",
          {
            key: 0,
            class: "label",
            style: Ma({ width: M.value })
          },
          [
            Ue((g(), _("div", jp, [
              Ba(
                ae(v.label),
                1
                /* TEXT */
              )
            ])), [
              [c(za)]
            ]),
            o.showFilterPanel ? (g(), _("span", Pp, "：")) : h("v-if", !0)
          ],
          4
          /* STYLE */
        )) : h("v-if", !0),
        v.isNeedSelect ? (g(), _("div", Rp, [
          q(c(Ft), {
            size: v.mode == "default" ? "mini" : "small",
            dropdownClassName: "das-select-date-select-container",
            class: G({ "optional-select-item": v.mode != "default" }),
            modelValue: c(p),
            "onUpdate:modelValue": k[0] || (k[0] = (R) => pe(p) ? p.value = R : null),
            width: c(I) == "zh-CN" ? v.mode == "default" ? "95px" : "100px" : "165px",
            dropdownMatchSelectWidth: !1,
            "border-type": v.mode == "default" ? "none" : "underline",
            options: v.options,
            fieldNames: {
              value: v.optionsValueKey,
              label: v.optionsLabelKey
            },
            onChange: c(C)
          }, null, 8, ["size", "class", "modelValue", "width", "border-type", "options", "fieldNames", "onChange"])
        ])) : h("v-if", !0),
        v.mode == "default" ? (g(), P(c(Kt), j({
          key: 2,
          modelValue: c(f),
          "onUpdate:modelValue": k[1] || (k[1] = (R) => pe(f) ? f.value = R : null),
          itemWidth: $.value
        }, v.$attrs, { onChange: c(d) }), null, 16, ["modelValue", "itemWidth", "onChange"])) : h("v-if", !0),
        v.mode == "optional" && c(p) == "custom" ? (g(), _(
          z,
          { key: 3 },
          [
            h(" 日期范围选择器 "),
            v.type == "dateRange" || v.type == "dateTimeRange" || v.type == "weekRange" || v.type == "monthRange" || v.type == "yearRange" ? (g(), P(c(Nt), j({
              key: 0,
              "show-time": v.type === "dateTimeRange",
              picker: v.type,
              size: "small",
              modelValue: c(f),
              "onUpdate:modelValue": k[2] || (k[2] = (R) => pe(f) ? f.value = R : null)
            }, v.$attrs, { onChange: c(d) }), null, 16, ["show-time", "picker", "modelValue", "onChange"])) : v.type === "timeRange" ? (g(), P(c(Et), j({
              key: 1,
              modelValue: c(f),
              "onUpdate:modelValue": k[3] || (k[3] = (R) => pe(f) ? f.value = R : null),
              size: "small"
            }, v.$attrs, { onChange: c(d) }), null, 16, ["modelValue", "onChange"])) : h("v-if", !0)
          ],
          64
          /* STABLE_FRAGMENT */
        )) : h("v-if", !0)
      ],
      2
      /* CLASS */
    ));
  }
}), Ea = /* @__PURE__ */ Be(Dp, [["__scopeId", "data-v-b9b880e5"]]), Lp = { class: "search-content" }, mp = {
  key: 0,
  class: "search-title"
}, Ip = {
  key: 1,
  class: "left"
}, Fp = { class: "align-left-filter-content" }, Kp = {
  key: 2,
  class: "search-selected-content"
}, Np = {
  key: 0,
  class: "label"
}, Ep = { class: "tag-content" }, Up = {
  key: 0,
  class: "right"
}, Mp = { class: "status" }, Bp = {
  key: 2,
  class: "margin-filter"
}, zp = { class: "filter-scroll-content" }, Gp = /* @__PURE__ */ Ee({
  __name: "Index",
  props: {
    title: { default: "" },
    options: { default: () => [] },
    labelLength: { default: 4 },
    showFilterPanel: { type: Boolean, default: !1 },
    layout: { default: "horizontal" },
    isMarginRight: { type: Boolean, default: !1 },
    labelPosition: { default: "left" },
    hasBtn: { type: Boolean, default: !1 },
    isExpandAtFocus: { type: Boolean, default: !0 },
    isExpandFilter: { type: Boolean, default: !1 }
  },
  emits: ["confirm", "clearSearch"],
  setup(e, { expose: r, emit: o }) {
    wt((n) => ({
      "209c1c8c": R.value,
      "2b59870e": p.value
    })), Ot({
      fold: import("@das-fed/ui/packages/icons/fold")
    });
    const s = e, y = I.value === "zh-CN" ? "，" : ", ", f = A(70), p = A("50px"), d = A(0), C = A(Number(s.labelLength) + 1), $ = Q(s, "isExpandFilter"), M = () => {
      $.value = !$.value;
    }, v = o;
    let k = A([]);
    const R = A("36%"), se = A();
    da(() => window.screen.width), St(() => {
      var u, t;
      f.value = I.value == "zh-CN" ? window.screen.width > 1440 ? 70 : 50 : 30, p.value = f.value + "px", k.value = JSON.parse(JSON.stringify(O.value));
      let n = Me(C.value, s.labelPosition).replace("px", "");
      I.value == "zh-CN" ? R.value = (((n * 1 >= 84 ? 84 : n * 1) + 208) * 2 + f.value) / (((u = se.value) == null ? void 0 : u.clientWidth) - 80) * 100 + "%" : R.value = (378 + f.value) * 2 / (((t = se.value) == null ? void 0 : t.clientWidth) - 80) * 100 + "%";
    });
    const O = Q(s, "options"), K = Q(s, "options");
    O.value.forEach((n) => {
      n.layout = n.layout ? n.layout : "inner";
    });
    let D = A([]), ea = A([]), Oe = A([]);
    const m = (n, u) => {
      var a, i;
      const { key: t, ...l } = n;
      if ((l.type != "selectDateRange" && s.showFilterPanel || !s.showFilterPanel && !["dateRange", "dateTimeRange", "weekRange", "monthRange", "yearRange", "selectDateRange"].includes(l.type)) && (l.width = (l == null ? void 0 : l.width) || "200px"), s.showFilterPanel) {
        if ((l.type == "radio" || l.type == "checkbox") && (l.optionType = "filterSquare"), n != null && n.custom && u == "childItem")
          return l.customOption.defaultProps || (l.customOption.defaultProps = {
            value: "id",
            label: "name"
          }), l.customOption;
        if (n.options && (l.optionsLabelKey = l.optionsLabelKey ? l.optionsLabelKey : "label", l.optionsValueKey = l.optionsValueKey ? l.optionsValueKey : "value"), n.type == "selectDateRange") {
          const { value: V, ...S } = l;
          return S.mode = S.mode ? S.mode : "default", S;
        } else
          return l;
      } else if (u == "outDate") {
        const { type: V, ...S } = l;
        return S;
      }
      return l.hasOwnProperty("isChangeTrigger") || (l.isChangeTrigger = !0), n.type == "treeSelect" && (l.optionsLabelKey = ((a = l.treeProps) == null ? void 0 : a.label) || "name", l.optionsValueKey = ((i = l.treeProps) == null ? void 0 : i.value) || l.nodeKey || "value", l.props = l == null ? void 0 : l.treeProps, l.keyword = l.keyword ? l.keyword : "", l.selectAttrs = l.selectAttrs ? l.selectAttrs : {}, Re(() => l)), l;
    }, H = () => {
      const n = {};
      return Re(() => {
        O.value.map((u) => n[u.key] = u.value);
      }), n;
    };
    let dt = [
      "dateRange",
      "dateTimeRange",
      "weekRange",
      "monthRange",
      "selectDateRange",
      "yearRange",
      "date",
      "dateTime",
      "week",
      "month",
      "quarter",
      "year"
    ], F = A([]);
    const ie = () => {
      let n, u = D.value.map((a) => {
        var ue, ia, ua, ca, pa;
        let i;
        a.optionsLabelKey = a.optionsLabelKey ? a.optionsLabelKey : "label", a.optionsValueKey = a.optionsValueKey ? a.optionsValueKey : "value", n = a.label, a.options && a.options.length ? a.type != "selectDateRange" && a.type != "treeSelect" ? (i = a.options.filter((b) => {
          if (Array.isArray(a.value) && !b.mutual)
            return a.value.includes(b[a.optionsValueKey]);
          if (!b.mutual && !b[a.optionsLabelKey].toLowerCase().includes(L("全部").toLowerCase()) && !b[a.optionsLabelKey].toLowerCase().includes(L("不限").toLowerCase()) && !Array.isArray(a.value) && b[a.optionsLabelKey] != "" && b[a.optionsLabelKey] != null)
            return a.value === b[a.optionsValueKey];
        }), n = a.label) : a.type == "selectDateRange" && (n = a.options.filter((b) => a.optionValue == b[a.optionsValueKey])[0][a.optionsLabelKey], i = a.value) : a != null && a.custom && a.customOption && a.customOption.options.length && (i = a.customOption.options.filter((b) => a.customOption.value == b[a.customOption.defaultProps.value])), a.type == "treeSelect" && (a.optionsLabelKey = ((ue = a.treeProps) == null ? void 0 : ue.label) || "name", a.optionsValueKey = ((ia = a.treeProps) == null ? void 0 : ia.value) || a.nodeKey || "value", a.props = a == null ? void 0 : a.treeProps, n = a.label, i = a.checkedNodes ? Array.isArray(a.checkedNodes) ? (ua = a.checkedNodes) == null ? void 0 : ua.map((b) => b[a.optionsLabelKey]) : a.checkedNodes[a.optionsLabelKey] : []);
        let V = a.type == "selectDateRange" ? a.dateType : a.type;
        a.type != "selectDateRange" && (V == "dateRange" || V == "dateTimeRange" || V == "weekRange" || V == "monthRange" || V == "yearRange" || V == "timeRange") && (a.value = a.value && a.value.length ? !a.value[0] && !a.value[1] ? "" : a.value : "");
        let S = "";
        if (a.type == "treeSelect")
          S = i && !Array.isArray(i) ? i : i.join(y);
        else if (a.custom)
          S = a.value ? a.value : i.map((b) => b[a.customOption.defaultProps.label]).join(y);
        else if (a.type != "selectDateRange" && a.options && a.options.length)
          S = i.map((b) => b[a.optionsLabelKey]).join(y);
        else if (a.type == "selectDateRange" || a.type == "dateRange" || V == "dateTimeRange" || a.type == "timeRange" || V == "weekRange" || V == "monthRange" || V == "yearRange" || a.type == "inputSelect") {
          if ((ca = a.value) != null && ca.length || (pa = a == null ? void 0 : a.storageValue) != null && pa.length) {
            let b = a.value || (a == null ? void 0 : a.storageValue);
            b.length == 2 ? b != null && b.every((Pe) => !!Pe) ? S = I.value == "zh-CN" ? b.join(L("至")) : b.join(" " + L("至") + " ") : b != null && b.every((Pe) => !Pe) ? S = "" : !b[0] || !b[1] ? S = b[0] || b[1] : S = b : S = b;
          }
        } else a.type == "select" && a.mode == "multiple" ? S = !a.value || !(i != null && i.length) ? "" : i.map((b) => b[a.optionsLabelKey]).join(y) : S = a.value;
        return {
          show: a.show,
          closable: a.closable,
          key: a.key,
          value: a.value || (a == null ? void 0 : a.storageValue),
          label: n,
          tagName: S,
          type: a.type,
          format: a.format
        };
      });
      u.forEach((a) => {
        a.show = !!a.tagName;
      });
      let t = {}, l = F.value.concat(u);
      l = l.reduce((a, i) => (t[i.key] ? a[a.findIndex((V) => V.key == i.key)] = i : t[i.key] = a.push(i), a), []), F.value = l.filter((a) => !!a.show), F.value.forEach((a) => {
        dt.includes(a.type) && (a.tagName = zt(a));
      });
    };
    let ft = da(() => {
      O.value.forEach((t) => {
        t.layout = t.layout ? t.layout : "inner";
      }), D.value = s.showFilterPanel ? O.value.filter((t) => t.layout == "inner") : [], D.value.forEach((t, l) => {
        t.keyCount = t.keyCount > 0 ? t.keyCount : 0, t.marginRight = I.value == "zh-CN" ? t.marginRight ? t.marginRight : `${f.value}px` : "30px";
      }), ea.value = s.showFilterPanel ? O.value.filter((t) => t.layout == "out") : O.value.filter((t) => t.type == "searchInput" || t.type == "selectSearch"), Oe.value = s.showFilterPanel ? [] : O.value.filter((t) => t.type != "searchInput" && t.type != "selectSearch");
      let u = O.value.filter((t) => t.layout == "inner" && t.type != "input").map((t) => t.value || t.optionValue);
      return s.showFilterPanel ? u : [];
    });
    Ua(
      () => ft,
      () => {
        s.showFilterPanel && ie();
      },
      { deep: !0, immediate: !0 }
    );
    const B = async (n, u, t, l) => {
      var a, i, V;
      x.value || (n.change && n.change(n, u, H(), l), s.showFilterPanel && (n.custom && (t == "childItem" ? (n.value = "", n.customerActive = !1) : (n.customOption.value = "", n.customerActive = !0)), n.type == "treeSelect" ? (n.checkedNodes = Array.isArray(l) ? l : [l], n.selectChange && n.selectChange(u, H(), l), n != null && n.parentLinkChildrenStrictly && ie()) : n.type == "input" ? ie() : ["dateRange", "dateTimeRange", "weekRange", "monthRange", "selectDateRange", "yearRange"].includes(n.type) && (!((a = n.value) != null && a.length) || (i = n.value) != null && i.length && ((V = n.value) != null && V.every((S) => !S))) && (n.storageValue = [], n.value = [])), n.hasOwnProperty("isChangeTrigger") || (n.isChangeTrigger = !0), n.isChangeTrigger && Y());
    }, aa = (n, u) => {
      x.value || (n.dateRangeChange && n.dateRangeChange(n, u, H()), s.showFilterPanel && ie(), n.hasOwnProperty("isChangeTrigger") || (n.isChangeTrigger = !0), n.isChangeTrigger && Y());
    }, ta = (n, u) => {
      (n.type == "dateRange" || n.type == "dateTimeRange" || n.type == "weekRange" || n.type == "monthRange" || n.type == "yearRange") && (n.storageValue = n.value ? JSON.parse(JSON.stringify(n.value)) : void 0, n.openChange && n.openChange(u, H()));
    }, ra = (n, u) => {
      (n.type == "dateRange" || n.type == "dateTimeRange" || n.type == "weekRange" || n.type == "monthRange" || n.type == "yearRange") && n.calendarChange && n.calendarChange(u, H());
    }, yt = (n, u) => {
      n.type == "select" && n.dropdownVisibleChange && n.dropdownVisibleChange(u);
    }, Z = async (n, u) => {
      x.value || (n.type != "treeSelect" && (n.selectChange && n.selectChange(n, u, H()), n.type == "selectDateRange" && F.value.forEach((t) => {
        t.key == n.key && (t.label = n.options.filter((l) => n.optionValue == l[n.optionsValueKey])[0][n.optionsLabelKey]);
      })), Y());
    }, gt = (n, u) => {
      n.openDialog && n.openDialog(n, u);
    }, ht = (n, u) => {
      H(), !x.value && Y();
    }, ye = (n, u, t) => t.type !== "select" ? !1 : t.filterOption ? t.filterOption(n, u, t) : u[t.optionsLabelKey].toLowerCase().indexOf(n.toLowerCase()) >= 0, Y = (n = !0) => {
      const u = {};
      O.value.forEach((t) => u[t.key] = t.value), v("confirm", H());
    };
    let na = {
      string: "",
      number: [],
      object: {},
      function: [],
      array: []
    };
    const oa = A(0), la = (n, u = !1) => {
      F.value = F.value.filter((l) => l.key != n.key);
      let t = !1;
      D.value.forEach((l) => {
        var a;
        if (n.key == l.key) {
          const i = K.value.find((S) => S.key == n.key);
          l.show = !1;
          let V = typeof (i == null ? void 0 : i.value) == "object" && Array.isArray(i == null ? void 0 : i.value) ? "array" : typeof (i == null ? void 0 : i.value);
          if (l.type == "select") {
            let S = i.options.find(
              (ue) => ue[i.optionsLabelKey].toLowerCase().includes(L("全部").toLowerCase()) || ue[i.optionsLabelKey] == L("不限")
            );
            l.value = S ? S[i.optionsValueKey] : l.mode == "multiple" ? [] : null, (a = l.value) != null && a.length && typeof l.value != "string" && (l.value = JSON.parse(JSON.stringify(na[V]))), l.keyCount++;
          } else l.type == "treeSelect" ? (l.value = Array.isArray(i.value) ? [] : "", l.checkedNodes = [], oa.value++) : l.type == "selectDateRange" ? (l.optionValue = i.optionValue, l.value = []) : l.type == "inputSelect" ? (l.value = [], l.options = [], t = !0) : l.type == "dateRange" || l.type == "dateTimeRange" || l.type == "weekRange" || l.type == "monthRange" || l.type == "yearRange" ? (l.value = [], l.storageValue = []) : ["date", "dateTime", "week", "month", "quarter", "year"].includes(l.type) ? l.value = "" : l.value = na[V];
          l.custom && (l.customerActive = !1, l.customOption.value && (l.customOption.value = i.customOption.value));
        }
      }), v("clearSearch", n), !t && !u && Y();
    };
    let ke = A({});
    const sa = (n, u) => {
      ke.value[`treeSelect${u.key}`] = n;
    }, vt = (n) => {
      let u = ke.value[`treeSelect${n}`];
      Re(() => {
        var t, l;
        (l = (t = u == null ? void 0 : u.$treeSelect) == null ? void 0 : t.$tree) == null || l.resetLazyLoad();
      });
    }, bt = (n) => {
      let u = ke.value[`treeSelect${n}`];
      return u == null ? void 0 : u.$treeSelect;
    }, x = A(!1), $t = async (n = !0) => {
      x.value = !0, F.value = [], await O.value.forEach((u) => {
        let t = k.value.find((l) => l.key == u.key);
        t && (u.value = t.value, t.type == "select" ? (u.value = t.options.find(
          (l) => l[t.optionsLabelKey].toLowerCase().includes(l("全部").toLowerCase()) || l[t.optionsLabelKey].toLowerCase().includes(l("不限").toLowerCase())
        )[t.optionsValueKey], u.keyCount++) : t.type == "inputSelect" ? u.options = t.options : t.type == "treeSelect" ? u.checkedNodes = t.checkedNodes : t.optionValue && (u.optionValue = t.optionValue));
      }), O.value = JSON.parse(JSON.stringify(O.value)), d.value++, x.value = !1, n && Y();
    }, Ct = async (n) => {
      if (Array.isArray(n)) {
        x.value = !0;
        let u = n.map((l) => l.key), t = k.value.filter((l) => u.includes(l.key));
        F.value = F.value.filter((l) => !u.includes(l.key)), await O.value.forEach((l) => {
          let a = t.find((i) => i.key == l.key);
          a && (l.value = a.value, a.type == "select" ? (l.value = a.options.find(
            (i) => i[a.optionsLabelKey].toLowerCase().includes(i("全部").toLowerCase()) || i[a.optionsLabelKey].toLowerCase().includes(i("不限").toLowerCase())
          )[a.optionsValueKey], l.keyCount++) : a.type == "inputSelect" ? l.options = a.options : a.type == "treeSelect" ? l.checkedNodes = a.checkedNodes : a.optionValue && (l.optionValue = a.optionValue));
        }), O.value = JSON.parse(JSON.stringify(O.value)), x.value = !1, Y();
      } else
        la(n);
    }, _t = () => $.value, je = (n) => {
      if (!((n == null ? void 0 : n.type) != "input" && (n == null ? void 0 : n.type) != "search" && (n == null ? void 0 : n.type) != "searchInput" && (n == null ? void 0 : n.type) != "selectSearch"))
        return n != null && n.placeholder ? n == null ? void 0 : n.placeholder : !(n != null && n.placeholder) && !(n != null && n.label) && (n == null ? void 0 : n.type) == "searchInput" ? "请输入" : n != null && n.label ? L("das-search-form-search-pre", (n == null ? void 0 : n.label) ?? "") : void 0;
    };
    return r({
      /**treeSelect 调用懒加载树刷新 */
      treeSelectResetLazyLoad: vt,
      getTreeSelectRefByKey: bt,
      optionsHandle: ie,
      closeSearch: Ct,
      resetSearch: $t,
      getCollapseStatus: _t
    }), (n, u) => (g(), _(
      "div",
      {
        class: G(["das-ui-search-form", {
          "expand-hasbtn-padding": n.hasBtn && c($) && n.showFilterPanel,
          "expand-nobtn-padding": !n.hasBtn && c($) && n.showFilterPanel,
          "packup-hasbtn-padding": n.hasBtn && !c($) && n.showFilterPanel,
          "packup-nobtn-padding": !n.hasBtn,
          "nofilter-hasbtn-padding": n.hasBtn && !n.showFilterPanel,
          "das-ui-search-form-en-nonefilter": c(I) != "zh-CN" && !n.showFilterPanel,
          "das-ui-search-form-en-filter": c(I) != "zh-CN" && n.showFilterPanel
        }]),
        ref_key: "searchForm",
        ref: se
      },
      [
        N("div", Lp, [
          N(
            "div",
            {
              class: G(["search-form-left", { "align-center": c(Oe).length }])
            },
            [
              h(" 页面标题 "),
              n.title ? (g(), _(
                "div",
                mp,
                ae(n.title),
                1
                /* TEXT */
              )) : h("v-if", !0),
              n.$slots.left ? (g(), _("div", Ip, [
                h(" @slot slot左侧内容 "),
                W(n.$slots, "left", {}, void 0, !0)
              ])) : h("v-if", !0),
              h(" 无过滤面板 "),
              N("div", Fp, [
                q(c(fa), {
                  alignType: "horizontal",
                  labelLength: C.value - 1,
                  labelPosition: n.labelPosition,
                  contentWidth: "",
                  isSearchForm: !0
                }, {
                  default: E(() => [
                    (g(!0), _(
                      z,
                      null,
                      ge(c(Oe), (t, l) => (g(), _(
                        z,
                        { key: l },
                        [
                          t.type != "selectDateRange" && t.type != "treeSelect" ? (g(), P(c(ee), j({
                            key: 0,
                            modelValue: t.value,
                            "onUpdate:modelValue": (a) => t.value = a
                          }, { ref_for: !0 }, m(t), {
                            onChange: (a) => {
                              B(t, a);
                            },
                            "filter-option": (a, i) => ye(a, i, t),
                            onSelectChange: (a) => {
                              Z(t, a);
                            },
                            onDropdownVisibleChange: (a) => {
                              yt(t, a);
                            },
                            placeholder: je(t)
                          }), {
                            default: E(() => [
                              W(n.$slots, t.key, {}, void 0, !0)
                            ]),
                            _: 2
                            /* DYNAMIC */
                          }, 1040, ["modelValue", "onUpdate:modelValue", "onChange", "filter-option", "onSelectChange", "onDropdownVisibleChange", "placeholder"])) : h("v-if", !0),
                          t.type == "treeSelect" ? (g(), P(c(ee), j({
                            key: 1,
                            ref_for: !0,
                            ref: (a) => sa(a, t),
                            style: t.marginRight,
                            modelValue: t.value,
                            "onUpdate:modelValue": (a) => t.value = a,
                            keyword: t.keyword,
                            "onUpdate:keyword": (a) => t.keyword = a
                          }, { ref_for: !0 }, m(t), {
                            onChange: (a, i) => {
                              B(t, a, "", i);
                            },
                            "filter-option": (a, i) => ye(a, i, t),
                            onSelectChange: (a) => {
                              Z(t, a);
                            }
                          }), {
                            default: E(() => [
                              W(n.$slots, t.key, {}, void 0, !0)
                            ]),
                            _: 2
                            /* DYNAMIC */
                          }, 1040, ["style", "modelValue", "onUpdate:modelValue", "keyword", "onUpdate:keyword", "onChange", "filter-option", "onSelectChange"])) : h("v-if", !0),
                          h(" 带select的日期范围选择 "),
                          t.type == "selectDateRange" ? (g(), P(Ea, j({
                            key: 2,
                            label: t.label,
                            labelLength: C.value - 1,
                            labelPosition: n.labelPosition,
                            mode: "optional",
                            type: t.dateType,
                            class: "",
                            showFilterPanel: s.showFilterPanel,
                            optionValue: t.optionValue,
                            "onUpdate:optionValue": (a) => t.optionValue = a,
                            modelValue: t.value,
                            "onUpdate:modelValue": (a) => t.value = a
                          }, { ref_for: !0 }, m(t, "outDate"), {
                            onDateRangeChange: (a) => {
                              aa(t, a);
                            },
                            onSelectChange: (a) => {
                              Z(t, a);
                            },
                            labelWidth: t == null ? void 0 : t.labelWidth
                          }), null, 16, ["label", "labelLength", "labelPosition", "type", "showFilterPanel", "optionValue", "onUpdate:optionValue", "modelValue", "onUpdate:modelValue", "onDateRangeChange", "onSelectChange", "labelWidth"])) : h("v-if", !0)
                        ],
                        64
                        /* STABLE_FRAGMENT */
                      ))),
                      128
                      /* KEYED_FRAGMENT */
                    ))
                  ]),
                  _: 3
                  /* FORWARDED */
                }, 8, ["labelLength", "labelPosition"])
              ]),
              h(" 已选条件区 "),
              n.showFilterPanel ? (g(), _("div", Kp, [
                c(F).length ? (g(), _(
                  "span",
                  Np,
                  ae(c(L)("筛选条件")),
                  1
                  /* TEXT */
                )) : h("v-if", !0),
                N("div", Ep, [
                  (g(!0), _(
                    z,
                    null,
                    ge(c(F), (t, l) => (g(), _(
                      z,
                      { key: l },
                      [
                        t.show ? (g(), P(c(Rt), {
                          effect: "list",
                          maxWidth: "186px",
                          toolTip: "",
                          key: t.tagName,
                          toolTipLabel: `${t.tagName}`,
                          closable: t.closable,
                          onClose: (a) => la(t)
                        }, {
                          default: E(() => [
                            N(
                              "span",
                              null,
                              ae(t.label) + "：",
                              1
                              /* TEXT */
                            )
                          ]),
                          _: 2
                          /* DYNAMIC */
                        }, 1032, ["toolTipLabel", "closable", "onClose"])) : h("v-if", !0)
                      ],
                      64
                      /* STABLE_FRAGMENT */
                    ))),
                    128
                    /* KEYED_FRAGMENT */
                  ))
                ])
              ])) : h("v-if", !0)
            ],
            2
            /* CLASS */
          ),
          N(
            "div",
            {
              class: G(["search-form-right", { "filter-panel-left": n.showFilterPanel }])
            },
            [
              n.$slots.right ? (g(), _("div", Up, [
                W(n.$slots, "right", {}, void 0, !0)
              ])) : h("v-if", !0),
              h(" 外部右侧搜索筛选条件 "),
              N(
                "div",
                {
                  class: G(["out-filter-content", { "no-fileter-panel": !n.showFilterPanel }])
                },
                [
                  (g(!0), _(
                    z,
                    null,
                    ge(c(ea), (t, l) => (g(), _(
                      z,
                      { key: l },
                      [
                        t.type == "searchInput" ? (g(), P(c(jt), j({
                          key: d.value,
                          clearable: !0,
                          modelValue: t.value,
                          "onUpdate:modelValue": (a) => t.value = a
                        }, { ref_for: !0 }, m(t), {
                          onChange: (a) => {
                            B(t, a);
                          },
                          placeholder: je(t),
                          isExpandAtFocus: n.isExpandAtFocus
                        }), null, 16, ["modelValue", "onUpdate:modelValue", "onChange", "placeholder", "isExpandAtFocus"])) : h("v-if", !0),
                        t.type == "selectSearch" ? (g(), P(c(Pt), j({
                          key: 1,
                          ref_for: !0
                        }, m(t), {
                          optionValue: t.optionValue,
                          "onUpdate:optionValue": (a) => t.optionValue = a,
                          modelValue: t.value,
                          "onUpdate:modelValue": (a) => t.value = a,
                          onSelectChange: (a) => {
                            Z(t, a);
                          },
                          onInputChange: (a) => {
                            B(t, a);
                          },
                          key: d.value,
                          clearable: !0,
                          isSearch: !0,
                          placeholder: je(t),
                          isExpandAtFocus: n.isExpandAtFocus
                        }), null, 16, ["optionValue", "onUpdate:optionValue", "modelValue", "onUpdate:modelValue", "onSelectChange", "onInputChange", "placeholder", "isExpandAtFocus"])) : h("v-if", !0)
                      ],
                      64
                      /* STABLE_FRAGMENT */
                    ))),
                    128
                    /* KEYED_FRAGMENT */
                  ))
                ],
                2
                /* CLASS */
              ),
              n.showFilterPanel ? (g(), _("div", {
                key: 1,
                class: "filter-handle-status",
                onClick: M
              }, [
                N(
                  "span",
                  Mp,
                  ae(c($) ? c(L)("收起过滤") : c(L)("展开过滤")),
                  1
                  /* TEXT */
                ),
                q(c(kt), {
                  icon: "fold",
                  size: "medium",
                  iconColor: "#5582F3",
                  class: G({
                    arrowTransform: c($),
                    arrowTransformReturn: !c($)
                  })
                }, null, 8, ["class"])
              ])) : h("v-if", !0),
              !n.showFilterPanel && n.isMarginRight ? (g(), _("div", Bp)) : h("v-if", !0)
            ],
            2
            /* CLASS */
          )
        ]),
        h(" 展开过滤条件区 "),
        h(` :class="{\r
                'filter-item':\r
                  (item.type == 'dateRange' || item.type == 'dateTimeRange' || item.type == 'weekRange' || item.type == 'monthRange' || item.type == 'yearRange') && layout == 'horizontal',\r
              }" `),
        q(c(Lt), null, {
          default: E(() => [
            Ue((g(), _(
              "div",
              {
                class: G(["filter-content", { "horizontal-filter-content": n.layout == "horizontal" }])
              },
              [
                N("div", zp, [
                  q(c(fa), {
                    labelLength: C.value,
                    labelPosition: n.layout == "horizontal" ? "right" : "left",
                    contentWidth: n.layout == "horizontal" ? "100%" : "",
                    alignType: n.layout,
                    isSearchForm: !0
                  }, {
                    default: E(() => [
                      (g(!0), _(
                        z,
                        null,
                        ge(c(D), (t, l) => (g(), _(
                          z,
                          { key: l },
                          [
                            t.type != "dateRange" && t.type != "dateTimeRange" && t.type != "weekRange" && t.type != "monthRange" && t.type != "yearRange" && t.type != "treeSelect" && !(t != null && t.custom) && t.type != "selectDateRange" && t.type != "inputSelect" ? (g(), P(c(ee), j({
                              key: 0,
                              col: 1,
                              showColon: !0,
                              style: t.marginRight,
                              modelValue: t.value,
                              "onUpdate:modelValue": (a) => t.value = a
                            }, { ref_for: !0 }, m(t), {
                              onChange: (a, i) => {
                                B(t, a, "", i);
                              },
                              onOpenChange: (a) => {
                                ta(t, a);
                              },
                              onCalendarChange: (a) => {
                                ra(t, a);
                              },
                              "disabled-date": t == null ? void 0 : t.disabledDate,
                              key: t.keyCount,
                              "filter-option": (a, i) => ye(a, i, t)
                            }), {
                              default: E(() => [
                                W(n.$slots, t.key, {}, void 0, !0)
                              ]),
                              _: 2
                              /* DYNAMIC */
                            }, 1040, ["style", "modelValue", "onUpdate:modelValue", "onChange", "onOpenChange", "onCalendarChange", "disabled-date", "filter-option"])) : h("v-if", !0),
                            t.type == "treeSelect" ? (g(), P(c(ee), j({
                              showColon: !0,
                              ref_for: !0,
                              ref: (a) => sa(a, t),
                              style: t.marginRight,
                              modelValue: t.value,
                              "onUpdate:modelValue": (a) => t.value = a,
                              key: oa.value,
                              keyword: t.keyword,
                              "onUpdate:keyword": (a) => t.keyword = a
                            }, { ref_for: !0 }, m(t), {
                              onChange: (a, i) => {
                                B(t, a, "", i);
                              },
                              "filter-option": (a, i) => ye(a, i, t),
                              onSelectChange: (a) => {
                                Z(t, a);
                              }
                            }), {
                              default: E(() => [
                                W(n.$slots, t.key, {}, void 0, !0)
                              ]),
                              _: 2
                              /* DYNAMIC */
                            }, 1040, ["style", "modelValue", "onUpdate:modelValue", "keyword", "onUpdate:keyword", "onChange", "filter-option", "onSelectChange"])) : h("v-if", !0),
                            t.type == "dateRange" || t.type == "dateTimeRange" || t.type == "weekRange" || t.type == "monthRange" || t.type == "yearRange" ? (g(), P(c(ee), j({
                              key: 2,
                              showColon: !0,
                              style: t.marginRight,
                              modelValue: t.value,
                              "onUpdate:modelValue": (a) => t.value = a
                            }, { ref_for: !0 }, m(t), {
                              onChange: (a, i) => {
                                B(t, a, "", i);
                              },
                              onOpenChange: (a) => {
                                ta(t, a);
                              },
                              onCalendarChange: (a) => {
                                ra(t, a);
                              },
                              "disabled-date": t == null ? void 0 : t.disabledDate
                            }), {
                              default: E(() => [
                                W(n.$slots, t.key, {}, void 0, !0)
                              ]),
                              _: 2
                              /* DYNAMIC */
                            }, 1040, ["style", "modelValue", "onUpdate:modelValue", "onChange", "onOpenChange", "onCalendarChange", "disabled-date"])) : h("v-if", !0),
                            t != null && t.custom ? (g(), P(c(At), j({
                              key: 3,
                              labelLength: C.value,
                              labelPosition: "left",
                              customerActive: t.customerActive,
                              label: t.label,
                              modelValue: t.customOption.value,
                              "onUpdate:modelValue": (a) => t.customOption.value = a
                            }, { ref_for: !0 }, m(t, "childItem"), {
                              onChange: (a) => {
                                B(t, a, "childItem");
                              }
                            }), {
                              default: E(() => [
                                q(c(ee), j({
                                  class: "child-form-item",
                                  label: "",
                                  modelValue: t.value,
                                  "onUpdate:modelValue": (a) => t.value = a
                                }, { ref_for: !0 }, m(t), {
                                  onChange: (a) => {
                                    B(t, a);
                                  }
                                }), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])
                              ]),
                              _: 2
                              /* DYNAMIC */
                            }, 1040, ["labelLength", "customerActive", "label", "modelValue", "onUpdate:modelValue", "onChange"])) : h("v-if", !0),
                            h(" 带select的日期范围选择 "),
                            t.type == "selectDateRange" ? (g(), P(Ea, j({
                              key: 4,
                              mode: t.mode,
                              label: t.label,
                              labelLength: C.value,
                              labelPosition: "left",
                              class: "filter-item",
                              optionValue: t.optionValue,
                              "onUpdate:optionValue": (a) => t.optionValue = a,
                              modelValue: t.value,
                              "onUpdate:modelValue": (a) => t.value = a
                            }, { ref_for: !0 }, m(t), {
                              onSelectChange: (a) => {
                                Z(t, a);
                              },
                              type: t.dateType,
                              onDateRangeChange: (a) => {
                                aa(t, a);
                              },
                              showFilterPanel: s.showFilterPanel
                            }), null, 16, ["mode", "label", "labelLength", "optionValue", "onUpdate:optionValue", "modelValue", "onUpdate:modelValue", "onSelectChange", "type", "onDateRangeChange", "showFilterPanel"])) : h("v-if", !0),
                            t.type == "inputSelect" ? (g(), P(Yt, j({
                              key: 5,
                              showFilterPanel: s.showFilterPanel,
                              style: `margin-right:${t.marginRight}`,
                              onOpenDialog: (a) => {
                                gt(t, a);
                              },
                              label: t.label,
                              labelLength: C.value,
                              modelValue: t.value,
                              "onUpdate:modelValue": (a) => t.value = a,
                              "selected-options": t.options
                            }, { ref_for: !0 }, m(t), {
                              class: "filter-input-select-item",
                              onOpenDialogChange: (a) => {
                                ht();
                              }
                            }), null, 16, ["showFilterPanel", "style", "onOpenDialog", "label", "labelLength", "modelValue", "onUpdate:modelValue", "selected-options", "onOpenDialogChange"])) : h("v-if", !0)
                          ],
                          64
                          /* STABLE_FRAGMENT */
                        ))),
                        128
                        /* KEYED_FRAGMENT */
                      ))
                    ]),
                    _: 3
                    /* FORWARDED */
                  }, 8, ["labelLength", "labelPosition", "contentWidth", "alignType"]),
                  u[0] || (u[0] = N(
                    "div",
                    { class: "filter-line" },
                    null,
                    -1
                    /* CACHED */
                  ))
                ])
              ],
              2
              /* CLASS */
            )), [
              [c(Dt)],
              [Tt, c($)]
            ])
          ]),
          _: 3
          /* FORWARDED */
        })
      ],
      2
      /* CLASS */
    ));
  }
}), Hp = /* @__PURE__ */ Be(Gp, [["__scopeId", "data-v-609bb1d7"]]), xp = {
  "--demo-alert-bg": {
    light: "#fff",
    dark: "rgba(255,255,255,.2)"
  },
  "--das-ui-search-form-font-color": "#212121",
  "--das-ui-search-form-primary-color": "#5582F3",
  "--das-ui-search-form-tip-color": "#999999",
  "--das-ui-search-form-filter-bgcolor": "#fafafa",
  "--das-ui-search-form-filter-border-color": "#d9d9d9",
  "--das-ui-search-form-filter-font-color": "#666666"
}, Yp = {
  筛选条件: { "zh-CN": "筛选条件", en: "Filter Criteria", _appCode: "framework" },
  收起过滤: { "zh-CN": "收起过滤", en: "Collapse Filter", _appCode: "framework" },
  展开过滤: { "zh-CN": "展开过滤", en: "Expand Filter", _appCode: "framework" },
  全部: { "zh-CN": "全部", en: "All", _appCode: "framework" },
  不限: { "zh-CN": "不限", en: "Unlimited", _appCode: "framework" },
  至: { "zh-CN": "-", en: "-", _appCode: "framework" },
  "das-search-form-search-pre": { "zh-CN": "搜索$0", en: "Search $0", _appCode: "framework" }
};
Ut(xp);
It(Yp);
const fd = () => A(null), yd = Vt(Hp);
export {
  yd as DasSearchForm,
  fd as DasSearchFormRef,
  yd as default
};
