UNPKG

zigbee2mqtt-windfront

Version:

[![Version](https://img.shields.io/npm/v/zigbee2mqtt-windfront.svg)](https://npmjs.org/package/zigbee2mqtt-windfront) [![CI](https://github.com/Nerivec/zigbee2mqtt-windfront/actions/workflows/ci.yml/badge.svg)](https://github.com/Nerivec/zigbee2mqtt-windf

1 lines 53.6 kB
import{aQ as B,j,r as ut,c$ as Qo,b as en}from"./index-C9teBVht.js";import{f as Io}from"./useTable-DxvhHQuW.js";const vt=0,Be=1,_e=2,To=4;function Qt(e){return()=>e}function tn(e){e()}function ht(e,t){return o=>e(t(o))}function eo(e,t){return()=>e(t)}function on(e,t){return o=>e(t,o)}function Ot(e){return e!==void 0}function nn(...e){return()=>{e.map(tn)}}function tt(){}function It(e,t){return t(e),e}function rn(e,t){return t(e)}function Y(...e){return e}function U(e,t){return e(Be,t)}function W(e,t){e(vt,t)}function Ft(e){e(_e)}function ee(e){return e(To)}function k(e,t){return U(e,on(t,vt))}function ve(e,t){const o=e(Be,n=>{o(),t(n)});return o}function to(e){let t,o;return n=>r=>{t=r,o&&clearTimeout(o),o=setTimeout(()=>{n(t)},e)}}function wo(e,t){return e===t}function $(e=wo){let t;return o=>n=>{e(t,n)||(t=n,o(n))}}function O(e){return t=>o=>{e(o)&&t(o)}}function y(e){return t=>ht(t,e)}function Ce(e){return t=>()=>{t(e)}}function I(e,...t){const o=ln(...t);return(n,r)=>{switch(n){case _e:Ft(e);return;case Be:return U(e,o(r))}}}function Se(e,t){return o=>n=>{o(t=e(t,n))}}function Pe(e){return t=>o=>{e>0?e--:t(o)}}function ye(e){let t=null,o;return n=>r=>{t=r,!o&&(o=setTimeout(()=>{o=void 0,n(t)},e))}}function A(...e){const t=new Array(e.length);let o=0,n=null;const r=Math.pow(2,e.length)-1;return e.forEach((i,l)=>{const s=Math.pow(2,l);U(i,c=>{const a=o;o=o|s,t[l]=c,a!==r&&o===r&&n&&(n(),n=null)})}),i=>l=>{const s=()=>{i([l].concat(t))};o===r?s():n=s}}function ln(...e){return t=>e.reduceRight(rn,t)}function sn(e){let t,o;const n=()=>t?.();return function(r,i){switch(r){case Be:return i?o===i?void 0:(n(),o=i,t=U(e,i),t):(n(),tt);case _e:n(),o=null;return}}}function w(e){let t=e;const o=D();return(n,r)=>{switch(n){case vt:t=r;break;case Be:{r(t);break}case To:return t}return o(n,r)}}function ie(e,t){return It(w(t),o=>k(e,o))}function D(){const e=[];return(t,o)=>{switch(t){case vt:e.slice().forEach(n=>{n(o)});return;case _e:e.splice(0,e.length);return;case Be:return e.push(o),()=>{const n=e.indexOf(o);n>-1&&e.splice(n,1)}}}}function de(e){return It(D(),t=>k(e,t))}function _(e,t=[],{singleton:o}={singleton:!0}){return{constructor:e,dependencies:t,id:cn(),singleton:o}}const cn=()=>Symbol();function an(e){const t=new Map,o=({constructor:n,dependencies:r,id:i,singleton:l})=>{if(l&&t.has(i))return t.get(i);const s=n(r.map(c=>o(c)));return l&&t.set(i,s),s};return o(e)}function te(...e){const t=D(),o=new Array(e.length);let n=0;const r=Math.pow(2,e.length)-1;return e.forEach((i,l)=>{const s=Math.pow(2,l);U(i,c=>{o[l]=c,n=n|s,n===r&&W(t,o)})}),function(i,l){switch(i){case _e:{Ft(t);return}case Be:return n===r&&l(o),U(t,l)}}}function M(e,t=wo){return I(e,$(t))}function Et(...e){return function(t,o){switch(t){case _e:return;case Be:return nn(...e.map(n=>U(n,o)))}}}var fe=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(fe||{});const un={0:"debug",3:"error",1:"log",2:"warn"},dn=()=>typeof globalThis>"u"?window:globalThis,ke=_(()=>{const e=w(3);return{log:w((t,o,n=1)=>{var r;const i=(r=dn().VIRTUOSO_LOG_LEVEL)!=null?r:ee(e);n>=i&&console[un[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,o)}),logLevel:e}},[],{singleton:!0});function We(e,t,o){return Pt(e,t,o).callbackRef}function Pt(e,t,o){const n=B.useRef(null);let r=l=>{};const i=B.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(l=>{const s=()=>{const c=l[0].target;c.offsetParent!==null&&e(c)};o?s():requestAnimationFrame(s)}):null,[e,o]);return r=l=>{l&&t?(i?.observe(l),n.current=l):(n.current&&i?.unobserve(n.current),n.current=null)},{callbackRef:r,ref:n}}function fn(e,t,o,n,r,i,l,s,c){const a=B.useCallback(m=>{const T=hn(m.children,t,"offsetHeight",r);let p=m.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const x=p.lastElementChild.dataset.viewportType==="window";let b;x&&(b=p.ownerDocument.defaultView);const v=l?l.scrollTop:x?b.scrollY||b.document.documentElement.scrollTop:p.scrollTop,g=l?l.scrollHeight:x?b.document.documentElement.scrollHeight:p.scrollHeight,f=l?l.offsetHeight:x?b.innerHeight:p.offsetHeight;n({scrollHeight:g,scrollTop:Math.max(v,0),viewportHeight:f}),T!==null&&e(T)},[e,t,r,i,l,n,s]);return Pt(a,o,c)}function hn(e,t,o,n){const r=e.length;if(r===0)return null;const i=[];for(let l=0;l<r;l++){const s=e.item(l);if(s.dataset.index===void 0)continue;const c=parseInt(s.dataset.index),a=parseFloat(s.dataset.knownSize),m=t(s,o);if(m===0&&n("Zero-sized element, this should not happen",{child:s},fe.ERROR),m===a)continue;const T=i[i.length-1];i.length===0||T.size!==m||T.endIndex!==c-1?i.push({endIndex:c,size:m,startIndex:c}):i[i.length-1].endIndex++}return i}function Co(e,t,o){const n=B.useRef(null),r=B.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const a=c.getBoundingClientRect(),m=a.width;let T,p;if(t){const x=t.getBoundingClientRect(),b=a.top-x.top;p=x.height-Math.max(0,b),T=b+t.scrollTop}else{const x=l.current.ownerDocument.defaultView;p=x.innerHeight-Math.max(0,a.top),T=a.top+x.scrollY}n.current={offsetTop:T,visibleHeight:p,visibleWidth:m},e(n.current)},[e,t]),{callbackRef:i,ref:l}=Pt(r,!0,o),s=B.useCallback(()=>{r(l.current)},[r,l]);return B.useEffect(()=>{var c;if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else{const a=(c=l.current)==null?void 0:c.ownerDocument.defaultView;return a?.addEventListener("scroll",s),a?.addEventListener("resize",s),()=>{a?.removeEventListener("scroll",s),a?.removeEventListener("resize",s)}}},[s,t,l]),i}const se=_(()=>{const e=D(),t=D(),o=w(0),n=D(),r=w(0),i=D(),l=D(),s=w(0),c=w(0),a=w(0),m=w(0),T=D(),p=D(),x=w(!1),b=w(!1),v=w(!1);return k(I(e,y(({scrollTop:g})=>g)),t),k(I(e,y(({scrollHeight:g})=>g)),l),k(t,r),{deviation:o,fixedFooterHeight:a,fixedHeaderHeight:c,footerHeight:m,headerHeight:s,horizontalDirection:b,scrollBy:p,scrollContainerState:e,scrollHeight:l,scrollingInProgress:x,scrollTo:T,scrollTop:t,skipAnimationFrameInResizeObserver:v,smoothScrollTargetReached:n,statefulScrollTop:r,viewportHeight:i}},[],{singleton:!0}),Ze={lvl:0};function So(e,t){const o=e.length;if(o===0)return[];let{index:n,value:r}=t(e[0]);const i=[];for(let l=1;l<o;l++){const{index:s,value:c}=t(e[l]);i.push({end:s-1,start:n,value:r}),n=s,r=c}return i.push({end:1/0,start:n,value:r}),i}function q(e){return e===Ze}function Xe(e,t){if(!q(e))return t===e.k?e.v:t<e.k?Xe(e.l,t):Xe(e.r,t)}function Te(e,t,o="k"){if(q(e))return[-1/0,void 0];if(Number(e[o])===t)return[e.k,e.v];if(Number(e[o])<t){const n=Te(e.r,t,o);return n[0]===-1/0?[e.k,e.v]:n}return Te(e.l,t,o)}function ue(e,t,o){return q(e)?yo(t,o,1):t===e.k?oe(e,{k:t,v:o}):t<e.k?oo(oe(e,{l:ue(e.l,t,o)})):oo(oe(e,{r:ue(e.r,t,o)}))}function Ge(){return Ze}function Tt(e,t,o){if(q(e))return[];const n=Te(e,t)[0];return mn(kt(e,n,o))}function Bt(e,t){if(q(e))return Ze;const{k:o,l:n,r}=e;if(t===o){if(q(n))return r;if(q(r))return n;{const[i,l]=Ho(n);return dt(oe(e,{k:i,l:bo(n),v:l}))}}else return t<o?dt(oe(e,{l:Bt(n,t)})):dt(oe(e,{r:Bt(r,t)}))}function Fe(e){return q(e)?[]:[...Fe(e.l),{k:e.k,v:e.v},...Fe(e.r)]}function kt(e,t,o){if(q(e))return[];const{k:n,l:r,r:i,v:l}=e;let s=[];return n>t&&(s=s.concat(kt(r,t,o))),n>=t&&n<=o&&s.push({k:n,v:l}),n<=o&&(s=s.concat(kt(i,t,o))),s}function dt(e){const{l:t,lvl:o,r:n}=e;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(bt(t))return zo(oe(e,{lvl:o-1}));if(!q(t)&&!q(t.r))return oe(t.r,{l:oe(t,{r:t.r.l}),lvl:o,r:oe(e,{l:t.r.r,lvl:o-1})});throw new Error("Unexpected empty nodes")}else{if(bt(e))return jt(oe(e,{lvl:o-1}));if(!q(n)&&!q(n.l)){const r=n.l,i=bt(r)?n.lvl-1:n.lvl;return oe(r,{l:oe(e,{lvl:o-1,r:r.l}),lvl:r.lvl+1,r:jt(oe(n,{l:r.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function oe(e,t){return yo(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function bo(e){return q(e.r)?e.l:dt(oe(e,{r:bo(e.r)}))}function bt(e){return q(e)||e.lvl>e.r.lvl}function Ho(e){return q(e.r)?[e.k,e.v]:Ho(e.r)}function yo(e,t,o,n=Ze,r=Ze){return{k:e,l:n,lvl:o,r,v:t}}function oo(e){return jt(zo(e))}function zo(e){const{l:t}=e;return!q(t)&&t.lvl===e.lvl?oe(t,{r:oe(e,{l:t.r})}):e}function jt(e){const{lvl:t,r:o}=e;return!q(o)&&!q(o.r)&&o.lvl===t&&o.r.lvl===t?oe(o,{l:oe(e,{r:o.l}),lvl:t+1}):e}function mn(e){return So(e,({k:t,v:o})=>({index:t,value:o}))}function Ro(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Je(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Wt=_(()=>({recalcInProgress:w(!1)}),[],{singleton:!0});function Eo(e,t,o){return e[mt(e,t,o)]}function mt(e,t,o,n=0){let r=e.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),l=e[i],s=o(l,t);if(s===0)return i;if(s===-1){if(r-n<2)return i-1;r=i-1}else{if(r===n)return i;n=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function gn(e,t,o,n){const r=mt(e,t,n),i=mt(e,o,n,r);return e.slice(r,i+1)}function Ee(e,t){return Math.round(e.getBoundingClientRect()[t])}function wt(e){return!q(e.groupOffsetTree)}function At({index:e},t){return t===e?0:t<e?-1:1}function pn(){return{groupIndices:[],groupOffsetTree:Ge(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ge()}}function xn(e,t){let o=q(e)?0:1/0;for(const n of t){const{endIndex:r,size:i,startIndex:l}=n;if(o=Math.min(o,l),q(e)){e=ue(e,0,i);continue}const s=Tt(e,l-1,r+1);if(s.some(bn(n)))continue;let c=!1,a=!1;for(const{end:m,start:T,value:p}of s)c?(r>=T||i===p)&&(e=Bt(e,T)):(a=p!==i,c=!0),m>r&&r>=T&&p!==i&&(e=ue(e,r+1,p));a&&(e=ue(e,l,i))}return[e,o]}function vn(e){return typeof e.groupIndex<"u"}function In({offset:e},t){return t===e?0:t<e?-1:1}function Qe(e,t,o){if(t.length===0)return 0;const{index:n,offset:r,size:i}=Eo(t,e,At),l=e-n,s=i*l+(l-1)*o+r;return s>0?s+o:s}function Bo(e,t){if(!wt(t))return e;let o=0;for(;t.groupIndices[o]<=e+o;)o++;return e+o}function ko(e,t,o){if(vn(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?o:e.index;let r=Bo(n,t);return r=Math.max(0,r,Math.min(o,r)),r}}function Tn(e,t,o,n=0){return n>0&&(t=Math.max(t,Eo(e,n,At).offset)),So(gn(e,t,o,In),Sn)}function wn(e,[t,o,n,r]){t.length>0&&n("received item sizes",t,fe.DEBUG);const i=e.sizeTree;let l=i,s=0;if(o.length>0&&q(i)&&t.length===2){const p=t[0].size,x=t[1].size;l=o.reduce((b,v)=>ue(ue(b,v,p),v+1,x),l)}else[l,s]=xn(l,t);if(l===i)return e;const{lastIndex:c,lastOffset:a,lastSize:m,offsetTree:T}=Lt(e.offsetTree,s,l,r);return{groupIndices:o,groupOffsetTree:o.reduce((p,x)=>ue(p,x,Qe(x,T,r)),Ge()),lastIndex:c,lastOffset:a,lastSize:m,offsetTree:T,sizeTree:l}}function Cn(e){return Fe(e).map(({k:t,v:o},n,r)=>{const i=r[n+1];return{endIndex:i?i.k-1:1/0,size:o,startIndex:t}})}function no(e,t){let o=0,n=0;for(;o<e;)o+=t[n+1]-t[n]-1,n++;return n-(o===e?0:1)}function Lt(e,t,o,n){let r=e,i=0,l=0,s=0,c=0;if(t!==0){c=mt(r,t-1,At),s=r[c].offset;const a=Te(o,t-1);i=a[0],l=a[1],r.length&&r[c].size===Te(o,t)[1]&&(c-=1),r=r.slice(0,c+1)}else r=[];for(const{start:a,value:m}of Tt(o,t,1/0)){const T=a-i,p=T*l+s+T*n;r.push({index:a,offset:p,size:m}),i=a,s=p,l=m}return{lastIndex:i,lastOffset:s,lastSize:l,offsetTree:r}}function Sn(e){return{index:e.index,value:e}}function bn(e){const{endIndex:t,size:o,startIndex:n}=e;return r=>r.start===n&&(r.end===t||r.end===1/0)&&r.value===o}const Hn={offsetHeight:"height",offsetWidth:"width"},be=_(([{log:e},{recalcInProgress:t}])=>{const o=D(),n=D(),r=ie(n,0),i=D(),l=D(),s=w(0),c=w([]),a=w(void 0),m=w(void 0),T=w((h,d)=>Ee(h,Hn[d])),p=w(void 0),x=w(0),b=pn(),v=ie(I(o,A(c,e,x),Se(wn,b),$()),b),g=ie(I(c,$(),Se((h,d)=>({current:d,prev:h.current}),{current:[],prev:[]}),y(({prev:h})=>h)),[]);k(I(c,O(h=>h.length>0),A(v,x),y(([h,d,C])=>{const z=h.reduce((L,E,F)=>ue(L,E,Qe(E,d.offsetTree,C)||F),Ge());return{...d,groupIndices:h,groupOffsetTree:z}})),v),k(I(n,A(v),O(([h,{lastIndex:d}])=>h<d),y(([h,{lastIndex:d,lastSize:C}])=>[{endIndex:d,size:C,startIndex:h}])),o),k(a,m);const f=ie(I(a,y(h=>h===void 0)),!0);k(I(m,O(h=>h!==void 0&&q(ee(v).sizeTree)),y(h=>[{endIndex:0,size:h,startIndex:0}])),o);const u=de(I(o,A(v),Se(({sizes:h},[d,C])=>({changed:C!==h,sizes:C}),{changed:!1,sizes:b}),y(h=>h.changed)));U(I(s,Se((h,d)=>({diff:h.prev-d,prev:d}),{diff:0,prev:0}),y(h=>h.diff)),h=>{const{groupIndices:d}=ee(v);if(h>0)W(t,!0),W(i,h+no(h,d));else if(h<0){const C=ee(g);C.length>0&&(h-=no(-h,C)),W(l,h)}}),U(I(s,A(e)),([h,d])=>{h<0&&d("`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},fe.ERROR)});const H=de(i);k(I(i,A(v),y(([h,d])=>{const C=d.groupIndices.length>0,z=[],L=d.lastSize;if(C){const E=Xe(d.sizeTree,0);let F=0,G=0;for(;F<h;){const N=d.groupIndices[G],K=d.groupIndices.length===G+1?1/0:d.groupIndices[G+1]-N-1;z.push({endIndex:N,size:E,startIndex:N}),z.push({endIndex:N+1+K-1,size:L,startIndex:N+1}),G++,F+=K+1}const Z=Fe(d.sizeTree);return F!==h&&Z.shift(),Z.reduce((N,{k:K,v:ae})=>{let he=N.ranges;return N.prevSize!==0&&(he=[...N.ranges,{endIndex:K+h-1,size:N.prevSize,startIndex:N.prevIndex}]),{prevIndex:K+h,prevSize:ae,ranges:he}},{prevIndex:h,prevSize:0,ranges:z}).ranges}return Fe(d.sizeTree).reduce((E,{k:F,v:G})=>({prevIndex:F+h,prevSize:G,ranges:[...E.ranges,{endIndex:F+h-1,size:E.prevSize,startIndex:E.prevIndex}]}),{prevIndex:0,prevSize:L,ranges:[]}).ranges})),o);const R=de(I(l,A(v,x),y(([h,{offsetTree:d},C])=>{const z=-h;return Qe(z,d,C)})));return k(I(l,A(v,x),y(([h,d,C])=>{if(d.groupIndices.length>0){if(q(d.sizeTree))return d;let z=Ge();const L=ee(g);let E=0,F=0,G=0;for(;E<-h;){G=L[F];const Z=L[F+1]-G-1;F++,E+=Z+1}if(z=Fe(d.sizeTree).reduce((Z,{k:N,v:K})=>ue(Z,Math.max(0,N+h),K),z),E!==-h){const Z=Xe(d.sizeTree,G);z=ue(z,0,Z);const N=Te(d.sizeTree,-h+1)[1];z=ue(z,1,N)}return{...d,sizeTree:z,...Lt(d.offsetTree,0,z,C)}}else{const z=Fe(d.sizeTree).reduce((L,{k:E,v:F})=>ue(L,Math.max(0,E+h),F),Ge());return{...d,sizeTree:z,...Lt(d.offsetTree,0,z,C)}}})),v),{beforeUnshiftWith:H,data:p,defaultItemSize:m,firstItemIndex:s,fixedItemSize:a,gap:x,groupIndices:c,itemSize:T,listRefresh:u,shiftWith:l,shiftWithOffset:R,sizeRanges:o,sizes:v,statefulTotalCount:r,totalCount:n,trackItemSizes:f,unshiftWith:i}},Y(ke,Wt),{singleton:!0});function yn(e){return e.reduce((t,o)=>(t.groupIndices.push(t.totalCount),t.totalCount+=o+1,t),{groupIndices:[],totalCount:0})}const jo=_(([{groupIndices:e,sizes:t,totalCount:o},{headerHeight:n,scrollTop:r}])=>{const i=D(),l=D(),s=de(I(i,y(yn)));return k(I(s,y(c=>c.totalCount)),o),k(I(s,y(c=>c.groupIndices)),e),k(I(te(r,t,n),O(([c,a])=>wt(a)),y(([c,a,m])=>Te(a.groupOffsetTree,Math.max(c-m,0),"v")[0]),$(),y(c=>[c])),l),{groupCounts:i,topItemsIndexes:l}},Y(be,se)),je=_(([{log:e}])=>{const t=w(!1),o=de(I(t,O(n=>n),$()));return U(t,n=>{n&&ee(e)("props updated",{},fe.DEBUG)}),{didMount:o,propsReady:t}},Y(ke),{singleton:!0}),zn=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Lo(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!zn)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ot=_(([{gap:e,listRefresh:t,sizes:o,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,footerHeight:l,headerHeight:s,scrollingInProgress:c,scrollTo:a,smoothScrollTargetReached:m,viewportHeight:T},{log:p}])=>{const x=D(),b=D(),v=w(0);let g=null,f=null,u=null;function H(){g&&(g(),g=null),u&&(u(),u=null),f&&(clearTimeout(f),f=null),W(c,!1)}return k(I(x,A(o,T,n,v,s,l,p),A(e,i,r),y(([[R,h,d,C,z,L,E,F],G,Z,N])=>{const K=Lo(R),{align:ae,behavior:he,offset:ge}=K,pe=C-1,ce=ko(K,h,pe);let le=Qe(ce,h.offsetTree,G)+L;ae==="end"?(le+=Z+Te(h.sizeTree,ce)[1]-d+N,ce===pe&&(le+=E)):ae==="center"?le+=(Z+Te(h.sizeTree,ce)[1]-d+N)/2:le-=z,ge&&(le+=ge);const Le=xe=>{H(),xe?(F("retrying to scroll to",{location:R},fe.DEBUG),W(x,R)):(W(b,!0),F("list did not change, scroll successful",{},fe.DEBUG))};if(H(),he==="smooth"){let xe=!1;u=U(t,Ue=>{xe=xe||Ue}),g=ve(m,()=>{Le(xe)})}else g=ve(I(t,Rn(150)),Le);return f=setTimeout(()=>{H()},1200),W(c,!0),F("scrolling from index to",{behavior:he,index:ce,top:le},fe.DEBUG),{behavior:he,top:le}})),a),{scrollTargetReached:b,scrollToIndex:x,topListHeight:v}},Y(be,se,ke),{singleton:!0});function Rn(e){return t=>{const o=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(o))}}}function Vt(e,t){e==0?t():requestAnimationFrame(()=>{Vt(e-1,t)})}function Dt(e,t){const o=t-1;return typeof e=="number"?e:e.index==="LAST"?o:e.index}const nt=_(([{defaultItemSize:e,listRefresh:t,sizes:o},{scrollTop:n},{scrollTargetReached:r,scrollToIndex:i},{didMount:l}])=>{const s=w(!0),c=w(0),a=w(!0);return k(I(l,A(c),O(([m,T])=>!!T),Ce(!1)),s),k(I(l,A(c),O(([m,T])=>!!T),Ce(!1)),a),U(I(te(t,l),A(s,o,e,a),O(([[,m],T,{sizeTree:p},x,b])=>m&&(!q(p)||Ot(x))&&!T&&!b),A(c)),([,m])=>{ve(r,()=>{W(a,!0)}),Vt(4,()=>{ve(n,()=>{W(s,!0)}),W(i,m)})}),{initialItemFinalLocationReached:a,initialTopMostItemIndex:c,scrolledToInitialItem:s}},Y(be,se,ot,je),{singleton:!0});function Mo(e,t){return Math.abs(e-t)<1.01}const et="up",$e="down",En="none",Bn={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},kn=0,rt=_(([{footerHeight:e,headerHeight:t,scrollBy:o,scrollContainerState:n,scrollTop:r,viewportHeight:i}])=>{const l=w(!1),s=w(!0),c=D(),a=D(),m=w(4),T=w(kn),p=ie(I(Et(I(M(r),Pe(1),Ce(!0)),I(M(r),Pe(1),Ce(!1),to(100))),$()),!1),x=ie(I(Et(I(o,Ce(!0)),I(o,Ce(!1),to(200))),$()),!1);k(I(te(M(r),M(T)),y(([u,H])=>u<=H),$()),s),k(I(s,ye(50)),a);const b=de(I(te(n,M(i),M(t),M(e),M(m)),Se((u,[{scrollHeight:H,scrollTop:R},h,d,C,z])=>{const L=R+h-H>-z,E={scrollHeight:H,scrollTop:R,viewportHeight:h};if(L){let G,Z;return R>u.state.scrollTop?(G="SCROLLED_DOWN",Z=u.state.scrollTop-R):(G="SIZE_DECREASED",Z=u.state.scrollTop-R||u.scrollTopDelta),{atBottom:!0,atBottomBecause:G,scrollTopDelta:Z,state:E}}let F;return E.scrollHeight>u.state.scrollHeight?F="SIZE_INCREASED":h<u.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":R<u.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:E}},Bn),$((u,H)=>u&&u.atBottom===H.atBottom))),v=ie(I(n,Se((u,{scrollHeight:H,scrollTop:R,viewportHeight:h})=>{if(Mo(u.scrollHeight,H))return{changed:!1,jump:0,scrollHeight:H,scrollTop:R};{const d=H-(R+h)<1;return u.scrollTop!==R&&d?{changed:!0,jump:u.scrollTop-R,scrollHeight:H,scrollTop:R}:{changed:!0,jump:0,scrollHeight:H,scrollTop:R}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),O(u=>u.changed),y(u=>u.jump)),0);k(I(b,y(u=>u.atBottom)),l),k(I(l,ye(50)),c);const g=w($e);k(I(n,y(({scrollTop:u})=>u),$(),Se((u,H)=>ee(x)?{direction:u.direction,prevScrollTop:H}:{direction:H<u.prevScrollTop?et:$e,prevScrollTop:H},{direction:$e,prevScrollTop:0}),y(u=>u.direction)),g),k(I(n,ye(50),Ce(En)),g);const f=w(0);return k(I(p,O(u=>!u),Ce(0)),f),k(I(r,ye(100),A(p),O(([u,H])=>!!H),Se(([u,H],[R])=>[H,R],[0,0]),y(([u,H])=>H-u)),f),{atBottomState:b,atBottomStateChange:c,atBottomThreshold:m,atTopStateChange:a,atTopThreshold:T,isAtBottom:l,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:v,scrollDirection:g,scrollVelocity:f}},Y(se)),gt="top",pt="bottom",ro="none";function io(e,t,o){return typeof e=="number"?o===et&&t===gt||o===$e&&t===pt?e:0:o===et?t===gt?e.main:e.reverse:t===pt?e.main:e.reverse}function lo(e,t){var o;return typeof e=="number"?e:(o=e[t])!=null?o:0}const Nt=_(([{deviation:e,fixedHeaderHeight:t,headerHeight:o,scrollTop:n,viewportHeight:r}])=>{const i=D(),l=w(0),s=w(0),c=w(0),a=ie(I(te(M(n),M(r),M(o),M(i,Je),M(c),M(l),M(t),M(e),M(s)),y(([m,T,p,[x,b],v,g,f,u,H])=>{const R=m-u,h=g+f,d=Math.max(p-R,0);let C=ro;const z=lo(H,gt),L=lo(H,pt);return x-=u,x+=p+f,b+=p+f,b-=u,x>m+h-z&&(C=et),b<m-d+T+L&&(C=$e),C!==ro?[Math.max(R-p-io(v,gt,C)-z,0),R-d-f+T+io(v,pt,C)+L]:null}),O(m=>m!=null),$(Je)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:c,topListHeight:l,visibleRange:a}},Y(se),{singleton:!0});function jn(e,t,o){if(wt(t)){const n=Bo(e,t);return[{index:Te(t.groupOffsetTree,n)[0],offset:0,size:0},{data:o?.[0],index:n,offset:0,size:0}]}return[{data:o?.[0],index:e,offset:0,size:0}]}const Ht={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ft(e,t,o,n,r,i){const{lastIndex:l,lastOffset:s,lastSize:c}=r;let a=0,m=0;if(e.length>0){a=e[0].offset;const v=e[e.length-1];m=v.offset+v.size}const T=o-l,p=s+T*c+(T-1)*n,x=a,b=p-m;return{bottom:m,firstItemIndex:i,items:so(e,r,i),offsetBottom:b,offsetTop:a,top:x,topItems:so(t,r,i),topListHeight:t.reduce((v,g)=>g.size+v,0),totalCount:o}}function Oo(e,t,o,n,r,i){let l=0;if(o.groupIndices.length>0)for(const m of o.groupIndices){if(m-l>=e)break;l++}const s=e+l,c=Dt(t,s),a=Array.from({length:s}).map((m,T)=>({data:i[T+c],index:T+c,offset:0,size:0}));return ft(a,[],s,r,o,n)}function so(e,t,o){if(e.length===0)return[];if(!wt(t))return e.map(a=>({...a,index:a.index+o,originalIndex:a.index}));const n=e[0].index,r=e[e.length-1].index,i=[],l=Tt(t.groupOffsetTree,n,r);let s,c=0;for(const a of e){(!s||s.end<a.index)&&(s=l.shift(),c=t.groupIndices.indexOf(s.start));let m;a.index===s.start?m={index:c,type:"group"}:m={groupIndex:c,index:a.index-(c+1)+o},i.push({...m,data:a.data,offset:a.offset,originalIndex:a.index,size:a.size})}return i}const Ae=_(([{data:e,firstItemIndex:t,gap:o,sizes:n,totalCount:r},i,{listBoundary:l,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:a,scrolledToInitialItem:m},{topListHeight:T},p,{didMount:x},{recalcInProgress:b}])=>{const v=w([]),g=w(0),f=D();k(i.topItemsIndexes,v);const u=ie(I(te(x,b,M(c,Je),M(r),M(n),M(a),m,M(v),M(t),M(o),e),O(([d,C,,z,,,,,,,L])=>{const E=L&&L.length!==z;return d&&!C&&!E}),y(([,,[d,C],z,L,E,F,G,Z,N,K])=>{const ae=L,{offsetTree:he,sizeTree:ge}=ae,pe=ee(g);if(z===0)return{...Ht,totalCount:z};if(d===0&&C===0)return pe===0?{...Ht,totalCount:z}:Oo(pe,E,L,Z,N,K||[]);if(q(ge))return pe>0?null:ft(jn(Dt(E,z),ae,K),[],z,N,ae,Z);const ce=[];if(G.length>0){const Ve=G[0],we=G[G.length-1];let He=0;for(const S of Tt(ge,Ve,we)){const V=S.value,X=Math.max(S.start,Ve),ne=Math.min(S.end,we);for(let Q=X;Q<=ne;Q++)ce.push({data:K?.[Q],index:Q,offset:He,size:V}),He+=V}}if(!F)return ft([],ce,z,N,ae,Z);const le=G.length>0?G[G.length-1]+1:0,Le=Tn(he,d,C,le);if(Le.length===0)return null;const xe=z-1,Ue=It([],Ve=>{for(const we of Le){const He=we.value;let S=He.offset,V=we.start;const X=He.size;if(He.offset<d){V+=Math.floor((d-He.offset+N)/(X+N));const Q=V-we.start;S+=Q*X+Q*N}V<le&&(S+=(le-V)*X,V=le);const ne=Math.min(we.end,xe);for(let Q=V;Q<=ne&&!(S>=C);Q++)Ve.push({data:K?.[Q],index:Q,offset:S,size:X}),S+=X+N}});return ft(Ue,ce,z,N,ae,Z)}),O(d=>d!==null),$()),Ht);k(I(e,O(Ot),y(d=>d?.length)),r),k(I(u,y(d=>d.topListHeight)),T),k(T,s),k(I(u,y(d=>[d.top,d.bottom])),l),k(I(u,y(d=>d.items)),f);const H=de(I(u,O(({items:d})=>d.length>0),A(r,e),O(([{items:d},C])=>d[d.length-1].originalIndex===C-1),y(([,d,C])=>[d-1,C]),$(Je),y(([d])=>d))),R=de(I(u,ye(200),O(({items:d,topItems:C})=>d.length>0&&d[0].originalIndex===C.length),y(({items:d})=>d[0].index),$())),h=de(I(u,O(({items:d})=>d.length>0),y(({items:d})=>{let C=0,z=d.length-1;for(;d[C].type==="group"&&C<z;)C++;for(;d[z].type==="group"&&z>C;)z--;return{endIndex:d[z].index,startIndex:d[C].index}}),$(Ro)));return{endReached:H,initialItemCount:g,itemsRendered:f,listState:u,rangeChanged:h,startReached:R,topItemsIndexes:v,...p}},Y(be,jo,Nt,nt,ot,rt,je,Wt),{singleton:!0}),Fo=_(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:o,headerHeight:n},{listState:r}])=>{const i=D(),l=ie(I(te(o,e,n,t,r),y(([s,c,a,m,T])=>s+c+a+m+T.offsetBottom+T.bottom)),0);return k(M(l),i),{totalListHeight:l,totalListHeightChanged:i}},Y(se,Ae),{singleton:!0}),Ln=_(([{viewportHeight:e},{totalListHeight:t}])=>{const o=w(!1),n=ie(I(te(o,e,t),O(([r])=>r),y(([,r,i])=>Math.max(0,r-i)),ye(0),$()),0);return{alignToBottom:o,paddingTopAddition:n}},Y(se,Fo),{singleton:!0}),Po=_(()=>({context:w(null)})),Mn=({itemBottom:e,itemTop:t,locationParams:{align:o,behavior:n,...r},viewportBottom:i,viewportTop:l})=>t<l?{...r,align:o??"start",behavior:n}:e>i?{...r,align:o??"end",behavior:n}:null,Wo=_(([{gap:e,sizes:t,totalCount:o},{fixedFooterHeight:n,fixedHeaderHeight:r,headerHeight:i,scrollingInProgress:l,scrollTop:s,viewportHeight:c},{scrollToIndex:a}])=>{const m=D();return k(I(m,A(t,c,o,i,r,n,s),A(e),y(([[T,p,x,b,v,g,f,u],H])=>{const{align:R,behavior:h,calculateViewLocation:d=Mn,done:C,...z}=T,L=ko(T,p,b-1),E=Qe(L,p.offsetTree,H)+v+g,F=E+Te(p.sizeTree,L)[1],G=u+g,Z=u+x-f,N=d({itemBottom:F,itemTop:E,locationParams:{align:R,behavior:h,...z},viewportBottom:Z,viewportTop:G});return N?C&&ve(I(l,O(K=>!K),Pe(ee(l)?1:2)),C):C&&C(),N}),O(T=>T!==null)),a),{scrollIntoView:m}},Y(be,se,ot,Ae,ke),{singleton:!0});function co(e){return e?e==="smooth"?"smooth":"auto":!1}const On=(e,t)=>typeof e=="function"?co(e(t)):t&&co(e),Fn=_(([{listRefresh:e,totalCount:t,fixedItemSize:o,data:n},{atBottomState:r,isAtBottom:i},{scrollToIndex:l},{scrolledToInitialItem:s},{didMount:c,propsReady:a},{log:m},{scrollingInProgress:T},{context:p},{scrollIntoView:x}])=>{const b=w(!1),v=D();let g=null;function f(h){W(l,{align:"end",behavior:h,index:"LAST"})}U(I(te(I(M(t),Pe(1)),c),A(M(b),i,s,T),y(([[h,d],C,z,L,E])=>{let F=d&&L,G="auto";return F&&(G=On(C,z||E),F=F&&!!G),{followOutputBehavior:G,shouldFollow:F,totalCount:h}}),O(({shouldFollow:h})=>h)),({followOutputBehavior:h,totalCount:d})=>{g&&(g(),g=null),ee(o)?requestAnimationFrame(()=>{ee(m)("following output to ",{totalCount:d},fe.DEBUG),f(h)}):g=ve(e,()=>{ee(m)("following output to ",{totalCount:d},fe.DEBUG),f(h),g=null})});function u(h){const d=ve(r,C=>{h&&!C.atBottom&&C.notAtBottomBecause==="SIZE_INCREASED"&&!g&&(ee(m)("scrolling to bottom due to increased size",{},fe.DEBUG),f("auto"))});setTimeout(d,100)}U(I(te(M(b),t,a),O(([h,,d])=>h&&d),Se(({value:h},[,d])=>({refreshed:h===d,value:d}),{refreshed:!1,value:0}),O(({refreshed:h})=>h),A(b,t)),([,h])=>{ee(s)&&u(h!==!1)}),U(v,()=>{u(ee(b)!==!1)}),U(te(M(b),r),([h,d])=>{h&&!d.atBottom&&d.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")});const H=w(null),R=D();return k(Et(I(M(n),y(h=>{var d;return(d=h?.length)!=null?d:0})),I(M(t))),R),U(I(te(I(R,Pe(1)),c),A(M(H),s,T,p),y(([[h,d],C,z,L,E])=>d&&z&&C?.({context:E,totalCount:h,scrollingInProgress:L})),O(h=>!!h),ye(0)),h=>{g&&(g(),g=null),ee(o)?requestAnimationFrame(()=>{ee(m)("scrolling into view",{}),W(x,h)}):g=ve(e,()=>{ee(m)("scrolling into view",{}),W(x,h),g=null})}),{autoscrollToBottom:v,followOutput:b,scrollIntoViewOnChange:H}},Y(be,rt,ot,nt,je,ke,se,Po,Wo)),Pn=_(([{data:e,firstItemIndex:t,gap:o,sizes:n},{initialTopMostItemIndex:r},{initialItemCount:i,listState:l},{didMount:s}])=>(k(I(s,A(i),O(([,c])=>c!==0),A(r,n,t,o,e),y(([[,c],a,m,T,p,x=[]])=>Oo(c,a,m,T,p,x))),l),{}),Y(be,nt,Ae,je),{singleton:!0}),Wn=_(([{didMount:e},{scrollTo:t},{listState:o}])=>{const n=w(0);return U(I(e,A(n),O(([,r])=>r!==0),y(([,r])=>({top:r}))),r=>{ve(I(o,Pe(1),O(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{W(t,r)})})}),{initialScrollTop:n}},Y(je,se,Ae),{singleton:!0}),Ao=_(([{scrollVelocity:e}])=>{const t=w(!1),o=D(),n=w(!1);return k(I(e,A(n,t,o),O(([r,i])=>!!i),y(([r,i,l,s])=>{const{enter:c,exit:a}=i;if(l){if(a(r,s))return!1}else if(c(r,s))return!0;return l}),$()),t),U(I(te(t,e,o),A(n)),([[r,i,l],s])=>{r&&s&&s.change&&s.change(i,l)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:o,scrollVelocity:e}},Y(rt),{singleton:!0}),Gt=_(([{scrollContainerState:e,scrollTo:t}])=>{const o=D(),n=D(),r=D(),i=w(!1),l=w(void 0);return k(I(te(o,n),y(([{scrollHeight:s,scrollTop:c,viewportHeight:a},{offsetTop:m}])=>({scrollHeight:s,scrollTop:Math.max(0,c-m),viewportHeight:a}))),e),k(I(t,A(n),y(([s,{offsetTop:c}])=>({...s,top:s.top+c}))),r),{customScrollParent:l,useWindowScroll:i,windowScrollContainerState:o,windowScrollTo:r,windowViewportRect:n}},Y(se)),An=_(([{sizeRanges:e,sizes:t},{headerHeight:o,scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:l,windowScrollContainerState:s,windowViewportRect:c}])=>{const a=D(),m=w(void 0),T=w(null),p=w(null);return k(s,T),k(c,p),U(I(a,A(t,n,l,T,p,o)),([x,b,v,g,f,u,H])=>{const R=Cn(b.sizeTree);g&&f!==null&&u!==null&&(v=f.scrollTop-u.offsetTop),v-=H,x({ranges:R,scrollTop:v})}),k(I(m,O(Ot),y(Vn)),r),k(I(i,A(m),O(([,x])=>x!==void 0),$(),y(([,x])=>x.ranges)),e),{getState:a,restoreStateFrom:m}},Y(be,se,nt,je,Gt));function Vn(e){return{align:"start",index:0,offset:e.scrollTop}}const Dn=_(([{topItemsIndexes:e}])=>{const t=w(0);return k(I(t,O(o=>o>=0),y(o=>Array.from({length:o}).map((n,r)=>r))),e),{topItemCount:t}},Y(Ae));function Vo(e){let t=!1,o;return()=>(t||(t=!0,o=e()),o)}const Nn=Vo(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Gn=_(([{deviation:e,scrollBy:t,scrollingInProgress:o,scrollTop:n},{isAtBottom:r,isScrolling:i,lastJumpDueToItemResize:l,scrollDirection:s},{listState:c},{beforeUnshiftWith:a,gap:m,shiftWithOffset:T,sizes:p},{log:x},{recalcInProgress:b}])=>{const v=de(I(c,A(l),Se(([,f,u,H],[{bottom:R,items:h,offsetBottom:d,totalCount:C},z])=>{const L=R+d;let E=0;return u===C&&f.length>0&&h.length>0&&(h[0].originalIndex===0&&f[0].originalIndex===0||(E=L-H,E!==0&&(E+=z))),[E,h,C,L]},[0,[],0,0]),O(([f])=>f!==0),A(n,s,o,r,x,b),O(([,f,u,H,,,R])=>!R&&!H&&f!==0&&u===et),y(([[f],,,,,u])=>(u("Upward scrolling compensation",{amount:f},fe.DEBUG),f))));function g(f){f>0?(W(t,{behavior:"auto",top:-f}),W(e,0)):(W(e,0),W(t,{behavior:"auto",top:-f}))}return U(I(v,A(e,i)),([f,u,H])=>{H&&Nn()?W(e,u-f):g(-f)}),U(I(te(ie(i,!1),e,b),O(([f,u,H])=>!f&&!H&&u!==0),y(([f,u])=>u),ye(1)),g),k(I(T,y(f=>({top:-f}))),t),U(I(a,A(p,m),y(([f,{groupIndices:u,lastSize:H,sizeTree:R},h])=>{function d(C){return C*(H+h)}if(u.length===0)return d(f);{let C=0;const z=Xe(R,0);let L=0,E=0;for(;L<f;){L++,C+=z;let F=u.length===E+1?1/0:u[E+1]-u[E]-1;L+F>f&&(C-=z,F=f-L+1),L+=F,C+=d(F),E++}return C}})),f=>{W(e,f),requestAnimationFrame(()=>{W(t,{top:f}),requestAnimationFrame(()=>{W(e,0),W(b,!1)})})}),{deviation:e}},Y(se,rt,Ae,be,ke,Wt)),_n=_(([e,t,o,n,r,i,l,s,c,a,m])=>({...e,...t,...o,...n,...r,...i,...l,...s,...c,...a,...m}),Y(Nt,Pn,je,Ao,Fo,Wn,Ln,Gt,Wo,ke,Po)),Do=_(([{data:e,defaultItemSize:t,firstItemIndex:o,fixedItemSize:n,gap:r,groupIndices:i,itemSize:l,sizeRanges:s,sizes:c,statefulTotalCount:a,totalCount:m,trackItemSizes:T},{initialItemFinalLocationReached:p,initialTopMostItemIndex:x,scrolledToInitialItem:b},v,g,f,{listState:u,topItemsIndexes:H,...R},{scrollToIndex:h},d,{topItemCount:C},{groupCounts:z},L])=>(k(R.rangeChanged,L.scrollSeekRangeChanged),k(I(L.windowViewportRect,y(E=>E.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:o,fixedItemHeight:n,gap:r,groupCounts:z,initialItemFinalLocationReached:p,initialTopMostItemIndex:x,scrolledToInitialItem:b,sizeRanges:s,topItemCount:C,topItemsIndexes:H,totalCount:m,...f,groupIndices:i,itemSize:l,listState:u,scrollToIndex:h,statefulTotalCount:a,trackItemSizes:T,...R,...L,...v,sizes:c,...g}),Y(be,nt,se,An,Fn,Ae,ot,Gn,Dn,jo,_n));function Un(e,t){const o={},n={};let r=0;const i=e.length;for(;r<i;)n[e[r]]=1,r+=1;for(const l in t)Object.hasOwn(n,l)||(o[l]=t[l]);return o}const ct=typeof document<"u"?B.useLayoutEffect:B.useEffect;function No(e,t,o){const n=Object.keys(t.required||{}),r=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),l=Object.keys(t.events||{}),s=B.createContext({});function c(g,f){g.propsReady&&W(g.propsReady,!1);for(const u of n){const H=g[t.required[u]];W(H,f[u])}for(const u of r)if(u in f){const H=g[t.optional[u]];W(H,f[u])}g.propsReady&&W(g.propsReady,!0)}function a(g){return i.reduce((f,u)=>(f[u]=H=>{const R=g[t.methods[u]];W(R,H)},f),{})}function m(g){return l.reduce((f,u)=>(f[u]=sn(g[t.events[u]]),f),{})}const T=B.forwardRef((g,f)=>{const{children:u,...H}=g,[R]=B.useState(()=>It(an(e),C=>{c(C,H)})),[h]=B.useState(eo(m,R));ct(()=>{for(const C of l)C in H&&U(h[C],H[C]);return()=>{Object.values(h).map(Ft)}},[H,h,R]),ct(()=>{c(R,H)}),B.useImperativeHandle(f,Qt(a(R)));const d=o;return j.jsx(s.Provider,{value:R,children:o?j.jsx(d,{...Un([...n,...r,...l],H),children:u}):u})}),p=g=>{const f=B.useContext(s);return B.useCallback(u=>{W(f[g],u)},[f,g])},x=g=>{const f=B.useContext(s)[g],u=B.useCallback(H=>U(f,H),[f]);return B.useSyncExternalStore(u,()=>ee(f),()=>ee(f))},b=g=>{const f=B.useContext(s)[g],[u,H]=B.useState(eo(ee,f));return ct(()=>U(f,R=>{R!==u&&H(Qt(R))}),[f,u]),u},v=B.version.startsWith("18")?x:b;return{Component:T,useEmitter:(g,f)=>{const u=B.useContext(s)[g];ct(()=>U(u,f),[f,u])},useEmitterValue:v,usePublisher:p}}const Go=B.createContext(void 0),_o=B.createContext(void 0),Uo=typeof document<"u"?B.useLayoutEffect:B.useEffect;function yt(e){return"self"in e}function qn(e){return"body"in e}function qo(e,t,o,n=tt,r,i){const l=B.useRef(null),s=B.useRef(null),c=B.useRef(null),a=B.useCallback(p=>{let x,b,v;const g=p.target;if(qn(g)||yt(g)){const u=yt(g)?g:g.defaultView;v=i?u.scrollX:u.scrollY,x=i?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight,b=i?u.innerWidth:u.innerHeight}else v=i?g.scrollLeft:g.scrollTop,x=i?g.scrollWidth:g.scrollHeight,b=i?g.offsetWidth:g.offsetHeight;const f=()=>{e({scrollHeight:x,scrollTop:Math.max(v,0),viewportHeight:b})};p.suppressFlushSync?f():Qo.flushSync(f),s.current!==null&&(v===s.current||v<=0||v===x-b)&&(s.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,i]);B.useEffect(()=>{const p=r||l.current;return n(r||l.current),a({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",a,{passive:!0}),()=>{n(null),p.removeEventListener("scroll",a)}},[l,a,o,n,r]);function m(p){const x=l.current;if(!x||(i?"offsetWidth"in x&&x.offsetWidth===0:"offsetHeight"in x&&x.offsetHeight===0))return;const b=p.behavior==="smooth";let v,g,f;yt(x)?(g=Math.max(Ee(x.document.documentElement,i?"width":"height"),i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight),v=i?x.innerWidth:x.innerHeight,f=i?window.scrollX:window.scrollY):(g=x[i?"scrollWidth":"scrollHeight"],v=Ee(x,i?"width":"height"),f=x[i?"scrollLeft":"scrollTop"]);const u=g-v;if(p.top=Math.ceil(Math.max(Math.min(u,p.top),0)),Mo(v,g)||p.top===f){e({scrollHeight:g,scrollTop:f,viewportHeight:v}),b&&t(!0);return}b?(s.current=p.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),x.scrollTo(p)}function T(p){i&&(p={behavior:p.behavior,left:p.top}),l.current.scrollBy(p)}return{scrollByCallback:T,scrollerRef:l,scrollToCallback:m}}const zt="-webkit-sticky",ao="sticky",_t=Vo(()=>{if(typeof document>"u")return ao;const e=document.createElement("div");return e.style.position=zt,e.style.position===zt?zt:ao});function Ut(e){return e}const Kn=_(()=>{const e=w(s=>`Item ${s}`),t=w(s=>`Group ${s}`),o=w({}),n=w(Ut),r=w("div"),i=w(tt),l=(s,c=null)=>ie(I(o,y(a=>a[s]),$()),c);return{components:o,computeItemKey:n,EmptyPlaceholder:l("EmptyPlaceholder"),FooterComponent:l("Footer"),GroupComponent:l("Group","div"),groupContent:t,HeaderComponent:l("Header"),HeaderFooterTag:r,ItemComponent:l("Item","div"),itemContent:e,ListComponent:l("List","div"),ScrollerComponent:l("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TopItemListComponent:l("TopItemList")}});Y(Do,Kn);_t();const $n={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Yn={outline:"none",overflowX:"auto",position:"relative"},Ct=e=>({height:"100%",position:"absolute",top:0,width:"100%"});_t();function re(e,t){if(typeof e!="string")return{context:t}}function Zn(e,t){return{item:typeof e=="string"?void 0:t}}function Ko({useEmitter:e,useEmitterValue:t,usePublisher:o}){return B.memo(function({children:n,style:r,context:i,...l}){const s=o("scrollContainerState"),c=t("ScrollerComponent"),a=o("smoothScrollTargetReached"),m=t("scrollerRef"),T=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:x,scrollToCallback:b}=qo(s,a,c,m,void 0,T);return e("scrollTo",b),e("scrollBy",p),j.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:x,style:{...T?Yn:$n,...r},tabIndex:0,...l,...re(c,i),children:n})})}function $o({useEmitter:e,useEmitterValue:t,usePublisher:o}){return B.memo(function({children:n,style:r,context:i,...l}){const s=o("windowScrollContainerState"),c=t("ScrollerComponent"),a=o("smoothScrollTargetReached"),m=t("totalListHeight"),T=t("deviation"),p=t("customScrollParent"),x=B.useRef(null),b=t("scrollerRef"),{scrollByCallback:v,scrollerRef:g,scrollToCallback:f}=qo(s,a,c,b,p);return Uo(()=>{var u;return g.current=p||((u=x.current)==null?void 0:u.ownerDocument.defaultView),()=>{g.current=null}},[g,p]),e("windowScrollTo",f),e("scrollBy",v),j.jsx(c,{ref:x,"data-virtuoso-scroller":!0,style:{position:"relative",...r,...m!==0?{height:m+T}:{}},...l,...re(c,i),children:n})})}const Xn=_(()=>{const e=w(a=>j.jsxs("td",{children:["Item $",a]})),t=w(null),o=w(a=>j.jsxs("td",{colSpan:1e3,children:["Group ",a]})),n=w(null),r=w(null),i=w({}),l=w(Ut),s=w(tt),c=(a,m=null)=>ie(I(i,y(T=>T[a]),$()),m);return{components:i,computeItemKey:l,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,groupContent:o,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}}),Jn=_(([e,t])=>({...e,...t}),Y(Do,Xn)),Qn=({height:e})=>j.jsx("tr",{children:j.jsx("td",{style:{height:e}})}),er=({height:e})=>j.jsx("tr",{children:j.jsx("td",{style:{border:0,height:e,padding:0}})}),tr={overflowAnchor:"none"},uo={position:_t(),zIndex:2,overflowAnchor:"none"},fo=B.memo(function({showTopList:e=!1}){const t=P("listState"),o=P("computeItemKey"),n=P("firstItemIndex"),r=P("context"),i=P("isSeeking"),l=P("fixedHeaderHeight"),s=P("groupIndices").length>0,c=P("itemContent"),a=P("groupContent"),m=P("ScrollSeekPlaceholder")||Qn,T=P("GroupComponent"),p=P("TableRowComponent"),x=(e?t.topItems:[]).reduce((v,g,f)=>(f===0?v.push(g.size):v.push(v[f-1]+g.size),v),[]),b=(e?t.topItems:t.items).map(v=>{const g=v.originalIndex,f=o(g+n,v.data,r),u=e?g===0?0:x[g-1]:0;return i?ut.createElement(m,{...re(m,r),height:v.size,index:v.index,key:f,type:v.type||"item"}):v.type==="group"?ut.createElement(T,{...re(T,r),"data-index":g,"data-item-index":v.index,"data-known-size":v.size,key:f,style:{...uo,top:l}},a(v.index,r)):ut.createElement(p,{...re(p,r),...Zn(p,v.data),"data-index":g,"data-item-index":v.index,"data-known-size":v.size,"data-item-group-index":v.groupIndex,key:f,style:e?{...uo,top:l+u}:tr},s?c(v.index,v.groupIndex,v.data,r):c(v.index,v.data,r))});return j.jsx(j.Fragment,{children:b})}),or=B.memo(function(){const e=P("listState"),t=P("topItemsIndexes").length>0,o=Ie("sizeRanges"),n=P("useWindowScroll"),r=P("customScrollParent"),i=Ie("windowScrollContainerState"),l=Ie("scrollContainerState"),s=r||n?i:l,c=P("trackItemSizes"),a=P("itemSize"),m=P("log"),{callbackRef:T,ref:p}=fn(o,a,c,s,m,void 0,r,!1,P("skipAnimationFrameInResizeObserver")),[x,b]=B.useState(0);qt("deviation",E=>{x!==E&&(p.current.style.marginTop=`${E}px`,b(E))});const v=P("EmptyPlaceholder"),g=P("FillerRow")||er,f=P("TableBodyComponent"),u=P("paddingTopAddition"),H=P("statefulTotalCount"),R=P("context");if(H===0&&v)return j.jsx(v,{...re(v,R)});const h=(t?e.topItems:[]).reduce((E,F)=>E+F.size,0),d=e.offsetTop+u+x-h,C=e.offsetBottom,z=d>0?j.jsx(g,{context:R,height:d},"padding-top"):null,L=C>0?j.jsx(g,{context:R,height:C},"padding-bottom"):null;return j.jsxs(f,{"data-testid":"virtuoso-item-list",ref:T,...re(f,R),children:[z,t&&j.jsx(fo,{showTopList:!0}),j.jsx(fo,{}),L]})}),nr=({children:e})=>{const t=B.useContext(Go),o=Ie("viewportHeight"),n=Ie("fixedItemHeight"),r=We(B.useMemo(()=>ht(o,i=>Ee(i,"height")),[o]),!0,P("skipAnimationFrameInResizeObserver"));return B.useEffect(()=>{t&&(o(t.viewportHeight),n(t.itemHeight))},[t,o,n]),j.jsx("div",{"data-viewport-type":"element",ref:r,style:Ct(),children:e})},rr=({children:e})=>{const t=B.useContext(Go),o=Ie("windowViewportRect"),n=Ie("fixedItemHeight"),r=P("customScrollParent"),i=Co(o,r,P("skipAnimationFrameInResizeObserver"));return B.useEffect(()=>{t&&(n(t.itemHeight),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,o,n]),j.jsx("div",{"data-viewport-type":"window",ref:i,style:Ct(),children:e})},ir=B.memo(function(e){const t=P("useWindowScroll"),o=P("customScrollParent"),n=Ie("fixedHeaderHeight"),r=Ie("fixedFooterHeight"),i=P("fixedHeaderContent"),l=P("fixedFooterContent"),s=P("context"),c=We(B.useMemo(()=>ht(n,f=>Ee(f,"height")),[n]),!0,P("skipAnimationFrameInResizeObserver")),a=We(B.useMemo(()=>ht(r,f=>Ee(f,"height")),[r]),!0,P("skipAnimationFrameInResizeObserver")),m=o||t?cr:sr,T=o||t?rr:nr,p=P("TableComponent"),x=P("TableHeadComponent"),b=P("TableFooterComponent"),v=i?j.jsx(x,{ref:c,style:{position:"sticky",top:0,zIndex:2},...re(x,s),children:i()},"TableHead"):null,g=l?j.jsx(b,{ref:a,style:{bottom:0,position:"sticky",zIndex:1},...re(b,s),children:l()},"TableFoot"):null;return j.jsx(m,{...e,...re(m,s),children:j.jsx(T,{children:j.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...re(p,s),children:[v,j.jsx(or,{},"TableBody"),g]})})})}),{Component:lr,useEmitter:qt,useEmitterValue:P,usePublisher:Ie}=No(Jn,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",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",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},ir),sr=Ko({useEmitter:qt,useEmitterValue:P,usePublisher:Ie}),cr=$o({useEmitter:qt,useEmitterValue:P,usePublisher:Ie}),ar=lr,ho={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},ur={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:mo,floor:xt,max:Ye,min:Rt,round:go}=Math;function po(e,t,o){return Array.from({length:t-e+1}).map((n,r)=>({data:o===null?null:o[r+e],index:r+e}))}function dr(e){return{...ur,items:e}}function at(e,t){return e&&e.width===t.width&&e.height===t.height}function fr(e,t){return e&&e.column===t.column&&e.row===t.row}const hr=_(([{increaseViewportBy:e,listBoundary:t,overscan:o,visibleRange:n},{footerHeight:r,headerHeight:i,scrollBy:l,scrollContainerState:s,scrollTo:c,scrollTop:a,smoothScrollTargetReached:m,viewportHeight:T},p,x,{didMount:b,propsReady:v},{customScrollParent:g,useWindowScroll:f,windowScrollContainerState:u,windowScrollTo:H,windowViewportRect:R},h])=>{const d=w(0),C=w(0),z=w(ho),L=w({height:0,width:0}),E=w({height:0,width:0}),F=D(),G=D(),Z=w(0),N=w(null),K=w({column:0,row:0}),ae=D(),he=D(),ge=w(!1),pe=w(0),ce=w(!0),le=w(!1),Le=w(!1);U(I(b,A(pe),O(([S,V])=>!!V)),()=>{W(ce,!1)}),U(I(te(b,ce,E,L,pe,le),O(([S,V,X,ne,,Q])=>S&&!V&&X.height!==0&&ne.height!==0&&!Q)),([,,,,S])=>{W(le,!0),Vt(1,()=>{W(F,S)}),ve(I(a),()=>{W(t,[0,0]),W(ce,!0)})}),k(I(he,O(S=>S!=null&&S.scrollTop>0),Ce(0)),C),U(I(b,A(he),O(([,S])=>S!=null)),([,S])=>{S&&(W(L,S.viewport),W(E,S.item),W(K,S.gap),S.scrollTop>0&&(W(ge,!0),ve(I(a,Pe(1)),V=>{W(ge,!1)}),W(c,{top:S.scrollTop})))}),k(I(L,y(({height:S})=>S)),T),k(I(te(M(L,at),M(E,at),M(K,(S,V)=>S&&S.column===V.column&&S.row===V.row),M(a)),y(([S,V,X,ne])=>({gap:X,item:V,scrollTop:ne,viewport:S}))),ae),k(I(te(M(d),n,M(K,fr),M(E,at),M(L,at),M(N),M(C),M(ge),M(ce),M(pe)),O(([,,,,,,,S])=>!S),y(([S,[V,X],ne,Q,Me,qe,De,,it,ze])=>{const{column:Re,row:Ke}=ne,{height:lt,width:St}=Q,{width:Kt}=Me;if(De===0&&(S===0||Kt===0))return ho;if(St===0){const Jt=Dt(ze,S),Jo=Jt+Math.max(De-1,0);return dr(po(Jt,Jo,qe))}const st=Yo(Kt,St,Re);let Ne,Oe;it?V===0&&X===0&&De>0?(Ne=0,Oe=De-1):(Ne=st*xt((V+Ke)/(lt+Ke)),Oe=st*mo((X+Ke)/(lt+Ke))-1,Oe=Rt(S-1,Ye(Oe,st-1)),Ne=Rt(Oe,Ye(0,Ne))):(Ne=0,Oe=-1);const $t=po(Ne,Oe,qe),{bottom:Yt,top:Zt}=xo(Me,ne,Q,$t),Xt=mo(S/st),Xo=Xt*lt+(Xt-1)*Ke-Yt;return{bottom:Yt,itemHeight:lt,items:$t,itemWidth:St,offsetBottom:Xo,offsetTop:Zt,top:Zt}})),z),k(I(N,O(S=>S!==null),y(S=>S.length)),d),k(I(te(L,E,z,K),O(([S,V,{items:X}])=>X.length>0&&V.height!==0&&S.height!==0),y(([S,V,{items:X},ne])=>{const{bottom:Q,top:Me}=xo(S,ne,V,X);return[Me,Q]}),$(Je)),t);const xe=w(!1);k(I(a,A(xe),y(([S,V])=>V||S!==0)),xe);const Ue=de(I(te(z,d),O(([{items:S}])=>S.length>0),A(xe),O(([[S,V],X])=>{const ne=S.items[S.items.length-1].index===V-1;return(X||S.bottom>0&&S.itemHeight>0&&S.offsetBottom===0&&S.items.length===V)&&ne}),y(([[,S]])=>S-1),$())),Ve=de(I(M(z),O(({items:S})=>S.length>0&&S[0].index===0),Ce(0),$())),we=de(I(M(z),A(ge),O(([{items:S},V])=>S.length>0&&!V),y(([{items:S}])=>({endIndex:S[S.length-1].index,startIndex:S[0].index})),$(Ro),ye(0)));k(we,x.scrollSeekRangeChanged),k(I(F,A(L,E,d,K),y(([S,V,X,ne,Q])=>{const Me=Lo(S),{align:qe,behavior:De,offset:it}=Me;let ze=Me.index;ze==="LAST"&&(ze=ne-1),ze=Ye(0,ze,Rt(ne-1,ze));let Re=Mt(V,Q,X,ze);return qe==="end"?Re=go(Re-V.height+X.height):qe==="center"&&(Re=go(Re-V.height/2+X.height/2)),it&&(Re+=it),{behavior:De,top:Re}})),c);const He=ie(I(z,y(S=>S.offsetBottom+S.bottom)),0);return k(I(R,y(S=>({height:S.visibleHeight,width:S.visibleWidth}))),L),{customScrollParent:g,data:N,deviation:Z,footerHeight:r,gap:K,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:E,overscan:o,restoreStateFrom:he,scrollBy:l,scrollContainerState:s,scrollHeight:G,scrollTo:c,scrollToIndex:F,scrollTop:a,smoothScrollTargetReached:m,totalCount:d,useWindowScroll:f,viewportDimensions:L,windowScrollContainerState:u,windowScrollTo:H,windowViewportRect:R,...x,gridState:z,horizontalDirection:Le,initialTopMostItemIndex:pe,totalListHeight:He,...p,endReached:Ue,propsReady:v,rangeChanged:we,startReached:Ve,stateChanged:ae,stateRestoreInProgress:ge,...h}},Y(Nt,se,rt,Ao,je,Gt,ke));function Yo(e,t,o){return Ye(1,xt((e+o)/(xt(t)+o)))}function xo(e,t,o,n){const{height:r}=o;if(r===void 0||n.length===0)return{bottom:0,top:0};const i=Mt(e,t,o,n[0].index);return{bottom:Mt(e,t,o,n[n.length-1].index)+r,top:i}}function Mt(e,t,o,n){const r=Yo(e.width,o.width,t.column),i=xt(n/r),l=i*o.height+Ye(0,i-1)*t.row;return l>0?l+t.row:l}const mr=_(()=>{const e=w(T=>`Item ${T}`),t=w({}),o=w(null),n=w("virtuoso-grid-item"),r=w("virtuoso-grid-list"),i=w(Ut),l=w("div"),s=w(tt),c=(T,p=null)=>ie(I(t,y(x=>x[T]),$()),p),a=w(!1),m=w(!1);return k(M(m),a),{components:t,computeItemKey:i,context:o,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:l,itemClassName:n,ItemComponent:c("Item","div"),itemContent:e,listClassName:r,ListComponent:c("List","div"),readyStateChanged:a,reportReadyState:m,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),gr=_(([e,t])=>({...e,...t}),Y(hr,mr)),pr=B.memo(function(){const e=J("gridState"),t=J("listClassName"),o=J("itemClassName"),n=J("itemContent"),r=J("computeItemKey"),i=J("isSeeking"),l=me("scrollHeight"),s=J("ItemComponent"),c=J("ListComponent"),a=J("ScrollSeekPlaceholder"),m=J("context"),T=me("itemDimensions"),p=me("gap"),x=J("log"),b=J("stateRestoreInProgress"),v=me("reportReadyState"),g=We(B.useMemo(()=>f=>{const u=f.parentElement.parentElement.scrollHeight;l(u);const H=f.firstChild;if(H){const{height:R,width:h}=H.getBoundingClientRect();T({height:R,width:h})}p({column:vo("column-gap",getComputedStyle(f).columnGap,x),row:vo("row-gap",getComputedStyle(f).rowGap,x)})},[l,T,p,x]),!0,!1);return Uo(()=>{e.itemHeight>0&&e.itemWidth>0&&v(!0)},[e]),b?null:j.jsx(c,{className:t,ref:g,...re(c,m),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(f=>{const u=r(f.index,f.data,m);return i?j.jsx(a,{...re(a,m),height:e.itemHeight,index:f.index,width:e.itemWidth},u):ut.createElement(s,{...re(s,m),className:o,"data-index":f.index,key:u},n(f.index,f.data,m))})})}),xr=B.memo(function(){const e=J("HeaderComponent"),t=me("headerHeight"),o=J("headerFooterTag"),n=We(B.useMemo(()=>i=>{t(Ee(i,"height"))},[t]),!0,!1),r=J("context");return e?j.jsx(o,{ref:n,children:j.jsx(e,{...re(e,r)})}):null}),vr=B.memo(function(){const e=J("FooterComponent"),t=me("footerHeight"),o=J("headerFooterTag"),n=We(B.useMemo(()=>i=>{t(Ee(i,"height"))},[t]),!0,!1),r=J("context");return e?j.jsx(o,{ref:n,children:j.jsx(e,{...re(e,r)})}):null}),Ir=({children:e})=>{const t=B.useContext(_o),o=me("itemDimensions"),n=me("viewportDimensions"),r=We(B.useMemo(()=>i=>{n(i.getBoundingClientRect())},[n]),!0,!1);return B.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),o({height:t.itemHeight,width:t.itemWidth}))},[t,n,o]),j.jsx("div",{ref:r,style:Ct(),child