virtua 0.48.7 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -122,8 +122,14 @@ const d = null, {min: a, max: h, abs: p, floor: g} = Math, v = (e, t, o) => a(o,
122
122
  {
123
123
  const e = t.filter((([e, t]) => !L(e, t)));
124
124
  if (!e.length) break;
125
- N(e.reduce(((e, [t, o]) => ((2 === w || (S && 1 === w ? t < S[0] : J(1 !== _ && 0 === w ? t + 1 : t) < E())) && (e += o - A(t)),
126
- e)), 0));
125
+ N(e.reduce(((e, [t, o]) => {
126
+ let n;
127
+ if (2 === w) n = !0; else if (S && 1 === w) n = t < S[0]; else {
128
+ const e = E(), o = J(t), r = A(t);
129
+ n = 1 !== _ && 0 === w ? o + r < e : o < e && o + r < e + l;
130
+ }
131
+ return n && (e += o - A(t)), e;
132
+ }), 0));
127
133
  for (const [t, o] of e) {
128
134
  const e = A(t), n = y(C, t, o);
129
135
  r && (R += n ? o : o - e);