"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8113],{30890:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(19013),o=r(13882);function i(e){(0,o.Z)(1,arguments);var t=(0,n.Z)(e),r=t.getFullYear(),i=t.getMonth(),l=new Date(0);return l.setFullYear(r,i+1,0),l.setHours(0,0,0,0),l.getDate()}},78966:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(19013),o=r(13882);function i(e){return(0,o.Z)(1,arguments),(0,n.Z)(e).getMonth()}},95570:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(19013),o=r(13882);function i(e){return(0,o.Z)(1,arguments),(0,n.Z)(e).getFullYear()}},42699:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(19013),o=r(13882);function i(e,t){(0,o.Z)(2,arguments);var r=(0,n.Z)(e),i=(0,n.Z)(t);return r.getTime()>i.getTime()}},96843:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(19013),o=r(13882);function i(e,t){(0,o.Z)(2,arguments);var r=(0,n.Z)(e),i=(0,n.Z)(t);return r.getTime()===i.getTime()}},3151:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(69119),o=r(13882);function i(e,t){(0,o.Z)(2,arguments);var r=(0,n.Z)(e),i=(0,n.Z)(t);return r.getTime()===i.getTime()}},99890:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(19013),o=r(13882);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){var t,r;if((0,o.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==i(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach(function(e){var t=(0,n.Z)(e);(void 0===r||r<t||isNaN(Number(t)))&&(r=t)}),r||new Date(NaN)}},37950:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(19013),o=r(13882);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){var t,r;if((0,o.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==i(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach(function(e){var t=(0,n.Z)(e);(void 0===r||r>t||isNaN(t.getDate()))&&(r=t)}),r||new Date(NaN)}},69119:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(19013),o=r(13882);function i(e){(0,o.Z)(1,arguments);var t=(0,n.Z)(e);return t.setHours(0,0,0,0),t}},43703:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(19013),o=r(13882);function i(e){(0,o.Z)(1,arguments);var t=(0,n.Z)(e);return t.setDate(1),t.setHours(0,0,0,0),t}},7069:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(77349),o=r(13882),i=r(83946);function l(e,t){(0,o.Z)(2,arguments);var r=(0,i.Z)(t);return(0,n.Z)(e,-r)}},54559:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(83946),o=r(11640),i=r(13882);function l(e,t){(0,i.Z)(2,arguments);var r=(0,n.Z)(t);return(0,o.Z)(e,-r)}},59319:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(83946),o=r(21593),i=r(13882);function l(e,t){(0,i.Z)(2,arguments);var r=(0,n.Z)(t);return(0,o.Z)(e,-r)}},56389:function(e,t,r){r.d(t,{Ns:function(){return er},fC:function(){return K},gb:function(){return P},q4:function(){return U},LW:function(){return ee},bU:function(){return et},l_:function(){return Q}});var n=r(67294),o=r(73935);function i(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function l(...e){return n.useCallback(i(...e),e)}var a=r(85893),u=n.forwardRef((e,t)=>{let{children:r,...o}=e,i=n.Children.toArray(r),l=i.find(f);if(l){let e=l.props.children,r=i.map(t=>t!==l?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,a.jsx)(c,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return(0,a.jsx)(c,{...o,ref:t,children:r})});u.displayName="Slot";var c=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(n.isValidElement(r)){let e,l;let a=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref;return n.cloneElement(r,{...function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props),ref:t?i(t,a):a})}return n.Children.count(r)>1?n.Children.only(null):null});c.displayName="SlotClone";var s=({children:e})=>(0,a.jsx)(a.Fragment,{children:e});function f(e){return n.isValidElement(e)&&e.type===s}var d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=n.forwardRef((e,r)=>{let{asChild:n,...o}=e,i=n?u:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(i,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),p=globalThis?.document?n.useLayoutEffect:()=>{},v=e=>{let t,r;let{present:i,children:a}=e,u=function(e){var t,r;let[i,l]=n.useState(),a=n.useRef({}),u=n.useRef(e),c=n.useRef("none"),[s,f]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},n.useReducer((e,t)=>r[e][t]??e,t));return n.useEffect(()=>{let e=h(a.current);c.current="mounted"===s?e:"none"},[s]),p(()=>{let t=a.current,r=u.current;if(r!==e){let n=c.current,o=h(t);e?f("MOUNT"):"none"===o||t?.display==="none"?f("UNMOUNT"):r&&n!==o?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),p(()=>{if(i){let e=e=>{let t=h(a.current).includes(e.animationName);e.target===i&&t&&o.flushSync(()=>f("ANIMATION_END"))},t=e=>{e.target===i&&(c.current=h(a.current))};return i.addEventListener("animationstart",t),i.addEventListener("animationcancel",e),i.addEventListener("animationend",e),()=>{i.removeEventListener("animationstart",t),i.removeEventListener("animationcancel",e),i.removeEventListener("animationend",e)}}f("ANIMATION_END")},[i,f]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:n.useCallback(e=>{e&&(a.current=getComputedStyle(e)),l(e)},[])}}(i),c="function"==typeof a?a({present:u.isPresent}):n.Children.only(a),s=l(u.ref,(t=Object.getOwnPropertyDescriptor(c.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?c.ref:(t=Object.getOwnPropertyDescriptor(c,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?c.props.ref:c.props.ref||c.ref);return"function"==typeof a||u.isPresent?n.cloneElement(c,{ref:s}):null};function h(e){return e?.animationName||"none"}function m(e){let t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}v.displayName="Presence";var w=n.createContext(void 0);function g(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}var b="ScrollArea",[y,S]=function(e,t=[]){let r=[],o=()=>{let t=r.map(e=>n.createContext(e));return function(r){let o=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])}};return o.scopeName=e,[function(t,o){let i=n.createContext(o),l=r.length;function u(t){let{scope:r,children:o,...u}=t,c=r?.[e][l]||i,s=n.useMemo(()=>u,Object.values(u));return(0,a.jsx)(c.Provider,{value:s,children:o})}return r=[...r,o],u.displayName=t+"Provider",[u,function(r,a){let u=a?.[e][l]||i,c=n.useContext(u);if(c)return c;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=r.reduce((t,{useScope:r,scopeName:n})=>{let o=r(e)[`__scope${n}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}(o,...t)]}(b),[E,N]=y(b),T=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:o="hover",dir:i,scrollHideDelay:u=600,...c}=e,[s,f]=n.useState(null),[p,v]=n.useState(null),[h,m]=n.useState(null),[g,b]=n.useState(null),[y,S]=n.useState(null),[N,T]=n.useState(0),[C,x]=n.useState(0),[R,P]=n.useState(!1),[Z,_]=n.useState(!1),L=l(t,e=>f(e)),D=function(e){let t=n.useContext(w);return e||t||"ltr"}(i);return(0,a.jsx)(E,{scope:r,type:o,dir:D,scrollHideDelay:u,scrollArea:s,viewport:p,onViewportChange:v,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:R,onScrollbarXEnabledChange:P,scrollbarY:y,onScrollbarYChange:S,scrollbarYEnabled:Z,onScrollbarYEnabledChange:_,onCornerWidthChange:T,onCornerHeightChange:x,children:(0,a.jsx)(d.div,{dir:D,...c,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});T.displayName=b;var C="ScrollAreaViewport",x=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:i,...u}=e,c=N(C,r),s=l(t,n.useRef(null),c.onViewportChange);return(0,a.jsxs)(a.Fragment,{children:[(0,a.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}"},nonce:i}),(0,a.jsx)(d.div,{"data-radix-scroll-area-viewport":"",...u,ref:s,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,a.jsx)("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});x.displayName=C;var R="ScrollAreaScrollbar",P=n.forwardRef((e,t)=>{let{forceMount:r,...o}=e,i=N(R,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:u}=i,c="horizontal"===e.orientation;return n.useEffect(()=>(c?l(!0):u(!0),()=>{c?l(!1):u(!1)}),[c,l,u]),"hover"===i.type?(0,a.jsx)(Z,{...o,ref:t,forceMount:r}):"scroll"===i.type?(0,a.jsx)(_,{...o,ref:t,forceMount:r}):"auto"===i.type?(0,a.jsx)(L,{...o,ref:t,forceMount:r}):"always"===i.type?(0,a.jsx)(D,{...o,ref:t}):null});P.displayName=R;var Z=n.forwardRef((e,t)=>{let{forceMount:r,...o}=e,i=N(R,e.__scopeScrollArea),[l,u]=n.useState(!1);return n.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let r=()=>{window.clearTimeout(t),u(!0)},n=()=>{t=window.setTimeout(()=>u(!1),i.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[i.scrollArea,i.scrollHideDelay]),(0,a.jsx)(v,{present:r||l,children:(0,a.jsx)(L,{"data-state":l?"visible":"hidden",...o,ref:t})})}),_=n.forwardRef((e,t)=>{var r;let{forceMount:o,...i}=e,l=N(R,e.__scopeScrollArea),u="horizontal"===e.orientation,c=G(()=>f("SCROLL_END"),100),[s,f]=(r={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},n.useReducer((e,t)=>r[e][t]??e,"hidden"));return n.useEffect(()=>{if("idle"===s){let e=window.setTimeout(()=>f("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,l.scrollHideDelay,f]),n.useEffect(()=>{let e=l.viewport,t=u?"scrollLeft":"scrollTop";if(e){let r=e[t],n=()=>{let n=e[t];r!==n&&(f("SCROLL"),c()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[l.viewport,u,f,c]),(0,a.jsx)(v,{present:o||"hidden"!==s,children:(0,a.jsx)(D,{"data-state":"hidden"===s?"hidden":"visible",...i,ref:t,onPointerEnter:g(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:g(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),L=n.forwardRef((e,t)=>{let r=N(R,e.__scopeScrollArea),{forceMount:o,...i}=e,[l,u]=n.useState(!1),c="horizontal"===e.orientation,s=G(()=>{if(r.viewport){let e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;u(c?e:t)}},10);return J(r.viewport,s),J(r.content,s),(0,a.jsx)(v,{present:o||l,children:(0,a.jsx)(D,{"data-state":l?"visible":"hidden",...i,ref:t})})}),D=n.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,i=N(R,e.__scopeScrollArea),l=n.useRef(null),u=n.useRef(0),[c,s]=n.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=F(c.viewport,c.content),d={...o,sizes:c,onSizesChange:s,hasThumb:!!(f>0&&f<1),onThumbChange:e=>l.current=e,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:e=>u.current=e};function p(e,t){return function(e,t,r,n="ltr"){let o=V(r),i=t||o/2,l=r.scrollbar.paddingStart+i,a=r.scrollbar.size-r.scrollbar.paddingEnd-(o-i),u=r.content-r.viewport;return B([l,a],"ltr"===n?[0,u]:[-1*u,0])(e)}(e,u.current,c,t)}return"horizontal"===r?(0,a.jsx)(j,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&l.current){let e=$(i.viewport.scrollLeft,c,i.dir);l.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=p(e,i.dir))}}):"vertical"===r?(0,a.jsx)(A,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&l.current){let e=$(i.viewport.scrollTop,c);l.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=p(e))}}):null}),j=n.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...i}=e,u=N(R,e.__scopeScrollArea),[c,s]=n.useState(),f=n.useRef(null),d=l(t,f,u.onScrollbarXChange);return n.useEffect(()=>{f.current&&s(getComputedStyle(f.current))},[f]),(0,a.jsx)(M,{"data-orientation":"horizontal",...i,ref:d,sizes:r,style:{bottom:0,left:"rtl"===u.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===u.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":V(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(u.viewport){let n=u.viewport.scrollLeft+t.deltaX;e.onWheelScroll(n),n>0&&n<r&&t.preventDefault()}},onResize:()=>{f.current&&u.viewport&&c&&o({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:X(c.paddingLeft),paddingEnd:X(c.paddingRight)}})}})}),A=n.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...i}=e,u=N(R,e.__scopeScrollArea),[c,s]=n.useState(),f=n.useRef(null),d=l(t,f,u.onScrollbarYChange);return n.useEffect(()=>{f.current&&s(getComputedStyle(f.current))},[f]),(0,a.jsx)(M,{"data-orientation":"vertical",...i,ref:d,sizes:r,style:{top:0,right:"ltr"===u.dir?0:void 0,left:"rtl"===u.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":V(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(u.viewport){let n=u.viewport.scrollTop+t.deltaY;e.onWheelScroll(n),n>0&&n<r&&t.preventDefault()}},onResize:()=>{f.current&&u.viewport&&c&&o({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:X(c.paddingTop),paddingEnd:X(c.paddingBottom)}})}})}),[O,W]=y(R),M=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:o,hasThumb:i,onThumbChange:u,onThumbPointerUp:c,onThumbPointerDown:s,onThumbPositionChange:f,onDragScroll:p,onWheelScroll:v,onResize:h,...w}=e,b=N(R,r),[y,S]=n.useState(null),E=l(t,e=>S(e)),T=n.useRef(null),C=n.useRef(""),x=b.viewport,P=o.content-o.viewport,Z=m(v),_=m(f),L=G(h,10);function D(e){T.current&&p({x:e.clientX-T.current.left,y:e.clientY-T.current.top})}return n.useEffect(()=>{let e=e=>{let t=e.target;y?.contains(t)&&Z(e,P)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,y,P,Z]),n.useEffect(_,[o,_]),J(y,L),J(b.content,L),(0,a.jsx)(O,{scope:r,scrollbar:y,hasThumb:i,onThumbChange:m(u),onThumbPointerUp:m(c),onThumbPositionChange:_,onThumbPointerDown:m(s),children:(0,a.jsx)(d.div,{...w,ref:E,style:{position:"absolute",...w.style},onPointerDown:g(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),T.current=y.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),D(e))}),onPointerMove:g(e.onPointerMove,D),onPointerUp:g(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=C.current,b.viewport&&(b.viewport.style.scrollBehavior=""),T.current=null})})})}),I="ScrollAreaThumb",U=n.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=W(I,e.__scopeScrollArea);return(0,a.jsx)(v,{present:r||o.hasThumb,children:(0,a.jsx)(H,{ref:t,...n})})}),H=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...i}=e,u=N(I,r),c=W(I,r),{onThumbPositionChange:s}=c,f=l(t,e=>c.onThumbChange(e)),p=n.useRef(),v=G(()=>{p.current&&(p.current(),p.current=void 0)},100);return n.useEffect(()=>{let e=u.viewport;if(e){let t=()=>{if(v(),!p.current){let t=q(e,s);p.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[u.viewport,v,s]),(0,a.jsx)(d.div,{"data-state":c.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:g(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;c.onThumbPointerDown({x:r,y:n})}),onPointerUp:g(e.onPointerUp,c.onThumbPointerUp)})});U.displayName=I;var z="ScrollAreaCorner",k=n.forwardRef((e,t)=>{let r=N(z,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&n?(0,a.jsx)(Y,{...e,ref:t}):null});k.displayName=z;var Y=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,i=N(z,r),[l,u]=n.useState(0),[c,s]=n.useState(0),f=!!(l&&c);return J(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),s(e)}),J(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),u(e)}),f?(0,a.jsx)(d.div,{...o,ref:t,style:{width:l,height:c,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...e.style}}):null});function X(e){return e?parseInt(e,10):0}function F(e,t){let r=e/t;return isNaN(r)?0:r}function V(e){let t=F(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-r)*t,18)}function $(e,t,r="ltr"){let n=V(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,l=t.content-t.viewport,a=function(e,[t,r]){return Math.min(r,Math.max(t,e))}(e,"ltr"===r?[0,l]:[-1*l,0]);return B([0,l],[0,i-n])(a)}function B(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}var q=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return!function o(){let i={left:e.scrollLeft,top:e.scrollTop},l=r.left!==i.left,a=r.top!==i.top;(l||a)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function G(e,t){let r=m(e),o=n.useRef(0);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),n.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function J(e,t){let r=m(t);p(()=>{let t=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var K=T,Q=x,ee=P,et=U,er=k},46513:function(e,t,r){r.d(t,{_:function(){return s}});var n=r(97582),o=r(24394),i=r(77107),l=r(5759);function a(){var e=!1,t=[],r=new Set,a={subscribe:function(e){return r.add(e),function(){r.delete(e)}},start:function(n,o){if(!e)return new Promise(function(e){t.push({animation:[n,o],resolve:e})});var l=[];return r.forEach(function(e){l.push((0,i.d5)(e,n,{transitionOverride:o}))}),Promise.all(l)},set:function(t){return(0,o.k)(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),r.forEach(function(e){(0,l.gg)(e,t)})},stop:function(){r.forEach(function(e){(0,i.p_)(e)})},mount:function(){return e=!0,t.forEach(function(e){var t=e.animation,r=e.resolve;a.start.apply(a,(0,n.ev)([],(0,n.CR)(t),!1)).then(r)}),function(){e=!1,a.stop()}}};return a}var u=r(67294),c=r(96681),s=function(){var e=(0,c.h)(a);return(0,u.useEffect)(e.mount,[]),e}}}]);