"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5673],{35673:function(e,r,t){t.d(r,{Ns:function(){return J},fC:function(){return F},LW:function(){return q},bU:function(){return G},l_:function(){return B}});var o=t(67294),n=t(75320),l=t(29115),i=t(85893),a=t(28771),s=t(79698),c=t(78990),u=t(9981),d=t(42614),p=t(36206),f="ScrollArea",[h,w]=function(e,r=[]){let t=[],n=()=>{let r=t.map(e=>o.createContext(e));return function(t){let n=t?.[e]||r;return o.useMemo(()=>({[`__scope${e}`]:{...t,[e]:n}}),[t,n])}};return n.scopeName=e,[function(r,n){let l=o.createContext(n),a=t.length;t=[...t,n];let s=r=>{let{scope:t,children:n,...s}=r,c=t?.[e]?.[a]||l,u=o.useMemo(()=>s,Object.values(s));return(0,i.jsx)(c.Provider,{value:u,children:n})};return s.displayName=r+"Provider",[s,function(t,i){let s=i?.[e]?.[a]||l,c=o.useContext(s);if(c)return c;if(void 0!==n)return n;throw Error(`\`${t}\` must be used within \`${r}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let t=()=>{let t=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=t.reduce((r,{useScope:t,scopeName:o})=>{let n=t(e)[`__scope${o}`];return{...r,...n}},{});return o.useMemo(()=>({[`__scope${r.scopeName}`]:n}),[n])}};return t.scopeName=r.scopeName,t}(n,...r)]}(f),[v,b]=h(f),m=o.forwardRef((e,r)=>{let{__scopeScrollArea:t,type:l="hover",dir:s,scrollHideDelay:u=600,...d}=e,[p,f]=o.useState(null),[h,w]=o.useState(null),[b,m]=o.useState(null),[g,S]=o.useState(null),[x,E]=o.useState(null),[y,C]=o.useState(0),[T,R]=o.useState(0),[_,P]=o.useState(!1),[L,j]=o.useState(!1),W=(0,a.e)(r,e=>f(e)),D=(0,c.gm)(s);return(0,i.jsx)(v,{scope:t,type:l,dir:D,scrollHideDelay:u,scrollArea:p,viewport:h,onViewportChange:w,content:b,onContentChange:m,scrollbarX:g,onScrollbarXChange:S,scrollbarXEnabled:_,onScrollbarXEnabledChange:P,scrollbarY:x,onScrollbarYChange:E,scrollbarYEnabled:L,onScrollbarYEnabledChange:j,onCornerWidthChange:C,onCornerHeightChange:R,children:(0,i.jsx)(n.WV.div,{dir:D,...d,ref:W,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});m.displayName=f;var g="ScrollAreaViewport",S=o.forwardRef((e,r)=>{let{__scopeScrollArea:t,children:l,asChild:s,nonce:c,...u}=e,d=b(g,t),p=o.useRef(null),f=(0,a.e)(r,p,d.onViewportChange);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:`
[data-radix-scroll-area-viewport] {
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
[data-radix-scroll-area-viewport]::-webkit-scrollbar {
  display: none;
}
:where([data-radix-scroll-area-viewport]) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
:where([data-radix-scroll-area-content]) {
  flex-grow: 1;
}
`},nonce:c}),(0,i.jsx)(n.WV.div,{"data-radix-scroll-area-viewport":"",...u,asChild:s,ref:f,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...e.style},children:function(e,r){let{asChild:t,children:n}=e;if(!t)return"function"==typeof r?r(n):r;let l=o.Children.only(n);return o.cloneElement(l,{children:"function"==typeof r?r(l.props.children):r})}({asChild:s,children:l},e=>(0,i.jsx)("div",{"data-radix-scroll-area-content":"",ref:d.onContentChange,style:{minWidth:d.scrollbarXEnabled?"fit-content":void 0},children:e}))})]})});S.displayName=g;var x="ScrollAreaScrollbar",E=o.forwardRef((e,r)=>{let{forceMount:t,...n}=e,l=b(x,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=l,c="horizontal"===e.orientation;return o.useEffect(()=>(c?a(!0):s(!0),()=>{c?a(!1):s(!1)}),[c,a,s]),"hover"===l.type?(0,i.jsx)(y,{...n,ref:r,forceMount:t}):"scroll"===l.type?(0,i.jsx)(C,{...n,ref:r,forceMount:t}):"auto"===l.type?(0,i.jsx)(T,{...n,ref:r,forceMount:t}):"always"===l.type?(0,i.jsx)(R,{...n,ref:r}):null});E.displayName=x;var y=o.forwardRef((e,r)=>{let{forceMount:t,...n}=e,a=b(x,e.__scopeScrollArea),[s,c]=o.useState(!1);return o.useEffect(()=>{let e=a.scrollArea,r=0;if(e){let t=()=>{window.clearTimeout(r),c(!0)},o=()=>{r=window.setTimeout(()=>c(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",t),e.addEventListener("pointerleave",o),()=>{window.clearTimeout(r),e.removeEventListener("pointerenter",t),e.removeEventListener("pointerleave",o)}}},[a.scrollArea,a.scrollHideDelay]),(0,i.jsx)(l.z,{present:t||s,children:(0,i.jsx)(T,{"data-state":s?"visible":"hidden",...n,ref:r})})}),C=o.forwardRef((e,r)=>{var t,n;let{forceMount:a,...s}=e,c=b(x,e.__scopeScrollArea),u="horizontal"===e.orientation,d=V(()=>h("SCROLL_END"),100),[f,h]=(t="hidden",n={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},o.useReducer((e,r)=>n[e][r]??e,t));return o.useEffect(()=>{if("idle"===f){let e=window.setTimeout(()=>h("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(e)}},[f,c.scrollHideDelay,h]),o.useEffect(()=>{let e=c.viewport,r=u?"scrollLeft":"scrollTop";if(e){let t=e[r],o=()=>{let o=e[r];t!==o&&(h("SCROLL"),d()),t=o};return e.addEventListener("scroll",o),()=>e.removeEventListener("scroll",o)}},[c.viewport,u,h,d]),(0,i.jsx)(l.z,{present:a||"hidden"!==f,children:(0,i.jsx)(R,{"data-state":"hidden"===f?"hidden":"visible",...s,ref:r,onPointerEnter:(0,p.M)(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:(0,p.M)(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),T=o.forwardRef((e,r)=>{let t=b(x,e.__scopeScrollArea),{forceMount:n,...a}=e,[s,c]=o.useState(!1),u="horizontal"===e.orientation,d=V(()=>{if(t.viewport){let e=t.viewport.offsetWidth<t.viewport.scrollWidth,r=t.viewport.offsetHeight<t.viewport.scrollHeight;c(u?e:r)}},10);return $(t.viewport,d),$(t.content,d),(0,i.jsx)(l.z,{present:n||s,children:(0,i.jsx)(R,{"data-state":s?"visible":"hidden",...a,ref:r})})}),R=o.forwardRef((e,r)=>{let{orientation:t="vertical",...n}=e,l=b(x,e.__scopeScrollArea),a=o.useRef(null),s=o.useRef(0),[c,u]=o.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=I(c.viewport,c.content),p={...n,sizes:c,onSizesChange:u,hasThumb:!!(d>0&&d<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:e=>s.current=e};function f(e,r){return function(e,r,t,o="ltr"){let n=X(t),l=r||n/2,i=t.scrollbar.paddingStart+l,a=t.scrollbar.size-t.scrollbar.paddingEnd-(n-l),s=t.content-t.viewport;return Y([i,a],"ltr"===o?[0,s]:[-1*s,0])(e)}(e,s.current,c,r)}return"horizontal"===t?(0,i.jsx)(_,{...p,ref:r,onThumbPositionChange:()=>{if(l.viewport&&a.current){let e=U(l.viewport.scrollLeft,c,l.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{l.viewport&&(l.viewport.scrollLeft=e)},onDragScroll:e=>{l.viewport&&(l.viewport.scrollLeft=f(e,l.dir))}}):"vertical"===t?(0,i.jsx)(P,{...p,ref:r,onThumbPositionChange:()=>{if(l.viewport&&a.current){let e=U(l.viewport.scrollTop,c);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{l.viewport&&(l.viewport.scrollTop=e)},onDragScroll:e=>{l.viewport&&(l.viewport.scrollTop=f(e))}}):null}),_=o.forwardRef((e,r)=>{let{sizes:t,onSizesChange:n,...l}=e,s=b(x,e.__scopeScrollArea),[c,u]=o.useState(),d=o.useRef(null),p=(0,a.e)(r,d,s.onScrollbarXChange);return o.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,i.jsx)(W,{"data-orientation":"horizontal",...l,ref:p,sizes:t,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":X(t)+"px",...e.style},onThumbPointerDown:r=>e.onThumbPointerDown(r.x),onDragScroll:r=>e.onDragScroll(r.x),onWheelScroll:(r,t)=>{if(s.viewport){let o=s.viewport.scrollLeft+r.deltaX;e.onWheelScroll(o),o>0&&o<t&&r.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:O(c.paddingLeft),paddingEnd:O(c.paddingRight)}})}})}),P=o.forwardRef((e,r)=>{let{sizes:t,onSizesChange:n,...l}=e,s=b(x,e.__scopeScrollArea),[c,u]=o.useState(),d=o.useRef(null),p=(0,a.e)(r,d,s.onScrollbarYChange);return o.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,i.jsx)(W,{"data-orientation":"vertical",...l,ref:p,sizes:t,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":X(t)+"px",...e.style},onThumbPointerDown:r=>e.onThumbPointerDown(r.y),onDragScroll:r=>e.onDragScroll(r.y),onWheelScroll:(r,t)=>{if(s.viewport){let o=s.viewport.scrollTop+r.deltaY;e.onWheelScroll(o),o>0&&o<t&&r.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:O(c.paddingTop),paddingEnd:O(c.paddingBottom)}})}})}),[L,j]=h(x),W=o.forwardRef((e,r)=>{let{__scopeScrollArea:t,sizes:l,hasThumb:c,onThumbChange:u,onThumbPointerUp:d,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:w,onWheelScroll:v,onResize:m,...g}=e,S=b(x,t),[E,y]=o.useState(null),C=(0,a.e)(r,e=>y(e)),T=o.useRef(null),R=o.useRef(""),_=S.viewport,P=l.content-l.viewport,j=(0,s.W)(v),W=(0,s.W)(h),D=V(m,10);function N(e){T.current&&w({x:e.clientX-T.current.left,y:e.clientY-T.current.top})}return o.useEffect(()=>{let e=e=>{let r=e.target;E?.contains(r)&&j(e,P)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[_,E,P,j]),o.useEffect(W,[l,W]),$(E,D),$(S.content,D),(0,i.jsx)(L,{scope:t,scrollbar:E,hasThumb:c,onThumbChange:(0,s.W)(u),onThumbPointerUp:(0,s.W)(d),onThumbPositionChange:W,onThumbPointerDown:(0,s.W)(f),children:(0,i.jsx)(n.WV.div,{...g,ref:C,style:{position:"absolute",...g.style},onPointerDown:(0,p.M)(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),T.current=E.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),N(e))}),onPointerMove:(0,p.M)(e.onPointerMove,N),onPointerUp:(0,p.M)(e.onPointerUp,e=>{let r=e.target;r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=R.current,S.viewport&&(S.viewport.style.scrollBehavior=""),T.current=null})})})}),D="ScrollAreaThumb",N=o.forwardRef((e,r)=>{let{forceMount:t,...o}=e,n=j(D,e.__scopeScrollArea);return(0,i.jsx)(l.z,{present:t||n.hasThumb,children:(0,i.jsx)(A,{ref:r,...o})})}),A=o.forwardRef((e,r)=>{let{__scopeScrollArea:t,style:l,...s}=e,c=b(D,t),u=j(D,t),{onThumbPositionChange:d}=u,f=(0,a.e)(r,e=>u.onThumbChange(e)),h=o.useRef(),w=V(()=>{h.current&&(h.current(),h.current=void 0)},100);return o.useEffect(()=>{let e=c.viewport;if(e){let r=()=>{if(w(),!h.current){let r=k(e,d);h.current=r,d()}};return d(),e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[c.viewport,w,d]),(0,i.jsx)(n.WV.div,{"data-state":u.hasThumb?"visible":"hidden",...s,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:(0,p.M)(e.onPointerDownCapture,e=>{let r=e.target.getBoundingClientRect(),t=e.clientX-r.left,o=e.clientY-r.top;u.onThumbPointerDown({x:t,y:o})}),onPointerUp:(0,p.M)(e.onPointerUp,u.onThumbPointerUp)})});N.displayName=D;var z="ScrollAreaCorner",H=o.forwardRef((e,r)=>{let t=b(z,e.__scopeScrollArea),o=!!(t.scrollbarX&&t.scrollbarY);return"scroll"!==t.type&&o?(0,i.jsx)(M,{...e,ref:r}):null});H.displayName=z;var M=o.forwardRef((e,r)=>{let{__scopeScrollArea:t,...l}=e,a=b(z,t),[s,c]=o.useState(0),[u,d]=o.useState(0),p=!!(s&&u);return $(a.scrollbarX,()=>{let e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),d(e)}),$(a.scrollbarY,()=>{let e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),c(e)}),p?(0,i.jsx)(n.WV.div,{...l,ref:r,style:{width:s,height:u,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null});function O(e){return e?parseInt(e,10):0}function I(e,r){let t=e/r;return isNaN(t)?0:t}function X(e){let r=I(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-t)*r,18)}function U(e,r,t="ltr"){let o=X(r),n=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=r.scrollbar.size-n,i=r.content-r.viewport,a=(0,d.u)(e,"ltr"===t?[0,i]:[-1*i,0]);return Y([0,i],[0,l-o])(a)}function Y(e,r){return t=>{if(e[0]===e[1]||r[0]===r[1])return r[0];let o=(r[1]-r[0])/(e[1]-e[0]);return r[0]+o*(t-e[0])}}var k=(e,r=()=>{})=>{let t={left:e.scrollLeft,top:e.scrollTop},o=0;return!function n(){let l={left:e.scrollLeft,top:e.scrollTop},i=t.left!==l.left,a=t.top!==l.top;(i||a)&&r(),t=l,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)};function V(e,r){let t=(0,s.W)(e),n=o.useRef(0);return o.useEffect(()=>()=>window.clearTimeout(n.current),[]),o.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(t,r)},[t,r])}function $(e,r){let t=(0,s.W)(r);(0,u.b)(()=>{let r=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,t])}var F=m,B=S,q=E,G=N,J=H}}]);