vendor: 13,312 bytes, line 1
1import{r as c,j as g,R as ce,a as At,v as bo,b as Ot}from"./react-vendor-yF7xeVXp.js";function N(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function on(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dt(...e){return t=>{let n=!1;const r=e.map(o=>{const i=on(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():on(e[o],null)}}}}function $(...e){return c.useCallback(Dt(...e),e)}function Eo(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,u=c.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function be(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),u=n.length;n=[...n,s];const l=d=>{var y;const{scope:h,children:m,...w}=d,p=((y=h==null?void 0:h[e])==null?void 0:y[u])||a,v=c.useMemo(()=>w,Object.values(w));return g.jsx(p.Provider,{value:v,children:m})};l.displayName=i+"Provider";function f(d,h){var p;const m=((p=h==null?void 0:h[e])==null?void 0:p[u])||a,w=c.useContext(m);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const u=(a==null?void 0:a[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return o.scopeName=e,[r,So(o,...t)]}function So(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:u,scopeName:l})=>{const d=u(i)[`__scope${l}`];return{...a,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Te(e){const t=Co(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),u=a.find(To);if(u){const l=u.props.children,f=a.map(d=>d===u?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:d);return g.jsx(t,{...s,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,f):null})}return g.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var jc=Te("Slot");function Co(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=Ao(o),a=Ro(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Dt(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ln=Symbol("radix.slottable");function Po(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ln,t}function To(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ln}function Ro(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const u=i(...a);return o(...a),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ao(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Oo(e){const t=e+"CollectionProvider",[n,r]=be(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:v,children:y}=p,x=ce.useRef(null),b=ce.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:b,collectionRef:x,children:y})};s.displayName=t;const a=e+"CollectionSlot",u=Te(a),l=ce.forwardRef((p,v)=>{const{scope:y,children:x}=p,b=i(a,y),E=$(v,b.collectionRef);return g.jsx(u,{ref:E,children:x})});l.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=Te(f),m=ce.forwardRef((p,v)=>{const{scope:y,children:x,...b}=p,E=ce.useRef(null),S=$(v,E),P=i(f,y);return ce.useEffect(()=>(P.itemMap.set(E,{ref:E,...b}),()=>void P.itemMap.delete(E))),g.jsx(h,{[d]:"",ref:S,children:x})});m.displayName=f;function w(p){const v=i(e+"CollectionConsumer",p);return ce.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((P,C)=>b.indexOf(P.ref.current)-b.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:l,ItemSlot:m},w,r]}var Do=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=Do.reduce((e,t)=>{const n=Te(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(u,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _n(e,t){e&&At.flushSync(()=>e.dispatchEvent(t))}function H(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function No(e,t=globalThis==null?void 0:globalThis.document){const n=H(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Lo="DismissableLayer",yt="dismissableLayer.update",_o="dismissableLayer.pointerDownOutside",Mo="dismissableLayer.focusOutside",sn,Mn=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ze=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...u}=e,l=c.useContext(Mn),[f,d]=c.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),w=$(t,C=>d(C)),p=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(v),x=f?p.indexOf(f):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,E=x>=y,S=Fo(C=>{const O=C.target,R=[...l.branches].some(D=>D.contains(O));!E||R||(o==null||o(C),s==null||s(C),C.defaultPrevented||a==null||a())},h),P=jo(C=>{const O=C.target;[...l.branches].some(D=>D.contains(O))||(i==null||i(C),s==null||s(C),C.defaultPrevented||a==null||a())},h);return No(C=>{x===l.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(sn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),an(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=sn)}},[f,h,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),an())},[f,l]),c.useEffect(()=>{const C=()=>m({});return document.addEventListener(yt,C),()=>document.removeEventListener(yt,C)},[]),g.jsx(M.div,{...u,ref:w,style:{pointerEvents:b?E?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,P.onFocusCapture),onBlurCapture:N(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,S.onPointerDownCapture)})});Ze.displayName=Lo;var Io="DismissableLayerBranch",In=c.forwardRef((e,t)=>{const n=c.useContext(Mn),r=c.useRef(null),o=$(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(M.div,{...e,ref:o})});In.displayName=Io;function Fo(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let u=function(){Fn(_o,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jo(e,t=globalThis==null?void 0:globalThis.document){const n=H(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&Fn(Mo,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function an(){const e=new CustomEvent(yt);document.dispatchEvent(e)}function Fn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?_n(o,i):o.dispatchEvent(i)}var ko=Ze,Wo=In,Q=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},$o="Portal",Nt=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);Q(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?bo.createPortal(g.jsx(M.div,{...r,ref:t}),s):null});Nt.displayName=$o;function Ho(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ee=e=>{const{present:t,children:n}=e,r=Vo(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=$(r.ref,Bo(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ee.displayName="Presence";function Vo(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,u]=Ho(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const l=_e(r.current);i.current=a==="mounted"?l:"none"},[a]),Q(()=>{const l=r.current,f=o.current;if(f!==e){const h=i.current,m=_e(l);e?u("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Q(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=m=>{const p=_e(r.current).includes(m.animationName);if(m.target===t&&p&&(u("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(i.current=_e(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function _e(e){return(e==null?void 0:e.animationName)||"none"}function Bo(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Uo=Ot[" useInsertionEffect ".trim().toString()]||Q;function jn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=zo({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const l=c.useCallback(f=>{var d;if(a){const h=Yo(f)?f(e):f;h!==e&&((d=s.current)==null||d.call(s,h))}else i(f)},[a,e,i,s]);return[u,l]}function zo({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return Uo(()=>{i.current=t},[t]),c.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Yo(e){return typeof e=="function"}var Xo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ko="VisuallyHidden",Lt=c.forwardRef((e,t)=>g.jsx(M.span,{...e,ref:t,style:{...Xo,...e.style}}));Lt.displayName=Ko;var _t="ToastProvider",[Mt,Go,qo]=Oo("Toast"),[kn,kc]=be("Toast",[qo]),[Zo,Qe]=kn(_t),Wn=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,u]=c.useState(null),[l,f]=c.useState(0),d=c.useRef(!1),h=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${_t}\`. Expected non-empty \`string\`.`),g.jsx(Mt.Provider,{scope:t,children:g.jsx(Zo,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:l,viewport:a,onViewportChange:u,onToastAdd:c.useCallback(()=>f(m=>m+1),[]),onToastRemove:c.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:s})})};Wn.displayName=_t;var $n="ToastViewport",Qo=["F8"],xt="toast.viewportPause",bt="toast.viewportResume",Hn=c.forwardRef((e,t)=>
1{const{__scopeToast:n,hotkey:r=Qo,label:o="Notifications ({hotkey})",...i}=e,s=Qe($n,n),a=Go(n),u=c.useRef(null),l=c.useRef(null),f=c.useRef(null),d=c.useRef(null),h=$(t,d,s.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=s.toastCount>0;c.useEffect(()=>{const v=y=>{var b;r.length!==0&&r.every(E=>y[E]||y.code===E)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),c.useEffect(()=>{const v=u.current,y=d.current;if(w&&v&&y){const x=()=>{if(!s.isClosePausedRef.current){const P=new CustomEvent(xt);y.dispatchEvent(P),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){const P=new CustomEvent(bt);y.dispatchEvent(P),s.isClosePausedRef.current=!1}},E=P=>{!v.contains(P.relatedTarget)&&b()},S=()=>{v.contains(document.activeElement)||b()};return v.addEventListener("focusin",x),v.addEventListener("focusout",E),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",S),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",E),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",S),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[w,s.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:v})=>{const x=a().map(b=>{const E=b.ref.current,S=[E,...fi(E)];return v==="forwards"?S:S.reverse()});return(v==="forwards"?x.reverse():x).flat()},[a]);return c.useEffect(()=>{const v=d.current;if(v){const y=x=>{var S,P,C;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const O=document.activeElement,R=x.shiftKey;if(x.target===v&&R){(S=l.current)==null||S.focus();return}const j=p({tabbingDirection:R?"backwards":"forwards"}),k=j.findIndex(T=>T===O);ct(j.slice(k+1))?x.preventDefault():R?(P=l.current)==null||P.focus():(C=f.current)==null||C.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[a,p]),g.jsxs(Wo,{ref:u,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&g.jsx(Et,{ref:l,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"forwards"});ct(v)}}),g.jsx(Mt.Slot,{scope:n,children:g.jsx(M.ol,{tabIndex:-1,...i,ref:h})}),w&&g.jsx(Et,{ref:f,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"backwards"});ct(v)}})]})});Hn.displayName=$n;var Vn="ToastFocusProxy",Et=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Qe(Vn,n);return g.jsx(Lt,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var l;const a=s.relatedTarget;!((l=i.viewport)!=null&&l.contains(a))&&r()}})});Et.displayName=Vn;var Oe="Toast",Jo="toast.swipeStart",ei="toast.swipeMove",ti="toast.swipeCancel",ni="toast.swipeEnd",Bn=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,u]=jn({prop:r,defaultProp:o??!0,onChange:i,caller:Oe});return g.jsx(ee,{present:n||a,children:g.jsx(ii,{open:a,...s,ref:t,onClose:()=>u(!1),onPause:H(e.onPause),onResume:H(e.onResume),onSwipeStart:N(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:N(e.onSwipeMove,l=>{const{x:f,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:N(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:N(e.onSwipeEnd,l=>{const{x:f,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),u(!1)})})})});Bn.displayName=Oe;var[ri,oi]=kn(Oe,{onClose(){}}),ii=c.forwardRef((e,t)=>
1{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:u,onResume:l,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:m,...w}=e,p=Qe(Oe,n),[v,y]=c.useState(null),x=$(t,T=>y(T)),b=c.useRef(null),E=c.useRef(null),S=o||p.duration,P=c.useRef(0),C=c.useRef(S),O=c.useRef(0),{onToastAdd:R,onToastRemove:D}=p,L=H(()=>{var I;(v==null?void 0:v.contains(document.activeElement))&&((I=p.viewport)==null||I.focus()),s()}),j=c.useCallback(T=>{!T||T===1/0||(window.clearTimeout(O.current),P.current=new Date().getTime(),O.current=window.setTimeout(L,T))},[L]);c.useEffect(()=>{const T=p.viewport;if(T){const I=()=>{j(C.current),l==null||l()},_=()=>{const F=new Date().getTime()-P.current;C.current=C.current-F,window.clearTimeout(O.current),u==null||u()};return T.addEventListener(xt,_),T.addEventListener(bt,I),()=>{T.removeEventListener(xt,_),T.removeEventListener(bt,I)}}},[p.viewport,S,u,l,j]),c.useEffect(()=>{i&&!p.isClosePausedRef.current&&j(S)},[i,S,p.isClosePausedRef,j]),c.useEffect(()=>(R(),()=>D()),[R,D]);const k=c.useMemo(()=>v?qn(v):null,[v]);return p.viewport?g.jsxs(g.Fragment,{children:[k&&g.jsx(si,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:k}),g.jsx(ri,{scope:n,onClose:L,children:At.createPortal(g.jsx(Mt.ItemSlot,{scope:n,children:g.jsx(ko,{asChild:!0,onEscapeKeyDown:N(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(M.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...w,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:N(e.onKeyDown,T=>{T.key==="Escape"&&(a==null||a(T.nativeEvent),T.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:N(e.onPointerDown,T=>{T.button===0&&(b.current={x:T.clientX,y:T.clientY})}),onPointerMove:N(e.onPointerMove,T=>{if(!b.current)return;const I=T.clientX-b.current.x,_=T.clientY-b.current.y,F=!!E.current,A=["left","right"].includes(p.swipeDirection),W=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,U=A?W(0,I):0,fe=A?0:W(0,_),Ce=T.pointerType==="touch"?10:2,de={x:U,y:fe},Ne={originalEvent:T,delta:de};F?(E.current=de,Me(ei,d,Ne,{discrete:!1})):cn(de,p.swipeDirection,Ce)?(E.current=de,Me(Jo,f,Ne,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(I)>Ce||Math.abs(_)>Ce)&&(b.current=null)}),onPointerUp:N(e.onPointerUp,T=>{const I=E.current,_=T.target;if(_.hasPointerCapture(T.pointerId)&&_.releasePointerCapture(T.pointerId),E.current=null,b.current=null,I){const F=T.currentTarget,A={originalEvent:T,delta:I};cn(I,p.swipeDirection,p.swipeThreshold)?Me(ni,m,A,{discrete:!0}):Me(ti,h,A,{discrete:!0}),F.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),si=e=>{const{__scopeToast:t,children:n,...r}=e,o=Qe(Oe,t),[i,s]=c.useState(!1),[a,u]=c.useState(!1);return li(()=>s(!0)),c.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:g.jsx(Nt,{asChild:!0,children:g.jsx(Lt,{...r,children:i&&g.jsxs(g.Fragment,{children:[o.label," ",n]})})})},ai="ToastTitle",Un=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(M.div,{...r,ref:t})});Un.displayName=ai;var ci="ToastDescription",zn=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(M.div,{...r,ref:t})});zn.displayName=ci;var Yn="ToastAction",Xn=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?g.jsx(Gn,{altText:n,asChild:!0,children:g.jsx(It,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yn}\`. Expected non-empty \`string\`.`),null)});Xn.displayName=Yn;var Kn="ToastClose",It=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=oi(Kn,n);return g.jsx(Gn,{asChild:!0,children:g.jsx(M.button,{type:"button",...r,ref:t,onClick:N(e.onClick,o.onClose)})})});It.displayName=Kn;var Gn=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return g.jsx(M.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function qn(e){const t=[];
1return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),ui(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...qn(r))}}),t}function Me(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?_n(o,i):o.dispatchEvent(i)}var cn=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function li(e=()=>{}){const t=H(e);Q(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function ui(e){return e.nodeType===e.ELEMENT_NODE}function fi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ct(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Wc=Wn,$c=Hn,Hc=Bn,Vc=Un,Bc=zn,Uc=Xn,zc=It,di=Ot[" useId ".trim().toString()]||(()=>{}),pi=0;function lt(e){const[t,n]=c.useState(di());return Q(()=>{e||n(r=>r??String(pi++))},[e]),e||(t?`radix-${t}`:"")}const hi=["top","right","bottom","left"],se=Math.min,V=Math.max,Be=Math.round,Ie=Math.floor,Z=e=>({x:e,y:e}),mi={left:"right",right:"left",bottom:"top",top:"bottom"},vi={start:"end",end:"start"};function St(e,t,n){return V(e,se(t,n))}function re(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function Ee(e){return e.split("-")[1]}function Ft(e){return e==="x"?"y":"x"}function jt(e){return e==="y"?"height":"width"}const gi=new Set(["top","bottom"]);function q(e){return gi.has(oe(e))?"y":"x"}function kt(e){return Ft(q(e))}function wi(e,t,n){n===void 0&&(n=!1);const r=Ee(e),o=kt(e),i=jt(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ue(s)),[s,Ue(s)]}function yi(e){const t=Ue(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>vi[t])}const ln=["left","right"],un=["right","left"],xi=["top","bottom"],bi=["bottom","top"];function Ei(e,t,n){switch(e){case"top":case"bottom":return n?t?un:ln:t?ln:un;case"left":case"right":return t?xi:bi;default:return[]}}function Si(e,t,n,r){const o=Ee(e);let i=Ei(oe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ct)))),i}function Ue(e){return e.replace(/left|right|bottom|top/g,t=>mi[t])}function Ci(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zn(e){return typeof e!="number"?Ci(e):{top:e,right:e,bottom:e,left:e}}function ze(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function fn(e,t,n){let{reference:r,floating:o}=e;const i=q(t),s=kt(t),a=jt(s),u=oe(t),l=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Ee(t)){case"start":m[s]-=h*(n&&l?-1:1);break;case"end":m[s]+=h*(n&&l?-1:1);break}return m}const Pi=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=fn(l,r,u),h=r,m={},w=0;for(let p=0;p<a.length;p++){const{name:v,fn:y}=a[p],{x,y:b,data:E,reset:S}=await y({x:f,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});f=x??f,d=b??d,m={...m,[v]:{...m[v],...E}},S&&w<=50&&(w++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(l=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:f,y:d}=fn(l,h,u)),p=-1)}return{x:f,y:d,placement:h,strategy:o,middlewareData:m}};async function Re(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=re(t,e),w=Zn(m),v=a[h?d==="floating"?"reference":"floating":d],y=ze(await i.getClippingRect
vendor: 10,129 bytes, line 1
1({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:u})),x=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=ze(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:b,strategy:u}):x);return{top:(y.top-S.top+w.top)/E.y,bottom:(S.bottom-y.bottom+w.bottom)/E.y,left:(y.left-S.left+w.left)/E.x,right:(S.right-y.right+w.right)/E.x}}const Ti=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:l,padding:f=0}=re(e,t)||{};if(l==null)return{};const d=Zn(f),h={x:n,y:r},m=kt(o),w=jt(m),p=await s.getDimensions(l),v=m==="y",y=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",E=i.reference[w]+i.reference[m]-h[m]-i.floating[w],S=h[m]-i.reference[m],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let C=P?P[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(P)))&&(C=a.floating[b]||i.floating[w]);const O=E/2-S/2,R=C/2-p[w]/2-1,D=se(d[y],R),L=se(d[x],R),j=D,k=C-p[w]-L,T=C/2-p[w]/2+O,I=St(j,T,k),_=!u.arrow&&Ee(o)!=null&&T!==I&&i.reference[w]/2-(T<j?D:L)-p[w]/2<0,F=_?T<j?T-j:T-k:0;return{[m]:h[m]+F,data:{[m]:I,centerOffset:T-I-F,..._&&{alignmentOffset:F}},reset:_}}}),Ri=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,...v}=re(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=oe(o),x=q(a),b=oe(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(l.floating)),S=h||(b||!p?[Ue(a)]:yi(a)),P=w!=="none";!h&&P&&S.push(...Si(a,p,w,E));const C=[a,...S],O=await Re(t,v),R=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&R.push(O[y]),d){const T=wi(o,s,E);R.push(O[T[0]],O[T[1]])}if(D=[...D,{placement:o,overflows:R}],!R.every(T=>T<=0)){var L,j;const T=(((L=i.flip)==null?void 0:L.index)||0)+1,I=C[T];if(I&&(!(d==="alignment"?x!==q(I):!1)||D.every(A=>A.overflows[0]>0&&q(A.placement)===x)))return{data:{index:T,overflows:D},reset:{placement:I}};let _=(j=D.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:j.placement;if(!_)switch(m){case"bestFit":{var k;const F=(k=D.filter(A=>{if(P){const W=q(A.placement);return W===x||W==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(W=>W>0).reduce((W,U)=>W+U,0)]).sort((A,W)=>A[1]-W[1])[0])==null?void 0:k[0];F&&(_=F);break}case"initialPlacement":_=a;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function dn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pn(e){return hi.some(t=>e[t]>=0)}const Ai=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=re(e,t);switch(r){case"referenceHidden":{const i=await Re(t,{...o,elementContext:"reference"}),s=dn(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pn(s)}}}case"escaped":{const i=await Re(t,{...o,altBoundary:!0}),s=dn(i,n.floating);return{data:{escapedOffsets:s,escaped:pn(s)}}}default:return{}}}}},Qn=new Set(["left","top"]);async function Oi(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=oe(n),a=Ee(n),u=q(n)==="y",l=Qn.has(s)?-1:1,f=i&&u?-1:1,d=re(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),u?{x:m*f,y:h*l}:{x:h*l,y:m*f}}const Di=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await Oi(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},Ni=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...u}=re(e,t),l={x:n,y:r},f=await Re(t,u),d=q(oe(o)),h=Ft(d);let m=l[h],w=l[d];if(i){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+f[v],b=m-f[y];m=St(x,m,b)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=w+f[v],b=w-f[y];w=St(x,w,b)}const p=a.fn({...t,[h]:m,[d]:w});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[h]:i,[d]:s}}}}}},Li=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=re(e,t),f={x:n,y:r},d=q(o),h=Ft(d);let m=f[h],w=f[d];const p=re(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const b=h==="y"?"height":"width",E=i.reference[h]-i.floating[b]+v.mainAxis,S=i.reference[h]+i.reference[b]-v.mainAxis;m<E?m=E:m>S&&(m=S)}if(l){var y,x;const b=h==="y"?"width":"height",E=Qn.has(oe(o)),S=i.reference[d]-i.floating[b]+(E&&((y=s.offset)==null?void 0:y[d])||0)+(E?0:v.crossAxis),P=i.reference[d]+i.reference[b]+(E?0:((x=s.offset)==null?void 0:x[d])||0)-(E?v.crossAxis:0);w<S?w=S:w>P&&(w=P)}return{[h]:m,[d]:w}}}},_i=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...l}=re(e,t),f=await Re(t,l),d=oe(o),h=Ee(o),m=q(o)==="y",{width:w,height:p}=i.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,v=h==="end"?"top":"bottom");const x=p-f.top-f.bottom,b=w-f.left-f.right,E=se(p-f[v],x),S=se(w-f[y],b),P=!t.middlewareData.shift;let C=E,O=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=x),P&&!h){const D=V(f.left,0),L=V(f.right,0),j=V(f.top,0),k=V(f.bottom,0);m?O=w-2*(D!==0||L!==0?D+L:V(f.left,f.right)):C=p-2*(j!==0||k!==0?j+k:V(f.top,f.bottom))}await u({...t,availableWidth:O,availableHeight:C});const R=await s.getDimensions(a.floating);return w!==R.width||p!==R.height?{reset:{rects:!0}}:{}}}};function Je(){return typeof window<"u"}function Se(e){return Jn(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(Jn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jn(e){return Je()?e instanceof Node||e instanceof B(e).Node:!1}function Y(e){return Je()?e instanceof Element||e instanceof B(e).Element:!1}function J(e){return Je()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function hn(e){return!Je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}const Mi=new Set(["inline","contents"]);function De(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Mi.has(o)}const Ii=new Set(["table","td","th"]);function Fi(e){return Ii.has(Se(e))}const ji=[":popover-open",":modal"];function et(e){return ji.some(t=>{try{return e.matches(t)}catch{return!1}})}const ki=["transform","translate","scale","rotate","perspective"],Wi=["transform","translate","scale","rotate","perspective","filter"],$i=["paint","layout","strict","content"];function Wt(e){const t=$t(),n=Y(e)?X(e):e;return ki.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wi.some(r=>(n.willChange||"").includes(r))||$i.some(r=>(n.contain||"").includes(r))}function Hi(e){let t=ae(e);for(;J(t)&&!we(t);){if(Wt(t))return t;if(et(t))return null;t=ae(t)}return null}function $t(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Vi=new Set(["html","body","#document"]);function we(e){return Vi.has(Se(e))}function X(e){return B(e).getComputedStyle(e)}function tt(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ae(e){if(Se(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hn(e)&&e.host||te(e);return hn(t)?t.host:t}function er(e){const t=ae(e);return we(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&De(t)?t:er(t)}function Ae(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=er(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=B(o);if(i){const a=Pt(s);return t.concat(s,s.visualViewport||[],De(o)?o:[],a&&n?Ae(a):[])}return t.concat(o,Ae(o,[],n))}function Pt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tr(e){const t=X(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=J(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Be(n)!==i||Be(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ht(e){return Y(e)?e:e.contextElement}function ve(e){const t=Ht(e);if(!J(t))return Z(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=tr(t);let s=(i?Be(n.width):n.width)/r,a=(i?Be(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Bi=Z(0);function nr(e){const t=B(e);return!$t()||!t.visualViewport?Bi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ui(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function le(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ht(e);let s=Z(1);t&&(r?Y(r)&&(s=ve(r)):s=ve(e));const a=Ui(i,n,r)?nr(i):Z(0);let u=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const h=B(i),m=r&&Y(r)?B(r):r;let w=h,p=Pt(w);for(;p&&r&&m!==w;
vendor: 2,891 bytes, line 1
1){const v=ve(p),y=p.getBoundingClientRect(),x=X(p),b=y.left+(p.clientLeft+parseFloat(x.paddingLeft))*v.x,E=y.top+(p.clientTop+parseFloat(x.paddingTop))*v.y;u*=v.x,l*=v.y,f*=v.x,d*=v.y,u+=b,l+=E,w=B(p),p=Pt(w)}}return ze({width:f,height:d,x:u,y:l})}function Vt(e,t){const n=tt(e).scrollLeft;return t?t.left+n:le(te(e)).left+n}function rr(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Vt(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function zi(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=te(r),a=t?et(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},l=Z(1);const f=Z(0),d=J(r);if((d||!d&&!i)&&((Se(r)!=="body"||De(s))&&(u=tt(r)),J(r))){const m=le(r);l=ve(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=s&&!d&&!i?rr(s,u,!0):Z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+h.x,y:n.y*l.y-u.scrollTop*l.y+f.y+h.y}}function Yi(e){return Array.from(e.getClientRects())}function Xi(e){const t=te(e),n=tt(e),r=e.ownerDocument.body,o=V(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=V(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Vt(e);const a=-n.scrollTop;return X(r).direction==="rtl"&&(s+=V(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Ki(e,t){const n=B(e),r=te(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=$t();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}return{width:i,height:s,x:a,y:u}}const Gi=new Set(["absolute","fixed"]);function qi(e,t){const n=le(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=J(e)?ve(e):Z(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,l=r*i.y;return{width:s,height:a,x:u,y:l}}function mn(e,t,n){let r;if(t==="viewport")r=Ki(e,n);else if(t==="document")r=Xi(te(e));else if(Y(t))r=qi(t,n);else{const o=nr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ze(r)}function or(e,t){const n=ae(e);return n===t||!Y(n)||we(n)?!1:X(n).position==="fixed"||or(n,t)}function Zi(e,t){const n=t.get(e);if(n)return n;let r=Ae(e,[],!1).filter(a=>Y(a)&&Se(a)!=="body"),o=null;const i=X(e).position==="fixed";let s=i?ae(e):e;for(;Y(s)&&!we(s);){const a=X(s),u=Wt(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&Gi.has(o.position)||De(s)&&!u&&or(e,s))?r=r.filter(f=>f!==s):o=a,s=ae(s)}return t.set(e,r),r}function Qi(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?et(t)?[]:Zi(t,this._c):[].concat(n),r],a=s[0],u=s.reduce((l,f)=>{const d=mn(t,f,o);return l.top=V(d.top,l.top),l.right=se(d.right,l.right),l.bottom=se(d.bottom,l.bottom),l.left=V(d.left,l.left),l},mn(t,a,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ji(e){const{width:t,height:n}=tr(e);return{width:t,height:n}}
vendor: 9,622 bytes, line 1
1function es(e,t,n){const r=J(t),o=te(t),i=n==="fixed",s=le(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=Z(0);function l(){u.x=Vt(o)}if(r||!r&&!i)if((Se(t)!=="body"||De(o))&&(a=tt(t)),r){const m=le(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&l();i&&!r&&o&&l();const f=o&&!r&&!i?rr(o,a):Z(0),d=s.left+a.scrollLeft-u.x-f.x,h=s.top+a.scrollTop-u.y-f.y;return{x:d,y:h,width:s.width,height:s.height}}function ut(e){return X(e).position==="static"}function vn(e,t){if(!J(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function ir(e,t){const n=B(e);if(et(e))return n;if(!J(e)){let o=ae(e);for(;o&&!we(o);){if(Y(o)&&!ut(o))return o;o=ae(o)}return n}let r=vn(e,t);for(;r&&Fi(r)&&ut(r);)r=vn(r,t);return r&&we(r)&&ut(r)&&!Wt(r)?n:r||Hi(e)||n}const ts=async function(e){const t=this.getOffsetParent||ir,n=this.getDimensions,r=await n(e.floating);return{reference:es(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ns(e){return X(e).direction==="rtl"}const rs={convertOffsetParentRelativeRectToViewportRelativeRect:zi,getDocumentElement:te,getClippingRect:Qi,getOffsetParent:ir,getElementRects:ts,getClientRects:Yi,getDimensions:Ji,getScale:ve,isElement:Y,isRTL:ns};function sr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function os(e,t){let n=null,r;const o=te(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const l=e.getBoundingClientRect(),{left:f,top:d,width:h,height:m}=l;if(a||t(),!h||!m)return;const w=Ie(d),p=Ie(o.clientWidth-(f+h)),v=Ie(o.clientHeight-(d+m)),y=Ie(f),b={rootMargin:-w+"px "+-p+"px "+-v+"px "+-y+"px",threshold:V(0,se(1,u))||1};let E=!0;function S(P){const C=P[0].intersectionRatio;if(C!==u){if(!E)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!sr(l,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return s(!0),i}function is(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Ht(e),f=o||i?[...l?Ae(l):[],...Ae(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=l&&a?os(l,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),l&&!u&&m.observe(l),m.observe(t));let w,p=u?le(e):null;u&&v();function v(){const y=le(e);p&&!sr(p,y)&&n(),p=y,w=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(w)}}const ss=Di,as=Ni,cs=Ri,ls=_i,us=Ai,gn=Ti,fs=Li,ds=(e,t,n)=>{const r=new Map,o={platform:rs,...n},i={...o.platform,_c:r};return Pi(e,t,{...o,platform:i})};var ps=typeof document<"u",hs=function(){},$e=ps?c.useLayoutEffect:hs;function Ye(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ye(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ye(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ar(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wn(e,t){const n=ar(e);return Math.round(t*n)/n}function ft(e){const t=c.useRef(e);return $e(()=>{t.current=e}),t}function ms(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:l}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=c.useState(r);Ye(h,r)||m(r);const[w,p]=c.useState(null),[v,y]=c.useState(null),x=c.useCallback(A=>{A!==P.current&&(P.current=A,p(A))},[]),b=c.useCallback(A=>{A!==C.current&&(C.current=A,y(A))},[]),E=i||w,S=s||v,P=c.useRef(null),C=c.useRef(null),O=c.useRef(f),R=u!=null,D=ft(u),L=ft(o),j=ft(l),k=c.useCallback(()=>{if(!P.current||!C.current)return;const A={placement:t,strategy:n,middleware:h};L.current&&(A.platform=L.current),ds(P.current,C.current,A).then(W=>{const U={...W,isPositioned:j.current!==!1};T.current&&!Ye(O.current,U)&&(O.current=U,At.flushSync(()=>{d(U)}))})},[h,t,n,L,j]);$e(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[l]);const T=c.useRef(!1);$e(()=>(T.current=!0,()=>{T.current=!1}),[]),$e(()=>{if(E&&(P.current=E),S&&(C.current=S),E&&S){if(D.current)return D.current(E,S,k);k()}},[E,S,k,D,R]);const I=c.useMemo(()=>({reference:P,floating:C,setReference:x,setFloating:b}),[x,b]),_=c.useMemo(()=>({reference:E,floating:S}),[E,S]),F=c.useMemo(()=>{const A={position:n,left:0,top:0};if(!_.floating)return A;const W=wn(_.floating,f.x),U=wn(_.floating,f.y);return a?{...A,transform:"translate("+W+"px, "+U+"px)",...ar(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:U}},[n,a,_.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:k,refs:I,elements:_,floatingStyles:F}),[f,k,I,_,F])}const vs=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gn({element:r.current,padding:o}).fn(n):{}:r?gn({element:r,padding:o}).fn(n):{}}}},gs=(e,t)=>({...ss(e),options:[e,t]}),ws=(e,t)=>({...as(e),options:[e,t]}),ys=(e,t)=>({...fs(e),options:[e,t]}),xs=(e,t)=>({...cs(e),options:[e,t]}),bs=(e,t)=>({...ls(e),options:[e,t]}),Es=(e,t)=>({...us(e),options:[e,t]}),Ss=(e,t)=>({...vs(e),options:[e,t]});var Cs="Arrow",cr=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return g.jsx(M.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});cr.displayName=Cs;var Ps=cr;function Ts(e){const[t,n]=c.useState(void 0);return Q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const u=i.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var lr="Popper",[ur,fr]=be(lr),[Yc,dr]=ur(lr),pr="PopperAnchor",hr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=dr(pr,n),s=c.useRef(null),a=$(t,s);return c.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:g.jsx(M.div,{...o,ref:a})});hr.displayName=pr;var Bt="PopperContent",[Rs,As]=ur(Bt),mr=c.forwardRef((e,t)=>{var Zt,Qt,Jt,en,tn,nn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:w,...p}=e,v=dr(Bt,n),[y,x]=c.useState(null),b=$(t,Pe=>x(Pe)),[E,S]=c.useState(null),P=Ts(E),C=(P==null?void 0:P.width)??0,O=(P==null?void 0:P.height)??0,R=r+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(l)?l:[l],j=L.length>0,k={padding:D,boundary:L.filter(Ds),altBoundary:j},{refs:T,floatingStyles:I,placement:_,isPositioned:F,middlewareData:A}=ms({strategy:"fixed",placement:R,whileElementsMounted:(...Pe)=>is(...Pe,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[gs({mainAxis:o+O,alignmentAxis:s}),u&&ws({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?ys():void 0,...k}),u&&xs({...k}),bs({...k,apply:({elements:Pe,rects:rn,availableWidth:go,availableHeight:wo})=>{const{width:yo,height:xo}=rn.reference,Le=Pe.floating.style;Le.setProperty("--radix-popper-available-width",`${go}px`),Le.setProperty("--radix-popper-available-height",`${wo}px`),Le.setProperty("--radix-popper-anchor-width",`${yo}px`),Le.setProperty("--radix-popper-anchor-height",`${xo}px`)}}),E&&Ss({element:E,padding:a}),Ns({arrowWidth:C,arrowHeight:O}),h&&Es({strategy:"referenceHidden",...k})]}),[W,U]=wr(_),fe=H(w);Q(()=>{F&&(fe==null||fe())},[F,fe]);const Ce=(Zt=A.arrow)==null?void 0:Zt.x,de=(Qt=A.arrow)==null?void 0:Qt.y,Ne=((Jt=A.arrow)==null?void 0:Jt.centerOffset)!==0,[mo,vo]=c.useState();return Q(()=>{y&&vo(window.getComputedStyle(y).zIndex)},[y]),g.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:F?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:mo,"--radix-popper-transform-origin":[(en=A.transformOrigin)==null?void 0:en.x,(tn=A.transformOrigin)==null?void 0:tn.y].join(" "),...((nn=A.hide)==null?void 0:nn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(Rs,{scope:n,placedSide:W,onArrowChange:S,arrowX:Ce,arrowY:de,shouldHideArrow:Ne,children:g.jsx(M.div,{"data-side":W,"data-align":U,...p,ref:b,style:{...p.style,animation:F?void 0:"none"}})})})});mr.displayName=Bt;var vr="PopperArrow",Os={top:"bottom",right:"left",bottom:"top",left:"r
1ight"},gr=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=As(vr,r),s=Os[i.placedSide];return g.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:g.jsx(Ps,{...o,ref:n,style:{...o.style,display:"block"}})})});gr.displayName=vr;function Ds(e){return e!==null}var Ns=e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,f]=wr(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+u/2;let w="",p="";return l==="bottom"?(w=s?d:`${h}px`,p=`${-u}px`):l==="top"?(w=s?d:`${h}px`,p=`${r.floating.height+u}px`):l==="right"?(w=`${-u}px`,p=s?d:`${m}px`):l==="left"&&(w=`${r.floating.width+u}px`,p=s?d:`${m}px`),{data:{x:w,y:p}}}});function wr(e){const[t,n="center"]=e.split("-");return[t,n]}var Ls=hr,_s=mr,Ms=gr,Is=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Fs="VisuallyHidden",yr=c.forwardRef((e,t)=>g.jsx(M.span,{...e,ref:t,style:{...Is,...e.style}}));yr.displayName=Fs;var js=yr,[nt,Xc]=be("Tooltip",[fr]),Ut=fr(),xr="TooltipProvider",ks=700,yn="tooltip.open",[Ws,br]=nt(xr),Er=e=>{const{__scopeTooltip:t,delayDuration:n=ks,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),g.jsx(Ws,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:i})};Er.displayName=xr;var Sr="Tooltip",[Kc,rt]=nt(Sr),Tt="TooltipTrigger",$s=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=rt(Tt,n),i=br(Tt,n),s=Ut(n),a=c.useRef(null),u=$(t,a,o.onTriggerChange),l=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>l.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(Ls,{asChild:!0,...s,children:g.jsx(M.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:N(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:N(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});$s.displayName=Tt;var Hs="TooltipPortal",[Gc,Vs]=nt(Hs,{forceMount:void 0}),ye="TooltipContent",Cr=c.forwardRef((e,t)=>{const n=Vs(ye,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=rt(ye,e.__scopeTooltip);return g.jsx(ee,{present:r||s.open,children:s.disableHoverableContent?g.jsx(Pr,{side:o,...i,ref:t}):g.jsx(Bs,{side:o,...i,ref:t})})}),Bs=c.forwardRef((e,t)=>{const n=rt(ye,e.__scopeTooltip),r=br(ye,e.__scopeTooltip),o=c.useRef(null),i=$(t,o),[s,a]=c.useState(null),{trigger:u,onClose:l}=n,f=o.current,{onPointerInTransitChange:d}=r,h=c.useCallback(()=>{a(null),d(!1)},[d]),m=c.useCallback((w,p)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},x=Ks(y,v.getBoundingClientRect()),b=Gs(y,x),E=qs(p.getBoundingClientRect()),S=Qs([...b,...E]);a(S),d(!0)},[d]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(u&&f){const w=v=>m(v,f),p=v=>m(v,u);return u.addEventListener("pointerleave",w),f.addEventListener("pointerleave",p),()=>{u.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",p)}}},[u,f,m,h]),c.useEffect(()=>{if(s){const w=p=>{const v=p.target,y={x:p.clientX,y:p.clientY},x=(u==null?void 0:u.contains(v))||(f==null?void 0:f.contains(v)),b=!Zs(y,s);x?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,f,s,l,h]),g.jsx(Pr,{...e,ref:i})}),[Us,zs]=nt(Sr,{isInside:!1}),Ys=Po("TooltipContent"),Pr=c.forwardRef((e,t)=>
vendor: 4,588 bytes, line 1
1{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,u=rt(ye,n),l=Ut(n),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(yn,f),()=>document.removeEventListener(yn,f)),[f]),c.useEffect(()=>{if(u.trigger){const d=h=>{const m=h.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,f]),g.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:g.jsxs(_s,{"data-state":u.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(Ys,{children:r}),g.jsx(Us,{scope:n,isInside:!0,children:g.jsx(js,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Cr.displayName=ye;var Tr="TooltipArrow",Xs=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ut(n);return zs(Tr,n).isInside?null:g.jsx(Ms,{...o,...r,ref:t})});Xs.displayName=Tr;function Ks(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Gs(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qs(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Zs(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],u=t[s],l=a.x,f=a.y,d=u.x,h=u.y;f>r!=h>r&&n<(d-l)*(r-f)/(h-f)+l&&(o=!o)}return o}function Qs(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Js(t)}function Js(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var qc=Er,Zc=Cr,dt="focusScope.autoFocusOnMount",pt="focusScope.autoFocusOnUnmount",xn={bubbles:!1,cancelable:!0},ea="FocusScope",Rr=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,u]=c.useState(null),l=H(o),f=H(i),d=c.useRef(null),h=$(t,p=>u(p)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let p=function(b){if(m.paused||!a)return;const E=b.target;a.contains(E)?d.current=E:ie(d.current,{select:!0})},v=function(b){if(m.paused||!a)return;const E=b.relatedTarget;E!==null&&(a.contains(E)||ie(d.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&ie(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const x=new MutationObserver(y);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),x.disconnect()}}},[r,a,m.paused]),c.useEffect(()=>{if(a){En.add(m);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent(dt,xn);a.addEventListener(dt,l),a.dispatchEvent(y),y.defaultPrevented||(ta(sa(Ar(a)),{select:!0}),document.activeElement===p&&ie(a))}return()=>{a.removeEventListener(dt,l),setTimeout(()=>{const y=new CustomEvent(pt,xn);a.addEventListener(pt,f),a.dispatchEvent(y),y.defaultPrevented||ie(p??document.body,{select:!0}),a.removeEventListener(pt,f),En.remove(m)},0)}}},[a,l,f,m]);const w=c.useCallback(p=>{if(!n&&!r||m.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(v&&y){const x=p.currentTarget,[b,E]=na(x);b&&E?!p.shiftKey&&y===E?(p.preventDefault(),n&&ie(b,{select:!0}
vendor: 4,174 bytes, line 1
1)):p.shiftKey&&y===b&&(p.preventDefault(),n&&ie(E,{select:!0})):y===x&&p.preventDefault()}},[n,r,m.paused]);return g.jsx(M.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});Rr.displayName=ea;function ta(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ie(r,{select:t}),document.activeElement!==n)return}function na(e){const t=Ar(e),n=bn(t,e),r=bn(t.reverse(),e);return[n,r]}function Ar(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bn(e,t){for(const n of e)if(!ra(n,{upTo:t}))return n}function ra(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oa(e){return e instanceof HTMLInputElement&&"select"in e}function ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oa(e)&&t&&e.select()}}var En=ia();function ia(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Sn(e,t),e.unshift(t)},remove(t){var n;e=Sn(e,t),(n=e[0])==null||n.resume()}}}function Sn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sa(e){return e.filter(t=>t.tagName!=="A")}var ht=0;function aa(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cn()),document.body.insertAdjacentElement("beforeend",e[1]??Cn()),ht++,()=>{ht===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ht--}},[])}function Cn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G=function(){return G=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},G.apply(this,arguments)};function Or(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ca(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var He="right-scroll-bar-position",Ve="width-before-scroll-bar",la="with-scroll-bars-hidden",ua="--removed-body-scroll-bar-size";function mt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fa(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var da=typeof window<"u"?c.useLayoutEffect:c.useEffect,Pn=new WeakMap;function pa(e,t){var n=fa(null,function(r){return e.forEach(function(o){return mt(o,r)})});return da(function(){var r=Pn.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||mt(a,null)}),i.forEach(function(a){o.has(a)||mt(a,s)})}Pn.set(n,e)},[e]),n}function ha(e){return e}function ma(e,t){t===void 0&&(t=ha);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var u=function(){var f=s;s=[],f.forEach(i)},l=function(){return Promise.resolve().then(u)};
vendor: 5,488 bytes, lines 1-38
1l(),n={push:function(f){s.push(f),l()},filter:function(f){return s=s.filter(f),n}}}};return o}function va(e){e===void 0&&(e={});var t=ma(null);return t.options=G({async:!0,ssr:!1},e),t}var Dr=function(e){var t=e.sideCar,n=Or(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,G({},n))};Dr.isSideCarExport=!0;function ga(e,t){return e.useMedium(t),Dr}var Nr=va(),vt=function(){},ot=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:vt,onWheelCapture:vt,onTouchMoveCapture:vt}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,u=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,p=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=e.gapMode,E=Or(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,P=pa([n,t]),C=G(G({},E),o);return c.createElement(c.Fragment,null,f&&c.createElement(S,{sideCar:Nr,removeScrollBar:l,shards:d,noRelative:m,noIsolation:w,inert:p,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:b}),s?c.cloneElement(c.Children.only(a),G(G({},C),{ref:P})):c.createElement(x,G({},C,{className:u,ref:P}),a))});ot.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ot.classNames={fullWidth:Ve,zeroRight:He};var wa=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ya(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wa();return t&&e.setAttribute("nonce",t),e}function xa(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ba(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ea=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ya())&&(xa(t,n),ba(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sa=function(){var e=Ea();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Lr=function(){var e=Sa(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ca={left:0,top:0,right:0,gap:0},gt=function(e){return parseInt(e||"",10)||0},Pa=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[gt(n),gt(r),gt(o)]},Ta=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ca;var t=Pa(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ra=Lr(),ge="data-scroll-locked",Aa=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` 2 .`.concat(la,` { 3 overflow: hidden `).concat(r,`; 4 padding-right: `).concat(a,"px ").concat(r,`; 5 } 6 body[`).concat(ge,`] { 7 overflow: hidden `).concat(r,`; 8 overscroll-behavior: contain; 9 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 10 padding-left: `.concat(o,`px; 11 padding-top: `).concat(i,`px; 12 padding-right: `).concat(s,`px; 13 margin-left:0; 14 margin-top:0; 15 margin-right: `).concat(a,"px ").concat(r,`; 16 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` 17 } 18 19 .`).concat(He,` { 20 right: `).concat(a,"px ").concat(r,`; 21 } 22 23 .`).concat(Ve,` { 24 margin-right: `).concat(a,"px ").concat(r,`; 25 } 26 27 .`).concat(He," .").concat(He,` { 28 right: 0 `).concat(r,`; 29 } 30 31 .`).concat(Ve," .").concat(Ve,` { 32 margin-right: 0 `).concat(r,`; 33 } 34 35 body[`).concat(ge,`] { 36 `).concat(ua,": ").concat(a,`px; 37 } 38`)},Tn=function(){var e=parseInt(document.body.getAttribute(ge)||"0",10);return isFinite(e)?e:0},Oa=function(){c.useEffect(function(){return document.body.setAttribute(ge,(Tn()+1).toString()),function(){var e=Tn()-1;e<=0?document.body.removeAttribute(ge):document.body.setAttribute(ge,e.toString())}},[])},Da=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Oa();var i=c.useMemo(function(){return Ta(o)},[o]);return c.createElement(Ra,{styles:Aa(i,!t,o,n?"":"!important")})},Rt=!1;if(typeof window<"u")try{var Fe=Object.defineProperty({},"passive",{get:function(){return Rt=!0,!0}});window.addEventListener("test",Fe,Fe),window.removeEventListener("test",Fe,Fe)}catch{Rt=!1}var pe=Rt?{passive:!1}:!1,Na=function(e){return e.tagName==="TEXTAREA"},_r=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Na(e)&&n[t]==="visible")},La=function(e){return _r(e,"overflowY")},_a=function(e){return _r(e,"overflowX")},Rn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Mr(e,r);if(o){var i=Ir(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ma=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ia=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Mr=function(e,t){return e==="v"?La(t):_a(t)},Ir=function(e,t){return e==="v"?Ma(t):Ia(t)},Fa=function(e,t){return e==="h"&&t==="rtl"?-1:1},ja=function(e,t,n,r,o){var i=Fa(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,u=t.contains(a),l=!1,f=s>0,d=0,h=0;
vendor: 4,628 bytes, lines 38-41
38do{if(!a)break;var m=Ir(e,a),w=m[0],p=m[1],v=m[2],y=p-v-i*w;(w||y)&&Mr(e,a)&&(d+=y,h+=w);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(f&&(Math.abs(d)<1||!o)||!f&&(Math.abs(h)<1||!o))&&(l=!0),l},je=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},An=function(e){return[e.deltaX,e.deltaY]},On=function(e){return e&&"current"in e?e.current:e},ka=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wa=function(e){return` 39 .block-interactivity-`.concat(e,` {pointer-events: none;} 40 .allow-interactivity-`).concat(e,` {pointer-events: all;} 41`)},$a=0,he=[];function Ha(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState($a++)[0],i=c.useState(Lr)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=ca([e.lockRef.current],(e.shards||[]).map(On),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var y=je(p),x=n.current,b="deltaX"in p?p.deltaX:x[0]-y[0],E="deltaY"in p?p.deltaY:x[1]-y[1],S,P=p.target,C=Math.abs(b)>Math.abs(E)?"h":"v";if("touches"in p&&C==="h"&&P.type==="range")return!1;var O=Rn(C,P);if(!O)return!0;if(O?S=C:(S=C==="v"?"h":"v",O=Rn(C,P)),!O)return!1;if(!r.current&&"changedTouches"in p&&(b||E)&&(r.current=S),!S)return!0;var R=r.current||S;return ja(R,v,p,R==="h"?b:E,!0)},[]),u=c.useCallback(function(p){var v=p;if(!(!he.length||he[he.length-1]!==i)){var y="deltaY"in v?An(v):je(v),x=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&ka(S.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var b=(s.current.shards||[]).map(On).filter(Boolean).filter(function(S){return S.contains(v.target)}),E=b.length>0?a(v,b[0]):!s.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),l=c.useCallback(function(p,v,y,x){var b={name:p,delta:v,target:y,should:x,shadowParent:Va(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(E){return E!==b})},1)},[]),f=c.useCallback(function(p){n.current=je(p),r.current=void 0},[]),d=c.useCallback(function(p){l(p.type,An(p),p.target,a(p,e.lockRef.current))},[]),h=c.useCallback(function(p){l(p.type,je(p),p.target,a(p,e.lockRef.current))},[]);c.useEffect(function(){return he.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",u,pe),document.addEventListener("touchmove",u,pe),document.addEventListener("touchstart",f,pe),function(){he=he.filter(function(p){return p!==i}),document.removeEventListener("wheel",u,pe),document.removeEventListener("touchmove",u,pe),document.removeEventListener("touchstart",f,pe)}},[]);var m=e.removeScrollBar,w=e.inert;return c.createElement(c.Fragment,null,w?c.createElement(i,{styles:Wa(o)}):null,m?c.createElement(Da,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Va(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ba=ga(Nr,Ha);var Fr=c.forwardRef(function(e,t){return c.createElement(ot,G({},e,{ref:t,sideCar:Ba}))});Fr.classNames=ot.classNames;var Ua=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},me=new WeakMap,ke=new WeakMap,We={},wt=0,jr=function(e){return e&&(e.host||jr(e.parentNode))},za=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=jr(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ya=function(e,t,n,r){var o=za(t,Array.isArray(e)?e:[e]);We[n]||(We[n]=new WeakMap);var i=We[n],s=[],a=new Set,u=new Set(o),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};o.forEach(l);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))f(h);else try{var m=h.getAttribute(r),w=m!==null&&m!=="false",p=(me.get(h)||0)+1,v=(i.get(h)||0)+1;me.set(h,p),i.set(h,v),s.push(h),p===1&&w&&ke.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};
vendor: 20,623 bytes, lines 41-45
41return f(t),a.clear(),wt++,function(){s.forEach(function(d){var h=me.get(d)-1,m=i.get(d)-1;me.set(d,h),i.set(d,m),h||(ke.has(d)||d.removeAttribute(r),ke.delete(d)),m||d.removeAttribute(n)}),wt--,wt||(me=new WeakMap,me=new WeakMap,ke=new WeakMap,We={})}},Xa=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ua(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Ya(r,o,n,"aria-hidden")):function(){return null}},it="Dialog",[kr,Qc]=be(it),[Ka,K]=kr(it),Wr=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),u=c.useRef(null),[l,f]=jn({prop:r,defaultProp:o??!1,onChange:i,caller:it});return g.jsx(Ka,{scope:t,triggerRef:a,contentRef:u,contentId:lt(),titleId:lt(),descriptionId:lt(),open:l,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:s,children:n})};Wr.displayName=it;var $r="DialogTrigger",Hr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K($r,n),i=$(t,o.triggerRef);return g.jsx(M.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xt(o.open),...r,ref:i,onClick:N(e.onClick,o.onOpenToggle)})});Hr.displayName=$r;var zt="DialogPortal",[Ga,Vr]=kr(zt,{forceMount:void 0}),Br=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=K(zt,t);return g.jsx(Ga,{scope:t,forceMount:n,children:c.Children.map(r,s=>g.jsx(ee,{present:n||i.open,children:g.jsx(Nt,{asChild:!0,container:o,children:s})}))})};Br.displayName=zt;var Xe="DialogOverlay",Ur=c.forwardRef((e,t)=>{const n=Vr(Xe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=K(Xe,e.__scopeDialog);return i.modal?g.jsx(ee,{present:r||i.open,children:g.jsx(Za,{...o,ref:t})}):null});Ur.displayName=Xe;var qa=Te("DialogOverlay.RemoveScroll"),Za=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(Xe,n);return g.jsx(Fr,{as:qa,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(M.div,{"data-state":Xt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ue="DialogContent",zr=c.forwardRef((e,t)=>{const n=Vr(ue,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=K(ue,e.__scopeDialog);return g.jsx(ee,{present:r||i.open,children:i.modal?g.jsx(Qa,{...o,ref:t}):g.jsx(Ja,{...o,ref:t})})});zr.displayName=ue;var Qa=c.forwardRef((e,t)=>{const n=K(ue,e.__scopeDialog),r=c.useRef(null),o=$(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return Xa(i)},[]),g.jsx(Yr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:N(e.onFocusOutside,i=>i.preventDefault())})}),Ja=c.forwardRef((e,t)=>{const n=K(ue,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return g.jsx(Yr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Yr=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=K(ue,n),u=c.useRef(null),l=$(t,u);return aa(),g.jsxs(g.Fragment,{children:[g.jsx(Rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g.jsx(Ze,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Xt(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(ec,{titleId:a.titleId}),g.jsx(nc,{contentRef:u,descriptionId:a.descriptionId})]})]})}),Yt="DialogTitle",Xr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(Yt,n);return g.jsx(M.h2,{id:o.titleId,...r,ref:t})});Xr.displayName=Yt;var Kr="DialogDescription",Gr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(Kr,n);return g.jsx(M.p,{id:o.descriptionId,...r,ref:t})});Gr.displayName=Kr;var qr="DialogClose",Zr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(qr,n);return g.jsx(M.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});Zr.displayName=qr;function Xt(e){return e?"open":"closed"}var Qr="DialogTitleWarning",[Jc,Jr]=Eo(Qr,{contentName:ue,titleName:Yt,docsSlug:"dialog"}),ec=({titleId:e})=>{const t=Jr(Qr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 42 43If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 44 45For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},tc="DialogDescriptionWarning",nc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jr(tc).contentName}}.`;return c.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},el=Wr,tl=Hr,nl=Br,rl=Ur,ol=zr,il=Xr,sl=Gr,al=Zr,rc=Symbol.for("react.lazy"),Ke=Ot[" use ".trim().toString()];function oc(e){return typeof e=="object"&&e!==null&&"then"in e}function eo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===rc&&"_payload"in e&&oc(e._payload)}function ic(e){const t=sc(e),n=c.forwardRef((r,o)=>{let{children:i,...s}=r;eo(i)&&typeof Ke=="function"&&(i=Ke(i._payload));const a=c.Children.toArray(i),u=a.find(cc);if(u){const l=u.props.children,f=a.map(d=>d===u?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:d);return g.jsx(t,{...s,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,f):null})}return g.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function sc(e){const t=c.forwardRef((n,r)=>{let{children:o,...i}=n;if(eo(o)&&typeof Ke=="function"&&(o=Ke(o._payload)),c.isValidElement(o)){const s=uc(o),a=lc(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Dt(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ac=Symbol("radix.slottable");function cc(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ac}function lc(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const u=i(...a);return o(...a),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function uc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dc=fc.reduce((e,t)=>{const n=ic(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(u,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),pc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),hc="VisuallyHidden",mc=c.forwardRef((e,t)=>g.jsx(dc.span,{...e,ref:t,style:{...pc,...e.style}}));mc.displayName=hc;var vc=c.createContext(void 0);function gc(e){const t=c.useContext(vc);return e||t||"ltr"}function wc(e,[t,n]){return Math.min(n,Math.max(t,e))}function yc(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Kt="ScrollArea",[to,cl]=be(Kt),[xc,z]=to(Kt),no=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,u]=c.useState(null),[l,f]=c.useState(null),[d,h]=c.useState(null),[m,w]=c.useState(null),[p,v]=c.useState(null),[y,x]=c.useState(0),[b,E]=c.useState(0),[S,P]=c.useState(!1),[C,O]=c.useState(!1),R=$(t,L=>u(L)),D=gc(o);return g.jsx(xc,{scope:n,type:r,dir:D,scrollHideDelay:i,scrollArea:a,viewport:l,onViewportChange:f,content:d,onContentChange:h,scrollbarX:m,onScrollbarXChange:w,scrollbarXEnabled:S,onScrollbarXEnabledChange:P,scrollbarY:p,onScrollbarYChange:v,scrollbarYEnabled:C,onScrollbarYEnabledChange:O,onCornerWidthChange:x,onCornerHeightChange:E,children:g.jsx(M.div,{dir:D,...s,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});no.displayName=Kt;var ro="ScrollAreaViewport",oo=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=z(ro,n),a=c.useRef(null),u=$(t,a,s.onViewportChange);return g.jsxs(g.Fragment,{children:[g.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:o}),g.jsx(M.div,{"data-radix-scroll-area-viewport":"",...i,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});oo.displayName=ro;var ne="ScrollAreaScrollbar",bc=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ne,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return c.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?g.jsx(Ec,{...r,ref:t,forceMount:n}):o.type==="scroll"?g.jsx(Sc,{...r,ref:t,forceMount:n}):o.type==="auto"?g.jsx(io,{...r,ref:t,forceMount:n}):o.type==="always"?g.jsx(Gt,{...r,ref:t}):null});bc.displayName=ne;var Ec=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ne,e.__scopeScrollArea),[i,s]=c.useState(!1);return c.useEffect(()=>{const a=o.scrollArea;let u=0;if(a){const l=()=>{window.clearTimeout(u),s(!0)},f=()=>{u=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",l),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(u),a.removeEventListener("pointerenter",l),a.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(ee,{present:n||i,children:g.jsx(io,{"data-state":i?"visible":"hidden",...r,ref:t})})}),Sc=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=z(ne,e.__scopeScrollArea),i=e.orientation==="horizontal",s=at(()=>u("SCROLL_END"),100),[a,u]=yc("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(a==="idle"){const l=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(l)}},[a,o.scrollHideDelay,u]),c.useEffect(()=>{const l=o.viewport,f=i?"scrollLeft":"scrollTop";if(l){let d=l[f];const h=()=>{const m=l[f];d!==m&&(u("SCROLL"),s()),d=m};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[o.viewport,i,u,s]),g.jsx(ee,{present:n||a!=="hidden",children:g.jsx(Gt,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:N(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:N(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),io=c.forwardRef((e,t)=>{const n=z(ne,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=c.useState(!1),a=e.orientation==="horizontal",u=at(()=>{if(n.viewport){const l=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?l:f)}},10);return xe(n.viewport,u),xe(n.content,u),g.jsx(ee,{present:r||i,children:g.jsx(Gt,{"data-state":i?"visible":"hidden",...o,ref:t})})}),Gt=c.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=z(ne,e.__scopeScrollArea),i=c.useRef(null),s=c.useRef(0),[a,u]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=lo(a.viewport,a.content),f={...r,sizes:a,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function d(h,m){return Dc(h,s.current,a,m)}return n==="horizontal"?g.jsx(Cc,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const h=o.viewport.scrollLeft,m=Dn(h,a,o.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=d(h,o.dir))}}):n==="vertical"?g.jsx(Pc,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const h=o.viewport.scrollTop,m=Dn(h,a);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=d(h))}}):null}),Cc=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=z(ne,e.__scopeScrollArea),[s,a]=c.useState(),u=c.useRef(null),l=$(t,u,i.onScrollbarXChange);return c.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),g.jsx(ao,{"data-orientation":"horizontal",...o,ref:l,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":st(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const h=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),fo(h,d)&&f.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:qe(s.paddingLeft),paddingEnd:qe(s.paddingRight)}})}})}),Pc=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=z(ne,e.__scopeScrollArea),[s,a]=c.useState(),u=c.useRef(null),l=$(t,u,i.onScrollbarYChange);return c.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),g.jsx(ao,{"data-orientation":"vertical",...o,ref:l,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":st(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const h=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),fo(h,d)&&f.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:qe(s.paddingTop),paddingEnd:qe(s.paddingBottom)}})}})}),[Tc,so]=to(ne),ao=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:f,onResize:d,...h}=e,m=z(ne,n),[w,p]=c.useState(null),v=$(t,R=>p(R)),y=c.useRef(null),x=c.useRef(""),b=m.viewport,E=r.content-r.viewport,S=H(f),P=H(u),C=at(d,10);function O(R){if(y.current){const D=R.clientX-y.current.left,L=R.clientY-y.current.top;l({x:D,y:L})}}return c.useEffect(()=>{const R=D=>{const L=D.target;(w==null?void 0:w.contains(L))&&S(D,E)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[b,w,E,S]),c.useEffect(P,[r,P]),xe(w,C),xe(m.content,C),g.jsx(Tc,{scope:n,scrollbar:w,hasThumb:o,onThumbChange:H(i),onThumbPointerUp:H(s),onThumbPositionChange:P,onThumbPointerDown:H(a),children:g.jsx(M.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:N(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),y.current=w.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),O(R))}),onPointerMove:N(e.onPointerMove,O),onPointerUp:N(e.onPointerUp,R=>{const D=R.target;D.hasPointerCapture(R.pointerId)&&D.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Ge="ScrollAreaThumb",Rc=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=so(Ge,e.__scopeScrollArea);return g.jsx(ee,{present:n||o.hasThumb,children:g.jsx(Ac,{ref:t,...r})})}),Ac=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=z(Ge,n),s=so(Ge,n),{onThumbPositionChange:a}=s,u=$(t,d=>s.onThumbChange(d)),l=c.useRef(void 0),f=at(()=>{l.current&&(l.current(),l.current=void 0)},100);return c.useEffect(()=>{const d=i.viewport;if(d){const h=()=>{if(f(),!l.current){const m=Nc(d,a);l.current=m,a()}};return a(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[i.viewport,f,a]),g.jsx(M.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:N(e.onPointerDownCapture,d=>{const m=d.target.getBoundingClientRect(),w=d.clientX-m.left,p=d.clientY-m.top;s.onThumbPointerDown({x:w,y:p})}),onPointerUp:N(e.onPointerUp,s.onThumbPointerUp)})});Rc.displayName=Ge;var qt="ScrollAreaCorner",co=c.forwardRef((e,t)=>{const n=z(qt,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?g.jsx(Oc,{...e,ref:t}):null});co.displayName=qt;var Oc=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=z(qt,n),[i,s]=c.useState(0),[a,u]=c.useState(0),l=!!(i&&a);return xe(o.scrollbarX,()=>{var d;const f=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(f),u(f)}),xe(o.scrollbarY,()=>{var d;const f=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),l?g.jsx(M.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function qe(e){return e?parseInt(e,10):0}function lo(e,t){const n=e/t;return isNaN(n)?0:n}function st(e){const t=lo(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dc(e,t,n,r="ltr"){const o=st(n),i=o/2,s=t||i,a=o-s,u=n.scrollbar.paddingStart+s,l=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,d=r==="ltr"?[0,f]:[f*-1,0];return uo([u,l],d)(e)}function Dn(e,t,n="ltr"){const r=st(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,u=n==="ltr"?[0,s]:[s*-1,0],l=wc(e,u);return uo([0,s],[0,a])(l)}function uo(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function fo(e,t){return e>0&&e<t}var Nc=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function at(e,t){const n=H(e),r=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),c.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function xe(e,t){const n=H(t);Q(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var ll=no,ul=oo,fl=co,Lc="Separator",Nn="horizontal",_c=["horizontal","vertical"],po=c.forwardRef((e,t)=>{const{decorative:n,orientation:r=Nn,...o}=e,i=Mc(r)?r:Nn,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return g.jsx(M.div,{"data-orientation":i,...a,...o,ref:t})});po.displayName=Lc;function Mc(e){return _c.includes(e)}var dl=po,Ic="Label",ho=c.forwardRef((e,t)=>g.jsx(M.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ho.displayName=Ic;var pl=ho;export{Uc as A,zc as C,Bc as D,rl as O,Wc as P,Hc as R,jc as S,Vc as T,$c as V,Zc as a,qc as b,ll as c,ul as d,fl as e,bc as f,Rc as g,dl as h,mc as i,el as j,tl as k,ol as l,al as m,il as n,sl as o,nl as p,pl as q};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.