(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[4753],{374753(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{c:()=>l});var t=__webpack_require__(860012);var e=__webpack_require__(456895);__webpack_require__.n(e);var r=__webpack_require__(895175);let l=(l=[],{offsetPxFromBottom:o=16}={})=>{let c=(0,t.useRef)(null);let u=(0,r.Z)(c.current?.offsetHeight);let[s,n]=(0,t.useState)(!1);let[i,h]=(0,t.useState)(!1);let[a,f]=(0,t.useState)(!1);let g=(0,t.useCallback)(()=>{if(!c.current)return;let t=c.current&&c.current.scrollHeight>c.current.clientHeight;let e=t&&Math.round(c.current.scrollTop)+c.current.offsetHeight+o>=c.current.scrollHeight;t!==i&&(n(!1),h(t)),f(!t||e),(!t||e)&&n(!0)},[i,o]);return((0,t.useEffect)(g,[c,...l]),(0,t.useEffect)(()=>{u!==c.current?.offsetHeight&&g()},[g,c.current?.offsetHeight,u])),{isScrollable:i,isScrolledToBottom:a,hasScrolledToBottom:s,scrollToBottom:()=>{f(!0),n(!0),c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:"smooth"})},setHasScrolledToBottom:n,ref:c,onScroll:(0,e.debounce)(g,25)}}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);