x-sccba 0.2.3 → 0.2.4

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.
Files changed (207) hide show
  1. package/dist/umd/index.js +2 -2
  2. package/dist/vue2/index122.cjs +1 -1
  3. package/dist/vue2/index122.mjs +1 -1
  4. package/dist/vue2/index144.cjs +1 -1
  5. package/dist/vue2/index144.mjs +3 -3
  6. package/dist/vue2/index211.cjs +1 -1
  7. package/dist/vue2/index211.cjs.map +1 -1
  8. package/dist/vue2/index211.mjs +1 -1
  9. package/dist/vue2/index230.cjs +1 -1
  10. package/dist/vue2/index230.cjs.map +1 -1
  11. package/dist/vue2/index230.mjs +5 -167
  12. package/dist/vue2/index230.mjs.map +1 -1
  13. package/dist/vue2/index231.cjs +1 -1
  14. package/dist/vue2/index231.mjs +5 -5
  15. package/dist/vue2/index232.cjs +1 -1
  16. package/dist/vue2/index232.mjs +5 -5
  17. package/dist/vue2/index233.cjs +1 -1
  18. package/dist/vue2/index233.cjs.map +1 -1
  19. package/dist/vue2/index233.mjs +167 -5
  20. package/dist/vue2/index233.mjs.map +1 -1
  21. package/dist/vue2/index238.cjs +1 -1
  22. package/dist/vue2/index238.cjs.map +1 -1
  23. package/dist/vue2/index238.mjs +283 -49
  24. package/dist/vue2/index238.mjs.map +1 -1
  25. package/dist/vue2/index239.cjs +1 -1
  26. package/dist/vue2/index239.cjs.map +1 -1
  27. package/dist/vue2/index239.mjs +2 -127
  28. package/dist/vue2/index239.mjs.map +1 -1
  29. package/dist/vue2/index240.cjs +1 -1
  30. package/dist/vue2/index240.cjs.map +1 -1
  31. package/dist/vue2/index240.mjs +56 -35
  32. package/dist/vue2/index240.mjs.map +1 -1
  33. package/dist/vue2/index241.cjs +1 -1
  34. package/dist/vue2/index241.cjs.map +1 -1
  35. package/dist/vue2/index241.mjs +2 -208
  36. package/dist/vue2/index241.mjs.map +1 -1
  37. package/dist/vue2/index242.cjs +1 -1
  38. package/dist/vue2/index242.cjs.map +1 -1
  39. package/dist/vue2/index242.mjs +31 -170
  40. package/dist/vue2/index242.mjs.map +1 -1
  41. package/dist/vue2/index243.cjs +1 -1
  42. package/dist/vue2/index243.cjs.map +1 -1
  43. package/dist/vue2/index243.mjs +2 -970
  44. package/dist/vue2/index243.mjs.map +1 -1
  45. package/dist/vue2/index244.cjs +1 -1
  46. package/dist/vue2/index244.cjs.map +1 -1
  47. package/dist/vue2/index244.mjs +3 -845
  48. package/dist/vue2/index244.mjs.map +1 -1
  49. package/dist/vue2/index73.cjs.map +1 -1
  50. package/dist/vue2/index73.mjs.map +1 -1
  51. package/dist/vue3/index123.cjs +1 -1
  52. package/dist/vue3/index123.mjs +1 -1
  53. package/dist/vue3/index212.cjs +1 -1
  54. package/dist/vue3/index212.cjs.map +1 -1
  55. package/dist/vue3/index212.mjs +1 -1
  56. package/dist/vue3/index231.cjs +1 -1
  57. package/dist/vue3/index231.mjs +2 -2
  58. package/dist/vue3/index232.cjs +1 -1
  59. package/dist/vue3/index232.mjs +2 -2
  60. package/dist/vue3/index233.cjs +1 -1
  61. package/dist/vue3/index233.mjs +2 -2
  62. package/dist/vue3/index238.cjs +1 -1
  63. package/dist/vue3/index238.cjs.map +1 -1
  64. package/dist/vue3/index238.mjs +165 -32
  65. package/dist/vue3/index238.mjs.map +1 -1
  66. package/dist/vue3/index239.cjs +1 -1
  67. package/dist/vue3/index239.cjs.map +1 -1
  68. package/dist/vue3/index239.mjs +284 -167
  69. package/dist/vue3/index239.mjs.map +1 -1
  70. package/dist/vue3/index240.cjs +1 -1
  71. package/dist/vue3/index240.cjs.map +1 -1
  72. package/dist/vue3/index240.mjs +2 -284
  73. package/dist/vue3/index240.mjs.map +1 -1
  74. package/dist/vue3/index241.cjs +1 -1
  75. package/dist/vue3/index241.cjs.map +1 -1
  76. package/dist/vue3/index241.mjs +56 -2
  77. package/dist/vue3/index241.mjs.map +1 -1
  78. package/dist/vue3/index242.cjs +1 -1
  79. package/dist/vue3/index242.cjs.map +1 -1
  80. package/dist/vue3/index242.mjs +2 -56
  81. package/dist/vue3/index242.mjs.map +1 -1
  82. package/dist/vue3/index243.cjs +1 -1
  83. package/dist/vue3/index243.cjs.map +1 -1
  84. package/dist/vue3/index243.mjs +31 -2
  85. package/dist/vue3/index243.mjs.map +1 -1
  86. package/dist/vue3/index244.cjs +1 -1
  87. package/dist/vue3/index244.cjs.map +1 -1
  88. package/dist/vue3/index244.mjs +2 -31
  89. package/dist/vue3/index244.mjs.map +1 -1
  90. package/dist/vue3/index245.cjs +1 -1
  91. package/dist/vue3/index245.mjs +4 -2
  92. package/dist/vue3/index245.mjs.map +1 -1
  93. package/dist/vue3/index73.cjs.map +1 -1
  94. package/dist/vue3/index73.mjs.map +1 -1
  95. package/package.json +12 -27
  96. package/dist/vue2/index245.cjs +0 -2
  97. package/dist/vue2/index245.cjs.map +0 -1
  98. package/dist/vue2/index245.mjs +0 -59
  99. package/dist/vue2/index245.mjs.map +0 -1
  100. package/dist/vue2/index246.cjs +0 -2
  101. package/dist/vue2/index246.cjs.map +0 -1
  102. package/dist/vue2/index246.mjs +0 -36
  103. package/dist/vue2/index246.mjs.map +0 -1
  104. package/dist/vue2/index247.cjs +0 -2
  105. package/dist/vue2/index247.cjs.map +0 -1
  106. package/dist/vue2/index247.mjs +0 -167
  107. package/dist/vue2/index247.mjs.map +0 -1
  108. package/dist/vue2/index248.cjs +0 -2
  109. package/dist/vue2/index248.cjs.map +0 -1
  110. package/dist/vue2/index248.mjs +0 -17
  111. package/dist/vue2/index248.mjs.map +0 -1
  112. package/dist/vue2/index249.cjs +0 -2
  113. package/dist/vue2/index249.cjs.map +0 -1
  114. package/dist/vue2/index249.mjs +0 -287
  115. package/dist/vue2/index249.mjs.map +0 -1
  116. package/dist/vue2/index250.cjs +0 -2
  117. package/dist/vue2/index250.cjs.map +0 -1
  118. package/dist/vue2/index250.mjs +0 -5
  119. package/dist/vue2/index250.mjs.map +0 -1
  120. package/dist/vue2/index251.cjs +0 -2
  121. package/dist/vue2/index251.cjs.map +0 -1
  122. package/dist/vue2/index251.mjs +0 -59
  123. package/dist/vue2/index251.mjs.map +0 -1
  124. package/dist/vue2/index252.cjs +0 -2
  125. package/dist/vue2/index252.cjs.map +0 -1
  126. package/dist/vue2/index252.mjs +0 -5
  127. package/dist/vue2/index252.mjs.map +0 -1
  128. package/dist/vue2/index253.cjs +0 -2
  129. package/dist/vue2/index253.cjs.map +0 -1
  130. package/dist/vue2/index253.mjs +0 -34
  131. package/dist/vue2/index253.mjs.map +0 -1
  132. package/dist/vue2/index254.cjs +0 -2
  133. package/dist/vue2/index254.cjs.map +0 -1
  134. package/dist/vue2/index254.mjs +0 -5
  135. package/dist/vue2/index254.mjs.map +0 -1
  136. package/dist/vue2/index255.cjs +0 -2
  137. package/dist/vue2/index255.cjs.map +0 -1
  138. package/dist/vue2/index255.mjs +0 -105
  139. package/dist/vue2/index255.mjs.map +0 -1
  140. package/dist/vue2/index256.cjs +0 -2
  141. package/dist/vue2/index256.cjs.map +0 -1
  142. package/dist/vue2/index256.mjs +0 -21
  143. package/dist/vue2/index256.mjs.map +0 -1
  144. package/dist/vue2/index257.cjs +0 -2
  145. package/dist/vue2/index257.cjs.map +0 -1
  146. package/dist/vue2/index257.mjs +0 -134
  147. package/dist/vue2/index257.mjs.map +0 -1
  148. package/dist/vue2/index258.cjs +0 -2
  149. package/dist/vue2/index258.cjs.map +0 -1
  150. package/dist/vue2/index258.mjs +0 -7
  151. package/dist/vue2/index258.mjs.map +0 -1
  152. package/dist/vue3/index246.cjs +0 -2
  153. package/dist/vue3/index246.cjs.map +0 -1
  154. package/dist/vue3/index246.mjs +0 -130
  155. package/dist/vue3/index246.mjs.map +0 -1
  156. package/dist/vue3/index247.cjs +0 -2
  157. package/dist/vue3/index247.cjs.map +0 -1
  158. package/dist/vue3/index247.mjs +0 -38
  159. package/dist/vue3/index247.mjs.map +0 -1
  160. package/dist/vue3/index248.cjs +0 -2
  161. package/dist/vue3/index248.cjs.map +0 -1
  162. package/dist/vue3/index248.mjs +0 -211
  163. package/dist/vue3/index248.mjs.map +0 -1
  164. package/dist/vue3/index249.cjs +0 -2
  165. package/dist/vue3/index249.cjs.map +0 -1
  166. package/dist/vue3/index249.mjs +0 -173
  167. package/dist/vue3/index249.mjs.map +0 -1
  168. package/dist/vue3/index250.cjs +0 -2
  169. package/dist/vue3/index250.cjs.map +0 -1
  170. package/dist/vue3/index250.mjs +0 -936
  171. package/dist/vue3/index250.mjs.map +0 -1
  172. package/dist/vue3/index251.cjs +0 -2
  173. package/dist/vue3/index251.cjs.map +0 -1
  174. package/dist/vue3/index251.mjs +0 -807
  175. package/dist/vue3/index251.mjs.map +0 -1
  176. package/dist/vue3/index252.cjs +0 -2
  177. package/dist/vue3/index252.cjs.map +0 -1
  178. package/dist/vue3/index252.mjs +0 -55
  179. package/dist/vue3/index252.mjs.map +0 -1
  180. package/dist/vue3/index253.cjs +0 -2
  181. package/dist/vue3/index253.cjs.map +0 -1
  182. package/dist/vue3/index253.mjs +0 -36
  183. package/dist/vue3/index253.mjs.map +0 -1
  184. package/dist/vue3/index254.cjs +0 -2
  185. package/dist/vue3/index254.cjs.map +0 -1
  186. package/dist/vue3/index254.mjs +0 -138
  187. package/dist/vue3/index254.mjs.map +0 -1
  188. package/dist/vue3/index255.cjs +0 -2
  189. package/dist/vue3/index255.cjs.map +0 -1
  190. package/dist/vue3/index255.mjs +0 -17
  191. package/dist/vue3/index255.mjs.map +0 -1
  192. package/dist/vue3/index256.cjs +0 -2
  193. package/dist/vue3/index256.cjs.map +0 -1
  194. package/dist/vue3/index256.mjs +0 -7
  195. package/dist/vue3/index256.mjs.map +0 -1
  196. package/dist/vue3/index257.cjs +0 -2
  197. package/dist/vue3/index257.cjs.map +0 -1
  198. package/dist/vue3/index257.mjs +0 -105
  199. package/dist/vue3/index257.mjs.map +0 -1
  200. package/dist/vue3/index258.cjs +0 -2
  201. package/dist/vue3/index258.cjs.map +0 -1
  202. package/dist/vue3/index258.mjs +0 -21
  203. package/dist/vue3/index258.mjs.map +0 -1
  204. package/dist/vue3/index259.cjs +0 -2
  205. package/dist/vue3/index259.cjs.map +0 -1
  206. package/dist/vue3/index259.mjs +0 -134
  207. package/dist/vue3/index259.mjs.map +0 -1
@@ -1,936 +0,0 @@
1
- import { computed, toValue, ref, onMounted, nextTick, onActivated, onBeforeUnmount, watch, markRaw, shallowReactive } from "vue";
2
- import { r as f } from "./index258.mjs";
3
- function st(n, o, s) {
4
- return f(n, o, s);
5
- }
6
- function Be(n, o) {
7
- return n.map((s, u) => st(s, u, o));
8
- }
9
- function wn(n, o, s) {
10
- const u = [], l = [];
11
- for (let f2 = 0; f2 < n.length; f2++) {
12
- const I = n[f2], x = st(I, f2, o), T = s(I, f2, x);
13
- u.push(x), l.push(typeof T == "number" && T > 0 ? T : null);
14
- }
15
- return {
16
- keys: u,
17
- sizes: l
18
- };
19
- }
20
- function xn(n, o, s) {
21
- if (!n || n.keys.length !== o.length || n.sizes.length !== o.length)
22
- return false;
23
- for (let u = 0; u < o.length; u++)
24
- if (n.keys[u] !== st(o[u], u, s))
25
- return false;
26
- return true;
27
- }
28
- function bn(n, o, s) {
29
- if (!xn(n, o, s))
30
- return {};
31
- const u = {};
32
- for (let l = 0; l < n.keys.length; l++) {
33
- const f2 = n.sizes[l];
34
- typeof f2 == "number" && f2 > 0 && (u[n.keys[l]] = f2);
35
- }
36
- return u;
37
- }
38
- function zn(n, o) {
39
- if (!n.length || o.length <= n.length)
40
- return 0;
41
- const s = n[0], u = o.indexOf(s);
42
- if (u <= 0 || u + n.length < o.length && n.length > o.length - u)
43
- return 0;
44
- for (let l = 0; l < n.length; l++)
45
- if (o[u + l] !== n[l])
46
- return 0;
47
- return u;
48
- }
49
- function At(n, o, s, u, l, f2 = 0) {
50
- const I = l ?? "start";
51
- if (I === "nearest") {
52
- const x = s + u, T = n + o;
53
- return n >= s && T <= x ? null : n < s ? n + f2 : T - u + f2;
54
- }
55
- return I === "end" ? n + o - u + f2 : I === "center" ? n + (o - u) / 2 + f2 : n + f2;
56
- }
57
- function Mn(n) {
58
- return n.flowMode && n.direction === "vertical" && !n.gridItems ? "flow" : n.disableTransform ? "position" : "transform";
59
- }
60
- function Tn(n, o) {
61
- const s = o.direction === "vertical", u = o.mode ?? "transform", l = {
62
- visibility: n.nr.used ? "visible" : "hidden",
63
- pointerEvents: n.nr.used ? void 0 : "none"
64
- };
65
- if (u === "flow" ? l.display = n.nr.used ? void 0 : "none" : (l.position = "absolute", l.top = "0px", l.left = "0px", l.display = void 0), u === "position" ? (l[s ? "top" : "left"] = `${n.position}px`, l[s ? "left" : "top"] = `${n.offset}px`, l.transform = "none", l.willChange = "unset") : u === "transform" && (l.transform = s ? `translateY(${n.position}px) translateX(${n.offset}px)` : `translateX(${n.position}px) translateY(${n.offset}px)`, l.willChange = "transform"), o.gridItems && o.itemSize != null) {
66
- const f2 = o.itemSecondarySize || o.itemSize;
67
- l.width = `${s ? f2 : o.itemSize}px`, l.height = `${s ? o.itemSize : f2}px`;
68
- }
69
- return l;
70
- }
71
- function Ut(n) {
72
- return computed(() => toValue(n));
73
- }
74
- function En(n, o, s, u, l) {
75
- const f2 = Ut(n);
76
- return {
77
- el: computed(() => {
78
- const I = f2.value.el;
79
- return toValue(o ?? I);
80
- }),
81
- before: computed(() => {
82
- const I = f2.value.before;
83
- return toValue(s ?? I);
84
- }),
85
- after: computed(() => {
86
- const I = f2.value.after;
87
- return toValue(u ?? I);
88
- }),
89
- scrollParent: computed(() => {
90
- const I = f2.value.scrollParent;
91
- return toValue(I);
92
- }),
93
- callbacks: {
94
- onResize: () => {
95
- var I;
96
- return (I = (l == null ? void 0 : l.onResize) ?? f2.value.onResize) == null ? void 0 : I();
97
- },
98
- onVisible: () => {
99
- var I;
100
- return (I = (l == null ? void 0 : l.onVisible) ?? f2.value.onVisible) == null ? void 0 : I();
101
- },
102
- onHidden: () => {
103
- var I;
104
- return (I = (l == null ? void 0 : l.onHidden) ?? f2.value.onHidden) == null ? void 0 : I();
105
- },
106
- onUpdate: (I, x, T, N) => {
107
- var ge;
108
- return (ge = (l == null ? void 0 : l.onUpdate) ?? f2.value.onUpdate) == null ? void 0 : ge(I, x, T, N);
109
- }
110
- }
111
- };
112
- }
113
- const Vn = {
114
- itemsLimit: 1e3
115
- };
116
- function $t(n) {
117
- return typeof window < "u" && n === window;
118
- }
119
- const _n = (() => {
120
- if (typeof document > "u")
121
- return "negative";
122
- const n = document.createElement("div"), o = document.createElement("div");
123
- n.style.width = "4px", n.style.height = "1px", n.style.overflow = "auto", n.style.direction = "rtl", o.style.width = "8px", o.style.height = "1px", n.appendChild(o), document.body.appendChild(n), n.scrollLeft = -1;
124
- const s = n.scrollLeft < 0;
125
- return document.body.removeChild(n), s ? "negative" : "default";
126
- })();
127
- function pe(n, o, s) {
128
- return o !== "horizontal" || !s || $t(s) || getComputedStyle(s).direction !== "rtl" ? n : _n === "negative" ? -n : n;
129
- }
130
- function Pn(n, o, s) {
131
- return pe(n, o, s);
132
- }
133
- function it(n, o, s, u) {
134
- const l = Pn(s, o, n), f2 = !!(u != null && u.smooth);
135
- if ($t(n)) {
136
- o === "vertical" ? n.scrollTo({
137
- top: l,
138
- behavior: f2 ? "smooth" : "auto"
139
- }) : n.scrollTo({
140
- left: l,
141
- behavior: f2 ? "smooth" : "auto"
142
- });
143
- return;
144
- }
145
- if (typeof n.scrollTo == "function") {
146
- n.scrollTo(o === "vertical" ? { top: l, behavior: f2 ? "smooth" : "auto" } : { left: l, behavior: f2 ? "smooth" : "auto" });
147
- return;
148
- }
149
- o === "vertical" ? n.scrollTop = l : n.scrollLeft = l;
150
- }
151
- function Fn(n, o, s, u) {
152
- if (s) {
153
- if (u && u !== window) {
154
- const l = u;
155
- return o === "vertical" ? l.clientHeight : l.clientWidth;
156
- }
157
- return o === "vertical" ? window.innerHeight : window.innerWidth;
158
- }
159
- return o === "vertical" ? n.clientHeight : n.clientWidth;
160
- }
161
- const Ln = /auto|scroll/;
162
- function jt(n, o) {
163
- return n.parentNode === null ? o : jt(n.parentNode, [...o, n]);
164
- }
165
- function ot(n, o) {
166
- return getComputedStyle(n, null).getPropertyValue(o);
167
- }
168
- function Cn(n) {
169
- return ot(n, "overflow") + ot(n, "overflow-y") + ot(n, "overflow-x");
170
- }
171
- function Rn(n) {
172
- return Ln.test(Cn(n));
173
- }
174
- function Wn(n) {
175
- if (!(n instanceof HTMLElement || n instanceof SVGElement))
176
- return;
177
- if (n.parentNode === null)
178
- return document.scrollingElement || document.documentElement;
179
- const o = jt(n.parentNode, []);
180
- for (let s = 0; s < o.length; s += 1)
181
- if (o[s] instanceof Element && Rn(o[s]))
182
- return o[s];
183
- return document.scrollingElement || document.documentElement;
184
- }
185
- function kn(n, o) {
186
- if (o)
187
- return o;
188
- if (!n)
189
- return;
190
- const s = Wn(n);
191
- if (s)
192
- return typeof window < "u" && window.document && (s === window.document.documentElement || s === window.document.body) ? window : s;
193
- }
194
- let lt = false;
195
- function Nn() {
196
- return lt;
197
- }
198
- if (typeof window < "u") {
199
- lt = false;
200
- try {
201
- const n = Object.defineProperty({}, "passive", {
202
- get() {
203
- lt = true;
204
- }
205
- });
206
- window.addEventListener("test", null, n);
207
- } catch {
208
- }
209
- }
210
- function D(n) {
211
- return typeof n == "number" ? n : null;
212
- }
213
- function Hn(n, o, s, u, l) {
214
- return typeof s == "number" ? s : typeof s == "function" ? s(n, o) || u || void 0 : u || (n == null ? void 0 : n[l ?? "size"]) || void 0;
215
- }
216
- function An(n, o, s, u, l, f2) {
217
- return typeof s == "function" ? s(n, o) || u || Number(l) || 0 : u || (n == null ? void 0 : n[f2 ?? "size"]) || Number(l) || 0;
218
- }
219
- let Bn = 0;
220
- const Yn = [];
221
- function On(n) {
222
- for (let o = 0; o < n.length; o++)
223
- n[o];
224
- }
225
- function Un(n, o) {
226
- return n && typeof n == "object" ? n[o] : void 0;
227
- }
228
- function Ye(n, o) {
229
- return n.map((s) => Un(s, o));
230
- }
231
- function $n(n, o, s, u) {
232
- if (n.length !== s.length || o.length !== u.length)
233
- return false;
234
- for (let l = 0; l < n.length; l++)
235
- if (n[l] !== s[l] || o[l] !== u[l])
236
- return false;
237
- return true;
238
- }
239
- function jn(n) {
240
- const o = n;
241
- o._vs_styleStamp++;
242
- }
243
- function Bt(n) {
244
- const o = n;
245
- o._vs_visibilityStamp++, o._vs_styleStamp++;
246
- }
247
- function Dn(n, o, s, u) {
248
- if (s) {
249
- for (const l of s)
250
- u(l);
251
- return;
252
- }
253
- for (let l = n; l < o; l++)
254
- u(l);
255
- }
256
- const Yt = 8, Ot = 1;
257
- function qn(n, o, s, u, l, f$1) {
258
- const I = Ut(n), x = En(I, o, s, u, l), T = computed(() => {
259
- const e = toValue(v().items);
260
- return On(e), e;
261
- }), N = ref([]), ge = ref(0), Se = ref(0), ye = ref(0), le = ref(false);
262
- let G = 0, X = 0, at = 0, ut = 0, ct = false, ee = null;
263
- const Ue = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map();
264
- let Ee = false, je = 0, dt = 0, De = false, se = null, ae = null, q = null, Ge = 0, Ie = null, we = null, Ve = [], xe = [], te = null, Y = null, be = null, Xe = false, ft = false, mt = false;
265
- const _e = /* @__PURE__ */ new Set(), Pe = ref({}), qe = [], ht = {
266
- accumulator: 0
267
- };
268
- function v() {
269
- return I.value;
270
- }
271
- function ue() {
272
- return (f$1 == null ? void 0 : f$1.pageMode) ?? v().pageMode;
273
- }
274
- const M = computed(() => toValue(v().enabled ?? true)), ze = computed(() => kn(
275
- x.el.value,
276
- x.scrollParent.value
277
- )), Z = computed(() => {
278
- const e = T.value;
279
- return e.length > 0 && typeof e[0] != "object";
280
- }), Me = computed(() => {
281
- const e = v();
282
- if (D(e.itemSize) === null) {
283
- const r = T.value, i = Array.from({ length: r.length });
284
- ht.accumulator = 0, i[-1] = ht;
285
- const a = e.minItemSize, d = Pe.value, h = Z.value;
286
- let S = 1e4, p = 0, z;
287
- for (let c = 0, m = r.length; c < m; c++) {
288
- const V = h ? c : f(r[c], c, e.keyField);
289
- z = An(
290
- r[c],
291
- c,
292
- e.itemSize,
293
- d[V],
294
- a,
295
- e.sizeField
296
- ), z < S && (S = z), p += z;
297
- const E = qe[c] ?? (qe[c] = {
298
- accumulator: 0,
299
- size: void 0
300
- });
301
- E.accumulator = p, E.size = z, i[c] = E;
302
- }
303
- return qe.length = r.length, Ge = S, i;
304
- }
305
- return Yn;
306
- }), Dt = computed(
307
- () => N.value.filter((e) => (e._vs_visibilityStamp, e.nr.used)).sort((e, t) => e.nr.index - t.nr.index)
308
- ), Gt = computed(() => {
309
- const e = v(), t = Z.value ? null : e.keyField;
310
- return wn(T.value, t, (r, i, a) => Hn(
311
- r,
312
- i,
313
- e.itemSize,
314
- Pe.value[a],
315
- e.sizeField
316
- ));
317
- });
318
- function J(e = v()) {
319
- return e.direction ?? "vertical";
320
- }
321
- function ce(e = v()) {
322
- const t = J(e);
323
- let r = e.flowMode ?? false;
324
- return r && t !== "vertical" && (ft || (console.warn("[vue-recycle-scroller] flowMode only supports vertical lists. Falling back to standard positioning."), ft = true), r = false), r && e.gridItems && (mt || (console.warn("[vue-recycle-scroller] flowMode does not support gridItems. Falling back to standard positioning."), mt = true), r = false), Mn({
325
- direction: t,
326
- disableTransform: e.disableTransform ?? false,
327
- flowMode: r,
328
- gridItems: e.gridItems
329
- });
330
- }
331
- function vt() {
332
- N.value.sort((e, t) => e.nr.used !== t.nr.used ? e.nr.used ? -1 : 1 : e.nr.used && t.nr.used ? e.nr.index - t.nr.index : e.nr.id - t.nr.id);
333
- }
334
- function Ze(e) {
335
- const t = v();
336
- return Pe.value = bn(e, T.value, Z.value ? null : t.keyField), Object.keys(Pe.value).length > 0;
337
- }
338
- function pt(e) {
339
- let t = $e.get(e);
340
- return t || (t = [], $e.set(e, t)), t;
341
- }
342
- function Xt(e, t, r, i, a) {
343
- const d = markRaw({
344
- id: Bn++,
345
- index: t,
346
- used: true,
347
- key: i,
348
- type: a
349
- }), h = shallowReactive({
350
- item: r,
351
- position: 0,
352
- offset: 0,
353
- nr: d,
354
- _vs_styleStamp: 0,
355
- _vs_visibilityStamp: 0
356
- });
357
- return e.push(h), h;
358
- }
359
- function qt(e) {
360
- const t = pt(e);
361
- if (t && t.length) {
362
- const r = t.pop();
363
- return r.nr.used = true, Bt(r), r;
364
- }
365
- }
366
- function gt(e, t) {
367
- const r = N.value, i = r.indexOf(e);
368
- if (i === -1)
369
- return;
370
- const a = Math.max(0, Math.min(t, r.length - 1));
371
- i !== a && (r.splice(i, 1), r.splice(a, 0, e));
372
- }
373
- function Zt(e) {
374
- gt(e, N.value.length - 1);
375
- }
376
- function Jt() {
377
- const e = N.value;
378
- let t = 0;
379
- for (; t < e.length && !e[t].nr.used; )
380
- t++;
381
- let r = 0;
382
- for (let i = t; i < e.length && e[i].nr.used; i++)
383
- r++;
384
- return {
385
- activeStart: t,
386
- activeCount: r,
387
- headInsertCount: 0
388
- };
389
- }
390
- function Qt(e, t, r) {
391
- let i = null;
392
- t < G ? (i = r.activeStart + r.headInsertCount, r.headInsertCount++, r.activeCount++) : t >= X && (i = r.activeStart + r.activeCount, r.activeCount++), i != null && gt(e, i);
393
- }
394
- function St(e, t = false) {
395
- const r = e.nr.type;
396
- pt(r).push(e), e.nr.used = false, e.position = v().hiddenPosition ?? -999999, Bt(e), Ue.delete(e.nr.key), t && Zt(e);
397
- }
398
- function Kt() {
399
- Ue.clear(), $e.clear();
400
- for (let e = 0, t = N.value.length; e < t; e++) {
401
- const r = N.value[e];
402
- r && St(r);
403
- }
404
- }
405
- function Je(e) {
406
- let t = -1;
407
- return t = requestAnimationFrame(() => {
408
- _e.delete(t), e();
409
- }), _e.add(t), t;
410
- }
411
- function yt() {
412
- for (const e of _e)
413
- cancelAnimationFrame(e);
414
- _e.clear();
415
- }
416
- function It() {
417
- se && (clearTimeout(se), se = null), ae && (clearTimeout(ae), ae = null), q && (clearTimeout(q), q = null), Y && (clearTimeout(Y), Y = null), be && (clearTimeout(be), be = null);
418
- }
419
- function Qe() {
420
- var e, t;
421
- M.value && ((t = (e = x.callbacks).onResize) == null || t.call(e), le.value && L(false));
422
- }
423
- function Ke() {
424
- if (!M.value)
425
- return;
426
- te && !Xe && ne();
427
- const e = v();
428
- if (!Ee) {
429
- if (Ee = true, se)
430
- return;
431
- const t = () => Je(() => {
432
- Ee = false;
433
- const { continuous: r } = L(false, true);
434
- r || (ae && clearTimeout(ae), ae = setTimeout(Ke, e.updateInterval + 100));
435
- });
436
- t(), e.updateInterval && (se = setTimeout(() => {
437
- se = null, Ee && t();
438
- }, e.updateInterval));
439
- }
440
- }
441
- function en(e, t) {
442
- var r, i, a, d;
443
- M.value && le.value && (e || t.boundingClientRect.width !== 0 || t.boundingClientRect.height !== 0 ? ((i = (r = x.callbacks).onVisible) == null || i.call(r), Je(() => {
444
- L(false);
445
- })) : (d = (a = x.callbacks).onHidden) == null || d.call(a));
446
- }
447
- function tn() {
448
- return ze.value ?? window;
449
- }
450
- function Fe() {
451
- const e = x.before.value;
452
- if (!e)
453
- return 0;
454
- const t = v();
455
- return J(t) === "vertical" ? e.scrollHeight : e.scrollWidth;
456
- }
457
- function de() {
458
- const e = x.el.value;
459
- if (!e)
460
- return { start: 0, end: 0 };
461
- const t = v(), r = J(t), i = r === "vertical";
462
- let a;
463
- if (ue()) {
464
- const d = e.getBoundingClientRect(), h = i ? d.height : d.width, S = ze.value, p = !S || S === window, z = p ? 0 : S.getBoundingClientRect().top, c = p ? 0 : S.getBoundingClientRect().left, m = p ? window.innerHeight : S.clientHeight, V = p ? window.innerWidth : S.clientWidth;
465
- let E = i ? -(d.top - z) : -(d.left - c), W = i ? m : V;
466
- E < 0 && (W += E, E = 0), E + W > h && (W = h - E), a = {
467
- start: E,
468
- end: E + W
469
- };
470
- } else i ? a = {
471
- start: e.scrollTop,
472
- end: e.scrollTop + e.clientHeight
473
- } : a = {
474
- start: pe(e.scrollLeft, r, e),
475
- end: pe(e.scrollLeft, r, e) + e.clientWidth
476
- };
477
- return a;
478
- }
479
- function nn() {
480
- const e = x.el.value;
481
- if (!e)
482
- return { start: 0, end: 0 };
483
- const t = v();
484
- if (J(t) === "vertical") {
485
- const r = pe(e.scrollLeft, "horizontal", e);
486
- return {
487
- start: r,
488
- end: r + e.clientWidth
489
- };
490
- }
491
- return {
492
- start: e.scrollTop,
493
- end: e.scrollTop + e.clientHeight
494
- };
495
- }
496
- function rn(e, t, r, i) {
497
- var S, p, z, c;
498
- const a = Fe(), d = e.start - i - a, h = e.end + i - a;
499
- if (G > 0) {
500
- const m = ((S = r[G - 1]) == null ? void 0 : S.accumulator) ?? 0;
501
- if (d <= m)
502
- return true;
503
- }
504
- if (G < t - 1) {
505
- const m = ((p = r[G]) == null ? void 0 : p.accumulator) ?? Number.POSITIVE_INFINITY;
506
- if (d > m)
507
- return true;
508
- }
509
- if (X > 1) {
510
- const m = ((z = r[X - 2]) == null ? void 0 : z.accumulator) ?? 0;
511
- if (h <= m)
512
- return true;
513
- }
514
- if (X < t) {
515
- const m = ((c = r[X - 1]) == null ? void 0 : c.accumulator) ?? Number.POSITIVE_INFINITY;
516
- if (h > m)
517
- return true;
518
- }
519
- return false;
520
- }
521
- function Le(e) {
522
- const t = v(), r = D(t.itemSize);
523
- if (r !== null)
524
- return r;
525
- const i = Me.value[e];
526
- return (i == null ? void 0 : i.size) || Number(t.minItemSize) || 0;
527
- }
528
- function on(e) {
529
- const t = v();
530
- return Tn(e, {
531
- direction: J(t),
532
- mode: ce(t),
533
- itemSize: D(t.itemSize),
534
- gridItems: t.gridItems,
535
- itemSecondarySize: t.itemSecondarySize
536
- });
537
- }
538
- function U(e) {
539
- var a;
540
- const t = v(), r = t.gridItems || 1, i = D(t.itemSize);
541
- return e <= 0 ? 0 : i !== null ? Math.floor(e / r) * i : ((a = Me.value[e - 1]) == null ? void 0 : a.accumulator) || 0;
542
- }
543
- function wt(e) {
544
- const t = v(), r = T.value.length, i = t.gridItems || 1, a = D(t.itemSize);
545
- if (!r)
546
- return 0;
547
- if (a !== null) {
548
- const p = Math.floor(e / a) * i;
549
- return Math.min(Math.max(p, 0), r - 1);
550
- }
551
- let d = 0, h = r - 1, S = 0;
552
- for (; d <= h; ) {
553
- const p = Math.floor((d + h) / 2);
554
- U(p) <= e ? (S = p, d = p + 1) : h = p - 1;
555
- }
556
- return S;
557
- }
558
- function ne() {
559
- Y && (clearTimeout(Y), Y = null), te = null;
560
- }
561
- function ln() {
562
- Y && clearTimeout(Y), Y = setTimeout(() => {
563
- te = null, Y = null;
564
- }, 150);
565
- }
566
- function sn(e, t) {
567
- if (!e.length) {
568
- ne();
569
- return;
570
- }
571
- const r = Math.max(de().start - Fe(), 0), i = Math.min(wt(r), e.length - 1), a = e[i], d = t ? f(a, i, t) : i, h = Fe() + U(i);
572
- te = {
573
- key: d,
574
- offset: de().start - h
575
- };
576
- }
577
- function xt(e) {
578
- if (!te)
579
- return false;
580
- const t = v(), r = e ?? T.value, i = Z.value ? null : t.keyField, d = Be(r, i).indexOf(te.key);
581
- if (d === -1)
582
- return ne(), false;
583
- const h = Fe() + U(d) + te.offset, S = de().start;
584
- return Math.abs(h - S) < 0.5 ? false : (Xe = true, Ce(h), Je(() => {
585
- Xe = false;
586
- }), true);
587
- }
588
- function Te() {
589
- if (fe(), !M.value)
590
- return;
591
- const e = ue() ? tn() : x.el.value;
592
- e && (Ie = e, Ie.addEventListener("scroll", Ke, Nn() ? { passive: true } : false), ue() && e === window && (we = e, we.addEventListener("resize", Qe)));
593
- }
594
- function fe() {
595
- Ie && (Ie.removeEventListener("scroll", Ke), Ie = null), we && (we.removeEventListener("resize", Qe), we = null);
596
- }
597
- function an(e, t, r, i, a, d) {
598
- const h = Math.ceil(e / t) * r, S = Math.max(0, Math.floor(a.start / r)), p = Math.min(Math.ceil(a.end / r), Math.ceil(e / t)), z = Math.max(0, Math.floor(d.start / i)), c = Math.min(Math.ceil(d.end / i), t), m = [];
599
- for (let W = S; W < p; W++) {
600
- const me = W * t;
601
- for (let w = z; w < c; w++) {
602
- const g = me + w;
603
- if (g >= e)
604
- break;
605
- m.push(g);
606
- }
607
- }
608
- const V = m[0] ?? 0, E = m.at(-1) ?? -1;
609
- return {
610
- renderedIndices: m,
611
- startIndex: V,
612
- endIndex: E + 1,
613
- visibleStartIndex: V,
614
- visibleEndIndex: E,
615
- totalSize: h
616
- };
617
- }
618
- function un() {
619
- const e = v(), t = D(e.itemSize);
620
- if (!e.gridItems || t == null)
621
- return false;
622
- const r = x.el.value;
623
- if (!r)
624
- return false;
625
- const i = e.itemSecondarySize || t, a = J(e) === "vertical" ? r.clientWidth : r.clientHeight;
626
- return i * e.gridItems > a;
627
- }
628
- function bt(e, t, r, i) {
629
- if (Math.abs(e - t) !== 1 || t < 0 || t >= r)
630
- return e;
631
- const a = e > t ? U(t) + Le(t) : U(t);
632
- return Math.abs(a - i) <= Yt ? t : e;
633
- }
634
- function zt(e, t, r, i, a) {
635
- if (Math.abs(e - t) !== 1)
636
- return e;
637
- const d = a ? t - 1 : t;
638
- if (d < 0 || d >= r)
639
- return e;
640
- const h = e > t ? U(d) + Le(d) : U(d);
641
- return Math.abs(h - i) <= Yt ? t : e;
642
- }
643
- function cn(e, t, r) {
644
- const i = {
645
- ...e,
646
- visibleStartIndex: bt(e.visibleStartIndex, at, t, r.rawViewportStart),
647
- visibleEndIndex: zt(e.visibleEndIndex, ut, t, r.rawViewportEnd, false),
648
- startIndex: bt(e.startIndex, G, t, r.renderStart),
649
- endIndex: zt(e.endIndex, X, t, r.renderEnd, true)
650
- };
651
- i.startIndex > i.visibleStartIndex && (i.startIndex = i.visibleStartIndex);
652
- const a = Math.min(t, i.visibleEndIndex + 1);
653
- return i.endIndex < a && (i.endIndex = a), i.endIndex < i.startIndex && (i.endIndex = i.startIndex), i;
654
- }
655
- function L(e, t = false) {
656
- var Vt, _t, Pt, Ft, Lt, Ct, Rt, Wt, kt;
657
- if (!M.value)
658
- return { continuous: true };
659
- const r = v(), i = D(r.itemSize), a = r.gridItems || 1, d = r.itemSecondarySize || i || 0, h = Ge, S = r.typeField, p = Z.value ? null : r.keyField, z = T.value, c = z.length, m = Me.value, V = Ue, E = N.value;
660
- let W = null, me = null, w, g, H, _, P;
661
- const hn = i !== null || c === 0 || m[c - 1] != null;
662
- if (!c || !hn)
663
- !c || !ee ? w = g = _ = P = H = 0 : (w = Math.min(ee.startIndex, c), g = Math.min(ee.endIndex, c), _ = Math.min(ee.visibleStartIndex, c), P = Math.min(ee.visibleEndIndex, c), H = ((Vt = m[c - 1]) == null ? void 0 : Vt.accumulator) ?? ee.totalSizeValue);
664
- else if (De)
665
- w = _ = 0, g = P = Math.min(r.prerender, z.length), H = 0;
666
- else {
667
- const b = de(), R = nn(), $ = je, j = dt, C = { ...b }, he = { ...R };
668
- if (t) {
669
- let F = b.start - $;
670
- F < 0 && (F = -F);
671
- let oe = R.start - j;
672
- oe < 0 && (oe = -oe);
673
- const Ne = i === null && rn(b, c, m, r.buffer), k = i === null && (F >= h || Ne) || i !== null && F >= i, He = a > 1 && i != null && oe >= d;
674
- if (!k && !He)
675
- return {
676
- continuous: true
677
- };
678
- }
679
- je = b.start, dt = R.start;
680
- const Q = r.buffer;
681
- C.start -= Q, C.end += Q, he.start -= Q, he.end += Q;
682
- let O = 0;
683
- const Nt = x.before.value;
684
- Nt && (O = Nt.scrollHeight, C.start -= O);
685
- const Ht = x.after.value;
686
- if (Ht) {
687
- const F = Ht.scrollHeight;
688
- C.end += F;
689
- }
690
- const vn = ce(r) === "flow" && i === null && !t && ct && Math.abs(b.start - $) <= Ot && Math.abs(R.start - j) <= Ot;
691
- if (i === null) {
692
- let F, oe = 0, Ne = c - 1, k = ~~(c / 2), He;
693
- do
694
- He = k, F = ((_t = m[k]) == null ? void 0 : _t.accumulator) ?? 0, F < C.start ? oe = k : k < c - 1 && (((Pt = m[k + 1]) == null ? void 0 : Pt.accumulator) ?? Number.POSITIVE_INFINITY) > C.start && (Ne = k), k = ~~((oe + Ne) / 2);
695
- while (k !== He);
696
- for (k < 0 && (k = 0), w = k, H = ((Ft = m[c - 1]) == null ? void 0 : Ft.accumulator) ?? 0, g = k; g < c && (((Lt = m[g]) == null ? void 0 : Lt.accumulator) ?? 0) < C.end; g++) ;
697
- for (g === -1 ? g = z.length - 1 : (g++, g > c && (g = c)), _ = w; _ < c && O + (((Ct = m[_]) == null ? void 0 : Ct.accumulator) ?? Number.POSITIVE_INFINITY) < C.start; _++) ;
698
- for (P = _; P < c && O + (((Rt = m[P]) == null ? void 0 : Rt.accumulator) ?? 0) < C.end; P++) ;
699
- if (vn) {
700
- const Ae = cn({
701
- startIndex: w,
702
- endIndex: g,
703
- visibleStartIndex: _,
704
- visibleEndIndex: P
705
- }, c, {
706
- rawViewportStart: b.start - O,
707
- rawViewportEnd: b.end - O,
708
- renderStart: b.start - Q - O,
709
- renderEnd: b.end + Q - O
710
- });
711
- w = Ae.startIndex, g = Ae.endIndex, _ = Ae.visibleStartIndex, P = Ae.visibleEndIndex;
712
- }
713
- ee = {
714
- startIndex: w,
715
- endIndex: g,
716
- visibleStartIndex: _,
717
- visibleEndIndex: P,
718
- totalSizeValue: H
719
- };
720
- } else if (a > 1) {
721
- const F = an(
722
- c,
723
- a,
724
- i,
725
- d,
726
- C,
727
- he
728
- );
729
- W = F.renderedIndices, me = new Set(W), w = F.startIndex, g = F.endIndex, _ = F.visibleStartIndex, P = F.visibleEndIndex, H = F.totalSize;
730
- } else {
731
- w = ~~(C.start / i * a);
732
- const F = w % a;
733
- w -= F, g = Math.ceil(C.end / i * a), _ = Math.max(0, Math.floor((C.start - O) / i * a)), P = Math.floor((C.end - O) / i * a), w < 0 && (w = 0), g > c && (g = c), _ < 0 && (_ = 0), P > c && (P = c), H = Math.ceil(c / a) * i;
734
- }
735
- }
736
- g - w > Vn.itemsLimit && dn(), ge.value = H, Se.value = 0, ye.value = ce(r) === "flow" ? H : 0;
737
- let y;
738
- const et = w <= X && g >= G, Tt = ce(r) === "flow", tt = Tt && et && !e;
739
- let nt = null;
740
- if (!et || e)
741
- Kt();
742
- else {
743
- const b = (R) => {
744
- const $ = E[R];
745
- $ && (y = $, y.nr.used && ((me ? me.has(y.nr.index) : y.nr.index >= w && y.nr.index < g) || St(y, tt)));
746
- };
747
- if (tt) {
748
- for (let R = E.length - 1; R >= 0; R--)
749
- b(R);
750
- nt = Jt();
751
- } else
752
- for (let R = 0, $ = E.length; R < $; R++)
753
- b(R);
754
- }
755
- let ie, We, ke = null, Et = 0;
756
- return Dn(w, g, W, (b) => {
757
- var he;
758
- const R = m[b] && m[b].size, $ = i || R || Ge || 1;
759
- ie = z[b];
760
- const j = p ? f(ie, b, p) : b;
761
- y = V.get(j);
762
- let C = false;
763
- if (y)
764
- y.item !== ie && (y.item = ie), y.nr.used || console.warn(`Expected existing view's used flag to be true, got ${y.nr.used}`);
765
- else {
766
- if (We = ie[S], y = qt(We), y) {
767
- const Q = y.nr.index !== b || y.nr.key !== j;
768
- y.item = ie, y.nr.index = b, y.nr.key = j, y.nr.type !== We && console.warn("Reused view's type does not match pool's type"), Q && jn(y);
769
- } else
770
- y = Xt(E, b, ie, j, We);
771
- V.set(j, y), C = true;
772
- }
773
- i === null ? (y.position = ((he = m[b - 1]) == null ? void 0 : he.accumulator) || 0, y.offset = 0) : (y.position = Math.floor(b / a) * i, y.offset = b % a * d), nt && C && Qt(y, b, nt), ke ?? (ke = y.position), Et += $;
774
- }), Tt ? (ke == null ? (Se.value = 0, ye.value = H) : (Se.value = ke, ye.value = Math.max(0, H - ke - Et)), tt || vt()) : (Se.value = 0, ye.value = 0), G = w, X = g, at = _, ut = P, ct = true, r.emitUpdate && ((kt = (Wt = x.callbacks).onUpdate) == null || kt.call(Wt, w, g, _, P)), ce(r) !== "flow" && (q && clearTimeout(q), q = setTimeout(Mt, r.updateInterval + 300)), {
775
- continuous: et
776
- };
777
- }
778
- function dn() {
779
- throw be = setTimeout(() => {
780
- be = null, console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", x.el.value), console.warn("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.");
781
- }), new Error("Rendered items limit reached");
782
- }
783
- function fn() {
784
- if (un())
785
- return false;
786
- const e = N.value.filter(({ nr: t }) => t.used);
787
- for (let t = 1; t < e.length; t++)
788
- if (e[t].nr.index !== e[t - 1].nr.index + 1)
789
- return true;
790
- return false;
791
- }
792
- function Mt() {
793
- if (M.value) {
794
- if (ce() === "flow") {
795
- vt();
796
- return;
797
- }
798
- N.value.sort((e, t) => e.nr.index - t.nr.index), fn() && (L(false), q && clearTimeout(q));
799
- }
800
- }
801
- function mn(e, t) {
802
- if (!M.value)
803
- return;
804
- const r = v(), i = J(r), a = x.el.value;
805
- if (!a)
806
- return;
807
- const d = Math.max(0, Math.min(e, T.value.length - 1)), h = de().start, S = Fn(a, i, r.pageMode, ze.value), p = U(d), z = Le(d), c = At(
808
- p,
809
- z,
810
- h,
811
- S,
812
- t == null ? void 0 : t.align,
813
- (t == null ? void 0 : t.offset) ?? 0
814
- );
815
- if (c == null)
816
- return;
817
- Ce(c, t);
818
- const m = D(r.itemSize);
819
- if (r.gridItems && m != null) {
820
- const V = x.el.value;
821
- if (!V)
822
- return;
823
- const E = r.gridItems, W = r.itemSecondarySize || m, w = d % E * W, g = i === "vertical" ? "horizontal" : "vertical", H = g === "horizontal" ? pe(V.scrollLeft, "horizontal", V) : V.scrollTop, _ = g === "horizontal" ? V.clientWidth : V.clientHeight, P = At(
824
- w,
825
- W,
826
- H,
827
- _,
828
- t == null ? void 0 : t.align,
829
- (t == null ? void 0 : t.offset) ?? 0
830
- );
831
- P != null && it(V, g, P, t);
832
- }
833
- }
834
- function Ce(e, t) {
835
- if (!M.value)
836
- return;
837
- const r = v(), i = J(r), a = x.el.value;
838
- if (a)
839
- if (ue()) {
840
- const d = ze.value ?? window, h = i === "vertical" ? "top" : "left", S = d === window, p = S ? document.scrollingElement || document.documentElement : d, z = p.getBoundingClientRect(), c = a.getBoundingClientRect(), m = S ? i === "vertical" ? window.scrollY : window.scrollX : pe(
841
- i === "vertical" ? p.scrollTop : p.scrollLeft,
842
- i,
843
- p
844
- ), V = c[h] - z[h];
845
- it(S ? window : p, i, e + m + V, t);
846
- } else
847
- it(a, i, e, t);
848
- }
849
- const re = v(), Re = T.value;
850
- return Ve = Be(Re, Re.length > 0 && typeof Re[0] != "object" ? null : re.keyField), xe = Ye(Re, re.typeField), re.cache && Ze(re.cache), M.value && re.prerender && (De = true, L(false)), re.gridItems && D(re.itemSize) == null && console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"), onMounted(() => {
851
- M.value && (Te(), nextTick(() => {
852
- De = false, L(true), le.value = true;
853
- }));
854
- }), onActivated(() => {
855
- if (!M.value)
856
- return;
857
- const e = je;
858
- typeof e == "number" && nextTick(() => {
859
- Ce(e);
860
- });
861
- }), onBeforeUnmount(() => {
862
- It(), yt(), fe();
863
- }), watch(M, (e) => {
864
- e ? (Te(), nextTick(() => {
865
- L(true), le.value = true;
866
- })) : (fe(), It(), yt(), le.value = false);
867
- }), watch(() => v().cache, (e) => {
868
- M.value && (Ze(e), L(true));
869
- }), watch(() => toValue(v().items).slice(), (e, t) => {
870
- if (!M.value)
871
- return;
872
- const r = v(), i = Z.value ? null : r.keyField, a = Be(e, i), d = Ye(e, r.typeField), h = Ve, p = !$n(
873
- a,
874
- d,
875
- h,
876
- xe
877
- );
878
- r.shift && zn(h, a) > 0 ? sn(t ?? [], i) : ne(), Ve = a, xe = d, xt(e), L(p);
879
- }), watch(() => v().keyField, () => {
880
- if (!M.value)
881
- return;
882
- const e = v(), t = Z.value ? null : e.keyField;
883
- Ve = Be(T.value, t), xe = Ye(T.value, e.typeField), ne(), L(true);
884
- }), watch(() => v().typeField, () => {
885
- if (!M.value)
886
- return;
887
- const e = v();
888
- xe = Ye(T.value, e.typeField), ne(), L(true);
889
- }), watch(ue, () => {
890
- M.value && (fe(), Te(), L(false));
891
- }), watch(x.el, () => {
892
- M.value && (fe(), Te(), L(false));
893
- }), watch(ze, () => {
894
- !M.value || !ue() || (fe(), Te(), L(false));
895
- }), watch(Me, () => {
896
- M.value && (xt() && ln(), L(false));
897
- }), watch(() => v().gridItems, () => {
898
- M.value && L(true);
899
- }), watch(() => v().itemSecondarySize, () => {
900
- M.value && L(true);
901
- }), {
902
- pool: N,
903
- visiblePool: Dt,
904
- totalSize: ge,
905
- startSpacerSize: Se,
906
- endSpacerSize: ye,
907
- ready: le,
908
- sizes: Me,
909
- simpleArray: Z,
910
- scrollToItem: mn,
911
- scrollToPosition: Ce,
912
- getScroll: de,
913
- findItemIndex: wt,
914
- getItemOffset: U,
915
- getItemSize: Le,
916
- getViewStyle: on,
917
- cacheSnapshot: Gt,
918
- restoreCache: Ze,
919
- updateVisibleItems: L,
920
- handleResize: Qe,
921
- handleVisibilityChange: en,
922
- sortViews: Mt
923
- };
924
- }
925
- export {
926
- Ut as a,
927
- Be as b,
928
- Vn as c,
929
- bn as d,
930
- Tn as e,
931
- zn as f,
932
- D as g,
933
- Mn as r,
934
- qn as u
935
- };
936
- //# sourceMappingURL=index250.mjs.map