@lazycatcloud/lzc-toolkit 0.0.45 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,106 +1,120 @@
1
- import { unref as S, getCurrentScope as $e, onScopeDispose as Ae, getCurrentInstance as Fe, onMounted as le, nextTick as he, ref as m, watch as $, shallowRef as Le, computed as h, onUnmounted as ge, inject as H, provide as x, defineComponent as N, openBlock as T, createBlock as me, Transition as be, withCtx as ye, createElementBlock as P, createElementVNode as R, withModifiers as De, normalizeClass as Me, renderSlot as ne, createCommentVNode as Ve, render as ke, h as X, normalizeStyle as oe, useSlots as ze, withDirectives as Ke, vShow as je, pushScopeId as Ne, popScopeId as Qe, toRef as We, mergeProps as Ue, normalizeProps as ie, guardReactiveProps as ue, Fragment as qe, renderList as Ye } from "vue";
2
- var ce;
3
- const A = typeof window < "u";
4
- A && ((ce = window?.navigator) == null ? void 0 : ce.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
- function Z(e) {
6
- return typeof e == "function" ? e() : S(e);
1
+ import { unref as I, getCurrentScope as je, onScopeDispose as Qe, getCurrentInstance as Ue, onMounted as ce, nextTick as we, ref as w, watch as te, shallowRef as qe, computed as E, onUnmounted as _e, inject as P, provide as A, defineComponent as le, h as Z, render as xe, openBlock as j, createBlock as Te, Transition as Oe, withCtx as Re, createElementBlock as ee, createElementVNode as Q, withModifiers as We, normalizeClass as Ye, renderSlot as ve, createCommentVNode as Ge, normalizeStyle as de, useSlots as Xe, withDirectives as Je, vShow as Ze, pushScopeId as et, popScopeId as tt, toRef as lt, mergeProps as nt, normalizeProps as he, guardReactiveProps as pe, Fragment as ot, renderList as rt } from "vue";
2
+ var me;
3
+ const De = typeof window < "u";
4
+ De && ((me = window?.navigator) == null ? void 0 : me.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
+ function re(e) {
6
+ return typeof e == "function" ? e() : I(e);
7
7
  }
8
- function Ge(e, t) {
9
- function l(...n) {
10
- e(() => t.apply(this, n), { fn: t, thisArg: this, args: n });
8
+ function Be(e, t) {
9
+ function n(...l) {
10
+ e(() => t.apply(this, l), { fn: t, thisArg: this, args: l });
11
11
  }
12
- return l;
12
+ return n;
13
13
  }
14
- function Je(e, t = {}) {
15
- let l, n;
16
- return (a) => {
17
- const o = Z(e), d = Z(t.maxWait);
18
- if (l && clearTimeout(l), o <= 0 || d !== void 0 && d <= 0)
19
- return n && (clearTimeout(n), n = null), a();
20
- d && !n && (n = setTimeout(() => {
21
- l && clearTimeout(l), n = null, a();
22
- }, d)), l = setTimeout(() => {
23
- n && clearTimeout(n), n = null, a();
24
- }, o);
14
+ function ut(e, t = {}) {
15
+ let n, l;
16
+ return (u) => {
17
+ const r = re(e), c = re(t.maxWait);
18
+ if (n && clearTimeout(n), r <= 0 || c !== void 0 && c <= 0)
19
+ return l && (clearTimeout(l), l = null), u();
20
+ c && !l && (l = setTimeout(() => {
21
+ n && clearTimeout(n), l = null, u();
22
+ }, c)), n = setTimeout(() => {
23
+ l && clearTimeout(l), l = null, u();
24
+ }, r);
25
25
  };
26
26
  }
27
- function Xe(e) {
27
+ function at(e, t = !0, n = !0) {
28
+ let l = 0, o, u = !0;
29
+ const r = () => {
30
+ o && (clearTimeout(o), o = void 0);
31
+ };
32
+ return (g) => {
33
+ const p = re(e), d = Date.now() - l;
34
+ if (r(), p <= 0)
35
+ return l = Date.now(), g();
36
+ d > p && (n || !u) ? (l = Date.now(), g()) : t && (o = setTimeout(() => {
37
+ l = Date.now(), u = !0, r(), g();
38
+ }, p)), !n && !o && (o = setTimeout(() => u = !0, p)), u = !1;
39
+ };
40
+ }
41
+ function st(e) {
28
42
  return e;
29
43
  }
30
- function Ze(e) {
31
- return $e() ? (Ae(e), !0) : !1;
44
+ function it(e) {
45
+ return je() ? (Qe(e), !0) : !1;
46
+ }
47
+ function Ce(e, t = 200, n = {}) {
48
+ return Be(ut(t, n), e);
32
49
  }
33
- function _e(e, t = 200, l = {}) {
34
- return Ge(Je(t, l), e);
50
+ function ge(e, t = 200, n = !1, l = !0) {
51
+ return Be(at(t, n, l), e);
35
52
  }
36
- function et(e, t = !0) {
37
- Fe() ? le(e) : t ? e() : he(e);
53
+ function ct(e, t = !0) {
54
+ Ue() ? ce(e) : t ? e() : we(e);
38
55
  }
39
- function we(e) {
56
+ function Ie(e) {
40
57
  var t;
41
- const l = Z(e);
42
- return (t = l?.$el) != null ? t : l;
58
+ const n = re(e);
59
+ return (t = n?.$el) != null ? t : n;
43
60
  }
44
- const tt = A ? window : void 0;
45
- A && window.document;
46
- A && window.navigator;
47
- A && window.location;
48
- function lt(e, t = !1) {
49
- const l = m(), n = () => l.value = Boolean(e());
50
- return n(), et(n, t), l;
61
+ const vt = De ? window : void 0;
62
+ function dt(e, t = !1) {
63
+ const n = w(), l = () => n.value = Boolean(e());
64
+ return l(), ct(l, t), n;
51
65
  }
52
- const ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, te = "__vueuse_ssr_handlers__";
53
- ee[te] = ee[te] || {};
54
- ee[te];
55
- var de = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, ot = Object.prototype.propertyIsEnumerable, rt = (e, t) => {
56
- var l = {};
57
- for (var n in e)
58
- nt.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
59
- if (e != null && de)
60
- for (var n of de(e))
61
- t.indexOf(n) < 0 && ot.call(e, n) && (l[n] = e[n]);
62
- return l;
66
+ const se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ie = "__vueuse_ssr_handlers__";
67
+ se[ie] = se[ie] || {};
68
+ se[ie];
69
+ var ye = Object.getOwnPropertySymbols, ft = Object.prototype.hasOwnProperty, ht = Object.prototype.propertyIsEnumerable, pt = (e, t) => {
70
+ var n = {};
71
+ for (var l in e)
72
+ ft.call(e, l) && t.indexOf(l) < 0 && (n[l] = e[l]);
73
+ if (e != null && ye)
74
+ for (var l of ye(e))
75
+ t.indexOf(l) < 0 && ht.call(e, l) && (n[l] = e[l]);
76
+ return n;
63
77
  };
64
- function st(e, t, l = {}) {
65
- const n = l, { window: r = tt } = n, a = rt(n, ["window"]);
66
- let o;
67
- const d = lt(() => r && "ResizeObserver" in r), g = () => {
68
- o && (o.disconnect(), o = void 0);
69
- }, f = $(() => we(e), (p) => {
70
- g(), d.value && r && p && (o = new ResizeObserver(t), o.observe(p, a));
71
- }, { immediate: !0, flush: "post" }), v = () => {
72
- g(), f();
78
+ function mt(e, t, n = {}) {
79
+ const l = n, { window: o = vt } = l, u = pt(l, ["window"]);
80
+ let r;
81
+ const c = dt(() => o && "ResizeObserver" in o), g = () => {
82
+ r && (r.disconnect(), r = void 0);
83
+ }, p = te(() => Ie(e), (i) => {
84
+ g(), c.value && o && i && (r = new ResizeObserver(t), r.observe(i, u));
85
+ }, { immediate: !0, flush: "post" }), d = () => {
86
+ g(), p();
73
87
  };
74
- return Ze(v), {
75
- isSupported: d,
76
- stop: v
88
+ return it(d), {
89
+ isSupported: c,
90
+ stop: d
77
91
  };
78
92
  }
79
- function at(e, t = { width: 0, height: 0 }, l = {}) {
80
- const { box: n = "content-box" } = l, r = m(t.width), a = m(t.height);
81
- return st(e, ([o]) => {
82
- const d = n === "border-box" ? o.borderBoxSize : n === "content-box" ? o.contentBoxSize : o.devicePixelContentBoxSize;
83
- d ? (r.value = d.reduce((g, { inlineSize: f }) => g + f, 0), a.value = d.reduce((g, { blockSize: f }) => g + f, 0)) : (r.value = o.contentRect.width, a.value = o.contentRect.height);
84
- }, l), $(() => we(e), (o) => {
85
- r.value = o ? t.width : 0, a.value = o ? t.height : 0;
93
+ function gt(e, t = { width: 0, height: 0 }, n = {}) {
94
+ const { box: l = "content-box" } = n, o = w(t.width), u = w(t.height);
95
+ return mt(e, ([r]) => {
96
+ const c = l === "border-box" ? r.borderBoxSize : l === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
97
+ c ? (o.value = c.reduce((g, { inlineSize: p }) => g + p, 0), u.value = c.reduce((g, { blockSize: p }) => g + p, 0)) : (o.value = r.contentRect.width, u.value = r.contentRect.height);
98
+ }, n), te(() => Ie(e), (r) => {
99
+ o.value = r ? t.width : 0, u.value = r ? t.height : 0;
86
100
  }), {
87
- width: r,
88
- height: a
101
+ width: o,
102
+ height: u
89
103
  };
90
104
  }
91
- var ve;
105
+ var be;
92
106
  (function(e) {
93
107
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
94
- })(ve || (ve = {}));
95
- var it = Object.defineProperty, fe = Object.getOwnPropertySymbols, ut = Object.prototype.hasOwnProperty, ct = Object.prototype.propertyIsEnumerable, pe = (e, t, l) => t in e ? it(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, dt = (e, t) => {
96
- for (var l in t || (t = {}))
97
- ut.call(t, l) && pe(e, l, t[l]);
98
- if (fe)
99
- for (var l of fe(t))
100
- ct.call(t, l) && pe(e, l, t[l]);
108
+ })(be || (be = {}));
109
+ var yt = Object.defineProperty, Se = Object.getOwnPropertySymbols, bt = Object.prototype.hasOwnProperty, St = Object.prototype.propertyIsEnumerable, Ee = (e, t, n) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Et = (e, t) => {
110
+ for (var n in t || (t = {}))
111
+ bt.call(t, n) && Ee(e, n, t[n]);
112
+ if (Se)
113
+ for (var n of Se(t))
114
+ St.call(t, n) && Ee(e, n, t[n]);
101
115
  return e;
102
116
  };
103
- const vt = {
117
+ const wt = {
104
118
  easeInSine: [0.12, 0, 0.39, 0],
105
119
  easeOutSine: [0.61, 1, 0.88, 1],
106
120
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -126,183 +140,415 @@ const vt = {
126
140
  easeOutBack: [0.34, 1.56, 0.64, 1],
127
141
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
128
142
  };
129
- dt({
130
- linear: Xe
131
- }, vt);
132
- function ft(e, t) {
133
- const { scrollEndHook: l, itemHeight: n, overscan: r = 5 } = t, a = m(null), o = at(a), d = m(!0), g = _e(W, 100);
134
- let f;
135
- const v = Le(e), p = m(0), i = m({ start: 0, end: 10 });
136
- let u = 0;
137
- const E = m([]), b = h(() => {
138
- let { sum: s, height: c } = { sum: 0, height: 0 };
139
- return v.value.map((O, w) => (typeof n == "number" ? c = n : c = n(w), s += c, { height: c, sum: s }));
140
- }), Q = h(() => k(i.value.start)), I = h(() => typeof n == "number" ? b.value.length * n : b.value[b.value.length - 1]?.sum || 0), F = h(() => {
141
- let s = E.value.length - r, c = Math.max(s - u, 0);
142
- return E.value.slice(c, s);
143
+ Et({
144
+ linear: st
145
+ }, wt);
146
+ function _t(e, t) {
147
+ const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = t, u = w(null), r = gt(u), c = w(!0), g = Ce(X, 100);
148
+ let p;
149
+ const d = qe(e), i = w(0), a = w({ start: 0, end: 10 });
150
+ let s = 0;
151
+ const b = w([]), _ = E(() => {
152
+ let { sum: f, height: y } = { sum: 0, height: 0 };
153
+ return d.value.map((C, B) => (typeof l == "number" ? y = l : y = l(B), f += y, { height: y, sum: f }));
154
+ }), S = E(() => N(a.value.start)), m = E(() => typeof l == "number" ? _.value.length * l : _.value[_.value.length - 1]?.sum || 0), R = E(() => {
155
+ let f = b.value.length - o, y = Math.max(f - s, 0);
156
+ return b.value.slice(y, f);
143
157
  });
144
- le(() => {
145
- }), ge(() => cancelAnimationFrame(f)), $(
146
- [o.width, o.height, v],
147
- ([s, c]) => {
148
- (s || c) && D();
158
+ ce(() => {
159
+ }), _e(() => cancelAnimationFrame(p)), te(
160
+ [r.width, r.height, d],
161
+ ([f, y]) => {
162
+ (f || y) && U();
149
163
  },
150
164
  { deep: !0 }
151
- ), $(p, () => {
152
- L(), g();
165
+ ), te(i, () => {
166
+ H(), g();
153
167
  });
154
- function L() {
155
- d.value = !1;
168
+ function H() {
169
+ c.value = !1;
156
170
  }
157
- function W() {
158
- d.value = !0, l?.();
159
- }
160
- function D() {
161
- cancelAnimationFrame(f), f = requestAnimationFrame(M);
162
- }
163
- function M() {
164
- if (a.value) {
165
- p.value = a.value.scrollTop, u = B();
166
- let s = V(p.value), c = s + u + r;
167
- s = s - r, s = s < 0 ? 0 : s, c = c > v.value.length ? v.value.length : c, i.value = { start: s, end: c }, E.value = v.value.slice(s, c).map((O, w) => ({
168
- data: O,
169
- index: w + s
171
+ function X() {
172
+ c.value = !0, n?.();
173
+ }
174
+ function U() {
175
+ cancelAnimationFrame(p), p = requestAnimationFrame(k);
176
+ }
177
+ function k() {
178
+ if (u.value) {
179
+ i.value = u.value.scrollTop, s = F();
180
+ let f = $(i.value), y = f + s + o;
181
+ f = f - o, f = f < 0 ? 0 : f, y = y > d.value.length ? d.value.length : y, a.value = { start: f, end: y }, b.value = d.value.slice(f, y).map((C, B) => ({
182
+ data: C,
183
+ index: B + f
170
184
  }));
171
185
  }
172
186
  }
173
- function V(s) {
174
- let c = 0, O = b.value.length - 1, w = -1;
175
- for (; c <= O; ) {
176
- const y = Math.floor((c + O) / 2);
177
- b.value[y].sum >= s ? (w = y, O = y - 1) : c = y + 1;
187
+ function $(f) {
188
+ let y = 0, C = _.value.length - 1, B = -1;
189
+ for (; y <= C; ) {
190
+ const O = Math.floor((y + C) / 2);
191
+ _.value[O].sum >= f ? (B = O, C = O - 1) : y = O + 1;
178
192
  }
179
- return Math.max(0, w);
193
+ return Math.max(0, B);
180
194
  }
181
- function B() {
182
- let s = 0, c = 0, O = U();
183
- for (let w = O; w < b.value.length && (s++, c += b.value[w].height, !(c >= o.height.value)); w++)
195
+ function F() {
196
+ let f = 0, y = 0, C = L();
197
+ for (let B = C; B < _.value.length && (f++, y += _.value[B].height, !(y >= r.height.value)); B++)
184
198
  ;
185
- return s;
199
+ return f;
186
200
  }
187
- function k(s) {
188
- if (typeof n == "number")
189
- return s * n;
190
- let c = b.value[s];
191
- return c ? c.sum - c.height : 0;
201
+ function N(f) {
202
+ if (typeof l == "number")
203
+ return f * l;
204
+ let y = _.value[f];
205
+ return y ? y.sum - y.height : 0;
192
206
  }
193
- function z(s) {
194
- return b.value[s] || { sum: 0, height: 0 };
207
+ function V(f) {
208
+ return _.value[f] || { sum: 0, height: 0 };
195
209
  }
196
- function U() {
197
- let s = i.value.start;
198
- return s >= r && (s += r), s;
210
+ function L() {
211
+ let f = a.value.start;
212
+ return f >= o && (f += o), f;
199
213
  }
200
- function q(s) {
201
- if (a.value) {
202
- const c = z(s);
203
- a.value.scrollTop = c.sum - c.height, M();
214
+ function q(f) {
215
+ if (u.value) {
216
+ const y = V(f);
217
+ u.value.scrollTop = y.sum - y.height, k();
204
218
  }
205
219
  }
206
- const Y = h(() => ({
220
+ const J = E(() => ({
207
221
  style: {
208
222
  width: "100%",
209
- height: `${I.value}px`,
210
- pointerEvents: d.value ? void 0 : "none"
223
+ height: `${m.value}px`,
224
+ pointerEvents: c.value ? void 0 : "none"
211
225
  }
212
- })), K = h(() => ({
226
+ })), K = E(() => ({
213
227
  style: {
214
- transform: `translate3d(0, ${Q.value}px, 0)`,
228
+ transform: `translate3d(0, ${S.value}px, 0)`,
215
229
  "will-change": "transform"
216
230
  }
217
- })), G = {
231
+ })), W = {
218
232
  overflowY: "auto"
219
233
  };
220
234
  return {
221
- list: E,
222
- visiableList: F,
223
- getItemHeightData: z,
224
- getoffsetTopIndex: V,
225
- totalHeight: I,
226
- clientHeight: o.height,
235
+ list: b,
236
+ visiableList: R,
237
+ getItemHeightData: V,
238
+ getoffsetTopIndex: $,
239
+ totalHeight: m,
240
+ clientHeight: r.height,
227
241
  scrollTo: q,
228
- scrollTop: p,
229
- isScrollEnd: d,
242
+ scrollTop: i,
243
+ isScrollEnd: c,
230
244
  containerProps: {
231
- ref: a,
245
+ ref: u,
232
246
  onScroll: () => {
233
- D();
247
+ U();
234
248
  },
235
- style: G
249
+ style: W
236
250
  },
237
- wrapperProps: Y,
251
+ wrapperProps: J,
238
252
  innerProps: K
239
253
  };
240
254
  }
241
- const Se = Symbol(), Oe = Symbol(), xe = Symbol(), Ee = Symbol(), He = Symbol(), Ie = Symbol(), Te = Symbol(), Re = Symbol(), Ce = Symbol();
242
- function Et() {
243
- const { voidFn: e, boolFn: t, boolRef: l, arrayRef: n } = {
244
- voidFn: (u) => {
255
+ const He = Symbol(), Le = Symbol(), Ae = Symbol(), $e = Symbol(), Me = Symbol(), Pe = Symbol(), Fe = Symbol(), ze = Symbol(), ke = Symbol();
256
+ function $t() {
257
+ const { voidFn: e, boolFn: t, boolRef: n, arrayRef: l } = {
258
+ voidFn: (s) => {
245
259
  },
246
- boolFn: (u) => !1,
247
- boolRef: h(() => !1),
248
- arrayRef: h(() => [])
249
- }, r = H(Ee, n), a = H(xe, t), o = H(Re, l), d = H(Oe, e), g = H(Se, e), f = H(He, e), v = H(Ie, e), p = H(Te, e), i = H(Ce, e);
260
+ boolFn: (s) => !1,
261
+ boolRef: E(() => !1),
262
+ arrayRef: E(() => [])
263
+ }, o = P($e, l), u = P(Ae, t), r = P(ze, n), c = P(Le, e), g = P(He, e), p = P(Me, e), d = P(Pe, e), i = P(Fe, e), a = P(ke, e);
250
264
  return {
251
- selected: r,
252
- isSelected: a,
253
- isAllSelected: o,
254
- toggle: d,
265
+ selected: o,
266
+ isSelected: u,
267
+ isAllSelected: r,
268
+ toggle: c,
255
269
  toggleAll: g,
256
- select: f,
257
- selectAll: v,
258
- unselect: p,
259
- unselectAll: i
270
+ select: p,
271
+ selectAll: d,
272
+ unselect: i,
273
+ unselectAll: a
260
274
  };
261
275
  }
262
- function Ht(e, t) {
263
- const l = m({}), n = h(() => e.value.filter((i) => l.value[i[t]])), r = h(() => n.value.length != 0 && Object.keys(l.value).length == e.value.length);
264
- function a() {
265
- e.value.forEach((i) => {
266
- l.value[i[t]] = !0;
276
+ function Mt(e, t) {
277
+ const n = w({}), l = E(() => e.value.filter((a) => n.value[a[t]])), o = E(() => l.value.length != 0 && Object.keys(n.value).length == e.value.length);
278
+ function u() {
279
+ e.value.forEach((a) => {
280
+ n.value[a[t]] = !0;
267
281
  });
268
282
  }
269
- function o() {
270
- l.value = {};
283
+ function r() {
284
+ n.value = {};
271
285
  }
272
- function d(i) {
273
- i.forEach((u) => {
274
- l.value[u[t]] || (l.value[u[t]] = !0);
286
+ function c(a) {
287
+ a.forEach((s) => {
288
+ n.value[s[t]] || (n.value[s[t]] = !0);
275
289
  });
276
290
  }
277
- function g(i) {
278
- i.forEach((u) => {
279
- l.value[u[t]] && delete l.value[u[t]];
291
+ function g(a) {
292
+ a.forEach((s) => {
293
+ n.value[s[t]] && delete n.value[s[t]];
280
294
  });
281
295
  }
282
- function f(i) {
283
- return !!l.value[i[t]];
296
+ function p(a) {
297
+ return !!n.value[a[t]];
284
298
  }
285
- function v(i) {
286
- i.forEach((u) => {
287
- f(u) ? delete l.value[u[t]] : l.value[u[t]] = !0;
299
+ function d(a) {
300
+ a.forEach((s) => {
301
+ p(s) ? delete n.value[s[t]] : n.value[s[t]] = !0;
288
302
  });
289
303
  }
290
- function p() {
291
- r.value ? o() : a();
304
+ function i() {
305
+ o.value ? r() : u();
292
306
  }
293
- return x(Se, p), x(Oe, v), x(xe, f), x(Ee, n), x(He, d), x(Ie, a), x(Te, g), x(Re, r), x(Ce, o), {
294
- selected: n,
295
- select: d,
296
- selectAll: a,
307
+ return A(He, i), A(Le, d), A(Ae, p), A($e, l), A(Me, c), A(Pe, u), A(Fe, g), A(ze, o), A(ke, r), {
308
+ selected: l,
309
+ select: c,
310
+ selectAll: u,
297
311
  unselect: g,
298
- unselectAll: o,
299
- toggle: v,
300
- toggleAll: p,
301
- isSelected: f,
302
- isAllSelected: r
312
+ unselectAll: r,
313
+ toggle: d,
314
+ toggleAll: i,
315
+ isSelected: p,
316
+ isAllSelected: o
317
+ };
318
+ }
319
+ function ae(e) {
320
+ return () => {
321
+ console.debug(`\u9ED8\u8BA4${e}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
322
+ };
323
+ }
324
+ function Ne({
325
+ attribute: e,
326
+ selectWay: t = "colum",
327
+ scrollOptions: n = {},
328
+ getSelectMap: l = () => ({})
329
+ }) {
330
+ const {
331
+ select: o = ae("\u9009\u62E9"),
332
+ unselect: u = ae("\u53D6\u6D88\u9009\u62E9"),
333
+ unselectAll: r = ae("\u53D6\u6D88\u5168\u9009")
334
+ } = l();
335
+ let c = {};
336
+ const g = E(
337
+ () => ge(t === "colum" ? z : ne, 50)
338
+ ), p = /* @__PURE__ */ new Set(), d = w(!0), i = w(), a = w(!1), s = w({ x: 0, y: 0 }), b = w({ x: 0, y: 0, scrollTop: 0 }), _ = new ResizeObserver(
339
+ (v) => S.value = v[0].target.getBoundingClientRect()
340
+ ), S = w({}), m = w({
341
+ top: 0,
342
+ height: 0,
343
+ sync(v = !1) {
344
+ m.value.top = i.value?.scrollTop || 0, v && (m.value.height = i.value?.scrollHeight || 0);
345
+ }
346
+ }), R = E(() => a.value ? {
347
+ left: Math.min(s.value.x, b.value.x) - S.value.left,
348
+ top: Math.min(s.value.y, b.value.y) - S.value.top,
349
+ width: Math.abs(s.value.x - b.value.x),
350
+ height: Math.abs(s.value.y - b.value.y)
351
+ } : { left: 0, top: 0, width: 0, height: 0 }), { margin: H = 50, startSpeed: X = 30, maxSpeed: U = 30 } = n;
352
+ let k;
353
+ const $ = H, F = X, N = U, V = (v) => v ** 1;
354
+ let L = 0;
355
+ function q(v) {
356
+ if (cancelAnimationFrame(k), L = J(v), L = Math.max(
357
+ Math.min(L, N),
358
+ -N
359
+ ), L !== 0) {
360
+ const h = i.value;
361
+ if (!h || !a.value)
362
+ return;
363
+ const D = m.value.height - S.value.height;
364
+ let x = m.value.top + Number(L);
365
+ x = Math.min(Math.max(0, x), D), h.scrollTop = x, W(), k = requestAnimationFrame(() => q(v));
366
+ }
367
+ }
368
+ function J(v) {
369
+ if (i.value) {
370
+ const D = S.value, x = D.bottom - v;
371
+ if (x < $)
372
+ return F * V(1 - x / $);
373
+ const M = v - D.top;
374
+ if (M < $)
375
+ return -F * V(1 - M / $);
376
+ }
377
+ return 0;
378
+ }
379
+ function K(v) {
380
+ const h = { ...R.value, right: 0, bottom: 0 };
381
+ return h.left += S.value.left, h.top += S.value.top - m.value.top, h.right = h.width + h.left, h.bottom = h.height + h.top, h.left < v.right && h.right > v.left && h.top < v.bottom && h.bottom > v.top;
382
+ }
383
+ function W() {
384
+ m.value.sync();
385
+ const { top: v, height: h } = m.value;
386
+ b.value.y = Math.min(
387
+ h + S.value.top,
388
+ b.value.y + v - b.value.scrollTop
389
+ ), b.value.scrollTop = v;
390
+ }
391
+ function f(v, h, D = "dynamic-styles") {
392
+ let x = document.getElementById(D);
393
+ x || (x = document.createElement("style"), x.id = D, document.head.appendChild(x));
394
+ const M = x.sheet.cssRules, G = M.length, Ke = `${v} { ${h} }`;
395
+ for (let ue = 0; ue < G; ue++) {
396
+ const fe = M[ue];
397
+ if (fe.selectorText === v && fe.style.cssText === h)
398
+ return;
399
+ }
400
+ x.sheet.insertRule(Ke, G);
401
+ }
402
+ function y(v, h) {
403
+ d.value = !0, a.value = !0, m.value.height ? m.value.sync() : m.value.sync(!0), s.value.x = v, s.value.y = h + m.value.top, b.value.x = s.value.x, b.value.y = s.value.y, i.value?.classList.add("disable-scroll-behavior"), p.clear();
404
+ }
405
+ function C(v, h, D) {
406
+ !a.value || (d.value && t === "colum" && !T() && (r(), d.value = !1), D?.(), q(h), b.value.x = Math.max(v, S.value.left), b.value.y = Math.min(
407
+ h + m.value.top,
408
+ m.value.height + S.value.top
409
+ ), b.value.scrollTop = m.value.top, g.value());
410
+ }
411
+ function B() {
412
+ a.value = !1, i.value?.classList.remove("disable-scroll-behavior");
413
+ }
414
+ function O() {
415
+ !a.value || (L || W(), g.value());
416
+ }
417
+ function T() {
418
+ if (!a.value)
419
+ return !1;
420
+ const { width: v, height: h } = R.value;
421
+ return !(Math.max(v, h) > 5);
422
+ }
423
+ function Y() {
424
+ T() && r();
425
+ }
426
+ function z() {
427
+ T() || i.value?.querySelectorAll(`[${e}]`).forEach((v) => {
428
+ c[`${e}`] = v.getAttribute(`${e}`), K(v.getBoundingClientRect()) ? o([c]) : u([c]);
429
+ });
430
+ }
431
+ function ne() {
432
+ const v = [];
433
+ let h = null, D = 0;
434
+ i.value?.querySelectorAll(`[${e}]`).forEach((x, M) => {
435
+ const G = x.getAttribute(`${e}`);
436
+ v.push(G), K(x.getBoundingClientRect()) ? (h === null && (h = M), h = Math.min(h, M), D = Math.max(D, M)) : (c[`${e}`] = G, p.has(G) && u([c]));
437
+ });
438
+ for (let x = h; x < D + 1; x++)
439
+ c[`${e}`] = v[x], o([c]), p.add(v[x]);
440
+ }
441
+ function oe(v) {
442
+ return !v?.value || (i.value = v.value, !i?.value) ? !1 : (_.observe(i.value), f(
443
+ ".disable-scroll-behavior",
444
+ "scroll-behavior: unset !important;"
445
+ ), !0);
446
+ }
447
+ return {
448
+ init: oe,
449
+ dragStart: y,
450
+ dragMove: C,
451
+ dragEnd: B,
452
+ onScroll: O,
453
+ isSingleClick: T,
454
+ cancelSelectAllBySingleClick: Y,
455
+ selectFn: g,
456
+ selectRange: R,
457
+ isPressing: a,
458
+ containerEl: i,
459
+ observer: _
303
460
  };
304
461
  }
305
- const pt = Symbol(), ht = /* @__PURE__ */ N({
462
+ function Pt(e) {
463
+ const t = Ne(e), { observer: n, selectRange: l } = t, {
464
+ onScroll: o,
465
+ dragStart: u,
466
+ dragMove: r,
467
+ dragEnd: c,
468
+ cancelSelectAllBySingleClick: g
469
+ } = t, p = E(() => ({
470
+ left: `${l.value.left}px`,
471
+ top: `${l.value.top}px`,
472
+ width: `${l.value.width}px`,
473
+ height: `${l.value.height}px`
474
+ })), d = le({
475
+ render() {
476
+ return Z("div", {
477
+ id: "selectBoxEl",
478
+ class: "absolute z-50 bg-blue-200 opacity-50",
479
+ style: p.value
480
+ });
481
+ }
482
+ });
483
+ function i(S) {
484
+ S.button === 0 && u(S.x, S.y);
485
+ }
486
+ function a(S) {
487
+ r(S.x, S.y);
488
+ }
489
+ function s(S) {
490
+ S.composedPath().some((R) => R?.getAttribute?.(e.attribute)) || g(), c();
491
+ }
492
+ function b(S) {
493
+ try {
494
+ if (!t.init(S))
495
+ throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
496
+ if (!t.containerEl?.value)
497
+ return !1;
498
+ xe(Z(d), t.containerEl.value), t.containerEl.value?.addEventListener("scroll", o), t.containerEl.value?.addEventListener("mousedown", i), window.addEventListener("mousemove", a), window.addEventListener("mouseup", s);
499
+ } catch (m) {
500
+ console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", m);
501
+ }
502
+ }
503
+ function _() {
504
+ n.disconnect(), t.containerEl.value?.removeEventListener("scroll", o), t.containerEl.value?.removeEventListener("mousedown", i), window.removeEventListener("mousemove", a), window.removeEventListener("mouseup", s);
505
+ }
506
+ return { init: b, unMount: _ };
507
+ }
508
+ function Ft(e, t, n = 600) {
509
+ const l = Ne({
510
+ ...e,
511
+ selectWay: "row",
512
+ scrollOptions: {
513
+ startSpeed: 5,
514
+ maxSpeed: 5
515
+ }
516
+ }), { observer: o } = l, { onScroll: u, dragStart: r, dragMove: c, dragEnd: g, selectFn: p } = l;
517
+ let d;
518
+ function i() {
519
+ clearTimeout(d);
520
+ }
521
+ function a(m) {
522
+ i(), d = setTimeout(() => {
523
+ const { clientX: R, clientY: H } = m.targetTouches[0];
524
+ r(R, H), t?.(), p.value(), m.preventDefault();
525
+ }, n);
526
+ }
527
+ function s(m) {
528
+ i();
529
+ const { clientX: R, clientY: H } = m.targetTouches[0];
530
+ c(R, H, () => m.preventDefault());
531
+ }
532
+ function b() {
533
+ i(), g();
534
+ }
535
+ function _(m) {
536
+ try {
537
+ if (!l.init(m))
538
+ throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
539
+ if (!l.containerEl?.value)
540
+ return !1;
541
+ l.containerEl.value?.addEventListener("scroll", u), l.containerEl.value?.addEventListener("touchstart", a), l.containerEl.value?.addEventListener("touchmove", s), window.addEventListener("touchcancel", b), window.addEventListener("touchend", b);
542
+ } catch (R) {
543
+ console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", R);
544
+ }
545
+ }
546
+ function S() {
547
+ o.disconnect(), l.containerEl.value?.removeEventListener("scroll", u), l.containerEl.value?.removeEventListener("touchstart", a), l.containerEl.value?.removeEventListener("touchmove", s), window.removeEventListener("touchcancel", b), window.removeEventListener("touchEnd", b);
548
+ }
549
+ return { init: _, unMount: S };
550
+ }
551
+ const xt = Symbol(), Tt = /* @__PURE__ */ le({
306
552
  __name: "Dialog",
307
553
  props: {
308
554
  visiable: { type: Boolean, default: !1 },
@@ -311,57 +557,57 @@ const pt = Symbol(), ht = /* @__PURE__ */ N({
311
557
  },
312
558
  emits: ["update:visiable"],
313
559
  setup(e, { emit: t }) {
314
- const l = e, n = () => {
315
- l.closeOnClickOverlay && t("update:visiable", !1);
560
+ const n = e, l = () => {
561
+ n.closeOnClickOverlay && t("update:visiable", !1);
316
562
  };
317
- return x(pt, () => t("update:visiable", !1)), (r, a) => (T(), me(be, { name: "modal" }, {
318
- default: ye(() => [
319
- e.visiable ? (T(), P("div", {
563
+ return A(xt, () => t("update:visiable", !1)), (o, u) => (j(), Te(Oe, { name: "modal" }, {
564
+ default: Re(() => [
565
+ e.visiable ? (j(), ee("div", {
320
566
  key: 0,
321
- onClick: n,
567
+ onClick: l,
322
568
  class: "modal absolute left-0 right-0 top-0 bottom-0 flex bg-stone-900 bg-opacity-50 z-[999]"
323
569
  }, [
324
- R("div", {
325
- onClick: a[0] || (a[0] = De(() => {
570
+ Q("div", {
571
+ onClick: u[0] || (u[0] = We(() => {
326
572
  }, ["stop"])),
327
- class: Me(["dialog m-auto flex flex-col", e.dialogClass])
573
+ class: Ye(["dialog m-auto flex flex-col", e.dialogClass])
328
574
  }, [
329
- ne(r.$slots, "default")
575
+ ve(o.$slots, "default")
330
576
  ], 2)
331
- ])) : Ve("", !0)
577
+ ])) : Ge("", !0)
332
578
  ]),
333
579
  _: 3
334
580
  }));
335
581
  }
336
582
  });
337
- function It(e) {
338
- function t(l, n) {
339
- const r = document.createElement("div"), a = {
583
+ function zt(e) {
584
+ function t(n, l) {
585
+ const o = document.createElement("div"), u = {
340
586
  setup() {
341
- return () => X(
342
- ht,
587
+ return () => Z(
588
+ Tt,
343
589
  {
344
590
  visiable: !0,
345
591
  "onUpdate:visiable": () => {
346
- r?.remove();
592
+ o?.remove();
347
593
  },
348
594
  ...e
349
595
  },
350
596
  {
351
- default: () => X(l, n)
597
+ default: () => Z(n, l)
352
598
  }
353
599
  );
354
600
  }
355
601
  };
356
- return document.body.appendChild(r), ke(X(a), r), {
357
- close: () => r?.remove()
602
+ return document.body.appendChild(o), xe(Z(u), o), {
603
+ close: () => o?.remove()
358
604
  };
359
605
  }
360
606
  return {
361
607
  create: t
362
608
  };
363
609
  }
364
- const gt = ["xlink:href", "fill", "color"], Tt = /* @__PURE__ */ N({
610
+ const Ot = ["xlink:href", "fill", "color"], kt = /* @__PURE__ */ le({
365
611
  __name: "SvgIcon",
366
612
  props: {
367
613
  name: null,
@@ -371,132 +617,132 @@ const gt = ["xlink:href", "fill", "color"], Tt = /* @__PURE__ */ N({
371
617
  height: null
372
618
  },
373
619
  setup(e) {
374
- const t = e, l = h(() => `#${t.prefix}-${t.name}`), n = h(() => ({
620
+ const t = e, n = E(() => `#${t.prefix}-${t.name}`), l = E(() => ({
375
621
  width: `${t.width ?? t.height}px`,
376
622
  height: `${t.height ?? t.width}px`,
377
623
  aspectRatio: t.width && t.height ? void 0 : "1/1"
378
624
  }));
379
- return (r, a) => (T(), P("svg", {
625
+ return (o, u) => (j(), ee("svg", {
380
626
  "aria-hidden": "",
381
- style: oe(S(n))
627
+ style: de(I(l))
382
628
  }, [
383
- R("use", {
384
- "xlink:href": S(l),
629
+ Q("use", {
630
+ "xlink:href": I(n),
385
631
  fill: e.color,
386
632
  color: e.color
387
- }, null, 8, gt)
633
+ }, null, 8, Ot)
388
634
  ], 4));
389
635
  }
390
636
  });
391
- function mt(e) {
637
+ function Rt(e) {
392
638
  const {
393
639
  containerEl: t,
394
- sliderEl: l,
395
- autoHeight: n,
396
- performance: r = {},
397
- maxHeightRatio: a = 0.9
398
- } = e, o = m(!0), d = _e(k, 100);
399
- let g, f = "";
400
- const v = m(0), p = m(0), i = m(0), u = m({
640
+ sliderEl: n,
641
+ autoHeight: l,
642
+ performance: o = {},
643
+ maxHeightRatio: u = 0.9
644
+ } = e, r = w(!0), c = Ce(N, 100);
645
+ let g, p = "";
646
+ const d = w(0), i = w(0), a = w(0), s = w({
401
647
  top: 0,
402
648
  scrollTop: 0,
403
649
  scrollHeight: 0,
404
650
  clientHeight: 0
405
- }), E = m({
651
+ }), b = w({
406
652
  clientHeight: 0
407
- }), b = h(() => !!p.value), Q = h(() => u.value.scrollHeight > u.value.clientHeight), I = h(() => u.value.clientHeight - E.value.clientHeight), F = h(() => u.value.scrollHeight - u.value.clientHeight), L = h(() => Math.max(
408
- u.value.clientHeight / u.value.scrollHeight,
653
+ }), _ = E(() => !!i.value), S = E(() => s.value.scrollHeight > s.value.clientHeight), m = E(() => s.value.clientHeight - b.value.clientHeight), R = E(() => s.value.scrollHeight - s.value.clientHeight), H = E(() => Math.max(
654
+ s.value.clientHeight / s.value.scrollHeight,
409
655
  0.05
410
- )), W = h(() => L.value > a ? 0 : L.value * u.value.clientHeight), D = h(() => ({
656
+ )), X = E(() => H.value > u ? 0 : H.value * s.value.clientHeight), U = E(() => ({
411
657
  willChange: "transform",
412
- transform: `translate3d(0,${i.value}px,0)`,
413
- height: n ? `${W.value}px` : void 0
658
+ transform: `translate3d(0,${a.value}px,0)`,
659
+ height: l ? `${X.value}px` : void 0
414
660
  }));
415
- function M(y) {
416
- B(), p.value = y.clientY - l.value.getBoundingClientRect().top || 1, f = getComputedStyle(t.value).scrollBehavior, f === "smooth" && (t.value.style.scrollBehavior = "unset");
661
+ function k(O) {
662
+ F(), i.value = O.clientY - n.value.getBoundingClientRect().top || 1, p = getComputedStyle(t.value).scrollBehavior, p === "smooth" && (t.value.style.scrollBehavior = "unset");
417
663
  }
418
- function V() {
419
- t.value.style.scrollBehavior = f, p.value = 0, d();
664
+ function $() {
665
+ t.value.style.scrollBehavior = p, i.value = 0, c();
420
666
  }
421
- function B() {
422
- o.value = !1;
667
+ function F() {
668
+ r.value = !1;
423
669
  }
424
- function k() {
425
- b.value || (o.value = !0);
670
+ function N() {
671
+ _.value || (r.value = !0);
426
672
  }
427
- function z(y) {
428
- if (!b.value)
673
+ function V(O) {
674
+ if (!_.value)
429
675
  return;
430
- let _ = y.clientY - u.value.top - p.value;
431
- _ < 0 ? i.value = 0 : _ >= I.value ? i.value = I.value : i.value = _, t.value.scrollTo({
432
- top: i.value / I.value * F.value
676
+ let T = O.clientY - s.value.top - i.value;
677
+ T < 0 ? a.value = 0 : T >= m.value ? a.value = m.value : a.value = T, t.value.scrollTo({
678
+ top: a.value / m.value * R.value
433
679
  });
434
680
  }
435
- function U() {
436
- b.value || q();
681
+ function L() {
682
+ _.value || q();
437
683
  }
438
684
  function q() {
439
- cancelAnimationFrame(g), g = requestAnimationFrame(Y);
685
+ cancelAnimationFrame(g), g = requestAnimationFrame(J);
440
686
  }
441
- function Y() {
442
- t.value && (v.value = r.scrollTop?.value ?? t.value.scrollTop, i.value = v.value / F.value * I.value);
687
+ function J() {
688
+ t.value && (d.value = o.scrollTop?.value ?? t.value.scrollTop, a.value = d.value / R.value * m.value);
443
689
  }
444
- function K(y) {
445
- let _ = "addEventListener";
446
- y === "add" ? _ = "addEventListener" : _ = "removeEventListener", l.value?.[_]("pointerdown", M, {
690
+ function K(O) {
691
+ let T = "addEventListener";
692
+ O === "add" ? T = "addEventListener" : T = "removeEventListener", n.value?.[T]("pointerdown", k, {
447
693
  passive: !0
448
- }), window[_]("pointermove", z, { passive: !0 }), window[_]("pointerup", V, { passive: !0 });
694
+ }), window[T]("pointermove", V, { passive: !0 }), window[T]("pointerup", $, { passive: !0 });
449
695
  }
450
- const G = new MutationObserver((y) => {
451
- y.map((j) => j.oldValue).join().includes("height") && s();
696
+ const W = new MutationObserver((O) => {
697
+ O.map((Y) => Y.oldValue).join().includes("height") && f();
452
698
  });
453
- function s() {
454
- u.value.top = t.value?.getBoundingClientRect().top ?? 0, u.value.scrollHeight = t.value?.scrollHeight ?? 0, u.value.clientHeight = t.value?.clientHeight ?? 0;
699
+ function f() {
700
+ s.value.top = t.value?.getBoundingClientRect().top ?? 0, s.value.scrollHeight = t.value?.scrollHeight ?? 0, s.value.clientHeight = t.value?.clientHeight ?? 0;
455
701
  }
456
- function c() {
457
- B(), setTimeout(() => {
458
- E.value.clientHeight = l.value?.clientHeight ?? 0, k();
702
+ function y() {
703
+ F(), setTimeout(() => {
704
+ b.value.clientHeight = n.value?.clientHeight ?? 0, N();
459
705
  }, 150);
460
706
  }
461
- function O(y, _, j = "dynamic-styles") {
462
- let C = document.getElementById(j);
463
- C || (C = document.createElement("style"), C.id = j, document.head.appendChild(C));
464
- const re = C.sheet.cssRules, se = re.length, Pe = `${y} { ${_} }`;
465
- for (let J = 0; J < se; J++) {
466
- const ae = re[J];
467
- if (ae.selectorText === y && ae.style.cssText === _)
707
+ function C(O, T, Y = "dynamic-styles") {
708
+ let z = document.getElementById(Y);
709
+ z || (z = document.createElement("style"), z.id = Y, document.head.appendChild(z));
710
+ const ne = z.sheet.cssRules, oe = ne.length, v = `${O} { ${T} }`;
711
+ for (let h = 0; h < oe; h++) {
712
+ const D = ne[h];
713
+ if (D.selectorText === O && D.style.cssText === T)
468
714
  return;
469
715
  }
470
- C.sheet.insertRule(Pe, se);
716
+ z.sheet.insertRule(v, oe);
471
717
  }
472
- function w() {
473
- t.value && l.value ? (O(
718
+ function B() {
719
+ t.value && n.value ? (C(
474
720
  ".hide-scrollbar",
475
721
  "scrollbar-width: none; -ms-overflow-style: none;"
476
- ), O(".hide-scrollbar::-webkit-scrollbar", "display: none"), t.value.addEventListener("scroll", U, {
722
+ ), C(".hide-scrollbar::-webkit-scrollbar", "display: none"), t.value.addEventListener("scroll", L, {
477
723
  passive: !0
478
- }), K("add"), G.observe(t.value, {
724
+ }), K("add"), W.observe(t.value, {
479
725
  subtree: !0,
480
726
  attributeOldValue: !0,
481
727
  attributeFilter: ["style"]
482
728
  }), setTimeout(() => {
483
- s();
484
- }, 100), c()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: l });
729
+ f();
730
+ }, 100), y()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
485
731
  }
486
- return $(v, () => {
487
- B(), d();
732
+ return te(d, () => {
733
+ F(), c();
488
734
  }), {
489
- isScrollEnd: o,
490
- isDragSlider: b,
491
- offsetTop: i,
492
- scrollTop: v,
493
- scrollable: Q,
494
- sliderPos: D,
495
- init: w,
735
+ isScrollEnd: r,
736
+ isDragSlider: _,
737
+ offsetTop: a,
738
+ scrollTop: d,
739
+ scrollable: S,
740
+ sliderPos: U,
741
+ init: B,
496
742
  modifySliderEventListener: K
497
743
  };
498
744
  }
499
- const bt = (e) => (Ne("data-v-edec7292"), e = e(), Qe(), e), yt = /* @__PURE__ */ bt(() => /* @__PURE__ */ R("div", { class: "default-slider" }, null, -1)), _t = /* @__PURE__ */ N({
745
+ const Dt = (e) => (et("data-v-edec7292"), e = e(), tt(), e), Bt = /* @__PURE__ */ Dt(() => /* @__PURE__ */ Q("div", { class: "default-slider" }, null, -1)), Ct = /* @__PURE__ */ le({
500
746
  __name: "ScrollBar",
501
747
  props: {
502
748
  containerEl: null,
@@ -505,55 +751,55 @@ const bt = (e) => (Ne("data-v-edec7292"), e = e(), Qe(), e), yt = /* @__PURE__ *
505
751
  performance: null
506
752
  },
507
753
  setup(e, { expose: t }) {
508
- const l = e, n = !!ze().default, r = m(null), a = h(() => l.containerEl), o = mt({
509
- containerEl: a,
510
- sliderEl: r,
511
- autoHeight: n ? l.autoHeight : !0,
512
- performance: l.performance
513
- }), { scrollable: d, isScrollEnd: g, sliderPos: f } = o, v = m(!1), p = l.autoHide ? h(() => v.value || !g.value) : h(() => d.value);
514
- le(() => {
515
- he(() => {
516
- o.init();
754
+ const n = e, l = !!Xe().default, o = w(null), u = E(() => n.containerEl), r = Rt({
755
+ containerEl: u,
756
+ sliderEl: o,
757
+ autoHeight: l ? n.autoHeight : !0,
758
+ performance: n.performance
759
+ }), { scrollable: c, isScrollEnd: g, sliderPos: p } = r, d = w(!1), i = n.autoHide ? E(() => d.value || !g.value) : E(() => c.value);
760
+ ce(() => {
761
+ we(() => {
762
+ r.init();
517
763
  });
518
- }), ge(() => {
519
- o.modifySliderEventListener("remove");
764
+ }), _e(() => {
765
+ r.modifySliderEventListener("remove");
520
766
  });
521
- function i() {
522
- v.value = !0;
767
+ function a() {
768
+ d.value = !0;
523
769
  }
524
- function u() {
525
- v.value = !1;
770
+ function s() {
771
+ d.value = !1;
526
772
  }
527
- return t({ uScrollBarReturn: o }), (E, b) => (T(), me(be, null, {
528
- default: ye(() => [
529
- Ke(R("div", {
773
+ return t({ uScrollBarReturn: r }), (b, _) => (j(), Te(Oe, null, {
774
+ default: Re(() => [
775
+ Je(Q("div", {
530
776
  ref_key: "sliderRef",
531
- ref: r,
777
+ ref: o,
532
778
  class: "slider-wrapper",
533
- onMouseenter: i,
534
- onMouseleave: u,
535
- style: oe(S(f))
779
+ onMouseenter: a,
780
+ onMouseleave: s,
781
+ style: de(I(p))
536
782
  }, [
537
- ne(E.$slots, "default", {}, () => [
538
- yt
783
+ ve(b.$slots, "default", {}, () => [
784
+ Bt
539
785
  ], !0)
540
786
  ], 36), [
541
- [je, S(p)]
787
+ [Ze, I(i)]
542
788
  ])
543
789
  ]),
544
790
  _: 3
545
791
  }));
546
792
  }
547
793
  });
548
- const Be = (e, t) => {
549
- const l = e.__vccOpts || e;
550
- for (const [n, r] of t)
551
- l[n] = r;
552
- return l;
553
- }, Rt = /* @__PURE__ */ Be(_t, [["__scopeId", "data-v-edec7292"]]), wt = { class: "virtualListWrapper" }, St = {
794
+ const Ve = (e, t) => {
795
+ const n = e.__vccOpts || e;
796
+ for (const [l, o] of t)
797
+ n[l] = o;
798
+ return n;
799
+ }, Nt = /* @__PURE__ */ Ve(Ct, [["__scopeId", "data-v-edec7292"]]), It = { class: "virtualListWrapper" }, Ht = {
554
800
  inheritAttrs: !1
555
- }, Ot = /* @__PURE__ */ N({
556
- ...St,
801
+ }, Lt = /* @__PURE__ */ le({
802
+ ...Ht,
557
803
  __name: "VirtualList",
558
804
  props: {
559
805
  data: null,
@@ -561,34 +807,34 @@ const Be = (e, t) => {
561
807
  overscan: { default: 10 }
562
808
  },
563
809
  emits: ["scrollEnd"],
564
- setup(e, { expose: t, emit: l }) {
565
- const n = e, r = ft(We(n, "data"), {
566
- itemHeight: (v) => n.itemHeight(n.data[v]),
567
- overscan: n.overscan,
810
+ setup(e, { expose: t, emit: n }) {
811
+ const l = e, o = _t(lt(l, "data"), {
812
+ itemHeight: (d) => l.itemHeight(l.data[d]),
813
+ overscan: l.overscan,
568
814
  scrollEndHook: () => {
569
- l("scrollEnd");
815
+ n("scrollEnd");
570
816
  }
571
- }), { list: a, containerProps: o, wrapperProps: d, innerProps: g, getItemHeightData: f } = r;
817
+ }), { list: u, containerProps: r, wrapperProps: c, innerProps: g, getItemHeightData: p } = o;
572
818
  return t({
573
- vListReturn: r
574
- }), (v, p) => (T(), P("div", wt, [
575
- R("div", Ue({
576
- onScrollPassive: p[0] || (p[0] = (...i) => S(o).onScroll && S(o).onScroll(...i)),
577
- ref: S(o).ref,
819
+ vListReturn: o
820
+ }), (d, i) => (j(), ee("div", It, [
821
+ Q("div", nt({
822
+ onScrollPassive: i[0] || (i[0] = (...a) => I(r).onScroll && I(r).onScroll(...a)),
823
+ ref: I(r).ref,
578
824
  class: "virtualList"
579
- }, v.$attrs), [
580
- R("div", ie(ue(S(d))), [
581
- R("div", ie(ue(S(g))), [
582
- (T(!0), P(qe, null, Ye(S(a), ({ index: i, data: u }) => (T(), P("div", {
583
- key: i,
584
- style: oe({
585
- height: `${S(f)(i).height}px`,
825
+ }, d.$attrs), [
826
+ Q("div", he(pe(I(c))), [
827
+ Q("div", he(pe(I(g))), [
828
+ (j(!0), ee(ot, null, rt(I(u), ({ index: a, data: s }) => (j(), ee("div", {
829
+ key: a,
830
+ style: de({
831
+ height: `${I(p)(a).height}px`,
586
832
  display: "flex"
587
833
  })
588
834
  }, [
589
- ne(v.$slots, "default", {
590
- data: u,
591
- index: i
835
+ ve(d.$slots, "default", {
836
+ data: s,
837
+ index: a
592
838
  }, void 0, !0)
593
839
  ], 4))), 128))
594
840
  ], 16)
@@ -597,23 +843,26 @@ const Be = (e, t) => {
597
843
  ]));
598
844
  }
599
845
  });
600
- const Ct = /* @__PURE__ */ Be(Ot, [["__scopeId", "data-v-4ba97cce"]]);
846
+ const Vt = /* @__PURE__ */ Ve(Lt, [["__scopeId", "data-v-4ba97cce"]]);
601
847
  export {
602
- Rt as ScrollBar,
603
- Tt as SvgIcon,
604
- Ct as VirtualList,
605
- Ee as allSelectedKey,
606
- pt as closeDialogKey,
607
- It as dialogController,
608
- Re as isAllSelectedKey,
609
- xe as isSelectedKey,
610
- Ie as selectAllKey,
611
- He as selectKey,
612
- Se as toggleAllKey,
613
- Oe as toggleKey,
614
- Ce as unselectAllKey,
615
- Te as unselectKey,
616
- Ht as useSelectable,
617
- Et as useSelectableInjectors,
618
- ft as useVirtualList
848
+ Nt as ScrollBar,
849
+ kt as SvgIcon,
850
+ Vt as VirtualList,
851
+ $e as allSelectedKey,
852
+ xt as closeDialogKey,
853
+ zt as dialogController,
854
+ ze as isAllSelectedKey,
855
+ Ae as isSelectedKey,
856
+ Pe as selectAllKey,
857
+ Me as selectKey,
858
+ He as toggleAllKey,
859
+ Le as toggleKey,
860
+ ke as unselectAllKey,
861
+ Fe as unselectKey,
862
+ Ne as useDragSelect,
863
+ Ft as useDragSelectByMobile,
864
+ Pt as useDragSelectByPc,
865
+ Mt as useSelectable,
866
+ $t as useSelectableInjectors,
867
+ _t as useVirtualList
619
868
  };