New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@virtuoso.dev/message-list

Package Overview
Dependencies
Maintainers
0
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@virtuoso.dev/message-list - npm Package Compare versions

Comparing version 1.9.0-alpha.1 to 1.9.0-alpha.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [1.9.0-alpha.2](https://github.com/virtuoso-dev/message-list/compare/v1.9.0-alpha.1...v1.9.0-alpha.2) (2024-07-18)
### Bug Fixes
* correct rendered items ([3a292b4](https://github.com/virtuoso-dev/message-list/commit/3a292b45ea99528f74256a8f8115c761ec2aa4a3))
# [1.9.0-alpha.1](https://github.com/virtuoso-dev/message-list/compare/v1.8.3-alpha.3...v1.9.0-alpha.1) (2024-07-18)

@@ -2,0 +9,0 @@

897

dist/index.js
import { jsxs as nn, jsx as S, Fragment as fo } from "react/jsx-runtime";
import d from "react";
import { Cell as c, Signal as y, throttleTime as fe, map as p, mapTo as F, debounceTime as pe, filter as g, scan as ee, withLatestFrom as m, delayWithMicrotask as ze, onNext as on, Action as sn, useRealm as _t, useCellValue as V, Realm as ho, RealmContext as go, useCellValues as vo } from "@mdxeditor/gurx";
function Se(e, n) {
const t = c(e, (o) => {
o.link(n(o), t);
function Se(e, t) {
const n = c(e, (o) => {
o.link(t(o), n);
});
return t;
return n;
}
const Me = { lvl: 0 };
function rn(e, n, t, o = Me, s = Me) {
return { k: e, l: o, lvl: t, r: s, v: n };
function rn(e, t, n, o = Me, s = Me) {
return { k: e, l: o, lvl: n, r: s, v: t };
}

@@ -20,7 +20,7 @@ function k(e) {

}
function wt(e, n) {
function wt(e, t) {
if (k(e))
return Me;
const { k: t, l: o, r: s } = e;
if (n === t) {
const { k: n, l: o, r: s } = e;
if (t === n) {
if (k(o))

@@ -35,19 +35,19 @@ return s;

} else
return n < t ? rt(L(e, { l: wt(o, n) })) : rt(L(e, { r: wt(s, n) }));
return t < n ? rt(L(e, { l: wt(o, t) })) : rt(L(e, { r: wt(s, t) }));
}
function ke(e, n, t = "k") {
function ke(e, t, n = "k") {
if (k(e))
return [-1 / 0, void 0];
if (e[t] === n)
if (e[n] === t)
return [e.k, e.v];
if (e[t] < n) {
const o = ke(e.r, n, t);
if (e[n] < t) {
const o = ke(e.r, t, n);
return o[0] === -1 / 0 ? [e.k, e.v] : o;
}
return ke(e.l, n, t);
return ke(e.l, t, n);
}
function W(e, n, t) {
return k(e) ? rn(n, t, 1) : n === e.k ? L(e, { k: n, v: t }) : n < e.k ? Zt(L(e, { l: W(e.l, n, t) })) : Zt(L(e, { r: W(e.r, n, t) }));
function W(e, t, n) {
return k(e) ? rn(t, n, 1) : t === e.k ? L(e, { k: t, v: n }) : t < e.k ? Zt(L(e, { l: W(e.l, t, n) })) : Zt(L(e, { r: W(e.r, t, n) }));
}
function Lt(e, n, t) {
function Lt(e, t, n) {
if (k(e))

@@ -57,5 +57,5 @@ return [];

let l = [];
return o > n && (l = l.concat(Lt(i, n, t))), o >= n && o <= t && l.push({ k: o, v: s }), o <= t && (l = l.concat(Lt(r, n, t))), l;
return o > t && (l = l.concat(Lt(i, t, n))), o >= t && o <= n && l.push({ k: o, v: s }), o <= n && (l = l.concat(Lt(r, t, n))), l;
}
function bo(e, n, t, o) {
function bo(e, t, n, o) {
if (k(e))

@@ -65,9 +65,9 @@ return Me;

for (const { k: i, v: r } of xe(e))
i > n && i <= t ? s = W(s, ...o(i, r)) : s = W(s, i, r);
i > t && i <= n ? s = W(s, ...o(i, r)) : s = W(s, i, r);
return s;
}
function mo(e, n, t) {
function mo(e, t, n) {
let o = Ce(), s = -1;
for (const { start: i, end: r, value: l } of Io(e))
i < n ? (o = W(o, i, l), s = l) : i > n + t ? o = W(o, i - t, l) : r >= n + t && s !== l && (o = W(o, n, l));
i < t ? (o = W(o, i, l), s = l) : i > t + n ? o = W(o, i - n, l) : r >= t + n && s !== l && (o = W(o, t, l));
return o;

@@ -84,4 +84,4 @@ }

}
function L(e, n) {
return rn(n.k ?? e.k, n.v ?? e.v, n.lvl ?? e.lvl, n.l ?? e.l, n.r ?? e.r);
function L(e, t) {
return rn(t.k ?? e.k, t.v ?? e.v, t.lvl ?? e.lvl, t.l ?? e.l, t.r ?? e.r);
}

@@ -95,14 +95,14 @@ function Tt(e) {

function rt(e) {
const { l: n, r: t, lvl: o } = e;
if (t.lvl >= o - 1 && n.lvl >= o - 1)
const { l: t, r: n, lvl: o } = e;
if (n.lvl >= o - 1 && t.lvl >= o - 1)
return e;
if (o > t.lvl + 1) {
if (Tt(n))
if (o > n.lvl + 1) {
if (Tt(t))
return fn(L(e, { lvl: o - 1 }));
if (!k(n) && !k(n.r))
return L(n.r, {
l: L(n, { r: n.r.l }),
if (!k(t) && !k(t.r))
return L(t.r, {
l: L(t, { r: t.r.l }),
lvl: o,
r: L(e, {
l: n.r.r,
l: t.r.r,
lvl: o - 1

@@ -115,4 +115,4 @@ })

return Rt(L(e, { lvl: o - 1 }));
if (!k(t) && !k(t.l)) {
const s = t.l, i = Tt(s) ? t.lvl - 1 : t.lvl;
if (!k(n) && !k(n.l)) {
const s = n.l, i = Tt(s) ? n.lvl - 1 : n.lvl;
return L(s, {

@@ -124,3 +124,3 @@ l: L(e, {

lvl: s.lvl + 1,
r: Rt(L(t, { l: s.r, lvl: i }))
r: Rt(L(n, { l: s.r, lvl: i }))
});

@@ -134,16 +134,16 @@ } else

}
function un(e, n, t) {
function un(e, t, n) {
if (k(e))
return [];
const o = ke(e, n)[0];
return pn(Lt(e, o, t));
const o = ke(e, t)[0];
return pn(Lt(e, o, n));
}
function an(e, n) {
const t = e.length;
if (t === 0)
function an(e, t) {
const n = e.length;
if (n === 0)
return [];
let { index: o, value: s } = n(e[0]);
let { index: o, value: s } = t(e[0]);
const i = [];
for (let r = 1; r < t; r++) {
const { index: l, value: u } = n(e[r]);
for (let r = 1; r < n; r++) {
const { index: l, value: u } = t(e[r]);
i.push({ end: l - 1, start: o, value: s }), o = l, s = u;

@@ -154,21 +154,21 @@ }

function pn(e) {
return an(e, ({ k: n, v: t }) => ({ index: n, value: t }));
return an(e, ({ k: t, v: n }) => ({ index: t, value: n }));
}
function Rt(e) {
const { r: n, lvl: t } = e;
return !k(n) && !k(n.r) && n.lvl === t && n.r.lvl === t ? L(n, { l: L(e, { r: n.l }), lvl: t + 1 }) : e;
const { r: t, lvl: n } = e;
return !k(t) && !k(t.r) && t.lvl === n && t.r.lvl === n ? L(t, { l: L(e, { r: t.l }), lvl: n + 1 }) : e;
}
function fn(e) {
const { l: n } = e;
return !k(n) && n.lvl === e.lvl ? L(n, { r: L(e, { l: n.r }) }) : e;
const { l: t } = e;
return !k(t) && t.lvl === e.lvl ? L(t, { r: L(e, { l: t.r }) }) : e;
}
function ko(e) {
const { size: n, startIndex: t, endIndex: o } = e;
return (s) => s.start === t && (s.end === o || s.end === 1 / 0) && s.value === n;
const { size: t, startIndex: n, endIndex: o } = e;
return (s) => s.start === n && (s.end === o || s.end === 1 / 0) && s.value === t;
}
function xo(e, n) {
let t = k(e) ? 0 : 1 / 0;
for (const o of n) {
function xo(e, t) {
let n = k(e) ? 0 : 1 / 0;
for (const o of t) {
const { size: s, startIndex: i, endIndex: r } = o;
if (t = Math.min(t, i), k(e)) {
if (n = Math.min(n, i), k(e)) {
e = W(e, 0, s);

@@ -185,19 +185,19 @@ continue;

}
return [e, t];
return [e, n];
}
const gt = [Ce(), 0];
function yo(e, [n, t]) {
if (t.length > 0 && k(e) && n.length === 2) {
const o = n[0].size, s = n[1].size;
function yo(e, [t, n]) {
if (n.length > 0 && k(e) && t.length === 2) {
const o = t[0].size, s = t[1].size;
return [
t.reduce((i, r) => W(W(i, r, o), r + 1, s), Ce()),
n.reduce((i, r) => W(W(i, r, o), r + 1, s), Ce()),
0
];
} else
return xo(e, n);
return xo(e, t);
}
function ft(e, n, t, o = 0) {
function ft(e, t, n, o = 0) {
let s = e.length - 1;
for (; o <= s; ) {
const i = Math.floor((o + s) / 2), r = e[i], l = t(r, n);
const i = Math.floor((o + s) / 2), r = e[i], l = n(r, t);
if (l === 0)

@@ -215,16 +215,16 @@ return i;

}
throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${n}`);
throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
}
function hn(e, n, t) {
return e[ft(e, n, t)];
function hn(e, t, n) {
return e[ft(e, t, n)];
}
function So(e, n, t, o) {
const s = ft(e, n, o), i = ft(e, t, o, s);
function So(e, t, n, o) {
const s = ft(e, t, o), i = ft(e, n, o, s);
return e.slice(s, i + 1);
}
function Pt({ index: e }, n) {
return n === e ? 0 : n < e ? -1 : 1;
function Pt({ index: e }, t) {
return t === e ? 0 : t < e ? -1 : 1;
}
function To({ offset: e }, n) {
return n === e ? 0 : n < e ? -1 : 1;
function To({ offset: e }, t) {
return t === e ? 0 : t < e ? -1 : 1;
}

@@ -234,15 +234,15 @@ function $o(e) {

}
function Eo(e, n, t, o = 0) {
return o > 0 && (n = Math.max(n, hn(e, o, Pt).offset)), n = Math.max(0, n), an(So(e, n, t, To), $o);
function Eo(e, t, n, o = 0) {
return o > 0 && (t = Math.max(t, hn(e, o, Pt).offset)), t = Math.max(0, t), an(So(e, t, n, To), $o);
}
const Ae = [[], 0, 0, 0];
function wo(e, [n, t]) {
function wo(e, [t, n]) {
let o = 0, s = 0, i = 0, r = 0;
if (t !== 0) {
r = ft(e, t - 1, Pt), i = e[r].offset;
const u = ke(n, t - 1);
o = u[0], s = u[1], e.length && e[r].height === ke(n, t)[1] && (r -= 1), e = e.slice(0, r + 1);
if (n !== 0) {
r = ft(e, n - 1, Pt), i = e[r].offset;
const u = ke(t, n - 1);
o = u[0], s = u[1], e.length && e[r].height === ke(t, n)[1] && (r -= 1), e = e.slice(0, r + 1);
} else
e = [];
for (const { start: l, value: u } of un(n, t, 1 / 0)) {
for (const { start: l, value: u } of un(t, n, 1 / 0)) {
const a = (l - o) * s + i;

@@ -253,13 +253,13 @@ e.push({ height: u, index: l, offset: a }), o = l, i = a, s = u;

}
function dn(e, n) {
if (n.length === 0)
function dn(e, t) {
if (t.length === 0)
return [0, 0];
const { offset: t, index: o, height: s } = hn(n, e, Pt);
return [s * (e - o) + t, s];
const { offset: n, index: o, height: s } = hn(t, e, Pt);
return [s * (e - o) + n, s];
}
function Le(e, n) {
return dn(e, n)[0];
function Le(e, t) {
return dn(e, t)[0];
}
function gn(e, n) {
return Math.abs(e - n) < 1.01;
function gn(e, t) {
return Math.abs(e - t) < 1.01;
}

@@ -287,6 +287,6 @@ function Lo() {

function Jt(e) {
return (n, t) => {
const o = t.signalInstance();
return t.sub(n, (s) => {
e > 0 ? e-- : t.pub(o, s);
return (t, n) => {
const o = n.signalInstance();
return n.sub(t, (s) => {
e > 0 ? e-- : n.pub(o, s);
}), o;

@@ -304,3 +304,3 @@ };

e.combine(T, Ho),
p(([n, t]) => n <= t)
p(([t, n]) => t <= n)
),

@@ -319,13 +319,13 @@ mn

e.combine(j, T, q, Rn, In, mt, ne),
g(([, , , , , , n]) => !k(n)),
ee((n, [t, o, s, i, r]) => {
const u = o + s - t > -r, a = {
g(([, , , , , , t]) => !k(t)),
ee((t, [n, o, s, i, r]) => {
const u = o + s - n > -r, a = {
viewportWidth: i,
viewportHeight: s,
scrollTop: o,
scrollHeight: t
scrollHeight: n
};
if (u) {
let v, I;
return o > n.state.scrollTop ? (v = "SCROLLED_DOWN", I = n.state.scrollTop - o) : (v = t === s ? "LIST_TOO_SHORT" : "SIZE_DECREASED", I = n.state.scrollTop - o || n.scrollTopDelta), {
return o > t.state.scrollTop ? (v = "SCROLLED_DOWN", I = t.state.scrollTop - o) : (v = n === s ? "LIST_TOO_SHORT" : "SIZE_DECREASED", I = t.state.scrollTop - o || t.scrollTopDelta), {
atBottom: !0,

@@ -338,3 +338,3 @@ state: a,

let f;
return s < n.state.viewportHeight ? f = "VIEWPORT_HEIGHT_DECREASING" : i < n.state.viewportWidth ? f = "VIEWPORT_WIDTH_DECREASING" : a.scrollHeight > n.state.scrollHeight ? f = "SIZE_INCREASED" : o < n.state.scrollTop ? f = "SCROLLING_UPWARDS" : f = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
return s < t.state.viewportHeight ? f = "VIEWPORT_HEIGHT_DECREASING" : i < t.state.viewportWidth ? f = "VIEWPORT_WIDTH_DECREASING" : a.scrollHeight > t.state.scrollHeight ? f = "SIZE_INCREASED" : o < t.state.scrollTop ? f = "SCROLLING_UPWARDS" : f = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
atBottom: !1,

@@ -354,6 +354,6 @@ notAtBottomBecause: f,

ee(
({ prev: n }, t) => {
const o = !!(n && t && n.atBottom && !t.atBottom && t.notAtBottomBecause === "SIZE_INCREASED");
({ prev: t }, n) => {
const o = !!(t && n && t.atBottom && !n.atBottom && n.notAtBottomBecause === "SIZE_INCREASED");
return {
prev: t,
prev: n,
shouldScroll: o

@@ -364,3 +364,3 @@ };

),
p(({ shouldScroll: n }) => n)
p(({ shouldScroll: t }) => t)
),

@@ -373,5 +373,5 @@ kn

ee(
(n, [t, o]) => {
(t, [n, o]) => {
let s = 0;
return n.viewportHeight > t && o && !o.atBottom && o.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && (s = n.viewportHeight - t), { viewportHeight: t, delta: s };
return t.viewportHeight > n && o && !o.atBottom && o.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && (s = t.viewportHeight - n), { viewportHeight: n, delta: s };
},

@@ -381,8 +381,8 @@ { viewportHeight: 0, delta: 0 }

),
(n) => {
n.delta && e.pub(te, n.delta);
(t) => {
t.delta && e.pub(te, t.delta);
}
);
},
(e, n) => e ? e.atBottom === (n == null ? void 0 : n.atBottom) : !1
(e, t) => e ? e.atBottom === (t == null ? void 0 : t.atBottom) : !1
), xn = c(0, (e) => {

@@ -393,6 +393,6 @@ e.link(

ee(
(n, [t, o, s]) => {
if (gn(n.scrollHeight, o))
(t, [n, o, s]) => {
if (gn(t.scrollHeight, o))
return {
scrollTop: t,
scrollTop: n,
scrollHeight: o,

@@ -403,11 +403,11 @@ jump: 0,

{
const i = o - (t + s) < 1;
return n.scrollTop !== t && i ? {
const i = o - (n + s) < 1;
return t.scrollTop !== n && i ? {
scrollHeight: o,
scrollTop: t,
jump: n.scrollTop - t,
scrollTop: n,
jump: t.scrollTop - n,
changed: !0
} : {
scrollHeight: o,
scrollTop: t,
scrollTop: n,
jump: 0,

@@ -420,4 +420,4 @@ changed: !0

),
g((n) => n.changed),
p((n) => n.jump)
g((t) => t.changed),
p((t) => t.jump)
),

@@ -431,6 +431,6 @@ xn

ee(
(n, t) => e.getValue(Mt) ? { direction: n.direction, prevScrollTop: t } : { direction: t < n.prevScrollTop ? bn : $t, prevScrollTop: t },
(t, n) => e.getValue(Mt) ? { direction: t.direction, prevScrollTop: n } : { direction: n < t.prevScrollTop ? bn : $t, prevScrollTop: n },
{ direction: $t, prevScrollTop: 0 }
),
p((n) => n.direction)
p((t) => t.direction)
),

@@ -445,5 +445,5 @@ At

m(Ye),
g(([, n]) => !!n),
ee(([, n], [t]) => [n, t], [0, 0]),
p(([n, t]) => t - n)
g(([, t]) => !!t),
ee(([, t], [n]) => [t, n], [0, 0]),
p(([t, n]) => n - t)
),

@@ -453,3 +453,3 @@ Xt

});
function Nt(e, n) {
function Nt(e, t) {
if (typeof e == "number")

@@ -462,3 +462,3 @@ return {

};
const t = {
const n = {
index: NaN,

@@ -469,8 +469,8 @@ align: e.align ?? "start-no-overflow",

};
return e.index === "LAST" ? t.index = n : e.index < 0 ? t.index = n + e.index : t.index = e.index, t;
return e.index === "LAST" ? n.index = t : e.index < 0 ? n.index = t + e.index : n.index = e.index, n;
}
function yn({
location: e,
sizeTree: n,
offsetTree: t,
sizeTree: t,
offsetTree: n,
totalHeight: o,

@@ -485,3 +485,3 @@ totalCount: s,

function R() {
const P = ke(n, I)[1];
const P = ke(t, I)[1];
if (P === void 0)

@@ -492,3 +492,3 @@ throw new Error(`Item at index ${I} not found`);

i -= l + u;
let x = Le(I, t) + r - l;
let x = Le(I, n) + r - l;
a === "end" ? x = x - i + R() : a === "center" && (x = x - i / 2 + R() / 2), v && (x += v);

@@ -517,8 +517,8 @@ let b = 0;

m(Te, ie, Xe),
p(([n, t, o, s]) => {
let { align: i, behavior: r, offset: l, index: u } = Nt(n, t - 1);
const a = typeof n != "number" ? n.done : void 0, [f, v] = dn(u, o);
return f < -s.listOffset ? ((typeof n == "number" || n.align === void 0) && (i = "start-no-overflow"), { index: u, align: i, behavior: r, offset: l, done: a }) : f + v > -s.listOffset + s.visibleListHeight ? ((typeof n == "number" || n.align === void 0) && (i = "end"), { index: u, align: i, behavior: r, offset: l, done: a }) : null;
p(([t, n, o, s]) => {
let { align: i, behavior: r, offset: l, index: u } = Nt(t, n - 1);
const a = typeof t != "number" ? t.done : void 0, [f, v] = dn(u, o);
return f < -s.listOffset ? ((typeof t == "number" || t.align === void 0) && (i = "start-no-overflow"), { index: u, align: i, behavior: r, offset: l, done: a }) : f + v > -s.listOffset + s.visibleListHeight ? ((typeof t == "number" || t.align === void 0) && (i = "end"), { index: u, align: i, behavior: r, offset: l, done: a }) : null;
}),
g((n) => n !== null)
g((t) => t !== null)
),

@@ -529,3 +529,3 @@ // @ts-expect-error contra variance

}), Q = y((e) => {
const n = e.pipe(
const t = e.pipe(
Q,

@@ -543,6 +543,6 @@ m(

p(
([t, o, s, i, r, l, u, a, f]) => {
([n, o, s, i, r, l, u, a, f]) => {
try {
return yn({
location: t,
location: n,
totalHeight: f,

@@ -562,12 +562,12 @@ sizeTree: o,

),
g((t) => t !== null)
g((n) => n !== null)
);
e.link(Q, We), e.link(n, Oe), e.link(
e.link(Q, We), e.link(t, Oe), e.link(
e.pipe(
Q,
g((t) => typeof t != "number" && t.index === "LAST"),
g((n) => typeof n != "number" && n.index === "LAST"),
F(!0)
),
ve
), e.link(e.pipe(n, F(!1)), ct), e.link(e.pipe(n, F(!1)), Bo), e.link(
), e.link(e.pipe(t, F(!1)), ct), e.link(e.pipe(t, F(!1)), Bo), e.link(
e.pipe(

@@ -577,9 +577,9 @@ ne,

m(ct, We),
g(([, t, o]) => !t && o !== null),
p(([, , t]) => t)
g(([, n, o]) => !n && o !== null),
p(([, , n]) => n)
),
Q
), e.sub(e.pipe(qe, fe(20)), () => {
const t = e.getValue(We);
t !== null && typeof t != "number" && t.done !== void 0 && t.done(), e.pubIn({
const n = e.getValue(We);
n !== null && typeof n != "number" && n.done !== void 0 && n.done(), e.pubIn({
[We]: null,

@@ -593,3 +593,3 @@ [ct]: !0

ze(),
g((t) => t !== 0)
g((n) => n !== 0)
),

@@ -609,16 +609,16 @@ te

Ue,
g((t) => t !== null)
g((n) => n !== null)
),
Pe
);
const n = e.pipe(
const t = e.pipe(
e.combine(Ue, ne),
m(Pe),
g(([[t, o], s]) => t !== null && !k(o) && s !== null),
g(([[n, o], s]) => n !== null && !k(o) && s !== null),
pe(10),
p(([[t]]) => t)
p(([[n]]) => n)
);
e.link(e.pipe(n, ze()), Q), e.link(
e.link(e.pipe(t, ze()), Q), e.link(
e.pipe(
n,
t,
on(e.pipe(je, g(vn))),

@@ -632,4 +632,4 @@ F(null),

});
function Fo(e, n) {
const t = n.slice();
function Fo(e, t) {
const n = t.slice();
let o = 0;

@@ -639,4 +639,4 @@ const s = [];

var f, v;
for (; t.length && t[0] < r; )
t.shift(), o++;
for (; n.length && n[0] < r; )
n.shift(), o++;
const u = Math.max(0, r - o), a = ((f = s.at(-1)) == null ? void 0 : f.k) ?? -1;

@@ -650,8 +650,8 @@ u === a ? (((v = s.at(-2)) == null ? void 0 : v.v) ?? -1) === l ? s.pop() : s[s.length - 1].v = l : s.push({ k: u, v: l });

}
function Vo(e, n) {
function Vo(e, t) {
return [
{
data: n == null ? void 0 : n[e],
prevData: (n == null ? void 0 : n[e - 1]) ?? null,
nextData: (n == null ? void 0 : n[e + 1]) ?? null,
data: t == null ? void 0 : t[e],
prevData: (t == null ? void 0 : t[e - 1]) ?? null,
nextData: (t == null ? void 0 : t[e + 1]) ?? null,
height: 0,

@@ -694,9 +694,9 @@ index: e,

),
g((n) => {
const t = n[n.length - 2], o = n[n.length - 1];
return !t && !o;
g((t) => {
const n = t[t.length - 2], o = t[t.length - 1];
return !n && !o;
}),
ee(
(n, [
t,
(t, [
n,
o,

@@ -724,3 +724,3 @@ s,

let P = 0;
v !== null && t === 0 && (P = yn({
v !== null && n === 0 && (P = yn({
totalHeight: l,

@@ -737,7 +737,7 @@ location: v,

const U = Math.min(
Math.max(t + P + a - b - I, 0),
Math.max(n + P + a - b - I, 0),
l - o
), G = U + o;
if (n.offsetTree === i && n.totalCount === r && n.data === u && U >= n.listTop && G <= n.listBottom)
return n;
if (t.offsetTree === i && t.totalCount === r && t.data === u && U >= t.listTop && G <= t.listBottom)
return t;
const Z = [], J = r - 1, N = 0, M = Eo(i, U, G, N);

@@ -775,8 +775,3 @@ let A = 0, Qe = 0, et = !1;

e.combine(De, T),
p(([n, t]) => {
const o = n.items.slice();
for (; o.length > 0 && o[0].offset + o[0].height < t; )
o.shift();
return o.map((s) => s.data);
})
p(([t]) => t.items.slice().map((o) => o.data))
)), K = c(!1), be = c(!1), ut = y((e) => {

@@ -787,23 +782,23 @@ e.link(

m(xn, Ie),
g(([, , n]) => !n),
g(([, , t]) => !t),
ee(
([, n, t, o], [{ items: s, totalCount: i, listBottom: r, paddingBottom: l }, u]) => {
([, t, n, o], [{ items: s, totalCount: i, listBottom: r, paddingBottom: l }, u]) => {
const a = r + l;
let f = 0;
return t === i && n.length > 0 && s.length > 0 && (f = a - o, f !== 0 && (f += u)), [f, s, i, a];
return n === i && t.length > 0 && s.length > 0 && (f = a - o, f !== 0 && (f += u)), [f, s, i, a];
},
[0, [], 0, 0]
),
g(([n]) => n !== 0),
g(([t]) => t !== 0),
m(T, At, je),
g(([, n, t, o]) => !o && n !== 0 && t === bn),
p(([[n]]) => n)
g(([, t, n, o]) => !o && t !== 0 && n === bn),
p(([[t]]) => t)
),
ut
), Lo() ? (e.sub(e.pipe(ut, m(B, T)), ([n, t]) => {
e.pub(B, t - n);
), Lo() ? (e.sub(e.pipe(ut, m(B, T)), ([t, n]) => {
e.pub(B, n - t);
}), e.sub(
e.pipe(e.combine(T, B, Ie, be)),
([n, t, o, s]) => {
o || s || (t > 0 && n < t ? (e.pub(K, !0), e.pub(Oe, { top: 0, behavior: "instant" }), setTimeout(() => {
([t, n, o, s]) => {
o || s || (n > 0 && t < n ? (e.pub(K, !0), e.pub(Oe, { top: 0, behavior: "instant" }), setTimeout(() => {
e.pubIn({

@@ -813,3 +808,3 @@ [K]: !1,

});
})) : t < 0 && n <= 0 && (e.pubIn({
})) : n < 0 && t <= 0 && (e.pubIn({
[K]: !0,

@@ -825,13 +820,13 @@ [B]: 0

g(
([n, t, o, s, i]) => !n && t !== 0 && !o && !s && !i
([t, n, o, s, i]) => !t && n !== 0 && !o && !s && !i
),
fe(100)
),
([, n]) => {
e.pub(K, !0), n < 0 ? requestAnimationFrame(() => {
e.pub(te, -n), e.pub(B, 0), requestAnimationFrame(() => {
([, t]) => {
e.pub(K, !0), t < 0 ? requestAnimationFrame(() => {
e.pub(te, -t), e.pub(B, 0), requestAnimationFrame(() => {
e.pub(K, !1);
});
}) : requestAnimationFrame(() => {
e.pub(te, -n), e.pub(B, 0), requestAnimationFrame(() => {
e.pub(te, -t), e.pub(B, 0), requestAnimationFrame(() => {
e.pub(K, !1);

@@ -846,4 +841,4 @@ });

$,
g((n) => n !== null),
p((n) => n.length)
g((t) => t !== null),
p((t) => t.length)
),

@@ -857,10 +852,10 @@ Te

m(ye),
p(([t, o]) => -(o * t.length))
p(([n, o]) => -(o * n.length))
),
B
), e.link(e.pipe(ue, F(!0)), be), e.link(e.pipe(ue, ze()), Ve);
function n(t, o) {
function t(n, o) {
e.pubIn({
[te]: t,
[Re]: t
[te]: n,
[Re]: n
}), o ? requestAnimationFrame(() => {

@@ -884,11 +879,11 @@ e.pubIn({

m(Ve),
g(([, t]) => t !== null),
p(([t, o]) => {
g(([, n]) => n !== null),
p(([n, o]) => {
if (o === null)
throw new Error("Unexpected null items");
return Le(o.length, t);
return Le(o.length, n);
})
),
(t) => {
n(t, !1);
(n) => {
t(n, !1);
}

@@ -900,14 +895,14 @@ ), e.sub(

m(ie, Ve),
g(([, , t]) => t !== null),
p(([t, o]) => Le(t.length, o))
g(([, , n]) => n !== null),
p(([n, o]) => Le(n.length, o))
),
(t) => {
n(t, !0);
(n) => {
t(n, !0);
}
), e.changeWith($, ue, (t, o) => t ? [...o, ...t] : o.slice()), e.link(
), e.changeWith($, ue, (n, o) => n ? [...o, ...n] : o.slice()), e.link(
e.pipe(
ue,
m(ne, ye),
p(([t, o, s]) => {
const i = t.length, r = s;
p(([n, o, s]) => {
const i = n.length, r = s;
return xe(o).reduce(

@@ -930,3 +925,3 @@ (u, { k: a, v: f }) => ({

}), vt = y((e) => {
const n = e.pipe(
const t = e.pipe(
vt,

@@ -959,3 +954,3 @@ m(Xe, zt, Ke, ne),

e.pipe(
n,
t,
g((o) => o !== null),

@@ -974,3 +969,3 @@ p(() => !0)

);
const t = e.pipe(
const n = e.pipe(
Ut,

@@ -982,9 +977,9 @@ m(ve),

e.pipe(
t,
n,
p(() => !1)
),
ve
), e.link(e.pipe(t, F(!0)), Ot), e.link(
), e.link(e.pipe(n, F(!0)), Ot), e.link(
e.pipe(
n,
t,
g((o) => o !== null),

@@ -996,10 +991,10 @@ pe(20)

}), dt = y((e) => {
e.changeWith($, dt, (n, t) => n ? [...n, ...t.data] : t.data.slice()), e.link(dt, vt);
e.changeWith($, dt, (t, n) => t ? [...t, ...n.data] : n.data.slice()), e.link(dt, vt);
}), at = y((e) => {
e.changeWith($, at, (n, t) => n ? [...n.slice(0, t.offset), ...t.data, ...n.slice(t.offset)] : t.data.slice()), e.changeWith(he, at, ([n], t) => {
const s = ke(n, t.offset, "k")[0], i = t.data.length;
return [bo(n, s, 1 / 0, (l, u) => [l + i, u]), s];
e.changeWith($, at, (t, n) => t ? [...t.slice(0, n.offset), ...n.data, ...t.slice(n.offset)] : n.data.slice()), e.changeWith(he, at, ([t], n) => {
const s = ke(t, n.offset, "k")[0], i = n.data.length;
return [bo(t, s, 1 / 0, (l, u) => [l + i, u]), s];
}), e.link(at, vt);
}), Ct = y((e) => {
e.changeWith($, Ct, (n, { offset: t, count: o }) => n ? n.slice(0, t).concat(n.slice(t + o)) : []), e.changeWith(he, Ct, ([n], { offset: t, count: o }) => [mo(n, t, o), t]);
e.changeWith($, Ct, (t, { offset: n, count: o }) => t ? t.slice(0, n).concat(t.slice(n + o)) : []), e.changeWith(he, Ct, ([t], { offset: n, count: o }) => [mo(t, n, o), n]);
}), we = y((e) => {

@@ -1009,4 +1004,4 @@ e.link(

we,
g(({ purgeItemSizes: n }) => !!n),
p(({ initialLocation: n }) => n)
g(({ purgeItemSizes: t }) => !!t),
p(({ initialLocation: t }) => t)
),

@@ -1017,9 +1012,9 @@ Ue

we,
g(({ purgeItemSizes: n }) => !n),
g(({ purgeItemSizes: t }) => !t),
m(ye),
g(([, n]) => n > 0),
p(([{ data: n }, t]) => [
g(([, t]) => t > 0),
p(([{ data: t }, n]) => [
{
size: t,
startIndex: n.length,
size: n,
startIndex: t.length,
endIndex: 1 / 0

@@ -1034,24 +1029,24 @@ }

we,
g(({ purgeItemSizes: n }) => !!n)
g(({ purgeItemSizes: t }) => !!t)
),
() => _e
), e.sub(e.pipe(we, fe(0)), ({ data: n, purgeItemSizes: t, initialLocation: o }) => {
t || requestAnimationFrame(() => {
), e.sub(e.pipe(we, fe(0)), ({ data: t, purgeItemSizes: n, initialLocation: o }) => {
n || requestAnimationFrame(() => {
e.pub(Kt);
}), e.pubIn({
[$]: n.slice(),
...t ? { [he]: gt } : o ? { [Q]: o } : {}
[$]: t.slice(),
...n ? { [he]: gt } : o ? { [Q]: o } : {}
});
});
}), Qt = y((e) => {
e.changeWith($, Qt, (n, t) => n ? n.slice(t) : []), e.changeWith(he, Qt, ([n], t) => [xe(n).reduce((s, { k: i, v: r }) => W(s, Math.max(0, i - t), r), Ce()), 0]);
e.changeWith($, Qt, (t, n) => t ? t.slice(n) : []), e.changeWith(he, Qt, ([t], n) => [xe(t).reduce((s, { k: i, v: r }) => W(s, Math.max(0, i - n), r), Ce()), 0]);
}), en = y((e) => {
e.changeWith($, en, (n, t) => n ? n.slice(0, n.length - t) : []), e.link(
e.changeWith($, en, (t, n) => t ? t.slice(0, t.length - n) : []), e.link(
e.pipe(
en,
m(Te, ye),
p(([, n, t]) => [
p(([, t, n]) => [
{
size: t,
startIndex: n,
size: n,
startIndex: t,
endIndex: 1 / 0

@@ -1064,6 +1059,6 @@ }

}), Tn = y((e) => {
const n = e.pipe(
const t = e.pipe(
Tn,
m($),
p(([t, o]) => {
p(([n, o]) => {
if (!o)

@@ -1073,9 +1068,9 @@ return [];

return o.forEach((i, r) => {
t(i, r) && s.push(r);
n(i, r) && s.push(r);
}), s;
})
);
e.changeWith($, n, (t, o) => t ? t.filter((s, i) => !o.includes(i)) : []), e.changeWith(he, n, ([t], o) => [Fo(t, o), 0]);
e.changeWith($, t, (n, o) => n ? n.filter((s, i) => !o.includes(i)) : []), e.changeWith(he, t, ([n], o) => [Fo(n, o), 0]);
}), Dt = y((e) => {
e.changeWith($, Dt, (n, { mapper: t }) => n ? n.map(t) : []), e.link(
e.changeWith($, Dt, (t, { mapper: n }) => t ? t.map(n) : []), e.link(
e.pipe(

@@ -1085,4 +1080,4 @@ Dt,

m(kn),
g(([{ autoscrollToBottomBehavior: n }, t]) => t && !!n),
p(([{ autoscrollToBottomBehavior: n }]) => ({ index: "LAST", align: "end", behavior: n }))
g(([{ autoscrollToBottomBehavior: t }, n]) => n && !!t),
p(([{ autoscrollToBottomBehavior: t }]) => ({ index: "LAST", align: "end", behavior: t }))
),

@@ -1096,6 +1091,6 @@ Q

m(ye, $),
p(([{ data: t, anchorCb: o }, s, i]) => {
p(([{ data: n, anchorCb: o }, s, i]) => {
if (i === null)
return 0;
const r = i.findIndex(o), l = t.findIndex(o);
const r = i.findIndex(o), l = n.findIndex(o);
return -(s * (l - r));

@@ -1109,6 +1104,6 @@ })

m($, ie),
p(([{ anchorCb: t }, o, s]) => {
p(([{ anchorCb: n }, o, s]) => {
if (o === null)
return 0;
const i = o.findIndex(t);
const i = o.findIndex(n);
return Le(i, s);

@@ -1119,6 +1114,6 @@ })

), e.link(e.pipe(ce, F(!0)), be), e.link(e.pipe(ce, ze()), ot);
function n(t, o) {
function t(n, o) {
e.pubIn({
[te]: t,
[Re]: t
[te]: n,
[Re]: n
});

@@ -1139,13 +1134,13 @@ function s() {

m(ot),
g(([, t]) => t !== null),
g(([, n]) => n !== null),
m($, Et),
p(([[t, o], s, i]) => {
p(([[n, o], s, i]) => {
if (o === null || s === null)
throw new Error("Unexpected null items");
const r = s.findIndex(o.anchorCb);
return Le(r, t) - i;
return Le(r, n) - i;
})
),
(t) => {
n(t, !1);
(n) => {
t(n, !1);
}

@@ -1157,14 +1152,14 @@ ), e.sub(

m(ie, ot, $, Et),
g(([, , t]) => t !== null),
p(([t, o, , s, i]) => {
g(([, , n]) => n !== null),
p(([n, o, , s, i]) => {
if (s === null)
throw new Error("Unexpected null data");
const r = s.findIndex(t.anchorCb);
const r = s.findIndex(n.anchorCb);
return Le(r, o) - i;
})
),
(t) => {
n(t, !0);
(n) => {
t(n, !0);
}
), e.changeWith($, e.pipe(ce, ze()), (t, { data: o }) => o.slice()), e.sub(e.pipe(ce, fe(0)), () => {
), e.changeWith($, e.pipe(ce, ze()), (n, { data: o }) => o.slice()), e.sub(e.pipe(ce, fe(0)), () => {
requestAnimationFrame(() => {

@@ -1176,8 +1171,8 @@ e.pub(Kt);

function $n(e = 1) {
return (n, t) => {
const o = t.signalInstance();
return t.sub(n, (s) => {
return (t, n) => {
const o = n.signalInstance();
return n.sub(t, (s) => {
let i = e;
function r() {
i > 0 ? (i--, requestAnimationFrame(r)) : t.pub(o, s);
i > 0 ? (i--, requestAnimationFrame(r)) : n.pub(o, s);
}

@@ -1198,5 +1193,5 @@ r();

me,
g((n) => n.length > 0),
g((t) => t.length > 0),
m(ne),
p(([n, t]) => yo(t, [n, []]))
p(([t, n]) => yo(n, [t, []]))
),

@@ -1209,3 +1204,3 @@ he

he,
p(([n]) => n)
p(([t]) => t)
),

@@ -1218,3 +1213,3 @@ ne

he,
p(([, n]) => n)
p(([, t]) => t)
),

@@ -1228,3 +1223,3 @@ En

m(En),
ee(([n], [t, o]) => wo(n, [t, o]), Ae)
ee(([t], [n, o]) => wo(t, [n, o]), Ae)
),

@@ -1235,3 +1230,3 @@ Ne

Ne,
p(([, n]) => n)
p(([, t]) => t)
),

@@ -1242,3 +1237,3 @@ ye

Ne,
p(([n]) => n)
p(([t]) => t)
),

@@ -1251,3 +1246,3 @@ ie

Ne,
p(([, , n]) => n)
p(([, , t]) => t)
),

@@ -1260,3 +1255,3 @@ wn

Ne,
p(([, , , n]) => n)
p(([, , , t]) => t)
),

@@ -1269,3 +1264,3 @@ Ln

e.combine(Te, Ln, wn, ye),
p(([n, t, o, s]) => o + (n - t) * s)
p(([t, n, o, s]) => o + (t - n) * s)
),

@@ -1278,18 +1273,18 @@ He

e.combine(Ge, Ze),
p(([n, t]) => n + t)
p(([t, n]) => t + n)
)), An = Se(0, (e) => e.pipe(
e.combine(Je, Yt),
p(([n, t]) => n + t)
p(([t, n]) => t + n)
)), zo = Se(0, (e) => e.pipe(
e.combine(Ge, Ze, T),
p(([n, t, o]) => n + Math.max(t - o, 0))
p(([t, n, o]) => t + Math.max(n - o, 0))
)), Yo = Se(0, (e) => e.pipe(
e.combine(Je, Yt, T, q, j),
p(([n, t, o, s, i]) => {
const r = Math.max(t - (i - (o + s)), 0);
return n + r;
p(([t, n, o, s, i]) => {
const r = Math.max(n - (i - (o + s)), 0);
return t + r;
})
)), On = Se(0, (e) => e.pipe(
e.combine(q, zo, Yo),
p(([n, t, o]) => n - t - o)
p(([t, n, o]) => t - n - o)
)), mt = c(0), Cn = c(0, (e) => {

@@ -1299,3 +1294,3 @@ e.link(

e.combine(Cn, He, q),
p(([n, t, o]) => n === 0 ? 0 : Math.max(0, Math.min(n - (t - o))))
p(([t, n, o]) => t === 0 ? 0 : Math.max(0, Math.min(t - (n - o))))
),

@@ -1308,3 +1303,3 @@ mt

Oe,
p((n) => n.align === "start" ? n.top ?? 0 : 0)
p((t) => t.align === "start" ? t.top ?? 0 : 0)
),

@@ -1316,3 +1311,3 @@ Cn

m(T),
g(([n, t]) => n.top !== t),
g(([t, n]) => t.top !== n),
F(!0)

@@ -1344,7 +1339,7 @@ ),

),
g(([, , , , , , , n, t, o]) => !n && t === null && !o),
g(([, , , , , , , t, n, o]) => !t && n === null && !o),
p(
([
t,
n,
t,
o,

@@ -1360,3 +1355,3 @@ s,

]) => {
const I = e.getValue(In), R = r - t - o, x = -n + s, b = l === 0 ? R + Math.min(0, x) - i : -l;
const I = e.getValue(In), R = r - n - o, x = -t + s, b = l === 0 ? R + Math.min(0, x) - i : -l;
return {

@@ -1378,4 +1373,4 @@ scrollHeight: R,

m(Xe),
g(([, n]) => n.scrollHeight > 0),
p(([, n]) => n)
g(([, t]) => t.scrollHeight > 0),
p(([, t]) => t)
),

@@ -1396,6 +1391,6 @@ Bt

bottom: 0
}, Yn = d.forwardRef((e, n) => /* @__PURE__ */ S("div", { style: { zIndex: 1 }, ...e, ref: n })), Un = d.forwardRef((e, n) => /* @__PURE__ */ S("div", { ...e, ref: n })), Kn = d.forwardRef(
({ style: e, ...n }, t) => /* @__PURE__ */ S("div", { ...n, style: { ...Uo, ...e }, ref: t })
}, Yn = d.forwardRef((e, t) => /* @__PURE__ */ S("div", { style: { zIndex: 1 }, ...e, ref: t })), Un = d.forwardRef((e, t) => /* @__PURE__ */ S("div", { ...e, ref: t })), Kn = d.forwardRef(
({ style: e, ...t }, n) => /* @__PURE__ */ S("div", { ...t, style: { ...Uo, ...e }, ref: n })
), jn = d.forwardRef(
({ style: e, ...n }, t) => /* @__PURE__ */ S("div", { ...n, style: { ...Ko, ...e }, ref: t })
({ style: e, ...t }, n) => /* @__PURE__ */ S("div", { ...t, style: { ...Ko, ...e }, ref: n })
), qn = c(Yn), Gn = c(Kn), Zn = c(Un), Jn = c(jn), Wt = c("top", (e) => {

@@ -1405,4 +1400,4 @@ e.link(

e.combine(Wt, He, q, bt, An),
g(([n]) => n === "bottom" || n === "bottom-smooth"),
p(([, n, t, o, s]) => Math.max(0, t - n - o - s))
g(([t]) => t === "bottom" || t === "bottom-smooth"),
p(([, t, n, o, s]) => Math.max(0, n - t - o - s))
),

@@ -1413,8 +1408,8 @@ Ft

e.combine(Ft, Wt),
g(([, n]) => n === "bottom-smooth"),
g(([, t]) => t === "bottom-smooth"),
ee(
(n, [t]) => [n[1], t],
(t, [n]) => [t[1], n],
[0, 0]
),
p(([n, t]) => n > 0 && t > 0 ? "margin-top 0.2s ease-out" : "")
p(([t, n]) => t > 0 && n > 0 ? "margin-top 0.2s ease-out" : "")
),

@@ -1428,22 +1423,22 @@ Dn

function qo(e) {
for (var n, t = "0123456789ABCDEF", o = "", s = 0; s < e.length; s++)
n = e.charCodeAt(s), o += t.charAt(n >>> 4 & 15) + t.charAt(15 & n);
for (var t, n = "0123456789ABCDEF", o = "", s = 0; s < e.length; s++)
t = e.charCodeAt(s), o += n.charAt(t >>> 4 & 15) + n.charAt(15 & t);
return o;
}
function Go(e) {
for (var n = Array(e.length >> 2), t = 0; t < n.length; t++)
n[t] = 0;
for (t = 0; t < 8 * e.length; t += 8)
n[t >> 5] |= (255 & e.charCodeAt(t / 8)) << t % 32;
return n;
for (var t = Array(e.length >> 2), n = 0; n < t.length; n++)
t[n] = 0;
for (n = 0; n < 8 * e.length; n += 8)
t[n >> 5] |= (255 & e.charCodeAt(n / 8)) << n % 32;
return t;
}
function Zo(e) {
for (var n = "", t = 0; t < 32 * e.length; t += 8)
n += String.fromCharCode(e[t >> 5] >>> t % 32 & 255);
return n;
for (var t = "", n = 0; n < 32 * e.length; n += 8)
t += String.fromCharCode(e[n >> 5] >>> n % 32 & 255);
return t;
}
function Jo(e, n) {
e[n >> 5] |= 128 << n % 32, e[14 + (n + 64 >>> 9 << 4)] = n;
for (var t = 1732584193, o = -271733879, s = -1732584194, i = 271733878, r = 0; r < e.length; r += 16) {
const l = t, u = o, a = s, f = i;
function Jo(e, t) {
e[t >> 5] |= 128 << t % 32, e[14 + (t + 64 >>> 9 << 4)] = t;
for (var n = 1732584193, o = -271733879, s = -1732584194, i = 271733878, r = 0; r < e.length; r += 16) {
const l = n, u = o, a = s, f = i;
o = H(

@@ -1468,4 +1463,4 @@ o = H(

s,
i = O(i, t = O(t, o, s, i, e[r + 0], 7, -680876936), o, s, e[r + 1], 12, -389564586),
t,
i = O(i, n = O(n, o, s, i, e[r + 0], 7, -680876936), o, s, e[r + 1], 12, -389564586),
n,
o,

@@ -1477,3 +1472,3 @@ e[r + 2],

i,
t,
n,
e[r + 3],

@@ -1485,4 +1480,4 @@ 22,

s,
i = O(i, t = O(t, o, s, i, e[r + 4], 7, -176418897), o, s, e[r + 5], 12, 1200080426),
t,
i = O(i, n = O(n, o, s, i, e[r + 4], 7, -176418897), o, s, e[r + 5], 12, 1200080426),
n,
o,

@@ -1494,3 +1489,3 @@ e[r + 6],

i,
t,
n,
e[r + 7],

@@ -1502,4 +1497,4 @@ 22,

s,
i = O(i, t = O(t, o, s, i, e[r + 8], 7, 1770035416), o, s, e[r + 9], 12, -1958414417),
t,
i = O(i, n = O(n, o, s, i, e[r + 8], 7, 1770035416), o, s, e[r + 9], 12, -1958414417),
n,
o,

@@ -1511,3 +1506,3 @@ e[r + 10],

i,
t,
n,
e[r + 11],

@@ -1519,4 +1514,4 @@ 22,

s,
i = O(i, t = O(t, o, s, i, e[r + 12], 7, 1804603682), o, s, e[r + 13], 12, -40341101),
t,
i = O(i, n = O(n, o, s, i, e[r + 12], 7, 1804603682), o, s, e[r + 13], 12, -40341101),
n,
o,

@@ -1528,3 +1523,3 @@ e[r + 14],

i,
t,
n,
e[r + 15],

@@ -1536,4 +1531,4 @@ 22,

s,
i = C(i, t = C(t, o, s, i, e[r + 1], 5, -165796510), o, s, e[r + 6], 9, -1069501632),
t,
i = C(i, n = C(n, o, s, i, e[r + 1], 5, -165796510), o, s, e[r + 6], 9, -1069501632),
n,
o,

@@ -1545,3 +1540,3 @@ e[r + 11],

i,
t,
n,
e[r + 0],

@@ -1553,4 +1548,4 @@ 20,

s,
i = C(i, t = C(t, o, s, i, e[r + 5], 5, -701558691), o, s, e[r + 10], 9, 38016083),
t,
i = C(i, n = C(n, o, s, i, e[r + 5], 5, -701558691), o, s, e[r + 10], 9, 38016083),
n,
o,

@@ -1562,3 +1557,3 @@ e[r + 15],

i,
t,
n,
e[r + 4],

@@ -1570,4 +1565,4 @@ 20,

s,
i = C(i, t = C(t, o, s, i, e[r + 9], 5, 568446438), o, s, e[r + 14], 9, -1019803690),
t,
i = C(i, n = C(n, o, s, i, e[r + 9], 5, 568446438), o, s, e[r + 14], 9, -1019803690),
n,
o,

@@ -1579,3 +1574,3 @@ e[r + 3],

i,
t,
n,
e[r + 8],

@@ -1587,4 +1582,4 @@ 20,

s,
i = C(i, t = C(t, o, s, i, e[r + 13], 5, -1444681467), o, s, e[r + 2], 9, -51403784),
t,
i = C(i, n = C(n, o, s, i, e[r + 13], 5, -1444681467), o, s, e[r + 2], 9, -51403784),
n,
o,

@@ -1596,3 +1591,3 @@ e[r + 7],

i,
t,
n,
e[r + 12],

@@ -1604,4 +1599,4 @@ 20,

s,
i = D(i, t = D(t, o, s, i, e[r + 5], 4, -378558), o, s, e[r + 8], 11, -2022574463),
t,
i = D(i, n = D(n, o, s, i, e[r + 5], 4, -378558), o, s, e[r + 8], 11, -2022574463),
n,
o,

@@ -1613,3 +1608,3 @@ e[r + 11],

i,
t,
n,
e[r + 14],

@@ -1621,4 +1616,4 @@ 23,

s,
i = D(i, t = D(t, o, s, i, e[r + 1], 4, -1530992060), o, s, e[r + 4], 11, 1272893353),
t,
i = D(i, n = D(n, o, s, i, e[r + 1], 4, -1530992060), o, s, e[r + 4], 11, 1272893353),
n,
o,

@@ -1630,3 +1625,3 @@ e[r + 7],

i,
t,
n,
e[r + 10],

@@ -1638,4 +1633,4 @@ 23,

s,
i = D(i, t = D(t, o, s, i, e[r + 13], 4, 681279174), o, s, e[r + 0], 11, -358537222),
t,
i = D(i, n = D(n, o, s, i, e[r + 13], 4, 681279174), o, s, e[r + 0], 11, -358537222),
n,
o,

@@ -1647,3 +1642,3 @@ e[r + 3],

i,
t,
n,
e[r + 6],

@@ -1655,4 +1650,4 @@ 23,

s,
i = D(i, t = D(t, o, s, i, e[r + 9], 4, -640364487), o, s, e[r + 12], 11, -421815835),
t,
i = D(i, n = D(n, o, s, i, e[r + 9], 4, -640364487), o, s, e[r + 12], 11, -421815835),
n,
o,

@@ -1664,3 +1659,3 @@ e[r + 15],

i,
t,
n,
e[r + 2],

@@ -1672,4 +1667,4 @@ 23,

s,
i = H(i, t = H(t, o, s, i, e[r + 0], 6, -198630844), o, s, e[r + 7], 10, 1126891415),
t,
i = H(i, n = H(n, o, s, i, e[r + 0], 6, -198630844), o, s, e[r + 7], 10, 1126891415),
n,
o,

@@ -1681,3 +1676,3 @@ e[r + 14],

i,
t,
n,
e[r + 5],

@@ -1689,4 +1684,4 @@ 21,

s,
i = H(i, t = H(t, o, s, i, e[r + 12], 6, 1700485571), o, s, e[r + 3], 10, -1894986606),
t,
i = H(i, n = H(n, o, s, i, e[r + 12], 6, 1700485571), o, s, e[r + 3], 10, -1894986606),
n,
o,

@@ -1698,3 +1693,3 @@ e[r + 10],

i,
t,
n,
e[r + 1],

@@ -1706,4 +1701,4 @@ 21,

s,
i = H(i, t = H(t, o, s, i, e[r + 8], 6, 1873313359), o, s, e[r + 15], 10, -30611744),
t,
i = H(i, n = H(n, o, s, i, e[r + 8], 6, 1873313359), o, s, e[r + 15], 10, -30611744),
n,
o,

@@ -1715,3 +1710,3 @@ e[r + 6],

i,
t,
n,
e[r + 13],

@@ -1723,4 +1718,4 @@ 21,

s,
i = H(i, t = H(t, o, s, i, e[r + 4], 6, -145523070), o, s, e[r + 11], 10, -1120210379),
t,
i = H(i, n = H(n, o, s, i, e[r + 4], 6, -145523070), o, s, e[r + 11], 10, -1120210379),
n,
o,

@@ -1732,36 +1727,36 @@ e[r + 2],

i,
t,
n,
e[r + 9],
21,
-343485551
), t = ae(t, l), o = ae(o, u), s = ae(s, a), i = ae(i, f);
), n = ae(n, l), o = ae(o, u), s = ae(s, a), i = ae(i, f);
}
return [t, o, s, i];
return [n, o, s, i];
}
function It(e, n, t, o, s, i) {
return ae(Xo(ae(ae(n, e), ae(o, i)), s), t);
function It(e, t, n, o, s, i) {
return ae(Xo(ae(ae(t, e), ae(o, i)), s), n);
}
function O(e, n, t, o, s, i, r) {
return It(n & t | ~n & o, e, n, s, i, r);
function O(e, t, n, o, s, i, r) {
return It(t & n | ~t & o, e, t, s, i, r);
}
function C(e, n, t, o, s, i, r) {
return It(n & o | t & ~o, e, n, s, i, r);
function C(e, t, n, o, s, i, r) {
return It(t & o | n & ~o, e, t, s, i, r);
}
function D(e, n, t, o, s, i, r) {
return It(n ^ t ^ o, e, n, s, i, r);
function D(e, t, n, o, s, i, r) {
return It(t ^ n ^ o, e, t, s, i, r);
}
function H(e, n, t, o, s, i, r) {
return It(t ^ (n | ~o), e, n, s, i, r);
function H(e, t, n, o, s, i, r) {
return It(n ^ (t | ~o), e, t, s, i, r);
}
function ae(e, n) {
const t = (65535 & e) + (65535 & n);
return (e >> 16) + (n >> 16) + (t >> 16) << 16 | 65535 & t;
function ae(e, t) {
const n = (65535 & e) + (65535 & t);
return (e >> 16) + (t >> 16) + (n >> 16) << 16 | 65535 & n;
}
function Xo(e, n) {
return e << n | e >>> 32 - n;
function Xo(e, t) {
return e << t | e >>> 32 - t;
}
const Xn = Symbol("INVALID_KEY");
function Qo(e) {
const n = e.slice(0, 32), t = e.slice(32), o = atob(t);
if (n !== jo(t))
const t = e.slice(0, 32), n = e.slice(32), o = atob(n);
if (t !== jo(n))
return Xn;

@@ -1797,4 +1792,4 @@ const [s, i] = o.split(";"), r = s.slice(2), l = new Date(Number(i.slice(2)));

}, rs = Qn, ls = /^(?:127\.0\.0\.1|localhost|0\.0\.0\.0)$/, cs = ["virtuoso.dev", "csb.app", "codesandbox.io"];
function us({ licenseKey: e, now: n, hostname: t, packageTimestamp: o }) {
const s = t.match(ls), i = cs.some((r) => t.endsWith(r));
function us({ licenseKey: e, now: t, hostname: n, packageTimestamp: o }) {
const s = n.match(ls), i = cs.some((r) => n.endsWith(r));
if (e) {

@@ -1804,3 +1799,3 @@ const r = Qo(e);

return os;
if (r.expiryDate.getTime() < n.getTime()) {
if (r.expiryDate.getTime() < t.getTime()) {
if (s)

@@ -1817,15 +1812,15 @@ return ss;

licenseKey: e,
children: n
children: t
}) => {
const t = us({
const n = us({
licenseKey: e,
hostname: typeof window < "u" ? window.location.hostname : "localhost",
now: /* @__PURE__ */ new Date(),
packageTimestamp: 1721305494780
packageTimestamp: 1721314616112
});
return /* @__PURE__ */ S(eo.Provider, { value: t, children: n });
return /* @__PURE__ */ S(eo.Provider, { value: n, children: t });
};
as.displayName = Math.random().toString(36).slice(2, 8);
const ps = d.createContext(void 0);
function fs(e, n, t) {
function fs(e, t, n) {
const o = _t(), s = d.useRef(null), i = d.useRef(null);

@@ -1861,3 +1856,3 @@ function r() {

}
if (a.top !== void 0 && (t.current = a.top, o.pub(zt, !0)), a.forceBottomSpace !== void 0 && n.current && (n.current.style.paddingBottom = `${a.forceBottomSpace}px`), a.behavior === "smooth")
if (a.top !== void 0 && (n.current = a.top, o.pub(zt, !0)), a.forceBottomSpace !== void 0 && t.current && (t.current.style.paddingBottom = `${a.forceBottomSpace}px`), a.behavior === "smooth")
l(a.top ?? 0, Po, No);

@@ -1871,3 +1866,3 @@ else if (a.behavior === "auto" || a.behavior === "instant" || a.behavior === void 0)

},
[o, l, n, e, t]
[o, l, t, e, n]
);

@@ -1878,55 +1873,55 @@ }

data: {
prepend: (n) => {
e.pub(ue, n);
prepend: (t) => {
e.pub(ue, t);
},
append: (n, t) => {
append: (t, n) => {
e.pub(dt, {
data: n,
scrollToBottom: t
data: t,
scrollToBottom: n
});
},
replace: (n, t) => {
replace: (t, n) => {
e.pub(we, {
...t,
data: n
...n,
data: t
});
},
map: (n, t) => {
map: (t, n) => {
e.pub(Dt, {
mapper: n,
autoscrollToBottomBehavior: t
mapper: t,
autoscrollToBottomBehavior: n
});
},
findAndDelete: (n) => {
e.pub(Tn, n);
findAndDelete: (t) => {
e.pub(Tn, t);
},
findIndex: (n) => e.getValue($).findIndex(n),
find: (n) => e.getValue($).find(n),
insert: function(n, t, o) {
findIndex: (t) => e.getValue($).findIndex(t),
find: (t) => e.getValue($).find(t),
insert: function(t, n, o) {
e.pub(at, {
data: n,
offset: t,
data: t,
offset: n,
scrollToBottom: o
});
},
deleteRange: function(n, t) {
deleteRange: function(t, n) {
e.pub(Ct, {
offset: n,
count: t
offset: t,
count: n
});
},
batch: (n, t) => {
e.pub(Ie, !0), n(), e.pub(Ie, !1), e.pub(vt, { data: [], scrollToBottom: t });
batch: (t, n) => {
e.pub(Ie, !0), t(), e.pub(Ie, !1), e.pub(vt, { data: [], scrollToBottom: n });
},
get: () => e.getValue($).slice(),
getCurrentlyRendered: () => e.getValue(ht),
updateWithAnchor(n, t) {
e.pub(ce, { data: n, anchorCb: t });
updateWithAnchor(t, n) {
e.pub(ce, { data: t, anchorCb: n });
}
},
scrollToItem: (n) => {
e.pub(Q, n);
scrollToItem: (t) => {
e.pub(Q, t);
},
scrollIntoView: (n) => {
e.pub(Sn, n);
scrollIntoView: (t) => {
e.pub(Sn, t);
},

@@ -1942,8 +1937,8 @@ scrollerElement: () => e.getValue(Ht),

}
const hs = ({ item: e, ItemContent: n, mount: t, unmount: o }) => {
const hs = ({ item: e, ItemContent: t, mount: n, unmount: o }) => {
const s = V(Ke), i = d.useRef(null), r = d.useCallback(
(l) => {
l ? (i.current = l, t(l)) : i.current && (o(i.current), i.current = null);
l ? (i.current = l, n(l)) : i.current && (o(i.current), i.current = null);
},
[t, o]
[n, o]
);

@@ -1962,3 +1957,3 @@ return /* @__PURE__ */ S(

},
children: /* @__PURE__ */ S(n, { index: e.index, prevData: e.prevData, nextData: e.nextData, data: e.data, context: s })
children: /* @__PURE__ */ S(t, { index: e.index, prevData: e.prevData, nextData: e.nextData, data: e.data, context: s })
}

@@ -1968,9 +1963,9 @@ );

function it(e) {
const n = d.useRef(null);
const t = d.useRef(null);
return [d.useCallback(
(o) => {
o ? (n.current = o, e == null || e.observe(o, { box: "border-box" })) : n.current && (e == null || e.unobserve(n.current), n.current = null);
o ? (t.current = o, e == null || e.observe(o, { box: "border-box" })) : t.current && (e == null || e.unobserve(t.current), t.current = null);
},
[e]
), n];
), t];
}

@@ -1981,4 +1976,4 @@ let tn = !1;

initialData: e = [],
computeItemKey: n = Bn,
context: t = null,
computeItemKey: t = Bn,
context: n = null,
initialLocation: o = null,

@@ -2005,4 +2000,4 @@ shortSizeAlign: s = "top",

[$]: e.slice(),
[Ke]: t,
[Fn]: n,
[Ke]: n,
[Fn]: t,
[Ue]: o,

@@ -2025,3 +2020,3 @@ [Vt]: l,

J.pubIn({
[Ke]: t,
[Ke]: n,
[Vt]: l

@@ -2053,4 +2048,4 @@ }), J.singletonSub(Bt, i), J.singletonSub(ht, r);

ds.displayName = "VirtuosoMessageList";
const gs = ({ style: e, ...n }) => {
const t = _t(), o = d.useContext(ps), [
const gs = ({ style: e, ...t }) => {
const n = _t(), o = d.useContext(ps), [
s,

@@ -2143,3 +2138,3 @@ i,

[me]: _
}), t.pubIn(w);
}), n.pubIn(w);
});

@@ -2150,3 +2145,3 @@ }), [P, U] = it(b), [G, Z] = it(b), [J, N] = it(b), [M, A] = it(b), Qe = d.useCallback(

const se = parseInt(h.dataset.index ?? "");
t.pub(me, [
n.pub(me, [
{

@@ -2161,3 +2156,3 @@ startIndex: se,

},
[b, t, o]
[b, n, o]
), et = d.useCallback(

@@ -2180,22 +2175,22 @@ (h) => {

const se = h.scrollHeight - h.clientHeight;
gn(h.scrollTop, Math.min(se, z.current)) && (z.current = null, t.pub(zt, !1), t.pub(qe, h.scrollTop));
gn(h.scrollTop, Math.min(se, z.current)) && (z.current = null, n.pub(zt, !1), n.pub(qe, h.scrollTop));
}
t.pub(T, h.scrollTop);
n.pub(T, h.scrollTop);
}
}, [t]), Be = d.useCallback(
}, [n]), Be = d.useCallback(
(h) => {
t.pub(Ut, h.deltaY > 0 ? "down" : "up");
n.pub(Ut, h.deltaY > 0 ? "down" : "up");
},
[t]
[n]
), le = d.useCallback(
(h) => {
h ? (t.pub(Ht, h), E.current = h, h.addEventListener("scroll", X), h.addEventListener("wheel", Be), o && t.pubIn({
h ? (n.pub(Ht, h), E.current = h, h.addEventListener("scroll", X), h.addEventListener("wheel", Be), o && n.pubIn({
[q]: o.viewportHeight,
[j]: o.viewportHeight,
[T]: 0
}), b.observe(h, { box: "border-box" })) : E.current && (E.current.removeEventListener("scroll", X), E.current.removeEventListener("wheel", Be), t.pub(Ht, null), b.unobserve(E.current), E.current = null);
}), b.observe(h, { box: "border-box" })) : E.current && (E.current.removeEventListener("scroll", X), E.current.removeEventListener("wheel", Be), n.pub(Ht, null), b.unobserve(E.current), E.current = null);
},
[b, t, X, Be, o]
[b, n, X, Be, o]
), { items: kt } = V(De);
d.useLayoutEffect(() => t.sub(Oe, $e), [$e, t]), d.useLayoutEffect(() => t.sub(te, re), [re, t]);
d.useLayoutEffect(() => n.sub(Oe, $e), [$e, n]), d.useLayoutEffect(() => n.sub(te, re), [re, n]);
const jt = d.useCallback(() => {

@@ -2213,5 +2208,5 @@ var se;

}
t.pub(me, h);
}, [t]);
d.useLayoutEffect(() => t.sub(Kt, jt), [jt, t]);
n.pub(me, h);
}, [n]);
d.useLayoutEffect(() => n.sub(Kt, jt), [jt, n]);
const no = V(B), oo = V(Re), so = V(K), io = V(Ft), ro = V(mt), lo = V(Dn), de = V(Ke), co = V(Fn), uo = V(Te), ao = V(He);

@@ -2221,3 +2216,3 @@ return /* @__PURE__ */ S(fo, { children: /* @__PURE__ */ nn(

{
...n,
...t,
ref: le,

@@ -2224,0 +2219,0 @@ "data-testid": "virtuoso-scroller",

@@ -23,3 +23,3 @@ {

},
"version": "1.9.0-alpha.1",
"version": "1.9.0-alpha.2",
"type": "module",

@@ -26,0 +26,0 @@ "module": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc