@dub/ui 0.2.59 → 0.2.60
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/charts/index.mjs +1 -1
- package/dist/chunk-2TE35PRK.mjs +6 -0
- package/dist/chunk-5UP3SEU7.mjs +2 -0
- package/dist/chunk-6QAQWUYC.mjs +6 -0
- package/dist/chunk-BUJ2DMOX.mjs +6 -0
- package/dist/chunk-CXHLUCCN.mjs +6 -0
- package/dist/chunk-DFJQ2IL4.mjs +2 -0
- package/dist/chunk-DY4E342W.mjs +2 -0
- package/dist/chunk-F3T5LOC2.mjs +6 -0
- package/dist/chunk-IXJMTEI2.mjs +2 -0
- package/dist/chunk-LNHBSCOV.mjs +2 -0
- package/dist/chunk-LQU2DE3Q.mjs +2 -0
- package/dist/chunk-MBKVWEIX.mjs +6 -0
- package/dist/chunk-N2PJUK6D.mjs +2 -0
- package/dist/chunk-NYFND22T.mjs +6 -0
- package/dist/chunk-NYGLUKOL.mjs +2 -0
- package/dist/chunk-NZLZHKDB.mjs +6 -0
- package/dist/chunk-OMIL7DJG.mjs +2 -0
- package/dist/chunk-OXRKRQSA.mjs +6 -0
- package/dist/chunk-QNDO7X7O.mjs +2 -0
- package/dist/chunk-QSYEBRDP.mjs +2 -0
- package/dist/chunk-RDTCL6WY.mjs +2 -0
- package/dist/chunk-SJNBNAID.mjs +6 -0
- package/dist/chunk-TYGZRRNQ.mjs +2 -0
- package/dist/chunk-XSQVCN7V.mjs +2 -0
- package/dist/chunk-YAXXVE3N.mjs +2 -0
- package/dist/chunk-ZDXW7FMQ.mjs +2 -0
- package/dist/icons/index.d.ts +7 -1
- package/dist/icons/index.mjs +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as kp,$a as g0,$b as rf,$c as Kf,$d as Bg,A as da,Aa as Zp,Ab as Ra,Ac as Sf,Ad as bg,B as np,Ba as qp,Bb as V0,Bc as Rf,Bd as hg,C as ip,Ca as Xp,Cb as H0,Cc as Tf,Cd as vg,D as sp,Da as Jp,Db as _0,Dc as Ha,Dd as xg,E as tr,Ea as ha,Eb as nr,Ec as Lf,Ed as yg,F as lp,Fa as Qp,Fb as F0,Fc as Mf,Fd as wg,G as rr,Ga as e0,Gb as B0,Gc as Df,Gd as Ng,H as cp,Ha as va,Hb as W0,Hc as _a,Hd as Cg,I as dp,Ia as t0,Ib as $0,Ic as Fa,Id as kg,J as mp,Ja as r0,Jb as U0,Jc as Ef,Jd as Pg,K as up,Ka as o0,Kb as Ta,Kc as If,Kd as Sg,L as ma,La as a0,Lb as G0,Lc as Af,Ld as Rg,M as ua,Ma as n0,Mb as j0,Mc as Of,Md as Tg,N as pa,Na as i0,Nb as K0,Nc as ir,Nd as Lg,O as fa,Oa as s0,Ob as Y0,Oc as zf,Od as Mg,P as ga,Pa as l0,Pb as La,Pc as Vf,Pd as Dg,Q as pp,Qa as c0,Qb as Ma,Qc as Hf,Qd as Eg,R as fp,Ra as d0,Rb as Da,Rc as _f,Rd as Ig,S as gp,Sa as xa,Sb as Ea,Sc as Ff,Sd as Ag,T as bp,Ta as ar,Tb as Z0,Tc as Bf,Td as Og,U as hp,Ua as ya,Ub as q0,Uc as Wf,Ud as Ua,V as vp,Va as wa,Vb as X0,Vc as $f,Vd as Ga,W as xp,Wa as m0,Wb as J0,Wc as Uf,Wd as zg,X as yp,Xa as u0,Xb as Q0,Xc as Gf,Xd as Vg,Y as wp,Ya as Na,Yb as ef,Yc as jf,Yd as Hg,Z as Np,Za as p0,Zb as Ia,Zc as sr,Zd as _g,_ as Cp,_a as f0,_b as tf,_c as lr,_d as Fg,a as ra,aa as Pp,ab as Ca,ac as of,ad as Yf,ae as Wg,b as qu,ba as Sp,bb as ka,bc as af,bd as Zf,be as $g,c as it,ca as Rp,cb as Pa,cc as nf,cd as qf,ce as Ug,d as Jt,da as Tp,db as b0,dc as sf,dd as Xf,de as Gg,e as Xu,ea as Lp,eb as h0,ec as lf,ed as Jf,ee as jg,f as st,fa as Mp,fb as v0,fc as cf,fd as Qf,fe as Kg,g as lt,ga as Dp,gb as x0,gc as df,gd as Ba,ge as Yg,h as Yr,ha as Ep,hb as y0,hc as mf,hd as eg,he as Zg,i as oa,ia as Ip,ib as Zr,ic as Aa,id as tg,ie as Pt,j as aa,ja as Ap,jb as w0,jc as uf,jd as rg,je as qg,k as Ju,ka as Op,kb as N0,kc as pf,kd as og,ke as Xg,l as Qu,la as zp,lb as C0,lc as ff,ld as ag,le as Jg,m as na,ma as Vp,mb as Sa,mc as Oa,md as ng,me as Qg,n as ia,na as Hp,nb as k0,nc as gf,nd as ig,ne as ja,o as sa,oa as ba,ob as P0,oc as bf,od as sg,oe as eb,p as la,pa as _p,pb as S0,pc as za,pd as ct,pe as tb,q as kt,qa as Fp,qb as R0,qc as hf,qd as lg,qe as rb,r as ep,ra as Bp,rb as T0,rc as Va,rd as cg,re as ob,s as ke,sa as Wp,sb as L0,sc as vf,sd as dg,se as ab,t as tp,ta as $p,tb as M0,tc as xf,td as mg,te as nb,u as Qt,ua as Up,ub as D0,uc as yf,ud as ug,ue as ib,v as rp,va as Gp,vb as E0,vc as wf,vd as Wa,w as op,wa as jp,wb as I0,wc as Nf,wd as pg,x as er,xa as Kp,xb as A0,xc as Cf,xd as fg,y as ap,ya as Yp,yb as O0,yc as kf,yd as $a,z as ca,za as or,zb as z0,zc as Pf,zd as gg}from"./chunk-V6S4RZAX.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as jr,b as wt,c as Yo,d as Zo,e as Nt,f as qo,g as Xo,h as Ct,i as Kr,j as Jo,k as V,l as Ce,m as Qo,n as ge,o as qt,p as i,q as Xt,r as ea,s as ta}from"./chunk-EY3HINQT.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as Hi}from"lucide-react";import*as dr from"react";import{jsx as cr,jsxs as Wi}from"react/jsx-runtime";var ub=ie.Root,_i=dr.forwardRef(({className:e,...t},r)=>cr(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));_i.displayName="AccordionItem";var Fi=dr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?Hi:ct;return cr(ie.Header,{className:"flex",children:Wi(ie.Trigger,{ref:a,className:i("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,cr(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Fi.displayName=ie.Trigger.displayName;var Bi=dr.forwardRef(({className:e,children:t,...r},o)=>cr(ie.Content,{ref:o,className:i("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}));Bi.displayName=ie.Content.displayName;import{cva as $i}from"class-variance-authority";import*as mr from"react";import{jsx as qr}from"react/jsx-runtime";var Ui=$i("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"}}),Gi=mr.forwardRef(({className:e,variant:t,...r},o)=>qr("div",{ref:o,role:"alert",className:i(Ui({variant:t}),e),...r}));Gi.displayName="Alert";var ji=mr.forwardRef(({className:e,...t},r)=>qr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));ji.displayName="AlertTitle";var Ki=mr.forwardRef(({className:e,...t},r)=>qr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Ki.displayName="AlertDescription";import{sha256 as Yi}from"js-sha256";import{useState as Zi}from"react";import{jsx as Xr}from"react/jsx-runtime";function qi(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/${e.id}`;return e.email?`https://0.gravatar.com/avatar/${Yi(e.email)}?d=${t}`:t}function yb({user:e={},className:t}){if(!e)return Xr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Zi(qi(e));return Xr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar/${e.id}`)}})}function wb({id:e,className:t}){return Xr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Xi}from"class-variance-authority";import{jsx as Qi}from"react/jsx-runtime";var Ji=Xi("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 ur({className:e,variant:t,...r}){return Qi("span",{className:i(Ji({variant:t}),e),...r})}import{cva as ns}from"class-variance-authority";import{forwardRef as is}from"react";import*as be from"@radix-ui/react-tooltip";import es from"linkify-react";import{HelpCircle as ts}from"lucide-react";import rs from"next/link";import{useState as os}from"react";import{Fragment as as,jsx as U,jsxs as je}from"react/jsx-runtime";function Ob({children:e}){return U(be.Provider,{delayDuration:150,children:e})}function Q({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:n,delayDuration:c=0,...s}){let[u,l]=os(!1);return je(be.Root,{open:o?!1:u,onOpenChange:l,delayDuration:c,disableHoverableContent:n,children:[U(be.Trigger,{asChild:!0,onClick:()=>{l(!0)},onBlur:()=>{l(!1)},children:e}),U(be.Portal,{children:U(be.Content,{sideOffset:8,side:a,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,...s,children:typeof t=="string"?U("span",{className:i("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:l}):t})})]})}function zb({title:e,cta:t,href:r,target:o,onClick:a}){return je("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(rs,{href:r,...o?{target:o}:{},className:i(se({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(te,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function Vb({title:e,cta:t,href:r}){return je("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&je(as,{children:[" ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})]})}function Hb({children:e,className:t,tooltipClassName:r}){return U("div",{className:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(es,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function _b(e){return U(Q,{...e,children:U(ts,{className:"h-4 w-4 text-neutral-500"})})}function Fb({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(Q,{content:je("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[je("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Xt(e||0,{full:!0})," ",t]}),a&&je("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Xo(a,{withAgo:!0})]})]}),children:o})}function Bb({children:e,content:t,...r}){return U(Q,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(ur,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function Wb({children:e,tooltipProps:t,...r}){return U(Q,{...t,children:U("button",{type:"button",...r,className:i("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 pr({children:e,tooltipProps:t}){return t?U(Q,{...t,children:U("div",{children:e})}):e}import{jsx as dt,jsxs as Ka}from"react/jsx-runtime";var se=ns("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:i("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"}}),te=is(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:s,disabledTooltip:u,right:l,...d},m)=>u?dt(Q,{content:u,children:Ka("div",{className:i("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[c,e&&dt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&dt("kbd",{className:i("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:s})]})}):Ka("button",{ref:m,type:d.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",d.disabled||n?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:d.disabled||n,...d,children:[n?dt(ke,{}):c||null,e&&dt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&dt("kbd",{className:i("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:s}),l]}));te.displayName="Button";import{cva as ss}from"class-variance-authority";import{createContext as ls}from"react";import{jsx as Ya}from"react/jsx-runtime";var cs=ss("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"}}}),St=ls({variant:"loose",loading:!1});function Za({variant:e="loose",loading:t=!1,className:r,children:o}){return Ya("ul",{className:i(cs({variant:e,loading:t}),r),"data-variant":e,children:Ya(St.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ds}from"class-variance-authority";import{createContext as ms,useContext as us,useEffect as ps,useRef as fs,useState as gs}from"react";import{jsx as qa,jsxs as vs}from"react/jsx-runtime";var bs=ds("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"}}}),hs="w-full py-2.5 px-4",Jr=ms({hovered:!1});function Xa({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:s}=us(St),u=fs(null),[l,d]=gs(!1);ps(()=>{if(!l||!u.current)return;let p=setInterval(()=>{var f;((f=u.current)==null?void 0:f.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(p)},[l]);let m=p=>!(document.getElementById("modal-backdrop")||Ct(p));return vs("li",{ref:u,className:i(bs({variant:s}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":n,children:[c,qa("div",{className:i(hs,t),onClick:o?p=>{m(p)&&o(p)}:void 0,onAuxClick:a?p=>{m(p)&&a(p)}:void 0,children:qa(Jr.Provider,{value:{hovered:l},children:r})})]})}var u1=Object.assign(Za,{Card:Object.assign(Xa,{Context:Jr}),Context:St});import xs from"embla-carousel-autoplay";import ys from"embla-carousel-react";import{ArrowLeft as ws,ArrowRight as Ns}from"lucide-react";import{createContext as Cs,forwardRef as Tt,useCallback as Rt,useContext as ks,useEffect as Qr,useState as eo}from"react";import{jsx as Pe,jsxs as en}from"react/jsx-runtime";var to=2e3,Ja=Cs(null);function he(){let e=ks(Ja);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Qa(){let{api:e}=he(),[t,r]=eo(0),o=Rt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Qr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Ps=Tt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...s},u)=>{let[l,d]=ys({...t,axis:e==="horizontal"?"x":"y"},[...o?[xs(typeof o=="object"?o:{delay:to})]:[],...a||[]]),[m,p]=eo(!1),[f,b]=eo(!1),h=Rt(P=>{!P||(p(P.canScrollPrev()),b(P.canScrollNext()))},[]),y=Rt(()=>{d==null||d.scrollPrev()},[d]),w=Rt(()=>{d==null||d.scrollNext()},[d]),x=Rt(P=>{P.key==="ArrowLeft"?(P.preventDefault(),y()):P.key==="ArrowRight"&&(P.preventDefault(),w())},[y,w]);return Qr(()=>{!d||!r||r(d)},[d,r]),Qr(()=>{if(!!d)return h(d),d.on("reInit",h),d.on("select",h),()=>{d==null||d.off("select",h)}},[d,h]),Pe(Ja.Provider,{value:{carouselRef:l,api:d,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:y,scrollNext:w,canScrollPrev:m,canScrollNext:f},children:Pe("div",{ref:u,onKeyDownCapture:x,className:i("relative",n),role:"region","aria-roledescription":"carousel",...s,children:c})})});Ps.displayName="Carousel";var Ss=Tt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=he();return Pe("div",{ref:o,className:"overflow-hidden",children:Pe("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Ss.displayName="CarouselContent";var Rs=Tt(({className:e,...t},r)=>{let{orientation:o}=he();return Pe("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});Rs.displayName="CarouselItem";var Ts=Tt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:n}=he();return en("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Pe(ws,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Previous slide"})]})});Ts.displayName="CarouselPrevious";var Ls=Tt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:n}=he();return en("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Pe(Ns,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Next slide"})]})});Ls.displayName="CarouselNext";import{cva as Ms}from"class-variance-authority";import{motion as Ds}from"framer-motion";import{ChevronLeft as Es,ChevronRight as Is}from"lucide-react";import*as Ee from"react";import{jsx as Ke,jsxs as Lt}from"react/jsx-runtime";var As=Ms("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 "}}}),M1=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=he(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[u,l]=Ee.useState(0),[d,m]=Ee.useState(!1),p=Ee.useCallback(h=>{l((h==null?void 0:h.selectedScrollSnap())??0)},[]),f=Ee.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Ee.useEffect(()=>{!c||(p(c),m((s==null?void 0:s.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>m(!0)),c.on("autoplay:stop",()=>m(!1)))},[c,s,p]),Lt("div",{className:i(As({variant:e}),t),children:[e!=="simple"&&Lt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:f(o),children:[Ke(Es,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ke("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,y)=>Lt("button",{onClick:f(()=>c.scrollTo(y)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ke("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",y===u?"bg-black":"bg-black/20",d&&y===u&&"w-6 bg-black/20"),children:d&&y===u&&Ke(Ds.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??to)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Lt("span",{className:"sr-only",children:["Slide ",y+1]})]},y))}),e!=="simple"&&Lt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:f(r),children:[Ke(Is,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Next slide"})]})]})};import Os from"embla-carousel-react";import{forwardRef as zs,useCallback as Vs,useEffect as Hs}from"react";import{jsx as fr}from"react/jsx-runtime";var _1=({className:e,...t})=>{let{api:r}=he(),[o,a]=Os({dragFree:!0}),n=Vs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Hs(()=>{if(!(!r||!a))return n(r),r.on("reInit",n),r.on("select",n),()=>{r==null||r.off("reInit",n),r==null||r.off("select",n)}},[r,a,n]),fr("div",{className:"overflow-hidden",ref:o,children:fr("div",{className:i("mx-4 flex gap-4",e),...t})})},F1=zs(({index:e,className:t,...r},o)=>{let{api:a}=he(),n=Qa();return fr("div",{ref:o,children:fr("button",{type:"button",onClick:()=>{var s;if(!a)return;let c=(s=a.plugins())==null?void 0:s.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===n}):t,...r})})});import*as Mt from"@radix-ui/react-checkbox";import{forwardRef as _s}from"react";import{jsx as ro,jsxs as Fs}from"react/jsx-runtime";var mt=_s(({className:e,...t},r)=>ro(Mt.Root,{ref:r,className:i("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 data-[state=indeterminate]:bg-blue-500",e),...t,children:Fs(Mt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[ro(ar,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),ro(lr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));mt.displayName=Mt.Root.displayName;import{Command as Et,CommandInput as El,CommandItem as Il,useCommandState as Al}from"cmdk";import{ChevronDown as Ol}from"lucide-react";import{forwardRef as zl,isValidElement as Vl,useCallback as Hl,useEffect as vr,useRef as _l,useState as Dt}from"react";import{motion as Ll}from"framer-motion";import{forwardRef as Ml,useRef as Dl}from"react";import{useEffect as Bs,useState as Ws}from"react";function tn(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function oo(e,t){let[r,o]=Ws(tn(e)??t);return Bs(()=>{let n=tn(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function $s(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function Z1(e,t){if(!$s(t)){let o=t,a=u=>{let l=o[u];return Object.fromEntries(l.all.map(d=>[d,l.defaultVisible.includes(d)]))},n=Object.fromEntries(Object.keys(o).map(u=>[u,a(u)])),[c,s]=oo(e,n);return{columnVisibility:c,setColumnVisibility:(u,l)=>{let d=o[u].all,m=c[u]||{},p=Object.fromEntries(d.map(f=>[f,f in l?l[f]:m[f]??!1]));s({...c,[u]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(s=>[s,o.defaultVisible.includes(s)])),[n,c]=oo(e,a);return{columnVisibility:n,setColumnVisibility:s=>{let u=o.all,l=n||{},d=Object.fromEntries(u.map(m=>[m,m in s?s[m]:l[m]??!1]));c(d)}}}}import ao from"js-cookie";import{useEffect as Us,useState as Gs}from"react";function Q1(e,t,r){let[o,a]=Gs(()=>{let c=ao.get(e);return c?JSON.parse(c):t});return Us(()=>{let c=()=>{let s=ao.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),ao.set(e,JSON.stringify(c),r)}]}import{useCallback as js,useEffect as Ks,useRef as Ys,useState as Zs}from"react";var ut=(e=3e3)=>{let t=Ys(null),[r,o]=Zs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=js(async(c,{onSuccess:s,throwOnError:u}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),s==null||s(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(l){if(console.error("Failed to copy: ",l),u)throw l}},[e]);return Ks(()=>()=>a(),[]),[r,n]};import{useEffect as qs,useState as Xs}from"react";function ah(){let[e,t]=Xs(null);return qs(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var m,p,f;let u=s[0];if(!u)return;let l=(((m=u.rootBounds)==null?void 0:m.height)||0)*.3+o;for(let b=1;b<s.length;b++){let h=s[b];if(!h)break;(h.boundingClientRect.top<u.boundingClientRect.top||u.boundingClientRect.bottom<o)&&(u=h)}let d=u.target;for(;d&&d.getBoundingClientRect().bottom<o;)d=(p=n.get(d))==null?void 0:p.next;for(;d&&d.getBoundingClientRect().top>l;)d=(f=n.get(d))==null?void 0:f.prev;d&&t(d.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),n=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Js}from"react";function lh(e){return{handleKeyDown:Js(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 Qs,useState as el}from"react";function uh(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=el(o??!1);return Qs(()=>{let c=()=>{let u=e.current;if(!u)return;let l=r==null?void 0:r.current,d=u.getBoundingClientRect(),m=l?l.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};n(d.top<m.bottom&&d.bottom>m.top&&d.left<m.right&&d.right>m.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let s=null;return e.current&&(s=new IntersectionObserver(c),s.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),s==null||s.disconnect()}},[e,r]),a}import{useEffect as tl,useState as rl}from"react";function gh(){let[e,t]=rl(!1);return tl(()=>{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 ol,useState as al}from"react";function xh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=al(),s=(n==null?void 0:n.isIntersecting)&&a,u=([l])=>{c(l)};return ol(()=>{let l=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!l)return;let m={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(u,m);return p.observe(l),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),n}import{createContext as nl,useCallback as il,useContext as sl,useEffect as rn,useId as ll,useState as cl}from"react";import{jsx as dl}from"react/jsx-runtime";var on=nl({listeners:[],setListeners:()=>{}});function Ph({children:e}){let[t,r]=cl([]);return dl(on.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ie(e,t,r={}){let o=ll(),{listeners:a,setListeners:n}=sl(on),c=il(s=>{if(r.enabled===!1)return;let u=s.target,l=document.getElementById("modal-backdrop"),d=document.querySelector("[data-sheet-overlay]");if(u.tagName==="INPUT"||u.tagName==="TEXTAREA"||!!l!=!!r.modal||!!d!=!!r.sheet)return;let m=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(m):m!==e)return;let p=a.filter(b=>b.enabled!==!1&&!!l==!!b.modal&&!!d==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(m):b.key===m));!p.length||qo(p,(b,h)=>(h.priority??0)-(b.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);rn(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),rn(()=>(n(s=>[...s.filter(u=>u.id!==o),{id:o,key:e,...r}]),()=>n(s=>s.filter(u=>u.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as ml}from"sonner";import ul from"swr";function Mh(e,t){let{data:r,isLoading:o,mutate:a}=ul(e,ge);return{data:r,isLoading:o,update:async(n,c)=>ml.promise(a(n(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as ln,useMemo as vl}from"react";import{useEffect as an,useState as pl}from"react";function nn({pageSize:e,page:t,onPageChange:r}){let[o,a]=pl({pageIndex:t,pageSize:e});return an(()=>{a(n=>({...n,pageIndex:t}))},[t]),an(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as fl,useRouter as gl,useSearchParams as bl}from"next/navigation";import{useCallback as hl}from"react";function sn(){let e=fl(),t=gl(),r=bl(),o=Object.fromEntries(r),a=(c,s)=>{let u=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let d=new URLSearchParams;r.forEach((m,p)=>{var f;(f=s.include)!=null&&f.includes(p)&&d.set(p,m)}),u=d}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(d=>u.delete(d)),c&&Object.entries(c).forEach(([d,m])=>u.set(d,m));let l=u.toString();return l.length>0?`?${l}`:""},n=hl(({set:c,del:s,replace:u,scroll:l=!0,getNewPath:d,arrayDelimiter:m=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,y])=>p.set(h,Array.isArray(y)?y.join(m):y)),s&&(Array.isArray(s)?s.forEach(h=>p.delete(h)):p.delete(s));let f=p.toString(),b=`${e}${f.length>0?`?${f}`:""}`;if(d)return b;u?t.replace(b,{scroll:!1}):t.push(b,{scroll:l})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:n,getQueryString:a}}function Wh(e=ta){let{searchParams:t,queryParams:r}=sn(),o=vl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:n}=nn({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return ln(()=>{let c=parseInt(t.get("page")||"1")||1;n(s=>({...s,pageIndex:c}))},[t.get("page")]),ln(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as xl}from"react";function Gh(){xl(()=>{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 yl,useState as wl}from"react";function gr(e){let[t,r]=wl(),o=([a])=>{r(a)};return yl(()=>{let a=e==null?void 0:e.current;if(!a)return;let n=new ResizeObserver(o);return n.observe(a),()=>n.disconnect()},[e]),t}import{useCallback as Nl,useEffect as cn,useState as Cl}from"react";function dn(e,{container:t}={}){let[r,o]=Cl(!1),a=Nl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return cn(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),cn(()=>{a()},[a]),r}import{useCallback as kl,useEffect as Pl,useState as Sl}from"react";function Ae(e){let[t,r]=Sl(1),o=kl(()=>{if(!e.current)return;let{scrollTop:n,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(n/(c-s),1))},[]),a=gr(e);return Pl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as Rl}from"react";import{toast as un}from"sonner";import{jsx as br,jsxs as mn}from"react/jsx-runtime";function Tl({id:e,message:t,undo:r}){let o=()=>{r(),un.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return Rl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),mn("div",{className:"flex w-full items-center justify-between space-x-2",children:[mn("div",{className:"flex items-center space-x-2",children:[br(sa,{}),br("p",{className:"font-medium",children:t})]}),br("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 iv(){return({id:t,message:r,undo:o,duration:a})=>un(br(Tl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as pn}from"react/jsx-runtime";var Se=Ml(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var l,d;let s=Dl(null),u=gr(s);return pn(Ll.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((l=u==null?void 0:u.contentRect)==null?void 0:l.width)??"auto":"auto",height:t?((d=u==null?void 0:u.contentRect)==null?void 0:d.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...n,children:pn("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});Se.displayName="AnimatedSizeContainer";import*as Oe from"@radix-ui/react-popover";import{Drawer as pt}from"vaul";import{jsx as Re,jsxs as hr}from"react/jsx-runtime";function ve({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:n,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:u,collisionBoundary:l,sticky:d,onEscapeKeyDown:m,onWheel:p}){let{isMobile:f}=Y();return c||f?hr(pt.Root,{open:a,onOpenChange:n,children:[Re(pt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),hr(pt.Portal,{children:[Re(pt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),hr(pt.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:m,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(pt.Overlay,{})]})]}):hr(Oe.Root,{open:a,onOpenChange:n,children:[Re(Oe.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Re(Oe.Portal,{children:Re(Oe.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",s),sticky:d,collisionBoundary:l,onOpenAutoFocus:u,onEscapeKeyDown:m,onWheel:p,children:t})})]})}import{Fragment as xr,jsx as M,jsxs as Te}from"react/jsx-runtime";function Fl(e,t){return e===!0}function Ov({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,icon:n,placeholder:c="Select...",searchPlaceholder:s="Search...",emptyState:u,createLabel:l,onCreate:d,buttonProps:m,shortcutHint:p,caret:f,side:b,open:h,onOpenChange:y,onSearchChange:w,shouldFilter:x=!0,inputRight:P,inputClassName:k,optionRight:N,optionClassName:_,matchTriggerWidth:$,hideSearch:S=!1,children:R}){let K=Fl(e,r),v=Array.isArray(t)?t:t?[t]:[],{isMobile:C}=Y(),[F,L]=Dt(!1),I=h??F,J=y??L,[fe,$r]=Dt(""),[Go,Ur]=Dt(!1),[Gr,Oi]=Dt(void 0),[zi,jo]=Dt(!1),Vi=O=>{var nt;if(o==null||o(O),!!r)if(K){let Ue=v.some(({value:Ge})=>Ge===O.value);r(Ue?v.filter(({value:Ge})=>Ge!==O.value):[...v,O])}else r(v.length&&((nt=v[0])==null?void 0:nt.value)===O.value?null:O),J(!1)},Ko=Hl((O,nt)=>nt===""?[...O.filter(Ue=>Ue.first&&!v.some(Ge=>Ge.value===Ue.value)),...v,...O.filter(Ue=>!Ue.first&&!v.some(Ge=>Ge.value===Ue.value))]:O,[v]);return vr(()=>{Go&&(Oi(a&&Ko(a,fe)),Ur(!1))},[Go,a,Ko,fe]),vr(()=>{Ur(!0)},[a]),vr(()=>{I||($r(""),Ur(!0))},[I]),vr(()=>w==null?void 0:w(fe),[fe]),M(ve,{openPopover:I,setOpenPopover:J,align:"start",side:b,onWheel:O=>{O.stopPropagation()},popoverContentClassName:i($&&"sm:w-[var(--radix-popover-trigger-width)]"),content:M(Se,{width:!C&&!$,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Te(Et,{loop:!0,shouldFilter:x,children:[!S&&Te("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[M(El,{placeholder:s,value:fe,onValueChange:$r,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",k),onKeyDown:O=>{(O.key==="Escape"||O.key==="Backspace"&&!fe)&&(O.preventDefault(),O.stopPropagation(),J(!1))}}),P&&M("div",{className:"mr-2",children:P}),p&&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:p})]}),M(Bl,{children:M(Et.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Gr!==void 0?Te(xr,{children:[Gr.map(O=>M(Wl,{option:O,multiple:K,selected:v.some(({value:nt})=>nt===O.value),onSelect:()=>Vi(O),right:N==null?void 0:N(O),className:_},`${O.label}, ${O.value}`)),fe.length>0&&d&&Te(Il,{className:i("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",_),onSelect:async()=>{jo(!0),await(d==null?void 0:d(fe))&&($r(""),J(!1)),jo(!1)},children:[zi?M(ke,{className:"size-4 shrink-0"}):M(ct,{className:"size-4 shrink-0"}),M("div",{className:"grow truncate",children:(l==null?void 0:l(fe))||`Create "${fe}"`})]}),x?M(Ul,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:u||"No matches"}):Gr.length===0?M("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:u||"No matches"}):null]}):M(Et.Loading,{children:M("div",{className:"flex h-12 items-center justify-center",children:M(ke,{})})})})})]})}),children:M(te,{variant:"secondary",...m,className:i(m==null?void 0:m.className,"flex gap-2"),textWrapperClassName:i(m==null?void 0:m.textWrapperClassName,"w-full flex items-center justify-start"),text:Te(xr,{children:[M("div",{className:"min-w-0 grow truncate text-left",children:R||v.map(O=>O.label).join(", ")||c}),f&&(f===!0?M(Ol,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:n?fn(n)?n:M(n,{className:"size-4 shrink-0"}):void 0})})}var Bl=({children:e})=>{let t=_l(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Te(xr,{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 Wl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Te(xr,{children:[M($l,{disabledTooltip:e.disabledTooltip,children:Te(Et.Item,{className:i("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",n),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(ya,{className:"size-4 text-neutral-600"}):M(wa,{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:fn(e.icon)?e.icon:M(e.icon,{className:"h-4 w-4"})}),M("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&M(ar,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&M(Et.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var $l=({children:e,disabledTooltip:t})=>t?M(Q,{content:t,children:M("div",{children:e})}):e,fn=e=>Vl(e),Ul=zl((e,t)=>Al(o=>o.filtered.count===0)?M("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as yr,format as Gl,isSameMonth as jl}from"date-fns";import{ChevronLeft as gn,ChevronRight as bn,ChevronsLeft as Kl,ChevronsRight as Yl}from"lucide-react";import{forwardRef as Zl,useRef as ql}from"react";import{DayPicker as Xl,useDayPicker as Jl,useDayRender as Ql,useNavigation as ec}from"react-day-picker";import{Fragment as tc,jsx as oe,jsxs as wr}from"react/jsx-runtime";var It=Zl(({onClick:e,icon:t,disabled:r,...o},a)=>oe("button",{ref:a,type:"button",disabled:r,className:i("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:oe(t,{className:"h-full w-full shrink-0"})}));It.displayName="NavigationButton";function hn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:s,...u}){return oe(Xl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:n,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("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",...s},components:{IconLeft:()=>oe(gn,{className:"h-4 w-4"}),IconRight:()=>oe(bn,{className:"h-4 w-4"}),Caption:({...l})=>{let{goToMonth:d,nextMonth:m,previousMonth:p,currentMonth:f,displayMonths:b}=ec(),{numberOfMonths:h,fromDate:y,toDate:w}=Jl(),x=b.findIndex(R=>jl(l.displayMonth,R)),P=x===0,k=x===b.length-1,N=h>1&&(P||!k),_=h>1&&(k||!P),$=()=>{let R=yr(f,-1);p&&(!y||R.getTime()>=y.getTime())&&d(R)},S=()=>{let R=yr(f,1);m&&(!w||R.getTime()<=w.getTime())&&d(R)};return wr("div",{className:"flex items-center justify-between",children:[wr("div",{className:"flex items-center gap-1",children:[o&&!_&&oe(It,{disabled:a||!p||y&&yr(f,-1).getTime()<y.getTime(),"aria-label":"Go to previous year",onClick:$,icon:Kl}),!_&&oe(It,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&d(p),icon:gn})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Gl(l.displayMonth,"LLLL yyy",{locale:n})}),wr("div",{className:"flex items-center gap-1",children:[!N&&oe(It,{disabled:a||!m,"aria-label":"Go to next month",onClick:()=>m&&d(m),icon:bn}),o&&!N&&oe(It,{disabled:a||!m||w&&yr(f,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:S,icon:Yl})]})]})},Day:({date:l,displayMonth:d})=>{let m=ql(null),{activeModifiers:p,buttonProps:f,divProps:b,isButton:h,isHidden:y}=Ql(l,d,m),{selected:w,today:x,disabled:P,range_middle:k}=p;if(y)return oe(tc,{});if(!h)return oe("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:N,..._}=f;return wr("button",{ref:m,..._,type:"button",children:[N,x&&oe("span",{className:i("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&&k,"text-neutral-400":P})})]})}},...u})}import{enUS as uc}from"date-fns/locale";import{useEffect as mo,useMemo as xn,useRef as pc,useState as Cr}from"react";import{Command as no}from"cmdk";import{Lock as rc}from"lucide-react";import{jsx as Ye,jsxs as oc}from"react/jsx-runtime";var io=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=l=>"dateRange"in l,n=l=>"date"in l,c=(l,d)=>l.getDate()===d.getDate()&&l.getMonth()===d.getMonth()&&l.getFullYear()===d.getFullYear(),s=(l,d)=>{let m=l.from,p=d.from,f=!1;m&&p&&c(m,p)&&(f=!0);let b=l.to,h=d.to,y=!1;return b&&h&&c(b,h)&&(y=!0),f&&y},u=l=>{if(o)return o===l.id;if(a(l)){let d=r;return d&&s(d,l.dateRange)}else if(n(l)){let d=r;return d&&c(d,l.date)}return!1};return Ye(no,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ye(no.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((l,d)=>oc(no.Item,{disabled:l.requiresUpgrade,onSelect:()=>t(l),title:l.label,value:l.id,className:i("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",u(l)&&"font-semibold text-neutral-800"),children:[Ye("span",{children:l.label}),l.requiresUpgrade?Ye(rc,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.shortcut?Ye("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:l.shortcut.toUpperCase()}):null,l.requiresUpgrade&&l.tooltipContent&&Ye(Q,{side:"bottom",content:l.tooltipContent,children:Ye("div",{className:"absolute inset-0 cursor-not-allowed"})})]},d))})})};io.displayName="DatePicker.Presets";import{format as ze}from"date-fns";import{createContext as ac}from"react";var so=ac({isOpen:!1,setIsOpen:()=>{}}),nc=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},lo=(e,t,r=!1)=>{let o=!nc(),a;return r?a=o?ze(e,"d MMM, yyyy h:mm a",{locale:t}):ze(e,"d MMM, yyyy HH:mm",{locale:t}):a=ze(e,"d MMM, yyyy",{locale:t}),a},vn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:s}=t;if(e&&e.length>0){let u=o,l=r;e.forEach(d=>{var m,p,f,b,h,y;if("date"in d){let w=d.date.getFullYear();if(o&&w<o)throw new Error(`Preset ${d.label} is before fromYear ${u}.`);if(r&&w>r)throw new Error(`Preset ${d.label} is after toYear ${l}.`);if(a&&d.date.getMonth()<a.getMonth())throw new Error(`Preset ${d.label} is before fromMonth ${a}.`);if(n&&d.date.getMonth()>n.getMonth())throw new Error(`Preset ${d.label} is after toMonth ${n}.`);if(c&&d.date.getDate()<c.getDate())throw new Error(`Preset ${d.label} is before fromDay ${c}.`);if(s&&d.date.getDate()>s.getDate())throw new Error(`Preset ${d.label} is after toDay ${ze(s,"MMM dd, yyyy")}.`)}if("dateRange"in d){let w=(m=d.dateRange.from)==null?void 0:m.getFullYear(),x=(p=d.dateRange.to)==null?void 0:p.getFullYear();if(w&&o&&w<o)throw new Error(`Preset ${d.label}'s 'from' is before fromYear ${u}.`);if(x&&r&&x>r)throw new Error(`Preset ${d.label}'s 'to' is after toYear ${l}.`);if(a){let P=(f=d.dateRange.from)==null?void 0:f.getMonth();if(P&&P<a.getMonth())throw new Error(`Preset ${d.label}'s 'from' is before fromMonth ${ze(a,"MMM, yyyy")}.`)}if(n){let P=(b=d.dateRange.to)==null?void 0:b.getMonth();if(P&&P>n.getMonth())throw new Error(`Preset ${d.label}'s 'to' is after toMonth ${ze(n,"MMM, yyyy")}.`)}if(c){let P=(h=d.dateRange.from)==null?void 0:h.getDate();if(P&&P<c.getDate())throw new Error(`Preset ${d.dateRange.from}'s 'from' is before fromDay ${ze(c,"MMM dd, yyyy")}.`)}if(s){let P=(y=d.dateRange.to)==null?void 0:y.getDate();if(P&&P>s.getDate())throw new Error(`Preset ${d.label}'s 'to' is after toDay ${ze(s,"MMM dd, yyyy")}.`)}}})}};import{cva as ic}from"class-variance-authority";import{Calendar as sc,ChevronDown as lc}from"lucide-react";import{forwardRef as cc}from"react";import{jsx as Nr,jsxs as mc}from"react/jsx-runtime";var dc=ic(["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"}}}),co=cc(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>mc("button",{ref:n,className:i(dc({hasError:o}),e),...a,children:[Nr(sc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),Nr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?Nr("span",{className:"text-neutral-400",children:r}):null)}),Nr(lc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));co.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as yn}from"react/jsx-runtime";var fc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:s,showYearNavigation:u=!1,locale:l=uc,placeholder:d="Select date range",hasError:m,align:p="center",className:f,...b})=>{let{isDesktop:h}=Y(),[y,w]=Cr(!1),[x,P]=Cr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,N]=Cr((x==null?void 0:x.dateRange)??e??t??void 0),[_,$]=Cr(k==null?void 0:k.to),S=xn(()=>k,[y]);mo(()=>{N(e)},[e]),mo(()=>{let L=a==null?void 0:a.find(({id:I})=>I===r);P(L),N((L==null?void 0:L.dateRange)??e??t)},[a,r]),mo(()=>{y?k&&$(k.to):$(k==null?void 0:k.to)},[y]);let R=(L,I)=>{let J=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:I}:L;N(J),P(void 0),(J==null?void 0:J.from)&&(J==null?void 0:J.to)&&(o==null||o(J),w(!1))},K=L=>{N(L.dateRange),P(L),o==null||o(L.dateRange,L),w(!1)},v=()=>{N(S),w(!1)},C=L=>{L||v(),w(L)},F=xn(()=>k?`${k.from?lo(k.from,l):""} - ${k.to?lo(k.to,l):""}`:null,[k,l]);return Ie((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let I=a==null?void 0:a.find(J=>J.shortcut===L.key);I&&K(I)}),ae(so.Provider,{value:{isOpen:y,setIsOpen:w},children:ae(ve,{align:p,openPopover:y,setOpenPopover:C,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:yn("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&&ae(gc,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(io,{currentPresetId:r,currentValue:k,presets:a,onSelect:K})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(hn,{mode:"range",selected:k,onSelect:R,month:_,onMonthChange:$,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:u,locale:l,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...b})})]})}),children:ae(co,{placeholder:d,disabled:n,className:f,hasError:m,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(x==null?void 0:x.label)??F})})})};function xx({presets:e,...t}){return e&&vn(e,t),ae(fc,{presets:e,...t})}function gc({children:e}){let t=pc(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return yn("div",{className:"relative sm:h-full",children:[ae("div",{ref:t,onScroll:o,className:i("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}),ae("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{useId as bc}from"react";import{jsx as kr,jsxs as hc}from"react/jsx-runtime";function Rx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=bc();return hc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[kr("defs",{children:kr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:kr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),kr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import vc from"next/link";import{useEffect as xc,useState as wn}from"react";import yc from"swr";import{jsx as uo,jsxs as Nn}from"react/jsx-runtime";function Cn({className:e}){let{data:t}=yc("https://status.dub.co/api/v1/summary",ge),[r,o]=wn("bg-neutral-200"),[a,n]=wn("Loading status...");return xc(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:s,name:u}=c[0],l=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(u),o(l)}else n("All systems operational"),o("bg-green-500")},[t]),Nn(vc,{href:"https://status.dub.co",target:"_blank",className:i("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:[Nn("div",{className:"relative size-2",children:[uo("div",{className:i("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")}),uo("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),uo("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Pr,jsxs as kn}from"react/jsx-runtime";function Ox({icon:e,title:t,description:r,learnMore:o,children:a}){return kn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Pr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Pr(e,{className:"size-6 text-neutral-800"})}),Pr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&kn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Pr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as wc}from"class-variance-authority";import{useState as Pn}from"react";import{toast as Sn}from"sonner";import{Fragment as Cc,jsx as xe,jsxs as fo}from"react/jsx-runtime";var Rn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],po={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:Rn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...Rn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Nc=wc("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 jx({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:s=Sa,customPreview:u,accept:l="any",imageSrc:d,loading:m=!1,clickToUpload:p=!0,showHoverOverlay:f=!0,content:b,maxFileSizeMB:h=0,targetResolution:y,accessibilityLabel:w="File upload",disabled:x=!1}){let[P,k]=Pn(!1),[N,_]=Pn(null),$=async S=>{let R="dataTransfer"in S?S.dataTransfer.files&&S.dataTransfer.files[0]:S.target.files&&S.target.files[0];if(!R)return;if(_(R.name),h>0&&R.size/1024/1024>h){Sn.error(`File size too big (max ${h} MB)`);return}let K=po[l].types;if(K.length&&!K.includes(R.type)){Sn.error(po[l].errorMessage??"File type not supported");return}let v=R;if(y&&R.type.startsWith("image/"))try{let C=await Zo(R,y),F=await fetch(C).then(L=>L.blob());v=new File([F],R.name,{type:R.type})}catch(C){console.error("Error resizing image:",C)}if(t){let C=new FileReader;C.onload=F=>{var L;return r==null?void 0:r({src:(L=F.target)==null?void 0:L.result,file:v})},C.readAsDataURL(v);return}r==null||r({file:v})};return fo("label",{className:i(Nc({variant:o}),x?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[m&&xe("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:xe(kt,{})}),xe("div",{className:"absolute inset-0 z-[5]",onDragOver:S=>{S.preventDefault(),S.stopPropagation(),k(!0)},onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),k(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),k(!1)},onDrop:async S=>{S.preventDefault(),S.stopPropagation(),$(S),k(!1)}}),fo("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",x&&"bg-neutral-50",P&&!x&&"cursor-copy border-black bg-neutral-50 opacity-100",d?i("opacity-0",f&&!x&&"group-hover:opacity-100"):i(!x&&"group-hover:bg-neutral-50")),children:[xe(s,{className:i("size-7 transition-all duration-75",x?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",P?"scale-110":"scale-100"),n)}),b!==null&&xe("div",{className:i("mt-2 text-center text-sm text-neutral-500",x&&"text-neutral-400"),children:b??xe(Cc,{children:fo("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),xe("span",{className:"sr-only",children:w})]}),d&&(u??xe("img",{src:d,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),p&&xe("div",{className:"sr-only mt-1 flex shadow-sm",children:xe("input",{id:e,type:"file",accept:po[l].types.join(","),onChange:$,disabled:x},N)})]})}import{AnimatePresence as kc,motion as Tn}from"framer-motion";import{X as Pc}from"lucide-react";import Sc from"next/link";import{isValidElement as Rc}from"react";import{Fragment as Tc,jsx as ee,jsxs as At}from"react/jsx-runtime";function Mn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ie("Escape",o,{priority:1}),ee(Se,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:At("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[ee("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:ee(kc,{children:t==null?void 0:t.map(({key:n,value:c})=>{if(n==="loader")return ee(Tn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${c}`);let s=e.find(u=>u.key===n);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(u=>{var f,b,h,y;let l=(f=s.options)==null?void 0:f.find(w=>typeof w.value=="string"&&typeof u=="string"?w.value.toLowerCase()===u.toLowerCase():w.value===u),d=(l==null?void 0:l.icon)??((b=s.getOptionIcon)==null?void 0:b.call(s,u,{key:s.key,option:l}))??s.icon,m=(l==null?void 0:l.label)??((h=s.getOptionLabel)==null?void 0:h.call(s,u,{key:s.key,option:l}))??u,p=(l==null?void 0:l.permalink)??((y=s.getOptionPermalink)==null?void 0:y.call(s,u))??null;return At(Tn.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:[At("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[ee("span",{className:"shrink-0 text-neutral-600",children:Ln(s.icon)?s.icon:ee(s.icon,{className:"h-4 w-4"})}),s.label]}),ee("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),ee("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?At(Tc,{children:[ee("span",{className:"shrink-0 text-neutral-600",children:Ln(d)?d:ee(d,{className:"h-4 w-4"})}),p?ee(Sc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Nt(m,30)}):Nt(m,30)]}):ee("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),ee("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(n,u),children:ee(Pc,{className:"h-3.5 w-3.5"})})]},`${n}-${u}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&At("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",ee("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 Ln=e=>Rc(e);import{Command as Ve,useCommandState as Lc}from"cmdk";import{ChevronDown as Mc,ListFilter as Dc}from"lucide-react";import{Fragment as Ec,forwardRef as Ic,isValidElement as En,useCallback as Sr,useEffect as Rr,useImperativeHandle as Ac,useRef as bo,useState as go}from"react";import{Fragment as Fc,jsx as H,jsxs as ye}from"react/jsx-runtime";function In({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:s,children:u,emptyState:l,className:d}){var R,K;let{isMobile:m}=Y(),p=bo(null),f=bo(),[b,h]=go(!1);Ie("f",()=>h(!0),{enabled:!b});let[y,w]=go(""),[x,P]=go(null),k=Sr(()=>{w(""),P(null)},[]);Rr(()=>{b||k()},[b]);let N=x?e.find(({key:v})=>v===x):null,_=Sr(v=>{p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),P(v),o==null||o(v)},[]),$=Sr(v=>{if(!N||!c)return!1;let C=c.find(({key:F})=>F===x);return(C==null?void 0:C.value)===v||C&&N.multiple&&Array.isArray(C.value)&&C.value.includes(v)},[N]),S=Sr(v=>{N&&($(v)?r(N.key,v):t(N.key,v),N.multiple||h(!1))},[c,N,s]);return Rr(()=>{a==null||a(y)},[y]),Rr(()=>{n==null||n(x)},[x]),Rr(()=>{(N==null?void 0:N.options)&&p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight})},[N==null?void 0:N.options]),H(ve,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:v=>{x&&(v.preventDefault(),k())},content:H(Se,{width:!m,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ye(Ve,{loop:!0,shouldFilter:!N||N.shouldFilter!==!1,children:[ye("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[H(zc,{placeholder:`${(N==null?void 0:N.label)||"Filter"}...`,value:y,onValueChange:w,onKeyDown:v=>{(v.key==="Escape"||v.key==="Backspace"&&!y)&&(v.preventDefault(),v.stopPropagation(),x?k():h(!1))},emptySubmit:v=>{v.preventDefault(),v.stopPropagation(),s?(t("ai",N?`${N.label} ${y}`:y),h(!1)):S(y)}}),!N&&H("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"})]}),H(Vc,{ref:p,children:ye(Ve.List,{className:i("flex w-full flex-col gap-1 p-1",N?"min-w-[100px]":"min-w-[180px]"),children:[N?((K=(R=N.options)==null?void 0:R.filter(v=>!y||!v.hideDuringSearch))==null?void 0:K.map(v=>{let C=$(v.value);return H(Dn,{filter:N,option:v,right:C?H(xa,{className:"h-4 w-4"}):v.right,onSelect:()=>S(v.value)},v.value)}))??H(Ve.Loading,{children:H("div",{className:"-m-1 flex items-center justify-center",style:f.current,children:H(ke,{})})}):e.filter(v=>!v.hideInFilterDropdown).map(v=>ye(Ec,{children:[H(Dn,{filter:v,onSelect:()=>_(v.key)}),v.separatorAfter&&H(Ve.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},v.key)),(!N||N.options)&&H(Hc,{search:y,askAI:s,children:l?Oc(l)?(l==null?void 0:l[x??"default"])??"No matches":l:"No matches"})]})},x)]})}),children:ye("button",{type:"button",className:i("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",d),children:[H(Dc,{className:"size-4 shrink-0"}),H("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:u??"Filter"}),c!=null&&c.length?H("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):H(Mc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Oc(e){return typeof e=="object"&&e!==null&&!En(e)}var zc=e=>{let t=Lc(r=>r.filtered.count===0);return H(Ve.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"})},Vc=Ic(({children:e},t)=>{let r=bo(null);Ac(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return ye(Fc,{children:[H("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),H("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 Dn({filter:e,option:t,right:r,onSelect:o}){var s,u;let{isMobile:a}=Y(),n=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((u=e.getOptionLabel)==null?void 0:u.call(e,t.value,{key:e.key,option:t})):e.label;return ye(Ve.Item,{className:i("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:l=>{l.preventDefault()},onPointerUp:l=>{l.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[H("span",{className:"shrink-0 text-neutral-600",children:_c(n)?n:H(n,{className:"h-4 w-4"})}),Nt(c,48),H("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Hc=({search:e,askAI:t,children:r})=>t&&e?ye(Ve.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[H(aa,{className:"h-4 w-4"}),ye("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ye("span",{className:"text-black",children:['"',e,'"']})]})]}):H(Ve.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),_c=e=>En(e);var h2={Select:In,List:Mn};import{useMemo as Bc,useState as An}from"react";import{jsx as Ze,jsxs as Tr}from"react/jsx-runtime";function k2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[s,u]=An(r.defaultValue),[l,d]=An(!1),m=Bc(()=>l||!s||s===r.defaultValue,[l,s,r.defaultValue]);return Tr("form",{onSubmit:async p=>{p.preventDefault(),d(!0),await c({[r.name]:s}),d(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Tr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Tr("div",{className:"flex flex-col space-y-3",children:[Ze("h2",{className:"text-xl font-medium",children:e}),Ze("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ze("input",{...r,type:r.type||"text",required:!0,disabled:!!n,onChange:p=>u(p.target.value),className:i("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":n})}):Ze("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Tr("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"?Ze("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,Ze("div",{className:"shrink-0",children:Ze(te,{text:a,loading:l,disabled:m,disabledTooltip:n})})]})]})}import{useId as Wc}from"react";import{jsx as Lr,jsxs as $c}from"react/jsx-runtime";function qe({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Wc();return $c("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Lr("defs",{children:Lr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Lr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Lr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Uc}from"lucide-react";import Gc,{useCallback as jc,useState as Kc}from"react";import{jsx as Xe,jsxs as ho}from"react/jsx-runtime";var Yc=Gc.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=Kc(!1),c=jc(()=>n(!a),[a,n]);return ho("div",{children:[ho("div",{className:"relative flex",children:[Xe("input",{type:a?"text":t,className:i("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}),ho("div",{className:"group",children:[r.error&&Xe("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Xe(Uc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Xe("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Xe(Ma,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Xe(Da,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Xe("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Yc.displayName="Input";import{flip as Qc,offset as ed,size as td,useDismiss as rd,useFloating as od,useInteractions as ad}from"@floating-ui/react";import{Command as Le,useCommandState as nd}from"cmdk";import{Check as id,ChevronDown as sd,Search as ld,X as cd}from"lucide-react";import{createContext as dd,forwardRef as _n,useContext as wo,useEffect as vo,useMemo as zn,useRef as Vn,useState as xo}from"react";import{Drawer as ft}from"vaul";import Zc from"next/image";import{memo as qc,useEffect as Xc,useState as On}from"react";import{jsx as Jc}from"react/jsx-runtime";var Ot=qc(e=>{let[t,r]=On(!0),[o,a]=On(e.src);Xc(()=>a(e.src),[e.src]);let n=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Jc(Zc,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:n,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as E,jsxs as le}from"react/jsx-runtime";var Mr=dd({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function e4({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:n,icon:c,inputAttrs:s,noItemsElement:u}){let{isMobile:l}=Y(),d=Vn(null),[m,p]=xo(!1),[f,b]=xo(""),[h,y]=xo(!1);vo(()=>{m&&y(!1)},[m]),vo(()=>y(!0),[f]),vo(()=>{t&&b(t.value)},[t]);let w=zn(()=>{let C=f.toLowerCase();return h?e.filter(F=>F.value.toLowerCase().includes(C)):f?e.sort((F,L)=>(L.value.toLowerCase().includes(C)?1:0)-(F.value.toLowerCase().includes(C)?1:0)):e},[h,f,e]),{refs:x,floatingStyles:P,context:k}=od({open:m,onOpenChange:p,middleware:[ed(8),td({apply({elements:{floating:C},availableHeight:F}){Object.assign(C.style,{maxHeight:`${Math.max(75,Math.min(F,290))}px`})},padding:8}),Qc({fallbackStrategy:"initialPlacement",padding:8})]}),N=rd(k,{enabled:!l||!n}),{getReferenceProps:_,getFloatingProps:$}=ad([N]),S=Vn(null),{scrollProgress:R,updateScrollProgress:K}=Ae(S),v=zn(()=>t&&t.icon?t.icon:t&&t.image?E(Ot,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(ld,{className:"size-4 text-neutral-400"}),[t,c]);return E(Mr.Provider,{value:{inputAttrs:s||{},openCommandList:m,setOpenCommandList:p,inputValue:f,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:l&&n?le(ft.Root,{open:m,onOpenChange:p,children:[E(ft.Trigger,{className:"sm:hidden",asChild:!0,children:E(Le,{ref:d,className:"relative",shouldFilter:!1,loop:!0,children:E(yo,{className:o,iconElement:v})})}),E(ft.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(ft.Portal,{children:[E(ft.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:C=>{C.target instanceof Element&&C.target.closest("[data-sonner-toast]")&&C.preventDefault()},children:le(Le,{ref:d,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(yo,{className:o,iconElement:v})}),m&&le(Le.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(u?E("div",{children:u}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&E(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(Hn,{items:w})]})]})}),E(ft.Overlay,{})]})]}):le(Le,{ref:d,className:"relative",shouldFilter:!1,loop:!0,children:[E(yo,{className:o,iconElement:v,ref:x.setReference,..._()}),m&&le("div",{ref:x.setFloating,style:P,...$(),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:S,onScroll:K,className:"grow overflow-y-auto p-2",children:[le(Le.List,{children:[e.length===0&&f===""&&(u?E("div",{children:u}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&E(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(Hn,{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(R,2)}})]})]})})}var yo=_n(({iconElement:e,className:t,...r},o)=>le("label",{ref:o,className:i("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(md,{}),E(ud,{})]})]})),md=_n((e,t)=>{let r=nd(l=>l.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:n,inputValue:c,setInputValue:s,disabled:u}=wo(Mr);return E(Le.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>n(!0),value:c,onValueChange:s,onKeyDown:l=>{l.key==="Escape"?(l.preventDefault(),n(!1)):l.key==="Enter"&&r?n(!1):l.key.match(/^[a-z0-9]$/i)&&!l.metaKey&&n(!0)},disabled:u,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 ud(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=wo(Mr);return E("button",{type:"button",onClick:()=>{r(n=>!n),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(cd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(sd,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Hn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=wo(Mr);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(Ot,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),E("p",{className:i("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(ur,{className:"text-xs",variant:"neutral",children:a.label})]}),E(id,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as No from"@radix-ui/react-label";import{cva as pd}from"class-variance-authority";import*as Fn from"react";import{jsx as bd}from"react/jsx-runtime";var fd=pd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),gd=Fn.forwardRef(({className:e,...t},r)=>bd(No.Root,{ref:r,className:i(fd(),e),...t}));gd.displayName=No.Root.displayName;import{cva as hd}from"class-variance-authority";import{isValidElement as vd}from"react";import{jsx as Bn,jsxs as Wn}from"react/jsx-runtime";var Co=hd(["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 u4({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,...c}){return Wn(e||"button",{...e==="button"?{type:"button"}:{},className:i(Co({variant:t}),n),...c,children:[Wn("div",{className:"flex grow items-center gap-2",children:[o&&(xd(o)?o:Bn(o,{className:"size-4"})),r]}),a&&Bn("kbd",{className:i("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 xd=e=>vd(e);import{curveNatural as $n}from"@visx/curve";import{LinearGradient as Un}from"@visx/gradient";import{Group as yd}from"@visx/group";import{ParentSize as wd}from"@visx/responsive";import{scaleLinear as Nd,scaleUtc as Cd}from"@visx/scale";import{Area as kd,AreaClosed as Pd}from"@visx/shape";import{motion as Gn}from"framer-motion";import{useId as Sd,useMemo as jn}from"react";import{jsx as we,jsxs as ko}from"react/jsx-runtime";var Rd={top:8,right:2,bottom:2,left:2};function N4(e){return we(wd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(Td,{...{width:t,height:r,...e}})})}function Td({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...Rd,...n},s=Sd(),u=jn(()=>r.map(({date:m})=>({date:m,value:0})),[r]),{yScale:l,xScale:d}=jn(()=>{let m=r.map(({value:y})=>y),p=Math.max(...m),f=r.map(({date:y})=>y.getTime()),b=new Date(Math.min(...f)),h=new Date(Math.max(...f));return{yScale:Nd({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:Cd({domain:[b,h],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return ko("svg",{width:e,height:t,children:[ko("defs",{children:[we(Un,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(Un,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),we("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:we("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),ko(yd,{left:c.left,top:c.top,children:[we(kd,{data:r,x:({date:m})=>d(m),y:({value:m})=>l(m)??0,curve:o?$n:void 0,children:({path:m})=>we(Gn.path,{initial:{d:m(u)||"",opacity:0},animate:{d:m(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),we(Pd,{data:r,x:({date:m})=>d(m),y:({value:m})=>l(m)??0,yScale:l,curve:o?$n:void 0,children:({path:m})=>we(Gn.path,{initial:{d:m(u)||"",opacity:0},animate:{d:m(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as ce from"@radix-ui/react-dialog";import*as Po from"@radix-ui/react-visually-hidden";import{useRouter as Ld}from"next/navigation";import{Drawer as Je}from"vaul";import{jsx as ne,jsxs as gt}from"react/jsx-runtime";function T4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:s}){let u=Ld(),l=({dragged:m}={})=>{c&&!m||(a&&a(),o?o(!1):u.back())},{isMobile:d}=Y();return d&&!n?ne(Je.Root,{open:o?r:!0,onOpenChange:m=>{m||l({dragged:!0})},...s,children:gt(Je.Portal,{children:[ne(Je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(Je.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest("[data-sonner-toast]")&&m.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:gt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[gt(Po.Root,{children:[ne(Je.Title,{children:"Modal"}),ne(Je.Description,{children:"This is a modal"})]}),ne(Md,{}),e]})}),ne(Je.Overlay,{})]})}):ne(ce.Root,{open:o?r:!0,onOpenChange:m=>{m||l()},children:gt(ce.Portal,{children:[ne(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),gt(ce.Content,{onOpenAutoFocus:m=>m.preventDefault(),onCloseAutoFocus:m=>m.preventDefault(),onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest("[data-sonner-toast]")&&m.preventDefault()},className:i("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:[gt(Po.Root,{children:[ne(ce.Title,{children:"Modal"}),ne(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Md(){return ne("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ne("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{useCallback as So}from"react";import{jsx as zt,jsxs as Dd}from"react/jsx-runtime";function O4({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:s,formatValue:u,decrementAriaLabel:l="Decrease",incrementAriaLabel:d="Increase",...m}){let p=typeof r=="number"?e>r:!0,f=typeof o=="number"?e<o:!0,b=So(w=>{let x=w;return typeof r=="number"&&(x=Math.max(r,x)),typeof o=="number"&&(x=Math.min(o,x)),x},[r,o]),h=So(()=>{n||!p||t(b(e-a))},[n,p,b,t,a,e]),y=So(()=>{n||!f||t(b(e+a))},[n,f,b,t,a,e]);return Dd("div",{id:s,role:"group","aria-disabled":n,className:i("flex h-10 w-full select-none items-stretch overflow-hidden rounded-lg border border-neutral-200 bg-white",n&&"opacity-60",c),...m,children:[zt("button",{type:"button","aria-label":l,onClick:h,disabled:n||!p,className:i("flex h-full w-24 items-center justify-center border-r border-neutral-200 text-neutral-700 transition-colors",!(n||!p)&&"hover:bg-neutral-50"),children:zt(lr,{className:"block size-4"})}),zt("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:w=>{n||((w.key==="ArrowLeft"||w.key==="ArrowDown")&&(w.preventDefault(),h()),(w.key==="ArrowRight"||w.key==="ArrowUp")&&(w.preventDefault(),y()))},className:i("flex min-w-0 flex-1 items-center justify-center px-3 text-sm text-neutral-900"),prefix:"",children:u?u(e):e}),zt("button",{type:"button","aria-label":d,onClick:y,disabled:n||!f,className:i("flex h-full w-24 items-center justify-center border-l border-neutral-200 text-neutral-700 transition-colors",!(n||!f)&&"hover:bg-neutral-50"),children:zt(ct,{className:"block size-4"})})]})}import{Fragment as Ed,jsx as Dr,jsxs as bt}from"react/jsx-runtime";var Kn=i("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 H4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return bt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[bt("div",{className:"flex items-center gap-2",children:[bt("div",{children:[Dr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&bt(Ed,{children:[bt("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&Dr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),n]}),bt("div",{className:"flex items-center gap-2",children:[Dr("button",{type:"button",className:Kn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Dr("button",{type:"button",className:Kn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as He from"@radix-ui/react-radio-group";import{Circle as Id}from"lucide-react";import*as Ro from"react";import{jsx as Er}from"react/jsx-runtime";var Ad=Ro.forwardRef(({className:e,...t},r)=>Er(He.Root,{className:i("grid gap-2",e),...t,ref:r}));Ad.displayName=He.Root.displayName;var Od=Ro.forwardRef(({className:e,...t},r)=>Er(He.Item,{ref:r,className:i("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:Er(He.Indicator,{className:"flex items-center justify-center",children:Er(Id,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Od.displayName=He.Item.displayName;import{Drawer as _e}from"vaul";import{jsx as Qe,jsxs as Fd}from"react/jsx-runtime";function zd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?_e.NestedRoot:_e.Root;return Qe(a,{direction:"right",handleOnly:!0,...o,children:Fd(_e.Portal,{children:[Qe(_e.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Qe(_e.Content,{...t,onPointerDownOutside:n=>{var c;n.target instanceof Element&&n.target.closest("[data-sonner-toast]")&&n.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,n)},className:i("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)",userSelect:"auto",...t==null?void 0:t.style},children:Qe("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Vd({className:e,...t}){return Qe(_e.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Hd(e){return Qe(_e.Description,{...e})}function _d(e){return Qe(_e.Close,{...e})}var j4=Object.assign(zd,{Title:Vd,Description:Hd,Close:_d});import{useEffect as Bd,useRef as Wd,useState as $d}from"react";import{jsx as Yn}from"react/jsx-runtime";var Ud=`
|
|
2
|
+
import{$ as Mp,$a as w0,$b as za,$c as sr,$d as Kg,A as up,Aa as r0,Ab as $0,Ac as Ef,Ad as ja,B as ua,Ba as or,Bb as U0,Bc as If,Bd as Cg,C as pa,Ca as o0,Cb as Ma,Cc as Af,Cd as kg,D as pp,Da as a0,Db as G0,Dc as Of,Dd as Pg,E as fp,Ea as n0,Eb as j0,Ec as zf,Ed as Sg,F as gp,Fa as i0,Fb as K0,Fc as Ba,Fd as Rg,G as tr,Ga as ya,Gb as nr,Gc as Vf,Gd as Tg,H as bp,Ha as s0,Hb as Y0,Hc as Hf,Hd as Lg,I as rr,Ia as l0,Ib as Z0,Ic as _f,Id as Mg,J as hp,Ja as wa,Jb as q0,Jc as Wa,Jd as Dg,K as vp,Ka as c0,Kb as X0,Kc as $a,Kd as Eg,L as xp,La as d0,Lb as J0,Lc as Ff,Ld as Ig,M as yp,Ma as m0,Mb as Da,Mc as Bf,Md as Ag,N as fa,Na as u0,Nb as Q0,Nc as Wf,Nd as Og,O as ga,Oa as p0,Ob as ef,Oc as $f,Od as zg,P as ba,Pa as f0,Pb as tf,Pc as ir,Pd as Vg,Q as ha,Qa as g0,Qb as rf,Qc as Uf,Qd as Hg,R as va,Ra as b0,Rb as Ea,Rc as Gf,Rd as _g,S as wp,Sa as h0,Sb as Ia,Sc as jf,Sd as Fg,T as Np,Ta as v0,Tb as Aa,Tc as Kf,Td as Bg,U as Cp,Ua as Na,Ub as Oa,Uc as Yf,Ud as Wg,V as kp,Va as ar,Vb as of,Vc as Zf,Vd as $g,W as Pp,Wa as Ca,Wb as af,Wc as qf,Wd as Ka,X as Sp,Xa as ka,Xb as nf,Xc as Xf,Xd as Ya,Y as Rp,Ya as x0,Yb as sf,Yc as Jf,Yd as Ug,Z as Tp,Za as y0,Zb as lf,Zc as Qf,Zd as Gg,_ as Lp,_a as Pa,_b as cf,_c as eg,_d as jg,a as rp,aa as Dp,ab as N0,ac as df,ad as lr,ae as Yg,b as na,ba as Ep,bb as C0,bc as mf,bd as tg,be as Zg,c as op,ca as Ip,cb as Sa,cc as uf,cd as rg,ce as qg,d as st,da as Ap,db as Ra,dc as pf,dd as og,de as Xg,e as Jt,ea as Op,eb as Ta,ec as ff,ed as ag,ee as Jg,f as ap,fa as zp,fb as k0,fc as gf,fd as ng,fe as Qg,g as lt,ga as Vp,gb as P0,gc as bf,gd as ig,ge as eb,h as ct,ha as Hp,hb as S0,hc as hf,hd as sg,he as tb,i as Yr,ia as _p,ib as R0,ic as vf,id as Ua,ie as rb,j as ia,ja as Fp,jb as T0,jc as xf,jd as lg,je as ob,k as np,ka as Bp,kb as Zr,kc as Va,kd as cg,ke as Pt,l as sa,la as Wp,lb as L0,lc as yf,ld as dg,le as ab,m as ip,ma as $p,mb as M0,mc as wf,md as mg,me as nb,n as sp,na as Up,nb as D0,nc as Nf,nd as ug,ne as ib,o as la,oa as Gp,ob as La,oc as Ha,od as pg,oe as sb,p as ca,pa as jp,pb as E0,pc as Cf,pd as fg,pe as Za,q as da,qa as xa,qb as I0,qc as kf,qd as gg,qe as lb,r as ma,ra as Kp,rb as A0,rc as _a,rd as dt,re as cb,s as kt,sa as Yp,sb as O0,sc as Pf,sd as bg,se as db,t as lp,ta as Zp,tb as z0,tc as Fa,td as hg,te as mb,u as ke,ua as qp,ub as V0,uc as Sf,ud as vg,ue as ub,v as cp,va as Xp,vb as H0,vc as Rf,vd as xg,ve as pb,w as Qt,wa as Jp,wb as _0,wc as Tf,wd as yg,we as fb,x as dp,xa as Qp,xb as F0,xc as Lf,xd as Ga,y as mp,ya as e0,yb as B0,yc as Mf,yd as wg,z as er,za as t0,zb as W0,zc as Df,zd as Ng}from"./chunk-OMIL7DJG.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as jr,b as Nt,c as Yo,d as Zo,e as Ct,f as qo,g as Xo,h as je,i as Kr,j as Jo,k as _,l as Qo,m as Ce,n as ea,o as ta,p as ra,q as ge,r as qt,s as i,t as Xt,u as oa,v as aa}from"./chunk-F3T5LOC2.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as Bi}from"lucide-react";import*as dr from"react";import{jsx as cr,jsxs as Gi}from"react/jsx-runtime";var yb=ie.Root,Wi=dr.forwardRef(({className:e,...t},r)=>cr(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Wi.displayName="AccordionItem";var $i=dr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?Bi:dt;return cr(ie.Header,{className:"flex",children:Gi(ie.Trigger,{ref:a,className:i("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,cr(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});$i.displayName=ie.Trigger.displayName;var Ui=dr.forwardRef(({className:e,children:t,...r},o)=>cr(ie.Content,{ref:o,className:i("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}));Ui.displayName=ie.Content.displayName;import{cva as ji}from"class-variance-authority";import*as mr from"react";import{jsx as qr}from"react/jsx-runtime";var Ki=ji("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"}}),Yi=mr.forwardRef(({className:e,variant:t,...r},o)=>qr("div",{ref:o,role:"alert",className:i(Ki({variant:t}),e),...r}));Yi.displayName="Alert";var Zi=mr.forwardRef(({className:e,...t},r)=>qr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Zi.displayName="AlertTitle";var qi=mr.forwardRef(({className:e,...t},r)=>qr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));qi.displayName="AlertDescription";import{sha256 as Xi}from"js-sha256";import{useState as Ji}from"react";import{jsx as Xr}from"react/jsx-runtime";function Qi(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/${e.id}`;return e.email?`https://0.gravatar.com/avatar/${Xi(e.email)}?d=${t}`:t}function Tb({user:e={},className:t}){if(!e)return Xr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ji(Qi(e));return Xr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar/${e.id}`)}})}function Lb({id:e,className:t}){return Xr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as es}from"class-variance-authority";import{jsx as rs}from"react/jsx-runtime";var ts=es("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 ur({className:e,variant:t,...r}){return rs("span",{className:i(ts({variant:t}),e),...r})}import{cva as ls}from"class-variance-authority";import{forwardRef as cs}from"react";import*as be from"@radix-ui/react-tooltip";import os from"linkify-react";import{HelpCircle as as}from"lucide-react";import ns from"next/link";import{useState as is}from"react";import{Fragment as ss,jsx as U,jsxs as Ke}from"react/jsx-runtime";function $b({children:e}){return U(be.Provider,{delayDuration:150,children:e})}function Q({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:n,delayDuration:c=0,...s}){let[m,d]=is(!1);return Ke(be.Root,{open:o?!1:m,onOpenChange:d,delayDuration:c,disableHoverableContent:n,children:[U(be.Trigger,{asChild:!0,onClick:()=>{d(!0)},onBlur:()=>{d(!1)},children:e}),U(be.Portal,{children:U(be.Content,{sideOffset:8,side:a,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,...s,children:typeof t=="string"?U("span",{className:i("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:d}):t})})]})}function Ub({title:e,cta:t,href:r,target:o,onClick:a}){return Ke("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(ns,{href:r,...o?{target:o}:{},className:i(se({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(te,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function Gb({title:e,cta:t,href:r}){return Ke("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ke(ss,{children:[" ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})]})}function jb({children:e,className:t,tooltipClassName:r}){return U("div",{className:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(os,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function Kb(e){return U(Q,{...e,children:U(as,{className:"h-4 w-4 text-neutral-500"})})}function Yb({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(Q,{content:Ke("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ke("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Xt(e||0,{full:!0})," ",t]}),a&&Ke("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Xo(a,{withAgo:!0})]})]}),children:o})}function Zb({children:e,content:t,...r}){return U(Q,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(ur,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function qb({children:e,tooltipProps:t,...r}){return U(Q,{...t,children:U("button",{type:"button",...r,className:i("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 pr({children:e,tooltipProps:t}){return t?U(Q,{...t,children:U("div",{children:e})}):e}import{jsx as mt,jsxs as qa}from"react/jsx-runtime";var se=ls("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:i("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"}}),te=cs(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:s,disabledTooltip:m,right:d,...l},u)=>m?mt(Q,{content:m,children:qa("div",{className:i("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[c,e&&mt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&mt("kbd",{className:i("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:s})]})}):qa("button",{ref:u,type:l.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",l.disabled||n?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:l.disabled||n,...l,children:[n?mt(ke,{}):c||null,e&&mt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&mt("kbd",{className:i("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:s}),d]}));te.displayName="Button";import{cva as ds}from"class-variance-authority";import{createContext as ms}from"react";import{jsx as Xa}from"react/jsx-runtime";var us=ds("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"}}}),St=ms({variant:"loose",loading:!1});function Ja({variant:e="loose",loading:t=!1,className:r,children:o}){return Xa("ul",{className:i(us({variant:e,loading:t}),r),"data-variant":e,children:Xa(St.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ps}from"class-variance-authority";import{createContext as fs,useContext as gs,useEffect as bs,useRef as hs,useState as vs}from"react";import{jsx as Qa,jsxs as ws}from"react/jsx-runtime";var xs=ps("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"}}}),ys="w-full py-2.5 px-4",Jr=fs({hovered:!1});function en({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:s}=gs(St),m=hs(null),[d,l]=vs(!1);bs(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var f;((f=m.current)==null?void 0:f.matches(":hover"))===!1&&l(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||je(p));return ws("li",{ref:m,className:i(xs({variant:s}),e),onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),"data-hover-state-enabled":n,children:[c,Qa("div",{className:i(ys,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Qa(Jr.Provider,{value:{hovered:d},children:r})})]})}var y1=Object.assign(Ja,{Card:Object.assign(en,{Context:Jr}),Context:St});import Ns from"embla-carousel-autoplay";import Cs from"embla-carousel-react";import{ArrowLeft as ks,ArrowRight as Ps}from"lucide-react";import{createContext as Ss,forwardRef as Tt,useCallback as Rt,useContext as Rs,useEffect as Qr,useState as eo}from"react";import{jsx as Pe,jsxs as on}from"react/jsx-runtime";var to=2e3,tn=Ss(null);function he(){let e=Rs(tn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function rn(){let{api:e}=he(),[t,r]=eo(0),o=Rt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Qr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Ts=Tt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...s},m)=>{let[d,l]=Cs({...t,axis:e==="horizontal"?"x":"y"},[...o?[Ns(typeof o=="object"?o:{delay:to})]:[],...a||[]]),[u,p]=eo(!1),[f,b]=eo(!1),h=Rt(w=>{!w||(p(w.canScrollPrev()),b(w.canScrollNext()))},[]),v=Rt(()=>{l==null||l.scrollPrev()},[l]),y=Rt(()=>{l==null||l.scrollNext()},[l]),N=Rt(w=>{w.key==="ArrowLeft"?(w.preventDefault(),v()):w.key==="ArrowRight"&&(w.preventDefault(),y())},[v,y]);return Qr(()=>{!l||!r||r(l)},[l,r]),Qr(()=>{if(!!l)return h(l),l.on("reInit",h),l.on("select",h),()=>{l==null||l.off("select",h)}},[l,h]),Pe(tn.Provider,{value:{carouselRef:d,api:l,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:y,canScrollPrev:u,canScrollNext:f},children:Pe("div",{ref:m,onKeyDownCapture:N,className:i("relative",n),role:"region","aria-roledescription":"carousel",...s,children:c})})});Ts.displayName="Carousel";var Ls=Tt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=he();return Pe("div",{ref:o,className:"overflow-hidden",children:Pe("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Ls.displayName="CarouselContent";var Ms=Tt(({className:e,...t},r)=>{let{orientation:o}=he();return Pe("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});Ms.displayName="CarouselItem";var Ds=Tt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:n}=he();return on("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Pe(ks,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Previous slide"})]})});Ds.displayName="CarouselPrevious";var Es=Tt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:n}=he();return on("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Pe(Ps,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Next slide"})]})});Es.displayName="CarouselNext";import{cva as Is}from"class-variance-authority";import{motion as As}from"framer-motion";import{ChevronLeft as Os,ChevronRight as zs}from"lucide-react";import*as Ee from"react";import{jsx as Ye,jsxs as Lt}from"react/jsx-runtime";var Vs=Is("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 "}}}),H1=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=he(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[m,d]=Ee.useState(0),[l,u]=Ee.useState(!1),p=Ee.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),f=Ee.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Ee.useEffect(()=>{!c||(p(c),u((s==null?void 0:s.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,s,p]),Lt("div",{className:i(Vs({variant:e}),t),children:[e!=="simple"&&Lt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:f(o),children:[Ye(Os,{className:"h-4 w-4"}),Ye("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ye("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,v)=>Lt("button",{onClick:f(()=>c.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ye("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",l&&v===m&&"w-6 bg-black/20"),children:l&&v===m&&Ye(As.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??to)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Lt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Lt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:f(r),children:[Ye(zs,{className:"h-4 w-4"}),Ye("span",{className:"sr-only",children:"Next slide"})]})]})};import Hs from"embla-carousel-react";import{forwardRef as _s,useCallback as Fs,useEffect as Bs}from"react";import{jsx as fr}from"react/jsx-runtime";var K1=({className:e,...t})=>{let{api:r}=he(),[o,a]=Hs({dragFree:!0}),n=Fs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Bs(()=>{if(!(!r||!a))return n(r),r.on("reInit",n),r.on("select",n),()=>{r==null||r.off("reInit",n),r==null||r.off("select",n)}},[r,a,n]),fr("div",{className:"overflow-hidden",ref:o,children:fr("div",{className:i("mx-4 flex gap-4",e),...t})})},Y1=_s(({index:e,className:t,...r},o)=>{let{api:a}=he(),n=rn();return fr("div",{ref:o,children:fr("button",{type:"button",onClick:()=>{var s;if(!a)return;let c=(s=a.plugins())==null?void 0:s.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===n}):t,...r})})});import*as Mt from"@radix-ui/react-checkbox";import{forwardRef as Ws}from"react";import{jsx as ro,jsxs as $s}from"react/jsx-runtime";var ut=Ws(({className:e,...t},r)=>ro(Mt.Root,{ref:r,className:i("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 data-[state=indeterminate]:bg-blue-500",e),...t,children:$s(Mt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[ro(ar,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),ro(lr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));ut.displayName=Mt.Root.displayName;import{Command as Et,CommandInput as Vl,CommandItem as Hl,useCommandState as _l}from"cmdk";import{ChevronDown as Fl}from"lucide-react";import{forwardRef as Bl,isValidElement as Wl,useCallback as $l,useEffect as vr,useRef as Ul,useState as Dt}from"react";import{motion as Al}from"framer-motion";import{forwardRef as Ol,useRef as zl}from"react";import{useEffect as Us,useState as Gs}from"react";function an(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function oo(e,t){let[r,o]=Gs(an(e)??t);return Us(()=>{let n=an(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function js(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function oh(e,t){if(!js(t)){let o=t,a=m=>{let d=o[m];return Object.fromEntries(d.all.map(l=>[l,d.defaultVisible.includes(l)]))},n=Object.fromEntries(Object.keys(o).map(m=>[m,a(m)])),[c,s]=oo(e,n);return{columnVisibility:c,setColumnVisibility:(m,d)=>{let l=o[m].all,u=c[m]||{},p=Object.fromEntries(l.map(f=>[f,f in d?d[f]:u[f]??!1]));s({...c,[m]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(s=>[s,o.defaultVisible.includes(s)])),[n,c]=oo(e,a);return{columnVisibility:n,setColumnVisibility:s=>{let m=o.all,d=n||{},l=Object.fromEntries(m.map(u=>[u,u in s?s[u]:d[u]??!1]));c(l)}}}}import ao from"js-cookie";import{useEffect as Ks,useState as Ys}from"react";function sh(e,t,r){let[o,a]=Ys(()=>{let c=ao.get(e);return c?JSON.parse(c):t});return Ks(()=>{let c=()=>{let s=ao.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),ao.set(e,JSON.stringify(c),r)}]}import{useCallback as Zs,useEffect as qs,useRef as Xs,useState as Js}from"react";var pt=(e=3e3)=>{let t=Xs(null),[r,o]=Js(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=Zs(async(c,{onSuccess:s,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),s==null||s(),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 qs(()=>()=>a(),[]),[r,n]};import{useEffect as Qs,useState as el}from"react";function uh(){let[e,t]=el(null);return Qs(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,f;let m=s[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let b=1;b<s.length;b++){let h=s[b];if(!h)break;(h.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=h)}let l=m.target;for(;l&&l.getBoundingClientRect().bottom<o;)l=(p=n.get(l))==null?void 0:p.next;for(;l&&l.getBoundingClientRect().top>d;)l=(f=n.get(l))==null?void 0:f.prev;l&&t(l.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),n=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useEffect as tl,useState as rl}from"react";function bh(){let[e,t]=rl(null);return tl(()=>{let r=window.location.hostname;Qo.has(r)?t("app"):ta.has(r)?t("partners"):ea.has(r)&&t("admin")},[]),{subdomain:e}}import{useCallback as ol}from"react";function yh(e){return{handleKeyDown:ol(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 al,useState as nl}from"react";function kh(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=nl(o??!1);return al(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,l=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};n(l.top<u.bottom&&l.bottom>u.top&&l.left<u.right&&l.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let s=null;return e.current&&(s=new IntersectionObserver(c),s.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),s==null||s.disconnect()}},[e,r]),a}import{useEffect as il,useState as sl}from"react";function Rh(){let[e,t]=sl(!1);return il(()=>{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 ll,useState as cl}from"react";function Dh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=cl(),s=(n==null?void 0:n.isIntersecting)&&a,m=([d])=>{c(d)};return ll(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!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,s]),n}import{createContext as dl,useCallback as ml,useContext as ul,useEffect as nn,useId as pl,useState as fl}from"react";import{jsx as gl}from"react/jsx-runtime";var sn=dl({listeners:[],setListeners:()=>{}});function Vh({children:e}){let[t,r]=fl([]);return gl(sn.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ie(e,t,r={}){let o=pl(),{listeners:a,setListeners:n}=ul(sn),c=ml(s=>{if(r.enabled===!1)return;let m=s.target,d=document.getElementById("modal-backdrop"),l=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!l!=!!r.sheet)return;let u=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(b=>b.enabled!==!1&&!!d==!!b.modal&&!!l==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(u):b.key===u));!p.length||qo(p,(b,h)=>(h.priority??0)-(b.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);nn(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),nn(()=>(n(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>n(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as bl}from"sonner";import hl from"swr";function Wh(e,t){let{data:r,isLoading:o,mutate:a}=hl(e,ge);return{data:r,isLoading:o,update:async(n,c)=>bl.promise(a(n(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as mn,useMemo as Cl}from"react";import{useEffect as ln,useState as vl}from"react";function cn({pageSize:e,page:t,onPageChange:r}){let[o,a]=vl({pageIndex:t,pageSize:e});return ln(()=>{a(n=>({...n,pageIndex:t}))},[t]),ln(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as xl,useRouter as yl,useSearchParams as wl}from"next/navigation";import{useCallback as Nl}from"react";function dn(){let e=xl(),t=yl(),r=wl(),o=Object.fromEntries(r),a=(c,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let l=new URLSearchParams;r.forEach((u,p)=>{var f;(f=s.include)!=null&&f.includes(p)&&l.set(p,u)}),m=l}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(l=>m.delete(l)),c&&Object.entries(c).forEach(([l,u])=>m.set(l,u));let d=m.toString();return d.length>0?`?${d}`:""},n=Nl(({set:c,del:s,replace:m,scroll:d=!0,getNewPath:l,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,v])=>p.set(h,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(h=>p.delete(h)):p.delete(s));let f=p.toString(),b=`${e}${f.length>0?`?${f}`:""}`;if(l)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:n,getQueryString:a}}function ev(e=aa){let{searchParams:t,queryParams:r}=dn(),o=Cl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:n}=cn({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return mn(()=>{let c=parseInt(t.get("page")||"1")||1;n(s=>({...s,pageIndex:c}))},[t.get("page")]),mn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as kl}from"react";function ov(){kl(()=>{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 Pl,useState as Sl}from"react";function gr(e){let[t,r]=Sl(),o=([a])=>{r(a)};return Pl(()=>{let a=e==null?void 0:e.current;if(!a)return;let n=new ResizeObserver(o);return n.observe(a),()=>n.disconnect()},[e]),t}import{useCallback as Rl,useEffect as un,useState as Tl}from"react";function pn(e,{container:t}={}){let[r,o]=Tl(!1),a=Rl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return un(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),un(()=>{a()},[a]),r}import{useCallback as Ll,useEffect as Ml,useState as Dl}from"react";function Ae(e){let[t,r]=Dl(1),o=Ll(()=>{if(!e.current)return;let{scrollTop:n,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(n/(c-s),1))},[]),a=gr(e);return Ml(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as El}from"react";import{toast as gn}from"sonner";import{jsx as br,jsxs as fn}from"react/jsx-runtime";function Il({id:e,message:t,undo:r}){let o=()=>{r(),gn.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return El(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),fn("div",{className:"flex w-full items-center justify-between space-x-2",children:[fn("div",{className:"flex items-center space-x-2",children:[br(da,{}),br("p",{className:"font-medium",children:t})]}),br("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 vv(){return({id:t,message:r,undo:o,duration:a})=>gn(br(Il,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as bn}from"react/jsx-runtime";var Se=Ol(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var d,l;let s=zl(null),m=gr(s);return bn(Al.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((l=m==null?void 0:m.contentRect)==null?void 0:l.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...n,children:bn("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});Se.displayName="AnimatedSizeContainer";import*as Oe from"@radix-ui/react-popover";import{Drawer as ft}from"vaul";import{jsx as Re,jsxs as hr}from"react/jsx-runtime";function ve({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:n,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:d,sticky:l,onEscapeKeyDown:u,onWheel:p}){let{isMobile:f}=Y();return c||f?hr(ft.Root,{open:a,onOpenChange:n,children:[Re(ft.Trigger,{className:"sm:hidden",asChild:!0,children:e}),hr(ft.Portal,{children:[Re(ft.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),hr(ft.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(ft.Overlay,{})]})]}):hr(Oe.Root,{open:a,onOpenChange:n,children:[Re(Oe.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Re(Oe.Portal,{children:Re(Oe.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",s),sticky:l,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as xr,jsx as E,jsxs as Te}from"react/jsx-runtime";function Gl(e,t){return e===!0}function Kv({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,icon:n,placeholder:c="Select...",searchPlaceholder:s="Search...",emptyState:m,createLabel:d,onCreate:l,buttonProps:u,shortcutHint:p,caret:f,side:b,open:h,onOpenChange:v,onSearchChange:y,shouldFilter:N=!0,inputRight:w,inputClassName:k,optionRight:C,optionClassName:A,matchTriggerWidth:B,hideSearch:T=!1,children:P}){let G=Gl(e,r),x=Array.isArray(t)?t:t?[t]:[],{isMobile:S}=Y(),[R,L]=Dt(!1),X=h??R,M=v??L,[fe,$r]=Dt(""),[Go,Ur]=Dt(!1),[Gr,Hi]=Dt(void 0),[_i,jo]=Dt(!1),Fi=V=>{var it;if(o==null||o(V),!!r)if(G){let Ue=x.some(({value:Ge})=>Ge===V.value);r(Ue?x.filter(({value:Ge})=>Ge!==V.value):[...x,V])}else r(x.length&&((it=x[0])==null?void 0:it.value)===V.value?null:V),M(!1)},Ko=$l((V,it)=>it===""?[...V.filter(Ue=>Ue.first&&!x.some(Ge=>Ge.value===Ue.value)),...x,...V.filter(Ue=>!Ue.first&&!x.some(Ge=>Ge.value===Ue.value))]:V,[x]);return vr(()=>{Go&&(Hi(a&&Ko(a,fe)),Ur(!1))},[Go,a,Ko,fe]),vr(()=>{Ur(!0)},[a]),vr(()=>{X||($r(""),Ur(!0))},[X]),vr(()=>y==null?void 0:y(fe),[fe]),E(ve,{openPopover:X,setOpenPopover:M,align:"start",side:b,onWheel:V=>{V.stopPropagation()},popoverContentClassName:i(B&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(Se,{width:!S&&!B,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Te(Et,{loop:!0,shouldFilter:N,children:[!T&&Te("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Vl,{placeholder:s,value:fe,onValueChange:$r,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",k),onKeyDown:V=>{(V.key==="Escape"||V.key==="Backspace"&&!fe)&&(V.preventDefault(),V.stopPropagation(),M(!1))}}),w&&E("div",{className:"mr-2",children:w}),p&&E("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:p})]}),E(jl,{children:E(Et.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Gr!==void 0?Te(xr,{children:[Gr.map(V=>E(Kl,{option:V,multiple:G,selected:x.some(({value:it})=>it===V.value),onSelect:()=>Fi(V),right:C==null?void 0:C(V),className:A},`${V.label}, ${V.value}`)),fe.length>0&&l&&Te(Hl,{className:i("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",A),onSelect:async()=>{jo(!0),await(l==null?void 0:l(fe))&&($r(""),M(!1)),jo(!1)},children:[_i?E(ke,{className:"size-4 shrink-0"}):E(dt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(d==null?void 0:d(fe))||`Create "${fe}"`})]}),N?E(Zl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:m||"No matches"}):Gr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:m||"No matches"}):null]}):E(Et.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(ke,{})})})})})]})}),children:E(te,{variant:"secondary",...u,className:i(u==null?void 0:u.className,"flex gap-2"),textWrapperClassName:i(u==null?void 0:u.textWrapperClassName,"w-full flex items-center justify-start"),text:Te(xr,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:P||x.map(V=>V.label).join(", ")||c}),f&&(f===!0?E(Fl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:n?hn(n)?n:E(n,{className:"size-4 shrink-0"}):void 0})})}var jl=({children:e})=>{let t=Ul(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Te(xr,{children:[E("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),E("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 Kl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Te(xr,{children:[E(Yl,{disabledTooltip:e.disabledTooltip,children:Te(Et.Item,{className:i("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",n),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&E("div",{className:"shrink-0 text-neutral-600",children:o?E(Ca,{className:"size-4 text-neutral-600"}):E(ka,{className:"size-4 text-neutral-400"})}),Te("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:hn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(ar,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(Et.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Yl=({children:e,disabledTooltip:t})=>t?E(Q,{content:t,children:E("div",{children:e})}):e,hn=e=>Wl(e),Zl=Bl((e,t)=>_l(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as yr,format as ql,isSameMonth as Xl}from"date-fns";import{ChevronLeft as vn,ChevronRight as xn,ChevronsLeft as Jl,ChevronsRight as Ql}from"lucide-react";import{forwardRef as ec,useRef as tc}from"react";import{DayPicker as rc,useDayPicker as oc,useDayRender as ac,useNavigation as nc}from"react-day-picker";import{Fragment as ic,jsx as oe,jsxs as wr}from"react/jsx-runtime";var It=ec(({onClick:e,icon:t,disabled:r,...o},a)=>oe("button",{ref:a,type:"button",disabled:r,className:i("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:oe(t,{className:"h-full w-full shrink-0"})}));It.displayName="NavigationButton";function yn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:s,...m}){return oe(rc,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:n,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("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",...s},components:{IconLeft:()=>oe(vn,{className:"h-4 w-4"}),IconRight:()=>oe(xn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:l,nextMonth:u,previousMonth:p,currentMonth:f,displayMonths:b}=nc(),{numberOfMonths:h,fromDate:v,toDate:y}=oc(),N=b.findIndex(P=>Xl(d.displayMonth,P)),w=N===0,k=N===b.length-1,C=h>1&&(w||!k),A=h>1&&(k||!w),B=()=>{let P=yr(f,-1);p&&(!v||P.getTime()>=v.getTime())&&l(P)},T=()=>{let P=yr(f,1);u&&(!y||P.getTime()<=y.getTime())&&l(P)};return wr("div",{className:"flex items-center justify-between",children:[wr("div",{className:"flex items-center gap-1",children:[o&&!A&&oe(It,{disabled:a||!p||v&&yr(f,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:B,icon:Jl}),!A&&oe(It,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&l(p),icon:vn})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:ql(d.displayMonth,"LLLL yyy",{locale:n})}),wr("div",{className:"flex items-center gap-1",children:[!C&&oe(It,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&l(u),icon:xn}),o&&!C&&oe(It,{disabled:a||!u||y&&yr(f,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:T,icon:Ql})]})]})},Day:({date:d,displayMonth:l})=>{let u=tc(null),{activeModifiers:p,buttonProps:f,divProps:b,isButton:h,isHidden:v}=ac(d,l,u),{selected:y,today:N,disabled:w,range_middle:k}=p;if(v)return oe(ic,{});if(!h)return oe("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:C,...A}=f;return wr("button",{ref:u,...A,type:"button",children:[C,N&&oe("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!y,"!bg-white":y,"!bg-blue-400":y&&k,"text-neutral-400":w})})]})}},...m})}import{enUS as hc}from"date-fns/locale";import{useEffect as mo,useMemo as Nn,useRef as vc,useState as Cr}from"react";import{Command as no}from"cmdk";import{Lock as sc}from"lucide-react";import{jsx as Ze,jsxs as lc}from"react/jsx-runtime";var io=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,n=d=>"date"in d,c=(d,l)=>d.getDate()===l.getDate()&&d.getMonth()===l.getMonth()&&d.getFullYear()===l.getFullYear(),s=(d,l)=>{let u=d.from,p=l.from,f=!1;u&&p&&c(u,p)&&(f=!0);let b=d.to,h=l.to,v=!1;return b&&h&&c(b,h)&&(v=!0),f&&v},m=d=>{if(o)return o===d.id;if(a(d)){let l=r;return l&&s(l,d.dateRange)}else if(n(d)){let l=r;return l&&c(l,d.date)}return!1};return Ze(no,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ze(no.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,l)=>lc(no.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:i("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:[Ze("span",{children:d.label}),d.requiresUpgrade?Ze(sc,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Ze("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&&Ze(Q,{side:"bottom",content:d.tooltipContent,children:Ze("div",{className:"absolute inset-0 cursor-not-allowed"})})]},l))})})};io.displayName="DatePicker.Presets";import{format as ze}from"date-fns";import{createContext as cc}from"react";var so=cc({isOpen:!1,setIsOpen:()=>{}}),dc=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},lo=(e,t,r=!1)=>{let o=!dc(),a;return r?a=o?ze(e,"d MMM, yyyy h:mm a",{locale:t}):ze(e,"d MMM, yyyy HH:mm",{locale:t}):a=ze(e,"d MMM, yyyy",{locale:t}),a},wn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:s}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(l=>{var u,p,f,b,h,v;if("date"in l){let y=l.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${l.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${l.label} is after toYear ${d}.`);if(a&&l.date.getMonth()<a.getMonth())throw new Error(`Preset ${l.label} is before fromMonth ${a}.`);if(n&&l.date.getMonth()>n.getMonth())throw new Error(`Preset ${l.label} is after toMonth ${n}.`);if(c&&l.date.getDate()<c.getDate())throw new Error(`Preset ${l.label} is before fromDay ${c}.`);if(s&&l.date.getDate()>s.getDate())throw new Error(`Preset ${l.label} is after toDay ${ze(s,"MMM dd, yyyy")}.`)}if("dateRange"in l){let y=(u=l.dateRange.from)==null?void 0:u.getFullYear(),N=(p=l.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${l.label}'s 'from' is before fromYear ${m}.`);if(N&&r&&N>r)throw new Error(`Preset ${l.label}'s 'to' is after toYear ${d}.`);if(a){let w=(f=l.dateRange.from)==null?void 0:f.getMonth();if(w&&w<a.getMonth())throw new Error(`Preset ${l.label}'s 'from' is before fromMonth ${ze(a,"MMM, yyyy")}.`)}if(n){let w=(b=l.dateRange.to)==null?void 0:b.getMonth();if(w&&w>n.getMonth())throw new Error(`Preset ${l.label}'s 'to' is after toMonth ${ze(n,"MMM, yyyy")}.`)}if(c){let w=(h=l.dateRange.from)==null?void 0:h.getDate();if(w&&w<c.getDate())throw new Error(`Preset ${l.dateRange.from}'s 'from' is before fromDay ${ze(c,"MMM dd, yyyy")}.`)}if(s){let w=(v=l.dateRange.to)==null?void 0:v.getDate();if(w&&w>s.getDate())throw new Error(`Preset ${l.label}'s 'to' is after toDay ${ze(s,"MMM dd, yyyy")}.`)}}})}};import{cva as mc}from"class-variance-authority";import{Calendar as uc,ChevronDown as pc}from"lucide-react";import{forwardRef as fc}from"react";import{jsx as Nr,jsxs as bc}from"react/jsx-runtime";var gc=mc(["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"}}}),co=fc(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>bc("button",{ref:n,className:i(gc({hasError:o}),e),...a,children:[Nr(uc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),Nr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?Nr("span",{className:"text-neutral-400",children:r}):null)}),Nr(pc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));co.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as Cn}from"react/jsx-runtime";var xc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:s,showYearNavigation:m=!1,locale:d=hc,placeholder:l="Select date range",hasError:u,align:p="center",className:f,...b})=>{let{isDesktop:h}=Y(),[v,y]=Cr(!1),[N,w]=Cr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,C]=Cr((N==null?void 0:N.dateRange)??e??t??void 0),[A,B]=Cr(k==null?void 0:k.to),T=Nn(()=>k,[v]);mo(()=>{C(e)},[e]),mo(()=>{let L=a==null?void 0:a.find(({id:X})=>X===r);w(L),C((L==null?void 0:L.dateRange)??e??t)},[a,r]),mo(()=>{v?k&&B(k.to):B(k==null?void 0:k.to)},[v]);let P=(L,X)=>{let M=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:X}:L;C(M),w(void 0),(M==null?void 0:M.from)&&(M==null?void 0:M.to)&&(o==null||o(M),y(!1))},G=L=>{C(L.dateRange),w(L),o==null||o(L.dateRange,L),y(!1)},x=()=>{C(T),y(!1)},S=L=>{L||x(),y(L)},R=Nn(()=>k?`${k.from?lo(k.from,d):""} - ${k.to?lo(k.to,d):""}`:null,[k,d]);return Ie((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let X=a==null?void 0:a.find(M=>M.shortcut===L.key);X&&G(X)}),ae(so.Provider,{value:{isOpen:v,setIsOpen:y},children:ae(ve,{align:p,openPopover:v,setOpenPopover:S,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:Cn("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&&ae(yc,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(io,{currentPresetId:r,currentValue:k,presets:a,onSelect:G})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(yn,{mode:"range",selected:k,onSelect:P,month:A,onMonthChange:B,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...b})})]})}),children:ae(co,{placeholder:l,disabled:n,className:f,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)??R})})})};function Dx({presets:e,...t}){return e&&wn(e,t),ae(xc,{presets:e,...t})}function yc({children:e}){let t=vc(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Cn("div",{className:"relative sm:h-full",children:[ae("div",{ref:t,onScroll:o,className:i("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}),ae("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{useId as wc}from"react";import{jsx as kr,jsxs as Nc}from"react/jsx-runtime";function _x({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=wc();return Nc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[kr("defs",{children:kr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:kr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),kr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import Cc from"next/link";import{useEffect as kc,useState as kn}from"react";import Pc from"swr";import{jsx as uo,jsxs as Pn}from"react/jsx-runtime";function Sn({className:e}){let{data:t}=Pc("https://status.dub.co/api/v1/summary",ge),[r,o]=kn("bg-neutral-200"),[a,n]=kn("Loading status...");return kc(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:s,name:m}=c[0],d=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(m),o(d)}else n("All systems operational"),o("bg-green-500")},[t]),Pn(Cc,{href:"https://status.dub.co",target:"_blank",className:i("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:[Pn("div",{className:"relative size-2",children:[uo("div",{className:i("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")}),uo("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),uo("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Pr,jsxs as Rn}from"react/jsx-runtime";function Kx({icon:e,title:t,description:r,learnMore:o,children:a}){return Rn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Pr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Pr(e,{className:"size-6 text-neutral-800"})}),Pr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&Rn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Pr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Sc}from"class-variance-authority";import{useState as Tn}from"react";import{toast as Ln}from"sonner";import{Fragment as Tc,jsx as xe,jsxs as fo}from"react/jsx-runtime";var Mn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],po={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:Mn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...Mn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Rc=Sc("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 a2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:s=La,customPreview:m,accept:d="any",imageSrc:l,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:f=!0,content:b,maxFileSizeMB:h=0,targetResolution:v,accessibilityLabel:y="File upload",disabled:N=!1}){let[w,k]=Tn(!1),[C,A]=Tn(null),B=async T=>{let P="dataTransfer"in T?T.dataTransfer.files&&T.dataTransfer.files[0]:T.target.files&&T.target.files[0];if(!P)return;if(A(P.name),h>0&&P.size/1024/1024>h){Ln.error(`File size too big (max ${h} MB)`);return}let G=po[d].types;if(G.length&&!G.includes(P.type)){Ln.error(po[d].errorMessage??"File type not supported");return}let x=P;if(v&&P.type.startsWith("image/"))try{let S=await Zo(P,v),R=await fetch(S).then(L=>L.blob());x=new File([R],P.name,{type:P.type})}catch(S){console.error("Error resizing image:",S)}if(t){let S=new FileReader;S.onload=R=>{var L;return r==null?void 0:r({src:(L=R.target)==null?void 0:L.result,file:x})},S.readAsDataURL(x);return}r==null||r({file:x})};return fo("label",{className:i(Rc({variant:o}),N?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[u&&xe("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:xe(kt,{})}),xe("div",{className:"absolute inset-0 z-[5]",onDragOver:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragEnter:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragLeave:T=>{T.preventDefault(),T.stopPropagation(),k(!1)},onDrop:async T=>{T.preventDefault(),T.stopPropagation(),B(T),k(!1)}}),fo("div",{className:i("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",w&&!N&&"cursor-copy border-black bg-neutral-50 opacity-100",l?i("opacity-0",f&&!N&&"group-hover:opacity-100"):i(!N&&"group-hover:bg-neutral-50")),children:[xe(s,{className:i("size-7 transition-all duration-75",N?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",w?"scale-110":"scale-100"),n)}),b!==null&&xe("div",{className:i("mt-2 text-center text-sm text-neutral-500",N&&"text-neutral-400"),children:b??xe(Tc,{children:fo("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),xe("span",{className:"sr-only",children:y})]}),l&&(m??xe("img",{src:l,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),p&&xe("div",{className:"sr-only mt-1 flex shadow-sm",children:xe("input",{id:e,type:"file",accept:po[d].types.join(","),onChange:B,disabled:N},C)})]})}import{AnimatePresence as Lc,motion as Dn}from"framer-motion";import{X as Mc}from"lucide-react";import Dc from"next/link";import{isValidElement as Ec}from"react";import{Fragment as Ic,jsx as ee,jsxs as At}from"react/jsx-runtime";function In({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ie("Escape",o,{priority:1}),ee(Se,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:At("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[ee("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:ee(Lc,{children:t==null?void 0:t.map(({key:n,value:c})=>{if(n==="loader")return ee(Dn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${c}`);let s=e.find(m=>m.key===n);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(m=>{var f,b,h,v;let d=(f=s.options)==null?void 0:f.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),l=(d==null?void 0:d.icon)??((b=s.getOptionIcon)==null?void 0:b.call(s,m,{key:s.key,option:d}))??s.icon,u=(d==null?void 0:d.label)??((h=s.getOptionLabel)==null?void 0:h.call(s,m,{key:s.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return At(Dn.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:[At("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[ee("span",{className:"shrink-0 text-neutral-600",children:En(s.icon)?s.icon:ee(s.icon,{className:"h-4 w-4"})}),s.label]}),ee("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),ee("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?At(Ic,{children:[ee("span",{className:"shrink-0 text-neutral-600",children:En(l)?l:ee(l,{className:"h-4 w-4"})}),p?ee(Dc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Ct(u,30)}):Ct(u,30)]}):ee("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),ee("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(n,m),children:ee(Mc,{className:"h-3.5 w-3.5"})})]},`${n}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&At("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",ee("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 En=e=>Ec(e);import{Command as Ve,useCommandState as Ac}from"cmdk";import{ChevronDown as Oc,ListFilter as zc}from"lucide-react";import{Fragment as Vc,forwardRef as Hc,isValidElement as On,useCallback as Sr,useEffect as Rr,useImperativeHandle as _c,useRef as bo,useState as go}from"react";import{Fragment as Gc,jsx as F,jsxs as ye}from"react/jsx-runtime";function zn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:s,children:m,emptyState:d,className:l}){var P,G;let{isMobile:u}=Y(),p=bo(null),f=bo(),[b,h]=go(!1);Ie("f",()=>h(!0),{enabled:!b});let[v,y]=go(""),[N,w]=go(null),k=Sr(()=>{y(""),w(null)},[]);Rr(()=>{b||k()},[b]);let C=N?e.find(({key:x})=>x===N):null,A=Sr(x=>{p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),w(x),o==null||o(x)},[]),B=Sr(x=>{if(!C||!c)return!1;let S=c.find(({key:R})=>R===N);return(S==null?void 0:S.value)===x||S&&C.multiple&&Array.isArray(S.value)&&S.value.includes(x)},[C]),T=Sr(x=>{C&&(B(x)?r(C.key,x):t(C.key,x),C.multiple||h(!1))},[c,C,s]);return Rr(()=>{a==null||a(v)},[v]),Rr(()=>{n==null||n(N)},[N]),Rr(()=>{(C==null?void 0:C.options)&&p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight})},[C==null?void 0:C.options]),F(ve,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:x=>{N&&(x.preventDefault(),k())},content:F(Se,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ye(Ve,{loop:!0,shouldFilter:!C||C.shouldFilter!==!1,children:[ye("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[F(Bc,{placeholder:`${(C==null?void 0:C.label)||"Filter"}...`,value:v,onValueChange:y,onKeyDown:x=>{(x.key==="Escape"||x.key==="Backspace"&&!v)&&(x.preventDefault(),x.stopPropagation(),N?k():h(!1))},emptySubmit:x=>{x.preventDefault(),x.stopPropagation(),s?(t("ai",C?`${C.label} ${v}`:v),h(!1)):T(v)}}),!C&&F("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"})]}),F(Wc,{ref:p,children:ye(Ve.List,{className:i("flex w-full flex-col gap-1 p-1",C?"min-w-[100px]":"min-w-[180px]"),children:[C?((G=(P=C.options)==null?void 0:P.filter(x=>!v||!x.hideDuringSearch))==null?void 0:G.map(x=>{let S=B(x.value);return F(An,{filter:C,option:x,right:S?F(Na,{className:"h-4 w-4"}):x.right,onSelect:()=>T(x.value)},x.value)}))??F(Ve.Loading,{children:F("div",{className:"-m-1 flex items-center justify-center",style:f.current,children:F(ke,{})})}):e.filter(x=>!x.hideInFilterDropdown).map(x=>ye(Vc,{children:[F(An,{filter:x,onSelect:()=>A(x.key)}),x.separatorAfter&&F(Ve.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},x.key)),(!C||C.options)&&F($c,{search:v,askAI:s,children:d?Fc(d)?(d==null?void 0:d[N??"default"])??"No matches":d:"No matches"})]})},N)]})}),children:ye("button",{type:"button",className:i("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",l),children:[F(zc,{className:"size-4 shrink-0"}),F("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?F("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):F(Oc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Fc(e){return typeof e=="object"&&e!==null&&!On(e)}var Bc=e=>{let t=Ac(r=>r.filtered.count===0);return F(Ve.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"})},Wc=Hc(({children:e},t)=>{let r=bo(null);_c(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return ye(Gc,{children:[F("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),F("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 An({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=Y(),n=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ye(Ve.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[F("span",{className:"shrink-0 text-neutral-600",children:Uc(n)?n:F(n,{className:"h-4 w-4"})}),Ct(c,48),F("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var $c=({search:e,askAI:t,children:r})=>t&&e?ye(Ve.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[F(sa,{className:"h-4 w-4"}),ye("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ye("span",{className:"text-black",children:['"',e,'"']})]})]}):F(Ve.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Uc=e=>On(e);var L2={Select:zn,List:In};import{useMemo as jc,useState as Vn}from"react";import{jsx as qe,jsxs as Tr}from"react/jsx-runtime";function z2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[s,m]=Vn(r.defaultValue),[d,l]=Vn(!1),u=jc(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return Tr("form",{onSubmit:async p=>{p.preventDefault(),l(!0),await c({[r.name]:s}),l(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Tr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Tr("div",{className:"flex flex-col space-y-3",children:[qe("h2",{className:"text-xl font-medium",children:e}),qe("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?qe("input",{...r,type:r.type||"text",required:!0,disabled:!!n,onChange:p=>m(p.target.value),className:i("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":n})}):qe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Tr("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"?qe("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,qe("div",{className:"shrink-0",children:qe(te,{text:a,loading:d,disabled:u,disabledTooltip:n})})]})]})}import{useId as Kc}from"react";import{jsx as Lr,jsxs as Yc}from"react/jsx-runtime";function Xe({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Kc();return Yc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Lr("defs",{children:Lr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Lr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Lr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Zc}from"lucide-react";import qc,{useCallback as Xc,useState as Jc}from"react";import{jsx as Je,jsxs as ho}from"react/jsx-runtime";var Qc=qc.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=Jc(!1),c=Xc(()=>n(!a),[a,n]);return ho("div",{children:[ho("div",{className:"relative flex",children:[Je("input",{type:a?"text":t,className:i("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}),ho("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(Zc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Je("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Je(Ia,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Je(Aa,{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})]})});Qc.displayName="Input";import{flip as ad,offset as nd,size as id,useDismiss as sd,useFloating as ld,useInteractions as cd}from"@floating-ui/react";import{Command as Le,useCommandState as dd}from"cmdk";import{Check as md,ChevronDown as ud,Search as pd,X as fd}from"lucide-react";import{createContext as gd,forwardRef as Wn,useContext as wo,useEffect as vo,useMemo as _n,useRef as Fn,useState as xo}from"react";import{Drawer as gt}from"vaul";import ed from"next/image";import{memo as td,useEffect as rd,useState as Hn}from"react";import{jsx as od}from"react/jsx-runtime";var Ot=td(e=>{let[t,r]=Hn(!0),[o,a]=Hn(e.src);rd(()=>a(e.src),[e.src]);let n=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return od(ed,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:n,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as O,jsxs as le}from"react/jsx-runtime";var Mr=gd({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function u4({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:n,icon:c,inputAttrs:s,noItemsElement:m}){let{isMobile:d}=Y(),l=Fn(null),[u,p]=xo(!1),[f,b]=xo(""),[h,v]=xo(!1);vo(()=>{u&&v(!1)},[u]),vo(()=>v(!0),[f]),vo(()=>{t&&b(t.value)},[t]);let y=_n(()=>{let S=f.toLowerCase();return h?e.filter(R=>R.value.toLowerCase().includes(S)):f?e.sort((R,L)=>(L.value.toLowerCase().includes(S)?1:0)-(R.value.toLowerCase().includes(S)?1:0)):e},[h,f,e]),{refs:N,floatingStyles:w,context:k}=ld({open:u,onOpenChange:p,middleware:[nd(8),id({apply({elements:{floating:S},availableHeight:R}){Object.assign(S.style,{maxHeight:`${Math.max(75,Math.min(R,290))}px`})},padding:8}),ad({fallbackStrategy:"initialPlacement",padding:8})]}),C=sd(k,{enabled:!d||!n}),{getReferenceProps:A,getFloatingProps:B}=cd([C]),T=Fn(null),{scrollProgress:P,updateScrollProgress:G}=Ae(T),x=_n(()=>t&&t.icon?t.icon:t&&t.image?O(Ot,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||O(pd,{className:"size-4 text-neutral-400"}),[t,c]);return O(Mr.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:f,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&n?le(gt.Root,{open:u,onOpenChange:p,children:[O(gt.Trigger,{className:"sm:hidden",asChild:!0,children:O(Le,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:O(yo,{className:o,iconElement:x})})}),O(gt.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(gt.Portal,{children:[O(gt.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:l,className:"relative",shouldFilter:!1,loop:!0,children:[O("div",{className:"p-2",children:O(yo,{className:o,iconElement:x})}),u&&le(Le.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&O(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),O(Bn,{items:y})]})]})}),O(gt.Overlay,{})]})]}):le(Le,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O(yo,{className:o,iconElement:x,ref:N.setReference,...A()}),u&&le("div",{ref:N.setFloating,style:w,...B(),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:T,onScroll:G,className:"grow overflow-y-auto p-2",children:[le(Le.List,{children:[e.length===0&&f===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&O(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),O(Bn,{items:y})]}),O("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(P,2)}})]})]})})}var yo=Wn(({iconElement:e,className:t,...r},o)=>le("label",{ref:o,className:i("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:[O("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[O(bd,{}),O(hd,{})]})]})),bd=Wn((e,t)=>{let r=dd(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:n,inputValue:c,setInputValue:s,disabled:m}=wo(Mr);return O(Le.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>n(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),n(!1)):d.key==="Enter"&&r?n(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&n(!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 hd(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=wo(Mr);return O("button",{type:"button",onClick:()=>{r(n=>!n),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?O(fd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):O(ud,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Bn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=wo(Mr);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&&O(Ot,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),O("p",{className:i("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&&O(ur,{className:"text-xs",variant:"neutral",children:a.label})]}),O(md,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as No from"@radix-ui/react-label";import{cva as vd}from"class-variance-authority";import*as $n from"react";import{jsx as wd}from"react/jsx-runtime";var xd=vd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yd=$n.forwardRef(({className:e,...t},r)=>wd(No.Root,{ref:r,className:i(xd(),e),...t}));yd.displayName=No.Root.displayName;import{cva as Nd}from"class-variance-authority";import{isValidElement as Cd}from"react";import{jsx as Un,jsxs as Gn}from"react/jsx-runtime";var Co=Nd(["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 k4({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,...c}){return Gn(e||"button",{...e==="button"?{type:"button"}:{},className:i(Co({variant:t}),n),...c,children:[Gn("div",{className:"flex grow items-center gap-2",children:[o&&(kd(o)?o:Un(o,{className:"size-4"})),r]}),a&&Un("kbd",{className:i("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 kd=e=>Cd(e);import{curveNatural as jn}from"@visx/curve";import{LinearGradient as Kn}from"@visx/gradient";import{Group as Pd}from"@visx/group";import{ParentSize as Sd}from"@visx/responsive";import{scaleLinear as Rd,scaleUtc as Td}from"@visx/scale";import{Area as Ld,AreaClosed as Md}from"@visx/shape";import{motion as Yn}from"framer-motion";import{useId as Dd,useMemo as Zn}from"react";import{jsx as we,jsxs as ko}from"react/jsx-runtime";var Ed={top:8,right:2,bottom:2,left:2};function A4(e){return we(Sd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(Id,{...{width:t,height:r,...e}})})}function Id({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...Ed,...n},s=Dd(),m=Zn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:l}=Zn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),f=r.map(({date:v})=>v.getTime()),b=new Date(Math.min(...f)),h=new Date(Math.max(...f));return{yScale:Rd({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:Td({domain:[b,h],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return ko("svg",{width:e,height:t,children:[ko("defs",{children:[we(Kn,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(Kn,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),we("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:we("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),ko(Pd,{left:c.left,top:c.top,children:[we(Ld,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,curve:o?jn:void 0,children:({path:u})=>we(Yn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),we(Md,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?jn:void 0,children:({path:u})=>we(Yn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as ce from"@radix-ui/react-dialog";import*as Po from"@radix-ui/react-visually-hidden";import{useRouter as Ad}from"next/navigation";import{Drawer as Qe}from"vaul";import{jsx as ne,jsxs as bt}from"react/jsx-runtime";function F4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:s}){let m=Ad(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:l}=Y();return l&&!n?ne(Qe.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...s,children:bt(Qe.Portal,{children:[ne(Qe.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(Qe.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:bt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[bt(Po.Root,{children:[ne(Qe.Title,{children:"Modal"}),ne(Qe.Description,{children:"This is a modal"})]}),ne(Od,{}),e]})}),ne(Qe.Overlay,{})]})}):ne(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:bt(ce.Portal,{children:[ne(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),bt(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:i("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:[bt(Po.Root,{children:[ne(ce.Title,{children:"Modal"}),ne(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Od(){return ne("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ne("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{useCallback as So}from"react";import{jsx as zt,jsxs as zd}from"react/jsx-runtime";function K4({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:s,formatValue:m,decrementAriaLabel:d="Decrease",incrementAriaLabel:l="Increase",...u}){let p=typeof r=="number"?e>r:!0,f=typeof o=="number"?e<o:!0,b=So(y=>{let N=y;return typeof r=="number"&&(N=Math.max(r,N)),typeof o=="number"&&(N=Math.min(o,N)),N},[r,o]),h=So(()=>{n||!p||t(b(e-a))},[n,p,b,t,a,e]),v=So(()=>{n||!f||t(b(e+a))},[n,f,b,t,a,e]);return zd("div",{id:s,role:"group","aria-disabled":n,className:i("flex h-10 w-full select-none items-stretch overflow-hidden rounded-lg border border-neutral-200 bg-white",n&&"opacity-60",c),...u,children:[zt("button",{type:"button","aria-label":d,onClick:h,disabled:n||!p,className:i("flex h-full w-24 items-center justify-center border-r border-neutral-200 text-neutral-700 transition-colors",!(n||!p)&&"hover:bg-neutral-50"),children:zt(lr,{className:"block size-4"})}),zt("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:y=>{n||((y.key==="ArrowLeft"||y.key==="ArrowDown")&&(y.preventDefault(),h()),(y.key==="ArrowRight"||y.key==="ArrowUp")&&(y.preventDefault(),v()))},className:i("flex min-w-0 flex-1 items-center justify-center px-3 text-sm text-neutral-900"),prefix:"",children:m?m(e):e}),zt("button",{type:"button","aria-label":l,onClick:v,disabled:n||!f,className:i("flex h-full w-24 items-center justify-center border-l border-neutral-200 text-neutral-700 transition-colors",!(n||!f)&&"hover:bg-neutral-50"),children:zt(dt,{className:"block size-4"})})]})}import{Fragment as Vd,jsx as Dr,jsxs as ht}from"react/jsx-runtime";var qn=i("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 q4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return ht("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[ht("div",{className:"flex items-center gap-2",children:[ht("div",{children:[Dr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&ht(Vd,{children:[ht("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&Dr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),n]}),ht("div",{className:"flex items-center gap-2",children:[Dr("button",{type:"button",className:qn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Dr("button",{type:"button",className:qn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as He from"@radix-ui/react-radio-group";import{Circle as Hd}from"lucide-react";import*as Ro from"react";import{jsx as Er}from"react/jsx-runtime";var _d=Ro.forwardRef(({className:e,...t},r)=>Er(He.Root,{className:i("grid gap-2",e),...t,ref:r}));_d.displayName=He.Root.displayName;var Fd=Ro.forwardRef(({className:e,...t},r)=>Er(He.Item,{ref:r,className:i("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:Er(He.Indicator,{className:"flex items-center justify-center",children:Er(Hd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Fd.displayName=He.Item.displayName;import{Drawer as _e}from"vaul";import{jsx as et,jsxs as Gd}from"react/jsx-runtime";function Bd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?_e.NestedRoot:_e.Root;return et(a,{direction:"right",handleOnly:!0,...o,children:Gd(_e.Portal,{children:[et(_e.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),et(_e.Content,{...t,onPointerDownOutside:n=>{var c;n.target instanceof Element&&n.target.closest("[data-sonner-toast]")&&n.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,n)},className:i("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)",userSelect:"auto",...t==null?void 0:t.style},children:et("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Wd({className:e,...t}){return et(_e.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function $d(e){return et(_e.Description,{...e})}function Ud(e){return et(_e.Close,{...e})}var ay=Object.assign(Bd,{Title:Wd,Description:$d,Close:Ud});import{useEffect as jd,useRef as Kd,useState as Yd}from"react";import{jsx as Xn}from"react/jsx-runtime";var Zd=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|
|
6
6
|
{
|
|
7
7
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,qd=`
|
|
10
10
|
precision mediump float;
|
|
11
11
|
|
|
12
12
|
uniform vec2 resolution;
|
|
@@ -40,14 +40,14 @@ void main(void) {
|
|
|
40
40
|
|
|
41
41
|
gl_FragColor = fragColor;
|
|
42
42
|
}
|
|
43
|
-
`,jd=60,Kd=1e3/jd;function q4({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Wd(null),[c,s]=$d(!1);return Bd(()=>{let u=n.current;if(!u||!u.parentElement)return;let l=u.parentElement,d=window.devicePixelRatio||1;u.width=l.clientWidth*d,u.height=l.clientHeight*d;let m=u.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(m===null){alert("Failed to initialize WebGL");return}let p=m.createProgram();if(!p){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let K=R===0?Ud:Gd,v=m.createShader(R===0?m.VERTEX_SHADER:m.FRAGMENT_SHADER);if(!v){console.error("Failed to create shader");return}m.shaderSource(v,K),m.compileShader(v),m.getShaderParameter(v,m.COMPILE_STATUS)||console.error(m.getShaderInfoLog(v)),m.attachShader(p,v),m.linkProgram(p)}m.getProgramParameter(p,m.LINK_STATUS)||console.error(m.getProgramInfoLog(p));let f=m.getAttribLocation(p,"position"),b=m.getUniformLocation(p,"time"),h=m.getUniformLocation(p,"resolution"),y=m.getUniformLocation(p,"dotSize"),w=m.getUniformLocation(p,"cellSize"),x=m.getUniformLocation(p,"speed"),P=m.getUniformLocation(p,"color");m.useProgram(p);let k=[1,1,-1,1,1,-1,-1,-1],N=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,N),m.bufferData(m.ARRAY_BUFFER,new Float32Array(k),m.STATIC_DRAW),m.enableVertexAttribArray(f),m.vertexAttribPointer(f,2,m.FLOAT,!1,0,0),m.uniform1f(y,e*window.devicePixelRatio),m.uniform1f(w,t*window.devicePixelRatio),m.uniform1f(x,r),m.uniform3f(P,o[0],o[1],o[2]);let _,$=0;function S(R){if(R-$<Kd){_=requestAnimationFrame(S);return}$=R,m&&u&&p&&(m.clear(m.COLOR_BUFFER_BIT|m.DEPTH_BUFFER_BIT),m.uniform1f(b,R/1e3),m.uniform2f(h,u.width,u.height),m.drawArrays(m.TRIANGLE_STRIP,0,4)),_=requestAnimationFrame(S)}return _=requestAnimationFrame(S),u.addEventListener("webglcontextlost",R=>{R.preventDefault(),s(!0),cancelAnimationFrame(_)}),()=>{cancelAnimationFrame(_),u.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Yn("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:Yn("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as Fe from"@radix-ui/react-slider";import{jsx as et,jsxs as Ir}from"react/jsx-runtime";function Q4({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:s,disabled:u}){let l=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return et("div",{className:i("relative z-0",c),children:Ir("div",{className:"w-full",children:[Ir(Fe.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([d])=>t(d),disabled:u,"aria-label":"Slider",children:[Ir(Fe.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[et("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Ir("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[et(Fe.Range,{className:"absolute h-4 bg-black"}),l.map(d=>{let m=(d-r)/(o-r)*100,p=d<=e;return et("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${m}%`}},d)})]})]}),et(Fe.Thumb,{className:"z-20 flex size-[calc(var(--thumb-radius)*2)] items-center justify-center rounded-full border-0 bg-white shadow-[0_2px_2px_rgba(0,0,0,0.10),0_3px_3px_rgba(0,0,0,0.09)]",children:et("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),et("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as Yd,useId as Zd,useRef as qd}from"react";import{jsx as Ar,jsxs as Zn}from"react/jsx-runtime";function oy({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:n,autoFocus:c=!1}){let s=Zd(),u=qd(null);return Yd(()=>{u.current&&c&&setTimeout(()=>{var l;(l=u.current)==null||l.focus()},10)},[c]),Zn("div",{className:a,children:[r&&Ar("div",{className:"flex items-center gap-2",children:Ar("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),Zn("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:[Ar("input",{ref:u,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?wt(e):"",onBlur:l=>{if(l.target.value.length>0){let d=jr(l.target.value);d&&(t(d),l.target.value=wt(d))}},onKeyDown:l=>{if(l.key==="Enter"&&u.current){l.preventDefault();let d=jr(u.current.value);d&&(t(d),u.current.value=wt(d))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Ar("input",{type:"datetime-local",id:`${s}-datetime-local`,required:n,value:e?Yo(e):"",onChange:l=>{let d=new Date(l.target.value);t(d),u.current&&(u.current.value=wt(d))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as Xd}from"class-variance-authority";import{jsx as qn,jsxs as em}from"react/jsx-runtime";var Jd=Xd("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"}}),Qd={neutral:Pa,new:Ca,success:Na,pending:ka,warning:Zr,error:Zr};function dy({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:n,...c}){let s=r!==null?r??Qd[t??"neutral"]:null;return qn(pr,{tooltipProps:{content:o},children:em("span",{className:i(Jd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...c,children:[s&&qn(s,{className:"h-3 w-3 shrink-0"}),n]})})}import*as zr from"@radix-ui/react-switch";import{useMemo as tm}from"react";import{jsx as Or}from"react/jsx-runtime";function vy({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:s=!1,disabled:u=!1,disabledTooltip:l}){let d=tm(()=>l?!0:u||s,[l,u,s]),m=Or(zr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:d,className:i("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:Or(zr.Thumb,{className:i(`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:n})});return l?Or(Q,{content:l,children:Or("div",{className:"inline-block leading-none",children:m})}):m}import{Command as To}from"cmdk";import{useState as rm}from"react";import{jsx as ht,jsxs as om}from"react/jsx-runtime";function Sy({table:e}){let[t,r]=rm(!1);return ht(ve,{openPopover:t,setOpenPopover:r,content:ht(To,{tabIndex:0,loop:!0,children:ht(To.List,{className:"flex w-screen flex-col gap-1 p-1 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[130px]",children:e.getAllColumns().filter(o=>o.getCanHide()).map(o=>{var a;return om(To.Item,{className:i("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-3 py-1.5","data-[selected=true]:bg-neutral-100"),onSelect:()=>o.toggleVisibility(),children:[ht("input",{checked:o.getIsVisible(),type:"checkbox",className:"h-3 w-3 rounded-full border-neutral-300 text-black focus:outline-none focus:ring-0",disabled:!0}),(a=o.columnDef.header)==null?void 0:a.toString()]},o.id)})})}),align:"end",children:ht(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:ht(Aa,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Lo,getCoreRowModel as im,useReactTable as sm}from"@tanstack/react-table";import{AnimatePresence as lm,motion as cm}from"framer-motion";import{memo as dm,useEffect as Vt,useMemo as ei,useState as Qn}from"react";import{useEffect as am,useState as nm}from"react";import{jsx as Vr,jsxs as Xn}from"react/jsx-runtime";function Jn({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=nm(0);return am(()=>{o!==0&&n(o)},[o]),Ie("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),Vr("div",{className:i("border-border-subtle w-full border-b bg-white","transition-opacity duration-100",o>0?"pointer-events-auto opacity-100":"pointer-events-none opacity-0",r),...{inert:o>0?void 0:""},children:Xn("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[Vr("div",{className:"flex w-6 items-center justify-center",children:Vr(mt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:e.getIsAllRowsSelected()?!0:e.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>e.toggleAllRowsSelected(),title:"Select all"})}),Xn("span",{className:i("text-content-emphasis mr-2 text-sm font-medium tabular-nums transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:[a," selected"]}),Vr("div",{className:i("flex items-center gap-2 transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:t==null?void 0:t(e)})]})})}import{Fragment as pm,jsx as z,jsxs as de}from"react/jsx-runtime";var Mo=(e,t)=>i(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="select"&&"py-0 pr-0 pl-2",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75","group-data-[selected=true]/row:bg-blue-50"]),mm=i(["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 Zy(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:s,getRowId:u,enableColumnResizing:l=!1,columnResizeMode:d="onChange"}=e,m=!!e.onRowSelectionChange||!!e.selectionControls,[p,f]=Qn(e.columnVisibility??{}),[b,h]=Qn(e.selectedRows??{});Vt(()=>{if(!u||!t)return;let x=Object.entries(b);if(x.length>0){let P=x.filter(([k])=>t.find(N=>(u==null?void 0:u(N))===k));P.length!==x.length&&h(Object.fromEntries(P))}},[t,b,u]),Vt(()=>{e.selectedRows&&!Kr(e.selectedRows,b)&&h(e.selectedRows??{})},[e.selectedRows]),Vt(()=>{var x;(x=e.onRowSelectionChange)==null||x.call(e,w.getSelectedRowModel().rows)},[b]),Vt(()=>{e.columnVisibility&&!Kr(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),Vt(()=>{var x;(x=e.onColumnVisibilityChange)==null||x.call(e,p)},[p]);let y=ei(()=>[...m?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:x})=>z("div",{className:"flex size-full items-center justify-center",children:z(mt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsAllRowsSelected()?!0:x.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>x.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:x})=>z("div",{className:"flex size-full items-center justify-center",children:z(mt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsSelected(),onCheckedChange:x.getToggleSelectedHandler(),title:"Select"})})}]:[],...o],[m,o]),w=sm({data:t,rowCount:r,columns:y,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:l,...a},getCoreRowModel:im(),onPaginationChange:s,onColumnVisibilityChange:x=>f(x),onRowSelectionChange:h,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:u,enableColumnResizing:l,columnResizeMode:d});return{...e,columnVisibility:p,table:w,enableColumnResizing:l}}var um=dm(function({row:t,onRowClick:r,rowProps:o,cellRight:a,tdClassName:n,table:c}){let{className:s,...u}=o||{};return z("tr",{className:i("group/row",r&&"cursor-pointer select-none",c.getRowModel().rows.length>8&&t.index===c.getRowModel().rows.length-1&&"[&_td]:border-b-0",s),onClick:r?l=>{Ct(l)||r(t,l)}:void 0,"data-selected":t.getIsSelected(),...u,children:t.getVisibleCells().map(l=>z("td",{className:i(Mo(l.column.id,!!r),"text-content-default group",Do(l.column,t.index===c.getRowModel().rows.length-1),typeof n=="function"?n(l.column.id,t):n),style:{width:l.column.getSize(),...Eo(l.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Lo(l.column.columnDef.cell,l.getContext())}),a==null?void 0:a(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function qy({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:s,sortableColumns:u=[],className:l,containerClassName:d,scrollWrapperClassName:m,emptyWrapperClassName:p,thClassName:f,tdClassName:b,table:h,pagination:y,resourceName:w,onRowClick:x,onRowSelectionChange:P,selectionControls:k,rowProps:N,rowCount:_,children:$,enableColumnResizing:S=!1}){let R=!!P||!!k,K=ei(()=>S?h.getVisibleLeafColumns().reduce((v,C)=>v+C.getSize(),0):"100%",[S,h.getVisibleLeafColumns()]);return de("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",d),children:[!r&&!!(e!=null&&e.length)||t?de(pm,{children:[R&&z(Jn,{table:h,controls:k,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),de("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",m),children:[de("table",{className:i(["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",S&&"[&_th]:group/resize"],l),style:{width:"100%",tableLayout:S?"fixed":"auto",minWidth:K},children:[z("thead",{className:"relative",children:h.getHeaderGroups().map(v=>z("tr",{children:v.headers.map(C=>{let F=u.includes(C.column.id),L=F?"button":"div";return de("th",{colSpan:C.colSpan,className:i(Mo(C.id),"text-content-emphasis select-none font-medium",Do(C.column,!h.getRowModel().rows.length),typeof f=="function"?f(C.column.id):f,S&&"relative"),style:{width:C.getSize(),...Eo(C.column)},children:[z("div",{className:"flex items-center justify-between gap-6 !pr-0",children:de(L,{className:i("flex items-center gap-2",C.column.id==="select"&&"size-full"),...F&&{type:"button",disabled:!F,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:C.column.id,sortOrder:n!==C.column.id||c==="asc"?"desc":"asc"})},children:[C.isPlaceholder?null:Lo(C.column.columnDef.header,C.getContext()),F&&n===C.column.id&&z(ia,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),S&&C.column.getCanResize()&&!["select","menu"].includes(C.column.id)&&z("div",{onMouseDown:C.getResizeHandler(),onTouchStart:C.getResizeHandler(),onClick:I=>I.stopPropagation(),className:mm})]},C.id)})},v.id))}),z("tbody",{children:h.getRowModel().rows.map(v=>{let C=typeof N=="function"?N(v):N,{className:F,...L}=C||{};return S?z(um,{row:v,onRowClick:x,rowProps:C,cellRight:a,tdClassName:b,table:h},`${v.id}-${h.getVisibleLeafColumns().map(I=>I.id).join(",")}`):z("tr",{className:i("group/row",x&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&v.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0",F),onClick:x?I=>{Ct(I)||x(v,I)}:void 0,"data-selected":v.getIsSelected(),...L,children:v.getVisibleCells().map(I=>z("td",{className:i(Mo(I.column.id,!!x),"text-content-default group",Do(I.column,v.index===h.getRowModel().rows.length-1),typeof b=="function"?b(I.column.id,v):b),style:{minWidth:I.column.columnDef.minSize,maxWidth:I.column.columnDef.maxSize,width:I.column.columnDef.size||"auto",...Eo(I.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Lo(I.column.columnDef.cell,I.getContext())}),a==null?void 0:a(I)]})},I.id))},v.id)})})]}),$]})]}):z("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(w==null?void 0:w(!0))||"items"} found.`}),y&&!r&&!!(e!=null&&e.length)&&!!_&&de("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:[de("div",{children:[z("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",de("span",{className:"font-medium",children:[((y.pageIndex-1)*y.pageSize+1).toLocaleString(),"-",Math.min((y.pageIndex-1)*y.pageSize+y.pageSize,h.getRowCount()).toLocaleString()]})," ","of"," ",z("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(w==null?void 0:w(h.getRowCount()!==1))||"items"]}),de("div",{className:"flex items-center gap-2",children:[z(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:y.pageIndex===1}),z(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:y.pageIndex===h.getPageCount()})]})]}),z(lm,{children:t&&z(cm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:z("div",{className:"flex h-[75vh] w-full items-center justify-center",children:z(ke,{})})})})]})}var Do=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Eo=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 fm,motion as ti}from"framer-motion";import gm from"next/link";import{useId as bm}from"react";import{jsx as Hr,jsxs as hm}from"react/jsx-runtime";function r3({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:n,style:c}){let s=bm();return Hr(fm,{id:s,children:Hr(ti.div,{layout:!0,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:c,children:e.map(u=>{let l=u.value===t,d=u.href?gm:"button";return hm(d,{...u.href?{href:u.href}:{type:"button"},"data-selected":l,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!l&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(u.value),children:[typeof u.label=="string"?Hr("p",{children:u.label}):u.label,u.badge,l&&Hr(ti.div,{layoutId:s,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",n),transition:{duration:.25}})]},u.value)})})})}import{useEffect as vm,useId as xm,useRef as ym,useState as wm}from"react";import{jsx as pe,jsxs as Io}from"react/jsx-runtime";var Nm=[{key:"utm_source",icon:za,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:$a,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Ia,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Fa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ba,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Oa,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function d3({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Y(),s=xm(),[u,l]=wm(!1),d=ym(null);return vm(()=>{d.current&&!c&&o&&setTimeout(()=>{var m;return(m=d.current)==null?void 0:m.focus()},10)},[]),pe("div",{className:i("grid gap-y-3",n),children:Nm.map(({key:m,icon:p,label:f,placeholder:b,description:h},y)=>pe("div",{className:"group relative",children:Io("div",{className:"relative z-10 flex",children:[pe(Q,{content:Io("div",{className:"p-3 text-center text-xs",children:[pe("p",{className:"text-neutral-600",children:h}),pe("span",{className:"font-mono text-neutral-400",children:m})]}),sideOffset:4,disableHoverableContent:!0,children:Io("div",{className:i("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",u?"sm:min-w-36":"sm:min-w-28"),onClick:()=>l(w=>!w),children:[pe(p,{className:"size-4 shrink-0"}),pe("label",{htmlFor:`${s}-${m}`,className:"select-none text-sm",children:u?pe("span",{className:"font-mono text-xs",children:m}):f})]})}),pe("div",{className:"min-w-0 grow",children:pe(pr,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:pe("input",{type:"text",id:`${s}-${m}`,ref:y===0?d: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[m]||"",onChange:w=>t(m,w.target.value)})})})]})},m))})}import{jsx as Ao,jsxs as Cm}from"react/jsx-runtime";function u3(){return Cm("div",{style:_r.backgroundMain,children:[Ao("div",{style:_r.backgroundMainBefore}),Ao("div",{style:_r.backgroundMainAfter}),Ao("div",{style:_r.backgroundContent})]})}var _r={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
|
+
`,Xd=60,Jd=1e3/Xd;function ly({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Kd(null),[c,s]=Yd(!1);return jd(()=>{let m=n.current;if(!m||!m.parentElement)return;let d=m.parentElement,l=window.devicePixelRatio||1;m.width=d.clientWidth*l,m.height=d.clientHeight*l;let u=m.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(u===null){alert("Failed to initialize WebGL");return}let p=u.createProgram();if(!p){console.error("Failed to create shader program");return}for(let P=0;P<2;++P){let G=P===0?Zd:qd,x=u.createShader(P===0?u.VERTEX_SHADER:u.FRAGMENT_SHADER);if(!x){console.error("Failed to create shader");return}u.shaderSource(x,G),u.compileShader(x),u.getShaderParameter(x,u.COMPILE_STATUS)||console.error(u.getShaderInfoLog(x)),u.attachShader(p,x),u.linkProgram(p)}u.getProgramParameter(p,u.LINK_STATUS)||console.error(u.getProgramInfoLog(p));let f=u.getAttribLocation(p,"position"),b=u.getUniformLocation(p,"time"),h=u.getUniformLocation(p,"resolution"),v=u.getUniformLocation(p,"dotSize"),y=u.getUniformLocation(p,"cellSize"),N=u.getUniformLocation(p,"speed"),w=u.getUniformLocation(p,"color");u.useProgram(p);let k=[1,1,-1,1,1,-1,-1,-1],C=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,C),u.bufferData(u.ARRAY_BUFFER,new Float32Array(k),u.STATIC_DRAW),u.enableVertexAttribArray(f),u.vertexAttribPointer(f,2,u.FLOAT,!1,0,0),u.uniform1f(v,e*window.devicePixelRatio),u.uniform1f(y,t*window.devicePixelRatio),u.uniform1f(N,r),u.uniform3f(w,o[0],o[1],o[2]);let A,B=0;function T(P){if(P-B<Jd){A=requestAnimationFrame(T);return}B=P,u&&m&&p&&(u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.uniform1f(b,P/1e3),u.uniform2f(h,m.width,m.height),u.drawArrays(u.TRIANGLE_STRIP,0,4)),A=requestAnimationFrame(T)}return A=requestAnimationFrame(T),m.addEventListener("webglcontextlost",P=>{P.preventDefault(),s(!0),cancelAnimationFrame(A)}),()=>{cancelAnimationFrame(A),m.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Xn("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:Xn("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as Fe from"@radix-ui/react-slider";import{jsx as tt,jsxs as Ir}from"react/jsx-runtime";function my({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:s,disabled:m}){let d=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return tt("div",{className:i("relative z-0",c),children:Ir("div",{className:"w-full",children:[Ir(Fe.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([l])=>t(l),disabled:m,"aria-label":"Slider",children:[Ir(Fe.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[tt("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Ir("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[tt(Fe.Range,{className:"absolute h-4 bg-black"}),d.map(l=>{let u=(l-r)/(o-r)*100,p=l<=e;return tt("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},l)})]})]}),tt(Fe.Thumb,{className:"z-20 flex size-[calc(var(--thumb-radius)*2)] items-center justify-center rounded-full border-0 bg-white shadow-[0_2px_2px_rgba(0,0,0,0.10),0_3px_3px_rgba(0,0,0,0.09)]",children:tt("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),tt("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as Qd,useId as em,useRef as tm}from"react";import{jsx as Ar,jsxs as Jn}from"react/jsx-runtime";function gy({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:n,autoFocus:c=!1}){let s=em(),m=tm(null);return Qd(()=>{m.current&&c&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[c]),Jn("div",{className:a,children:[r&&Ar("div",{className:"flex items-center gap-2",children:Ar("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),Jn("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:[Ar("input",{ref:m,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?Nt(e):"",onBlur:d=>{if(d.target.value.length>0){let l=jr(d.target.value);l&&(t(l),d.target.value=Nt(l))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let l=jr(m.current.value);l&&(t(l),m.current.value=Nt(l))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Ar("input",{type:"datetime-local",id:`${s}-datetime-local`,required:n,value:e?Yo(e):"",onChange:d=>{let l=new Date(d.target.value);t(l),m.current&&(m.current.value=Nt(l))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as rm}from"class-variance-authority";import{jsx as Qn,jsxs as nm}from"react/jsx-runtime";var om=rm("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"}}),am={neutral:Ta,new:Sa,success:Pa,pending:Ra,warning:Zr,error:Zr};function Ny({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:n,...c}){let s=r!==null?r??am[t??"neutral"]:null;return Qn(pr,{tooltipProps:{content:o},children:nm("span",{className:i(om({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...c,children:[s&&Qn(s,{className:"h-3 w-3 shrink-0"}),n]})})}import*as zr from"@radix-ui/react-switch";import{useMemo as im}from"react";import{jsx as Or}from"react/jsx-runtime";function My({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:s=!1,disabled:m=!1,disabledTooltip:d}){let l=im(()=>d?!0:m||s,[d,m,s]),u=Or(zr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:l,className:i("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:Or(zr.Thumb,{className:i(`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:n})});return d?Or(Q,{content:d,children:Or("div",{className:"inline-block leading-none",children:u})}):u}import{Command as To}from"cmdk";import{useState as sm}from"react";import{jsx as vt,jsxs as lm}from"react/jsx-runtime";function Hy({table:e}){let[t,r]=sm(!1);return vt(ve,{openPopover:t,setOpenPopover:r,content:vt(To,{tabIndex:0,loop:!0,children:vt(To.List,{className:"flex w-screen flex-col gap-1 p-1 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[130px]",children:e.getAllColumns().filter(o=>o.getCanHide()).map(o=>{var a;return lm(To.Item,{className:i("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-3 py-1.5","data-[selected=true]:bg-neutral-100"),onSelect:()=>o.toggleVisibility(),children:[vt("input",{checked:o.getIsVisible(),type:"checkbox",className:"h-3 w-3 rounded-full border-neutral-300 text-black focus:outline-none focus:ring-0",disabled:!0}),(a=o.columnDef.header)==null?void 0:a.toString()]},o.id)})})}),align:"end",children:vt(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:vt(Va,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Lo,getCoreRowModel as mm,useReactTable as um}from"@tanstack/react-table";import{AnimatePresence as pm,motion as fm}from"framer-motion";import{memo as gm,useEffect as Vt,useMemo as oi,useRef as bm,useState as ri}from"react";import{useEffect as cm,useState as dm}from"react";import{jsx as Vr,jsxs as ei}from"react/jsx-runtime";function ti({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=dm(0);return cm(()=>{o!==0&&n(o)},[o]),Ie("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),Vr("div",{className:i("border-border-subtle w-full border-b bg-white","transition-opacity duration-100",o>0?"pointer-events-auto opacity-100":"pointer-events-none opacity-0",r),...{inert:o>0?void 0:""},children:ei("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[Vr("div",{className:"flex w-6 items-center justify-center",children:Vr(ut,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:e.getIsAllRowsSelected()?!0:e.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>e.toggleAllRowsSelected(),title:"Select all"})}),ei("span",{className:i("text-content-emphasis mr-2 text-sm font-medium tabular-nums transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:[a," selected"]}),Vr("div",{className:i("flex items-center gap-2 transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:t==null?void 0:t(e)})]})})}import{Fragment as xm,jsx as H,jsxs as de}from"react/jsx-runtime";var Mo=(e,t)=>i(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="select"&&"py-0 pr-0 pl-2",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75","group-data-[selected=true]/row:bg-blue-50"]),hm=i(["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 s3(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:s,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:l="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,f]=ri(e.columnVisibility??{}),[b,h]=ri(e.selectedRows??{}),v=bm(null);Vt(()=>{if(!m||!t)return;let w=Object.entries(b);if(w.length>0){let k=w.filter(([C])=>t.find(A=>(m==null?void 0:m(A))===C));k.length!==w.length&&h(Object.fromEntries(k))}},[t,b,m]),Vt(()=>{e.selectedRows&&!Kr(e.selectedRows,b)&&h(e.selectedRows??{})},[e.selectedRows]),Vt(()=>{var w;(w=e.onRowSelectionChange)==null||w.call(e,N.getSelectedRowModel().rows)},[b]),Vt(()=>{e.columnVisibility&&!Kr(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),Vt(()=>{var w;(w=e.onColumnVisibilityChange)==null||w.call(e,p)},[p]);let y=oi(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:w})=>H("div",{className:"flex size-full items-center justify-center",children:H(ut,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:w.getIsAllRowsSelected()?!0:w.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>w.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:w,table:k})=>H("div",{className:"flex size-full items-center justify-center",children:H(ut,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:w.getIsSelected(),onClick:C=>{let A=m==null?void 0:m(w.original),B=k.getRowModel().rows,T=v.current!==null?B.findIndex(P=>(m==null?void 0:m(P.original))===v.current):-1;if(C.shiftKey&&v.current!==null&&T!==-1){let P=w.index,G=Math.min(T,P),x=Math.max(T,P),S=B.slice(G,x+1).map(R=>m==null?void 0:m(R.original));k.setRowSelection(R=>{let L=A!==void 0&&((R==null?void 0:R[A])??!1);return{...R,...Object.fromEntries(S.map(X=>[X,!L]))}}),v.current=A??null}else w.toggleSelected(),v.current=A??null},title:"Select"})})}]:[],...o],[u,o]),N=um({data:t,rowCount:r,columns:y,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:mm(),onPaginationChange:s,onColumnVisibilityChange:w=>f(w),onRowSelectionChange:h,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:l});return{...e,columnVisibility:p,table:N,enableColumnResizing:d}}var vm=gm(function({row:t,onRowClick:r,onRowAuxClick:o,rowProps:a,cellRight:n,tdClassName:c,table:s}){let{className:m,...d}=a||{};return H("tr",{className:i("group/row",r&&"cursor-pointer select-none",s.getRowModel().rows.length>8&&t.index===s.getRowModel().rows.length-1&&"[&_td]:border-b-0",m),onClick:r?l=>{je(l)||r(t,l)}:void 0,onAuxClick:o?l=>{je(l)||o(t,l)}:void 0,"data-selected":t.getIsSelected(),...d,children:t.getVisibleCells().map(l=>H("td",{className:i(Mo(l.column.id,!!r),"text-content-default group",Do(l.column,t.index===s.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id,t):c),style:{width:l.column.getSize(),...Eo(l.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Lo(l.column.columnDef.cell,l.getContext())}),n==null?void 0:n(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function l3({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:s,sortableColumns:m=[],className:d,containerClassName:l,scrollWrapperClassName:u,emptyWrapperClassName:p,thClassName:f,tdClassName:b,table:h,pagination:v,resourceName:y,onRowClick:N,onRowAuxClick:w,onRowSelectionChange:k,selectionControls:C,rowProps:A,rowCount:B,children:T,enableColumnResizing:P=!1}){let G=!!k||!!C,x=oi(()=>P?h.getVisibleLeafColumns().reduce((S,R)=>S+R.getSize(),0):"100%",[P,h.getVisibleLeafColumns()]);return de("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",l),children:[!r&&!!(e!=null&&e.length)||t?de(xm,{children:[G&&H(ti,{table:h,controls:C,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),de("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),children:[de("table",{className:i(["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",P&&"[&_th]:group/resize"],d),style:{width:"100%",tableLayout:P?"fixed":"auto",minWidth:x},children:[H("thead",{className:"relative",children:h.getHeaderGroups().map(S=>H("tr",{children:S.headers.map(R=>{let L=m.includes(R.column.id),X=L?"button":"div";return de("th",{colSpan:R.colSpan,className:i(Mo(R.id),"text-content-emphasis select-none font-medium",Do(R.column,!h.getRowModel().rows.length),typeof f=="function"?f(R.column.id):f,P&&"relative"),style:{width:R.getSize(),...Eo(R.column)},children:[H("div",{className:"flex items-center justify-between gap-6 !pr-0",children:de(X,{className:i("flex items-center gap-2",R.column.id==="select"&&"size-full"),...L&&{type:"button",disabled:!L,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:R.column.id,sortOrder:n!==R.column.id||c==="asc"?"desc":"asc"})},children:[R.isPlaceholder?null:Lo(R.column.columnDef.header,R.getContext()),L&&n===R.column.id&&H(ca,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),P&&R.column.getCanResize()&&!["select","menu"].includes(R.column.id)&&H("div",{onMouseDown:R.getResizeHandler(),onTouchStart:R.getResizeHandler(),onClick:M=>M.stopPropagation(),className:hm})]},R.id)})},S.id))}),H("tbody",{children:h.getRowModel().rows.map(S=>{let R=typeof A=="function"?A(S):A,{className:L,...X}=R||{};return P?H(vm,{row:S,onRowClick:N,onRowAuxClick:w,rowProps:R,cellRight:a,tdClassName:b,table:h},`${S.id}-${h.getVisibleLeafColumns().map(M=>M.id).join(",")}`):H("tr",{className:i("group/row",N&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&S.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0",L),onClick:N?M=>{je(M)||N(S,M)}:void 0,onAuxClick:w?M=>{je(M)||w(S,M)}:void 0,"data-selected":S.getIsSelected(),...X,children:S.getVisibleCells().map(M=>H("td",{className:i(Mo(M.column.id,!!N),"text-content-default group",Do(M.column,S.index===h.getRowModel().rows.length-1),typeof b=="function"?b(M.column.id,S):b),style:{minWidth:M.column.columnDef.minSize,maxWidth:M.column.columnDef.maxSize,width:M.column.columnDef.size||"auto",...Eo(M.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Lo(M.column.columnDef.cell,M.getContext())}),a==null?void 0:a(M)]})},M.id))},S.id)})})]}),T]})]}):H("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(y==null?void 0:y(!0))||"items"} found.`}),v&&!r&&!!(e!=null&&e.length)&&!!B&&de("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:[de("div",{children:[H("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",de("span",{className:"font-medium",children:[((v.pageIndex-1)*v.pageSize+1).toLocaleString(),"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,h.getRowCount()).toLocaleString()]})," ","of"," ",H("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(y==null?void 0:y(h.getRowCount()!==1))||"items"]}),de("div",{className:"flex items-center gap-2",children:[H(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:v.pageIndex===1}),H(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:v.pageIndex===h.getPageCount()})]})]}),H(pm,{children:t&&H(fm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:H("div",{className:"flex h-[75vh] w-full items-center justify-center",children:H(ke,{})})})})]})}var Do=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Eo=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 ym,motion as ai}from"framer-motion";import wm from"next/link";import{useId as Nm}from"react";import{jsx as Hr,jsxs as Cm}from"react/jsx-runtime";function f3({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:n,style:c}){let s=Nm();return Hr(ym,{id:s,children:Hr(ai.div,{layout:!0,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:c,children:e.map(m=>{let d=m.value===t,l=m.href?wm:"button";return Cm(l,{...m.href?{href:m.href}:{type:"button"},"data-selected":d,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!d&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(m.value),children:[typeof m.label=="string"?Hr("p",{children:m.label}):m.label,m.badge,d&&Hr(ai.div,{layoutId:s,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",n),transition:{duration:.25}})]},m.value)})})})}import{useEffect as km,useId as Pm,useRef as Sm,useState as Rm}from"react";import{jsx as pe,jsxs as Io}from"react/jsx-runtime";var Tm=[{key:"utm_source",icon:_a,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:ja,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:za,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:$a,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ua,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Ha,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function N3({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Y(),s=Pm(),[m,d]=Rm(!1),l=Sm(null);return km(()=>{l.current&&!c&&o&&setTimeout(()=>{var u;return(u=l.current)==null?void 0:u.focus()},10)},[]),pe("div",{className:i("grid gap-y-3",n),children:Tm.map(({key:u,icon:p,label:f,placeholder:b,description:h},v)=>pe("div",{className:"group relative",children:Io("div",{className:"relative z-10 flex",children:[pe(Q,{content:Io("div",{className:"p-3 text-center text-xs",children:[pe("p",{className:"text-neutral-600",children:h}),pe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:Io("div",{className:i("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(y=>!y),children:[pe(p,{className:"size-4 shrink-0"}),pe("label",{htmlFor:`${s}-${u}`,className:"select-none text-sm",children:m?pe("span",{className:"font-mono text-xs",children:u}):f})]})}),pe("div",{className:"min-w-0 grow",children:pe(pr,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:pe("input",{type:"text",id:`${s}-${u}`,ref:v===0?l: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:y=>t(u,y.target.value)})})})]})},u))})}import{jsx as Ao,jsxs as Lm}from"react/jsx-runtime";function k3(){return Lm("div",{style:_r.backgroundMain,children:[Ao("div",{style:_r.backgroundMainBefore}),Ao("div",{style:_r.backgroundMainAfter}),Ao("div",{style:_r.backgroundContent})]})}var _r={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%),
|
|
44
44
|
radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
|
|
45
45
|
radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
|
|
46
46
|
radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
|
|
47
47
|
radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
|
|
48
48
|
radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
|
|
49
|
-
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{ChevronDown as pu}from"lucide-react";import fu from"next/image";import We from"next/link";import{useParams as gu}from"next/navigation";import{useState as bu}from"react";import{jsx as ri}from"react/jsx-runtime";function oi(e){return ri("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:ri("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"})})}import{jsx as ai}from"react/jsx-runtime";function Ht({className:e}){return ai("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-10 w-10 text-black dark:text-white",e),children:ai("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"})})}var Fr=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:st,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:lt,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:it,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:Jt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ga,href:"/integrations"}],w3=[{icon:da,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:ca,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:oi,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],Oo=[{icon:ga,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:pa,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:ma,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:fa,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:ua,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],ni=[{icon:nr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:sr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Pt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Oo}],_t=[{icon:ir,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:or,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Pt,title:"About",description:"Company, values, and team",href:"/about"},{icon:ha,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Ea,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:va,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Ht,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:La,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],ii=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],si=[{name:"Privacy Policy",slug:"privacy"},{name:"Terms of Service",slug:"terms"},{name:"Partner Terms",slug:"partners"},{name:"Affiliate Program Terms",slug:"affiliates"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],N3=[{name:"X (Twitter)",icon:tr,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:er,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:rr,href:"https://www.youtube.com/@dubdotco"}];import{jsx as km}from"react/jsx-runtime";function Br({className:e,children:t}){return km("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Be from"@radix-ui/react-popover";import{BoxSelect as ru,Home as ou,LayoutGrid as au,Type as nu}from"lucide-react";import{useParams as iu}from"next/navigation";import{useCallback as su,useContext as lu,useState as cu}from"react";import{toast as du}from"sonner";import*as ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as Fm}from"framer-motion";import Ut from"next/link";import{useParams as Bm,usePathname as Wm}from"next/navigation";import{createContext as $m,useId as Um}from"react";import Gm from"swr";import{Link as pi}from"@radix-ui/react-navigation-menu";import fi from"next/image";import gi from"next/link";import{Link2 as Pm}from"lucide-react";import{jsx as Z,jsxs as X}from"react/jsx-runtime";var li={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},tt={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 ci({className:e}){return X("div",{className:i("pointer-events-none relative size-full",e),children:[X("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"})]}),X("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[X("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[X("div",{className:"p-1.5",children:[X("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(Pm,{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=>X("div",{className:"flex items-center justify-between gap-2",children:[X("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:li[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:qt(t)})]}),X("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",li[t].value]})]},t))})]}),Z("div",{className:"relative",children:X("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[X("div",{className:"px-3 py-2.5",children:[X("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:tt.avatarIndex*100+"%"}}),X("div",{className:"flex flex-col items-end gap-1",children:[X("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(Ra,{className:"text-content-default size-3.5"}),tt.origin]}),X("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/${tt.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),tt.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:tt.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:tt.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(tt.details).map(([t,r])=>X("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 g,jsxs as me}from"react/jsx-runtime";function di(e){let t=Sm();return me("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:i("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:[me("defs",{children:[g("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),g("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),g("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),g("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[g("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"}),g("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"})]}),g("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[g("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),g("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),g("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[g("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"}),g("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"})]}),g("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[g("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),g("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),g("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"}),g("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"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[g("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"}),g("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"})]}),g("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[g("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),g("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),me("defs",{children:[g("clipPath",{id:`${t}-b`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),g("clipPath",{id:`${t}-c`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),g("clipPath",{id:`${t}-d`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),g("clipPath",{id:`${t}-f`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),g("clipPath",{id:`${t}-g`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),g("clipPath",{id:`${t}-h`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),g("clipPath",{id:`${t}-j`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),g("clipPath",{id:`${t}-k`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),g("clipPath",{id:`${t}-l`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),me("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as Tm,jsx as Me,jsxs as Ft}from"react/jsx-runtime";var Rm=[{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 mi({className:e}){return Me("div",{className:i("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:Rm.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&&Ft(Tm,{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),Ft("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Ft("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)=>Ft("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[Me("span",{className:"text-content-muted text-[6px] font-medium",children:qt(o)}),Ft("span",{className:"text-content-default text-[9px] font-medium",children:["$",Xt(t[o])]})]},o))})]})]})})},r))})})}import{Link as Lm}from"@radix-ui/react-navigation-menu";import Mm from"next/link";import{jsx as Bt,jsxs as ui}from"react/jsx-runtime";var rt="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 Wt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:n,...c}){return Bt(Lm,{asChild:!0,children:Bt(Mm,{className:i(Dm,a),...c,children:ui("div",{className:"flex items-center justify-between gap-3",children:[e,ui("div",{className:"flex-1",children:[Bt("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Bt("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&Bt(oa,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}import{jsx as A,jsxs as $t}from"react/jsx-runtime";var Em=[{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:A(st,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/links",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:A(di,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:A(it,{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:A(ci,{className:"absolute bottom-0 left-0 size-full"})},{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:A(lt,{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:A(mi,{})}],Im=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:A("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:A(fi,{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:A("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:A(fi,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function bi({domain:e}){return $t("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[A("div",{className:"grid grid-cols-3 gap-4",children:Em.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:s})=>A(pi,{asChild:!0,children:$t(gi,{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:[A(qe,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),$t("div",{className:"relative p-5 pb-0",children:[o,A("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),A("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),A("div",{className:"relative mt-10 h-40 grow",children:A("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:A("div",{className:"relative size-full",children:s})})}),A("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":n}})]})},t))}),A("div",{className:"grid grow grid-cols-2 gap-4",children:Im.map(({title:t,description:r,href:o,graphic:a})=>A(pi,{asChild:!0,children:$t(gi,{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:[A(qe,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),A("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),A("div",{className:"relative flex items-center justify-between px-5 py-4",children:$t("div",{children:[A("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),A("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Am}from"@radix-ui/react-navigation-menu";import Om from"next/link";import{jsx as G,jsxs as ot}from"react/jsx-runtime";var zm=[{icon:ir,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:or,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function hi({domain:e}){return ot("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ot("div",{className:"flex h-full flex-col p-4",children:[G("p",{className:i(rt,"mb-4 ml-2"),children:"Explore"}),G("div",{className:"grid grow grid-cols-2 gap-4",children:zm.map(({icon:t,title:r,description:o,href:a})=>G(Am,{asChild:!0,children:ot(Om,{href:V(a,e,Ne({domain:e,utm_content:r})),className:i("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:[ot("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[G("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:G(qe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),G("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),G(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),ot("div",{className:"relative",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),G("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),ot("div",{className:"px-6 py-4",children:[G("p",{className:i(rt,"mb-2"),children:"Company"}),G("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Wt,{className:"-mx-2",href:V(a,e,Ne({domain:e,utm_content:r})),icon:G("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:G(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),ot("div",{className:"px-6 py-4",children:[G("p",{className:i(rt,"mb-2"),children:"Updates"}),G("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Wt,{className:"-mx-2",href:V(a,e,Ne({domain:e,utm_content:r})),icon:G("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:G(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as Vm}from"@radix-ui/react-navigation-menu";import Hm from"next/link";import{jsx as re,jsxs as vt}from"react/jsx-runtime";var _m=[{icon:nr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:sr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Pt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function vi({domain:e}){return vt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[vt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(rt,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:_m.map(({icon:t,title:r,description:o,href:a})=>re(Vm,{asChild:!0,children:vt(Hm,{href:V(a,e,Ne({domain:e,utm_content:r})),className:i("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:[vt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[re("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:re(qe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),re("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),re(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),vt("div",{className:"relative",children:[re("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),re("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),vt("div",{className:"px-6 py-4",children:[re("p",{className:i(rt,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:Oo.map(({icon:t,iconClassName:r,title:o,href:a})=>re(Wt,{className:"-mx-2",href:V(a,e,Ne({domain:e,utm_content:o})),icon:re("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:re(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Ym,jsx as B,jsxs as xt}from"react/jsx-runtime";var zo=$m({theme:"light"}),Vo=[{name:"Product",content:bi,childItems:Fr,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:vi,childItems:ni,segments:["/solutions","/sdks"]},{name:"Resources",content:hi,childItems:_t,segments:["/help","/docs","/about","/careers","/brand","/blog","/changelog","/contact"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],xi=i("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 Dw({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Bm();t&&(o=t);let a=Um(),n=dn(40),c=Wm(),{data:s,isLoading:u}=Gm(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return B(zo.Provider,{value:{theme:e},children:B(Fm,{id:a,children:xt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",n&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B(Br,{className:i("relative",r),children:xt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(Ut,{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(Wr,{})})}),xt(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(ue.List,{className:"group relative z-0 flex",children:Vo.map(({name:l,href:d,segments:m,content:p})=>{let f=m.some(b=>c==null?void 0:c.startsWith(b));return xt(ue.Item,{children:[B(Km,{trigger:!!p,children:d!==void 0?B(Ut,{id:`nav-${d}`,href:V(d,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:l}),className:xi,"data-active":f,children:l}):xt("button",{className:xi,"data-active":f,children:[l,B(jm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&B(ue.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})})]},l)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(ue.Viewport,{className:i("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:s&&Object.keys(s).length>0?B(Ut,{href:Ce,className:i(se({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"}):u?null:xt(Ym,{children:[B(Ut,{href:"https://app.dub.co/login",className:i(se({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(Ut,{href:"https://app.dub.co/register",className:i(se({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 jm(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 Km({trigger:e,children:t}){return e?B(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Zm,Menu as qm,X as Xm}from"lucide-react";import yt from"next/link";import{useParams as Fo}from"next/navigation";import{useEffect as Jm,useState as wi}from"react";import Qm from"swr";import{Fragment as tu,jsx as T,jsxs as De}from"react/jsx-runtime";var Ho={"Dub Links":T("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:T(st,{className:"size-3 text-orange-900"})}),"Dub Partners":T("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:T(lt,{className:"size-3 text-violet-900"})}),"Dub Analytics":T("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:T(it,{className:"size-3 text-green-900"})}),"Dub API":T("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:T(Jt,{className:"size-3 text-neutral-900"})})};function jw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Fo();t&&(r=t);let[o,a]=wi(!1);Jm(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=Qm(r.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return De("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[n&&Object.keys(n).length>0?T(_o,{href:Ce,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:De("div",{className:"flex gap-2 max-[280px]:hidden",children:[T(_o,{variant:"secondary",href:`${Ce}/login`,children:"Log in"}),T(_o,{href:`${Ce}/register`,children:"Sign Up"})]}),T("button",{onClick:()=>a(!o),className:i("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?T(Xm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):T(qm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),T("nav",{className:i("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:[Vo.map(({name:s,href:u,childItems:l},d)=>T(eu,{name:s,href:u,childItems:l,setOpen:a},d)),n&&Object.keys(n).length>0?T("li",{className:"py-3 min-[281px]:hidden",children:T(yt,{href:Ce,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):De(tu,{children:[T("li",{className:"py-3 min-[281px]:hidden",children:T(yt,{href:`${Ce}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),T("li",{className:"py-3 min-[281px]:hidden",children:T(yt,{href:`${Ce}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var eu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Fo(),[n,c]=wi(!1);return r?T("li",{className:"py-3",children:De(Se,{height:!0,children:[De("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[T("p",{className:"font-semibold",children:e}),T(Zm,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",n&&"rotate-180")})]}),n&&T("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,u)=>"items"in s?De("div",{className:"grid grid-cols-1 gap-3",children:[T("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((l,d)=>T(yi,{item:l,setOpen:o,size:"small"},d))]},u):T(yi,{item:s,setOpen:o},u))})]})}):t?T("li",{className:"py-3",children:T(yt,{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},yi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=Fo(),s=Ho==null?void 0:Ho[e];return De(yt,{href:V(r,c,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:c,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[T("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",n==="small"&&"size-8"),children:s??T(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),De("div",{children:[T("div",{className:"flex items-center gap-2",children:T("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&T("p",{className:"text-sm text-neutral-500",children:t})]})]})};function _o({variant:e,className:t,...r}){return T(yt,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",se({variant:e}),t)})}import{jsx as Ni}from"react/jsx-runtime";function Ci({className:e}){return Ni("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:Ni("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 q,jsxs as ki}from"react/jsx-runtime";var mu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
|
+
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{ChevronDown as xu}from"lucide-react";import yu from"next/image";import We from"next/link";import{useParams as wu}from"next/navigation";import{useState as Nu}from"react";import{jsx as ni}from"react/jsx-runtime";function ii(e){return ni("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:ni("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"})})}import{jsx as si}from"react/jsx-runtime";function Ht({className:e}){return si("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-10 w-10 text-black dark:text-white",e),children:si("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"})})}var Fr=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:lt,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:ct,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:st,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:Jt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ya,href:"/integrations"}],I3=[{icon:pa,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:ua,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:ii,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],Oo=[{icon:va,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:ba,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:fa,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ha,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:ga,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],li=[{icon:nr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:sr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Pt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Oo}],_t=[{icon:ir,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:or,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Pt,title:"About",description:"Company, values, and team",href:"/about"},{icon:ya,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Oa,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:wa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Ht,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:Ea,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],ci=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],di=[{name:"Privacy Policy",slug:"privacy"},{name:"Terms of Service",slug:"terms"},{name:"Partner Terms",slug:"partners"},{name:"Affiliate Program Terms",slug:"affiliates"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],A3=[{name:"X (Twitter)",icon:tr,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:er,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:rr,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Mm}from"react/jsx-runtime";function Br({className:e,children:t}){return Mm("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Be from"@radix-ui/react-popover";import{BoxSelect as lu,Home as cu,LayoutGrid as du,Type as mu}from"lucide-react";import{useParams as uu}from"next/navigation";import{useCallback as pu,useContext as fu,useState as gu}from"react";import{toast as bu}from"sonner";import*as ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as jm}from"framer-motion";import Ut from"next/link";import{useParams as Km,usePathname as Ym}from"next/navigation";import{createContext as Zm,useId as qm}from"react";import Xm from"swr";import{Link as bi}from"@radix-ui/react-navigation-menu";import hi from"next/image";import vi from"next/link";import{Link2 as Dm}from"lucide-react";import{jsx as Z,jsxs as J}from"react/jsx-runtime";var mi={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},rt={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 ui({className:e}){return J("div",{className:i("pointer-events-none relative size-full",e),children:[J("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"})]}),J("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[J("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[J("div",{className:"p-1.5",children:[J("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(Dm,{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=>J("div",{className:"flex items-center justify-between gap-2",children:[J("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:mi[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:qt(t)})]}),J("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",mi[t].value]})]},t))})]}),Z("div",{className:"relative",children:J("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[J("div",{className:"px-3 py-2.5",children:[J("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:rt.avatarIndex*100+"%"}}),J("div",{className:"flex flex-col items-end gap-1",children:[J("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(Ma,{className:"text-content-default size-3.5"}),rt.origin]}),J("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/${rt.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),rt.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:rt.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:rt.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(rt.details).map(([t,r])=>J("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 Em}from"react";import{jsx as g,jsxs as me}from"react/jsx-runtime";function pi(e){let t=Em();return me("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:i("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:[me("defs",{children:[g("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),g("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),g("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),g("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[g("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"}),g("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"})]}),g("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[g("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),g("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),g("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[g("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"}),g("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"})]}),g("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[g("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),g("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),g("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"}),g("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"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("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"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[g("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"}),g("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"})]}),g("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"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[g("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),g("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),g("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"}),g("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"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:g("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"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),me("defs",{children:[g("clipPath",{id:`${t}-b`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),g("clipPath",{id:`${t}-c`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),g("clipPath",{id:`${t}-d`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),g("clipPath",{id:`${t}-f`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),g("clipPath",{id:`${t}-g`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),g("clipPath",{id:`${t}-h`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),g("clipPath",{id:`${t}-j`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),g("clipPath",{id:`${t}-k`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),g("clipPath",{id:`${t}-l`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),me("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as Am,jsx as Me,jsxs as Ft}from"react/jsx-runtime";var Im=[{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 fi({className:e}){return Me("div",{className:i("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:Im.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&&Ft(Am,{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),Ft("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Ft("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)=>Ft("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[Me("span",{className:"text-content-muted text-[6px] font-medium",children:qt(o)}),Ft("span",{className:"text-content-default text-[9px] font-medium",children:["$",Xt(t[o])]})]},o))})]})]})})},r))})})}import{Link as Om}from"@radix-ui/react-navigation-menu";import zm from"next/link";import{jsx as Bt,jsxs as gi}from"react/jsx-runtime";var ot="text-xs uppercase text-neutral-500 dark:text-white/60",Vm="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 Wt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:n,...c}){return Bt(Om,{asChild:!0,children:Bt(zm,{className:i(Vm,a),...c,children:gi("div",{className:"flex items-center justify-between gap-3",children:[e,gi("div",{className:"flex-1",children:[Bt("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Bt("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&Bt(ia,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}import{jsx as z,jsxs as $t}from"react/jsx-runtime";var Hm=[{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:z(lt,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/links",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:z(pi,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:z(st,{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:z(ui,{className:"absolute bottom-0 left-0 size-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:z(ct,{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:z(fi,{})}],_m=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:z("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:z(hi,{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:z("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:z(hi,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function xi({domain:e}){return $t("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[z("div",{className:"grid grid-cols-3 gap-4",children:Hm.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:s})=>z(bi,{asChild:!0,children:$t(vi,{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:[z(Xe,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),$t("div",{className:"relative p-5 pb-0",children:[o,z("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),z("div",{className:"relative mt-10 h-40 grow",children:z("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:z("div",{className:"relative size-full",children:s})})}),z("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":n}})]})},t))}),z("div",{className:"grid grow grid-cols-2 gap-4",children:_m.map(({title:t,description:r,href:o,graphic:a})=>z(bi,{asChild:!0,children:$t(vi,{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:[z(Xe,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),z("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),z("div",{className:"relative flex items-center justify-between px-5 py-4",children:$t("div",{children:[z("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Fm}from"@radix-ui/react-navigation-menu";import Bm from"next/link";import{jsx as j,jsxs as at}from"react/jsx-runtime";var Wm=[{icon:ir,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:or,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function yi({domain:e}){return at("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[at("div",{className:"flex h-full flex-col p-4",children:[j("p",{className:i(ot,"mb-4 ml-2"),children:"Explore"}),j("div",{className:"grid grow grid-cols-2 gap-4",children:Wm.map(({icon:t,title:r,description:o,href:a})=>j(Fm,{asChild:!0,children:at(Bm,{href:_(a,e,Ne({domain:e,utm_content:r})),className:i("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:[at("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[j("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:j(Xe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),j("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),j(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),at("div",{className:"relative",children:[j("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),j("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),at("div",{className:"px-6 py-4",children:[j("p",{className:i(ot,"mb-2"),children:"Company"}),j("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>j(Wt,{className:"-mx-2",href:_(a,e,Ne({domain:e,utm_content:r})),icon:j("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:j(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),at("div",{className:"px-6 py-4",children:[j("p",{className:i(ot,"mb-2"),children:"Updates"}),j("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>j(Wt,{className:"-mx-2",href:_(a,e,Ne({domain:e,utm_content:r})),icon:j("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:j(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as $m}from"@radix-ui/react-navigation-menu";import Um from"next/link";import{jsx as re,jsxs as xt}from"react/jsx-runtime";var Gm=[{icon:nr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:sr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Pt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function wi({domain:e}){return xt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[xt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(ot,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:Gm.map(({icon:t,title:r,description:o,href:a})=>re($m,{asChild:!0,children:xt(Um,{href:_(a,e,Ne({domain:e,utm_content:r})),className:i("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:[xt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[re("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:re(Xe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),re("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),re(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),xt("div",{className:"relative",children:[re("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),re("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),xt("div",{className:"px-6 py-4",children:[re("p",{className:i(ot,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:Oo.map(({icon:t,iconClassName:r,title:o,href:a})=>re(Wt,{className:"-mx-2",href:_(a,e,Ne({domain:e,utm_content:o})),icon:re("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:re(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as eu,jsx as W,jsxs as yt}from"react/jsx-runtime";var zo=Zm({theme:"light"}),Vo=[{name:"Product",content:xi,childItems:Fr,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:wi,childItems:li,segments:["/solutions","/sdks"]},{name:"Resources",content:yi,childItems:_t,segments:["/help","/docs","/about","/careers","/brand","/blog","/changelog","/contact"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],Ni=i("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 $w({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Km();t&&(o=t);let a=qm(),n=pn(40),c=Ym(),{data:s,isLoading:m}=Xm(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return W(zo.Provider,{value:{theme:e},children:W(jm,{id:a,children:yt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[W("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",n&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),W(Br,{className:i("relative",r),children:yt("div",{className:"flex h-14 items-center justify-between",children:[W("div",{className:"grow basis-0",children:W(Ut,{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:W(Wr,{})})}),yt(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[W(ue.List,{className:"group relative z-0 flex",children:Vo.map(({name:d,href:l,segments:u,content:p})=>{let f=u.some(b=>c==null?void 0:c.startsWith(b));return yt(ue.Item,{children:[W(Qm,{trigger:!!p,children:l!==void 0?W(Ut,{id:`nav-${l}`,href:_(l,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:Ni,"data-active":f,children:d}):yt("button",{className:Ni,"data-active":f,children:[d,W(Jm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&W(ue.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:W(p,{domain:o})})]},d)})}),W("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:W(ue.Viewport,{className:i("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]")})})]}),W("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?W(Ut,{href:Ce,className:i(se({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:yt(eu,{children:[W(Ut,{href:"https://app.dub.co/login",className:i(se({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"}),W(Ut,{href:"https://app.dub.co/register",className:i(se({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 Jm(e){return W("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:W("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 Qm({trigger:e,children:t}){return e?W(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as tu,Menu as ru,X as ou}from"lucide-react";import wt from"next/link";import{useParams as Fo}from"next/navigation";import{useEffect as au,useState as ki}from"react";import nu from"swr";import{Fragment as su,jsx as D,jsxs as De}from"react/jsx-runtime";var Ho={"Dub Links":D("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:D(lt,{className:"size-3 text-orange-900"})}),"Dub Partners":D("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:D(ct,{className:"size-3 text-violet-900"})}),"Dub Analytics":D("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:D(st,{className:"size-3 text-green-900"})}),"Dub API":D("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:D(Jt,{className:"size-3 text-neutral-900"})})};function aN({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Fo();t&&(r=t);let[o,a]=ki(!1);au(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=nu(r.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return De("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[n&&Object.keys(n).length>0?D(_o,{href:Ce,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:De("div",{className:"flex gap-2 max-[280px]:hidden",children:[D(_o,{variant:"secondary",href:`${Ce}/login`,children:"Log in"}),D(_o,{href:`${Ce}/register`,children:"Sign Up"})]}),D("button",{onClick:()=>a(!o),className:i("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?D(ou,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):D(ru,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),D("nav",{className:i("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:[Vo.map(({name:s,href:m,childItems:d},l)=>D(iu,{name:s,href:m,childItems:d,setOpen:a},l)),n&&Object.keys(n).length>0?D("li",{className:"py-3 min-[281px]:hidden",children:D(wt,{href:Ce,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):De(su,{children:[D("li",{className:"py-3 min-[281px]:hidden",children:D(wt,{href:`${Ce}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),D("li",{className:"py-3 min-[281px]:hidden",children:D(wt,{href:`${Ce}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var iu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Fo(),[n,c]=ki(!1);return r?D("li",{className:"py-3",children:De(Se,{height:!0,children:[De("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[D("p",{className:"font-semibold",children:e}),D(tu,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",n&&"rotate-180")})]}),n&&D("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,m)=>"items"in s?De("div",{className:"grid grid-cols-1 gap-3",children:[D("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((d,l)=>D(Ci,{item:d,setOpen:o,size:"small"},l))]},m):D(Ci,{item:s,setOpen:o},m))})]})}):t?D("li",{className:"py-3",children:D(wt,{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},Ci=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=Fo(),s=Ho==null?void 0:Ho[e];return De(wt,{href:_(r,c,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:c,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[D("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",n==="small"&&"size-8"),children:s??D(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),De("div",{children:[D("div",{className:"flex items-center gap-2",children:D("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&D("p",{className:"text-sm text-neutral-500",children:t})]})]})};function _o({variant:e,className:t,...r}){return D(wt,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",se({variant:e}),t)})}import{jsx as Pi}from"react/jsx-runtime";function Si({className:e}){return Pi("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("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 q,jsxs as Ri}from"react/jsx-runtime";var hu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
50
50
|
<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"/>
|
|
51
|
-
</svg>`,
|
|
51
|
+
</svg>`,vu=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
52
52
|
<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"/>
|
|
53
|
-
</svg>`;function Wr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=iu(),{theme:a}=lu(zo),[n,c]=cu(!1),s=su(d=>{d.preventDefault(),c(!0)},[]),[,u]=ut();function l(d){du.promise(u(d),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return ki(Be.Root,{open:n,onOpenChange:c,children:[q(Be.Anchor,{asChild:!0,children:q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?q(Ci,{className:r}):q(Ht,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),q(Be.Portal,{children:q(Be.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:d=>{d.stopPropagation(),c(!1)},children:ki("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:[q(Gt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>l(mu),icon:q(Ht,{className:"h-4 w-4"})}),q(Gt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>l(uu),icon:q(nu,{strokeWidth:2,className:"h-4 w-4"})}),q(Gt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(ru,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Gt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(ou,{strokeWidth:2,className:"h-4 w-4"})}):q(Gt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(au,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Gt({className:e,...t}){return q(te,{className:i("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 W}from"react/jsx-runtime";var hu=[{name:"Twitter",icon:tr,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:er,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:rr,href:"https://www.youtube.com/@dubdotco"}],jt={product:[...Fr.filter(({title:e})=>e!=="Dub Integrations").map(({id:e,title:t,href:r})=>({id:e,name:t,href:r})),{id:null,name:"Dub Enterprise",href:"/enterprise"}],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:"Integrations",href:"/integrations"},{name:"Pricing",href:"/pricing"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"}],company:[{name:"About",href:"/about"},{name:"Blog",href:"/blog"},{name:"Careers",href:"/careers"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:ii.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","Tolt"].map(e=>({name:e,href:`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Kt="text-sm font-medium text-neutral-900",Yt="flex flex-col mt-2.5 gap-3.5",at="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function CN({staticDomain:e,className:t}){let{domain:r="dub.co"}=gu();e&&(r=e);let[o,a]=bu(!1);return D(Br,{className:i("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:W("footer",{children:[W("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[W("div",{className:"flex flex-col gap-6",children:[D("div",{className:"grow",children:W(We,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[W("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),D(Wr,{className:"h-8 text-neutral-800"})]})}),D("div",{className:"flex items-center gap-3",children:hu.map(({name:n,icon:c,href:s})=>W("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[D("span",{className:"sr-only",children:n}),D(c,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},n))})]}),W("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[D("h3",{className:Kt,children:"Product"}),D("ul",{role:"list",className:Yt,children:jt.product.map(n=>D("li",{children:W(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:at,children:[n.id&&D(Yr,{product:n.id}),n.name]})},n.name))})]}),W("div",{children:[D("h3",{className:Kt,children:"Solutions"}),D("ul",{role:"list",className:Yt,children:jt.solutions.map(n=>D("li",{children:D(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:at,children:n.name})},n.name))})]})]}),W("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:Kt,children:"Resources"}),D("ul",{role:"list",className:Yt,children:jt.resources.map(n=>D("li",{children:W(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(at,"gap-1"),children:[n.name,n.target&&D(Wa,{className:"size-3.5"})]})},n.name))})]})]}),W("div",{className:"md:grid md:grid-cols-2",children:[D("div",{className:"grid gap-8",children:W("div",{children:[D("h3",{className:Kt,children:"Company"}),W("ul",{role:"list",className:Yt,children:[jt.company.map(n=>D("li",{children:D(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(at,"gap-1"),children:n.name})},n.name)),D("li",{className:"-mt-1",children:D(ve,{content:D("div",{className:"flex w-screen flex-col gap-1 p-1.5 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[200px]",children:si.map(n=>D(We,{href:V(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(Co({variant:"default"}),at,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:W("button",{className:at,children:["Legal",D(pu,{className:"size-3.5"})]})})})]})]})}),W("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:Kt,children:"Compare"}),D("ul",{role:"list",className:Yt,children:jt.compare.map(n=>D("li",{children:W(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:at,children:[D(Yr,{product:n.product}),n.name]})},n.name))})]})]})]})]}),W("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[D(Cn,{}),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(fu,{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"})}),W("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as vu,motion as xu}from"framer-motion";import{useEffect as yu,useState as wu}from"react";import{jsx as Pi}from"react/jsx-runtime";var Si=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=wu(!1);yu(()=>{n(!0)},[]);let c=r?xu.div:"div";return Pi(vu,{children:a?Pi(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Nu}from"class-variance-authority";import{toast as Cu}from"sonner";import{jsx as Bo,jsxs as Pu}from"react/jsx-runtime";var ku=Nu("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 ON({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=ut(),s=o||ra;return Pu("button",{onClick:u=>{u.stopPropagation(),Cu.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(ku({variant:e}),r),type:"button",children:[Bo("span",{className:"sr-only",children:"Copy"}),n?Bo(la,{className:"h-3.5 w-3.5"}):Bo(s,{className:"h-3.5 w-3.5"})]})}import{toast as Su}from"sonner";import{jsx as Ru}from"react/jsx-runtime";function FN({value:e,children:t,className:r,successMessage:o}){let[a,n]=ut();return Ru("button",{onClick:c=>{c.stopPropagation(),Su.promise(n(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as Tu,jsxs as Lu}from"react/jsx-runtime";function WN({icon:e,text:t}){return Lu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Tu("p",{className:"truncate text-sm",children:t})]})}import{jsx as Mu}from"react/jsx-runtime";var UN=({children:e})=>Mu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Wo}from"react/jsx-runtime";function ZN({apexDomain:e,className:t,imageProps:r}){return e?Wo(Ot,{src:`${ea}${e}`,alt:e,className:i("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Wo("div",{className:i("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Wo(Va,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Ri}from"lucide-react";import{useSearchParams as Du}from"next/navigation";import{useEffect as Eu,useMemo as Iu,useRef as Au}from"react";import Ou from"swr";import{useDebounce as zu}from"use-debounce";import{Fragment as Ti,jsx as j,jsxs as $e}from"react/jsx-runtime";function n6({defaultUrl:e}){let t=Du(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=zu(Jo(r),500),a=Iu(()=>Qo(o||""),[o]),{data:n,isValidating:c}=Ou(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:s,description:u,image:l}=n||{},d=Au(null);Eu(()=>{!e&&d.current&&d.current.select()},[e]);let{isMobile:m}=Y();return $e(Ti,{children:[!e&&$e("div",{className:"relative flex items-center",children:[j(Ri,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{ref:d,name:"url",id:"url",type:"url",autoFocus:!m,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"})]}),$e("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&j("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:j(kt,{})}),l?j("img",{src:l,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):$e("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(na,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),$e("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?j("p",{className:"text-sm text-[#536471]",children:a}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),s?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:s}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),u?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:u}):$e("div",{className:"grid gap-2",children:[j("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),j("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function i6({defaultUrl:e}){return $e(Ti,{children:[$e("div",{className:"relative flex items-center",children:[j(Ri,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("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"})]}),j("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:j("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:j(kt,{})})})]})}import{AnimatePresence as Vu}from"framer-motion";import Li from"js-cookie";import{createContext as Hu,useState as _u}from"react";import{jsx as $o}from"react/jsx-runtime";var Fu=Hu({hidePopup:()=>{}});function p6({children:e,hiddenCookieId:t}){let[r,o]=_u(Li.get(t)==="1"),a=()=>{o(!0),Li.set(t,"1")};return $o(Si,{children:$o(Fu.Provider,{value:{hidePopup:a},children:$o(Vu,{children:!r&&e})})})}import{motion as Bu}from"framer-motion";import{jsx as Mi}from"react/jsx-runtime";function h6({value:e=0,max:t=100,className:r}){return Mi("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Mi(Bu.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 Ei}from"class-variance-authority";import{LayoutGroup as Wu,motion as $u}from"framer-motion";import Uu from"next/link";import{useId as Gu}from"react";import{jsx as Zt,jsxs as Di}from"react/jsx-runtime";var ju=Ei("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"}}),Ku=Ei("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function T6({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=Gu();return Zt("div",{className:i("flex text-sm",a),children:Zt(Wu,{id:n,children:t.map(({id:c,label:s,href:u,target:l})=>{let d=c===r;return Di(u?Uu:"div",{className:"relative",href:u??"#",target:l??void 0,children:[Di("button",{type:"button",...o&&!u&&{onClick:()=>o(c)},className:i(ju({variant:e}),l==="_blank"&&"group flex items-center gap-1.5"),"data-selected":d,"aria-selected":d,children:[s,l==="_blank"&&Zt(ba,{className:"size-2.5"})]}),d&&Zt($u.div,{layoutId:"indicator",transition:{duration:.1},className:Ku({variant:e}),children:Zt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Uo,jsxs as Ii}from"react/jsx-runtime";var Yu=[{icon:ja,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ta,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:_a,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Ua,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Ha,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function D6(){return Ii("div",{className:"p-3",children:[Uo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Uo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Yu.map(({text:e,icon:t,href:r})=>Ii("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Uo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Ai,jsxs as Zu}from"react/jsx-runtime";function A6({className:e}){return Zu("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:[Ai("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"}),Ai("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{to as AUTOPLAY_DEFAULT_DELAY,ub as Accordion,Bi as AccordionContent,_i as AccordionItem,Fi as AccordionTrigger,D6 as AdvancedLinkFeaturesTooltip,pp as Africa,Pp as Airtm,Gi as Alert,Ki as AlertDescription,ji as AlertTitle,xp as Amazon,Ep as AndroidLogo,Se as AnimatedSizeContainer,Ip as AppleLogo,Ap as ArrowBoldUp,Op as ArrowRight,zp as ArrowTrendUp,Vp as ArrowTurnLeft,Hp as ArrowTurnRight2,ba as ArrowUpRight,_p as ArrowsOppositeDirectionX,Fp as ArrowsOppositeDirectionY,fp as Asia,_o as AuthButton,yb as Avatar,u3 as Background,ur as Badge,Bp as BadgeCheck,Wp as BadgeCheck2Fill,Bb as BadgeTooltip,$p as Bell,Up as Blog,Ot as BlurImage,Gp as Bolt,jp as BoltFill,Yp as Book2,or as Book2Fill,Zp as Book2Small,Kp as BookOpen,qp as Books2,Xp as BoxArchive,Jp as BracketsCurly,ha as BriefcaseFill,Qp as Brush,e0 as BulletList,va as BulletListFill,te as Button,Wb as ButtonTooltip,ii as COMPARE_PAGES,w3 as CUSTOMER_STORIES,t0 as Calculator,hn as Calendar,n0 as Calendar6,o0 as CalendarDays,r0 as CalendarIcon,a0 as CalendarRefresh,cp as CardAmex,dp as CardDiscover,u1 as CardList,mp as CardMastercard,up as CardVisa,i0 as Cards,s0 as CaretUpFill,Ps as Carousel,Ss as CarouselContent,Rs as CarouselItem,M1 as CarouselNavBar,Ls as CarouselNext,Ts as CarouselPrevious,F1 as CarouselThumbnail,_1 as CarouselThumbnails,Sp as CashApp,l0 as ChartActivity2,c0 as ChartArea2,d0 as ChartLine,yp as ChatGPT,xa as Check,ar as Check2,mt as Checkbox,ya as CheckboxCheckedFill,wa as CheckboxUnchecked,m0 as ChevronLeft,u0 as ChevronRight,Na as CircleCheck,p0 as CircleCheckFill,f0 as CircleDollar,g0 as CircleDotted,Ca as CircleHalfDottedCheck,ka as CircleHalfDottedClock,Pa as CircleInfo,b0 as CirclePercentage,h0 as CirclePlay,v0 as CirclePlayFill,x0 as CircleQuestion,y0 as CircleUser,Zr as CircleWarning,w0 as CircleXmark,N0 as Circles,C0 as Circles3,Si as ClientOnly,Sa as CloudUpload,k0 as Code,P0 as ColorPalette2,Ov as Combobox,A6 as CompositeLogo,S0 as ConnectedDots,T0 as ConnectedDots4,R0 as ConnectedDotsFill,L0 as Connections3,ra as Copy,ON as CopyButton,FN as CopyText,M0 as CreditCard,D0 as Crosshairs3,E0 as Crown,qu as CrownSmall,I0 as Cube,A0 as CubeSettings,O0 as CubeSettingsFill,z0 as CurrencyDollar,Ra as CursorRays,V0 as DatabaseKey,so as DatePickerContext,xx as DateRangePicker,H0 as Desktop,_0 as DiamondTurnRight,nr as DiamondTurnRightFill,F0 as Directions,B0 as Discount,W0 as Dots,Rx as DotsPattern,$0 as Download,it as DubAnalyticsIcon,Jt as DubApiIcon,Xu as DubCraftedShield,st as DubLinksIcon,lt as DubPartnersIcon,Yr as DubProductIcon,Cn as DubStatusBadge,U0 as Duplicate,pr as DynamicTooltipWrapper,Ta as Earth,G0 as EarthPosition,Sy as EditColumnsButton,Ox as EmptyState,j0 as Envelope,K0 as EnvelopeAlert,Y0 as EnvelopeArrowRight,La as EnvelopeFill,gp as Europe,oa as ExpandingArrow,Ma as Eye,Da as EyeSlash,Fr as FEATURES_LIST,tp as Facebook,Ea as FeatherFill,wp as Figma,Z0 as FileContent,jx as FileUpload,q0 as FileZip2,h2 as Filter,J0 as Filter2,X0 as FilterBars,ef as Flag2,Ia as Flag6,Q0 as FlagWavy,tf as Flask,rf as FlaskSmall,of as Folder,cf as Folder5,af as FolderBookmark,nf as FolderLock,sf as FolderPlus,lf as FolderShield,CN as Footer,k2 as Form,df as GamingConsole,mf as Gauge6,Aa as Gear,uf as Gear2,pf as Gear3,ff as Gem,Oa as Gift,gf as GiftFill,Np as GitHubEnhanced,Qt as Github,bf as Globe,Va as Globe2,za as GlobePointer,hf as GlobeSearch,ma as Go,rp as Google,Cp as GoogleEnhanced,vf as GreekTemple,qe as Grid,xf as GridIcon,yf as GridLayoutRows,wf as GridPlus,Nf as GripDotsVertical,Cf as Headset,kf as HeartFill,Pf as HexadecagonStar,Sf as History,Rf as Hyperlink,WN as IconMenu,Tf as Icosahedron,Ha as Incognito,Lf as InfinityIcon,_b as InfoTooltip,UN as InlineSnippet,Yc as Input,Mf as InputField,Df as InputPassword,_a as InputPasswordPointer,Fa as InputSearch,e4 as InputSelect,op as Instagram,Ef as InvoiceDollar,If as Key,on as KeyboardShortcutContext,Ph as KeyboardShortcutProvider,si as LEGAL_PAGES,gd as Label,Af as LayoutSidebar,Of as License,ir as LifeRing,zf as LinesY,Hf as Link4,Vf as LinkBroken,ZN as LinkLogo,n6 as LinkPreview,i6 as LinkPreviewPlaceholder,er as LinkedIn,Hb as LinkifyTooltipContent,kt as LoadingCircle,ep as LoadingDots,ke as LoadingSpinner,_f as LocationPin,Ff as Lock,Bf as LockFill,Ht as Logo,aa as Magic,Wf as Magnifier,$f as MapPosition,Ju as MarkdownIcon,Uf as MarketingTarget,Qu as MatrixLines,Br as MaxWidthWrapper,Gf as Menu3,u4 as MenuItem,jf as MessageSmile,sr as MicrophoneFill,N4 as MiniAreaChart,lr as Minus,Kf as MobilePhone,T4 as Modal,Yf as MoneyBill,Zf as MoneyBill2,qf as MoneyBills2,Xf as Msgs,Dw as Nav,zo as NavContext,jw as NavMobile,Wr as NavWordmark,bp as NorthAmerica,Jf as Note,ig as NucleoPhoto,O4 as NumberStepper,Fb as NumberTooltip,hp as Oceania,Qf as OfficeBuilding,ib as PLAN_FEATURE_ICONS,Ba as Page2,H4 as PaginationControls,eg as Paintbrush,tg as Palette2,rg as PaperPlane,Rp as Payoneer,Tp as Paypal,ag as Pen2,og as PenWriting,ng as PercentageArrowDown,na as Photo,ua as Php,sg as Plug2,ct as Plus,lg as Plus2,ve as Popover,p6 as Popup,Fu as PopupContext,cg as Post,ap as Prisma,ca as ProductHunt,h6 as ProgressBar,dg as Pyramid,pa as Python,mg as QRCode,_t as RESOURCES,Ad as RadioGroup,Od as RadioGroupItem,da as Raycast,ug as Receipt2,Wa as ReferredVia,pg as Refresh2,fg as Robot,fa as Ruby,Oo as SDKS,N3 as SOCIAL_LINKS,ni as SOLUTIONS,$a as SatelliteDish,gg as ScanText,bg as Scribble,j4 as Sheet,hg as ShieldAlert,vg as ShieldCheck,xg as ShieldKeyhole,yg as ShieldSlash,wg as ShieldUser,q4 as ShimmerDots,Ng as Shuffle,Vb as SimpleTooltipContent,np as Slack,Q4 as Slider,Cg as Sliders,oy as SmartDateTimePicker,ia as SortOrder,vp as SouthAmerica,kg as Sparkle3,kp as Spotify,Pg as SquareChart,Sg as SquareLayoutGrid5,Rg as SquareLayoutGrid6,Tg as SquareUserSparkle2,Lg as SquareXmark,Mg as Stars2,dy as StatusBadge,Lp as Stripe,Mp as StripeLink,sa as Success,vy as Switch,_g as TV,T6 as TabSelect,qy as Table,Dg as TableIcon,Eg as TableRows2,Ig as Tablet,Ag as Tag,Og as Tags,la as Tick,ip as TikTok,Ua as Timer2,sp as Tinybird,Ga as Toggle2Fill,r3 as ToggleGroup,zg as Toggles,wb as TokenAvatar,Q as Tooltip,zb as TooltipContent,Ob as TooltipProvider,Vg as Trash,Hg as TriangleWarning,tr as Twitter,ga as Typescript,d3 as UTMBuilder,Nm as UTM_PARAMETERS,Fg as UiCard,lp as Unsplash,Bg as User,Wg as UserCheck,$g as UserCrown,Ug as UserDelete,Gg as UserFocus,jg as UserMinus,Kg as UserPlus,Yg as UserXmark,Zg as Users,Xg as Users2,Jg as Users6,Pt as UsersFill,qg as UsersSettings,Dp as Venmo,Qg as Versions2,ja as Views,eb as Watch,tb as Webhook,rb as Window,ob as WindowSearch,ab as WindowSettings,Ci as Wordmark,nb as Xmark,rr as YouTube,Ji as badgeVariants,se as buttonVariants,qi as getUserAvatarUrl,Co as menuItemVariants,Vo as navItems,Jd as statusBadgeVariants,he as useCarousel,Qa as useCarouselActiveIndex,Z1 as useColumnVisibility,Q1 as useCookies,ut as useCopyToClipboard,ah as useCurrentAnchor,lh as useEnterSubmit,uh as useInViewport,gh as useInputFocused,xh as useIntersectionObserver,Ie as useKeyboardShortcut,oo as useLocalStorage,Y as useMediaQuery,Mh as useOptimisticUpdate,Wh as usePagination,Gh as useRemoveGAParams,gr as useResizeObserver,sn as useRouterStuff,dn as useScroll,Ae as useScrollProgress,Zy as useTable,nn as useTablePagination,iv as useToastWithUndo};
|
|
53
|
+
</svg>`;function Wr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=uu(),{theme:a}=fu(zo),[n,c]=gu(!1),s=pu(l=>{l.preventDefault(),c(!0)},[]),[,m]=pt();function d(l){bu.promise(m(l),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Ri(Be.Root,{open:n,onOpenChange:c,children:[q(Be.Anchor,{asChild:!0,children:q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?q(Si,{className:r}):q(Ht,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),q(Be.Portal,{children:q(Be.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:l=>{l.stopPropagation(),c(!1)},children:Ri("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:[q(Gt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(hu),icon:q(Ht,{className:"h-4 w-4"})}),q(Gt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(vu),icon:q(mu,{strokeWidth:2,className:"h-4 w-4"})}),q(Gt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(lu,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Gt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(cu,{strokeWidth:2,className:"h-4 w-4"})}):q(Gt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(du,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Gt({className:e,...t}){return q(te,{className:i("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 I,jsxs as $}from"react/jsx-runtime";var Cu=[{name:"Twitter",icon:tr,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:er,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:rr,href:"https://www.youtube.com/@dubdotco"}],jt={product:[...Fr.filter(({title:e})=>e!=="Dub Integrations").map(({id:e,title:t,href:r})=>({id:e,name:t,href:r})),{id:null,name:"Dub Enterprise",href:"/enterprise"}],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:"Integrations",href:"/integrations"},{name:"Pricing",href:"/pricing"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"}],company:[{name:"About",href:"/about"},{name:"Blog",href:"/blog"},{name:"Careers",href:"/careers"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"},{name:"Privacy",href:"/privacy"}],compare:ci.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","Tolt"].map(e=>({name:e,href:`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Kt="text-sm font-medium text-neutral-900",Yt="flex flex-col mt-2.5 gap-3.5",nt="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function ON({staticDomain:e,className:t}){let{domain:r="dub.co"}=wu();e&&(r=e);let[o,a]=Nu(!1);return I(Br,{className:i("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:[I("div",{className:"grow",children:$(We,{href:_("/",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"]}),I(Wr,{className:"h-8 text-neutral-800"})]})}),I("div",{className:"flex items-center gap-3",children:Cu.map(({name:n,icon:c,href:s})=>$("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[I("span",{className:"sr-only",children:n}),I(c,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},n))})]}),$("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:[I("h3",{className:Kt,children:"Product"}),I("ul",{role:"list",className:Yt,children:jt.product.map(n=>I("li",{children:$(We,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:nt,children:[n.id&&I(Yr,{product:n.id}),n.name]})},n.name))})]}),$("div",{children:[I("h3",{className:Kt,children:"Solutions"}),I("ul",{role:"list",className:Yt,children:jt.solutions.map(n=>I("li",{children:I(We,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:nt,children:n.name})},n.name))})]})]}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Kt,children:"Resources"}),I("ul",{role:"list",className:Yt,children:jt.resources.map(n=>I("li",{children:$(We,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(nt,"gap-1"),children:[n.name,n.target&&I(Ga,{className:"size-3.5"})]})},n.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[I("div",{className:"grid gap-8",children:$("div",{children:[I("h3",{className:Kt,children:"Company"}),$("ul",{role:"list",className:Yt,children:[jt.company.map(n=>I("li",{children:I(We,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(nt,"gap-1"),children:n.name})},n.name)),I("li",{className:"-mt-1",children:I(ve,{content:I("div",{className:"flex w-screen flex-col gap-1 p-1.5 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[200px]",children:di.map(n=>I(We,{href:_(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(Co({variant:"default"}),nt,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:$("button",{className:nt,children:["Legal",I(xu,{className:"size-3.5"})]})})})]})]})}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Kt,children:"Compare"}),I("ul",{role:"list",className:Yt,children:jt.compare.map(n=>I("li",{children:$(We,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:nt,children:[I(Yr,{product:n.product}),n.name]})},n.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[I(Sn,{}),I(We,{href:_("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:I(yu,{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 ku,motion as Pu}from"framer-motion";import{useEffect as Su,useState as Ru}from"react";import{jsx as Ti}from"react/jsx-runtime";var Li=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=Ru(!1);Su(()=>{n(!0)},[]);let c=r?Pu.div:"div";return Ti(ku,{children:a?Ti(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Tu}from"class-variance-authority";import{toast as Lu}from"sonner";import{jsx as Bo,jsxs as Du}from"react/jsx-runtime";var Mu=Tu("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 KN({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=pt(),s=o||na;return Du("button",{onClick:m=>{m.stopPropagation(),Lu.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(Mu({variant:e}),r),type:"button",children:[Bo("span",{className:"sr-only",children:"Copy"}),n?Bo(ma,{className:"h-3.5 w-3.5"}):Bo(s,{className:"h-3.5 w-3.5"})]})}import{toast as Eu}from"sonner";import{jsx as Iu}from"react/jsx-runtime";function JN({value:e,children:t,className:r,successMessage:o}){let[a,n]=pt();return Iu("button",{onClick:c=>{c.stopPropagation(),Eu.promise(n(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as Au,jsxs as Ou}from"react/jsx-runtime";function e6({icon:e,text:t}){return Ou("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Au("p",{className:"truncate text-sm",children:t})]})}import{jsx as zu}from"react/jsx-runtime";var r6=({children:e})=>zu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Wo}from"react/jsx-runtime";function s6({apexDomain:e,className:t,imageProps:r}){return e?Wo(Ot,{src:`${oa}${e}`,alt:e,className:i("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Wo("div",{className:i("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Wo(Fa,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Mi}from"lucide-react";import{useSearchParams as Vu}from"next/navigation";import{useEffect as Hu,useMemo as _u,useRef as Fu}from"react";import Bu from"swr";import{useDebounce as Wu}from"use-debounce";import{Fragment as Di,jsx as K,jsxs as $e}from"react/jsx-runtime";function h6({defaultUrl:e}){let t=Vu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=Wu(Jo(r),500),a=_u(()=>ra(o||""),[o]),{data:n,isValidating:c}=Bu(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:s,description:m,image:d}=n||{},l=Fu(null);Hu(()=>{!e&&l.current&&l.current.select()},[e]);let{isMobile:u}=Y();return $e(Di,{children:[!e&&$e("div",{className:"relative flex items-center",children:[K(Mi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:l,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"})]}),$e("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&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"}):$e("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(la,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),$e("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"}),s?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:s}):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}):$e("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 v6({defaultUrl:e}){return $e(Di,{children:[$e("div",{className:"relative flex items-center",children:[K(Mi,{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 $u}from"framer-motion";import Ei from"js-cookie";import{createContext as Uu,useState as Gu}from"react";import{jsx as $o}from"react/jsx-runtime";var ju=Uu({hidePopup:()=>{}});function P6({children:e,hiddenCookieId:t}){let[r,o]=Gu(Ei.get(t)==="1"),a=()=>{o(!0),Ei.set(t,"1")};return $o(Li,{children:$o(ju.Provider,{value:{hidePopup:a},children:$o($u,{children:!r&&e})})})}import{motion as Ku}from"framer-motion";import{jsx as Ii}from"react/jsx-runtime";function L6({value:e=0,max:t=100,className:r}){return Ii("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Ii(Ku.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 Oi}from"class-variance-authority";import{LayoutGroup as Yu,motion as Zu}from"framer-motion";import qu from"next/link";import{useId as Xu}from"react";import{jsx as Zt,jsxs as Ai}from"react/jsx-runtime";var Ju=Oi("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"}}),Qu=Oi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function F6({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=Xu();return Zt("div",{className:i("flex text-sm",a),children:Zt(Yu,{id:n,children:t.map(({id:c,label:s,href:m,target:d})=>{let l=c===r;return Ai(m?qu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Ai("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:i(Ju({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":l,"aria-selected":l,children:[s,d==="_blank"&&Zt(xa,{className:"size-2.5"})]}),l&&Zt(Zu.div,{layoutId:"indicator",transition:{duration:.1},className:Qu({variant:e}),children:Zt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Uo,jsxs as zi}from"react/jsx-runtime";var ep=[{icon:Za,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Da,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Wa,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Ka,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Ba,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function $6(){return zi("div",{className:"p-3",children:[Uo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Uo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:ep.map(({text:e,icon:t,href:r})=>zi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Uo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Vi,jsxs as tp}from"react/jsx-runtime";function j6({className:e}){return tp("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:[Vi("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"}),Vi("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{to as AUTOPLAY_DEFAULT_DELAY,yb as Accordion,Ui as AccordionContent,Wi as AccordionItem,$i as AccordionTrigger,$6 as AdvancedLinkFeaturesTooltip,wp as Africa,Ip as Airtm,Yi as Alert,qi as AlertDescription,Zi as AlertTitle,Rp as Amazon,Fp as AndroidLogo,Se as AnimatedSizeContainer,Bp as AppleLogo,Wp as ArrowBoldUp,$p as ArrowRight,Up as ArrowTrendUp,Gp as ArrowTurnLeft,jp as ArrowTurnRight2,xa as ArrowUpRight,rp as ArrowUpRight2,Kp as ArrowsOppositeDirectionX,Yp as ArrowsOppositeDirectionY,Np as Asia,_o as AuthButton,Tb as Avatar,k3 as Background,ur as Badge,Zp as BadgeCheck,qp as BadgeCheck2Fill,Zb as BadgeTooltip,Xp as Bell,Jp as Blog,Ot as BlurImage,Qp as Bolt,e0 as BoltFill,r0 as Book2,or as Book2Fill,o0 as Book2Small,t0 as BookOpen,a0 as Books2,n0 as BoxArchive,i0 as BracketsCurly,ya as BriefcaseFill,s0 as Brush,l0 as BulletList,wa as BulletListFill,te as Button,qb as ButtonTooltip,ci as COMPARE_PAGES,I3 as CUSTOMER_STORIES,c0 as Calculator,yn as Calendar,p0 as Calendar6,m0 as CalendarDays,d0 as CalendarIcon,u0 as CalendarRefresh,hp as CardAmex,vp as CardDiscover,y1 as CardList,xp as CardMastercard,yp as CardVisa,f0 as Cards,g0 as CaretUpFill,Ts as Carousel,Ls as CarouselContent,Ms as CarouselItem,H1 as CarouselNavBar,Es as CarouselNext,Ds as CarouselPrevious,Y1 as CarouselThumbnail,K1 as CarouselThumbnails,Ap as CashApp,b0 as ChartActivity2,h0 as ChartArea2,v0 as ChartLine,Tp as ChatGPT,Na as Check,ar as Check2,ut as Checkbox,Ca as CheckboxCheckedFill,ka as CheckboxUnchecked,x0 as ChevronLeft,y0 as ChevronRight,Pa as CircleCheck,w0 as CircleCheckFill,N0 as CircleDollar,C0 as CircleDotted,Sa as CircleHalfDottedCheck,Ra as CircleHalfDottedClock,Ta as CircleInfo,k0 as CirclePercentage,P0 as CirclePlay,S0 as CirclePlayFill,R0 as CircleQuestion,T0 as CircleUser,Zr as CircleWarning,L0 as CircleXmark,M0 as Circles,D0 as Circles3,Li as ClientOnly,La as CloudUpload,E0 as Code,I0 as ColorPalette2,Kv as Combobox,j6 as CompositeLogo,A0 as ConnectedDots,z0 as ConnectedDots4,O0 as ConnectedDotsFill,V0 as Connections3,na as Copy,KN as CopyButton,JN as CopyText,H0 as CreditCard,_0 as Crosshairs3,F0 as Crown,op as CrownSmall,B0 as Cube,W0 as CubeSettings,$0 as CubeSettingsFill,U0 as CurrencyDollar,Ma as CursorRays,G0 as DatabaseKey,so as DatePickerContext,Dx as DateRangePicker,j0 as Desktop,K0 as DiamondTurnRight,nr as DiamondTurnRightFill,Y0 as Directions,Z0 as Discount,q0 as Dots,_x as DotsPattern,X0 as Download,st as DubAnalyticsIcon,Jt as DubApiIcon,ap as DubCraftedShield,lt as DubLinksIcon,ct as DubPartnersIcon,Yr as DubProductIcon,Sn as DubStatusBadge,J0 as Duplicate,pr as DynamicTooltipWrapper,Da as Earth,Q0 as EarthPosition,Hy as EditColumnsButton,Kx as EmptyState,ef as Envelope,tf as EnvelopeAlert,rf as EnvelopeArrowRight,Ea as EnvelopeFill,Cp as Europe,ia as ExpandingArrow,Ia as Eye,Aa as EyeSlash,Fr as FEATURES_LIST,cp as Facebook,Oa as FeatherFill,Lp as Figma,of as FileContent,a2 as FileUpload,af as FileZip2,L2 as Filter,sf as Filter2,nf as FilterBars,cf as Flag2,za as Flag6,lf as FlagWavy,df as Flask,mf as FlaskSmall,uf as Folder,hf as Folder5,pf as FolderBookmark,ff as FolderLock,gf as FolderPlus,bf as FolderShield,ON as Footer,z2 as Form,vf as GamingConsole,xf as Gauge6,Va as Gear,yf as Gear2,wf as Gear3,Nf as Gem,Ha as Gift,Cf as GiftFill,Mp as GitHubEnhanced,Qt as Github,kf as Globe,Fa as Globe2,_a as GlobePointer,Pf as GlobeSearch,fa as Go,dp as Google,Dp as GoogleEnhanced,Sf as GreekTemple,Xe as Grid,Rf as GridIcon,Tf as GridLayoutRows,Lf as GridPlus,Mf as GripDotsVertical,Df as Headset,Ef as HeartFill,If as HexadecagonStar,Af as History,Of as Hyperlink,np as IOSAppStore,e6 as IconMenu,zf as Icosahedron,Ba as Incognito,Vf as InfinityIcon,Kb as InfoTooltip,r6 as InlineSnippet,Qc as Input,Hf as InputField,_f as InputPassword,Wa as InputPasswordPointer,$a as InputSearch,u4 as InputSelect,mp as Instagram,Ff as InvoiceDollar,Bf as Key,sn as KeyboardShortcutContext,Vh as KeyboardShortcutProvider,di as LEGAL_PAGES,yd as Label,Wf as LayoutSidebar,$f as License,ir as LifeRing,Uf as LinesY,jf as Link4,Gf as LinkBroken,s6 as LinkLogo,h6 as LinkPreview,v6 as LinkPreviewPlaceholder,er as LinkedIn,jb as LinkifyTooltipContent,kt as LoadingCircle,lp as LoadingDots,ke as LoadingSpinner,Kf as LocationPin,Yf as Lock,Zf as LockFill,Ht as Logo,sa as Magic,qf as Magnifier,Xf as MapPosition,ip as MarkdownIcon,Jf as MarketingTarget,sp as MatrixLines,Br as MaxWidthWrapper,Qf as Menu3,k4 as MenuItem,eg as MessageSmile,sr as MicrophoneFill,A4 as MiniAreaChart,lr as Minus,tg as MobilePhone,F4 as Modal,rg as MoneyBill,og as MoneyBill2,ag as MoneyBills2,ng as Msgs,$w as Nav,zo as NavContext,aN as NavMobile,Wr as NavWordmark,kp as NorthAmerica,ig as Note,fg as NucleoPhoto,K4 as NumberStepper,Yb as NumberTooltip,Pp as Oceania,sg as OfficeBuilding,fb as PLAN_FEATURE_ICONS,Ua as Page2,q4 as PaginationControls,lg as Paintbrush,cg as Palette2,dg as PaperPlane,Op as Payoneer,zp as Paypal,ug as Pen2,mg as PenWriting,pg as PercentageArrowDown,la as Photo,ga as Php,gg as Plug2,dt as Plus,bg as Plus2,ve as Popover,P6 as Popup,ju as PopupContext,hg as Post,up as Prisma,ua as ProductHunt,L6 as ProgressBar,vg as Pyramid,ba as Python,xg as QRCode,_t as RESOURCES,_d as RadioGroup,Fd as RadioGroupItem,pa as Raycast,yg as Receipt2,Ga as ReferredVia,wg as Refresh2,Ng as Robot,ha as Ruby,Oo as SDKS,A3 as SOCIAL_LINKS,li as SOLUTIONS,ja as SatelliteDish,Cg as ScanText,kg as Scribble,ay as Sheet,Pg as ShieldAlert,Sg as ShieldCheck,Rg as ShieldKeyhole,Tg as ShieldSlash,Lg as ShieldUser,ly as ShimmerDots,Mg as Shuffle,Gb as SimpleTooltipContent,pp as Slack,my as Slider,Dg as Sliders,gy as SmartDateTimePicker,ca as SortOrder,Sp as SouthAmerica,Eg as Sparkle3,Ep as Spotify,Ig as SquareChart,Ag as SquareLayoutGrid5,Og as SquareLayoutGrid6,zg as SquareUserSparkle2,Vg as SquareXmark,Hg as Stars2,Ny as StatusBadge,Vp as Stripe,Hp as StripeLink,da as Success,My as Switch,Kg as TV,F6 as TabSelect,l3 as Table,_g as TableIcon,Fg as TableRows2,Bg as Tablet,Wg as Tag,$g as Tags,ma as Tick,fp as TikTok,Ka as Timer2,gp as Tinybird,Ya as Toggle2Fill,f3 as ToggleGroup,Ug as Toggles,Lb as TokenAvatar,Q as Tooltip,Ub as TooltipContent,$b as TooltipProvider,Gg as Trash,jg as TriangleWarning,tr as Twitter,va as Typescript,N3 as UTMBuilder,Tm as UTM_PARAMETERS,Yg as UiCard,bp as Unsplash,Zg as User,qg as UserCheck,Xg as UserCrown,Jg as UserDelete,Qg as UserFocus,eb as UserMinus,tb as UserPlus,rb as UserXmark,ob as Users,nb as Users2,ib as Users6,Pt as UsersFill,ab as UsersSettings,_p as Venmo,sb as Versions2,Za as Views,lb as Watch,cb as Webhook,db as Window,mb as WindowSearch,ub as WindowSettings,Si as Wordmark,pb as Xmark,rr as YouTube,ts as badgeVariants,se as buttonVariants,Qi as getUserAvatarUrl,Co as menuItemVariants,Vo as navItems,om as statusBadgeVariants,he as useCarousel,rn as useCarouselActiveIndex,oh as useColumnVisibility,sh as useCookies,pt as useCopyToClipboard,uh as useCurrentAnchor,bh as useCurrentSubdomain,yh as useEnterSubmit,kh as useInViewport,Rh as useInputFocused,Dh as useIntersectionObserver,Ie as useKeyboardShortcut,oo as useLocalStorage,Y as useMediaQuery,Wh as useOptimisticUpdate,ev as usePagination,ov as useRemoveGAParams,gr as useResizeObserver,dn as useRouterStuff,pn as useScroll,Ae as useScrollProgress,s3 as useTable,cn as useTablePagination,vv as useToastWithUndo};
|