=r&&(i=r-1),i>=0){var a=o[i];l=a.offset+a.size}return l+(r-i-1)*n},O=y({getItemOffset:function(t,e,r){return C(t,e,r).offset},getItemSize:function(t,e,r){return r.itemMetadataMap[e].size},getEstimatedTotalSize:b,getOffsetForIndexAndAlignment:function(t,e,r,o,n,i){var l=t.direction,a=t.height,s=t.layout,c=t.width,u="horizontal"===l||"horizontal"===s?c:a,f=C(t,e,n),d=b(t,n),h=Math.max(0,Math.min(d-u,f.offset)),p=Math.max(0,f.offset-u+f.size+i);switch("smart"===r&&(r=o>=p-u&&o<=h+u?"auto":"center"),r){case"start":return h;case"end":return p;case"center":return Math.round(p+(h-p)/2);default:return o>=p&&o<=h?o:o0?o[n].offset:0)>=r?R(t,e,n,0,r):T(t,e,Math.max(0,n),r)}(t,r,e)},getStopIndexForStartIndex:function(t,e,r,o){for(var n=t.direction,i=t.height,l=t.itemCount,a=t.layout,s=t.width,c="horizontal"===n||"horizontal"===a?s:i,u=C(t,e,o),f=r+c,d=u.offset+u.size,h=e;h=f-s&&o<=u+s?"auto":"center"),r){case"start":return u;case"end":return f;case"center":var d=Math.round(f+(u-f)/2);return dc+Math.floor(s/2)?c:d;default:return o>=f&&o<=u?o:f>u||o=f-a&&o<=u+a?"auto":"center"),r){case"start":return u;case"end":return f;case"center":var d=Math.round(f+(u-f)/2);return dc+Math.floor(a/2)?c:d;default:return o>=f&&o<=u?o:f>u||o=m-d&&o<=p+d?"auto":"center"),r){case"start":return p;case"end":return m;case"center":var g=Math.round(m+(p-m)/2);return gh+Math.floor(d/2)?h:g;default:return o>=m&&o<=p?o:o