@dub/ui 0.2.51 → 0.2.52
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/chunk-TJ4JURNI.mjs +2 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/icons/index.d.ts
CHANGED
package/dist/icons/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$,$a,$b,$c,$d,A,Aa,Ab,Ac,Ad,B,Ba,Bb,Bc,Bd,C,Ca,Cb,Cc,Cd,D,Da,Db,Dc,Dd,E,Ea,Eb,Ec,Ed,F,Fa,Fb,Fc,Fd,G,Ga,Gb,Gc,Gd,H,Ha,Hb,Hc,Hd,I,Ia,Ib,Ic,Id,J,Ja,Jb,Jc,Jd,K,Ka,Kb,Kc,Kd,L,La,Lb,Lc,Ld,M,Ma,Mb,Mc,Md,N,Na,Nb,Nc,Nd,O,Oa,Ob,Oc,Od,P,Pa,Pb,Pc,Pd,Q,Qa,Qb,Qc,Qd,R,Ra,Rb,Rc,Rd,S,Sa,Sb,Sc,Sd,T,Ta,Tb,Tc,Td,U,Ua,Ub,Uc,Ud,V,Va,Vb,Vc,Vd,W,Wa,Wb,Wc,Wd,X,Xa,Xb,Xc,Xd,Y,Ya,Yb,Yc,Yd,Z,Za,Zb,Zc,Zd,_,_a,_b,_c,_d,a,aa,ab,ac,ad,ae,b,ba,bb,bc,bd,be,c,ca,cb,cc,cd,ce,d,da,db,dc,dd,de,e,ea,eb,ec,ed,ee,f,fa,fb,fc,fd,fe,g,ga,gb,gc,gd,ge,h,ha,hb,hc,hd,he,i,ia,ib,ic,id,ie,j,ja,jb,jc,jd,k,ka,kb,kc,kd,l,la,lb,lc,ld,m,ma,mb,mc,md,n,na,nb,nc,nd,o,oa,ob,oc,od,p,pa,pb,pc,pd,q,qa,qb,qc,qd,r,ra,rb,rc,rd,s,sa,sb,sc,sd,t,ta,tb,tc,td,u,ua,ub,uc,ud,v,va,vb,vc,vd,w,wa,wb,wc,wd,x,xa,xb,xc,xd,y,ya,yb,yc,yd,z,za,zb,zc,zd}from"../chunk-
|
|
2
|
+
import{$,$a,$b,$c,$d,A,Aa,Ab,Ac,Ad,B,Ba,Bb,Bc,Bd,C,Ca,Cb,Cc,Cd,D,Da,Db,Dc,Dd,E,Ea,Eb,Ec,Ed,F,Fa,Fb,Fc,Fd,G,Ga,Gb,Gc,Gd,H,Ha,Hb,Hc,Hd,I,Ia,Ib,Ic,Id,J,Ja,Jb,Jc,Jd,K,Ka,Kb,Kc,Kd,L,La,Lb,Lc,Ld,M,Ma,Mb,Mc,Md,N,Na,Nb,Nc,Nd,O,Oa,Ob,Oc,Od,P,Pa,Pb,Pc,Pd,Q,Qa,Qb,Qc,Qd,R,Ra,Rb,Rc,Rd,S,Sa,Sb,Sc,Sd,T,Ta,Tb,Tc,Td,U,Ua,Ub,Uc,Ud,V,Va,Vb,Vc,Vd,W,Wa,Wb,Wc,Wd,X,Xa,Xb,Xc,Xd,Y,Ya,Yb,Yc,Yd,Z,Za,Zb,Zc,Zd,_,_a,_b,_c,_d,a,aa,ab,ac,ad,ae,b,ba,bb,bc,bd,be,c,ca,cb,cc,cd,ce,d,da,db,dc,dd,de,e,ea,eb,ec,ed,ee,f,fa,fb,fc,fd,fe,g,ga,gb,gc,gd,ge,h,ha,hb,hc,hd,he,i,ia,ib,ic,id,ie,j,ja,jb,jc,jd,k,ka,kb,kc,kd,l,la,lb,lc,ld,m,ma,mb,mc,md,n,na,nb,nc,nd,o,oa,ob,oc,od,p,pa,pb,pc,pd,q,qa,qb,qc,qd,r,ra,rb,rc,rd,s,sa,sb,sc,sd,t,ta,tb,tc,td,u,ua,ub,uc,ud,v,va,vb,vc,vd,w,wa,wb,wc,wd,x,xa,xb,xc,xd,y,ya,yb,yc,yd,z,za,zb,zc,zd}from"../chunk-TJ4JURNI.mjs";import"../chunk-LVO2QIFF.mjs";export{O as Africa,_ as Airtm,U as Amazon,fa as AndroidLogo,ga as AppleLogo,ha as ArrowBoldUp,ia as ArrowRight,ja as ArrowTrendUp,ka as ArrowTurnLeft,la as ArrowTurnRight2,ma as ArrowUpRight,na as ArrowsOppositeDirectionX,oa as ArrowsOppositeDirectionY,P as Asia,pa as BadgeCheck,qa as BadgeCheck2Fill,ra as Blog,sa as Bolt,ta as BoltFill,va as Book2,wa as Book2Fill,xa as Book2Small,ua as BookOpen,ya as Books2,za as BoxArchive,Aa as BracketsCurly,Ba as BriefcaseFill,Ca as Brush,Da as BulletList,Ea as BulletListFill,Fa as Calculator,Ja as Calendar6,Ha as CalendarDays,Ga as CalendarIcon,Ia as CalendarRefresh,F as CardAmex,G as CardDiscover,H as CardMastercard,I as CardVisa,Ka as Cards,La as CaretUpFill,$ as CashApp,Ma as ChartActivity2,Na as ChartArea2,Oa as ChartLine,V as ChatGPT,Pa as Check,Qa as Check2,Ra as CheckboxCheckedFill,Sa as CheckboxUnchecked,Ta as CircleCheck,Ua as CircleCheckFill,Va as CircleDollar,Wa as CircleDotted,Xa as CircleHalfDottedCheck,Ya as CircleHalfDottedClock,Za as CircleInfo,_a as CirclePercentage,$a as CirclePlay,ab as CirclePlayFill,bb as CircleQuestion,cb as CircleUser,db as CircleWarning,eb as CircleXmark,fb as Circles,gb as Circles3,hb as CloudUpload,ib as Code,jb as ColorPalette2,kb as ConnectedDots,mb as ConnectedDots4,lb as ConnectedDotsFill,nb as Connections3,a as Copy,ob as CreditCard,pb as Crosshairs3,qb as Crown,b as CrownSmall,rb as Cube,sb as CubeSettings,tb as CubeSettingsFill,ub as CurrencyDollar,vb as CursorRays,wb as DatabaseKey,xb as Desktop,yb as DiamondTurnRight,zb as DiamondTurnRightFill,Ab as Directions,Bb as Discount,Cb as Dots,Db as Download,c as DubAnalyticsIcon,d as DubApiIcon,e as DubCraftedShield,f as DubLinksIcon,g as DubPartnersIcon,Eb as Duplicate,Fb as Earth,Gb as EarthPosition,Hb as Envelope,Ib as EnvelopeAlert,Jb as EnvelopeArrowRight,Kb as EnvelopeFill,Q as Europe,h as ExpandingArrow,Lb as Eye,Mb as EyeSlash,r as Facebook,Nb as FeatherFill,W as Figma,Ob as FileContent,Pb as FileZip2,Rb as Filter2,Qb as FilterBars,Tb as Flag2,Ub as Flag6,Sb as FlagWavy,Vb as Flask,Wb as FlaskSmall,Xb as Folder,ac as Folder5,Yb as FolderBookmark,Zb as FolderLock,_b as FolderPlus,$b as FolderShield,bc as GamingConsole,cc as Gauge6,dc as Gear,ec as Gear2,fc as Gear3,gc as Gem,hc as Gift,ic as GiftFill,X as GitHubEnhanced,s as Github,jc as Globe,mc as Globe2,kc as GlobePointer,lc as GlobeSearch,J as Go,t as Google,Y as GoogleEnhanced,nc as GreekTemple,oc as GridIcon,pc as GridLayoutRows,qc as GridPlus,rc as GripDotsVertical,sc as Headset,tc as HeartFill,uc as HexadecagonStar,vc as History,wc as Hyperlink,xc as Icosahedron,yc as Incognito,zc as InputPassword,Ac as InputPasswordPointer,Bc as InputSearch,u as Instagram,Cc as InvoiceDollar,Dc as Key,Ec as LayoutSidebar,Fc as License,Gc as LifeRing,Hc as LinesY,Jc as Link4,Ic as LinkBroken,v as LinkedIn,o as LoadingCircle,p as LoadingDots,q as LoadingSpinner,Kc as LocationPin,Lc as LockFill,i as Magic,Mc as Magnifier,Nc as MapPosition,Oc as MarketingTarget,j as MatrixLines,Pc as Menu3,Qc as MessageSmile,Rc as MicrophoneFill,Sc as MobilePhone,Tc as MoneyBill,Uc as MoneyBill2,Vc as MoneyBills2,Wc as Msgs,R as NorthAmerica,Xc as Note,ed as NucleoPhoto,S as Oceania,Yc as OfficeBuilding,ie as PLAN_FEATURE_ICONS,Zc as Page2,_c as Paintbrush,$c as Palette2,ad as PaperPlane,aa as Payoneer,ba as Paypal,cd as Pen2,bd as PenWriting,dd as PercentageArrowDown,k as Photo,K as Php,fd as Plug2,gd as Plus,hd as Plus2,id as Post,w as Prisma,x as ProductHunt,jd as Pyramid,L as Python,kd as QRCode,y as Raycast,ld as Receipt2,md as ReferredVia,nd as Refresh2,od as Robot,M as Ruby,pd as SatelliteDish,qd as ScanText,rd as Scribble,sd as ShieldAlert,td as ShieldCheck,ud as ShieldKeyhole,vd as ShieldSlash,wd as ShieldUser,xd as Shuffle,z as Slack,yd as Sliders,l as SortOrder,T as SouthAmerica,zd as Sparkle3,Z as Spotify,Ad as SquareChart,Bd as SquareLayoutGrid5,Cd as SquareLayoutGrid6,Dd as SquareXmark,Ed as Stars2,ca as Stripe,da as StripeLink,m as Success,Pd as TV,Fd as TableIcon,Gd as TableRows2,Hd as Tablet,Id as Tag,Jd as Tags,n as Tick,A as TikTok,Kd as Timer2,B as Tinybird,Ld as Toggle2Fill,Md as Toggles,Nd as Trash,Od as TriangleWarning,C as Twitter,N as Typescript,Qd as UiCard,D as Unsplash,Rd as User,Sd as UserCheck,Td as UserCrown,Ud as UserDelete,Vd as UserFocus,Wd as UserPlus,Xd as Users,_d as Users2,$d as Users6,Yd as UsersFill,Zd as UsersSettings,ea as Venmo,ae as Versions2,be as Views,ce as Watch,de as Webhook,ee as Window,fe as WindowSearch,ge as WindowSettings,he as Xmark,E as YouTube};
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as Xu,$a as _p,$b as L0,$c as wf,$d as gg,A as Du,Aa as Np,Ab as l0,Ac as Pa,Ad as Gf,B as Eu,Ba as oa,Bb as c0,Bc as Sa,Bd as Kf,C as jt,Ca as Cp,Cb as d0,Cc as J0,Cd as jf,D as Iu,Da as kp,Db as m0,Dc as Q0,Dd as Yf,E as Yt,Ea as aa,Eb as u0,Ec as ef,Ed as Zf,F as Au,Fa as Pp,Fb as ga,Fc as tf,Fd as qf,G as Ou,Ga as Sp,Gb as p0,Gc as Xt,Gd as Xf,H as zu,Ha as Rp,Hb as f0,Hc as rf,Hd as Jf,I as Hu,Ia as Tp,Ib as g0,Ic as of,Id as Qf,J as Xo,Ja as Lp,Jb as b0,Jc as af,Jd as eg,K as Jo,Ka as Mp,Kb as ba,Kc as nf,Kd as La,L as Qo,La as Dp,Lb as ha,Lc as sf,Ld as Ma,M as ea,Ma as Ep,Mb as va,Mc as lf,Md as tg,N as ta,Na as Ip,Nb as xa,Nc as cf,Nd as rg,O as Vu,Oa as Ap,Ob as h0,Oc as df,Od as og,P as _u,Pa as na,Pb as v0,Pc as mf,Pd as ag,Q as Fu,Qa as ia,Qb as x0,Qc as uf,Qd as ng,R as Bu,Ra as sa,Rb as y0,Rc as Jt,Rd as ig,S as Wu,Sa as la,Sb as w0,Sc as pf,Sd as sg,T as $u,Ta as ca,Tb as N0,Tc as ff,Td as lg,U as Uu,Ua as Op,Ub as ya,Uc as gf,Ud as cg,V as Gu,Va as zp,Vb as C0,Vc as bf,Vd as dg,W as Ku,Wa as Hp,Wb as k0,Wc as hf,Wd as mg,X as ju,Xa as da,Xb as P0,Xc as vf,Xd as ug,Y as Yu,Ya as ma,Yb as S0,Yc as xf,Yd as Nt,Z as Zu,Za as ua,Zb as R0,Zc as Ra,Zd as pg,_ as qu,_a as Vp,_b as T0,_c as yf,_d as fg,a as Wo,aa as Ju,ab as Fp,ac as M0,ad as Nf,ae as bg,b as Nu,ba as Qu,bb as Bp,bc as D0,bd as Cf,be as Da,c as et,ca as ep,cb as Wp,cc as E0,cd as kf,ce as hg,d as Ut,da as tp,db as Hr,dc as I0,dd as Pf,de as vg,e as Cu,ea as rp,eb as $p,ec as A0,ed as Sf,ee as xg,f as tt,fa as op,fb as Up,fc as O0,fd as Rf,fe as yg,g as rt,ga as ap,gb as Gp,gc as z0,gd as Qt,ge as wg,h as $o,ha as np,hb as pa,hc as wa,hd as Tf,he as Ng,i as Uo,ia as ip,ib as Kp,ic as H0,id as Lf,ie as Cg,j as ku,ja as sp,jb as jp,jc as V0,jd as Mf,k as Go,ka as lp,kb as Yp,kc as Na,kd as Df,l as Ko,la as cp,lb as Zp,lc as _0,ld as Ef,m as jo,ma as ra,mb as qp,mc as Ca,md as Vr,n as Yo,na as dp,nb as Xp,nc as F0,nd as If,o as wt,oa as mp,ob as Jp,oc as B0,od as Af,p as Pu,pa as up,pb as Qp,pc as W0,pd as Ta,q as Ne,qa as pp,qb as e0,qc as $0,qd as Of,r as Su,ra as fp,rb as t0,rc as U0,rd as zf,s as Gt,sa as gp,sb as r0,sc as G0,sd as Hf,t as Ru,ta as bp,tb as o0,tc as K0,td as Vf,u as Tu,ua as hp,ub as a0,uc as j0,ud as _f,v as Kt,va as vp,vb as fa,vc as Y0,vd as Ff,w as Lu,wa as Zt,wb as n0,wc as Z0,wd as Bf,x as Zo,xa as xp,xb as i0,xc as q0,xd as Wf,y as qo,ya as yp,yb as s0,yc as ka,yd as $f,z as Mu,za as wp,zb as qt,zc as X0,zd as Uf}from"./chunk-ITQ6LPW2.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as vt,b as Io,c as Or,d as xt,e as Ao,f as Oo,g as zo,h as yt,i as zr,j as Ho,k as V,l as we,m as Vo,n as fe,o as Wt,p as s,q as $t,r as _o,s as Fo,t as Bo}from"./chunk-LVO2QIFF.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as wi}from"lucide-react";import*as tr from"react";import{jsx as er,jsxs as Pi}from"react/jsx-runtime";var Lg=ae.Root,Ni=tr.forwardRef(({className:e,...t},r)=>er(ae.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ni.displayName="AccordionItem";var Ci=tr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?wi:Qt;return er(ae.Header,{className:"flex",children:Pi(ae.Trigger,{ref:a,className:s("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,er(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ci.displayName=ae.Trigger.displayName;var ki=tr.forwardRef(({className:e,children:t,...r},o)=>er(ae.Content,{ref:o,className:s("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));ki.displayName=ae.Content.displayName;import{cva as Si}from"class-variance-authority";import*as rr from"react";import{jsx as _r}from"react/jsx-runtime";var Ri=Si("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Ti=rr.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Ri({variant:t}),e),...r}));Ti.displayName="Alert";var Li=rr.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Li.displayName="AlertTitle";var Mi=rr.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Mi.displayName="AlertDescription";import{sha256 as Di}from"js-sha256";import{useState as Ei}from"react";import{jsx as Fr}from"react/jsx-runtime";function Ii(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar?seed=${encodeURIComponent(e.id)}`,r=`https://api.dub.co/og/avatar${encodeURIComponent(`?seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Di(e.email)}?d=${encodeURIComponent(r)}`:t}function Hg({user:e={},className:t}){if(!e)return Fr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ei(Ii(e));return Fr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:s("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar?seed=${e.id}`)}})}function Vg({id:e,className:t}){return Fr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:s("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ai}from"class-variance-authority";import{jsx as zi}from"react/jsx-runtime";var Oi=Ai("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function or({className:e,variant:t,...r}){return zi("span",{className:s(Oi({variant:t}),e),...r})}import{cva as Bi}from"class-variance-authority";import{forwardRef as Wi}from"react";import*as ge from"@radix-ui/react-tooltip";import Hi from"linkify-react";import{HelpCircle as Vi}from"lucide-react";import _i from"next/link";import{useState as Fi}from"react";import{jsx as U,jsxs as ot}from"react/jsx-runtime";function Jg({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[i,m]=Fi(!1);return ot(ge.Root,{open:i,onOpenChange:m,delayDuration:l,disableHoverableContent:a,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?U("span",{className:s("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:m}):t})})]})}function Qg({title:e,cta:t,href:r,target:o,onClick:a}){return ot("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(_i,{href:r,...o?{target:o}:{},className:s(ne({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function e1({title:e,cta:t,href:r}){return ot("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function t1({children:e,className:t,tooltipClassName:r}){return U("div",{className:s("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Hi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:s("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function r1(e){return U(J,{...e,children:U(Vi,{className:"h-4 w-4 text-neutral-500"})})}function o1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:ot("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[ot("p",{className:"text-sm font-semibold text-neutral-700",children:[r,$t(e||0,{full:!0})," ",t]}),a&&ot("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function a1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(or,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function n1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:s("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function ar({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as at,jsxs as Ea}from"react/jsx-runtime";var ne=Bi("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:s("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=Wi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?at(J,{content:m,children:Ea("div",{className:s("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[c,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:i})]})}):Ea("button",{ref:u,type:n.onClick?"button":"submit",className:s("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ne({variant:t}),r),disabled:n.disabled||l,...n,children:[l?at(Ne,{}):c||null,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:i}),d]}));ie.displayName="Button";import{cva as $i}from"class-variance-authority";import{createContext as Ui}from"react";import{jsx as Ia}from"react/jsx-runtime";var Gi=$i("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),Ct=Ui({variant:"loose",loading:!1});function Aa({variant:e="loose",loading:t=!1,className:r,children:o}){return Ia("ul",{className:s(Gi({variant:e,loading:t}),r),"data-variant":e,children:Ia(Ct.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as Ki}from"class-variance-authority";import{createContext as ji,useContext as Yi,useEffect as Zi,useRef as qi,useState as Xi}from"react";import{jsx as Oa,jsxs as es}from"react/jsx-runtime";var Ji=Ki("w-full group/card border-neutral-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-neutral-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),Qi="w-full py-2.5 px-4",Br=ji({hovered:!1});function za({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:l=!0,banner:c}){let{variant:i}=Yi(Ct),m=qi(null),[d,n]=Xi(!1);Zi(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var v;((v=m.current)==null?void 0:v.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||yt(p));return es("li",{ref:m,className:s(Ji({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":l,children:[c,Oa("div",{className:s(Qi,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Oa(Br.Provider,{value:{hovered:d},children:r})})]})}var L1=Object.assign(Aa,{Card:Object.assign(za,{Context:Br}),Context:Ct});import ts from"embla-carousel-autoplay";import rs from"embla-carousel-react";import{ArrowLeft as os,ArrowRight as as}from"lucide-react";import{createContext as ns,forwardRef as Pt,useCallback as kt,useContext as is,useEffect as Wr,useState as $r}from"react";import{jsx as Ce,jsxs as _a}from"react/jsx-runtime";var Ur=2e3,Ha=ns(null);function be(){let e=is(Ha);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Va(){let{api:e}=be(),[t,r]=$r(0),o=kt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Wr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var ss=Pt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...i},m)=>{let[d,n]=rs({...t,axis:e==="horizontal"?"x":"y"},[...o?[ts(typeof o=="object"?o:{delay:Ur})]:[],...a||[]]),[u,p]=$r(!1),[v,h]=$r(!1),b=kt(R=>{!R||(p(R.canScrollPrev()),h(R.canScrollNext()))},[]),g=kt(()=>{n==null||n.scrollPrev()},[n]),y=kt(()=>{n==null||n.scrollNext()},[n]),w=kt(R=>{R.key==="ArrowLeft"?(R.preventDefault(),g()):R.key==="ArrowRight"&&(R.preventDefault(),y())},[g,y]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return b(n),n.on("reInit",b),n.on("select",b),()=>{n==null||n.off("select",b)}},[n,b]),Ce(Ha.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:u,canScrollNext:v},children:Ce("div",{ref:m,onKeyDownCapture:w,className:s("relative",l),role:"region","aria-roledescription":"carousel",...i,children:c})})});ss.displayName="Carousel";var ls=Pt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ls.displayName="CarouselContent";var cs=Pt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:s("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});cs.displayName="CarouselItem";var ds=Pt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(os,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});ds.displayName="CarouselPrevious";var ms=Pt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(as,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ms.displayName="CarouselNext";import{cva as us}from"class-variance-authority";import{motion as ps}from"framer-motion";import{ChevronLeft as fs,ChevronRight as gs}from"lucide-react";import*as Me from"react";import{jsx as We,jsxs as St}from"react/jsx-runtime";var bs=us("flex items-center justify-center gap-3 sm:gap-6",{variants:{variant:{simple:"relative",floating:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-neutral-800/10 bg-white sm:bottom-6 "}}}),j1=({variant:e="simple",className:t})=>{var h;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=be(),i=(h=c==null?void 0:c.plugins())==null?void 0:h.autoplay,[m,d]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(b=>{d((b==null?void 0:b.selectedScrollSnap())??0)},[]),v=Me.useCallback(b=>()=>{i&&i.isPlaying()&&i.stop(),b()},[i]);return Me.useEffect(()=>{!c||(p(c),u((i==null?void 0:i.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,i,p]),St("div",{className:s(bs({variant:e}),t),children:[e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:v(o),children:[We(fs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&We("div",{className:"flex items-center gap-1",children:c.slideNodes().map((b,g)=>St("button",{onClick:v(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[We("div",{className:s("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===m?"bg-black":"bg-black/20",n&&g===m&&"w-6 bg-black/20"),children:n&&g===m&&We(ps.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Ur)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),St("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[We(gs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Next slide"})]})]})};import hs from"embla-carousel-react";import{forwardRef as vs,useCallback as xs,useEffect as ys}from"react";import{jsx as nr}from"react/jsx-runtime";var rb=({className:e,...t})=>{let{api:r}=be(),[o,a]=hs({dragFree:!0}),l=xs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return ys(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),nr("div",{className:"overflow-hidden",ref:o,children:nr("div",{className:s("mx-4 flex gap-4",e),...t})})},ob=vs(({index:e,className:t,...r},o)=>{let{api:a}=be(),l=Va();return nr("div",{ref:o,children:nr("button",{type:"button",onClick:()=>{var i;if(!a)return;let c=(i=a.plugins())==null?void 0:i.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===l}):t,...r})})});import*as Rt from"@radix-ui/react-checkbox";import{Check as ws}from"lucide-react";import*as Fa from"react";import{jsx as Gr}from"react/jsx-runtime";var Ns=Fa.forwardRef(({className:e,...t},r)=>Gr(Rt.Root,{ref:r,className:s("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:Gr(Rt.Indicator,{className:"flex items-center justify-center",children:Gr(ws,{className:"h-3 w-3 text-white"})})}));Ns.displayName=Rt.Root.displayName;import{Command as Lt,CommandInput as pl,CommandItem as fl,useCommandState as gl}from"cmdk";import{ChevronDown as bl}from"lucide-react";import{forwardRef as hl,isValidElement as vl,useCallback as xl,useEffect as cr,useRef as yl,useState as Tt}from"react";import{motion as dl}from"framer-motion";import{forwardRef as ml,useRef as ul}from"react";import Kr from"js-cookie";import{useEffect as Cs,useState as ks}from"react";function db(e,t,r){let[o,a]=ks(()=>{let c=Kr.get(e);return c?JSON.parse(c):t});return Cs(()=>{let c=()=>{let i=Kr.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Kr.set(e,JSON.stringify(c),r)}]}import{useCallback as Ps,useEffect as Ss,useRef as Rs,useState as Ts}from"react";var nt=(e=3e3)=>{let t=Rs(null),[r,o]=Ts(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=Ps(async(c,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),i==null||i(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(d){if(console.error("Failed to copy: ",d),m)throw d}},[e]);return Ss(()=>()=>a(),[]),[r,l]};import{useEffect as Ls,useState as Ms}from"react";function gb(){let[e,t]=Ms(null);return Ls(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(i=>{var u,p,v;let m=i[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let h=1;h<i.length;h++){let b=i[h];if(!b)break;(b.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=b)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=l.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=l.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(i=>a.observe(i)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Ds}from"react";function xb(e){return{handleKeyDown:Ds(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Es,useState as Is}from"react";function Cb(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Is(o??!1);return Es(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let i=null;return e.current&&(i=new IntersectionObserver(c),i.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),i==null||i.disconnect()}},[e,r]),a}import{useEffect as As,useState as Os}from"react";function Sb(){let[e,t]=Os(!1);return As(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as zs,useState as Hs}from"react";function Mb(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=Hs(),i=(l==null?void 0:l.isIntersecting)&&a,m=([d])=>{c(d)};return zs(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||i||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(d),()=>p.disconnect()},[e,JSON.stringify(t),r,o,i]),l}import{createContext as Vs,useCallback as _s,useContext as Fs,useEffect as Ba,useId as Bs,useState as Ws}from"react";import{jsx as $s}from"react/jsx-runtime";var Wa=Vs({listeners:[],setListeners:()=>{}});function zb({children:e}){let[t,r]=Ws([]);return $s(Wa.Provider,{value:{listeners:t,setListeners:r},children:e})}function it(e,t,r={}){let o=Bs(),{listeners:a,setListeners:l}=Fs(Wa),c=_s(i=>{if(r.enabled===!1)return;let m=i.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet)return;let u=[...i.metaKey?["meta"]:[],...i.ctrlKey?["ctrl"]:[],...i.altKey?["alt"]:[],i.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(h=>h.enabled!==!1&&!!d==!!h.modal&&!!n==!!h.sheet&&(Array.isArray(h.key)?h.key.includes(u):h.key===u));!p.length||Ao(p,(h,b)=>(b.priority??0)-(h.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);Ba(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),Ba(()=>(l(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>l(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Us,useState as Gs}from"react";function $a(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function _b(e,t){let[r,o]=Gs($a(e)??t);return Us(()=>{let l=$a(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Ks}from"sonner";import js from"swr";function Ub(e,t){let{data:r,isLoading:o,mutate:a}=js(e,fe);return{data:r,isLoading:o,update:async(l,c)=>Ks.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as ja,useMemo as Qs}from"react";import{useEffect as Ua,useState as Ys}from"react";function Ga({pageSize:e,page:t,onPageChange:r}){let[o,a]=Ys({pageIndex:t,pageSize:e});return Ua(()=>{a(l=>({...l,pageIndex:t}))},[t]),Ua(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Zs,useRouter as qs,useSearchParams as Xs}from"next/navigation";import{useCallback as Js}from"react";function Ka(){let e=Zs(),t=qs(),r=Xs(),o=Object.fromEntries(r),a=(c,i)=>{let m=new URLSearchParams(r);if((i==null?void 0:i.include)&&Array.isArray(i.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var v;(v=i.include)!=null&&v.includes(p)&&n.set(p,u)}),m=n}(i==null?void 0:i.exclude)&&Array.isArray(i.exclude)&&i.exclude.forEach(n=>m.delete(n)),c&&Object.entries(c).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},l=Js(({set:c,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([b,g])=>p.set(b,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(b=>p.delete(b)):p.delete(i));let v=p.toString(),h=`${e}${v.length>0?`?${v}`:""}`;if(n)return h;m?t.replace(h,{scroll:!1}):t.push(h,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:l,getQueryString:a}}function rh(e=Fo){let{searchParams:t,queryParams:r}=Ka(),o=Qs(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ga({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return ja(()=>{let c=parseInt(t.get("page")||"1")||1;l(i=>({...i,pageIndex:c}))},[t.get("page")]),ja(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:l}}import{useEffect as el}from"react";function nh(){el(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}import{useEffect as tl,useState as rl}from"react";function ir(e){let[t,r]=rl(),o=([a])=>{r(a)};return tl(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as ol,useEffect as Ya,useState as al}from"react";function Za(e,{container:t}={}){let[r,o]=al(!1),a=ol(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return Ya(()=>{let l=(t==null?void 0:t.current)??window;return l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)},[a]),Ya(()=>{a()},[a]),r}import{useCallback as nl,useEffect as il,useState as sl}from"react";function De(e){let[t,r]=sl(1),o=nl(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:i}=e.current;r(c===i?1:Math.min(l/(c-i),1))},[]),a=ir(e);return il(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as ll}from"react";import{toast as Xa}from"sonner";import{jsx as sr,jsxs as qa}from"react/jsx-runtime";function cl({id:e,message:t,undo:r}){let o=()=>{r(),Xa.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return ll(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),qa("div",{className:"flex w-full items-center justify-between space-x-2",children:[qa("div",{className:"flex items-center space-x-2",children:[sr(jo,{}),sr("p",{className:"font-medium",children:t})]}),sr("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function yh(){return({id:t,message:r,undo:o,duration:a})=>Xa(sr(cl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Ja}from"react/jsx-runtime";var ke=ml(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let i=ul(null),m=ir(i);return Ja(dl.div,{ref:c,className:s("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:Ja("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ee from"@radix-ui/react-popover";import{Drawer as st}from"vaul";import{jsx as Pe,jsxs as lr}from"react/jsx-runtime";function lt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return c||v?lr(st.Root,{open:a,onOpenChange:l,children:[Pe(st.Trigger,{className:"sm:hidden",asChild:!0,children:e}),lr(st.Portal,{children:[Pe(st.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),lr(st.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:u,onPointerDownOutside:h=>{h.target instanceof Element&&h.target.closest("[data-sonner-toast]")&&h.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(st.Overlay,{})]})]}):lr(Ee.Root,{open:a,onOpenChange:l,children:[Pe(Ee.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ee.Portal,{children:Pe(Ee.Content,{sideOffset:8,align:r,side:o,className:s("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",i),sticky:n,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as dr,jsx as L,jsxs as Se}from"react/jsx-runtime";function wl(e,t){return e===!0}function Zh({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:h,onOpenChange:b,onSearchChange:g,shouldFilter:y=!0,inputRight:w,inputClassName:R,optionRight:C,optionClassName:k,matchTriggerWidth:z,hideSearch:O=!1,children:S}){let x=wl(e,r),I=Array.isArray(t)?t:t?[t]:[],{isMobile:N}=j(),[P,X]=Tt(!1),D=h??P,me=b??X,[$,Er]=Tt(""),[Mo,Ir]=Tt(!1),[Ar,vi]=Tt(void 0),[xi,Do]=Tt(!1),yi=H=>{var Qe;if(x){let Fe=I.some(({value:Be})=>Be===H.value);r(Fe?I.filter(({value:Be})=>Be!==H.value):[...I,H])}else r(I.length&&((Qe=I[0])==null?void 0:Qe.value)===H.value?null:H),me(!1)},Eo=xl((H,Qe)=>Qe===""?[...H.filter(Fe=>Fe.first&&!I.some(Be=>Be.value===Fe.value)),...I,...H.filter(Fe=>!Fe.first&&!I.some(Be=>Be.value===Fe.value))]:H,[I]);return cr(()=>{Mo&&(vi(o&&Eo(o,$)),Ir(!1))},[Mo,o,Eo,$]),cr(()=>{Ir(!0)},[o]),cr(()=>{D||(Er(""),Ir(!0))},[D]),cr(()=>g==null?void 0:g($),[$]),L(lt,{openPopover:D,setOpenPopover:me,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:s(z&&"sm:w-[var(--radix-popover-trigger-width)]"),content:L(ke,{width:!N&&!z,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(Lt,{loop:!0,shouldFilter:y,children:[!O&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[L(pl,{placeholder:c,value:$,onValueChange:Er,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),me(!1))}}),w&&L("div",{className:"mr-2",children:w}),u&&L("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:u})]}),L(Nl,{children:L(Lt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ar!==void 0?Se(dr,{children:[Ar.map(H=>L(Cl,{option:H,multiple:x,selected:I.some(({value:Qe})=>Qe===H.value),onSelect:()=>yi(H),right:C==null?void 0:C(H),className:k},`${H.label}, ${H.value}`)),$.length>0&&d&&Se(fl,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",k),onSelect:async()=>{Do(!0),await(d==null?void 0:d($))&&(Er(""),me(!1)),Do(!1)},children:[xi?L(Ne,{className:"size-4 shrink-0"}):L(Qt,{className:"size-4 shrink-0"}),L("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),y?L(Pl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ar.length===0?L("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):L(Lt.Loading,{children:L("div",{className:"flex h-12 items-center justify-center",children:L(Ne,{})})})})})]})}),children:L(ie,{variant:"secondary",...n,className:s(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:s(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(dr,{children:[L("div",{className:"min-w-0 grow truncate text-left",children:S||I.map(H=>H.label).join(", ")||l}),p&&(p===!0?L(bl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?Qa(a)?a:L(a,{className:"size-4 shrink-0"}):void 0})})}var Nl=({children:e})=>{let t=yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return Se(dr,{children:[L("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),L("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function Cl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Se(dr,{children:[L(kl,{disabledTooltip:e.disabledTooltip,children:Se(Lt.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",l),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&L("div",{className:"shrink-0 text-neutral-600",children:o?L(sa,{className:"size-4 text-neutral-600"}):L(la,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&L("span",{className:"shrink-0 text-neutral-600",children:Qa(e.icon)?e.icon:L(e.icon,{className:"h-4 w-4"})}),L("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&L(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&L(Lt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var kl=({children:e,disabledTooltip:t})=>t?L(J,{content:t,children:L("div",{children:e})}):e,Qa=e=>vl(e),Pl=hl((e,t)=>gl(o=>o.filtered.count===0)?L("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as mr,format as Sl,isSameMonth as Rl}from"date-fns";import{ChevronLeft as en,ChevronRight as tn,ChevronsLeft as Tl,ChevronsRight as Ll}from"lucide-react";import{forwardRef as Ml,useRef as Dl}from"react";import{DayPicker as El,useDayPicker as Il,useDayRender as Al,useNavigation as Ol}from"react-day-picker";import{Fragment as zl,jsx as te,jsxs as ur}from"react/jsx-runtime";var Mt=Ml(({onClick:e,icon:t,disabled:r,...o},a)=>te("button",{ref:a,type:"button",disabled:r,className:s("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:te(t,{className:"h-full w-full shrink-0"})}));Mt.displayName="NavigationButton";function rn({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:i,...m}){return te(El,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:s("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...i},components:{IconLeft:()=>te(en,{className:"h-4 w-4"}),IconRight:()=>te(tn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:h}=Ol(),{numberOfMonths:b,fromDate:g,toDate:y}=Il(),w=h.findIndex(x=>Rl(d.displayMonth,x)),R=w===0,C=w===h.length-1,k=b>1&&(R||!C),z=b>1&&(C||!R),O=()=>{let x=mr(v,-1);p&&(!g||x.getTime()>=g.getTime())&&n(x)},S=()=>{let x=mr(v,1);u&&(!y||x.getTime()<=y.getTime())&&n(x)};return ur("div",{className:"flex items-center justify-between",children:[ur("div",{className:"flex items-center gap-1",children:[o&&!z&&te(Mt,{disabled:a||!p||g&&mr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:O,icon:Tl}),!z&&te(Mt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:en})]}),te("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Sl(d.displayMonth,"LLLL yyy",{locale:l})}),ur("div",{className:"flex items-center gap-1",children:[!k&&te(Mt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:tn}),o&&!k&&te(Mt,{disabled:a||!u||y&&mr(v,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:S,icon:Ll})]})]})},Day:({date:d,displayMonth:n})=>{let u=Dl(null),{activeModifiers:p,buttonProps:v,divProps:h,isButton:b,isHidden:g}=Al(d,n,u),{selected:y,today:w,disabled:R,range_middle:C}=p;if(g)return te(zl,{});if(!b)return te("div",{...h,className:s("flex items-center justify-center",h.className)});let{children:k,...z}=v;return ur("button",{ref:u,...z,type:"button",children:[k,w&&te("span",{className:s("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!y,"!bg-white":y,"!bg-blue-400":y&&C,"text-neutral-400":R})})]})}},...m})}import{enUS as jl}from"date-fns/locale";import{useEffect as Jr,useMemo as an,useRef as Yl,useState as fr}from"react";import{Command as jr}from"cmdk";import{Lock as Hl}from"lucide-react";import{jsx as $e,jsxs as Vl}from"react/jsx-runtime";var Yr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),i=(d,n)=>{let u=d.from,p=n.from,v=!1;u&&p&&c(u,p)&&(v=!0);let h=d.to,b=n.to,g=!1;return h&&b&&c(h,b)&&(g=!0),v&&g},m=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&i(n,d.dateRange)}else if(l(d)){let n=r;return n&&c(n,d.date)}return!1};return $e(jr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:$e(jr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Vl(jr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:s("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(d)&&"font-semibold text-neutral-800"),children:[$e("span",{children:d.label}),d.requiresUpgrade?$e(Hl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?$e("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&$e(J,{side:"bottom",content:d.tooltipContent,children:$e("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Yr.displayName="DatePicker.Presets";import{format as Ie}from"date-fns";import{createContext as _l}from"react";var Zr=_l({isOpen:!1,setIsOpen:()=>{}}),Fl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},qr=(e,t,r=!1)=>{let o=!Fl(),a;return r?a=o?Ie(e,"d MMM, yyyy h:mm a",{locale:t}):Ie(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ie(e,"d MMM, yyyy",{locale:t}),a},on=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,h,b,g;if("date"in n){let y=n.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let y=(u=n.dateRange.from)==null?void 0:u.getFullYear(),w=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(w&&r&&w>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(v=n.dateRange.from)==null?void 0:v.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ie(a,"MMM, yyyy")}.`)}if(l){let R=(h=n.dateRange.to)==null?void 0:h.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ie(l,"MMM, yyyy")}.`)}if(c){let R=(b=n.dateRange.from)==null?void 0:b.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ie(c,"MMM dd, yyyy")}.`)}if(i){let R=(g=n.dateRange.to)==null?void 0:g.getDate();if(R&&R>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Bl}from"class-variance-authority";import{Calendar as Wl,ChevronDown as $l}from"lucide-react";import{forwardRef as Ul}from"react";import{jsx as pr,jsxs as Kl}from"react/jsx-runtime";var Gl=Bl(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),Xr=Ul(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Kl("button",{ref:l,className:s(Gl({hasError:o}),e),...a,children:[pr(Wl,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),pr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?pr("span",{className:"text-neutral-400",children:r}):null)}),pr($l,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Xr.displayName="DatePicker.Trigger";import{jsx as re,jsxs as nn}from"react/jsx-runtime";var Zl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:i,showYearNavigation:m=!1,locale:d=jl,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...h})=>{let{isDesktop:b}=j(),[g,y]=fr(!1),[w,R]=fr(a&&r?a==null?void 0:a.find(({id:D})=>D===r):void 0),[C,k]=fr((w==null?void 0:w.dateRange)??e??t??void 0),[z,O]=fr(C==null?void 0:C.to),S=an(()=>C,[g]);Jr(()=>{k(e)},[e]),Jr(()=>{let D=a==null?void 0:a.find(({id:me})=>me===r);R(D),k((D==null?void 0:D.dateRange)??e??t)},[a,r]),Jr(()=>{g?C&&O(C.to):O(C==null?void 0:C.to)},[g]);let x=(D,me)=>{let $=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:me}:D;k($),R(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),y(!1))},I=D=>{k(D.dateRange),R(D),o==null||o(D.dateRange,D),y(!1)},N=()=>{k(S),y(!1)},P=D=>{D||N(),y(D)},X=an(()=>C?`${C.from?qr(C.from,d):""} - ${C.to?qr(C.to,d):""}`:null,[C,d]);return it((a==null?void 0:a.filter(D=>D.shortcut).map(D=>D.shortcut))??[],D=>{let me=a==null?void 0:a.find($=>$.shortcut===D.key);me&&I(me)}),re(Zr.Provider,{value:{isOpen:g,setIsOpen:y},children:re(lt,{align:p,openPopover:g,setOpenPopover:P,popoverContentClassName:"rounded-xl",content:re("div",{className:"flex w-full",children:nn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&re(ql,{children:re("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:re("div",{className:"sm:py-3",children:re(Yr,{currentPresetId:r,currentValue:C,presets:a,onSelect:I})})})}),re("div",{className:"scrollbar-hide overflow-x-scroll",children:re(rn,{mode:"range",selected:C,onSelect:x,month:z,onMonthChange:O,numberOfMonths:b?2:1,disabled:i,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...h})})]})}),children:re(Xr,{placeholder:n,disabled:l,className:v,hasError:u,"aria-required":h.required||h["aria-required"],"aria-invalid":h["aria-invalid"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],children:(w==null?void 0:w.label)??X})})})};function Iv({presets:e,...t}){return e&&on(e,t),re(Zl,{presets:e,...t})}function ql({children:e}){let t=Yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return nn("div",{className:"relative sm:h-full",children:[re("div",{ref:t,onScroll:o,className:s("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),re("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import Xl from"next/link";import{useEffect as Jl,useState as sn}from"react";import Ql from"swr";import{jsx as Qr,jsxs as ln}from"react/jsx-runtime";function cn({className:e}){let{data:t}=Ql("https://status.dub.co/api/v1/summary",fe),[r,o]=sn("bg-neutral-200"),[a,l]=sn("Loading status...");return Jl(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:i,name:m}=c[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";l(m),o(d)}else l("All systems operational"),o("bg-green-500")},[t]),ln(Xl,{href:"https://status.dub.co",target:"_blank",className:s("group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",e),children:[ln("div",{className:"relative size-2",children:[Qr("div",{className:s("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),Qr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Qr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as gr,jsxs as dn}from"react/jsx-runtime";function Gv({icon:e,title:t,description:r,learnMore:o,children:a}){return dn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[gr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:gr(e,{className:"size-6 text-neutral-800"})}),gr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&dn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&gr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as ec}from"class-variance-authority";import{useState as mn}from"react";import{toast as un}from"sonner";import{Fragment as rc,jsx as he,jsxs as to}from"react/jsx-runtime";var pn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],eo={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"},documents:{types:pn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...pn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},tc=ec("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-neutral-50",{variants:{variant:{default:"rounded-md border border-neutral-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function rx({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:h,maxFileSizeMB:b=0,targetResolution:g,accessibilityLabel:y="File upload",disabled:w=!1}){let[R,C]=mn(!1),[k,z]=mn(null),O=async S=>{let x="dataTransfer"in S?S.dataTransfer.files&&S.dataTransfer.files[0]:S.target.files&&S.target.files[0];if(!x)return;if(z(x.name),b>0&&x.size/1024/1024>b){un.error(`File size too big (max ${b} MB)`);return}let I=eo[d].types;if(I.length&&!I.includes(x.type)){un.error(eo[d].errorMessage??"File type not supported");return}let N=x;if(g&&x.type.startsWith("image/"))try{let P=await zo(x,g),X=await fetch(P).then(D=>D.blob());N=new File([X],x.name,{type:x.type})}catch(P){console.error("Error resizing image:",P)}if(t){let P=new FileReader;P.onload=X=>{var D;return r==null?void 0:r({src:(D=X.target)==null?void 0:D.result,file:N})},P.readAsDataURL(N);return}r==null||r({file:N})};return to("label",{className:s(tc({variant:o}),w?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(wt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),C(!1)},onDrop:async S=>{S.preventDefault(),S.stopPropagation(),O(S),C(!1)}}),to("div",{className:s("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",w&&"bg-neutral-50",R&&!w&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!w&&"group-hover:opacity-100"):s(!w&&"group-hover:bg-neutral-50")),children:[he(i,{className:s("size-7 transition-all duration-75",w?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),h!==null&&he("div",{className:s("mt-2 text-center text-sm text-neutral-500",w&&"text-neutral-400"),children:h??he(rc,{children:to("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:y})]}),n&&(m??he("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",c)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:eo[d].types.join(","),onChange:O,disabled:w},k)})]})}import{AnimatePresence as oc,motion as fn}from"framer-motion";import{X as ac}from"lucide-react";import nc from"next/link";import{isValidElement as ic}from"react";import{Fragment as sc,jsx as Q,jsxs as Dt}from"react/jsx-runtime";function bn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return it("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Dt("div",{className:s("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(oc,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return Q(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${c}`);let i=e.find(m=>m.key===l);return i?(i.multiple&&Array.isArray(c)?c:[c]).map(m=>{var v,h,b,g;let d=(v=i.options)==null?void 0:v.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),n=(d==null?void 0:d.icon)??((h=i.getOptionIcon)==null?void 0:h.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((b=i.getOptionLabel)==null?void 0:b.call(i,m,{key:i.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((g=i.getOptionPermalink)==null?void 0:g.call(i,m))??null;return Dt(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[Dt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(i.icon)?i.icon:Q(i.icon,{className:"h-4 w-4"})}),i.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:i.options?Dt(sc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(nc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:xt(u,30)}):xt(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,m),children:Q(ac,{className:"h-3.5 w-3.5"})})]},`${l}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var gn=e=>ic(e);import{Command as Ae,useCommandState as lc}from"cmdk";import{ChevronDown as cc,ListFilter as dc}from"lucide-react";import{Fragment as mc,forwardRef as uc,isValidElement as vn,useCallback as br,useEffect as hr,useImperativeHandle as pc,useRef as oo,useState as ro}from"react";import{Fragment as xc,jsx as _,jsxs as ve}from"react/jsx-runtime";function xn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:i,children:m,emptyState:d,className:n}){var x,I;let{isMobile:u}=j(),p=oo(null),v=oo(),[h,b]=ro(!1);it("f",()=>b(!0),{enabled:!h});let[g,y]=ro(""),[w,R]=ro(null),C=br(()=>{y(""),R(null)},[]);hr(()=>{h||C()},[h]);let k=w?e.find(({key:N})=>N===w):null,z=br(N=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),R(N),o==null||o(N)},[]),O=br(N=>{if(!k||!c)return!1;let P=c.find(({key:X})=>X===w);return(P==null?void 0:P.value)===N||P&&k.multiple&&Array.isArray(P.value)&&P.value.includes(N)},[k]),S=br(N=>{k&&(O(N)?r(k.key,N):t(k.key,N),k.multiple||b(!1))},[c,k,i]);return hr(()=>{a==null||a(g)},[g]),hr(()=>{l==null||l(w)},[w]),hr(()=>{(k==null?void 0:k.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[k==null?void 0:k.options]),_(lt,{openPopover:h,setOpenPopover:b,onEscapeKeyDown:N=>{w&&(N.preventDefault(),C())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(Ae,{loop:!0,shouldFilter:!k||k.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(gc,{placeholder:`${(k==null?void 0:k.label)||"Filter"}...`,value:g,onValueChange:y,onKeyDown:N=>{(N.key==="Escape"||N.key==="Backspace"&&!g)&&(N.preventDefault(),N.stopPropagation(),w?C():b(!1))},emptySubmit:N=>{N.preventDefault(),N.stopPropagation(),i?(t("ai",k?`${k.label} ${g}`:g),b(!1)):S(g)}}),!k&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(bc,{ref:p,children:ve(Ae.List,{className:s("flex w-full flex-col gap-1 p-1",k?"min-w-[100px]":"min-w-[180px]"),children:[k?((I=(x=k.options)==null?void 0:x.filter(N=>!g||!N.hideDuringSearch))==null?void 0:I.map(N=>{let P=O(N.value);return _(hn,{filter:k,option:N,right:P?_(na,{className:"h-4 w-4"}):N.right,onSelect:()=>S(N.value)},N.value)}))??_(Ae.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:_(Ne,{})})}):e.filter(N=>!N.hideInFilterDropdown).map(N=>ve(mc,{children:[_(hn,{filter:N,onSelect:()=>z(N.key)}),N.separatorAfter&&_(Ae.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},N.key)),(!k||k.options)&&_(hc,{search:g,askAI:i,children:d?fc(d)?(d==null?void 0:d[w??"default"])??"No matches":d:"No matches"})]})},w)]})}),children:ve("button",{type:"button",className:s("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(dc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(cc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function fc(e){return typeof e=="object"&&e!==null&&!vn(e)}var gc=e=>{let t=lc(r=>r.filtered.count===0);return _(Ae.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},bc=uc(({children:e},t)=>{let r=oo(null);pc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=De(r);return ve(xc,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function hn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),l=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(Ae.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:vc(l)?l:_(l,{className:"h-4 w-4"})}),xt(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var hc=({search:e,askAI:t,children:r})=>t&&e?ve(Ae.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Uo,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ae.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),vc=e=>vn(e);var Rx={Select:xn,List:bn};import{useMemo as yc,useState as yn}from"react";import{jsx as Ue,jsxs as vr}from"react/jsx-runtime";function Ax({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[i,m]=yn(r.defaultValue),[d,n]=yn(!1),u=yc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return vr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await c({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[vr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[vr("div",{className:"flex flex-col space-y-3",children:[Ue("h2",{className:"text-xl font-medium",children:e}),Ue("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ue("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:p=>m(p.target.value),className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":l})}):Ue("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),vr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ue("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ue("div",{className:"shrink-0",children:Ue(ie,{text:a,loading:d,disabled:u,disabledTooltip:l})})]})]})}import{useId as wc}from"react";import{jsx as xr,jsxs as Nc}from"react/jsx-runtime";function Ge({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=wc();return Nc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[xr("defs",{children:xr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:xr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),xr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Cc}from"lucide-react";import kc,{useCallback as Pc,useState as Sc}from"react";import{jsx as Ke,jsxs as ao}from"react/jsx-runtime";var Rc=kc.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=Sc(!1),c=Pc(()=>l(!a),[a,l]);return ao("div",{children:[ao("div",{className:"relative flex",children:[Ke("input",{type:a?"text":t,className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),ao("div",{className:"group",children:[r.error&&Ke("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ke(Cc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ke("button",{className:s("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Ke(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ke(va,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ke("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Rc.displayName="Input";import{flip as Dc,offset as Ec,size as Ic,useDismiss as Ac,useFloating as Oc,useInteractions as zc}from"@floating-ui/react";import{Command as Re,useCommandState as Hc}from"cmdk";import{Check as Vc,ChevronDown as _c,Search as Fc,X as Bc}from"lucide-react";import{createContext as Wc,forwardRef as Pn,useContext as lo,useEffect as no,useMemo as Nn,useRef as Cn,useState as io}from"react";import{Drawer as ct}from"vaul";import Tc from"next/image";import{useEffect as Lc,useState as wn}from"react";import{jsx as Mc}from"react/jsx-runtime";function Et(e){let[t,r]=wn(!0),[o,a]=wn(e.src);Lc(()=>a(e.src),[e.src]);let l=c=>{r(!1);let i=c.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Mc(Tc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as se}from"react/jsx-runtime";var yr=Wc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function d2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Cn(null),[u,p]=io(!1),[v,h]=io(""),[b,g]=io(!1);no(()=>{u&&g(!1)},[u]),no(()=>g(!0),[v]),no(()=>{t&&h(t.value)},[t]);let y=Nn(()=>{let P=v.toLowerCase();return b?e.filter(X=>X.value.toLowerCase().includes(P)):v?e.sort((X,D)=>(D.value.toLowerCase().includes(P)?1:0)-(X.value.toLowerCase().includes(P)?1:0)):e},[b,v,e]),{refs:w,floatingStyles:R,context:C}=Oc({open:u,onOpenChange:p,middleware:[Ec(8),Ic({apply({elements:{floating:P},availableHeight:X}){Object.assign(P.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Dc({fallbackStrategy:"initialPlacement",padding:8})]}),k=Ac(C,{enabled:!d||!l}),{getReferenceProps:z,getFloatingProps:O}=zc([k]),S=Cn(null),{scrollProgress:x,updateScrollProgress:I}=De(S),N=Nn(()=>t&&t.icon?t.icon:t&&t.image?E(Et,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(Fc,{className:"size-4 text-neutral-400"}),[t,c]);return E(yr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:h,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?se(ct.Root,{open:u,onOpenChange:p,children:[E(ct.Trigger,{className:"sm:hidden",asChild:!0,children:E(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(so,{className:o,iconElement:N})})}),E(ct.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ct.Portal,{children:[E(ct.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:P=>{P.target instanceof Element&&P.target.closest("[data-sonner-toast]")&&P.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(so,{className:o,iconElement:N})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(kn,{items:y})]})]})}),E(ct.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(so,{className:o,iconElement:N,ref:w.setReference,...z()}),u&&se("div",{ref:w.setFloating,style:R,...O(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:S,onScroll:I,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(kn,{items:y})]}),E("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(x,2)}})]})]})})}var so=Pn(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:s("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[E("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[E($c,{}),E(Uc,{})]})]})),$c=Pn((e,t)=>{let r=Hc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:i,disabled:m}=lo(yr);return E(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Uc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=lo(yr);return E("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Bc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(_c,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function kn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=lo(yr);return e.map(a=>se(Re.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(Et,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),E("p",{className:s("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&E(or,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Vc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as co from"@radix-ui/react-label";import{cva as Gc}from"class-variance-authority";import*as Sn from"react";import{jsx as Yc}from"react/jsx-runtime";var Kc=Gc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jc=Sn.forwardRef(({className:e,...t},r)=>Yc(co.Root,{ref:r,className:s(Kc(),e),...t}));jc.displayName=co.Root.displayName;import{cva as Zc}from"class-variance-authority";import{isValidElement as qc}from"react";import{jsx as Rn,jsxs as Tn}from"react/jsx-runtime";var Xc=Zc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function N2({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return Tn(e||"button",{...e==="button"?{type:"button"}:{},className:s(Xc({variant:t}),l),...c,children:[Tn("div",{className:"flex grow items-center gap-2",children:[o&&(Jc(o)?o:Rn(o,{className:"size-4"})),r]}),a&&Rn("kbd",{className:s("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var Jc=e=>qc(e);import{curveNatural as Ln}from"@visx/curve";import{LinearGradient as Mn}from"@visx/gradient";import{Group as Qc}from"@visx/group";import{ParentSize as ed}from"@visx/responsive";import{scaleLinear as td,scaleUtc as rd}from"@visx/scale";import{Area as od,AreaClosed as ad}from"@visx/shape";import{motion as Dn}from"framer-motion";import{useId as nd,useMemo as En}from"react";import{jsx as xe,jsxs as mo}from"react/jsx-runtime";var id={top:8,right:2,bottom:2,left:2};function E2(e){return xe(ed,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(sd,{...{width:t,height:r,...e}})})}function sd({width:e,height:t,data:r,curve:o=!0,color:a,padding:l}){let c={...id,...l},i=nd(),m=En(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=En(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),h=new Date(Math.min(...v)),b=new Date(Math.max(...v));return{yScale:td({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:rd({domain:[h,b],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return mo("svg",{width:e,height:t,children:[mo("defs",{children:[xe(Mn,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),xe(Mn,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),mo(Qc,{left:c.left,top:c.top,children:[xe(od,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),xe(ad,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${i}-color-gradient)`,mask:`url(#${i}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as uo from"@radix-ui/react-visually-hidden";import{useRouter as ld}from"next/navigation";import{Drawer as je}from"vaul";import{jsx as oe,jsxs as dt}from"react/jsx-runtime";function V2({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:i}){let m=ld(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!l?oe(je.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:dt(je.Portal,{children:[oe(je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(je.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:dt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[dt(uo.Root,{children:[oe(je.Title,{children:"Modal"}),oe(je.Description,{children:"This is a modal"})]}),oe(cd,{}),e]})}),oe(je.Overlay,{})]})}):oe(le.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:dt(le.Portal,{children:[oe(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),dt(le.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[dt(uo.Root,{children:[oe(le.Title,{children:"Modal"}),oe(le.Description,{children:"This is a modal"})]}),e]})]})})}function cd(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as dd,jsx as wr,jsxs as mt}from"react/jsx-runtime";var In=s("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function B2({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return mt("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[mt("div",{className:"flex items-center gap-2",children:[mt("div",{children:[wr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&mt(dd,{children:[mt("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&wr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),l]}),mt("div",{className:"flex items-center gap-2",children:[wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Oe from"@radix-ui/react-radio-group";import{Circle as md}from"lucide-react";import*as po from"react";import{jsx as Nr}from"react/jsx-runtime";var ud=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Root,{className:s("grid gap-2",e),...t,ref:r}));ud.displayName=Oe.Root.displayName;var pd=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Item,{ref:r,className:s("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Nr(Oe.Indicator,{className:"flex items-center justify-center",children:Nr(md,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pd.displayName=Oe.Item.displayName;import{Drawer as ze}from"vaul";import{jsx as Ye,jsxs as vd}from"react/jsx-runtime";function fd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?ze.NestedRoot:ze.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:vd(ze.Portal,{children:[Ye(ze.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(ze.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className:s("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Ye("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function gd({className:e,...t}){return Ye(ze.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function bd(e){return Ye(ze.Description,{...e})}function hd(e){return Ye(ze.Close,{...e})}var Z2=Object.assign(fd,{Title:gd,Description:bd,Close:hd});import{useEffect as xd,useRef as yd,useState as wd}from"react";import{jsx as An}from"react/jsx-runtime";var Nd=`
|
|
2
|
+
import{$ as Xu,$a as _p,$b as L0,$c as wf,$d as gg,A as Du,Aa as Np,Ab as l0,Ac as Pa,Ad as Gf,B as Eu,Ba as oa,Bb as c0,Bc as Sa,Bd as Kf,C as jt,Ca as Cp,Cb as d0,Cc as J0,Cd as jf,D as Iu,Da as kp,Db as m0,Dc as Q0,Dd as Yf,E as Yt,Ea as aa,Eb as u0,Ec as ef,Ed as Zf,F as Au,Fa as Pp,Fb as ga,Fc as tf,Fd as qf,G as Ou,Ga as Sp,Gb as p0,Gc as Xt,Gd as Xf,H as zu,Ha as Rp,Hb as f0,Hc as rf,Hd as Jf,I as Hu,Ia as Tp,Ib as g0,Ic as of,Id as Qf,J as Xo,Ja as Lp,Jb as b0,Jc as af,Jd as eg,K as Jo,Ka as Mp,Kb as ba,Kc as nf,Kd as La,L as Qo,La as Dp,Lb as ha,Lc as sf,Ld as Ma,M as ea,Ma as Ep,Mb as va,Mc as lf,Md as tg,N as ta,Na as Ip,Nb as xa,Nc as cf,Nd as rg,O as Vu,Oa as Ap,Ob as h0,Oc as df,Od as og,P as _u,Pa as na,Pb as v0,Pc as mf,Pd as ag,Q as Fu,Qa as ia,Qb as x0,Qc as uf,Qd as ng,R as Bu,Ra as sa,Rb as y0,Rc as Jt,Rd as ig,S as Wu,Sa as la,Sb as w0,Sc as pf,Sd as sg,T as $u,Ta as ca,Tb as N0,Tc as ff,Td as lg,U as Uu,Ua as Op,Ub as ya,Uc as gf,Ud as cg,V as Gu,Va as zp,Vb as C0,Vc as bf,Vd as dg,W as Ku,Wa as Hp,Wb as k0,Wc as hf,Wd as mg,X as ju,Xa as da,Xb as P0,Xc as vf,Xd as ug,Y as Yu,Ya as ma,Yb as S0,Yc as xf,Yd as Nt,Z as Zu,Za as ua,Zb as R0,Zc as Ra,Zd as pg,_ as qu,_a as Vp,_b as T0,_c as yf,_d as fg,a as Wo,aa as Ju,ab as Fp,ac as M0,ad as Nf,ae as bg,b as Nu,ba as Qu,bb as Bp,bc as D0,bd as Cf,be as Da,c as et,ca as ep,cb as Wp,cc as E0,cd as kf,ce as hg,d as Ut,da as tp,db as Hr,dc as I0,dd as Pf,de as vg,e as Cu,ea as rp,eb as $p,ec as A0,ed as Sf,ee as xg,f as tt,fa as op,fb as Up,fc as O0,fd as Rf,fe as yg,g as rt,ga as ap,gb as Gp,gc as z0,gd as Qt,ge as wg,h as $o,ha as np,hb as pa,hc as wa,hd as Tf,he as Ng,i as Uo,ia as ip,ib as Kp,ic as H0,id as Lf,ie as Cg,j as ku,ja as sp,jb as jp,jc as V0,jd as Mf,k as Go,ka as lp,kb as Yp,kc as Na,kd as Df,l as Ko,la as cp,lb as Zp,lc as _0,ld as Ef,m as jo,ma as ra,mb as qp,mc as Ca,md as Vr,n as Yo,na as dp,nb as Xp,nc as F0,nd as If,o as wt,oa as mp,ob as Jp,oc as B0,od as Af,p as Pu,pa as up,pb as Qp,pc as W0,pd as Ta,q as Ne,qa as pp,qb as e0,qc as $0,qd as Of,r as Su,ra as fp,rb as t0,rc as U0,rd as zf,s as Gt,sa as gp,sb as r0,sc as G0,sd as Hf,t as Ru,ta as bp,tb as o0,tc as K0,td as Vf,u as Tu,ua as hp,ub as a0,uc as j0,ud as _f,v as Kt,va as vp,vb as fa,vc as Y0,vd as Ff,w as Lu,wa as Zt,wb as n0,wc as Z0,wd as Bf,x as Zo,xa as xp,xb as i0,xc as q0,xd as Wf,y as qo,ya as yp,yb as s0,yc as ka,yd as $f,z as Mu,za as wp,zb as qt,zc as X0,zd as Uf}from"./chunk-TJ4JURNI.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as vt,b as Io,c as Or,d as xt,e as Ao,f as Oo,g as zo,h as yt,i as zr,j as Ho,k as V,l as we,m as Vo,n as fe,o as Wt,p as s,q as $t,r as _o,s as Fo,t as Bo}from"./chunk-LVO2QIFF.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as wi}from"lucide-react";import*as tr from"react";import{jsx as er,jsxs as Pi}from"react/jsx-runtime";var Lg=ae.Root,Ni=tr.forwardRef(({className:e,...t},r)=>er(ae.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ni.displayName="AccordionItem";var Ci=tr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?wi:Qt;return er(ae.Header,{className:"flex",children:Pi(ae.Trigger,{ref:a,className:s("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,er(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ci.displayName=ae.Trigger.displayName;var ki=tr.forwardRef(({className:e,children:t,...r},o)=>er(ae.Content,{ref:o,className:s("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));ki.displayName=ae.Content.displayName;import{cva as Si}from"class-variance-authority";import*as rr from"react";import{jsx as _r}from"react/jsx-runtime";var Ri=Si("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Ti=rr.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Ri({variant:t}),e),...r}));Ti.displayName="Alert";var Li=rr.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Li.displayName="AlertTitle";var Mi=rr.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Mi.displayName="AlertDescription";import{sha256 as Di}from"js-sha256";import{useState as Ei}from"react";import{jsx as Fr}from"react/jsx-runtime";function Ii(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar?seed=${encodeURIComponent(e.id)}`,r=`https://api.dub.co/og/avatar${encodeURIComponent(`?seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Di(e.email)}?d=${encodeURIComponent(r)}`:t}function Hg({user:e={},className:t}){if(!e)return Fr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ei(Ii(e));return Fr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:s("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar?seed=${e.id}`)}})}function Vg({id:e,className:t}){return Fr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:s("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ai}from"class-variance-authority";import{jsx as zi}from"react/jsx-runtime";var Oi=Ai("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function or({className:e,variant:t,...r}){return zi("span",{className:s(Oi({variant:t}),e),...r})}import{cva as Bi}from"class-variance-authority";import{forwardRef as Wi}from"react";import*as ge from"@radix-ui/react-tooltip";import Hi from"linkify-react";import{HelpCircle as Vi}from"lucide-react";import _i from"next/link";import{useState as Fi}from"react";import{jsx as U,jsxs as ot}from"react/jsx-runtime";function Jg({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[i,m]=Fi(!1);return ot(ge.Root,{open:i,onOpenChange:m,delayDuration:l,disableHoverableContent:a,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?U("span",{className:s("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:m}):t})})]})}function Qg({title:e,cta:t,href:r,target:o,onClick:a}){return ot("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(_i,{href:r,...o?{target:o}:{},className:s(ne({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function e1({title:e,cta:t,href:r}){return ot("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function t1({children:e,className:t,tooltipClassName:r}){return U("div",{className:s("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Hi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:s("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function r1(e){return U(J,{...e,children:U(Vi,{className:"h-4 w-4 text-neutral-500"})})}function o1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:ot("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[ot("p",{className:"text-sm font-semibold text-neutral-700",children:[r,$t(e||0,{full:!0})," ",t]}),a&&ot("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function a1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(or,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function n1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:s("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function ar({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as at,jsxs as Ea}from"react/jsx-runtime";var ne=Bi("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:s("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=Wi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?at(J,{content:m,children:Ea("div",{className:s("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[c,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:i})]})}):Ea("button",{ref:u,type:n.onClick?"button":"submit",className:s("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ne({variant:t}),r),disabled:n.disabled||l,...n,children:[l?at(Ne,{}):c||null,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:i}),d]}));ie.displayName="Button";import{cva as $i}from"class-variance-authority";import{createContext as Ui}from"react";import{jsx as Ia}from"react/jsx-runtime";var Gi=$i("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),Ct=Ui({variant:"loose",loading:!1});function Aa({variant:e="loose",loading:t=!1,className:r,children:o}){return Ia("ul",{className:s(Gi({variant:e,loading:t}),r),"data-variant":e,children:Ia(Ct.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as Ki}from"class-variance-authority";import{createContext as ji,useContext as Yi,useEffect as Zi,useRef as qi,useState as Xi}from"react";import{jsx as Oa,jsxs as es}from"react/jsx-runtime";var Ji=Ki("w-full group/card border-neutral-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-neutral-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),Qi="w-full py-2.5 px-4",Br=ji({hovered:!1});function za({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:l=!0,banner:c}){let{variant:i}=Yi(Ct),m=qi(null),[d,n]=Xi(!1);Zi(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var v;((v=m.current)==null?void 0:v.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||yt(p));return es("li",{ref:m,className:s(Ji({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":l,children:[c,Oa("div",{className:s(Qi,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Oa(Br.Provider,{value:{hovered:d},children:r})})]})}var L1=Object.assign(Aa,{Card:Object.assign(za,{Context:Br}),Context:Ct});import ts from"embla-carousel-autoplay";import rs from"embla-carousel-react";import{ArrowLeft as os,ArrowRight as as}from"lucide-react";import{createContext as ns,forwardRef as Pt,useCallback as kt,useContext as is,useEffect as Wr,useState as $r}from"react";import{jsx as Ce,jsxs as _a}from"react/jsx-runtime";var Ur=2e3,Ha=ns(null);function be(){let e=is(Ha);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Va(){let{api:e}=be(),[t,r]=$r(0),o=kt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Wr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var ss=Pt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...i},m)=>{let[d,n]=rs({...t,axis:e==="horizontal"?"x":"y"},[...o?[ts(typeof o=="object"?o:{delay:Ur})]:[],...a||[]]),[u,p]=$r(!1),[v,h]=$r(!1),b=kt(R=>{!R||(p(R.canScrollPrev()),h(R.canScrollNext()))},[]),g=kt(()=>{n==null||n.scrollPrev()},[n]),y=kt(()=>{n==null||n.scrollNext()},[n]),w=kt(R=>{R.key==="ArrowLeft"?(R.preventDefault(),g()):R.key==="ArrowRight"&&(R.preventDefault(),y())},[g,y]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return b(n),n.on("reInit",b),n.on("select",b),()=>{n==null||n.off("select",b)}},[n,b]),Ce(Ha.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:u,canScrollNext:v},children:Ce("div",{ref:m,onKeyDownCapture:w,className:s("relative",l),role:"region","aria-roledescription":"carousel",...i,children:c})})});ss.displayName="Carousel";var ls=Pt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ls.displayName="CarouselContent";var cs=Pt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:s("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});cs.displayName="CarouselItem";var ds=Pt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(os,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});ds.displayName="CarouselPrevious";var ms=Pt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(as,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ms.displayName="CarouselNext";import{cva as us}from"class-variance-authority";import{motion as ps}from"framer-motion";import{ChevronLeft as fs,ChevronRight as gs}from"lucide-react";import*as Me from"react";import{jsx as We,jsxs as St}from"react/jsx-runtime";var bs=us("flex items-center justify-center gap-3 sm:gap-6",{variants:{variant:{simple:"relative",floating:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-neutral-800/10 bg-white sm:bottom-6 "}}}),j1=({variant:e="simple",className:t})=>{var h;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=be(),i=(h=c==null?void 0:c.plugins())==null?void 0:h.autoplay,[m,d]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(b=>{d((b==null?void 0:b.selectedScrollSnap())??0)},[]),v=Me.useCallback(b=>()=>{i&&i.isPlaying()&&i.stop(),b()},[i]);return Me.useEffect(()=>{!c||(p(c),u((i==null?void 0:i.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,i,p]),St("div",{className:s(bs({variant:e}),t),children:[e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:v(o),children:[We(fs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&We("div",{className:"flex items-center gap-1",children:c.slideNodes().map((b,g)=>St("button",{onClick:v(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[We("div",{className:s("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===m?"bg-black":"bg-black/20",n&&g===m&&"w-6 bg-black/20"),children:n&&g===m&&We(ps.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Ur)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),St("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[We(gs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Next slide"})]})]})};import hs from"embla-carousel-react";import{forwardRef as vs,useCallback as xs,useEffect as ys}from"react";import{jsx as nr}from"react/jsx-runtime";var rb=({className:e,...t})=>{let{api:r}=be(),[o,a]=hs({dragFree:!0}),l=xs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return ys(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),nr("div",{className:"overflow-hidden",ref:o,children:nr("div",{className:s("mx-4 flex gap-4",e),...t})})},ob=vs(({index:e,className:t,...r},o)=>{let{api:a}=be(),l=Va();return nr("div",{ref:o,children:nr("button",{type:"button",onClick:()=>{var i;if(!a)return;let c=(i=a.plugins())==null?void 0:i.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===l}):t,...r})})});import*as Rt from"@radix-ui/react-checkbox";import{Check as ws}from"lucide-react";import*as Fa from"react";import{jsx as Gr}from"react/jsx-runtime";var Ns=Fa.forwardRef(({className:e,...t},r)=>Gr(Rt.Root,{ref:r,className:s("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:Gr(Rt.Indicator,{className:"flex items-center justify-center",children:Gr(ws,{className:"h-3 w-3 text-white"})})}));Ns.displayName=Rt.Root.displayName;import{Command as Lt,CommandInput as pl,CommandItem as fl,useCommandState as gl}from"cmdk";import{ChevronDown as bl}from"lucide-react";import{forwardRef as hl,isValidElement as vl,useCallback as xl,useEffect as cr,useRef as yl,useState as Tt}from"react";import{motion as dl}from"framer-motion";import{forwardRef as ml,useRef as ul}from"react";import Kr from"js-cookie";import{useEffect as Cs,useState as ks}from"react";function db(e,t,r){let[o,a]=ks(()=>{let c=Kr.get(e);return c?JSON.parse(c):t});return Cs(()=>{let c=()=>{let i=Kr.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Kr.set(e,JSON.stringify(c),r)}]}import{useCallback as Ps,useEffect as Ss,useRef as Rs,useState as Ts}from"react";var nt=(e=3e3)=>{let t=Rs(null),[r,o]=Ts(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=Ps(async(c,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),i==null||i(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(d){if(console.error("Failed to copy: ",d),m)throw d}},[e]);return Ss(()=>()=>a(),[]),[r,l]};import{useEffect as Ls,useState as Ms}from"react";function gb(){let[e,t]=Ms(null);return Ls(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(i=>{var u,p,v;let m=i[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let h=1;h<i.length;h++){let b=i[h];if(!b)break;(b.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=b)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=l.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=l.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(i=>a.observe(i)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Ds}from"react";function xb(e){return{handleKeyDown:Ds(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Es,useState as Is}from"react";function Cb(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Is(o??!1);return Es(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let i=null;return e.current&&(i=new IntersectionObserver(c),i.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),i==null||i.disconnect()}},[e,r]),a}import{useEffect as As,useState as Os}from"react";function Sb(){let[e,t]=Os(!1);return As(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as zs,useState as Hs}from"react";function Mb(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=Hs(),i=(l==null?void 0:l.isIntersecting)&&a,m=([d])=>{c(d)};return zs(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||i||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(d),()=>p.disconnect()},[e,JSON.stringify(t),r,o,i]),l}import{createContext as Vs,useCallback as _s,useContext as Fs,useEffect as Ba,useId as Bs,useState as Ws}from"react";import{jsx as $s}from"react/jsx-runtime";var Wa=Vs({listeners:[],setListeners:()=>{}});function zb({children:e}){let[t,r]=Ws([]);return $s(Wa.Provider,{value:{listeners:t,setListeners:r},children:e})}function it(e,t,r={}){let o=Bs(),{listeners:a,setListeners:l}=Fs(Wa),c=_s(i=>{if(r.enabled===!1)return;let m=i.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet)return;let u=[...i.metaKey?["meta"]:[],...i.ctrlKey?["ctrl"]:[],...i.altKey?["alt"]:[],i.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(h=>h.enabled!==!1&&!!d==!!h.modal&&!!n==!!h.sheet&&(Array.isArray(h.key)?h.key.includes(u):h.key===u));!p.length||Ao(p,(h,b)=>(b.priority??0)-(h.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);Ba(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),Ba(()=>(l(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>l(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Us,useState as Gs}from"react";function $a(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function _b(e,t){let[r,o]=Gs($a(e)??t);return Us(()=>{let l=$a(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Ks}from"sonner";import js from"swr";function Ub(e,t){let{data:r,isLoading:o,mutate:a}=js(e,fe);return{data:r,isLoading:o,update:async(l,c)=>Ks.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as ja,useMemo as Qs}from"react";import{useEffect as Ua,useState as Ys}from"react";function Ga({pageSize:e,page:t,onPageChange:r}){let[o,a]=Ys({pageIndex:t,pageSize:e});return Ua(()=>{a(l=>({...l,pageIndex:t}))},[t]),Ua(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Zs,useRouter as qs,useSearchParams as Xs}from"next/navigation";import{useCallback as Js}from"react";function Ka(){let e=Zs(),t=qs(),r=Xs(),o=Object.fromEntries(r),a=(c,i)=>{let m=new URLSearchParams(r);if((i==null?void 0:i.include)&&Array.isArray(i.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var v;(v=i.include)!=null&&v.includes(p)&&n.set(p,u)}),m=n}(i==null?void 0:i.exclude)&&Array.isArray(i.exclude)&&i.exclude.forEach(n=>m.delete(n)),c&&Object.entries(c).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},l=Js(({set:c,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([b,g])=>p.set(b,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(b=>p.delete(b)):p.delete(i));let v=p.toString(),h=`${e}${v.length>0?`?${v}`:""}`;if(n)return h;m?t.replace(h,{scroll:!1}):t.push(h,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:l,getQueryString:a}}function rh(e=Fo){let{searchParams:t,queryParams:r}=Ka(),o=Qs(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ga({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return ja(()=>{let c=parseInt(t.get("page")||"1")||1;l(i=>({...i,pageIndex:c}))},[t.get("page")]),ja(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:l}}import{useEffect as el}from"react";function nh(){el(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}import{useEffect as tl,useState as rl}from"react";function ir(e){let[t,r]=rl(),o=([a])=>{r(a)};return tl(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as ol,useEffect as Ya,useState as al}from"react";function Za(e,{container:t}={}){let[r,o]=al(!1),a=ol(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return Ya(()=>{let l=(t==null?void 0:t.current)??window;return l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)},[a]),Ya(()=>{a()},[a]),r}import{useCallback as nl,useEffect as il,useState as sl}from"react";function De(e){let[t,r]=sl(1),o=nl(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:i}=e.current;r(c===i?1:Math.min(l/(c-i),1))},[]),a=ir(e);return il(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as ll}from"react";import{toast as Xa}from"sonner";import{jsx as sr,jsxs as qa}from"react/jsx-runtime";function cl({id:e,message:t,undo:r}){let o=()=>{r(),Xa.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return ll(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),qa("div",{className:"flex w-full items-center justify-between space-x-2",children:[qa("div",{className:"flex items-center space-x-2",children:[sr(jo,{}),sr("p",{className:"font-medium",children:t})]}),sr("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function yh(){return({id:t,message:r,undo:o,duration:a})=>Xa(sr(cl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Ja}from"react/jsx-runtime";var ke=ml(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let i=ul(null),m=ir(i);return Ja(dl.div,{ref:c,className:s("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:Ja("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ee from"@radix-ui/react-popover";import{Drawer as st}from"vaul";import{jsx as Pe,jsxs as lr}from"react/jsx-runtime";function lt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return c||v?lr(st.Root,{open:a,onOpenChange:l,children:[Pe(st.Trigger,{className:"sm:hidden",asChild:!0,children:e}),lr(st.Portal,{children:[Pe(st.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),lr(st.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:u,onPointerDownOutside:h=>{h.target instanceof Element&&h.target.closest("[data-sonner-toast]")&&h.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(st.Overlay,{})]})]}):lr(Ee.Root,{open:a,onOpenChange:l,children:[Pe(Ee.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ee.Portal,{children:Pe(Ee.Content,{sideOffset:8,align:r,side:o,className:s("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",i),sticky:n,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as dr,jsx as L,jsxs as Se}from"react/jsx-runtime";function wl(e,t){return e===!0}function Zh({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:h,onOpenChange:b,onSearchChange:g,shouldFilter:y=!0,inputRight:w,inputClassName:R,optionRight:C,optionClassName:k,matchTriggerWidth:z,hideSearch:O=!1,children:S}){let x=wl(e,r),I=Array.isArray(t)?t:t?[t]:[],{isMobile:N}=j(),[P,X]=Tt(!1),D=h??P,me=b??X,[$,Er]=Tt(""),[Mo,Ir]=Tt(!1),[Ar,vi]=Tt(void 0),[xi,Do]=Tt(!1),yi=H=>{var Qe;if(x){let Fe=I.some(({value:Be})=>Be===H.value);r(Fe?I.filter(({value:Be})=>Be!==H.value):[...I,H])}else r(I.length&&((Qe=I[0])==null?void 0:Qe.value)===H.value?null:H),me(!1)},Eo=xl((H,Qe)=>Qe===""?[...H.filter(Fe=>Fe.first&&!I.some(Be=>Be.value===Fe.value)),...I,...H.filter(Fe=>!Fe.first&&!I.some(Be=>Be.value===Fe.value))]:H,[I]);return cr(()=>{Mo&&(vi(o&&Eo(o,$)),Ir(!1))},[Mo,o,Eo,$]),cr(()=>{Ir(!0)},[o]),cr(()=>{D||(Er(""),Ir(!0))},[D]),cr(()=>g==null?void 0:g($),[$]),L(lt,{openPopover:D,setOpenPopover:me,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:s(z&&"sm:w-[var(--radix-popover-trigger-width)]"),content:L(ke,{width:!N&&!z,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(Lt,{loop:!0,shouldFilter:y,children:[!O&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[L(pl,{placeholder:c,value:$,onValueChange:Er,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),me(!1))}}),w&&L("div",{className:"mr-2",children:w}),u&&L("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:u})]}),L(Nl,{children:L(Lt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ar!==void 0?Se(dr,{children:[Ar.map(H=>L(Cl,{option:H,multiple:x,selected:I.some(({value:Qe})=>Qe===H.value),onSelect:()=>yi(H),right:C==null?void 0:C(H),className:k},`${H.label}, ${H.value}`)),$.length>0&&d&&Se(fl,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",k),onSelect:async()=>{Do(!0),await(d==null?void 0:d($))&&(Er(""),me(!1)),Do(!1)},children:[xi?L(Ne,{className:"size-4 shrink-0"}):L(Qt,{className:"size-4 shrink-0"}),L("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),y?L(Pl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ar.length===0?L("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):L(Lt.Loading,{children:L("div",{className:"flex h-12 items-center justify-center",children:L(Ne,{})})})})})]})}),children:L(ie,{variant:"secondary",...n,className:s(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:s(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(dr,{children:[L("div",{className:"min-w-0 grow truncate text-left",children:S||I.map(H=>H.label).join(", ")||l}),p&&(p===!0?L(bl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?Qa(a)?a:L(a,{className:"size-4 shrink-0"}):void 0})})}var Nl=({children:e})=>{let t=yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return Se(dr,{children:[L("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),L("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function Cl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Se(dr,{children:[L(kl,{disabledTooltip:e.disabledTooltip,children:Se(Lt.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",l),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&L("div",{className:"shrink-0 text-neutral-600",children:o?L(sa,{className:"size-4 text-neutral-600"}):L(la,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&L("span",{className:"shrink-0 text-neutral-600",children:Qa(e.icon)?e.icon:L(e.icon,{className:"h-4 w-4"})}),L("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&L(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&L(Lt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var kl=({children:e,disabledTooltip:t})=>t?L(J,{content:t,children:L("div",{children:e})}):e,Qa=e=>vl(e),Pl=hl((e,t)=>gl(o=>o.filtered.count===0)?L("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as mr,format as Sl,isSameMonth as Rl}from"date-fns";import{ChevronLeft as en,ChevronRight as tn,ChevronsLeft as Tl,ChevronsRight as Ll}from"lucide-react";import{forwardRef as Ml,useRef as Dl}from"react";import{DayPicker as El,useDayPicker as Il,useDayRender as Al,useNavigation as Ol}from"react-day-picker";import{Fragment as zl,jsx as te,jsxs as ur}from"react/jsx-runtime";var Mt=Ml(({onClick:e,icon:t,disabled:r,...o},a)=>te("button",{ref:a,type:"button",disabled:r,className:s("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:te(t,{className:"h-full w-full shrink-0"})}));Mt.displayName="NavigationButton";function rn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:i,...m}){return te(El,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:s("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...i},components:{IconLeft:()=>te(en,{className:"h-4 w-4"}),IconRight:()=>te(tn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:h}=Ol(),{numberOfMonths:b,fromDate:g,toDate:y}=Il(),w=h.findIndex(x=>Rl(d.displayMonth,x)),R=w===0,C=w===h.length-1,k=b>1&&(R||!C),z=b>1&&(C||!R),O=()=>{let x=mr(v,-1);p&&(!g||x.getTime()>=g.getTime())&&n(x)},S=()=>{let x=mr(v,1);u&&(!y||x.getTime()<=y.getTime())&&n(x)};return ur("div",{className:"flex items-center justify-between",children:[ur("div",{className:"flex items-center gap-1",children:[o&&!z&&te(Mt,{disabled:a||!p||g&&mr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:O,icon:Tl}),!z&&te(Mt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:en})]}),te("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Sl(d.displayMonth,"LLLL yyy",{locale:l})}),ur("div",{className:"flex items-center gap-1",children:[!k&&te(Mt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:tn}),o&&!k&&te(Mt,{disabled:a||!u||y&&mr(v,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:S,icon:Ll})]})]})},Day:({date:d,displayMonth:n})=>{let u=Dl(null),{activeModifiers:p,buttonProps:v,divProps:h,isButton:b,isHidden:g}=Al(d,n,u),{selected:y,today:w,disabled:R,range_middle:C}=p;if(g)return te(zl,{});if(!b)return te("div",{...h,className:s("flex items-center justify-center",h.className)});let{children:k,...z}=v;return ur("button",{ref:u,...z,type:"button",children:[k,w&&te("span",{className:s("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!y,"!bg-white":y,"!bg-blue-400":y&&C,"text-neutral-400":R})})]})}},...m})}import{enUS as jl}from"date-fns/locale";import{useEffect as Jr,useMemo as an,useRef as Yl,useState as fr}from"react";import{Command as jr}from"cmdk";import{Lock as Hl}from"lucide-react";import{jsx as $e,jsxs as Vl}from"react/jsx-runtime";var Yr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),i=(d,n)=>{let u=d.from,p=n.from,v=!1;u&&p&&c(u,p)&&(v=!0);let h=d.to,b=n.to,g=!1;return h&&b&&c(h,b)&&(g=!0),v&&g},m=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&i(n,d.dateRange)}else if(l(d)){let n=r;return n&&c(n,d.date)}return!1};return $e(jr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:$e(jr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Vl(jr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:s("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(d)&&"font-semibold text-neutral-800"),children:[$e("span",{children:d.label}),d.requiresUpgrade?$e(Hl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?$e("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&$e(J,{side:"bottom",content:d.tooltipContent,children:$e("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Yr.displayName="DatePicker.Presets";import{format as Ie}from"date-fns";import{createContext as _l}from"react";var Zr=_l({isOpen:!1,setIsOpen:()=>{}}),Fl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},qr=(e,t,r=!1)=>{let o=!Fl(),a;return r?a=o?Ie(e,"d MMM, yyyy h:mm a",{locale:t}):Ie(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ie(e,"d MMM, yyyy",{locale:t}),a},on=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,h,b,g;if("date"in n){let y=n.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let y=(u=n.dateRange.from)==null?void 0:u.getFullYear(),w=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(w&&r&&w>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(v=n.dateRange.from)==null?void 0:v.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ie(a,"MMM, yyyy")}.`)}if(l){let R=(h=n.dateRange.to)==null?void 0:h.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ie(l,"MMM, yyyy")}.`)}if(c){let R=(b=n.dateRange.from)==null?void 0:b.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ie(c,"MMM dd, yyyy")}.`)}if(i){let R=(g=n.dateRange.to)==null?void 0:g.getDate();if(R&&R>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Bl}from"class-variance-authority";import{Calendar as Wl,ChevronDown as $l}from"lucide-react";import{forwardRef as Ul}from"react";import{jsx as pr,jsxs as Kl}from"react/jsx-runtime";var Gl=Bl(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),Xr=Ul(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Kl("button",{ref:l,className:s(Gl({hasError:o}),e),...a,children:[pr(Wl,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),pr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?pr("span",{className:"text-neutral-400",children:r}):null)}),pr($l,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Xr.displayName="DatePicker.Trigger";import{jsx as re,jsxs as nn}from"react/jsx-runtime";var Zl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:i,showYearNavigation:m=!1,locale:d=jl,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...h})=>{let{isDesktop:b}=j(),[g,y]=fr(!1),[w,R]=fr(a&&r?a==null?void 0:a.find(({id:D})=>D===r):void 0),[C,k]=fr((w==null?void 0:w.dateRange)??e??t??void 0),[z,O]=fr(C==null?void 0:C.to),S=an(()=>C,[g]);Jr(()=>{k(e)},[e]),Jr(()=>{let D=a==null?void 0:a.find(({id:me})=>me===r);R(D),k((D==null?void 0:D.dateRange)??e??t)},[a,r]),Jr(()=>{g?C&&O(C.to):O(C==null?void 0:C.to)},[g]);let x=(D,me)=>{let $=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:me}:D;k($),R(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),y(!1))},I=D=>{k(D.dateRange),R(D),o==null||o(D.dateRange,D),y(!1)},N=()=>{k(S),y(!1)},P=D=>{D||N(),y(D)},X=an(()=>C?`${C.from?qr(C.from,d):""} - ${C.to?qr(C.to,d):""}`:null,[C,d]);return it((a==null?void 0:a.filter(D=>D.shortcut).map(D=>D.shortcut))??[],D=>{let me=a==null?void 0:a.find($=>$.shortcut===D.key);me&&I(me)}),re(Zr.Provider,{value:{isOpen:g,setIsOpen:y},children:re(lt,{align:p,openPopover:g,setOpenPopover:P,popoverContentClassName:"rounded-xl",content:re("div",{className:"flex w-full",children:nn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&re(ql,{children:re("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:re("div",{className:"sm:py-3",children:re(Yr,{currentPresetId:r,currentValue:C,presets:a,onSelect:I})})})}),re("div",{className:"scrollbar-hide overflow-x-scroll",children:re(rn,{mode:"range",selected:C,onSelect:x,month:z,onMonthChange:O,numberOfMonths:b?2:1,disabled:i,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...h})})]})}),children:re(Xr,{placeholder:n,disabled:l,className:v,hasError:u,"aria-required":h.required||h["aria-required"],"aria-invalid":h["aria-invalid"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],children:(w==null?void 0:w.label)??X})})})};function Iv({presets:e,...t}){return e&&on(e,t),re(Zl,{presets:e,...t})}function ql({children:e}){let t=Yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return nn("div",{className:"relative sm:h-full",children:[re("div",{ref:t,onScroll:o,className:s("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),re("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import Xl from"next/link";import{useEffect as Jl,useState as sn}from"react";import Ql from"swr";import{jsx as Qr,jsxs as ln}from"react/jsx-runtime";function cn({className:e}){let{data:t}=Ql("https://status.dub.co/api/v1/summary",fe),[r,o]=sn("bg-neutral-200"),[a,l]=sn("Loading status...");return Jl(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:i,name:m}=c[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";l(m),o(d)}else l("All systems operational"),o("bg-green-500")},[t]),ln(Xl,{href:"https://status.dub.co",target:"_blank",className:s("group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",e),children:[ln("div",{className:"relative size-2",children:[Qr("div",{className:s("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),Qr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Qr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as gr,jsxs as dn}from"react/jsx-runtime";function Gv({icon:e,title:t,description:r,learnMore:o,children:a}){return dn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[gr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:gr(e,{className:"size-6 text-neutral-800"})}),gr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&dn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&gr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as ec}from"class-variance-authority";import{useState as mn}from"react";import{toast as un}from"sonner";import{Fragment as rc,jsx as he,jsxs as to}from"react/jsx-runtime";var pn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],eo={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"},documents:{types:pn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...pn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},tc=ec("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-neutral-50",{variants:{variant:{default:"rounded-md border border-neutral-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function rx({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:h,maxFileSizeMB:b=0,targetResolution:g,accessibilityLabel:y="File upload",disabled:w=!1}){let[R,C]=mn(!1),[k,z]=mn(null),O=async S=>{let x="dataTransfer"in S?S.dataTransfer.files&&S.dataTransfer.files[0]:S.target.files&&S.target.files[0];if(!x)return;if(z(x.name),b>0&&x.size/1024/1024>b){un.error(`File size too big (max ${b} MB)`);return}let I=eo[d].types;if(I.length&&!I.includes(x.type)){un.error(eo[d].errorMessage??"File type not supported");return}let N=x;if(g&&x.type.startsWith("image/"))try{let P=await zo(x,g),X=await fetch(P).then(D=>D.blob());N=new File([X],x.name,{type:x.type})}catch(P){console.error("Error resizing image:",P)}if(t){let P=new FileReader;P.onload=X=>{var D;return r==null?void 0:r({src:(D=X.target)==null?void 0:D.result,file:N})},P.readAsDataURL(N);return}r==null||r({file:N})};return to("label",{className:s(tc({variant:o}),w?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(wt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),C(!1)},onDrop:async S=>{S.preventDefault(),S.stopPropagation(),O(S),C(!1)}}),to("div",{className:s("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",w&&"bg-neutral-50",R&&!w&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!w&&"group-hover:opacity-100"):s(!w&&"group-hover:bg-neutral-50")),children:[he(i,{className:s("size-7 transition-all duration-75",w?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),h!==null&&he("div",{className:s("mt-2 text-center text-sm text-neutral-500",w&&"text-neutral-400"),children:h??he(rc,{children:to("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:y})]}),n&&(m??he("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",c)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:eo[d].types.join(","),onChange:O,disabled:w},k)})]})}import{AnimatePresence as oc,motion as fn}from"framer-motion";import{X as ac}from"lucide-react";import nc from"next/link";import{isValidElement as ic}from"react";import{Fragment as sc,jsx as Q,jsxs as Dt}from"react/jsx-runtime";function bn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return it("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Dt("div",{className:s("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(oc,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return Q(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${c}`);let i=e.find(m=>m.key===l);return i?(i.multiple&&Array.isArray(c)?c:[c]).map(m=>{var v,h,b,g;let d=(v=i.options)==null?void 0:v.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),n=(d==null?void 0:d.icon)??((h=i.getOptionIcon)==null?void 0:h.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((b=i.getOptionLabel)==null?void 0:b.call(i,m,{key:i.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((g=i.getOptionPermalink)==null?void 0:g.call(i,m))??null;return Dt(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[Dt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(i.icon)?i.icon:Q(i.icon,{className:"h-4 w-4"})}),i.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:i.options?Dt(sc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(nc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:xt(u,30)}):xt(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,m),children:Q(ac,{className:"h-3.5 w-3.5"})})]},`${l}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var gn=e=>ic(e);import{Command as Ae,useCommandState as lc}from"cmdk";import{ChevronDown as cc,ListFilter as dc}from"lucide-react";import{Fragment as mc,forwardRef as uc,isValidElement as vn,useCallback as br,useEffect as hr,useImperativeHandle as pc,useRef as oo,useState as ro}from"react";import{Fragment as xc,jsx as _,jsxs as ve}from"react/jsx-runtime";function xn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:i,children:m,emptyState:d,className:n}){var x,I;let{isMobile:u}=j(),p=oo(null),v=oo(),[h,b]=ro(!1);it("f",()=>b(!0),{enabled:!h});let[g,y]=ro(""),[w,R]=ro(null),C=br(()=>{y(""),R(null)},[]);hr(()=>{h||C()},[h]);let k=w?e.find(({key:N})=>N===w):null,z=br(N=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),R(N),o==null||o(N)},[]),O=br(N=>{if(!k||!c)return!1;let P=c.find(({key:X})=>X===w);return(P==null?void 0:P.value)===N||P&&k.multiple&&Array.isArray(P.value)&&P.value.includes(N)},[k]),S=br(N=>{k&&(O(N)?r(k.key,N):t(k.key,N),k.multiple||b(!1))},[c,k,i]);return hr(()=>{a==null||a(g)},[g]),hr(()=>{l==null||l(w)},[w]),hr(()=>{(k==null?void 0:k.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[k==null?void 0:k.options]),_(lt,{openPopover:h,setOpenPopover:b,onEscapeKeyDown:N=>{w&&(N.preventDefault(),C())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(Ae,{loop:!0,shouldFilter:!k||k.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(gc,{placeholder:`${(k==null?void 0:k.label)||"Filter"}...`,value:g,onValueChange:y,onKeyDown:N=>{(N.key==="Escape"||N.key==="Backspace"&&!g)&&(N.preventDefault(),N.stopPropagation(),w?C():b(!1))},emptySubmit:N=>{N.preventDefault(),N.stopPropagation(),i?(t("ai",k?`${k.label} ${g}`:g),b(!1)):S(g)}}),!k&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(bc,{ref:p,children:ve(Ae.List,{className:s("flex w-full flex-col gap-1 p-1",k?"min-w-[100px]":"min-w-[180px]"),children:[k?((I=(x=k.options)==null?void 0:x.filter(N=>!g||!N.hideDuringSearch))==null?void 0:I.map(N=>{let P=O(N.value);return _(hn,{filter:k,option:N,right:P?_(na,{className:"h-4 w-4"}):N.right,onSelect:()=>S(N.value)},N.value)}))??_(Ae.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:_(Ne,{})})}):e.filter(N=>!N.hideInFilterDropdown).map(N=>ve(mc,{children:[_(hn,{filter:N,onSelect:()=>z(N.key)}),N.separatorAfter&&_(Ae.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},N.key)),(!k||k.options)&&_(hc,{search:g,askAI:i,children:d?fc(d)?(d==null?void 0:d[w??"default"])??"No matches":d:"No matches"})]})},w)]})}),children:ve("button",{type:"button",className:s("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(dc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(cc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function fc(e){return typeof e=="object"&&e!==null&&!vn(e)}var gc=e=>{let t=lc(r=>r.filtered.count===0);return _(Ae.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},bc=uc(({children:e},t)=>{let r=oo(null);pc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=De(r);return ve(xc,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function hn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),l=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(Ae.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:vc(l)?l:_(l,{className:"h-4 w-4"})}),xt(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var hc=({search:e,askAI:t,children:r})=>t&&e?ve(Ae.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Uo,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ae.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),vc=e=>vn(e);var Rx={Select:xn,List:bn};import{useMemo as yc,useState as yn}from"react";import{jsx as Ue,jsxs as vr}from"react/jsx-runtime";function Ax({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[i,m]=yn(r.defaultValue),[d,n]=yn(!1),u=yc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return vr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await c({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[vr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[vr("div",{className:"flex flex-col space-y-3",children:[Ue("h2",{className:"text-xl font-medium",children:e}),Ue("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ue("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:p=>m(p.target.value),className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":l})}):Ue("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),vr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ue("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ue("div",{className:"shrink-0",children:Ue(ie,{text:a,loading:d,disabled:u,disabledTooltip:l})})]})]})}import{useId as wc}from"react";import{jsx as xr,jsxs as Nc}from"react/jsx-runtime";function Ge({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=wc();return Nc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[xr("defs",{children:xr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:xr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),xr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Cc}from"lucide-react";import kc,{useCallback as Pc,useState as Sc}from"react";import{jsx as Ke,jsxs as ao}from"react/jsx-runtime";var Rc=kc.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=Sc(!1),c=Pc(()=>l(!a),[a,l]);return ao("div",{children:[ao("div",{className:"relative flex",children:[Ke("input",{type:a?"text":t,className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),ao("div",{className:"group",children:[r.error&&Ke("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ke(Cc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ke("button",{className:s("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Ke(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ke(va,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ke("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Rc.displayName="Input";import{flip as Dc,offset as Ec,size as Ic,useDismiss as Ac,useFloating as Oc,useInteractions as zc}from"@floating-ui/react";import{Command as Re,useCommandState as Hc}from"cmdk";import{Check as Vc,ChevronDown as _c,Search as Fc,X as Bc}from"lucide-react";import{createContext as Wc,forwardRef as Pn,useContext as lo,useEffect as no,useMemo as Nn,useRef as Cn,useState as io}from"react";import{Drawer as ct}from"vaul";import Tc from"next/image";import{useEffect as Lc,useState as wn}from"react";import{jsx as Mc}from"react/jsx-runtime";function Et(e){let[t,r]=wn(!0),[o,a]=wn(e.src);Lc(()=>a(e.src),[e.src]);let l=c=>{r(!1);let i=c.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Mc(Tc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as se}from"react/jsx-runtime";var yr=Wc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function d2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Cn(null),[u,p]=io(!1),[v,h]=io(""),[b,g]=io(!1);no(()=>{u&&g(!1)},[u]),no(()=>g(!0),[v]),no(()=>{t&&h(t.value)},[t]);let y=Nn(()=>{let P=v.toLowerCase();return b?e.filter(X=>X.value.toLowerCase().includes(P)):v?e.sort((X,D)=>(D.value.toLowerCase().includes(P)?1:0)-(X.value.toLowerCase().includes(P)?1:0)):e},[b,v,e]),{refs:w,floatingStyles:R,context:C}=Oc({open:u,onOpenChange:p,middleware:[Ec(8),Ic({apply({elements:{floating:P},availableHeight:X}){Object.assign(P.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Dc({fallbackStrategy:"initialPlacement",padding:8})]}),k=Ac(C,{enabled:!d||!l}),{getReferenceProps:z,getFloatingProps:O}=zc([k]),S=Cn(null),{scrollProgress:x,updateScrollProgress:I}=De(S),N=Nn(()=>t&&t.icon?t.icon:t&&t.image?E(Et,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(Fc,{className:"size-4 text-neutral-400"}),[t,c]);return E(yr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:h,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?se(ct.Root,{open:u,onOpenChange:p,children:[E(ct.Trigger,{className:"sm:hidden",asChild:!0,children:E(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(so,{className:o,iconElement:N})})}),E(ct.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ct.Portal,{children:[E(ct.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:P=>{P.target instanceof Element&&P.target.closest("[data-sonner-toast]")&&P.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(so,{className:o,iconElement:N})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(kn,{items:y})]})]})}),E(ct.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(so,{className:o,iconElement:N,ref:w.setReference,...z()}),u&&se("div",{ref:w.setFloating,style:R,...O(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:S,onScroll:I,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(kn,{items:y})]}),E("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(x,2)}})]})]})})}var so=Pn(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:s("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[E("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[E($c,{}),E(Uc,{})]})]})),$c=Pn((e,t)=>{let r=Hc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:i,disabled:m}=lo(yr);return E(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Uc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=lo(yr);return E("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Bc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(_c,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function kn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=lo(yr);return e.map(a=>se(Re.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(Et,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),E("p",{className:s("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&E(or,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Vc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as co from"@radix-ui/react-label";import{cva as Gc}from"class-variance-authority";import*as Sn from"react";import{jsx as Yc}from"react/jsx-runtime";var Kc=Gc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jc=Sn.forwardRef(({className:e,...t},r)=>Yc(co.Root,{ref:r,className:s(Kc(),e),...t}));jc.displayName=co.Root.displayName;import{cva as Zc}from"class-variance-authority";import{isValidElement as qc}from"react";import{jsx as Rn,jsxs as Tn}from"react/jsx-runtime";var Xc=Zc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function N2({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return Tn(e||"button",{...e==="button"?{type:"button"}:{},className:s(Xc({variant:t}),l),...c,children:[Tn("div",{className:"flex grow items-center gap-2",children:[o&&(Jc(o)?o:Rn(o,{className:"size-4"})),r]}),a&&Rn("kbd",{className:s("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var Jc=e=>qc(e);import{curveNatural as Ln}from"@visx/curve";import{LinearGradient as Mn}from"@visx/gradient";import{Group as Qc}from"@visx/group";import{ParentSize as ed}from"@visx/responsive";import{scaleLinear as td,scaleUtc as rd}from"@visx/scale";import{Area as od,AreaClosed as ad}from"@visx/shape";import{motion as Dn}from"framer-motion";import{useId as nd,useMemo as En}from"react";import{jsx as xe,jsxs as mo}from"react/jsx-runtime";var id={top:8,right:2,bottom:2,left:2};function E2(e){return xe(ed,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(sd,{...{width:t,height:r,...e}})})}function sd({width:e,height:t,data:r,curve:o=!0,color:a,padding:l}){let c={...id,...l},i=nd(),m=En(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=En(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),h=new Date(Math.min(...v)),b=new Date(Math.max(...v));return{yScale:td({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:rd({domain:[h,b],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return mo("svg",{width:e,height:t,children:[mo("defs",{children:[xe(Mn,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),xe(Mn,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),mo(Qc,{left:c.left,top:c.top,children:[xe(od,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),xe(ad,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${i}-color-gradient)`,mask:`url(#${i}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as uo from"@radix-ui/react-visually-hidden";import{useRouter as ld}from"next/navigation";import{Drawer as je}from"vaul";import{jsx as oe,jsxs as dt}from"react/jsx-runtime";function V2({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:i}){let m=ld(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!l?oe(je.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:dt(je.Portal,{children:[oe(je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(je.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:dt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[dt(uo.Root,{children:[oe(je.Title,{children:"Modal"}),oe(je.Description,{children:"This is a modal"})]}),oe(cd,{}),e]})}),oe(je.Overlay,{})]})}):oe(le.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:dt(le.Portal,{children:[oe(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),dt(le.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[dt(uo.Root,{children:[oe(le.Title,{children:"Modal"}),oe(le.Description,{children:"This is a modal"})]}),e]})]})})}function cd(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as dd,jsx as wr,jsxs as mt}from"react/jsx-runtime";var In=s("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function B2({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return mt("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[mt("div",{className:"flex items-center gap-2",children:[mt("div",{children:[wr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&mt(dd,{children:[mt("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&wr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),l]}),mt("div",{className:"flex items-center gap-2",children:[wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Oe from"@radix-ui/react-radio-group";import{Circle as md}from"lucide-react";import*as po from"react";import{jsx as Nr}from"react/jsx-runtime";var ud=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Root,{className:s("grid gap-2",e),...t,ref:r}));ud.displayName=Oe.Root.displayName;var pd=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Item,{ref:r,className:s("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Nr(Oe.Indicator,{className:"flex items-center justify-center",children:Nr(md,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pd.displayName=Oe.Item.displayName;import{Drawer as ze}from"vaul";import{jsx as Ye,jsxs as vd}from"react/jsx-runtime";function fd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?ze.NestedRoot:ze.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:vd(ze.Portal,{children:[Ye(ze.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(ze.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className:s("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Ye("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function gd({className:e,...t}){return Ye(ze.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function bd(e){return Ye(ze.Description,{...e})}function hd(e){return Ye(ze.Close,{...e})}var Z2=Object.assign(fd,{Title:gd,Description:bd,Close:hd});import{useEffect as xd,useRef as yd,useState as wd}from"react";import{jsx as An}from"react/jsx-runtime";var Nd=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|