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

react-virtuoso

Package Overview
Dependencies
Maintainers
1
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtuoso - npm Package Compare versions

Comparing version 2.7.1 to 2.7.2

2

dist/index.js

@@ -1,2 +0,2 @@

"use strict";var e=require("@virtuoso.dev/react-urx"),t=require("@virtuoso.dev/urx"),n=require("react");function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function r(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}function s(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}var u,c,m=t.system(function(){var e=t.stream(),n=t.stream(),o=t.statefulStream(0),r=t.stream(),i=t.statefulStream(0),a=t.stream(),l=t.stream(),s=t.statefulStream(0),u=t.statefulStream(0),c=t.stream(),m=t.stream(),d=t.statefulStream(!1);return t.connect(t.pipe(e,t.map(function(e){return e[0]})),n),t.connect(t.pipe(e,t.map(function(e){return e[1]})),l),t.connect(n,i),{scrollContainerState:e,scrollTop:n,viewportHeight:a,headerHeight:s,footerHeight:u,scrollHeight:l,smoothScrollTargetReached:r,scrollTo:c,scrollBy:m,statefulScrollTop:i,deviation:o,scrollingInProgress:d}},[],{singleton:!0});(c=exports.LogLevel||(exports.LogLevel={}))[c.DEBUG=0]="DEBUG",c[c.INFO=1]="INFO",c[c.WARN=2]="WARN",c[c.ERROR=3]="ERROR";var d=((u={})[exports.LogLevel.DEBUG]="debug",u[exports.LogLevel.INFO]="log",u[exports.LogLevel.WARN]="warn",u[exports.LogLevel.ERROR]="error",u),f=t.system(function(){var e=t.statefulStream(exports.LogLevel.ERROR);return{log:t.statefulStream(function(n,o,r){var i;void 0===r&&(r=exports.LogLevel.INFO),r>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:t.getValue(e))&&console[d[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:e}},[],{singleton:!0}),p=t.system(function(e){var n=e[0].log,o=t.statefulStream(!1),r=t.streamFromEmitter(t.pipe(o,t.filter(function(e){return e}),t.distinctUntilChanged()));return t.subscribe(o,function(e){e&&t.getValue(n)("props updated",{},exports.LogLevel.DEBUG)}),{propsReady:o,didMount:r}},t.tup(f),{singleton:!0}),h="up",g={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},v=t.system(function(e){var n=e[0],o=n.scrollContainerState,r=n.scrollTop,i=n.viewportHeight,a=n.headerHeight,l=n.footerHeight,s=n.scrollBy,u=t.statefulStream(!1),c=t.statefulStream(!0),m=t.stream(),d=t.stream(),f=t.statefulStream(4),p=t.streamFromEmitter(t.pipe(t.merge(t.pipe(t.duc(r),t.skip(1),t.mapTo(!0)),t.pipe(t.duc(r),t.skip(1),t.mapTo(!1),t.debounceTime(100))),t.distinctUntilChanged())),v=t.statefulStreamFromEmitter(t.pipe(t.merge(t.pipe(s,t.mapTo(!0)),t.pipe(s,t.mapTo(!1),t.debounceTime(200))),t.distinctUntilChanged()),!1);t.connect(t.pipe(t.duc(r),t.map(function(e){return 0===e}),t.distinctUntilChanged()),c),t.connect(c,d);var S=t.streamFromEmitter(t.pipe(t.combineLatest(o,t.duc(i),t.duc(a),t.duc(l),t.duc(f)),t.scan(function(e,t){var n,o,r=t[0],i=r[0],a=r[1],l=t[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-t[4]?(i>e.state.scrollTop?(n="SCROLLED_DOWN",o=e.state.scrollTop-i):(n="SIZE_DECREASED",o=e.state.scrollTop-i||e.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:o}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":l<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},g),t.distinctUntilChanged(function(e,t){return e&&e.atBottom===t.atBottom}))),C=t.statefulStreamFromEmitter(t.pipe(o,t.scan(function(e,t){var n=t[0],o=t[1];return e.scrollHeight!==o?e.scrollTop!==n?{scrollHeight:o,scrollTop:n,jump:e.scrollTop-n,changed:!0}:{scrollHeight:o,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:o,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),t.filter(function(e){return e.changed}),t.map(function(e){return e.jump})),0);t.connect(t.pipe(S,t.map(function(e){return e.atBottom})),u),t.subscribe(u,function(e){setTimeout(function(){return t.publish(m,e)})});var I=t.statefulStream("down");t.subscribe(u,function(e){setTimeout(function(){t.publish(m,e)})}),t.connect(t.pipe(o,t.map(function(e){return e[0]}),t.distinctUntilChanged(),t.scan(function(e,n){return t.getValue(v)?{direction:e.direction,prevScrollTop:n}:{direction:n<e.prevScrollTop?h:"down",prevScrollTop:n}},{direction:"down",prevScrollTop:0}),t.map(function(e){return e.direction})),I),t.connect(t.pipe(o,t.throttleTime(50),t.mapTo("none")),I),t.connect(u,m);var x=t.statefulStream(0);return t.connect(t.pipe(p,t.filter(function(e){return!e}),t.mapTo(0)),x),t.connect(t.pipe(r,t.throttleTime(100),t.withLatestFrom(p),t.filter(function(e){return!!e[1]}),t.scan(function(e,t){return[e[1],t[0]]},[0,0]),t.map(function(e){return e[1]-e[0]})),x),{isScrolling:p,isAtTop:c,isAtBottom:u,atBottomState:S,atTopStateChange:d,atBottomStateChange:m,scrollDirection:I,atBottomThreshold:f,scrollVelocity:x,lastJumpDueToItemResize:C}},t.tup(m)),S=t.system(function(e){var n=e[0].scrollVelocity,o=t.statefulStream(!1),r=t.stream(),i=t.statefulStream(!1);return t.connect(t.pipe(n,t.withLatestFrom(i,o,r),t.filter(function(e){return!!e[1]}),t.map(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=n.enter;if(o){if((0,n.exit)(t,r))return!1}else if(i(t,r))return!0;return o}),t.distinctUntilChanged()),o),t.subscribe(t.pipe(t.combineLatest(o,n,r),t.withLatestFrom(i)),function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])}),{isSeeking:o,scrollSeekConfiguration:i,scrollVelocity:n,scrollSeekRangeChanged:r}},t.tup(v),{singleton:!0}),C={lvl:0};function I(e,t,n,o,r){return void 0===o&&(o=C),void 0===r&&(r=C),{k:e,v:t,lvl:n,l:o,r:r}}function x(e){return e===C}function T(){return C}function w(e,t){if(x(e))return C;var n=e.k,o=e.l,r=e.r;if(t===n){if(x(o))return r;if(x(r))return o;var i=H(o);return B(k(e,{k:i[0],v:i[1],l:R(o)}))}return B(k(e,t<n?{l:w(o,t)}:{r:w(r,t)}))}function y(e,t,n){if(void 0===n&&(n="k"),x(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var o=y(e.r,t,n);return-Infinity===o[0]?[e.k,e.v]:o}return y(e.l,t,n)}function b(e,t,n){return x(e)?I(t,n,1):t===e.k?k(e,{k:t,v:n}):function(e){return O(M(e))}(k(e,t<e.k?{l:b(e.l,t,n)}:{r:b(e.r,t,n)}))}function E(e,t,n){if(x(e))return[];var o=e.k,r=e.v,i=e.r,a=[];return o>t&&(a=a.concat(E(e.l,t,n))),o>=t&&o<=n&&a.push({k:o,v:r}),o<=n&&(a=a.concat(E(i,t,n))),a}function L(e){return x(e)?[]:[].concat(L(e.l),[{k:e.k,v:e.v}],L(e.r))}function H(e){return x(e.r)?[e.k,e.v]:H(e.r)}function R(e){return x(e.r)?e.l:B(k(e,{r:R(e.r)}))}function k(e,t){return I(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function z(e){return x(e)||e.lvl>e.r.lvl}function B(e){var t=e.l,n=e.r,o=e.lvl;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(z(t))return M(k(e,{lvl:o-1}));if(x(t)||x(t.r))throw new Error("Unexpected empty nodes");return k(t.r,{l:k(t,{r:t.r.l}),r:k(e,{l:t.r.r,lvl:o-1}),lvl:o})}if(z(e))return O(k(e,{lvl:o-1}));if(x(n)||x(n.l))throw new Error("Unexpected empty nodes");var r=n.l,i=z(r)?n.lvl-1:n.lvl;return k(r,{l:k(e,{r:r.l,lvl:o-1}),r:O(k(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}function F(e,t,n){return x(e)?[]:P(E(e,y(e,t)[0],n),function(e){return{index:e.k,value:e.v}})}function P(e,t){var n=e.length;if(0===n)return[];for(var o=t(e[0]),r=o.index,i=o.value,a=[],l=1;l<n;l++){var s=t(e[l]),u=s.index,c=s.value;a.push({start:r,end:u-1,value:i}),r=u,i=c}return a.push({start:r,end:Infinity,value:i}),a}function O(e){var t=e.r,n=e.lvl;return x(t)||x(t.r)||t.lvl!==n||t.r.lvl!==n?e:k(t,{l:k(e,{r:t.l}),lvl:n+1})}function M(e){var t=e.l;return x(t)||t.lvl!==e.lvl?e:k(t,{r:k(e,{l:t.r})})}function V(e,t,n,o){void 0===o&&(o=0);for(var r=e.length-1;o<=r;){var i=Math.floor((o+r)/2),a=n(e[i],t);if(0===a)return i;if(-1===a){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error("Failed binary finding record in array - "+e.join(",")+", searched for "+t)}function U(e,t,n){return e[V(e,t,n)]}function A(e,t){return Math.round(e.getBoundingClientRect()[t])}function W(e){var t=e.size,n=e.startIndex,o=e.endIndex;return function(e){return e.start===n&&(e.end===o||Infinity===e.end)&&e.value===t}}function N(e,t){var n=e.index;return t===n?0:t<n?-1:1}function D(e,t){var n=e.offset;return t===n?0:t<n?-1:1}function G(e){return{index:e.index,value:e}}function _(e,t){var n=t[0],o=t[1];n.length>0&&(0,t[2])("received item sizes",n,exports.LogLevel.DEBUG);var r=e.sizeTree,i=e.offsetTree,l=r,s=0;if(o.length>0&&x(r)&&2===n.length){var u=n[0].size,c=n[1].size;l=o.reduce(function(e,t){return b(b(e,t,u),t+1,c)},l)}else{var m=function(e,t){for(var n,o=x(e)?0:Infinity,r=a(t);!(n=r()).done;){var i=n.value,l=i.size,s=i.startIndex,u=i.endIndex;if(o=Math.min(o,s),x(e))e=b(e,0,l);else{var c=F(e,s-1,u+1);if(!c.some(W(i))){for(var m,d=!1,f=!1,p=a(c);!(m=p()).done;){var h=m.value,g=h.start,v=h.end,S=h.value;d?(u>=g||l===S)&&(e=w(e,g)):(f=S!==l,d=!0),v>u&&u>=g&&S!==l&&(e=b(e,u+1,S))}f&&(e=b(e,s,l))}}}return[e,o]}(l,n);l=m[0],s=m[1]}if(l===r)return e;var d=0,f=0,p=0,h=0;if(0!==s){h=V(i,s-1,N),p=i[h].offset;var g=y(l,s-1);d=g[0],f=g[1],i.length&&i[h].size===y(l,s)[1]&&(h-=1),i=i.slice(0,h+1)}else i=[];for(var v,S=a(F(l,s,Infinity));!(v=S()).done;){var C=v.value,I=C.start,E=C.value,L=(I-d)*f+p;i.push({offset:L,size:E,index:I}),d=I,p=L,f=E}return{sizeTree:l,offsetTree:i,groupOffsetTree:o.reduce(function(e,t){return b(e,t,j(t,i))},T()),lastIndex:d,lastOffset:p,lastSize:f,groupIndices:o}}function j(e,t){if(0===t.length)return 0;var n=U(t,e,N);return n.size*(e-n.index)+n.offset}function K(e,t){if(!Y(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function Y(e){return!x(e.groupOffsetTree)}var q={offsetHeight:"height",offsetWidth:"width"},Z=t.system(function(e){var n=e[0].log,r=t.stream(),i=t.stream(),a=t.statefulStreamFromEmitter(i,0),l=t.stream(),s=t.statefulStream(0),u=t.statefulStream([]),c=t.statefulStream(void 0),m=t.statefulStream(void 0),d=t.statefulStream(function(e,t){return A(e,q[t])}),f=t.statefulStream(void 0),p={offsetTree:[],sizeTree:T(),groupOffsetTree:T(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},h=t.statefulStreamFromEmitter(t.pipe(r,t.withLatestFrom(u,n),t.scan(_,p),t.distinctUntilChanged()),p);t.connect(t.pipe(u,t.filter(function(e){return e.length>0}),t.withLatestFrom(h),t.map(function(e){var t=e[0],n=e[1],r=t.reduce(function(e,t,o){return b(e,t,j(t,n.offsetTree)||o)},T());return o({},n,{groupIndices:t,groupOffsetTree:r})})),h),t.connect(t.pipe(i,t.withLatestFrom(h),t.filter(function(e){return e[0]<e[1].lastIndex}),t.map(function(e){var t=e[1];return[{startIndex:e[0],endIndex:t.lastIndex,size:t.lastSize}]})),r),t.connect(c,m);var g=t.statefulStreamFromEmitter(t.pipe(c,t.map(function(e){return void 0===e})),!0);t.connect(t.pipe(m,t.filter(function(e){return void 0!==e&&x(t.getValue(h).sizeTree)}),t.map(function(e){return[{startIndex:0,endIndex:0,size:e}]})),r);var v=t.streamFromEmitter(t.pipe(r,t.withLatestFrom(h),t.scan(function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}},{changed:!1,sizes:p}),t.map(function(e){return e.changed})));t.connect(t.pipe(s,t.scan(function(e,t){return{diff:e.prev-t,prev:t}},{diff:0,prev:0}),t.map(function(e){return e.diff}),t.filter(function(e){return e>0})),l),t.subscribe(t.pipe(s,t.withLatestFrom(n)),function(e){e[0]<0&&(0,e[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},exports.LogLevel.ERROR)});var S=t.streamFromEmitter(l);return t.connect(t.pipe(l,t.withLatestFrom(h),t.map(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return L(n.sizeTree).reduce(function(e,n){var o=n.k,r=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:o+t-1,size:e.prevSize}]),prevIndex:o+t,prevSize:r}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),r),{data:f,totalCount:i,sizeRanges:r,groupIndices:u,defaultItemSize:m,fixedItemSize:c,unshiftWith:l,beforeUnshiftWith:S,firstItemIndex:s,sizes:h,listRefresh:v,statefulTotalCount:a,trackItemSizes:g,itemSize:d}},t.tup(f),{singleton:!0}),J="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function $(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&J||(t.behavior="auto"),t.offset||(t.offset=0),t}var Q=t.system(function(e){var n=e[0],o=n.sizes,r=n.totalCount,i=n.listRefresh,a=e[1],l=a.scrollingInProgress,s=a.viewportHeight,u=a.scrollTo,c=a.smoothScrollTargetReached,m=a.headerHeight,d=a.footerHeight,f=e[2].log,p=t.stream(),h=t.statefulStream(0),g=null,v=null,S=null;function C(){g&&(g(),g=null),S&&(S(),S=null),v&&(clearTimeout(v),v=null),t.publish(l,!1)}return t.connect(t.pipe(p,t.withLatestFrom(o,s,r,h,m,d,f),t.map(function(e){var n=e[0],o=e[1],r=e[2],a=e[3],s=e[4],u=e[5],m=e[6],d=e[7],f=$(n),h=f.align,I=f.behavior,x=f.offset,T=a-1,w=f.index;"LAST"===w&&(w=T),w=K(w,o);var b=j(w=Math.max(0,w,Math.min(T,w)),o.offsetTree)+u;"end"===h?(b=b-r+y(o.sizeTree,w)[1],w===T&&(b+=m)):"center"===h?b=b-r/2+y(o.sizeTree,w)[1]/2:b-=s,x&&(b+=x);var E=function(e){C(),e?(d("retrying to scroll to",{location:n},exports.LogLevel.DEBUG),t.publish(p,n)):d("list did not change, scroll successful",{},exports.LogLevel.DEBUG)};if(C(),"smooth"===I){var L=!1;S=t.subscribe(i,function(e){L=L||e}),g=t.handleNext(c,function(){E(L)})}else g=t.handleNext(t.pipe(i,function(e){var t=setTimeout(function(){e(!1)},50);return function(n){n&&(e(!0),clearTimeout(t))}}),E);return v=setTimeout(function(){C()},1200),t.publish(l,!0),d("scrolling from index to",{index:w,top:b,behavior:I},exports.LogLevel.DEBUG),{top:b,behavior:I}})),u),{scrollToIndex:p,topListHeight:h}},t.tup(Z,m,f),{singleton:!0});function X(e,t,n){return"number"==typeof e?n===h&&"top"===t||"down"===n&&"bottom"===t?e:0:n===h?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse}function ee(e,t){return"number"==typeof e?e:e[t]||0}var te=t.system(function(e){var n=e[0],o=n.scrollTop,r=n.viewportHeight,i=n.deviation,a=n.headerHeight,s=t.stream(),u=t.statefulStream(0),c=t.statefulStream(0),m=t.statefulStream(0),d=t.statefulStream(0);return{listBoundary:s,overscan:d,topListHeight:u,fixedHeaderHeight:c,increaseViewportBy:m,visibleRange:t.statefulStreamFromEmitter(t.pipe(t.combineLatest(t.duc(o),t.duc(r),t.duc(a),t.duc(s,l),t.duc(d),t.duc(u),t.duc(c),t.duc(i),t.duc(m)),t.map(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=r[0],a=r[1],l=e[4],s=e[6],u=e[7],c=e[8],m=t-u,d=e[5]+s,f=Math.max(o-m,0),p="none",g=ee(c,"top"),v=ee(c,"bottom");return i-=u,a+=o,(i+=o)>t+d-g&&(p=h),(a-=u)<t-f+n+v&&(p="down"),"none"!==p?[Math.max(m-o-X(l,"top",p)-g,0),m-f-s+n+X(l,"bottom",p)+v]:null}),t.filter(function(e){return null!=e}),t.distinctUntilChanged(l)),[0,0])}},t.tup(m),{singleton:!0}),ne=t.system(function(e){var n=e[0],r=n.scrollTo,i=n.scrollContainerState,a=t.stream(),l=t.stream(),s=t.stream(),u=t.statefulStream(!1),c=t.statefulStream(void 0);return t.connect(t.pipe(t.combineLatest(a,l),t.map(function(e){var t=e[0],n=t[1];return[Math.max(0,t[0]-e[1].offsetTop),n]})),i),t.connect(t.pipe(r,t.withLatestFrom(l),t.map(function(e){var t=e[0];return o({},t,{top:t.top+e[1].offsetTop})})),s),{useWindowScroll:u,customScrollParent:c,windowScrollContainerState:a,windowViewportRect:l,windowScrollTo:s}},t.tup(m)),oe={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},re={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},ie=Math.ceil,ae=Math.floor,le=Math.min,se=Math.max;function ue(e,t){return Array.from({length:t-e+1}).map(function(t,n){return{index:n+e}})}var ce=t.system(function(e){var n=e[0],r=n.overscan,i=n.visibleRange,a=n.listBoundary,u=e[1],c=u.scrollTop,m=u.viewportHeight,d=u.scrollBy,f=u.scrollTo,p=u.smoothScrollTargetReached,h=u.scrollContainerState,g=e[2],v=e[3],S=e[4],C=S.propsReady,I=S.didMount,x=e[5],T=x.windowViewportRect,w=x.windowScrollTo,y=x.useWindowScroll,b=x.customScrollParent,E=x.windowScrollContainerState,L=t.statefulStream(0),H=t.statefulStream(0),R=t.statefulStream(oe),k=t.statefulStream({height:0,width:0}),z=t.statefulStream({height:0,width:0}),B=t.stream(),F=t.stream(),P=t.statefulStream(0);t.connect(t.pipe(I,t.withLatestFrom(H),t.filter(function(e){return 0!==e[1]}),t.map(function(e){return{items:ue(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),R),t.connect(t.pipe(t.combineLatest(t.duc(L),i,t.duc(z,function(e,t){return e&&e.width===t.width&&e.height===t.height})),t.withLatestFrom(k),t.map(function(e){var t=e[0],n=t[0],o=t[1],r=o[0],i=o[1],a=t[2],l=e[1],s=a.height,u=a.width,c=l.width;if(0===n||0===c)return oe;if(0===u)return re;var m=Math.floor(c/u),d=m*ae(r/s),f=m*ie(i/s)-1;f=le(n-1,f);var p=ue(d=le(f,se(0,d)),f),h=me(l,a,p),g=h.top,v=h.bottom;return{items:p,offsetTop:g,offsetBottom:ie(n/m)*s-v,top:g,bottom:v,itemHeight:s,itemWidth:u}})),R),t.connect(t.pipe(k,t.map(function(e){return e.height})),m),t.connect(t.pipe(t.combineLatest(k,z,R),t.map(function(e){var t=me(e[0],e[1],e[2].items);return[t.top,t.bottom]}),t.distinctUntilChanged(l)),a);var O=t.streamFromEmitter(t.pipe(t.duc(R),t.filter(function(e){return e.items.length>0}),t.withLatestFrom(L),t.filter(function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1}),t.map(function(e){return e[1]-1}),t.distinctUntilChanged())),M=t.streamFromEmitter(t.pipe(t.duc(R),t.filter(function(e){var t=e.items;return t.length>0&&0===t[0].index}),t.mapTo(0),t.distinctUntilChanged())),V=t.streamFromEmitter(t.pipe(t.duc(R),t.filter(function(e){return e.items.length>0}),t.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),t.distinctUntilChanged(s)));t.connect(V,v.scrollSeekRangeChanged),t.connect(t.pipe(B,t.withLatestFrom(k,z,L),t.map(function(e){var t=e[1],n=e[2],o=e[3],r=$(e[0]),i=r.align,a=r.behavior,l=r.offset,s=r.index;"LAST"===s&&(s=o-1);var u=de(t,n,s=Math.max(0,s,Math.min(o-1,s)));return"end"===i?u=Math.round(u-t.height+n.height):"center"===i&&(u=Math.round(u-t.height/2+n.height/2)),l&&(u+=l),{top:u,behavior:a}})),f);var U=t.statefulStreamFromEmitter(t.pipe(R,t.map(function(e){return e.offsetBottom+e.bottom})),0);return t.connect(t.pipe(T,t.map(function(e){return{width:e.visibleWidth,height:e.visibleHeight}})),k),o({totalCount:L,viewportDimensions:k,itemDimensions:z,scrollTop:c,scrollHeight:F,overscan:r,scrollBy:d,scrollTo:f,scrollToIndex:B,smoothScrollTargetReached:p,windowViewportRect:T,windowScrollTo:w,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:E,deviation:P,scrollContainerState:h,initialItemCount:H},v,{gridState:R,totalListHeight:U},g,{startReached:M,endReached:O,rangeChanged:V,propsReady:C})},t.tup(te,m,v,S,p,ne));function me(e,t,n){var o=t.height;return void 0===o||0===n.length?{top:0,bottom:0}:{top:de(e,t,n[0].index),bottom:de(e,t,n[n.length-1].index)+o}}function de(e,t,n){var o=Math.floor(e.width/t.width);return ae(n/o)*t.height}function fe(e,t){void 0===t&&(t=!0);var o=n.useRef(null),r=function(e){};if("undefined"!=typeof ResizeObserver){var i=new ResizeObserver(function(t){var n=t[0].target;null!==n.offsetParent&&e(n)});r=function(e){e&&t?(i.observe(e),o.current=e):(o.current&&i.unobserve(o.current),o.current=null)}}return{ref:o,callbackRef:r}}function pe(e,t){return void 0===t&&(t=!0),fe(e,t).callbackRef}function he(e,t){var o=n.useRef(null),r=n.useCallback(function(n){if(null!==n){var r,i,a=n.getBoundingClientRect(),l=a.width;if(t){var s=t.getBoundingClientRect(),u=a.top-s.top;r=s.height-Math.max(0,u),i=u+t.scrollTop}else r=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;o.current={offsetTop:i,visibleHeight:r,visibleWidth:l},e(o.current)}},[e,t]),i=fe(r),a=i.callbackRef,l=i.ref,s=n.useCallback(function(){r(l.current)},[r,l]);return n.useEffect(function(){if(t){t.addEventListener("scroll",s);var e=new ResizeObserver(s);return e.observe(t),function(){t.removeEventListener("scroll",s),e.unobserve(t)}}return window.addEventListener("scroll",s),window.addEventListener("resize",s),function(){window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),a}var ge="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function ve(e,t,n,o,r,i){return pe(function(n){for(var a=function(e,t,n,o){var r=e.length;if(0===r)return null;for(var i=[],a=0;a<r;a++){var l=e.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=t(l,"offsetHeight");if(0===c&&o("Zero-sized element, this should not happen",{child:l},exports.LogLevel.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,t,0,r),l=n.parentElement;!l.dataset.virtuosoScroller;)l=l.parentElement;var s=i?i.scrollTop:"window"===l.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:l.scrollTop;o(i?[Math.max(s,0),i.scrollHeight]:[Math.max(s,0),l.scrollHeight]),null!==a&&e(a)},n)}function Se(e,o,r,i,a){void 0===i&&(i=t.noop);var l=n.useRef(null),s=n.useRef(null),u=n.useRef(null),c=n.useCallback(function(t){var n=t.target,r=n===window||n===document?window.pageYOffset||document.documentElement.scrollTop:n.scrollTop,i=n===window?document.documentElement.scrollHeight:n.scrollHeight;e([Math.max(r,0),i]),null!==s.current&&(r===s.current||r<=0||r===n.scrollHeight-A(n,"height"))&&(s.current=null,o(!0),u.current&&(clearTimeout(u.current),u.current=null))},[e,o]);return n.useEffect(function(){var e=a||l.current;return i(a||l.current),c({target:e}),e.addEventListener("scroll",c,{passive:!0}),function(){i(null),e.removeEventListener("scroll",c)}},[l,c,r,i,a]),{scrollerRef:l,scrollByCallback:function(e){null===s.current&&l.current.scrollBy(e)},scrollToCallback:function(t){var n=l.current;if(n&&(!("offsetHeight"in n)||0!==n.offsetHeight)){var r,i,a,c="smooth"===t.behavior;if(n===window?(i=Math.max(A(document.documentElement,"height"),document.documentElement.scrollHeight),r=window.innerHeight,a=document.documentElement.scrollTop):(i=n.scrollHeight,r=A(n,"height"),a=n.scrollTop),t.top=Math.ceil(Math.max(Math.min(i-r,t.top),0)),Math.abs(r-i)<1.01||t.top===a)return e([a,i]),void(c&&o(!0));c?(s.current=t.top,u.current&&clearTimeout(u.current),u.current=setTimeout(function(){u.current=null,s.current=null,o(!0)},1e3)):s.current=null,n.scrollTo(t)}}}}var Ce=t.system(function(e){var n=e[0],o=n.sizes,r=n.listRefresh,i=n.defaultItemSize,a=e[1].scrollTop,l=e[2].scrollToIndex,s=e[3].didMount,u=t.statefulStream(!0),c=t.statefulStream(0);return t.connect(t.pipe(s,t.withLatestFrom(c),t.filter(function(e){return 0!==e[1]}),t.mapTo(!1)),u),t.subscribe(t.pipe(t.combineLatest(r,s),t.withLatestFrom(u,o,i),t.filter(function(e){var t=e[1],n=e[3];return e[0][1]&&(!x(e[2].sizeTree)||void 0!==n)&&!t}),t.withLatestFrom(c)),function(e){var n=e[1];setTimeout(function(){t.handleNext(a,function(){t.publish(u,!0)}),t.publish(l,n)})}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},t.tup(Z,m,Q,p),{singleton:!0});function Ie(e){return!!e&&("smooth"===e?"smooth":"auto")}var xe=t.system(function(e){var n=e[0],o=n.totalCount,r=n.listRefresh,i=e[1],a=i.isAtBottom,l=i.atBottomState,s=e[2].scrollToIndex,u=e[3].scrolledToInitialItem,c=e[4],m=c.propsReady,d=c.didMount,f=e[5].log,p=e[6].scrollingInProgress,h=t.statefulStream(!1),g=null;function v(e){t.publish(s,{index:"LAST",align:"end",behavior:e})}return t.subscribe(t.pipe(t.combineLatest(t.pipe(t.duc(o),t.skip(1)),d),t.withLatestFrom(t.duc(h),a,u,p),t.map(function(e){var t=e[0],n=t[0],o=t[1]&&e[3],r="auto";return o&&(r=function(e,t){return"function"==typeof e?Ie(e(t)):t&&Ie(e)}(e[1],e[2]||e[4]),o=o&&!!r),{totalCount:n,shouldFollow:o,followOutputBehavior:r}}),t.filter(function(e){return e.shouldFollow})),function(e){var n=e.totalCount,o=e.followOutputBehavior;g&&(g(),g=null),g=t.handleNext(r,function(){t.getValue(f)("following output to ",{totalCount:n},exports.LogLevel.DEBUG),v(o),g=null})}),t.subscribe(t.pipe(t.combineLatest(t.duc(h),o,m),t.filter(function(e){return e[0]&&e[2]}),t.scan(function(e,t){var n=t[1];return{refreshed:e.value===n,value:n}},{refreshed:!1,value:0}),t.filter(function(e){return e.refreshed}),t.withLatestFrom(h,o)),function(e){var n=e[1],o=t.handleNext(l,function(e){!n||e.atBottom||"SIZE_INCREASED"!==e.notAtBottomBecause||g||(t.getValue(f)("scrolling to bottom due to increased size",{},exports.LogLevel.DEBUG),v("auto"))});setTimeout(o,100)}),t.subscribe(t.combineLatest(t.duc(h),l),function(e){var t=e[1];e[0]&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&v("auto")}),{followOutput:h}},t.tup(Z,v,Q,Ce,p,f,m));function Te(e){return e.reduce(function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e},{totalCount:0,groupIndices:[]})}var we=t.system(function(e){var n=e[0],o=n.totalCount,r=n.groupIndices,i=n.sizes,a=e[1],l=a.scrollTop,s=a.headerHeight,u=t.stream(),c=t.stream(),m=t.streamFromEmitter(t.pipe(u,t.map(Te)));return t.connect(t.pipe(m,t.map(t.prop("totalCount"))),o),t.connect(t.pipe(m,t.map(t.prop("groupIndices"))),r),t.connect(t.pipe(t.combineLatest(l,i,s),t.filter(function(e){return Y(e[1])}),t.map(function(e){return y(e[1].groupOffsetTree,Math.max(e[0]-e[2],0),"v")[0]}),t.distinctUntilChanged(),t.map(function(e){return[e]})),c),{groupCounts:u,topItemsIndexes:c}},t.tup(Z,m)),ye={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function be(e,t,n){if(0===e.length)return[];if(!Y(t))return e.map(function(e){return o({},e,{index:e.index+n,originalIndex:e.index})});for(var r,i=[],l=F(t.groupOffsetTree,e[0].index,e[e.length-1].index),s=void 0,u=0,c=a(e);!(r=c()).done;){var m=r.value;(!s||s.end<m.index)&&(s=l.shift(),u=t.groupIndices.indexOf(s.start)),i.push(o({},m.index===s.start?{type:"group",index:u}:{index:m.index-(u+1)+n,groupIndex:u},{size:m.size,offset:m.offset,originalIndex:m.index,data:m.data}))}return i}function Ee(e,t,n,o,r){var i=0,a=0;if(e.length>0){i=e[0].offset;var l=e[e.length-1];a=l.offset+l.size}var s=i,u=o.lastOffset+(n-o.lastIndex)*o.lastSize-a;return{items:be(e,o,r),topItems:be(t,o,r),topListHeight:t.reduce(function(e,t){return t.size+e},0),offsetTop:i,offsetBottom:u,top:s,bottom:a,totalCount:n}}var Le,He,Re,ke=t.system(function(e){var n=e[0],r=n.sizes,i=n.totalCount,u=n.data,c=n.firstItemIndex,m=e[1],d=e[2],f=d.visibleRange,p=d.listBoundary,h=d.topListHeight,g=e[3],v=g.scrolledToInitialItem,S=g.initialTopMostItemIndex,C=e[4].topListHeight,I=e[5],T=e[6].didMount,w=t.statefulStream([]),b=t.stream();t.connect(m.topItemsIndexes,w);var E=t.statefulStreamFromEmitter(t.pipe(t.combineLatest(T,t.duc(f),t.duc(i),t.duc(r),t.duc(S),v,t.duc(w),t.duc(c),u),t.filter(function(e){return e[0]}),t.map(function(e){var n=e[1],o=n[0],r=n[1],i=e[2],l=e[4],s=e[5],u=e[6],c=e[7],m=e[8],d=e[3],f=d.sizeTree,p=d.offsetTree;if(0===i||0===o&&0===r)return ye;if(x(f))return Ee(function(e,t,n){if(Y(t)){var o=K(e,t);return[{index:y(t.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(l,d,m),[],i,d,c);var h=[];if(u.length>0)for(var g,v=u[0],S=u[u.length-1],C=0,I=a(F(f,v,S));!(g=I()).done;)for(var T=g.value,w=T.value,b=Math.max(T.start,v),E=Math.min(T.end,S),L=b;L<=E;L++)h.push({index:L,size:w,offset:C,data:m&&m[L]}),C+=w;if(!s)return Ee([],h,i,d,c);var H=u.length>0?u[u.length-1]+1:0,R=function(e,t,n,o){return void 0===o&&(o=0),o>0&&(t=Math.max(t,U(e,o,N).offset)),P((i=n,l=V(r=e,t,a=D),s=V(r,i,a,l),r.slice(l,s+1)),G);var r,i,a,l,s}(p,o,r,H);if(0===R.length)return null;var k=i-1;return Ee(t.tap([],function(e){for(var t,n=a(R);!(t=n()).done;){var i=t.value,l=i.value,s=l.offset,u=i.start,c=l.size;l.offset<o&&(s+=((u+=Math.floor((o-l.offset)/c))-i.start)*c),u<H&&(s+=(H-u)*c,u=H);for(var d=Math.min(i.end,k),f=u;f<=d&&!(s>=r);f++)e.push({index:f,size:c,offset:s,data:m&&m[f]}),s+=c}}),h,i,d,c)}),t.filter(function(e){return null!==e}),t.distinctUntilChanged()),ye);return t.connect(t.pipe(u,t.filter(function(e){return void 0!==e}),t.map(function(e){return e.length})),i),t.connect(t.pipe(E,t.map(t.prop("topListHeight"))),C),t.connect(C,h),t.connect(t.pipe(E,t.map(function(e){return[e.top,e.bottom]})),p),t.connect(t.pipe(E,t.map(function(e){return e.items})),b),o({listState:E,topItemsIndexes:w,endReached:t.streamFromEmitter(t.pipe(E,t.filter(function(e){return e.items.length>0}),t.withLatestFrom(i,u),t.filter(function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1}),t.map(function(e){return[e[1]-1,e[2]]}),t.distinctUntilChanged(l),t.map(function(e){return e[0]}))),startReached:t.streamFromEmitter(t.pipe(E,t.throttleTime(200),t.filter(function(e){var t=e.items;return t.length>0&&t[0].originalIndex===e.topItems.length}),t.map(function(e){return e.items[0].index}),t.distinctUntilChanged())),rangeChanged:t.streamFromEmitter(t.pipe(E,t.filter(function(e){return e.items.length>0}),t.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),t.distinctUntilChanged(s))),itemsRendered:b},I)},t.tup(Z,we,te,Ce,Q,v,p),{singleton:!0}),ze=t.system(function(e){var n=e[0],o=n.sizes,r=n.firstItemIndex,i=n.data,l=e[1].listState,s=e[2].didMount,u=t.statefulStream(0);return t.connect(t.pipe(s,t.withLatestFrom(u),t.filter(function(e){return 0!==e[1]}),t.withLatestFrom(o,r,i),t.map(function(e){var t=e[0][1],n=e[1],o=e[2],r=e[3],i=void 0===r?[]:r,l=0;if(n.groupIndices.length>0)for(var s,u=a(n.groupIndices);!((s=u()).done||s.value-l>=t);)l++;var c=t+l;return Ee(Array.from({length:c}).map(function(e,t){return{index:t,size:0,offset:0,data:i[t]}}),[],c,n,o)})),l),{initialItemCount:u}},t.tup(Z,ke,p),{singleton:!0}),Be=t.system(function(e){var n=e[0].topItemsIndexes,o=t.statefulStream(0);return t.connect(t.pipe(o,t.filter(function(e){return e>0}),t.map(function(e){return Array.from({length:e}).map(function(e,t){return t})})),n),{topItemCount:o}},t.tup(ke)),Fe=t.system(function(e){var n=e[0],o=n.footerHeight,r=n.headerHeight,i=e[1].listState,a=t.stream(),l=t.statefulStreamFromEmitter(t.pipe(t.combineLatest(o,r,i),t.map(function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom})),0);return t.connect(t.duc(l),a),{totalListHeight:l,totalListHeightChanged:a}},t.tup(m,ke),{singleton:!0}),Pe=t.system(function(e){var n=e[0],o=n.scrollBy,r=n.scrollTop,i=n.deviation,a=n.scrollingInProgress,l=e[1],s=l.isScrolling,u=l.isAtBottom,c=l.atBottomState,m=l.scrollDirection,d=e[3],f=d.beforeUnshiftWith,p=d.sizes,g=e[4].log,v=t.streamFromEmitter(t.pipe(e[2].listState,t.withLatestFrom(l.lastJumpDueToItemResize),t.scan(function(e,t){var n=e[1],o=t[0],r=o.items,i=o.totalCount,a=t[1],l=0;if(e[2]===i){if(n.length>0&&r.length>0){var s=1===r.length;if(0!==r[0].originalIndex||0!==n[0].originalIndex)for(var u=function(e){var t=r[e],o=n.find(function(e){return e.originalIndex===t.originalIndex});return o?t.offset!==o.offset||s?(l=t.offset-o.offset+t.size-o.size,"break"):void 0:"continue"},c=r.length-1;c>=0;c--){var m=u(c);if("continue"!==m&&"break"===m)break}}0!==l&&(l+=a)}return[l,r,i]},[0,[],0]),t.filter(function(e){return 0!==e[0]}),t.withLatestFrom(r,m,a,g,u,c),t.filter(function(e){return!e[3]&&0!==e[1]&&e[2]===h}),t.map(function(e){var t=e[0][0];return(0,e[4])("Upward scrolling compensation",{amount:t},exports.LogLevel.DEBUG),t})));return t.connect(t.pipe(v,t.withLatestFrom(i),t.map(function(e){return e[1]-e[0]})),i),t.subscribe(t.pipe(t.combineLatest(t.statefulStreamFromEmitter(s,!1),i),t.filter(function(e){return!e[0]&&0!==e[1]}),t.map(function(e){return e[1]}),t.throttleTime(1)),function(e){e>0?(t.publish(o,{top:-e,behavior:"auto"}),t.publish(i,0)):(t.publish(i,0),t.publish(o,{top:-e,behavior:"auto"}))}),t.connect(t.pipe(f,t.withLatestFrom(p),t.map(function(e){return e[0]*e[1].lastSize})),v),{deviation:i}},t.tup(m,v,ke,Z,f)),Oe=t.system(function(e){var n=e[0].totalListHeight,o=e[1].didMount,r=e[2].scrollTo,i=t.statefulStream(0);return t.subscribe(t.pipe(o,t.withLatestFrom(i),t.filter(function(e){return 0!==e[1]}),t.map(function(e){return{top:e[1]}})),function(e){t.handleNext(t.pipe(n,t.filter(function(e){return 0!==e})),function(){setTimeout(function(){t.publish(r,e)})})}),{initialScrollTop:i}},t.tup(Fe,p,m),{singleton:!0}),Me=t.system(function(e){var n=e[0].viewportHeight,o=e[1].totalListHeight,r=t.statefulStream(!1);return{alignToBottom:r,paddingTopAddition:t.statefulStreamFromEmitter(t.pipe(t.combineLatest(r,n,o),t.filter(function(e){return e[0]}),t.map(function(e){return Math.max(0,e[1]-e[2])}),t.distinctUntilChanged()),0)}},t.tup(m,Fe),{singleton:!0}),Ve=t.system(function(e){var n=e[0],o=n.sizes,r=n.totalCount,i=e[1],a=i.scrollTop,l=i.viewportHeight,s=i.headerHeight,u=i.scrollingInProgress,c=e[2].scrollToIndex,m=t.stream();return t.connect(t.pipe(m,t.withLatestFrom(o,l,r,s,a),t.map(function(e){var n=e[0],o=n.index,r=n.behavior,i=void 0===r?"auto":r,a=n.done,l=e[1],s=e[2],c=e[4],m=e[5],d=e[3]-1,f=null;o=K(o,l);var p=j(o=Math.max(0,o,Math.min(d,o)),l.offsetTree)+c;return p<m?f={index:o,behavior:i,align:"start"}:p+y(l.sizeTree,o)[1]>m+s&&(f={index:o,behavior:i,align:"end"}),f?a&&t.handleNext(t.pipe(u,t.skip(1),t.filter(function(e){return!1===e})),a):a&&a(),f}),t.filter(function(e){return null!==e})),c),{scrollIntoView:m}},t.tup(Z,m,Q,ke,f),{singleton:!0}),Ue=t.system(function(e){return o({},e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},t.tup(te,ze,p,S,Fe,Oe,Me,ne,Ve)),Ae=t.system(function(e){var n=e[0],i=n.totalCount,a=n.sizeRanges,l=n.fixedItemSize,s=n.defaultItemSize,u=n.trackItemSizes,c=n.itemSize,m=n.data,d=n.firstItemIndex,f=n.groupIndices,p=n.statefulTotalCount,h=e[1],g=h.initialTopMostItemIndex,v=h.scrolledToInitialItem,S=e[2],C=e[3],I=e[4],x=I.listState,T=I.topItemsIndexes,w=r(I,["listState","topItemsIndexes"]),y=e[5].scrollToIndex,b=e[7].topItemCount,E=e[8].groupCounts,L=e[9],H=e[10];return t.connect(w.rangeChanged,L.scrollSeekRangeChanged),t.connect(t.pipe(L.windowViewportRect,t.map(t.prop("visibleHeight"))),S.viewportHeight),o({totalCount:i,data:m,firstItemIndex:d,sizeRanges:a,initialTopMostItemIndex:g,scrolledToInitialItem:v,topItemsIndexes:T,topItemCount:b,groupCounts:E,fixedItemHeight:l,defaultItemHeight:s},C,{statefulTotalCount:p,listState:x,scrollToIndex:y,trackItemSizes:u,itemSize:c,groupIndices:f},w,L,S,H)},t.tup(Z,Ce,m,xe,ke,Q,Pe,Be,we,Ue,f)),We=(Le=function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"},Re=!1,function(){return Re||(Re=!0,He=Le()),He});function Ne(e){return e}var De=t.system(function(){var e=t.statefulStream(function(e){return"Item "+e}),n=t.statefulStream(null),o=t.statefulStream(function(e){return"Group "+e}),r=t.statefulStream({}),i=t.statefulStream(Ne),a=t.statefulStream("div"),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(r,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:n,itemContent:e,groupContent:o,components:r,computeItemKey:i,headerFooterTag:a,scrollerRef:l,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}});function Ge(e,n){var o=t.stream();return t.subscribe(o,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+n,"color: red;","color: inherit;","color: blue;")}),t.connect(o,e),o}var _e=t.system(function(e){var n=e[0],i=e[1],a={item:Ge(i.itemContent,"Rename the %citem%c prop to %citemContent."),group:Ge(i.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:Ge(n.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:Ge(n.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:Ge(n.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:t.stream(),maxHeightCacheSize:t.stream(),footer:t.stream(),header:t.stream(),HeaderContainer:t.stream(),FooterContainer:t.stream(),ItemContainer:t.stream(),ScrollContainer:t.stream(),GroupContainer:t.stream(),ListContainer:t.stream(),emptyComponent:t.stream(),scrollSeek:t.stream()};function l(e,n,r){t.connect(t.pipe(e,t.withLatestFrom(i.components),t.map(function(e){var t,i=e[0],a=e[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+n+" instead."),o({},a,((t={})[n]=i,t))})),i.components)}return t.subscribe(a.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),t.subscribe(a.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),t.subscribe(a.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),t.subscribe(a.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),t.subscribe(a.scrollSeek,function(e){var a=e.placeholder,l=r(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),t.publish(i.components,o({},t.getValue(i.components),{ScrollSeekPlaceholder:a})),t.publish(n.scrollSeekConfiguration,l)}),l(a.footer,"Footer","footer"),l(a.header,"Header","header"),l(a.ItemContainer,"Item","ItemContainer"),l(a.ListContainer,"List","ListContainer"),l(a.ScrollContainer,"Scroller","ScrollContainer"),l(a.emptyComponent,"EmptyPlaceholder","emptyComponent"),l(a.GroupContainer,"Group","GroupContainer"),o({},n,i,a)},t.tup(Ae,De)),je=function(e){return n.createElement("div",{style:{height:e.height}})},Ke={position:We(),zIndex:1,overflowAnchor:"none"},Ye=n.memo(function(e){var r=e.showTopList,i=void 0!==r&&r,a=ut("listState"),l=ut("deviation"),s=st("sizeRanges"),u=ut("useWindowScroll"),c=ut("customScrollParent"),m=st("windowScrollContainerState"),d=st("scrollContainerState"),f=c||u?m:d,p=ut("itemContent"),h=ut("context"),g=ut("groupContent"),v=ut("trackItemSizes"),S=ut("itemSize"),C=ut("log"),I=ve(s,S,v,i?t.noop:f,C,c),x=ut("EmptyPlaceholder"),T=ut("ScrollSeekPlaceholder")||je,w=ut("ListComponent"),y=ut("ItemComponent"),b=ut("GroupComponent"),E=ut("computeItemKey"),L=ut("isSeeking"),H=ut("groupIndices").length>0,R=ut("paddingTopAddition"),k=ut("firstItemIndex"),z=ut("statefulTotalCount"),B=i?{}:{boxSizing:"border-box",paddingTop:a.offsetTop+R,paddingBottom:a.offsetBottom,marginTop:l};return!i&&0===z&&x?n.createElement(x,$e(x,h)):n.createElement(w,o({},$e(w,h),{ref:I,style:B,"data-test-id":i?"virtuoso-top-item-list":"virtuoso-item-list"}),(i?a.topItems:a.items).map(function(e){var t=e.originalIndex,r=E(t+k,e.data,h);return L?n.createElement(T,o({},$e(T,h),{key:r,index:e.index,height:e.size,type:e.type||"item"},"group"===e.type?{}:{groupIndex:e.groupIndex})):"group"===e.type?n.createElement(b,o({},$e(b,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:Ke}),g(e.index)):n.createElement(y,o({},$e(y,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex,style:{overflowAnchor:"none"}}),H?p(e.index,e.groupIndex,e.data,h):p(e.index,e.data,h))}))}),qe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ze={width:"100%",height:"100%",position:"absolute",top:0},Je={width:"100%",position:We(),top:0};function $e(e,t){if("string"!=typeof e)return{context:t}}var Qe=n.memo(function(){var e=ut("HeaderComponent"),t=st("headerHeight"),o=ut("headerFooterTag"),r=pe(function(e){return t(A(e,"height"))}),i=ut("context");return e?n.createElement(o,{ref:r},n.createElement(e,$e(e,i))):null}),Xe=n.memo(function(){var e=ut("FooterComponent"),t=st("footerHeight"),o=ut("headerFooterTag"),r=pe(function(e){return t(A(e,"height"))}),i=ut("context");return e?n.createElement(o,{ref:r},n.createElement(e,$e(e,i))):null});function et(e){var t=e.usePublisher,i=e.useEmitter,a=e.useEmitterValue;return n.memo(function(e){var l=e.style,s=e.children,u=r(e,["style","children"]),c=t("scrollContainerState"),m=a("ScrollerComponent"),d=t("smoothScrollTargetReached"),f=a("scrollerRef"),p=a("context"),h=Se(c,d,m,f),g=h.scrollerRef,v=h.scrollByCallback;return i("scrollTo",h.scrollToCallback),i("scrollBy",v),n.createElement(m,o({ref:g,style:o({},qe,l),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},u,$e(m,p)),s)})}function tt(e){var i=e.usePublisher,a=e.useEmitter,l=e.useEmitterValue;return n.memo(function(e){var s=e.style,u=e.children,c=r(e,["style","children"]),m=i("windowScrollContainerState"),d=l("ScrollerComponent"),f=i("smoothScrollTargetReached"),p=l("totalListHeight"),h=l("deviation"),g=l("customScrollParent"),v=l("context"),S=Se(m,f,d,t.noop,g),C=S.scrollerRef,I=S.scrollByCallback,x=S.scrollToCallback;return ge(function(){return C.current=g||window,function(){C.current=null}},[C,g]),a("windowScrollTo",x),a("scrollBy",I),n.createElement(d,o({style:o({position:"relative"},s,0!==p?{height:p+h}:{}),"data-virtuoso-scroller":!0},c,$e(d,v)),u)})}var nt=function(e){var o=e.children,r=st("viewportHeight"),i=pe(t.compose(r,function(e){return A(e,"height")}));return n.createElement("div",{style:Ze,ref:i,"data-viewport-type":"element"},o)},ot=function(e){var t=e.children,o=he(st("windowViewportRect"),ut("customScrollParent"));return n.createElement("div",{ref:o,style:Ze,"data-viewport-type":"window"},t)},rt=function(e){var t=e.children,r=ut("TopItemListComponent"),i=ut("headerHeight"),a=o({},Je,{marginTop:i+"px"}),l=ut("context");return n.createElement(r||"div",{style:a,context:l},t)},it=n.memo(function(e){var t=ut("useWindowScroll"),r=ut("topItemsIndexes").length>0,i=ut("customScrollParent"),a=i||t?ot:nt;return n.createElement(i||t?dt:mt,o({},e),n.createElement(a,null,n.createElement(Qe,null),n.createElement(Ye,null),n.createElement(Xe,null)),r&&n.createElement(rt,null,n.createElement(Ye,{showTopList:!0})))}),at=e.systemToComponent(_e,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},it),lt=at.Component,st=at.usePublisher,ut=at.useEmitterValue,ct=at.useEmitter,mt=et({usePublisher:st,useEmitterValue:ut,useEmitter:ct}),dt=tt({usePublisher:st,useEmitterValue:ut,useEmitter:ct}),ft=t.system(function(){var e=t.statefulStream(function(e){return"Item "+e}),n=t.statefulStream({}),o=t.statefulStream(null),r=t.statefulStream("virtuoso-grid-item"),i=t.statefulStream("virtuoso-grid-list"),a=t.statefulStream(Ne),l=t.statefulStream(t.noop),s=function(e,o){return void 0===o&&(o=null),t.statefulStreamFromEmitter(t.pipe(n,t.map(function(t){return t[e]}),t.distinctUntilChanged()),o)};return{context:o,itemContent:e,components:n,computeItemKey:a,itemClassName:r,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),pt=t.system(function(e){var n=e[0],i=e[1],a={item:Ge(i.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:t.stream(),ScrollContainer:t.stream(),ListContainer:t.stream(),emptyComponent:t.stream(),scrollSeek:t.stream()};function l(e,n,r){t.connect(t.pipe(e,t.withLatestFrom(i.components),t.map(function(e){var t,i=e[0],a=e[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+n+" instead."),o({},a,((t={})[n]=i,t))})),i.components)}return t.subscribe(a.scrollSeek,function(e){var a=e.placeholder,l=r(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),t.publish(i.components,o({},t.getValue(i.components),{ScrollSeekPlaceholder:a})),t.publish(n.scrollSeekConfiguration,l)}),l(a.ItemContainer,"Item","ItemContainer"),l(a.ListContainer,"List","ListContainer"),l(a.ScrollContainer,"Scroller","ScrollContainer"),o({},n,i,a)},t.tup(ce,ft)),ht=n.memo(function(){var e=Tt("gridState"),t=Tt("listClassName"),r=Tt("itemClassName"),i=Tt("itemContent"),a=Tt("computeItemKey"),l=Tt("isSeeking"),s=xt("scrollHeight"),u=Tt("ItemComponent"),c=Tt("ListComponent"),m=Tt("ScrollSeekPlaceholder"),d=Tt("context"),f=xt("itemDimensions"),p=pe(function(e){s(e.parentElement.parentElement.scrollHeight);var t=e.firstChild;t&&f(t.getBoundingClientRect())});return n.createElement(c,o({ref:p,className:t},$e(c,d),{style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}}),e.items.map(function(t){var s=a(t.index);return l?n.createElement(m,o({key:s},$e(m,d),{index:t.index,height:e.itemHeight,width:e.itemWidth})):n.createElement(u,o({},$e(u,d),{className:r,"data-index":t.index,key:s}),i(t.index,d))}))}),gt=function(e){var t=e.children,o=xt("viewportDimensions"),r=pe(function(e){o(e.getBoundingClientRect())});return n.createElement("div",{style:Ze,ref:r},t)},vt=function(e){var t=e.children,o=he(xt("windowViewportRect"),Tt("customScrollParent"));return n.createElement("div",{ref:o,style:Ze},t)},St=n.memo(function(e){var t=o({},e),r=Tt("useWindowScroll"),i=Tt("customScrollParent"),a=i||r?vt:gt;return n.createElement(i||r?bt:yt,o({},t),n.createElement(a,null,n.createElement(ht,null)))}),Ct=e.systemToComponent(pt,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},St),It=Ct.Component,xt=Ct.usePublisher,Tt=Ct.useEmitterValue,wt=Ct.useEmitter,yt=et({usePublisher:xt,useEmitterValue:Tt,useEmitter:wt}),bt=tt({usePublisher:xt,useEmitterValue:Tt,useEmitter:wt}),Et=t.system(function(){var e=t.statefulStream(function(e){return n.createElement("td",null,"Item $",e)}),o=t.statefulStream(null),r=t.statefulStream(null),i=t.statefulStream({}),a=t.statefulStream(Ne),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(i,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:o,itemContent:e,fixedHeaderContent:r,components:i,computeItemKey:a,scrollerRef:l,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),Lt=t.system(function(e){return o({},e[0],e[1])},t.tup(Ae,Et)),Ht=function(e){return n.createElement("tr",null,n.createElement("td",{style:{height:e.height}}))},Rt=function(e){return n.createElement("tr",null,n.createElement("td",{style:{height:e.height,padding:0,border:0}}))},kt=n.memo(function(){var e=Vt("listState"),t=Vt("deviation"),r=Mt("sizeRanges"),i=Vt("useWindowScroll"),a=Vt("customScrollParent"),l=Mt("windowScrollContainerState"),s=Mt("scrollContainerState"),u=a||i?l:s,c=Vt("itemContent"),m=Vt("trackItemSizes"),d=ve(r,Vt("itemSize"),m,u,Vt("log"),a),f=Vt("EmptyPlaceholder"),p=Vt("ScrollSeekPlaceholder")||Ht,h=Vt("TableBodyComponent"),g=Vt("TableRowComponent"),v=Vt("computeItemKey"),S=Vt("isSeeking"),C=Vt("paddingTopAddition"),I=Vt("firstItemIndex"),x=Vt("statefulTotalCount"),T=Vt("context");if(0===x&&f)return n.createElement(f,$e(f,T));var w=e.offsetTop+C+t,y=e.offsetBottom,b=w>0?n.createElement(Rt,{height:w,key:"padding-top"}):null,E=y>0?n.createElement(Rt,{height:y,key:"padding-bottom"}):null,L=e.items.map(function(e){var t=e.originalIndex,r=v(t+I,e.data,T);return S?n.createElement(p,o({},$e(p,T),{key:r,index:e.index,height:e.size,type:e.type||"item"})):n.createElement(g,o({},$e(g,T),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:{overflowAnchor:"none"}}),c(e.index,e.data,T))});return n.createElement(h,o({ref:d,"data-test-id":"virtuoso-item-list"},$e(h,T)),[b].concat(L,[E]))}),zt=function(e){var o=e.children,r=Mt("viewportHeight"),i=pe(t.compose(r,function(e){return A(e,"height")}));return n.createElement("div",{style:Ze,ref:i,"data-viewport-type":"element"},o)},Bt=function(e){var t=e.children,o=he(Mt("windowViewportRect"),Vt("customScrollParent"));return n.createElement("div",{ref:o,style:Ze,"data-viewport-type":"window"},t)},Ft=n.memo(function(e){var r=Vt("useWindowScroll"),i=Vt("customScrollParent"),a=Mt("fixedHeaderHeight"),l=Vt("fixedHeaderContent"),s=Vt("context"),u=pe(t.compose(a,function(e){return A(e,"height")})),c=i||r?Wt:At,m=i||r?Bt:zt,d=Vt("TableComponent"),f=Vt("TableHeadComponent"),p=l?n.createElement(f,o({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:u},$e(f,s)),l()):null;return n.createElement(c,o({},e),n.createElement(m,null,n.createElement(d,o({style:{borderSpacing:0}},$e(d,s)),[p,n.createElement(kt,{key:"TableBody"})])))}),Pt=e.systemToComponent(Lt,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Ft),Ot=Pt.Component,Mt=Pt.usePublisher,Vt=Pt.useEmitterValue,Ut=Pt.useEmitter,At=et({usePublisher:Mt,useEmitterValue:Vt,useEmitter:Ut}),Wt=tt({usePublisher:Mt,useEmitterValue:Vt,useEmitter:Ut}),Nt=lt,Dt=Ot,Gt=It;exports.GroupedVirtuoso=lt,exports.TableVirtuoso=Dt,exports.Virtuoso=Nt,exports.VirtuosoGrid=Gt;
"use strict";var e=require("@virtuoso.dev/react-urx"),t=require("@virtuoso.dev/urx"),n=require("react");function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function r(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}function s(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}var u,c,m=t.system(function(){var e=t.stream(),n=t.stream(),o=t.statefulStream(0),r=t.stream(),i=t.statefulStream(0),a=t.stream(),l=t.stream(),s=t.statefulStream(0),u=t.statefulStream(0),c=t.stream(),m=t.stream(),d=t.statefulStream(!1);return t.connect(t.pipe(e,t.map(function(e){return e[0]})),n),t.connect(t.pipe(e,t.map(function(e){return e[1]})),l),t.connect(n,i),{scrollContainerState:e,scrollTop:n,viewportHeight:a,headerHeight:s,footerHeight:u,scrollHeight:l,smoothScrollTargetReached:r,scrollTo:c,scrollBy:m,statefulScrollTop:i,deviation:o,scrollingInProgress:d}},[],{singleton:!0});(c=exports.LogLevel||(exports.LogLevel={}))[c.DEBUG=0]="DEBUG",c[c.INFO=1]="INFO",c[c.WARN=2]="WARN",c[c.ERROR=3]="ERROR";var d=((u={})[exports.LogLevel.DEBUG]="debug",u[exports.LogLevel.INFO]="log",u[exports.LogLevel.WARN]="warn",u[exports.LogLevel.ERROR]="error",u),f=t.system(function(){var e=t.statefulStream(exports.LogLevel.ERROR);return{log:t.statefulStream(function(n,o,r){var i;void 0===r&&(r=exports.LogLevel.INFO),r>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:t.getValue(e))&&console[d[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:e}},[],{singleton:!0}),p=t.system(function(e){var n=e[0].log,o=t.statefulStream(!1),r=t.streamFromEmitter(t.pipe(o,t.filter(function(e){return e}),t.distinctUntilChanged()));return t.subscribe(o,function(e){e&&t.getValue(n)("props updated",{},exports.LogLevel.DEBUG)}),{propsReady:o,didMount:r}},t.tup(f),{singleton:!0}),h="up",g={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},v=t.system(function(e){var n=e[0],o=n.scrollContainerState,r=n.scrollTop,i=n.viewportHeight,a=n.headerHeight,l=n.footerHeight,s=n.scrollBy,u=t.statefulStream(!1),c=t.statefulStream(!0),m=t.stream(),d=t.stream(),f=t.statefulStream(4),p=t.streamFromEmitter(t.pipe(t.merge(t.pipe(t.duc(r),t.skip(1),t.mapTo(!0)),t.pipe(t.duc(r),t.skip(1),t.mapTo(!1),t.debounceTime(100))),t.distinctUntilChanged())),v=t.statefulStreamFromEmitter(t.pipe(t.merge(t.pipe(s,t.mapTo(!0)),t.pipe(s,t.mapTo(!1),t.debounceTime(200))),t.distinctUntilChanged()),!1);t.connect(t.pipe(t.duc(r),t.map(function(e){return 0===e}),t.distinctUntilChanged()),c),t.connect(c,d);var S=t.streamFromEmitter(t.pipe(t.combineLatest(o,t.duc(i),t.duc(a),t.duc(l),t.duc(f)),t.scan(function(e,t){var n,o,r=t[0],i=r[0],a=r[1],l=t[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-t[4]?(i>e.state.scrollTop?(n="SCROLLED_DOWN",o=e.state.scrollTop-i):(n="SIZE_DECREASED",o=e.state.scrollTop-i||e.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:o}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":l<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},g),t.distinctUntilChanged(function(e,t){return e&&e.atBottom===t.atBottom}))),C=t.statefulStreamFromEmitter(t.pipe(o,t.scan(function(e,t){var n=t[0],o=t[1];return e.scrollHeight!==o?e.scrollTop!==n?{scrollHeight:o,scrollTop:n,jump:e.scrollTop-n,changed:!0}:{scrollHeight:o,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:o,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),t.filter(function(e){return e.changed}),t.map(function(e){return e.jump})),0);t.connect(t.pipe(S,t.map(function(e){return e.atBottom})),u),t.subscribe(u,function(e){setTimeout(function(){return t.publish(m,e)})});var I=t.statefulStream("down");t.subscribe(u,function(e){setTimeout(function(){t.publish(m,e)})}),t.connect(t.pipe(o,t.map(function(e){return e[0]}),t.distinctUntilChanged(),t.scan(function(e,n){return t.getValue(v)?{direction:e.direction,prevScrollTop:n}:{direction:n<e.prevScrollTop?h:"down",prevScrollTop:n}},{direction:"down",prevScrollTop:0}),t.map(function(e){return e.direction})),I),t.connect(t.pipe(o,t.throttleTime(50),t.mapTo("none")),I),t.connect(u,m);var x=t.statefulStream(0);return t.connect(t.pipe(p,t.filter(function(e){return!e}),t.mapTo(0)),x),t.connect(t.pipe(r,t.throttleTime(100),t.withLatestFrom(p),t.filter(function(e){return!!e[1]}),t.scan(function(e,t){return[e[1],t[0]]},[0,0]),t.map(function(e){return e[1]-e[0]})),x),{isScrolling:p,isAtTop:c,isAtBottom:u,atBottomState:S,atTopStateChange:d,atBottomStateChange:m,scrollDirection:I,atBottomThreshold:f,scrollVelocity:x,lastJumpDueToItemResize:C}},t.tup(m)),S=t.system(function(e){var n=e[0].scrollVelocity,o=t.statefulStream(!1),r=t.stream(),i=t.statefulStream(!1);return t.connect(t.pipe(n,t.withLatestFrom(i,o,r),t.filter(function(e){return!!e[1]}),t.map(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=n.enter;if(o){if((0,n.exit)(t,r))return!1}else if(i(t,r))return!0;return o}),t.distinctUntilChanged()),o),t.subscribe(t.pipe(t.combineLatest(o,n,r),t.withLatestFrom(i)),function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])}),{isSeeking:o,scrollSeekConfiguration:i,scrollVelocity:n,scrollSeekRangeChanged:r}},t.tup(v),{singleton:!0}),C={lvl:0};function I(e,t,n,o,r){return void 0===o&&(o=C),void 0===r&&(r=C),{k:e,v:t,lvl:n,l:o,r:r}}function x(e){return e===C}function T(){return C}function w(e,t){if(x(e))return C;var n=e.k,o=e.l,r=e.r;if(t===n){if(x(o))return r;if(x(r))return o;var i=H(o);return B(k(e,{k:i[0],v:i[1],l:R(o)}))}return B(k(e,t<n?{l:w(o,t)}:{r:w(r,t)}))}function y(e,t,n){if(void 0===n&&(n="k"),x(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var o=y(e.r,t,n);return-Infinity===o[0]?[e.k,e.v]:o}return y(e.l,t,n)}function b(e,t,n){return x(e)?I(t,n,1):t===e.k?k(e,{k:t,v:n}):function(e){return O(M(e))}(k(e,t<e.k?{l:b(e.l,t,n)}:{r:b(e.r,t,n)}))}function E(e,t,n){if(x(e))return[];var o=e.k,r=e.v,i=e.r,a=[];return o>t&&(a=a.concat(E(e.l,t,n))),o>=t&&o<=n&&a.push({k:o,v:r}),o<=n&&(a=a.concat(E(i,t,n))),a}function L(e){return x(e)?[]:[].concat(L(e.l),[{k:e.k,v:e.v}],L(e.r))}function H(e){return x(e.r)?[e.k,e.v]:H(e.r)}function R(e){return x(e.r)?e.l:B(k(e,{r:R(e.r)}))}function k(e,t){return I(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function z(e){return x(e)||e.lvl>e.r.lvl}function B(e){var t=e.l,n=e.r,o=e.lvl;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(z(t))return M(k(e,{lvl:o-1}));if(x(t)||x(t.r))throw new Error("Unexpected empty nodes");return k(t.r,{l:k(t,{r:t.r.l}),r:k(e,{l:t.r.r,lvl:o-1}),lvl:o})}if(z(e))return O(k(e,{lvl:o-1}));if(x(n)||x(n.l))throw new Error("Unexpected empty nodes");var r=n.l,i=z(r)?n.lvl-1:n.lvl;return k(r,{l:k(e,{r:r.l,lvl:o-1}),r:O(k(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}function F(e,t,n){return x(e)?[]:P(E(e,y(e,t)[0],n),function(e){return{index:e.k,value:e.v}})}function P(e,t){var n=e.length;if(0===n)return[];for(var o=t(e[0]),r=o.index,i=o.value,a=[],l=1;l<n;l++){var s=t(e[l]),u=s.index,c=s.value;a.push({start:r,end:u-1,value:i}),r=u,i=c}return a.push({start:r,end:Infinity,value:i}),a}function O(e){var t=e.r,n=e.lvl;return x(t)||x(t.r)||t.lvl!==n||t.r.lvl!==n?e:k(t,{l:k(e,{r:t.l}),lvl:n+1})}function M(e){var t=e.l;return x(t)||t.lvl!==e.lvl?e:k(t,{r:k(e,{l:t.r})})}function V(e,t,n,o){void 0===o&&(o=0);for(var r=e.length-1;o<=r;){var i=Math.floor((o+r)/2),a=n(e[i],t);if(0===a)return i;if(-1===a){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error("Failed binary finding record in array - "+e.join(",")+", searched for "+t)}function U(e,t,n){return e[V(e,t,n)]}function A(e,t){return Math.round(e.getBoundingClientRect()[t])}function W(e){var t=e.size,n=e.startIndex,o=e.endIndex;return function(e){return e.start===n&&(e.end===o||Infinity===e.end)&&e.value===t}}function N(e,t){var n=e.index;return t===n?0:t<n?-1:1}function D(e,t){var n=e.offset;return t===n?0:t<n?-1:1}function G(e){return{index:e.index,value:e}}function _(e,t){var n=t[0],o=t[1];n.length>0&&(0,t[2])("received item sizes",n,exports.LogLevel.DEBUG);var r=e.sizeTree,i=e.offsetTree,l=r,s=0;if(o.length>0&&x(r)&&2===n.length){var u=n[0].size,c=n[1].size;l=o.reduce(function(e,t){return b(b(e,t,u),t+1,c)},l)}else{var m=function(e,t){for(var n,o=x(e)?0:Infinity,r=a(t);!(n=r()).done;){var i=n.value,l=i.size,s=i.startIndex,u=i.endIndex;if(o=Math.min(o,s),x(e))e=b(e,0,l);else{var c=F(e,s-1,u+1);if(!c.some(W(i))){for(var m,d=!1,f=!1,p=a(c);!(m=p()).done;){var h=m.value,g=h.start,v=h.end,S=h.value;d?(u>=g||l===S)&&(e=w(e,g)):(f=S!==l,d=!0),v>u&&u>=g&&S!==l&&(e=b(e,u+1,S))}f&&(e=b(e,s,l))}}}return[e,o]}(l,n);l=m[0],s=m[1]}if(l===r)return e;var d=0,f=0,p=0,h=0;if(0!==s){h=V(i,s-1,N),p=i[h].offset;var g=y(l,s-1);d=g[0],f=g[1],i.length&&i[h].size===y(l,s)[1]&&(h-=1),i=i.slice(0,h+1)}else i=[];for(var v,S=a(F(l,s,Infinity));!(v=S()).done;){var C=v.value,I=C.start,E=C.value,L=(I-d)*f+p;i.push({offset:L,size:E,index:I}),d=I,p=L,f=E}return{sizeTree:l,offsetTree:i,groupOffsetTree:o.reduce(function(e,t){return b(e,t,j(t,i))},T()),lastIndex:d,lastOffset:p,lastSize:f,groupIndices:o}}function j(e,t){if(0===t.length)return 0;var n=U(t,e,N);return n.size*(e-n.index)+n.offset}function K(e,t){if(!Y(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function Y(e){return!x(e.groupOffsetTree)}var q={offsetHeight:"height",offsetWidth:"width"},Z=t.system(function(e){var n=e[0].log,r=t.stream(),i=t.stream(),a=t.statefulStreamFromEmitter(i,0),l=t.stream(),s=t.statefulStream(0),u=t.statefulStream([]),c=t.statefulStream(void 0),m=t.statefulStream(void 0),d=t.statefulStream(function(e,t){return A(e,q[t])}),f=t.statefulStream(void 0),p={offsetTree:[],sizeTree:T(),groupOffsetTree:T(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},h=t.statefulStreamFromEmitter(t.pipe(r,t.withLatestFrom(u,n),t.scan(_,p),t.distinctUntilChanged()),p);t.connect(t.pipe(u,t.filter(function(e){return e.length>0}),t.withLatestFrom(h),t.map(function(e){var t=e[0],n=e[1],r=t.reduce(function(e,t,o){return b(e,t,j(t,n.offsetTree)||o)},T());return o({},n,{groupIndices:t,groupOffsetTree:r})})),h),t.connect(t.pipe(i,t.withLatestFrom(h),t.filter(function(e){return e[0]<e[1].lastIndex}),t.map(function(e){var t=e[1];return[{startIndex:e[0],endIndex:t.lastIndex,size:t.lastSize}]})),r),t.connect(c,m);var g=t.statefulStreamFromEmitter(t.pipe(c,t.map(function(e){return void 0===e})),!0);t.connect(t.pipe(m,t.filter(function(e){return void 0!==e&&x(t.getValue(h).sizeTree)}),t.map(function(e){return[{startIndex:0,endIndex:0,size:e}]})),r);var v=t.streamFromEmitter(t.pipe(r,t.withLatestFrom(h),t.scan(function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}},{changed:!1,sizes:p}),t.map(function(e){return e.changed})));t.connect(t.pipe(s,t.scan(function(e,t){return{diff:e.prev-t,prev:t}},{diff:0,prev:0}),t.map(function(e){return e.diff}),t.filter(function(e){return e>0})),l),t.subscribe(t.pipe(s,t.withLatestFrom(n)),function(e){e[0]<0&&(0,e[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},exports.LogLevel.ERROR)});var S=t.streamFromEmitter(l);return t.connect(t.pipe(l,t.withLatestFrom(h),t.map(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return L(n.sizeTree).reduce(function(e,n){var o=n.k,r=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:o+t-1,size:e.prevSize}]),prevIndex:o+t,prevSize:r}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),r),{data:f,totalCount:i,sizeRanges:r,groupIndices:u,defaultItemSize:m,fixedItemSize:c,unshiftWith:l,beforeUnshiftWith:S,firstItemIndex:s,sizes:h,listRefresh:v,statefulTotalCount:a,trackItemSizes:g,itemSize:d}},t.tup(f),{singleton:!0}),J="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function $(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&J||(t.behavior="auto"),t.offset||(t.offset=0),t}var Q=t.system(function(e){var n=e[0],o=n.sizes,r=n.totalCount,i=n.listRefresh,a=e[1],l=a.scrollingInProgress,s=a.viewportHeight,u=a.scrollTo,c=a.smoothScrollTargetReached,m=a.headerHeight,d=a.footerHeight,f=e[2].log,p=t.stream(),h=t.statefulStream(0),g=null,v=null,S=null;function C(){g&&(g(),g=null),S&&(S(),S=null),v&&(clearTimeout(v),v=null),t.publish(l,!1)}return t.connect(t.pipe(p,t.withLatestFrom(o,s,r,h,m,d,f),t.map(function(e){var n=e[0],o=e[1],r=e[2],a=e[3],s=e[4],u=e[5],m=e[6],d=e[7],f=$(n),h=f.align,I=f.behavior,x=f.offset,T=a-1,w=f.index;"LAST"===w&&(w=T),w=K(w,o);var b=j(w=Math.max(0,w,Math.min(T,w)),o.offsetTree)+u;"end"===h?(b=b-r+y(o.sizeTree,w)[1],w===T&&(b+=m)):"center"===h?b=b-r/2+y(o.sizeTree,w)[1]/2:b-=s,x&&(b+=x);var E=function(e){C(),e?(d("retrying to scroll to",{location:n},exports.LogLevel.DEBUG),t.publish(p,n)):d("list did not change, scroll successful",{},exports.LogLevel.DEBUG)};if(C(),"smooth"===I){var L=!1;S=t.subscribe(i,function(e){L=L||e}),g=t.handleNext(c,function(){E(L)})}else g=t.handleNext(t.pipe(i,function(e){var t=setTimeout(function(){e(!1)},50);return function(n){n&&(e(!0),clearTimeout(t))}}),E);return v=setTimeout(function(){C()},1200),t.publish(l,!0),d("scrolling from index to",{index:w,top:b,behavior:I},exports.LogLevel.DEBUG),{top:b,behavior:I}})),u),{scrollToIndex:p,topListHeight:h}},t.tup(Z,m,f),{singleton:!0});function X(e,t,n){return"number"==typeof e?n===h&&"top"===t||"down"===n&&"bottom"===t?e:0:n===h?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse}function ee(e,t){return"number"==typeof e?e:e[t]||0}var te=t.system(function(e){var n=e[0],o=n.scrollTop,r=n.viewportHeight,i=n.deviation,a=n.headerHeight,s=t.stream(),u=t.statefulStream(0),c=t.statefulStream(0),m=t.statefulStream(0),d=t.statefulStream(0);return{listBoundary:s,overscan:d,topListHeight:u,fixedHeaderHeight:c,increaseViewportBy:m,visibleRange:t.statefulStreamFromEmitter(t.pipe(t.combineLatest(t.duc(o),t.duc(r),t.duc(a),t.duc(s,l),t.duc(d),t.duc(u),t.duc(c),t.duc(i),t.duc(m)),t.map(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=r[0],a=r[1],l=e[4],s=e[6],u=e[7],c=e[8],m=t-u,d=e[5]+s,f=Math.max(o-m,0),p="none",g=ee(c,"top"),v=ee(c,"bottom");return i-=u,a+=o,(i+=o)>t+d-g&&(p=h),(a-=u)<t-f+n+v&&(p="down"),"none"!==p?[Math.max(m-o-X(l,"top",p)-g,0),m-f-s+n+X(l,"bottom",p)+v]:null}),t.filter(function(e){return null!=e}),t.distinctUntilChanged(l)),[0,0])}},t.tup(m),{singleton:!0}),ne=t.system(function(e){var n=e[0],r=n.scrollTo,i=n.scrollContainerState,a=t.stream(),l=t.stream(),s=t.stream(),u=t.statefulStream(!1),c=t.statefulStream(void 0);return t.connect(t.pipe(t.combineLatest(a,l),t.map(function(e){var t=e[0],n=t[1];return[Math.max(0,t[0]-e[1].offsetTop),n]})),i),t.connect(t.pipe(r,t.withLatestFrom(l),t.map(function(e){var t=e[0];return o({},t,{top:t.top+e[1].offsetTop})})),s),{useWindowScroll:u,customScrollParent:c,windowScrollContainerState:a,windowViewportRect:l,windowScrollTo:s}},t.tup(m)),oe={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},re={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},ie=Math.round,ae=Math.ceil,le=Math.floor,se=Math.min,ue=Math.max;function ce(e,t){return Array.from({length:t-e+1}).map(function(t,n){return{index:n+e}})}var me=t.system(function(e){var n=e[0],r=n.overscan,i=n.visibleRange,a=n.listBoundary,u=e[1],c=u.scrollTop,m=u.viewportHeight,d=u.scrollBy,f=u.scrollTo,p=u.smoothScrollTargetReached,h=u.scrollContainerState,g=e[2],v=e[3],S=e[4],C=S.propsReady,I=S.didMount,x=e[5],T=x.windowViewportRect,w=x.windowScrollTo,y=x.useWindowScroll,b=x.customScrollParent,E=x.windowScrollContainerState,L=t.statefulStream(0),H=t.statefulStream(0),R=t.statefulStream(oe),k=t.statefulStream({height:0,width:0}),z=t.statefulStream({height:0,width:0}),B=t.stream(),F=t.stream(),P=t.statefulStream(0);t.connect(t.pipe(I,t.withLatestFrom(H),t.filter(function(e){return 0!==e[1]}),t.map(function(e){return{items:ce(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),R),t.connect(t.pipe(t.combineLatest(t.duc(L),i,t.duc(z,function(e,t){return e&&e.width===t.width&&e.height===t.height})),t.withLatestFrom(k),t.map(function(e){var t=e[0],n=t[0],o=t[1],r=o[0],i=o[1],a=t[2],l=e[1],s=a.height,u=a.width,c=l.width;if(0===n||0===c)return oe;if(0===u)return re;var m=pe(c,u),d=m*le(r/s),f=m*ae(i/s)-1;f=se(n-1,f);var p=ce(d=se(f,ue(0,d)),f),h=de(l,a,p),g=h.top,v=h.bottom;return{items:p,offsetTop:g,offsetBottom:ae(n/m)*s-v,top:g,bottom:v,itemHeight:s,itemWidth:u}})),R),t.connect(t.pipe(k,t.map(function(e){return e.height})),m),t.connect(t.pipe(t.combineLatest(k,z,R),t.map(function(e){var t=de(e[0],e[1],e[2].items);return[t.top,t.bottom]}),t.distinctUntilChanged(l)),a);var O=t.streamFromEmitter(t.pipe(t.duc(R),t.filter(function(e){return e.items.length>0}),t.withLatestFrom(L),t.filter(function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1}),t.map(function(e){return e[1]-1}),t.distinctUntilChanged())),M=t.streamFromEmitter(t.pipe(t.duc(R),t.filter(function(e){var t=e.items;return t.length>0&&0===t[0].index}),t.mapTo(0),t.distinctUntilChanged())),V=t.streamFromEmitter(t.pipe(t.duc(R),t.filter(function(e){return e.items.length>0}),t.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),t.distinctUntilChanged(s)));t.connect(V,v.scrollSeekRangeChanged),t.connect(t.pipe(B,t.withLatestFrom(k,z,L),t.map(function(e){var t=e[1],n=e[2],o=e[3],r=$(e[0]),i=r.align,a=r.behavior,l=r.offset,s=r.index;"LAST"===s&&(s=o-1);var u=fe(t,n,s=ue(0,s,se(o-1,s)));return"end"===i?u=ie(u-t.height+n.height):"center"===i&&(u=ie(u-t.height/2+n.height/2)),l&&(u+=l),{top:u,behavior:a}})),f);var U=t.statefulStreamFromEmitter(t.pipe(R,t.map(function(e){return e.offsetBottom+e.bottom})),0);return t.connect(t.pipe(T,t.map(function(e){return{width:e.visibleWidth,height:e.visibleHeight}})),k),o({totalCount:L,viewportDimensions:k,itemDimensions:z,scrollTop:c,scrollHeight:F,overscan:r,scrollBy:d,scrollTo:f,scrollToIndex:B,smoothScrollTargetReached:p,windowViewportRect:T,windowScrollTo:w,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:E,deviation:P,scrollContainerState:h,initialItemCount:H},v,{gridState:R,totalListHeight:U},g,{startReached:M,endReached:O,rangeChanged:V,propsReady:C})},t.tup(te,m,v,S,p,ne));function de(e,t,n){var o=t.height;return void 0===o||0===n.length?{top:0,bottom:0}:{top:fe(e,t,n[0].index),bottom:fe(e,t,n[n.length-1].index)+o}}function fe(e,t,n){var o=pe(e.width,t.width);return le(n/o)*t.height}function pe(e,t){return ue(1,le(e/t))}function he(e,t){void 0===t&&(t=!0);var o=n.useRef(null),r=function(e){};if("undefined"!=typeof ResizeObserver){var i=new ResizeObserver(function(t){var n=t[0].target;null!==n.offsetParent&&e(n)});r=function(e){e&&t?(i.observe(e),o.current=e):(o.current&&i.unobserve(o.current),o.current=null)}}return{ref:o,callbackRef:r}}function ge(e,t){return void 0===t&&(t=!0),he(e,t).callbackRef}function ve(e,t){var o=n.useRef(null),r=n.useCallback(function(n){if(null!==n){var r,i,a=n.getBoundingClientRect(),l=a.width;if(t){var s=t.getBoundingClientRect(),u=a.top-s.top;r=s.height-Math.max(0,u),i=u+t.scrollTop}else r=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;o.current={offsetTop:i,visibleHeight:r,visibleWidth:l},e(o.current)}},[e,t]),i=he(r),a=i.callbackRef,l=i.ref,s=n.useCallback(function(){r(l.current)},[r,l]);return n.useEffect(function(){if(t){t.addEventListener("scroll",s);var e=new ResizeObserver(s);return e.observe(t),function(){t.removeEventListener("scroll",s),e.unobserve(t)}}return window.addEventListener("scroll",s),window.addEventListener("resize",s),function(){window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),a}var Se="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function Ce(e,t,n,o,r,i){return ge(function(n){for(var a=function(e,t,n,o){var r=e.length;if(0===r)return null;for(var i=[],a=0;a<r;a++){var l=e.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=t(l,"offsetHeight");if(0===c&&o("Zero-sized element, this should not happen",{child:l},exports.LogLevel.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,t,0,r),l=n.parentElement;!l.dataset.virtuosoScroller;)l=l.parentElement;var s=i?i.scrollTop:"window"===l.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:l.scrollTop;o(i?[Math.max(s,0),i.scrollHeight]:[Math.max(s,0),l.scrollHeight]),null!==a&&e(a)},n)}function Ie(e,o,r,i,a){void 0===i&&(i=t.noop);var l=n.useRef(null),s=n.useRef(null),u=n.useRef(null),c=n.useCallback(function(t){var n=t.target,r=n===window||n===document?window.pageYOffset||document.documentElement.scrollTop:n.scrollTop,i=n===window?document.documentElement.scrollHeight:n.scrollHeight;e([Math.max(r,0),i]),null!==s.current&&(r===s.current||r<=0||r===n.scrollHeight-A(n,"height"))&&(s.current=null,o(!0),u.current&&(clearTimeout(u.current),u.current=null))},[e,o]);return n.useEffect(function(){var e=a||l.current;return i(a||l.current),c({target:e}),e.addEventListener("scroll",c,{passive:!0}),function(){i(null),e.removeEventListener("scroll",c)}},[l,c,r,i,a]),{scrollerRef:l,scrollByCallback:function(e){null===s.current&&l.current.scrollBy(e)},scrollToCallback:function(t){var n=l.current;if(n&&(!("offsetHeight"in n)||0!==n.offsetHeight)){var r,i,a,c="smooth"===t.behavior;if(n===window?(i=Math.max(A(document.documentElement,"height"),document.documentElement.scrollHeight),r=window.innerHeight,a=document.documentElement.scrollTop):(i=n.scrollHeight,r=A(n,"height"),a=n.scrollTop),t.top=Math.ceil(Math.max(Math.min(i-r,t.top),0)),Math.abs(r-i)<1.01||t.top===a)return e([a,i]),void(c&&o(!0));c?(s.current=t.top,u.current&&clearTimeout(u.current),u.current=setTimeout(function(){u.current=null,s.current=null,o(!0)},1e3)):s.current=null,n.scrollTo(t)}}}}var xe=t.system(function(e){var n=e[0],o=n.sizes,r=n.listRefresh,i=n.defaultItemSize,a=e[1].scrollTop,l=e[2].scrollToIndex,s=e[3].didMount,u=t.statefulStream(!0),c=t.statefulStream(0);return t.connect(t.pipe(s,t.withLatestFrom(c),t.filter(function(e){return 0!==e[1]}),t.mapTo(!1)),u),t.subscribe(t.pipe(t.combineLatest(r,s),t.withLatestFrom(u,o,i),t.filter(function(e){var t=e[1],n=e[3];return e[0][1]&&(!x(e[2].sizeTree)||void 0!==n)&&!t}),t.withLatestFrom(c)),function(e){var n=e[1];setTimeout(function(){t.handleNext(a,function(){t.publish(u,!0)}),t.publish(l,n)})}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},t.tup(Z,m,Q,p),{singleton:!0});function Te(e){return!!e&&("smooth"===e?"smooth":"auto")}var we=t.system(function(e){var n=e[0],o=n.totalCount,r=n.listRefresh,i=e[1],a=i.isAtBottom,l=i.atBottomState,s=e[2].scrollToIndex,u=e[3].scrolledToInitialItem,c=e[4],m=c.propsReady,d=c.didMount,f=e[5].log,p=e[6].scrollingInProgress,h=t.statefulStream(!1),g=null;function v(e){t.publish(s,{index:"LAST",align:"end",behavior:e})}return t.subscribe(t.pipe(t.combineLatest(t.pipe(t.duc(o),t.skip(1)),d),t.withLatestFrom(t.duc(h),a,u,p),t.map(function(e){var t=e[0],n=t[0],o=t[1]&&e[3],r="auto";return o&&(r=function(e,t){return"function"==typeof e?Te(e(t)):t&&Te(e)}(e[1],e[2]||e[4]),o=o&&!!r),{totalCount:n,shouldFollow:o,followOutputBehavior:r}}),t.filter(function(e){return e.shouldFollow})),function(e){var n=e.totalCount,o=e.followOutputBehavior;g&&(g(),g=null),g=t.handleNext(r,function(){t.getValue(f)("following output to ",{totalCount:n},exports.LogLevel.DEBUG),v(o),g=null})}),t.subscribe(t.pipe(t.combineLatest(t.duc(h),o,m),t.filter(function(e){return e[0]&&e[2]}),t.scan(function(e,t){var n=t[1];return{refreshed:e.value===n,value:n}},{refreshed:!1,value:0}),t.filter(function(e){return e.refreshed}),t.withLatestFrom(h,o)),function(e){var n=e[1],o=t.handleNext(l,function(e){!n||e.atBottom||"SIZE_INCREASED"!==e.notAtBottomBecause||g||(t.getValue(f)("scrolling to bottom due to increased size",{},exports.LogLevel.DEBUG),v("auto"))});setTimeout(o,100)}),t.subscribe(t.combineLatest(t.duc(h),l),function(e){var t=e[1];e[0]&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&v("auto")}),{followOutput:h}},t.tup(Z,v,Q,xe,p,f,m));function ye(e){return e.reduce(function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e},{totalCount:0,groupIndices:[]})}var be=t.system(function(e){var n=e[0],o=n.totalCount,r=n.groupIndices,i=n.sizes,a=e[1],l=a.scrollTop,s=a.headerHeight,u=t.stream(),c=t.stream(),m=t.streamFromEmitter(t.pipe(u,t.map(ye)));return t.connect(t.pipe(m,t.map(t.prop("totalCount"))),o),t.connect(t.pipe(m,t.map(t.prop("groupIndices"))),r),t.connect(t.pipe(t.combineLatest(l,i,s),t.filter(function(e){return Y(e[1])}),t.map(function(e){return y(e[1].groupOffsetTree,Math.max(e[0]-e[2],0),"v")[0]}),t.distinctUntilChanged(),t.map(function(e){return[e]})),c),{groupCounts:u,topItemsIndexes:c}},t.tup(Z,m)),Ee={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function Le(e,t,n){if(0===e.length)return[];if(!Y(t))return e.map(function(e){return o({},e,{index:e.index+n,originalIndex:e.index})});for(var r,i=[],l=F(t.groupOffsetTree,e[0].index,e[e.length-1].index),s=void 0,u=0,c=a(e);!(r=c()).done;){var m=r.value;(!s||s.end<m.index)&&(s=l.shift(),u=t.groupIndices.indexOf(s.start)),i.push(o({},m.index===s.start?{type:"group",index:u}:{index:m.index-(u+1)+n,groupIndex:u},{size:m.size,offset:m.offset,originalIndex:m.index,data:m.data}))}return i}function He(e,t,n,o,r){var i=0,a=0;if(e.length>0){i=e[0].offset;var l=e[e.length-1];a=l.offset+l.size}var s=i,u=o.lastOffset+(n-o.lastIndex)*o.lastSize-a;return{items:Le(e,o,r),topItems:Le(t,o,r),topListHeight:t.reduce(function(e,t){return t.size+e},0),offsetTop:i,offsetBottom:u,top:s,bottom:a,totalCount:n}}var Re,ke,ze,Be=t.system(function(e){var n=e[0],r=n.sizes,i=n.totalCount,u=n.data,c=n.firstItemIndex,m=e[1],d=e[2],f=d.visibleRange,p=d.listBoundary,h=d.topListHeight,g=e[3],v=g.scrolledToInitialItem,S=g.initialTopMostItemIndex,C=e[4].topListHeight,I=e[5],T=e[6].didMount,w=t.statefulStream([]),b=t.stream();t.connect(m.topItemsIndexes,w);var E=t.statefulStreamFromEmitter(t.pipe(t.combineLatest(T,t.duc(f),t.duc(i),t.duc(r),t.duc(S),v,t.duc(w),t.duc(c),u),t.filter(function(e){return e[0]}),t.map(function(e){var n=e[1],o=n[0],r=n[1],i=e[2],l=e[4],s=e[5],u=e[6],c=e[7],m=e[8],d=e[3],f=d.sizeTree,p=d.offsetTree;if(0===i||0===o&&0===r)return Ee;if(x(f))return He(function(e,t,n){if(Y(t)){var o=K(e,t);return[{index:y(t.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(l,d,m),[],i,d,c);var h=[];if(u.length>0)for(var g,v=u[0],S=u[u.length-1],C=0,I=a(F(f,v,S));!(g=I()).done;)for(var T=g.value,w=T.value,b=Math.max(T.start,v),E=Math.min(T.end,S),L=b;L<=E;L++)h.push({index:L,size:w,offset:C,data:m&&m[L]}),C+=w;if(!s)return He([],h,i,d,c);var H=u.length>0?u[u.length-1]+1:0,R=function(e,t,n,o){return void 0===o&&(o=0),o>0&&(t=Math.max(t,U(e,o,N).offset)),P((i=n,l=V(r=e,t,a=D),s=V(r,i,a,l),r.slice(l,s+1)),G);var r,i,a,l,s}(p,o,r,H);if(0===R.length)return null;var k=i-1;return He(t.tap([],function(e){for(var t,n=a(R);!(t=n()).done;){var i=t.value,l=i.value,s=l.offset,u=i.start,c=l.size;l.offset<o&&(s+=((u+=Math.floor((o-l.offset)/c))-i.start)*c),u<H&&(s+=(H-u)*c,u=H);for(var d=Math.min(i.end,k),f=u;f<=d&&!(s>=r);f++)e.push({index:f,size:c,offset:s,data:m&&m[f]}),s+=c}}),h,i,d,c)}),t.filter(function(e){return null!==e}),t.distinctUntilChanged()),Ee);return t.connect(t.pipe(u,t.filter(function(e){return void 0!==e}),t.map(function(e){return e.length})),i),t.connect(t.pipe(E,t.map(t.prop("topListHeight"))),C),t.connect(C,h),t.connect(t.pipe(E,t.map(function(e){return[e.top,e.bottom]})),p),t.connect(t.pipe(E,t.map(function(e){return e.items})),b),o({listState:E,topItemsIndexes:w,endReached:t.streamFromEmitter(t.pipe(E,t.filter(function(e){return e.items.length>0}),t.withLatestFrom(i,u),t.filter(function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1}),t.map(function(e){return[e[1]-1,e[2]]}),t.distinctUntilChanged(l),t.map(function(e){return e[0]}))),startReached:t.streamFromEmitter(t.pipe(E,t.throttleTime(200),t.filter(function(e){var t=e.items;return t.length>0&&t[0].originalIndex===e.topItems.length}),t.map(function(e){return e.items[0].index}),t.distinctUntilChanged())),rangeChanged:t.streamFromEmitter(t.pipe(E,t.filter(function(e){return e.items.length>0}),t.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),t.distinctUntilChanged(s))),itemsRendered:b},I)},t.tup(Z,be,te,xe,Q,v,p),{singleton:!0}),Fe=t.system(function(e){var n=e[0],o=n.sizes,r=n.firstItemIndex,i=n.data,l=e[1].listState,s=e[2].didMount,u=t.statefulStream(0);return t.connect(t.pipe(s,t.withLatestFrom(u),t.filter(function(e){return 0!==e[1]}),t.withLatestFrom(o,r,i),t.map(function(e){var t=e[0][1],n=e[1],o=e[2],r=e[3],i=void 0===r?[]:r,l=0;if(n.groupIndices.length>0)for(var s,u=a(n.groupIndices);!((s=u()).done||s.value-l>=t);)l++;var c=t+l;return He(Array.from({length:c}).map(function(e,t){return{index:t,size:0,offset:0,data:i[t]}}),[],c,n,o)})),l),{initialItemCount:u}},t.tup(Z,Be,p),{singleton:!0}),Pe=t.system(function(e){var n=e[0].topItemsIndexes,o=t.statefulStream(0);return t.connect(t.pipe(o,t.filter(function(e){return e>0}),t.map(function(e){return Array.from({length:e}).map(function(e,t){return t})})),n),{topItemCount:o}},t.tup(Be)),Oe=t.system(function(e){var n=e[0],o=n.footerHeight,r=n.headerHeight,i=e[1].listState,a=t.stream(),l=t.statefulStreamFromEmitter(t.pipe(t.combineLatest(o,r,i),t.map(function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom})),0);return t.connect(t.duc(l),a),{totalListHeight:l,totalListHeightChanged:a}},t.tup(m,Be),{singleton:!0}),Me=t.system(function(e){var n=e[0],o=n.scrollBy,r=n.scrollTop,i=n.deviation,a=n.scrollingInProgress,l=e[1],s=l.isScrolling,u=l.isAtBottom,c=l.atBottomState,m=l.scrollDirection,d=e[3],f=d.beforeUnshiftWith,p=d.sizes,g=e[4].log,v=t.streamFromEmitter(t.pipe(e[2].listState,t.withLatestFrom(l.lastJumpDueToItemResize),t.scan(function(e,t){var n=e[1],o=t[0],r=o.items,i=o.totalCount,a=t[1],l=0;if(e[2]===i){if(n.length>0&&r.length>0){var s=1===r.length;if(0!==r[0].originalIndex||0!==n[0].originalIndex)for(var u=function(e){var t=r[e],o=n.find(function(e){return e.originalIndex===t.originalIndex});return o?t.offset!==o.offset||s?(l=t.offset-o.offset+t.size-o.size,"break"):void 0:"continue"},c=r.length-1;c>=0;c--){var m=u(c);if("continue"!==m&&"break"===m)break}}0!==l&&(l+=a)}return[l,r,i]},[0,[],0]),t.filter(function(e){return 0!==e[0]}),t.withLatestFrom(r,m,a,g,u,c),t.filter(function(e){return!e[3]&&0!==e[1]&&e[2]===h}),t.map(function(e){var t=e[0][0];return(0,e[4])("Upward scrolling compensation",{amount:t},exports.LogLevel.DEBUG),t})));return t.connect(t.pipe(v,t.withLatestFrom(i),t.map(function(e){return e[1]-e[0]})),i),t.subscribe(t.pipe(t.combineLatest(t.statefulStreamFromEmitter(s,!1),i),t.filter(function(e){return!e[0]&&0!==e[1]}),t.map(function(e){return e[1]}),t.throttleTime(1)),function(e){e>0?(t.publish(o,{top:-e,behavior:"auto"}),t.publish(i,0)):(t.publish(i,0),t.publish(o,{top:-e,behavior:"auto"}))}),t.connect(t.pipe(f,t.withLatestFrom(p),t.map(function(e){return e[0]*e[1].lastSize})),v),{deviation:i}},t.tup(m,v,Be,Z,f)),Ve=t.system(function(e){var n=e[0].totalListHeight,o=e[1].didMount,r=e[2].scrollTo,i=t.statefulStream(0);return t.subscribe(t.pipe(o,t.withLatestFrom(i),t.filter(function(e){return 0!==e[1]}),t.map(function(e){return{top:e[1]}})),function(e){t.handleNext(t.pipe(n,t.filter(function(e){return 0!==e})),function(){setTimeout(function(){t.publish(r,e)})})}),{initialScrollTop:i}},t.tup(Oe,p,m),{singleton:!0}),Ue=t.system(function(e){var n=e[0].viewportHeight,o=e[1].totalListHeight,r=t.statefulStream(!1);return{alignToBottom:r,paddingTopAddition:t.statefulStreamFromEmitter(t.pipe(t.combineLatest(r,n,o),t.filter(function(e){return e[0]}),t.map(function(e){return Math.max(0,e[1]-e[2])}),t.distinctUntilChanged()),0)}},t.tup(m,Oe),{singleton:!0}),Ae=t.system(function(e){var n=e[0],o=n.sizes,r=n.totalCount,i=e[1],a=i.scrollTop,l=i.viewportHeight,s=i.headerHeight,u=i.scrollingInProgress,c=e[2].scrollToIndex,m=t.stream();return t.connect(t.pipe(m,t.withLatestFrom(o,l,r,s,a),t.map(function(e){var n=e[0],o=n.index,r=n.behavior,i=void 0===r?"auto":r,a=n.done,l=e[1],s=e[2],c=e[4],m=e[5],d=e[3]-1,f=null;o=K(o,l);var p=j(o=Math.max(0,o,Math.min(d,o)),l.offsetTree)+c;return p<m?f={index:o,behavior:i,align:"start"}:p+y(l.sizeTree,o)[1]>m+s&&(f={index:o,behavior:i,align:"end"}),f?a&&t.handleNext(t.pipe(u,t.skip(1),t.filter(function(e){return!1===e})),a):a&&a(),f}),t.filter(function(e){return null!==e})),c),{scrollIntoView:m}},t.tup(Z,m,Q,Be,f),{singleton:!0}),We=t.system(function(e){return o({},e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},t.tup(te,Fe,p,S,Oe,Ve,Ue,ne,Ae)),Ne=t.system(function(e){var n=e[0],i=n.totalCount,a=n.sizeRanges,l=n.fixedItemSize,s=n.defaultItemSize,u=n.trackItemSizes,c=n.itemSize,m=n.data,d=n.firstItemIndex,f=n.groupIndices,p=n.statefulTotalCount,h=e[1],g=h.initialTopMostItemIndex,v=h.scrolledToInitialItem,S=e[2],C=e[3],I=e[4],x=I.listState,T=I.topItemsIndexes,w=r(I,["listState","topItemsIndexes"]),y=e[5].scrollToIndex,b=e[7].topItemCount,E=e[8].groupCounts,L=e[9],H=e[10];return t.connect(w.rangeChanged,L.scrollSeekRangeChanged),t.connect(t.pipe(L.windowViewportRect,t.map(t.prop("visibleHeight"))),S.viewportHeight),o({totalCount:i,data:m,firstItemIndex:d,sizeRanges:a,initialTopMostItemIndex:g,scrolledToInitialItem:v,topItemsIndexes:T,topItemCount:b,groupCounts:E,fixedItemHeight:l,defaultItemHeight:s},C,{statefulTotalCount:p,listState:x,scrollToIndex:y,trackItemSizes:u,itemSize:c,groupIndices:f},w,L,S,H)},t.tup(Z,xe,m,we,Be,Q,Me,Pe,be,We,f)),De=(Re=function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"},ze=!1,function(){return ze||(ze=!0,ke=Re()),ke});function Ge(e){return e}var _e=t.system(function(){var e=t.statefulStream(function(e){return"Item "+e}),n=t.statefulStream(null),o=t.statefulStream(function(e){return"Group "+e}),r=t.statefulStream({}),i=t.statefulStream(Ge),a=t.statefulStream("div"),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(r,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:n,itemContent:e,groupContent:o,components:r,computeItemKey:i,headerFooterTag:a,scrollerRef:l,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}});function je(e,n){var o=t.stream();return t.subscribe(o,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+n,"color: red;","color: inherit;","color: blue;")}),t.connect(o,e),o}var Ke=t.system(function(e){var n=e[0],i=e[1],a={item:je(i.itemContent,"Rename the %citem%c prop to %citemContent."),group:je(i.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:je(n.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:je(n.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:je(n.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:t.stream(),maxHeightCacheSize:t.stream(),footer:t.stream(),header:t.stream(),HeaderContainer:t.stream(),FooterContainer:t.stream(),ItemContainer:t.stream(),ScrollContainer:t.stream(),GroupContainer:t.stream(),ListContainer:t.stream(),emptyComponent:t.stream(),scrollSeek:t.stream()};function l(e,n,r){t.connect(t.pipe(e,t.withLatestFrom(i.components),t.map(function(e){var t,i=e[0],a=e[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+n+" instead."),o({},a,((t={})[n]=i,t))})),i.components)}return t.subscribe(a.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),t.subscribe(a.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),t.subscribe(a.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),t.subscribe(a.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),t.subscribe(a.scrollSeek,function(e){var a=e.placeholder,l=r(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),t.publish(i.components,o({},t.getValue(i.components),{ScrollSeekPlaceholder:a})),t.publish(n.scrollSeekConfiguration,l)}),l(a.footer,"Footer","footer"),l(a.header,"Header","header"),l(a.ItemContainer,"Item","ItemContainer"),l(a.ListContainer,"List","ListContainer"),l(a.ScrollContainer,"Scroller","ScrollContainer"),l(a.emptyComponent,"EmptyPlaceholder","emptyComponent"),l(a.GroupContainer,"Group","GroupContainer"),o({},n,i,a)},t.tup(Ne,_e)),Ye=function(e){return n.createElement("div",{style:{height:e.height}})},qe={position:De(),zIndex:1,overflowAnchor:"none"},Ze=n.memo(function(e){var r=e.showTopList,i=void 0!==r&&r,a=mt("listState"),l=mt("deviation"),s=ct("sizeRanges"),u=mt("useWindowScroll"),c=mt("customScrollParent"),m=ct("windowScrollContainerState"),d=ct("scrollContainerState"),f=c||u?m:d,p=mt("itemContent"),h=mt("context"),g=mt("groupContent"),v=mt("trackItemSizes"),S=mt("itemSize"),C=mt("log"),I=Ce(s,S,v,i?t.noop:f,C,c),x=mt("EmptyPlaceholder"),T=mt("ScrollSeekPlaceholder")||Ye,w=mt("ListComponent"),y=mt("ItemComponent"),b=mt("GroupComponent"),E=mt("computeItemKey"),L=mt("isSeeking"),H=mt("groupIndices").length>0,R=mt("paddingTopAddition"),k=mt("firstItemIndex"),z=mt("statefulTotalCount"),B=i?{}:{boxSizing:"border-box",paddingTop:a.offsetTop+R,paddingBottom:a.offsetBottom,marginTop:l};return!i&&0===z&&x?n.createElement(x,Xe(x,h)):n.createElement(w,o({},Xe(w,h),{ref:I,style:B,"data-test-id":i?"virtuoso-top-item-list":"virtuoso-item-list"}),(i?a.topItems:a.items).map(function(e){var t=e.originalIndex,r=E(t+k,e.data,h);return L?n.createElement(T,o({},Xe(T,h),{key:r,index:e.index,height:e.size,type:e.type||"item"},"group"===e.type?{}:{groupIndex:e.groupIndex})):"group"===e.type?n.createElement(b,o({},Xe(b,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:qe}),g(e.index)):n.createElement(y,o({},Xe(y,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex,style:{overflowAnchor:"none"}}),H?p(e.index,e.groupIndex,e.data,h):p(e.index,e.data,h))}))}),Je={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},$e={width:"100%",height:"100%",position:"absolute",top:0},Qe={width:"100%",position:De(),top:0};function Xe(e,t){if("string"!=typeof e)return{context:t}}var et=n.memo(function(){var e=mt("HeaderComponent"),t=ct("headerHeight"),o=mt("headerFooterTag"),r=ge(function(e){return t(A(e,"height"))}),i=mt("context");return e?n.createElement(o,{ref:r},n.createElement(e,Xe(e,i))):null}),tt=n.memo(function(){var e=mt("FooterComponent"),t=ct("footerHeight"),o=mt("headerFooterTag"),r=ge(function(e){return t(A(e,"height"))}),i=mt("context");return e?n.createElement(o,{ref:r},n.createElement(e,Xe(e,i))):null});function nt(e){var t=e.usePublisher,i=e.useEmitter,a=e.useEmitterValue;return n.memo(function(e){var l=e.style,s=e.children,u=r(e,["style","children"]),c=t("scrollContainerState"),m=a("ScrollerComponent"),d=t("smoothScrollTargetReached"),f=a("scrollerRef"),p=a("context"),h=Ie(c,d,m,f),g=h.scrollerRef,v=h.scrollByCallback;return i("scrollTo",h.scrollToCallback),i("scrollBy",v),n.createElement(m,o({ref:g,style:o({},Je,l),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},u,Xe(m,p)),s)})}function ot(e){var i=e.usePublisher,a=e.useEmitter,l=e.useEmitterValue;return n.memo(function(e){var s=e.style,u=e.children,c=r(e,["style","children"]),m=i("windowScrollContainerState"),d=l("ScrollerComponent"),f=i("smoothScrollTargetReached"),p=l("totalListHeight"),h=l("deviation"),g=l("customScrollParent"),v=l("context"),S=Ie(m,f,d,t.noop,g),C=S.scrollerRef,I=S.scrollByCallback,x=S.scrollToCallback;return Se(function(){return C.current=g||window,function(){C.current=null}},[C,g]),a("windowScrollTo",x),a("scrollBy",I),n.createElement(d,o({style:o({position:"relative"},s,0!==p?{height:p+h}:{}),"data-virtuoso-scroller":!0},c,Xe(d,v)),u)})}var rt=function(e){var o=e.children,r=ct("viewportHeight"),i=ge(t.compose(r,function(e){return A(e,"height")}));return n.createElement("div",{style:$e,ref:i,"data-viewport-type":"element"},o)},it=function(e){var t=e.children,o=ve(ct("windowViewportRect"),mt("customScrollParent"));return n.createElement("div",{ref:o,style:$e,"data-viewport-type":"window"},t)},at=function(e){var t=e.children,r=mt("TopItemListComponent"),i=mt("headerHeight"),a=o({},Qe,{marginTop:i+"px"}),l=mt("context");return n.createElement(r||"div",{style:a,context:l},t)},lt=n.memo(function(e){var t=mt("useWindowScroll"),r=mt("topItemsIndexes").length>0,i=mt("customScrollParent"),a=i||t?it:rt;return n.createElement(i||t?pt:ft,o({},e),n.createElement(a,null,n.createElement(et,null),n.createElement(Ze,null),n.createElement(tt,null)),r&&n.createElement(at,null,n.createElement(Ze,{showTopList:!0})))}),st=e.systemToComponent(Ke,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},lt),ut=st.Component,ct=st.usePublisher,mt=st.useEmitterValue,dt=st.useEmitter,ft=nt({usePublisher:ct,useEmitterValue:mt,useEmitter:dt}),pt=ot({usePublisher:ct,useEmitterValue:mt,useEmitter:dt}),ht=t.system(function(){var e=t.statefulStream(function(e){return"Item "+e}),n=t.statefulStream({}),o=t.statefulStream(null),r=t.statefulStream("virtuoso-grid-item"),i=t.statefulStream("virtuoso-grid-list"),a=t.statefulStream(Ge),l=t.statefulStream(t.noop),s=function(e,o){return void 0===o&&(o=null),t.statefulStreamFromEmitter(t.pipe(n,t.map(function(t){return t[e]}),t.distinctUntilChanged()),o)};return{context:o,itemContent:e,components:n,computeItemKey:a,itemClassName:r,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),gt=t.system(function(e){var n=e[0],i=e[1],a={item:je(i.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:t.stream(),ScrollContainer:t.stream(),ListContainer:t.stream(),emptyComponent:t.stream(),scrollSeek:t.stream()};function l(e,n,r){t.connect(t.pipe(e,t.withLatestFrom(i.components),t.map(function(e){var t,i=e[0],a=e[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+n+" instead."),o({},a,((t={})[n]=i,t))})),i.components)}return t.subscribe(a.scrollSeek,function(e){var a=e.placeholder,l=r(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),t.publish(i.components,o({},t.getValue(i.components),{ScrollSeekPlaceholder:a})),t.publish(n.scrollSeekConfiguration,l)}),l(a.ItemContainer,"Item","ItemContainer"),l(a.ListContainer,"List","ListContainer"),l(a.ScrollContainer,"Scroller","ScrollContainer"),o({},n,i,a)},t.tup(me,ht)),vt=n.memo(function(){var e=yt("gridState"),t=yt("listClassName"),r=yt("itemClassName"),i=yt("itemContent"),a=yt("computeItemKey"),l=yt("isSeeking"),s=wt("scrollHeight"),u=yt("ItemComponent"),c=yt("ListComponent"),m=yt("ScrollSeekPlaceholder"),d=yt("context"),f=wt("itemDimensions"),p=ge(function(e){s(e.parentElement.parentElement.scrollHeight);var t=e.firstChild;t&&f(t.getBoundingClientRect())});return n.createElement(c,o({ref:p,className:t},Xe(c,d),{style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}}),e.items.map(function(t){var s=a(t.index);return l?n.createElement(m,o({key:s},Xe(m,d),{index:t.index,height:e.itemHeight,width:e.itemWidth})):n.createElement(u,o({},Xe(u,d),{className:r,"data-index":t.index,key:s}),i(t.index,d))}))}),St=function(e){var t=e.children,o=wt("viewportDimensions"),r=ge(function(e){o(e.getBoundingClientRect())});return n.createElement("div",{style:$e,ref:r},t)},Ct=function(e){var t=e.children,o=ve(wt("windowViewportRect"),yt("customScrollParent"));return n.createElement("div",{ref:o,style:$e},t)},It=n.memo(function(e){var t=o({},e),r=yt("useWindowScroll"),i=yt("customScrollParent"),a=i||r?Ct:St;return n.createElement(i||r?Lt:Et,o({},t),n.createElement(a,null,n.createElement(vt,null)))}),xt=e.systemToComponent(gt,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},It),Tt=xt.Component,wt=xt.usePublisher,yt=xt.useEmitterValue,bt=xt.useEmitter,Et=nt({usePublisher:wt,useEmitterValue:yt,useEmitter:bt}),Lt=ot({usePublisher:wt,useEmitterValue:yt,useEmitter:bt}),Ht=t.system(function(){var e=t.statefulStream(function(e){return n.createElement("td",null,"Item $",e)}),o=t.statefulStream(null),r=t.statefulStream(null),i=t.statefulStream({}),a=t.statefulStream(Ge),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(i,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:o,itemContent:e,fixedHeaderContent:r,components:i,computeItemKey:a,scrollerRef:l,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),Rt=t.system(function(e){return o({},e[0],e[1])},t.tup(Ne,Ht)),kt=function(e){return n.createElement("tr",null,n.createElement("td",{style:{height:e.height}}))},zt=function(e){return n.createElement("tr",null,n.createElement("td",{style:{height:e.height,padding:0,border:0}}))},Bt=n.memo(function(){var e=At("listState"),t=At("deviation"),r=Ut("sizeRanges"),i=At("useWindowScroll"),a=At("customScrollParent"),l=Ut("windowScrollContainerState"),s=Ut("scrollContainerState"),u=a||i?l:s,c=At("itemContent"),m=At("trackItemSizes"),d=Ce(r,At("itemSize"),m,u,At("log"),a),f=At("EmptyPlaceholder"),p=At("ScrollSeekPlaceholder")||kt,h=At("TableBodyComponent"),g=At("TableRowComponent"),v=At("computeItemKey"),S=At("isSeeking"),C=At("paddingTopAddition"),I=At("firstItemIndex"),x=At("statefulTotalCount"),T=At("context");if(0===x&&f)return n.createElement(f,Xe(f,T));var w=e.offsetTop+C+t,y=e.offsetBottom,b=w>0?n.createElement(zt,{height:w,key:"padding-top"}):null,E=y>0?n.createElement(zt,{height:y,key:"padding-bottom"}):null,L=e.items.map(function(e){var t=e.originalIndex,r=v(t+I,e.data,T);return S?n.createElement(p,o({},Xe(p,T),{key:r,index:e.index,height:e.size,type:e.type||"item"})):n.createElement(g,o({},Xe(g,T),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:{overflowAnchor:"none"}}),c(e.index,e.data,T))});return n.createElement(h,o({ref:d,"data-test-id":"virtuoso-item-list"},Xe(h,T)),[b].concat(L,[E]))}),Ft=function(e){var o=e.children,r=Ut("viewportHeight"),i=ge(t.compose(r,function(e){return A(e,"height")}));return n.createElement("div",{style:$e,ref:i,"data-viewport-type":"element"},o)},Pt=function(e){var t=e.children,o=ve(Ut("windowViewportRect"),At("customScrollParent"));return n.createElement("div",{ref:o,style:$e,"data-viewport-type":"window"},t)},Ot=n.memo(function(e){var r=At("useWindowScroll"),i=At("customScrollParent"),a=Ut("fixedHeaderHeight"),l=At("fixedHeaderContent"),s=At("context"),u=ge(t.compose(a,function(e){return A(e,"height")})),c=i||r?Dt:Nt,m=i||r?Pt:Ft,d=At("TableComponent"),f=At("TableHeadComponent"),p=l?n.createElement(f,o({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:u},Xe(f,s)),l()):null;return n.createElement(c,o({},e),n.createElement(m,null,n.createElement(d,o({style:{borderSpacing:0}},Xe(d,s)),[p,n.createElement(Bt,{key:"TableBody"})])))}),Mt=e.systemToComponent(Rt,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Ot),Vt=Mt.Component,Ut=Mt.usePublisher,At=Mt.useEmitterValue,Wt=Mt.useEmitter,Nt=nt({usePublisher:Ut,useEmitterValue:At,useEmitter:Wt}),Dt=ot({usePublisher:Ut,useEmitterValue:At,useEmitter:Wt}),Gt=ut,_t=Vt,jt=Tt;exports.GroupedVirtuoso=ut,exports.TableVirtuoso=_t,exports.Virtuoso=Gt,exports.VirtuosoGrid=jt;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{systemToComponent as e}from"@virtuoso.dev/react-urx";import{system as t,stream as n,statefulStream as o,connect as r,pipe as i,map as l,getValue as a,streamFromEmitter as u,filter as s,distinctUntilChanged as c,subscribe as d,tup as f,merge as m,duc as h,skip as p,mapTo as g,debounceTime as v,statefulStreamFromEmitter as I,combineLatest as C,scan as S,publish as x,throttleTime as T,withLatestFrom as w,handleNext as y,noop as b,prop as H,tap as R,compose as z}from"@virtuoso.dev/urx";import{useRef as k,useCallback as B,useEffect as E,useLayoutEffect as L,memo as P,createElement as O}from"react";function M(){return(M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function A(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function W(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function D(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}function F(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}var G,N,U=t(function(){var e=n(),t=n(),a=o(0),u=n(),s=o(0),c=n(),d=n(),f=o(0),m=o(0),h=n(),p=n(),g=o(!1);return r(i(e,l(function(e){return e[0]})),t),r(i(e,l(function(e){return e[1]})),d),r(t,s),{scrollContainerState:e,scrollTop:t,viewportHeight:c,headerHeight:f,footerHeight:m,scrollHeight:d,smoothScrollTargetReached:u,scrollTo:h,scrollBy:p,statefulScrollTop:s,deviation:a,scrollingInProgress:g}},[],{singleton:!0});!function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR"}(N||(N={}));var _=((G={})[N.DEBUG]="debug",G[N.INFO]="log",G[N.WARN]="warn",G[N.ERROR]="error",G),j=t(function(){var e=o(N.ERROR);return{log:o(function(t,n,o){var r;void 0===o&&(o=N.INFO),o>=(null!=(r=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?r:a(e))&&console[_[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0}),K=t(function(e){var t=e[0].log,n=o(!1),r=u(i(n,s(function(e){return e}),c()));return d(n,function(e){e&&a(t)("props updated",{},N.DEBUG)}),{propsReady:n,didMount:r}},f(j),{singleton:!0}),Y="up",Z={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},q=t(function(e){var t=e[0],f=t.scrollContainerState,y=t.scrollTop,b=t.viewportHeight,H=t.headerHeight,R=t.footerHeight,z=t.scrollBy,k=o(!1),B=o(!0),E=n(),L=n(),P=o(4),O=u(i(m(i(h(y),p(1),g(!0)),i(h(y),p(1),g(!1),v(100))),c())),M=I(i(m(i(z,g(!0)),i(z,g(!1),v(200))),c()),!1);r(i(h(y),l(function(e){return 0===e}),c()),B),r(B,L);var A=u(i(C(f,h(b),h(H),h(R),h(P)),S(function(e,t){var n,o,r=t[0],i=r[0],l=r[1],a=t[1],u={viewportHeight:a,scrollTop:i,scrollHeight:l};return i+a-l>-t[4]?(i>e.state.scrollTop?(n="SCROLLED_DOWN",o=e.state.scrollTop-i):(n="SIZE_DECREASED",o=e.state.scrollTop-i||e.scrollTopDelta),{atBottom:!0,state:u,atBottomBecause:n,scrollTopDelta:o}):{atBottom:!1,notAtBottomBecause:u.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":a<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:u}},Z),c(function(e,t){return e&&e.atBottom===t.atBottom}))),V=I(i(f,S(function(e,t){var n=t[0],o=t[1];return e.scrollHeight!==o?e.scrollTop!==n?{scrollHeight:o,scrollTop:n,jump:e.scrollTop-n,changed:!0}:{scrollHeight:o,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:o,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),s(function(e){return e.changed}),l(function(e){return e.jump})),0);r(i(A,l(function(e){return e.atBottom})),k),d(k,function(e){setTimeout(function(){return x(E,e)})});var W=o("down");d(k,function(e){setTimeout(function(){x(E,e)})}),r(i(f,l(function(e){return e[0]}),c(),S(function(e,t){return a(M)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Y:"down",prevScrollTop:t}},{direction:"down",prevScrollTop:0}),l(function(e){return e.direction})),W),r(i(f,T(50),g("none")),W),r(k,E);var D=o(0);return r(i(O,s(function(e){return!e}),g(0)),D),r(i(y,T(100),w(O),s(function(e){return!!e[1]}),S(function(e,t){return[e[1],t[0]]},[0,0]),l(function(e){return e[1]-e[0]})),D),{isScrolling:O,isAtTop:B,isAtBottom:k,atBottomState:A,atTopStateChange:L,atBottomStateChange:E,scrollDirection:W,atBottomThreshold:P,scrollVelocity:D,lastJumpDueToItemResize:V}},f(U)),J=t(function(e){var t=e[0].scrollVelocity,a=o(!1),u=n(),f=o(!1);return r(i(t,w(f,a,u),s(function(e){return!!e[1]}),l(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=n.enter;if(o){if((0,n.exit)(t,r))return!1}else if(i(t,r))return!0;return o}),c()),a),d(i(C(a,t,u),w(f)),function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])}),{isSeeking:a,scrollSeekConfiguration:f,scrollVelocity:t,scrollSeekRangeChanged:u}},f(q),{singleton:!0}),$={lvl:0};function Q(e,t,n,o,r){return void 0===o&&(o=$),void 0===r&&(r=$),{k:e,v:t,lvl:n,l:o,r:r}}function X(e){return e===$}function ee(){return $}function te(e,t){if(X(e))return $;var n=e.k,o=e.l,r=e.r;if(t===n){if(X(o))return r;if(X(r))return o;var i=le(o);return ce(ue(e,{k:i[0],v:i[1],l:ae(o)}))}return ce(ue(e,t<n?{l:te(o,t)}:{r:te(r,t)}))}function ne(e,t,n){if(void 0===n&&(n="k"),X(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var o=ne(e.r,t,n);return-Infinity===o[0]?[e.k,e.v]:o}return ne(e.l,t,n)}function oe(e,t,n){return X(e)?Q(t,n,1):t===e.k?ue(e,{k:t,v:n}):function(e){return me(he(e))}(ue(e,t<e.k?{l:oe(e.l,t,n)}:{r:oe(e.r,t,n)}))}function re(e,t,n){if(X(e))return[];var o=e.k,r=e.v,i=e.r,l=[];return o>t&&(l=l.concat(re(e.l,t,n))),o>=t&&o<=n&&l.push({k:o,v:r}),o<=n&&(l=l.concat(re(i,t,n))),l}function ie(e){return X(e)?[]:[].concat(ie(e.l),[{k:e.k,v:e.v}],ie(e.r))}function le(e){return X(e.r)?[e.k,e.v]:le(e.r)}function ae(e){return X(e.r)?e.l:ce(ue(e,{r:ae(e.r)}))}function ue(e,t){return Q(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function se(e){return X(e)||e.lvl>e.r.lvl}function ce(e){var t=e.l,n=e.r,o=e.lvl;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(se(t))return he(ue(e,{lvl:o-1}));if(X(t)||X(t.r))throw new Error("Unexpected empty nodes");return ue(t.r,{l:ue(t,{r:t.r.l}),r:ue(e,{l:t.r.r,lvl:o-1}),lvl:o})}if(se(e))return me(ue(e,{lvl:o-1}));if(X(n)||X(n.l))throw new Error("Unexpected empty nodes");var r=n.l,i=se(r)?n.lvl-1:n.lvl;return ue(r,{l:ue(e,{r:r.l,lvl:o-1}),r:me(ue(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}function de(e,t,n){return X(e)?[]:fe(re(e,ne(e,t)[0],n),function(e){return{index:e.k,value:e.v}})}function fe(e,t){var n=e.length;if(0===n)return[];for(var o=t(e[0]),r=o.index,i=o.value,l=[],a=1;a<n;a++){var u=t(e[a]),s=u.index,c=u.value;l.push({start:r,end:s-1,value:i}),r=s,i=c}return l.push({start:r,end:Infinity,value:i}),l}function me(e){var t=e.r,n=e.lvl;return X(t)||X(t.r)||t.lvl!==n||t.r.lvl!==n?e:ue(t,{l:ue(e,{r:t.l}),lvl:n+1})}function he(e){var t=e.l;return X(t)||t.lvl!==e.lvl?e:ue(t,{r:ue(e,{l:t.r})})}function pe(e,t,n,o){void 0===o&&(o=0);for(var r=e.length-1;o<=r;){var i=Math.floor((o+r)/2),l=n(e[i],t);if(0===l)return i;if(-1===l){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error("Failed binary finding record in array - "+e.join(",")+", searched for "+t)}function ge(e,t,n){return e[pe(e,t,n)]}function ve(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ie(e){var t=e.size,n=e.startIndex,o=e.endIndex;return function(e){return e.start===n&&(e.end===o||Infinity===e.end)&&e.value===t}}function Ce(e,t){var n=e.index;return t===n?0:t<n?-1:1}function Se(e,t){var n=e.offset;return t===n?0:t<n?-1:1}function xe(e){return{index:e.index,value:e}}function Te(e,t){var n=t[0],o=t[1];n.length>0&&(0,t[2])("received item sizes",n,N.DEBUG);var r=e.sizeTree,i=e.offsetTree,l=r,a=0;if(o.length>0&&X(r)&&2===n.length){var u=n[0].size,s=n[1].size;l=o.reduce(function(e,t){return oe(oe(e,t,u),t+1,s)},l)}else{var c=function(e,t){for(var n,o=X(e)?0:Infinity,r=W(t);!(n=r()).done;){var i=n.value,l=i.size,a=i.startIndex,u=i.endIndex;if(o=Math.min(o,a),X(e))e=oe(e,0,l);else{var s=de(e,a-1,u+1);if(!s.some(Ie(i))){for(var c,d=!1,f=!1,m=W(s);!(c=m()).done;){var h=c.value,p=h.start,g=h.end,v=h.value;d?(u>=p||l===v)&&(e=te(e,p)):(f=v!==l,d=!0),g>u&&u>=p&&v!==l&&(e=oe(e,u+1,v))}f&&(e=oe(e,a,l))}}}return[e,o]}(l,n);l=c[0],a=c[1]}if(l===r)return e;var d=0,f=0,m=0,h=0;if(0!==a){h=pe(i,a-1,Ce),m=i[h].offset;var p=ne(l,a-1);d=p[0],f=p[1],i.length&&i[h].size===ne(l,a)[1]&&(h-=1),i=i.slice(0,h+1)}else i=[];for(var g,v=W(de(l,a,Infinity));!(g=v()).done;){var I=g.value,C=I.start,S=I.value,x=(C-d)*f+m;i.push({offset:x,size:S,index:C}),d=C,m=x,f=S}return{sizeTree:l,offsetTree:i,groupOffsetTree:o.reduce(function(e,t){return oe(e,t,we(t,i))},ee()),lastIndex:d,lastOffset:m,lastSize:f,groupIndices:o}}function we(e,t){if(0===t.length)return 0;var n=ge(t,e,Ce);return n.size*(e-n.index)+n.offset}function ye(e,t){if(!be(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function be(e){return!X(e.groupOffsetTree)}var He={offsetHeight:"height",offsetWidth:"width"},Re=t(function(e){var t=e[0].log,f=n(),m=n(),h=I(m,0),p=n(),g=o(0),v=o([]),C=o(void 0),x=o(void 0),T=o(function(e,t){return ve(e,He[t])}),y=o(void 0),b={offsetTree:[],sizeTree:ee(),groupOffsetTree:ee(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},H=I(i(f,w(v,t),S(Te,b),c()),b);r(i(v,s(function(e){return e.length>0}),w(H),l(function(e){var t=e[0],n=e[1],o=t.reduce(function(e,t,o){return oe(e,t,we(t,n.offsetTree)||o)},ee());return M({},n,{groupIndices:t,groupOffsetTree:o})})),H),r(i(m,w(H),s(function(e){return e[0]<e[1].lastIndex}),l(function(e){var t=e[1];return[{startIndex:e[0],endIndex:t.lastIndex,size:t.lastSize}]})),f),r(C,x);var R=I(i(C,l(function(e){return void 0===e})),!0);r(i(x,s(function(e){return void 0!==e&&X(a(H).sizeTree)}),l(function(e){return[{startIndex:0,endIndex:0,size:e}]})),f);var z=u(i(f,w(H),S(function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}},{changed:!1,sizes:b}),l(function(e){return e.changed})));r(i(g,S(function(e,t){return{diff:e.prev-t,prev:t}},{diff:0,prev:0}),l(function(e){return e.diff}),s(function(e){return e>0})),p),d(i(g,w(t)),function(e){e[0]<0&&(0,e[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:g},N.ERROR)});var k=u(p);return r(i(p,w(H),l(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return ie(n.sizeTree).reduce(function(e,n){var o=n.k,r=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:o+t-1,size:e.prevSize}]),prevIndex:o+t,prevSize:r}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),f),{data:y,totalCount:m,sizeRanges:f,groupIndices:v,defaultItemSize:x,fixedItemSize:C,unshiftWith:p,beforeUnshiftWith:k,firstItemIndex:g,sizes:H,listRefresh:z,statefulTotalCount:h,trackItemSizes:R,itemSize:T}},f(j),{singleton:!0}),ze="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function ke(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&ze||(t.behavior="auto"),t.offset||(t.offset=0),t}var Be=t(function(e){var t=e[0],a=t.sizes,u=t.totalCount,s=t.listRefresh,c=e[1],f=c.scrollingInProgress,m=c.viewportHeight,h=c.scrollTo,p=c.smoothScrollTargetReached,g=c.headerHeight,v=c.footerHeight,I=e[2].log,C=n(),S=o(0),T=null,b=null,H=null;function R(){T&&(T(),T=null),H&&(H(),H=null),b&&(clearTimeout(b),b=null),x(f,!1)}return r(i(C,w(a,m,u,S,g,v,I),l(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],l=e[4],a=e[5],u=e[6],c=e[7],m=ke(t),h=m.align,g=m.behavior,v=m.offset,I=r-1,S=m.index;"LAST"===S&&(S=I),S=ye(S,n);var w=we(S=Math.max(0,S,Math.min(I,S)),n.offsetTree)+a;"end"===h?(w=w-o+ne(n.sizeTree,S)[1],S===I&&(w+=u)):"center"===h?w=w-o/2+ne(n.sizeTree,S)[1]/2:w-=l,v&&(w+=v);var z=function(e){R(),e?(c("retrying to scroll to",{location:t},N.DEBUG),x(C,t)):c("list did not change, scroll successful",{},N.DEBUG)};if(R(),"smooth"===g){var k=!1;H=d(s,function(e){k=k||e}),T=y(p,function(){z(k)})}else T=y(i(s,function(e){var t=setTimeout(function(){e(!1)},50);return function(n){n&&(e(!0),clearTimeout(t))}}),z);return b=setTimeout(function(){R()},1200),x(f,!0),c("scrolling from index to",{index:S,top:w,behavior:g},N.DEBUG),{top:w,behavior:g}})),h),{scrollToIndex:C,topListHeight:S}},f(Re,U,j),{singleton:!0});function Ee(e,t,n){return"number"==typeof e?n===Y&&"top"===t||"down"===n&&"bottom"===t?e:0:n===Y?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse}function Le(e,t){return"number"==typeof e?e:e[t]||0}var Pe=t(function(e){var t=e[0],r=t.scrollTop,a=t.viewportHeight,u=t.deviation,d=t.headerHeight,f=n(),m=o(0),p=o(0),g=o(0),v=o(0);return{listBoundary:f,overscan:v,topListHeight:m,fixedHeaderHeight:p,increaseViewportBy:g,visibleRange:I(i(C(h(r),h(a),h(d),h(f,D),h(v),h(m),h(p),h(u),h(g)),l(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=r[0],l=r[1],a=e[4],u=e[6],s=e[7],c=e[8],d=t-s,f=e[5]+u,m=Math.max(o-d,0),h="none",p=Le(c,"top"),g=Le(c,"bottom");return i-=s,l+=o,(i+=o)>t+f-p&&(h=Y),(l-=s)<t-m+n+g&&(h="down"),"none"!==h?[Math.max(d-o-Ee(a,"top",h)-p,0),d-m-u+n+Ee(a,"bottom",h)+g]:null}),s(function(e){return null!=e}),c(D)),[0,0])}},f(U),{singleton:!0}),Oe=t(function(e){var t=e[0],a=t.scrollTo,u=t.scrollContainerState,s=n(),c=n(),d=n(),f=o(!1),m=o(void 0);return r(i(C(s,c),l(function(e){var t=e[0],n=t[1];return[Math.max(0,t[0]-e[1].offsetTop),n]})),u),r(i(a,w(c),l(function(e){var t=e[0];return M({},t,{top:t.top+e[1].offsetTop})})),d),{useWindowScroll:f,customScrollParent:m,windowScrollContainerState:s,windowViewportRect:c,windowScrollTo:d}},f(U)),Me={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Ae={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Ve=Math.ceil,We=Math.floor,De=Math.min,Fe=Math.max;function Ge(e,t){return Array.from({length:t-e+1}).map(function(t,n){return{index:n+e}})}var Ne=t(function(e){var t=e[0],a=t.overscan,d=t.visibleRange,f=t.listBoundary,m=e[1],p=m.scrollTop,v=m.viewportHeight,S=m.scrollBy,x=m.scrollTo,T=m.smoothScrollTargetReached,y=m.scrollContainerState,b=e[2],H=e[3],R=e[4],z=R.propsReady,k=R.didMount,B=e[5],E=B.windowViewportRect,L=B.windowScrollTo,P=B.useWindowScroll,O=B.customScrollParent,A=B.windowScrollContainerState,V=o(0),W=o(0),G=o(Me),N=o({height:0,width:0}),U=o({height:0,width:0}),_=n(),j=n(),K=o(0);r(i(k,w(W),s(function(e){return 0!==e[1]}),l(function(e){return{items:Ge(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),G),r(i(C(h(V),d,h(U,function(e,t){return e&&e.width===t.width&&e.height===t.height})),w(N),l(function(e){var t=e[0],n=t[0],o=t[1],r=o[0],i=o[1],l=t[2],a=e[1],u=l.height,s=l.width,c=a.width;if(0===n||0===c)return Me;if(0===s)return Ae;var d=Math.floor(c/s),f=d*We(r/u),m=d*Ve(i/u)-1;m=De(n-1,m);var h=Ge(f=De(m,Fe(0,f)),m),p=Ue(a,l,h),g=p.top,v=p.bottom;return{items:h,offsetTop:g,offsetBottom:Ve(n/d)*u-v,top:g,bottom:v,itemHeight:u,itemWidth:s}})),G),r(i(N,l(function(e){return e.height})),v),r(i(C(N,U,G),l(function(e){var t=Ue(e[0],e[1],e[2].items);return[t.top,t.bottom]}),c(D)),f);var Y=u(i(h(G),s(function(e){return e.items.length>0}),w(V),s(function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1}),l(function(e){return e[1]-1}),c())),Z=u(i(h(G),s(function(e){var t=e.items;return t.length>0&&0===t[0].index}),g(0),c())),q=u(i(h(G),s(function(e){return e.items.length>0}),l(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),c(F)));r(q,H.scrollSeekRangeChanged),r(i(_,w(N,U,V),l(function(e){var t=e[1],n=e[2],o=e[3],r=ke(e[0]),i=r.align,l=r.behavior,a=r.offset,u=r.index;"LAST"===u&&(u=o-1);var s=_e(t,n,u=Math.max(0,u,Math.min(o-1,u)));return"end"===i?s=Math.round(s-t.height+n.height):"center"===i&&(s=Math.round(s-t.height/2+n.height/2)),a&&(s+=a),{top:s,behavior:l}})),x);var J=I(i(G,l(function(e){return e.offsetBottom+e.bottom})),0);return r(i(E,l(function(e){return{width:e.visibleWidth,height:e.visibleHeight}})),N),M({totalCount:V,viewportDimensions:N,itemDimensions:U,scrollTop:p,scrollHeight:j,overscan:a,scrollBy:S,scrollTo:x,scrollToIndex:_,smoothScrollTargetReached:T,windowViewportRect:E,windowScrollTo:L,useWindowScroll:P,customScrollParent:O,windowScrollContainerState:A,deviation:K,scrollContainerState:y,initialItemCount:W},H,{gridState:G,totalListHeight:J},b,{startReached:Z,endReached:Y,rangeChanged:q,propsReady:z})},f(Pe,U,q,J,K,Oe));function Ue(e,t,n){var o=t.height;return void 0===o||0===n.length?{top:0,bottom:0}:{top:_e(e,t,n[0].index),bottom:_e(e,t,n[n.length-1].index)+o}}function _e(e,t,n){var o=Math.floor(e.width/t.width);return We(n/o)*t.height}function je(e,t){void 0===t&&(t=!0);var n=k(null),o=function(e){};if("undefined"!=typeof ResizeObserver){var r=new ResizeObserver(function(t){var n=t[0].target;null!==n.offsetParent&&e(n)});o=function(e){e&&t?(r.observe(e),n.current=e):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Ke(e,t){return void 0===t&&(t=!0),je(e,t).callbackRef}function Ye(e,t){var n=k(null),o=B(function(o){if(null!==o){var r,i,l=o.getBoundingClientRect(),a=l.width;if(t){var u=t.getBoundingClientRect(),s=l.top-u.top;r=u.height-Math.max(0,s),i=s+t.scrollTop}else r=window.innerHeight-Math.max(0,l.top),i=l.top+window.pageYOffset;n.current={offsetTop:i,visibleHeight:r,visibleWidth:a},e(n.current)}},[e,t]),r=je(o),i=r.callbackRef,l=r.ref,a=B(function(){o(l.current)},[o,l]);return E(function(){if(t){t.addEventListener("scroll",a);var e=new ResizeObserver(a);return e.observe(t),function(){t.removeEventListener("scroll",a),e.unobserve(t)}}return window.addEventListener("scroll",a),window.addEventListener("resize",a),function(){window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[a,t]),i}var Ze="undefined"!=typeof document?L:E;function qe(e,t,n,o,r,i){return Ke(function(n){for(var l=function(e,t,n,o){var r=e.length;if(0===r)return null;for(var i=[],l=0;l<r;l++){var a=e.item(l);if(a&&void 0!==a.dataset.index){var u=parseInt(a.dataset.index),s=parseFloat(a.dataset.knownSize),c=t(a,"offsetHeight");if(0===c&&o("Zero-sized element, this should not happen",{child:a},N.ERROR),c!==s){var d=i[i.length-1];0===i.length||d.size!==c||d.endIndex!==u-1?i.push({startIndex:u,endIndex:u,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,t,0,r),a=n.parentElement;!a.dataset.virtuosoScroller;)a=a.parentElement;var u=i?i.scrollTop:"window"===a.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:a.scrollTop;o(i?[Math.max(u,0),i.scrollHeight]:[Math.max(u,0),a.scrollHeight]),null!==l&&e(l)},n)}function Je(e,t,n,o,r){void 0===o&&(o=b);var i=k(null),l=k(null),a=k(null),u=B(function(n){var o=n.target,r=o===window||o===document?window.pageYOffset||document.documentElement.scrollTop:o.scrollTop,i=o===window?document.documentElement.scrollHeight:o.scrollHeight;e([Math.max(r,0),i]),null!==l.current&&(r===l.current||r<=0||r===o.scrollHeight-ve(o,"height"))&&(l.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);return E(function(){var e=r||i.current;return o(r||i.current),u({target:e}),e.addEventListener("scroll",u,{passive:!0}),function(){o(null),e.removeEventListener("scroll",u)}},[i,u,n,o,r]),{scrollerRef:i,scrollByCallback:function(e){null===l.current&&i.current.scrollBy(e)},scrollToCallback:function(n){var o=i.current;if(o&&(!("offsetHeight"in o)||0!==o.offsetHeight)){var r,u,s,c="smooth"===n.behavior;if(o===window?(u=Math.max(ve(document.documentElement,"height"),document.documentElement.scrollHeight),r=window.innerHeight,s=document.documentElement.scrollTop):(u=o.scrollHeight,r=ve(o,"height"),s=o.scrollTop),n.top=Math.ceil(Math.max(Math.min(u-r,n.top),0)),Math.abs(r-u)<1.01||n.top===s)return e([s,u]),void(c&&t(!0));c?(l.current=n.top,a.current&&clearTimeout(a.current),a.current=setTimeout(function(){a.current=null,l.current=null,t(!0)},1e3)):l.current=null,o.scrollTo(n)}}}}var $e=t(function(e){var t=e[0],n=t.sizes,l=t.listRefresh,a=t.defaultItemSize,u=e[1].scrollTop,c=e[2].scrollToIndex,f=e[3].didMount,m=o(!0),h=o(0);return r(i(f,w(h),s(function(e){return 0!==e[1]}),g(!1)),m),d(i(C(l,f),w(m,n,a),s(function(e){var t=e[1],n=e[3];return e[0][1]&&(!X(e[2].sizeTree)||void 0!==n)&&!t}),w(h)),function(e){var t=e[1];setTimeout(function(){y(u,function(){x(m,!0)}),x(c,t)})}),{scrolledToInitialItem:m,initialTopMostItemIndex:h}},f(Re,U,Be,K),{singleton:!0});function Qe(e){return!!e&&("smooth"===e?"smooth":"auto")}var Xe=t(function(e){var t=e[0],n=t.totalCount,r=t.listRefresh,u=e[1],c=u.isAtBottom,f=u.atBottomState,m=e[2].scrollToIndex,g=e[3].scrolledToInitialItem,v=e[4],I=v.propsReady,T=v.didMount,b=e[5].log,H=e[6].scrollingInProgress,R=o(!1),z=null;function k(e){x(m,{index:"LAST",align:"end",behavior:e})}return d(i(C(i(h(n),p(1)),T),w(h(R),c,g,H),l(function(e){var t=e[0],n=t[0],o=t[1]&&e[3],r="auto";return o&&(r=function(e,t){return"function"==typeof e?Qe(e(t)):t&&Qe(e)}(e[1],e[2]||e[4]),o=o&&!!r),{totalCount:n,shouldFollow:o,followOutputBehavior:r}}),s(function(e){return e.shouldFollow})),function(e){var t=e.totalCount,n=e.followOutputBehavior;z&&(z(),z=null),z=y(r,function(){a(b)("following output to ",{totalCount:t},N.DEBUG),k(n),z=null})}),d(i(C(h(R),n,I),s(function(e){return e[0]&&e[2]}),S(function(e,t){var n=t[1];return{refreshed:e.value===n,value:n}},{refreshed:!1,value:0}),s(function(e){return e.refreshed}),w(R,n)),function(e){var t=e[1],n=y(f,function(e){!t||e.atBottom||"SIZE_INCREASED"!==e.notAtBottomBecause||z||(a(b)("scrolling to bottom due to increased size",{},N.DEBUG),k("auto"))});setTimeout(n,100)}),d(C(h(R),f),function(e){var t=e[1];e[0]&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&k("auto")}),{followOutput:R}},f(Re,q,Be,$e,K,j,U));function et(e){return e.reduce(function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e},{totalCount:0,groupIndices:[]})}var tt=t(function(e){var t=e[0],o=t.totalCount,a=t.groupIndices,d=t.sizes,f=e[1],m=f.scrollTop,h=f.headerHeight,p=n(),g=n(),v=u(i(p,l(et)));return r(i(v,l(H("totalCount"))),o),r(i(v,l(H("groupIndices"))),a),r(i(C(m,d,h),s(function(e){return be(e[1])}),l(function(e){return ne(e[1].groupOffsetTree,Math.max(e[0]-e[2],0),"v")[0]}),c(),l(function(e){return[e]})),g),{groupCounts:p,topItemsIndexes:g}},f(Re,U)),nt={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function ot(e,t,n){if(0===e.length)return[];if(!be(t))return e.map(function(e){return M({},e,{index:e.index+n,originalIndex:e.index})});for(var o,r=[],i=de(t.groupOffsetTree,e[0].index,e[e.length-1].index),l=void 0,a=0,u=W(e);!(o=u()).done;){var s=o.value;(!l||l.end<s.index)&&(l=i.shift(),a=t.groupIndices.indexOf(l.start)),r.push(M({},s.index===l.start?{type:"group",index:a}:{index:s.index-(a+1)+n,groupIndex:a},{size:s.size,offset:s.offset,originalIndex:s.index,data:s.data}))}return r}function rt(e,t,n,o,r){var i=0,l=0;if(e.length>0){i=e[0].offset;var a=e[e.length-1];l=a.offset+a.size}var u=i,s=o.lastOffset+(n-o.lastIndex)*o.lastSize-l;return{items:ot(e,o,r),topItems:ot(t,o,r),topListHeight:t.reduce(function(e,t){return t.size+e},0),offsetTop:i,offsetBottom:s,top:u,bottom:l,totalCount:n}}var it,lt,at,ut=t(function(e){var t=e[0],a=t.sizes,d=t.totalCount,f=t.data,m=t.firstItemIndex,p=e[1],g=e[2],v=g.visibleRange,S=g.listBoundary,x=g.topListHeight,y=e[3],b=y.scrolledToInitialItem,z=y.initialTopMostItemIndex,k=e[4].topListHeight,B=e[5],E=e[6].didMount,L=o([]),P=n();r(p.topItemsIndexes,L);var O=I(i(C(E,h(v),h(d),h(a),h(z),b,h(L),h(m),f),s(function(e){return e[0]}),l(function(e){var t=e[1],n=t[0],o=t[1],r=e[2],i=e[4],l=e[5],a=e[6],u=e[7],s=e[8],c=e[3],d=c.sizeTree,f=c.offsetTree;if(0===r||0===n&&0===o)return nt;if(X(d))return rt(function(e,t,n){if(be(t)){var o=ye(e,t);return[{index:ne(t.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(i,c,s),[],r,c,u);var m=[];if(a.length>0)for(var h,p=a[0],g=a[a.length-1],v=0,I=W(de(d,p,g));!(h=I()).done;)for(var C=h.value,S=C.value,x=Math.max(C.start,p),T=Math.min(C.end,g),w=x;w<=T;w++)m.push({index:w,size:S,offset:v,data:s&&s[w]}),v+=S;if(!l)return rt([],m,r,c,u);var y=a.length>0?a[a.length-1]+1:0,b=function(e,t,n,o){return void 0===o&&(o=0),o>0&&(t=Math.max(t,ge(e,o,Ce).offset)),fe((i=n,a=pe(r=e,t,l=Se),u=pe(r,i,l,a),r.slice(a,u+1)),xe);var r,i,l,a,u}(f,n,o,y);if(0===b.length)return null;var H=r-1;return rt(R([],function(e){for(var t,r=W(b);!(t=r()).done;){var i=t.value,l=i.value,a=l.offset,u=i.start,c=l.size;l.offset<n&&(a+=((u+=Math.floor((n-l.offset)/c))-i.start)*c),u<y&&(a+=(y-u)*c,u=y);for(var d=Math.min(i.end,H),f=u;f<=d&&!(a>=o);f++)e.push({index:f,size:c,offset:a,data:s&&s[f]}),a+=c}}),m,r,c,u)}),s(function(e){return null!==e}),c()),nt);return r(i(f,s(function(e){return void 0!==e}),l(function(e){return e.length})),d),r(i(O,l(H("topListHeight"))),k),r(k,x),r(i(O,l(function(e){return[e.top,e.bottom]})),S),r(i(O,l(function(e){return e.items})),P),M({listState:O,topItemsIndexes:L,endReached:u(i(O,s(function(e){return e.items.length>0}),w(d,f),s(function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1}),l(function(e){return[e[1]-1,e[2]]}),c(D),l(function(e){return e[0]}))),startReached:u(i(O,T(200),s(function(e){var t=e.items;return t.length>0&&t[0].originalIndex===e.topItems.length}),l(function(e){return e.items[0].index}),c())),rangeChanged:u(i(O,s(function(e){return e.items.length>0}),l(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),c(F))),itemsRendered:P},B)},f(Re,tt,Pe,$e,Be,q,K),{singleton:!0}),st=t(function(e){var t=e[0],n=t.sizes,a=t.firstItemIndex,u=t.data,c=e[1].listState,d=e[2].didMount,f=o(0);return r(i(d,w(f),s(function(e){return 0!==e[1]}),w(n,a,u),l(function(e){var t=e[0][1],n=e[1],o=e[2],r=e[3],i=void 0===r?[]:r,l=0;if(n.groupIndices.length>0)for(var a,u=W(n.groupIndices);!((a=u()).done||a.value-l>=t);)l++;var s=t+l;return rt(Array.from({length:s}).map(function(e,t){return{index:t,size:0,offset:0,data:i[t]}}),[],s,n,o)})),c),{initialItemCount:f}},f(Re,ut,K),{singleton:!0}),ct=t(function(e){var t=e[0].topItemsIndexes,n=o(0);return r(i(n,s(function(e){return e>0}),l(function(e){return Array.from({length:e}).map(function(e,t){return t})})),t),{topItemCount:n}},f(ut)),dt=t(function(e){var t=e[0],o=t.footerHeight,a=t.headerHeight,u=e[1].listState,s=n(),c=I(i(C(o,a,u),l(function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom})),0);return r(h(c),s),{totalListHeight:c,totalListHeightChanged:s}},f(U,ut),{singleton:!0}),ft=t(function(e){var t=e[0],n=t.scrollBy,o=t.scrollTop,a=t.deviation,c=t.scrollingInProgress,f=e[1],m=f.isScrolling,h=f.isAtBottom,p=f.atBottomState,g=f.scrollDirection,v=e[3],y=v.beforeUnshiftWith,b=v.sizes,H=e[4].log,R=u(i(e[2].listState,w(f.lastJumpDueToItemResize),S(function(e,t){var n=e[1],o=t[0],r=o.items,i=o.totalCount,l=t[1],a=0;if(e[2]===i){if(n.length>0&&r.length>0){var u=1===r.length;if(0!==r[0].originalIndex||0!==n[0].originalIndex)for(var s=function(e){var t=r[e],o=n.find(function(e){return e.originalIndex===t.originalIndex});return o?t.offset!==o.offset||u?(a=t.offset-o.offset+t.size-o.size,"break"):void 0:"continue"},c=r.length-1;c>=0;c--){var d=s(c);if("continue"!==d&&"break"===d)break}}0!==a&&(a+=l)}return[a,r,i]},[0,[],0]),s(function(e){return 0!==e[0]}),w(o,g,c,H,h,p),s(function(e){return!e[3]&&0!==e[1]&&e[2]===Y}),l(function(e){var t=e[0][0];return(0,e[4])("Upward scrolling compensation",{amount:t},N.DEBUG),t})));return r(i(R,w(a),l(function(e){return e[1]-e[0]})),a),d(i(C(I(m,!1),a),s(function(e){return!e[0]&&0!==e[1]}),l(function(e){return e[1]}),T(1)),function(e){e>0?(x(n,{top:-e,behavior:"auto"}),x(a,0)):(x(a,0),x(n,{top:-e,behavior:"auto"}))}),r(i(y,w(b),l(function(e){return e[0]*e[1].lastSize})),R),{deviation:a}},f(U,q,ut,Re,j)),mt=t(function(e){var t=e[0].totalListHeight,n=e[1].didMount,r=e[2].scrollTo,a=o(0);return d(i(n,w(a),s(function(e){return 0!==e[1]}),l(function(e){return{top:e[1]}})),function(e){y(i(t,s(function(e){return 0!==e})),function(){setTimeout(function(){x(r,e)})})}),{initialScrollTop:a}},f(dt,K,U),{singleton:!0}),ht=t(function(e){var t=e[0].viewportHeight,n=e[1].totalListHeight,r=o(!1);return{alignToBottom:r,paddingTopAddition:I(i(C(r,t,n),s(function(e){return e[0]}),l(function(e){return Math.max(0,e[1]-e[2])}),c()),0)}},f(U,dt),{singleton:!0}),pt=t(function(e){var t=e[0],o=t.sizes,a=t.totalCount,u=e[1],c=u.scrollTop,d=u.viewportHeight,f=u.headerHeight,m=u.scrollingInProgress,h=e[2].scrollToIndex,g=n();return r(i(g,w(o,d,a,f,c),l(function(e){var t=e[0],n=t.index,o=t.behavior,r=void 0===o?"auto":o,l=t.done,a=e[1],u=e[2],c=e[4],d=e[5],f=e[3]-1,h=null;n=ye(n,a);var g=we(n=Math.max(0,n,Math.min(f,n)),a.offsetTree)+c;return g<d?h={index:n,behavior:r,align:"start"}:g+ne(a.sizeTree,n)[1]>d+u&&(h={index:n,behavior:r,align:"end"}),h?l&&y(i(m,p(1),s(function(e){return!1===e})),l):l&&l(),h}),s(function(e){return null!==e})),h),{scrollIntoView:g}},f(Re,U,Be,ut,j),{singleton:!0}),gt=t(function(e){return M({},e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},f(Pe,st,K,J,dt,mt,ht,Oe,pt)),vt=t(function(e){var t=e[0],n=t.totalCount,o=t.sizeRanges,a=t.fixedItemSize,u=t.defaultItemSize,s=t.trackItemSizes,c=t.itemSize,d=t.data,f=t.firstItemIndex,m=t.groupIndices,h=t.statefulTotalCount,p=e[1],g=p.initialTopMostItemIndex,v=p.scrolledToInitialItem,I=e[2],C=e[3],S=e[4],x=S.listState,T=S.topItemsIndexes,w=A(S,["listState","topItemsIndexes"]),y=e[5].scrollToIndex,b=e[7].topItemCount,R=e[8].groupCounts,z=e[9],k=e[10];return r(w.rangeChanged,z.scrollSeekRangeChanged),r(i(z.windowViewportRect,l(H("visibleHeight"))),I.viewportHeight),M({totalCount:n,data:d,firstItemIndex:f,sizeRanges:o,initialTopMostItemIndex:g,scrolledToInitialItem:v,topItemsIndexes:T,topItemCount:b,groupCounts:R,fixedItemHeight:a,defaultItemHeight:u},C,{statefulTotalCount:h,listState:x,scrollToIndex:y,trackItemSizes:s,itemSize:c,groupIndices:m},w,z,I,k)},f(Re,$e,U,Xe,ut,Be,ft,ct,tt,gt,j)),It=(it=function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"},at=!1,function(){return at||(at=!0,lt=it()),lt});function Ct(e){return e}var St=t(function(){var e=o(function(e){return"Item "+e}),t=o(null),n=o(function(e){return"Group "+e}),r=o({}),a=o(Ct),u=o("div"),s=o(b),d=function(e,t){return void 0===t&&(t=null),I(i(r,l(function(t){return t[e]}),c()),t)};return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:a,headerFooterTag:u,scrollerRef:s,FooterComponent:d("Footer"),HeaderComponent:d("Header"),TopItemListComponent:d("TopItemList"),ListComponent:d("List","div"),ItemComponent:d("Item","div"),GroupComponent:d("Group","div"),ScrollerComponent:d("Scroller","div"),EmptyPlaceholder:d("EmptyPlaceholder"),ScrollSeekPlaceholder:d("ScrollSeekPlaceholder")}});function xt(e,t){var o=n();return d(o,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+t,"color: red;","color: inherit;","color: blue;")}),r(o,e),o}var Tt=t(function(e){var t=e[0],o=e[1],u={item:xt(o.itemContent,"Rename the %citem%c prop to %citemContent."),group:xt(o.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:xt(t.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:xt(t.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:xt(t.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:n(),maxHeightCacheSize:n(),footer:n(),header:n(),HeaderContainer:n(),FooterContainer:n(),ItemContainer:n(),ScrollContainer:n(),GroupContainer:n(),ListContainer:n(),emptyComponent:n(),scrollSeek:n()};function s(e,t,n){r(i(e,w(o.components),l(function(e){var o,r=e[0],i=e[1];return console.warn("react-virtuoso: "+n+" property is deprecated. Pass components."+t+" instead."),M({},i,((o={})[t]=r,o))})),o.components)}return d(u.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),d(u.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),d(u.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),d(u.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),d(u.scrollSeek,function(e){var n=e.placeholder,r=A(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),x(o.components,M({},a(o.components),{ScrollSeekPlaceholder:n})),x(t.scrollSeekConfiguration,r)}),s(u.footer,"Footer","footer"),s(u.header,"Header","header"),s(u.ItemContainer,"Item","ItemContainer"),s(u.ListContainer,"List","ListContainer"),s(u.ScrollContainer,"Scroller","ScrollContainer"),s(u.emptyComponent,"EmptyPlaceholder","emptyComponent"),s(u.GroupContainer,"Group","GroupContainer"),M({},t,o,u)},f(vt,St)),wt=function(e){return O("div",{style:{height:e.height}})},yt={position:It(),zIndex:1,overflowAnchor:"none"},bt=P(function(e){var t=e.showTopList,n=void 0!==t&&t,o=Ft("listState"),r=Ft("deviation"),i=Dt("sizeRanges"),l=Ft("useWindowScroll"),a=Ft("customScrollParent"),u=Dt("windowScrollContainerState"),s=Dt("scrollContainerState"),c=a||l?u:s,d=Ft("itemContent"),f=Ft("context"),m=Ft("groupContent"),h=Ft("trackItemSizes"),p=Ft("itemSize"),g=Ft("log"),v=qe(i,p,h,n?b:c,g,a),I=Ft("EmptyPlaceholder"),C=Ft("ScrollSeekPlaceholder")||wt,S=Ft("ListComponent"),x=Ft("ItemComponent"),T=Ft("GroupComponent"),w=Ft("computeItemKey"),y=Ft("isSeeking"),H=Ft("groupIndices").length>0,R=Ft("paddingTopAddition"),z=Ft("firstItemIndex"),k=Ft("statefulTotalCount"),B=n?{}:{boxSizing:"border-box",paddingTop:o.offsetTop+R,paddingBottom:o.offsetBottom,marginTop:r};return!n&&0===k&&I?O(I,kt(I,f)):O(S,M({},kt(S,f),{ref:v,style:B,"data-test-id":n?"virtuoso-top-item-list":"virtuoso-item-list"}),(n?o.topItems:o.items).map(function(e){var t=e.originalIndex,n=w(t+z,e.data,f);return y?O(C,M({},kt(C,f),{key:n,index:e.index,height:e.size,type:e.type||"item"},"group"===e.type?{}:{groupIndex:e.groupIndex})):"group"===e.type?O(T,M({},kt(T,f),{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:yt}),m(e.index)):O(x,M({},kt(x,f),{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex,style:{overflowAnchor:"none"}}),H?d(e.index,e.groupIndex,e.data,f):d(e.index,e.data,f))}))}),Ht={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Rt={width:"100%",height:"100%",position:"absolute",top:0},zt={width:"100%",position:It(),top:0};function kt(e,t){if("string"!=typeof e)return{context:t}}var Bt=P(function(){var e=Ft("HeaderComponent"),t=Dt("headerHeight"),n=Ft("headerFooterTag"),o=Ke(function(e){return t(ve(e,"height"))}),r=Ft("context");return e?O(n,{ref:o},O(e,kt(e,r))):null}),Et=P(function(){var e=Ft("FooterComponent"),t=Dt("footerHeight"),n=Ft("headerFooterTag"),o=Ke(function(e){return t(ve(e,"height"))}),r=Ft("context");return e?O(n,{ref:o},O(e,kt(e,r))):null});function Lt(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return P(function(e){var r=e.style,i=e.children,l=A(e,["style","children"]),a=t("scrollContainerState"),u=o("ScrollerComponent"),s=t("smoothScrollTargetReached"),c=o("scrollerRef"),d=o("context"),f=Je(a,s,u,c),m=f.scrollerRef,h=f.scrollByCallback;return n("scrollTo",f.scrollToCallback),n("scrollBy",h),O(u,M({ref:m,style:M({},Ht,r),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},l,kt(u,d)),i)})}function Pt(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return P(function(e){var r=e.style,i=e.children,l=A(e,["style","children"]),a=t("windowScrollContainerState"),u=o("ScrollerComponent"),s=t("smoothScrollTargetReached"),c=o("totalListHeight"),d=o("deviation"),f=o("customScrollParent"),m=o("context"),h=Je(a,s,u,b,f),p=h.scrollerRef,g=h.scrollByCallback,v=h.scrollToCallback;return Ze(function(){return p.current=f||window,function(){p.current=null}},[p,f]),n("windowScrollTo",v),n("scrollBy",g),O(u,M({style:M({position:"relative"},r,0!==c?{height:c+d}:{}),"data-virtuoso-scroller":!0},l,kt(u,m)),i)})}var Ot=function(e){var t=e.children,n=Dt("viewportHeight"),o=Ke(z(n,function(e){return ve(e,"height")}));return O("div",{style:Rt,ref:o,"data-viewport-type":"element"},t)},Mt=function(e){var t=e.children,n=Ye(Dt("windowViewportRect"),Ft("customScrollParent"));return O("div",{ref:n,style:Rt,"data-viewport-type":"window"},t)},At=function(e){var t=e.children,n=Ft("TopItemListComponent"),o=Ft("headerHeight"),r=M({},zt,{marginTop:o+"px"}),i=Ft("context");return O(n||"div",{style:r,context:i},t)},Vt=e(Tt,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},P(function(e){var t=Ft("useWindowScroll"),n=Ft("topItemsIndexes").length>0,o=Ft("customScrollParent"),r=o||t?Mt:Ot;return O(o||t?Ut:Nt,M({},e),O(r,null,O(Bt,null),O(bt,null),O(Et,null)),n&&O(At,null,O(bt,{showTopList:!0})))})),Wt=Vt.Component,Dt=Vt.usePublisher,Ft=Vt.useEmitterValue,Gt=Vt.useEmitter,Nt=Lt({usePublisher:Dt,useEmitterValue:Ft,useEmitter:Gt}),Ut=Pt({usePublisher:Dt,useEmitterValue:Ft,useEmitter:Gt}),_t=t(function(){var e=o(function(e){return"Item "+e}),t=o({}),n=o(null),r=o("virtuoso-grid-item"),a=o("virtuoso-grid-list"),u=o(Ct),s=o(b),d=function(e,n){return void 0===n&&(n=null),I(i(t,l(function(t){return t[e]}),c()),n)};return{context:n,itemContent:e,components:t,computeItemKey:u,itemClassName:r,listClassName:a,scrollerRef:s,ListComponent:d("List","div"),ItemComponent:d("Item","div"),ScrollerComponent:d("Scroller","div"),ScrollSeekPlaceholder:d("ScrollSeekPlaceholder","div")}}),jt=t(function(e){var t=e[0],o=e[1],u={item:xt(o.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:n(),ScrollContainer:n(),ListContainer:n(),emptyComponent:n(),scrollSeek:n()};function s(e,t,n){r(i(e,w(o.components),l(function(e){var o,r=e[0],i=e[1];return console.warn("react-virtuoso: "+n+" property is deprecated. Pass components."+t+" instead."),M({},i,((o={})[t]=r,o))})),o.components)}return d(u.scrollSeek,function(e){var n=e.placeholder,r=A(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),x(o.components,M({},a(o.components),{ScrollSeekPlaceholder:n})),x(t.scrollSeekConfiguration,r)}),s(u.ItemContainer,"Item","ItemContainer"),s(u.ListContainer,"List","ListContainer"),s(u.ScrollContainer,"Scroller","ScrollContainer"),M({},t,o,u)},f(Ne,_t)),Kt=P(function(){var e=Qt("gridState"),t=Qt("listClassName"),n=Qt("itemClassName"),o=Qt("itemContent"),r=Qt("computeItemKey"),i=Qt("isSeeking"),l=$t("scrollHeight"),a=Qt("ItemComponent"),u=Qt("ListComponent"),s=Qt("ScrollSeekPlaceholder"),c=Qt("context"),d=$t("itemDimensions"),f=Ke(function(e){l(e.parentElement.parentElement.scrollHeight);var t=e.firstChild;t&&d(t.getBoundingClientRect())});return O(u,M({ref:f,className:t},kt(u,c),{style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}}),e.items.map(function(t){var l=r(t.index);return i?O(s,M({key:l},kt(s,c),{index:t.index,height:e.itemHeight,width:e.itemWidth})):O(a,M({},kt(a,c),{className:n,"data-index":t.index,key:l}),o(t.index,c))}))}),Yt=function(e){var t=e.children,n=$t("viewportDimensions"),o=Ke(function(e){n(e.getBoundingClientRect())});return O("div",{style:Rt,ref:o},t)},Zt=function(e){var t=e.children,n=Ye($t("windowViewportRect"),Qt("customScrollParent"));return O("div",{ref:n,style:Rt},t)},qt=e(jt,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},P(function(e){var t=M({},e),n=Qt("useWindowScroll"),o=Qt("customScrollParent"),r=o||n?Zt:Yt;return O(o||n?tn:en,M({},t),O(r,null,O(Kt,null)))})),Jt=qt.Component,$t=qt.usePublisher,Qt=qt.useEmitterValue,Xt=qt.useEmitter,en=Lt({usePublisher:$t,useEmitterValue:Qt,useEmitter:Xt}),tn=Pt({usePublisher:$t,useEmitterValue:Qt,useEmitter:Xt}),nn=t(function(){var e=o(function(e){return O("td",null,"Item $",e)}),t=o(null),n=o(null),r=o({}),a=o(Ct),u=o(b),s=function(e,t){return void 0===t&&(t=null),I(i(r,l(function(t){return t[e]}),c()),t)};return{context:t,itemContent:e,fixedHeaderContent:n,components:r,computeItemKey:a,scrollerRef:u,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),on=t(function(e){return M({},e[0],e[1])},f(vt,nn)),rn=function(e){return O("tr",null,O("td",{style:{height:e.height}}))},ln=function(e){return O("tr",null,O("td",{style:{height:e.height,padding:0,border:0}}))},an=P(function(){var e=mn("listState"),t=mn("deviation"),n=fn("sizeRanges"),o=mn("useWindowScroll"),r=mn("customScrollParent"),i=fn("windowScrollContainerState"),l=fn("scrollContainerState"),a=r||o?i:l,u=mn("itemContent"),s=mn("trackItemSizes"),c=qe(n,mn("itemSize"),s,a,mn("log"),r),d=mn("EmptyPlaceholder"),f=mn("ScrollSeekPlaceholder")||rn,m=mn("TableBodyComponent"),h=mn("TableRowComponent"),p=mn("computeItemKey"),g=mn("isSeeking"),v=mn("paddingTopAddition"),I=mn("firstItemIndex"),C=mn("statefulTotalCount"),S=mn("context");if(0===C&&d)return O(d,kt(d,S));var x=e.offsetTop+v+t,T=e.offsetBottom,w=x>0?O(ln,{height:x,key:"padding-top"}):null,y=T>0?O(ln,{height:T,key:"padding-bottom"}):null,b=e.items.map(function(e){var t=e.originalIndex,n=p(t+I,e.data,S);return g?O(f,M({},kt(f,S),{key:n,index:e.index,height:e.size,type:e.type||"item"})):O(h,M({},kt(h,S),{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:{overflowAnchor:"none"}}),u(e.index,e.data,S))});return O(m,M({ref:c,"data-test-id":"virtuoso-item-list"},kt(m,S)),[w].concat(b,[y]))}),un=function(e){var t=e.children,n=fn("viewportHeight"),o=Ke(z(n,function(e){return ve(e,"height")}));return O("div",{style:Rt,ref:o,"data-viewport-type":"element"},t)},sn=function(e){var t=e.children,n=Ye(fn("windowViewportRect"),mn("customScrollParent"));return O("div",{ref:n,style:Rt,"data-viewport-type":"window"},t)},cn=e(on,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},P(function(e){var t=mn("useWindowScroll"),n=mn("customScrollParent"),o=fn("fixedHeaderHeight"),r=mn("fixedHeaderContent"),i=mn("context"),l=Ke(z(o,function(e){return ve(e,"height")})),a=n||t?gn:pn,u=n||t?sn:un,s=mn("TableComponent"),c=mn("TableHeadComponent"),d=r?O(c,M({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:l},kt(c,i)),r()):null;return O(a,M({},e),O(u,null,O(s,M({style:{borderSpacing:0}},kt(s,i)),[d,O(an,{key:"TableBody"})])))})),dn=cn.Component,fn=cn.usePublisher,mn=cn.useEmitterValue,hn=cn.useEmitter,pn=Lt({usePublisher:fn,useEmitterValue:mn,useEmitter:hn}),gn=Pt({usePublisher:fn,useEmitterValue:mn,useEmitter:hn}),vn=Wt,In=Wt,Cn=dn,Sn=Jt;export{In as GroupedVirtuoso,N as LogLevel,Cn as TableVirtuoso,vn as Virtuoso,Sn as VirtuosoGrid};
import{systemToComponent as e}from"@virtuoso.dev/react-urx";import{system as t,stream as n,statefulStream as o,connect as r,pipe as i,map as l,getValue as a,streamFromEmitter as u,filter as s,distinctUntilChanged as c,subscribe as d,tup as f,merge as m,duc as h,skip as p,mapTo as g,debounceTime as v,statefulStreamFromEmitter as I,combineLatest as C,scan as S,publish as x,throttleTime as T,withLatestFrom as w,handleNext as y,noop as b,prop as H,tap as R,compose as z}from"@virtuoso.dev/urx";import{useRef as k,useCallback as B,useEffect as E,useLayoutEffect as L,memo as P,createElement as O}from"react";function M(){return(M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function A(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function W(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function D(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}function F(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}var G,N,U=t(function(){var e=n(),t=n(),a=o(0),u=n(),s=o(0),c=n(),d=n(),f=o(0),m=o(0),h=n(),p=n(),g=o(!1);return r(i(e,l(function(e){return e[0]})),t),r(i(e,l(function(e){return e[1]})),d),r(t,s),{scrollContainerState:e,scrollTop:t,viewportHeight:c,headerHeight:f,footerHeight:m,scrollHeight:d,smoothScrollTargetReached:u,scrollTo:h,scrollBy:p,statefulScrollTop:s,deviation:a,scrollingInProgress:g}},[],{singleton:!0});!function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR"}(N||(N={}));var _=((G={})[N.DEBUG]="debug",G[N.INFO]="log",G[N.WARN]="warn",G[N.ERROR]="error",G),j=t(function(){var e=o(N.ERROR);return{log:o(function(t,n,o){var r;void 0===o&&(o=N.INFO),o>=(null!=(r=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?r:a(e))&&console[_[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0}),K=t(function(e){var t=e[0].log,n=o(!1),r=u(i(n,s(function(e){return e}),c()));return d(n,function(e){e&&a(t)("props updated",{},N.DEBUG)}),{propsReady:n,didMount:r}},f(j),{singleton:!0}),Y="up",Z={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},q=t(function(e){var t=e[0],f=t.scrollContainerState,y=t.scrollTop,b=t.viewportHeight,H=t.headerHeight,R=t.footerHeight,z=t.scrollBy,k=o(!1),B=o(!0),E=n(),L=n(),P=o(4),O=u(i(m(i(h(y),p(1),g(!0)),i(h(y),p(1),g(!1),v(100))),c())),M=I(i(m(i(z,g(!0)),i(z,g(!1),v(200))),c()),!1);r(i(h(y),l(function(e){return 0===e}),c()),B),r(B,L);var A=u(i(C(f,h(b),h(H),h(R),h(P)),S(function(e,t){var n,o,r=t[0],i=r[0],l=r[1],a=t[1],u={viewportHeight:a,scrollTop:i,scrollHeight:l};return i+a-l>-t[4]?(i>e.state.scrollTop?(n="SCROLLED_DOWN",o=e.state.scrollTop-i):(n="SIZE_DECREASED",o=e.state.scrollTop-i||e.scrollTopDelta),{atBottom:!0,state:u,atBottomBecause:n,scrollTopDelta:o}):{atBottom:!1,notAtBottomBecause:u.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":a<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:u}},Z),c(function(e,t){return e&&e.atBottom===t.atBottom}))),V=I(i(f,S(function(e,t){var n=t[0],o=t[1];return e.scrollHeight!==o?e.scrollTop!==n?{scrollHeight:o,scrollTop:n,jump:e.scrollTop-n,changed:!0}:{scrollHeight:o,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:o,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),s(function(e){return e.changed}),l(function(e){return e.jump})),0);r(i(A,l(function(e){return e.atBottom})),k),d(k,function(e){setTimeout(function(){return x(E,e)})});var W=o("down");d(k,function(e){setTimeout(function(){x(E,e)})}),r(i(f,l(function(e){return e[0]}),c(),S(function(e,t){return a(M)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Y:"down",prevScrollTop:t}},{direction:"down",prevScrollTop:0}),l(function(e){return e.direction})),W),r(i(f,T(50),g("none")),W),r(k,E);var D=o(0);return r(i(O,s(function(e){return!e}),g(0)),D),r(i(y,T(100),w(O),s(function(e){return!!e[1]}),S(function(e,t){return[e[1],t[0]]},[0,0]),l(function(e){return e[1]-e[0]})),D),{isScrolling:O,isAtTop:B,isAtBottom:k,atBottomState:A,atTopStateChange:L,atBottomStateChange:E,scrollDirection:W,atBottomThreshold:P,scrollVelocity:D,lastJumpDueToItemResize:V}},f(U)),J=t(function(e){var t=e[0].scrollVelocity,a=o(!1),u=n(),f=o(!1);return r(i(t,w(f,a,u),s(function(e){return!!e[1]}),l(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=n.enter;if(o){if((0,n.exit)(t,r))return!1}else if(i(t,r))return!0;return o}),c()),a),d(i(C(a,t,u),w(f)),function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])}),{isSeeking:a,scrollSeekConfiguration:f,scrollVelocity:t,scrollSeekRangeChanged:u}},f(q),{singleton:!0}),$={lvl:0};function Q(e,t,n,o,r){return void 0===o&&(o=$),void 0===r&&(r=$),{k:e,v:t,lvl:n,l:o,r:r}}function X(e){return e===$}function ee(){return $}function te(e,t){if(X(e))return $;var n=e.k,o=e.l,r=e.r;if(t===n){if(X(o))return r;if(X(r))return o;var i=le(o);return ce(ue(e,{k:i[0],v:i[1],l:ae(o)}))}return ce(ue(e,t<n?{l:te(o,t)}:{r:te(r,t)}))}function ne(e,t,n){if(void 0===n&&(n="k"),X(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var o=ne(e.r,t,n);return-Infinity===o[0]?[e.k,e.v]:o}return ne(e.l,t,n)}function oe(e,t,n){return X(e)?Q(t,n,1):t===e.k?ue(e,{k:t,v:n}):function(e){return me(he(e))}(ue(e,t<e.k?{l:oe(e.l,t,n)}:{r:oe(e.r,t,n)}))}function re(e,t,n){if(X(e))return[];var o=e.k,r=e.v,i=e.r,l=[];return o>t&&(l=l.concat(re(e.l,t,n))),o>=t&&o<=n&&l.push({k:o,v:r}),o<=n&&(l=l.concat(re(i,t,n))),l}function ie(e){return X(e)?[]:[].concat(ie(e.l),[{k:e.k,v:e.v}],ie(e.r))}function le(e){return X(e.r)?[e.k,e.v]:le(e.r)}function ae(e){return X(e.r)?e.l:ce(ue(e,{r:ae(e.r)}))}function ue(e,t){return Q(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function se(e){return X(e)||e.lvl>e.r.lvl}function ce(e){var t=e.l,n=e.r,o=e.lvl;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(se(t))return he(ue(e,{lvl:o-1}));if(X(t)||X(t.r))throw new Error("Unexpected empty nodes");return ue(t.r,{l:ue(t,{r:t.r.l}),r:ue(e,{l:t.r.r,lvl:o-1}),lvl:o})}if(se(e))return me(ue(e,{lvl:o-1}));if(X(n)||X(n.l))throw new Error("Unexpected empty nodes");var r=n.l,i=se(r)?n.lvl-1:n.lvl;return ue(r,{l:ue(e,{r:r.l,lvl:o-1}),r:me(ue(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}function de(e,t,n){return X(e)?[]:fe(re(e,ne(e,t)[0],n),function(e){return{index:e.k,value:e.v}})}function fe(e,t){var n=e.length;if(0===n)return[];for(var o=t(e[0]),r=o.index,i=o.value,l=[],a=1;a<n;a++){var u=t(e[a]),s=u.index,c=u.value;l.push({start:r,end:s-1,value:i}),r=s,i=c}return l.push({start:r,end:Infinity,value:i}),l}function me(e){var t=e.r,n=e.lvl;return X(t)||X(t.r)||t.lvl!==n||t.r.lvl!==n?e:ue(t,{l:ue(e,{r:t.l}),lvl:n+1})}function he(e){var t=e.l;return X(t)||t.lvl!==e.lvl?e:ue(t,{r:ue(e,{l:t.r})})}function pe(e,t,n,o){void 0===o&&(o=0);for(var r=e.length-1;o<=r;){var i=Math.floor((o+r)/2),l=n(e[i],t);if(0===l)return i;if(-1===l){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error("Failed binary finding record in array - "+e.join(",")+", searched for "+t)}function ge(e,t,n){return e[pe(e,t,n)]}function ve(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ie(e){var t=e.size,n=e.startIndex,o=e.endIndex;return function(e){return e.start===n&&(e.end===o||Infinity===e.end)&&e.value===t}}function Ce(e,t){var n=e.index;return t===n?0:t<n?-1:1}function Se(e,t){var n=e.offset;return t===n?0:t<n?-1:1}function xe(e){return{index:e.index,value:e}}function Te(e,t){var n=t[0],o=t[1];n.length>0&&(0,t[2])("received item sizes",n,N.DEBUG);var r=e.sizeTree,i=e.offsetTree,l=r,a=0;if(o.length>0&&X(r)&&2===n.length){var u=n[0].size,s=n[1].size;l=o.reduce(function(e,t){return oe(oe(e,t,u),t+1,s)},l)}else{var c=function(e,t){for(var n,o=X(e)?0:Infinity,r=W(t);!(n=r()).done;){var i=n.value,l=i.size,a=i.startIndex,u=i.endIndex;if(o=Math.min(o,a),X(e))e=oe(e,0,l);else{var s=de(e,a-1,u+1);if(!s.some(Ie(i))){for(var c,d=!1,f=!1,m=W(s);!(c=m()).done;){var h=c.value,p=h.start,g=h.end,v=h.value;d?(u>=p||l===v)&&(e=te(e,p)):(f=v!==l,d=!0),g>u&&u>=p&&v!==l&&(e=oe(e,u+1,v))}f&&(e=oe(e,a,l))}}}return[e,o]}(l,n);l=c[0],a=c[1]}if(l===r)return e;var d=0,f=0,m=0,h=0;if(0!==a){h=pe(i,a-1,Ce),m=i[h].offset;var p=ne(l,a-1);d=p[0],f=p[1],i.length&&i[h].size===ne(l,a)[1]&&(h-=1),i=i.slice(0,h+1)}else i=[];for(var g,v=W(de(l,a,Infinity));!(g=v()).done;){var I=g.value,C=I.start,S=I.value,x=(C-d)*f+m;i.push({offset:x,size:S,index:C}),d=C,m=x,f=S}return{sizeTree:l,offsetTree:i,groupOffsetTree:o.reduce(function(e,t){return oe(e,t,we(t,i))},ee()),lastIndex:d,lastOffset:m,lastSize:f,groupIndices:o}}function we(e,t){if(0===t.length)return 0;var n=ge(t,e,Ce);return n.size*(e-n.index)+n.offset}function ye(e,t){if(!be(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function be(e){return!X(e.groupOffsetTree)}var He={offsetHeight:"height",offsetWidth:"width"},Re=t(function(e){var t=e[0].log,f=n(),m=n(),h=I(m,0),p=n(),g=o(0),v=o([]),C=o(void 0),x=o(void 0),T=o(function(e,t){return ve(e,He[t])}),y=o(void 0),b={offsetTree:[],sizeTree:ee(),groupOffsetTree:ee(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},H=I(i(f,w(v,t),S(Te,b),c()),b);r(i(v,s(function(e){return e.length>0}),w(H),l(function(e){var t=e[0],n=e[1],o=t.reduce(function(e,t,o){return oe(e,t,we(t,n.offsetTree)||o)},ee());return M({},n,{groupIndices:t,groupOffsetTree:o})})),H),r(i(m,w(H),s(function(e){return e[0]<e[1].lastIndex}),l(function(e){var t=e[1];return[{startIndex:e[0],endIndex:t.lastIndex,size:t.lastSize}]})),f),r(C,x);var R=I(i(C,l(function(e){return void 0===e})),!0);r(i(x,s(function(e){return void 0!==e&&X(a(H).sizeTree)}),l(function(e){return[{startIndex:0,endIndex:0,size:e}]})),f);var z=u(i(f,w(H),S(function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}},{changed:!1,sizes:b}),l(function(e){return e.changed})));r(i(g,S(function(e,t){return{diff:e.prev-t,prev:t}},{diff:0,prev:0}),l(function(e){return e.diff}),s(function(e){return e>0})),p),d(i(g,w(t)),function(e){e[0]<0&&(0,e[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:g},N.ERROR)});var k=u(p);return r(i(p,w(H),l(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return ie(n.sizeTree).reduce(function(e,n){var o=n.k,r=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:o+t-1,size:e.prevSize}]),prevIndex:o+t,prevSize:r}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),f),{data:y,totalCount:m,sizeRanges:f,groupIndices:v,defaultItemSize:x,fixedItemSize:C,unshiftWith:p,beforeUnshiftWith:k,firstItemIndex:g,sizes:H,listRefresh:z,statefulTotalCount:h,trackItemSizes:R,itemSize:T}},f(j),{singleton:!0}),ze="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function ke(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&ze||(t.behavior="auto"),t.offset||(t.offset=0),t}var Be=t(function(e){var t=e[0],a=t.sizes,u=t.totalCount,s=t.listRefresh,c=e[1],f=c.scrollingInProgress,m=c.viewportHeight,h=c.scrollTo,p=c.smoothScrollTargetReached,g=c.headerHeight,v=c.footerHeight,I=e[2].log,C=n(),S=o(0),T=null,b=null,H=null;function R(){T&&(T(),T=null),H&&(H(),H=null),b&&(clearTimeout(b),b=null),x(f,!1)}return r(i(C,w(a,m,u,S,g,v,I),l(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],l=e[4],a=e[5],u=e[6],c=e[7],m=ke(t),h=m.align,g=m.behavior,v=m.offset,I=r-1,S=m.index;"LAST"===S&&(S=I),S=ye(S,n);var w=we(S=Math.max(0,S,Math.min(I,S)),n.offsetTree)+a;"end"===h?(w=w-o+ne(n.sizeTree,S)[1],S===I&&(w+=u)):"center"===h?w=w-o/2+ne(n.sizeTree,S)[1]/2:w-=l,v&&(w+=v);var z=function(e){R(),e?(c("retrying to scroll to",{location:t},N.DEBUG),x(C,t)):c("list did not change, scroll successful",{},N.DEBUG)};if(R(),"smooth"===g){var k=!1;H=d(s,function(e){k=k||e}),T=y(p,function(){z(k)})}else T=y(i(s,function(e){var t=setTimeout(function(){e(!1)},50);return function(n){n&&(e(!0),clearTimeout(t))}}),z);return b=setTimeout(function(){R()},1200),x(f,!0),c("scrolling from index to",{index:S,top:w,behavior:g},N.DEBUG),{top:w,behavior:g}})),h),{scrollToIndex:C,topListHeight:S}},f(Re,U,j),{singleton:!0});function Ee(e,t,n){return"number"==typeof e?n===Y&&"top"===t||"down"===n&&"bottom"===t?e:0:n===Y?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse}function Le(e,t){return"number"==typeof e?e:e[t]||0}var Pe=t(function(e){var t=e[0],r=t.scrollTop,a=t.viewportHeight,u=t.deviation,d=t.headerHeight,f=n(),m=o(0),p=o(0),g=o(0),v=o(0);return{listBoundary:f,overscan:v,topListHeight:m,fixedHeaderHeight:p,increaseViewportBy:g,visibleRange:I(i(C(h(r),h(a),h(d),h(f,D),h(v),h(m),h(p),h(u),h(g)),l(function(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=r[0],l=r[1],a=e[4],u=e[6],s=e[7],c=e[8],d=t-s,f=e[5]+u,m=Math.max(o-d,0),h="none",p=Le(c,"top"),g=Le(c,"bottom");return i-=s,l+=o,(i+=o)>t+f-p&&(h=Y),(l-=s)<t-m+n+g&&(h="down"),"none"!==h?[Math.max(d-o-Ee(a,"top",h)-p,0),d-m-u+n+Ee(a,"bottom",h)+g]:null}),s(function(e){return null!=e}),c(D)),[0,0])}},f(U),{singleton:!0}),Oe=t(function(e){var t=e[0],a=t.scrollTo,u=t.scrollContainerState,s=n(),c=n(),d=n(),f=o(!1),m=o(void 0);return r(i(C(s,c),l(function(e){var t=e[0],n=t[1];return[Math.max(0,t[0]-e[1].offsetTop),n]})),u),r(i(a,w(c),l(function(e){var t=e[0];return M({},t,{top:t.top+e[1].offsetTop})})),d),{useWindowScroll:f,customScrollParent:m,windowScrollContainerState:s,windowViewportRect:c,windowScrollTo:d}},f(U)),Me={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Ae={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Ve=Math.round,We=Math.ceil,De=Math.floor,Fe=Math.min,Ge=Math.max;function Ne(e,t){return Array.from({length:t-e+1}).map(function(t,n){return{index:n+e}})}var Ue=t(function(e){var t=e[0],a=t.overscan,d=t.visibleRange,f=t.listBoundary,m=e[1],p=m.scrollTop,v=m.viewportHeight,S=m.scrollBy,x=m.scrollTo,T=m.smoothScrollTargetReached,y=m.scrollContainerState,b=e[2],H=e[3],R=e[4],z=R.propsReady,k=R.didMount,B=e[5],E=B.windowViewportRect,L=B.windowScrollTo,P=B.useWindowScroll,O=B.customScrollParent,A=B.windowScrollContainerState,V=o(0),W=o(0),G=o(Me),N=o({height:0,width:0}),U=o({height:0,width:0}),_=n(),j=n(),K=o(0);r(i(k,w(W),s(function(e){return 0!==e[1]}),l(function(e){return{items:Ne(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),G),r(i(C(h(V),d,h(U,function(e,t){return e&&e.width===t.width&&e.height===t.height})),w(N),l(function(e){var t=e[0],n=t[0],o=t[1],r=o[0],i=o[1],l=t[2],a=e[1],u=l.height,s=l.width,c=a.width;if(0===n||0===c)return Me;if(0===s)return Ae;var d=Ke(c,s),f=d*De(r/u),m=d*We(i/u)-1;m=Fe(n-1,m);var h=Ne(f=Fe(m,Ge(0,f)),m),p=_e(a,l,h),g=p.top,v=p.bottom;return{items:h,offsetTop:g,offsetBottom:We(n/d)*u-v,top:g,bottom:v,itemHeight:u,itemWidth:s}})),G),r(i(N,l(function(e){return e.height})),v),r(i(C(N,U,G),l(function(e){var t=_e(e[0],e[1],e[2].items);return[t.top,t.bottom]}),c(D)),f);var Y=u(i(h(G),s(function(e){return e.items.length>0}),w(V),s(function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1}),l(function(e){return e[1]-1}),c())),Z=u(i(h(G),s(function(e){var t=e.items;return t.length>0&&0===t[0].index}),g(0),c())),q=u(i(h(G),s(function(e){return e.items.length>0}),l(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),c(F)));r(q,H.scrollSeekRangeChanged),r(i(_,w(N,U,V),l(function(e){var t=e[1],n=e[2],o=e[3],r=ke(e[0]),i=r.align,l=r.behavior,a=r.offset,u=r.index;"LAST"===u&&(u=o-1);var s=je(t,n,u=Ge(0,u,Fe(o-1,u)));return"end"===i?s=Ve(s-t.height+n.height):"center"===i&&(s=Ve(s-t.height/2+n.height/2)),a&&(s+=a),{top:s,behavior:l}})),x);var J=I(i(G,l(function(e){return e.offsetBottom+e.bottom})),0);return r(i(E,l(function(e){return{width:e.visibleWidth,height:e.visibleHeight}})),N),M({totalCount:V,viewportDimensions:N,itemDimensions:U,scrollTop:p,scrollHeight:j,overscan:a,scrollBy:S,scrollTo:x,scrollToIndex:_,smoothScrollTargetReached:T,windowViewportRect:E,windowScrollTo:L,useWindowScroll:P,customScrollParent:O,windowScrollContainerState:A,deviation:K,scrollContainerState:y,initialItemCount:W},H,{gridState:G,totalListHeight:J},b,{startReached:Z,endReached:Y,rangeChanged:q,propsReady:z})},f(Pe,U,q,J,K,Oe));function _e(e,t,n){var o=t.height;return void 0===o||0===n.length?{top:0,bottom:0}:{top:je(e,t,n[0].index),bottom:je(e,t,n[n.length-1].index)+o}}function je(e,t,n){var o=Ke(e.width,t.width);return De(n/o)*t.height}function Ke(e,t){return Ge(1,De(e/t))}function Ye(e,t){void 0===t&&(t=!0);var n=k(null),o=function(e){};if("undefined"!=typeof ResizeObserver){var r=new ResizeObserver(function(t){var n=t[0].target;null!==n.offsetParent&&e(n)});o=function(e){e&&t?(r.observe(e),n.current=e):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Ze(e,t){return void 0===t&&(t=!0),Ye(e,t).callbackRef}function qe(e,t){var n=k(null),o=B(function(o){if(null!==o){var r,i,l=o.getBoundingClientRect(),a=l.width;if(t){var u=t.getBoundingClientRect(),s=l.top-u.top;r=u.height-Math.max(0,s),i=s+t.scrollTop}else r=window.innerHeight-Math.max(0,l.top),i=l.top+window.pageYOffset;n.current={offsetTop:i,visibleHeight:r,visibleWidth:a},e(n.current)}},[e,t]),r=Ye(o),i=r.callbackRef,l=r.ref,a=B(function(){o(l.current)},[o,l]);return E(function(){if(t){t.addEventListener("scroll",a);var e=new ResizeObserver(a);return e.observe(t),function(){t.removeEventListener("scroll",a),e.unobserve(t)}}return window.addEventListener("scroll",a),window.addEventListener("resize",a),function(){window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[a,t]),i}var Je="undefined"!=typeof document?L:E;function $e(e,t,n,o,r,i){return Ze(function(n){for(var l=function(e,t,n,o){var r=e.length;if(0===r)return null;for(var i=[],l=0;l<r;l++){var a=e.item(l);if(a&&void 0!==a.dataset.index){var u=parseInt(a.dataset.index),s=parseFloat(a.dataset.knownSize),c=t(a,"offsetHeight");if(0===c&&o("Zero-sized element, this should not happen",{child:a},N.ERROR),c!==s){var d=i[i.length-1];0===i.length||d.size!==c||d.endIndex!==u-1?i.push({startIndex:u,endIndex:u,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,t,0,r),a=n.parentElement;!a.dataset.virtuosoScroller;)a=a.parentElement;var u=i?i.scrollTop:"window"===a.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:a.scrollTop;o(i?[Math.max(u,0),i.scrollHeight]:[Math.max(u,0),a.scrollHeight]),null!==l&&e(l)},n)}function Qe(e,t,n,o,r){void 0===o&&(o=b);var i=k(null),l=k(null),a=k(null),u=B(function(n){var o=n.target,r=o===window||o===document?window.pageYOffset||document.documentElement.scrollTop:o.scrollTop,i=o===window?document.documentElement.scrollHeight:o.scrollHeight;e([Math.max(r,0),i]),null!==l.current&&(r===l.current||r<=0||r===o.scrollHeight-ve(o,"height"))&&(l.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);return E(function(){var e=r||i.current;return o(r||i.current),u({target:e}),e.addEventListener("scroll",u,{passive:!0}),function(){o(null),e.removeEventListener("scroll",u)}},[i,u,n,o,r]),{scrollerRef:i,scrollByCallback:function(e){null===l.current&&i.current.scrollBy(e)},scrollToCallback:function(n){var o=i.current;if(o&&(!("offsetHeight"in o)||0!==o.offsetHeight)){var r,u,s,c="smooth"===n.behavior;if(o===window?(u=Math.max(ve(document.documentElement,"height"),document.documentElement.scrollHeight),r=window.innerHeight,s=document.documentElement.scrollTop):(u=o.scrollHeight,r=ve(o,"height"),s=o.scrollTop),n.top=Math.ceil(Math.max(Math.min(u-r,n.top),0)),Math.abs(r-u)<1.01||n.top===s)return e([s,u]),void(c&&t(!0));c?(l.current=n.top,a.current&&clearTimeout(a.current),a.current=setTimeout(function(){a.current=null,l.current=null,t(!0)},1e3)):l.current=null,o.scrollTo(n)}}}}var Xe=t(function(e){var t=e[0],n=t.sizes,l=t.listRefresh,a=t.defaultItemSize,u=e[1].scrollTop,c=e[2].scrollToIndex,f=e[3].didMount,m=o(!0),h=o(0);return r(i(f,w(h),s(function(e){return 0!==e[1]}),g(!1)),m),d(i(C(l,f),w(m,n,a),s(function(e){var t=e[1],n=e[3];return e[0][1]&&(!X(e[2].sizeTree)||void 0!==n)&&!t}),w(h)),function(e){var t=e[1];setTimeout(function(){y(u,function(){x(m,!0)}),x(c,t)})}),{scrolledToInitialItem:m,initialTopMostItemIndex:h}},f(Re,U,Be,K),{singleton:!0});function et(e){return!!e&&("smooth"===e?"smooth":"auto")}var tt=t(function(e){var t=e[0],n=t.totalCount,r=t.listRefresh,u=e[1],c=u.isAtBottom,f=u.atBottomState,m=e[2].scrollToIndex,g=e[3].scrolledToInitialItem,v=e[4],I=v.propsReady,T=v.didMount,b=e[5].log,H=e[6].scrollingInProgress,R=o(!1),z=null;function k(e){x(m,{index:"LAST",align:"end",behavior:e})}return d(i(C(i(h(n),p(1)),T),w(h(R),c,g,H),l(function(e){var t=e[0],n=t[0],o=t[1]&&e[3],r="auto";return o&&(r=function(e,t){return"function"==typeof e?et(e(t)):t&&et(e)}(e[1],e[2]||e[4]),o=o&&!!r),{totalCount:n,shouldFollow:o,followOutputBehavior:r}}),s(function(e){return e.shouldFollow})),function(e){var t=e.totalCount,n=e.followOutputBehavior;z&&(z(),z=null),z=y(r,function(){a(b)("following output to ",{totalCount:t},N.DEBUG),k(n),z=null})}),d(i(C(h(R),n,I),s(function(e){return e[0]&&e[2]}),S(function(e,t){var n=t[1];return{refreshed:e.value===n,value:n}},{refreshed:!1,value:0}),s(function(e){return e.refreshed}),w(R,n)),function(e){var t=e[1],n=y(f,function(e){!t||e.atBottom||"SIZE_INCREASED"!==e.notAtBottomBecause||z||(a(b)("scrolling to bottom due to increased size",{},N.DEBUG),k("auto"))});setTimeout(n,100)}),d(C(h(R),f),function(e){var t=e[1];e[0]&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&k("auto")}),{followOutput:R}},f(Re,q,Be,Xe,K,j,U));function nt(e){return e.reduce(function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e},{totalCount:0,groupIndices:[]})}var ot=t(function(e){var t=e[0],o=t.totalCount,a=t.groupIndices,d=t.sizes,f=e[1],m=f.scrollTop,h=f.headerHeight,p=n(),g=n(),v=u(i(p,l(nt)));return r(i(v,l(H("totalCount"))),o),r(i(v,l(H("groupIndices"))),a),r(i(C(m,d,h),s(function(e){return be(e[1])}),l(function(e){return ne(e[1].groupOffsetTree,Math.max(e[0]-e[2],0),"v")[0]}),c(),l(function(e){return[e]})),g),{groupCounts:p,topItemsIndexes:g}},f(Re,U)),rt={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function it(e,t,n){if(0===e.length)return[];if(!be(t))return e.map(function(e){return M({},e,{index:e.index+n,originalIndex:e.index})});for(var o,r=[],i=de(t.groupOffsetTree,e[0].index,e[e.length-1].index),l=void 0,a=0,u=W(e);!(o=u()).done;){var s=o.value;(!l||l.end<s.index)&&(l=i.shift(),a=t.groupIndices.indexOf(l.start)),r.push(M({},s.index===l.start?{type:"group",index:a}:{index:s.index-(a+1)+n,groupIndex:a},{size:s.size,offset:s.offset,originalIndex:s.index,data:s.data}))}return r}function lt(e,t,n,o,r){var i=0,l=0;if(e.length>0){i=e[0].offset;var a=e[e.length-1];l=a.offset+a.size}var u=i,s=o.lastOffset+(n-o.lastIndex)*o.lastSize-l;return{items:it(e,o,r),topItems:it(t,o,r),topListHeight:t.reduce(function(e,t){return t.size+e},0),offsetTop:i,offsetBottom:s,top:u,bottom:l,totalCount:n}}var at,ut,st,ct=t(function(e){var t=e[0],a=t.sizes,d=t.totalCount,f=t.data,m=t.firstItemIndex,p=e[1],g=e[2],v=g.visibleRange,S=g.listBoundary,x=g.topListHeight,y=e[3],b=y.scrolledToInitialItem,z=y.initialTopMostItemIndex,k=e[4].topListHeight,B=e[5],E=e[6].didMount,L=o([]),P=n();r(p.topItemsIndexes,L);var O=I(i(C(E,h(v),h(d),h(a),h(z),b,h(L),h(m),f),s(function(e){return e[0]}),l(function(e){var t=e[1],n=t[0],o=t[1],r=e[2],i=e[4],l=e[5],a=e[6],u=e[7],s=e[8],c=e[3],d=c.sizeTree,f=c.offsetTree;if(0===r||0===n&&0===o)return rt;if(X(d))return lt(function(e,t,n){if(be(t)){var o=ye(e,t);return[{index:ne(t.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(i,c,s),[],r,c,u);var m=[];if(a.length>0)for(var h,p=a[0],g=a[a.length-1],v=0,I=W(de(d,p,g));!(h=I()).done;)for(var C=h.value,S=C.value,x=Math.max(C.start,p),T=Math.min(C.end,g),w=x;w<=T;w++)m.push({index:w,size:S,offset:v,data:s&&s[w]}),v+=S;if(!l)return lt([],m,r,c,u);var y=a.length>0?a[a.length-1]+1:0,b=function(e,t,n,o){return void 0===o&&(o=0),o>0&&(t=Math.max(t,ge(e,o,Ce).offset)),fe((i=n,a=pe(r=e,t,l=Se),u=pe(r,i,l,a),r.slice(a,u+1)),xe);var r,i,l,a,u}(f,n,o,y);if(0===b.length)return null;var H=r-1;return lt(R([],function(e){for(var t,r=W(b);!(t=r()).done;){var i=t.value,l=i.value,a=l.offset,u=i.start,c=l.size;l.offset<n&&(a+=((u+=Math.floor((n-l.offset)/c))-i.start)*c),u<y&&(a+=(y-u)*c,u=y);for(var d=Math.min(i.end,H),f=u;f<=d&&!(a>=o);f++)e.push({index:f,size:c,offset:a,data:s&&s[f]}),a+=c}}),m,r,c,u)}),s(function(e){return null!==e}),c()),rt);return r(i(f,s(function(e){return void 0!==e}),l(function(e){return e.length})),d),r(i(O,l(H("topListHeight"))),k),r(k,x),r(i(O,l(function(e){return[e.top,e.bottom]})),S),r(i(O,l(function(e){return e.items})),P),M({listState:O,topItemsIndexes:L,endReached:u(i(O,s(function(e){return e.items.length>0}),w(d,f),s(function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1}),l(function(e){return[e[1]-1,e[2]]}),c(D),l(function(e){return e[0]}))),startReached:u(i(O,T(200),s(function(e){var t=e.items;return t.length>0&&t[0].originalIndex===e.topItems.length}),l(function(e){return e.items[0].index}),c())),rangeChanged:u(i(O,s(function(e){return e.items.length>0}),l(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),c(F))),itemsRendered:P},B)},f(Re,ot,Pe,Xe,Be,q,K),{singleton:!0}),dt=t(function(e){var t=e[0],n=t.sizes,a=t.firstItemIndex,u=t.data,c=e[1].listState,d=e[2].didMount,f=o(0);return r(i(d,w(f),s(function(e){return 0!==e[1]}),w(n,a,u),l(function(e){var t=e[0][1],n=e[1],o=e[2],r=e[3],i=void 0===r?[]:r,l=0;if(n.groupIndices.length>0)for(var a,u=W(n.groupIndices);!((a=u()).done||a.value-l>=t);)l++;var s=t+l;return lt(Array.from({length:s}).map(function(e,t){return{index:t,size:0,offset:0,data:i[t]}}),[],s,n,o)})),c),{initialItemCount:f}},f(Re,ct,K),{singleton:!0}),ft=t(function(e){var t=e[0].topItemsIndexes,n=o(0);return r(i(n,s(function(e){return e>0}),l(function(e){return Array.from({length:e}).map(function(e,t){return t})})),t),{topItemCount:n}},f(ct)),mt=t(function(e){var t=e[0],o=t.footerHeight,a=t.headerHeight,u=e[1].listState,s=n(),c=I(i(C(o,a,u),l(function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom})),0);return r(h(c),s),{totalListHeight:c,totalListHeightChanged:s}},f(U,ct),{singleton:!0}),ht=t(function(e){var t=e[0],n=t.scrollBy,o=t.scrollTop,a=t.deviation,c=t.scrollingInProgress,f=e[1],m=f.isScrolling,h=f.isAtBottom,p=f.atBottomState,g=f.scrollDirection,v=e[3],y=v.beforeUnshiftWith,b=v.sizes,H=e[4].log,R=u(i(e[2].listState,w(f.lastJumpDueToItemResize),S(function(e,t){var n=e[1],o=t[0],r=o.items,i=o.totalCount,l=t[1],a=0;if(e[2]===i){if(n.length>0&&r.length>0){var u=1===r.length;if(0!==r[0].originalIndex||0!==n[0].originalIndex)for(var s=function(e){var t=r[e],o=n.find(function(e){return e.originalIndex===t.originalIndex});return o?t.offset!==o.offset||u?(a=t.offset-o.offset+t.size-o.size,"break"):void 0:"continue"},c=r.length-1;c>=0;c--){var d=s(c);if("continue"!==d&&"break"===d)break}}0!==a&&(a+=l)}return[a,r,i]},[0,[],0]),s(function(e){return 0!==e[0]}),w(o,g,c,H,h,p),s(function(e){return!e[3]&&0!==e[1]&&e[2]===Y}),l(function(e){var t=e[0][0];return(0,e[4])("Upward scrolling compensation",{amount:t},N.DEBUG),t})));return r(i(R,w(a),l(function(e){return e[1]-e[0]})),a),d(i(C(I(m,!1),a),s(function(e){return!e[0]&&0!==e[1]}),l(function(e){return e[1]}),T(1)),function(e){e>0?(x(n,{top:-e,behavior:"auto"}),x(a,0)):(x(a,0),x(n,{top:-e,behavior:"auto"}))}),r(i(y,w(b),l(function(e){return e[0]*e[1].lastSize})),R),{deviation:a}},f(U,q,ct,Re,j)),pt=t(function(e){var t=e[0].totalListHeight,n=e[1].didMount,r=e[2].scrollTo,a=o(0);return d(i(n,w(a),s(function(e){return 0!==e[1]}),l(function(e){return{top:e[1]}})),function(e){y(i(t,s(function(e){return 0!==e})),function(){setTimeout(function(){x(r,e)})})}),{initialScrollTop:a}},f(mt,K,U),{singleton:!0}),gt=t(function(e){var t=e[0].viewportHeight,n=e[1].totalListHeight,r=o(!1);return{alignToBottom:r,paddingTopAddition:I(i(C(r,t,n),s(function(e){return e[0]}),l(function(e){return Math.max(0,e[1]-e[2])}),c()),0)}},f(U,mt),{singleton:!0}),vt=t(function(e){var t=e[0],o=t.sizes,a=t.totalCount,u=e[1],c=u.scrollTop,d=u.viewportHeight,f=u.headerHeight,m=u.scrollingInProgress,h=e[2].scrollToIndex,g=n();return r(i(g,w(o,d,a,f,c),l(function(e){var t=e[0],n=t.index,o=t.behavior,r=void 0===o?"auto":o,l=t.done,a=e[1],u=e[2],c=e[4],d=e[5],f=e[3]-1,h=null;n=ye(n,a);var g=we(n=Math.max(0,n,Math.min(f,n)),a.offsetTree)+c;return g<d?h={index:n,behavior:r,align:"start"}:g+ne(a.sizeTree,n)[1]>d+u&&(h={index:n,behavior:r,align:"end"}),h?l&&y(i(m,p(1),s(function(e){return!1===e})),l):l&&l(),h}),s(function(e){return null!==e})),h),{scrollIntoView:g}},f(Re,U,Be,ct,j),{singleton:!0}),It=t(function(e){return M({},e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},f(Pe,dt,K,J,mt,pt,gt,Oe,vt)),Ct=t(function(e){var t=e[0],n=t.totalCount,o=t.sizeRanges,a=t.fixedItemSize,u=t.defaultItemSize,s=t.trackItemSizes,c=t.itemSize,d=t.data,f=t.firstItemIndex,m=t.groupIndices,h=t.statefulTotalCount,p=e[1],g=p.initialTopMostItemIndex,v=p.scrolledToInitialItem,I=e[2],C=e[3],S=e[4],x=S.listState,T=S.topItemsIndexes,w=A(S,["listState","topItemsIndexes"]),y=e[5].scrollToIndex,b=e[7].topItemCount,R=e[8].groupCounts,z=e[9],k=e[10];return r(w.rangeChanged,z.scrollSeekRangeChanged),r(i(z.windowViewportRect,l(H("visibleHeight"))),I.viewportHeight),M({totalCount:n,data:d,firstItemIndex:f,sizeRanges:o,initialTopMostItemIndex:g,scrolledToInitialItem:v,topItemsIndexes:T,topItemCount:b,groupCounts:R,fixedItemHeight:a,defaultItemHeight:u},C,{statefulTotalCount:h,listState:x,scrollToIndex:y,trackItemSizes:s,itemSize:c,groupIndices:m},w,z,I,k)},f(Re,Xe,U,tt,ct,Be,ht,ft,ot,It,j)),St=(at=function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"},st=!1,function(){return st||(st=!0,ut=at()),ut});function xt(e){return e}var Tt=t(function(){var e=o(function(e){return"Item "+e}),t=o(null),n=o(function(e){return"Group "+e}),r=o({}),a=o(xt),u=o("div"),s=o(b),d=function(e,t){return void 0===t&&(t=null),I(i(r,l(function(t){return t[e]}),c()),t)};return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:a,headerFooterTag:u,scrollerRef:s,FooterComponent:d("Footer"),HeaderComponent:d("Header"),TopItemListComponent:d("TopItemList"),ListComponent:d("List","div"),ItemComponent:d("Item","div"),GroupComponent:d("Group","div"),ScrollerComponent:d("Scroller","div"),EmptyPlaceholder:d("EmptyPlaceholder"),ScrollSeekPlaceholder:d("ScrollSeekPlaceholder")}});function wt(e,t){var o=n();return d(o,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+t,"color: red;","color: inherit;","color: blue;")}),r(o,e),o}var yt=t(function(e){var t=e[0],o=e[1],u={item:wt(o.itemContent,"Rename the %citem%c prop to %citemContent."),group:wt(o.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:wt(t.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:wt(t.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:wt(t.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:n(),maxHeightCacheSize:n(),footer:n(),header:n(),HeaderContainer:n(),FooterContainer:n(),ItemContainer:n(),ScrollContainer:n(),GroupContainer:n(),ListContainer:n(),emptyComponent:n(),scrollSeek:n()};function s(e,t,n){r(i(e,w(o.components),l(function(e){var o,r=e[0],i=e[1];return console.warn("react-virtuoso: "+n+" property is deprecated. Pass components."+t+" instead."),M({},i,((o={})[t]=r,o))})),o.components)}return d(u.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),d(u.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),d(u.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),d(u.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),d(u.scrollSeek,function(e){var n=e.placeholder,r=A(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),x(o.components,M({},a(o.components),{ScrollSeekPlaceholder:n})),x(t.scrollSeekConfiguration,r)}),s(u.footer,"Footer","footer"),s(u.header,"Header","header"),s(u.ItemContainer,"Item","ItemContainer"),s(u.ListContainer,"List","ListContainer"),s(u.ScrollContainer,"Scroller","ScrollContainer"),s(u.emptyComponent,"EmptyPlaceholder","emptyComponent"),s(u.GroupContainer,"Group","GroupContainer"),M({},t,o,u)},f(Ct,Tt)),bt=function(e){return O("div",{style:{height:e.height}})},Ht={position:St(),zIndex:1,overflowAnchor:"none"},Rt=P(function(e){var t=e.showTopList,n=void 0!==t&&t,o=Nt("listState"),r=Nt("deviation"),i=Gt("sizeRanges"),l=Nt("useWindowScroll"),a=Nt("customScrollParent"),u=Gt("windowScrollContainerState"),s=Gt("scrollContainerState"),c=a||l?u:s,d=Nt("itemContent"),f=Nt("context"),m=Nt("groupContent"),h=Nt("trackItemSizes"),p=Nt("itemSize"),g=Nt("log"),v=$e(i,p,h,n?b:c,g,a),I=Nt("EmptyPlaceholder"),C=Nt("ScrollSeekPlaceholder")||bt,S=Nt("ListComponent"),x=Nt("ItemComponent"),T=Nt("GroupComponent"),w=Nt("computeItemKey"),y=Nt("isSeeking"),H=Nt("groupIndices").length>0,R=Nt("paddingTopAddition"),z=Nt("firstItemIndex"),k=Nt("statefulTotalCount"),B=n?{}:{boxSizing:"border-box",paddingTop:o.offsetTop+R,paddingBottom:o.offsetBottom,marginTop:r};return!n&&0===k&&I?O(I,Et(I,f)):O(S,M({},Et(S,f),{ref:v,style:B,"data-test-id":n?"virtuoso-top-item-list":"virtuoso-item-list"}),(n?o.topItems:o.items).map(function(e){var t=e.originalIndex,n=w(t+z,e.data,f);return y?O(C,M({},Et(C,f),{key:n,index:e.index,height:e.size,type:e.type||"item"},"group"===e.type?{}:{groupIndex:e.groupIndex})):"group"===e.type?O(T,M({},Et(T,f),{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:Ht}),m(e.index)):O(x,M({},Et(x,f),{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex,style:{overflowAnchor:"none"}}),H?d(e.index,e.groupIndex,e.data,f):d(e.index,e.data,f))}))}),zt={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},kt={width:"100%",height:"100%",position:"absolute",top:0},Bt={width:"100%",position:St(),top:0};function Et(e,t){if("string"!=typeof e)return{context:t}}var Lt=P(function(){var e=Nt("HeaderComponent"),t=Gt("headerHeight"),n=Nt("headerFooterTag"),o=Ze(function(e){return t(ve(e,"height"))}),r=Nt("context");return e?O(n,{ref:o},O(e,Et(e,r))):null}),Pt=P(function(){var e=Nt("FooterComponent"),t=Gt("footerHeight"),n=Nt("headerFooterTag"),o=Ze(function(e){return t(ve(e,"height"))}),r=Nt("context");return e?O(n,{ref:o},O(e,Et(e,r))):null});function Ot(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return P(function(e){var r=e.style,i=e.children,l=A(e,["style","children"]),a=t("scrollContainerState"),u=o("ScrollerComponent"),s=t("smoothScrollTargetReached"),c=o("scrollerRef"),d=o("context"),f=Qe(a,s,u,c),m=f.scrollerRef,h=f.scrollByCallback;return n("scrollTo",f.scrollToCallback),n("scrollBy",h),O(u,M({ref:m,style:M({},zt,r),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},l,Et(u,d)),i)})}function Mt(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return P(function(e){var r=e.style,i=e.children,l=A(e,["style","children"]),a=t("windowScrollContainerState"),u=o("ScrollerComponent"),s=t("smoothScrollTargetReached"),c=o("totalListHeight"),d=o("deviation"),f=o("customScrollParent"),m=o("context"),h=Qe(a,s,u,b,f),p=h.scrollerRef,g=h.scrollByCallback,v=h.scrollToCallback;return Je(function(){return p.current=f||window,function(){p.current=null}},[p,f]),n("windowScrollTo",v),n("scrollBy",g),O(u,M({style:M({position:"relative"},r,0!==c?{height:c+d}:{}),"data-virtuoso-scroller":!0},l,Et(u,m)),i)})}var At=function(e){var t=e.children,n=Gt("viewportHeight"),o=Ze(z(n,function(e){return ve(e,"height")}));return O("div",{style:kt,ref:o,"data-viewport-type":"element"},t)},Vt=function(e){var t=e.children,n=qe(Gt("windowViewportRect"),Nt("customScrollParent"));return O("div",{ref:n,style:kt,"data-viewport-type":"window"},t)},Wt=function(e){var t=e.children,n=Nt("TopItemListComponent"),o=Nt("headerHeight"),r=M({},Bt,{marginTop:o+"px"}),i=Nt("context");return O(n||"div",{style:r,context:i},t)},Dt=e(yt,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},P(function(e){var t=Nt("useWindowScroll"),n=Nt("topItemsIndexes").length>0,o=Nt("customScrollParent"),r=o||t?Vt:At;return O(o||t?jt:_t,M({},e),O(r,null,O(Lt,null),O(Rt,null),O(Pt,null)),n&&O(Wt,null,O(Rt,{showTopList:!0})))})),Ft=Dt.Component,Gt=Dt.usePublisher,Nt=Dt.useEmitterValue,Ut=Dt.useEmitter,_t=Ot({usePublisher:Gt,useEmitterValue:Nt,useEmitter:Ut}),jt=Mt({usePublisher:Gt,useEmitterValue:Nt,useEmitter:Ut}),Kt=t(function(){var e=o(function(e){return"Item "+e}),t=o({}),n=o(null),r=o("virtuoso-grid-item"),a=o("virtuoso-grid-list"),u=o(xt),s=o(b),d=function(e,n){return void 0===n&&(n=null),I(i(t,l(function(t){return t[e]}),c()),n)};return{context:n,itemContent:e,components:t,computeItemKey:u,itemClassName:r,listClassName:a,scrollerRef:s,ListComponent:d("List","div"),ItemComponent:d("Item","div"),ScrollerComponent:d("Scroller","div"),ScrollSeekPlaceholder:d("ScrollSeekPlaceholder","div")}}),Yt=t(function(e){var t=e[0],o=e[1],u={item:wt(o.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:n(),ScrollContainer:n(),ListContainer:n(),emptyComponent:n(),scrollSeek:n()};function s(e,t,n){r(i(e,w(o.components),l(function(e){var o,r=e[0],i=e[1];return console.warn("react-virtuoso: "+n+" property is deprecated. Pass components."+t+" instead."),M({},i,((o={})[t]=r,o))})),o.components)}return d(u.scrollSeek,function(e){var n=e.placeholder,r=A(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),x(o.components,M({},a(o.components),{ScrollSeekPlaceholder:n})),x(t.scrollSeekConfiguration,r)}),s(u.ItemContainer,"Item","ItemContainer"),s(u.ListContainer,"List","ListContainer"),s(u.ScrollContainer,"Scroller","ScrollContainer"),M({},t,o,u)},f(Ue,Kt)),Zt=P(function(){var e=en("gridState"),t=en("listClassName"),n=en("itemClassName"),o=en("itemContent"),r=en("computeItemKey"),i=en("isSeeking"),l=Xt("scrollHeight"),a=en("ItemComponent"),u=en("ListComponent"),s=en("ScrollSeekPlaceholder"),c=en("context"),d=Xt("itemDimensions"),f=Ze(function(e){l(e.parentElement.parentElement.scrollHeight);var t=e.firstChild;t&&d(t.getBoundingClientRect())});return O(u,M({ref:f,className:t},Et(u,c),{style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}}),e.items.map(function(t){var l=r(t.index);return i?O(s,M({key:l},Et(s,c),{index:t.index,height:e.itemHeight,width:e.itemWidth})):O(a,M({},Et(a,c),{className:n,"data-index":t.index,key:l}),o(t.index,c))}))}),qt=function(e){var t=e.children,n=Xt("viewportDimensions"),o=Ze(function(e){n(e.getBoundingClientRect())});return O("div",{style:kt,ref:o},t)},Jt=function(e){var t=e.children,n=qe(Xt("windowViewportRect"),en("customScrollParent"));return O("div",{ref:n,style:kt},t)},$t=e(Yt,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},P(function(e){var t=M({},e),n=en("useWindowScroll"),o=en("customScrollParent"),r=o||n?Jt:qt;return O(o||n?on:nn,M({},t),O(r,null,O(Zt,null)))})),Qt=$t.Component,Xt=$t.usePublisher,en=$t.useEmitterValue,tn=$t.useEmitter,nn=Ot({usePublisher:Xt,useEmitterValue:en,useEmitter:tn}),on=Mt({usePublisher:Xt,useEmitterValue:en,useEmitter:tn}),rn=t(function(){var e=o(function(e){return O("td",null,"Item $",e)}),t=o(null),n=o(null),r=o({}),a=o(xt),u=o(b),s=function(e,t){return void 0===t&&(t=null),I(i(r,l(function(t){return t[e]}),c()),t)};return{context:t,itemContent:e,fixedHeaderContent:n,components:r,computeItemKey:a,scrollerRef:u,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),ln=t(function(e){return M({},e[0],e[1])},f(Ct,rn)),an=function(e){return O("tr",null,O("td",{style:{height:e.height}}))},un=function(e){return O("tr",null,O("td",{style:{height:e.height,padding:0,border:0}}))},sn=P(function(){var e=pn("listState"),t=pn("deviation"),n=hn("sizeRanges"),o=pn("useWindowScroll"),r=pn("customScrollParent"),i=hn("windowScrollContainerState"),l=hn("scrollContainerState"),a=r||o?i:l,u=pn("itemContent"),s=pn("trackItemSizes"),c=$e(n,pn("itemSize"),s,a,pn("log"),r),d=pn("EmptyPlaceholder"),f=pn("ScrollSeekPlaceholder")||an,m=pn("TableBodyComponent"),h=pn("TableRowComponent"),p=pn("computeItemKey"),g=pn("isSeeking"),v=pn("paddingTopAddition"),I=pn("firstItemIndex"),C=pn("statefulTotalCount"),S=pn("context");if(0===C&&d)return O(d,Et(d,S));var x=e.offsetTop+v+t,T=e.offsetBottom,w=x>0?O(un,{height:x,key:"padding-top"}):null,y=T>0?O(un,{height:T,key:"padding-bottom"}):null,b=e.items.map(function(e){var t=e.originalIndex,n=p(t+I,e.data,S);return g?O(f,M({},Et(f,S),{key:n,index:e.index,height:e.size,type:e.type||"item"})):O(h,M({},Et(h,S),{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:{overflowAnchor:"none"}}),u(e.index,e.data,S))});return O(m,M({ref:c,"data-test-id":"virtuoso-item-list"},Et(m,S)),[w].concat(b,[y]))}),cn=function(e){var t=e.children,n=hn("viewportHeight"),o=Ze(z(n,function(e){return ve(e,"height")}));return O("div",{style:kt,ref:o,"data-viewport-type":"element"},t)},dn=function(e){var t=e.children,n=qe(hn("windowViewportRect"),pn("customScrollParent"));return O("div",{ref:n,style:kt,"data-viewport-type":"window"},t)},fn=e(ln,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},P(function(e){var t=pn("useWindowScroll"),n=pn("customScrollParent"),o=hn("fixedHeaderHeight"),r=pn("fixedHeaderContent"),i=pn("context"),l=Ze(z(o,function(e){return ve(e,"height")})),a=n||t?In:vn,u=n||t?dn:cn,s=pn("TableComponent"),c=pn("TableHeadComponent"),d=r?O(c,M({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:l},Et(c,i)),r()):null;return O(a,M({},e),O(u,null,O(s,M({style:{borderSpacing:0}},Et(s,i)),[d,O(sn,{key:"TableBody"})])))})),mn=fn.Component,hn=fn.usePublisher,pn=fn.useEmitterValue,gn=fn.useEmitter,vn=Ot({usePublisher:hn,useEmitterValue:pn,useEmitter:gn}),In=Mt({usePublisher:hn,useEmitterValue:pn,useEmitter:gn}),Cn=Ft,Sn=Ft,xn=mn,Tn=Qt;export{Sn as GroupedVirtuoso,N as LogLevel,xn as TableVirtuoso,Cn as Virtuoso,Tn as VirtuosoGrid};
//# sourceMappingURL=index.m.js.map

@@ -5,3 +5,3 @@ {

"sideEffects": false,
"version": "2.7.1",
"version": "2.7.2",
"homepage": "https://virtuoso.dev/",

@@ -8,0 +8,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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