@dub/ui 0.2.46 → 0.2.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client"
2
- import{$ as rp,$a as Up,$b as z0,$c as Pf,A as zu,Aa as Sp,Ab as p0,Ac as ef,Ad as qf,B as _u,Ba as Rp,Bb as f0,Bc as tf,Bd as Xf,C as Ut,Ca as Tp,Cb as g0,Cc as rf,Cd as Da,D as Vu,Da as Lp,Db as h0,Dc as of,Dd as Ia,E as Gt,Ea as Mp,Eb as ha,Ec as af,Ed as Jf,F as Hu,Fa as Dp,Fb as ba,Fc as nf,Fd as Qf,G as Wu,Ga as Ip,Gb as va,Gc as sf,Gd as e1,H as Fu,Ha as Ep,Hb as b0,Hc as lf,Hd as t1,I as Bu,Ia as Ap,Ib as v0,Ic as cf,Id as r1,J as Xo,Ja as na,Jb as x0,Jc as jt,Jd as o1,K as Jo,Ka as ia,Kb as y0,Kc as df,Kd as a1,L as Qo,La as sa,Lb as w0,Lc as mf,Ld as n1,M as ea,Ma as la,Mb as N0,Mc as uf,Md as i1,N as ta,Na as ca,Nb as xa,Nc as pf,Nd as s1,O as $u,Oa as Op,Ob as k0,Oc as ff,Od as Yt,P as Uu,Pa as zp,Pb as C0,Pc as gf,Pd as l1,Q as Gu,Qa as _p,Qb as P0,Qc as hf,Qd as c1,R as Ku,Ra as da,Rb as S0,Rc as La,Rd as d1,S as ju,Sa as ma,Sb as R0,Sc as bf,Sd as m1,T as Zu,Ta as ua,Tb as T0,Tc as vf,Td as Ea,U as Yu,Ua as Vp,Ub as L0,Uc as xf,Ud as u1,V as qu,Va as Hp,Vb as M0,Vc as yf,Vd as p1,W as Xu,Wa as Wp,Wb as D0,Wc as wf,Wd as f1,X as Ju,Xa as Fp,Xb as I0,Xc as Nf,Xd as g1,Y as Qu,Ya as Bp,Yb as E0,Yc as kf,Yd as h1,Z as ep,Za as Or,Zb as A0,Zc as Cf,Zd as b1,_ as tp,_a as $p,_b as O0,_c as Zt,_d as v1,a as Bo,aa as op,ab as Gp,ac as ya,ad as Sf,b as Ru,ba as ap,bb as pa,bc as _0,bd as Rf,c as tt,ca as np,cb as Kp,cc as V0,cd as Tf,d as Ft,da as ip,db as jp,dc as wa,dd as Lf,e as Tu,ea as sp,eb as Zp,ec as H0,ed as zr,f as rt,fa as lp,fb as Yp,fc as Na,fd as Mf,g as ot,ga as cp,gb as qp,gc as W0,gd as Df,h as $o,ha as dp,hb as Xp,hc as F0,hd as Ma,i as Uo,ia as mp,ib as Jp,ic as B0,id as If,j as Lu,ja as up,jb as Qp,jc as $0,jd as Ef,k as Go,ka as pp,kb as e0,kc as U0,kd as Af,l as Ko,la as ra,lb as t0,lc as ka,ld as Of,m as jo,ma as fp,mb as r0,mc as Ca,md as zf,n as Zo,na as gp,nb as o0,nc as Pa,nd as _f,o as kt,oa as hp,ob as a0,oc as G0,od as Vf,p as Mu,pa as bp,pb as fa,pc as K0,pd as Hf,q as Ce,qa as vp,qb as n0,qc as j0,qd as Wf,r as Du,ra as xp,rb as i0,rc as Sa,rd as Ff,s as Bt,sa as yp,sb as s0,sc as Z0,sd as Bf,t as Iu,ta as wp,tb as Kt,tc as Ra,td as $f,u as Eu,ua as oa,ub as l0,uc as Ta,ud as Uf,v as $t,va as Np,vb as c0,vc as Y0,vd as Gf,w as Au,wa as kp,wb as d0,wc as q0,wd as Kf,x as Yo,xa as Cp,xb as m0,xc as X0,xd as jf,y as qo,ya as Pp,yb as u0,yc as J0,yd as Zf,z as Ou,za as aa,zb as ga,zc as Q0,zd as Yf}from"./chunk-XLZNVLEI.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as yt,b as Eo,c as Er,d as Ao,e as Oo,f as zo,g as wt,h as Nt,i as Ar,j as _o,k as _,l as ke,m as Vo,n as ge,o as Wt,p as s,q as et,r as Ho,s as Wo,t as Fo}from"./chunk-MEBQV5LI.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Li}from"lucide-react";import*as Xt from"react";import{jsx as qt,jsxs as Ei}from"react/jsx-runtime";var C1=ne.Root,Mi=Xt.forwardRef(({className:e,...t},r)=>qt(ne.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Mi.displayName="AccordionItem";var Di=Xt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?Li:Zt;return qt(ne.Header,{className:"flex",children:Ei(ne.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,qt(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Di.displayName=ne.Trigger.displayName;var Ii=Xt.forwardRef(({className:e,children:t,...r},o)=>qt(ne.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}));Ii.displayName=ne.Content.displayName;import{cva as Ai}from"class-variance-authority";import*as Jt from"react";import{jsx as _r}from"react/jsx-runtime";var Oi=Ai("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"}}),zi=Jt.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Oi({variant:t}),e),...r}));zi.displayName="Alert";var _i=Jt.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));_i.displayName="AlertTitle";var Vi=Jt.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Vi.displayName="AlertDescription";import{sha256 as Hi}from"js-sha256";import{useState as Wi}from"react";import{jsx as Vr}from"react/jsx-runtime";function Fi(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/${Hi(e.email)}?d=${encodeURIComponent(r)}`:t}function I1({user:e={},className:t}){if(!e)return Vr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Wi(Fi(e));return Vr("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 E1({id:e,className:t}){return Vr("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 Bi}from"class-variance-authority";import{jsx as Ui}from"react/jsx-runtime";var $i=Bi("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 Qt({className:e,variant:t,...r}){return Ui("span",{className:s($i({variant:t}),e),...r})}import{cva as Yi}from"class-variance-authority";import{forwardRef as qi}from"react";import*as he from"@radix-ui/react-tooltip";import Gi from"linkify-react";import{HelpCircle as Ki}from"lucide-react";import ji from"next/link";import{useState as Zi}from"react";import{jsx as G,jsxs as at}from"react/jsx-runtime";function j1({children:e}){return G(he.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:c=0,...l}){let[i,m]=Zi(!1);return at(he.Root,{open:i,onOpenChange:m,delayDuration:c,disableHoverableContent:a,children:[G(he.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),G(he.Portal,{children:G(he.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,...l,children:typeof t=="string"?G("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 Z1({title:e,cta:t,href:r,target:o,onClick:a}){return at("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[G("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?G(ji,{href:r,...o?{target:o}:{},className:s(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?G(se,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function Y1({title:e,cta:t,href:r}){return at("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",G("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 q1({children:e,className:t,tooltipClassName:r}){return G("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:G(Gi,{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 X1(e){return G(J,{...e,children:G(Ki,{className:"h-4 w-4 text-neutral-500"})})}function J1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:G(J,{content:at("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[at("p",{className:"text-sm font-semibold text-neutral-700",children:[r,et(e||0,{full:!0})," ",t]}),a&&at("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function Q1({children:e,content:t,...r}){return G(J,{content:t,...r,children:G("div",{className:"flex cursor-pointer items-center",children:G(Qt,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function eg({children:e,tooltipProps:t,...r}){return G(J,{...t,children:G("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 er({children:e,tooltipProps:t}){return t?G(J,{...t,children:G("div",{children:e})}):e}import{jsx as nt,jsxs as Aa}from"react/jsx-runtime";var ie=Yi("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"}}),se=qi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:l,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?nt(J,{content:m,children:Aa("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:[l,e&&nt("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&nt("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})]})}):Aa("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||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||c,...n,children:[c?nt(Ce,{}):l||null,e&&nt("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&nt("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]}));se.displayName="Button";import{cva as Xi}from"class-variance-authority";import{createContext as Ji}from"react";import{jsx as Oa}from"react/jsx-runtime";var Qi=Xi("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=Ji({variant:"loose"});function za({variant:e="loose",loading:t=!1,className:r,children:o}){return Oa("ul",{className:s(Qi({variant:e,loading:t}),r),"data-variant":e,children:Oa(Ct.Provider,{value:{variant:e},children:o})})}import{cva as es}from"class-variance-authority";import{createContext as ts,useContext as rs,useEffect as os,useRef as as,useState as ns}from"react";import{jsx as _a,jsxs as ls}from"react/jsx-runtime";var is=es("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"}}}),ss="w-full py-2.5 px-4",Hr=ts({hovered:!1});function Va({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:l}){let{variant:i}=rs(Ct),m=as(null),[d,n]=ns(!1);os(()=>{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")||Nt(p));return ls("li",{ref:m,className:s(is({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[l,_a("div",{className:s(ss,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:_a(Hr.Provider,{value:{hovered:d},children:r})})]})}var Cg=Object.assign(za,{Card:Object.assign(Va,{Context:Hr}),Context:Ct});import cs from"embla-carousel-autoplay";import ds from"embla-carousel-react";import{ArrowLeft as ms,ArrowRight as us}from"lucide-react";import{createContext as ps,forwardRef as St,useCallback as Pt,useContext as fs,useEffect as Wr,useState as Fr}from"react";import{jsx as Pe,jsxs as Fa}from"react/jsx-runtime";var Br=2e3,Ha=ps(null);function be(){let e=fs(Ha);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Wa(){let{api:e}=be(),[t,r]=Fr(0),o=Pt(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 gs=St(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:l,...i},m)=>{let[d,n]=ds({...t,axis:e==="horizontal"?"x":"y"},[...o?[cs(typeof o=="object"?o:{delay:Br})]:[],...a||[]]),[u,p]=Fr(!1),[v,b]=Fr(!1),h=Pt(S=>{!S||(p(S.canScrollPrev()),b(S.canScrollNext()))},[]),g=Pt(()=>{n==null||n.scrollPrev()},[n]),N=Pt(()=>{n==null||n.scrollNext()},[n]),k=Pt(S=>{S.key==="ArrowLeft"?(S.preventDefault(),g()):S.key==="ArrowRight"&&(S.preventDefault(),N())},[g,N]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return h(n),n.on("reInit",h),n.on("select",h),()=>{n==null||n.off("select",h)}},[n,h]),Pe(Ha.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:N,canScrollPrev:u,canScrollNext:v},children:Pe("div",{ref:m,onKeyDownCapture:k,className:s("relative",c),role:"region","aria-roledescription":"carousel",...i,children:l})})});gs.displayName="Carousel";var hs=St(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Pe("div",{ref:o,className:"overflow-hidden",children:Pe("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});hs.displayName="CarouselContent";var bs=St(({className:e,...t},r)=>{let{orientation:o}=be();return Pe("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})});bs.displayName="CarouselItem";var vs=St(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=be();return Fa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Pe(ms,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Previous slide"})]})});vs.displayName="CarouselPrevious";var xs=St(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=be();return Fa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Pe(us,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Next slide"})]})});xs.displayName="CarouselNext";import{cva as ys}from"class-variance-authority";import{motion as ws}from"framer-motion";import{ChevronLeft as Ns,ChevronRight as ks}from"lucide-react";import*as Ie from"react";import{jsx as Ue,jsxs as Rt}from"react/jsx-runtime";var Cs=ys("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 "}}}),Bg=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:l}=be(),i=(b=l==null?void 0:l.plugins())==null?void 0:b.autoplay,[m,d]=Ie.useState(0),[n,u]=Ie.useState(!1),p=Ie.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),v=Ie.useCallback(h=>()=>{i&&i.isPlaying()&&i.stop(),h()},[i]);return Ie.useEffect(()=>{!l||(p(l),u((i==null?void 0:i.isPlaying())??!1),l.on("reInit",p),l.on("select",p),l.on("autoplay:play",()=>u(!0)),l.on("autoplay:stop",()=>u(!1)))},[l,i,p]),Rt("div",{className:s(Cs({variant:e}),t),children:[e!=="simple"&&Rt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:v(o),children:[Ue(Ns,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Previous slide"})]}),l!=null&&Ue("div",{className:"flex items-center gap-1",children:l.slideNodes().map((h,g)=>Rt("button",{onClick:v(()=>l.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ue("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&&Ue(ws.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Br)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Rt("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&Rt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[Ue(ks,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Next slide"})]})]})};import Ps from"embla-carousel-react";import{forwardRef as Ss,useCallback as Rs,useEffect as Ts}from"react";import{jsx as tr}from"react/jsx-runtime";var Xg=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ps({dragFree:!0}),c=Rs(l=>{!l||!a||a==null||a.scrollTo(l.selectedScrollSnap())},[a]);return Ts(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),tr("div",{className:"overflow-hidden",ref:o,children:tr("div",{className:s("mx-4 flex gap-4",e),...t})})},Jg=Ss(({index:e,className:t,...r},o)=>{let{api:a}=be(),c=Wa();return tr("div",{ref:o,children:tr("button",{type:"button",onClick:()=>{var i;if(!a)return;let l=(i=a.plugins())==null?void 0:i.autoplay;l&&l.isPlaying()&&l.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as Tt from"@radix-ui/react-checkbox";import{Check as Ls}from"lucide-react";import*as Ba from"react";import{jsx as $r}from"react/jsx-runtime";var Ms=Ba.forwardRef(({className:e,...t},r)=>$r(Tt.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:$r(Tt.Indicator,{className:"flex items-center justify-center",children:$r(Ls,{className:"h-3 w-3 text-white"})})}));Ms.displayName=Tt.Root.displayName;import{Command as Mt,CommandInput as wl,CommandItem as Nl,useCommandState as kl}from"cmdk";import{ChevronDown as Cl}from"lucide-react";import{forwardRef as Pl,isValidElement as Sl,useCallback as Rl,useEffect as nr,useRef as Tl,useState as Lt}from"react";import{motion as vl}from"framer-motion";import{forwardRef as xl,useRef as yl}from"react";import Ur from"js-cookie";import{useEffect as Ds,useState as Is}from"react";function nh(e,t,r){let[o,a]=Is(()=>{let l=Ur.get(e);return l?JSON.parse(l):t});return Ds(()=>{let l=()=>{let i=Ur.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}},[e]),[o,l=>{a(l),Ur.set(e,JSON.stringify(l),r)}]}import{useCallback as Es,useEffect as As,useRef as Os,useState as zs}from"react";var it=(e=3e3)=>{let t=Os(null),[r,o]=zs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=Es(async(l,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof l=="string"?await navigator.clipboard.writeText(l):l instanceof ClipboardItem&&await navigator.clipboard.write([l]),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 As(()=>()=>a(),[]),[r,c]};import{useEffect as _s,useState as Vs}from"react";function dh(){let[e,t]=Vs(null);return _s(()=>{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 b=1;b<i.length;b++){let h=i[b];if(!h)break;(h.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=h)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=c.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=c.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=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 Hs}from"react";function fh(e){return{handleKeyDown:Hs(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 Ws,useState as Fs}from"react";function vh(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=Fs(o??!1);return Ws(()=>{let l=()=>{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};c(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",l),window.addEventListener("resize",l);let i=null;return e.current&&(i=new IntersectionObserver(l),i.observe(e.current)),l(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",l),window.removeEventListener("resize",l),i==null||i.disconnect()}},[e,r]),a}import{useEffect as Bs,useState as $s}from"react";function wh(){let[e,t]=$s(!1);return Bs(()=>{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 Us,useState as Gs}from"react";function Ph(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,l]=Gs(),i=(c==null?void 0:c.isIntersecting)&&a,m=([d])=>{l(d)};return Us(()=>{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]),c}import{createContext as Ks,useCallback as js,useContext as Zs,useEffect as $a,useId as Ys,useState as qs}from"react";import{jsx as Xs}from"react/jsx-runtime";var Ua=Ks({listeners:[],setListeners:()=>{}});function Dh({children:e}){let[t,r]=qs([]);return Xs(Ua.Provider,{value:{listeners:t,setListeners:r},children:e})}function st(e,t,r={}){let o=Ys(),{listeners:a,setListeners:c}=Zs(Ua),l=js(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(b=>b.enabled!==!1&&!!d==!!b.modal&&!!n==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(u):b.key===u));!p.length||Ao(p,(b,h)=>(h.priority??0)-(b.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);$a(()=>(document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)),[l]),$a(()=>(c(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>c(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Js,useState as Qs}from"react";function Ga(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Ah(e,t){let[r,o]=Qs(Ga(e)??t);return Js(()=>{let c=Ga(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as el}from"sonner";import tl from"swr";function Hh(e,t){let{data:r,isLoading:o,mutate:a}=tl(e,ge);return{data:r,isLoading:o,update:async(c,l)=>el.promise(a(c(r),{optimisticData:l,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 Ya,useMemo as sl}from"react";import{useEffect as Ka,useState as rl}from"react";function ja({pageSize:e,page:t,onPageChange:r}){let[o,a]=rl({pageIndex:t,pageSize:e});return Ka(()=>{a(c=>({...c,pageIndex:t}))},[t]),Ka(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as ol,useRouter as al,useSearchParams as nl}from"next/navigation";import{useCallback as il}from"react";function Za(){let e=ol(),t=al(),r=nl(),o=Object.fromEntries(r),a=(l,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)),l&&Object.entries(l).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},c=il(({set:l,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);l&&Object.entries(l).forEach(([h,g])=>p.set(h,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(h=>p.delete(h)):p.delete(i));let v=p.toString(),b=`${e}${v.length>0?`?${v}`:""}`;if(n)return b;m?t.replace(b,{scroll:!1}):t.push(b,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function Xh(e=Wo){let{searchParams:t,queryParams:r}=Za(),o=sl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=ja({pageSize:e,page:o,onPageChange:l=>{r(l===1?{del:"page",scroll:!1}:{set:{page:l.toString()},scroll:!1})}});return Ya(()=>{let l=parseInt(t.get("page")||"1")||1;c(i=>({...i,pageIndex:l}))},[t.get("page")]),Ya(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as ll}from"react";function eb(){ll(()=>{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 cl,useState as dl}from"react";function rr(e){let[t,r]=dl(),o=([a])=>{r(a)};return cl(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as ml,useEffect as qa,useState as ul}from"react";function Xa(e){let[t,r]=ul(!1),o=ml(()=>{r(window.scrollY>e)},[e]);return qa(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),qa(()=>{o()},[o]),t}import{useCallback as pl,useEffect as fl,useState as gl}from"react";function Ee(e){let[t,r]=gl(1),o=pl(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:l,clientHeight:i}=e.current;r(l===i?1:Math.min(c/(l-i),1))},[]),a=rr(e);return fl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as hl}from"react";import{toast as Qa}from"sonner";import{jsx as or,jsxs as Ja}from"react/jsx-runtime";function bl({id:e,message:t,undo:r}){let o=()=>{r(),Qa.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return hl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),Ja("div",{className:"flex w-full items-center justify-between space-x-2",children:[Ja("div",{className:"flex items-center space-x-2",children:[or(jo,{}),or("p",{className:"font-medium",children:t})]}),or("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 fb(){return({id:t,message:r,undo:o,duration:a})=>Qa(or(bl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as en}from"react/jsx-runtime";var Se=xl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},l)=>{var d,n;let i=yl(null),m=rr(i);return en(vl.div,{ref:l,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},...c,children:en("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});Se.displayName="AnimatedSizeContainer";import*as Ae from"@radix-ui/react-popover";import{Drawer as lt}from"vaul";import{jsx as Re,jsxs as ar}from"react/jsx-runtime";function ct({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:l,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return l||v?ar(lt.Root,{open:a,onOpenChange:c,children:[Re(lt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),ar(lt.Portal,{children:[Re(lt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),ar(lt.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:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[Re("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Re("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Re("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})]}),Re(lt.Overlay,{})]})]}):ar(Ae.Root,{open:a,onOpenChange:c,children:[Re(Ae.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Re(Ae.Portal,{children:Re(Ae.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 ir,jsx as M,jsxs as Te}from"react/jsx-runtime";function Ll(e,t){return e===!0}function $b({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:l="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:b,onOpenChange:h,onSearchChange:g,shouldFilter:N=!0,inputRight:k,inputClassName:S,optionRight:C,optionClassName:w,matchTriggerWidth:$,hideSearch:R=!1,children:x}){let T=Ll(e,r),H=Array.isArray(t)?t:t?[t]:[],{isMobile:P}=j(),[A,X]=Lt(!1),I=b??A,ue=h??X,[U,Mr]=Lt(""),[Mo,Dr]=Lt(!1),[Ir,Si]=Lt(void 0),[Ri,Do]=Lt(!1),Ti=z=>{var Qe;if(T){let Be=H.some(({value:$e})=>$e===z.value);r(Be?H.filter(({value:$e})=>$e!==z.value):[...H,z])}else r(H.length&&((Qe=H[0])==null?void 0:Qe.value)===z.value?null:z),ue(!1)},Io=Rl((z,Qe)=>Qe===""?[...z.filter(Be=>Be.first&&!H.some($e=>$e.value===Be.value)),...H,...z.filter(Be=>!Be.first&&!H.some($e=>$e.value===Be.value))]:z,[H]);return nr(()=>{Mo&&(Si(o&&Io(o,U)),Dr(!1))},[Mo,o,Io,U]),nr(()=>{Dr(!0)},[o]),nr(()=>{I||(Mr(""),Dr(!0))},[I]),nr(()=>g==null?void 0:g(U),[U]),M(ct,{openPopover:I,setOpenPopover:ue,align:"start",side:v,onWheel:z=>{z.stopPropagation()},popoverContentClassName:s($&&"sm:w-[var(--radix-popover-trigger-width)]"),content:M(Se,{width:!P&&!$,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Te(Mt,{loop:!0,shouldFilter:N,children:[!R&&Te("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[M(wl,{placeholder:l,value:U,onValueChange:Mr,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",S),onKeyDown:z=>{(z.key==="Escape"||z.key==="Backspace"&&!U)&&(z.preventDefault(),z.stopPropagation(),ue(!1))}}),k&&M("div",{className:"mr-2",children:k}),u&&M("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})]}),M(Ml,{children:M(Mt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ir!==void 0?Te(ir,{children:[Ir.map(z=>M(Dl,{option:z,multiple:T,selected:H.some(({value:Qe})=>Qe===z.value),onSelect:()=>Ti(z),right:C==null?void 0:C(z),className:w},`${z.label}, ${z.value}`)),U.length>0&&d&&Te(Nl,{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",w),onSelect:async()=>{Do(!0),await(d==null?void 0:d(U))&&(Mr(""),ue(!1)),Do(!1)},children:[Ri?M(Ce,{className:"size-4 shrink-0"}):M(Zt,{className:"size-4 shrink-0"}),M("div",{className:"grow truncate",children:(m==null?void 0:m(U))||`Create "${U}"`})]}),N?M(El,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ir.length===0?M("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):M(Mt.Loading,{children:M("div",{className:"flex h-12 items-center justify-center",children:M(Ce,{})})})})})]})}),children:M(se,{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:Te(ir,{children:[M("div",{className:"min-w-0 grow truncate text-left",children:x||H.map(z=>z.label).join(", ")||c}),p&&(p===!0?M(Cl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?tn(a)?a:M(a,{className:"size-4 shrink-0"}):void 0})})}var Ml=({children:e})=>{let t=Tl(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Te(ir,{children:[M("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),M("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 Dl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Te(ir,{children:[M(Il,{disabledTooltip:e.disabledTooltip,children:Te(Mt.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",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&M("div",{className:"shrink-0 text-neutral-600",children:o?M(sa,{className:"size-4 text-neutral-600"}):M(la,{className:"size-4 text-neutral-400"})}),Te("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&M("span",{className:"shrink-0 text-neutral-600",children:tn(e.icon)?e.icon:M(e.icon,{className:"h-4 w-4"})}),M("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&M(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&M(Mt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Il=({children:e,disabledTooltip:t})=>t?M(J,{content:t,children:M("div",{children:e})}):e,tn=e=>Sl(e),El=Pl((e,t)=>kl(o=>o.filtered.count===0)?M("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as sr,format as Al,isSameMonth as Ol}from"date-fns";import{ChevronLeft as rn,ChevronRight as on,ChevronsLeft as zl,ChevronsRight as _l}from"lucide-react";import{forwardRef as Vl,useRef as Hl}from"react";import{DayPicker as Wl,useDayPicker as Fl,useDayRender as Bl,useNavigation as $l}from"react-day-picker";import{Fragment as Ul,jsx as re,jsxs as lr}from"react/jsx-runtime";var Dt=Vl(({onClick:e,icon:t,disabled:r,...o},a)=>re("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:re(t,{className:"h-full w-full shrink-0"})}));Dt.displayName="NavigationButton";function an({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:l,classNames:i,...m}){return re(Wl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:l,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:()=>re(rn,{className:"h-4 w-4"}),IconRight:()=>re(on,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:b}=$l(),{numberOfMonths:h,fromDate:g,toDate:N}=Fl(),k=b.findIndex(T=>Ol(d.displayMonth,T)),S=k===0,C=k===b.length-1,w=h>1&&(S||!C),$=h>1&&(C||!S),R=()=>{let T=sr(v,-1);p&&(!g||T.getTime()>=g.getTime())&&n(T)},x=()=>{let T=sr(v,1);u&&(!N||T.getTime()<=N.getTime())&&n(T)};return lr("div",{className:"flex items-center justify-between",children:[lr("div",{className:"flex items-center gap-1",children:[o&&!$&&re(Dt,{disabled:a||!p||g&&sr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:R,icon:zl}),!$&&re(Dt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:rn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Al(d.displayMonth,"LLLL yyy",{locale:c})}),lr("div",{className:"flex items-center gap-1",children:[!w&&re(Dt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:on}),o&&!w&&re(Dt,{disabled:a||!u||N&&sr(v,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:x,icon:_l})]})]})},Day:({date:d,displayMonth:n})=>{let u=Hl(null),{activeModifiers:p,buttonProps:v,divProps:b,isButton:h,isHidden:g}=Bl(d,n,u),{selected:N,today:k,disabled:S,range_middle:C}=p;if(g)return re(Ul,{});if(!h)return re("div",{...b,className:s("flex items-center justify-center",b.className)});let{children:w,...$}=v;return lr("button",{ref:u,...$,type:"button",children:[w,k&&re("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":!N,"!bg-white":N,"!bg-blue-400":N&&C,"text-neutral-400":S})})]})}},...m})}import{enUS as tc}from"date-fns/locale";import{useEffect as qr,useMemo as sn,useRef as rc,useState as dr}from"react";import{Command as Gr}from"cmdk";import{Lock as Gl}from"lucide-react";import{jsx as Ge,jsxs as Kl}from"react/jsx-runtime";var Kr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,c=d=>"date"in d,l=(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&&l(u,p)&&(v=!0);let b=d.to,h=n.to,g=!1;return b&&h&&l(b,h)&&(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(c(d)){let n=r;return n&&l(n,d.date)}return!1};return Ge(Gr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ge(Gr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Kl(Gr.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:[Ge("span",{children:d.label}),d.requiresUpgrade?Ge(Gl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Ge("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&&Ge(J,{side:"bottom",content:d.tooltipContent,children:Ge("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Kr.displayName="DatePicker.Presets";import{format as Oe}from"date-fns";import{createContext as jl}from"react";var jr=jl({isOpen:!1,setIsOpen:()=>{}}),Zl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},Zr=(e,t,r=!1)=>{let o=!Zl(),a;return r?a=o?Oe(e,"d MMM, yyyy h:mm a",{locale:t}):Oe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Oe(e,"d MMM, yyyy",{locale:t}),a},nn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:l,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,b,h,g;if("date"in n){let N=n.date.getFullYear();if(o&&N<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&N>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(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(l&&n.date.getDate()<l.getDate())throw new Error(`Preset ${n.label} is before fromDay ${l}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Oe(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let N=(u=n.dateRange.from)==null?void 0:u.getFullYear(),k=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(N&&o&&N<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(k&&r&&k>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let S=(v=n.dateRange.from)==null?void 0:v.getMonth();if(S&&S<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(c){let S=(b=n.dateRange.to)==null?void 0:b.getMonth();if(S&&S>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(c,"MMM, yyyy")}.`)}if(l){let S=(h=n.dateRange.from)==null?void 0:h.getDate();if(S&&S<l.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(l,"MMM dd, yyyy")}.`)}if(i){let S=(g=n.dateRange.to)==null?void 0:g.getDate();if(S&&S>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Oe(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Yl}from"class-variance-authority";import{Calendar as ql,ChevronDown as Xl}from"lucide-react";import{forwardRef as Jl}from"react";import{jsx as cr,jsxs as ec}from"react/jsx-runtime";var Ql=Yl(["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"}}}),Yr=Jl(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>ec("button",{ref:c,className:s(Ql({hasError:o}),e),...a,children:[cr(ql,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),cr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?cr("span",{className:"text-neutral-400",children:r}):null)}),cr(Xl,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Yr.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as ln}from"react/jsx-runtime";var oc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:l,disabledDays:i,showYearNavigation:m=!1,locale:d=tc,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...b})=>{let{isDesktop:h}=j(),[g,N]=dr(!1),[k,S]=dr(a&&r?a==null?void 0:a.find(({id:I})=>I===r):void 0),[C,w]=dr((k==null?void 0:k.dateRange)??e??t??void 0),[$,R]=dr(C==null?void 0:C.to),x=sn(()=>C,[g]);qr(()=>{w(e)},[e]),qr(()=>{let I=a==null?void 0:a.find(({id:ue})=>ue===r);S(I),w((I==null?void 0:I.dateRange)??e??t)},[a,r]),qr(()=>{g?C&&R(C.to):R(C==null?void 0:C.to)},[g]);let T=(I,ue)=>{let U=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:ue}:I;w(U),S(void 0),(U==null?void 0:U.from)&&(U==null?void 0:U.to)&&(o==null||o(U),N(!1))},H=I=>{w(I.dateRange),S(I),o==null||o(I.dateRange,I),N(!1)},P=()=>{w(x),N(!1)},A=I=>{I||P(),N(I)},X=sn(()=>C?`${C.from?Zr(C.from,d):""} - ${C.to?Zr(C.to,d):""}`:null,[C,d]);return st((a==null?void 0:a.filter(I=>I.shortcut).map(I=>I.shortcut))??[],I=>{let ue=a==null?void 0:a.find(U=>U.shortcut===I.key);ue&&H(ue)}),oe(jr.Provider,{value:{isOpen:g,setIsOpen:N},children:oe(ct,{align:p,openPopover:g,setOpenPopover:A,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:ln("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&&oe(ac,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(Kr,{currentPresetId:r,currentValue:C,presets:a,onSelect:H})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(an,{mode:"range",selected:C,onSelect:T,month:$,onMonthChange:R,numberOfMonths:h?2:1,disabled:i,disableNavigation:l,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"},...b})})]})}),children:oe(Yr,{placeholder:n,disabled:c,className:v,hasError:u,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(k==null?void 0:k.label)??X})})})};function Rv({presets:e,...t}){return e&&nn(e,t),oe(oc,{presets:e,...t})}function ac({children:e}){let t=rc(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return ln("div",{className:"relative sm:h-full",children:[oe("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}),oe("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 nc from"next/link";import{useEffect as ic,useState as cn}from"react";import sc from"swr";import{jsx as Xr,jsxs as dn}from"react/jsx-runtime";function mn({className:e}){let{data:t}=sc("https://status.dub.co/api/v1/summary",ge),[r,o]=cn("bg-neutral-200"),[a,c]=cn("Loading status...");return ic(()=>{if(!t)return;let{ongoing_incidents:l}=t;if(l.length>0){let{current_worst_impact:i,name:m}=l[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(m),o(d)}else c("All systems operational"),o("bg-green-500")},[t]),dn(nc,{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:[dn("div",{className:"relative size-2",children:[Xr("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")}),Xr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Xr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as mr,jsxs as un}from"react/jsx-runtime";function Hv({icon:e,title:t,description:r,learnMore:o,children:a}){return un("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[mr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:mr(e,{className:"size-6 text-neutral-800"})}),mr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&un("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&mr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as lc}from"class-variance-authority";import{useState as pn}from"react";import{toast as fn}from"sonner";import{Fragment as dc,jsx as ve,jsxs as Qr}from"react/jsx-runtime";var gn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],Jr={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:gn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg"],errorMessage:"File type not supported (.svg., .png, or .jpg only)"},programResourceFiles:{types:[...gn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},cc=lc("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 qv({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:l,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:b,maxFileSizeMB:h=0,targetResolution:g,accessibilityLabel:N="File upload",disabled:k=!1}){let[S,C]=pn(!1),[w,$]=pn(null),R=async x=>{let T="dataTransfer"in x?x.dataTransfer.files&&x.dataTransfer.files[0]:x.target.files&&x.target.files[0];if(!T)return;if($(T.name),h>0&&T.size/1024/1024>h){fn.error(`File size too big (max ${h} MB)`);return}let H=Jr[d].types;if(H.length&&!H.includes(T.type)){fn.error(Jr[d].errorMessage??"File type not supported");return}let P=T;if(g&&T.type.startsWith("image/"))try{let A=await zo(T,g),X=await fetch(A).then(I=>I.blob());P=new File([X],T.name,{type:T.type})}catch(A){console.error("Error resizing image:",A)}if(t){let A=new FileReader;A.onload=X=>{var I;return r==null?void 0:r({src:(I=X.target)==null?void 0:I.result,file:P})},A.readAsDataURL(P);return}r==null||r({file:P})};return Qr("label",{className:s(cc({variant:o}),k?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&ve("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ve(kt,{})}),ve("div",{className:"absolute inset-0 z-[5]",onDragOver:x=>{x.preventDefault(),x.stopPropagation(),C(!0)},onDragEnter:x=>{x.preventDefault(),x.stopPropagation(),C(!0)},onDragLeave:x=>{x.preventDefault(),x.stopPropagation(),C(!1)},onDrop:async x=>{x.preventDefault(),x.stopPropagation(),R(x),C(!1)}}),Qr("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",k&&"bg-neutral-50",S&&!k&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!k&&"group-hover:opacity-100"):s(!k&&"group-hover:bg-neutral-50")),children:[ve(i,{className:s("size-7 transition-all duration-75",k?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",S?"scale-110":"scale-100"),c)}),b!==null&&ve("div",{className:s("mt-2 text-center text-sm text-neutral-500",k&&"text-neutral-400"),children:b??ve(dc,{children:Qr("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ve("span",{className:"sr-only",children:N})]}),n&&(m??ve("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",l)})),p&&ve("div",{className:"sr-only mt-1 flex shadow-sm",children:ve("input",{id:e,type:"file",accept:Jr[d].types.join(","),onChange:R,disabled:k},w)})]})}import{AnimatePresence as mc,motion as hn}from"framer-motion";import{X as uc}from"lucide-react";import pc from"next/link";import{isValidElement as fc}from"react";import{Fragment as gc,jsx as Q,jsxs as It}from"react/jsx-runtime";function vn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return st("Escape",o,{priority:1}),Q(Se,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:It("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(mc,{children:t==null?void 0:t.map(({key:c,value:l})=>{if(c==="loader")return Q(hn.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-${l}`);let i=e.find(m=>m.key===c);return i?(i.multiple&&Array.isArray(l)?l:[l]).map(m=>{var v,b,h,g;let d=(v=i.options)==null?void 0:v.find(N=>typeof N.value=="string"&&typeof m=="string"?N.value.toLowerCase()===m.toLowerCase():N.value===m),n=(d==null?void 0:d.icon)??((b=i.getOptionIcon)==null?void 0:b.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((h=i.getOptionLabel)==null?void 0:h.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 It(hn.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:[It("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:bn(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?It(gc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:bn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(pc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:wt(u,30)}):wt(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(c,m),children:Q(uc,{className:"h-3.5 w-3.5"})})]},`${c}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&It("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 bn=e=>fc(e);import{Command as ze,useCommandState as hc}from"cmdk";import{ChevronDown as bc,ListFilter as vc}from"lucide-react";import{Fragment as xc,forwardRef as yc,isValidElement as yn,useCallback as ur,useEffect as pr,useImperativeHandle as wc,useRef as to,useState as eo}from"react";import{Fragment as Rc,jsx as V,jsxs as xe}from"react/jsx-runtime";function wn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:l,askAI:i,children:m,emptyState:d,className:n}){var T,H;let{isMobile:u}=j(),p=to(null),v=to(),[b,h]=eo(!1);st("f",()=>h(!0),{enabled:!b});let[g,N]=eo(""),[k,S]=eo(null),C=ur(()=>{N(""),S(null)},[]);pr(()=>{b||C()},[b]);let w=k?e.find(({key:P})=>P===k):null,$=ur(P=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),N(""),S(P),o==null||o(P)},[]),R=ur(P=>{if(!w||!l)return!1;let A=l.find(({key:X})=>X===k);return(A==null?void 0:A.value)===P||A&&w.multiple&&Array.isArray(A.value)&&A.value.includes(P)},[w]),x=ur(P=>{w&&(R(P)?r(w.key,P):t(w.key,P),w.multiple||h(!1))},[l,w,i]);return pr(()=>{a==null||a(g)},[g]),pr(()=>{c==null||c(k)},[k]),pr(()=>{(w==null?void 0:w.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[w==null?void 0:w.options]),V(ct,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:P=>{k&&(P.preventDefault(),C())},content:V(Se,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:xe(ze,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[xe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[V(kc,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:g,onValueChange:N,onKeyDown:P=>{(P.key==="Escape"||P.key==="Backspace"&&!g)&&(P.preventDefault(),P.stopPropagation(),k?C():h(!1))},emptySubmit:P=>{P.preventDefault(),P.stopPropagation(),i?(t("ai",w?`${w.label} ${g}`:g),h(!1)):x(g)}}),!w&&V("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"})]}),V(Cc,{ref:p,children:xe(ze.List,{className:s("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((H=(T=w.options)==null?void 0:T.filter(P=>!g||!P.hideDuringSearch))==null?void 0:H.map(P=>{let A=R(P.value);return V(xn,{filter:w,option:P,right:A?V(na,{className:"h-4 w-4"}):P.right,onSelect:()=>x(P.value)},P.value)}))??V(ze.Loading,{children:V("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:V(Ce,{})})}):e.filter(P=>!P.hideInFilterDropdown).map(P=>xe(xc,{children:[V(xn,{filter:P,onSelect:()=>$(P.key)}),P.separatorAfter&&V(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},P.key)),(!w||w.options)&&V(Pc,{search:g,askAI:i,children:d?Nc(d)?(d==null?void 0:d[k??"default"])??"No matches":d:"No matches"})]})},k)]})}),children:xe("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:[V(vc,{className:"size-4 shrink-0"}),V("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),l!=null&&l.length?V("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:l.length}):V(bc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Nc(e){return typeof e=="object"&&e!==null&&!yn(e)}var kc=e=>{let t=hc(r=>r.filtered.count===0);return V(ze.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"})},Cc=yc(({children:e},t)=>{let r=to(null);wc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return xe(Rc,{children:[V("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),V("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 xn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),c=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,l=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return xe(ze.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:l+(t==null?void 0:t.value),children:[V("span",{className:"shrink-0 text-neutral-600",children:Sc(c)?c:V(c,{className:"h-4 w-4"})}),wt(l,48),V("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Pc=({search:e,askAI:t,children:r})=>t&&e?xe(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[V(Uo,{className:"h-4 w-4"}),xe("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",xe("span",{className:"text-black",children:['"',e,'"']})]})]}):V(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Sc=e=>yn(e);var w2={Select:wn,List:vn};import{useMemo as Tc,useState as Nn}from"react";import{jsx as Ke,jsxs as fr}from"react/jsx-runtime";function T2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:l}){let[i,m]=Nn(r.defaultValue),[d,n]=Nn(!1),u=Tc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return fr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await l({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[fr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[fr("div",{className:"flex flex-col space-y-3",children:[Ke("h2",{className:"text-xl font-medium",children:e}),Ke("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ke("input",{...r,type:r.type||"text",required:!0,disabled:!!c,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":c})}):Ke("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),fr("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"?Ke("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,Ke("div",{className:"shrink-0",children:Ke(se,{text:a,loading:d,disabled:u,disabledTooltip:c})})]})]})}import{useId as Lc}from"react";import{jsx as gr,jsxs as Mc}from"react/jsx-runtime";function Et({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Lc();return Mc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[gr("defs",{children:gr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:gr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),gr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Dc}from"lucide-react";import Ic,{useCallback as Ec,useState as Ac}from"react";import{jsx as je,jsxs as ro}from"react/jsx-runtime";var Oc=Ic.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Ac(!1),l=Ec(()=>c(!a),[a,c]);return ro("div",{children:[ro("div",{className:"relative flex",children:[je("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}),ro("div",{className:"group",children:[r.error&&je("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:je(Dc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&je("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:()=>l(),"aria-label":a?"Hide password":"Show Password",children:a?je(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):je(ba,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&je("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Oc.displayName="Input";import{flip as Hc,offset as Wc,size as Fc,useDismiss as Bc,useFloating as $c,useInteractions as Uc}from"@floating-ui/react";import{Command as Le,useCommandState as Gc}from"cmdk";import{Check as Kc,ChevronDown as jc,Search as Zc,X as Yc}from"lucide-react";import{createContext as qc,forwardRef as Rn,useContext as io,useEffect as oo,useMemo as Cn,useRef as Pn,useState as ao}from"react";import{Drawer as dt}from"vaul";import zc from"next/image";import{useEffect as _c,useState as kn}from"react";import{jsx as Vc}from"react/jsx-runtime";function At(e){let[t,r]=kn(!0),[o,a]=kn(e.src);_c(()=>a(e.src),[e.src]);let c=l=>{r(!1);let i=l.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Vc(zc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as le}from"react/jsx-runtime";var hr=qc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function ax({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:l,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Pn(null),[u,p]=ao(!1),[v,b]=ao(""),[h,g]=ao(!1);oo(()=>{u&&g(!1)},[u]),oo(()=>g(!0),[v]),oo(()=>{t&&b(t.value)},[t]);let N=Cn(()=>{let A=v.toLowerCase();return h?e.filter(X=>X.value.toLowerCase().includes(A)):v?e.sort((X,I)=>(I.value.toLowerCase().includes(A)?1:0)-(X.value.toLowerCase().includes(A)?1:0)):e},[h,v,e]),{refs:k,floatingStyles:S,context:C}=$c({open:u,onOpenChange:p,middleware:[Wc(8),Fc({apply({elements:{floating:A},availableHeight:X}){Object.assign(A.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Hc({fallbackStrategy:"initialPlacement",padding:8})]}),w=Bc(C,{enabled:!d||!c}),{getReferenceProps:$,getFloatingProps:R}=Uc([w]),x=Pn(null),{scrollProgress:T,updateScrollProgress:H}=Ee(x),P=Cn(()=>t&&t.icon?t.icon:t&&t.image?E(At,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):l||E(Zc,{className:"size-4 text-neutral-400"}),[t,l]);return E(hr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&c?le(dt.Root,{open:u,onOpenChange:p,children:[E(dt.Trigger,{className:"sm:hidden",asChild:!0,children:E(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(no,{className:o,iconElement:P})})}),E(dt.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(dt.Portal,{children:[E(dt.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:A=>{A.target instanceof Element&&A.target.closest("[data-sonner-toast]")&&A.preventDefault()},children:le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(no,{className:o,iconElement:P})}),u&&le(Le.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(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(Sn,{items:N})]})]})}),E(dt.Overlay,{})]})]}):le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(no,{className:o,iconElement:P,ref:k.setReference,...$()}),u&&le("div",{ref:k.setFloating,style:S,...R(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[le("div",{ref:x,onScroll:H,className:"grow overflow-y-auto p-2",children:[le(Le.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(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(Sn,{items:N})]}),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(T,2)}})]})]})})}var no=Rn(({iconElement:e,className:t,...r},o)=>le("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}),le("div",{className:"flex h-10 grow",children:[E(Xc,{}),E(Jc,{})]})]})),Xc=Rn((e,t)=>{let r=Gc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:l,setInputValue:i,disabled:m}=io(hr);return E(Le.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:l,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),c(!1)):d.key==="Enter"&&r?c(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&c(!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 Jc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=io(hr);return E("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Yc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(jc,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Sn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=io(hr);return e.map(a=>le(Le.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:[le("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(At,{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(Qt,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Kc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as so from"@radix-ui/react-label";import{cva as Qc}from"class-variance-authority";import*as Tn from"react";import{jsx as rd}from"react/jsx-runtime";var ed=Qc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),td=Tn.forwardRef(({className:e,...t},r)=>rd(so.Root,{ref:r,className:s(ed(),e),...t}));td.displayName=so.Root.displayName;import{cva as od}from"class-variance-authority";import{isValidElement as ad}from"react";import{jsx as Ln,jsxs as Mn}from"react/jsx-runtime";var nd=od(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors","whitespace-nowrap text-sm font-medium text-content-default hover:bg-bg-subtle transition-colors"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function hx({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...l}){return Mn(e||"button",{...e==="button"?{type:"button"}:{},className:s(nd({variant:t}),c),...l,children:[Mn("div",{className:"flex grow items-center gap-2",children:[o&&(id(o)?o:Ln(o,{className:"size-4"})),r]}),a&&Ln("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 id=e=>ad(e);import{curveNatural as Dn}from"@visx/curve";import{LinearGradient as In}from"@visx/gradient";import{Group as sd}from"@visx/group";import{ParentSize as ld}from"@visx/responsive";import{scaleLinear as cd,scaleUtc as dd}from"@visx/scale";import{Area as md,AreaClosed as ud}from"@visx/shape";import{motion as En}from"framer-motion";import{useId as pd,useMemo as An}from"react";import{jsx as ye,jsxs as lo}from"react/jsx-runtime";var fd={top:8,right:2,bottom:2,left:2};function Sx(e){return ye(ld,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&ye(gd,{...{width:t,height:r,...e}})})}function gd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let l={...fd,...c},i=pd(),m=An(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=An(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),b=new Date(Math.min(...v)),h=new Date(Math.max(...v));return{yScale:cd({domain:[-2,Math.max(p,2)],range:[t-l.top-l.bottom,0],nice:!0,clamp:!0}),xScale:dd({domain:[b,h],range:[0,e-l.left-l.right],nice:!0})}},[r,t,e]);return lo("svg",{width:e,height:t,children:[lo("defs",{children:[ye(In,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-l.left-l.right,gradientUnits:"userSpaceOnUse"}),ye(In,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),ye("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:ye("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),lo(sd,{left:l.left,top:l.top,children:[ye(md,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Dn:void 0,children:({path:u})=>ye(En.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),ye(ud,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Dn:void 0,children:({path:u})=>ye(En.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 ce from"@radix-ui/react-dialog";import*as co from"@radix-ui/react-visually-hidden";import{useRouter as hd}from"next/navigation";import{Drawer as Ze}from"vaul";import{jsx as ae,jsxs as mt}from"react/jsx-runtime";function Ix({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:l,drawerRootProps:i}){let m=hd(),d=({dragged:u}={})=>{l&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!c?ae(Ze.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:mt(Ze.Portal,{children:[ae(Ze.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(Ze.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:mt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[mt(co.Root,{children:[ae(Ze.Title,{children:"Modal"}),ae(Ze.Description,{children:"This is a modal"})]}),ae(bd,{}),e]})}),ae(Ze.Overlay,{})]})}):ae(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:mt(ce.Portal,{children:[ae(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),mt(ce.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:[mt(co.Root,{children:[ae(ce.Title,{children:"Modal"}),ae(ce.Description,{children:"This is a modal"})]}),e]})]})})}function bd(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as vd,jsx as br,jsxs as ut}from"react/jsx-runtime";var On=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 Ox({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:c,showTotalCount:l=!0}){return ut("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[ut("div",{className:"flex items-center gap-2",children:[ut("div",{children:[br("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&ut(vd,{children:[ut("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ",l&&"of "]}),l&&br("span",{className:"font-medium",children:et(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),c]}),ut("div",{className:"flex items-center gap-2",children:[br("button",{type:"button",className:On,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),br("button",{type:"button",className:On,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as xd}from"lucide-react";import*as mo from"react";import{jsx as vr}from"react/jsx-runtime";var yd=mo.forwardRef(({className:e,...t},r)=>vr(_e.Root,{className:s("grid gap-2",e),...t,ref:r}));yd.displayName=_e.Root.displayName;var wd=mo.forwardRef(({className:e,...t},r)=>vr(_e.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:vr(_e.Indicator,{className:"flex items-center justify-center",children:vr(xd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));wd.displayName=_e.Item.displayName;import{Drawer as Ve}from"vaul";import{jsx as Ye,jsxs as Sd}from"react/jsx-runtime";function Nd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ve.NestedRoot:Ve.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:Sd(Ve.Portal,{children:[Ye(Ve.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(Ve.Content,{...t,onPointerDownOutside:c=>{var l;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(l=t==null?void 0:t.onPointerDownOutside)==null||l.call(t,c)},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 kd({className:e,...t}){return Ye(Ve.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function Cd(e){return Ye(Ve.Description,{...e})}function Pd(e){return Ye(Ve.Close,{...e})}var $x=Object.assign(Nd,{Title:kd,Description:Cd,Close:Pd});import{useEffect as Rd,useRef as Td,useState as Ld}from"react";import{jsx as zn}from"react/jsx-runtime";var Md=`
2
+ import{$ as rp,$a as Gp,$b as z0,$c as Sf,$d as x1,A as zu,Aa as Rp,Ab as f0,Ac as ef,Ad as qf,B as _u,Ba as Tp,Bb as g0,Bc as tf,Bd as Xf,C as Ut,Ca as aa,Cb as ga,Cc as rf,Cd as Jf,D as Hu,Da as Lp,Db as h0,Dc as of,Dd as Qf,E as Gt,Ea as Mp,Eb as b0,Ec as af,Ed as e1,F as Vu,Fa as Dp,Fb as v0,Fc as nf,Fd as Da,G as Wu,Ga as Ip,Gb as x0,Gc as sf,Gd as Ia,H as Fu,Ha as Ep,Hb as ha,Hc as lf,Hd as t1,I as Bu,Ia as Ap,Ib as ba,Ic as cf,Id as r1,J as Xo,Ja as Op,Jb as va,Jc as df,Jd as o1,K as Jo,Ka as zp,Kb as y0,Kc as mf,Kd as a1,L as Qo,La as _p,Lb as w0,Lc as uf,Ld as n1,M as ea,Ma as na,Mb as N0,Mc as jt,Md as i1,N as ta,Na as ia,Nb as k0,Nc as pf,Nd as s1,O as $u,Oa as sa,Ob as C0,Oc as ff,Od as l1,P as Uu,Pa as la,Pb as P0,Pc as gf,Pd as c1,Q as Gu,Qa as ca,Qb as xa,Qc as hf,Qd as d1,R as Ku,Ra as Hp,Rb as S0,Rc as bf,Rd as m1,S as ju,Sa as Vp,Sb as R0,Sc as vf,Sd as u1,T as Zu,Ta as Wp,Tb as T0,Tc as xf,Td as Yt,U as Yu,Ua as da,Ub as L0,Uc as La,Ud as p1,V as qu,Va as ma,Vb as M0,Vc as yf,Vd as f1,W as Xu,Wa as ua,Wb as D0,Wc as wf,Wd as g1,X as Ju,Xa as Fp,Xb as I0,Xc as Nf,Xd as h1,Y as Qu,Ya as Bp,Yb as E0,Yc as kf,Yd as Ea,Z as ep,Za as $p,Zb as A0,Zc as Cf,Zd as b1,_ as tp,_a as Up,_b as O0,_c as Pf,_d as v1,a as Bo,aa as op,ab as Or,ac as _0,ad as Rf,ae as y1,b as Ru,ba as ap,bb as Kp,bc as H0,bd as Zt,be as w1,c as et,ca as np,cb as jp,cc as V0,cd as Tf,ce as N1,d as Ft,da as ip,db as Zp,dc as ya,dd as Lf,de as k1,e as Tu,ea as sp,eb as pa,ec as W0,ed as Mf,f as tt,fa as lp,fb as Yp,fc as F0,fd as Df,g as rt,ga as cp,gb as qp,gc as wa,gd as If,h as $o,ha as dp,hb as Xp,hc as B0,hd as zr,i as Uo,ia as mp,ib as Jp,ic as Na,id as Ef,j as Lu,ja as up,jb as Qp,jc as $0,jd as Af,k as Go,ka as pp,kb as e0,kc as U0,kd as Ma,l as Ko,la as fp,lb as t0,lc as G0,ld as Of,m as jo,ma as ra,mb as r0,mc as K0,md as zf,n as Zo,na as gp,nb as o0,nc as j0,nd as _f,o as Nt,oa as hp,ob as a0,oc as ka,od as Hf,p as Mu,pa as bp,pb as n0,pc as Ca,pd as Vf,q as Ce,qa as vp,qb as i0,qc as Pa,qd as Wf,r as Du,ra as xp,rb as s0,rc as Z0,rd as Ff,s as Bt,sa as yp,sb as fa,sc as Y0,sd as Bf,t as Iu,ta as wp,tb as l0,tc as q0,td as $f,u as Eu,ua as Np,ub as c0,uc as Sa,ud as Uf,v as $t,va as oa,vb as d0,vc as X0,vd as Gf,w as Au,wa as kp,wb as Kt,wc as Ra,wd as Kf,x as Yo,xa as Cp,xb as m0,xc as Ta,xd as jf,y as qo,ya as Pp,yb as u0,yc as J0,yd as Zf,z as Ou,za as Sp,zb as p0,zc as Q0,zd as Yf}from"./chunk-LPJHEISM.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as xt,b as Eo,c as Er,d as Ao,e as Oo,f as zo,g as yt,h as wt,i as Ar,j as _o,k as V,l as ke,m as Ho,n as ge,o as Vt,p as s,q as Wt,r as Vo,s as Wo,t as Fo}from"./chunk-GA2JJNGY.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Li}from"lucide-react";import*as Xt from"react";import{jsx as qt,jsxs as Ei}from"react/jsx-runtime";var L1=ne.Root,Mi=Xt.forwardRef(({className:e,...t},r)=>qt(ne.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Mi.displayName="AccordionItem";var Di=Xt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?Li:Zt;return qt(ne.Header,{className:"flex",children:Ei(ne.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,qt(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Di.displayName=ne.Trigger.displayName;var Ii=Xt.forwardRef(({className:e,children:t,...r},o)=>qt(ne.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}));Ii.displayName=ne.Content.displayName;import{cva as Ai}from"class-variance-authority";import*as Jt from"react";import{jsx as _r}from"react/jsx-runtime";var Oi=Ai("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"}}),zi=Jt.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Oi({variant:t}),e),...r}));zi.displayName="Alert";var _i=Jt.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));_i.displayName="AlertTitle";var Hi=Jt.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Hi.displayName="AlertDescription";import{sha256 as Vi}from"js-sha256";import{useState as Wi}from"react";import{jsx as Hr}from"react/jsx-runtime";function Fi(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/${Vi(e.email)}?d=${encodeURIComponent(r)}`:t}function _1({user:e={},className:t}){if(!e)return Hr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Wi(Fi(e));return Hr("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 H1({id:e,className:t}){return Hr("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 Bi}from"class-variance-authority";import{jsx as Ui}from"react/jsx-runtime";var $i=Bi("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 Qt({className:e,variant:t,...r}){return Ui("span",{className:s($i({variant:t}),e),...r})}import{cva as Yi}from"class-variance-authority";import{forwardRef as qi}from"react";import*as he from"@radix-ui/react-tooltip";import Gi from"linkify-react";import{HelpCircle as Ki}from"lucide-react";import ji from"next/link";import{useState as Zi}from"react";import{jsx as G,jsxs as ot}from"react/jsx-runtime";function J1({children:e}){return G(he.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:c=0,...l}){let[i,m]=Zi(!1);return ot(he.Root,{open:i,onOpenChange:m,delayDuration:c,disableHoverableContent:a,children:[G(he.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),G(he.Portal,{children:G(he.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,...l,children:typeof t=="string"?G("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 Q1({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:[G("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?G(ji,{href:r,...o?{target:o}:{},className:s(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?G(se,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function eg({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," ",G("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 tg({children:e,className:t,tooltipClassName:r}){return G("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:G(Gi,{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 rg(e){return G(J,{...e,children:G(Ki,{className:"h-4 w-4 text-neutral-500"})})}function og({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:G(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,Wt(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 ag({children:e,content:t,...r}){return G(J,{content:t,...r,children:G("div",{className:"flex cursor-pointer items-center",children:G(Qt,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function ng({children:e,tooltipProps:t,...r}){return G(J,{...t,children:G("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 er({children:e,tooltipProps:t}){return t?G(J,{...t,children:G("div",{children:e})}):e}import{jsx as at,jsxs as Aa}from"react/jsx-runtime";var ie=Yi("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"}}),se=qi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:l,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?at(J,{content:m,children:Aa("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:[l,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})]})}):Aa("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||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||c,...n,children:[c?at(Ce,{}):l||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]}));se.displayName="Button";import{cva as Xi}from"class-variance-authority";import{createContext as Ji}from"react";import{jsx as Oa}from"react/jsx-runtime";var Qi=Xi("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"}}}),kt=Ji({variant:"loose",loading:!1});function za({variant:e="loose",loading:t=!1,className:r,children:o}){return Oa("ul",{className:s(Qi({variant:e,loading:t}),r),"data-variant":e,children:Oa(kt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as es}from"class-variance-authority";import{createContext as ts,useContext as rs,useEffect as os,useRef as as,useState as ns}from"react";import{jsx as _a,jsxs as ls}from"react/jsx-runtime";var is=es("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"}}}),ss="w-full py-2.5 px-4",Vr=ts({hovered:!1});function Ha({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:l}){let{variant:i}=rs(kt),m=as(null),[d,n]=ns(!1);os(()=>{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")||wt(p));return ls("li",{ref:m,className:s(is({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[l,_a("div",{className:s(ss,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:_a(Vr.Provider,{value:{hovered:d},children:r})})]})}var Lg=Object.assign(za,{Card:Object.assign(Ha,{Context:Vr}),Context:kt});import cs from"embla-carousel-autoplay";import ds from"embla-carousel-react";import{ArrowLeft as ms,ArrowRight as us}from"lucide-react";import{createContext as ps,forwardRef as Pt,useCallback as Ct,useContext as fs,useEffect as Wr,useState as Fr}from"react";import{jsx as Pe,jsxs as Fa}from"react/jsx-runtime";var Br=2e3,Va=ps(null);function be(){let e=fs(Va);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Wa(){let{api:e}=be(),[t,r]=Fr(0),o=Ct(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 gs=Pt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:l,...i},m)=>{let[d,n]=ds({...t,axis:e==="horizontal"?"x":"y"},[...o?[cs(typeof o=="object"?o:{delay:Br})]:[],...a||[]]),[u,p]=Fr(!1),[v,b]=Fr(!1),h=Ct(T=>{!T||(p(T.canScrollPrev()),b(T.canScrollNext()))},[]),g=Ct(()=>{n==null||n.scrollPrev()},[n]),w=Ct(()=>{n==null||n.scrollNext()},[n]),N=Ct(T=>{T.key==="ArrowLeft"?(T.preventDefault(),g()):T.key==="ArrowRight"&&(T.preventDefault(),w())},[g,w]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return h(n),n.on("reInit",h),n.on("select",h),()=>{n==null||n.off("select",h)}},[n,h]),Pe(Va.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:w,canScrollPrev:u,canScrollNext:v},children:Pe("div",{ref:m,onKeyDownCapture:N,className:s("relative",c),role:"region","aria-roledescription":"carousel",...i,children:l})})});gs.displayName="Carousel";var hs=Pt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Pe("div",{ref:o,className:"overflow-hidden",children:Pe("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});hs.displayName="CarouselContent";var bs=Pt(({className:e,...t},r)=>{let{orientation:o}=be();return Pe("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})});bs.displayName="CarouselItem";var vs=Pt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=be();return Fa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Pe(ms,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Previous slide"})]})});vs.displayName="CarouselPrevious";var xs=Pt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=be();return Fa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Pe(us,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Next slide"})]})});xs.displayName="CarouselNext";import{cva as ys}from"class-variance-authority";import{motion as ws}from"framer-motion";import{ChevronLeft as Ns,ChevronRight as ks}from"lucide-react";import*as Ie from"react";import{jsx as Ue,jsxs as St}from"react/jsx-runtime";var Cs=ys("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 "}}}),jg=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:l}=be(),i=(b=l==null?void 0:l.plugins())==null?void 0:b.autoplay,[m,d]=Ie.useState(0),[n,u]=Ie.useState(!1),p=Ie.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),v=Ie.useCallback(h=>()=>{i&&i.isPlaying()&&i.stop(),h()},[i]);return Ie.useEffect(()=>{!l||(p(l),u((i==null?void 0:i.isPlaying())??!1),l.on("reInit",p),l.on("select",p),l.on("autoplay:play",()=>u(!0)),l.on("autoplay:stop",()=>u(!1)))},[l,i,p]),St("div",{className:s(Cs({variant:e}),t),children:[e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:v(o),children:[Ue(Ns,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Previous slide"})]}),l!=null&&Ue("div",{className:"flex items-center gap-1",children:l.slideNodes().map((h,g)=>St("button",{onClick:v(()=>l.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ue("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&&Ue(ws.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Br)/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:[Ue(ks,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Next slide"})]})]})};import Ps from"embla-carousel-react";import{forwardRef as Ss,useCallback as Rs,useEffect as Ts}from"react";import{jsx as tr}from"react/jsx-runtime";var rh=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ps({dragFree:!0}),c=Rs(l=>{!l||!a||a==null||a.scrollTo(l.selectedScrollSnap())},[a]);return Ts(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),tr("div",{className:"overflow-hidden",ref:o,children:tr("div",{className:s("mx-4 flex gap-4",e),...t})})},oh=Ss(({index:e,className:t,...r},o)=>{let{api:a}=be(),c=Wa();return tr("div",{ref:o,children:tr("button",{type:"button",onClick:()=>{var i;if(!a)return;let l=(i=a.plugins())==null?void 0:i.autoplay;l&&l.isPlaying()&&l.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as Rt from"@radix-ui/react-checkbox";import{Check as Ls}from"lucide-react";import*as Ba from"react";import{jsx as $r}from"react/jsx-runtime";var Ms=Ba.forwardRef(({className:e,...t},r)=>$r(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:$r(Rt.Indicator,{className:"flex items-center justify-center",children:$r(Ls,{className:"h-3 w-3 text-white"})})}));Ms.displayName=Rt.Root.displayName;import{Command as Lt,CommandInput as wl,CommandItem as Nl,useCommandState as kl}from"cmdk";import{ChevronDown as Cl}from"lucide-react";import{forwardRef as Pl,isValidElement as Sl,useCallback as Rl,useEffect as nr,useRef as Tl,useState as Tt}from"react";import{motion as vl}from"framer-motion";import{forwardRef as xl,useRef as yl}from"react";import Ur from"js-cookie";import{useEffect as Ds,useState as Is}from"react";function dh(e,t,r){let[o,a]=Is(()=>{let l=Ur.get(e);return l?JSON.parse(l):t});return Ds(()=>{let l=()=>{let i=Ur.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}},[e]),[o,l=>{a(l),Ur.set(e,JSON.stringify(l),r)}]}import{useCallback as Es,useEffect as As,useRef as Os,useState as zs}from"react";var nt=(e=3e3)=>{let t=Os(null),[r,o]=zs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=Es(async(l,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof l=="string"?await navigator.clipboard.writeText(l):l instanceof ClipboardItem&&await navigator.clipboard.write([l]),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 As(()=>()=>a(),[]),[r,c]};import{useEffect as _s,useState as Hs}from"react";function gh(){let[e,t]=Hs(null);return _s(()=>{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 b=1;b<i.length;b++){let h=i[b];if(!h)break;(h.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=h)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=c.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=c.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=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 Vs}from"react";function xh(e){return{handleKeyDown:Vs(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 Ws,useState as Fs}from"react";function kh(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=Fs(o??!1);return Ws(()=>{let l=()=>{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};c(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",l),window.addEventListener("resize",l);let i=null;return e.current&&(i=new IntersectionObserver(l),i.observe(e.current)),l(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",l),window.removeEventListener("resize",l),i==null||i.disconnect()}},[e,r]),a}import{useEffect as Bs,useState as $s}from"react";function Sh(){let[e,t]=$s(!1);return Bs(()=>{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 Us,useState as Gs}from"react";function Mh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,l]=Gs(),i=(c==null?void 0:c.isIntersecting)&&a,m=([d])=>{l(d)};return Us(()=>{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]),c}import{createContext as Ks,useCallback as js,useContext as Zs,useEffect as $a,useId as Ys,useState as qs}from"react";import{jsx as Xs}from"react/jsx-runtime";var Ua=Ks({listeners:[],setListeners:()=>{}});function zh({children:e}){let[t,r]=qs([]);return Xs(Ua.Provider,{value:{listeners:t,setListeners:r},children:e})}function it(e,t,r={}){let o=Ys(),{listeners:a,setListeners:c}=Zs(Ua),l=js(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(b=>b.enabled!==!1&&!!d==!!b.modal&&!!n==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(u):b.key===u));!p.length||Ao(p,(b,h)=>(h.priority??0)-(b.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);$a(()=>(document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)),[l]),$a(()=>(c(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>c(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Js,useState as Qs}from"react";function Ga(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Vh(e,t){let[r,o]=Qs(Ga(e)??t);return Js(()=>{let c=Ga(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as el}from"sonner";import tl from"swr";function Uh(e,t){let{data:r,isLoading:o,mutate:a}=tl(e,ge);return{data:r,isLoading:o,update:async(c,l)=>el.promise(a(c(r),{optimisticData:l,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 Ya,useMemo as sl}from"react";import{useEffect as Ka,useState as rl}from"react";function ja({pageSize:e,page:t,onPageChange:r}){let[o,a]=rl({pageIndex:t,pageSize:e});return Ka(()=>{a(c=>({...c,pageIndex:t}))},[t]),Ka(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as ol,useRouter as al,useSearchParams as nl}from"next/navigation";import{useCallback as il}from"react";function Za(){let e=ol(),t=al(),r=nl(),o=Object.fromEntries(r),a=(l,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)),l&&Object.entries(l).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},c=il(({set:l,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);l&&Object.entries(l).forEach(([h,g])=>p.set(h,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(h=>p.delete(h)):p.delete(i));let v=p.toString(),b=`${e}${v.length>0?`?${v}`:""}`;if(n)return b;m?t.replace(b,{scroll:!1}):t.push(b,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function rb(e=Wo){let{searchParams:t,queryParams:r}=Za(),o=sl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=ja({pageSize:e,page:o,onPageChange:l=>{r(l===1?{del:"page",scroll:!1}:{set:{page:l.toString()},scroll:!1})}});return Ya(()=>{let l=parseInt(t.get("page")||"1")||1;c(i=>({...i,pageIndex:l}))},[t.get("page")]),Ya(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as ll}from"react";function nb(){ll(()=>{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 cl,useState as dl}from"react";function rr(e){let[t,r]=dl(),o=([a])=>{r(a)};return cl(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as ml,useEffect as qa,useState as ul}from"react";function Xa(e){let[t,r]=ul(!1),o=ml(()=>{r(window.scrollY>e)},[e]);return qa(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),qa(()=>{o()},[o]),t}import{useCallback as pl,useEffect as fl,useState as gl}from"react";function Ee(e){let[t,r]=gl(1),o=pl(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:l,clientHeight:i}=e.current;r(l===i?1:Math.min(c/(l-i),1))},[]),a=rr(e);return fl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as hl}from"react";import{toast as Qa}from"sonner";import{jsx as or,jsxs as Ja}from"react/jsx-runtime";function bl({id:e,message:t,undo:r}){let o=()=>{r(),Qa.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return hl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),Ja("div",{className:"flex w-full items-center justify-between space-x-2",children:[Ja("div",{className:"flex items-center space-x-2",children:[or(jo,{}),or("p",{className:"font-medium",children:t})]}),or("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 xb(){return({id:t,message:r,undo:o,duration:a})=>Qa(or(bl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as en}from"react/jsx-runtime";var Se=xl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},l)=>{var d,n;let i=yl(null),m=rr(i);return en(vl.div,{ref:l,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},...c,children:en("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});Se.displayName="AnimatedSizeContainer";import*as Ae from"@radix-ui/react-popover";import{Drawer as st}from"vaul";import{jsx as Re,jsxs as ar}from"react/jsx-runtime";function lt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:l,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return l||v?ar(st.Root,{open:a,onOpenChange:c,children:[Re(st.Trigger,{className:"sm:hidden",asChild:!0,children:e}),ar(st.Portal,{children:[Re(st.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),ar(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:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[Re("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Re("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Re("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})]}),Re(st.Overlay,{})]})]}):ar(Ae.Root,{open:a,onOpenChange:c,children:[Re(Ae.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Re(Ae.Portal,{children:Re(Ae.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 ir,jsx as M,jsxs as Te}from"react/jsx-runtime";function Ll(e,t){return e===!0}function Zb({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:l="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:b,onOpenChange:h,onSearchChange:g,shouldFilter:w=!0,inputRight:N,inputClassName:T,optionRight:C,optionClassName:P,matchTriggerWidth:_,hideSearch:z=!1,children:R}){let y=Ll(e,r),A=Array.isArray(t)?t:t?[t]:[],{isMobile:k}=j(),[S,X]=Tt(!1),I=b??S,ue=h??X,[U,Mr]=Tt(""),[Mo,Dr]=Tt(!1),[Ir,Si]=Tt(void 0),[Ri,Do]=Tt(!1),Ti=H=>{var Qe;if(y){let Be=A.some(({value:$e})=>$e===H.value);r(Be?A.filter(({value:$e})=>$e!==H.value):[...A,H])}else r(A.length&&((Qe=A[0])==null?void 0:Qe.value)===H.value?null:H),ue(!1)},Io=Rl((H,Qe)=>Qe===""?[...H.filter(Be=>Be.first&&!A.some($e=>$e.value===Be.value)),...A,...H.filter(Be=>!Be.first&&!A.some($e=>$e.value===Be.value))]:H,[A]);return nr(()=>{Mo&&(Si(o&&Io(o,U)),Dr(!1))},[Mo,o,Io,U]),nr(()=>{Dr(!0)},[o]),nr(()=>{I||(Mr(""),Dr(!0))},[I]),nr(()=>g==null?void 0:g(U),[U]),M(lt,{openPopover:I,setOpenPopover:ue,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:s(_&&"sm:w-[var(--radix-popover-trigger-width)]"),content:M(Se,{width:!k&&!_,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Te(Lt,{loop:!0,shouldFilter:w,children:[!z&&Te("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[M(wl,{placeholder:l,value:U,onValueChange:Mr,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",T),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!U)&&(H.preventDefault(),H.stopPropagation(),ue(!1))}}),N&&M("div",{className:"mr-2",children:N}),u&&M("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})]}),M(Ml,{children:M(Lt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ir!==void 0?Te(ir,{children:[Ir.map(H=>M(Dl,{option:H,multiple:y,selected:A.some(({value:Qe})=>Qe===H.value),onSelect:()=>Ti(H),right:C==null?void 0:C(H),className:P},`${H.label}, ${H.value}`)),U.length>0&&d&&Te(Nl,{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",P),onSelect:async()=>{Do(!0),await(d==null?void 0:d(U))&&(Mr(""),ue(!1)),Do(!1)},children:[Ri?M(Ce,{className:"size-4 shrink-0"}):M(Zt,{className:"size-4 shrink-0"}),M("div",{className:"grow truncate",children:(m==null?void 0:m(U))||`Create "${U}"`})]}),w?M(El,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ir.length===0?M("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):M(Lt.Loading,{children:M("div",{className:"flex h-12 items-center justify-center",children:M(Ce,{})})})})})]})}),children:M(se,{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:Te(ir,{children:[M("div",{className:"min-w-0 grow truncate text-left",children:R||A.map(H=>H.label).join(", ")||c}),p&&(p===!0?M(Cl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?tn(a)?a:M(a,{className:"size-4 shrink-0"}):void 0})})}var Ml=({children:e})=>{let t=Tl(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Te(ir,{children:[M("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),M("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 Dl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Te(ir,{children:[M(Il,{disabledTooltip:e.disabledTooltip,children:Te(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",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&M("div",{className:"shrink-0 text-neutral-600",children:o?M(sa,{className:"size-4 text-neutral-600"}):M(la,{className:"size-4 text-neutral-400"})}),Te("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&M("span",{className:"shrink-0 text-neutral-600",children:tn(e.icon)?e.icon:M(e.icon,{className:"h-4 w-4"})}),M("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&M(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&M(Lt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Il=({children:e,disabledTooltip:t})=>t?M(J,{content:t,children:M("div",{children:e})}):e,tn=e=>Sl(e),El=Pl((e,t)=>kl(o=>o.filtered.count===0)?M("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as sr,format as Al,isSameMonth as Ol}from"date-fns";import{ChevronLeft as rn,ChevronRight as on,ChevronsLeft as zl,ChevronsRight as _l}from"lucide-react";import{forwardRef as Hl,useRef as Vl}from"react";import{DayPicker as Wl,useDayPicker as Fl,useDayRender as Bl,useNavigation as $l}from"react-day-picker";import{Fragment as Ul,jsx as re,jsxs as lr}from"react/jsx-runtime";var Mt=Hl(({onClick:e,icon:t,disabled:r,...o},a)=>re("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:re(t,{className:"h-full w-full shrink-0"})}));Mt.displayName="NavigationButton";function an({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:l,classNames:i,...m}){return re(Wl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:l,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:()=>re(rn,{className:"h-4 w-4"}),IconRight:()=>re(on,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:b}=$l(),{numberOfMonths:h,fromDate:g,toDate:w}=Fl(),N=b.findIndex(y=>Ol(d.displayMonth,y)),T=N===0,C=N===b.length-1,P=h>1&&(T||!C),_=h>1&&(C||!T),z=()=>{let y=sr(v,-1);p&&(!g||y.getTime()>=g.getTime())&&n(y)},R=()=>{let y=sr(v,1);u&&(!w||y.getTime()<=w.getTime())&&n(y)};return lr("div",{className:"flex items-center justify-between",children:[lr("div",{className:"flex items-center gap-1",children:[o&&!_&&re(Mt,{disabled:a||!p||g&&sr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:z,icon:zl}),!_&&re(Mt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:rn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Al(d.displayMonth,"LLLL yyy",{locale:c})}),lr("div",{className:"flex items-center gap-1",children:[!P&&re(Mt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:on}),o&&!P&&re(Mt,{disabled:a||!u||w&&sr(v,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:R,icon:_l})]})]})},Day:({date:d,displayMonth:n})=>{let u=Vl(null),{activeModifiers:p,buttonProps:v,divProps:b,isButton:h,isHidden:g}=Bl(d,n,u),{selected:w,today:N,disabled:T,range_middle:C}=p;if(g)return re(Ul,{});if(!h)return re("div",{...b,className:s("flex items-center justify-center",b.className)});let{children:P,..._}=v;return lr("button",{ref:u,..._,type:"button",children:[P,N&&re("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":!w,"!bg-white":w,"!bg-blue-400":w&&C,"text-neutral-400":T})})]})}},...m})}import{enUS as tc}from"date-fns/locale";import{useEffect as qr,useMemo as sn,useRef as rc,useState as dr}from"react";import{Command as Gr}from"cmdk";import{Lock as Gl}from"lucide-react";import{jsx as Ge,jsxs as Kl}from"react/jsx-runtime";var Kr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,c=d=>"date"in d,l=(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&&l(u,p)&&(v=!0);let b=d.to,h=n.to,g=!1;return b&&h&&l(b,h)&&(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(c(d)){let n=r;return n&&l(n,d.date)}return!1};return Ge(Gr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ge(Gr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Kl(Gr.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:[Ge("span",{children:d.label}),d.requiresUpgrade?Ge(Gl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Ge("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&&Ge(J,{side:"bottom",content:d.tooltipContent,children:Ge("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Kr.displayName="DatePicker.Presets";import{format as Oe}from"date-fns";import{createContext as jl}from"react";var jr=jl({isOpen:!1,setIsOpen:()=>{}}),Zl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},Zr=(e,t,r=!1)=>{let o=!Zl(),a;return r?a=o?Oe(e,"d MMM, yyyy h:mm a",{locale:t}):Oe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Oe(e,"d MMM, yyyy",{locale:t}),a},nn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:l,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,b,h,g;if("date"in n){let w=n.date.getFullYear();if(o&&w<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&w>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(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(l&&n.date.getDate()<l.getDate())throw new Error(`Preset ${n.label} is before fromDay ${l}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Oe(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let w=(u=n.dateRange.from)==null?void 0:u.getFullYear(),N=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(w&&o&&w<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(N&&r&&N>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let T=(v=n.dateRange.from)==null?void 0:v.getMonth();if(T&&T<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(c){let T=(b=n.dateRange.to)==null?void 0:b.getMonth();if(T&&T>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(c,"MMM, yyyy")}.`)}if(l){let T=(h=n.dateRange.from)==null?void 0:h.getDate();if(T&&T<l.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(l,"MMM dd, yyyy")}.`)}if(i){let T=(g=n.dateRange.to)==null?void 0:g.getDate();if(T&&T>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Oe(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Yl}from"class-variance-authority";import{Calendar as ql,ChevronDown as Xl}from"lucide-react";import{forwardRef as Jl}from"react";import{jsx as cr,jsxs as ec}from"react/jsx-runtime";var Ql=Yl(["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"}}}),Yr=Jl(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>ec("button",{ref:c,className:s(Ql({hasError:o}),e),...a,children:[cr(ql,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),cr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?cr("span",{className:"text-neutral-400",children:r}):null)}),cr(Xl,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Yr.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as ln}from"react/jsx-runtime";var oc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:l,disabledDays:i,showYearNavigation:m=!1,locale:d=tc,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...b})=>{let{isDesktop:h}=j(),[g,w]=dr(!1),[N,T]=dr(a&&r?a==null?void 0:a.find(({id:I})=>I===r):void 0),[C,P]=dr((N==null?void 0:N.dateRange)??e??t??void 0),[_,z]=dr(C==null?void 0:C.to),R=sn(()=>C,[g]);qr(()=>{P(e)},[e]),qr(()=>{let I=a==null?void 0:a.find(({id:ue})=>ue===r);T(I),P((I==null?void 0:I.dateRange)??e??t)},[a,r]),qr(()=>{g?C&&z(C.to):z(C==null?void 0:C.to)},[g]);let y=(I,ue)=>{let U=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:ue}:I;P(U),T(void 0),(U==null?void 0:U.from)&&(U==null?void 0:U.to)&&(o==null||o(U),w(!1))},A=I=>{P(I.dateRange),T(I),o==null||o(I.dateRange,I),w(!1)},k=()=>{P(R),w(!1)},S=I=>{I||k(),w(I)},X=sn(()=>C?`${C.from?Zr(C.from,d):""} - ${C.to?Zr(C.to,d):""}`:null,[C,d]);return it((a==null?void 0:a.filter(I=>I.shortcut).map(I=>I.shortcut))??[],I=>{let ue=a==null?void 0:a.find(U=>U.shortcut===I.key);ue&&A(ue)}),oe(jr.Provider,{value:{isOpen:g,setIsOpen:w},children:oe(lt,{align:p,openPopover:g,setOpenPopover:S,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:ln("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&&oe(ac,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(Kr,{currentPresetId:r,currentValue:C,presets:a,onSelect:A})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(an,{mode:"range",selected:C,onSelect:y,month:_,onMonthChange:z,numberOfMonths:h?2:1,disabled:i,disableNavigation:l,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"},...b})})]})}),children:oe(Yr,{placeholder:n,disabled:c,className:v,hasError:u,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(N==null?void 0:N.label)??X})})})};function Iv({presets:e,...t}){return e&&nn(e,t),oe(oc,{presets:e,...t})}function ac({children:e}){let t=rc(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return ln("div",{className:"relative sm:h-full",children:[oe("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}),oe("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 nc from"next/link";import{useEffect as ic,useState as cn}from"react";import sc from"swr";import{jsx as Xr,jsxs as dn}from"react/jsx-runtime";function mn({className:e}){let{data:t}=sc("https://status.dub.co/api/v1/summary",ge),[r,o]=cn("bg-neutral-200"),[a,c]=cn("Loading status...");return ic(()=>{if(!t)return;let{ongoing_incidents:l}=t;if(l.length>0){let{current_worst_impact:i,name:m}=l[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(m),o(d)}else c("All systems operational"),o("bg-green-500")},[t]),dn(nc,{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:[dn("div",{className:"relative size-2",children:[Xr("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")}),Xr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Xr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as mr,jsxs as un}from"react/jsx-runtime";function Uv({icon:e,title:t,description:r,learnMore:o,children:a}){return un("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[mr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:mr(e,{className:"size-6 text-neutral-800"})}),mr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&un("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&mr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as lc}from"class-variance-authority";import{useState as pn}from"react";import{toast as fn}from"sonner";import{Fragment as dc,jsx as ve,jsxs as Qr}from"react/jsx-runtime";var gn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],Jr={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:gn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg"],errorMessage:"File type not supported (.svg., .png, or .jpg only)"},programResourceFiles:{types:[...gn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},cc=lc("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 t2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:l,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:b,maxFileSizeMB:h=0,targetResolution:g,accessibilityLabel:w="File upload",disabled:N=!1}){let[T,C]=pn(!1),[P,_]=pn(null),z=async R=>{let y="dataTransfer"in R?R.dataTransfer.files&&R.dataTransfer.files[0]:R.target.files&&R.target.files[0];if(!y)return;if(_(y.name),h>0&&y.size/1024/1024>h){fn.error(`File size too big (max ${h} MB)`);return}let A=Jr[d].types;if(A.length&&!A.includes(y.type)){fn.error(Jr[d].errorMessage??"File type not supported");return}let k=y;if(g&&y.type.startsWith("image/"))try{let S=await zo(y,g),X=await fetch(S).then(I=>I.blob());k=new File([X],y.name,{type:y.type})}catch(S){console.error("Error resizing image:",S)}if(t){let S=new FileReader;S.onload=X=>{var I;return r==null?void 0:r({src:(I=X.target)==null?void 0:I.result,file:k})},S.readAsDataURL(k);return}r==null||r({file:k})};return Qr("label",{className:s(cc({variant:o}),N?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&ve("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ve(Nt,{})}),ve("div",{className:"absolute inset-0 z-[5]",onDragOver:R=>{R.preventDefault(),R.stopPropagation(),C(!0)},onDragEnter:R=>{R.preventDefault(),R.stopPropagation(),C(!0)},onDragLeave:R=>{R.preventDefault(),R.stopPropagation(),C(!1)},onDrop:async R=>{R.preventDefault(),R.stopPropagation(),z(R),C(!1)}}),Qr("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",N&&"bg-neutral-50",T&&!N&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!N&&"group-hover:opacity-100"):s(!N&&"group-hover:bg-neutral-50")),children:[ve(i,{className:s("size-7 transition-all duration-75",N?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",T?"scale-110":"scale-100"),c)}),b!==null&&ve("div",{className:s("mt-2 text-center text-sm text-neutral-500",N&&"text-neutral-400"),children:b??ve(dc,{children:Qr("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ve("span",{className:"sr-only",children:w})]}),n&&(m??ve("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",l)})),p&&ve("div",{className:"sr-only mt-1 flex shadow-sm",children:ve("input",{id:e,type:"file",accept:Jr[d].types.join(","),onChange:z,disabled:N},P)})]})}import{AnimatePresence as mc,motion as hn}from"framer-motion";import{X as uc}from"lucide-react";import pc from"next/link";import{isValidElement as fc}from"react";import{Fragment as gc,jsx as Q,jsxs as Dt}from"react/jsx-runtime";function vn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return it("Escape",o,{priority:1}),Q(Se,{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(mc,{children:t==null?void 0:t.map(({key:c,value:l})=>{if(c==="loader")return Q(hn.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-${l}`);let i=e.find(m=>m.key===c);return i?(i.multiple&&Array.isArray(l)?l:[l]).map(m=>{var v,b,h,g;let d=(v=i.options)==null?void 0:v.find(w=>typeof w.value=="string"&&typeof m=="string"?w.value.toLowerCase()===m.toLowerCase():w.value===m),n=(d==null?void 0:d.icon)??((b=i.getOptionIcon)==null?void 0:b.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((h=i.getOptionLabel)==null?void 0:h.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(hn.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:bn(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(gc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:bn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(pc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:yt(u,30)}):yt(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(c,m),children:Q(uc,{className:"h-3.5 w-3.5"})})]},`${c}-${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 bn=e=>fc(e);import{Command as ze,useCommandState as hc}from"cmdk";import{ChevronDown as bc,ListFilter as vc}from"lucide-react";import{Fragment as xc,forwardRef as yc,isValidElement as yn,useCallback as ur,useEffect as pr,useImperativeHandle as wc,useRef as to,useState as eo}from"react";import{Fragment as Rc,jsx as W,jsxs as xe}from"react/jsx-runtime";function wn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:l,askAI:i,children:m,emptyState:d,className:n}){var y,A;let{isMobile:u}=j(),p=to(null),v=to(),[b,h]=eo(!1);it("f",()=>h(!0),{enabled:!b});let[g,w]=eo(""),[N,T]=eo(null),C=ur(()=>{w(""),T(null)},[]);pr(()=>{b||C()},[b]);let P=N?e.find(({key:k})=>k===N):null,_=ur(k=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),T(k),o==null||o(k)},[]),z=ur(k=>{if(!P||!l)return!1;let S=l.find(({key:X})=>X===N);return(S==null?void 0:S.value)===k||S&&P.multiple&&Array.isArray(S.value)&&S.value.includes(k)},[P]),R=ur(k=>{P&&(z(k)?r(P.key,k):t(P.key,k),P.multiple||h(!1))},[l,P,i]);return pr(()=>{a==null||a(g)},[g]),pr(()=>{c==null||c(N)},[N]),pr(()=>{(P==null?void 0:P.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[P==null?void 0:P.options]),W(lt,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:k=>{N&&(k.preventDefault(),C())},content:W(Se,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:xe(ze,{loop:!0,shouldFilter:!P||P.shouldFilter!==!1,children:[xe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[W(kc,{placeholder:`${(P==null?void 0:P.label)||"Filter"}...`,value:g,onValueChange:w,onKeyDown:k=>{(k.key==="Escape"||k.key==="Backspace"&&!g)&&(k.preventDefault(),k.stopPropagation(),N?C():h(!1))},emptySubmit:k=>{k.preventDefault(),k.stopPropagation(),i?(t("ai",P?`${P.label} ${g}`:g),h(!1)):R(g)}}),!P&&W("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"})]}),W(Cc,{ref:p,children:xe(ze.List,{className:s("flex w-full flex-col gap-1 p-1",P?"min-w-[100px]":"min-w-[180px]"),children:[P?((A=(y=P.options)==null?void 0:y.filter(k=>!g||!k.hideDuringSearch))==null?void 0:A.map(k=>{let S=z(k.value);return W(xn,{filter:P,option:k,right:S?W(na,{className:"h-4 w-4"}):k.right,onSelect:()=>R(k.value)},k.value)}))??W(ze.Loading,{children:W("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:W(Ce,{})})}):e.filter(k=>!k.hideInFilterDropdown).map(k=>xe(xc,{children:[W(xn,{filter:k,onSelect:()=>_(k.key)}),k.separatorAfter&&W(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},k.key)),(!P||P.options)&&W(Pc,{search:g,askAI:i,children:d?Nc(d)?(d==null?void 0:d[N??"default"])??"No matches":d:"No matches"})]})},N)]})}),children:xe("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:[W(vc,{className:"size-4 shrink-0"}),W("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),l!=null&&l.length?W("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:l.length}):W(bc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Nc(e){return typeof e=="object"&&e!==null&&!yn(e)}var kc=e=>{let t=hc(r=>r.filtered.count===0);return W(ze.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"})},Cc=yc(({children:e},t)=>{let r=to(null);wc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return xe(Rc,{children:[W("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),W("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 xn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),c=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,l=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return xe(ze.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:l+(t==null?void 0:t.value),children:[W("span",{className:"shrink-0 text-neutral-600",children:Sc(c)?c:W(c,{className:"h-4 w-4"})}),yt(l,48),W("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Pc=({search:e,askAI:t,children:r})=>t&&e?xe(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[W(Uo,{className:"h-4 w-4"}),xe("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",xe("span",{className:"text-black",children:['"',e,'"']})]})]}):W(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Sc=e=>yn(e);var S2={Select:wn,List:vn};import{useMemo as Tc,useState as Nn}from"react";import{jsx as Ke,jsxs as fr}from"react/jsx-runtime";function E2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:l}){let[i,m]=Nn(r.defaultValue),[d,n]=Nn(!1),u=Tc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return fr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await l({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[fr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[fr("div",{className:"flex flex-col space-y-3",children:[Ke("h2",{className:"text-xl font-medium",children:e}),Ke("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ke("input",{...r,type:r.type||"text",required:!0,disabled:!!c,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":c})}):Ke("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),fr("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"?Ke("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,Ke("div",{className:"shrink-0",children:Ke(se,{text:a,loading:d,disabled:u,disabledTooltip:c})})]})]})}import{useId as Lc}from"react";import{jsx as gr,jsxs as Mc}from"react/jsx-runtime";function It({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Lc();return Mc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[gr("defs",{children:gr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:gr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),gr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Dc}from"lucide-react";import Ic,{useCallback as Ec,useState as Ac}from"react";import{jsx as je,jsxs as ro}from"react/jsx-runtime";var Oc=Ic.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Ac(!1),l=Ec(()=>c(!a),[a,c]);return ro("div",{children:[ro("div",{className:"relative flex",children:[je("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}),ro("div",{className:"group",children:[r.error&&je("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:je(Dc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&je("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:()=>l(),"aria-label":a?"Hide password":"Show Password",children:a?je(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):je(ba,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&je("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Oc.displayName="Input";import{flip as Vc,offset as Wc,size as Fc,useDismiss as Bc,useFloating as $c,useInteractions as Uc}from"@floating-ui/react";import{Command as Le,useCommandState as Gc}from"cmdk";import{Check as Kc,ChevronDown as jc,Search as Zc,X as Yc}from"lucide-react";import{createContext as qc,forwardRef as Rn,useContext as io,useEffect as oo,useMemo as Cn,useRef as Pn,useState as ao}from"react";import{Drawer as ct}from"vaul";import zc from"next/image";import{useEffect as _c,useState as kn}from"react";import{jsx as Hc}from"react/jsx-runtime";function Et(e){let[t,r]=kn(!0),[o,a]=kn(e.src);_c(()=>a(e.src),[e.src]);let c=l=>{r(!1);let i=l.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Hc(zc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as le}from"react/jsx-runtime";var hr=qc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function cx({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:l,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Pn(null),[u,p]=ao(!1),[v,b]=ao(""),[h,g]=ao(!1);oo(()=>{u&&g(!1)},[u]),oo(()=>g(!0),[v]),oo(()=>{t&&b(t.value)},[t]);let w=Cn(()=>{let S=v.toLowerCase();return h?e.filter(X=>X.value.toLowerCase().includes(S)):v?e.sort((X,I)=>(I.value.toLowerCase().includes(S)?1:0)-(X.value.toLowerCase().includes(S)?1:0)):e},[h,v,e]),{refs:N,floatingStyles:T,context:C}=$c({open:u,onOpenChange:p,middleware:[Wc(8),Fc({apply({elements:{floating:S},availableHeight:X}){Object.assign(S.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Vc({fallbackStrategy:"initialPlacement",padding:8})]}),P=Bc(C,{enabled:!d||!c}),{getReferenceProps:_,getFloatingProps:z}=Uc([P]),R=Pn(null),{scrollProgress:y,updateScrollProgress:A}=Ee(R),k=Cn(()=>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}):l||E(Zc,{className:"size-4 text-neutral-400"}),[t,l]);return E(hr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&c?le(ct.Root,{open:u,onOpenChange:p,children:[E(ct.Trigger,{className:"sm:hidden",asChild:!0,children:E(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(no,{className:o,iconElement:k})})}),E(ct.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(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:S=>{S.target instanceof Element&&S.target.closest("[data-sonner-toast]")&&S.preventDefault()},children:le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(no,{className:o,iconElement:k})}),u&&le(Le.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(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(Sn,{items:w})]})]})}),E(ct.Overlay,{})]})]}):le(Le,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(no,{className:o,iconElement:k,ref:N.setReference,..._()}),u&&le("div",{ref:N.setFloating,style:T,...z(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[le("div",{ref:R,onScroll:A,className:"grow overflow-y-auto p-2",children:[le(Le.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(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(Sn,{items:w})]}),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(y,2)}})]})]})})}var no=Rn(({iconElement:e,className:t,...r},o)=>le("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}),le("div",{className:"flex h-10 grow",children:[E(Xc,{}),E(Jc,{})]})]})),Xc=Rn((e,t)=>{let r=Gc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:l,setInputValue:i,disabled:m}=io(hr);return E(Le.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:l,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),c(!1)):d.key==="Enter"&&r?c(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&c(!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 Jc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=io(hr);return E("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Yc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(jc,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Sn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=io(hr);return e.map(a=>le(Le.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:[le("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(Qt,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Kc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as so from"@radix-ui/react-label";import{cva as Qc}from"class-variance-authority";import*as Tn from"react";import{jsx as rd}from"react/jsx-runtime";var ed=Qc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),td=Tn.forwardRef(({className:e,...t},r)=>rd(so.Root,{ref:r,className:s(ed(),e),...t}));td.displayName=so.Root.displayName;import{cva as od}from"class-variance-authority";import{isValidElement as ad}from"react";import{jsx as Ln,jsxs as Mn}from"react/jsx-runtime";var nd=od(["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 wx({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...l}){return Mn(e||"button",{...e==="button"?{type:"button"}:{},className:s(nd({variant:t}),c),...l,children:[Mn("div",{className:"flex grow items-center gap-2",children:[o&&(id(o)?o:Ln(o,{className:"size-4"})),r]}),a&&Ln("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 id=e=>ad(e);import{curveNatural as Dn}from"@visx/curve";import{LinearGradient as In}from"@visx/gradient";import{Group as sd}from"@visx/group";import{ParentSize as ld}from"@visx/responsive";import{scaleLinear as cd,scaleUtc as dd}from"@visx/scale";import{Area as md,AreaClosed as ud}from"@visx/shape";import{motion as En}from"framer-motion";import{useId as pd,useMemo as An}from"react";import{jsx as ye,jsxs as lo}from"react/jsx-runtime";var fd={top:8,right:2,bottom:2,left:2};function Dx(e){return ye(ld,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&ye(gd,{...{width:t,height:r,...e}})})}function gd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let l={...fd,...c},i=pd(),m=An(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=An(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),b=new Date(Math.min(...v)),h=new Date(Math.max(...v));return{yScale:cd({domain:[-2,Math.max(p,2)],range:[t-l.top-l.bottom,0],nice:!0,clamp:!0}),xScale:dd({domain:[b,h],range:[0,e-l.left-l.right],nice:!0})}},[r,t,e]);return lo("svg",{width:e,height:t,children:[lo("defs",{children:[ye(In,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-l.left-l.right,gradientUnits:"userSpaceOnUse"}),ye(In,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),ye("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:ye("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),lo(sd,{left:l.left,top:l.top,children:[ye(md,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Dn:void 0,children:({path:u})=>ye(En.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),ye(ud,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Dn:void 0,children:({path:u})=>ye(En.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 ce from"@radix-ui/react-dialog";import*as co from"@radix-ui/react-visually-hidden";import{useRouter as hd}from"next/navigation";import{Drawer as Ze}from"vaul";import{jsx as ae,jsxs as dt}from"react/jsx-runtime";function _x({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:l,drawerRootProps:i}){let m=hd(),d=({dragged:u}={})=>{l&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!c?ae(Ze.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:dt(Ze.Portal,{children:[ae(Ze.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(Ze.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(co.Root,{children:[ae(Ze.Title,{children:"Modal"}),ae(Ze.Description,{children:"This is a modal"})]}),ae(bd,{}),e]})}),ae(Ze.Overlay,{})]})}):ae(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:dt(ce.Portal,{children:[ae(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),dt(ce.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(co.Root,{children:[ae(ce.Title,{children:"Modal"}),ae(ce.Description,{children:"This is a modal"})]}),e]})]})})}function bd(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as vd,jsx as br,jsxs as mt}from"react/jsx-runtime";var On=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 Wx({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:c,showTotalCount:l=!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:[br("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&mt(vd,{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()]})," ",l&&"of "]}),l&&br("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),c]}),mt("div",{className:"flex items-center gap-2",children:[br("button",{type:"button",className:On,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),br("button",{type:"button",className:On,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as xd}from"lucide-react";import*as mo from"react";import{jsx as vr}from"react/jsx-runtime";var yd=mo.forwardRef(({className:e,...t},r)=>vr(_e.Root,{className:s("grid gap-2",e),...t,ref:r}));yd.displayName=_e.Root.displayName;var wd=mo.forwardRef(({className:e,...t},r)=>vr(_e.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:vr(_e.Indicator,{className:"flex items-center justify-center",children:vr(xd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));wd.displayName=_e.Item.displayName;import{Drawer as He}from"vaul";import{jsx as Ye,jsxs as Sd}from"react/jsx-runtime";function Nd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?He.NestedRoot:He.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:Sd(He.Portal,{children:[Ye(He.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(He.Content,{...t,onPointerDownOutside:c=>{var l;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(l=t==null?void 0:t.onPointerDownOutside)==null||l.call(t,c)},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 kd({className:e,...t}){return Ye(He.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function Cd(e){return Ye(He.Description,{...e})}function Pd(e){return Ye(He.Close,{...e})}var Zx=Object.assign(Nd,{Title:kd,Description:Cd,Close:Pd});import{useEffect as Rd,useRef as Td,useState as Ld}from"react";import{jsx as zn}from"react/jsx-runtime";var Md=`
3
3
  attribute vec2 position;
4
4
 
5
5
  void main()
@@ -39,14 +39,14 @@ void main(void) {
39
39
 
40
40
  gl_FragColor = fragColor;
41
41
  }
42
- `,Id=60,Ed=1e3/Id;function jx({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Td(null),[c,l]=Ld(!1);return Rd(()=>{let i=a.current;if(!i||!i.parentElement)return;let m=i.parentElement,d=window.devicePixelRatio||1;i.width=m.clientWidth*d,i.height=m.clientHeight*d;let n=i.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let u=n.createProgram();if(!u){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let x=R===0?Md:Dd,T=n.createShader(R===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!T){console.error("Failed to create shader");return}n.shaderSource(T,x),n.compileShader(T),n.getShaderParameter(T,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(T)),n.attachShader(u,T),n.linkProgram(u)}n.getProgramParameter(u,n.LINK_STATUS)||console.error(n.getProgramInfoLog(u));let p=n.getAttribLocation(u,"position"),v=n.getUniformLocation(u,"time"),b=n.getUniformLocation(u,"resolution"),h=n.getUniformLocation(u,"dotSize"),g=n.getUniformLocation(u,"cellSize"),N=n.getUniformLocation(u,"speed");n.useProgram(u);let k=[1,1,-1,1,1,-1,-1,-1],S=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,S),n.bufferData(n.ARRAY_BUFFER,new Float32Array(k),n.STATIC_DRAW),n.enableVertexAttribArray(p),n.vertexAttribPointer(p,2,n.FLOAT,!1,0,0),n.uniform1f(h,e*window.devicePixelRatio),n.uniform1f(g,t*window.devicePixelRatio),n.uniform1f(N,r);let C,w=0;function $(R){if(R-w<Ed){C=requestAnimationFrame($);return}w=R,n&&i&&u&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(v,R/1e3),n.uniform2f(b,i.width,i.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),C=requestAnimationFrame($)}return C=requestAnimationFrame($),i.addEventListener("webglcontextlost",R=>{R.preventDefault(),l(!0),cancelAnimationFrame(C)}),()=>{cancelAnimationFrame(C),i.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),zn("div",{className:s("absolute inset-0",o,c&&"opacity-0"),children:zn("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{useEffect as Ad,useId as Od,useRef as zd}from"react";import{jsx as xr,jsxs as _n}from"react/jsx-runtime";function Xx({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:c,autoFocus:l=!1}){let i=Od(),m=zd(null);return Ad(()=>{m.current&&l&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[l]),_n("div",{className:a,children:[r&&xr("div",{className:"flex items-center gap-2",children:xr("label",{htmlFor:`${i}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),_n("div",{className:"mt-2 flex w-full items-center justify-between rounded-md border border-neutral-300 bg-white shadow-sm transition-all focus-within:border-neutral-800 focus-within:outline-none focus-within:ring-1 focus-within:ring-neutral-500",children:[xr("input",{ref:m,id:`${i}-datetime`,type:"text",placeholder:o,defaultValue:e?yt(e):"",onBlur:d=>{if(d.target.value.length>0){let n=Er(d.target.value);n&&(t(n),d.target.value=yt(n))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let n=Er(m.current.value);n&&(t(n),m.current.value=yt(n))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),xr("input",{type:"datetime-local",id:`${i}-datetime-local`,required:c,value:e?Eo(e):"",onChange:d=>{let n=new Date(d.target.value);t(n),m.current&&(m.current.value=yt(n))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as _d}from"class-variance-authority";import{jsx as Vn,jsxs as Wd}from"react/jsx-runtime";var Vd=_d("flex gap-1.5 items-center max-w-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",{variants:{variant:{neutral:"bg-neutral-500/[.15] text-neutral-600",new:"bg-blue-500/[.15] text-blue-600",success:"bg-green-500/[.15] text-green-600",pending:"bg-orange-500/[.15] text-orange-600",warning:"bg-yellow-500/[.15] text-yellow-600",error:"bg-red-500/[.15] text-red-600"}},defaultVariants:{variant:"neutral"}}),Hd={neutral:ua,new:da,success:ca,pending:ma,warning:Or,error:Or};function a4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:c,...l}){let i=r!==null?r??Hd[t??"neutral"]:null;return Vn(er,{tooltipProps:{content:o},children:Wd("span",{className:s(Vd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...l,children:[i&&Vn(i,{className:"h-3 w-3 shrink-0"}),c]})})}import*as wr from"@radix-ui/react-switch";import{useMemo as Fd}from"react";import{jsx as yr}from"react/jsx-runtime";function u4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:c,checked:l=!0,loading:i=!1,disabled:m=!1,disabledTooltip:d}){let n=Fd(()=>d?!0:m||i,[d,m,i]),u=yr(wr.Root,{checked:i?!1:l,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,className:s("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:yr(wr.Thumb,{className:s(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a),children:c})});return d?yr(J,{content:d,children:yr("div",{className:"inline-block leading-none",children:u})}):u}import{flexRender as uo,getCoreRowModel as Bd,useReactTable as $d}from"@tanstack/react-table";import{AnimatePresence as Ud,motion as Gd}from"framer-motion";import{memo as Kd,useEffect as Nr,useMemo as jd,useState as Hn}from"react";import{jsx as W,jsxs as pe}from"react/jsx-runtime";var po=(e,t)=>s(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75"]),Zd=s(["absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","bg-neutral-300/50","opacity-0 group-hover/resize:opacity-100 hover:opacity-100","group-hover/resize:bg-neutral-300 hover:bg-neutral-400","transition-all duration-200","-mr-px","after:absolute after:right-0 after:top-0 after:h-full after:w-4 after:translate-x-1/2"]);function z4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:c,pagination:l,onPaginationChange:i,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[u,p]=Hn(e.columnVisibility??{}),[v,b]=Hn(e.selectedRows??{});Nr(()=>{e.selectedRows&&!Ar(e.selectedRows,v)&&b(e.selectedRows??{})},[e.selectedRows]),Nr(()=>{var g;(g=e.onRowSelectionChange)==null||g.call(e,h.getSelectedRowModel().rows)},[v]),Nr(()=>{e.columnVisibility&&!Ar(e.columnVisibility,u)&&p(e.columnVisibility??{})},[e.columnVisibility]),Nr(()=>{var g;(g=e.onColumnVisibilityChange)==null||g.call(e,u)},[u]);let h=$d({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:Bd(),onPaginationChange:i,onColumnVisibilityChange:g=>p(g),onRowSelectionChange:b,state:{pagination:l,columnVisibility:u,columnPinning:{left:[],right:[],...c},rowSelection:v},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:u,table:h,enableColumnResizing:d}}var Yd=Kd(function({row:t,onRowClick:r,cellRight:o,tdClassName:a,table:c}){return W("tr",{className:s("group/row",r&&"cursor-pointer select-none",c.getRowModel().rows.length>8&&t.index===c.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:r?l=>{Nt(l)||r(t,l)}:void 0,children:t.getVisibleCells().map(l=>W("td",{className:s(po(l.column.id,!!r),"text-content-default group",fo(l.column,t.index===c.getRowModel().rows.length-1),typeof a=="function"?a(l.column.id):a),style:{width:l.column.getSize(),...go(l.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[W("div",{className:"min-w-0 shrink grow truncate",children:uo(l.column.columnDef.cell,l.getContext())}),o==null?void 0:o(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function _4({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:c,sortBy:l,sortOrder:i,onSortChange:m,sortableColumns:d=[],className:n,containerClassName:u,scrollWrapperClassName:p,thClassName:v,tdClassName:b,table:h,pagination:g,resourceName:N,onRowClick:k,rowCount:S,children:C,enableColumnResizing:w=!1}){let $=jd(()=>w?h.getVisibleLeafColumns().reduce((R,x)=>R+x.getSize(),0):"100%",[w,h.getVisibleLeafColumns()]);return pe("div",{className:s("border-border-subtle bg-bg-default relative rounded-xl border",u),children:[!o&&!!(t!=null&&t.length)||r?pe("div",{className:s("relative min-h-[400px] overflow-x-auto rounded-[inherit]",p),children:[pe("table",{className:s(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent","[&_th]:relative [&_th]:select-none",w&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:w?"fixed":"auto",minWidth:$},children:[W("thead",{children:h.getHeaderGroups().map(R=>W("tr",{children:R.headers.map(x=>{let T=d.includes(x.column.id),H=T?"button":"div";return pe("th",{colSpan:x.colSpan,className:s(po(x.id),"text-content-emphasis select-none font-medium",fo(x.column,!h.getRowModel().rows.length),typeof v=="function"?v(x.column.id):v,w&&"relative"),style:{width:x.getSize(),...go(x.column)},children:[W("div",{className:"flex items-center justify-between gap-6 !pr-0",children:pe(H,{className:"flex items-center gap-2",...T&&{type:"button",disabled:!T,"aria-label":"Sort by column",onClick:()=>m==null?void 0:m({sortBy:x.column.id,sortOrder:l!==x.column.id||i==="asc"?"desc":"asc"})},children:[x.isPlaceholder?null:uo(x.column.columnDef.header,x.getContext()),T&&l===x.column.id&&W(Ko,{className:"h-3 w-3 shrink-0",order:i||"desc"})]})}),w&&x.column.getCanResize()&&x.column.id!=="menu"&&W("div",{onMouseDown:x.getResizeHandler(),onTouchStart:x.getResizeHandler(),onClick:P=>P.stopPropagation(),className:Zd})]},x.id)})},R.id))}),W("tbody",{children:h.getRowModel().rows.map(R=>w?W(Yd,{row:R,onRowClick:k,cellRight:c,tdClassName:b,table:h},`${R.id}-${h.getVisibleLeafColumns().map(x=>x.id).join(",")}`):W("tr",{className:s("group/row",k&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&R.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:k?x=>{Nt(x)||k(R,x)}:void 0,children:R.getVisibleCells().map(x=>W("td",{className:s(po(x.column.id,!!k),"text-content-default group",fo(x.column,R.index===h.getRowModel().rows.length-1),typeof b=="function"?b(x.column.id):b),style:{minWidth:x.column.columnDef.minSize,maxWidth:x.column.columnDef.maxSize,width:x.column.columnDef.size||"auto",...go(x.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[W("div",{className:"min-w-0 shrink grow truncate",children:uo(x.column.columnDef.cell,x.getContext())}),c==null?void 0:c(x)]})},x.id))},R.id))})]}),C]}):W("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(N==null?void 0:N(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!S&&pe("div",{className:"border-border-subtle bg-bg-default text-content-default sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t px-4 py-3.5 text-sm leading-6",children:[pe("div",{children:[W("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",pe("span",{className:"font-medium",children:[(g.pageIndex-1)*g.pageSize+1,"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,h.getRowCount())]})," ","of"," ",W("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(N==null?void 0:N(h.getRowCount()!==1))||"items"]}),pe("div",{className:"flex items-center gap-2",children:[W(se,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:g.pageIndex===1}),W(se,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:g.pageIndex===h.getPageCount()})]})]}),W(Ud,{children:r&&W(Gd.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:W("div",{className:"flex h-[75vh] w-full items-center justify-center",children:W(Ce,{})})})})]})}var fo=(e,t)=>{let r=e.getIsPinned();return s(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},go=e=>{let t=e.getIsPinned();return{left:t==="left"?`${e.getStart("left")}px`:void 0,right:t==="right"?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative"}};import{LayoutGroup as qd,motion as Wn}from"framer-motion";import{useId as Xd}from"react";import{jsx as kr,jsxs as Jd}from"react/jsx-runtime";function B4({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:c,style:l}){let i=Xd();return kr(qd,{id:i,children:kr(Wn.div,{layout:!0,className:s("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:l,children:e.map(m=>Jd("button",{type:"button","data-selected":m.value===t,className:s("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"hover:text-content-subtle z-[11] transition-colors":m.value!==t},a),onClick:()=>r(m.value),children:[typeof m.label=="string"?kr("p",{children:m.label}):m.label,m.badge,m.value===t&&kr(Wn.div,{layoutId:i,className:s("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",c),transition:{duration:.25}})]},m.value))})})}import{useEffect as Qd,useId as em,useRef as tm,useState as rm}from"react";import{jsx as fe,jsxs as ho}from"react/jsx-runtime";var om=[{key:"utm_source",icon:wa,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ma,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:xa,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Ta,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:La,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:ya,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function q4({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:c}){let{isMobile:l}=j(),i=em(),[m,d]=rm(!1),n=tm(null);return Qd(()=>{n.current&&!l&&o&&setTimeout(()=>{var u;return(u=n.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:s("grid gap-y-3",c),children:om.map(({key:u,icon:p,label:v,placeholder:b,description:h},g)=>fe("div",{className:"group relative",children:ho("div",{className:"relative z-10 flex",children:[fe(J,{content:ho("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:h}),fe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:ho("div",{className:s("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",m?"sm:min-w-36":"sm:min-w-28"),onClick:()=>d(N=>!N),children:[fe(p,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${i}-${u}`,className:"select-none text-sm",children:m?fe("span",{className:"font-mono text-xs",children:u}):v})]})}),fe("div",{className:"min-w-0 grow",children:fe(er,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${i}-${u}`,ref:g===0?n:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[u]||"",onChange:N=>t(u,N.target.value)})})})]})},u))})}import{jsx as bo,jsxs as am}from"react/jsx-runtime";function J4(){return am("div",{style:Cr.backgroundMain,children:[bo("div",{style:Cr.backgroundMainBefore}),bo("div",{style:Cr.backgroundMainAfter}),bo("div",{style:Cr.backgroundContent})]})}var Cr={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
42
+ `,Id=60,Ed=1e3/Id;function Jx({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Td(null),[c,l]=Ld(!1);return Rd(()=>{let i=a.current;if(!i||!i.parentElement)return;let m=i.parentElement,d=window.devicePixelRatio||1;i.width=m.clientWidth*d,i.height=m.clientHeight*d;let n=i.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let u=n.createProgram();if(!u){console.error("Failed to create shader program");return}for(let z=0;z<2;++z){let R=z===0?Md:Dd,y=n.createShader(z===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!y){console.error("Failed to create shader");return}n.shaderSource(y,R),n.compileShader(y),n.getShaderParameter(y,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(y)),n.attachShader(u,y),n.linkProgram(u)}n.getProgramParameter(u,n.LINK_STATUS)||console.error(n.getProgramInfoLog(u));let p=n.getAttribLocation(u,"position"),v=n.getUniformLocation(u,"time"),b=n.getUniformLocation(u,"resolution"),h=n.getUniformLocation(u,"dotSize"),g=n.getUniformLocation(u,"cellSize"),w=n.getUniformLocation(u,"speed");n.useProgram(u);let N=[1,1,-1,1,1,-1,-1,-1],T=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,T),n.bufferData(n.ARRAY_BUFFER,new Float32Array(N),n.STATIC_DRAW),n.enableVertexAttribArray(p),n.vertexAttribPointer(p,2,n.FLOAT,!1,0,0),n.uniform1f(h,e*window.devicePixelRatio),n.uniform1f(g,t*window.devicePixelRatio),n.uniform1f(w,r);let C,P=0;function _(z){if(z-P<Ed){C=requestAnimationFrame(_);return}P=z,n&&i&&u&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(v,z/1e3),n.uniform2f(b,i.width,i.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),C=requestAnimationFrame(_)}return C=requestAnimationFrame(_),i.addEventListener("webglcontextlost",z=>{z.preventDefault(),l(!0),cancelAnimationFrame(C)}),()=>{cancelAnimationFrame(C),i.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),zn("div",{className:s("absolute inset-0",o,c&&"opacity-0"),children:zn("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{useEffect as Ad,useId as Od,useRef as zd}from"react";import{jsx as xr,jsxs as _n}from"react/jsx-runtime";function r4({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:c,autoFocus:l=!1}){let i=Od(),m=zd(null);return Ad(()=>{m.current&&l&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[l]),_n("div",{className:a,children:[r&&xr("div",{className:"flex items-center gap-2",children:xr("label",{htmlFor:`${i}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),_n("div",{className:"mt-2 flex w-full items-center justify-between rounded-md border border-neutral-300 bg-white shadow-sm transition-all focus-within:border-neutral-800 focus-within:outline-none focus-within:ring-1 focus-within:ring-neutral-500",children:[xr("input",{ref:m,id:`${i}-datetime`,type:"text",placeholder:o,defaultValue:e?xt(e):"",onBlur:d=>{if(d.target.value.length>0){let n=Er(d.target.value);n&&(t(n),d.target.value=xt(n))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let n=Er(m.current.value);n&&(t(n),m.current.value=xt(n))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),xr("input",{type:"datetime-local",id:`${i}-datetime-local`,required:c,value:e?Eo(e):"",onChange:d=>{let n=new Date(d.target.value);t(n),m.current&&(m.current.value=xt(n))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as _d}from"class-variance-authority";import{jsx as Hn,jsxs as Wd}from"react/jsx-runtime";var Hd=_d("flex gap-1.5 items-center max-w-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",{variants:{variant:{neutral:"bg-neutral-500/[.15] text-neutral-600",new:"bg-blue-500/[.15] text-blue-600",success:"bg-green-500/[.15] text-green-600",pending:"bg-orange-500/[.15] text-orange-600",warning:"bg-yellow-500/[.15] text-yellow-600",error:"bg-red-500/[.15] text-red-600"}},defaultVariants:{variant:"neutral"}}),Vd={neutral:ua,new:da,success:ca,pending:ma,warning:Or,error:Or};function c4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:c,...l}){let i=r!==null?r??Vd[t??"neutral"]:null;return Hn(er,{tooltipProps:{content:o},children:Wd("span",{className:s(Hd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...l,children:[i&&Hn(i,{className:"h-3 w-3 shrink-0"}),c]})})}import*as wr from"@radix-ui/react-switch";import{useMemo as Fd}from"react";import{jsx as yr}from"react/jsx-runtime";function b4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:c,checked:l=!0,loading:i=!1,disabled:m=!1,disabledTooltip:d}){let n=Fd(()=>d?!0:m||i,[d,m,i]),u=yr(wr.Root,{checked:i?!1:l,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,className:s("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:yr(wr.Thumb,{className:s(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a),children:c})});return d?yr(J,{content:d,children:yr("div",{className:"inline-block leading-none",children:u})}):u}import{flexRender as uo,getCoreRowModel as Bd,useReactTable as $d}from"@tanstack/react-table";import{AnimatePresence as Ud,motion as Gd}from"framer-motion";import{memo as Kd,useEffect as Nr,useMemo as jd,useState as Vn}from"react";import{jsx as F,jsxs as pe}from"react/jsx-runtime";var po=(e,t)=>s(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75"]),Zd=s(["absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","bg-neutral-300/50","opacity-0 group-hover/resize:opacity-100 hover:opacity-100","group-hover/resize:bg-neutral-300 hover:bg-neutral-400","transition-all duration-200","-mr-px","after:absolute after:right-0 after:top-0 after:h-full after:w-4 after:translate-x-1/2"]);function B4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:c,pagination:l,onPaginationChange:i,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[u,p]=Vn(e.columnVisibility??{}),[v,b]=Vn(e.selectedRows??{});Nr(()=>{e.selectedRows&&!Ar(e.selectedRows,v)&&b(e.selectedRows??{})},[e.selectedRows]),Nr(()=>{var g;(g=e.onRowSelectionChange)==null||g.call(e,h.getSelectedRowModel().rows)},[v]),Nr(()=>{e.columnVisibility&&!Ar(e.columnVisibility,u)&&p(e.columnVisibility??{})},[e.columnVisibility]),Nr(()=>{var g;(g=e.onColumnVisibilityChange)==null||g.call(e,u)},[u]);let h=$d({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:Bd(),onPaginationChange:i,onColumnVisibilityChange:g=>p(g),onRowSelectionChange:b,state:{pagination:l,columnVisibility:u,columnPinning:{left:[],right:[],...c},rowSelection:v},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:u,table:h,enableColumnResizing:d}}var Yd=Kd(function({row:t,onRowClick:r,rowProps:o,cellRight:a,tdClassName:c,table:l}){let{className:i,...m}=o||{};return F("tr",{className:s("group/row",r&&"cursor-pointer select-none",l.getRowModel().rows.length>8&&t.index===l.getRowModel().rows.length-1&&"[&_td]:border-b-0",i),onClick:r?d=>{wt(d)||r(t,d)}:void 0,...m,children:t.getVisibleCells().map(d=>F("td",{className:s(po(d.column.id,!!r),"text-content-default group",fo(d.column,t.index===l.getRowModel().rows.length-1),typeof c=="function"?c(d.column.id):c),style:{width:d.column.getSize(),...go(d.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:uo(d.column.columnDef.cell,d.getContext())}),a==null?void 0:a(d)]})},d.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function $4({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:c,sortBy:l,sortOrder:i,onSortChange:m,sortableColumns:d=[],className:n,containerClassName:u,scrollWrapperClassName:p,thClassName:v,tdClassName:b,table:h,pagination:g,resourceName:w,onRowClick:N,rowProps:T,rowCount:C,children:P,enableColumnResizing:_=!1}){let z=jd(()=>_?h.getVisibleLeafColumns().reduce((R,y)=>R+y.getSize(),0):"100%",[_,h.getVisibleLeafColumns()]);return pe("div",{className:s("border-border-subtle bg-bg-default relative rounded-xl border",u),children:[!o&&!!(t!=null&&t.length)||r?pe("div",{className:s("relative min-h-[400px] overflow-x-auto rounded-[inherit]",p),children:[pe("table",{className:s(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent","[&_th]:relative [&_th]:select-none",_&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:_?"fixed":"auto",minWidth:z},children:[F("thead",{children:h.getHeaderGroups().map(R=>F("tr",{children:R.headers.map(y=>{let A=d.includes(y.column.id),k=A?"button":"div";return pe("th",{colSpan:y.colSpan,className:s(po(y.id),"text-content-emphasis select-none font-medium",fo(y.column,!h.getRowModel().rows.length),typeof v=="function"?v(y.column.id):v,_&&"relative"),style:{width:y.getSize(),...go(y.column)},children:[F("div",{className:"flex items-center justify-between gap-6 !pr-0",children:pe(k,{className:"flex items-center gap-2",...A&&{type:"button",disabled:!A,"aria-label":"Sort by column",onClick:()=>m==null?void 0:m({sortBy:y.column.id,sortOrder:l!==y.column.id||i==="asc"?"desc":"asc"})},children:[y.isPlaceholder?null:uo(y.column.columnDef.header,y.getContext()),A&&l===y.column.id&&F(Ko,{className:"h-3 w-3 shrink-0",order:i||"desc"})]})}),_&&y.column.getCanResize()&&y.column.id!=="menu"&&F("div",{onMouseDown:y.getResizeHandler(),onTouchStart:y.getResizeHandler(),onClick:S=>S.stopPropagation(),className:Zd})]},y.id)})},R.id))}),F("tbody",{children:h.getRowModel().rows.map(R=>{let y=typeof T=="function"?T(R):T,{className:A,...k}=y||{};return _?F(Yd,{row:R,onRowClick:N,rowProps:y,cellRight:c,tdClassName:b,table:h},`${R.id}-${h.getVisibleLeafColumns().map(S=>S.id).join(",")}`):F("tr",{className:s("group/row",N&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&R.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0",A),onClick:N?S=>{wt(S)||N(R,S)}:void 0,...k,children:R.getVisibleCells().map(S=>F("td",{className:s(po(S.column.id,!!N),"text-content-default group",fo(S.column,R.index===h.getRowModel().rows.length-1),typeof b=="function"?b(S.column.id):b),style:{minWidth:S.column.columnDef.minSize,maxWidth:S.column.columnDef.maxSize,width:S.column.columnDef.size||"auto",...go(S.column)},children:pe("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[F("div",{className:"min-w-0 shrink grow truncate",children:uo(S.column.columnDef.cell,S.getContext())}),c==null?void 0:c(S)]})},S.id))},R.id)})})]}),P]}):F("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(w==null?void 0:w(!0))||"items"} found.`}),g&&!o&&!!(t!=null&&t.length)&&!!C&&pe("div",{className:"border-border-subtle bg-bg-default text-content-default sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t px-4 py-3.5 text-sm leading-6",children:[pe("div",{children:[F("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",pe("span",{className:"font-medium",children:[((g.pageIndex-1)*g.pageSize+1).toLocaleString(),"-",Math.min((g.pageIndex-1)*g.pageSize+g.pageSize,h.getRowCount()).toLocaleString()]})," ","of"," ",F("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(w==null?void 0:w(h.getRowCount()!==1))||"items"]}),pe("div",{className:"flex items-center gap-2",children:[F(se,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:g.pageIndex===1}),F(se,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:g.pageIndex===h.getPageCount()})]})]}),F(Ud,{children:r&&F(Gd.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:F("div",{className:"flex h-[75vh] w-full items-center justify-center",children:F(Ce,{})})})})]})}var fo=(e,t)=>{let r=e.getIsPinned();return s(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},go=e=>{let t=e.getIsPinned();return{left:t==="left"?`${e.getStart("left")}px`:void 0,right:t==="right"?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative"}};import{LayoutGroup as qd,motion as Wn}from"framer-motion";import{useId as Xd}from"react";import{jsx as kr,jsxs as Jd}from"react/jsx-runtime";function Z4({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:c,style:l}){let i=Xd();return kr(qd,{id:i,children:kr(Wn.div,{layout:!0,className:s("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:l,children:e.map(m=>Jd("button",{type:"button","data-selected":m.value===t,className:s("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"hover:text-content-subtle z-[11] transition-colors":m.value!==t},a),onClick:()=>r(m.value),children:[typeof m.label=="string"?kr("p",{children:m.label}):m.label,m.badge,m.value===t&&kr(Wn.div,{layoutId:i,className:s("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",c),transition:{duration:.25}})]},m.value))})})}import{useEffect as Qd,useId as em,useRef as tm,useState as rm}from"react";import{jsx as fe,jsxs as ho}from"react/jsx-runtime";var om=[{key:"utm_source",icon:wa,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ma,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:xa,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Ta,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:La,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:ya,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function r3({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:c}){let{isMobile:l}=j(),i=em(),[m,d]=rm(!1),n=tm(null);return Qd(()=>{n.current&&!l&&o&&setTimeout(()=>{var u;return(u=n.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:s("grid gap-y-3",c),children:om.map(({key:u,icon:p,label:v,placeholder:b,description:h},g)=>fe("div",{className:"group relative",children:ho("div",{className:"relative z-10 flex",children:[fe(J,{content:ho("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:h}),fe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:ho("div",{className:s("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",m?"sm:min-w-36":"sm:min-w-28"),onClick:()=>d(w=>!w),children:[fe(p,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${i}-${u}`,className:"select-none text-sm",children:m?fe("span",{className:"font-mono text-xs",children:u}):v})]})}),fe("div",{className:"min-w-0 grow",children:fe(er,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${i}-${u}`,ref:g===0?n:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[u]||"",onChange:w=>t(u,w.target.value)})})})]})},u))})}import{jsx as bo,jsxs as am}from"react/jsx-runtime";function a3(){return am("div",{style:Cr.backgroundMain,children:[bo("div",{style:Cr.backgroundMainBefore}),bo("div",{style:Cr.backgroundMainAfter}),bo("div",{style:Cr.backgroundContent})]})}var Cr={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
43
43
  radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
44
44
  radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
45
45
  radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
46
46
  radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
47
47
  radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
48
- radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import Km from"next/image";import We from"next/link";import{useParams as jm}from"next/navigation";import{jsx as Fn}from"react/jsx-runtime";function Bn(e){return Fn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Fn("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}var Pr=[{title:"Dub Links",description:"Short links with superpowers",icon:rt,href:"/home"},{title:"Dub Partners",description:"Grow your revenue with partnerships",icon:ot,href:"/partners"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:tt,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Ft,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ia,href:"/integrations"}],a3=[{icon:qo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Yo,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Bn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],vo=[{icon:ta,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:Qo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:Xo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ea,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:Jo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],$n=[{icon:Kt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:jt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Yt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:vo}],Sr=[{icon:oa,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:ka,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:Ca,title:"About",description:"Company, values, and team",href:"/about"},{icon:va,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:aa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Pa,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],Un=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Gn=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],n3=[{name:"X (Twitter)",icon:Ut,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:$t,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Bt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Gt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as nm}from"react/jsx-runtime";function Rr({className:e,children:t}){return nm("div",{className:s("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as He from"@radix-ui/react-popover";import{BoxSelect as Om,Home as zm,LayoutGrid as _m,Type as Vm}from"lucide-react";import{useParams as Hm}from"next/navigation";import{useCallback as Wm,useContext as Fm,useState as Bm}from"react";import{toast as $m}from"sonner";import{jsx as Kn}from"react/jsx-runtime";function xo({className:e}){return Kn("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-10 w-10 text-black dark:text-white",e),children:Kn("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 64C49.6731 64 64 49.6731 64 32C64 20.1555 57.5648 9.81398 48 4.28103V31.9999V47.9999H40V45.8594C37.6466 47.2208 34.9143 47.9999 32 47.9999C23.1634 47.9999 16 40.8365 16 31.9999C16 23.1634 23.1634 15.9999 32 15.9999C34.9143 15.9999 37.6466 16.7791 40 18.1404V1.00814C37.443 0.350024 34.7624 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"currentColor"})})}import*as me from"@radix-ui/react-navigation-menu";import{LayoutGroup as xm}from"framer-motion";import _t from"next/link";import{useParams as ym,usePathname as wm}from"next/navigation";import{createContext as Nm,useId as km}from"react";import Cm from"swr";import{Link as ti}from"@radix-ui/react-navigation-menu";import ri from"next/image";import oi from"next/link";import{Link2 as im}from"lucide-react";import{jsx as Z,jsxs as q}from"react/jsx-runtime";var jn={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},qe={name:"Danielle Wilson",email:"danielle@dub.co",avatarIndex:8,origin:"dub.sh",country:"US",details:{"Lifetime value":"$12.5k",Account:"Pro",Subscription:"2y 10m"}};function Zn({className:e}){return q("div",{className:s("pointer-events-none relative size-full",e),children:[q("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 339 168",className:"h-auto w-full [mask-image:linear-gradient(90deg,transparent,black_10%,black_90%,transparent)]",children:[Z("path",{stroke:"#00BBA7",strokeWidth:"2",d:"m345 1-60.533 76.487a8 8 0 0 1-9.732 2.25l-25.53-12.241a8 8 0 0 0-9.214 1.657l-62.736 64.993a8 8 0 0 1-6.695 2.388L67.303 124.331a8 8 0 0 0-5.193 1.17L-3.166 166.5"}),Z("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),Z("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),q("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[q("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[q("div",{className:"p-1.5",children:[q("div",{className:"bg-bg-subtle border-border-subtle text-content-default hidden items-center gap-2 rounded border p-2 text-xs font-medium leading-none sm:flex",children:[Z(im,{className:"size-3 rotate-90"}),"d.to/try"]}),Z("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),Z("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>q("div",{className:"flex items-center justify-between gap-2",children:[q("div",{className:"flex items-center gap-2",children:[Z("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:jn[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Wt(t)})]}),q("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",jn[t].value]})]},t))})]}),Z("div",{className:"relative",children:q("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[q("div",{className:"px-3 py-2.5",children:[q("div",{className:"flex justify-between gap-2",children:[Z("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:qe.avatarIndex*100+"%"}}),q("div",{className:"flex flex-col items-end gap-1",children:[q("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z(fa,{className:"text-content-default size-3.5"}),qe.origin]}),q("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z("img",{src:`https://flag.vercel.app/m/${qe.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),qe.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:qe.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:qe.email})]}),Z("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(qe.details).map(([t,r])=>q("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[Z("span",{className:"text-content-muted truncate font-medium",children:t}),Z("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as sm}from"react";import{jsx as f,jsxs as de}from"react/jsx-runtime";function Yn(e){let t=sm();return de("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"300",height:"180",fill:"none",viewBox:"0 0 300 180",...e,className:s("pointer-events-none text-[var(--fg)] [--bg:white] [--border:#e5e5e5] [--fg:#171717] [--muted:#404040] dark:[--bg:black] dark:[--border:#fff3] dark:[--fg:#fffa] dark:[--muted:#fff7]",e.className),children:[de("defs",{children:[f("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),f("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),f("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),f("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),f("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 23c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[f("path",{d:"M84.47 26.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M82.05 24a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.14-1.13h3.98c.48 0 .89.29 1.05.7"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M106.87 23.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[f("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),f("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),f("path",{className:"fill-[var(--bg)]",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:f("path",{d:"m209.95 29.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),f("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),f("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 83c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[f("path",{d:"M126.47 86.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M124.05 84a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.13-1.13h3.99c.48 0 .89.29 1.05.7"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M148.87 83.66h-1.28a.85.85 0 0 0-.86.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[f("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),f("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),f("path",{className:"fill-[var(--bg)]",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:f("path",{d:"m215.95 89.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),f("path",{className:"fill-[var(--bg)]",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 143c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[f("path",{d:"M102.47 146.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M100.05 144a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.14 1.13-1.14h3.99c.48 0 .89.3 1.06.72"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M124.87 143.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[f("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),f("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),f("path",{className:"fill-[var(--bg)]",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:f("path",{d:"m212.95 149.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.17.17 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),de("defs",{children:[f("clipPath",{id:`${t}-b`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),f("clipPath",{id:`${t}-c`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),f("clipPath",{id:`${t}-d`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),f("clipPath",{id:`${t}-f`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),f("clipPath",{id:`${t}-g`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),f("clipPath",{id:`${t}-h`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),f("clipPath",{id:`${t}-j`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),f("clipPath",{id:`${t}-k`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),f("clipPath",{id:`${t}-l`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),de("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as cm,jsx as Me,jsxs as Ot}from"react/jsx-runtime";var lm=[{name:"Lauren Anderson",country:"US",revenue:1800,payouts:550},{name:"Mia Taylor",country:"US",revenue:22600,payouts:6800},{name:"Sophie Laurent",country:"CA",revenue:11e3,payouts:3300},{name:"Hiroshi Tanaka",country:"JP",revenue:19200,payouts:5700},{name:"Elias Weber",country:"DE",revenue:783,payouts:235},{name:"Liam Carter",country:"US",revenue:3e4,payouts:9200}];function qn({className:e}){return Me("div",{className:s("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Me("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:lm.map((t,r)=>Me("div",{className:"h-[60px] w-[180px] p-[3px]",children:Me("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Ot(cm,{children:[Me("div",{className:"bg-bg-emphasis aspect-square h-full",style:{backgroundImage:"url(https://assets.dub.co/partners/partner-images.jpg)",backgroundSize:"1400%",backgroundPositionX:(14-r%14)*100+"%"}},r),Ot("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Ot("div",{className:"flex items-center gap-1.5",children:[Me("img",{alt:"US Flag",src:`https://flag.vercel.app/m/${t.country}.svg`,className:"h-2.5 w-3 rounded-sm border-[0.5px] border-black/15"}),Me("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Me("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Ot("div",{className:s("flex flex-col",a===0?"pr-4":"pl-4"),children:[Me("span",{className:"text-content-muted text-[6px] font-medium",children:Wt(o)}),Ot("span",{className:"text-content-default text-[9px] font-medium",children:["$",et(t[o])]})]},o))})]})]})})},r))})})}import{Link as Xn}from"@radix-ui/react-navigation-menu";import Jn from"next/link";import{jsx as we,jsxs as Tr}from"react/jsx-runtime";var yo="text-xs uppercase text-neutral-500 dark:text-white/60",dm="group rounded-[8px] p-2 transition-colors hover:bg-neutral-50 active:bg-neutral-100 dark:hover:bg-white/[0.15] dark:active:bg-white/20",Ne=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Qn({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:c,...l}){return we(Xn,{asChild:!0,children:we(Jn,{className:s(dm,a),...l,children:Tr("div",{className:"flex items-center justify-between gap-3",children:[e,Tr("div",{className:"flex-1",children:[we("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&we("p",{className:s("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),c&&we($o,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function ei({icon:e,title:t,description:r,iconClassName:o,...a}){return we(Xn,{asChild:!0,children:we(Jn,{...a,className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:Tr("div",{className:"flex items-center justify-between px-5 py-4",children:[Tr("div",{children:[we("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),we("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),we(e,{className:s("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as O,jsxs as zt}from"react/jsx-runtime";var mm=[{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:O(rt,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/home",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:O(Yn,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:O(tt,{className:"size-2.5 text-green-900"})}),title:"Dub Analytics",description:"Powerful analytics delivered instantly.",href:"/analytics",color:"#36D78F",graphicsContainerClassName:"h-[170%] bottom-0 top-[unset]",graphic:O(Zn,{className:"absolute bottom-0 left-0 size-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:O(ot,{className:"size-2.5 text-violet-900"})}),title:"Dub Partners",description:"Grow your revenue on auto-pilot with partnerships.",href:"/partners",color:"#818cf8",graphicsContainerClassName:"pl-2",graphic:O(qn,{})}],um=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:O("div",{className:"absolute -right-4 top-1/2 h-[180px] w-[240px] -translate-y-1/2 [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-80",children:O(ri,{src:"https://assets.dub.co/misc/integrations-grid.png",alt:"",fill:!0})})},{title:"Dub API",description:"Unlock further capabilities",href:"/docs/api-reference/introduction",graphic:O("div",{className:"absolute -right-4 top-2.5 h-[180px] w-[240px] [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-60",children:O(ri,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function ai({domain:e}){return zt("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[O("div",{className:"grid grid-cols-3 gap-4",children:mm.map(({title:t,description:r,icon:o,href:a,color:c,graphicsContainerClassName:l,graphic:i})=>O(ti,{asChild:!0,children:zt(oi,{href:_(a,e,Ne({domain:e,utm_content:t})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[O(Et,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),zt("div",{className:"relative p-5 pb-0",children:[o,O("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),O("div",{className:"relative mt-10 h-40 grow",children:O("div",{className:s("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",l),children:O("div",{className:"relative size-full",children:i})})}),O("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,var(--color),transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-15",style:{"--color":c}})]})},t))}),O("div",{className:"grid grow grid-cols-2 gap-4",children:um.map(({title:t,description:r,href:o,graphic:a})=>O(ti,{asChild:!0,children:zt(oi,{href:_(o,e,Ne({domain:e,utm_content:t})),className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:[O(Et,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),O("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),O("div",{className:"relative flex items-center justify-between px-5 py-4",children:zt("div",{children:[O("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as ii}from"@radix-ui/react-navigation-menu";import fm from"next/image";import si from"next/link";import{useId as pm}from"react";import{jsx as y,jsxs as pt}from"react/jsx-runtime";function ni({className:e,...t}){let r=pm();return pt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:s("",e),...t,children:[y("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),pt("g",{opacity:"0.5",children:[y("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:y("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),y("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:y("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),y("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:y("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),y("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),y("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),y("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),pt("defs",{children:[pt("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[y("stop",{stopColor:"#fff",stopOpacity:"0"}),y("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),pt("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[y("stop",{stopColor:"#5B5B5B"}),y("stop",{offset:"1",stopColor:"#757575"})]}),pt("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[y("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),y("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),y("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),y("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),y("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),y("feOffset",{dx:"-0.991",dy:"0.991"}),y("feGaussianBlur",{stdDeviation:"0.496"}),y("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),y("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),y("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),y("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),y("feOffset",{dx:"0.991",dy:"-0.991"}),y("feGaussianBlur",{stdDeviation:"0.496"}),y("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),y("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),y("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),y("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as ee,jsxs as Xe}from"react/jsx-runtime";var gm=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function li({domain:e}){return Xe("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.45fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ee("div",{className:"grid grid-cols-2 gap-4 p-4",children:gm.map(({title:t,description:r,thumbnail:o,href:a})=>ee(ii,{asChild:!0,children:Xe(si,{href:_(a,e,Ne({domain:e,utm_content:t})),className:s("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[Xe("div",{className:"p-5 pb-0",children:[ee("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),ee("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),ee("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:ee("div",{className:s("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:ee(fm,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)},t))}),Xe("div",{className:"flex flex-col gap-4 p-4",children:[Sr.filter(({title:t})=>!["Docs","Help Center","Dub Brand"].includes(t)).map(({title:t,description:r,icon:o,href:a})=>ee(ei,{title:t,description:r,icon:o,iconClassName:"size-5",href:_(a,e,Ne({domain:e,utm_content:t}))},t)),ee(ii,{asChild:!0,children:Xe(si,{href:_("/brand",e,Ne({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[Xe("div",{className:"pointer-events-none absolute inset-0",children:[ee("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:ee("div",{className:s("absolute inset-0 rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),ee(ni,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),ee("div",{className:"relative flex items-center justify-between px-5 py-4",children:Xe("div",{children:[ee("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),ee("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})]})]})}import{Link as hm}from"@radix-ui/react-navigation-menu";import bm from"next/link";import{jsx as te,jsxs as ft}from"react/jsx-runtime";var vm=[{icon:Kt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:jt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Yt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function ci({domain:e}){return ft("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ft("div",{className:"flex h-full flex-col p-4",children:[te("p",{className:s(yo,"mb-4 ml-2"),children:"Use case"}),te("div",{className:"grid grow grid-cols-3 gap-4",children:vm.map(({icon:t,title:r,description:o,href:a})=>te(hm,{asChild:!0,children:ft(bm,{href:_(a,e,Ne({domain:e,utm_content:r})),className:s("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[ft("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[te("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:te(Et,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),te("div",{className:s("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),te(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),ft("div",{className:"relative",children:[te("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),te("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),ft("div",{className:"px-6 py-4",children:[te("p",{className:s(yo,"mb-2"),children:"SDKs"}),te("div",{className:"flex flex-col gap-0.5",children:vo.map(({icon:t,iconClassName:r,title:o,href:a})=>te(Qn,{className:"-mx-2",href:_(a,e,Ne({domain:e,utm_content:o})),icon:te("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:te(t,{className:s("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Rm,jsx as F,jsxs as gt}from"react/jsx-runtime";var wo=Nm({theme:"light"}),No=[{name:"Product",content:ai,childItems:Pr,segments:["/home","/partners","/analytics","/features","/compare","/integrations"]},{name:"Solutions",content:ci,childItems:$n,segments:["/solutions","/sdks"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Resources",content:li,childItems:Sr,segments:["/docs","/help","/brand","/blog","/changelog"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],di=s("relative group/item flex items-center rounded-md px-4 py-2 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-colors","dark:text-white/90 dark:hover:text-white","hover:bg-neutral-900/5 dark:hover:bg-white/10","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-has-[:hover]:data-[active=true]:[&:not(:hover)]:bg-transparent");function y6({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=ym();t&&(o=t);let a=km(),c=Xa(40),l=wm(),{data:i,isLoading:m}=Cm(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return F(wo.Provider,{value:{theme:e},children:F(xm,{id:a,children:gt("div",{className:s("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[F("div",{className:s("absolute inset-0 block border-b border-transparent transition-all",c&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),F(Rr,{className:s("relative",r),children:gt("div",{className:"flex h-14 items-center justify-between",children:[F("div",{className:"grow basis-0",children:F(_t,{className:"block w-fit py-2 pr-2",href:_("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:F(Lr,{})})}),gt(me.Root,{delayDuration:0,className:"relative hidden lg:block",children:[F(me.List,{className:"group relative z-0 flex",children:No.map(({name:d,href:n,segments:u,content:p})=>{let v=u.some(b=>l==null?void 0:l.startsWith(b));return gt(me.Item,{children:[F(Sm,{trigger:!!p,children:n!==void 0?F(_t,{id:`nav-${n}`,href:_(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:di,"data-active":v,children:d}):gt("button",{className:di,"data-active":v,children:[d,F(Pm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&F(me.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:F(p,{domain:o})})]},d)})}),F("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:F(me.Viewport,{className:s("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),F("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:i&&Object.keys(i).length>0?F(_t,{href:ke,className:s(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):m?null:gt(Rm,{children:[F(_t,{href:"https://app.dub.co/login",className:s(ie({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),F(_t,{href:"https://app.dub.co/register",className:s(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function Pm(e){return F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:F("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function Sm({trigger:e,children:t}){return e?F(me.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Tm,Menu as Lm,X as Mm}from"lucide-react";import ht from"next/link";import{useParams as Po}from"next/navigation";import{useEffect as Dm,useState as ui}from"react";import Im from"swr";import{Fragment as Am,jsx as L,jsxs as De}from"react/jsx-runtime";var ko={"Dub Links":L("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:L(rt,{className:"size-3 text-orange-900"})}),"Dub Partners":L("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:L(ot,{className:"size-3 text-violet-900"})}),"Dub Analytics":L("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:L(tt,{className:"size-3 text-green-900"})}),"Dub API":L("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:L(Ft,{className:"size-3 text-neutral-900"})})};function O6({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Po();t&&(r=t);let[o,a]=ui(!1);Dm(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:c,isLoading:l}=Im(r.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return De("div",{className:s("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[c&&Object.keys(c).length>0?L(Co,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):l?null:De("div",{className:"flex gap-2 max-[280px]:hidden",children:[L(Co,{variant:"secondary",href:`${ke}/login`,children:"Log in"}),L(Co,{href:`${ke}/register`,children:"Sign Up"})]}),L("button",{onClick:()=>a(!o),className:s("z-30 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?L(Mm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):L(Lm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),L("nav",{className:s("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:De("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[No.map(({name:i,href:m,childItems:d},n)=>L(Em,{name:i,href:m,childItems:d,setOpen:a},n)),c&&Object.keys(c).length>0?L("li",{className:"py-3 min-[281px]:hidden",children:L(ht,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):De(Am,{children:[L("li",{className:"py-3 min-[281px]:hidden",children:L(ht,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),L("li",{className:"py-3 min-[281px]:hidden",children:L(ht,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Em=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Po(),[c,l]=ui(!1);return r?L("li",{className:"py-3",children:De(Se,{height:!0,children:[De("button",{className:"flex w-full justify-between",onClick:()=>l(!c),children:[L("p",{className:"font-semibold",children:e}),L(Tm,{className:s("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",c&&"rotate-180")})]}),c&&L("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((i,m)=>"items"in i?De("div",{className:"grid grid-cols-1 gap-3",children:[L("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:i.label}),i.items.map((d,n)=>L(mi,{item:d,setOpen:o,size:"small"},n))]},m):L(mi,{item:i,setOpen:o},m))})]})}):t?L("li",{className:"py-3",children:L(ht,{href:_(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},mi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:c="normal"})=>{let{domain:l="dub.co"}=Po(),i=ko==null?void 0:ko[e];return De(ht,{href:_(r,l,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:l,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[L("div",{className:s("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",c==="small"&&"size-8"),children:i??L(o,{className:s("size-5 text-neutral-700 grayscale",c==="small"&&"size-4")})}),De("div",{children:[L("div",{className:"flex items-center gap-2",children:L("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&L("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Co({variant:e,className:t,...r}){return L(ht,{...r,className:s("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ie({variant:e}),t)})}import{jsx as pi}from"react/jsx-runtime";function fi({className:e}){return pi("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z",fill:"currentColor"})})}import{jsx as Y,jsxs as gi}from"react/jsx-runtime";var Um=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
48
+ radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import Km from"next/image";import We from"next/link";import{useParams as jm}from"next/navigation";import{jsx as Fn}from"react/jsx-runtime";function Bn(e){return Fn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Fn("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}var Pr=[{title:"Dub Links",description:"Short links with superpowers",icon:tt,href:"/home"},{title:"Dub Partners",description:"Grow your revenue with partnerships",icon:rt,href:"/partners"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:et,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Ft,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ia,href:"/integrations"}],d3=[{icon:qo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Yo,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Bn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],vo=[{icon:ta,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:Qo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:Xo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ea,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:Jo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],$n=[{icon:Kt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:jt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Yt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:vo}],Sr=[{icon:oa,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:ka,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:Ca,title:"About",description:"Company, values, and team",href:"/about"},{icon:va,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:aa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Pa,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],Un=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Gn=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],m3=[{name:"X (Twitter)",icon:Ut,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:$t,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Bt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Gt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as nm}from"react/jsx-runtime";function Rr({className:e,children:t}){return nm("div",{className:s("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Ve from"@radix-ui/react-popover";import{BoxSelect as Om,Home as zm,LayoutGrid as _m,Type as Hm}from"lucide-react";import{useParams as Vm}from"next/navigation";import{useCallback as Wm,useContext as Fm,useState as Bm}from"react";import{toast as $m}from"sonner";import{jsx as Kn}from"react/jsx-runtime";function xo({className:e}){return Kn("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-10 w-10 text-black dark:text-white",e),children:Kn("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 64C49.6731 64 64 49.6731 64 32C64 20.1555 57.5648 9.81398 48 4.28103V31.9999V47.9999H40V45.8594C37.6466 47.2208 34.9143 47.9999 32 47.9999C23.1634 47.9999 16 40.8365 16 31.9999C16 23.1634 23.1634 15.9999 32 15.9999C34.9143 15.9999 37.6466 16.7791 40 18.1404V1.00814C37.443 0.350024 34.7624 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"currentColor"})})}import*as me from"@radix-ui/react-navigation-menu";import{LayoutGroup as xm}from"framer-motion";import zt from"next/link";import{useParams as ym,usePathname as wm}from"next/navigation";import{createContext as Nm,useId as km}from"react";import Cm from"swr";import{Link as ti}from"@radix-ui/react-navigation-menu";import ri from"next/image";import oi from"next/link";import{Link2 as im}from"lucide-react";import{jsx as Z,jsxs as q}from"react/jsx-runtime";var jn={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},qe={name:"Danielle Wilson",email:"danielle@dub.co",avatarIndex:8,origin:"dub.sh",country:"US",details:{"Lifetime value":"$12.5k",Account:"Pro",Subscription:"2y 10m"}};function Zn({className:e}){return q("div",{className:s("pointer-events-none relative size-full",e),children:[q("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 339 168",className:"h-auto w-full [mask-image:linear-gradient(90deg,transparent,black_10%,black_90%,transparent)]",children:[Z("path",{stroke:"#00BBA7",strokeWidth:"2",d:"m345 1-60.533 76.487a8 8 0 0 1-9.732 2.25l-25.53-12.241a8 8 0 0 0-9.214 1.657l-62.736 64.993a8 8 0 0 1-6.695 2.388L67.303 124.331a8 8 0 0 0-5.193 1.17L-3.166 166.5"}),Z("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),Z("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),q("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[q("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[q("div",{className:"p-1.5",children:[q("div",{className:"bg-bg-subtle border-border-subtle text-content-default hidden items-center gap-2 rounded border p-2 text-xs font-medium leading-none sm:flex",children:[Z(im,{className:"size-3 rotate-90"}),"d.to/try"]}),Z("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),Z("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>q("div",{className:"flex items-center justify-between gap-2",children:[q("div",{className:"flex items-center gap-2",children:[Z("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:jn[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Vt(t)})]}),q("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",jn[t].value]})]},t))})]}),Z("div",{className:"relative",children:q("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[q("div",{className:"px-3 py-2.5",children:[q("div",{className:"flex justify-between gap-2",children:[Z("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:qe.avatarIndex*100+"%"}}),q("div",{className:"flex flex-col items-end gap-1",children:[q("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z(fa,{className:"text-content-default size-3.5"}),qe.origin]}),q("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z("img",{src:`https://flag.vercel.app/m/${qe.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),qe.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:qe.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:qe.email})]}),Z("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(qe.details).map(([t,r])=>q("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[Z("span",{className:"text-content-muted truncate font-medium",children:t}),Z("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as sm}from"react";import{jsx as f,jsxs as de}from"react/jsx-runtime";function Yn(e){let t=sm();return de("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"300",height:"180",fill:"none",viewBox:"0 0 300 180",...e,className:s("pointer-events-none text-[var(--fg)] [--bg:white] [--border:#e5e5e5] [--fg:#171717] [--muted:#404040] dark:[--bg:black] dark:[--border:#fff3] dark:[--fg:#fffa] dark:[--muted:#fff7]",e.className),children:[de("defs",{children:[f("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),f("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),f("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),f("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),f("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 23c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[f("path",{d:"M84.47 26.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M82.05 24a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.14-1.13h3.98c.48 0 .89.29 1.05.7"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M106.87 23.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[f("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),f("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),f("path",{className:"fill-[var(--bg)]",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:f("path",{d:"m209.95 29.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),f("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),f("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 83c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[f("path",{d:"M126.47 86.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M124.05 84a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.13-1.13h3.99c.48 0 .89.29 1.05.7"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M148.87 83.66h-1.28a.85.85 0 0 0-.86.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[f("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),f("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),f("path",{className:"fill-[var(--bg)]",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:f("path",{d:"m215.95 89.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),f("path",{className:"fill-[var(--bg)]",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),f("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),f("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),f("path",{className:"fill-[var(--fg)]",d:"M29.61 143c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),f("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:f("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[f("path",{d:"M102.47 146.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),f("path",{d:"M100.05 144a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.14 1.13-1.14h3.99c.48 0 .89.3 1.06.72"})]}),f("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M124.87 143.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[f("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),f("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),f("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),f("path",{className:"fill-[var(--bg)]",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),f("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:f("path",{d:"m212.95 149.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.17.17 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),f("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:f("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),de("defs",{children:[f("clipPath",{id:`${t}-b`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),f("clipPath",{id:`${t}-c`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),f("clipPath",{id:`${t}-d`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),f("clipPath",{id:`${t}-f`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),f("clipPath",{id:`${t}-g`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),f("clipPath",{id:`${t}-h`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),f("clipPath",{id:`${t}-j`,children:f("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),f("clipPath",{id:`${t}-k`,children:f("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),f("clipPath",{id:`${t}-l`,children:f("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),de("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[f("stop",{stopColor:"#030712",stopOpacity:"0"}),f("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as cm,jsx as Me,jsxs as At}from"react/jsx-runtime";var lm=[{name:"Lauren Anderson",country:"US",revenue:1800,payouts:550},{name:"Mia Taylor",country:"US",revenue:22600,payouts:6800},{name:"Sophie Laurent",country:"CA",revenue:11e3,payouts:3300},{name:"Hiroshi Tanaka",country:"JP",revenue:19200,payouts:5700},{name:"Elias Weber",country:"DE",revenue:783,payouts:235},{name:"Liam Carter",country:"US",revenue:3e4,payouts:9200}];function qn({className:e}){return Me("div",{className:s("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Me("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:lm.map((t,r)=>Me("div",{className:"h-[60px] w-[180px] p-[3px]",children:Me("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&At(cm,{children:[Me("div",{className:"bg-bg-emphasis aspect-square h-full",style:{backgroundImage:"url(https://assets.dub.co/partners/partner-images.jpg)",backgroundSize:"1400%",backgroundPositionX:(14-r%14)*100+"%"}},r),At("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[At("div",{className:"flex items-center gap-1.5",children:[Me("img",{alt:"US Flag",src:`https://flag.vercel.app/m/${t.country}.svg`,className:"h-2.5 w-3 rounded-sm border-[0.5px] border-black/15"}),Me("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Me("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>At("div",{className:s("flex flex-col",a===0?"pr-4":"pl-4"),children:[Me("span",{className:"text-content-muted text-[6px] font-medium",children:Vt(o)}),At("span",{className:"text-content-default text-[9px] font-medium",children:["$",Wt(t[o])]})]},o))})]})]})})},r))})})}import{Link as Xn}from"@radix-ui/react-navigation-menu";import Jn from"next/link";import{jsx as we,jsxs as Tr}from"react/jsx-runtime";var yo="text-xs uppercase text-neutral-500 dark:text-white/60",dm="group rounded-[8px] p-2 transition-colors hover:bg-neutral-50 active:bg-neutral-100 dark:hover:bg-white/[0.15] dark:active:bg-white/20",Ne=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Qn({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:c,...l}){return we(Xn,{asChild:!0,children:we(Jn,{className:s(dm,a),...l,children:Tr("div",{className:"flex items-center justify-between gap-3",children:[e,Tr("div",{className:"flex-1",children:[we("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&we("p",{className:s("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),c&&we($o,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function ei({icon:e,title:t,description:r,iconClassName:o,...a}){return we(Xn,{asChild:!0,children:we(Jn,{...a,className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:Tr("div",{className:"flex items-center justify-between px-5 py-4",children:[Tr("div",{children:[we("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),we("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),we(e,{className:s("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as O,jsxs as Ot}from"react/jsx-runtime";var mm=[{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:O(tt,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/home",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:O(Yn,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:O(et,{className:"size-2.5 text-green-900"})}),title:"Dub Analytics",description:"Powerful analytics delivered instantly.",href:"/analytics",color:"#36D78F",graphicsContainerClassName:"h-[170%] bottom-0 top-[unset]",graphic:O(Zn,{className:"absolute bottom-0 left-0 size-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:O(rt,{className:"size-2.5 text-violet-900"})}),title:"Dub Partners",description:"Grow your revenue on auto-pilot with partnerships.",href:"/partners",color:"#818cf8",graphicsContainerClassName:"pl-2",graphic:O(qn,{})}],um=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:O("div",{className:"absolute -right-4 top-1/2 h-[180px] w-[240px] -translate-y-1/2 [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-80",children:O(ri,{src:"https://assets.dub.co/misc/integrations-grid.png",alt:"",fill:!0})})},{title:"Dub API",description:"Unlock further capabilities",href:"/docs/api-reference/introduction",graphic:O("div",{className:"absolute -right-4 top-2.5 h-[180px] w-[240px] [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-60",children:O(ri,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function ai({domain:e}){return Ot("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[O("div",{className:"grid grid-cols-3 gap-4",children:mm.map(({title:t,description:r,icon:o,href:a,color:c,graphicsContainerClassName:l,graphic:i})=>O(ti,{asChild:!0,children:Ot(oi,{href:V(a,e,Ne({domain:e,utm_content:t})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[O(It,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),Ot("div",{className:"relative p-5 pb-0",children:[o,O("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),O("div",{className:"relative mt-10 h-40 grow",children:O("div",{className:s("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",l),children:O("div",{className:"relative size-full",children:i})})}),O("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,var(--color),transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-15",style:{"--color":c}})]})},t))}),O("div",{className:"grid grow grid-cols-2 gap-4",children:um.map(({title:t,description:r,href:o,graphic:a})=>O(ti,{asChild:!0,children:Ot(oi,{href:V(o,e,Ne({domain:e,utm_content:t})),className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:[O(It,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),O("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),O("div",{className:"relative flex items-center justify-between px-5 py-4",children:Ot("div",{children:[O("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as ii}from"@radix-ui/react-navigation-menu";import fm from"next/image";import si from"next/link";import{useId as pm}from"react";import{jsx as x,jsxs as ut}from"react/jsx-runtime";function ni({className:e,...t}){let r=pm();return ut("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:s("",e),...t,children:[x("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),ut("g",{opacity:"0.5",children:[x("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:x("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),x("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:x("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),x("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:x("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),x("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),x("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),ut("defs",{children:[ut("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#fff",stopOpacity:"0"}),x("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),ut("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#5B5B5B"}),x("stop",{offset:"1",stopColor:"#757575"})]}),ut("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[x("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),x("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),x("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),x("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),x("feOffset",{dx:"-0.991",dy:"0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),x("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),x("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),x("feOffset",{dx:"0.991",dy:"-0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),x("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),x("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as ee,jsxs as Xe}from"react/jsx-runtime";var gm=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function li({domain:e}){return Xe("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.45fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ee("div",{className:"grid grid-cols-2 gap-4 p-4",children:gm.map(({title:t,description:r,thumbnail:o,href:a})=>ee(ii,{asChild:!0,children:Xe(si,{href:V(a,e,Ne({domain:e,utm_content:t})),className:s("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[Xe("div",{className:"p-5 pb-0",children:[ee("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),ee("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),ee("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:ee("div",{className:s("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:ee(fm,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)},t))}),Xe("div",{className:"flex flex-col gap-4 p-4",children:[Sr.filter(({title:t})=>!["Docs","Help Center","Dub Brand"].includes(t)).map(({title:t,description:r,icon:o,href:a})=>ee(ei,{title:t,description:r,icon:o,iconClassName:"size-5",href:V(a,e,Ne({domain:e,utm_content:t}))},t)),ee(ii,{asChild:!0,children:Xe(si,{href:V("/brand",e,Ne({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[Xe("div",{className:"pointer-events-none absolute inset-0",children:[ee("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:ee("div",{className:s("absolute inset-0 rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),ee(ni,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),ee("div",{className:"relative flex items-center justify-between px-5 py-4",children:Xe("div",{children:[ee("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),ee("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})]})]})}import{Link as hm}from"@radix-ui/react-navigation-menu";import bm from"next/link";import{jsx as te,jsxs as pt}from"react/jsx-runtime";var vm=[{icon:Kt,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:jt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Yt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function ci({domain:e}){return pt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[pt("div",{className:"flex h-full flex-col p-4",children:[te("p",{className:s(yo,"mb-4 ml-2"),children:"Use case"}),te("div",{className:"grid grow grid-cols-3 gap-4",children:vm.map(({icon:t,title:r,description:o,href:a})=>te(hm,{asChild:!0,children:pt(bm,{href:V(a,e,Ne({domain:e,utm_content:r})),className:s("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[pt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[te("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:te(It,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),te("div",{className:s("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),te(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),pt("div",{className:"relative",children:[te("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),te("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),pt("div",{className:"px-6 py-4",children:[te("p",{className:s(yo,"mb-2"),children:"SDKs"}),te("div",{className:"flex flex-col gap-0.5",children:vo.map(({icon:t,iconClassName:r,title:o,href:a})=>te(Qn,{className:"-mx-2",href:V(a,e,Ne({domain:e,utm_content:o})),icon:te("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:te(t,{className:s("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Rm,jsx as B,jsxs as ft}from"react/jsx-runtime";var wo=Nm({theme:"light"}),No=[{name:"Product",content:ai,childItems:Pr,segments:["/home","/partners","/analytics","/features","/compare","/integrations"]},{name:"Solutions",content:ci,childItems:$n,segments:["/solutions","/sdks"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Resources",content:li,childItems:Sr,segments:["/docs","/help","/brand","/blog","/changelog"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],di=s("relative group/item flex items-center rounded-md px-4 py-2 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-colors","dark:text-white/90 dark:hover:text-white","hover:bg-neutral-900/5 dark:hover:bg-white/10","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-has-[:hover]:data-[active=true]:[&:not(:hover)]:bg-transparent");function S6({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=ym();t&&(o=t);let a=km(),c=Xa(40),l=wm(),{data:i,isLoading:m}=Cm(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return B(wo.Provider,{value:{theme:e},children:B(xm,{id:a,children:ft("div",{className:s("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:s("absolute inset-0 block border-b border-transparent transition-all",c&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B(Rr,{className:s("relative",r),children:ft("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(zt,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B(Lr,{})})}),ft(me.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(me.List,{className:"group relative z-0 flex",children:No.map(({name:d,href:n,segments:u,content:p})=>{let v=u.some(b=>l==null?void 0:l.startsWith(b));return ft(me.Item,{children:[B(Sm,{trigger:!!p,children:n!==void 0?B(zt,{id:`nav-${n}`,href:V(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:di,"data-active":v,children:d}):ft("button",{className:di,"data-active":v,children:[d,B(Pm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&B(me.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:B(p,{domain:o})})]},d)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(me.Viewport,{className:s("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),B("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:i&&Object.keys(i).length>0?B(zt,{href:ke,className:s(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):m?null:ft(Rm,{children:[B(zt,{href:"https://app.dub.co/login",className:s(ie({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),B(zt,{href:"https://app.dub.co/register",className:s(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function Pm(e){return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:B("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function Sm({trigger:e,children:t}){return e?B(me.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Tm,Menu as Lm,X as Mm}from"lucide-react";import gt from"next/link";import{useParams as Po}from"next/navigation";import{useEffect as Dm,useState as ui}from"react";import Im from"swr";import{Fragment as Am,jsx as L,jsxs as De}from"react/jsx-runtime";var ko={"Dub Links":L("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:L(tt,{className:"size-3 text-orange-900"})}),"Dub Partners":L("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:L(rt,{className:"size-3 text-violet-900"})}),"Dub Analytics":L("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:L(et,{className:"size-3 text-green-900"})}),"Dub API":L("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:L(Ft,{className:"size-3 text-neutral-900"})})};function F6({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Po();t&&(r=t);let[o,a]=ui(!1);Dm(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:c,isLoading:l}=Im(r.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return De("div",{className:s("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[c&&Object.keys(c).length>0?L(Co,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):l?null:De("div",{className:"flex gap-2 max-[280px]:hidden",children:[L(Co,{variant:"secondary",href:`${ke}/login`,children:"Log in"}),L(Co,{href:`${ke}/register`,children:"Sign Up"})]}),L("button",{onClick:()=>a(!o),className:s("z-30 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?L(Mm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):L(Lm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),L("nav",{className:s("fixed inset-0 z-20 hidden max-h-screen w-full overflow-y-auto bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:De("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[No.map(({name:i,href:m,childItems:d},n)=>L(Em,{name:i,href:m,childItems:d,setOpen:a},n)),c&&Object.keys(c).length>0?L("li",{className:"py-3 min-[281px]:hidden",children:L(gt,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):De(Am,{children:[L("li",{className:"py-3 min-[281px]:hidden",children:L(gt,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),L("li",{className:"py-3 min-[281px]:hidden",children:L(gt,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Em=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Po(),[c,l]=ui(!1);return r?L("li",{className:"py-3",children:De(Se,{height:!0,children:[De("button",{className:"flex w-full justify-between",onClick:()=>l(!c),children:[L("p",{className:"font-semibold",children:e}),L(Tm,{className:s("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",c&&"rotate-180")})]}),c&&L("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((i,m)=>"items"in i?De("div",{className:"grid grid-cols-1 gap-3",children:[L("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:i.label}),i.items.map((d,n)=>L(mi,{item:d,setOpen:o,size:"small"},n))]},m):L(mi,{item:i,setOpen:o},m))})]})}):t?L("li",{className:"py-3",children:L(gt,{href:V(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},mi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:c="normal"})=>{let{domain:l="dub.co"}=Po(),i=ko==null?void 0:ko[e];return De(gt,{href:V(r,l,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:l,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[L("div",{className:s("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",c==="small"&&"size-8"),children:i??L(o,{className:s("size-5 text-neutral-700 grayscale",c==="small"&&"size-4")})}),De("div",{children:[L("div",{className:"flex items-center gap-2",children:L("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&L("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Co({variant:e,className:t,...r}){return L(gt,{...r,className:s("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ie({variant:e}),t)})}import{jsx as pi}from"react/jsx-runtime";function fi({className:e}){return pi("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z",fill:"currentColor"})})}import{jsx as Y,jsxs as gi}from"react/jsx-runtime";var Um=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
49
49
  <path fill-rule="evenodd" clip-rule="evenodd" d="M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z" fill="black"/>
50
50
  </svg>`,Gm=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
51
51
  <path fill-rule="evenodd" clip-rule="evenodd" d="M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z" fill="black"/>
52
- </svg>`;function Lr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Hm(),{theme:a}=Fm(wo),[c,l]=Bm(!1),i=Wm(n=>{n.preventDefault(),l(!0)},[]),[,m]=it();function d(n){$m.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return gi(He.Root,{open:c,onOpenChange:l,children:[Y(He.Anchor,{asChild:!0,children:Y("div",{onContextMenu:i,className:"max-w-fit",children:e==="full"?Y(fi,{className:r}):Y(xo,{className:s("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Y(He.Portal,{children:Y(He.Content,{sideOffset:14,align:"start",className:s("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),l(!1)},children:gi("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Y(Vt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(Um),icon:Y(xo,{className:"h-4 w-4"})}),Y(Vt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Gm),icon:Y(Vm,{strokeWidth:2,className:"h-4 w-4"})}),Y(Vt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Y(Om,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Y(Vt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Y(zm,{strokeWidth:2,className:"h-4 w-4"})}):Y(Vt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Y(_m,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Vt({className:e,...t}){return Y(se,{className:s("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as D,jsxs as B}from"react/jsx-runtime";var Zm=[{name:"Twitter",icon:Ut,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:$t,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Bt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Gt,href:"https://www.youtube.com/@dubdotco"}],bt={product:[...Pr.map(({title:e,href:t})=>({name:e,href:t})),{name:"Dub Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"}],solutions:[{name:"Marketing attribution",href:"/analytics"},{name:"Content creators",href:"/solutions/creators"},{name:"Affiliate management",href:"/partners"}],resources:[{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Changelog",href:"/changelog"},{name:"Blog",href:"/blog"},{name:"Customers",href:"/customers"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"},{name:"About",href:"/about"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:Un.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Gn.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Fo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},vt="text-sm font-medium text-neutral-900",xt="flex flex-col mt-2.5 gap-3.5",Je="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function s5({staticDomain:e,className:t}){let{domain:r="dub.co"}=jm();return e&&(r=e),D(Rr,{className:s("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:B("footer",{children:[B("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[B("div",{className:"flex flex-col gap-6",children:[D("div",{className:"grow",children:B(We,{href:_("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[B("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),D(Lr,{className:"h-8 text-neutral-800"})]})}),D("div",{className:"flex items-center gap-3",children:Zm.map(({name:o,icon:a,href:c})=>B("a",{href:c,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[D("span",{className:"sr-only",children:o}),D(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),B("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"grid gap-8",children:[B("div",{children:[D("h3",{className:vt,children:"Product"}),D("ul",{role:"list",className:xt,children:bt.product.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),B("div",{children:[D("h3",{className:vt,children:"Solutions"}),D("ul",{role:"list",className:xt,children:bt.solutions.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]}),B("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:vt,children:"Resources"}),D("ul",{role:"list",className:xt,children:bt.resources.map(o=>D("li",{children:B(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:Je,children:[o.name,o.target&&D(zr,{className:"size-3.5"})]})},o.name))})]})]}),B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"grid gap-8",children:[B("div",{children:[D("h3",{className:vt,children:"Compare"}),D("ul",{role:"list",className:xt,children:bt.compare.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),B("div",{children:[D("h3",{className:vt,children:"Legal"}),B("ul",{role:"list",className:xt,children:[bt.legal.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name)),D("li",{children:B("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Je,children:["Trust Center ",D(zr,{className:"size-3.5"})]})})]})]})]}),B("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:vt,children:"Tools"}),D("ul",{role:"list",className:xt,children:bt.tools.map(o=>D("li",{children:D(We,{href:_(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]})]})]}),B("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[D(mn,{}),D(We,{href:_("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:D(Km,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),B("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Ym,motion as qm}from"framer-motion";import{useEffect as Xm,useState as Jm}from"react";import{jsx as hi}from"react/jsx-runtime";var bi=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,c]=Jm(!1);Xm(()=>{c(!0)},[]);let l=r?qm.div:"div";return hi(Ym,{children:a?hi(l,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Qm}from"class-variance-authority";import{toast as eu}from"sonner";import{jsx as So,jsxs as ru}from"react/jsx-runtime";var tu=Qm("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200",neutral:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200"}},defaultVariants:{variant:"default"}});function x5({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[c,l]=it(),i=o||Bo;return ru("button",{onClick:m=>{m.stopPropagation(),eu.promise(l(t),{success:a||"Copied to clipboard!"})},className:s(tu({variant:e}),r),type:"button",children:[So("span",{className:"sr-only",children:"Copy"}),c?So(Zo,{className:"h-3.5 w-3.5"}):So(i,{className:"h-3.5 w-3.5"})]})}import{toast as ou}from"sonner";import{jsx as au}from"react/jsx-runtime";function C5({value:e,children:t,className:r,successMessage:o}){let[a,c]=it();return au("button",{onClick:l=>{l.stopPropagation(),ou.promise(c(e),{success:o||"Copied to clipboard!"})},type:"button",className:s("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as nu,jsxs as iu}from"react/jsx-runtime";function S5({icon:e,text:t}){return iu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,nu("p",{className:"truncate text-sm",children:t})]})}import{jsx as su}from"react/jsx-runtime";var T5=({children:e})=>su("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Ro}from"react/jsx-runtime";function E5({apexDomain:e,className:t,imageProps:r}){return e?Ro(At,{src:`${Ho}${e}`,alt:e,className:s("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Ro("div",{className:s("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Ro(Na,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as vi}from"lucide-react";import{useSearchParams as lu}from"next/navigation";import{useEffect as cu,useMemo as du,useRef as mu}from"react";import uu from"swr";import{useDebounce as pu}from"use-debounce";import{Fragment as xi,jsx as K,jsxs as Fe}from"react/jsx-runtime";function $5({defaultUrl:e}){let t=lu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=pu(_o(r),500),a=du(()=>Vo(o||""),[o]),{data:c,isValidating:l}=uu(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:i,description:m,image:d}=c||{},n=mu(null);cu(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=j();return Fe(xi,{children:[!e&&Fe("div",{className:"relative flex items-center",children:[K(vi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:n,name:"url",id:"url",type:"url",autoFocus:!u,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:r,"aria-invalid":"true"})]}),Fe("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[l&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(kt,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Fe("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(Go,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Fe("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?K("p",{className:"text-sm text-[#536471]",children:a}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),i?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:i}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Fe("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),K("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function U5({defaultUrl:e}){return Fe(xi,{children:[Fe("div",{className:"relative flex items-center",children:[K(vi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(kt,{})})})]})}import{AnimatePresence as fu}from"framer-motion";import yi from"js-cookie";import{createContext as gu,useState as hu}from"react";import{jsx as To}from"react/jsx-runtime";var bu=gu({hidePopup:()=>{}});function X5({children:e,hiddenCookieId:t}){let[r,o]=hu(yi.get(t)==="1"),a=()=>{o(!0),yi.set(t,"1")};return To(bi,{children:To(bu.Provider,{value:{hidePopup:a},children:To(fu,{children:!r&&e})})})}import{motion as vu}from"framer-motion";import{jsx as wi}from"react/jsx-runtime";function ty({value:e=0,max:t=100,className:r}){return wi("div",{className:s("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:wi(vu.div,{initial:{width:0},animate:{width:e&&t?e/t*100+"%":"0%"},transition:{duration:.5,type:"spring",delay:.2},className:`${e&&t&&e>t?"bg-red-500":"bg-blue-500"} h-full`})})}import{cva as ki}from"class-variance-authority";import{LayoutGroup as xu,motion as yu}from"framer-motion";import wu from"next/link";import{useId as Nu}from"react";import{jsx as Ht,jsxs as Ni}from"react/jsx-runtime";var ku=ki("p-4 transition-colors duration-75",{variants:{variant:{default:"text-content-subtle data-[selected=true]:text-content-emphasis data-[selected=false]:hover:text-content-default",accent:"text-content-subtle transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-content-default data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),Cu=ki("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function uy({variant:e,options:t,selected:r,onSelect:o,className:a}){let c=Nu();return Ht("div",{className:s("flex text-sm",a),children:Ht(xu,{id:c,children:t.map(({id:l,label:i,href:m,target:d})=>{let n=l===r;return Ni(m?wu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Ni("button",{type:"button",...o&&!m&&{onClick:()=>o(l)},className:s(ku({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[i,d==="_blank"&&Ht(ra,{className:"size-2.5"})]}),n&&Ht(yu.div,{layoutId:"indicator",transition:{duration:.1},className:Cu({variant:e}),children:Ht("div",{className:"h-0.5 rounded-t-full bg-current"})})]},l)})})})}import{jsx as Lo,jsxs as Ci}from"react/jsx-runtime";var Pu=[{icon:Ea,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:ga,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Ra,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Da,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Sa,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function gy(){return Ci("div",{className:"p-3",children:[Lo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Lo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Pu.map(({text:e,icon:t,href:r})=>Ci("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Lo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Pi,jsxs as Su}from"react/jsx-runtime";function vy({className:e}){return Su("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:[Pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.5 8H112.5V31.8666C112.5 31.911 112.501 31.9554 112.501 31.9999C112.501 32.0444 112.5 32.0888 112.5 32.1332V46H106.5V43.4909C104.232 45.0724 101.475 45.9999 98.5003 45.9999C90.7682 45.9999 84.5 39.7319 84.5 31.9999C84.5 24.2679 90.7682 17.9999 98.5003 17.9999C101.475 17.9999 104.232 18.9274 106.5 20.5089V8ZM98.5 39.9996C102.918 39.9996 106.5 36.418 106.5 31.9998C106.5 27.5816 102.918 24 98.5 24C94.0818 24 90.5 27.5816 90.5 31.9998C90.5 36.418 94.0818 39.9996 98.5 39.9996ZM148.5 8.0001H154.5V20.5096C156.768 18.9278 159.526 18.0002 162.5 18.0002C170.233 18.0002 176.501 24.2682 176.501 32.0002C176.501 39.7322 170.233 46.0002 162.5 46.0002C154.768 46.0002 148.5 39.7322 148.5 32.0002V32.0001V8.0001ZM162.5 39.9997C166.918 39.9997 170.5 36.4181 170.5 31.9999C170.5 27.5817 166.918 24.0001 162.5 24.0001C158.082 24.0001 154.5 27.5817 154.5 31.9999C154.5 36.4181 158.082 39.9997 162.5 39.9997ZM122.5 18H116.5V32C116.5 33.8385 116.862 35.659 117.566 37.3576C118.269 39.0561 119.301 40.5995 120.601 41.8995C121.901 43.1995 123.444 44.2307 125.143 44.9343C126.841 45.6379 128.662 46 130.5 46C132.339 46 134.159 45.6379 135.858 44.9343C137.557 44.2307 139.1 43.1995 140.4 41.8995C141.7 40.5995 142.731 39.0561 143.435 37.3576C144.139 35.659 144.501 33.8385 144.501 32H144.5V18H138.5V32H138.5C138.5 34.1216 137.657 36.1563 136.157 37.6566C134.657 39.1568 132.622 39.9996 130.5 39.9996C128.378 39.9996 126.344 39.1568 124.843 37.6566C123.343 36.1563 122.5 34.1216 122.5 32H122.5V18Z",fill:"currentColor"}),Pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z",fill:"currentColor"})]})}export{Br as AUTOPLAY_DEFAULT_DELAY,C1 as Accordion,Ii as AccordionContent,Mi as AccordionItem,Di as AccordionTrigger,gy as AdvancedLinkFeaturesTooltip,$u as Africa,tp as Airtm,zi as Alert,Vi as AlertDescription,_i as AlertTitle,Yu as Amazon,sp as AndroidLogo,Se as AnimatedSizeContainer,lp as AppleLogo,cp as ArrowBoldUp,dp as ArrowRight,mp as ArrowTrendUp,up as ArrowTurnLeft,pp as ArrowTurnRight2,ra as ArrowUpRight,fp as ArrowsOppositeDirectionY,Uu as Asia,Co as AuthButton,I1 as Avatar,J4 as Background,Qt as Badge,gp as BadgeCheck,hp as BadgeCheck2Fill,Q1 as BadgeTooltip,bp as Blog,At as BlurImage,vp as Bolt,xp as BoltFill,wp as Book2,oa as Book2Fill,Np as Book2Small,yp as BookOpen,kp as Books2,Cp as BoxArchive,Pp as BulletList,aa as BulletListFill,se as Button,eg as ButtonTooltip,Un as COMPARE_PAGES,a3 as CUSTOMER_STORIES,an as Calendar,Lp as Calendar6,Rp as CalendarDays,Sp as CalendarIcon,Tp as CalendarRefresh,Hu as CardAmex,Wu as CardDiscover,Cg as CardList,Fu as CardMastercard,Bu as CardVisa,Mp as Cards,Dp as CaretUpFill,gs as Carousel,hs as CarouselContent,bs as CarouselItem,Bg as CarouselNavBar,xs as CarouselNext,vs as CarouselPrevious,Jg as CarouselThumbnail,Xg as CarouselThumbnails,rp as CashApp,Ip as ChartActivity2,Ep as ChartArea2,Ap as ChartLine,qu as ChatGPT,na as Check,ia as Check2,Ms as Checkbox,sa as CheckboxCheckedFill,la as CheckboxUnchecked,ca as CircleCheck,Op as CircleCheckFill,zp as CircleDollar,_p as CircleDotted,da as CircleHalfDottedCheck,ma as CircleHalfDottedClock,ua as CircleInfo,Vp as CirclePercentage,Hp as CirclePlay,Wp as CirclePlayFill,Fp as CircleQuestion,Bp as CircleUser,Or as CircleWarning,$p as CircleXmark,Up as Circles,Gp as Circles3,bi as ClientOnly,pa as CloudUpload,Kp as Code,jp as ColorPalette2,$b as Combobox,vy as CompositeLogo,Zp as ConnectedDots,qp as ConnectedDots4,Yp as ConnectedDotsFill,Xp as Connections3,Bo as Copy,x5 as CopyButton,C5 as CopyText,Jp as CreditCard,Qp as Crosshairs3,e0 as Crown,Ru as CrownSmall,t0 as Cube,r0 as CubeSettings,o0 as CubeSettingsFill,a0 as CurrencyDollar,fa as CursorRays,n0 as DatabaseKey,jr as DatePickerContext,Rv as DateRangePicker,i0 as Desktop,s0 as DiamondTurnRight,Kt as DiamondTurnRightFill,l0 as Directions,c0 as Discount,d0 as Dots,m0 as Download,tt as DubAnalyticsIcon,Ft as DubApiIcon,Tu as DubCraftedShield,rt as DubLinksIcon,ot as DubPartnersIcon,mn as DubStatusBadge,u0 as Duplicate,er as DynamicTooltipWrapper,ga as Earth,p0 as EarthPosition,Hv as EmptyState,f0 as Envelope,g0 as EnvelopeAlert,h0 as EnvelopeArrowRight,Gu as Europe,$o as ExpandingArrow,ha as Eye,ba as EyeSlash,Pr as FEATURES_LIST,Du as Facebook,va as FeatherFill,Xu as Figma,b0 as FileContent,qv as FileUpload,v0 as FileZip2,w2 as Filter,y0 as Filter2,x0 as FilterBars,N0 as Flag2,xa as Flag6,w0 as FlagWavy,k0 as Flask,C0 as FlaskSmall,P0 as Folder,M0 as Folder5,S0 as FolderBookmark,R0 as FolderLock,T0 as FolderPlus,L0 as FolderShield,s5 as Footer,T2 as Form,D0 as GamingConsole,I0 as Gauge6,E0 as Gear,A0 as Gear2,O0 as Gear3,z0 as Gem,ya as Gift,_0 as GiftFill,Ju as GitHubEnhanced,Bt as Github,V0 as Globe,Na as Globe2,wa as GlobePointer,H0 as GlobeSearch,Xo as Go,Iu as Google,Qu as GoogleEnhanced,W0 as GreekTemple,Et as Grid,F0 as GridIcon,B0 as GridLayoutRows,$0 as GridPlus,U0 as Headset,ka as HeadsetFill,Ca as HeartFill,Pa as HexadecagonStar,G0 as History,K0 as Hyperlink,S5 as IconMenu,j0 as Icosahedron,Sa as Incognito,X1 as InfoTooltip,T5 as InlineSnippet,Oc as Input,Z0 as InputPassword,Ra as InputPasswordPointer,Ta as InputSearch,ax as InputSelect,Eu as Instagram,Y0 as InvoiceDollar,q0 as Key,Ua as KeyboardShortcutContext,Dh as KeyboardShortcutProvider,Gn as LEGAL_PAGES,td as Label,X0 as LayoutSidebar,J0 as License,Q0 as LinesY,tf as Link4,ef as LinkBroken,E5 as LinkLogo,$5 as LinkPreview,U5 as LinkPreviewPlaceholder,$t as LinkedIn,q1 as LinkifyTooltipContent,kt as LoadingCircle,Mu as LoadingDots,Ce as LoadingSpinner,rf as LocationPin,of as LockFill,xo as Logo,Uo as Magic,af as Magnifier,nf as MapPosition,sf as MarketingTarget,Lu as MatrixLines,Rr as MaxWidthWrapper,lf as Menu3,hx as MenuItem,cf as MessageSmile,jt as MicrophoneFill,Sx as MiniAreaChart,df as MobilePhone,Ix as Modal,mf as MoneyBill,uf as MoneyBill2,pf as MoneyBills2,ff as Msgs,y6 as Nav,wo as NavContext,O6 as NavMobile,Lr as NavWordmark,Ku as NorthAmerica,gf as Note,kf as NucleoPhoto,J1 as NumberTooltip,ju as Oceania,hf as OfficeBuilding,v1 as PLAN_FEATURE_ICONS,La as Page2,Ox as PaginationControls,bf as Paintbrush,vf as Palette2,xf as PaperPlane,op as Payoneer,ap as Paypal,wf as Pen2,yf as PenWriting,Nf as PercentageArrowDown,Go as Photo,Jo as Php,Cf as Plug2,Zt as Plus,Pf as Plus2,ct as Popover,X5 as Popup,bu as PopupContext,Sf as Post,Au as Prisma,Yo as ProductHunt,ty as ProgressBar,Rf as Pyramid,Qo as Python,Tf as QRCode,Sr as RESOURCES,yd as RadioGroup,wd as RadioGroupItem,qo as Raycast,Lf as Receipt2,zr as ReferredVia,Mf as Refresh2,Df as Robot,ea as Ruby,vo as SDKS,n3 as SOCIAL_LINKS,$n as SOLUTIONS,Ma as SatelliteDish,If as ScanText,Ef as Scribble,$x as Sheet,Af as ShieldAlert,Of as ShieldCheck,zf as ShieldKeyhole,_f as ShieldSlash,Vf as ShieldUser,jx as ShimmerDots,Hf as Shuffle,Y1 as SimpleTooltipContent,Ou as Slack,Wf as Sliders,Xx as SmartDateTimePicker,Ko as SortOrder,Zu as SouthAmerica,Ff as Sparkle3,ep as Spotify,Bf as SquareChart,$f as SquareLayoutGrid5,Uf as SquareLayoutGrid6,Gf as SquareXmark,Kf as Stars2,a4 as StatusBadge,np as StripeLink,jo as Success,u4 as Switch,e1 as TV,uy as TabSelect,_4 as Table,jf as TableIcon,Zf as TableRows2,Yf as Tablet,qf as Tag,Xf as Tags,Zo as Tick,zu as TikTok,Da as Timer2,_u as Tinybird,Ia as Toggle2Fill,B4 as ToggleGroup,E1 as TokenAvatar,J as Tooltip,Z1 as TooltipContent,j1 as TooltipProvider,Jf as Trash,Qf as TriangleWarning,Ut as Twitter,ta as Typescript,q4 as UTMBuilder,om as UTM_PARAMETERS,t1 as UiCard,Vu as Unsplash,r1 as User,o1 as UserCheck,a1 as UserCrown,n1 as UserDelete,i1 as UserPlus,s1 as Users,c1 as Users2,d1 as Users6,Yt as UsersFill,l1 as UsersSettings,ip as Venmo,m1 as Versions2,Ea as Views,u1 as Watch,p1 as Webhook,f1 as Window,g1 as WindowSearch,h1 as WindowSettings,fi as Wordmark,b1 as Xmark,Gt as YouTube,$i as badgeVariants,ie as buttonVariants,Fi as getUserAvatarUrl,No as navItems,Vd as statusBadgeVariants,be as useCarousel,Wa as useCarouselActiveIndex,nh as useCookies,it as useCopyToClipboard,dh as useCurrentAnchor,fh as useEnterSubmit,vh as useInViewport,wh as useInputFocused,Ph as useIntersectionObserver,st as useKeyboardShortcut,Ah as useLocalStorage,j as useMediaQuery,Hh as useOptimisticUpdate,Xh as usePagination,eb as useRemoveGAParams,rr as useResizeObserver,Za as useRouterStuff,Xa as useScroll,Ee as useScrollProgress,z4 as useTable,ja as useTablePagination,fb as useToastWithUndo};
52
+ </svg>`;function Lr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Vm(),{theme:a}=Fm(wo),[c,l]=Bm(!1),i=Wm(n=>{n.preventDefault(),l(!0)},[]),[,m]=nt();function d(n){$m.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return gi(Ve.Root,{open:c,onOpenChange:l,children:[Y(Ve.Anchor,{asChild:!0,children:Y("div",{onContextMenu:i,className:"max-w-fit",children:e==="full"?Y(fi,{className:r}):Y(xo,{className:s("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Y(Ve.Portal,{children:Y(Ve.Content,{sideOffset:14,align:"start",className:s("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),l(!1)},children:gi("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Y(_t,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(Um),icon:Y(xo,{className:"h-4 w-4"})}),Y(_t,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Gm),icon:Y(Hm,{strokeWidth:2,className:"h-4 w-4"})}),Y(_t,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Y(Om,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Y(_t,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Y(zm,{strokeWidth:2,className:"h-4 w-4"})}):Y(_t,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Y(_m,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function _t({className:e,...t}){return Y(se,{className:s("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as D,jsxs as $}from"react/jsx-runtime";var Zm=[{name:"Twitter",icon:Ut,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:$t,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Bt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Gt,href:"https://www.youtube.com/@dubdotco"}],ht={product:[...Pr.map(({title:e,href:t})=>({name:e,href:t})),{name:"Dub Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"}],solutions:[{name:"Marketing attribution",href:"/analytics"},{name:"Content creators",href:"/solutions/creators"},{name:"Affiliate management",href:"/partners"}],resources:[{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Changelog",href:"/changelog"},{name:"Blog",href:"/blog"},{name:"Customers",href:"/customers"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"},{name:"About",href:"/about"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:Un.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Gn.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Fo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},bt="text-sm font-medium text-neutral-900",vt="flex flex-col mt-2.5 gap-3.5",Je="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function p5({staticDomain:e,className:t}){let{domain:r="dub.co"}=jm();return e&&(r=e),D(Rr,{className:s("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:$("footer",{children:[$("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[$("div",{className:"flex flex-col gap-6",children:[D("div",{className:"grow",children:$(We,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[$("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),D(Lr,{className:"h-8 text-neutral-800"})]})}),D("div",{className:"flex items-center gap-3",children:Zm.map(({name:o,icon:a,href:c})=>$("a",{href:c,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[D("span",{className:"sr-only",children:o}),D(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),$("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"grid gap-8",children:[$("div",{children:[D("h3",{className:bt,children:"Product"}),D("ul",{role:"list",className:vt,children:ht.product.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),$("div",{children:[D("h3",{className:bt,children:"Solutions"}),D("ul",{role:"list",className:vt,children:ht.solutions.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]}),$("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:bt,children:"Resources"}),D("ul",{role:"list",className:vt,children:ht.resources.map(o=>D("li",{children:$(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:Je,children:[o.name,o.target&&D(zr,{className:"size-3.5"})]})},o.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"grid gap-8",children:[$("div",{children:[D("h3",{className:bt,children:"Compare"}),D("ul",{role:"list",className:vt,children:ht.compare.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),$("div",{children:[D("h3",{className:bt,children:"Legal"}),$("ul",{role:"list",className:vt,children:[ht.legal.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name)),D("li",{children:$("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Je,children:["Trust Center ",D(zr,{className:"size-3.5"})]})})]})]})]}),$("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:bt,children:"Tools"}),D("ul",{role:"list",className:vt,children:ht.tools.map(o=>D("li",{children:D(We,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[D(mn,{}),D(We,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:D(Km,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),$("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Ym,motion as qm}from"framer-motion";import{useEffect as Xm,useState as Jm}from"react";import{jsx as hi}from"react/jsx-runtime";var bi=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,c]=Jm(!1);Xm(()=>{c(!0)},[]);let l=r?qm.div:"div";return hi(Ym,{children:a?hi(l,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Qm}from"class-variance-authority";import{toast as eu}from"sonner";import{jsx as So,jsxs as ru}from"react/jsx-runtime";var tu=Qm("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200",neutral:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200"}},defaultVariants:{variant:"default"}});function P5({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[c,l]=nt(),i=o||Bo;return ru("button",{onClick:m=>{m.stopPropagation(),eu.promise(l(t),{success:a||"Copied to clipboard!"})},className:s(tu({variant:e}),r),type:"button",children:[So("span",{className:"sr-only",children:"Copy"}),c?So(Zo,{className:"h-3.5 w-3.5"}):So(i,{className:"h-3.5 w-3.5"})]})}import{toast as ou}from"sonner";import{jsx as au}from"react/jsx-runtime";function M5({value:e,children:t,className:r,successMessage:o}){let[a,c]=nt();return au("button",{onClick:l=>{l.stopPropagation(),ou.promise(c(e),{success:o||"Copied to clipboard!"})},type:"button",className:s("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as nu,jsxs as iu}from"react/jsx-runtime";function I5({icon:e,text:t}){return iu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,nu("p",{className:"truncate text-sm",children:t})]})}import{jsx as su}from"react/jsx-runtime";var A5=({children:e})=>su("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Ro}from"react/jsx-runtime";function V5({apexDomain:e,className:t,imageProps:r}){return e?Ro(Et,{src:`${Vo}${e}`,alt:e,className:s("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Ro("div",{className:s("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Ro(Na,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as vi}from"lucide-react";import{useSearchParams as lu}from"next/navigation";import{useEffect as cu,useMemo as du,useRef as mu}from"react";import uu from"swr";import{useDebounce as pu}from"use-debounce";import{Fragment as xi,jsx as K,jsxs as Fe}from"react/jsx-runtime";function Y5({defaultUrl:e}){let t=lu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=pu(_o(r),500),a=du(()=>Ho(o||""),[o]),{data:c,isValidating:l}=uu(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:i,description:m,image:d}=c||{},n=mu(null);cu(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=j();return Fe(xi,{children:[!e&&Fe("div",{className:"relative flex items-center",children:[K(vi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:n,name:"url",id:"url",type:"url",autoFocus:!u,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:r,"aria-invalid":"true"})]}),Fe("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[l&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(Nt,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Fe("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(Go,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Fe("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?K("p",{className:"text-sm text-[#536471]",children:a}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),i?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:i}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Fe("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),K("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function q5({defaultUrl:e}){return Fe(xi,{children:[Fe("div",{className:"relative flex items-center",children:[K(vi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(Nt,{})})})]})}import{AnimatePresence as fu}from"framer-motion";import yi from"js-cookie";import{createContext as gu,useState as hu}from"react";import{jsx as To}from"react/jsx-runtime";var bu=gu({hidePopup:()=>{}});function oy({children:e,hiddenCookieId:t}){let[r,o]=hu(yi.get(t)==="1"),a=()=>{o(!0),yi.set(t,"1")};return To(bi,{children:To(bu.Provider,{value:{hidePopup:a},children:To(fu,{children:!r&&e})})})}import{motion as vu}from"framer-motion";import{jsx as wi}from"react/jsx-runtime";function sy({value:e=0,max:t=100,className:r}){return wi("div",{className:s("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:wi(vu.div,{initial:{width:0},animate:{width:e&&t?e/t*100+"%":"0%"},transition:{duration:.5,type:"spring",delay:.2},className:`${e&&t&&e>t?"bg-red-500":"bg-blue-500"} h-full`})})}import{cva as ki}from"class-variance-authority";import{LayoutGroup as xu,motion as yu}from"framer-motion";import wu from"next/link";import{useId as Nu}from"react";import{jsx as Ht,jsxs as Ni}from"react/jsx-runtime";var ku=ki("p-4 transition-colors duration-75",{variants:{variant:{default:"text-content-subtle data-[selected=true]:text-content-emphasis data-[selected=false]:hover:text-content-default",accent:"text-content-subtle transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-content-default data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),Cu=ki("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function vy({variant:e,options:t,selected:r,onSelect:o,className:a}){let c=Nu();return Ht("div",{className:s("flex text-sm",a),children:Ht(xu,{id:c,children:t.map(({id:l,label:i,href:m,target:d})=>{let n=l===r;return Ni(m?wu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Ni("button",{type:"button",...o&&!m&&{onClick:()=>o(l)},className:s(ku({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[i,d==="_blank"&&Ht(ra,{className:"size-2.5"})]}),n&&Ht(yu.div,{layoutId:"indicator",transition:{duration:.1},className:Cu({variant:e}),children:Ht("div",{className:"h-0.5 rounded-t-full bg-current"})})]},l)})})})}import{jsx as Lo,jsxs as Ci}from"react/jsx-runtime";var Pu=[{icon:Ea,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:ga,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Ra,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Da,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Sa,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function wy(){return Ci("div",{className:"p-3",children:[Lo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Lo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Pu.map(({text:e,icon:t,href:r})=>Ci("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Lo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Pi,jsxs as Su}from"react/jsx-runtime";function Cy({className:e}){return Su("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:[Pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.5 8H112.5V31.8666C112.5 31.911 112.501 31.9554 112.501 31.9999C112.501 32.0444 112.5 32.0888 112.5 32.1332V46H106.5V43.4909C104.232 45.0724 101.475 45.9999 98.5003 45.9999C90.7682 45.9999 84.5 39.7319 84.5 31.9999C84.5 24.2679 90.7682 17.9999 98.5003 17.9999C101.475 17.9999 104.232 18.9274 106.5 20.5089V8ZM98.5 39.9996C102.918 39.9996 106.5 36.418 106.5 31.9998C106.5 27.5816 102.918 24 98.5 24C94.0818 24 90.5 27.5816 90.5 31.9998C90.5 36.418 94.0818 39.9996 98.5 39.9996ZM148.5 8.0001H154.5V20.5096C156.768 18.9278 159.526 18.0002 162.5 18.0002C170.233 18.0002 176.501 24.2682 176.501 32.0002C176.501 39.7322 170.233 46.0002 162.5 46.0002C154.768 46.0002 148.5 39.7322 148.5 32.0002V32.0001V8.0001ZM162.5 39.9997C166.918 39.9997 170.5 36.4181 170.5 31.9999C170.5 27.5817 166.918 24.0001 162.5 24.0001C158.082 24.0001 154.5 27.5817 154.5 31.9999C154.5 36.4181 158.082 39.9997 162.5 39.9997ZM122.5 18H116.5V32C116.5 33.8385 116.862 35.659 117.566 37.3576C118.269 39.0561 119.301 40.5995 120.601 41.8995C121.901 43.1995 123.444 44.2307 125.143 44.9343C126.841 45.6379 128.662 46 130.5 46C132.339 46 134.159 45.6379 135.858 44.9343C137.557 44.2307 139.1 43.1995 140.4 41.8995C141.7 40.5995 142.731 39.0561 143.435 37.3576C144.139 35.659 144.501 33.8385 144.501 32H144.5V18H138.5V32H138.5C138.5 34.1216 137.657 36.1563 136.157 37.6566C134.657 39.1568 132.622 39.9996 130.5 39.9996C128.378 39.9996 126.344 39.1568 124.843 37.6566C123.343 36.1563 122.5 34.1216 122.5 32H122.5V18Z",fill:"currentColor"}),Pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z",fill:"currentColor"})]})}export{Br as AUTOPLAY_DEFAULT_DELAY,L1 as Accordion,Ii as AccordionContent,Mi as AccordionItem,Di as AccordionTrigger,wy as AdvancedLinkFeaturesTooltip,$u as Africa,tp as Airtm,zi as Alert,Hi as AlertDescription,_i as AlertTitle,Yu as Amazon,lp as AndroidLogo,Se as AnimatedSizeContainer,cp as AppleLogo,dp as ArrowBoldUp,mp as ArrowRight,up as ArrowTrendUp,pp as ArrowTurnLeft,fp as ArrowTurnRight2,ra as ArrowUpRight,gp as ArrowsOppositeDirectionY,Uu as Asia,Co as AuthButton,_1 as Avatar,a3 as Background,Qt as Badge,hp as BadgeCheck,bp as BadgeCheck2Fill,ag as BadgeTooltip,vp as Blog,Et as BlurImage,xp as Bolt,yp as BoltFill,Np as Book2,oa as Book2Fill,kp as Book2Small,wp as BookOpen,Cp as Books2,Pp as BoxArchive,Sp as BracketsCurly,Rp as Brush,Tp as BulletList,aa as BulletListFill,se as Button,ng as ButtonTooltip,Un as COMPARE_PAGES,d3 as CUSTOMER_STORIES,an as Calendar,Ip as Calendar6,Mp as CalendarDays,Lp as CalendarIcon,Dp as CalendarRefresh,Vu as CardAmex,Wu as CardDiscover,Lg as CardList,Fu as CardMastercard,Bu as CardVisa,Ep as Cards,Ap as CaretUpFill,gs as Carousel,hs as CarouselContent,bs as CarouselItem,jg as CarouselNavBar,xs as CarouselNext,vs as CarouselPrevious,oh as CarouselThumbnail,rh as CarouselThumbnails,rp as CashApp,Op as ChartActivity2,zp as ChartArea2,_p as ChartLine,qu as ChatGPT,na as Check,ia as Check2,Ms as Checkbox,sa as CheckboxCheckedFill,la as CheckboxUnchecked,ca as CircleCheck,Hp as CircleCheckFill,Vp as CircleDollar,Wp as CircleDotted,da as CircleHalfDottedCheck,ma as CircleHalfDottedClock,ua as CircleInfo,Fp as CirclePercentage,Bp as CirclePlay,$p as CirclePlayFill,Up as CircleQuestion,Gp as CircleUser,Or as CircleWarning,Kp as CircleXmark,jp as Circles,Zp as Circles3,bi as ClientOnly,pa as CloudUpload,Yp as Code,qp as ColorPalette2,Zb as Combobox,Cy as CompositeLogo,Xp as ConnectedDots,Qp as ConnectedDots4,Jp as ConnectedDotsFill,e0 as Connections3,Bo as Copy,P5 as CopyButton,M5 as CopyText,t0 as CreditCard,r0 as Crosshairs3,o0 as Crown,Ru as CrownSmall,a0 as Cube,n0 as CubeSettings,i0 as CubeSettingsFill,s0 as CurrencyDollar,fa as CursorRays,l0 as DatabaseKey,jr as DatePickerContext,Iv as DateRangePicker,c0 as Desktop,d0 as DiamondTurnRight,Kt as DiamondTurnRightFill,m0 as Directions,u0 as Discount,p0 as Dots,f0 as Download,et as DubAnalyticsIcon,Ft as DubApiIcon,Tu as DubCraftedShield,tt as DubLinksIcon,rt as DubPartnersIcon,mn as DubStatusBadge,g0 as Duplicate,er as DynamicTooltipWrapper,ga as Earth,h0 as EarthPosition,Uv as EmptyState,b0 as Envelope,v0 as EnvelopeAlert,x0 as EnvelopeArrowRight,Gu as Europe,$o as ExpandingArrow,ha as Eye,ba as EyeSlash,Pr as FEATURES_LIST,Du as Facebook,va as FeatherFill,Xu as Figma,y0 as FileContent,t2 as FileUpload,w0 as FileZip2,S2 as Filter,k0 as Filter2,N0 as FilterBars,P0 as Flag2,xa as Flag6,C0 as FlagWavy,S0 as Flask,R0 as FlaskSmall,T0 as Folder,E0 as Folder5,L0 as FolderBookmark,M0 as FolderLock,D0 as FolderPlus,I0 as FolderShield,p5 as Footer,E2 as Form,A0 as GamingConsole,O0 as Gauge6,z0 as Gear,_0 as Gear2,H0 as Gear3,V0 as Gem,ya as Gift,W0 as GiftFill,Ju as GitHubEnhanced,Bt as Github,F0 as Globe,Na as Globe2,wa as GlobePointer,B0 as GlobeSearch,Xo as Go,Iu as Google,Qu as GoogleEnhanced,$0 as GreekTemple,It as Grid,U0 as GridIcon,G0 as GridLayoutRows,K0 as GridPlus,j0 as Headset,ka as HeadsetFill,Ca as HeartFill,Pa as HexadecagonStar,Z0 as History,Y0 as Hyperlink,I5 as IconMenu,q0 as Icosahedron,Sa as Incognito,rg as InfoTooltip,A5 as InlineSnippet,Oc as Input,X0 as InputPassword,Ra as InputPasswordPointer,Ta as InputSearch,cx as InputSelect,Eu as Instagram,J0 as InvoiceDollar,Q0 as Key,Ua as KeyboardShortcutContext,zh as KeyboardShortcutProvider,Gn as LEGAL_PAGES,td as Label,ef as LayoutSidebar,tf as License,rf as LinesY,af as Link4,of as LinkBroken,V5 as LinkLogo,Y5 as LinkPreview,q5 as LinkPreviewPlaceholder,$t as LinkedIn,tg as LinkifyTooltipContent,Nt as LoadingCircle,Mu as LoadingDots,Ce as LoadingSpinner,nf as LocationPin,sf as LockFill,xo as Logo,Uo as Magic,lf as Magnifier,cf as MapPosition,df as MarketingTarget,Lu as MatrixLines,Rr as MaxWidthWrapper,mf as Menu3,wx as MenuItem,uf as MessageSmile,jt as MicrophoneFill,Dx as MiniAreaChart,pf as MobilePhone,_x as Modal,ff as MoneyBill,gf as MoneyBill2,hf as MoneyBills2,bf as Msgs,S6 as Nav,wo as NavContext,F6 as NavMobile,Lr as NavWordmark,Ku as NorthAmerica,vf as Note,Sf as NucleoPhoto,og as NumberTooltip,ju as Oceania,xf as OfficeBuilding,k1 as PLAN_FEATURE_ICONS,La as Page2,Wx as PaginationControls,yf as Paintbrush,wf as Palette2,Nf as PaperPlane,op as Payoneer,ap as Paypal,Cf as Pen2,kf as PenWriting,Pf as PercentageArrowDown,Go as Photo,Jo as Php,Rf as Plug2,Zt as Plus,Tf as Plus2,lt as Popover,oy as Popup,bu as PopupContext,Lf as Post,Au as Prisma,Yo as ProductHunt,sy as ProgressBar,Mf as Pyramid,Qo as Python,Df as QRCode,Sr as RESOURCES,yd as RadioGroup,wd as RadioGroupItem,qo as Raycast,If as Receipt2,zr as ReferredVia,Ef as Refresh2,Af as Robot,ea as Ruby,vo as SDKS,m3 as SOCIAL_LINKS,$n as SOLUTIONS,Ma as SatelliteDish,Of as ScanText,zf as Scribble,Zx as Sheet,_f as ShieldAlert,Hf as ShieldCheck,Vf as ShieldKeyhole,Wf as ShieldSlash,Ff as ShieldUser,Jx as ShimmerDots,Bf as Shuffle,eg as SimpleTooltipContent,Ou as Slack,$f as Sliders,r4 as SmartDateTimePicker,Ko as SortOrder,Zu as SouthAmerica,Uf as Sparkle3,ep as Spotify,Gf as SquareChart,Kf as SquareLayoutGrid5,jf as SquareLayoutGrid6,Zf as SquareXmark,Yf as Stars2,c4 as StatusBadge,np as Stripe,ip as StripeLink,jo as Success,b4 as Switch,a1 as TV,vy as TabSelect,$4 as Table,qf as TableIcon,Xf as TableRows2,Jf as Tablet,Qf as Tag,e1 as Tags,Zo as Tick,zu as TikTok,Da as Timer2,_u as Tinybird,Ia as Toggle2Fill,Z4 as ToggleGroup,t1 as Toggles,H1 as TokenAvatar,J as Tooltip,Q1 as TooltipContent,J1 as TooltipProvider,r1 as Trash,o1 as TriangleWarning,Ut as Twitter,ta as Typescript,r3 as UTMBuilder,om as UTM_PARAMETERS,n1 as UiCard,Hu as Unsplash,i1 as User,s1 as UserCheck,l1 as UserCrown,c1 as UserDelete,d1 as UserFocus,m1 as UserPlus,u1 as Users,f1 as Users2,g1 as Users6,Yt as UsersFill,p1 as UsersSettings,sp as Venmo,h1 as Versions2,Ea as Views,b1 as Watch,v1 as Webhook,x1 as Window,y1 as WindowSearch,w1 as WindowSettings,fi as Wordmark,N1 as Xmark,Gt as YouTube,$i as badgeVariants,ie as buttonVariants,Fi as getUserAvatarUrl,No as navItems,Hd as statusBadgeVariants,be as useCarousel,Wa as useCarouselActiveIndex,dh as useCookies,nt as useCopyToClipboard,gh as useCurrentAnchor,xh as useEnterSubmit,kh as useInViewport,Sh as useInputFocused,Mh as useIntersectionObserver,it as useKeyboardShortcut,Vh as useLocalStorage,j as useMediaQuery,Uh as useOptimisticUpdate,rb as usePagination,nb as useRemoveGAParams,rr as useResizeObserver,Za as useRouterStuff,Xa as useScroll,Ee as useScrollProgress,B4 as useTable,ja as useTablePagination,xb as useToastWithUndo};