@sykoramaros/marosh-components 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/basicComponents/Footer.tsx +2 -2
- package/src/components/basicComponents/MainSidebarLayout.tsx +7 -7
- package/src/index.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,20 +19,20 @@ export declare interface CustomButtonProps extends React.ComponentPropsWithoutRe
|
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export declare const Footer: ({ links, copyright, socialProfiles, className, ...props }:
|
|
22
|
+
export declare const Footer: ({ links, copyright, socialProfiles, className, ...props }: FooterItems) => JSX.Element;
|
|
23
23
|
|
|
24
|
-
export declare interface
|
|
25
|
-
title: string;
|
|
26
|
-
url: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export declare interface FooterProps extends React.ComponentPropsWithoutRef<"footer"> {
|
|
24
|
+
export declare interface FooterItems extends React.ComponentPropsWithoutRef<"footer"> {
|
|
30
25
|
links: FooterLinks[];
|
|
31
26
|
copyright?: string;
|
|
32
27
|
socialProfiles: FooterSocial[];
|
|
33
28
|
className?: string;
|
|
34
29
|
}
|
|
35
30
|
|
|
31
|
+
export declare interface FooterLinks {
|
|
32
|
+
title: string;
|
|
33
|
+
url: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
36
|
export declare interface FooterSocial {
|
|
37
37
|
title: string;
|
|
38
38
|
url: string;
|
|
@@ -52,7 +52,7 @@ export declare interface MainNavProps extends React.ComponentPropsWithoutRef<"he
|
|
|
52
52
|
}>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export declare const MainSidebarLayout: ({ useSidebar, useMainNav, useFooter, appName, navItems,
|
|
55
|
+
export declare const MainSidebarLayout: ({ useSidebar, useMainNav, useFooter, appName, navItems, footerItems, sidebarDefaultOpen, }: MainSidebarLayoutProps) => JSX.Element;
|
|
56
56
|
|
|
57
57
|
export declare interface MainSidebarLayoutProps {
|
|
58
58
|
useSidebar?: boolean;
|
|
@@ -60,7 +60,7 @@ export declare interface MainSidebarLayoutProps {
|
|
|
60
60
|
useFooter?: boolean;
|
|
61
61
|
appName?: string;
|
|
62
62
|
navItems?: NavItem[];
|
|
63
|
-
|
|
63
|
+
footerItems?: FooterItems;
|
|
64
64
|
sidebarDefaultOpen?: boolean;
|
|
65
65
|
children?: React.ReactNode;
|
|
66
66
|
}
|
package/dist/index.js
CHANGED
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For 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},lc="DialogDescriptionWarning",uc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mo(lc).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},dc=xo,fc=wo,pc=Co,hc=Eo,mc=So,vc=Oo,gc=To,xc=No;function Do({...e}){return u.jsx(dc,{"data-slot":"sheet",...e})}function yc({...e}){return u.jsx(fc,{"data-slot":"sheet-trigger",...e})}function wc({...e}){return u.jsx(pc,{"data-slot":"sheet-portal",...e})}function bc({className:e,...t}){return u.jsx(hc,{"data-slot":"sheet-overlay",className:A("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Io({className:e,children:t,side:n="right",...r}){return u.jsxs(wc,{children:[u.jsx(bc,{}),u.jsxs(mc,{"data-slot":"sheet-content",className:A("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,u.jsxs(xc,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[u.jsx(gn.XIcon,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Cc({className:e,...t}){return u.jsx("div",{"data-slot":"sheet-header",className:A("flex flex-col gap-1.5 p-4",e),...t})}function Ec({className:e,...t}){return u.jsx(vc,{"data-slot":"sheet-title",className:A("text-foreground font-semibold",e),...t})}function Sc({className:e,...t}){return u.jsx(gc,{"data-slot":"sheet-description",className:A("text-muted-foreground text-sm",e),...t})}const ln=({navItems:e,LinkComponent:t="a",className:n,...r})=>u.jsxs("header",{className:A(n),...r,children:[u.jsx("nav",{className:"hidden sm:flex sticky top-0 z-10 items-center px-4 h-14",children:u.jsx(ta,{children:u.jsx(na,{children:e.map(o=>u.jsx(ra,{children:u.jsx(sa,{asChild:!0,className:oa(),children:u.jsxs(t,{to:o.url,className:"flex items-center",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{children:o.title})]})})},o.title))})})}),u.jsx("nav",{className:"flex sm:hidden",children:u.jsxs(Do,{children:[u.jsx(yc,{asChild:!0,children:u.jsx(bt,{variant:"ghost",size:"icon",children:u.jsx(gn.Menu,{})})}),u.jsx(Io,{side:"top",className:"p-8",children:u.jsx("div",{className:"flex flex-col gap-4",children:e.map(o=>u.jsxs(t,{to:o.url,className:"flex items-center gap-2",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{className:"text-base font-medium",children:o.title})]},o.title))})})]})})]}),un=({links:e,copyright:t,socialProfiles:n,className:r,...o})=>u.jsx("footer",{className:A(r),...o,children:u.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 bg-background py-8 border-t",children:[u.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:n.map(i=>u.jsx(bt,{variant:"secondary",size:"icon",className:"rounded-xl",children:u.jsx("a",{href:i.url,children:i.icon&&u.jsx(i.icon,{})})},i.title))}),u.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:e.map(i=>{const s=i.url;return u.jsx("a",{href:s,children:i.title},i.title)})}),u.jsx("div",{className:"text-muted",children:t})]})}),Yt=768;function Rc(){const[e,t]=c.useState(void 0);return c.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Yt-1}px)`),r=()=>{t(window.innerWidth<Yt)};return n.addEventListener("change",r),t(window.innerWidth<Yt),()=>n.removeEventListener("change",r)},[]),!!e}const Oc=["top","right","bottom","left"],ve=Math.min,U=Math.max,vt=Math.round,ot=Math.floor,se=e=>({x:e,y:e}),_c={left:"right",right:"left",bottom:"top",top:"bottom"},Tc={start:"end",end:"start"};function dn(e,t,n){return U(e,ve(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function Ie(e){return e.split("-")[1]}function Nn(e){return e==="x"?"y":"x"}function An(e){return e==="y"?"height":"width"}const Pc=new Set(["top","bottom"]);function oe(e){return Pc.has(fe(e))?"y":"x"}function Mn(e){return Nn(oe(e))}function Nc(e,t,n){n===void 0&&(n=!1);const r=Ie(e),o=Mn(e),i=An(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=gt(s)),[s,gt(s)]}function Ac(e){const t=gt(e);return[fn(e),t,fn(t)]}function fn(e){return e.replace(/start|end/g,t=>Tc[t])}const xr=["left","right"],yr=["right","left"],Mc=["top","bottom"],Dc=["bottom","top"];function Ic(e,t,n){switch(e){case"top":case"bottom":return n?t?yr:xr:t?xr:yr;case"left":case"right":return t?Mc:Dc;default:return[]}}function jc(e,t,n,r){const o=Ie(e);let i=Ic(fe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(fn)))),i}function gt(e){return e.replace(/left|right|bottom|top/g,t=>_c[t])}function Lc(e){return{top:0,right:0,bottom:0,left:0,...e}}function jo(e){return typeof e!="number"?Lc(e):{top:e,right:e,bottom:e,left:e}}function xt(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 wr(e,t,n){let{reference:r,floating:o}=e;const i=oe(t),s=Mn(t),a=An(s),f=fe(t),d=i==="y",l=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let h;switch(f){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(Ie(t)){case"start":h[s]-=v*(n&&d?-1:1);break;case"end":h[s]+=v*(n&&d?-1:1);break}return h}const kc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:p}=wr(d,r,f),v=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:y,fn:x}=a[m],{x:C,y:w,data:b,reset:E}=await x({x:l,y:p,initialPlacement:r,placement:v,strategy:o,middlewareData:h,rects:d,platform:s,elements:{reference:e,floating:t}});l=C??l,p=w??p,h={...h,[y]:{...h[y],...b}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:l,y:p}=wr(d,v,f)),m=-1)}return{x:l,y:p,placement:v,strategy:o,middlewareData:h}};async function Ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:l="viewport",elementContext:p="floating",altBoundary:v=!1,padding:h=0}=de(t,e),g=jo(h),y=a[v?p==="floating"?"reference":"floating":p],x=xt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:l,strategy:f})),C=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=xt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:w,strategy:f}):C);return{top:(x.top-E.top+g.top)/b.y,bottom:(E.bottom-x.bottom+g.bottom)/b.y,left:(x.left-E.left+g.left)/b.x,right:(E.right-x.right+g.right)/b.x}}const Fc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:f}=t,{element:d,padding:l=0}=de(e,t)||{};if(d==null)return{};const p=jo(l),v={x:n,y:r},h=Mn(o),g=An(h),m=await s.getDimensions(d),y=h==="y",x=y?"top":"left",C=y?"bottom":"right",w=y?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[h]-v[h]-i.floating[g],E=v[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let R=S?S[w]:0;(!R||!await(s.isElement==null?void 0:s.isElement(S)))&&(R=a.floating[w]||i.floating[g]);const _=b/2-E/2,O=R/2-m[g]/2-1,T=ve(p[x],O),M=ve(p[C],O),L=T,k=R-m[g]-M,j=R/2-m[g]/2+_,H=dn(L,j,k),F=!f.arrow&&Ie(o)!=null&&j!==H&&i.reference[g]/2-(j<L?T:M)-m[g]/2<0,$=F?j<L?j-L:j-k:0;return{[h]:v[h]+$,data:{[h]:H,centerOffset:j-H-$,...F&&{alignmentOffset:$}},reset:F}}}),$c=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:f,elements:d}=t,{mainAxis:l=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=de(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=fe(o),C=oe(a),w=fe(a)===a,b=await(f.isRTL==null?void 0:f.isRTL(d.floating)),E=v||(w||!m?[gt(a)]:Ac(a)),S=g!=="none";!v&&S&&E.push(...jc(a,m,g,b));const R=[a,...E],_=await Ve(t,y),O=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&O.push(_[x]),p){const j=Nc(o,s,b);O.push(_[j[0]],_[j[1]])}if(T=[...T,{placement:o,overflows:O}],!O.every(j=>j<=0)){var M,L;const j=(((M=i.flip)==null?void 0:M.index)||0)+1,H=R[j];if(H&&(!(p==="alignment"?C!==oe(H):!1)||T.every(P=>oe(P.placement)===C?P.overflows[0]>0:!0)))return{data:{index:j,overflows:T},reset:{placement:H}};let F=(L=T.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!F)switch(h){case"bestFit":{var k;const $=(k=T.filter(P=>{if(S){const z=oe(P.placement);return z===C||z==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(z=>z>0).reduce((z,q)=>z+q,0)]).sort((P,z)=>P[1]-z[1])[0])==null?void 0:k[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cr(e){return Oc.some(t=>e[t]>=0)}const Wc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=de(e,t);switch(r){case"referenceHidden":{const i=await Ve(t,{...o,elementContext:"reference"}),s=br(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Cr(s)}}}case"escaped":{const i=await Ve(t,{...o,altBoundary:!0}),s=br(i,n.floating);return{data:{escapedOffsets:s,escaped:Cr(s)}}}default:return{}}}}},Lo=new Set(["left","top"]);async function Vc(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=fe(n),a=Ie(n),f=oe(n)==="y",d=Lo.has(s)?-1:1,l=i&&f?-1:1,p=de(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),f?{x:h*l,y:v*d}:{x:v*d,y:h*l}}const zc=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,f=await Vc(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:i+f.y,data:{...f,placement:s}}}}},Bc=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:y=>{let{x,y:C}=y;return{x,y:C}}},...f}=de(e,t),d={x:n,y:r},l=await Ve(t,f),p=oe(fe(o)),v=Nn(p);let h=d[v],g=d[p];if(i){const y=v==="y"?"top":"left",x=v==="y"?"bottom":"right",C=h+l[y],w=h-l[x];h=dn(C,h,w)}if(s){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=g+l[y],w=g-l[x];g=dn(C,g,w)}const m=a.fn({...t,[v]:h,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[v]:i,[p]:s}}}}}},Hc=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:f=!0,crossAxis:d=!0}=de(e,t),l={x:n,y:r},p=oe(o),v=Nn(p);let h=l[v],g=l[p];const m=de(a,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(f){const w=v==="y"?"height":"width",b=i.reference[v]-i.floating[w]+y.mainAxis,E=i.reference[v]+i.reference[w]-y.mainAxis;h<b?h=b:h>E&&(h=E)}if(d){var x,C;const w=v==="y"?"width":"height",b=Lo.has(fe(o)),E=i.reference[p]-i.floating[w]+(b&&((x=s.offset)==null?void 0:x[p])||0)+(b?0:y.crossAxis),S=i.reference[p]+i.reference[w]+(b?0:((C=s.offset)==null?void 0:C[p])||0)-(b?y.crossAxis:0);g<E?g=E:g>S&&(g=S)}return{[v]:h,[p]:g}}}},Kc=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:f=()=>{},...d}=de(e,t),l=await Ve(t,d),p=fe(o),v=Ie(o),h=oe(o)==="y",{width:g,height:m}=i.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=v===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(x=p,y=v==="end"?"top":"bottom");const C=m-l.top-l.bottom,w=g-l.left-l.right,b=ve(m-l[y],C),E=ve(g-l[x],w),S=!t.middlewareData.shift;let R=b,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=C),S&&!v){const T=U(l.left,0),M=U(l.right,0),L=U(l.top,0),k=U(l.bottom,0);h?_=g-2*(T!==0||M!==0?T+M:U(l.left,l.right)):R=m-2*(L!==0||k!==0?L+k:U(l.top,l.bottom))}await f({...t,availableWidth:_,availableHeight:R});const O=await s.getDimensions(a.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function Ot(){return typeof window<"u"}function je(e){return ko(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function le(e){var t;return(t=(ko(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ko(e){return Ot()?e instanceof Node||e instanceof G(e).Node:!1}function Q(e){return Ot()?e instanceof Element||e instanceof G(e).Element:!1}function ae(e){return Ot()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function Er(e){return!Ot()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}const Uc=new Set(["inline","contents"]);function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Uc.has(o)}const Gc=new Set(["table","td","th"]);function Yc(e){return Gc.has(je(e))}const qc=[":popover-open",":modal"];function _t(e){return qc.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xc=["transform","translate","scale","rotate","perspective"],Zc=["transform","translate","scale","rotate","perspective","filter"],Jc=["paint","layout","strict","content"];function Dn(e){const t=In(),n=Q(e)?ee(e):e;return Xc.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)||Zc.some(r=>(n.willChange||"").includes(r))||Jc.some(r=>(n.contain||"").includes(r))}function Qc(e){let t=ge(e);for(;ae(t)&&!Me(t);){if(Dn(t))return t;if(_t(t))return null;t=ge(t)}return null}function In(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const el=new Set(["html","body","#document"]);function Me(e){return el.has(je(e))}function ee(e){return G(e).getComputedStyle(e)}function Tt(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if(je(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Er(e)&&e.host||le(e);return Er(t)?t.host:t}function Fo(e){const t=ge(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&Ke(t)?t:Fo(t)}function ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Fo(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=G(o);if(i){const a=pn(s);return t.concat(s,s.visualViewport||[],Ke(o)?o:[],a&&n?ze(a):[])}return t.concat(o,ze(o,[],n))}function pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $o(e){const t=ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ae(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vt(n)!==i||vt(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function jn(e){return Q(e)?e:e.contextElement}function Ne(e){const t=jn(e);if(!ae(t))return se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=$o(t);let s=(i?vt(n.width):n.width)/r,a=(i?vt(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const tl=se(0);function Wo(e){const t=G(e);return!In()||!t.visualViewport?tl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G(e)?!1:t}function Ce(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=jn(e);let s=se(1);t&&(r?Q(r)&&(s=Ne(r)):s=Ne(e));const a=nl(i,n,r)?Wo(i):se(0);let f=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,l=o.width/s.x,p=o.height/s.y;if(i){const v=G(i),h=r&&Q(r)?G(r):r;let g=v,m=pn(g);for(;m&&r&&h!==g;){const y=Ne(m),x=m.getBoundingClientRect(),C=ee(m),w=x.left+(m.clientLeft+parseFloat(C.paddingLeft))*y.x,b=x.top+(m.clientTop+parseFloat(C.paddingTop))*y.y;f*=y.x,d*=y.y,l*=y.x,p*=y.y,f+=w,d+=b,g=G(m),m=pn(g)}}return xt({width:l,height:p,x:f,y:d})}function Pt(e,t){const n=Tt(e).scrollLeft;return t?t.left+n:Ce(le(e)).left+n}function Vo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Pt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function rl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=le(r),a=t?_t(t.floating):!1;if(r===s||a&&i)return n;let f={scrollLeft:0,scrollTop:0},d=se(1);const l=se(0),p=ae(r);if((p||!p&&!i)&&((je(r)!=="body"||Ke(s))&&(f=Tt(r)),ae(r))){const h=Ce(r);d=Ne(r),l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}const v=s&&!p&&!i?Vo(s,f):se(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+l.x+v.x,y:n.y*d.y-f.scrollTop*d.y+l.y+v.y}}function ol(e){return Array.from(e.getClientRects())}function il(e){const t=le(e),n=Tt(e),r=e.ownerDocument.body,o=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Pt(e);const a=-n.scrollTop;return ee(r).direction==="rtl"&&(s+=U(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sr=25;function sl(e,t){const n=G(e),r=le(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,f=0;if(o){i=o.width,s=o.height;const l=In();(!l||l&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}const d=Pt(r);if(d<=0){const l=r.ownerDocument,p=l.body,v=getComputedStyle(p),h=l.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,g=Math.abs(r.clientWidth-p.clientWidth-h);g<=Sr&&(i-=g)}else d<=Sr&&(i+=d);return{width:i,height:s,x:a,y:f}}const al=new Set(["absolute","fixed"]);function cl(e,t){const n=Ce(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ae(e)?Ne(e):se(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,f=o*i.x,d=r*i.y;return{width:s,height:a,x:f,y:d}}function Rr(e,t,n){let r;if(t==="viewport")r=sl(e,n);else if(t==="document")r=il(le(e));else if(Q(t))r=cl(t,n);else{const o=Wo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xt(r)}function zo(e,t){const n=ge(e);return n===t||!Q(n)||Me(n)?!1:ee(n).position==="fixed"||zo(n,t)}function ll(e,t){const n=t.get(e);if(n)return n;let r=ze(e,[],!1).filter(a=>Q(a)&&je(a)!=="body"),o=null;const i=ee(e).position==="fixed";let s=i?ge(e):e;for(;Q(s)&&!Me(s);){const a=ee(s),f=Dn(s);!f&&a.position==="fixed"&&(o=null),(i?!f&&!o:!f&&a.position==="static"&&!!o&&al.has(o.position)||Ke(s)&&!f&&zo(e,s))?r=r.filter(l=>l!==s):o=a,s=ge(s)}return t.set(e,r),r}function ul(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_t(t)?[]:ll(t,this._c):[].concat(n),r],a=s[0],f=s.reduce((d,l)=>{const p=Rr(t,l,o);return d.top=U(p.top,d.top),d.right=ve(p.right,d.right),d.bottom=ve(p.bottom,d.bottom),d.left=U(p.left,d.left),d},Rr(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function dl(e){const{width:t,height:n}=$o(e);return{width:t,height:n}}function fl(e,t,n){const r=ae(t),o=le(t),i=n==="fixed",s=Ce(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const f=se(0);function d(){f.x=Pt(o)}if(r||!r&&!i)if((je(t)!=="body"||Ke(o))&&(a=Tt(t)),r){const h=Ce(t,!0,i,t);f.x=h.x+t.clientLeft,f.y=h.y+t.clientTop}else o&&d();i&&!r&&o&&d();const l=o&&!r&&!i?Vo(o,a):se(0),p=s.left+a.scrollLeft-f.x-l.x,v=s.top+a.scrollTop-f.y-l.y;return{x:p,y:v,width:s.width,height:s.height}}function qt(e){return ee(e).position==="static"}function Or(e,t){if(!ae(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return le(e)===n&&(n=n.ownerDocument.body),n}function Bo(e,t){const n=G(e);if(_t(e))return n;if(!ae(e)){let o=ge(e);for(;o&&!Me(o);){if(Q(o)&&!qt(o))return o;o=ge(o)}return n}let r=Or(e,t);for(;r&&Yc(r)&&qt(r);)r=Or(r,t);return r&&Me(r)&&qt(r)&&!Dn(r)?n:r||Qc(e)||n}const pl=async function(e){const t=this.getOffsetParent||Bo,n=this.getDimensions,r=await n(e.floating);return{reference:fl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hl(e){return ee(e).direction==="rtl"}const ml={convertOffsetParentRelativeRectToViewportRelativeRect:rl,getDocumentElement:le,getClippingRect:ul,getOffsetParent:Bo,getElementRects:pl,getClientRects:ol,getDimensions:dl,getScale:Ne,isElement:Q,isRTL:hl};function Ho(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vl(e,t){let n=null,r;const o=le(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),i();const d=e.getBoundingClientRect(),{left:l,top:p,width:v,height:h}=d;if(a||t(),!v||!h)return;const g=ot(p),m=ot(o.clientWidth-(l+v)),y=ot(o.clientHeight-(p+h)),x=ot(l),w={rootMargin:-g+"px "+-m+"px "+-y+"px "+-x+"px",threshold:U(0,ve(1,f))||1};let b=!0;function E(S){const R=S[0].intersectionRatio;if(R!==f){if(!b)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Ho(d,e.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),i}function gl(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:f=!1}=r,d=jn(e),l=o||i?[...d?ze(d):[],...ze(t)]:[];l.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=d&&a?vl(d,n):null;let v=-1,h=null;s&&(h=new ResizeObserver(x=>{let[C]=x;C&&C.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),d&&!f&&h.observe(d),h.observe(t));let g,m=f?Ce(e):null;f&&y();function y(){const x=Ce(e);m&&!Ho(m,x)&&n(),m=x,g=requestAnimationFrame(y)}return n(),()=>{var x;l.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),p?.(),(x=h)==null||x.disconnect(),h=null,f&&cancelAnimationFrame(g)}}const xl=zc,yl=Bc,wl=$c,bl=Kc,Cl=Wc,_r=Fc,El=Hc,Sl=(e,t,n)=>{const r=new Map,o={platform:ml,...n},i={...o.platform,_c:r};return kc(e,t,{...o,platform:i})};var Rl=typeof document<"u",Ol=function(){},lt=Rl?W.useLayoutEffect:Ol;function yt(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(!yt(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)&&!yt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ko(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tr(e,t){const n=Ko(e);return Math.round(t*n)/n}function Xt(e){const t=c.useRef(e);return lt(()=>{t.current=e}),t}function _l(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:f,open:d}=e,[l,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=c.useState(r);yt(v,r)||h(r);const[g,m]=c.useState(null),[y,x]=c.useState(null),C=c.useCallback(P=>{P!==S.current&&(S.current=P,m(P))},[]),w=c.useCallback(P=>{P!==R.current&&(R.current=P,x(P))},[]),b=i||g,E=s||y,S=c.useRef(null),R=c.useRef(null),_=c.useRef(l),O=f!=null,T=Xt(f),M=Xt(o),L=Xt(d),k=c.useCallback(()=>{if(!S.current||!R.current)return;const P={placement:t,strategy:n,middleware:v};M.current&&(P.platform=M.current),Sl(S.current,R.current,P).then(z=>{const q={...z,isPositioned:L.current!==!1};j.current&&!yt(_.current,q)&&(_.current=q,Nr.flushSync(()=>{p(q)}))})},[v,t,n,M,L]);lt(()=>{d===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[d]);const j=c.useRef(!1);lt(()=>(j.current=!0,()=>{j.current=!1}),[]),lt(()=>{if(b&&(S.current=b),E&&(R.current=E),b&&E){if(T.current)return T.current(b,E,k);k()}},[b,E,k,T,O]);const H=c.useMemo(()=>({reference:S,floating:R,setReference:C,setFloating:w}),[C,w]),F=c.useMemo(()=>({reference:b,floating:E}),[b,E]),$=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const z=Tr(F.floating,l.x),q=Tr(F.floating,l.y);return a?{...P,transform:"translate("+z+"px, "+q+"px)",...Ko(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,F.floating,l.x,l.y]);return c.useMemo(()=>({...l,update:k,refs:H,elements:F,floatingStyles:$}),[l,k,H,F,$])}const Tl=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?_r({element:r.current,padding:o}).fn(n):{}:r?_r({element:r,padding:o}).fn(n):{}}}},Pl=(e,t)=>({...xl(e),options:[e,t]}),Nl=(e,t)=>({...yl(e),options:[e,t]}),Al=(e,t)=>({...El(e),options:[e,t]}),Ml=(e,t)=>({...wl(e),options:[e,t]}),Dl=(e,t)=>({...bl(e),options:[e,t]}),Il=(e,t)=>({...Cl(e),options:[e,t]}),jl=(e,t)=>({...Tl(e),options:[e,t]});var Ll="Arrow",Uo=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return u.jsx(I.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Uo.displayName=Ll;var kl=Uo;function Fl(e){const[t,n]=c.useState(void 0);return J(()=>{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 f=i.borderBoxSize,d=Array.isArray(f)?f[0]:f;s=d.inlineSize,a=d.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 Ln="Popper",[Go,Yo]=He(Ln),[$l,qo]=Go(Ln),Xo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return u.jsx($l,{scope:t,anchor:r,onAnchorChange:o,children:n})};Xo.displayName=Ln;var Zo="PopperAnchor",Jo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qo(Zo,n),s=c.useRef(null),a=V(t,s),f=c.useRef(null);return c.useEffect(()=>{const d=f.current;f.current=r?.current||s.current,d!==f.current&&i.onAnchorChange(f.current)}),r?null:u.jsx(I.div,{...o,ref:a})});Jo.displayName=Zo;var kn="PopperContent",[Wl,Vl]=Go(kn),Qo=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=e,y=qo(kn,n),[x,C]=c.useState(null),w=V(t,ne=>C(ne)),[b,E]=c.useState(null),S=Fl(b),R=S?.width??0,_=S?.height??0,O=r+(i!=="center"?"-"+i:""),T=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},M=Array.isArray(d)?d:[d],L=M.length>0,k={padding:T,boundary:M.filter(Bl),altBoundary:L},{refs:j,floatingStyles:H,placement:F,isPositioned:$,middlewareData:P}=_l({strategy:"fixed",placement:O,whileElementsMounted:(...ne)=>gl(...ne,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[Pl({mainAxis:o+_,alignmentAxis:s}),f&&Nl({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Al():void 0,...k}),f&&Ml({...k}),Dl({...k,apply:({elements:ne,rects:we,availableWidth:pe,availableHeight:Le})=>{const{width:ke,height:ue}=we.reference,Se=ne.floating.style;Se.setProperty("--radix-popper-available-width",`${pe}px`),Se.setProperty("--radix-popper-available-height",`${Le}px`),Se.setProperty("--radix-popper-anchor-width",`${ke}px`),Se.setProperty("--radix-popper-anchor-height",`${ue}px`)}}),b&&jl({element:b,padding:a}),Hl({arrowWidth:R,arrowHeight:_}),v&&Il({strategy:"referenceHidden",...k})]}),[z,q]=ni(F),Mt=K(g);J(()=>{$&&Mt?.()},[$,Mt]);const Ge=P.arrow?.x,Dt=P.arrow?.y,Ye=P.arrow?.centerOffset!==0,[ye,X]=c.useState();return J(()=>{x&&X(window.getComputedStyle(x).zIndex)},[x]),u.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Wl,{scope:n,placedSide:z,onArrowChange:E,arrowX:Ge,arrowY:Dt,shouldHideArrow:Ye,children:u.jsx(I.div,{"data-side":z,"data-align":q,...m,ref:w,style:{...m.style,animation:$?void 0:"none"}})})})});Qo.displayName=kn;var ei="PopperArrow",zl={top:"bottom",right:"left",bottom:"top",left:"right"},ti=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Vl(ei,r),s=zl[i.placedSide];return u.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:u.jsx(kl,{...o,ref:n,style:{...o.style,display:"block"}})})});ti.displayName=ei;function Bl(e){return e!==null}var Hl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[d,l]=ni(n),p={start:"0%",center:"50%",end:"100%"}[l],v=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+f/2;let g="",m="";return d==="bottom"?(g=s?p:`${v}px`,m=`${-f}px`):d==="top"?(g=s?p:`${v}px`,m=`${r.floating.height+f}px`):d==="right"?(g=`${-f}px`,m=s?p:`${h}px`):d==="left"&&(g=`${r.floating.width+f}px`,m=s?p:`${h}px`),{data:{x:g,y:m}}}});function ni(e){const[t,n="center"]=e.split("-");return[t,n]}var Kl=Xo,Ul=Jo,Gl=Qo,Yl=ti,[Nt]=He("Tooltip",[Yo]),At=Yo(),ri="TooltipProvider",ql=700,hn="tooltip.open",[Xl,Fn]=Nt(ri),oi=e=>{const{__scopeTooltip:t,delayDuration:n=ql,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),f=c.useRef(0);return c.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),u.jsx(Xl,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(f.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:i})};oi.displayName=ri;var Be="Tooltip",[Zl,Ue]=Nt(Be),ii=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,f=Fn(Be,e.__scopeTooltip),d=At(t),[l,p]=c.useState(null),v=Te(),h=c.useRef(0),g=s??f.disableHoverableContent,m=a??f.delayDuration,y=c.useRef(!1),[x,C]=Ct({prop:r,defaultProp:o??!1,onChange:R=>{R?(f.onOpen(),document.dispatchEvent(new CustomEvent(hn))):f.onClose(),i?.(R)},caller:Be}),w=c.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),b=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,C(!0)},[C]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),S=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,C(!0),h.current=0},m)},[m,C]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(Kl,{...d,children:u.jsx(Zl,{scope:t,contentId:v,open:x,stateAttribute:w,trigger:l,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{f.isOpenDelayedRef.current?S():b()},[f.isOpenDelayedRef,S,b]),onTriggerLeave:c.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:b,onClose:E,disableHoverableContent:g,children:n})})};ii.displayName=Be;var mn="TooltipTrigger",si=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ue(mn,n),i=Fn(mn,n),s=At(n),a=c.useRef(null),f=V(t,a,o.onTriggerChange),d=c.useRef(!1),l=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(Ul,{asChild:!0,...s,children:u.jsx(I.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:f,onPointerMove:N(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:N(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});si.displayName=mn;var $n="TooltipPortal",[Jl,Ql]=Nt($n,{forceMount:void 0}),ai=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Ue($n,t);return u.jsx(Jl,{scope:t,forceMount:n,children:u.jsx(ce,{present:n||i.open,children:u.jsx(On,{asChild:!0,container:o,children:r})})})};ai.displayName=$n;var De="TooltipContent",ci=c.forwardRef((e,t)=>{const n=Ql(De,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Ue(De,e.__scopeTooltip);return u.jsx(ce,{present:r||s.open,children:s.disableHoverableContent?u.jsx(li,{side:o,...i,ref:t}):u.jsx(eu,{side:o,...i,ref:t})})}),eu=c.forwardRef((e,t)=>{const n=Ue(De,e.__scopeTooltip),r=Fn(De,e.__scopeTooltip),o=c.useRef(null),i=V(t,o),[s,a]=c.useState(null),{trigger:f,onClose:d}=n,l=o.current,{onPointerInTransitChange:p}=r,v=c.useCallback(()=>{a(null),p(!1)},[p]),h=c.useCallback((g,m)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},C=ou(x,y.getBoundingClientRect()),w=iu(x,C),b=su(m.getBoundingClientRect()),E=cu([...w,...b]);a(E),p(!0)},[p]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(f&&l){const g=y=>h(y,l),m=y=>h(y,f);return f.addEventListener("pointerleave",g),l.addEventListener("pointerleave",m),()=>{f.removeEventListener("pointerleave",g),l.removeEventListener("pointerleave",m)}}},[f,l,h,v]),c.useEffect(()=>{if(s){const g=m=>{const y=m.target,x={x:m.clientX,y:m.clientY},C=f?.contains(y)||l?.contains(y),w=!au(x,s);C?v():w&&(v(),d())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[f,l,s,d,v]),u.jsx(li,{...e,ref:i})}),[tu,nu]=Nt(Be,{isInside:!1}),ru=me.createSlottable("TooltipContent"),li=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,f=Ue(De,n),d=At(n),{onClose:l}=f;return c.useEffect(()=>(document.addEventListener(hn,l),()=>document.removeEventListener(hn,l)),[l]),c.useEffect(()=>{if(f.trigger){const p=v=>{v.target?.contains(f.trigger)&&l()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[f.trigger,l]),u.jsx(Et,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:l,children:u.jsxs(Gl,{"data-state":f.stateAttribute,...d,...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:[u.jsx(ru,{children:r}),u.jsx(tu,{scope:n,isInside:!0,children:u.jsx(Br,{id:f.contentId,role:"tooltip",children:o||r})})]})})});ci.displayName=De;var ui="TooltipArrow",di=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=At(n);return nu(ui,n).isInside?null:u.jsx(Yl,{...o,...r,ref:t})});di.displayName=ui;function ou(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 iu(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 su(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 au(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],f=t[s],d=a.x,l=a.y,p=f.x,v=f.y;l>r!=v>r&&n<(p-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function cu(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),lu(t)}function lu(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 uu=oi,du=ii,fu=si,pu=ai,hu=ci,mu=di;function fi({delayDuration:e=0,...t}){return u.jsx(uu,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function vu({...e}){return u.jsx(fi,{children:u.jsx(du,{"data-slot":"tooltip",...e})})}function gu({...e}){return u.jsx(fu,{"data-slot":"tooltip-trigger",...e})}function xu({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(pu,{children:u.jsxs(hu,{"data-slot":"tooltip-content",sideOffset:t,className:A("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,u.jsx(mu,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const yu="sidebar_state",wu=3600*24*7,bu="16rem",Cu="18rem",Eu="3rem",Su="b",pi=c.createContext(null);function Wn(){const e=c.useContext(pi);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Ru({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s}){const a=Rc(),[f,d]=c.useState(!1),[l,p]=c.useState(e),v=t??l,h=c.useCallback(x=>{const C=typeof x=="function"?x(v):x;n?n(C):p(C),document.cookie=`${yu}=${C}; path=/; max-age=${wu}`},[n,v]),g=c.useCallback(()=>a?d(x=>!x):h(x=>!x),[a,h,d]);c.useEffect(()=>{const x=C=>{C.key===Su&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),g())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[g]);const m=v?"expanded":"collapsed",y=c.useMemo(()=>({state:m,open:v,setOpen:h,isMobile:a,openMobile:f,setOpenMobile:d,toggleSidebar:g}),[m,v,h,a,f,d,g]);return u.jsx(pi.Provider,{value:y,children:u.jsx(fi,{delayDuration:0,children:u.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":bu,"--sidebar-width-icon":Eu,...o},className:A("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...s,children:i})})})}function Ou({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i}){const{isMobile:s,state:a,openMobile:f,setOpenMobile:d}=Wn();return n==="none"?u.jsx("div",{"data-slot":"sidebar",className:A("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...i,children:o}):s?u.jsx(Do,{open:f,onOpenChange:d,...i,children:u.jsxs(Io,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Cu},side:e,children:[u.jsxs(Cc,{className:"sr-only",children:[u.jsx(Ec,{children:"Sidebar"}),u.jsx(Sc,{children:"Displays the mobile sidebar."})]}),u.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):u.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":a,"data-collapsible":a==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[u.jsx("div",{"data-slot":"sidebar-gap",className:A("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{"data-slot":"sidebar-container",className:A("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:u.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function _u({className:e,onClick:t,...n}){const{toggleSidebar:r}=Wn();return u.jsxs(bt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:A("size-7",e),onClick:o=>{t?.(o),r()},...n,children:[u.jsx(gn.PanelLeftIcon,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Tu({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:A("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Pu({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:A("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Nu({className:e,asChild:t=!1,...n}){const r=t?me.Slot:"div";return u.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:A("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function Au({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:A("w-full text-sm",e),...t})}function Mu({className:e,...t}){return u.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:A("flex w-full min-w-0 flex-col gap-1",e),...t})}function Du({className:e,...t}){return u.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:A("group/menu-item relative",e),...t})}const Iu=vn.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ju({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s}){const a=e?me.Slot:"button",{isMobile:f,state:d}=Wn(),l=u.jsx(a,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:A(Iu({variant:n,size:r}),i),...s});return o?(typeof o=="string"&&(o={children:o}),u.jsxs(vu,{children:[u.jsx(gu,{asChild:!0,children:l}),u.jsx(xu,{side:"right",align:"center",hidden:d!=="collapsed"||f,...o})]})):l}const Lu=({useSidebar:e=!1,useMainNav:t=!1,useFooter:n=!1,appName:r="App",navItems:o=[],footerProps:i,sidebarDefaultOpen:s=!0})=>e?u.jsx(Ru,{defaultOpen:s,children:u.jsxs("div",{className:"flex min-h-screen w-full",children:[u.jsx(Ou,{children:u.jsx(Tu,{children:u.jsxs(Pu,{children:[u.jsx(Nu,{className:"h-14",children:u.jsx("span",{className:"text-md font-medium",children:r})}),u.jsx(Au,{children:u.jsx(Mu,{children:o.map(a=>u.jsx(Du,{children:u.jsx(ju,{asChild:!0,children:u.jsxs(Lr,{to:a.url,children:[a.icon&&u.jsx("span",{className:"inline-flex h-5 w-5 shrink-0 items-center",children:u.jsx(a.icon,{className:"h-full w-full"})}),u.jsx("span",{className:"text-base font-medium",children:a.title})]})})},a.title))})})]})})}),u.jsxs("div",{className:"flex-1 flex flex-col",children:[u.jsxs("header",{className:"sticky top-0 z-10 flex items-center border-b bg-background px-4 h-14 gap-2",children:[u.jsx(_u,{}),t&&u.jsx(ln,{navItems:o})]}),u.jsx("main",{className:"flex-1 p-6",children:u.jsx(Qt,{})}),n&&i&&u.jsx("footer",{children:u.jsx(un,{...i})})]})]})}):u.jsxs("div",{className:"flex-1 flex min-h-screen flex-col",children:[t&&u.jsx(ln,{navItems:o}),u.jsx("main",{className:"flex-1 p-5",children:u.jsx(Qt,{})}),n&&i&&u.jsx("footer",{children:u.jsx(un,{...i})})]});exports.CustomButton=as;exports.Footer=un;exports.Link=Lr;exports.MainNav=ln;exports.MainSidebarLayout=Lu;exports.cn=A;
|
|
45
|
+
For 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},lc="DialogDescriptionWarning",uc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mo(lc).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},dc=xo,fc=wo,pc=Co,hc=Eo,mc=So,vc=Oo,gc=To,xc=No;function Do({...e}){return u.jsx(dc,{"data-slot":"sheet",...e})}function yc({...e}){return u.jsx(fc,{"data-slot":"sheet-trigger",...e})}function wc({...e}){return u.jsx(pc,{"data-slot":"sheet-portal",...e})}function bc({className:e,...t}){return u.jsx(hc,{"data-slot":"sheet-overlay",className:A("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Io({className:e,children:t,side:n="right",...r}){return u.jsxs(wc,{children:[u.jsx(bc,{}),u.jsxs(mc,{"data-slot":"sheet-content",className:A("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,u.jsxs(xc,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[u.jsx(gn.XIcon,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Cc({className:e,...t}){return u.jsx("div",{"data-slot":"sheet-header",className:A("flex flex-col gap-1.5 p-4",e),...t})}function Ec({className:e,...t}){return u.jsx(vc,{"data-slot":"sheet-title",className:A("text-foreground font-semibold",e),...t})}function Sc({className:e,...t}){return u.jsx(gc,{"data-slot":"sheet-description",className:A("text-muted-foreground text-sm",e),...t})}const ln=({navItems:e,LinkComponent:t="a",className:n,...r})=>u.jsxs("header",{className:A(n),...r,children:[u.jsx("nav",{className:"hidden sm:flex sticky top-0 z-10 items-center px-4 h-14",children:u.jsx(ta,{children:u.jsx(na,{children:e.map(o=>u.jsx(ra,{children:u.jsx(sa,{asChild:!0,className:oa(),children:u.jsxs(t,{to:o.url,className:"flex items-center",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{children:o.title})]})})},o.title))})})}),u.jsx("nav",{className:"flex sm:hidden",children:u.jsxs(Do,{children:[u.jsx(yc,{asChild:!0,children:u.jsx(bt,{variant:"ghost",size:"icon",children:u.jsx(gn.Menu,{})})}),u.jsx(Io,{side:"top",className:"p-8",children:u.jsx("div",{className:"flex flex-col gap-4",children:e.map(o=>u.jsxs(t,{to:o.url,className:"flex items-center gap-2",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{className:"text-base font-medium",children:o.title})]},o.title))})})]})})]}),un=({links:e,copyright:t,socialProfiles:n,className:r,...o})=>u.jsx("footer",{className:A(r),...o,children:u.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 bg-background py-8 border-t",children:[u.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:n.map(i=>u.jsx(bt,{variant:"secondary",size:"icon",className:"rounded-xl",children:u.jsx("a",{href:i.url,children:i.icon&&u.jsx(i.icon,{})})},i.title))}),u.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:e.map(i=>{const s=i.url;return u.jsx("a",{href:s,children:i.title},i.title)})}),u.jsx("div",{className:"text-muted",children:t})]})}),Yt=768;function Rc(){const[e,t]=c.useState(void 0);return c.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Yt-1}px)`),r=()=>{t(window.innerWidth<Yt)};return n.addEventListener("change",r),t(window.innerWidth<Yt),()=>n.removeEventListener("change",r)},[]),!!e}const Oc=["top","right","bottom","left"],ve=Math.min,U=Math.max,vt=Math.round,ot=Math.floor,se=e=>({x:e,y:e}),_c={left:"right",right:"left",bottom:"top",top:"bottom"},Tc={start:"end",end:"start"};function dn(e,t,n){return U(e,ve(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function Ie(e){return e.split("-")[1]}function Nn(e){return e==="x"?"y":"x"}function An(e){return e==="y"?"height":"width"}const Pc=new Set(["top","bottom"]);function oe(e){return Pc.has(fe(e))?"y":"x"}function Mn(e){return Nn(oe(e))}function Nc(e,t,n){n===void 0&&(n=!1);const r=Ie(e),o=Mn(e),i=An(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=gt(s)),[s,gt(s)]}function Ac(e){const t=gt(e);return[fn(e),t,fn(t)]}function fn(e){return e.replace(/start|end/g,t=>Tc[t])}const xr=["left","right"],yr=["right","left"],Mc=["top","bottom"],Dc=["bottom","top"];function Ic(e,t,n){switch(e){case"top":case"bottom":return n?t?yr:xr:t?xr:yr;case"left":case"right":return t?Mc:Dc;default:return[]}}function jc(e,t,n,r){const o=Ie(e);let i=Ic(fe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(fn)))),i}function gt(e){return e.replace(/left|right|bottom|top/g,t=>_c[t])}function Lc(e){return{top:0,right:0,bottom:0,left:0,...e}}function jo(e){return typeof e!="number"?Lc(e):{top:e,right:e,bottom:e,left:e}}function xt(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 wr(e,t,n){let{reference:r,floating:o}=e;const i=oe(t),s=Mn(t),a=An(s),f=fe(t),d=i==="y",l=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let h;switch(f){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(Ie(t)){case"start":h[s]-=v*(n&&d?-1:1);break;case"end":h[s]+=v*(n&&d?-1:1);break}return h}const kc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:p}=wr(d,r,f),v=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:y,fn:x}=a[m],{x:C,y:w,data:b,reset:E}=await x({x:l,y:p,initialPlacement:r,placement:v,strategy:o,middlewareData:h,rects:d,platform:s,elements:{reference:e,floating:t}});l=C??l,p=w??p,h={...h,[y]:{...h[y],...b}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:l,y:p}=wr(d,v,f)),m=-1)}return{x:l,y:p,placement:v,strategy:o,middlewareData:h}};async function Ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:l="viewport",elementContext:p="floating",altBoundary:v=!1,padding:h=0}=de(t,e),g=jo(h),y=a[v?p==="floating"?"reference":"floating":p],x=xt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:l,strategy:f})),C=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=xt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:w,strategy:f}):C);return{top:(x.top-E.top+g.top)/b.y,bottom:(E.bottom-x.bottom+g.bottom)/b.y,left:(x.left-E.left+g.left)/b.x,right:(E.right-x.right+g.right)/b.x}}const Fc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:f}=t,{element:d,padding:l=0}=de(e,t)||{};if(d==null)return{};const p=jo(l),v={x:n,y:r},h=Mn(o),g=An(h),m=await s.getDimensions(d),y=h==="y",x=y?"top":"left",C=y?"bottom":"right",w=y?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[h]-v[h]-i.floating[g],E=v[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let R=S?S[w]:0;(!R||!await(s.isElement==null?void 0:s.isElement(S)))&&(R=a.floating[w]||i.floating[g]);const _=b/2-E/2,O=R/2-m[g]/2-1,T=ve(p[x],O),M=ve(p[C],O),L=T,k=R-m[g]-M,j=R/2-m[g]/2+_,H=dn(L,j,k),F=!f.arrow&&Ie(o)!=null&&j!==H&&i.reference[g]/2-(j<L?T:M)-m[g]/2<0,$=F?j<L?j-L:j-k:0;return{[h]:v[h]+$,data:{[h]:H,centerOffset:j-H-$,...F&&{alignmentOffset:$}},reset:F}}}),$c=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:f,elements:d}=t,{mainAxis:l=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=de(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=fe(o),C=oe(a),w=fe(a)===a,b=await(f.isRTL==null?void 0:f.isRTL(d.floating)),E=v||(w||!m?[gt(a)]:Ac(a)),S=g!=="none";!v&&S&&E.push(...jc(a,m,g,b));const R=[a,...E],_=await Ve(t,y),O=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&O.push(_[x]),p){const j=Nc(o,s,b);O.push(_[j[0]],_[j[1]])}if(T=[...T,{placement:o,overflows:O}],!O.every(j=>j<=0)){var M,L;const j=(((M=i.flip)==null?void 0:M.index)||0)+1,H=R[j];if(H&&(!(p==="alignment"?C!==oe(H):!1)||T.every(P=>oe(P.placement)===C?P.overflows[0]>0:!0)))return{data:{index:j,overflows:T},reset:{placement:H}};let F=(L=T.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!F)switch(h){case"bestFit":{var k;const $=(k=T.filter(P=>{if(S){const z=oe(P.placement);return z===C||z==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(z=>z>0).reduce((z,q)=>z+q,0)]).sort((P,z)=>P[1]-z[1])[0])==null?void 0:k[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cr(e){return Oc.some(t=>e[t]>=0)}const Wc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=de(e,t);switch(r){case"referenceHidden":{const i=await Ve(t,{...o,elementContext:"reference"}),s=br(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Cr(s)}}}case"escaped":{const i=await Ve(t,{...o,altBoundary:!0}),s=br(i,n.floating);return{data:{escapedOffsets:s,escaped:Cr(s)}}}default:return{}}}}},Lo=new Set(["left","top"]);async function Vc(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=fe(n),a=Ie(n),f=oe(n)==="y",d=Lo.has(s)?-1:1,l=i&&f?-1:1,p=de(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),f?{x:h*l,y:v*d}:{x:v*d,y:h*l}}const zc=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,f=await Vc(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:i+f.y,data:{...f,placement:s}}}}},Bc=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:y=>{let{x,y:C}=y;return{x,y:C}}},...f}=de(e,t),d={x:n,y:r},l=await Ve(t,f),p=oe(fe(o)),v=Nn(p);let h=d[v],g=d[p];if(i){const y=v==="y"?"top":"left",x=v==="y"?"bottom":"right",C=h+l[y],w=h-l[x];h=dn(C,h,w)}if(s){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=g+l[y],w=g-l[x];g=dn(C,g,w)}const m=a.fn({...t,[v]:h,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[v]:i,[p]:s}}}}}},Hc=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:f=!0,crossAxis:d=!0}=de(e,t),l={x:n,y:r},p=oe(o),v=Nn(p);let h=l[v],g=l[p];const m=de(a,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(f){const w=v==="y"?"height":"width",b=i.reference[v]-i.floating[w]+y.mainAxis,E=i.reference[v]+i.reference[w]-y.mainAxis;h<b?h=b:h>E&&(h=E)}if(d){var x,C;const w=v==="y"?"width":"height",b=Lo.has(fe(o)),E=i.reference[p]-i.floating[w]+(b&&((x=s.offset)==null?void 0:x[p])||0)+(b?0:y.crossAxis),S=i.reference[p]+i.reference[w]+(b?0:((C=s.offset)==null?void 0:C[p])||0)-(b?y.crossAxis:0);g<E?g=E:g>S&&(g=S)}return{[v]:h,[p]:g}}}},Kc=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:f=()=>{},...d}=de(e,t),l=await Ve(t,d),p=fe(o),v=Ie(o),h=oe(o)==="y",{width:g,height:m}=i.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=v===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(x=p,y=v==="end"?"top":"bottom");const C=m-l.top-l.bottom,w=g-l.left-l.right,b=ve(m-l[y],C),E=ve(g-l[x],w),S=!t.middlewareData.shift;let R=b,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=C),S&&!v){const T=U(l.left,0),M=U(l.right,0),L=U(l.top,0),k=U(l.bottom,0);h?_=g-2*(T!==0||M!==0?T+M:U(l.left,l.right)):R=m-2*(L!==0||k!==0?L+k:U(l.top,l.bottom))}await f({...t,availableWidth:_,availableHeight:R});const O=await s.getDimensions(a.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function Ot(){return typeof window<"u"}function je(e){return ko(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function le(e){var t;return(t=(ko(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ko(e){return Ot()?e instanceof Node||e instanceof G(e).Node:!1}function Q(e){return Ot()?e instanceof Element||e instanceof G(e).Element:!1}function ae(e){return Ot()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function Er(e){return!Ot()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}const Uc=new Set(["inline","contents"]);function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Uc.has(o)}const Gc=new Set(["table","td","th"]);function Yc(e){return Gc.has(je(e))}const qc=[":popover-open",":modal"];function _t(e){return qc.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xc=["transform","translate","scale","rotate","perspective"],Zc=["transform","translate","scale","rotate","perspective","filter"],Jc=["paint","layout","strict","content"];function Dn(e){const t=In(),n=Q(e)?ee(e):e;return Xc.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)||Zc.some(r=>(n.willChange||"").includes(r))||Jc.some(r=>(n.contain||"").includes(r))}function Qc(e){let t=ge(e);for(;ae(t)&&!Me(t);){if(Dn(t))return t;if(_t(t))return null;t=ge(t)}return null}function In(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const el=new Set(["html","body","#document"]);function Me(e){return el.has(je(e))}function ee(e){return G(e).getComputedStyle(e)}function Tt(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if(je(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Er(e)&&e.host||le(e);return Er(t)?t.host:t}function Fo(e){const t=ge(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&Ke(t)?t:Fo(t)}function ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Fo(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=G(o);if(i){const a=pn(s);return t.concat(s,s.visualViewport||[],Ke(o)?o:[],a&&n?ze(a):[])}return t.concat(o,ze(o,[],n))}function pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $o(e){const t=ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ae(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vt(n)!==i||vt(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function jn(e){return Q(e)?e:e.contextElement}function Ne(e){const t=jn(e);if(!ae(t))return se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=$o(t);let s=(i?vt(n.width):n.width)/r,a=(i?vt(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const tl=se(0);function Wo(e){const t=G(e);return!In()||!t.visualViewport?tl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G(e)?!1:t}function Ce(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=jn(e);let s=se(1);t&&(r?Q(r)&&(s=Ne(r)):s=Ne(e));const a=nl(i,n,r)?Wo(i):se(0);let f=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,l=o.width/s.x,p=o.height/s.y;if(i){const v=G(i),h=r&&Q(r)?G(r):r;let g=v,m=pn(g);for(;m&&r&&h!==g;){const y=Ne(m),x=m.getBoundingClientRect(),C=ee(m),w=x.left+(m.clientLeft+parseFloat(C.paddingLeft))*y.x,b=x.top+(m.clientTop+parseFloat(C.paddingTop))*y.y;f*=y.x,d*=y.y,l*=y.x,p*=y.y,f+=w,d+=b,g=G(m),m=pn(g)}}return xt({width:l,height:p,x:f,y:d})}function Pt(e,t){const n=Tt(e).scrollLeft;return t?t.left+n:Ce(le(e)).left+n}function Vo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Pt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function rl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=le(r),a=t?_t(t.floating):!1;if(r===s||a&&i)return n;let f={scrollLeft:0,scrollTop:0},d=se(1);const l=se(0),p=ae(r);if((p||!p&&!i)&&((je(r)!=="body"||Ke(s))&&(f=Tt(r)),ae(r))){const h=Ce(r);d=Ne(r),l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}const v=s&&!p&&!i?Vo(s,f):se(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+l.x+v.x,y:n.y*d.y-f.scrollTop*d.y+l.y+v.y}}function ol(e){return Array.from(e.getClientRects())}function il(e){const t=le(e),n=Tt(e),r=e.ownerDocument.body,o=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Pt(e);const a=-n.scrollTop;return ee(r).direction==="rtl"&&(s+=U(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sr=25;function sl(e,t){const n=G(e),r=le(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,f=0;if(o){i=o.width,s=o.height;const l=In();(!l||l&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}const d=Pt(r);if(d<=0){const l=r.ownerDocument,p=l.body,v=getComputedStyle(p),h=l.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,g=Math.abs(r.clientWidth-p.clientWidth-h);g<=Sr&&(i-=g)}else d<=Sr&&(i+=d);return{width:i,height:s,x:a,y:f}}const al=new Set(["absolute","fixed"]);function cl(e,t){const n=Ce(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ae(e)?Ne(e):se(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,f=o*i.x,d=r*i.y;return{width:s,height:a,x:f,y:d}}function Rr(e,t,n){let r;if(t==="viewport")r=sl(e,n);else if(t==="document")r=il(le(e));else if(Q(t))r=cl(t,n);else{const o=Wo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xt(r)}function zo(e,t){const n=ge(e);return n===t||!Q(n)||Me(n)?!1:ee(n).position==="fixed"||zo(n,t)}function ll(e,t){const n=t.get(e);if(n)return n;let r=ze(e,[],!1).filter(a=>Q(a)&&je(a)!=="body"),o=null;const i=ee(e).position==="fixed";let s=i?ge(e):e;for(;Q(s)&&!Me(s);){const a=ee(s),f=Dn(s);!f&&a.position==="fixed"&&(o=null),(i?!f&&!o:!f&&a.position==="static"&&!!o&&al.has(o.position)||Ke(s)&&!f&&zo(e,s))?r=r.filter(l=>l!==s):o=a,s=ge(s)}return t.set(e,r),r}function ul(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_t(t)?[]:ll(t,this._c):[].concat(n),r],a=s[0],f=s.reduce((d,l)=>{const p=Rr(t,l,o);return d.top=U(p.top,d.top),d.right=ve(p.right,d.right),d.bottom=ve(p.bottom,d.bottom),d.left=U(p.left,d.left),d},Rr(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function dl(e){const{width:t,height:n}=$o(e);return{width:t,height:n}}function fl(e,t,n){const r=ae(t),o=le(t),i=n==="fixed",s=Ce(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const f=se(0);function d(){f.x=Pt(o)}if(r||!r&&!i)if((je(t)!=="body"||Ke(o))&&(a=Tt(t)),r){const h=Ce(t,!0,i,t);f.x=h.x+t.clientLeft,f.y=h.y+t.clientTop}else o&&d();i&&!r&&o&&d();const l=o&&!r&&!i?Vo(o,a):se(0),p=s.left+a.scrollLeft-f.x-l.x,v=s.top+a.scrollTop-f.y-l.y;return{x:p,y:v,width:s.width,height:s.height}}function qt(e){return ee(e).position==="static"}function Or(e,t){if(!ae(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return le(e)===n&&(n=n.ownerDocument.body),n}function Bo(e,t){const n=G(e);if(_t(e))return n;if(!ae(e)){let o=ge(e);for(;o&&!Me(o);){if(Q(o)&&!qt(o))return o;o=ge(o)}return n}let r=Or(e,t);for(;r&&Yc(r)&&qt(r);)r=Or(r,t);return r&&Me(r)&&qt(r)&&!Dn(r)?n:r||Qc(e)||n}const pl=async function(e){const t=this.getOffsetParent||Bo,n=this.getDimensions,r=await n(e.floating);return{reference:fl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hl(e){return ee(e).direction==="rtl"}const ml={convertOffsetParentRelativeRectToViewportRelativeRect:rl,getDocumentElement:le,getClippingRect:ul,getOffsetParent:Bo,getElementRects:pl,getClientRects:ol,getDimensions:dl,getScale:Ne,isElement:Q,isRTL:hl};function Ho(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vl(e,t){let n=null,r;const o=le(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),i();const d=e.getBoundingClientRect(),{left:l,top:p,width:v,height:h}=d;if(a||t(),!v||!h)return;const g=ot(p),m=ot(o.clientWidth-(l+v)),y=ot(o.clientHeight-(p+h)),x=ot(l),w={rootMargin:-g+"px "+-m+"px "+-y+"px "+-x+"px",threshold:U(0,ve(1,f))||1};let b=!0;function E(S){const R=S[0].intersectionRatio;if(R!==f){if(!b)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Ho(d,e.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),i}function gl(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:f=!1}=r,d=jn(e),l=o||i?[...d?ze(d):[],...ze(t)]:[];l.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=d&&a?vl(d,n):null;let v=-1,h=null;s&&(h=new ResizeObserver(x=>{let[C]=x;C&&C.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),d&&!f&&h.observe(d),h.observe(t));let g,m=f?Ce(e):null;f&&y();function y(){const x=Ce(e);m&&!Ho(m,x)&&n(),m=x,g=requestAnimationFrame(y)}return n(),()=>{var x;l.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),p?.(),(x=h)==null||x.disconnect(),h=null,f&&cancelAnimationFrame(g)}}const xl=zc,yl=Bc,wl=$c,bl=Kc,Cl=Wc,_r=Fc,El=Hc,Sl=(e,t,n)=>{const r=new Map,o={platform:ml,...n},i={...o.platform,_c:r};return kc(e,t,{...o,platform:i})};var Rl=typeof document<"u",Ol=function(){},lt=Rl?W.useLayoutEffect:Ol;function yt(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(!yt(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)&&!yt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ko(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tr(e,t){const n=Ko(e);return Math.round(t*n)/n}function Xt(e){const t=c.useRef(e);return lt(()=>{t.current=e}),t}function _l(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:f,open:d}=e,[l,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=c.useState(r);yt(v,r)||h(r);const[g,m]=c.useState(null),[y,x]=c.useState(null),C=c.useCallback(P=>{P!==S.current&&(S.current=P,m(P))},[]),w=c.useCallback(P=>{P!==R.current&&(R.current=P,x(P))},[]),b=i||g,E=s||y,S=c.useRef(null),R=c.useRef(null),_=c.useRef(l),O=f!=null,T=Xt(f),M=Xt(o),L=Xt(d),k=c.useCallback(()=>{if(!S.current||!R.current)return;const P={placement:t,strategy:n,middleware:v};M.current&&(P.platform=M.current),Sl(S.current,R.current,P).then(z=>{const q={...z,isPositioned:L.current!==!1};j.current&&!yt(_.current,q)&&(_.current=q,Nr.flushSync(()=>{p(q)}))})},[v,t,n,M,L]);lt(()=>{d===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[d]);const j=c.useRef(!1);lt(()=>(j.current=!0,()=>{j.current=!1}),[]),lt(()=>{if(b&&(S.current=b),E&&(R.current=E),b&&E){if(T.current)return T.current(b,E,k);k()}},[b,E,k,T,O]);const H=c.useMemo(()=>({reference:S,floating:R,setReference:C,setFloating:w}),[C,w]),F=c.useMemo(()=>({reference:b,floating:E}),[b,E]),$=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const z=Tr(F.floating,l.x),q=Tr(F.floating,l.y);return a?{...P,transform:"translate("+z+"px, "+q+"px)",...Ko(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,F.floating,l.x,l.y]);return c.useMemo(()=>({...l,update:k,refs:H,elements:F,floatingStyles:$}),[l,k,H,F,$])}const Tl=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?_r({element:r.current,padding:o}).fn(n):{}:r?_r({element:r,padding:o}).fn(n):{}}}},Pl=(e,t)=>({...xl(e),options:[e,t]}),Nl=(e,t)=>({...yl(e),options:[e,t]}),Al=(e,t)=>({...El(e),options:[e,t]}),Ml=(e,t)=>({...wl(e),options:[e,t]}),Dl=(e,t)=>({...bl(e),options:[e,t]}),Il=(e,t)=>({...Cl(e),options:[e,t]}),jl=(e,t)=>({...Tl(e),options:[e,t]});var Ll="Arrow",Uo=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return u.jsx(I.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Uo.displayName=Ll;var kl=Uo;function Fl(e){const[t,n]=c.useState(void 0);return J(()=>{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 f=i.borderBoxSize,d=Array.isArray(f)?f[0]:f;s=d.inlineSize,a=d.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 Ln="Popper",[Go,Yo]=He(Ln),[$l,qo]=Go(Ln),Xo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return u.jsx($l,{scope:t,anchor:r,onAnchorChange:o,children:n})};Xo.displayName=Ln;var Zo="PopperAnchor",Jo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qo(Zo,n),s=c.useRef(null),a=V(t,s),f=c.useRef(null);return c.useEffect(()=>{const d=f.current;f.current=r?.current||s.current,d!==f.current&&i.onAnchorChange(f.current)}),r?null:u.jsx(I.div,{...o,ref:a})});Jo.displayName=Zo;var kn="PopperContent",[Wl,Vl]=Go(kn),Qo=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=e,y=qo(kn,n),[x,C]=c.useState(null),w=V(t,ne=>C(ne)),[b,E]=c.useState(null),S=Fl(b),R=S?.width??0,_=S?.height??0,O=r+(i!=="center"?"-"+i:""),T=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},M=Array.isArray(d)?d:[d],L=M.length>0,k={padding:T,boundary:M.filter(Bl),altBoundary:L},{refs:j,floatingStyles:H,placement:F,isPositioned:$,middlewareData:P}=_l({strategy:"fixed",placement:O,whileElementsMounted:(...ne)=>gl(...ne,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[Pl({mainAxis:o+_,alignmentAxis:s}),f&&Nl({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Al():void 0,...k}),f&&Ml({...k}),Dl({...k,apply:({elements:ne,rects:we,availableWidth:pe,availableHeight:Le})=>{const{width:ke,height:ue}=we.reference,Se=ne.floating.style;Se.setProperty("--radix-popper-available-width",`${pe}px`),Se.setProperty("--radix-popper-available-height",`${Le}px`),Se.setProperty("--radix-popper-anchor-width",`${ke}px`),Se.setProperty("--radix-popper-anchor-height",`${ue}px`)}}),b&&jl({element:b,padding:a}),Hl({arrowWidth:R,arrowHeight:_}),v&&Il({strategy:"referenceHidden",...k})]}),[z,q]=ni(F),Mt=K(g);J(()=>{$&&Mt?.()},[$,Mt]);const Ge=P.arrow?.x,Dt=P.arrow?.y,Ye=P.arrow?.centerOffset!==0,[ye,X]=c.useState();return J(()=>{x&&X(window.getComputedStyle(x).zIndex)},[x]),u.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Wl,{scope:n,placedSide:z,onArrowChange:E,arrowX:Ge,arrowY:Dt,shouldHideArrow:Ye,children:u.jsx(I.div,{"data-side":z,"data-align":q,...m,ref:w,style:{...m.style,animation:$?void 0:"none"}})})})});Qo.displayName=kn;var ei="PopperArrow",zl={top:"bottom",right:"left",bottom:"top",left:"right"},ti=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Vl(ei,r),s=zl[i.placedSide];return u.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:u.jsx(kl,{...o,ref:n,style:{...o.style,display:"block"}})})});ti.displayName=ei;function Bl(e){return e!==null}var Hl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[d,l]=ni(n),p={start:"0%",center:"50%",end:"100%"}[l],v=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+f/2;let g="",m="";return d==="bottom"?(g=s?p:`${v}px`,m=`${-f}px`):d==="top"?(g=s?p:`${v}px`,m=`${r.floating.height+f}px`):d==="right"?(g=`${-f}px`,m=s?p:`${h}px`):d==="left"&&(g=`${r.floating.width+f}px`,m=s?p:`${h}px`),{data:{x:g,y:m}}}});function ni(e){const[t,n="center"]=e.split("-");return[t,n]}var Kl=Xo,Ul=Jo,Gl=Qo,Yl=ti,[Nt]=He("Tooltip",[Yo]),At=Yo(),ri="TooltipProvider",ql=700,hn="tooltip.open",[Xl,Fn]=Nt(ri),oi=e=>{const{__scopeTooltip:t,delayDuration:n=ql,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),f=c.useRef(0);return c.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),u.jsx(Xl,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(f.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:i})};oi.displayName=ri;var Be="Tooltip",[Zl,Ue]=Nt(Be),ii=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,f=Fn(Be,e.__scopeTooltip),d=At(t),[l,p]=c.useState(null),v=Te(),h=c.useRef(0),g=s??f.disableHoverableContent,m=a??f.delayDuration,y=c.useRef(!1),[x,C]=Ct({prop:r,defaultProp:o??!1,onChange:R=>{R?(f.onOpen(),document.dispatchEvent(new CustomEvent(hn))):f.onClose(),i?.(R)},caller:Be}),w=c.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),b=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,C(!0)},[C]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),S=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,C(!0),h.current=0},m)},[m,C]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(Kl,{...d,children:u.jsx(Zl,{scope:t,contentId:v,open:x,stateAttribute:w,trigger:l,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{f.isOpenDelayedRef.current?S():b()},[f.isOpenDelayedRef,S,b]),onTriggerLeave:c.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:b,onClose:E,disableHoverableContent:g,children:n})})};ii.displayName=Be;var mn="TooltipTrigger",si=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ue(mn,n),i=Fn(mn,n),s=At(n),a=c.useRef(null),f=V(t,a,o.onTriggerChange),d=c.useRef(!1),l=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(Ul,{asChild:!0,...s,children:u.jsx(I.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:f,onPointerMove:N(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:N(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});si.displayName=mn;var $n="TooltipPortal",[Jl,Ql]=Nt($n,{forceMount:void 0}),ai=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Ue($n,t);return u.jsx(Jl,{scope:t,forceMount:n,children:u.jsx(ce,{present:n||i.open,children:u.jsx(On,{asChild:!0,container:o,children:r})})})};ai.displayName=$n;var De="TooltipContent",ci=c.forwardRef((e,t)=>{const n=Ql(De,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Ue(De,e.__scopeTooltip);return u.jsx(ce,{present:r||s.open,children:s.disableHoverableContent?u.jsx(li,{side:o,...i,ref:t}):u.jsx(eu,{side:o,...i,ref:t})})}),eu=c.forwardRef((e,t)=>{const n=Ue(De,e.__scopeTooltip),r=Fn(De,e.__scopeTooltip),o=c.useRef(null),i=V(t,o),[s,a]=c.useState(null),{trigger:f,onClose:d}=n,l=o.current,{onPointerInTransitChange:p}=r,v=c.useCallback(()=>{a(null),p(!1)},[p]),h=c.useCallback((g,m)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},C=ou(x,y.getBoundingClientRect()),w=iu(x,C),b=su(m.getBoundingClientRect()),E=cu([...w,...b]);a(E),p(!0)},[p]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(f&&l){const g=y=>h(y,l),m=y=>h(y,f);return f.addEventListener("pointerleave",g),l.addEventListener("pointerleave",m),()=>{f.removeEventListener("pointerleave",g),l.removeEventListener("pointerleave",m)}}},[f,l,h,v]),c.useEffect(()=>{if(s){const g=m=>{const y=m.target,x={x:m.clientX,y:m.clientY},C=f?.contains(y)||l?.contains(y),w=!au(x,s);C?v():w&&(v(),d())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[f,l,s,d,v]),u.jsx(li,{...e,ref:i})}),[tu,nu]=Nt(Be,{isInside:!1}),ru=me.createSlottable("TooltipContent"),li=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,f=Ue(De,n),d=At(n),{onClose:l}=f;return c.useEffect(()=>(document.addEventListener(hn,l),()=>document.removeEventListener(hn,l)),[l]),c.useEffect(()=>{if(f.trigger){const p=v=>{v.target?.contains(f.trigger)&&l()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[f.trigger,l]),u.jsx(Et,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:l,children:u.jsxs(Gl,{"data-state":f.stateAttribute,...d,...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:[u.jsx(ru,{children:r}),u.jsx(tu,{scope:n,isInside:!0,children:u.jsx(Br,{id:f.contentId,role:"tooltip",children:o||r})})]})})});ci.displayName=De;var ui="TooltipArrow",di=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=At(n);return nu(ui,n).isInside?null:u.jsx(Yl,{...o,...r,ref:t})});di.displayName=ui;function ou(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 iu(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 su(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 au(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],f=t[s],d=a.x,l=a.y,p=f.x,v=f.y;l>r!=v>r&&n<(p-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function cu(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),lu(t)}function lu(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 uu=oi,du=ii,fu=si,pu=ai,hu=ci,mu=di;function fi({delayDuration:e=0,...t}){return u.jsx(uu,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function vu({...e}){return u.jsx(fi,{children:u.jsx(du,{"data-slot":"tooltip",...e})})}function gu({...e}){return u.jsx(fu,{"data-slot":"tooltip-trigger",...e})}function xu({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(pu,{children:u.jsxs(hu,{"data-slot":"tooltip-content",sideOffset:t,className:A("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,u.jsx(mu,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const yu="sidebar_state",wu=3600*24*7,bu="16rem",Cu="18rem",Eu="3rem",Su="b",pi=c.createContext(null);function Wn(){const e=c.useContext(pi);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Ru({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s}){const a=Rc(),[f,d]=c.useState(!1),[l,p]=c.useState(e),v=t??l,h=c.useCallback(x=>{const C=typeof x=="function"?x(v):x;n?n(C):p(C),document.cookie=`${yu}=${C}; path=/; max-age=${wu}`},[n,v]),g=c.useCallback(()=>a?d(x=>!x):h(x=>!x),[a,h,d]);c.useEffect(()=>{const x=C=>{C.key===Su&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),g())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[g]);const m=v?"expanded":"collapsed",y=c.useMemo(()=>({state:m,open:v,setOpen:h,isMobile:a,openMobile:f,setOpenMobile:d,toggleSidebar:g}),[m,v,h,a,f,d,g]);return u.jsx(pi.Provider,{value:y,children:u.jsx(fi,{delayDuration:0,children:u.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":bu,"--sidebar-width-icon":Eu,...o},className:A("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...s,children:i})})})}function Ou({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i}){const{isMobile:s,state:a,openMobile:f,setOpenMobile:d}=Wn();return n==="none"?u.jsx("div",{"data-slot":"sidebar",className:A("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...i,children:o}):s?u.jsx(Do,{open:f,onOpenChange:d,...i,children:u.jsxs(Io,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Cu},side:e,children:[u.jsxs(Cc,{className:"sr-only",children:[u.jsx(Ec,{children:"Sidebar"}),u.jsx(Sc,{children:"Displays the mobile sidebar."})]}),u.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):u.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":a,"data-collapsible":a==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[u.jsx("div",{"data-slot":"sidebar-gap",className:A("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{"data-slot":"sidebar-container",className:A("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:u.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function _u({className:e,onClick:t,...n}){const{toggleSidebar:r}=Wn();return u.jsxs(bt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:A("size-7",e),onClick:o=>{t?.(o),r()},...n,children:[u.jsx(gn.PanelLeftIcon,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Tu({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:A("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Pu({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:A("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Nu({className:e,asChild:t=!1,...n}){const r=t?me.Slot:"div";return u.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:A("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function Au({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:A("w-full text-sm",e),...t})}function Mu({className:e,...t}){return u.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:A("flex w-full min-w-0 flex-col gap-1",e),...t})}function Du({className:e,...t}){return u.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:A("group/menu-item relative",e),...t})}const Iu=vn.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ju({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s}){const a=e?me.Slot:"button",{isMobile:f,state:d}=Wn(),l=u.jsx(a,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:A(Iu({variant:n,size:r}),i),...s});return o?(typeof o=="string"&&(o={children:o}),u.jsxs(vu,{children:[u.jsx(gu,{asChild:!0,children:l}),u.jsx(xu,{side:"right",align:"center",hidden:d!=="collapsed"||f,...o})]})):l}const Lu=({useSidebar:e=!1,useMainNav:t=!1,useFooter:n=!1,appName:r="App",navItems:o=[],footerItems:i,sidebarDefaultOpen:s=!0})=>e?u.jsx(Ru,{defaultOpen:s,children:u.jsxs("div",{className:"flex min-h-screen w-full",children:[u.jsx(Ou,{children:u.jsx(Tu,{children:u.jsxs(Pu,{children:[u.jsx(Nu,{className:"h-14",children:u.jsx("span",{className:"text-md font-medium",children:r})}),u.jsx(Au,{children:u.jsx(Mu,{children:o.map(a=>u.jsx(Du,{children:u.jsx(ju,{asChild:!0,children:u.jsxs(Lr,{to:a.url,children:[a.icon&&u.jsx("span",{className:"inline-flex h-5 w-5 shrink-0 items-center",children:u.jsx(a.icon,{className:"h-full w-full"})}),u.jsx("span",{className:"text-base font-medium",children:a.title})]})})},a.title))})})]})})}),u.jsxs("div",{className:"flex-1 flex flex-col",children:[u.jsxs("header",{className:"sticky top-0 z-10 flex items-center border-b bg-background px-4 h-14 gap-2",children:[u.jsx(_u,{}),t&&u.jsx(ln,{navItems:o})]}),u.jsx("main",{className:"flex-1 p-6",children:u.jsx(Qt,{})}),n&&i&&u.jsx("footer",{children:u.jsx(un,{...i})})]})]})}):u.jsxs("div",{className:"flex-1 flex min-h-screen flex-col",children:[t&&u.jsx(ln,{navItems:o}),u.jsx("main",{className:"flex-1 p-5",children:u.jsx(Qt,{})}),n&&i&&u.jsx("footer",{children:u.jsx(un,{...i})})]});exports.CustomButton=as;exports.Footer=un;exports.Link=Lr;exports.MainNav=ln;exports.MainSidebarLayout=Lu;exports.cn=A;
|
|
46
46
|
//# sourceMappingURL=index.js.map
|