vue-virtual-flow 0.0.5 → 0.0.7

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.
@@ -1,51 +1,51 @@
1
- import { watch as ee, defineComponent as xe, ref as N, computed as i, nextTick as O, onMounted as Se, onUpdated as Ce, onBeforeUnmount as Ie, openBlock as w, createElementBlock as x, normalizeStyle as C, createElementVNode as De, renderSlot as ne, createTextVNode as Me, createCommentVNode as me, Fragment as we, renderList as ze, unref as r, normalizeClass as He, toDisplayString as Ee } from "vue";
2
- function Ae(a) {
1
+ import { watch as le, defineComponent as $e, ref as P, computed as i, nextTick as O, onMounted as ke, onUpdated as Ae, onBeforeUnmount as Le, openBlock as x, createElementBlock as T, normalizeStyle as C, createElementVNode as De, renderSlot as ie, createTextVNode as Ie, createCommentVNode as xe, Fragment as ze, renderList as Ee, unref as c, normalizeClass as Be, toDisplayString as Oe } from "vue";
2
+ function Ye(a) {
3
3
  return typeof a == "string" || typeof a == "number" || typeof a == "symbol";
4
4
  }
5
- function Ke(a, j) {
6
- const H = a[j];
7
- return Ae(H) ? H : void 0;
5
+ function Pe(a, _) {
6
+ const E = a[_];
7
+ return Ye(E) ? E : void 0;
8
8
  }
9
- function We(a) {
10
- return Ke(a, "id") ?? Ke(a, "key");
9
+ function _e(a) {
10
+ return Pe(a, "id") ?? Pe(a, "key");
11
11
  }
12
- function $e(a) {
13
- function j(e, g) {
12
+ function He(a) {
13
+ function _(e, y) {
14
14
  const f = a.itemKey();
15
15
  if (typeof f == "function")
16
- return f(e, g);
16
+ return f(e, y);
17
17
  if (e !== null && typeof e == "object") {
18
18
  if (f !== void 0) {
19
- const s = Ke(e, f);
20
- if (s !== void 0) return s;
19
+ const r = Pe(e, f);
20
+ if (r !== void 0) return r;
21
21
  }
22
- const T = We(e);
23
- if (T !== void 0) return T;
22
+ const S = _e(e);
23
+ if (S !== void 0) return S;
24
24
  }
25
- return g;
25
+ return y;
26
26
  }
27
- function H() {
27
+ function E() {
28
28
  }
29
- return ee(
29
+ return le(
30
30
  () => [a.itemKey(), a.items()],
31
- H,
31
+ E,
32
32
  { immediate: !0 }
33
- ), { getItemKey: j };
33
+ ), { getItemKey: _ };
34
34
  }
35
35
  function Ve(a) {
36
36
  return a === "fill" ? "100%" : typeof a == "number" ? `${a}px` : a;
37
37
  }
38
- function Re(a) {
39
- return (j, H) => {
40
- typeof H == "string" && (H === "fill" || H.trim().endsWith("%"));
38
+ function Ce(a) {
39
+ return (_, E) => {
40
+ typeof E == "string" && (E === "fill" || E.trim().endsWith("%"));
41
41
  };
42
42
  }
43
- const Fe = ["aria-label"], Ye = {
43
+ const Ge = ["aria-label"], je = {
44
44
  key: 0,
45
45
  class: "vue-chat-virtual-scroll__loading-older",
46
46
  role: "status",
47
47
  "aria-live": "polite"
48
- }, Ne = ["aria-posinset", "aria-setsize"], _e = /* @__PURE__ */ xe({
48
+ }, Ue = ["aria-posinset", "aria-setsize"], Ze = /* @__PURE__ */ $e({
49
49
  name: "ChatVirtualScroll",
50
50
  __name: "ChatVirtualScroll",
51
51
  props: {
@@ -53,6 +53,7 @@ const Fe = ["aria-label"], Ye = {
53
53
  estimatedItemSize: { default: 48 },
54
54
  height: { default: 400 },
55
55
  overscan: { default: 5 },
56
+ size: { default: void 0 },
56
57
  itemKey: { default: void 0 },
57
58
  ariaLabel: { default: "Chat messages" },
58
59
  stickToBottom: { type: Boolean, default: !0 },
@@ -63,301 +64,343 @@ const Fe = ["aria-label"], Ye = {
63
64
  loadOlderThreshold: { default: 120 }
64
65
  },
65
66
  emits: ["scroll", "loadOlder", "bottomChange"],
66
- setup(a, { expose: j, emit: H }) {
67
- const e = a, g = H, f = N(), T = N(0), s = N(0), V = N(0), _ = N(!0), F = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map();
68
- let q, y, k = -1, I = !1;
69
- const z = Re(), { getItemKey: A } = $e({
67
+ setup(a, { expose: _, emit: E }) {
68
+ const e = a, y = E, f = P(), S = P(0), r = P(0), H = P(0), U = P(0), F = P(!0), W = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map();
69
+ let L, p, I = -1, w = !1, A = !1, V = !1, N, K = 0, ee = !1, $ = 0;
70
+ const X = Ce(), { getItemKey: B } = He({
70
71
  componentName: "ChatVirtualScroll",
71
72
  items: () => e.items,
72
73
  itemKey: () => e.itemKey
73
- }), W = i(
74
+ }), q = i(
74
75
  () => Math.max(1, e.estimatedItemSize)
75
- ), Z = i(() => Math.max(0, Math.floor(e.overscan))), te = i(() => s.value > 0 ? s.value : typeof e.height == "number" ? Math.max(0, e.height) : W.value), Y = i(() => {
76
- V.value;
77
- const l = new Array(e.items.length + 1), u = new Array(e.items.length);
78
- l[0] = 0;
79
- for (let c = 0; c < e.items.length; c += 1) {
80
- const E = A(e.items[c], c), P = F.get(E) ?? W.value;
81
- u[c] = P, l[c + 1] = l[c] + P;
76
+ ), ae = i(() => Math.max(0, Math.floor(e.overscan))), he = i(
77
+ () => e.size !== void 0 && Number.isFinite(e.size) && e.size > 0 ? Math.max(1, Math.floor(e.size)) : void 0
78
+ ), oe = i(() => H.value > 0 ? H.value : typeof e.height == "number" ? Math.max(0, e.height) : q.value), v = i(() => {
79
+ U.value;
80
+ const t = new Array(e.items.length + 1), n = new Array(e.items.length);
81
+ t[0] = 0;
82
+ for (let u = 0; u < e.items.length; u += 1) {
83
+ const g = B(e.items[u], u), R = W.get(g) ?? q.value;
84
+ n[u] = R, t[u + 1] = t[u] + R;
82
85
  }
83
86
  return {
84
- offsets: l,
85
- sizes: u,
86
- total: l[e.items.length] ?? 0
87
+ offsets: t,
88
+ sizes: n,
89
+ total: t[e.items.length] ?? 0
87
90
  };
88
- }), L = i(() => {
89
- const l = /* @__PURE__ */ new Map();
90
- return e.items.forEach((u, c) => {
91
- l.set(A(u, c), c);
92
- }), l;
91
+ }), M = i(() => {
92
+ const t = /* @__PURE__ */ new Map();
93
+ return e.items.forEach((n, u) => {
94
+ t.set(B(n, u), u);
95
+ }), t;
93
96
  });
94
- function J(l) {
97
+ function D(t) {
95
98
  if (e.items.length === 0) return 0;
96
- const u = Y.value.offsets;
97
- let c = 0, E = e.items.length;
98
- for (; c < E; ) {
99
- const P = Math.floor((c + E) / 2);
100
- u[P + 1] <= l ? c = P + 1 : E = P;
99
+ const n = v.value.offsets;
100
+ let u = 0, g = e.items.length;
101
+ for (; u < g; ) {
102
+ const R = Math.floor((u + g) / 2);
103
+ n[R + 1] <= t ? u = R + 1 : g = R;
101
104
  }
102
- return Math.min(c, e.items.length - 1);
105
+ return Math.min(u, e.items.length - 1);
103
106
  }
104
- const K = i(
105
- () => Math.max(
106
- 0,
107
- J(T.value) - Z.value
108
- )
109
- ), Q = i(() => {
110
- if (e.items.length === 0) return 0;
111
- const l = J(T.value + te.value) + 1;
112
- return Math.min(
107
+ const ve = i(() => {
108
+ if (e.items.length === 0) return { start: 0, end: 0 };
109
+ const t = D(S.value), n = D(S.value + oe.value) + 1, u = Math.max(0, t - ae.value), g = Math.min(
113
110
  e.items.length,
114
- l + Z.value
115
- );
116
- }), le = i(
117
- () => e.items.slice(K.value, Q.value).map((l, u) => {
118
- const c = K.value + u;
111
+ n + ae.value
112
+ ), R = he.value;
113
+ if (R === void 0 || g - u <= R) return { start: u, end: g };
114
+ const Q = Math.max(0, R - (n - t)), re = t - u, ce = g - n;
115
+ let de = Math.min(re, Math.ceil(Q / 2));
116
+ const Se = Math.min(ce, Q - de);
117
+ return de = Math.min(re, Q - Se), { start: t - de, end: n + Se };
118
+ }), te = i(() => ve.value.start), ye = i(() => ve.value.end), ne = i(
119
+ () => e.items.slice(te.value, ye.value).map((t, n) => {
120
+ const u = te.value + n;
119
121
  return {
120
- item: l,
121
- index: c,
122
- key: A(l, c),
123
- top: Y.value.offsets[c]
122
+ item: t,
123
+ index: u,
124
+ key: B(t, u),
125
+ top: v.value.offsets[u] - r.value
124
126
  };
125
127
  })
126
- ), ue = i(() => ({
128
+ ), fe = i(() => ({
127
129
  height: Ve(e.height)
128
130
  }));
129
- function U() {
130
- const l = f.value;
131
- if (!l) return;
132
- const c = Math.max(
131
+ function J() {
132
+ var t;
133
+ return (((t = f.value) == null ? void 0 : t.scrollTop) ?? 0) + K;
134
+ }
135
+ function me() {
136
+ ee || (ee = !0, O(() => {
137
+ ee = !1;
138
+ const t = f.value;
139
+ !t || V || K === 0 || (K = 0, t.scrollTop = S.value, S.value = t.scrollTop, ue(), s());
140
+ }));
141
+ }
142
+ function m(t) {
143
+ !f.value || t === 0 || (K += t, S.value = J(), V ? r.value = K : me());
144
+ }
145
+ function b() {
146
+ clearTimeout(N), N = void 0;
147
+ }
148
+ function z() {
149
+ A || (b(), V = !1, S.value = J(), r.value = 0, me());
150
+ }
151
+ function G() {
152
+ b(), V && !A && (N = setTimeout(z, 150));
153
+ }
154
+ function Me() {
155
+ b(), A = !0, V = !0, r.value = K;
156
+ }
157
+ function se(t) {
158
+ A = t.touches.length > 0, G();
159
+ }
160
+ function ue() {
161
+ const t = f.value;
162
+ if (!t) return;
163
+ const u = Math.max(
133
164
  0,
134
- Y.value.total - l.scrollTop - l.clientHeight
165
+ v.value.total - J() - t.clientHeight
135
166
  ) <= Math.max(0, e.bottomThreshold);
136
- c !== _.value && (_.value = c, I && g("bottomChange", c));
167
+ u !== F.value && (F.value = u, w && y("bottomChange", u));
137
168
  }
138
- function m() {
139
- var l;
140
- s.value = ((l = f.value) == null ? void 0 : l.clientHeight) ?? 0, z(f.value, e.height), O(() => {
141
- U(), D();
169
+ function Y() {
170
+ var t;
171
+ H.value = ((t = f.value) == null ? void 0 : t.clientHeight) ?? 0, X(f.value, e.height), O(() => {
172
+ ue(), s();
142
173
  });
143
174
  }
144
- function p(l) {
145
- T.value = l.currentTarget.scrollTop, U(), g("scroll", {
146
- scrollTop: T.value,
147
- startIndex: K.value,
148
- endIndex: Q.value
149
- }), D();
150
- }
151
- function D() {
152
- const l = f.value;
153
- !I || !l || !e.hasOlder || e.loadingOlder || k === e.items.length || l.scrollTop <= Math.max(0, e.loadOlderThreshold) && (k = e.items.length, g("loadOlder"));
154
- }
155
- function se(l) {
156
- const u = l.borderBoxSize;
157
- if (u) {
158
- const c = Array.isArray(u) ? u[0] : u;
159
- if (c != null && c.blockSize) return c.blockSize;
175
+ function j() {
176
+ var t;
177
+ K < 0 && J() < 0 && (K = -Math.max(0, ((t = f.value) == null ? void 0 : t.scrollTop) ?? 0), V && (r.value = K)), S.value = J(), G(), ue(), y("scroll", {
178
+ scrollTop: S.value,
179
+ startIndex: te.value,
180
+ endIndex: ye.value
181
+ }), s();
182
+ }
183
+ function s() {
184
+ const t = f.value;
185
+ !w || !t || !e.hasOlder || e.loadingOlder || I === e.items.length || J() <= Math.max(0, e.loadOlderThreshold) && (I = e.items.length, y("loadOlder"));
186
+ }
187
+ function l(t) {
188
+ const n = t.borderBoxSize;
189
+ if (n) {
190
+ const u = Array.isArray(n) ? n[0] : n;
191
+ if (u != null && u.blockSize) return u.blockSize;
160
192
  }
161
- return l.contentRect.height;
162
- }
163
- function ae(l) {
164
- const u = Y.value, c = _.value && e.stickToBottom;
165
- let E = 0, P = !1;
166
- for (const S of l) {
167
- const R = S.target, n = G.get(R), t = se(S);
168
- if (n === void 0 || t <= 0) continue;
169
- const o = F.get(n) ?? W.value;
170
- if (Math.abs(o - t) < 0.5) continue;
171
- const v = L.value.get(n);
172
- v !== void 0 && u.offsets[v + 1] <= T.value && (E += t - o), F.set(n, t), P = !0;
193
+ return t.contentRect.height;
194
+ }
195
+ function o(t) {
196
+ const n = v.value, u = J(), g = !V && F.value && e.stickToBottom;
197
+ let R = 0, Q = !1;
198
+ for (const ce of t) {
199
+ const de = ce.target, Se = Z.get(de), Re = l(ce);
200
+ if (Se === void 0 || Re <= 0) continue;
201
+ const Fe = W.get(Se) ?? q.value;
202
+ if (Math.abs(Fe - Re) < 0.5) continue;
203
+ const We = M.value.get(Se);
204
+ We !== void 0 && n.offsets[We + 1] <= u && (R += Re - Fe), W.set(Se, Re), Q = !0;
173
205
  }
174
- P && (V.value += 1, O(() => {
175
- const S = f.value;
176
- S && (c ? h("auto") : E !== 0 && (S.scrollTop += E, T.value = S.scrollTop, U()));
177
- }));
206
+ if (!Q) return;
207
+ U.value += 1;
208
+ const re = f.value;
209
+ re && (m(g ? Math.max(0, v.value.total - re.clientHeight) - u : R), O(ue));
210
+ }
211
+ function h(t, n) {
212
+ t instanceof HTMLElement && Z.get(t) !== n && (Z.set(t, n), p == null || p.observe(t));
213
+ }
214
+ function k() {
215
+ for (const [t] of Z)
216
+ t.isConnected || (p == null || p.unobserve(t), Z.delete(t));
217
+ }
218
+ function ge(t, n, u = !1) {
219
+ const g = f.value;
220
+ if (!g) return;
221
+ const R = J(), Q = r.value !== 0, re = ++$, ce = n.behavior ?? "auto";
222
+ K = 0, r.value = 0, V = !1, b(), ce === "auto" && (S.value = t);
223
+ const de = () => {
224
+ f.value !== g || re !== $ || (Q && ce !== "auto" && (g.scrollTop = R), u && ce === "auto" ? g.scrollTop = t : g.scrollTo({ ...n, top: t, behavior: ce }), O(ue));
225
+ };
226
+ Q ? O(de) : de();
178
227
  }
179
- function fe(l, u) {
180
- l instanceof HTMLElement && (G.set(l, u), y == null || y.observe(l));
228
+ function pe(t, n = {}) {
229
+ const u = f.value;
230
+ if (!u) return;
231
+ const g = Math.max(0, v.value.total - u.clientHeight), R = Math.min(
232
+ Math.max(0, Number.isFinite(t) ? t : 0),
233
+ g
234
+ );
235
+ ge(R, n);
181
236
  }
182
- function oe() {
183
- for (const [l] of G)
184
- l.isConnected || (y == null || y.unobserve(l), G.delete(l));
185
- }
186
- function ie(l, u = {}) {
187
- const c = f.value;
188
- if (!c) return;
189
- const E = Math.max(0, Y.value.total - c.clientHeight), P = Math.min(
190
- Math.max(0, Number.isFinite(l) ? l : 0),
191
- E
192
- ), S = u.behavior ?? "auto";
193
- S === "auto" && (T.value = P), c.scrollTo({ ...u, top: P, behavior: S }), O(U);
194
- }
195
- function re(l, u = {}) {
196
- const c = f.value;
197
- if (!c || e.items.length === 0) return;
198
- const E = Math.min(
237
+ function we(t, n = {}) {
238
+ const u = f.value;
239
+ if (!u || e.items.length === 0) return;
240
+ const g = Math.min(
199
241
  e.items.length - 1,
200
- Math.max(0, Math.floor(l))
201
- ), { align: P = "start", ...S } = u, R = Y.value.sizes[E];
202
- let n = Y.value.offsets[E];
203
- P === "center" ? n -= (c.clientHeight - R) / 2 : P === "end" && (n -= c.clientHeight - R);
204
- const t = Math.max(
242
+ Math.max(0, Math.floor(t))
243
+ ), { align: R = "start", ...Q } = n, re = v.value.sizes[g];
244
+ let ce = v.value.offsets[g];
245
+ R === "center" ? ce -= (u.clientHeight - re) / 2 : R === "end" && (ce -= u.clientHeight - re);
246
+ const de = Math.max(
205
247
  0,
206
- Math.min(n, Y.value.total - c.clientHeight)
207
- ), o = S.behavior ?? "auto";
208
- o === "auto" && (T.value = t), c.scrollTo({
209
- ...S,
210
- top: t,
211
- behavior: o
212
- }), O(U);
213
- }
214
- function de(l = "auto") {
215
- const u = f.value;
216
- u && (l === "auto" && (T.value = 0), u.scrollTo({ top: 0, behavior: l }), O(U));
248
+ Math.min(ce, v.value.total - u.clientHeight)
249
+ );
250
+ ge(de, Q);
217
251
  }
218
- function h(l = "auto") {
219
- const u = f.value;
220
- if (!u) return;
221
- const c = Math.max(0, Y.value.total - u.clientHeight);
222
- l === "auto" ? (u.scrollTop = c, T.value = c) : u.scrollTo({ top: c, behavior: l }), O(U);
252
+ function be(t = "auto") {
253
+ ge(0, { behavior: t });
223
254
  }
224
- let $ = e.items.map((l, u) => A(l, u));
225
- return ee(
226
- () => e.items.map((l, u) => A(l, u)),
227
- async (l) => {
228
- const u = $;
229
- $ = l;
230
- const c = f.value, E = (c == null ? void 0 : c.scrollTop) ?? 0, P = _.value && e.stickToBottom, S = u[0], R = S === void 0 ? 0 : l.indexOf(S), n = R > 0 ? l.slice(0, R).reduce(
231
- (o, v) => o + (F.get(v) ?? W.value),
255
+ function Te(t = "auto") {
256
+ const n = f.value;
257
+ if (!n) return;
258
+ const u = Math.max(0, v.value.total - n.clientHeight);
259
+ ge(u, { behavior: t }, !0);
260
+ }
261
+ let d = e.items.map((t, n) => B(t, n));
262
+ return le(
263
+ () => e.items.map((t, n) => B(t, n)),
264
+ async (t) => {
265
+ const n = d;
266
+ d = t;
267
+ const u = f.value, g = !V && F.value && e.stickToBottom, R = n[0], Q = R === void 0 ? 0 : t.indexOf(R), re = Q > 0 ? t.slice(0, Q).reduce(
268
+ (de, Se) => de + (W.get(Se) ?? q.value),
232
269
  0
233
- ) : 0, t = new Set(l);
234
- for (const o of F.keys())
235
- t.has(o) || F.delete(o);
236
- V.value += 1, await O(), c && (n > 0 ? (c.scrollTop = E + n, T.value = c.scrollTop) : l.length > u.length && P && h("auto"), U(), D());
270
+ ) : 0, ce = new Set(t);
271
+ for (const de of W.keys())
272
+ ce.has(de) || W.delete(de);
273
+ U.value += 1, re > 0 ? m(re) : u && t.length > n.length && g ? m(
274
+ Math.max(0, v.value.total - u.clientHeight) - J()
275
+ ) : (t.length === 0 || Q < 0) && (K = 0, r.value = 0), await O(), f.value && (S.value = J(), ue(), s());
237
276
  }
238
- ), ee(
277
+ ), le(
239
278
  () => [e.hasOlder, e.loadingOlder],
240
- async ([l]) => {
241
- l || (k = -1), await O(), D();
279
+ async ([t]) => {
280
+ t || (I = -1), await O(), s();
242
281
  }
243
- ), Se(() => {
244
- if (m(), typeof ResizeObserver < "u") {
245
- q = new ResizeObserver(m), y = new ResizeObserver(ae), f.value && q.observe(f.value);
246
- for (const [l] of G)
247
- y.observe(l);
282
+ ), ke(() => {
283
+ if (Y(), typeof ResizeObserver < "u") {
284
+ L = new ResizeObserver(Y), p = new ResizeObserver(o), f.value && L.observe(f.value);
285
+ for (const [t] of Z)
286
+ p.observe(t);
248
287
  }
249
288
  O(() => {
250
- e.initialScroll === "bottom" && h("auto"), I = !0, U(), D();
289
+ e.initialScroll === "bottom" && Te("auto"), w = !0, ue(), s();
251
290
  });
252
- }), Ce(oe), Ie(() => {
253
- q && (q.disconnect(), q = void 0), y && (y.disconnect(), y = void 0), G.clear();
254
- }), j({
255
- isAtBottom: _,
256
- scrollTo: ie,
257
- scrollToIndex: re,
258
- scrollToTop: de,
259
- scrollToBottom: h
260
- }), (l, u) => (w(), x("div", {
291
+ }), Ae(k), Le(() => {
292
+ w = !1, b(), K = 0, $ += 1, L && (L.disconnect(), L = void 0), p && (p.disconnect(), p = void 0), Z.clear();
293
+ }), _({
294
+ isAtBottom: F,
295
+ scrollTo: pe,
296
+ scrollToIndex: we,
297
+ scrollToTop: be,
298
+ scrollToBottom: Te
299
+ }), (t, n) => (x(), T("div", {
261
300
  ref_key: "viewport",
262
301
  ref: f,
263
302
  class: "vue-chat-virtual-scroll",
264
- style: C(ue.value),
303
+ style: C(fe.value),
265
304
  role: "log",
266
305
  "aria-label": a.ariaLabel,
267
306
  "aria-live": "polite",
268
307
  tabindex: "0",
269
- onScrollPassive: p
308
+ onScrollPassive: j,
309
+ onScrollendPassive: z,
310
+ onTouchstartPassive: Me,
311
+ onTouchendPassive: se,
312
+ onTouchcancelPassive: se
270
313
  }, [
271
- a.loadingOlder ? (w(), x("div", Ye, [
314
+ a.loadingOlder ? (x(), T("div", je, [
272
315
  De("div", null, [
273
- ne(l.$slots, "loadingOlder", {}, () => [
274
- u[0] || (u[0] = Me("Loading older messages…", -1))
316
+ ie(t.$slots, "loadingOlder", {}, () => [
317
+ n[0] || (n[0] = Ie("Loading older messages…", -1))
275
318
  ])
276
319
  ])
277
- ])) : me("", !0),
278
- a.items.length ? (w(), x("div", {
320
+ ])) : xe("", !0),
321
+ a.items.length ? (x(), T("div", {
279
322
  key: 1,
280
323
  class: "vue-chat-virtual-scroll__spacer",
281
- style: C({ height: `${Y.value.total}px` })
324
+ style: C({ height: `${Math.max(0, v.value.total - r.value)}px` })
282
325
  }, [
283
- (w(!0), x(we, null, ze(le.value, ({ item: c, index: E, key: P, top: S }) => (w(), x("div", {
284
- key: P,
326
+ (x(!0), T(ze, null, Ee(ne.value, ({ item: u, index: g, key: R, top: Q }) => (x(), T("div", {
327
+ key: R,
285
328
  ref_for: !0,
286
- ref: (R) => fe(R, P),
329
+ ref: (re) => h(re, R),
287
330
  class: "vue-chat-virtual-scroll__item",
288
- style: C({ transform: `translateY(${S}px)` }),
331
+ style: C({ transform: `translateY(${Q}px)` }),
289
332
  role: "article",
290
- "aria-posinset": E + 1,
333
+ "aria-posinset": g + 1,
291
334
  "aria-setsize": a.items.length
292
335
  }, [
293
- ne(l.$slots, "default", {
294
- item: c,
295
- index: E
336
+ ie(t.$slots, "default", {
337
+ item: u,
338
+ index: g
296
339
  })
297
- ], 12, Ne))), 128))
298
- ], 4)) : ne(l.$slots, "empty", {}, void 0, void 0, 2)
299
- ], 44, Fe));
340
+ ], 12, Ue))), 128))
341
+ ], 4)) : ie(t.$slots, "empty", {}, void 0, void 0, 2)
342
+ ], 44, Ge));
300
343
  }
301
344
  });
302
- function Oe(a) {
303
- const j = N(), H = N(0), e = N(!1), g = N(!1), f = i(() => Math.max(1, a.threshold())), T = i(
304
- () => a.refreshing() || g.value ? f.value : H.value
305
- ), s = i(
306
- () => Math.min(1, H.value / f.value)
307
- ), V = i(() => a.refreshing() || g.value ? "Refreshing…" : s.value >= 1 ? "Release to refresh" : "Pull to refresh");
308
- function _() {
309
- j.value = void 0, e.value = !1, H.value = 0;
345
+ function Ke(a) {
346
+ const _ = P(), E = P(0), e = P(!1), y = P(!1), f = i(() => Math.max(1, a.threshold())), S = i(
347
+ () => a.refreshing() || y.value ? f.value : E.value
348
+ ), r = i(
349
+ () => Math.min(1, E.value / f.value)
350
+ ), H = i(() => a.refreshing() || y.value ? "Refreshing…" : r.value >= 1 ? "Release to refresh" : "Pull to refresh");
351
+ function U() {
352
+ _.value = void 0, e.value = !1, E.value = 0;
310
353
  }
311
- function F(y) {
312
- var z;
313
- const k = y.currentTarget, I = ((z = a.scrollTop) == null ? void 0 : z.call(a)) ?? k.scrollTop;
314
- !a.enabled() || a.refreshing() || I > 0 || y.touches.length !== 1 || (j.value = y.touches[0].clientY, e.value = !0);
354
+ function F(L) {
355
+ var w;
356
+ const p = L.currentTarget, I = ((w = a.scrollTop) == null ? void 0 : w.call(a)) ?? p.scrollTop;
357
+ !a.enabled() || a.refreshing() || I > 0 || L.touches.length !== 1 || (_.value = L.touches[0].clientY, e.value = !0);
315
358
  }
316
- function G(y) {
359
+ function W(L) {
317
360
  var A;
318
- if (j.value === void 0 || !e.value) return;
319
- const k = y.currentTarget;
320
- if ((((A = a.scrollTop) == null ? void 0 : A.call(a)) ?? k.scrollTop) > 0 || y.touches.length !== 1) {
321
- _();
361
+ if (_.value === void 0 || !e.value) return;
362
+ const p = L.currentTarget;
363
+ if ((((A = a.scrollTop) == null ? void 0 : A.call(a)) ?? p.scrollTop) > 0 || L.touches.length !== 1) {
364
+ U();
322
365
  return;
323
366
  }
324
- const z = y.touches[0].clientY - j.value;
325
- if (z <= 0) {
326
- H.value = 0;
367
+ const w = L.touches[0].clientY - _.value;
368
+ if (w <= 0) {
369
+ E.value = 0;
327
370
  return;
328
371
  }
329
- y.preventDefault(), H.value = Math.min(z * 0.5, f.value * 2);
372
+ L.preventDefault(), E.value = Math.min(w * 0.5, f.value * 2);
330
373
  }
331
- function q() {
332
- if (j.value === void 0) return;
333
- const y = H.value >= f.value && a.enabled() && !a.refreshing();
334
- if (j.value = void 0, e.value = !1, !y) {
335
- H.value = 0;
374
+ function Z() {
375
+ if (_.value === void 0) return;
376
+ const L = E.value >= f.value && a.enabled() && !a.refreshing();
377
+ if (_.value = void 0, e.value = !1, !L) {
378
+ E.value = 0;
336
379
  return;
337
380
  }
338
- H.value = f.value, g.value = !0, a.onRefresh(), O(() => {
339
- a.refreshing() || (g.value = !1, H.value = 0);
381
+ E.value = f.value, y.value = !0, a.onRefresh(), O(() => {
382
+ a.refreshing() || (y.value = !1, E.value = 0);
340
383
  });
341
384
  }
342
- return ee(
385
+ return le(
343
386
  () => a.refreshing(),
344
- (y, k) => {
345
- y ? (g.value = !1, H.value = f.value) : k && (g.value = !1, H.value = 0);
387
+ (L, p) => {
388
+ L ? (y.value = !1, E.value = f.value) : p && (y.value = !1, E.value = 0);
346
389
  }
347
390
  ), {
348
391
  pulling: e,
349
- pullDistance: H,
350
- pullOffset: T,
351
- pullProgress: s,
352
- refreshMessage: V,
392
+ pullDistance: E,
393
+ pullOffset: S,
394
+ pullProgress: r,
395
+ refreshMessage: H,
353
396
  refreshThreshold: f,
354
397
  handleTouchStart: F,
355
- handleTouchMove: G,
356
- handleTouchEnd: q,
357
- handleTouchCancel: _
398
+ handleTouchMove: W,
399
+ handleTouchEnd: Z,
400
+ handleTouchCancel: U
358
401
  };
359
402
  }
360
- const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PURE__ */ xe({
403
+ const qe = ["aria-label"], Je = ["aria-posinset", "aria-setsize"], Ne = /* @__PURE__ */ $e({
361
404
  name: "DynamicVirtualScroll",
362
405
  __name: "DynamicVirtualScroll",
363
406
  props: {
@@ -376,294 +419,294 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
376
419
  pullRefreshThreshold: { default: 64 }
377
420
  },
378
421
  emits: ["scroll", "loadMore", "refresh"],
379
- setup(a, { expose: j, emit: H }) {
380
- const e = a, g = H, {
422
+ setup(a, { expose: _, emit: E }) {
423
+ const e = a, y = E, {
381
424
  pulling: f,
382
- pullDistance: T,
383
- pullOffset: s,
384
- pullProgress: V,
385
- refreshMessage: _,
425
+ pullDistance: S,
426
+ pullOffset: r,
427
+ pullProgress: H,
428
+ refreshMessage: U,
386
429
  refreshThreshold: F,
387
- handleTouchStart: G,
388
- handleTouchMove: q,
389
- handleTouchEnd: y,
390
- handleTouchCancel: k
391
- } = Oe({
430
+ handleTouchStart: W,
431
+ handleTouchMove: Z,
432
+ handleTouchEnd: L,
433
+ handleTouchCancel: p
434
+ } = Ke({
392
435
  enabled: () => e.pullToRefresh,
393
436
  refreshing: () => e.refreshing,
394
437
  threshold: () => e.pullRefreshThreshold,
395
- onRefresh: () => g("refresh")
396
- }), I = N(), z = N(0), A = N(0), W = N(0), Z = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map();
397
- let Y, L, J = -1;
398
- const K = Re(), { getItemKey: Q } = $e({
438
+ onRefresh: () => y("refresh")
439
+ }), I = P(), w = P(0), A = P(0), V = P(0), N = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map();
440
+ let ee, $, X = -1;
441
+ const B = Ce(), { getItemKey: q } = He({
399
442
  componentName: "DynamicVirtualScroll",
400
443
  items: () => e.items,
401
444
  itemKey: () => e.itemKey
402
- }), le = i(
445
+ }), ae = i(
403
446
  () => Math.max(1, e.estimatedItemSize)
404
- ), ue = i(
405
- () => Math.max(1, e.loadingItemSize ?? le.value)
406
- ), U = i(() => Math.max(0, Math.floor(e.overscan))), m = i(() => A.value > 0 ? A.value : typeof e.height == "number" ? Math.max(0, e.height) : le.value), p = i(() => {
407
- W.value;
408
- const n = new Array(e.items.length + 1), t = new Array(e.items.length);
409
- n[0] = 0;
447
+ ), he = i(
448
+ () => Math.max(1, e.loadingItemSize ?? ae.value)
449
+ ), oe = i(() => Math.max(0, Math.floor(e.overscan))), v = i(() => A.value > 0 ? A.value : typeof e.height == "number" ? Math.max(0, e.height) : ae.value), M = i(() => {
450
+ V.value;
451
+ const s = new Array(e.items.length + 1), l = new Array(e.items.length);
452
+ s[0] = 0;
410
453
  for (let o = 0; o < e.items.length; o += 1) {
411
- const v = Q(e.items[o], o), B = Z.get(v) ?? le.value;
412
- t[o] = B, n[o + 1] = n[o] + B;
454
+ const h = q(e.items[o], o), k = N.get(h) ?? ae.value;
455
+ l[o] = k, s[o + 1] = s[o] + k;
413
456
  }
414
457
  return {
415
- offsets: n,
416
- sizes: t,
417
- total: n[e.items.length] ?? 0
458
+ offsets: s,
459
+ sizes: l,
460
+ total: s[e.items.length] ?? 0
418
461
  };
419
462
  }), D = i(
420
- () => p.value.total + (e.loading ? ue.value : 0)
421
- ), se = i(() => {
422
- const n = /* @__PURE__ */ new Map();
423
- return e.items.forEach((t, o) => {
424
- n.set(Q(t, o), o);
425
- }), n;
463
+ () => M.value.total + (e.loading ? he.value : 0)
464
+ ), ve = i(() => {
465
+ const s = /* @__PURE__ */ new Map();
466
+ return e.items.forEach((l, o) => {
467
+ s.set(q(l, o), o);
468
+ }), s;
426
469
  });
427
- function ae(n) {
470
+ function te(s) {
428
471
  if (e.items.length === 0) return 0;
429
- const t = p.value.offsets;
430
- let o = 0, v = e.items.length;
431
- for (; o < v; ) {
432
- const B = Math.floor((o + v) / 2);
433
- t[B + 1] <= n ? o = B + 1 : v = B;
472
+ const l = M.value.offsets;
473
+ let o = 0, h = e.items.length;
474
+ for (; o < h; ) {
475
+ const k = Math.floor((o + h) / 2);
476
+ l[k + 1] <= s ? o = k + 1 : h = k;
434
477
  }
435
478
  return Math.min(o, e.items.length - 1);
436
479
  }
437
- const fe = i(
480
+ const ye = i(
438
481
  () => Math.max(
439
482
  0,
440
- ae(z.value) - U.value
483
+ te(w.value) - oe.value
441
484
  )
442
- ), oe = i(() => {
485
+ ), ne = i(() => {
443
486
  if (e.items.length === 0) return 0;
444
- const n = ae(z.value + m.value) + 1;
487
+ const s = te(w.value + v.value) + 1;
445
488
  return Math.min(
446
489
  e.items.length,
447
- n + U.value
490
+ s + oe.value
448
491
  );
449
- }), ie = i(
450
- () => e.items.slice(fe.value, oe.value).map((n, t) => {
451
- const o = fe.value + t;
492
+ }), fe = i(
493
+ () => e.items.slice(ye.value, ne.value).map((s, l) => {
494
+ const o = ye.value + l;
452
495
  return {
453
- item: n,
496
+ item: s,
454
497
  index: o,
455
- key: Q(n, o),
456
- top: p.value.offsets[o]
498
+ key: q(s, o),
499
+ top: M.value.offsets[o]
457
500
  };
458
501
  })
459
- ), re = i(() => ({
502
+ ), J = i(() => ({
460
503
  height: Ve(e.height)
461
504
  }));
462
- function de() {
463
- var n;
464
- A.value = ((n = I.value) == null ? void 0 : n.clientHeight) ?? 0, K(I.value, e.height), O($);
465
- }
466
- function h(n) {
467
- z.value = n.currentTarget.scrollTop, g("scroll", {
468
- scrollTop: z.value,
469
- startIndex: fe.value,
470
- endIndex: oe.value
471
- }), $();
472
- }
473
- function $() {
474
- const n = I.value;
475
- if (!n || !e.hasMore || e.loading || J === e.items.length)
505
+ function me() {
506
+ var s;
507
+ A.value = ((s = I.value) == null ? void 0 : s.clientHeight) ?? 0, B(I.value, e.height), O(b);
508
+ }
509
+ function m(s) {
510
+ w.value = s.currentTarget.scrollTop, y("scroll", {
511
+ scrollTop: w.value,
512
+ startIndex: ye.value,
513
+ endIndex: ne.value
514
+ }), b();
515
+ }
516
+ function b() {
517
+ const s = I.value;
518
+ if (!s || !e.hasMore || e.loading || X === e.items.length)
476
519
  return;
477
- const t = Math.max(0, e.loadMoreThreshold);
478
- D.value - n.scrollTop - n.clientHeight <= t && (J = e.items.length, g("loadMore"));
520
+ const l = Math.max(0, e.loadMoreThreshold);
521
+ D.value - s.scrollTop - s.clientHeight <= l && (X = e.items.length, y("loadMore"));
479
522
  }
480
- function l(n) {
481
- const t = n.borderBoxSize;
482
- if (t) {
483
- const o = Array.isArray(t) ? t[0] : t;
523
+ function z(s) {
524
+ const l = s.borderBoxSize;
525
+ if (l) {
526
+ const o = Array.isArray(l) ? l[0] : l;
484
527
  if (o != null && o.blockSize) return o.blockSize;
485
528
  }
486
- return n.contentRect.height;
487
- }
488
- function u(n) {
489
- const t = p.value;
490
- let o = 0, v = !1;
491
- for (const B of n) {
492
- const he = B.target, ve = te.get(he), ge = l(B);
493
- if (ve === void 0 || ge <= 0) continue;
494
- const Te = Z.get(ve) ?? le.value;
495
- if (Math.abs(Te - ge) < 0.5) continue;
496
- const be = se.value.get(ve);
497
- be !== void 0 && t.offsets[be + 1] <= z.value && (o += ge - Te), Z.set(ve, ge), v = !0;
529
+ return s.contentRect.height;
530
+ }
531
+ function G(s) {
532
+ const l = M.value;
533
+ let o = 0, h = !1;
534
+ for (const k of s) {
535
+ const ge = k.target, pe = K.get(ge), we = z(k);
536
+ if (pe === void 0 || we <= 0) continue;
537
+ const be = N.get(pe) ?? ae.value;
538
+ if (Math.abs(be - we) < 0.5) continue;
539
+ const Te = ve.value.get(pe);
540
+ Te !== void 0 && l.offsets[Te + 1] <= w.value && (o += we - be), N.set(pe, we), h = !0;
498
541
  }
499
- v && (W.value += 1, O($), o !== 0 && O(() => {
500
- const B = I.value;
501
- B && (B.scrollTop += o, z.value = B.scrollTop);
542
+ h && (V.value += 1, O(b), o !== 0 && O(() => {
543
+ const k = I.value;
544
+ k && (k.scrollTop += o, w.value = k.scrollTop);
502
545
  }));
503
546
  }
504
- function c(n, t) {
505
- n instanceof HTMLElement && (te.set(n, t), L == null || L.observe(n));
547
+ function Me(s, l) {
548
+ s instanceof HTMLElement && (K.set(s, l), $ == null || $.observe(s));
506
549
  }
507
- function E() {
508
- for (const [n] of te)
509
- n.isConnected || (L == null || L.unobserve(n), te.delete(n));
550
+ function se() {
551
+ for (const [s] of K)
552
+ s.isConnected || ($ == null || $.unobserve(s), K.delete(s));
510
553
  }
511
- function P(n, t = {}) {
554
+ function ue(s, l = {}) {
512
555
  const o = I.value;
513
556
  if (!o) return;
514
- const v = Math.max(0, D.value - o.clientHeight), B = Math.min(
515
- Math.max(0, Number.isFinite(n) ? n : 0),
516
- v
517
- ), he = t.behavior ?? "auto";
518
- he === "auto" && (z.value = B), o.scrollTo({ ...t, top: B, behavior: he });
557
+ const h = Math.max(0, D.value - o.clientHeight), k = Math.min(
558
+ Math.max(0, Number.isFinite(s) ? s : 0),
559
+ h
560
+ ), ge = l.behavior ?? "auto";
561
+ ge === "auto" && (w.value = k), o.scrollTo({ ...l, top: k, behavior: ge });
519
562
  }
520
- function S(n, t = {}) {
563
+ function Y(s, l = {}) {
521
564
  const o = I.value;
522
565
  if (!o || e.items.length === 0) return;
523
- const v = Math.min(
566
+ const h = Math.min(
524
567
  e.items.length - 1,
525
- Math.max(0, Math.floor(n))
526
- ), { align: B = "start", ...he } = t;
527
- let ve = p.value.offsets[v];
528
- const ge = p.value.sizes[v];
529
- B === "center" ? ve -= (o.clientHeight - ge) / 2 : B === "end" && (ve -= o.clientHeight - ge);
530
- const Te = Math.max(
568
+ Math.max(0, Math.floor(s))
569
+ ), { align: k = "start", ...ge } = l;
570
+ let pe = M.value.offsets[h];
571
+ const we = M.value.sizes[h];
572
+ k === "center" ? pe -= (o.clientHeight - we) / 2 : k === "end" && (pe -= o.clientHeight - we);
573
+ const be = Math.max(
531
574
  0,
532
- Math.min(ve, D.value - o.clientHeight)
533
- ), be = he.behavior ?? "auto";
534
- be === "auto" && (z.value = Te), o.scrollTo({
535
- ...he,
536
- top: Te,
537
- behavior: be
575
+ Math.min(pe, D.value - o.clientHeight)
576
+ ), Te = ge.behavior ?? "auto";
577
+ Te === "auto" && (w.value = be), o.scrollTo({
578
+ ...ge,
579
+ top: be,
580
+ behavior: Te
538
581
  });
539
582
  }
540
- function R(n = "auto") {
541
- var t;
542
- (t = I.value) == null || t.scrollTo({ top: 0, behavior: n });
583
+ function j(s = "auto") {
584
+ var l;
585
+ (l = I.value) == null || l.scrollTo({ top: 0, behavior: s });
543
586
  }
544
- return ee(
587
+ return le(
545
588
  () => e.itemKey,
546
589
  () => {
547
- Z.clear(), W.value += 1;
590
+ N.clear(), V.value += 1;
548
591
  }
549
- ), ee(
592
+ ), le(
550
593
  () => e.items.length,
551
594
  async () => {
552
- const n = new Set(
553
- e.items.map((v, B) => Q(v, B))
595
+ const s = new Set(
596
+ e.items.map((h, k) => q(h, k))
554
597
  );
555
- for (const v of Z.keys())
556
- n.has(v) || Z.delete(v);
557
- W.value += 1, await O();
558
- const t = I.value;
559
- if (!t) return;
560
- const o = Math.max(0, D.value - t.clientHeight);
561
- t.scrollTop > o && (t.scrollTop = o, z.value = o), $();
598
+ for (const h of N.keys())
599
+ s.has(h) || N.delete(h);
600
+ V.value += 1, await O();
601
+ const l = I.value;
602
+ if (!l) return;
603
+ const o = Math.max(0, D.value - l.clientHeight);
604
+ l.scrollTop > o && (l.scrollTop = o, w.value = o), b();
562
605
  }
563
- ), ee(
606
+ ), le(
564
607
  () => [e.hasMore, e.loading],
565
- async ([n]) => {
566
- n || (J = -1), await O(), $();
608
+ async ([s]) => {
609
+ s || (X = -1), await O(), b();
567
610
  }
568
- ), Se(() => {
569
- if (de(), typeof ResizeObserver < "u") {
570
- Y = new ResizeObserver(de), L = new ResizeObserver(u), I.value && Y.observe(I.value);
571
- for (const [n] of te)
572
- L.observe(n);
611
+ ), ke(() => {
612
+ if (me(), typeof ResizeObserver < "u") {
613
+ ee = new ResizeObserver(me), $ = new ResizeObserver(G), I.value && ee.observe(I.value);
614
+ for (const [s] of K)
615
+ $.observe(s);
573
616
  }
574
- O($);
575
- }), Ce(E), Ie(() => {
576
- Y && (Y.disconnect(), Y = void 0), L && (L.disconnect(), L = void 0), te.clear();
577
- }), j({
578
- scrollTo: P,
579
- scrollToIndex: S,
580
- scrollToTop: R
581
- }), (n, t) => (w(), x("div", {
617
+ O(b);
618
+ }), Ae(se), Le(() => {
619
+ ee && (ee.disconnect(), ee = void 0), $ && ($.disconnect(), $ = void 0), K.clear();
620
+ }), _({
621
+ scrollTo: ue,
622
+ scrollToIndex: Y,
623
+ scrollToTop: j
624
+ }), (s, l) => (x(), T("div", {
582
625
  ref_key: "viewport",
583
626
  ref: I,
584
- class: He(["vue-dynamic-virtual-scroll", { "vue-dynamic-virtual-scroll--pulling": r(f) }]),
585
- style: C(re.value),
627
+ class: Be(["vue-dynamic-virtual-scroll", { "vue-dynamic-virtual-scroll--pulling": c(f) }]),
628
+ style: C(J.value),
586
629
  role: "list",
587
630
  "aria-label": a.ariaLabel,
588
631
  tabindex: "0",
589
- onScrollPassive: h,
590
- onTouchstartPassive: t[0] || (t[0] = //@ts-ignore
591
- (...o) => r(G) && r(G)(...o)),
592
- onTouchmove: t[1] || (t[1] = //@ts-ignore
593
- (...o) => r(q) && r(q)(...o)),
594
- onTouchend: t[2] || (t[2] = //@ts-ignore
595
- (...o) => r(y) && r(y)(...o)),
596
- onTouchcancel: t[3] || (t[3] = //@ts-ignore
597
- (...o) => r(k) && r(k)(...o))
632
+ onScrollPassive: m,
633
+ onTouchstartPassive: l[0] || (l[0] = //@ts-ignore
634
+ (...o) => c(W) && c(W)(...o)),
635
+ onTouchmove: l[1] || (l[1] = //@ts-ignore
636
+ (...o) => c(Z) && c(Z)(...o)),
637
+ onTouchend: l[2] || (l[2] = //@ts-ignore
638
+ (...o) => c(L) && c(L)(...o)),
639
+ onTouchcancel: l[3] || (l[3] = //@ts-ignore
640
+ (...o) => c(p) && c(p)(...o))
598
641
  }, [
599
- a.pullToRefresh || a.refreshing ? (w(), x("div", {
642
+ a.pullToRefresh || a.refreshing ? (x(), T("div", {
600
643
  key: 0,
601
644
  class: "vue-dynamic-virtual-scroll__refresh",
602
645
  style: C({
603
- height: `${r(F)}px`,
604
- transform: `translateY(${r(s) - r(F)}px)`
646
+ height: `${c(F)}px`,
647
+ transform: `translateY(${c(r) - c(F)}px)`
605
648
  }),
606
649
  role: "status",
607
650
  "aria-live": "polite"
608
651
  }, [
609
- ne(n.$slots, "refresh", {
610
- pullDistance: r(T),
611
- progress: r(V),
652
+ ie(s.$slots, "refresh", {
653
+ pullDistance: c(S),
654
+ progress: c(H),
612
655
  refreshing: a.refreshing
613
656
  }, () => [
614
- Me(Ee(r(_)), 1)
657
+ Ie(Oe(c(U)), 1)
615
658
  ])
616
- ], 4)) : me("", !0),
617
- a.items.length || a.loading ? (w(), x("div", {
659
+ ], 4)) : xe("", !0),
660
+ a.items.length || a.loading ? (x(), T("div", {
618
661
  key: 1,
619
662
  class: "vue-dynamic-virtual-scroll__spacer",
620
663
  style: C({
621
664
  height: `${D.value}px`,
622
- transform: `translateY(${r(s)}px)`
665
+ transform: `translateY(${c(r)}px)`
623
666
  })
624
667
  }, [
625
- (w(!0), x(we, null, ze(ie.value, ({ item: o, index: v, key: B, top: he }) => (w(), x("div", {
626
- key: B,
668
+ (x(!0), T(ze, null, Ee(fe.value, ({ item: o, index: h, key: k, top: ge }) => (x(), T("div", {
669
+ key: k,
627
670
  ref_for: !0,
628
- ref: (ve) => c(ve, B),
671
+ ref: (pe) => Me(pe, k),
629
672
  class: "vue-dynamic-virtual-scroll__item",
630
- style: C({ transform: `translateY(${he}px)` }),
673
+ style: C({ transform: `translateY(${ge}px)` }),
631
674
  role: "listitem",
632
- "aria-posinset": v + 1,
675
+ "aria-posinset": h + 1,
633
676
  "aria-setsize": a.items.length
634
677
  }, [
635
- ne(n.$slots, "default", {
678
+ ie(s.$slots, "default", {
636
679
  item: o,
637
- index: v
680
+ index: h
638
681
  })
639
- ], 12, Ue))), 128)),
640
- a.loading ? (w(), x("div", {
682
+ ], 12, Je))), 128)),
683
+ a.loading ? (x(), T("div", {
641
684
  key: 0,
642
685
  class: "vue-dynamic-virtual-scroll__loading",
643
686
  style: C({
644
- height: `${ue.value}px`,
645
- transform: `translateY(${p.value.total}px)`
687
+ height: `${he.value}px`,
688
+ transform: `translateY(${M.value.total}px)`
646
689
  }),
647
690
  role: "status",
648
691
  "aria-live": "polite"
649
692
  }, [
650
- ne(n.$slots, "loading", {}, () => [
651
- t[4] || (t[4] = Me("Loading more…", -1))
693
+ ie(s.$slots, "loading", {}, () => [
694
+ l[4] || (l[4] = Ie("Loading more…", -1))
652
695
  ])
653
- ], 4)) : me("", !0)
654
- ], 4)) : (w(), x("div", {
696
+ ], 4)) : xe("", !0)
697
+ ], 4)) : (x(), T("div", {
655
698
  key: 2,
656
699
  class: "vue-dynamic-virtual-scroll__empty",
657
- style: C({ transform: `translateY(${r(s)}px)` })
700
+ style: C({ transform: `translateY(${c(r)}px)` })
658
701
  }, [
659
- ne(n.$slots, "empty")
702
+ ie(s.$slots, "empty")
660
703
  ], 4))
661
- ], 46, Ge));
704
+ ], 46, qe));
662
705
  }
663
- }), je = ["aria-label"], Ze = ["aria-current", "aria-posinset", "aria-setsize"], qe = {
706
+ }), Qe = ["aria-label"], Xe = ["aria-current", "aria-posinset", "aria-setsize"], et = {
664
707
  key: 1,
665
708
  class: "vue-short-media-feed__empty"
666
- }, Je = /* @__PURE__ */ xe({
709
+ }, tt = /* @__PURE__ */ $e({
667
710
  name: "ShortMediaFeed",
668
711
  __name: "ShortMediaFeed",
669
712
  props: {
@@ -678,155 +721,155 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
678
721
  loadMoreThreshold: { default: 2 }
679
722
  },
680
723
  emits: ["update:activeIndex", "change", "reachStart", "reachEnd", "loadMore"],
681
- setup(a, { expose: j, emit: H }) {
682
- const e = a, g = H, f = N(), T = N(0), s = N(Y(e.activeIndex));
683
- let V, _ = -1;
684
- const F = Re(), { getItemKey: G } = $e({
724
+ setup(a, { expose: _, emit: E }) {
725
+ const e = a, y = E, f = P(), S = P(0), r = P(ee(e.activeIndex));
726
+ let H, U = -1;
727
+ const F = Ce(), { getItemKey: W } = He({
685
728
  componentName: "ShortMediaFeed",
686
729
  items: () => e.items,
687
730
  itemKey: () => e.itemKey
688
- }), q = i(
731
+ }), Z = i(
689
732
  () => Math.max(0, Math.floor(e.buffer))
690
- ), y = i(
733
+ ), L = i(
691
734
  () => Math.max(
692
735
  0,
693
736
  Math.floor(
694
737
  Number.isFinite(e.loadMoreThreshold) ? e.loadMoreThreshold : 0
695
738
  )
696
739
  )
697
- ), k = i(() => T.value > 0 ? T.value : typeof e.height == "number" ? Math.max(1, e.height) : 0), I = i(
698
- () => Math.max(0, s.value - q.value)
699
- ), z = i(
740
+ ), p = i(() => S.value > 0 ? S.value : typeof e.height == "number" ? Math.max(1, e.height) : 0), I = i(
741
+ () => Math.max(0, r.value - Z.value)
742
+ ), w = i(
700
743
  () => Math.min(
701
744
  e.items.length,
702
- s.value + q.value + 1
745
+ r.value + Z.value + 1
703
746
  )
704
747
  ), A = i(
705
- () => e.items.slice(I.value, z.value).map((m, p) => ({
706
- item: m,
707
- index: I.value + p
748
+ () => e.items.slice(I.value, w.value).map((v, M) => ({
749
+ item: v,
750
+ index: I.value + M
708
751
  }))
709
- ), W = i(() => I.value * k.value), Z = i(
710
- () => (e.items.length - z.value) * k.value
711
- ), te = i(() => ({
752
+ ), V = i(() => I.value * p.value), N = i(
753
+ () => (e.items.length - w.value) * p.value
754
+ ), K = i(() => ({
712
755
  height: Ve(e.height)
713
756
  }));
714
- function Y(m) {
757
+ function ee(v) {
715
758
  return e.items.length === 0 ? 0 : Math.min(
716
759
  e.items.length - 1,
717
- Math.max(0, Math.floor(Number.isFinite(m) ? m : 0))
760
+ Math.max(0, Math.floor(Number.isFinite(v) ? v : 0))
718
761
  );
719
762
  }
720
- function L() {
721
- if (!e.hasMore || e.loading || _ === e.items.length)
763
+ function $() {
764
+ if (!e.hasMore || e.loading || U === e.items.length)
722
765
  return;
723
- (e.items.length === 0 ? 0 : e.items.length - 1 - s.value) <= y.value && (_ = e.items.length, g("loadMore"));
766
+ (e.items.length === 0 ? 0 : e.items.length - 1 - r.value) <= L.value && (U = e.items.length, y("loadMore"));
724
767
  }
725
- function J(m) {
726
- const p = Y(m);
727
- p === s.value || e.items.length === 0 || (s.value = p, g("update:activeIndex", p), g("change", {
728
- index: p,
729
- item: e.items[p]
730
- }), p === 0 && g("reachStart"), p === e.items.length - 1 && g("reachEnd"), L());
768
+ function X(v) {
769
+ const M = ee(v);
770
+ M === r.value || e.items.length === 0 || (r.value = M, y("update:activeIndex", M), y("change", {
771
+ index: M,
772
+ item: e.items[M]
773
+ }), M === 0 && y("reachStart"), M === e.items.length - 1 && y("reachEnd"), $());
731
774
  }
732
- function K(m, p = {}) {
775
+ function B(v, M = {}) {
733
776
  const D = f.value;
734
- D && (typeof D.scrollTo == "function" ? D.scrollTo({ ...p, top: m }) : D.scrollTop = m);
777
+ D && (typeof D.scrollTo == "function" ? D.scrollTo({ ...M, top: v }) : D.scrollTop = v);
735
778
  }
736
- function Q(m, p = {}) {
779
+ function q(v, M = {}) {
737
780
  if (e.items.length === 0) return;
738
- const D = Y(m);
739
- J(D), K(D * k.value, p);
740
- }
741
- function le(m) {
742
- if (k.value <= 0) return;
743
- const p = m.currentTarget.scrollTop;
744
- J(Math.round(p / k.value));
745
- }
746
- function ue(m) {
747
- let p;
748
- m.key === "ArrowDown" || m.key === "PageDown" ? p = s.value + 1 : m.key === "ArrowUp" || m.key === "PageUp" ? p = s.value - 1 : m.key === "Home" ? p = 0 : m.key === "End" && (p = e.items.length - 1), p !== void 0 && (m.preventDefault(), Q(p, { behavior: "smooth" }));
749
- }
750
- function U() {
751
- var p;
752
- const m = ((p = f.value) == null ? void 0 : p.clientHeight) ?? 0;
753
- F(f.value, e.height), !(m <= 0 || m === T.value) && (T.value = m, O(() => {
754
- K(s.value * m);
781
+ const D = ee(v);
782
+ X(D), B(D * p.value, M);
783
+ }
784
+ function ae(v) {
785
+ if (p.value <= 0) return;
786
+ const M = v.currentTarget.scrollTop;
787
+ X(Math.round(M / p.value));
788
+ }
789
+ function he(v) {
790
+ let M;
791
+ v.key === "ArrowDown" || v.key === "PageDown" ? M = r.value + 1 : v.key === "ArrowUp" || v.key === "PageUp" ? M = r.value - 1 : v.key === "Home" ? M = 0 : v.key === "End" && (M = e.items.length - 1), M !== void 0 && (v.preventDefault(), q(M, { behavior: "smooth" }));
792
+ }
793
+ function oe() {
794
+ var M;
795
+ const v = ((M = f.value) == null ? void 0 : M.clientHeight) ?? 0;
796
+ F(f.value, e.height), !(v <= 0 || v === S.value) && (S.value = v, O(() => {
797
+ B(r.value * v);
755
798
  }));
756
799
  }
757
- return ee(
800
+ return le(
758
801
  () => e.activeIndex,
759
- async (m) => {
760
- const p = Y(m);
761
- p !== s.value && (s.value = p, await O(), K(p * k.value), L());
802
+ async (v) => {
803
+ const M = ee(v);
804
+ M !== r.value && (r.value = M, await O(), B(M * p.value), $());
762
805
  }
763
- ), ee(
806
+ ), le(
764
807
  () => [
765
808
  e.hasMore,
766
809
  e.loading,
767
810
  e.loadMoreThreshold
768
811
  ],
769
- async ([m]) => {
770
- m || (_ = -1), await O(), L();
812
+ async ([v]) => {
813
+ v || (U = -1), await O(), $();
771
814
  }
772
- ), ee(
815
+ ), le(
773
816
  () => e.items.length,
774
817
  async () => {
775
- const m = Y(s.value);
776
- e.items.length === 0 ? s.value !== 0 && (s.value = 0, g("update:activeIndex", 0)) : J(m), await O(), K(m * k.value), L();
818
+ const v = ee(r.value);
819
+ e.items.length === 0 ? r.value !== 0 && (r.value = 0, y("update:activeIndex", 0)) : X(v), await O(), B(v * p.value), $();
777
820
  }
778
- ), Se(async () => {
779
- U(), typeof ResizeObserver < "u" && f.value && (V = new ResizeObserver(U), V.observe(f.value)), await O(), K(s.value * k.value), L();
780
- }), Ie(() => {
781
- V && (V.disconnect(), V = void 0);
782
- }), j({
783
- scrollToIndex: Q
784
- }), (m, p) => (w(), x("div", {
821
+ ), ke(async () => {
822
+ oe(), typeof ResizeObserver < "u" && f.value && (H = new ResizeObserver(oe), H.observe(f.value)), await O(), B(r.value * p.value), $();
823
+ }), Le(() => {
824
+ H && (H.disconnect(), H = void 0);
825
+ }), _({
826
+ scrollToIndex: q
827
+ }), (v, M) => (x(), T("div", {
785
828
  ref_key: "viewport",
786
829
  ref: f,
787
830
  class: "vue-short-media-feed",
788
- style: C(te.value),
831
+ style: C(K.value),
789
832
  role: "list",
790
833
  "aria-orientation": "vertical",
791
834
  "aria-label": a.ariaLabel,
792
835
  tabindex: "0",
793
- onScrollPassive: le,
794
- onKeydown: ue
836
+ onScrollPassive: ae,
837
+ onKeydown: he
795
838
  }, [
796
- a.items.length ? (w(), x(we, { key: 0 }, [
797
- W.value > 0 ? (w(), x("div", {
839
+ a.items.length ? (x(), T(ze, { key: 0 }, [
840
+ V.value > 0 ? (x(), T("div", {
798
841
  key: 0,
799
842
  class: "vue-short-media-feed__spacer",
800
- style: C({ height: `${W.value}px` }),
843
+ style: C({ height: `${V.value}px` }),
801
844
  "aria-hidden": "true"
802
- }, null, 4)) : me("", !0),
803
- (w(!0), x(we, null, ze(A.value, ({ item: D, index: se }) => (w(), x("div", {
804
- key: r(G)(D, se),
845
+ }, null, 4)) : xe("", !0),
846
+ (x(!0), T(ze, null, Ee(A.value, ({ item: D, index: ve }) => (x(), T("div", {
847
+ key: c(W)(D, ve),
805
848
  class: "vue-short-media-feed__item",
806
- style: C({ height: `${k.value}px` }),
849
+ style: C({ height: `${p.value}px` }),
807
850
  role: "listitem",
808
- "aria-current": se === s.value ? "true" : void 0,
809
- "aria-posinset": se + 1,
851
+ "aria-current": ve === r.value ? "true" : void 0,
852
+ "aria-posinset": ve + 1,
810
853
  "aria-setsize": a.items.length
811
854
  }, [
812
- ne(m.$slots, "default", {
855
+ ie(v.$slots, "default", {
813
856
  item: D,
814
- index: se,
815
- active: se === s.value
857
+ index: ve,
858
+ active: ve === r.value
816
859
  })
817
- ], 12, Ze))), 128)),
818
- Z.value > 0 ? (w(), x("div", {
860
+ ], 12, Xe))), 128)),
861
+ N.value > 0 ? (x(), T("div", {
819
862
  key: 1,
820
863
  class: "vue-short-media-feed__spacer",
821
- style: C({ height: `${Z.value}px` }),
864
+ style: C({ height: `${N.value}px` }),
822
865
  "aria-hidden": "true"
823
- }, null, 4)) : me("", !0)
824
- ], 64)) : (w(), x("div", qe, [
825
- ne(m.$slots, "empty")
866
+ }, null, 4)) : xe("", !0)
867
+ ], 64)) : (x(), T("div", et, [
868
+ ie(v.$slots, "empty")
826
869
  ]))
827
- ], 44, je));
870
+ ], 44, Qe));
828
871
  }
829
- }), Qe = ["aria-label"], Xe = /* @__PURE__ */ xe({
872
+ }), lt = ["aria-label"], at = /* @__PURE__ */ $e({
830
873
  __name: "SkeletonLoader",
831
874
  props: {
832
875
  width: { default: "100%" },
@@ -836,37 +879,37 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
836
879
  ariaLabel: { default: "Loading…" }
837
880
  },
838
881
  setup(a) {
839
- const j = a;
840
- function H(g) {
841
- return typeof g == "number" ? `${Math.max(0, g)}px` : g;
882
+ const _ = a;
883
+ function E(y) {
884
+ return typeof y == "number" ? `${Math.max(0, y)}px` : y;
842
885
  }
843
886
  const e = i(() => ({
844
- width: H(j.width),
845
- height: H(j.height)
887
+ width: E(_.width),
888
+ height: E(_.height)
846
889
  }));
847
- return (g, f) => (w(), x("div", {
848
- class: He(["vue-skeleton-loader", [
890
+ return (y, f) => (x(), T("div", {
891
+ class: Be(["vue-skeleton-loader", [
849
892
  `vue-skeleton-loader--${a.variant}`,
850
893
  { "vue-skeleton-loader--animated": a.animated }
851
894
  ]]),
852
895
  style: C(e.value),
853
896
  role: "status",
854
897
  "aria-label": a.ariaLabel
855
- }, null, 14, Qe));
898
+ }, null, 14, lt));
856
899
  }
857
- }), et = (a, j) => {
858
- const H = a.__vccOpts || a;
859
- for (const [e, g] of j)
860
- H[e] = g;
861
- return H;
862
- }, tt = /* @__PURE__ */ et(Xe, [["__scopeId", "data-v-fc92f61f"]]), lt = ["aria-label"], at = {
900
+ }), ot = (a, _) => {
901
+ const E = a.__vccOpts || a;
902
+ for (const [e, y] of _)
903
+ E[e] = y;
904
+ return E;
905
+ }, nt = /* @__PURE__ */ ot(at, [["__scopeId", "data-v-fc92f61f"]]), it = ["aria-label"], st = {
863
906
  key: 0,
864
907
  class: "vue-virtual-carousel__track",
865
908
  role: "list"
866
- }, ot = ["aria-label", "aria-current"], nt = {
909
+ }, rt = ["aria-label", "aria-current"], ut = {
867
910
  key: 1,
868
911
  class: "vue-virtual-carousel__empty"
869
- }, it = /* @__PURE__ */ xe({
912
+ }, ct = /* @__PURE__ */ $e({
870
913
  name: "VirtualCarousel",
871
914
  __name: "VirtualCarousel",
872
915
  props: {
@@ -889,29 +932,29 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
889
932
  responsive: { default: void 0 }
890
933
  },
891
934
  emits: ["update:activeIndex", "change", "reachStart", "reachEnd", "loadMore"],
892
- setup(a, { expose: j, emit: H }) {
893
- const e = a, g = H, f = N(), T = N(0), s = N(0);
894
- let V, _ = -1, F, G, q = !1;
895
- const y = N(!1), { getItemKey: k } = $e({
935
+ setup(a, { expose: _, emit: E }) {
936
+ const e = a, y = E, f = P(), S = P(0), r = P(0);
937
+ let H, U = -1, F, W, Z = !1;
938
+ const L = P(!1), { getItemKey: p } = He({
896
939
  componentName: "VirtualCarousel",
897
940
  items: () => e.items,
898
941
  itemKey: () => e.itemKey
899
- }), I = i(() => Math.max(0, T.value)), z = i(() => {
942
+ }), I = i(() => Math.max(0, S.value)), w = i(() => {
900
943
  if (!e.responsive || e.responsive.length === 0)
901
944
  return {
902
945
  slidesPerView: e.slidesPerView,
903
946
  slidesToScroll: e.slidesToScroll,
904
947
  gap: e.gap
905
948
  };
906
- const t = I.value, o = [...e.responsive].sort(
907
- (v, B) => B.breakpoint - v.breakpoint
949
+ const l = I.value, o = [...e.responsive].sort(
950
+ (h, k) => k.breakpoint - h.breakpoint
908
951
  );
909
- for (const v of o)
910
- if (t >= v.breakpoint)
952
+ for (const h of o)
953
+ if (l >= h.breakpoint)
911
954
  return {
912
- slidesPerView: v.slidesPerView ?? e.slidesPerView,
913
- slidesToScroll: v.slidesToScroll ?? e.slidesToScroll,
914
- gap: v.gap ?? e.gap
955
+ slidesPerView: h.slidesPerView ?? e.slidesPerView,
956
+ slidesToScroll: h.slidesToScroll ?? e.slidesToScroll,
957
+ gap: h.gap ?? e.gap
915
958
  };
916
959
  return {
917
960
  slidesPerView: e.slidesPerView,
@@ -922,274 +965,274 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
922
965
  () => Math.max(
923
966
  1,
924
967
  Math.floor(
925
- Number.isFinite(z.value.slidesPerView) ? z.value.slidesPerView : 1
968
+ Number.isFinite(w.value.slidesPerView) ? w.value.slidesPerView : 1
926
969
  )
927
970
  )
928
- ), W = i(
971
+ ), V = i(
929
972
  () => Math.max(
930
973
  1,
931
974
  Math.floor(
932
- Number.isFinite(z.value.slidesToScroll) ? z.value.slidesToScroll : 1
975
+ Number.isFinite(w.value.slidesToScroll) ? w.value.slidesToScroll : 1
933
976
  )
934
977
  )
935
- ), Z = i(
936
- () => Math.max(0, Number.isFinite(z.value.gap) ? z.value.gap : 0)
937
- ), te = i(
978
+ ), N = i(
979
+ () => Math.max(0, Number.isFinite(w.value.gap) ? w.value.gap : 0)
980
+ ), K = i(
938
981
  () => Math.max(
939
982
  0,
940
983
  Math.floor(Number.isFinite(e.buffer) ? e.buffer : 0)
941
984
  )
942
- ), Y = i(
985
+ ), ee = i(
943
986
  () => Math.max(
944
987
  0,
945
988
  Math.floor(
946
989
  Number.isFinite(e.loadMoreThreshold) ? e.loadMoreThreshold : 0
947
990
  )
948
991
  )
949
- ), L = i(() => Number.isFinite(e.autoplayDelay) ? Math.max(1, e.autoplayDelay) : 3e3), J = i(() => {
992
+ ), $ = i(() => Number.isFinite(e.autoplayDelay) ? Math.max(1, e.autoplayDelay) : 3e3), X = i(() => {
950
993
  if (I.value <= 0) return 0;
951
- const t = (A.value - 1) * Z.value;
994
+ const l = (A.value - 1) * N.value;
952
995
  return Math.max(
953
996
  1,
954
- (I.value - t) / A.value
997
+ (I.value - l) / A.value
955
998
  );
956
- }), K = i(() => J.value + Z.value), Q = i(
999
+ }), B = i(() => X.value + N.value), q = i(
957
1000
  () => Math.max(
958
1001
  0,
959
1002
  e.items.length - A.value
960
1003
  )
961
- ), le = i(
962
- () => Math.max(0, s.value - te.value)
963
- ), ue = i(
1004
+ ), ae = i(
1005
+ () => Math.max(0, r.value - K.value)
1006
+ ), he = i(
964
1007
  () => Math.min(
965
1008
  e.items.length,
966
- s.value + A.value + te.value
1009
+ r.value + A.value + K.value
967
1010
  )
968
- ), U = i(
969
- () => e.items.slice(le.value, ue.value).map((t, o) => ({
970
- item: t,
971
- index: le.value + o
1011
+ ), oe = i(
1012
+ () => e.items.slice(ae.value, he.value).map((l, o) => ({
1013
+ item: l,
1014
+ index: ae.value + o
972
1015
  }))
973
- ), m = i(() => e.items.length === 0 ? 0 : e.items.length * J.value + (e.items.length - 1) * Z.value), p = i(
974
- () => le.value * K.value
1016
+ ), v = i(() => e.items.length === 0 ? 0 : e.items.length * X.value + (e.items.length - 1) * N.value), M = i(
1017
+ () => ae.value * B.value
975
1018
  ), D = i(
976
1019
  () => Math.max(
977
1020
  0,
978
- m.value - ue.value * K.value
1021
+ v.value - he.value * B.value
979
1022
  )
980
- ), se = i(() => ({
1023
+ ), ve = i(() => ({
981
1024
  height: Ve(e.height)
982
1025
  }));
983
- function ae(t) {
1026
+ function te(l) {
984
1027
  return Math.min(
985
- Q.value,
986
- Math.max(0, Math.floor(Number.isFinite(t) ? t : 0))
1028
+ q.value,
1029
+ Math.max(0, Math.floor(Number.isFinite(l) ? l : 0))
987
1030
  );
988
1031
  }
989
- s.value = ae(e.activeIndex);
990
- function fe(t) {
991
- return t >= s.value && t < Math.min(
1032
+ r.value = te(e.activeIndex);
1033
+ function ye(l) {
1034
+ return l >= r.value && l < Math.min(
992
1035
  e.items.length,
993
- s.value + A.value
1036
+ r.value + A.value
994
1037
  );
995
1038
  }
996
- function oe() {
997
- if (!e.hasMore || e.loading || _ === e.items.length)
1039
+ function ne() {
1040
+ if (!e.hasMore || e.loading || U === e.items.length)
998
1041
  return;
999
- const t = e.items.length === 0 ? -1 : Math.min(
1042
+ const l = e.items.length === 0 ? -1 : Math.min(
1000
1043
  e.items.length - 1,
1001
- s.value + A.value - 1
1044
+ r.value + A.value - 1
1002
1045
  );
1003
- e.items.length - 1 - t <= Y.value && (_ = e.items.length, g("loadMore"));
1046
+ e.items.length - 1 - l <= ee.value && (U = e.items.length, y("loadMore"));
1004
1047
  }
1005
- function ie(t) {
1006
- const o = ae(t);
1007
- o === s.value || e.items.length === 0 || (s.value = o, g("update:activeIndex", o), g("change", {
1048
+ function fe(l) {
1049
+ const o = te(l);
1050
+ o === r.value || e.items.length === 0 || (r.value = o, y("update:activeIndex", o), y("change", {
1008
1051
  index: o,
1009
1052
  item: e.items[o]
1010
- }), o === 0 && g("reachStart"), o === Q.value && g("reachEnd"), oe(), e.autoplay && !y.value && l());
1053
+ }), o === 0 && y("reachStart"), o === q.value && y("reachEnd"), ne(), e.autoplay && !L.value && z());
1011
1054
  }
1012
- function re(t, o = {}) {
1013
- const v = f.value;
1014
- v && (typeof v.scrollTo == "function" ? v.scrollTo({ ...o, left: t }) : v.scrollLeft = t);
1055
+ function J(l, o = {}) {
1056
+ const h = f.value;
1057
+ h && (typeof h.scrollTo == "function" ? h.scrollTo({ ...o, left: l }) : h.scrollLeft = l);
1015
1058
  }
1016
- function de(t, o = {}) {
1017
- if (e.items.length === 0 || K.value <= 0) return;
1018
- const v = ae(t);
1019
- G = o.behavior === "smooth" ? v : void 0, ie(v), re(v * K.value, {
1059
+ function me(l, o = {}) {
1060
+ if (e.items.length === 0 || B.value <= 0) return;
1061
+ const h = te(l);
1062
+ W = o.behavior === "smooth" ? h : void 0, fe(h), J(h * B.value, {
1020
1063
  ...o,
1021
1064
  behavior: o.behavior
1022
1065
  });
1023
1066
  }
1024
- function h(t = "smooth") {
1025
- de(
1026
- s.value + W.value,
1027
- { behavior: t }
1067
+ function m(l = "smooth") {
1068
+ me(
1069
+ r.value + V.value,
1070
+ { behavior: l }
1028
1071
  );
1029
1072
  }
1030
- function $(t = "smooth") {
1031
- de(
1032
- s.value - W.value,
1033
- { behavior: t }
1073
+ function b(l = "smooth") {
1074
+ me(
1075
+ r.value - V.value,
1076
+ { behavior: l }
1034
1077
  );
1035
1078
  }
1036
- function l() {
1037
- u(), !(!e.autoplay || e.items.length === 0) && (F = setTimeout(() => {
1038
- s.value >= Q.value ? e.autoplayLoop ? de(0, { behavior: "smooth" }) : u() : h("smooth");
1039
- }, L.value));
1079
+ function z() {
1080
+ G(), !(!e.autoplay || e.items.length === 0) && (F = setTimeout(() => {
1081
+ r.value >= q.value ? e.autoplayLoop ? me(0, { behavior: "smooth" }) : G() : m("smooth");
1082
+ }, $.value));
1040
1083
  }
1041
- function u() {
1084
+ function G() {
1042
1085
  F !== void 0 && (clearTimeout(F), F = void 0);
1043
1086
  }
1044
- function c() {
1045
- y.value = !0, e.pauseOnHover && u();
1087
+ function Me() {
1088
+ L.value = !0, e.pauseOnHover && G();
1046
1089
  }
1047
- function E() {
1048
- y.value = !1, e.autoplay && l();
1090
+ function se() {
1091
+ L.value = !1, e.autoplay && z();
1049
1092
  }
1050
- function P() {
1051
- G = void 0;
1093
+ function ue() {
1094
+ W = void 0;
1052
1095
  }
1053
- function S(t) {
1054
- if (K.value <= 0 || q) return;
1055
- const o = t.currentTarget.scrollLeft;
1056
- if (G !== void 0) {
1057
- const v = G * K.value;
1058
- if (Math.abs(o - v) > 1) return;
1059
- G = void 0;
1096
+ function Y(l) {
1097
+ if (B.value <= 0 || Z) return;
1098
+ const o = l.currentTarget.scrollLeft;
1099
+ if (W !== void 0) {
1100
+ const h = W * B.value;
1101
+ if (Math.abs(o - h) > 1) return;
1102
+ W = void 0;
1060
1103
  }
1061
- ie(Math.round(o / K.value));
1104
+ fe(Math.round(o / B.value));
1062
1105
  }
1063
- function R(t) {
1064
- t.key === "ArrowRight" || t.key === "PageDown" ? (t.preventDefault(), h()) : t.key === "ArrowLeft" || t.key === "PageUp" ? (t.preventDefault(), $()) : t.key === "Home" ? (t.preventDefault(), de(0, { behavior: "smooth" })) : t.key === "End" && (t.preventDefault(), de(Q.value, { behavior: "auto" }));
1106
+ function j(l) {
1107
+ l.key === "ArrowRight" || l.key === "PageDown" ? (l.preventDefault(), m()) : l.key === "ArrowLeft" || l.key === "PageUp" ? (l.preventDefault(), b()) : l.key === "Home" ? (l.preventDefault(), me(0, { behavior: "smooth" })) : l.key === "End" && (l.preventDefault(), me(q.value, { behavior: "auto" }));
1065
1108
  }
1066
- function n() {
1109
+ function s() {
1067
1110
  var o;
1068
- const t = ((o = f.value) == null ? void 0 : o.clientWidth) ?? 0;
1069
- t <= 0 || t === T.value || (q = !0, T.value = t, O(() => {
1070
- const v = ae(s.value);
1071
- re(v * K.value), q = !1;
1111
+ const l = ((o = f.value) == null ? void 0 : o.clientWidth) ?? 0;
1112
+ l <= 0 || l === S.value || (Z = !0, S.value = l, O(() => {
1113
+ const h = te(r.value);
1114
+ J(h * B.value), Z = !1;
1072
1115
  }));
1073
1116
  }
1074
- return ee(
1117
+ return le(
1075
1118
  () => e.activeIndex,
1076
- async (t) => {
1077
- const o = ae(t);
1078
- o !== s.value && (P(), s.value = o, await O(), re(o * K.value), oe());
1119
+ async (l) => {
1120
+ const o = te(l);
1121
+ o !== r.value && (ue(), r.value = o, await O(), J(o * B.value), ne());
1079
1122
  }
1080
- ), ee(
1123
+ ), le(
1081
1124
  () => [
1082
1125
  e.items.length,
1083
- z.value.slidesPerView,
1084
- z.value.gap,
1085
- z.value.slidesToScroll
1126
+ w.value.slidesPerView,
1127
+ w.value.gap,
1128
+ w.value.slidesToScroll
1086
1129
  ],
1087
1130
  async () => {
1088
- const t = ae(s.value);
1089
- e.items.length === 0 ? s.value !== 0 && (s.value = 0, g("update:activeIndex", 0)) : ie(t), await O(), re(t * K.value), oe(), e.autoplay && e.items.length > 0 && !y.value && l();
1131
+ const l = te(r.value);
1132
+ e.items.length === 0 ? r.value !== 0 && (r.value = 0, y("update:activeIndex", 0)) : fe(l), await O(), J(l * B.value), ne(), e.autoplay && e.items.length > 0 && !L.value && z();
1090
1133
  }
1091
- ), ee(
1134
+ ), le(
1092
1135
  () => e.responsive,
1093
1136
  () => {
1094
1137
  O(() => {
1095
- const t = ae(s.value);
1096
- re(t * K.value);
1138
+ const l = te(r.value);
1139
+ J(l * B.value);
1097
1140
  });
1098
1141
  },
1099
1142
  { deep: !0 }
1100
- ), ee(
1143
+ ), le(
1101
1144
  () => [
1102
1145
  e.hasMore,
1103
1146
  e.loading,
1104
1147
  e.loadMoreThreshold
1105
1148
  ],
1106
- async ([t]) => {
1107
- t || (_ = -1), await O(), oe();
1149
+ async ([l]) => {
1150
+ l || (U = -1), await O(), ne();
1108
1151
  }
1109
- ), ee(
1152
+ ), le(
1110
1153
  () => e.autoplay,
1111
- (t) => {
1112
- t && !y.value ? l() : u();
1154
+ (l) => {
1155
+ l && !L.value ? z() : G();
1113
1156
  }
1114
- ), ee(
1157
+ ), le(
1115
1158
  () => e.autoplayDelay,
1116
1159
  () => {
1117
- e.autoplay && !y.value && l();
1160
+ e.autoplay && !L.value && z();
1118
1161
  }
1119
- ), ee(
1162
+ ), le(
1120
1163
  () => e.autoplayLoop,
1121
- (t) => {
1122
- !e.autoplay || y.value || (!t && s.value >= Q.value ? u() : l());
1164
+ (l) => {
1165
+ !e.autoplay || L.value || (!l && r.value >= q.value ? G() : z());
1123
1166
  }
1124
- ), ee(
1167
+ ), le(
1125
1168
  () => e.pauseOnHover,
1126
- (t) => {
1127
- t && y.value ? u() : !t && e.autoplay && l();
1169
+ (l) => {
1170
+ l && L.value ? G() : !l && e.autoplay && z();
1128
1171
  }
1129
- ), Se(async () => {
1130
- n(), typeof ResizeObserver < "u" && f.value && (V = new ResizeObserver(n), V.observe(f.value)), await O(), re(s.value * K.value), oe(), e.autoplay && l();
1131
- }), Ie(() => {
1132
- V && (V.disconnect(), V = void 0), u();
1133
- }), j({
1134
- next: h,
1135
- previous: $,
1136
- scrollToIndex: de,
1137
- startAutoplay: l,
1138
- stopAutoplay: u
1139
- }), (t, o) => (w(), x("div", {
1172
+ ), ke(async () => {
1173
+ s(), typeof ResizeObserver < "u" && f.value && (H = new ResizeObserver(s), H.observe(f.value)), await O(), J(r.value * B.value), ne(), e.autoplay && z();
1174
+ }), Le(() => {
1175
+ H && (H.disconnect(), H = void 0), G();
1176
+ }), _({
1177
+ next: m,
1178
+ previous: b,
1179
+ scrollToIndex: me,
1180
+ startAutoplay: z,
1181
+ stopAutoplay: G
1182
+ }), (l, o) => (x(), T("div", {
1140
1183
  ref_key: "viewport",
1141
1184
  ref: f,
1142
1185
  class: "vue-virtual-carousel",
1143
- style: C(se.value),
1186
+ style: C(ve.value),
1144
1187
  role: "region",
1145
1188
  "aria-roledescription": "carousel",
1146
1189
  "aria-label": a.ariaLabel,
1147
1190
  tabindex: "0",
1148
- onScrollPassive: S,
1149
- onPointerdown: P,
1150
- onWheelPassive: P,
1151
- onKeydown: R,
1152
- onMouseenter: c,
1153
- onMouseleave: E
1191
+ onScrollPassive: Y,
1192
+ onPointerdown: ue,
1193
+ onWheelPassive: ue,
1194
+ onKeydown: j,
1195
+ onMouseenter: Me,
1196
+ onMouseleave: se
1154
1197
  }, [
1155
- a.items.length ? (w(), x("div", at, [
1156
- p.value > 0 ? (w(), x("div", {
1198
+ a.items.length ? (x(), T("div", st, [
1199
+ M.value > 0 ? (x(), T("div", {
1157
1200
  key: 0,
1158
1201
  class: "vue-virtual-carousel__spacer",
1159
- style: C({ flexBasis: `${p.value}px` }),
1202
+ style: C({ flexBasis: `${M.value}px` }),
1160
1203
  "aria-hidden": "true"
1161
- }, null, 4)) : me("", !0),
1162
- (w(!0), x(we, null, ze(U.value, ({ item: v, index: B }) => (w(), x("div", {
1163
- key: r(k)(v, B),
1204
+ }, null, 4)) : xe("", !0),
1205
+ (x(!0), T(ze, null, Ee(oe.value, ({ item: h, index: k }) => (x(), T("div", {
1206
+ key: c(p)(h, k),
1164
1207
  class: "vue-virtual-carousel__item",
1165
1208
  style: C({
1166
- flexBasis: `${J.value}px`,
1167
- marginRight: B < a.items.length - 1 ? `${Z.value}px` : "0px"
1209
+ flexBasis: `${X.value}px`,
1210
+ marginRight: k < a.items.length - 1 ? `${N.value}px` : "0px"
1168
1211
  }),
1169
1212
  role: "listitem",
1170
1213
  "aria-roledescription": "slide",
1171
- "aria-label": `${B + 1} of ${a.items.length}`,
1172
- "aria-current": B === s.value ? "true" : void 0
1214
+ "aria-label": `${k + 1} of ${a.items.length}`,
1215
+ "aria-current": k === r.value ? "true" : void 0
1173
1216
  }, [
1174
- ne(t.$slots, "default", {
1175
- item: v,
1176
- index: B,
1177
- active: B === s.value,
1178
- visible: fe(B)
1217
+ ie(l.$slots, "default", {
1218
+ item: h,
1219
+ index: k,
1220
+ active: k === r.value,
1221
+ visible: ye(k)
1179
1222
  })
1180
- ], 12, ot))), 128)),
1181
- D.value > 0 ? (w(), x("div", {
1223
+ ], 12, rt))), 128)),
1224
+ D.value > 0 ? (x(), T("div", {
1182
1225
  key: 1,
1183
1226
  class: "vue-virtual-carousel__spacer",
1184
1227
  style: C({ flexBasis: `${D.value}px` }),
1185
1228
  "aria-hidden": "true"
1186
- }, null, 4)) : me("", !0)
1187
- ])) : (w(), x("div", nt, [
1188
- ne(t.$slots, "empty")
1229
+ }, null, 4)) : xe("", !0)
1230
+ ])) : (x(), T("div", ut, [
1231
+ ie(l.$slots, "empty")
1189
1232
  ]))
1190
- ], 44, lt));
1233
+ ], 44, it));
1191
1234
  }
1192
- }), st = ["aria-label"], rt = ["aria-posinset", "aria-setsize"], ut = /* @__PURE__ */ xe({
1235
+ }), dt = ["aria-label"], vt = ["aria-posinset", "aria-setsize"], ft = /* @__PURE__ */ $e({
1193
1236
  name: "VirtualScroll",
1194
1237
  __name: "VirtualScroll",
1195
1238
  props: {
@@ -1208,210 +1251,210 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
1208
1251
  pullRefreshThreshold: { default: 64 }
1209
1252
  },
1210
1253
  emits: ["scroll", "loadMore", "refresh"],
1211
- setup(a, { expose: j, emit: H }) {
1212
- const e = a, g = H, {
1254
+ setup(a, { expose: _, emit: E }) {
1255
+ const e = a, y = E, {
1213
1256
  pulling: f,
1214
- pullDistance: T,
1215
- pullOffset: s,
1216
- pullProgress: V,
1217
- refreshMessage: _,
1257
+ pullDistance: S,
1258
+ pullOffset: r,
1259
+ pullProgress: H,
1260
+ refreshMessage: U,
1218
1261
  refreshThreshold: F,
1219
- handleTouchStart: G,
1220
- handleTouchMove: q,
1221
- handleTouchEnd: y,
1222
- handleTouchCancel: k
1223
- } = Oe({
1262
+ handleTouchStart: W,
1263
+ handleTouchMove: Z,
1264
+ handleTouchEnd: L,
1265
+ handleTouchCancel: p
1266
+ } = Ke({
1224
1267
  enabled: () => e.pullToRefresh,
1225
1268
  refreshing: () => e.refreshing,
1226
1269
  threshold: () => e.pullRefreshThreshold,
1227
- onRefresh: () => g("refresh")
1228
- }), I = N(), z = N(0), A = N(0);
1229
- let W, Z = -1;
1230
- const te = Re(), { getItemKey: Y } = $e({
1270
+ onRefresh: () => y("refresh")
1271
+ }), I = P(), w = P(0), A = P(0);
1272
+ let V, N = -1;
1273
+ const K = Ce(), { getItemKey: ee } = He({
1231
1274
  componentName: "VirtualScroll",
1232
1275
  items: () => e.items,
1233
1276
  itemKey: () => e.itemKey
1234
- }), L = i(() => Math.max(1, e.itemSize)), J = i(() => Math.max(0, Math.floor(e.overscan))), K = i(
1235
- () => e.items.length * L.value
1236
- ), Q = i(
1237
- () => Math.max(1, e.loadingItemSize ?? L.value)
1238
- ), le = i(
1239
- () => K.value + (e.loading ? Q.value : 0)
1240
- ), ue = i(() => A.value > 0 ? A.value : typeof e.height == "number" ? e.height : 0), U = i(
1277
+ }), $ = i(() => Math.max(1, e.itemSize)), X = i(() => Math.max(0, Math.floor(e.overscan))), B = i(
1278
+ () => e.items.length * $.value
1279
+ ), q = i(
1280
+ () => Math.max(1, e.loadingItemSize ?? $.value)
1281
+ ), ae = i(
1282
+ () => B.value + (e.loading ? q.value : 0)
1283
+ ), he = i(() => A.value > 0 ? A.value : typeof e.height == "number" ? e.height : 0), oe = i(
1241
1284
  () => Math.max(
1242
1285
  0,
1243
- Math.floor(z.value / L.value) - J.value
1286
+ Math.floor(w.value / $.value) - X.value
1244
1287
  )
1245
- ), m = i(() => {
1246
- const h = Math.ceil(
1247
- (z.value + ue.value) / L.value
1288
+ ), v = i(() => {
1289
+ const m = Math.ceil(
1290
+ (w.value + he.value) / $.value
1248
1291
  );
1249
1292
  return Math.min(
1250
1293
  e.items.length,
1251
- h + J.value
1294
+ m + X.value
1252
1295
  );
1253
- }), p = i(
1254
- () => e.items.slice(U.value, m.value).map((h, $) => ({
1255
- item: h,
1256
- index: U.value + $
1296
+ }), M = i(
1297
+ () => e.items.slice(oe.value, v.value).map((m, b) => ({
1298
+ item: m,
1299
+ index: oe.value + b
1257
1300
  }))
1258
1301
  ), D = i(() => ({
1259
1302
  height: Ve(e.height)
1260
- })), se = i(() => ({
1261
- transform: `translateY(${U.value * L.value}px)`
1303
+ })), ve = i(() => ({
1304
+ transform: `translateY(${oe.value * $.value}px)`
1262
1305
  }));
1263
- function ae() {
1264
- var h;
1265
- A.value = ((h = I.value) == null ? void 0 : h.clientHeight) ?? 0, te(I.value, e.height), O(oe);
1306
+ function te() {
1307
+ var m;
1308
+ A.value = ((m = I.value) == null ? void 0 : m.clientHeight) ?? 0, K(I.value, e.height), O(ne);
1266
1309
  }
1267
- function fe(h) {
1268
- z.value = h.currentTarget.scrollTop, g("scroll", {
1269
- scrollTop: z.value,
1270
- startIndex: U.value,
1271
- endIndex: m.value
1272
- }), oe();
1310
+ function ye(m) {
1311
+ w.value = m.currentTarget.scrollTop, y("scroll", {
1312
+ scrollTop: w.value,
1313
+ startIndex: oe.value,
1314
+ endIndex: v.value
1315
+ }), ne();
1273
1316
  }
1274
- function oe() {
1275
- const h = I.value;
1276
- if (!h || !e.hasMore || e.loading || Z === e.items.length)
1317
+ function ne() {
1318
+ const m = I.value;
1319
+ if (!m || !e.hasMore || e.loading || N === e.items.length)
1277
1320
  return;
1278
- const $ = Math.max(0, e.loadMoreThreshold);
1279
- le.value - h.scrollTop - h.clientHeight <= $ && (Z = e.items.length, g("loadMore"));
1280
- }
1281
- function ie(h, $ = {}) {
1282
- const l = I.value;
1283
- if (!l) return;
1284
- const u = Math.max(0, le.value - l.clientHeight), c = Math.min(
1285
- Math.max(0, Number.isFinite(h) ? h : 0),
1286
- u
1287
- ), E = $.behavior ?? "auto";
1288
- E === "auto" && (z.value = c), l.scrollTo({ ...$, top: c, behavior: E });
1289
- }
1290
- function re(h, $ = {}) {
1291
- const l = I.value;
1292
- if (!l || e.items.length === 0) return;
1293
- const u = Math.min(
1321
+ const b = Math.max(0, e.loadMoreThreshold);
1322
+ ae.value - m.scrollTop - m.clientHeight <= b && (N = e.items.length, y("loadMore"));
1323
+ }
1324
+ function fe(m, b = {}) {
1325
+ const z = I.value;
1326
+ if (!z) return;
1327
+ const G = Math.max(0, ae.value - z.clientHeight), Me = Math.min(
1328
+ Math.max(0, Number.isFinite(m) ? m : 0),
1329
+ G
1330
+ ), se = b.behavior ?? "auto";
1331
+ se === "auto" && (w.value = Me), z.scrollTo({ ...b, top: Me, behavior: se });
1332
+ }
1333
+ function J(m, b = {}) {
1334
+ const z = I.value;
1335
+ if (!z || e.items.length === 0) return;
1336
+ const G = Math.min(
1294
1337
  e.items.length - 1,
1295
- Math.max(0, Math.floor(h))
1296
- ), { align: c = "start", ...E } = $;
1297
- let P = u * L.value;
1298
- c === "center" ? P -= (l.clientHeight - L.value) / 2 : c === "end" && (P -= l.clientHeight - L.value), l.scrollTo({
1299
- ...E,
1300
- top: Math.max(0, Math.min(P, le.value - l.clientHeight))
1338
+ Math.max(0, Math.floor(m))
1339
+ ), { align: Me = "start", ...se } = b;
1340
+ let ue = G * $.value;
1341
+ Me === "center" ? ue -= (z.clientHeight - $.value) / 2 : Me === "end" && (ue -= z.clientHeight - $.value), z.scrollTo({
1342
+ ...se,
1343
+ top: Math.max(0, Math.min(ue, ae.value - z.clientHeight))
1301
1344
  });
1302
1345
  }
1303
- function de(h = "auto") {
1304
- var $;
1305
- ($ = I.value) == null || $.scrollTo({ top: 0, behavior: h });
1346
+ function me(m = "auto") {
1347
+ var b;
1348
+ (b = I.value) == null || b.scrollTo({ top: 0, behavior: m });
1306
1349
  }
1307
- return ee(
1350
+ return le(
1308
1351
  () => [e.items.length, e.itemSize],
1309
1352
  async () => {
1310
1353
  await O();
1311
- const h = I.value;
1312
- if (!h) return;
1313
- const $ = Math.max(0, le.value - h.clientHeight);
1314
- h.scrollTop > $ && (h.scrollTop = $, z.value = $), oe();
1354
+ const m = I.value;
1355
+ if (!m) return;
1356
+ const b = Math.max(0, ae.value - m.clientHeight);
1357
+ m.scrollTop > b && (m.scrollTop = b, w.value = b), ne();
1315
1358
  }
1316
- ), ee(
1359
+ ), le(
1317
1360
  () => [e.hasMore, e.loading],
1318
- async ([h]) => {
1319
- h || (Z = -1), await O(), oe();
1361
+ async ([m]) => {
1362
+ m || (N = -1), await O(), ne();
1320
1363
  }
1321
- ), Se(() => {
1322
- ae(), typeof ResizeObserver < "u" && I.value && (W = new ResizeObserver(ae), W.observe(I.value)), O(oe);
1323
- }), Ie(() => {
1324
- W && (W.disconnect(), W = void 0);
1325
- }), j({
1326
- scrollTo: ie,
1327
- scrollToIndex: re,
1328
- scrollToTop: de
1329
- }), (h, $) => (w(), x("div", {
1364
+ ), ke(() => {
1365
+ te(), typeof ResizeObserver < "u" && I.value && (V = new ResizeObserver(te), V.observe(I.value)), O(ne);
1366
+ }), Le(() => {
1367
+ V && (V.disconnect(), V = void 0);
1368
+ }), _({
1369
+ scrollTo: fe,
1370
+ scrollToIndex: J,
1371
+ scrollToTop: me
1372
+ }), (m, b) => (x(), T("div", {
1330
1373
  ref_key: "viewport",
1331
1374
  ref: I,
1332
- class: He(["vue-virtual-scroll", { "vue-virtual-scroll--pulling": r(f) }]),
1375
+ class: Be(["vue-virtual-scroll", { "vue-virtual-scroll--pulling": c(f) }]),
1333
1376
  style: C(D.value),
1334
1377
  role: "list",
1335
1378
  "aria-label": a.ariaLabel,
1336
1379
  tabindex: "0",
1337
- onScrollPassive: fe,
1338
- onTouchstartPassive: $[0] || ($[0] = //@ts-ignore
1339
- (...l) => r(G) && r(G)(...l)),
1340
- onTouchmove: $[1] || ($[1] = //@ts-ignore
1341
- (...l) => r(q) && r(q)(...l)),
1342
- onTouchend: $[2] || ($[2] = //@ts-ignore
1343
- (...l) => r(y) && r(y)(...l)),
1344
- onTouchcancel: $[3] || ($[3] = //@ts-ignore
1345
- (...l) => r(k) && r(k)(...l))
1380
+ onScrollPassive: ye,
1381
+ onTouchstartPassive: b[0] || (b[0] = //@ts-ignore
1382
+ (...z) => c(W) && c(W)(...z)),
1383
+ onTouchmove: b[1] || (b[1] = //@ts-ignore
1384
+ (...z) => c(Z) && c(Z)(...z)),
1385
+ onTouchend: b[2] || (b[2] = //@ts-ignore
1386
+ (...z) => c(L) && c(L)(...z)),
1387
+ onTouchcancel: b[3] || (b[3] = //@ts-ignore
1388
+ (...z) => c(p) && c(p)(...z))
1346
1389
  }, [
1347
- a.pullToRefresh || a.refreshing ? (w(), x("div", {
1390
+ a.pullToRefresh || a.refreshing ? (x(), T("div", {
1348
1391
  key: 0,
1349
1392
  class: "vue-virtual-scroll__refresh",
1350
1393
  style: C({
1351
- height: `${r(F)}px`,
1352
- transform: `translateY(${r(s) - r(F)}px)`
1394
+ height: `${c(F)}px`,
1395
+ transform: `translateY(${c(r) - c(F)}px)`
1353
1396
  }),
1354
1397
  role: "status",
1355
1398
  "aria-live": "polite"
1356
1399
  }, [
1357
- ne(h.$slots, "refresh", {
1358
- pullDistance: r(T),
1359
- progress: r(V),
1400
+ ie(m.$slots, "refresh", {
1401
+ pullDistance: c(S),
1402
+ progress: c(H),
1360
1403
  refreshing: a.refreshing
1361
1404
  }, () => [
1362
- Me(Ee(r(_)), 1)
1405
+ Ie(Oe(c(U)), 1)
1363
1406
  ])
1364
- ], 4)) : me("", !0),
1365
- a.items.length || a.loading ? (w(), x("div", {
1407
+ ], 4)) : xe("", !0),
1408
+ a.items.length || a.loading ? (x(), T("div", {
1366
1409
  key: 1,
1367
1410
  class: "vue-virtual-scroll__spacer",
1368
1411
  style: C({
1369
- height: `${le.value}px`,
1370
- transform: `translateY(${r(s)}px)`
1412
+ height: `${ae.value}px`,
1413
+ transform: `translateY(${c(r)}px)`
1371
1414
  })
1372
1415
  }, [
1373
1416
  De("div", {
1374
1417
  class: "vue-virtual-scroll__content",
1375
- style: C(se.value)
1418
+ style: C(ve.value)
1376
1419
  }, [
1377
- (w(!0), x(we, null, ze(p.value, ({ item: l, index: u }) => (w(), x("div", {
1378
- key: r(Y)(l, u),
1420
+ (x(!0), T(ze, null, Ee(M.value, ({ item: z, index: G }) => (x(), T("div", {
1421
+ key: c(ee)(z, G),
1379
1422
  class: "vue-virtual-scroll__item",
1380
- style: C({ height: `${L.value}px` }),
1423
+ style: C({ height: `${$.value}px` }),
1381
1424
  role: "listitem",
1382
- "aria-posinset": u + 1,
1425
+ "aria-posinset": G + 1,
1383
1426
  "aria-setsize": a.items.length
1384
1427
  }, [
1385
- ne(h.$slots, "default", {
1386
- item: l,
1387
- index: u
1428
+ ie(m.$slots, "default", {
1429
+ item: z,
1430
+ index: G
1388
1431
  })
1389
- ], 12, rt))), 128))
1432
+ ], 12, vt))), 128))
1390
1433
  ], 4),
1391
- a.loading ? (w(), x("div", {
1434
+ a.loading ? (x(), T("div", {
1392
1435
  key: 0,
1393
1436
  class: "vue-virtual-scroll__loading",
1394
1437
  style: C({
1395
- height: `${Q.value}px`,
1396
- transform: `translateY(${K.value}px)`
1438
+ height: `${q.value}px`,
1439
+ transform: `translateY(${B.value}px)`
1397
1440
  }),
1398
1441
  role: "status",
1399
1442
  "aria-live": "polite"
1400
1443
  }, [
1401
- ne(h.$slots, "loading", {}, () => [
1402
- $[4] || ($[4] = Me("Loading more…", -1))
1444
+ ie(m.$slots, "loading", {}, () => [
1445
+ b[4] || (b[4] = Ie("Loading more…", -1))
1403
1446
  ])
1404
- ], 4)) : me("", !0)
1405
- ], 4)) : (w(), x("div", {
1447
+ ], 4)) : xe("", !0)
1448
+ ], 4)) : (x(), T("div", {
1406
1449
  key: 2,
1407
1450
  class: "vue-virtual-scroll__empty",
1408
- style: C({ transform: `translateY(${r(s)}px)` })
1451
+ style: C({ transform: `translateY(${c(r)}px)` })
1409
1452
  }, [
1410
- ne(h.$slots, "empty")
1453
+ ie(m.$slots, "empty")
1411
1454
  ], 4))
1412
- ], 46, st));
1455
+ ], 46, dt));
1413
1456
  }
1414
- }), ct = ["aria-label"], dt = ["aria-posinset", "aria-setsize"], vt = /* @__PURE__ */ xe({
1457
+ }), ht = ["aria-label"], mt = ["aria-posinset", "aria-setsize"], gt = /* @__PURE__ */ $e({
1415
1458
  name: "WindowDynamicVirtualScroll",
1416
1459
  __name: "WindowDynamicVirtualScroll",
1417
1460
  props: {
@@ -1429,15 +1472,15 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
1429
1472
  pullRefreshThreshold: { default: 64 }
1430
1473
  },
1431
1474
  emits: ["scroll", "loadMore", "refresh"],
1432
- setup(a, { expose: j, emit: H }) {
1433
- const e = a, g = H, f = N(), T = N(0), s = N(0), V = N(0), _ = N(0), F = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map();
1434
- let y, k, I, z, A = !1, W = !1, Z = -1;
1435
- const { getItemKey: te } = $e({
1475
+ setup(a, { expose: _, emit: E }) {
1476
+ const e = a, y = E, f = P(), S = P(0), r = P(0), H = P(0), U = P(0), F = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map();
1477
+ let L, p, I, w, A = !1, V = !1, N = -1;
1478
+ const { getItemKey: K } = He({
1436
1479
  componentName: "WindowDynamicVirtualScroll",
1437
1480
  items: () => e.items,
1438
1481
  itemKey: () => e.itemKey
1439
1482
  });
1440
- function Y(d) {
1483
+ function ee(d) {
1441
1484
  return typeof window.requestAnimationFrame == "function" ? {
1442
1485
  id: window.requestAnimationFrame(d),
1443
1486
  type: "animation"
@@ -1446,312 +1489,312 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
1446
1489
  type: "timeout"
1447
1490
  };
1448
1491
  }
1449
- function L(d) {
1492
+ function $(d) {
1450
1493
  d && (d.type === "animation" ? window.cancelAnimationFrame(d.id) : window.clearTimeout(d.id));
1451
1494
  }
1452
1495
  const {
1453
- pulling: J,
1454
- pullDistance: K,
1455
- pullOffset: Q,
1456
- pullProgress: le,
1457
- refreshMessage: ue,
1458
- refreshThreshold: U,
1459
- handleTouchStart: m,
1460
- handleTouchMove: p,
1496
+ pulling: X,
1497
+ pullDistance: B,
1498
+ pullOffset: q,
1499
+ pullProgress: ae,
1500
+ refreshMessage: he,
1501
+ refreshThreshold: oe,
1502
+ handleTouchStart: v,
1503
+ handleTouchMove: M,
1461
1504
  handleTouchEnd: D,
1462
- handleTouchCancel: se
1463
- } = Oe({
1505
+ handleTouchCancel: ve
1506
+ } = Ke({
1464
1507
  enabled: () => e.pullToRefresh,
1465
1508
  refreshing: () => e.refreshing,
1466
1509
  threshold: () => e.pullRefreshThreshold,
1467
- onRefresh: () => g("refresh"),
1510
+ onRefresh: () => y("refresh"),
1468
1511
  scrollTop: () => typeof window > "u" ? 0 : Math.max(0, window.scrollY)
1469
- }), ae = i(
1512
+ }), te = i(
1470
1513
  () => Math.max(1, e.estimatedItemSize)
1471
- ), fe = i(
1472
- () => Math.max(1, e.loadingItemSize ?? ae.value)
1473
- ), oe = i(() => Math.max(0, Math.floor(e.overscan))), ie = i(() => {
1474
- _.value;
1475
- const d = new Array(e.items.length + 1), b = new Array(e.items.length);
1514
+ ), ye = i(
1515
+ () => Math.max(1, e.loadingItemSize ?? te.value)
1516
+ ), ne = i(() => Math.max(0, Math.floor(e.overscan))), fe = i(() => {
1517
+ U.value;
1518
+ const d = new Array(e.items.length + 1), t = new Array(e.items.length);
1476
1519
  d[0] = 0;
1477
- for (let M = 0; M < e.items.length; M += 1) {
1478
- const ce = te(e.items[M], M), X = F.get(ce) ?? ae.value;
1479
- b[M] = X, d[M + 1] = d[M] + X;
1520
+ for (let n = 0; n < e.items.length; n += 1) {
1521
+ const u = K(e.items[n], n), g = F.get(u) ?? te.value;
1522
+ t[n] = g, d[n + 1] = d[n] + g;
1480
1523
  }
1481
1524
  return {
1482
1525
  offsets: d,
1483
- sizes: b,
1526
+ sizes: t,
1484
1527
  total: d[e.items.length] ?? 0
1485
1528
  };
1486
- }), re = i(
1487
- () => ie.value.total + (e.loading ? fe.value : 0)
1488
- ), de = i(() => {
1529
+ }), J = i(
1530
+ () => fe.value.total + (e.loading ? ye.value : 0)
1531
+ ), me = i(() => {
1489
1532
  const d = /* @__PURE__ */ new Map();
1490
- return e.items.forEach((b, M) => {
1491
- d.set(te(b, M), M);
1533
+ return e.items.forEach((t, n) => {
1534
+ d.set(K(t, n), n);
1492
1535
  }), d;
1493
- }), h = i(
1494
- () => Math.max(0, T.value - V.value)
1536
+ }), m = i(
1537
+ () => Math.max(0, S.value - H.value)
1495
1538
  );
1496
- function $(d) {
1539
+ function b(d) {
1497
1540
  if (e.items.length === 0) return 0;
1498
- const b = ie.value.offsets;
1499
- let M = 0, ce = e.items.length;
1500
- for (; M < ce; ) {
1501
- const X = Math.floor((M + ce) / 2);
1502
- b[X + 1] <= d ? M = X + 1 : ce = X;
1541
+ const t = fe.value.offsets;
1542
+ let n = 0, u = e.items.length;
1543
+ for (; n < u; ) {
1544
+ const g = Math.floor((n + u) / 2);
1545
+ t[g + 1] <= d ? n = g + 1 : u = g;
1503
1546
  }
1504
- return Math.min(M, e.items.length - 1);
1547
+ return Math.min(n, e.items.length - 1);
1505
1548
  }
1506
- const l = i(
1549
+ const z = i(
1507
1550
  () => Math.max(
1508
1551
  0,
1509
- $(h.value) - oe.value
1552
+ b(m.value) - ne.value
1510
1553
  )
1511
- ), u = i(() => {
1554
+ ), G = i(() => {
1512
1555
  if (e.items.length === 0) return 0;
1513
- const d = T.value + s.value - V.value, b = Math.max(
1514
- ae.value,
1556
+ const d = S.value + r.value - H.value, t = Math.max(
1557
+ te.value,
1515
1558
  d
1516
- ), M = $(b) + 1;
1559
+ ), n = b(t) + 1;
1517
1560
  return Math.min(
1518
1561
  e.items.length,
1519
- M + oe.value
1562
+ n + ne.value
1520
1563
  );
1521
- }), c = i(
1522
- () => e.items.slice(l.value, u.value).map((d, b) => {
1523
- const M = l.value + b;
1564
+ }), Me = i(
1565
+ () => e.items.slice(z.value, G.value).map((d, t) => {
1566
+ const n = z.value + t;
1524
1567
  return {
1525
1568
  item: d,
1526
- index: M,
1527
- key: te(d, M),
1528
- top: ie.value.offsets[M]
1569
+ index: n,
1570
+ key: K(d, n),
1571
+ top: fe.value.offsets[n]
1529
1572
  };
1530
1573
  })
1531
1574
  );
1532
- function E() {
1533
- typeof window > "u" || (T.value = Math.max(0, window.scrollY), s.value = window.innerHeight, f.value && (V.value = f.value.getBoundingClientRect().top + T.value));
1534
- }
1535
- function P() {
1536
- g("scroll", {
1537
- scrollTop: h.value,
1538
- startIndex: l.value,
1539
- endIndex: u.value
1575
+ function se() {
1576
+ typeof window > "u" || (S.value = Math.max(0, window.scrollY), r.value = window.innerHeight, f.value && (H.value = f.value.getBoundingClientRect().top + S.value));
1577
+ }
1578
+ function ue() {
1579
+ y("scroll", {
1580
+ scrollTop: m.value,
1581
+ startIndex: z.value,
1582
+ endIndex: G.value
1540
1583
  });
1541
1584
  }
1542
- function S(d = !1) {
1543
- W && (A || (A = d), !I && (I = Y(() => {
1544
- I = void 0, E(), A && (A = !1, P()), t();
1585
+ function Y(d = !1) {
1586
+ V && (A || (A = d), !I && (I = ee(() => {
1587
+ I = void 0, se(), A && (A = !1, ue()), l();
1545
1588
  })));
1546
1589
  }
1547
- function R() {
1548
- S(!0);
1590
+ function j() {
1591
+ Y(!0);
1549
1592
  }
1550
- function n() {
1551
- S();
1593
+ function s() {
1594
+ Y();
1552
1595
  }
1553
- function t() {
1554
- if (typeof window > "u" || !e.hasMore || e.loading || Z === e.items.length)
1596
+ function l() {
1597
+ if (typeof window > "u" || !e.hasMore || e.loading || N === e.items.length)
1555
1598
  return;
1556
- const d = Math.max(0, e.loadMoreThreshold), b = V.value + re.value, M = T.value + s.value;
1557
- b - M <= d && (Z = e.items.length, g("loadMore"));
1599
+ const d = Math.max(0, e.loadMoreThreshold), t = H.value + J.value, n = S.value + r.value;
1600
+ t - n <= d && (N = e.items.length, y("loadMore"));
1558
1601
  }
1559
1602
  function o(d) {
1560
- const b = d.borderBoxSize;
1561
- if (b) {
1562
- const M = Array.isArray(b) ? b[0] : b;
1563
- if (M != null && M.blockSize) return M.blockSize;
1603
+ const t = d.borderBoxSize;
1604
+ if (t) {
1605
+ const n = Array.isArray(t) ? t[0] : t;
1606
+ if (n != null && n.blockSize) return n.blockSize;
1564
1607
  }
1565
1608
  return d.contentRect.height;
1566
1609
  }
1567
- function v(d) {
1568
- const b = ie.value;
1569
- let M = 0, ce = !1;
1570
- for (const X of d) {
1571
- const pe = X.target, ye = G.get(pe), ke = o(X);
1572
- if (ye === void 0 || ke <= 0) continue;
1573
- const Le = F.get(ye) ?? ae.value;
1574
- if (Math.abs(Le - ke) < 0.5) continue;
1575
- const Be = de.value.get(ye);
1576
- Be !== void 0 && b.offsets[Be + 1] <= h.value && (M += ke - Le), F.set(ye, ke), ce = !0;
1610
+ function h(d) {
1611
+ const t = fe.value;
1612
+ let n = 0, u = !1;
1613
+ for (const g of d) {
1614
+ const R = g.target, Q = W.get(R), re = o(g);
1615
+ if (Q === void 0 || re <= 0) continue;
1616
+ const ce = F.get(Q) ?? te.value;
1617
+ if (Math.abs(ce - re) < 0.5) continue;
1618
+ const de = me.value.get(Q);
1619
+ de !== void 0 && t.offsets[de + 1] <= m.value && (n += re - ce), F.set(Q, re), u = !0;
1577
1620
  }
1578
- ce && (_.value += 1, O(() => {
1579
- if (W) {
1580
- if (M !== 0 && typeof window < "u") {
1581
- const X = Math.max(
1621
+ u && (U.value += 1, O(() => {
1622
+ if (V) {
1623
+ if (n !== 0 && typeof window < "u") {
1624
+ const g = Math.max(
1582
1625
  0,
1583
- T.value + M
1626
+ S.value + n
1584
1627
  );
1585
- T.value = X, window.scrollTo({ top: X, behavior: "auto" });
1628
+ S.value = g, window.scrollTo({ top: g, behavior: "auto" });
1586
1629
  }
1587
- E(), t();
1630
+ se(), l();
1588
1631
  }
1589
1632
  }));
1590
1633
  }
1591
- function B(d) {
1592
- if (W) {
1593
- for (const b of d)
1594
- q.set(b.target, b);
1595
- z || (z = Y(() => {
1596
- z = void 0;
1597
- const b = Array.from(q.values());
1598
- q.clear(), v(b);
1634
+ function k(d) {
1635
+ if (V) {
1636
+ for (const t of d)
1637
+ Z.set(t.target, t);
1638
+ w || (w = ee(() => {
1639
+ w = void 0;
1640
+ const t = Array.from(Z.values());
1641
+ Z.clear(), h(t);
1599
1642
  }));
1600
1643
  }
1601
1644
  }
1602
- function he(d, b) {
1603
- d instanceof HTMLElement && (G.set(d, b), k == null || k.observe(d));
1645
+ function ge(d, t) {
1646
+ d instanceof HTMLElement && (W.set(d, t), p == null || p.observe(d));
1604
1647
  }
1605
- function ve() {
1606
- for (const [d] of G)
1607
- d.isConnected || (k == null || k.unobserve(d), G.delete(d));
1648
+ function pe() {
1649
+ for (const [d] of W)
1650
+ d.isConnected || (p == null || p.unobserve(d), W.delete(d));
1608
1651
  }
1609
- function ge(d, b = {}) {
1652
+ function we(d, t = {}) {
1610
1653
  if (typeof window > "u") return;
1611
- E();
1612
- const M = Math.max(0, re.value - s.value), ce = Math.min(
1654
+ se();
1655
+ const n = Math.max(0, J.value - r.value), u = Math.min(
1613
1656
  Math.max(0, Number.isFinite(d) ? d : 0),
1614
- M
1615
- ), X = Math.max(0, V.value + ce), pe = b.behavior ?? "auto";
1616
- pe === "auto" && (T.value = X), window.scrollTo({ ...b, top: X, behavior: pe });
1657
+ n
1658
+ ), g = Math.max(0, H.value + u), R = t.behavior ?? "auto";
1659
+ R === "auto" && (S.value = g), window.scrollTo({ ...t, top: g, behavior: R });
1617
1660
  }
1618
- function Te(d, b = {}) {
1661
+ function be(d, t = {}) {
1619
1662
  if (typeof window > "u" || e.items.length === 0) return;
1620
- E();
1621
- const M = Math.min(
1663
+ se();
1664
+ const n = Math.min(
1622
1665
  e.items.length - 1,
1623
1666
  Math.max(0, Math.floor(d))
1624
- ), { align: ce = "start", ...X } = b, pe = ie.value.sizes[M];
1625
- let ye = V.value + ie.value.offsets[M];
1626
- ce === "center" ? ye -= (s.value - pe) / 2 : ce === "end" && (ye -= s.value - pe);
1627
- const ke = Math.max(
1628
- V.value,
1629
- V.value + re.value - s.value
1630
- ), Le = Math.max(0, Math.min(ye, ke)), Be = X.behavior ?? "auto";
1631
- Be === "auto" && (T.value = Le), window.scrollTo({
1632
- ...X,
1633
- top: Le,
1634
- behavior: Be
1667
+ ), { align: u = "start", ...g } = t, R = fe.value.sizes[n];
1668
+ let Q = H.value + fe.value.offsets[n];
1669
+ u === "center" ? Q -= (r.value - R) / 2 : u === "end" && (Q -= r.value - R);
1670
+ const re = Math.max(
1671
+ H.value,
1672
+ H.value + J.value - r.value
1673
+ ), ce = Math.max(0, Math.min(Q, re)), de = g.behavior ?? "auto";
1674
+ de === "auto" && (S.value = ce), window.scrollTo({
1675
+ ...g,
1676
+ top: ce,
1677
+ behavior: de
1635
1678
  });
1636
1679
  }
1637
- function be(d = "auto") {
1638
- typeof window > "u" || (E(), window.scrollTo({ top: Math.max(0, V.value), behavior: d }));
1680
+ function Te(d = "auto") {
1681
+ typeof window > "u" || (se(), window.scrollTo({ top: Math.max(0, H.value), behavior: d }));
1639
1682
  }
1640
- return ee(
1683
+ return le(
1641
1684
  () => e.itemKey,
1642
1685
  () => {
1643
- F.clear(), _.value += 1, Z = -1;
1686
+ F.clear(), U.value += 1, N = -1;
1644
1687
  }
1645
- ), ee(
1646
- () => e.items.map((d, b) => te(d, b)),
1647
- async (d, b) => {
1648
- const M = d.length !== b.length || d.some((X, pe) => X !== b[pe]), ce = new Set(d);
1649
- for (const X of F.keys())
1650
- ce.has(X) || F.delete(X);
1651
- M && (Z = -1), _.value += 1, await O(), W && (E(), t());
1688
+ ), le(
1689
+ () => e.items.map((d, t) => K(d, t)),
1690
+ async (d, t) => {
1691
+ const n = d.length !== t.length || d.some((g, R) => g !== t[R]), u = new Set(d);
1692
+ for (const g of F.keys())
1693
+ u.has(g) || F.delete(g);
1694
+ n && (N = -1), U.value += 1, await O(), V && (se(), l());
1652
1695
  }
1653
- ), ee(
1696
+ ), le(
1654
1697
  () => [e.hasMore, e.loading],
1655
1698
  async ([d]) => {
1656
- d || (Z = -1), await O(), W && (E(), t());
1699
+ d || (N = -1), await O(), V && (se(), l());
1657
1700
  }
1658
- ), Se(() => {
1659
- if (W = !0, E(), window.addEventListener("scroll", R, { passive: !0 }), window.addEventListener("resize", n, { passive: !0 }), typeof ResizeObserver < "u") {
1660
- y = new ResizeObserver(() => {
1661
- S();
1662
- }), k = new ResizeObserver(B), f.value && y.observe(f.value);
1663
- for (const [d] of G)
1664
- k.observe(d);
1701
+ ), ke(() => {
1702
+ if (V = !0, se(), window.addEventListener("scroll", j, { passive: !0 }), window.addEventListener("resize", s, { passive: !0 }), typeof ResizeObserver < "u") {
1703
+ L = new ResizeObserver(() => {
1704
+ Y();
1705
+ }), p = new ResizeObserver(k), f.value && L.observe(f.value);
1706
+ for (const [d] of W)
1707
+ p.observe(d);
1665
1708
  }
1666
1709
  O(() => {
1667
- W && t();
1710
+ V && l();
1668
1711
  });
1669
- }), Ce(ve), Ie(() => {
1670
- W = !1, window.removeEventListener("scroll", R), window.removeEventListener("resize", n), L(I), L(z), I = void 0, z = void 0, A = !1, q.clear(), y && (y.disconnect(), y = void 0), k && (k.disconnect(), k = void 0), G.clear();
1671
- }), j({
1672
- scrollTo: ge,
1673
- scrollToIndex: Te,
1674
- scrollToTop: be
1675
- }), (d, b) => (w(), x("div", {
1712
+ }), Ae(pe), Le(() => {
1713
+ V = !1, window.removeEventListener("scroll", j), window.removeEventListener("resize", s), $(I), $(w), I = void 0, w = void 0, A = !1, Z.clear(), L && (L.disconnect(), L = void 0), p && (p.disconnect(), p = void 0), W.clear();
1714
+ }), _({
1715
+ scrollTo: we,
1716
+ scrollToIndex: be,
1717
+ scrollToTop: Te
1718
+ }), (d, t) => (x(), T("div", {
1676
1719
  ref_key: "root",
1677
1720
  ref: f,
1678
- class: He(["vue-window-dynamic-virtual-scroll", { "vue-window-dynamic-virtual-scroll--pulling": r(J) }]),
1721
+ class: Be(["vue-window-dynamic-virtual-scroll", { "vue-window-dynamic-virtual-scroll--pulling": c(X) }]),
1679
1722
  role: "list",
1680
1723
  "aria-label": a.ariaLabel,
1681
- onTouchstartPassive: b[0] || (b[0] = //@ts-ignore
1682
- (...M) => r(m) && r(m)(...M)),
1683
- onTouchmove: b[1] || (b[1] = //@ts-ignore
1684
- (...M) => r(p) && r(p)(...M)),
1685
- onTouchend: b[2] || (b[2] = //@ts-ignore
1686
- (...M) => r(D) && r(D)(...M)),
1687
- onTouchcancel: b[3] || (b[3] = //@ts-ignore
1688
- (...M) => r(se) && r(se)(...M))
1724
+ onTouchstartPassive: t[0] || (t[0] = //@ts-ignore
1725
+ (...n) => c(v) && c(v)(...n)),
1726
+ onTouchmove: t[1] || (t[1] = //@ts-ignore
1727
+ (...n) => c(M) && c(M)(...n)),
1728
+ onTouchend: t[2] || (t[2] = //@ts-ignore
1729
+ (...n) => c(D) && c(D)(...n)),
1730
+ onTouchcancel: t[3] || (t[3] = //@ts-ignore
1731
+ (...n) => c(ve) && c(ve)(...n))
1689
1732
  }, [
1690
- a.pullToRefresh || a.refreshing ? (w(), x("div", {
1733
+ a.pullToRefresh || a.refreshing ? (x(), T("div", {
1691
1734
  key: 0,
1692
1735
  class: "vue-window-dynamic-virtual-scroll__refresh",
1693
1736
  style: C({
1694
- height: `${r(U)}px`,
1695
- transform: `translateY(${r(Q) - r(U)}px)`
1737
+ height: `${c(oe)}px`,
1738
+ transform: `translateY(${c(q) - c(oe)}px)`
1696
1739
  }),
1697
1740
  role: "status",
1698
1741
  "aria-live": "polite"
1699
1742
  }, [
1700
- ne(d.$slots, "refresh", {
1701
- pullDistance: r(K),
1702
- progress: r(le),
1743
+ ie(d.$slots, "refresh", {
1744
+ pullDistance: c(B),
1745
+ progress: c(ae),
1703
1746
  refreshing: a.refreshing
1704
1747
  }, () => [
1705
- Me(Ee(r(ue)), 1)
1748
+ Ie(Oe(c(he)), 1)
1706
1749
  ])
1707
- ], 4)) : me("", !0),
1708
- a.items.length || a.loading ? (w(), x("div", {
1750
+ ], 4)) : xe("", !0),
1751
+ a.items.length || a.loading ? (x(), T("div", {
1709
1752
  key: 1,
1710
1753
  class: "vue-window-dynamic-virtual-scroll__spacer",
1711
1754
  style: C({
1712
- height: `${re.value}px`,
1713
- transform: `translateY(${r(Q)}px)`
1755
+ height: `${J.value}px`,
1756
+ transform: `translateY(${c(q)}px)`
1714
1757
  })
1715
1758
  }, [
1716
- (w(!0), x(we, null, ze(c.value, ({ item: M, index: ce, key: X, top: pe }) => (w(), x("div", {
1717
- key: X,
1759
+ (x(!0), T(ze, null, Ee(Me.value, ({ item: n, index: u, key: g, top: R }) => (x(), T("div", {
1760
+ key: g,
1718
1761
  ref_for: !0,
1719
- ref: (ye) => he(ye, X),
1762
+ ref: (Q) => ge(Q, g),
1720
1763
  class: "vue-window-dynamic-virtual-scroll__item",
1721
- style: C({ transform: `translateY(${pe}px)` }),
1764
+ style: C({ transform: `translateY(${R}px)` }),
1722
1765
  role: "listitem",
1723
- "aria-posinset": ce + 1,
1766
+ "aria-posinset": u + 1,
1724
1767
  "aria-setsize": a.items.length
1725
1768
  }, [
1726
- ne(d.$slots, "default", {
1727
- item: M,
1728
- index: ce
1769
+ ie(d.$slots, "default", {
1770
+ item: n,
1771
+ index: u
1729
1772
  })
1730
- ], 12, dt))), 128)),
1731
- a.loading ? (w(), x("div", {
1773
+ ], 12, mt))), 128)),
1774
+ a.loading ? (x(), T("div", {
1732
1775
  key: 0,
1733
1776
  class: "vue-window-dynamic-virtual-scroll__loading",
1734
1777
  style: C({
1735
- height: `${fe.value}px`,
1736
- transform: `translateY(${ie.value.total}px)`
1778
+ height: `${ye.value}px`,
1779
+ transform: `translateY(${fe.value.total}px)`
1737
1780
  }),
1738
1781
  role: "status",
1739
1782
  "aria-live": "polite"
1740
1783
  }, [
1741
- ne(d.$slots, "loading", {}, () => [
1742
- b[4] || (b[4] = Me("Loading more…", -1))
1784
+ ie(d.$slots, "loading", {}, () => [
1785
+ t[4] || (t[4] = Ie("Loading more…", -1))
1743
1786
  ])
1744
- ], 4)) : me("", !0)
1745
- ], 4)) : (w(), x("div", {
1787
+ ], 4)) : xe("", !0)
1788
+ ], 4)) : (x(), T("div", {
1746
1789
  key: 2,
1747
1790
  class: "vue-window-dynamic-virtual-scroll__empty",
1748
- style: C({ transform: `translateY(${r(Q)}px)` })
1791
+ style: C({ transform: `translateY(${c(q)}px)` })
1749
1792
  }, [
1750
- ne(d.$slots, "empty")
1793
+ ie(d.$slots, "empty")
1751
1794
  ], 4))
1752
- ], 42, ct));
1795
+ ], 42, ht));
1753
1796
  }
1754
- }), ft = ["aria-label"], ht = ["aria-posinset", "aria-setsize"], mt = /* @__PURE__ */ xe({
1797
+ }), pt = ["aria-label"], yt = ["aria-posinset", "aria-setsize"], Mt = /* @__PURE__ */ $e({
1755
1798
  name: "WindowGirdVirtualScroll",
1756
1799
  __name: "WindowGirdVirtualScroll",
1757
1800
  props: {
@@ -1771,133 +1814,133 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
1771
1814
  pullRefreshThreshold: { default: 64 }
1772
1815
  },
1773
1816
  emits: ["scroll", "loadMore", "refresh"],
1774
- setup(a, { expose: j, emit: H }) {
1775
- const e = a, g = H, f = N(), T = N(0), s = N(0), V = N(0);
1776
- let _, F = -1;
1777
- const { getItemKey: G } = $e({
1817
+ setup(a, { expose: _, emit: E }) {
1818
+ const e = a, y = E, f = P(), S = P(0), r = P(0), H = P(0);
1819
+ let U, F = -1;
1820
+ const { getItemKey: W } = He({
1778
1821
  componentName: "WindowGirdVirtualScroll",
1779
1822
  items: () => e.items,
1780
1823
  itemKey: () => e.itemKey
1781
1824
  }), {
1782
- pulling: q,
1783
- pullDistance: y,
1784
- pullOffset: k,
1825
+ pulling: Z,
1826
+ pullDistance: L,
1827
+ pullOffset: p,
1785
1828
  pullProgress: I,
1786
- refreshMessage: z,
1829
+ refreshMessage: w,
1787
1830
  refreshThreshold: A,
1788
- handleTouchStart: W,
1789
- handleTouchMove: Z,
1790
- handleTouchEnd: te,
1791
- handleTouchCancel: Y
1792
- } = Oe({
1831
+ handleTouchStart: V,
1832
+ handleTouchMove: N,
1833
+ handleTouchEnd: K,
1834
+ handleTouchCancel: ee
1835
+ } = Ke({
1793
1836
  enabled: () => e.pullToRefresh,
1794
1837
  refreshing: () => e.refreshing,
1795
1838
  threshold: () => e.pullRefreshThreshold,
1796
- onRefresh: () => g("refresh"),
1839
+ onRefresh: () => y("refresh"),
1797
1840
  scrollTop: () => typeof window > "u" ? 0 : Math.max(0, window.scrollY)
1798
- }), L = i(() => Math.max(1, e.itemSize)), J = i(
1841
+ }), $ = i(() => Math.max(1, e.itemSize)), X = i(
1799
1842
  () => Math.max(1, Math.floor(e.columns))
1800
- ), K = i(() => Math.max(0, e.gap)), Q = i(() => Math.max(0, Math.floor(e.overscan))), le = i(
1801
- () => Math.max(1, e.loadingItemSize ?? L.value)
1802
- ), ue = i(
1803
- () => L.value + K.value
1804
- ), U = i(
1805
- () => Math.ceil(e.items.length / J.value)
1806
- ), m = i(() => U.value === 0 ? 0 : U.value * L.value + (U.value - 1) * K.value), p = i(
1807
- () => m.value + (e.items.length ? K.value : 0)
1843
+ ), B = i(() => Math.max(0, e.gap)), q = i(() => Math.max(0, Math.floor(e.overscan))), ae = i(
1844
+ () => Math.max(1, e.loadingItemSize ?? $.value)
1845
+ ), he = i(
1846
+ () => $.value + B.value
1847
+ ), oe = i(
1848
+ () => Math.ceil(e.items.length / X.value)
1849
+ ), v = i(() => oe.value === 0 ? 0 : oe.value * $.value + (oe.value - 1) * B.value), M = i(
1850
+ () => v.value + (e.items.length ? B.value : 0)
1808
1851
  ), D = i(
1809
- () => m.value + (e.loading ? le.value + (e.items.length ? K.value : 0) : 0)
1810
- ), se = i(
1811
- () => Math.max(0, T.value - V.value)
1812
- ), ae = i(
1852
+ () => v.value + (e.loading ? ae.value + (e.items.length ? B.value : 0) : 0)
1853
+ ), ve = i(
1854
+ () => Math.max(0, S.value - H.value)
1855
+ ), te = i(
1813
1856
  () => Math.max(
1814
1857
  0,
1815
- Math.floor(se.value / ue.value) - Q.value
1858
+ Math.floor(ve.value / he.value) - q.value
1816
1859
  )
1817
- ), fe = i(() => {
1818
- if (U.value === 0) return 0;
1819
- const S = Math.max(
1820
- L.value,
1821
- T.value + s.value - V.value
1822
- ), R = Math.ceil(
1823
- (S + K.value) / ue.value
1860
+ ), ye = i(() => {
1861
+ if (oe.value === 0) return 0;
1862
+ const Y = Math.max(
1863
+ $.value,
1864
+ S.value + r.value - H.value
1865
+ ), j = Math.ceil(
1866
+ (Y + B.value) / he.value
1824
1867
  );
1825
1868
  return Math.min(
1826
- U.value,
1827
- R + Q.value
1869
+ oe.value,
1870
+ j + q.value
1828
1871
  );
1829
- }), oe = i(
1830
- () => Math.min(e.items.length, ae.value * J.value)
1831
- ), ie = i(
1832
- () => Math.min(e.items.length, fe.value * J.value)
1833
- ), re = i(
1834
- () => e.items.slice(oe.value, ie.value).map((S, R) => {
1835
- const n = oe.value + R;
1872
+ }), ne = i(
1873
+ () => Math.min(e.items.length, te.value * X.value)
1874
+ ), fe = i(
1875
+ () => Math.min(e.items.length, ye.value * X.value)
1876
+ ), J = i(
1877
+ () => e.items.slice(ne.value, fe.value).map((Y, j) => {
1878
+ const s = ne.value + j;
1836
1879
  return {
1837
- item: S,
1838
- index: n,
1839
- key: G(S, n),
1840
- rowIndex: Math.floor(n / J.value),
1841
- columnIndex: n % J.value
1880
+ item: Y,
1881
+ index: s,
1882
+ key: W(Y, s),
1883
+ rowIndex: Math.floor(s / X.value),
1884
+ columnIndex: s % X.value
1842
1885
  };
1843
1886
  })
1844
- ), de = i(() => ({
1845
- gridTemplateColumns: `repeat(${J.value}, minmax(0, 1fr))`,
1846
- columnGap: `${K.value}px`,
1847
- rowGap: `${K.value}px`,
1848
- transform: `translateY(${ae.value * ue.value}px)`
1887
+ ), me = i(() => ({
1888
+ gridTemplateColumns: `repeat(${X.value}, minmax(0, 1fr))`,
1889
+ columnGap: `${B.value}px`,
1890
+ rowGap: `${B.value}px`,
1891
+ transform: `translateY(${te.value * he.value}px)`
1849
1892
  }));
1850
- function h() {
1851
- typeof window > "u" || (T.value = Math.max(0, window.scrollY), s.value = window.innerHeight, f.value && (V.value = f.value.getBoundingClientRect().top + T.value));
1893
+ function m() {
1894
+ typeof window > "u" || (S.value = Math.max(0, window.scrollY), r.value = window.innerHeight, f.value && (H.value = f.value.getBoundingClientRect().top + S.value));
1852
1895
  }
1853
- function $() {
1854
- g("scroll", {
1855
- scrollTop: se.value,
1856
- startIndex: oe.value,
1857
- endIndex: ie.value
1896
+ function b() {
1897
+ y("scroll", {
1898
+ scrollTop: ve.value,
1899
+ startIndex: ne.value,
1900
+ endIndex: fe.value
1858
1901
  });
1859
1902
  }
1860
- function l() {
1861
- h(), $(), u();
1903
+ function z() {
1904
+ m(), b(), G();
1862
1905
  }
1863
- function u() {
1906
+ function G() {
1864
1907
  if (typeof window > "u" || !e.hasMore || e.loading || F === e.items.length)
1865
1908
  return;
1866
- const S = Math.max(0, e.loadMoreThreshold), R = V.value + D.value, n = T.value + s.value;
1867
- R - n <= S && (F = e.items.length, g("loadMore"));
1909
+ const Y = Math.max(0, e.loadMoreThreshold), j = H.value + D.value, s = S.value + r.value;
1910
+ j - s <= Y && (F = e.items.length, y("loadMore"));
1868
1911
  }
1869
- function c(S, R = {}) {
1912
+ function Me(Y, j = {}) {
1870
1913
  if (typeof window > "u") return;
1871
- h();
1872
- const n = Math.max(0, D.value - s.value), t = Math.min(
1873
- Math.max(0, Number.isFinite(S) ? S : 0),
1874
- n
1875
- ), o = Math.max(0, V.value + t), v = R.behavior ?? "auto";
1876
- v === "auto" && (T.value = o), window.scrollTo({ ...R, top: o, behavior: v });
1877
- }
1878
- function E(S, R = {}) {
1914
+ m();
1915
+ const s = Math.max(0, D.value - r.value), l = Math.min(
1916
+ Math.max(0, Number.isFinite(Y) ? Y : 0),
1917
+ s
1918
+ ), o = Math.max(0, H.value + l), h = j.behavior ?? "auto";
1919
+ h === "auto" && (S.value = o), window.scrollTo({ ...j, top: o, behavior: h });
1920
+ }
1921
+ function se(Y, j = {}) {
1879
1922
  if (typeof window > "u" || e.items.length === 0) return;
1880
- h();
1881
- const n = Math.min(
1923
+ m();
1924
+ const s = Math.min(
1882
1925
  e.items.length - 1,
1883
- Math.max(0, Math.floor(S))
1884
- ), t = Math.floor(n / J.value), { align: o = "start", ...v } = R;
1885
- let B = V.value + t * ue.value;
1886
- o === "center" ? B -= (s.value - L.value) / 2 : o === "end" && (B -= s.value - L.value);
1887
- const he = Math.max(
1888
- V.value,
1889
- V.value + D.value - s.value
1890
- ), ve = Math.max(0, Math.min(B, he)), ge = v.behavior ?? "auto";
1891
- ge === "auto" && (T.value = ve), window.scrollTo({
1892
- ...v,
1893
- top: ve,
1894
- behavior: ge
1926
+ Math.max(0, Math.floor(Y))
1927
+ ), l = Math.floor(s / X.value), { align: o = "start", ...h } = j;
1928
+ let k = H.value + l * he.value;
1929
+ o === "center" ? k -= (r.value - $.value) / 2 : o === "end" && (k -= r.value - $.value);
1930
+ const ge = Math.max(
1931
+ H.value,
1932
+ H.value + D.value - r.value
1933
+ ), pe = Math.max(0, Math.min(k, ge)), we = h.behavior ?? "auto";
1934
+ we === "auto" && (S.value = pe), window.scrollTo({
1935
+ ...h,
1936
+ top: pe,
1937
+ behavior: we
1895
1938
  });
1896
1939
  }
1897
- function P(S = "auto") {
1898
- typeof window > "u" || (h(), window.scrollTo({ top: Math.max(0, V.value), behavior: S }));
1940
+ function ue(Y = "auto") {
1941
+ typeof window > "u" || (m(), window.scrollTo({ top: Math.max(0, H.value), behavior: Y }));
1899
1942
  }
1900
- return ee(
1943
+ return le(
1901
1944
  () => [
1902
1945
  e.items.length,
1903
1946
  e.itemSize,
@@ -1905,128 +1948,128 @@ const Ge = ["aria-label"], Ue = ["aria-posinset", "aria-setsize"], Pe = /* @__PU
1905
1948
  e.gap
1906
1949
  ],
1907
1950
  async () => {
1908
- await O(), h(), u();
1951
+ await O(), m(), G();
1909
1952
  }
1910
- ), ee(
1953
+ ), le(
1911
1954
  () => [e.hasMore, e.loading],
1912
- async ([S]) => {
1913
- S || (F = -1), await O(), h(), u();
1955
+ async ([Y]) => {
1956
+ Y || (F = -1), await O(), m(), G();
1914
1957
  }
1915
- ), Se(() => {
1916
- h(), window.addEventListener("scroll", l, { passive: !0 }), window.addEventListener("resize", l, { passive: !0 }), typeof ResizeObserver < "u" && (_ = new ResizeObserver(() => {
1917
- h(), u();
1918
- }), f.value && _.observe(f.value)), O(u);
1919
- }), Ie(() => {
1920
- window.removeEventListener("scroll", l), window.removeEventListener("resize", l), _ && (_.disconnect(), _ = void 0);
1921
- }), j({
1922
- scrollTo: c,
1923
- scrollToIndex: E,
1924
- scrollToTop: P
1925
- }), (S, R) => (w(), x("div", {
1958
+ ), ke(() => {
1959
+ m(), window.addEventListener("scroll", z, { passive: !0 }), window.addEventListener("resize", z, { passive: !0 }), typeof ResizeObserver < "u" && (U = new ResizeObserver(() => {
1960
+ m(), G();
1961
+ }), f.value && U.observe(f.value)), O(G);
1962
+ }), Le(() => {
1963
+ window.removeEventListener("scroll", z), window.removeEventListener("resize", z), U && (U.disconnect(), U = void 0);
1964
+ }), _({
1965
+ scrollTo: Me,
1966
+ scrollToIndex: se,
1967
+ scrollToTop: ue
1968
+ }), (Y, j) => (x(), T("div", {
1926
1969
  ref_key: "root",
1927
1970
  ref: f,
1928
- class: He(["vue-window-gird-virtual-scroll", { "vue-window-gird-virtual-scroll--pulling": r(q) }]),
1971
+ class: Be(["vue-window-gird-virtual-scroll", { "vue-window-gird-virtual-scroll--pulling": c(Z) }]),
1929
1972
  role: "list",
1930
1973
  "aria-label": a.ariaLabel,
1931
- onTouchstartPassive: R[0] || (R[0] = //@ts-ignore
1932
- (...n) => r(W) && r(W)(...n)),
1933
- onTouchmove: R[1] || (R[1] = //@ts-ignore
1934
- (...n) => r(Z) && r(Z)(...n)),
1935
- onTouchend: R[2] || (R[2] = //@ts-ignore
1936
- (...n) => r(te) && r(te)(...n)),
1937
- onTouchcancel: R[3] || (R[3] = //@ts-ignore
1938
- (...n) => r(Y) && r(Y)(...n))
1974
+ onTouchstartPassive: j[0] || (j[0] = //@ts-ignore
1975
+ (...s) => c(V) && c(V)(...s)),
1976
+ onTouchmove: j[1] || (j[1] = //@ts-ignore
1977
+ (...s) => c(N) && c(N)(...s)),
1978
+ onTouchend: j[2] || (j[2] = //@ts-ignore
1979
+ (...s) => c(K) && c(K)(...s)),
1980
+ onTouchcancel: j[3] || (j[3] = //@ts-ignore
1981
+ (...s) => c(ee) && c(ee)(...s))
1939
1982
  }, [
1940
- a.pullToRefresh || a.refreshing ? (w(), x("div", {
1983
+ a.pullToRefresh || a.refreshing ? (x(), T("div", {
1941
1984
  key: 0,
1942
1985
  class: "vue-window-gird-virtual-scroll__refresh",
1943
1986
  style: C({
1944
- height: `${r(A)}px`,
1945
- transform: `translateY(${r(k) - r(A)}px)`
1987
+ height: `${c(A)}px`,
1988
+ transform: `translateY(${c(p) - c(A)}px)`
1946
1989
  }),
1947
1990
  role: "status",
1948
1991
  "aria-live": "polite"
1949
1992
  }, [
1950
- ne(S.$slots, "refresh", {
1951
- pullDistance: r(y),
1952
- progress: r(I),
1993
+ ie(Y.$slots, "refresh", {
1994
+ pullDistance: c(L),
1995
+ progress: c(I),
1953
1996
  refreshing: a.refreshing
1954
1997
  }, () => [
1955
- Me(Ee(r(z)), 1)
1998
+ Ie(Oe(c(w)), 1)
1956
1999
  ])
1957
- ], 4)) : me("", !0),
1958
- a.items.length || a.loading ? (w(), x("div", {
2000
+ ], 4)) : xe("", !0),
2001
+ a.items.length || a.loading ? (x(), T("div", {
1959
2002
  key: 1,
1960
2003
  class: "vue-window-gird-virtual-scroll__spacer",
1961
2004
  style: C({
1962
2005
  height: `${D.value}px`,
1963
- transform: `translateY(${r(k)}px)`
2006
+ transform: `translateY(${c(p)}px)`
1964
2007
  })
1965
2008
  }, [
1966
2009
  De("div", {
1967
2010
  class: "vue-window-gird-virtual-scroll__content",
1968
- style: C(de.value)
2011
+ style: C(me.value)
1969
2012
  }, [
1970
- (w(!0), x(we, null, ze(re.value, ({ item: n, index: t, key: o, rowIndex: v, columnIndex: B }) => (w(), x("div", {
2013
+ (x(!0), T(ze, null, Ee(J.value, ({ item: s, index: l, key: o, rowIndex: h, columnIndex: k }) => (x(), T("div", {
1971
2014
  key: o,
1972
2015
  class: "vue-window-gird-virtual-scroll__item",
1973
- style: C({ height: `${L.value}px` }),
2016
+ style: C({ height: `${$.value}px` }),
1974
2017
  role: "listitem",
1975
- "aria-posinset": t + 1,
2018
+ "aria-posinset": l + 1,
1976
2019
  "aria-setsize": a.items.length
1977
2020
  }, [
1978
- ne(S.$slots, "default", {
1979
- item: n,
1980
- index: t,
1981
- rowIndex: v,
1982
- columnIndex: B
2021
+ ie(Y.$slots, "default", {
2022
+ item: s,
2023
+ index: l,
2024
+ rowIndex: h,
2025
+ columnIndex: k
1983
2026
  })
1984
- ], 12, ht))), 128))
2027
+ ], 12, yt))), 128))
1985
2028
  ], 4),
1986
- a.loading ? (w(), x("div", {
2029
+ a.loading ? (x(), T("div", {
1987
2030
  key: 0,
1988
2031
  class: "vue-window-gird-virtual-scroll__loading",
1989
2032
  style: C({
1990
- height: `${le.value}px`,
1991
- transform: `translateY(${p.value}px)`
2033
+ height: `${ae.value}px`,
2034
+ transform: `translateY(${M.value}px)`
1992
2035
  }),
1993
2036
  role: "status",
1994
2037
  "aria-live": "polite"
1995
2038
  }, [
1996
- ne(S.$slots, "loading", {}, () => [
1997
- R[4] || (R[4] = Me("Loading more…", -1))
2039
+ ie(Y.$slots, "loading", {}, () => [
2040
+ j[4] || (j[4] = Ie("Loading more…", -1))
1998
2041
  ])
1999
- ], 4)) : me("", !0)
2000
- ], 4)) : (w(), x("div", {
2042
+ ], 4)) : xe("", !0)
2043
+ ], 4)) : (x(), T("div", {
2001
2044
  key: 2,
2002
2045
  class: "vue-window-gird-virtual-scroll__empty",
2003
- style: C({ transform: `translateY(${r(k)}px)` })
2046
+ style: C({ transform: `translateY(${c(p)}px)` })
2004
2047
  }, [
2005
- ne(S.$slots, "empty")
2048
+ ie(Y.$slots, "empty")
2006
2049
  ], 4))
2007
- ], 42, ft));
2050
+ ], 42, pt));
2008
2051
  }
2009
- }), gt = Pe, yt = {
2052
+ }), wt = Ne, Tt = {
2010
2053
  install(a) {
2011
- a.component("ChatVirtualScroll", _e), a.component("DynamicVirtualScroll", Pe), a.component("ShortMediaFeed", Je), a.component("SkeletonLoader", tt), a.component("VirtualCarousel", it), a.component("VirtualList", gt), a.component("VirtualScroll", ut), a.component(
2054
+ a.component("ChatVirtualScroll", Ze), a.component("DynamicVirtualScroll", Ne), a.component("ShortMediaFeed", tt), a.component("SkeletonLoader", nt), a.component("VirtualCarousel", ct), a.component("VirtualList", wt), a.component("VirtualScroll", ft), a.component(
2012
2055
  "WindowDynamicVirtualScroll",
2013
- vt
2056
+ gt
2014
2057
  ), a.component(
2015
2058
  "WindowGirdVirtualScroll",
2016
- mt
2059
+ Mt
2017
2060
  );
2018
2061
  }
2019
2062
  };
2020
2063
  export {
2021
- _e as ChatVirtualScroll,
2022
- Pe as DynamicVirtualScroll,
2023
- Je as ShortMediaFeed,
2024
- tt as SkeletonLoader,
2025
- it as VirtualCarousel,
2026
- gt as VirtualList,
2027
- ut as VirtualScroll,
2028
- yt as VueVirtualScroll,
2029
- vt as WindowDynamicVirtualScroll,
2030
- mt as WindowGirdVirtualScroll,
2031
- yt as default
2064
+ Ze as ChatVirtualScroll,
2065
+ Ne as DynamicVirtualScroll,
2066
+ tt as ShortMediaFeed,
2067
+ nt as SkeletonLoader,
2068
+ ct as VirtualCarousel,
2069
+ wt as VirtualList,
2070
+ ft as VirtualScroll,
2071
+ Tt as VueVirtualScroll,
2072
+ gt as WindowDynamicVirtualScroll,
2073
+ Mt as WindowGirdVirtualScroll,
2074
+ Tt as default
2032
2075
  };