@dub/ui 0.2.26 → 0.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client"
2
- import{$ as gm,$a as r0,$b as j0,$c as Hp,A as Vt,Aa as _m,Ab as Xo,Ac as fp,Ad as uf,B as Yu,Ba as Bm,Bb as P0,Bc as gp,Bd as mf,C as Zu,Ca as Wm,Cb as S0,Cc as hp,Cd as pf,D as qu,Da as Fm,Db as M0,Dc as vp,Dd as ff,E as Xu,Ea as Um,Eb as R0,Ec as bp,Ed as gf,F as Ao,Fa as Bo,Fb as T0,Fc as xp,Fd as hf,G as Do,Ga as Wo,Gb as L0,Gc as yp,Gd as vf,H as Io,Ha as Fo,Hb as Jo,Hc as wp,Hd as bf,I as zo,Ia as Uo,Ib as E0,Ic as la,Id as xf,J as Oo,Ja as Go,Jb as A0,Jc as Cp,Jd as yf,K as Ju,Ka as Gm,Kb as D0,Kc as Np,Kd as wf,L as Qu,La as $m,Lb as I0,Lc as kp,Ld as Cf,M as em,Ma as Km,Mb as z0,Mc as Pp,Md as Nf,N as tm,Na as $o,Nb as O0,Nc as Sp,O as rm,Oa as Ko,Ob as H0,Oc as Mp,P as om,Pa as jo,Pb as V0,Pc as Rp,Q as am,Qa as jm,Qb as _0,Qc as Tp,R as nm,Ra as Ym,Rb as B0,Rc as Wt,S as im,Sa as Zm,Sb as W0,Sc as Lp,T as sm,Ta as qm,Tb as F0,Tc as Ep,U as lm,Ua as Xm,Ub as U0,Uc as Ap,V as cm,Va as Nr,Vb as Qo,Vc as Dp,W as dm,Wa as Jm,Wb as G0,Wc as ca,X as um,Xa as Qm,Xb as $0,Xc as Ip,Y as mm,Ya as e0,Yb as ea,Yc as zp,Z as pm,Za as Yo,Zb as K0,Zc as da,_ as fm,_a as t0,_b as ta,_c as Op,a as No,aa as hm,ab as o0,ac as Y0,ad as Vp,b as Ou,ba as vm,bb as _t,bc as Z0,bd as _p,c as Hu,ca as bm,cb as a0,cc as q0,cd as Bp,d as ko,da as xm,db as n0,dc as X0,dd as Wp,e as Po,ea as ym,eb as i0,ec as ra,ed as Fp,f as Vu,fa as wm,fb as s0,fc as oa,fd as Up,g as So,ga as Cm,gb as l0,gc as aa,gd as Gp,h as Mo,ha as Ho,hb as c0,hc as J0,hd as $p,i as Ro,ia as Nm,ib as d0,ic as na,id as Kp,j as To,ja as km,jb as Bt,jc as Q0,jd as jp,k as ft,ka as Pm,kb as u0,kc as ep,kd as Yp,l as _u,la as Sm,lb as m0,lc as tp,ld as Zp,m as Ce,ma as Mm,mb as p0,mc as rp,md as qp,n as Bu,na as Rm,nb as f0,nc as ia,nd as Xp,o as zt,oa as Tm,ob as g0,oc as op,od as Jp,p as Wu,pa as Lm,pb as h0,pc as ap,pd as Qp,q as Fu,qa as Vo,qb as v0,qc as np,qd as ef,r as Ot,ra as Em,rb as b0,rc as ip,rd as tf,s as Uu,sa as Am,sb as x0,sc as sa,sd as rf,t as Lo,ta as Dm,tb as y0,tc as sp,td as of,u as Eo,ua as Im,ub as w0,uc as lp,ud as af,v as Gu,va as _o,vb as C0,vc as cp,vd as nf,w as $u,wa as zm,wb as N0,wc as dp,wd as sf,x as Ku,xa as Om,xb as k0,xc as up,xd as lf,y as Ht,ya as Hm,yb as Zo,yc as mp,yd as cf,z as ju,za as Vm,zb as qo,zc as pp,zd as df}from"./chunk-6OKYBXH5.mjs";import{a as q}from"./chunk-NWME2ANF.mjs";import{a as go,b as At,c as ho,d as vo,e as pt,f as bo,g as xo,h as O,i as we,j as yo,k as pe,l as i,m as Dt,n as It,o as wo,p as Co}from"./chunk-UNRIUV2D.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Qn}from"lucide-react";import*as Ut from"react";import{jsx as Ft,jsxs as oi}from"react/jsx-runtime";var Tf=ne.Root,ei=Ut.forwardRef(({className:e,...t},r)=>Ft(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));ei.displayName="AccordionItem";var ti=Ut.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?Qn:Wt;return Ft(ne.Header,{className:"flex",children:oi(ne.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,Ft(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});ti.displayName=ne.Trigger.displayName;var ri=Ut.forwardRef(({className:e,children:t,...r},o)=>Ft(ne.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}));ri.displayName=ne.Content.displayName;import{cva as ai}from"class-variance-authority";import*as Gt from"react";import{jsx as kr}from"react/jsx-runtime";var ni=ai("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),ii=Gt.forwardRef(({className:e,variant:t,...r},o)=>kr("div",{ref:o,role:"alert",className:i(ni({variant:t}),e),...r}));ii.displayName="Alert";var si=Gt.forwardRef(({className:e,...t},r)=>kr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));si.displayName="AlertTitle";var li=Gt.forwardRef(({className:e,...t},r)=>kr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));li.displayName="AlertDescription";import{sha256 as ci}from"js-sha256";import{useState as di}from"react";import{jsx as Pr}from"react/jsx-runtime";function ui(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dicebear.com/9.x/micah/svg";let t=`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id)}`,r=`https://api.dicebear.com/9.x/micah/png/${encodeURIComponent(`seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${ci(e.email)}?d=${encodeURIComponent(r)}`:t}function Hf({user:e={},className:t}){if(!e)return Pr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=di(ui(e));return Pr("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.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id||"")}`)}})}function Vf({id:e,className:t}){return Pr("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 mi}from"class-variance-authority";import{jsx as fi}from"react/jsx-runtime";var pi=mi("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 $t({className:e,variant:t,...r}){return fi("span",{className:i(pi({variant:t}),e),...r})}import{cva as xi}from"class-variance-authority";import{forwardRef as yi}from"react";import*as fe from"@radix-ui/react-tooltip";import gi from"linkify-react";import{HelpCircle as hi}from"lucide-react";import vi from"next/link";import{useState as bi}from"react";import{jsx as F,jsxs as Qe}from"react/jsx-runtime";function Jf({children:e}){return F(fe.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[s,u]=bi(!1);return Qe(fe.Root,{open:s,onOpenChange:u,delayDuration:l,disableHoverableContent:a,children:[F(fe.Trigger,{asChild:!0,onClick:()=>{u(!0)},onBlur:()=>{u(!1)},children:e}),F(fe.Portal,{children:F(fe.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?F("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:u}):t})})]})}function Qf({title:e,cta:t,href:r,target:o,onClick:a}){return Qe("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[F("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?F(vi,{href:r,...o?{target:o}:{},className:i(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?F(se,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function e1({title:e,cta:t,href:r}){return Qe("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",F("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function t1({children:e}){return F("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-neutral-700",children:F(gi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-neutral-400 hover:text-neutral-700"},children:e})})}function r1(e){return F(J,{...e,children:F(hi,{className:"h-4 w-4 text-neutral-500"})})}function o1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:F(J,{content:Qe("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Qe("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Dt(e||0,{full:!0})," ",t]}),a&&Qe("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",vo(a,{withAgo:!0})]})]}),children:o})}function a1({children:e,content:t,...r}){return F(J,{content:t,...r,children:F("div",{className:"flex cursor-pointer items-center",children:F($t,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function n1({children:e,tooltipProps:t,...r}){return F(J,{...t,children:F("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 ua({children:e,tooltipProps:t}){return t?F(J,{...t,children:F("div",{children:e})}):e}import{jsx as et,jsxs as ma}from"react/jsx-runtime";var ie=xi("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"}}),se=yi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:s,disabledTooltip:u,right:d,...n},p)=>u?et(J,{content:u,children:ma("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&&et("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&et("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})]})}):ma("button",{ref:p,type:n.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",n.disabled||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||l,...n,children:[l?et(Ce,{}):c||null,e&&et("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&et("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]}));se.displayName="Button";import{cva as wi}from"class-variance-authority";import{createContext as Ci}from"react";import{jsx as pa}from"react/jsx-runtime";var Ni=wi("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"}}}),gt=Ci({variant:"loose"});function fa({variant:e="loose",loading:t=!1,className:r,children:o}){return pa("ul",{className:i(Ni({variant:e,loading:t}),r),"data-variant":e,children:pa(gt.Provider,{value:{variant:e},children:o})})}import{cva as ki}from"class-variance-authority";import{createContext as Pi,useContext as Si,useEffect as Mi,useRef as Ri,useState as Ti}from"react";import{jsx as ga,jsxs as Ai}from"react/jsx-runtime";var Li=ki("w-full group/card border-neutral-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-neutral-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),Ei="w-full py-2.5 px-4",Sr=Pi({hovered:!1});function ha({outerClassName:e,innerClassName:t,children:r,onClick:o,hoverStateEnabled:a=!0,banner:l}){let{variant:c}=Si(gt),s=Ri(null),[u,d]=Ti(!1);return Mi(()=>{if(!u||!s.current)return;let n=setInterval(()=>{var p;((p=s.current)==null?void 0:p.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(n)},[u]),Ai("li",{ref:s,className:i(Li({variant:c}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":a,children:[l,ga("div",{className:i(Ei,t),onClick:o?n=>{document.getElementById("modal-backdrop")||pt(n)||o()}:void 0,children:ga(Sr.Provider,{value:{hovered:u},children:r})})]})}var T1=Object.assign(fa,{Card:Object.assign(ha,{Context:Sr}),Context:gt});import Di from"embla-carousel-autoplay";import Ii from"embla-carousel-react";import{ArrowLeft as zi,ArrowRight as Oi}from"lucide-react";import{createContext as Hi,forwardRef as vt,useCallback as ht,useContext as Vi,useEffect as Mr,useState as Rr}from"react";import{jsx as Ne,jsxs as xa}from"react/jsx-runtime";var Tr=2e3,va=Hi(null);function ge(){let e=Vi(va);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function ba(){let{api:e}=ge(),[t,r]=Rr(0),o=ht(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Mr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var _i=vt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...s},u)=>{let[d,n]=Ii({...t,axis:e==="horizontal"?"x":"y"},[...o?[Di(typeof o=="object"?o:{delay:Tr})]:[],...a||[]]),[p,f]=Rr(!1),[g,b]=Rr(!1),h=ht(R=>{!R||(f(R.canScrollPrev()),b(R.canScrollNext()))},[]),v=ht(()=>{n==null||n.scrollPrev()},[n]),N=ht(()=>{n==null||n.scrollNext()},[n]),C=ht(R=>{R.key==="ArrowLeft"?(R.preventDefault(),v()):R.key==="ArrowRight"&&(R.preventDefault(),N())},[v,N]);return Mr(()=>{!n||!r||r(n)},[n,r]),Mr(()=>{if(!!n)return h(n),n.on("reInit",h),n.on("select",h),()=>{n==null||n.off("select",h)}},[n,h]),Ne(va.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:N,canScrollPrev:p,canScrollNext:g},children:Ne("div",{ref:u,onKeyDownCapture:C,className:i("relative",l),role:"region","aria-roledescription":"carousel",...s,children:c})})});_i.displayName="Carousel";var Bi=vt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ge();return Ne("div",{ref:o,className:"overflow-hidden",children:Ne("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Bi.displayName="CarouselContent";var Wi=vt(({className:e,...t},r)=>{let{orientation:o}=ge();return Ne("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})});Wi.displayName="CarouselItem";var Fi=vt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=ge();return xa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ne(zi,{className:"h-4 w-4"}),Ne("span",{className:"sr-only",children:"Previous slide"})]})});Fi.displayName="CarouselPrevious";var Ui=vt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=ge();return xa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ne(Oi,{className:"h-4 w-4"}),Ne("span",{className:"sr-only",children:"Next slide"})]})});Ui.displayName="CarouselNext";import{cva as Gi}from"class-variance-authority";import{motion as $i}from"framer-motion";import{ChevronLeft as Ki,ChevronRight as ji}from"lucide-react";import*as Te from"react";import{jsx as Ge,jsxs as bt}from"react/jsx-runtime";var Yi=Gi("flex items-center justify-center gap-3 sm:gap-6",{variants:{variant:{simple:"relative",floating:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-neutral-800/10 bg-white sm:bottom-6 "}}}),j1=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=ge(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[u,d]=Te.useState(0),[n,p]=Te.useState(!1),f=Te.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),g=Te.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Te.useEffect(()=>{!c||(f(c),p((s==null?void 0:s.isPlaying())??!1),c.on("reInit",f),c.on("select",f),c.on("autoplay:play",()=>p(!0)),c.on("autoplay:stop",()=>p(!1)))},[c,s,f]),bt("div",{className:i(Yi({variant:e}),t),children:[e!=="simple"&&bt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:g(o),children:[Ge(Ki,{className:"h-4 w-4"}),Ge("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ge("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,v)=>bt("button",{onClick:g(()=>c.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ge("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===u?"bg-black":"bg-black/20",n&&v===u&&"w-6 bg-black/20"),children:n&&v===u&&Ge($i.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Tr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),bt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&bt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:g(r),children:[Ge(ji,{className:"h-4 w-4"}),Ge("span",{className:"sr-only",children:"Next slide"})]})]})};import Zi from"embla-carousel-react";import{forwardRef as qi,useCallback as Xi,useEffect as Ji}from"react";import{jsx as Kt}from"react/jsx-runtime";var rg=({className:e,...t})=>{let{api:r}=ge(),[o,a]=Zi({dragFree:!0}),l=Xi(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Ji(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),Kt("div",{className:"overflow-hidden",ref:o,children:Kt("div",{className:i("mx-4 flex gap-4",e),...t})})},og=qi(({index:e,className:t,...r},o)=>{let{api:a}=ge(),l=ba();return Kt("div",{ref:o,children:Kt("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===l}):t,...r})})});import*as xt from"@radix-ui/react-checkbox";import{Check as Qi}from"lucide-react";import*as ya from"react";import{jsx as Lr}from"react/jsx-runtime";var es=ya.forwardRef(({className:e,...t},r)=>Lr(xt.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",e),...t,children:Lr(xt.Indicator,{className:"flex items-center justify-center",children:Lr(Qi,{className:"h-3 w-3 text-white"})})}));es.displayName=xt.Root.displayName;import{Command as wt,CommandInput as Gs,CommandItem as $s,useCommandState as Ks}from"cmdk";import{ChevronDown as js}from"lucide-react";import{forwardRef as Ys,isValidElement as Zs,useCallback as qs,useEffect as qt,useRef as Xs,useState as yt}from"react";import{motion as Ws}from"framer-motion";import{forwardRef as Fs,useRef as Us}from"react";import Er from"js-cookie";import{useEffect as ts,useState as rs}from"react";function dg(e,t,r){let[o,a]=rs(()=>{let c=Er.get(e);return c?JSON.parse(c):t});return ts(()=>{let c=()=>{let s=Er.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Er.set(e,JSON.stringify(c),r)}]}import{useCallback as os,useEffect as as,useRef as ns,useState as is}from"react";var tt=(e=3e3)=>{let t=ns(null),[r,o]=is(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=os(async(c,{onSuccess:s}={})=>{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(u){console.error("Failed to copy: ",u)}},[e]);return as(()=>()=>a(),[]),[r,l]};import{useEffect as ss,useState as ls}from"react";function gg(){let[e,t]=ls(null);return ss(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var p,f,g;let u=s[0];if(!u)return;let d=(((p=u.rootBounds)==null?void 0:p.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 n=u.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(f=l.get(n))==null?void 0:f.next;for(;n&&n.getBoundingClientRect().top>d;)n=(g=l.get(n))==null?void 0:g.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}function vg(e){return{handleKeyDown:r=>{r.key==="Enter"&&r.metaKey&&(r.preventDefault(),e.current&&e.current.requestSubmit())}}}import{useEffect as cs,useState as ds}from"react";function wg(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=ds(o??!1);return cs(()=>{let c=()=>{let u=e.current;if(!u)return;let d=r==null?void 0:r.current,n=u.getBoundingClientRect(),p=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(n.top<p.bottom&&n.bottom>p.top&&n.left<p.right&&n.right>p.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 us,useState as ms}from"react";function kg(){let[e,t]=ms(!1);return us(()=>{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 ps,useState as fs}from"react";function Rg(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=fs(),s=(l==null?void 0:l.isIntersecting)&&a,u=([d])=>{c(d)};return ps(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!d)return;let p={threshold:t,root:r,rootMargin:o},f=new IntersectionObserver(u,p);return f.observe(d),()=>f.disconnect()},[e,JSON.stringify(t),r,o,s]),l}import{createContext as gs,useCallback as hs,useContext as vs,useEffect as wa,useId as bs,useState as xs}from"react";import{jsx as ys}from"react/jsx-runtime";var Ca=gs({listeners:[],setListeners:()=>{}});function Ig({children:e}){let[t,r]=xs([]);return ys(Ca.Provider,{value:{listeners:t,setListeners:r},children:e})}function rt(e,t,r={}){let o=bs(),{listeners:a,setListeners:l}=vs(Ca),c=hs(s=>{let u=s.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(s.metaKey||s.ctrlKey||u.tagName==="INPUT"||u.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet||(Array.isArray(e)?!e.includes(s.key):s.key!==e))return;let p=a.filter(g=>g.enabled!==!1&&(Array.isArray(g.key)?g.key.includes(s.key):g.key===s.key));!p.length||ho(p,(g,b)=>(b.priority??0)-(g.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.modal,r.sheet]);wa(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),wa(()=>(l(s=>[...s.filter(u=>u.id!==o),{id:o,key:e,...r}]),()=>l(s=>s.filter(u=>u.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as ws,useState as Cs}from"react";function Na(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Hg(e,t){let[r,o]=Cs(Na(e)??t);return ws(()=>{let l=Na(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Ns}from"sonner";import ks from"swr";function Fg(e,t){let{data:r,isLoading:o,mutate:a}=ks(e,pe);return{data:r,isLoading:o,update:async(l,c)=>Ns.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as Ma,useMemo as Ls}from"react";import{useEffect as ka,useState as Ps}from"react";function Pa({pageSize:e,page:t,onPageChange:r}){let[o,a]=Ps({pageIndex:t,pageSize:e});return ka(()=>{a(l=>({...l,pageIndex:t}))},[t]),ka(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Ss,useRouter as Ms,useSearchParams as Rs}from"next/navigation";import{useCallback as Ts}from"react";function Sa(){let e=Ss(),t=Ms(),r=Rs(),o=Object.fromEntries(r),a=(c,s)=>{let u=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let n=new URLSearchParams;r.forEach((p,f)=>{var g;(g=s.include)!=null&&g.includes(f)&&n.set(f,p)}),u=n}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(n=>u.delete(n)),c&&Object.entries(c).forEach(([n,p])=>u.set(n,p));let d=u.toString();return d.length>0?`?${d}`:""},l=Ts(({set:c,del:s,replace:u,scroll:d=!0,getNewPath:n,arrayDelimiter:p=","})=>{let f=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,v])=>f.set(h,Array.isArray(v)?v.join(p):v)),s&&(Array.isArray(s)?s.forEach(h=>f.delete(h)):f.delete(s));let g=f.toString(),b=`${e}${g.length>0?`?${g}`:""}`;if(n)return b;u?t.replace(b,{scroll:!1}):t.push(b,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:l,getQueryString:a}}function eh(e=wo){let{searchParams:t,queryParams:r}=Sa(),o=Ls(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Pa({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page"}:{set:{page:c.toString()}})}});return Ma(()=>{let c=parseInt(t.get("page")||"1")||1;l(s=>({...s,pageIndex:c}))},[t.get("page")]),Ma(()=>{r(a.pageIndex===1?{del:"page"}:{set:{page:a.pageIndex.toString()}})},[a]),{pagination:a,setPagination:l}}import{useEffect as Es}from"react";function oh(){Es(()=>{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 As,useState as Ds}from"react";function jt(e){let[t,r]=Ds(),o=([a])=>{r(a)};return As(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as Is,useEffect as Ra,useState as zs}from"react";function Ta(e){let[t,r]=zs(!1),o=Is(()=>{r(window.scrollY>e)},[e]);return Ra(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),Ra(()=>{o()},[o]),t}import{useCallback as Os,useEffect as Hs,useState as Vs}from"react";function ot(e){let[t,r]=Vs(1),o=Os(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(l/(c-s),1))},[]),a=jt(e);return Hs(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as _s}from"react";import{toast as Ea}from"sonner";import{jsx as Yt,jsxs as La}from"react/jsx-runtime";function Bs({id:e,message:t,undo:r}){let o=()=>{r(),Ea.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return _s(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),La("div",{className:"flex w-full items-center justify-between space-x-2",children:[La("div",{className:"flex items-center space-x-2",children:[Yt(Ro,{}),Yt("p",{className:"font-medium",children:t})]}),Yt("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 vh(){return({id:t,message:r,undo:o,duration:a})=>Ea(Yt(Bs,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Aa}from"react/jsx-runtime";var ke=Fs(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let s=Us(null),u=jt(s);return Aa(Ws.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((d=u==null?void 0:u.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=u==null?void 0:u.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:Aa("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Le from"@radix-ui/react-popover";import{Drawer as at}from"vaul";import{jsx as Pe,jsxs as Zt}from"react/jsx-runtime";function nt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:u,collisionBoundary:d,sticky:n,onEscapeKeyDown:p,onWheel:f}){let{isMobile:g}=q();return c||g?Zt(at.Root,{open:a,onOpenChange:l,children:[Pe(at.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Zt(at.Portal,{children:[Pe(at.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),Zt(at.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:p,onPointerDownOutside:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(at.Overlay,{})]})]}):Zt(Le.Root,{open:a,onOpenChange:l,children:[Pe(Le.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Le.Portal,{children:Pe(Le.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:n,collisionBoundary:d,onOpenAutoFocus:u,onEscapeKeyDown:p,onWheel:f,children:t})})]})}import{Fragment as Xt,jsx as E,jsxs as Se}from"react/jsx-runtime";function Js(e,t){return e===!0}function Kh({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:s,createLabel:u,onCreate:d,buttonProps:n,shortcutHint:p,caret:f,side:g,open:b,onOpenChange:h,onSearchChange:v,shouldFilter:N=!0,inputRight:C,inputClassName:R,optionRight:k,optionClassName:w,matchTriggerWidth:D,children:y}){let T=Js(e,r),M=Array.isArray(t)?t:t?[t]:[],{isMobile:Q}=q(),[S,z]=yt(!1),Y=b??S,L=h??z,[Z,ee]=yt(""),[mo,wr]=yt(!1),[Cr,qn]=yt(void 0),[Xn,po]=yt(!1),Jn=H=>{var Je;if(T){let Fe=M.some(({value:Ue})=>Ue===H.value);r(Fe?M.filter(({value:Ue})=>Ue!==H.value):[...M,H])}else r(M.length&&((Je=M[0])==null?void 0:Je.value)===H.value?null:H),L(!1)},fo=qs((H,Je)=>Je===""?[...H.filter(Fe=>Fe.first&&!M.some(Ue=>Ue.value===Fe.value)),...M,...H.filter(Fe=>!Fe.first&&!M.some(Ue=>Ue.value===Fe.value))]:H,[M]);return qt(()=>{mo&&(qn(o&&fo(o,Z)),wr(!1))},[mo,o,fo,Z]),qt(()=>{wr(!0)},[o]),qt(()=>{Y||(ee(""),wr(!0))},[Y]),qt(()=>v==null?void 0:v(Z),[Z]),E(nt,{openPopover:Y,setOpenPopover:L,align:"start",side:g,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(D&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(ke,{width:!Q&&!D,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(wt,{loop:!0,shouldFilter:N,children:[Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Gs,{placeholder:c,value:Z,onValueChange:ee,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!Z)&&(H.preventDefault(),H.stopPropagation(),L(!1))}}),C&&E("div",{className:"mr-2",children:C}),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(Qs,{children:E(wt.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Cr!==void 0?Se(Xt,{children:[Cr.map(H=>E(el,{option:H,multiple:T,selected:M.some(({value:Je})=>Je===H.value),onSelect:()=>Jn(H),right:k==null?void 0:k(H),className:w},`${H.label}, ${H.value}`)),Z.length>0&&d&&Se($s,{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",w),onSelect:async()=>{po(!0),await(d==null?void 0:d(Z))&&(ee(""),L(!1)),po(!1)},children:[Xn?E(Ce,{className:"size-4 shrink-0"}):E(Wt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(u==null?void 0:u(Z))||`Create "${Z}"`})]}),N?E(rl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Cr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(wt.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Ce,{})})})})})]})}),children:E(se,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(Xt,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:y||M.map(H=>H.label).join(", ")||l}),f&&(f===!0?E(js,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:a?Da(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var Qs=({children:e})=>{let t=Xs(null),{scrollProgress:r,updateScrollProgress:o}=ot(t);return Se(Xt,{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 el({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Se(Xt,{children:[E(tl,{disabledTooltip:e.disabledTooltip,children:Se(wt.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",l),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(Fo,{className:"size-4 text-neutral-600"}):E(Uo,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:Da(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(Wo,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(wt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var tl=({children:e,disabledTooltip:t})=>t?E(J,{content:t,children:E("div",{children:e})}):e,Da=e=>Zs(e),rl=Ys((e,t)=>Ks(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Jt,format as ol,isSameMonth as al}from"date-fns";import{ChevronLeft as Ia,ChevronRight as za,ChevronsLeft as nl,ChevronsRight as il}from"lucide-react";import{forwardRef as sl,useRef as ll}from"react";import{DayPicker as cl,useDayPicker as dl,useDayRender as ul,useNavigation as ml}from"react-day-picker";import{Fragment as pl,jsx as re,jsxs as Qt}from"react/jsx-runtime";var Ct=sl(({onClick:e,icon:t,disabled:r,...o},a)=>re("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:re(t,{className:"h-full w-full shrink-0"})}));Ct.displayName="NavigationButton";function Oa({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:s,...u}){return re(cl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day: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:()=>re(Ia,{className:"h-4 w-4"}),IconRight:()=>re(za,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:p,previousMonth:f,currentMonth:g,displayMonths:b}=ml(),{numberOfMonths:h,fromDate:v,toDate:N}=dl(),C=b.findIndex(M=>al(d.displayMonth,M)),R=C===0,k=C===b.length-1,w=h>1&&(R||!k),D=h>1&&(k||!R),y=()=>{let M=Jt(g,-1);f&&(!v||M.getTime()>=v.getTime())&&n(M)},T=()=>{let M=Jt(g,1);p&&(!N||M.getTime()<=N.getTime())&&n(M)};return Qt("div",{className:"flex items-center justify-between",children:[Qt("div",{className:"flex items-center gap-1",children:[o&&!D&&re(Ct,{disabled:a||!f||v&&Jt(g,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:y,icon:nl}),!D&&re(Ct,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&n(f),icon:Ia})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:ol(d.displayMonth,"LLLL yyy",{locale:l})}),Qt("div",{className:"flex items-center gap-1",children:[!w&&re(Ct,{disabled:a||!p,"aria-label":"Go to next month",onClick:()=>p&&n(p),icon:za}),o&&!w&&re(Ct,{disabled:a||!p||N&&Jt(g,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:T,icon:il})]})]})},Day:({date:d,displayMonth:n})=>{let p=ll(null),{activeModifiers:f,buttonProps:g,divProps:b,isButton:h,isHidden:v}=ul(d,n,p),{selected:N,today:C,disabled:R,range_middle:k}=f;if(v)return re(pl,{});if(!h)return re("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:w,...D}=g;return Qt("button",{ref:p,...D,type:"button",children:[w,C&&re("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":!N,"!bg-white":N,"!bg-blue-400":N&&k,"text-neutral-400":R})})]})}},...u})}import{enUS as kl}from"date-fns/locale";import{useEffect as Hr,useMemo as Va,useState as tr}from"react";import{Command as Ar}from"cmdk";import{Lock as fl}from"lucide-react";import{jsx as $e,jsxs as gl}from"react/jsx-runtime";var Dr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),s=(d,n)=>{let p=d.from,f=n.from,g=!1;p&&f&&c(p,f)&&(g=!0);let b=d.to,h=n.to,v=!1;return b&&h&&c(b,h)&&(v=!0),g&&v},u=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&s(n,d.dateRange)}else if(l(d)){let n=r;return n&&c(n,d.date)}return!1};return $e(Ar,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:$e(Ar.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>gl(Ar.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",u(d)&&"font-semibold text-neutral-800"),children:[$e("span",{children:d.label}),d.requiresUpgrade?$e(fl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?$e("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&$e(J,{side:"bottom",content:d.tooltipContent,children:$e("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Dr.displayName="DatePicker.Presets";import{format as Ee}from"date-fns";import{createContext as hl}from"react";var Ir=hl({isOpen:!1,setIsOpen:()=>{}}),vl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},zr=(e,t,r=!1)=>{let o=!vl(),a;return r?a=o?Ee(e,"d MMM, yyyy h:mm a",{locale:t}):Ee(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ee(e,"d MMM, yyyy",{locale:t}),a},Ha=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:s}=t;if(e&&e.length>0){let u=o,d=r;e.forEach(n=>{var p,f,g,b,h,v;if("date"in n){let N=n.date.getFullYear();if(o&&N<o)throw new Error(`Preset ${n.label} is before fromYear ${u}.`);if(r&&N>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(s&&n.date.getDate()>s.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ee(s,"MMM dd, yyyy")}.`)}if("dateRange"in n){let N=(p=n.dateRange.from)==null?void 0:p.getFullYear(),C=(f=n.dateRange.to)==null?void 0:f.getFullYear();if(N&&o&&N<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${u}.`);if(C&&r&&C>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(g=n.dateRange.from)==null?void 0:g.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ee(a,"MMM, yyyy")}.`)}if(l){let R=(b=n.dateRange.to)==null?void 0:b.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ee(l,"MMM, yyyy")}.`)}if(c){let R=(h=n.dateRange.from)==null?void 0:h.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ee(c,"MMM dd, yyyy")}.`)}if(s){let R=(v=n.dateRange.to)==null?void 0:v.getDate();if(R&&R>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ee(s,"MMM dd, yyyy")}.`)}}})}};import{cva as bl}from"class-variance-authority";import{Calendar as xl,ChevronDown as yl}from"lucide-react";import{forwardRef as wl}from"react";import{jsx as er,jsxs as Nl}from"react/jsx-runtime";var Cl=bl(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),Or=wl(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Nl("button",{ref:l,className:i(Cl({hasError:o}),e),...a,children:[er(xl,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),er("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?er("span",{className:"text-neutral-400",children:r}):null)}),er(yl,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Or.displayName="DatePicker.Trigger";import{jsx as he,jsxs as Sl}from"react/jsx-runtime";var Pl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:s,showYearNavigation:u=!1,locale:d=kl,placeholder:n="Select date range",hasError:p,align:f="center",className:g,...b})=>{let{isDesktop:h}=q(),[v,N]=tr(!1),[C,R]=tr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,w]=tr((C==null?void 0:C.dateRange)??e??t??void 0),[D,y]=tr(k==null?void 0:k.to),T=Va(()=>k,[v]);Hr(()=>{w(e)},[e]),Hr(()=>{let L=a==null?void 0:a.find(({id:Z})=>Z===r);R(L),w((L==null?void 0:L.dateRange)??e??t)},[a,r]),Hr(()=>{v?k&&y(k.to):y(k==null?void 0:k.to)},[v]);let M=(L,Z)=>{let ee=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:Z}:L;w(ee),R(void 0),(ee==null?void 0:ee.from)&&(ee==null?void 0:ee.to)&&(o==null||o(ee),N(!1))},Q=L=>{w(L.dateRange),R(L),o==null||o(L.dateRange,L),N(!1)},S=()=>{w(T),N(!1)},z=L=>{L||S(),N(L)},Y=Va(()=>k?`${k.from?zr(k.from,d):""} - ${k.to?zr(k.to,d):""}`:null,[k,d]);return rt((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let Z=a==null?void 0:a.find(ee=>ee.shortcut===L.key);Z&&Q(Z)}),he(Ir.Provider,{value:{isOpen:v,setIsOpen:N},children:he(nt,{align:f,openPopover:v,setOpenPopover:z,popoverContentClassName:"rounded-xl",content:he("div",{className:"flex w-full",children:Sl("div",{className:"scrollbar-hide flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&he("div",{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:he("div",{className:"absolute px-3 sm:inset-0 sm:left-0 sm:p-3",children:he(Dr,{currentPresetId:r,currentValue:k,presets:a,onSelect:Q})})}),he("div",{className:"scrollbar-hide overflow-x-scroll",children:he(Oa,{mode:"range",selected:k,onSelect:M,month:D,onMonthChange:y,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:u,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:he(Or,{placeholder:n,disabled:l,className:g,hasError:p,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(C==null?void 0:C.label)??Y})})})};function T2({presets:e,...t}){return e&&Ha(e,t),he(Pl,{presets:e,...t})}import{jsx as rr,jsxs as _a}from"react/jsx-runtime";function z2({icon:e,title:t,description:r,learnMore:o,children:a}){return _a("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[rr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:rr(e,{className:"size-6 text-neutral-800"})}),rr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&_a("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&rr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Ml}from"class-variance-authority";import{useState as Ba}from"react";import{toast as Wa}from"sonner";import{Fragment as Tl,jsx as ve,jsxs as _r}from"react/jsx-runtime";var Fa=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],Vr={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:Fa,errorMessage:"File type not supported (document files only)"},programResourceFiles:{types:[...Fa,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Rl=Ml("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 K2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:s=Yo,customPreview:u,accept:d="any",imageSrc:n,loading:p=!1,clickToUpload:f=!0,showHoverOverlay:g=!0,content:b,maxFileSizeMB:h=0,targetResolution:v,accessibilityLabel:N="File upload",disabled:C=!1}){let[R,k]=Ba(!1),[w,D]=Ba(null),y=async T=>{let M="dataTransfer"in T?T.dataTransfer.files&&T.dataTransfer.files[0]:T.target.files&&T.target.files[0];if(!M)return;if(D(M.name),h>0&&M.size/1024/1024>h){Wa.error(`File size too big (max ${h} MB)`);return}let Q=Vr[d].types;if(Q.length&&!Q.includes(M.type)){Wa.error(Vr[d].errorMessage??"File type not supported");return}let S=M;if(v&&M.type.startsWith("image/"))try{let z=await go(M,v),Y=await fetch(z).then(L=>L.blob());S=new File([Y],M.name,{type:M.type})}catch(z){console.error("Error resizing image:",z)}if(t){let z=new FileReader;z.onload=Y=>{var L;return r==null?void 0:r({src:(L=Y.target)==null?void 0:L.result,file:S})},z.readAsDataURL(S);return}r==null||r({file:S})};return _r("label",{className:i(Rl({variant:o}),C?"cursor-not-allowed":i(f&&"cursor-pointer"),a),children:[p&&ve("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ve(ft,{})}),ve("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(),y(T),k(!1)}}),_r("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",C&&"bg-neutral-50",R&&!C&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",g&&!C&&"group-hover:opacity-100"):i(!C&&"group-hover:bg-neutral-50")),children:[ve(s,{className:i("size-7 transition-all duration-75",C?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),b!==null&&ve("div",{className:i("mt-2 text-center text-sm text-neutral-500",C&&"text-neutral-400"),children:b??ve(Tl,{children:_r("p",{children:["Drag and drop ",f&&"or click"," to upload."]})})}),ve("span",{className:"sr-only",children:N})]}),n&&(u??ve("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),f&&ve("div",{className:"sr-only mt-1 flex shadow-sm",children:ve("input",{id:e,type:"file",accept:Vr[d].types.join(","),onChange:y,disabled:C},w)})]})}import{AnimatePresence as Ll,motion as Ua}from"framer-motion";import{X as El}from"lucide-react";import{isValidElement as Al}from"react";import{Fragment as Dl,jsx as te,jsxs as Nt}from"react/jsx-runtime";function $a({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return rt("Escape",o,{priority:1}),te(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Nt("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[te("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:te(Ll,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return te(Ua.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===l);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(u=>{var f,g,b;let d=(f=s.options)==null?void 0:f.find(h=>typeof h.value=="string"&&typeof u=="string"?h.value.toLowerCase()===u.toLowerCase():h.value===u),n=(d==null?void 0:d.icon)??((g=s.getOptionIcon)==null?void 0:g.call(s,u,{key:s.key,option:d}))??s.icon,p=(d==null?void 0:d.label)??((b=s.getOptionLabel)==null?void 0:b.call(s,u,{key:s.key,option:d}))??u;return Nt(Ua.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:[Nt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[te("span",{className:"shrink-0 text-neutral-600",children:Ga(s.icon)?s.icon:te(s.icon,{className:"h-4 w-4"})}),s.label]}),te("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),te("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?Nt(Dl,{children:[te("span",{className:"shrink-0 text-neutral-600",children:Ga(n)?n:te(n,{className:"h-4 w-4"})}),At(p,30)]}):te("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),te("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,u),children:te(El,{className:"h-3.5 w-3.5"})})]},`${l}-${u}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Nt("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",te("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 Ga=e=>Al(e);import{Command as Ae,useCommandState as Il}from"cmdk";import{ChevronDown as zl,ListFilter as Ol}from"lucide-react";import{Fragment as Hl,forwardRef as Vl,isValidElement as ja,useCallback as or,useEffect as ar,useImperativeHandle as _l,useRef as Wr,useState as Br}from"react";import{Fragment as $l,jsx as _,jsxs as be}from"react/jsx-runtime";function Ya({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:s,children:u,emptyState:d,className:n}){var M,Q;let{isMobile:p}=q(),f=Wr(null),g=Wr(),[b,h]=Br(!1);rt("f",()=>h(!0),{enabled:!b});let[v,N]=Br(""),[C,R]=Br(null),k=or(()=>{N(""),R(null)},[]);ar(()=>{b||k()},[b]);let w=C?e.find(({key:S})=>S===C):null,D=or(S=>{f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight}),N(""),R(S),o==null||o(S)},[]),y=or(S=>{if(!w||!c)return!1;let z=c.find(({key:Y})=>Y===C);return(z==null?void 0:z.value)===S||z&&w.multiple&&Array.isArray(z.value)&&z.value.includes(S)},[w]),T=or(S=>{w&&(y(S)?r(w.key,S):t(w.key,S),w.multiple||h(!1))},[c,w,s]);return ar(()=>{a==null||a(v)},[v]),ar(()=>{l==null||l(C)},[C]),ar(()=>{(w==null?void 0:w.options)&&f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight})},[w==null?void 0:w.options]),_(nt,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:S=>{C&&(S.preventDefault(),k())},content:_(ke,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:be(Ae,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[be("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Wl,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:v,onValueChange:N,onKeyDown:S=>{(S.key==="Escape"||S.key==="Backspace"&&!v)&&(S.preventDefault(),S.stopPropagation(),C?k():h(!1))},emptySubmit:S=>{S.preventDefault(),S.stopPropagation(),s?(t("ai",w?`${w.label} ${v}`:v),h(!1)):T(v)}}),!w&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(Fl,{ref:f,children:be(Ae.List,{className:i("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((Q=(M=w.options)==null?void 0:M.filter(S=>!v||!S.hideDuringSearch))==null?void 0:Q.map(S=>{let z=y(S.value);return _(Ka,{filter:w,option:S,right:z?_(Bo,{className:"h-4 w-4"}):S.right,onSelect:()=>T(S.value)},S.value)}))??_(Ae.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:g.current,children:_(Ce,{})})}):e.map(S=>be(Hl,{children:[_(Ka,{filter:S,onSelect:()=>D(S.key)}),S.separatorAfter&&_(Ae.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},S.key)),(!w||w.options)&&_(Ul,{search:v,askAI:s,children:d?Bl(d)?(d==null?void 0:d[C??"default"])??"No matches":d:"No matches"})]})},C)]})}),children:be("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",n),children:[_(Ol,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:u??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(zl,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Bl(e){return typeof e=="object"&&e!==null&&!ja(e)}var Wl=e=>{let t=Il(r=>r.filtered.count===0);return _(Ae.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},Fl=Vl(({children:e},t)=>{let r=Wr(null);_l(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=ot(r);return be($l,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Ka({filter:e,option:t,right:r,onSelect:o}){var s,u;let{isMobile:a}=q(),l=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 be(Ae.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:[_("span",{className:"shrink-0 text-neutral-600",children:Gl(l)?l:_(l,{className:"h-4 w-4"})}),At(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Ul=({search:e,askAI:t,children:r})=>t&&e?be(Ae.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Po,{className:"h-4 w-4"}),be("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",be("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ae.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Gl=e=>ja(e);var hv={Select:Ya,List:$a};import{useMemo as Kl,useState as Za}from"react";import{jsx as Ke,jsxs as nr}from"react/jsx-runtime";function Nv({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[s,u]=Za(r.defaultValue),[d,n]=Za(!1),p=Kl(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return nr("form",{onSubmit:async f=>{f.preventDefault(),n(!0),await c({[r.name]:s}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[nr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[nr("div",{className:"flex flex-col space-y-3",children:[Ke("h2",{className:"text-xl font-medium",children:e}),Ke("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ke("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:f=>u(f.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":l})}):Ke("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),nr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ke("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ke("div",{className:"shrink-0",children:Ke(se,{text:a,loading:d,disabled:p,disabledTooltip:l})})]})]})}import{useId as jl}from"react";import{jsx as ir,jsxs as Yl}from"react/jsx-runtime";function Mv({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=jl();return Yl("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[ir("defs",{children:ir("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:ir("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),ir("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Zl}from"lucide-react";import ql,{useCallback as Xl,useState as Jl}from"react";import{jsx as je,jsxs as Fr}from"react/jsx-runtime";var Ql=ql.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=Jl(!1),c=Xl(()=>l(!a),[a,l]);return Fr("div",{children:[Fr("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}),Fr("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(Zl,{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(Zo,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):je(qo,{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})]})});Ql.displayName="Input";import{flip as oc,offset as ac,size as nc,useDismiss as ic,useFloating as sc,useInteractions as lc}from"@floating-ui/react";import{Command as Me,useCommandState as cc}from"cmdk";import{Check as dc,ChevronDown as uc,Search as mc,X as pc}from"lucide-react";import{createContext as fc,forwardRef as en,useContext as Kr,useEffect as Ur,useMemo as Xa,useRef as Ja,useState as Gr}from"react";import{Drawer as it}from"vaul";import ec from"next/image";import{useEffect as tc,useState as qa}from"react";import{jsx as rc}from"react/jsx-runtime";function kt(e){let[t,r]=qa(!0),[o,a]=qa(e.src);tc(()=>a(e.src),[e.src]);let l=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return rc(ec,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as I,jsxs as le}from"react/jsx-runtime";var sr=fc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function eb({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:s,noItemsElement:u}){let{isMobile:d}=q(),n=Ja(null),[p,f]=Gr(!1),[g,b]=Gr(""),[h,v]=Gr(!1);Ur(()=>{p&&v(!1)},[p]),Ur(()=>v(!0),[g]),Ur(()=>{t&&b(t.value)},[t]);let N=Xa(()=>{let z=g.toLowerCase();return h?e.filter(Y=>Y.value.toLowerCase().includes(z)):g?e.sort((Y,L)=>(L.value.toLowerCase().includes(z)?1:0)-(Y.value.toLowerCase().includes(z)?1:0)):e},[h,g,e]),{refs:C,floatingStyles:R,context:k}=sc({open:p,onOpenChange:f,middleware:[ac(8),nc({apply({elements:{floating:z},availableHeight:Y}){Object.assign(z.style,{maxHeight:`${Math.max(75,Math.min(Y,290))}px`})},padding:8}),oc({fallbackStrategy:"initialPlacement",padding:8})]}),w=ic(k,{enabled:!d||!l}),{getReferenceProps:D,getFloatingProps:y}=lc([w]),T=Ja(null),{scrollProgress:M,updateScrollProgress:Q}=ot(T),S=Xa(()=>t&&t.icon?t.icon:t&&t.image?I(kt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||I(mc,{className:"size-4 text-neutral-400"}),[t,c]);return I(sr.Provider,{value:{inputAttrs:s||{},openCommandList:p,setOpenCommandList:f,inputValue:g,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?le(it.Root,{open:p,onOpenChange:f,children:[I(it.Trigger,{className:"sm:hidden",asChild:!0,children:I(Me,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:I($r,{className:o,iconElement:S})})}),I(it.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(it.Portal,{children:[I(it.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:z=>{z.target instanceof Element&&z.target.closest("[data-sonner-toast]")&&z.preventDefault()},children:le(Me,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I("div",{className:"p-2",children:I($r,{className:o,iconElement:S})}),p&&le(Me.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&g===""&&(u?I("div",{children:u}):I("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&I(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),I(Qa,{items:N})]})]})}),I(it.Overlay,{})]})]}):le(Me,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I($r,{className:o,iconElement:S,ref:C.setReference,...D()}),p&&le("div",{ref:C.setFloating,style:R,...y(),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:Q,className:"grow overflow-y-auto p-2",children:[le(Me.List,{children:[e.length===0&&g===""&&(u?I("div",{children:u}):I("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&I(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),I(Qa,{items:N})]}),I("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(M,2)}})]})]})})}var $r=en(({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:[I("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[I(gc,{}),I(hc,{})]})]})),gc=en((e,t)=>{let r=cc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:s,disabled:u}=Kr(sr);return I(Me.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!0)},disabled: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 hc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=Kr(sr);return I("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?I(pc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):I(uc,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Qa({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Kr(sr);return e.map(a=>le(Me.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&&I(kt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),I("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&&I($t,{className:"text-xs",variant:"neutral",children:a.label})]}),I(dc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as jr from"@radix-ui/react-label";import{cva as vc}from"class-variance-authority";import*as tn from"react";import{jsx as yc}from"react/jsx-runtime";var bc=vc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xc=tn.forwardRef(({className:e,...t},r)=>yc(jr.Root,{ref:r,className:i(bc(),e),...t}));xc.displayName=jr.Root.displayName;import{cva as wc}from"class-variance-authority";import{isValidElement as Cc}from"react";import{jsx as rn,jsxs as on}from"react/jsx-runtime";var Nc=wc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors","whitespace-nowrap text-sm font-medium text-content-default hover:bg-bg-subtle transition-colors"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function mb({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return on(e||"button",{...e==="button"?{type:"button"}:{},className:i(Nc({variant:t}),l),...c,children:[on("div",{className:"flex grow items-center gap-2",children:[o&&(kc(o)?o:rn(o,{className:"size-4"})),r]}),a&&rn("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 kc=e=>Cc(e);import{curveNatural as an}from"@visx/curve";import{LinearGradient as nn}from"@visx/gradient";import{Group as Pc}from"@visx/group";import{ParentSize as Sc}from"@visx/responsive";import{scaleLinear as Mc,scaleUtc as Rc}from"@visx/scale";import{Area as Tc,AreaClosed as Lc}from"@visx/shape";import{motion as sn}from"framer-motion";import{useId as Ec,useMemo as ln}from"react";import{jsx as xe,jsxs as Yr}from"react/jsx-runtime";function Cb(e){return xe(Sc,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(Ac,{...{width:t,height:r,...e}})})}var De={top:8,right:2,bottom:2,left:2};function Ac({width:e,height:t,data:r,curve:o=!0,color:a}){let l=Ec(),c=ln(()=>r.map(({date:d})=>({date:d,value:0})),[r]),{yScale:s,xScale:u}=ln(()=>{let d=r.map(({value:b})=>b),n=Math.max(...d),p=r.map(({date:b})=>b.getTime()),f=new Date(Math.min(...p)),g=new Date(Math.max(...p));return{yScale:Mc({domain:[-2,Math.max(n,2)],range:[t-De.top-De.bottom,0],nice:!0,clamp:!0}),xScale:Rc({domain:[f,g],range:[0,e-De.left-De.right],nice:!0})}},[r,t,e]);return Yr("svg",{width:e,height:t,children:[Yr("defs",{children:[xe(nn,{id:`${l}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-De.left-De.right,gradientUnits:"userSpaceOnUse"}),xe(nn,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),Yr(Pc,{left:De.left,top:De.top,children:[xe(Tc,{data:r,x:({date:d})=>u(d),y:({value:d})=>s(d)??0,curve:o?an:void 0,children:({path:d})=>xe(sn.path,{initial:{d:d(c)||"",opacity:0},animate:{d:d(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),xe(Lc,{data:r,x:({date:d})=>u(d),y:({value:d})=>s(d)??0,yScale:s,curve:o?an:void 0,children:({path:d})=>xe(sn.path,{initial:{d:d(c)||"",opacity:0},animate:{d:d(r)||"",opacity:1},fill:`url(#${l}-color-gradient)`,mask:`url(#${l}-mask)`})})]})]},r.length)}import*as ce from"@radix-ui/react-dialog";import*as Zr from"@radix-ui/react-visually-hidden";import{useRouter as Dc}from"next/navigation";import{Drawer as Ye}from"vaul";import{jsx as oe,jsxs as st}from"react/jsx-runtime";function Rb({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:s}){let u=Dc(),d=({dragged:p}={})=>{c&&!p||(a&&a(),o?o(!1):u.back())},{isMobile:n}=q();return n&&!l?oe(Ye.Root,{open:o?r:!0,onOpenChange:p=>{p||d({dragged:!0})},...s,children:st(Ye.Portal,{children:[oe(Ye.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(Ye.Content,{onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.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:st("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[st(Zr.Root,{children:[oe(Ye.Title,{children:"Modal"}),oe(Ye.Description,{children:"This is a modal"})]}),oe(Ic,{}),e]})}),oe(Ye.Overlay,{})]})}):oe(ce.Root,{open:o?r:!0,onOpenChange:p=>{p||d()},children:st(ce.Portal,{children:[oe(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),st(ce.Content,{onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.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:[st(Zr.Root,{children:[oe(ce.Title,{children:"Modal"}),oe(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Ic(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as zc,jsx as lr,jsxs as lt}from"react/jsx-runtime";var cn=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 Eb({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return lt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[lt("div",{className:"flex items-center gap-2",children:[lt("div",{children:[lr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&lt(zc,{children:[lt("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ",c&&"of "]}),c&&lr("span",{className:"font-medium",children:Dt(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),l]}),lt("div",{className:"flex items-center gap-2",children:[lr("button",{type:"button",className:cn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),lr("button",{type:"button",className:cn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Ie from"@radix-ui/react-radio-group";import{Circle as Oc}from"lucide-react";import*as qr from"react";import{jsx as cr}from"react/jsx-runtime";var Hc=qr.forwardRef(({className:e,...t},r)=>cr(Ie.Root,{className:i("grid gap-2",e),...t,ref:r}));Hc.displayName=Ie.Root.displayName;var Vc=qr.forwardRef(({className:e,...t},r)=>cr(Ie.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:cr(Ie.Indicator,{className:"flex items-center justify-center",children:cr(Oc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Vc.displayName=Ie.Item.displayName;import{Drawer as ze}from"vaul";import{jsx as Ze,jsxs as Uc}from"react/jsx-runtime";function _c({children:e,contentProps:t,nested:r=!1,...o}){let a=r?ze.NestedRoot:ze.Root;return Ze(a,{direction:"right",handleOnly:!0,...o,children:Uc(ze.Portal,{children:[Ze(ze.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ze(ze.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className: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)","user-select":"auto",...t==null?void 0:t.style},children:Ze("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Bc({className:e,...t}){return Ze(ze.Title,{className:i("text-xl font-medium text-zinc-900",e),...t})}function Wc(e){return Ze(ze.Description,{...e})}function Fc(e){return Ze(ze.Close,{...e})}var _b=Object.assign(_c,{Title:Bc,Description:Wc,Close:Fc});import{useEffect as Gc,useRef as $c,useState as Kc}from"react";import{jsx as dn}from"react/jsx-runtime";var jc=`
2
+ import{$ as Nm,$a as d0,$b as ep,$c as Fp,A as Vt,Aa as jm,Ab as Qo,Ac as xp,Ad as gf,B as rm,Ba as Ym,Bb as A0,Bc as yp,Bd as hf,C as om,Ca as Zm,Cb as D0,Cc as wp,Cd as vf,D as am,Da as qm,Db as I0,Dc as Cp,Dd as bf,E as nm,Ea as Xm,Eb as z0,Ec as Np,Ed as xf,F as Do,Fa as Wo,Fb as O0,Fc as kp,Fd as yf,G as Io,Ga as Fo,Gb as H0,Gc as Pp,Gd as ha,H as zo,Ha as Uo,Hb as ea,Hc as Sp,Hd as wf,I as Oo,Ia as Go,Ib as V0,Ic as ma,Id as Cf,J as Ho,Ja as $o,Jb as _0,Jc as Mp,Jd as Nf,K as im,Ka as Jm,Kb as B0,Kc as Rp,Kd as kf,L as sm,La as Qm,Lb as W0,Lc as Tp,Ld as Pf,M as lm,Ma as e0,Mb as F0,Mc as Lp,Md as Sf,N as cm,Na as Ko,Nb as U0,Nc as Ep,Nd as Mf,O as dm,Oa as jo,Ob as G0,Oc as Ap,P as um,Pa as Yo,Pb as $0,Pc as Dp,Q as mm,Qa as t0,Qb as K0,Qc as Ip,R as pm,Ra as r0,Rb as j0,Rc as Wt,S as fm,Sa as o0,Sb as Y0,Sc as zp,T as gm,Ta as a0,Tb as Z0,Tc as Op,U as hm,Ua as n0,Ub as q0,Uc as Hp,V as vm,Va as Nr,Vb as ta,Vc as Vp,W as bm,Wa as i0,Wb as X0,Wc as pa,X as xm,Xa as s0,Xb as J0,Xc as _p,Y as ym,Ya as l0,Yb as ra,Yc as Bp,Z as wm,Za as Zo,Zb as Q0,Zc as fa,_ as Cm,_a as c0,_b as oa,_c as Wp,a as ko,aa as km,ab as u0,ac as tp,ad as Up,b as Gu,ba as Pm,bb as _t,bc as rp,bd as Gp,c as $u,ca as Sm,cb as m0,cc as op,cd as $p,d as Po,da as Mm,db as p0,dc as ap,dd as Kp,e as So,ea as Rm,eb as f0,ec as aa,ed as jp,f as Ku,fa as Tm,fb as g0,fc as na,fd as Yp,g as Mo,ga as Lm,gb as h0,gc as ia,gd as Zp,h as Ro,ha as Vo,hb as v0,hc as np,hd as qp,i as To,ia as Em,ib as b0,ic as sa,id as Xp,j as Lo,ja as Am,jb as Bt,jc as ip,jd as Jp,k as ft,ka as Dm,kb as x0,kc as la,kd as Qp,l as ju,la as Im,lb as y0,lc as sp,ld as ef,m as Ce,ma as zm,mb as w0,mc as ca,md as tf,n as Yu,na as Om,nb as C0,nc as da,nd as rf,o as zt,oa as Hm,ob as N0,oc as lp,od as of,p as Zu,pa as Vm,pb as k0,pc as cp,pd as af,q as qu,qa as _o,qb as P0,qc as dp,qd as nf,r as Ot,ra as _m,rb as S0,rc as up,rd as ga,s as Xu,sa as Bm,sb as M0,sc as ua,sd as sf,t as Eo,ta as Wm,tb as R0,tc as mp,td as lf,u as Ao,ua as Fm,ub as qo,uc as pp,ud as cf,v as Ju,va as Bo,vb as T0,vc as fp,vd as df,w as Qu,wa as Um,wb as L0,wc as gp,wd as uf,x as em,xa as Gm,xb as E0,xc as hp,xd as mf,y as Ht,ya as $m,yb as Xo,yc as vp,yd as pf,z as tm,za as Km,zb as Jo,zc as bp,zd as ff}from"./chunk-W3QE2JLZ.mjs";import{a as q}from"./chunk-NWME2ANF.mjs";import{a as ho,b as At,c as vo,d as bo,e as pt,f as xo,g as yo,h as O,i as we,j as wo,k as pe,l as i,m as Dt,n as It,o as Co,p as No}from"./chunk-UNRIUV2D.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as ii}from"lucide-react";import*as Ut from"react";import{jsx as Ft,jsxs as di}from"react/jsx-runtime";var Df=ne.Root,si=Ut.forwardRef(({className:e,...t},r)=>Ft(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));si.displayName="AccordionItem";var li=Ut.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?ii:Wt;return Ft(ne.Header,{className:"flex",children:di(ne.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,Ft(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});li.displayName=ne.Trigger.displayName;var ci=Ut.forwardRef(({className:e,children:t,...r},o)=>Ft(ne.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}));ci.displayName=ne.Content.displayName;import{cva as ui}from"class-variance-authority";import*as Gt from"react";import{jsx as kr}from"react/jsx-runtime";var mi=ui("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"}}),pi=Gt.forwardRef(({className:e,variant:t,...r},o)=>kr("div",{ref:o,role:"alert",className:i(mi({variant:t}),e),...r}));pi.displayName="Alert";var fi=Gt.forwardRef(({className:e,...t},r)=>kr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));fi.displayName="AlertTitle";var gi=Gt.forwardRef(({className:e,...t},r)=>kr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));gi.displayName="AlertDescription";import{sha256 as hi}from"js-sha256";import{useState as vi}from"react";import{jsx as Pr}from"react/jsx-runtime";function bi(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dicebear.com/9.x/micah/svg";let t=`https://api.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id)}`,r=`https://api.dicebear.com/9.x/micah/png/${encodeURIComponent(`seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${hi(e.email)}?d=${encodeURIComponent(r)}`:t}function Wf({user:e={},className:t}){if(!e)return Pr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=vi(bi(e));return Pr("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.dicebear.com/9.x/micah/svg?seed=${encodeURIComponent(e.id||"")}`)}})}function Ff({id:e,className:t}){return Pr("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 wi}from"react/jsx-runtime";var yi=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 $t({className:e,variant:t,...r}){return wi("span",{className:i(yi({variant:t}),e),...r})}import{cva as Si}from"class-variance-authority";import{forwardRef as Mi}from"react";import*as fe from"@radix-ui/react-tooltip";import Ci from"linkify-react";import{HelpCircle as Ni}from"lucide-react";import ki from"next/link";import{useState as Pi}from"react";import{jsx as F,jsxs as Qe}from"react/jsx-runtime";function r1({children:e}){return F(fe.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[s,u]=Pi(!1);return Qe(fe.Root,{open:s,onOpenChange:u,delayDuration:l,disableHoverableContent:a,children:[F(fe.Trigger,{asChild:!0,onClick:()=>{u(!0)},onBlur:()=>{u(!1)},children:e}),F(fe.Portal,{children:F(fe.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?F("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:u}):t})})]})}function o1({title:e,cta:t,href:r,target:o,onClick:a}){return Qe("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[F("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?F(ki,{href:r,...o?{target:o}:{},className:i(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?F(se,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function a1({title:e,cta:t,href:r}){return Qe("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",F("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 n1({children:e}){return F("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-neutral-700",children:F(Ci,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-neutral-400 hover:text-neutral-700"},children:e})})}function i1(e){return F(J,{...e,children:F(Ni,{className:"h-4 w-4 text-neutral-500"})})}function s1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:F(J,{content:Qe("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Qe("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Dt(e||0,{full:!0})," ",t]}),a&&Qe("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",bo(a,{withAgo:!0})]})]}),children:o})}function l1({children:e,content:t,...r}){return F(J,{content:t,...r,children:F("div",{className:"flex cursor-pointer items-center",children:F($t,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function c1({children:e,tooltipProps:t,...r}){return F(J,{...t,children:F("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 va({children:e,tooltipProps:t}){return t?F(J,{...t,children:F("div",{children:e})}):e}import{jsx as et,jsxs as ba}from"react/jsx-runtime";var ie=Si("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"}}),se=Mi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:s,disabledTooltip:u,right:d,...n},p)=>u?et(J,{content:u,children:ba("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&&et("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&et("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})]})}):ba("button",{ref:p,type:n.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",n.disabled||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||l,...n,children:[l?et(Ce,{}):c||null,e&&et("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&et("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]}));se.displayName="Button";import{cva as Ri}from"class-variance-authority";import{createContext as Ti}from"react";import{jsx as xa}from"react/jsx-runtime";var Li=Ri("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"}}}),gt=Ti({variant:"loose"});function ya({variant:e="loose",loading:t=!1,className:r,children:o}){return xa("ul",{className:i(Li({variant:e,loading:t}),r),"data-variant":e,children:xa(gt.Provider,{value:{variant:e},children:o})})}import{cva as Ei}from"class-variance-authority";import{createContext as Ai,useContext as Di,useEffect as Ii,useRef as zi,useState as Oi}from"react";import{jsx as wa,jsxs as _i}from"react/jsx-runtime";var Hi=Ei("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"}}}),Vi="w-full py-2.5 px-4",Sr=Ai({hovered:!1});function Ca({outerClassName:e,innerClassName:t,children:r,onClick:o,hoverStateEnabled:a=!0,banner:l}){let{variant:c}=Di(gt),s=zi(null),[u,d]=Oi(!1);return Ii(()=>{if(!u||!s.current)return;let n=setInterval(()=>{var p;((p=s.current)==null?void 0:p.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(n)},[u]),_i("li",{ref:s,className:i(Hi({variant:c}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":a,children:[l,wa("div",{className:i(Vi,t),onClick:o?n=>{document.getElementById("modal-backdrop")||pt(n)||o()}:void 0,children:wa(Sr.Provider,{value:{hovered:u},children:r})})]})}var D1=Object.assign(ya,{Card:Object.assign(Ca,{Context:Sr}),Context:gt});import Bi from"embla-carousel-autoplay";import Wi from"embla-carousel-react";import{ArrowLeft as Fi,ArrowRight as Ui}from"lucide-react";import{createContext as Gi,forwardRef as vt,useCallback as ht,useContext as $i,useEffect as Mr,useState as Rr}from"react";import{jsx as Ne,jsxs as Pa}from"react/jsx-runtime";var Tr=2e3,Na=Gi(null);function ge(){let e=$i(Na);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function ka(){let{api:e}=ge(),[t,r]=Rr(0),o=ht(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Mr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Ki=vt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...s},u)=>{let[d,n]=Wi({...t,axis:e==="horizontal"?"x":"y"},[...o?[Bi(typeof o=="object"?o:{delay:Tr})]:[],...a||[]]),[p,f]=Rr(!1),[g,b]=Rr(!1),h=ht(R=>{!R||(f(R.canScrollPrev()),b(R.canScrollNext()))},[]),v=ht(()=>{n==null||n.scrollPrev()},[n]),N=ht(()=>{n==null||n.scrollNext()},[n]),C=ht(R=>{R.key==="ArrowLeft"?(R.preventDefault(),v()):R.key==="ArrowRight"&&(R.preventDefault(),N())},[v,N]);return Mr(()=>{!n||!r||r(n)},[n,r]),Mr(()=>{if(!!n)return h(n),n.on("reInit",h),n.on("select",h),()=>{n==null||n.off("select",h)}},[n,h]),Ne(Na.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:N,canScrollPrev:p,canScrollNext:g},children:Ne("div",{ref:u,onKeyDownCapture:C,className:i("relative",l),role:"region","aria-roledescription":"carousel",...s,children:c})})});Ki.displayName="Carousel";var ji=vt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ge();return Ne("div",{ref:o,className:"overflow-hidden",children:Ne("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ji.displayName="CarouselContent";var Yi=vt(({className:e,...t},r)=>{let{orientation:o}=ge();return Ne("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})});Yi.displayName="CarouselItem";var Zi=vt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=ge();return Pa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ne(Fi,{className:"h-4 w-4"}),Ne("span",{className:"sr-only",children:"Previous slide"})]})});Zi.displayName="CarouselPrevious";var qi=vt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=ge();return Pa("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",ie({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ne(Ui,{className:"h-4 w-4"}),Ne("span",{className:"sr-only",children:"Next slide"})]})});qi.displayName="CarouselNext";import{cva as Xi}from"class-variance-authority";import{motion as Ji}from"framer-motion";import{ChevronLeft as Qi,ChevronRight as es}from"lucide-react";import*as Te from"react";import{jsx as Ge,jsxs as bt}from"react/jsx-runtime";var ts=Xi("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 "}}}),X1=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=ge(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[u,d]=Te.useState(0),[n,p]=Te.useState(!1),f=Te.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),g=Te.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Te.useEffect(()=>{!c||(f(c),p((s==null?void 0:s.isPlaying())??!1),c.on("reInit",f),c.on("select",f),c.on("autoplay:play",()=>p(!0)),c.on("autoplay:stop",()=>p(!1)))},[c,s,f]),bt("div",{className:i(ts({variant:e}),t),children:[e!=="simple"&&bt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:g(o),children:[Ge(Qi,{className:"h-4 w-4"}),Ge("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ge("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,v)=>bt("button",{onClick:g(()=>c.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ge("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===u?"bg-black":"bg-black/20",n&&v===u&&"w-6 bg-black/20"),children:n&&v===u&&Ge(Ji.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Tr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),bt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&bt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:g(r),children:[Ge(es,{className:"h-4 w-4"}),Ge("span",{className:"sr-only",children:"Next slide"})]})]})};import rs from"embla-carousel-react";import{forwardRef as os,useCallback as as,useEffect as ns}from"react";import{jsx as Kt}from"react/jsx-runtime";var ig=({className:e,...t})=>{let{api:r}=ge(),[o,a]=rs({dragFree:!0}),l=as(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return ns(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),Kt("div",{className:"overflow-hidden",ref:o,children:Kt("div",{className:i("mx-4 flex gap-4",e),...t})})},sg=os(({index:e,className:t,...r},o)=>{let{api:a}=ge(),l=ka();return Kt("div",{ref:o,children:Kt("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===l}):t,...r})})});import*as xt from"@radix-ui/react-checkbox";import{Check as is}from"lucide-react";import*as Sa from"react";import{jsx as Lr}from"react/jsx-runtime";var ss=Sa.forwardRef(({className:e,...t},r)=>Lr(xt.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",e),...t,children:Lr(xt.Indicator,{className:"flex items-center justify-center",children:Lr(is,{className:"h-3 w-3 text-white"})})}));ss.displayName=xt.Root.displayName;import{Command as wt,CommandInput as Xs,CommandItem as Js,useCommandState as Qs}from"cmdk";import{ChevronDown as el}from"lucide-react";import{forwardRef as tl,isValidElement as rl,useCallback as ol,useEffect as qt,useRef as al,useState as yt}from"react";import{motion as Ys}from"framer-motion";import{forwardRef as Zs,useRef as qs}from"react";import Er from"js-cookie";import{useEffect as ls,useState as cs}from"react";function fg(e,t,r){let[o,a]=cs(()=>{let c=Er.get(e);return c?JSON.parse(c):t});return ls(()=>{let c=()=>{let s=Er.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Er.set(e,JSON.stringify(c),r)}]}import{useCallback as ds,useEffect as us,useRef as ms,useState as ps}from"react";var tt=(e=3e3)=>{let t=ms(null),[r,o]=ps(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=ds(async(c,{onSuccess:s}={})=>{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(u){console.error("Failed to copy: ",u)}},[e]);return us(()=>()=>a(),[]),[r,l]};import{useEffect as fs,useState as gs}from"react";function xg(){let[e,t]=gs(null);return fs(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var p,f,g;let u=s[0];if(!u)return;let d=(((p=u.rootBounds)==null?void 0:p.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 n=u.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(f=l.get(n))==null?void 0:f.next;for(;n&&n.getBoundingClientRect().top>d;)n=(g=l.get(n))==null?void 0:g.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}function wg(e){return{handleKeyDown:r=>{r.key==="Enter"&&r.metaKey&&(r.preventDefault(),e.current&&e.current.requestSubmit())}}}import{useEffect as hs,useState as vs}from"react";function Pg(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=vs(o??!1);return hs(()=>{let c=()=>{let u=e.current;if(!u)return;let d=r==null?void 0:r.current,n=u.getBoundingClientRect(),p=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(n.top<p.bottom&&n.bottom>p.top&&n.left<p.right&&n.right>p.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 bs,useState as xs}from"react";function Rg(){let[e,t]=xs(!1);return bs(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as ys,useState as ws}from"react";function Ag(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=ws(),s=(l==null?void 0:l.isIntersecting)&&a,u=([d])=>{c(d)};return ys(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!d)return;let p={threshold:t,root:r,rootMargin:o},f=new IntersectionObserver(u,p);return f.observe(d),()=>f.disconnect()},[e,JSON.stringify(t),r,o,s]),l}import{createContext as Cs,useCallback as Ns,useContext as ks,useEffect as Ma,useId as Ps,useState as Ss}from"react";import{jsx as Ms}from"react/jsx-runtime";var Ra=Cs({listeners:[],setListeners:()=>{}});function Vg({children:e}){let[t,r]=Ss([]);return Ms(Ra.Provider,{value:{listeners:t,setListeners:r},children:e})}function rt(e,t,r={}){let o=Ps(),{listeners:a,setListeners:l}=ks(Ra),c=Ns(s=>{let u=s.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(s.metaKey||s.ctrlKey||u.tagName==="INPUT"||u.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet||(Array.isArray(e)?!e.includes(s.key):s.key!==e))return;let p=a.filter(g=>g.enabled!==!1&&(Array.isArray(g.key)?g.key.includes(s.key):g.key===s.key));!p.length||vo(p,(g,b)=>(b.priority??0)-(g.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.modal,r.sheet]);Ma(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),Ma(()=>(l(s=>[...s.filter(u=>u.id!==o),{id:o,key:e,...r}]),()=>l(s=>s.filter(u=>u.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Rs,useState as Ts}from"react";function Ta(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Wg(e,t){let[r,o]=Ts(Ta(e)??t);return Rs(()=>{let l=Ta(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Ls}from"sonner";import Es from"swr";function Kg(e,t){let{data:r,isLoading:o,mutate:a}=Es(e,pe);return{data:r,isLoading:o,update:async(l,c)=>Ls.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as Da,useMemo as Hs}from"react";import{useEffect as La,useState as As}from"react";function Ea({pageSize:e,page:t,onPageChange:r}){let[o,a]=As({pageIndex:t,pageSize:e});return La(()=>{a(l=>({...l,pageIndex:t}))},[t]),La(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Ds,useRouter as Is,useSearchParams as zs}from"next/navigation";import{useCallback as Os}from"react";function Aa(){let e=Ds(),t=Is(),r=zs(),o=Object.fromEntries(r),a=(c,s)=>{let u=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let n=new URLSearchParams;r.forEach((p,f)=>{var g;(g=s.include)!=null&&g.includes(f)&&n.set(f,p)}),u=n}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(n=>u.delete(n)),c&&Object.entries(c).forEach(([n,p])=>u.set(n,p));let d=u.toString();return d.length>0?`?${d}`:""},l=Os(({set:c,del:s,replace:u,scroll:d=!0,getNewPath:n,arrayDelimiter:p=","})=>{let f=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,v])=>f.set(h,Array.isArray(v)?v.join(p):v)),s&&(Array.isArray(s)?s.forEach(h=>f.delete(h)):f.delete(s));let g=f.toString(),b=`${e}${g.length>0?`?${g}`:""}`;if(n)return b;u?t.replace(b,{scroll:!1}):t.push(b,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:l,getQueryString:a}}function ah(e=Co){let{searchParams:t,queryParams:r}=Aa(),o=Hs(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ea({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page"}:{set:{page:c.toString()}})}});return Da(()=>{let c=parseInt(t.get("page")||"1")||1;l(s=>({...s,pageIndex:c}))},[t.get("page")]),Da(()=>{r(a.pageIndex===1?{del:"page"}:{set:{page:a.pageIndex.toString()}})},[a]),{pagination:a,setPagination:l}}import{useEffect as Vs}from"react";function sh(){Vs(()=>{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 _s,useState as Bs}from"react";function jt(e){let[t,r]=Bs(),o=([a])=>{r(a)};return _s(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as Ws,useEffect as Ia,useState as Fs}from"react";function za(e){let[t,r]=Fs(!1),o=Ws(()=>{r(window.scrollY>e)},[e]);return Ia(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),Ia(()=>{o()},[o]),t}import{useCallback as Us,useEffect as Gs,useState as $s}from"react";function ot(e){let[t,r]=$s(1),o=Us(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(l/(c-s),1))},[]),a=jt(e);return Gs(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as Ks}from"react";import{toast as Ha}from"sonner";import{jsx as Yt,jsxs as Oa}from"react/jsx-runtime";function js({id:e,message:t,undo:r}){let o=()=>{r(),Ha.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return Ks(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),Oa("div",{className:"flex w-full items-center justify-between space-x-2",children:[Oa("div",{className:"flex items-center space-x-2",children:[Yt(To,{}),Yt("p",{className:"font-medium",children:t})]}),Yt("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 wh(){return({id:t,message:r,undo:o,duration:a})=>Ha(Yt(js,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Va}from"react/jsx-runtime";var ke=Zs(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let s=qs(null),u=jt(s);return Va(Ys.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((d=u==null?void 0:u.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=u==null?void 0:u.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:Va("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Le from"@radix-ui/react-popover";import{Drawer as at}from"vaul";import{jsx as Pe,jsxs as Zt}from"react/jsx-runtime";function nt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:u,collisionBoundary:d,sticky:n,onEscapeKeyDown:p,onWheel:f}){let{isMobile:g}=q();return c||g?Zt(at.Root,{open:a,onOpenChange:l,children:[Pe(at.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Zt(at.Portal,{children:[Pe(at.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),Zt(at.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:p,onPointerDownOutside:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(at.Overlay,{})]})]}):Zt(Le.Root,{open:a,onOpenChange:l,children:[Pe(Le.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Le.Portal,{children:Pe(Le.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:n,collisionBoundary:d,onOpenAutoFocus:u,onEscapeKeyDown:p,onWheel:f,children:t})})]})}import{Fragment as Xt,jsx as E,jsxs as Se}from"react/jsx-runtime";function nl(e,t){return e===!0}function qh({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:s,createLabel:u,onCreate:d,buttonProps:n,shortcutHint:p,caret:f,side:g,open:b,onOpenChange:h,onSearchChange:v,shouldFilter:N=!0,inputRight:C,inputClassName:R,optionRight:k,optionClassName:w,matchTriggerWidth:D,children:y}){let T=nl(e,r),M=Array.isArray(t)?t:t?[t]:[],{isMobile:Q}=q(),[S,z]=yt(!1),Y=b??S,L=h??z,[Z,ee]=yt(""),[po,wr]=yt(!1),[Cr,oi]=yt(void 0),[ai,fo]=yt(!1),ni=H=>{var Je;if(T){let Fe=M.some(({value:Ue})=>Ue===H.value);r(Fe?M.filter(({value:Ue})=>Ue!==H.value):[...M,H])}else r(M.length&&((Je=M[0])==null?void 0:Je.value)===H.value?null:H),L(!1)},go=ol((H,Je)=>Je===""?[...H.filter(Fe=>Fe.first&&!M.some(Ue=>Ue.value===Fe.value)),...M,...H.filter(Fe=>!Fe.first&&!M.some(Ue=>Ue.value===Fe.value))]:H,[M]);return qt(()=>{po&&(oi(o&&go(o,Z)),wr(!1))},[po,o,go,Z]),qt(()=>{wr(!0)},[o]),qt(()=>{Y||(ee(""),wr(!0))},[Y]),qt(()=>v==null?void 0:v(Z),[Z]),E(nt,{openPopover:Y,setOpenPopover:L,align:"start",side:g,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(D&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(ke,{width:!Q&&!D,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(wt,{loop:!0,shouldFilter:N,children:[Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Xs,{placeholder:c,value:Z,onValueChange:ee,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!Z)&&(H.preventDefault(),H.stopPropagation(),L(!1))}}),C&&E("div",{className:"mr-2",children:C}),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(il,{children:E(wt.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Cr!==void 0?Se(Xt,{children:[Cr.map(H=>E(sl,{option:H,multiple:T,selected:M.some(({value:Je})=>Je===H.value),onSelect:()=>ni(H),right:k==null?void 0:k(H),className:w},`${H.label}, ${H.value}`)),Z.length>0&&d&&Se(Js,{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",w),onSelect:async()=>{fo(!0),await(d==null?void 0:d(Z))&&(ee(""),L(!1)),fo(!1)},children:[ai?E(Ce,{className:"size-4 shrink-0"}):E(Wt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(u==null?void 0:u(Z))||`Create "${Z}"`})]}),N?E(cl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Cr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(wt.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Ce,{})})})})})]})}),children:E(se,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(Xt,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:y||M.map(H=>H.label).join(", ")||l}),f&&(f===!0?E(el,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:a?_a(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var il=({children:e})=>{let t=al(null),{scrollProgress:r,updateScrollProgress:o}=ot(t);return Se(Xt,{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 sl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Se(Xt,{children:[E(ll,{disabledTooltip:e.disabledTooltip,children:Se(wt.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",l),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(Uo,{className:"size-4 text-neutral-600"}):E(Go,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:_a(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(Fo,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(wt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var ll=({children:e,disabledTooltip:t})=>t?E(J,{content:t,children:E("div",{children:e})}):e,_a=e=>rl(e),cl=tl((e,t)=>Qs(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Jt,format as dl,isSameMonth as ul}from"date-fns";import{ChevronLeft as Ba,ChevronRight as Wa,ChevronsLeft as ml,ChevronsRight as pl}from"lucide-react";import{forwardRef as fl,useRef as gl}from"react";import{DayPicker as hl,useDayPicker as vl,useDayRender as bl,useNavigation as xl}from"react-day-picker";import{Fragment as yl,jsx as re,jsxs as Qt}from"react/jsx-runtime";var Ct=fl(({onClick:e,icon:t,disabled:r,...o},a)=>re("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:re(t,{className:"h-full w-full shrink-0"})}));Ct.displayName="NavigationButton";function Fa({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:s,...u}){return re(hl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day: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:()=>re(Ba,{className:"h-4 w-4"}),IconRight:()=>re(Wa,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:p,previousMonth:f,currentMonth:g,displayMonths:b}=xl(),{numberOfMonths:h,fromDate:v,toDate:N}=vl(),C=b.findIndex(M=>ul(d.displayMonth,M)),R=C===0,k=C===b.length-1,w=h>1&&(R||!k),D=h>1&&(k||!R),y=()=>{let M=Jt(g,-1);f&&(!v||M.getTime()>=v.getTime())&&n(M)},T=()=>{let M=Jt(g,1);p&&(!N||M.getTime()<=N.getTime())&&n(M)};return Qt("div",{className:"flex items-center justify-between",children:[Qt("div",{className:"flex items-center gap-1",children:[o&&!D&&re(Ct,{disabled:a||!f||v&&Jt(g,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:y,icon:ml}),!D&&re(Ct,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&n(f),icon:Ba})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:dl(d.displayMonth,"LLLL yyy",{locale:l})}),Qt("div",{className:"flex items-center gap-1",children:[!w&&re(Ct,{disabled:a||!p,"aria-label":"Go to next month",onClick:()=>p&&n(p),icon:Wa}),o&&!w&&re(Ct,{disabled:a||!p||N&&Jt(g,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:T,icon:pl})]})]})},Day:({date:d,displayMonth:n})=>{let p=gl(null),{activeModifiers:f,buttonProps:g,divProps:b,isButton:h,isHidden:v}=bl(d,n,p),{selected:N,today:C,disabled:R,range_middle:k}=f;if(v)return re(yl,{});if(!h)return re("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:w,...D}=g;return Qt("button",{ref:p,...D,type:"button",children:[w,C&&re("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":!N,"!bg-white":N,"!bg-blue-400":N&&k,"text-neutral-400":R})})]})}},...u})}import{enUS as El}from"date-fns/locale";import{useEffect as Hr,useMemo as Ga,useState as tr}from"react";import{Command as Ar}from"cmdk";import{Lock as wl}from"lucide-react";import{jsx as $e,jsxs as Cl}from"react/jsx-runtime";var Dr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),s=(d,n)=>{let p=d.from,f=n.from,g=!1;p&&f&&c(p,f)&&(g=!0);let b=d.to,h=n.to,v=!1;return b&&h&&c(b,h)&&(v=!0),g&&v},u=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&s(n,d.dateRange)}else if(l(d)){let n=r;return n&&c(n,d.date)}return!1};return $e(Ar,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:$e(Ar.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Cl(Ar.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",u(d)&&"font-semibold text-neutral-800"),children:[$e("span",{children:d.label}),d.requiresUpgrade?$e(wl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?$e("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&$e(J,{side:"bottom",content:d.tooltipContent,children:$e("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Dr.displayName="DatePicker.Presets";import{format as Ee}from"date-fns";import{createContext as Nl}from"react";var Ir=Nl({isOpen:!1,setIsOpen:()=>{}}),kl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},zr=(e,t,r=!1)=>{let o=!kl(),a;return r?a=o?Ee(e,"d MMM, yyyy h:mm a",{locale:t}):Ee(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ee(e,"d MMM, yyyy",{locale:t}),a},Ua=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:s}=t;if(e&&e.length>0){let u=o,d=r;e.forEach(n=>{var p,f,g,b,h,v;if("date"in n){let N=n.date.getFullYear();if(o&&N<o)throw new Error(`Preset ${n.label} is before fromYear ${u}.`);if(r&&N>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(s&&n.date.getDate()>s.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ee(s,"MMM dd, yyyy")}.`)}if("dateRange"in n){let N=(p=n.dateRange.from)==null?void 0:p.getFullYear(),C=(f=n.dateRange.to)==null?void 0:f.getFullYear();if(N&&o&&N<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${u}.`);if(C&&r&&C>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(g=n.dateRange.from)==null?void 0:g.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ee(a,"MMM, yyyy")}.`)}if(l){let R=(b=n.dateRange.to)==null?void 0:b.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ee(l,"MMM, yyyy")}.`)}if(c){let R=(h=n.dateRange.from)==null?void 0:h.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ee(c,"MMM dd, yyyy")}.`)}if(s){let R=(v=n.dateRange.to)==null?void 0:v.getDate();if(R&&R>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ee(s,"MMM dd, yyyy")}.`)}}})}};import{cva as Pl}from"class-variance-authority";import{Calendar as Sl,ChevronDown as Ml}from"lucide-react";import{forwardRef as Rl}from"react";import{jsx as er,jsxs as Ll}from"react/jsx-runtime";var Tl=Pl(["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"}}}),Or=Rl(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Ll("button",{ref:l,className:i(Tl({hasError:o}),e),...a,children:[er(Sl,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),er("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?er("span",{className:"text-neutral-400",children:r}):null)}),er(Ml,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Or.displayName="DatePicker.Trigger";import{jsx as he,jsxs as Dl}from"react/jsx-runtime";var Al=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:s,showYearNavigation:u=!1,locale:d=El,placeholder:n="Select date range",hasError:p,align:f="center",className:g,...b})=>{let{isDesktop:h}=q(),[v,N]=tr(!1),[C,R]=tr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,w]=tr((C==null?void 0:C.dateRange)??e??t??void 0),[D,y]=tr(k==null?void 0:k.to),T=Ga(()=>k,[v]);Hr(()=>{w(e)},[e]),Hr(()=>{let L=a==null?void 0:a.find(({id:Z})=>Z===r);R(L),w((L==null?void 0:L.dateRange)??e??t)},[a,r]),Hr(()=>{v?k&&y(k.to):y(k==null?void 0:k.to)},[v]);let M=(L,Z)=>{let ee=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:Z}:L;w(ee),R(void 0),(ee==null?void 0:ee.from)&&(ee==null?void 0:ee.to)&&(o==null||o(ee),N(!1))},Q=L=>{w(L.dateRange),R(L),o==null||o(L.dateRange,L),N(!1)},S=()=>{w(T),N(!1)},z=L=>{L||S(),N(L)},Y=Ga(()=>k?`${k.from?zr(k.from,d):""} - ${k.to?zr(k.to,d):""}`:null,[k,d]);return rt((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let Z=a==null?void 0:a.find(ee=>ee.shortcut===L.key);Z&&Q(Z)}),he(Ir.Provider,{value:{isOpen:v,setIsOpen:N},children:he(nt,{align:f,openPopover:v,setOpenPopover:z,popoverContentClassName:"rounded-xl",content:he("div",{className:"flex w-full",children:Dl("div",{className:"scrollbar-hide flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&he("div",{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:he("div",{className:"absolute px-3 sm:inset-0 sm:left-0 sm:p-3",children:he(Dr,{currentPresetId:r,currentValue:k,presets:a,onSelect:Q})})}),he("div",{className:"scrollbar-hide overflow-x-scroll",children:he(Fa,{mode:"range",selected:k,onSelect:M,month:D,onMonthChange:y,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:u,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:he(Or,{placeholder:n,disabled:l,className:g,hasError:p,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(C==null?void 0:C.label)??Y})})})};function D2({presets:e,...t}){return e&&Ua(e,t),he(Al,{presets:e,...t})}import{jsx as rr,jsxs as $a}from"react/jsx-runtime";function _2({icon:e,title:t,description:r,learnMore:o,children:a}){return $a("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[rr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:rr(e,{className:"size-6 text-neutral-800"})}),rr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&$a("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&rr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Il}from"class-variance-authority";import{useState as Ka}from"react";import{toast as ja}from"sonner";import{Fragment as Ol,jsx as ve,jsxs as _r}from"react/jsx-runtime";var Ya=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],Vr={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:Ya,errorMessage:"File type not supported (document files only)"},programResourceFiles:{types:[...Ya,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},zl=Il("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 q2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:s=Zo,customPreview:u,accept:d="any",imageSrc:n,loading:p=!1,clickToUpload:f=!0,showHoverOverlay:g=!0,content:b,maxFileSizeMB:h=0,targetResolution:v,accessibilityLabel:N="File upload",disabled:C=!1}){let[R,k]=Ka(!1),[w,D]=Ka(null),y=async T=>{let M="dataTransfer"in T?T.dataTransfer.files&&T.dataTransfer.files[0]:T.target.files&&T.target.files[0];if(!M)return;if(D(M.name),h>0&&M.size/1024/1024>h){ja.error(`File size too big (max ${h} MB)`);return}let Q=Vr[d].types;if(Q.length&&!Q.includes(M.type)){ja.error(Vr[d].errorMessage??"File type not supported");return}let S=M;if(v&&M.type.startsWith("image/"))try{let z=await ho(M,v),Y=await fetch(z).then(L=>L.blob());S=new File([Y],M.name,{type:M.type})}catch(z){console.error("Error resizing image:",z)}if(t){let z=new FileReader;z.onload=Y=>{var L;return r==null?void 0:r({src:(L=Y.target)==null?void 0:L.result,file:S})},z.readAsDataURL(S);return}r==null||r({file:S})};return _r("label",{className:i(zl({variant:o}),C?"cursor-not-allowed":i(f&&"cursor-pointer"),a),children:[p&&ve("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ve(ft,{})}),ve("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(),y(T),k(!1)}}),_r("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",C&&"bg-neutral-50",R&&!C&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",g&&!C&&"group-hover:opacity-100"):i(!C&&"group-hover:bg-neutral-50")),children:[ve(s,{className:i("size-7 transition-all duration-75",C?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),b!==null&&ve("div",{className:i("mt-2 text-center text-sm text-neutral-500",C&&"text-neutral-400"),children:b??ve(Ol,{children:_r("p",{children:["Drag and drop ",f&&"or click"," to upload."]})})}),ve("span",{className:"sr-only",children:N})]}),n&&(u??ve("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),f&&ve("div",{className:"sr-only mt-1 flex shadow-sm",children:ve("input",{id:e,type:"file",accept:Vr[d].types.join(","),onChange:y,disabled:C},w)})]})}import{AnimatePresence as Hl,motion as Za}from"framer-motion";import{X as Vl}from"lucide-react";import{isValidElement as _l}from"react";import{Fragment as Bl,jsx as te,jsxs as Nt}from"react/jsx-runtime";function Xa({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return rt("Escape",o,{priority:1}),te(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Nt("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[te("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:te(Hl,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return te(Za.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===l);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(u=>{var f,g,b;let d=(f=s.options)==null?void 0:f.find(h=>typeof h.value=="string"&&typeof u=="string"?h.value.toLowerCase()===u.toLowerCase():h.value===u),n=(d==null?void 0:d.icon)??((g=s.getOptionIcon)==null?void 0:g.call(s,u,{key:s.key,option:d}))??s.icon,p=(d==null?void 0:d.label)??((b=s.getOptionLabel)==null?void 0:b.call(s,u,{key:s.key,option:d}))??u;return Nt(Za.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:[Nt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[te("span",{className:"shrink-0 text-neutral-600",children:qa(s.icon)?s.icon:te(s.icon,{className:"h-4 w-4"})}),s.label]}),te("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),te("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?Nt(Bl,{children:[te("span",{className:"shrink-0 text-neutral-600",children:qa(n)?n:te(n,{className:"h-4 w-4"})}),At(p,30)]}):te("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),te("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,u),children:te(Vl,{className:"h-3.5 w-3.5"})})]},`${l}-${u}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Nt("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",te("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 qa=e=>_l(e);import{Command as Ae,useCommandState as Wl}from"cmdk";import{ChevronDown as Fl,ListFilter as Ul}from"lucide-react";import{Fragment as Gl,forwardRef as $l,isValidElement as Qa,useCallback as or,useEffect as ar,useImperativeHandle as Kl,useRef as Wr,useState as Br}from"react";import{Fragment as Jl,jsx as _,jsxs as be}from"react/jsx-runtime";function en({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:s,children:u,emptyState:d,className:n}){var M,Q;let{isMobile:p}=q(),f=Wr(null),g=Wr(),[b,h]=Br(!1);rt("f",()=>h(!0),{enabled:!b});let[v,N]=Br(""),[C,R]=Br(null),k=or(()=>{N(""),R(null)},[]);ar(()=>{b||k()},[b]);let w=C?e.find(({key:S})=>S===C):null,D=or(S=>{f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight}),N(""),R(S),o==null||o(S)},[]),y=or(S=>{if(!w||!c)return!1;let z=c.find(({key:Y})=>Y===C);return(z==null?void 0:z.value)===S||z&&w.multiple&&Array.isArray(z.value)&&z.value.includes(S)},[w]),T=or(S=>{w&&(y(S)?r(w.key,S):t(w.key,S),w.multiple||h(!1))},[c,w,s]);return ar(()=>{a==null||a(v)},[v]),ar(()=>{l==null||l(C)},[C]),ar(()=>{(w==null?void 0:w.options)&&f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight})},[w==null?void 0:w.options]),_(nt,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:S=>{C&&(S.preventDefault(),k())},content:_(ke,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:be(Ae,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[be("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Yl,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:v,onValueChange:N,onKeyDown:S=>{(S.key==="Escape"||S.key==="Backspace"&&!v)&&(S.preventDefault(),S.stopPropagation(),C?k():h(!1))},emptySubmit:S=>{S.preventDefault(),S.stopPropagation(),s?(t("ai",w?`${w.label} ${v}`:v),h(!1)):T(v)}}),!w&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(Zl,{ref:f,children:be(Ae.List,{className:i("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((Q=(M=w.options)==null?void 0:M.filter(S=>!v||!S.hideDuringSearch))==null?void 0:Q.map(S=>{let z=y(S.value);return _(Ja,{filter:w,option:S,right:z?_(Wo,{className:"h-4 w-4"}):S.right,onSelect:()=>T(S.value)},S.value)}))??_(Ae.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:g.current,children:_(Ce,{})})}):e.map(S=>be(Gl,{children:[_(Ja,{filter:S,onSelect:()=>D(S.key)}),S.separatorAfter&&_(Ae.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},S.key)),(!w||w.options)&&_(ql,{search:v,askAI:s,children:d?jl(d)?(d==null?void 0:d[C??"default"])??"No matches":d:"No matches"})]})},C)]})}),children:be("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",n),children:[_(Ul,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:u??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(Fl,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function jl(e){return typeof e=="object"&&e!==null&&!Qa(e)}var Yl=e=>{let t=Wl(r=>r.filtered.count===0);return _(Ae.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},Zl=$l(({children:e},t)=>{let r=Wr(null);Kl(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=ot(r);return be(Jl,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Ja({filter:e,option:t,right:r,onSelect:o}){var s,u;let{isMobile:a}=q(),l=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 be(Ae.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:[_("span",{className:"shrink-0 text-neutral-600",children:Xl(l)?l:_(l,{className:"h-4 w-4"})}),At(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var ql=({search:e,askAI:t,children:r})=>t&&e?be(Ae.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(So,{className:"h-4 w-4"}),be("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",be("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ae.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Xl=e=>Qa(e);var yv={Select:en,List:Xa};import{useMemo as Ql,useState as tn}from"react";import{jsx as Ke,jsxs as nr}from"react/jsx-runtime";function Mv({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[s,u]=tn(r.defaultValue),[d,n]=tn(!1),p=Ql(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return nr("form",{onSubmit:async f=>{f.preventDefault(),n(!0),await c({[r.name]:s}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[nr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[nr("div",{className:"flex flex-col space-y-3",children:[Ke("h2",{className:"text-xl font-medium",children:e}),Ke("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ke("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:f=>u(f.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":l})}):Ke("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),nr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ke("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ke("div",{className:"shrink-0",children:Ke(se,{text:a,loading:d,disabled:p,disabledTooltip:l})})]})]})}import{useId as ec}from"react";import{jsx as ir,jsxs as tc}from"react/jsx-runtime";function Ev({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=ec();return tc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[ir("defs",{children:ir("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:ir("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),ir("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as rc}from"lucide-react";import oc,{useCallback as ac,useState as nc}from"react";import{jsx as je,jsxs as Fr}from"react/jsx-runtime";var ic=oc.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=nc(!1),c=ac(()=>l(!a),[a,l]);return Fr("div",{children:[Fr("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}),Fr("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(rc,{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(Xo,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):je(Jo,{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})]})});ic.displayName="Input";import{flip as dc,offset as uc,size as mc,useDismiss as pc,useFloating as fc,useInteractions as gc}from"@floating-ui/react";import{Command as Me,useCommandState as hc}from"cmdk";import{Check as vc,ChevronDown as bc,Search as xc,X as yc}from"lucide-react";import{createContext as wc,forwardRef as sn,useContext as Kr,useEffect as Ur,useMemo as on,useRef as an,useState as Gr}from"react";import{Drawer as it}from"vaul";import sc from"next/image";import{useEffect as lc,useState as rn}from"react";import{jsx as cc}from"react/jsx-runtime";function kt(e){let[t,r]=rn(!0),[o,a]=rn(e.src);lc(()=>a(e.src),[e.src]);let l=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return cc(sc,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as I,jsxs as le}from"react/jsx-runtime";var sr=wc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function ab({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:s,noItemsElement:u}){let{isMobile:d}=q(),n=an(null),[p,f]=Gr(!1),[g,b]=Gr(""),[h,v]=Gr(!1);Ur(()=>{p&&v(!1)},[p]),Ur(()=>v(!0),[g]),Ur(()=>{t&&b(t.value)},[t]);let N=on(()=>{let z=g.toLowerCase();return h?e.filter(Y=>Y.value.toLowerCase().includes(z)):g?e.sort((Y,L)=>(L.value.toLowerCase().includes(z)?1:0)-(Y.value.toLowerCase().includes(z)?1:0)):e},[h,g,e]),{refs:C,floatingStyles:R,context:k}=fc({open:p,onOpenChange:f,middleware:[uc(8),mc({apply({elements:{floating:z},availableHeight:Y}){Object.assign(z.style,{maxHeight:`${Math.max(75,Math.min(Y,290))}px`})},padding:8}),dc({fallbackStrategy:"initialPlacement",padding:8})]}),w=pc(k,{enabled:!d||!l}),{getReferenceProps:D,getFloatingProps:y}=gc([w]),T=an(null),{scrollProgress:M,updateScrollProgress:Q}=ot(T),S=on(()=>t&&t.icon?t.icon:t&&t.image?I(kt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||I(xc,{className:"size-4 text-neutral-400"}),[t,c]);return I(sr.Provider,{value:{inputAttrs:s||{},openCommandList:p,setOpenCommandList:f,inputValue:g,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?le(it.Root,{open:p,onOpenChange:f,children:[I(it.Trigger,{className:"sm:hidden",asChild:!0,children:I(Me,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:I($r,{className:o,iconElement:S})})}),I(it.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(it.Portal,{children:[I(it.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:z=>{z.target instanceof Element&&z.target.closest("[data-sonner-toast]")&&z.preventDefault()},children:le(Me,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I("div",{className:"p-2",children:I($r,{className:o,iconElement:S})}),p&&le(Me.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&g===""&&(u?I("div",{children:u}):I("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&I(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),I(nn,{items:N})]})]})}),I(it.Overlay,{})]})]}):le(Me,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I($r,{className:o,iconElement:S,ref:C.setReference,...D()}),p&&le("div",{ref:C.setFloating,style:R,...y(),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:Q,className:"grow overflow-y-auto p-2",children:[le(Me.List,{children:[e.length===0&&g===""&&(u?I("div",{children:u}):I("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),g!==""&&I(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),I(nn,{items:N})]}),I("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(M,2)}})]})]})})}var $r=sn(({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:[I("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[I(Cc,{}),I(Nc,{})]})]})),Cc=sn((e,t)=>{let r=hc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:s,disabled:u}=Kr(sr);return I(Me.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!0)},disabled: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 Nc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=Kr(sr);return I("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?I(yc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):I(bc,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function nn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=Kr(sr);return e.map(a=>le(Me.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&&I(kt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),I("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&&I($t,{className:"text-xs",variant:"neutral",children:a.label})]}),I(vc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as jr from"@radix-ui/react-label";import{cva as kc}from"class-variance-authority";import*as ln from"react";import{jsx as Mc}from"react/jsx-runtime";var Pc=kc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Sc=ln.forwardRef(({className:e,...t},r)=>Mc(jr.Root,{ref:r,className:i(Pc(),e),...t}));Sc.displayName=jr.Root.displayName;import{cva as Rc}from"class-variance-authority";import{isValidElement as Tc}from"react";import{jsx as cn,jsxs as dn}from"react/jsx-runtime";var Lc=Rc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors","whitespace-nowrap text-sm font-medium text-content-default hover:bg-bg-subtle transition-colors"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function hb({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return dn(e||"button",{...e==="button"?{type:"button"}:{},className:i(Lc({variant:t}),l),...c,children:[dn("div",{className:"flex grow items-center gap-2",children:[o&&(Ec(o)?o:cn(o,{className:"size-4"})),r]}),a&&cn("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 Ec=e=>Tc(e);import{curveNatural as un}from"@visx/curve";import{LinearGradient as mn}from"@visx/gradient";import{Group as Ac}from"@visx/group";import{ParentSize as Dc}from"@visx/responsive";import{scaleLinear as Ic,scaleUtc as zc}from"@visx/scale";import{Area as Oc,AreaClosed as Hc}from"@visx/shape";import{motion as pn}from"framer-motion";import{useId as Vc,useMemo as fn}from"react";import{jsx as xe,jsxs as Yr}from"react/jsx-runtime";function Sb(e){return xe(Dc,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(_c,{...{width:t,height:r,...e}})})}var De={top:8,right:2,bottom:2,left:2};function _c({width:e,height:t,data:r,curve:o=!0,color:a}){let l=Vc(),c=fn(()=>r.map(({date:d})=>({date:d,value:0})),[r]),{yScale:s,xScale:u}=fn(()=>{let d=r.map(({value:b})=>b),n=Math.max(...d),p=r.map(({date:b})=>b.getTime()),f=new Date(Math.min(...p)),g=new Date(Math.max(...p));return{yScale:Ic({domain:[-2,Math.max(n,2)],range:[t-De.top-De.bottom,0],nice:!0,clamp:!0}),xScale:zc({domain:[f,g],range:[0,e-De.left-De.right],nice:!0})}},[r,t,e]);return Yr("svg",{width:e,height:t,children:[Yr("defs",{children:[xe(mn,{id:`${l}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-De.left-De.right,gradientUnits:"userSpaceOnUse"}),xe(mn,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),Yr(Ac,{left:De.left,top:De.top,children:[xe(Oc,{data:r,x:({date:d})=>u(d),y:({value:d})=>s(d)??0,curve:o?un:void 0,children:({path:d})=>xe(pn.path,{initial:{d:d(c)||"",opacity:0},animate:{d:d(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),xe(Hc,{data:r,x:({date:d})=>u(d),y:({value:d})=>s(d)??0,yScale:s,curve:o?un:void 0,children:({path:d})=>xe(pn.path,{initial:{d:d(c)||"",opacity:0},animate:{d:d(r)||"",opacity:1},fill:`url(#${l}-color-gradient)`,mask:`url(#${l}-mask)`})})]})]},r.length)}import*as ce from"@radix-ui/react-dialog";import*as Zr from"@radix-ui/react-visually-hidden";import{useRouter as Bc}from"next/navigation";import{Drawer as Ye}from"vaul";import{jsx as oe,jsxs as st}from"react/jsx-runtime";function Ab({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:s}){let u=Bc(),d=({dragged:p}={})=>{c&&!p||(a&&a(),o?o(!1):u.back())},{isMobile:n}=q();return n&&!l?oe(Ye.Root,{open:o?r:!0,onOpenChange:p=>{p||d({dragged:!0})},...s,children:st(Ye.Portal,{children:[oe(Ye.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(Ye.Content,{onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.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:st("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[st(Zr.Root,{children:[oe(Ye.Title,{children:"Modal"}),oe(Ye.Description,{children:"This is a modal"})]}),oe(Wc,{}),e]})}),oe(Ye.Overlay,{})]})}):oe(ce.Root,{open:o?r:!0,onOpenChange:p=>{p||d()},children:st(ce.Portal,{children:[oe(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),st(ce.Content,{onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onPointerDownOutside:p=>{p.target instanceof Element&&p.target.closest("[data-sonner-toast]")&&p.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:[st(Zr.Root,{children:[oe(ce.Title,{children:"Modal"}),oe(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Wc(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as Fc,jsx as lr,jsxs as lt}from"react/jsx-runtime";var gn=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 zb({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return lt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[lt("div",{className:"flex items-center gap-2",children:[lt("div",{children:[lr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&lt(Fc,{children:[lt("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ",c&&"of "]}),c&&lr("span",{className:"font-medium",children:Dt(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),l]}),lt("div",{className:"flex items-center gap-2",children:[lr("button",{type:"button",className:gn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),lr("button",{type:"button",className:gn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Ie from"@radix-ui/react-radio-group";import{Circle as Uc}from"lucide-react";import*as qr from"react";import{jsx as cr}from"react/jsx-runtime";var Gc=qr.forwardRef(({className:e,...t},r)=>cr(Ie.Root,{className:i("grid gap-2",e),...t,ref:r}));Gc.displayName=Ie.Root.displayName;var $c=qr.forwardRef(({className:e,...t},r)=>cr(Ie.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:cr(Ie.Indicator,{className:"flex items-center justify-center",children:cr(Uc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));$c.displayName=Ie.Item.displayName;import{Drawer as ze}from"vaul";import{jsx as Ze,jsxs as qc}from"react/jsx-runtime";function Kc({children:e,contentProps:t,nested:r=!1,...o}){let a=r?ze.NestedRoot:ze.Root;return Ze(a,{direction:"right",handleOnly:!0,...o,children:qc(ze.Portal,{children:[Ze(ze.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ze(ze.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className: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)","user-select":"auto",...t==null?void 0:t.style},children:Ze("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function jc({className:e,...t}){return Ze(ze.Title,{className:i("text-xl font-medium text-zinc-900",e),...t})}function Yc(e){return Ze(ze.Description,{...e})}function Zc(e){return Ze(ze.Close,{...e})}var Ub=Object.assign(Kc,{Title:jc,Description:Yc,Close:Zc});import{useEffect as Xc,useRef as Jc,useState as Qc}from"react";import{jsx as hn}from"react/jsx-runtime";var ed=`
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
- `,Yc=`
9
+ `,td=`
10
10
  precision mediump float;
11
11
 
12
12
  uniform vec2 resolution;
@@ -39,14 +39,14 @@ void main(void) {
39
39
 
40
40
  gl_FragColor = fragColor;
41
41
  }
42
- `,Zc=60,qc=1e3/Zc;function Ub({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=$c(null),[l,c]=Kc(!1);return Gc(()=>{let s=a.current;if(!s||!s.parentElement)return;let u=s.parentElement,d=window.devicePixelRatio||1;s.width=u.clientWidth*d,s.height=u.clientHeight*d;let n=s.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let p=n.createProgram();if(!p){console.error("Failed to create shader program");return}for(let y=0;y<2;++y){let T=y===0?jc:Yc,M=n.createShader(y===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!M){console.error("Failed to create shader");return}n.shaderSource(M,T),n.compileShader(M),n.getShaderParameter(M,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(M)),n.attachShader(p,M),n.linkProgram(p)}n.getProgramParameter(p,n.LINK_STATUS)||console.error(n.getProgramInfoLog(p));let f=n.getAttribLocation(p,"position"),g=n.getUniformLocation(p,"time"),b=n.getUniformLocation(p,"resolution"),h=n.getUniformLocation(p,"dotSize"),v=n.getUniformLocation(p,"cellSize"),N=n.getUniformLocation(p,"speed");n.useProgram(p);let C=[1,1,-1,1,1,-1,-1,-1],R=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,R),n.bufferData(n.ARRAY_BUFFER,new Float32Array(C),n.STATIC_DRAW),n.enableVertexAttribArray(f),n.vertexAttribPointer(f,2,n.FLOAT,!1,0,0),n.uniform1f(h,e*window.devicePixelRatio),n.uniform1f(v,t*window.devicePixelRatio),n.uniform1f(N,r);let k,w=0;function D(y){if(y-w<qc){k=requestAnimationFrame(D);return}w=y,n&&s&&p&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(g,y/1e3),n.uniform2f(b,s.width,s.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),k=requestAnimationFrame(D)}return k=requestAnimationFrame(D),s.addEventListener("webglcontextlost",y=>{y.preventDefault(),c(!0),cancelAnimationFrame(k)}),()=>{cancelAnimationFrame(k),s.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),dn("div",{className:i("absolute inset-0",o,l&&"opacity-0"),children:dn("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{cva as Xc}from"class-variance-authority";import{jsx as ed,jsxs as td}from"react/jsx-runtime";var Jc=Xc("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"}}),Qc={neutral:jo,new:$o,success:Go,pending:Ko,warning:Nr,error:Nr};function Zb({className:e,variant:t,icon:r,onClick:o,children:a,...l}){let c=r!==null?r??Qc[t??"neutral"]:null;return td("span",{className:i(Jc({variant:t}),o&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:o,...l,children:[c&&ed(c,{className:"h-3 w-3 shrink-0"}),a]})}import*as ur from"@radix-ui/react-switch";import{useMemo as rd}from"react";import{jsx as dr}from"react/jsx-runtime";function o4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:l,checked:c=!0,loading:s=!1,disabled:u=!1,disabledTooltip:d}){let n=rd(()=>d?!0:u||s,[d,u,s]),p=dr(ur.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,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:dr(ur.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:l})});return d?dr(J,{content:d,children:dr("div",{className:"inline-block leading-none",children:p})}):p}import{flexRender as Jr,getCoreRowModel as od,useReactTable as ad}from"@tanstack/react-table";import{AnimatePresence as nd,motion as id}from"framer-motion";import{memo as sd,useEffect as Xr,useState as un}from"react";import{jsx as U,jsxs as ue}from"react/jsx-runtime";var Qr=(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==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75"]),ld=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 M4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:l,pagination:c,onPaginationChange:s,getRowId:u,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[p,f]=un(e.columnVisibility??{}),[g,b]=un(e.selectedRows??{});Xr(()=>{var v;(v=e.onRowSelectionChange)==null||v.call(e,h.getSelectedRowModel().rows)},[g]),Xr(()=>{e.columnVisibility&&!bo(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),Xr(()=>{var v;(v=e.onColumnVisibilityChange)==null||v.call(e,p)},[p]);let h=ad({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:od(),onPaginationChange:s,onColumnVisibilityChange:v=>f(v),onRowSelectionChange:b,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...l},rowSelection:g},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:u,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:p,table:h,enableColumnResizing:d}}var cd=sd(function({row:t,onRowClick:r,cellRight:o,tdClassName:a,table:l}){return U("tr",{className:i("group/row",r&&"cursor-pointer select-none",l.getRowModel().rows.length>8&&t.index===l.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:r?c=>{pt(c)||r(t,c)}:void 0,children:t.getVisibleCells().map(c=>U("td",{className:i(Qr(c.column.id,!!r),"text-content-default group",eo(c.column,t.index===l.getRowModel().rows.length-1),typeof a=="function"?a(c.column.id):a),style:{width:c.column.getSize(),...to(c.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[U("div",{className:"min-w-0 shrink grow truncate",children:Jr(c.column.columnDef.cell,c.getContext())}),o==null?void 0:o(c)]})},c.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function R4({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:l,sortBy:c,sortOrder:s,onSortChange:u,sortableColumns:d=[],className:n,containerClassName:p,scrollWrapperClassName:f,thClassName:g,tdClassName:b,table:h,pagination:v,resourceName:N,onRowClick:C,rowCount:R,children:k,enableColumnResizing:w=!1}){return ue("div",{className:i("border-border-subtle bg-bg-default relative rounded-xl border",p),children:[!o&&!!(t!=null&&t.length)||r?ue("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[ue("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",w&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:w?"fixed":"auto",...w&&{minWidth:h.getVisibleLeafColumns().reduce((D,y)=>D+y.getSize(),0)}},children:[U("thead",{children:h.getHeaderGroups().map(D=>U("tr",{children:D.headers.map(y=>{let T=d.includes(y.column.id),M=T?"button":"div";return ue("th",{colSpan:y.colSpan,className:i(Qr(y.id),"text-content-emphasis select-none font-medium",eo(y.column,!h.getRowModel().rows.length),typeof g=="function"?g(y.column.id):g,w&&"relative"),style:{...w?{width:y.getSize()}:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto"},...to(y.column)},children:[U("div",{className:"flex items-center justify-between gap-6 !pr-0",children:ue(M,{className:"flex items-center gap-2",...T&&{type:"button",disabled:!T,"aria-label":"Sort by column",onClick:()=>u==null?void 0:u({sortBy:y.column.id,sortOrder:c!==y.column.id||s==="asc"?"desc":"asc"})},children:[y.isPlaceholder?null:Jr(y.column.columnDef.header,y.getContext()),T&&c===y.column.id&&U(Mo,{className:"h-3 w-3 shrink-0",order:s||"desc"})]})}),w&&y.column.getCanResize()&&y.column.id!=="menu"&&U("div",{onMouseDown:y.getResizeHandler(),onTouchStart:y.getResizeHandler(),onClick:Q=>Q.stopPropagation(),className:ld})]},y.id)})},D.id))}),U("tbody",{children:h.getRowModel().rows.map(D=>w?U(cd,{row:D,onRowClick:C,cellRight:l,tdClassName:b,table:h},D.id):U("tr",{className:i("group/row",C&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&D.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:C?y=>{pt(y)||C(D,y)}:void 0,children:D.getVisibleCells().map(y=>U("td",{className:i(Qr(y.column.id,!!C),"text-content-default group",eo(y.column,D.index===h.getRowModel().rows.length-1),typeof b=="function"?b(y.column.id):b),style:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto",...to(y.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[U("div",{className:"min-w-0 shrink grow truncate",children:Jr(y.column.columnDef.cell,y.getContext())}),l==null?void 0:l(y)]})},y.id))},D.id))})]}),k]}):U("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(N==null?void 0:N(!0))||"items"} found.`}),v&&!o&&!!(t!=null&&t.length)&&!!R&&ue("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:[ue("div",{children:[U("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",ue("span",{className:"font-medium",children:[(v.pageIndex-1)*v.pageSize+1,"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,h.getRowCount())]})," ","of"," ",U("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(N==null?void 0:N(h.getRowCount()!==1))||"items"]}),ue("div",{className:"flex items-center gap-2",children:[U(se,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:v.pageIndex===1}),U(se,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:v.pageIndex===h.getPageCount()})]})]}),U(nd,{children:r&&U(id.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 flex h-[50vh] items-center justify-center rounded-xl",children:U(Ce,{})})})]})}var eo=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},to=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 dd,motion as mn}from"framer-motion";import{useId as ud}from"react";import{jsx as mr,jsxs as md}from"react/jsx-runtime";function D4({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let s=ud();return mr(dd,{id:s,children:mr(mn.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=>md("button",{type:"button","data-selected":u.value===t,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"hover:text-content-subtle z-[11] transition-colors":u.value!==t},a),onClick:()=>r(u.value),children:[typeof u.label=="string"?mr("p",{children:u.label}):u.label,u.badge,u.value===t&&mr(mn.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",l),transition:{duration:.25}})]},u.value))})})}import{useEffect as pd,useId as fd,useRef as gd,useState as hd}from"react";import{jsx as me,jsxs as ro}from"react/jsx-runtime";var vd=[{key:"utm_source",icon:ea,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:da,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Jo,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:ia,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:la,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Qo,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function W4({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=q(),s=fd(),[u,d]=hd(!1),n=gd(null);return pd(()=>{n.current&&!c&&o&&setTimeout(()=>{var p;return(p=n.current)==null?void 0:p.focus()},10)},[]),me("div",{className:i("grid gap-y-3",l),children:vd.map(({key:p,icon:f,label:g,placeholder:b,description:h},v)=>me("div",{className:"group relative",children:ro("div",{className:"relative z-10 flex",children:[me(J,{content:ro("div",{className:"p-3 text-center text-xs",children:[me("p",{className:"text-neutral-600",children:h}),me("span",{className:"font-mono text-neutral-400",children:p})]}),sideOffset:4,disableHoverableContent:!0,children:ro("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:()=>d(N=>!N),children:[me(f,{className:"size-4 shrink-0"}),me("label",{htmlFor:`${s}-${p}`,className:"select-none text-sm",children:u?me("span",{className:"font-mono text-xs",children:p}):g})]})}),me("div",{className:"min-w-0 grow",children:me(ua,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:me("input",{type:"text",id:`${s}-${p}`,ref:v===0?n:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[p]||"",onChange:N=>t(p,N.target.value)})})})]})},p))})}import{jsx as oo,jsxs as bd}from"react/jsx-runtime";function U4(){return bd("div",{style:pr.backgroundMain,children:[oo("div",{style:pr.backgroundMainBefore}),oo("div",{style:pr.backgroundMainAfter}),oo("div",{style:pr.backgroundContent})]})}var pr={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
42
+ `,rd=60,od=1e3/rd;function jb({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=Jc(null),[l,c]=Qc(!1);return Xc(()=>{let s=a.current;if(!s||!s.parentElement)return;let u=s.parentElement,d=window.devicePixelRatio||1;s.width=u.clientWidth*d,s.height=u.clientHeight*d;let n=s.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let p=n.createProgram();if(!p){console.error("Failed to create shader program");return}for(let y=0;y<2;++y){let T=y===0?ed:td,M=n.createShader(y===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!M){console.error("Failed to create shader");return}n.shaderSource(M,T),n.compileShader(M),n.getShaderParameter(M,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(M)),n.attachShader(p,M),n.linkProgram(p)}n.getProgramParameter(p,n.LINK_STATUS)||console.error(n.getProgramInfoLog(p));let f=n.getAttribLocation(p,"position"),g=n.getUniformLocation(p,"time"),b=n.getUniformLocation(p,"resolution"),h=n.getUniformLocation(p,"dotSize"),v=n.getUniformLocation(p,"cellSize"),N=n.getUniformLocation(p,"speed");n.useProgram(p);let C=[1,1,-1,1,1,-1,-1,-1],R=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,R),n.bufferData(n.ARRAY_BUFFER,new Float32Array(C),n.STATIC_DRAW),n.enableVertexAttribArray(f),n.vertexAttribPointer(f,2,n.FLOAT,!1,0,0),n.uniform1f(h,e*window.devicePixelRatio),n.uniform1f(v,t*window.devicePixelRatio),n.uniform1f(N,r);let k,w=0;function D(y){if(y-w<od){k=requestAnimationFrame(D);return}w=y,n&&s&&p&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(g,y/1e3),n.uniform2f(b,s.width,s.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),k=requestAnimationFrame(D)}return k=requestAnimationFrame(D),s.addEventListener("webglcontextlost",y=>{y.preventDefault(),c(!0),cancelAnimationFrame(k)}),()=>{cancelAnimationFrame(k),s.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),hn("div",{className:i("absolute inset-0",o,l&&"opacity-0"),children:hn("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{cva as ad}from"class-variance-authority";import{jsx as sd,jsxs as ld}from"react/jsx-runtime";var nd=ad("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"}}),id={neutral:Yo,new:Ko,success:$o,pending:jo,warning:Nr,error:Nr};function Qb({className:e,variant:t,icon:r,onClick:o,children:a,...l}){let c=r!==null?r??id[t??"neutral"]:null;return ld("span",{className:i(nd({variant:t}),o&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:o,...l,children:[c&&sd(c,{className:"h-3 w-3 shrink-0"}),a]})}import*as ur from"@radix-ui/react-switch";import{useMemo as cd}from"react";import{jsx as dr}from"react/jsx-runtime";function s4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:l,checked:c=!0,loading:s=!1,disabled:u=!1,disabledTooltip:d}){let n=cd(()=>d?!0:u||s,[d,u,s]),p=dr(ur.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,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:dr(ur.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:l})});return d?dr(J,{content:d,children:dr("div",{className:"inline-block leading-none",children:p})}):p}import{flexRender as Jr,getCoreRowModel as dd,useReactTable as ud}from"@tanstack/react-table";import{AnimatePresence as md,motion as pd}from"framer-motion";import{memo as fd,useEffect as Xr,useState as vn}from"react";import{jsx as U,jsxs as ue}from"react/jsx-runtime";var Qr=(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==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75"]),gd=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 E4(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:l,pagination:c,onPaginationChange:s,getRowId:u,enableColumnResizing:d=!1,columnResizeMode:n="onChange"}=e,[p,f]=vn(e.columnVisibility??{}),[g,b]=vn(e.selectedRows??{});Xr(()=>{var v;(v=e.onRowSelectionChange)==null||v.call(e,h.getSelectedRowModel().rows)},[g]),Xr(()=>{e.columnVisibility&&!xo(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),Xr(()=>{var v;(v=e.onColumnVisibilityChange)==null||v.call(e,p)},[p]);let h=ud({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:dd(),onPaginationChange:s,onColumnVisibilityChange:v=>f(v),onRowSelectionChange:b,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...l},rowSelection:g},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:u,enableColumnResizing:d,columnResizeMode:n});return{...e,columnVisibility:p,table:h,enableColumnResizing:d}}var hd=fd(function({row:t,onRowClick:r,cellRight:o,tdClassName:a,table:l}){return U("tr",{className:i("group/row",r&&"cursor-pointer select-none",l.getRowModel().rows.length>8&&t.index===l.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:r?c=>{pt(c)||r(t,c)}:void 0,children:t.getVisibleCells().map(c=>U("td",{className:i(Qr(c.column.id,!!r),"text-content-default group",eo(c.column,t.index===l.getRowModel().rows.length-1),typeof a=="function"?a(c.column.id):a),style:{width:c.column.getSize(),...to(c.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[U("div",{className:"min-w-0 shrink grow truncate",children:Jr(c.column.columnDef.cell,c.getContext())}),o==null?void 0:o(c)]})},c.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function A4({columns:e,data:t,loading:r,error:o,emptyState:a,cellRight:l,sortBy:c,sortOrder:s,onSortChange:u,sortableColumns:d=[],className:n,containerClassName:p,scrollWrapperClassName:f,thClassName:g,tdClassName:b,table:h,pagination:v,resourceName:N,onRowClick:C,rowCount:R,children:k,enableColumnResizing:w=!1}){return ue("div",{className:i("border-border-subtle bg-bg-default relative rounded-xl border",p),children:[!o&&!!(t!=null&&t.length)||r?ue("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[ue("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",w&&"[&_th]:group/resize"],n),style:{width:"100%",tableLayout:w?"fixed":"auto",...w&&{minWidth:h.getVisibleLeafColumns().reduce((D,y)=>D+y.getSize(),0)}},children:[U("thead",{children:h.getHeaderGroups().map(D=>U("tr",{children:D.headers.map(y=>{let T=d.includes(y.column.id),M=T?"button":"div";return ue("th",{colSpan:y.colSpan,className:i(Qr(y.id),"text-content-emphasis select-none font-medium",eo(y.column,!h.getRowModel().rows.length),typeof g=="function"?g(y.column.id):g,w&&"relative"),style:{...w?{width:y.getSize()}:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto"},...to(y.column)},children:[U("div",{className:"flex items-center justify-between gap-6 !pr-0",children:ue(M,{className:"flex items-center gap-2",...T&&{type:"button",disabled:!T,"aria-label":"Sort by column",onClick:()=>u==null?void 0:u({sortBy:y.column.id,sortOrder:c!==y.column.id||s==="asc"?"desc":"asc"})},children:[y.isPlaceholder?null:Jr(y.column.columnDef.header,y.getContext()),T&&c===y.column.id&&U(Ro,{className:"h-3 w-3 shrink-0",order:s||"desc"})]})}),w&&y.column.getCanResize()&&y.column.id!=="menu"&&U("div",{onMouseDown:y.getResizeHandler(),onTouchStart:y.getResizeHandler(),onClick:Q=>Q.stopPropagation(),className:gd})]},y.id)})},D.id))}),U("tbody",{children:h.getRowModel().rows.map(D=>w?U(hd,{row:D,onRowClick:C,cellRight:l,tdClassName:b,table:h},D.id):U("tr",{className:i("group/row",C&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&D.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0"),onClick:C?y=>{pt(y)||C(D,y)}:void 0,children:D.getVisibleCells().map(y=>U("td",{className:i(Qr(y.column.id,!!C),"text-content-default group",eo(y.column,D.index===h.getRowModel().rows.length-1),typeof b=="function"?b(y.column.id):b),style:{minWidth:y.column.columnDef.minSize,maxWidth:y.column.columnDef.maxSize,width:y.column.columnDef.size||"auto",...to(y.column)},children:ue("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[U("div",{className:"min-w-0 shrink grow truncate",children:Jr(y.column.columnDef.cell,y.getContext())}),l==null?void 0:l(y)]})},y.id))},D.id))})]}),k]}):U("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:o||a||`No ${(N==null?void 0:N(!0))||"items"} found.`}),v&&!o&&!!(t!=null&&t.length)&&!!R&&ue("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:[ue("div",{children:[U("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",ue("span",{className:"font-medium",children:[(v.pageIndex-1)*v.pageSize+1,"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,h.getRowCount())]})," ","of"," ",U("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(N==null?void 0:N(h.getRowCount()!==1))||"items"]}),ue("div",{className:"flex items-center gap-2",children:[U(se,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:v.pageIndex===1}),U(se,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:v.pageIndex===h.getPageCount()})]})]}),U(md,{children:r&&U(pd.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 flex h-[50vh] items-center justify-center rounded-xl",children:U(Ce,{})})})]})}var eo=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},to=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 vd,motion as bn}from"framer-motion";import{useId as bd}from"react";import{jsx as mr,jsxs as xd}from"react/jsx-runtime";function H4({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let s=bd();return mr(vd,{id:s,children:mr(bn.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=>xd("button",{type:"button","data-selected":u.value===t,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{"hover:text-content-subtle z-[11] transition-colors":u.value!==t},a),onClick:()=>r(u.value),children:[typeof u.label=="string"?mr("p",{children:u.label}):u.label,u.badge,u.value===t&&mr(bn.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",l),transition:{duration:.25}})]},u.value))})})}import{useEffect as yd,useId as wd,useRef as Cd,useState as Nd}from"react";import{jsx as me,jsxs as ro}from"react/jsx-runtime";var kd=[{key:"utm_source",icon:ra,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:fa,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:ea,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:da,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:ma,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:ta,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function $4({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=q(),s=wd(),[u,d]=Nd(!1),n=Cd(null);return yd(()=>{n.current&&!c&&o&&setTimeout(()=>{var p;return(p=n.current)==null?void 0:p.focus()},10)},[]),me("div",{className:i("grid gap-y-3",l),children:kd.map(({key:p,icon:f,label:g,placeholder:b,description:h},v)=>me("div",{className:"group relative",children:ro("div",{className:"relative z-10 flex",children:[me(J,{content:ro("div",{className:"p-3 text-center text-xs",children:[me("p",{className:"text-neutral-600",children:h}),me("span",{className:"font-mono text-neutral-400",children:p})]}),sideOffset:4,disableHoverableContent:!0,children:ro("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:()=>d(N=>!N),children:[me(f,{className:"size-4 shrink-0"}),me("label",{htmlFor:`${s}-${p}`,className:"select-none text-sm",children:u?me("span",{className:"font-mono text-xs",children:p}):g})]})}),me("div",{className:"min-w-0 grow",children:me(va,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:me("input",{type:"text",id:`${s}-${p}`,ref:v===0?n:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[p]||"",onChange:N=>t(p,N.target.value)})})})]})},p))})}import{jsx as oo,jsxs as Pd}from"react/jsx-runtime";function j4(){return Pd("div",{style:pr.backgroundMain,children:[oo("div",{style:pr.backgroundMainBefore}),oo("div",{style:pr.backgroundMainAfter}),oo("div",{style:pr.backgroundContent})]})}var pr={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
43
43
  radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
44
44
  radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
45
45
  radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
46
46
  radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
47
47
  radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
48
- radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import Qd from"next/image";import Be from"next/link";import{useParams as eu}from"next/navigation";import{useEffect as tu,useState as Bn}from"react";import ru from"swr";import{jsx as pn}from"react/jsx-runtime";function fn(e){return pn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:pn("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 gn}from"react/jsx-runtime";function Pt({className:e}){return gn("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:gn("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=[{title:"Dub Links",description:"Short links with superpowers",icon:na,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:sa,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Bt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:_t,href:"/docs/integrations"}],hn=[{icon:Eo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Lo,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:fn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],vn=[{icon:Oo,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/solutions/typescript"},{icon:Io,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/solutions/python"},{icon:Ao,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/solutions/go"},{icon:zo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/solutions/ruby"},{icon:Do,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/solutions/php"}],bn=[{icon:Vo,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:ra,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:aa,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],gr=[{icon:Pt,title:"About",description:"Company and team",href:"/about"},{icon:Xo,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:_o,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:oa,title:"Customers",description:"Success stories and use cases",href:"/customers"}],hr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],xn=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],yn=[{name:"X (Twitter)",icon:Ht,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:Ot,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:zt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Vt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as xd}from"react/jsx-runtime";function vr({className:e,children:t}){return xd("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as _e from"@radix-ui/react-popover";import{BoxSelect as Fd,Home as Ud,LayoutGrid as Gd,Type as $d}from"lucide-react";import{useParams as Kd}from"next/navigation";import{useCallback as jd,useContext as Yd,useState as Zd}from"react";import{toast as qd}from"sonner";import*as de from"@radix-ui/react-navigation-menu";import{LayoutGroup as Sd}from"framer-motion";import St from"next/link";import{useParams as Md,usePathname as Rd}from"next/navigation";import{createContext as Td,useId as Ld}from"react";import Ed from"swr";import{Link as wn}from"@radix-ui/react-navigation-menu";import Cn from"next/link";import{jsx as ye,jsxs as br}from"react/jsx-runtime";var qe="text-xs uppercase text-neutral-500 dark:text-white/60",yd="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",ae=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Oe({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:l,...c}){return ye(wn,{asChild:!0,children:ye(Cn,{className:i(yd,a),...c,children:br("div",{className:"flex items-center justify-between gap-3",children:[e,br("div",{className:"flex-1",children:[ye("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&ye("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),l&&ye(ko,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function xr({icon:e,title:t,description:r,iconClassName:o,...a}){return ye(wn,{asChild:!0,children:ye(Cn,{...a,className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:br("div",{className:"flex items-center justify-between px-5 py-4",children:[br("div",{children:[ye("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),ye("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),ye(e,{className:i("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as Xe,jsxs as Nn}from"react/jsx-runtime";function kn({domain:e}){return Nn("div",{className:"grid w-[540px] grid-cols-[minmax(0,1fr),minmax(0,0.75fr)] divide-x divide-neutral-200",children:[Xe("div",{className:"flex flex-col gap-4 p-4",children:gr.map(({title:t,description:r,icon:o,href:a})=>Xe(xr,{title:t,description:r,icon:o,iconClassName:"size-5",href:O(a,e,ae({domain:e,utm_content:t}))},t))}),Nn("div",{className:"px-6 py-4",children:[Xe("p",{className:i(qe,"mb-2"),children:"Social"}),Xe("div",{className:"grid grid-cols-1",children:yn.map(({icon:t,name:r,href:o})=>Xe(Oe,{href:o,target:"_blank",className:"-mx-2",icon:Xe("div",{className:"shrink-0 rounded-lg border border-neutral-200 bg-white/50 p-1.5 dark:border-white/20 dark:bg-white/10",children:Xe(t,{className:"size-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60"})}),title:r},o))})]})]})}import{Link as Mn}from"@radix-ui/react-navigation-menu";import Rn from"next/link";import{jsx as P,jsxs as ao}from"react/jsx-runtime";function Pn(e){return ao("svg",{xmlns:"http://www.w3.org/2000/svg",width:"349",height:"290",fill:"none",viewBox:"0 0 349 290",...e,className:i("pointer-events-none [--bg:white] [--grid:#e5e5e5] dark:[--bg:black] dark:[--grid:#fff2]",e.className),children:[ao("g",{className:"text-[var(--grid)]",children:[P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M12.667 1h48v48h-48zM60.667 1h48v48h-48zM108.667 1h48v48h-48zM156.667 1h48v48h-48zM204.667 1h48v48h-48zM252.667 1h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 1h48v48h-48zM12.667 49h48v48h-48zM60.667 49h48v48h-48zM108.667 49h48v48h-48zM156.667 49h48v48h-48zM204.667 49h48v48h-48zM252.667 49h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 49h48v48h-48zM12.667 97h48v48h-48zM60.667 97h48v48h-48zM108.667 97h48v48h-48zM156.667 97h48v48h-48zM204.667 97h48v48h-48zM252.667 97h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 97h48v48h-48zM12.667 145h48v48h-48zM60.667 145h48v48h-48zM108.667 145h48v48h-48zM156.667 145h48v48h-48zM204.667 145h48v48h-48zM252.667 145h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 145h48v48h-48zM12.667 193h48v48h-48zM60.667 193h48v48h-48zM108.667 193h48v48h-48zM156.667 193h48v48h-48zM204.667 193h48v48h-48zM252.667 193h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 193h48v48h-48zM12.667 241h48v48h-48zM60.667 241h48v48h-48zM108.667 241h48v48h-48zM156.667 241h48v48h-48zM204.667 241h48v48h-48zM252.667 241h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 241h48v48h-48z"})]}),P("path",{stroke:"#14B8A6",d:"M.667 196.5c93-1 267-35.5 324.5-184.5"}),P("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M204.667 145h96v48h-96z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M204.667 145h96v48h-96z"}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"158.909",children:"Clicks"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"158.909",children:"12.5K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"171.909",children:"Leads"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"171.909",children:"8.2K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"184.909",children:"Sales"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"184.909",children:"$10K"})}),P("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M108.667 193h96v48h-96z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M108.667 193h96v48h-96z"}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"206.909",children:"Desktop"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"206.909",children:"2.5K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"219.909",children:"Mobile"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"219.909",children:"1.3K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"232.909",children:"Tablet"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"232.909",children:"402"})}),P("g",{filter:"url(#a)",children:P("circle",{cx:"204.667",cy:"145",r:"3",fill:"#14B8A6"})}),P("circle",{cx:"204.667",cy:"145",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"}),P("defs",{children:ao("filter",{id:"a",width:"10",height:"12",x:"199.667",y:"140",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[P("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),P("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),P("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),P("feOffset",{dy:"2"}),P("feGaussianBlur",{stdDeviation:"1"}),P("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),P("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0"}),P("feBlend",{in2:"shape",result:"effect1_innerShadow_9_286"})]})})]})}import{useId as wd}from"react";import{jsx as m,jsxs as B}from"react/jsx-runtime";function Sn(e){let t=wd();return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"336",height:"336",fill:"none",viewBox:"0 0 336 336",...e,className:i("pointer-events-none text-[var(--fg)] [--bg:white] [--fg:#222] [--grid:#e5e5e5] dark:[--bg:black] dark:[--fg:#fffa] dark:[--grid:#fff2]",e.className),children:[B("g",{clipPath:`url(#${t}-a)`,children:[m("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M0 0h48v48H0zM48 0h48v48H48zM96 0h48v48H96zM144 0h48v48h-48zM192 0h48v48h-48zM240 0h48v48h-48zM288 0h48v48h-48zM0 48h48v48H0zM48 48h48v48H48zM96 48h48v48H96zM144 48h48v48h-48zM192 48h48v48h-48zM240 48h48v48h-48zM288 48h48v48h-48zM0 96h48v48H0zM48 96h48v48H48zM96 96h48v48H96zM144 96h48v48h-48zM192 96h48v48h-48zM240 96h48v48h-48zM288 96h48v48h-48zM0 144h48v48H0zM48 144h48v48H48zM96 144h48v48H96zM144 144h48v48h-48zM192 144h48v48h-48zM240 144h48v48h-48zM288 144h48v48h-48zM0 192h48v48H0zM48 192h48v48H48zM96 192h48v48H96zM144 192h48v48h-48zM192 192h48v48h-48zM240 192h48v48h-48zM288 192h48v48h-48zM0 240h48v48H0zM48 240h48v48H48zM96 240h48v48H96zM144 240h48v48h-48zM192 240h48v48h-48zM240 240h48v48h-48zM288 240h48v48h-48zM0 288h48v48H0zM48 288h48v48H48zM96 288h48v48H96zM144 288h48v48h-48zM192 288h48v48h-48zM240 288h48v48h-48zM288 288h48v48h-48z"}),m("circle",{cx:"192",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"192",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-b)`,d:"M192 144v-35"}),m("circle",{cx:"192",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"192",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-c)`,d:"M192 228v-35"}),m("circle",{cx:"144",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"144",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-d)`,d:"M144 144v-35"}),m("circle",{cx:"144",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"144",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-e)`,d:"M144 228v-35"}),m("circle",{cx:"96",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"96",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-f)`,d:"M96 144v-35"}),m("circle",{cx:"96",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"96",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-g)`,d:"M96 228v-35"}),m("circle",{cx:"240",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"240",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-h)`,d:"M240 144v-35"}),m("circle",{cx:"240",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"240",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-i)`,d:"M240 228v-35"}),m("circle",{cx:"48",cy:"168",r:"4",fill:"#EAB308",opacity:"0.1"}),m("circle",{cx:"48",cy:"168",r:"2",fill:"#EAB308"}),m("path",{stroke:`url(#${t}-j)`,d:"M13 168h34"}),m("circle",{cx:"4",cy:"4",r:"4",fill:"#EAB308",opacity:"0.1",transform:"matrix(-1 0 0 1 292 164)"}),m("circle",{cx:"2",cy:"2",r:"2",fill:"#EAB308",transform:"matrix(-1 0 0 1 290 166)"}),m("path",{stroke:`url(#${t}-k)`,d:"M323 168h-34"}),B("g",{children:[m("rect",{width:"24",height:"24",x:"228",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"228.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 92.222V96l2.889 2"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 89.555a6.444 6.444 0 0 1 0 12.889"}),m("path",{fill:"currentColor",fillOpacity:"0.5",d:"M235.276 100.891a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.389 96.333a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M235.276 91.776a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.367 102.288a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 98.8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 93.868a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.368 90.38a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"228",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"228.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M238.889 243.778h-3.556a1.777 1.777 0 0 1-1.777-1.778v-4c0-.982.795-1.778 1.777-1.778h9.334c.982 0 1.777.796 1.777 1.778v.222"}),m("path",{fill:"currentColor",fillOpacity:"0.5",d:"M236.889 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778M240 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778"}),m("path",{fill:"currentColor",fillOpacity:"0.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M246 242.889h-3.556a.89.89 0 0 0-.888.889v1.777c0 .491.398.889.888.889H246a.89.89 0 0 0 .889-.889v-1.777a.89.89 0 0 0-.889-.889"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M242.889 242.889v-1.778a1.333 1.333 0 0 1 2.667 0v1.778"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"180",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"180.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M188.667 90h-2a.666.666 0 0 0-.667.667v2c0 .368.298.666.667.666h2a.666.666 0 0 0 .666-.666v-2a.666.666 0 0 0-.666-.667M197.333 90h-2a.666.666 0 0 0-.666.667v2c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2a.667.667 0 0 0-.667-.667M188.667 98.667h-2a.666.666 0 0 0-.667.666v2c0 .368.298.667.667.667h2a.667.667 0 0 0 .666-.667v-2a.666.666 0 0 0-.666-.666M198 98.667h-2a1.333 1.333 0 0 0-1.333 1.333v2M198 102v.01M192 92.667v2A1.334 1.334 0 0 1 190.667 96h-2M186 96h.01M192 90h.01M192 98.667v.01M194.667 96h.666M198 96v.01M192 102v-.667"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"180",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"180.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 246.445a6.445 6.445 0 1 0-.002-12.89 6.445 6.445 0 0 0 .002 12.89M192 238.222v-2M193.778 240h2M192 241.778v2M190.222 240h-2"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"132",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"132.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M148.667 90h-9.334c-.736 0-1.333.597-1.333 1.333v9.334c0 .736.597 1.333 1.333 1.333h9.334c.736 0 1.333-.597 1.333-1.333v-9.334c0-.736-.597-1.333-1.333-1.333"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M142 95.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666M150 98l-2.057-2.057a1.334 1.334 0 0 0-1.886 0L140 102"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"132",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"132.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.889 234h4.375c.471 0 .924.188 1.257.521l5.111 5.111c.694.694.694 1.82 0 2.514l-3.486 3.486a1.78 1.78 0 0 1-2.514 0l-5.111-5.111a1.78 1.78 0 0 1-.521-1.257v-4.375c0-.491.398-.889.889-.889"}),m("path",{fill:"currentColor",fillOpacity:"0.5",d:"M141.556 238.667a1.112 1.112 0 1 0-.002-2.224 1.112 1.112 0 0 0 .002 2.224"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"84",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"84.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m96.889 93.778 2 2-2 2"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M98.889 95.778h-3.111c-.982 0-1.778.795-1.778 1.778V98"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m97.258 101.854 4.596-4.597a1.777 1.777 0 0 0 0-2.514l-4.596-4.597a1.78 1.78 0 0 0-2.514 0l-4.597 4.597a1.78 1.78 0 0 0 0 2.514l4.597 4.597c.694.694 1.82.694 2.514 0"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"84",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"84.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M92.667 246.444a2.222 2.222 0 1 0 .001-4.443 2.222 2.222 0 0 0-.001 4.443M99.333 246.444a2.222 2.222 0 1 0 .002-4.443 2.222 2.222 0 0 0-.002 4.443M98.563 233.556h-5.126a.89.89 0 0 0-.88.763l-.335 2.348-2.666 2.666h12.888l-2.666-2.666-.335-2.348a.89.89 0 0 0-.88-.763M92.222 236.667h7.556"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M94.738 243.415a1.775 1.775 0 0 1 2.524 0"})]}),m("g",{filter:`url(#${t}-t)`,opacity:"0.16",children:m("ellipse",{cx:"62",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),m("g",{filter:`url(#${t}-u)`,opacity:"0.16",children:m("ellipse",{cx:"276",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),m("rect",{width:"240",height:"48",x:"48",y:"144",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"240",height:"48",x:"48",y:"144",stroke:"currentColor",className:"text-[var(--grid)]",strokeOpacity:"0.5",strokeWidth:"0.5",rx:"8"}),B("g",{children:[m("rect",{width:"24",height:"24",x:"61",y:"156",fill:`url(#${t}-w)`,rx:"12"}),m("rect",{width:"25",height:"25",x:"60.5",y:"155.5",stroke:"#030712",strokeOpacity:"0.1",rx:"12.5"}),m("circle",{cx:"73",cy:"168",r:"6",fill:`url(#${t}-x)`})]}),m("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"12",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:m("tspan",{x:"97",y:"165.364",children:"d.to/try"})}),m("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"M104.931 176.792h-4.084a.78.78 0 0 1-.778-.778v-1.556"}),m("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"m103.278 175.139 1.653 1.653-1.653 1.653"}),m("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"9",letterSpacing:"-.02em",style:{whiteSpace:"pre"},children:m("tspan",{x:"110",y:"179.773",children:"app.dub.co/register"})}),m("path",{className:"text-[var(--fg)]",fill:"currentColor",fillOpacity:"0.04",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),m("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),m("g",{stroke:"currentColor",strokeOpacity:"0.7",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${t}-y)`,children:m("path",{d:"m240.395 167.185 4.876 1.673c.148.051.15.259.004.313l-2.186.822a.17.17 0 0 0-.097.098l-.822 2.186a.166.166 0 0 1-.313-.005l-1.674-4.876a.167.167 0 0 1 .212-.212zM243.019 170.021l2.808 2.808M240.165 163.167v1.333M242.995 164.338l-.943.943M237.338 169.995l.943-.943M236.166 167.166h1.333M237.338 164.338l.943.943"})}),m("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"10",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:m("tspan",{x:"251",y:"171.636",children:"51K"})})]}),B("defs",{children:[B("linearGradient",{id:`${t}-b`,x1:"192.5",x2:"192.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-c`,x1:"192.5",x2:"192.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-d`,x1:"144.5",x2:"144.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-e`,x1:"144.5",x2:"144.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-f`,x1:"96.5",x2:"96.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-g`,x1:"96.5",x2:"96.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-h`,x1:"240.5",x2:"240.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-i`,x1:"240.5",x2:"240.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-j`,x1:"13",x2:"47",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EAB308",stopOpacity:"0"}),m("stop",{offset:"1",stopColor:"#EAB308"})]}),B("linearGradient",{id:`${t}-k`,x1:"323",x2:"289",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EAB308",stopOpacity:"0"}),m("stop",{offset:"1",stopColor:"#EAB308"})]}),B("linearGradient",{id:`${t}-w`,x1:"73",x2:"73",y1:"156",y2:"180",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#030712",stopOpacity:"0"}),m("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),B("filter",{id:`${t}-t`,width:"96",height:"46",x:"14",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[m("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),m("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),m("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),B("filter",{id:`${t}-u`,width:"96",height:"46",x:"228",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[m("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),m("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),m("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),m("clipPath",{id:`${t}-a`,children:m("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M0 0h336v336H0z"})}),m("clipPath",{id:`${t}-y`,children:m("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M235 162h12v12h-12z"})}),m("pattern",{id:`${t}-x`,width:"1",height:"1",patternContentUnits:"objectBoundingBox",children:m("use",{xlinkHref:`#${t}-z`,transform:"scale(.01563)"})}),m("image",{href:`${It}dub.co`,id:`${t}-z`,width:"64",height:"64"})]})]})}import{jsx as G,jsxs as Re}from"react/jsx-runtime";var Cd=[{title:"Dub API",description:"Programmatic link creation at scale",icon:Bt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:_t,href:"/docs/integrations"}];function Tn({domain:e}){return Re("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200",children:[Re("div",{className:"grid grid-cols-2 gap-4 p-4",children:[G(Mn,{asChild:!0,children:Re(Rn,{href:O("/home",e,ae({domain:e,utm_content:"Dub Links"})),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:[Re("div",{className:"p-5 pb-0",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),G("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:"Short links with superpowers for the modern marketer"})]}),G("div",{className:"relative grow overflow-hidden",children:G(Sn,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),G("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#f4950c,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"})]})}),Re("div",{className:"flex flex-col gap-4",children:[G(Mn,{asChild:!0,children:Re(Rn,{href:O("/analytics",e,ae({domain:e,utm_content:"Dub Analytics"})),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:[G(Pn,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),G("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#36D78F,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"}),Re("div",{className:"h-56 p-5",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),G("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]})}),G("div",{className:"grid grow grid-rows-2 gap-4",children:Cd.map(({title:t,description:r,icon:o,href:a})=>G(xr,{title:t,description:r,icon:o,href:O(a,e,ae({domain:e,utm_content:t}))},t))})]})]}),Re("div",{className:"px-6 py-4",children:[G("p",{className:i(qe,"mb-2"),children:"Customer Stories"}),Re("div",{className:"grid grid-cols-1",children:[hn.map(({icon:t,iconClassName:r,title:o,description:a,href:l})=>G(Oe,{className:"-mx-2",href:O(l,e,ae({domain:e,utm_content:o})),icon:G("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:G(t,{className:i("h-4 w-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},l)),G(Oe,{className:"-mx-2",href:O("/customers",e,ae({domain:e,utm_content:"Customer Stories"})),title:"View all stories",showArrow:!0})]}),G("p",{className:i(qe,"mb-2 mt-5"),children:"Compare"}),G("div",{className:"flex flex-col",children:hr.map(({name:t,slug:r})=>G(Oe,{className:"-mx-2",href:O(`/compare/${r}`,e,ae({domain:e,utm_content:`Dub vs. ${t}`})),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import{Link as En}from"@radix-ui/react-navigation-menu";import kd from"next/image";import An from"next/link";import{useId as Nd}from"react";import{jsx as x,jsxs as ct}from"react/jsx-runtime";function Ln({className:e,...t}){let r=Nd();return ct("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:i("",e),...t,children:[x("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),ct("g",{opacity:"0.5",children:[x("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:x("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),x("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:x("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),x("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:x("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),x("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),x("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),ct("defs",{children:[ct("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#fff",stopOpacity:"0"}),x("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),ct("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#5B5B5B"}),x("stop",{offset:"1",stopColor:"#757575"})]}),ct("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[x("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),x("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),x("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),x("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),x("feOffset",{dx:"-0.991",dy:"0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),x("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),x("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),x("feOffset",{dx:"0.991",dy:"-0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),x("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),x("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as K,jsxs as He}from"react/jsx-runtime";var Pd=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function Dn({domain:e}){return He("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200",children:[K("div",{className:"grid grid-cols-2 gap-4 p-4",children:Pd.map(({title:t,description:r,thumbnail:o,href:a})=>K(En,{asChild:!0,children:He(An,{href:O(a,e,ae({domain:e,utm_content:t})),className:i("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[He("div",{className:"p-5 pb-0",children:[K("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),K("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),K("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:K("div",{className:i("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:K(kd,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)}))}),He("div",{className:"flex flex-col gap-2 px-6 py-4",children:[He("div",{children:[K("p",{className:i(qe,"mb-2"),children:"SDKs"}),K("div",{className:"flex flex-col gap-0.5",children:vn.map(({icon:t,iconClassName:r,title:o,href:a})=>K(Oe,{className:"-mx-2",href:O(a,e,ae({domain:e,utm_content:o})),icon:K("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:K(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]}),K("div",{className:"-mx-2 flex grow flex-col justify-end",children:K(En,{asChild:!0,children:He(An,{href:O("/brand",e,ae({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[He("div",{className:"pointer-events-none absolute inset-0",children:[K("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:K("div",{className:i("absolute inset-0 rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),K(Ln,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),K("div",{className:"relative flex items-center justify-between px-5 py-4",children:He("div",{children:[K("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),K("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})})]})]})}import{Fragment as Id,jsx as W,jsxs as dt}from"react/jsx-runtime";var no=Td({theme:"light"}),io=[{name:"Product",content:Tn,childItems:fr,segments:["/home","/analytics","/features","/compare"]},{name:"Resources",content:Dn,childItems:bn,segments:["/solutions","/docs","/help","/brand"]},{name:"Company",content:kn,childItems:gr,segments:["about","/blog","/changelog","/customers"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],In=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 Qx({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Md();t&&(o=t);let a=Ld(),l=Ta(40),c=Rd(),{data:s,isLoading:u}=Ed(o.endsWith("dub.co")&&"/api/auth/session",pe,{dedupingInterval:6e4});return W(no.Provider,{value:{theme:e},children:W(Sd,{id:a,children:dt("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",l&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),W(vr,{className:i("relative",r),children:dt("div",{className:"flex h-14 items-center justify-between",children:[W("div",{className:"grow basis-0",children:W(St,{className:"block w-fit py-2 pr-2",href:O("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:W(yr,{})})}),dt(de.Root,{delayDuration:0,className:"relative hidden lg:block",children:[W(de.List,{className:"group relative z-0 flex",children:io.map(({name:d,href:n,segments:p,content:f})=>{let g=p.some(b=>c==null?void 0:c.startsWith(b));return dt(de.Item,{children:[W(Dd,{trigger:!!f,children:n!==void 0?W(St,{id:`nav-${n}`,href:O(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:In,"data-active":g,children:d}):dt("button",{className:In,"data-active":g,children:[d,W(Ad,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),f&&W(de.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(f,{domain:o})})]},d)})}),W("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:W(de.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(St,{href:we,className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):u?null:dt(Id,{children:[W(St,{href:"https://app.dub.co/login",className:i(ie({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),W(St,{href:"https://app.dub.co/register",className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function Ad(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 Dd({trigger:e,children:t}){return e?W(de.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as zd,Menu as Od,X as Hd}from"lucide-react";import ut from"next/link";import{useParams as zn}from"next/navigation";import{useEffect as Vd,useState as On}from"react";import _d from"swr";import{Fragment as Wd,jsx as V,jsxs as Ve}from"react/jsx-runtime";function p8({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=zn();t&&(r=t);let[o,a]=On(!1);Vd(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l}=_d(r.endsWith("dub.co")&&"/api/auth/session",pe,{dedupingInterval:6e4});return Ve("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[l&&Object.keys(l).length>0?V(so,{href:we,className:"max-[280px]:hidden",children:"Dashboard"}):Ve("div",{className:"flex gap-2 max-[280px]:hidden",children:[V(so,{variant:"secondary",href:`${we}/login`,children:"Log in"}),V(so,{href:`${we}/register`,children:"Sign Up"})]}),V("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?V(Hd,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):V(Od,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),V("nav",{className:i("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:Ve("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[io.map(({name:c,href:s,childItems:u},d)=>V(Bd,{name:c,href:s,childItems:u,setOpen:a},d)),l&&Object.keys(l).length>0?V("li",{className:"py-3 min-[281px]:hidden",children:V(ut,{href:we,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ve(Wd,{children:[V("li",{className:"py-3 min-[281px]:hidden",children:V(ut,{href:`${we}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),V("li",{className:"py-3 min-[281px]:hidden",children:V(ut,{href:`${we}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Bd=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=zn(),[l,c]=On(!1);return r?V("li",{className:"py-3",children:Ve(ke,{height:!0,children:[Ve("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[V("p",{className:"font-semibold",children:e}),V(zd,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&V("div",{className:"grid gap-4 overflow-hidden py-4",children:r.map(({title:s,href:u,icon:d,description:n})=>Ve(ut,{href:O(u,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:s}),onClick:()=>o(!1),className:"flex w-full gap-3",children:[V("div",{className:"flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",children:V(d,{className:"size-5 text-neutral-700"})}),Ve("div",{children:[V("div",{className:"flex items-center gap-2",children:V("h2",{className:"text-sm font-medium text-neutral-900",children:s})}),V("p",{className:"text-sm text-neutral-500",children:n})]})]},u))})]})}):t?V("li",{className:"py-3",children:V(ut,{href:O(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};function so({variant:e,className:t,...r}){return V(ut,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ie({variant:e}),t)})}import{jsx as Hn}from"react/jsx-runtime";function Vn({className:e}){return Hn("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:Hn("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 X,jsxs as _n}from"react/jsx-runtime";var Xd=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
48
+ radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import iu from"next/image";import Be from"next/link";import{useParams as su}from"next/navigation";import{useEffect as lu,useState as Kn}from"react";import cu from"swr";import{jsx as xn}from"react/jsx-runtime";function yn(e){return xn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:xn("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 wn}from"react/jsx-runtime";function Pt({className:e}){return wn("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:wn("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=[{title:"Dub Links",description:"Short links with superpowers",icon:sa,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:ua,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Bt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:_t,href:"/docs/integrations"}],Cn=[{icon:Ao,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Eo,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:yn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],Nn=[{icon:Ho,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/solutions/typescript"},{icon:zo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/solutions/python"},{icon:Do,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/solutions/go"},{icon:Oo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/solutions/ruby"},{icon:Io,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/solutions/php"}],kn=[{icon:_o,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:aa,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:ia,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],gr=[{icon:Pt,title:"About",description:"Company and team",href:"/about"},{icon:Qo,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:Bo,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:na,title:"Customers",description:"Success stories and use cases",href:"/customers"}],hr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Pn=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],Sn=[{name:"X (Twitter)",icon:Ht,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:Ot,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:zt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Vt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Sd}from"react/jsx-runtime";function vr({className:e,children:t}){return Sd("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as _e from"@radix-ui/react-popover";import{BoxSelect as Zd,Home as qd,LayoutGrid as Xd,Type as Jd}from"lucide-react";import{useParams as Qd}from"next/navigation";import{useCallback as eu,useContext as tu,useState as ru}from"react";import{toast as ou}from"sonner";import*as de from"@radix-ui/react-navigation-menu";import{LayoutGroup as Dd}from"framer-motion";import St from"next/link";import{useParams as Id,usePathname as zd}from"next/navigation";import{createContext as Od,useId as Hd}from"react";import Vd from"swr";import{Link as Mn}from"@radix-ui/react-navigation-menu";import Rn from"next/link";import{jsx as ye,jsxs as br}from"react/jsx-runtime";var qe="text-xs uppercase text-neutral-500 dark:text-white/60",Md="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",ae=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Oe({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:l,...c}){return ye(Mn,{asChild:!0,children:ye(Rn,{className:i(Md,a),...c,children:br("div",{className:"flex items-center justify-between gap-3",children:[e,br("div",{className:"flex-1",children:[ye("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&ye("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),l&&ye(Po,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function xr({icon:e,title:t,description:r,iconClassName:o,...a}){return ye(Mn,{asChild:!0,children:ye(Rn,{...a,className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:br("div",{className:"flex items-center justify-between px-5 py-4",children:[br("div",{children:[ye("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),ye("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),ye(e,{className:i("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as Xe,jsxs as Tn}from"react/jsx-runtime";function Ln({domain:e}){return Tn("div",{className:"grid w-[540px] grid-cols-[minmax(0,1fr),minmax(0,0.75fr)] divide-x divide-neutral-200",children:[Xe("div",{className:"flex flex-col gap-4 p-4",children:gr.map(({title:t,description:r,icon:o,href:a})=>Xe(xr,{title:t,description:r,icon:o,iconClassName:"size-5",href:O(a,e,ae({domain:e,utm_content:t}))},t))}),Tn("div",{className:"px-6 py-4",children:[Xe("p",{className:i(qe,"mb-2"),children:"Social"}),Xe("div",{className:"grid grid-cols-1",children:Sn.map(({icon:t,name:r,href:o})=>Xe(Oe,{href:o,target:"_blank",className:"-mx-2",icon:Xe("div",{className:"shrink-0 rounded-lg border border-neutral-200 bg-white/50 p-1.5 dark:border-white/20 dark:bg-white/10",children:Xe(t,{className:"size-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60"})}),title:r},o))})]})]})}import{Link as Dn}from"@radix-ui/react-navigation-menu";import In from"next/link";import{jsx as P,jsxs as ao}from"react/jsx-runtime";function En(e){return ao("svg",{xmlns:"http://www.w3.org/2000/svg",width:"349",height:"290",fill:"none",viewBox:"0 0 349 290",...e,className:i("pointer-events-none [--bg:white] [--grid:#e5e5e5] dark:[--bg:black] dark:[--grid:#fff2]",e.className),children:[ao("g",{className:"text-[var(--grid)]",children:[P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M12.667 1h48v48h-48zM60.667 1h48v48h-48zM108.667 1h48v48h-48zM156.667 1h48v48h-48zM204.667 1h48v48h-48zM252.667 1h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 1h48v48h-48zM12.667 49h48v48h-48zM60.667 49h48v48h-48zM108.667 49h48v48h-48zM156.667 49h48v48h-48zM204.667 49h48v48h-48zM252.667 49h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 49h48v48h-48zM12.667 97h48v48h-48zM60.667 97h48v48h-48zM108.667 97h48v48h-48zM156.667 97h48v48h-48zM204.667 97h48v48h-48zM252.667 97h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 97h48v48h-48zM12.667 145h48v48h-48zM60.667 145h48v48h-48zM108.667 145h48v48h-48zM156.667 145h48v48h-48zM204.667 145h48v48h-48zM252.667 145h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 145h48v48h-48zM12.667 193h48v48h-48zM60.667 193h48v48h-48zM108.667 193h48v48h-48zM156.667 193h48v48h-48zM204.667 193h48v48h-48zM252.667 193h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 193h48v48h-48zM12.667 241h48v48h-48zM60.667 241h48v48h-48zM108.667 241h48v48h-48zM156.667 241h48v48h-48zM204.667 241h48v48h-48zM252.667 241h48v48h-48z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",d:"M300.667 241h48v48h-48z"})]}),P("path",{stroke:"#14B8A6",d:"M.667 196.5c93-1 267-35.5 324.5-184.5"}),P("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M204.667 145h96v48h-96z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M204.667 145h96v48h-96z"}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"158.909",children:"Clicks"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"158.909",children:"12.5K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"171.909",children:"Leads"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"171.909",children:"8.2K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"213.667",y:"184.909",children:"Sales"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"244.667",y:"184.909",children:"$10K"})}),P("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M108.667 193h96v48h-96z"}),P("path",{stroke:"currentColor",strokeWidth:"0.5",className:"text-[var(--grid)]",d:"M108.667 193h96v48h-96z"}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"206.909",children:"Desktop"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"206.909",children:"2.5K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"219.909",children:"Mobile"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"219.909",children:"1.3K"})}),P("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"117.667",y:"232.909",children:"Tablet"})}),P("text",{xmlSpace:"preserve",fill:"#525252",fontSize:"8",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:P("tspan",{x:"157.667",y:"232.909",children:"402"})}),P("g",{filter:"url(#a)",children:P("circle",{cx:"204.667",cy:"145",r:"3",fill:"#14B8A6"})}),P("circle",{cx:"204.667",cy:"145",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"}),P("defs",{children:ao("filter",{id:"a",width:"10",height:"12",x:"199.667",y:"140",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[P("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),P("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),P("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),P("feOffset",{dy:"2"}),P("feGaussianBlur",{stdDeviation:"1"}),P("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),P("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.65 0"}),P("feBlend",{in2:"shape",result:"effect1_innerShadow_9_286"})]})})]})}import{useId as Rd}from"react";import{jsx as m,jsxs as B}from"react/jsx-runtime";function An(e){let t=Rd();return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"336",height:"336",fill:"none",viewBox:"0 0 336 336",...e,className:i("pointer-events-none text-[var(--fg)] [--bg:white] [--fg:#222] [--grid:#e5e5e5] dark:[--bg:black] dark:[--fg:#fffa] dark:[--grid:#fff2]",e.className),children:[B("g",{clipPath:`url(#${t}-a)`,children:[m("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M0 0h48v48H0zM48 0h48v48H48zM96 0h48v48H96zM144 0h48v48h-48zM192 0h48v48h-48zM240 0h48v48h-48zM288 0h48v48h-48zM0 48h48v48H0zM48 48h48v48H48zM96 48h48v48H96zM144 48h48v48h-48zM192 48h48v48h-48zM240 48h48v48h-48zM288 48h48v48h-48zM0 96h48v48H0zM48 96h48v48H48zM96 96h48v48H96zM144 96h48v48h-48zM192 96h48v48h-48zM240 96h48v48h-48zM288 96h48v48h-48zM0 144h48v48H0zM48 144h48v48H48zM96 144h48v48H96zM144 144h48v48h-48zM192 144h48v48h-48zM240 144h48v48h-48zM288 144h48v48h-48zM0 192h48v48H0zM48 192h48v48H48zM96 192h48v48H96zM144 192h48v48h-48zM192 192h48v48h-48zM240 192h48v48h-48zM288 192h48v48h-48zM0 240h48v48H0zM48 240h48v48H48zM96 240h48v48H96zM144 240h48v48h-48zM192 240h48v48h-48zM240 240h48v48h-48zM288 240h48v48h-48zM0 288h48v48H0zM48 288h48v48H48zM96 288h48v48H96zM144 288h48v48h-48zM192 288h48v48h-48zM240 288h48v48h-48zM288 288h48v48h-48z"}),m("circle",{cx:"192",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"192",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-b)`,d:"M192 144v-35"}),m("circle",{cx:"192",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"192",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"192",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-c)`,d:"M192 228v-35"}),m("circle",{cx:"144",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"144",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-d)`,d:"M144 144v-35"}),m("circle",{cx:"144",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"144",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"144",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-e)`,d:"M144 228v-35"}),m("circle",{cx:"96",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"96",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-f)`,d:"M96 144v-35"}),m("circle",{cx:"96",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"96",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"96",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-g)`,d:"M96 228v-35"}),m("circle",{cx:"240",cy:"144",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"108",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"108",r:"2",fill:"#EA580C"}),m("circle",{cx:"240",cy:"144",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-h)`,d:"M240 144v-35"}),m("circle",{cx:"240",cy:"228",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"192",r:"4",fill:"#EA580C",opacity:"0.1"}),m("circle",{cx:"240",cy:"192",r:"2",fill:"#EA580C"}),m("circle",{cx:"240",cy:"228",r:"2",fill:"#EA580C"}),m("path",{stroke:`url(#${t}-i)`,d:"M240 228v-35"}),m("circle",{cx:"48",cy:"168",r:"4",fill:"#EAB308",opacity:"0.1"}),m("circle",{cx:"48",cy:"168",r:"2",fill:"#EAB308"}),m("path",{stroke:`url(#${t}-j)`,d:"M13 168h34"}),m("circle",{cx:"4",cy:"4",r:"4",fill:"#EAB308",opacity:"0.1",transform:"matrix(-1 0 0 1 292 164)"}),m("circle",{cx:"2",cy:"2",r:"2",fill:"#EAB308",transform:"matrix(-1 0 0 1 290 166)"}),m("path",{stroke:`url(#${t}-k)`,d:"M323 168h-34"}),B("g",{children:[m("rect",{width:"24",height:"24",x:"228",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"228.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 92.222V96l2.889 2"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M240 89.555a6.444 6.444 0 0 1 0 12.889"}),m("path",{fill:"currentColor",fillOpacity:"0.5",d:"M235.276 100.891a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.389 96.333a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M235.276 91.776a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.367 102.288a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 98.8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M233.879 93.868a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1M237.368 90.38a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"228",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"228.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M238.889 243.778h-3.556a1.777 1.777 0 0 1-1.777-1.778v-4c0-.982.795-1.778 1.777-1.778h9.334c.982 0 1.777.796 1.777 1.778v.222"}),m("path",{fill:"currentColor",fillOpacity:"0.5",d:"M236.889 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778M240 240.889a.889.889 0 1 0 0-1.778.889.889 0 0 0 0 1.778"}),m("path",{fill:"currentColor",fillOpacity:"0.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M246 242.889h-3.556a.89.89 0 0 0-.888.889v1.777c0 .491.398.889.888.889H246a.89.89 0 0 0 .889-.889v-1.777a.89.89 0 0 0-.889-.889"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M242.889 242.889v-1.778a1.333 1.333 0 0 1 2.667 0v1.778"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"180",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"180.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M188.667 90h-2a.666.666 0 0 0-.667.667v2c0 .368.298.666.667.666h2a.666.666 0 0 0 .666-.666v-2a.666.666 0 0 0-.666-.667M197.333 90h-2a.666.666 0 0 0-.666.667v2c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2a.667.667 0 0 0-.667-.667M188.667 98.667h-2a.666.666 0 0 0-.667.666v2c0 .368.298.667.667.667h2a.667.667 0 0 0 .666-.667v-2a.666.666 0 0 0-.666-.666M198 98.667h-2a1.333 1.333 0 0 0-1.333 1.333v2M198 102v.01M192 92.667v2A1.334 1.334 0 0 1 190.667 96h-2M186 96h.01M192 90h.01M192 98.667v.01M194.667 96h.666M198 96v.01M192 102v-.667"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"180",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"180.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 246.445a6.445 6.445 0 1 0-.002-12.89 6.445 6.445 0 0 0 .002 12.89M192 238.222v-2M193.778 240h2M192 241.778v2M190.222 240h-2"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"132",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"132.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M148.667 90h-9.334c-.736 0-1.333.597-1.333 1.333v9.334c0 .736.597 1.333 1.333 1.333h9.334c.736 0 1.333-.597 1.333-1.333v-9.334c0-.736-.597-1.333-1.333-1.333"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M142 95.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666M150 98l-2.057-2.057a1.334 1.334 0 0 0-1.886 0L140 102"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"132",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"132.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.889 234h4.375c.471 0 .924.188 1.257.521l5.111 5.111c.694.694.694 1.82 0 2.514l-3.486 3.486a1.78 1.78 0 0 1-2.514 0l-5.111-5.111a1.78 1.78 0 0 1-.521-1.257v-4.375c0-.491.398-.889.889-.889"}),m("path",{fill:"currentColor",fillOpacity:"0.5",d:"M141.556 238.667a1.112 1.112 0 1 0-.002-2.224 1.112 1.112 0 0 0 .002 2.224"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"84",y:"84",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"84.5",y:"84.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m96.889 93.778 2 2-2 2"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M98.889 95.778h-3.111c-.982 0-1.778.795-1.778 1.778V98"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m97.258 101.854 4.596-4.597a1.777 1.777 0 0 0 0-2.514l-4.596-4.597a1.78 1.78 0 0 0-2.514 0l-4.597 4.597a1.78 1.78 0 0 0 0 2.514l4.597 4.597c.694.694 1.82.694 2.514 0"})]}),B("g",{children:[m("rect",{width:"24",height:"24",x:"84",y:"228",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"23",height:"23",x:"84.5",y:"228.5",stroke:"currentColor",className:"text-[var(--grid)]",rx:"7.5"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M92.667 246.444a2.222 2.222 0 1 0 .001-4.443 2.222 2.222 0 0 0-.001 4.443M99.333 246.444a2.222 2.222 0 1 0 .002-4.443 2.222 2.222 0 0 0-.002 4.443M98.563 233.556h-5.126a.89.89 0 0 0-.88.763l-.335 2.348-2.666 2.666h12.888l-2.666-2.666-.335-2.348a.89.89 0 0 0-.88-.763M92.222 236.667h7.556"}),m("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M94.738 243.415a1.775 1.775 0 0 1 2.524 0"})]}),m("g",{filter:`url(#${t}-t)`,opacity:"0.16",children:m("ellipse",{cx:"62",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),m("g",{filter:`url(#${t}-u)`,opacity:"0.16",children:m("ellipse",{cx:"276",cy:"168",fill:"#EAB308",rx:"33",ry:"8"})}),m("rect",{width:"240",height:"48",x:"48",y:"144",fill:"currentColor",className:"text-[var(--bg)]",rx:"8"}),m("rect",{width:"240",height:"48",x:"48",y:"144",stroke:"currentColor",className:"text-[var(--grid)]",strokeOpacity:"0.5",strokeWidth:"0.5",rx:"8"}),B("g",{children:[m("rect",{width:"24",height:"24",x:"61",y:"156",fill:`url(#${t}-w)`,rx:"12"}),m("rect",{width:"25",height:"25",x:"60.5",y:"155.5",stroke:"#030712",strokeOpacity:"0.1",rx:"12.5"}),m("circle",{cx:"73",cy:"168",r:"6",fill:`url(#${t}-x)`})]}),m("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"12",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:m("tspan",{x:"97",y:"165.364",children:"d.to/try"})}),m("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"M104.931 176.792h-4.084a.78.78 0 0 1-.778-.778v-1.556"}),m("path",{stroke:"#A3A3A3",strokeLinecap:"round",strokeLinejoin:"round",d:"m103.278 175.139 1.653 1.653-1.653 1.653"}),m("text",{xmlSpace:"preserve",fill:"#A3A3A3",fontSize:"9",letterSpacing:"-.02em",style:{whiteSpace:"pre"},children:m("tspan",{x:"110",y:"179.773",children:"app.dub.co/register"})}),m("path",{className:"text-[var(--fg)]",fill:"currentColor",fillOpacity:"0.04",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),m("path",{className:"text-[var(--grid)]",stroke:"currentColor",strokeWidth:"0.5",d:"M229.25 164.6c0-1.684 0-2.932.081-3.92.08-.985.24-1.69.546-2.29a5.75 5.75 0 0 1 2.513-2.513c.6-.306 1.305-.466 2.29-.546.988-.081 2.236-.081 3.92-.081h26.8c1.684 0 2.932 0 3.92.081.985.08 1.69.24 2.29.546a5.75 5.75 0 0 1 2.513 2.513c.306.6.466 1.305.546 2.29.081.988.081 2.236.081 3.92v6.8c0 1.684 0 2.932-.081 3.92-.08.985-.24 1.69-.546 2.29a5.75 5.75 0 0 1-2.513 2.513c-.6.306-1.305.466-2.29.546-.988.081-2.236.081-3.92.081h-26.8c-1.684 0-2.932 0-3.92-.081-.985-.08-1.69-.24-2.29-.546a5.75 5.75 0 0 1-2.513-2.513c-.306-.6-.466-1.305-.546-2.29-.081-.988-.081-2.236-.081-3.92z"}),m("g",{stroke:"currentColor",strokeOpacity:"0.7",strokeLinecap:"round",strokeLinejoin:"round",clipPath:`url(#${t}-y)`,children:m("path",{d:"m240.395 167.185 4.876 1.673c.148.051.15.259.004.313l-2.186.822a.17.17 0 0 0-.097.098l-.822 2.186a.166.166 0 0 1-.313-.005l-1.674-4.876a.167.167 0 0 1 .212-.212zM243.019 170.021l2.808 2.808M240.165 163.167v1.333M242.995 164.338l-.943.943M237.338 169.995l.943-.943M236.166 167.166h1.333M237.338 164.338l.943.943"})}),m("text",{xmlSpace:"preserve",fill:"currentColor",className:"text-[var(--fg)]",fontSize:"10",fontWeight:"500",letterSpacing:"0em",style:{whiteSpace:"pre"},children:m("tspan",{x:"251",y:"171.636",children:"51K"})})]}),B("defs",{children:[B("linearGradient",{id:`${t}-b`,x1:"192.5",x2:"192.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-c`,x1:"192.5",x2:"192.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-d`,x1:"144.5",x2:"144.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-e`,x1:"144.5",x2:"144.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-f`,x1:"96.5",x2:"96.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-g`,x1:"96.5",x2:"96.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-h`,x1:"240.5",x2:"240.5",y1:"109",y2:"144",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-i`,x1:"240.5",x2:"240.5",y1:"193",y2:"228",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EA580C"}),m("stop",{offset:"0.625",stopColor:"#EA580C",stopOpacity:"0.5"}),m("stop",{offset:"1",stopColor:"#EA580C"})]}),B("linearGradient",{id:`${t}-j`,x1:"13",x2:"47",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EAB308",stopOpacity:"0"}),m("stop",{offset:"1",stopColor:"#EAB308"})]}),B("linearGradient",{id:`${t}-k`,x1:"323",x2:"289",y1:"168.5",y2:"168.5",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#EAB308",stopOpacity:"0"}),m("stop",{offset:"1",stopColor:"#EAB308"})]}),B("linearGradient",{id:`${t}-w`,x1:"73",x2:"73",y1:"156",y2:"180",gradientUnits:"userSpaceOnUse",children:[m("stop",{stopColor:"#030712",stopOpacity:"0"}),m("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),B("filter",{id:`${t}-t`,width:"96",height:"46",x:"14",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[m("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),m("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),m("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),B("filter",{id:`${t}-u`,width:"96",height:"46",x:"228",y:"145",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[m("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),m("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),m("feGaussianBlur",{result:"effect1_foregroundBlur_5_744",stdDeviation:"7.5"})]}),m("clipPath",{id:`${t}-a`,children:m("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M0 0h336v336H0z"})}),m("clipPath",{id:`${t}-y`,children:m("path",{fill:"currentColor",className:"text-[var(--bg)]",d:"M235 162h12v12h-12z"})}),m("pattern",{id:`${t}-x`,width:"1",height:"1",patternContentUnits:"objectBoundingBox",children:m("use",{xlinkHref:`#${t}-z`,transform:"scale(.01563)"})}),m("image",{href:`${It}dub.co`,id:`${t}-z`,width:"64",height:"64"})]})]})}import{jsx as G,jsxs as Re}from"react/jsx-runtime";var Td=[{title:"Dub API",description:"Programmatic link creation at scale",icon:Bt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:_t,href:"/docs/integrations"}];function zn({domain:e}){return Re("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200",children:[Re("div",{className:"grid grid-cols-2 gap-4 p-4",children:[G(Dn,{asChild:!0,children:Re(In,{href:O("/home",e,ae({domain:e,utm_content:"Dub Links"})),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:[Re("div",{className:"p-5 pb-0",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),G("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:"Short links with superpowers for the modern marketer"})]}),G("div",{className:"relative grow overflow-hidden",children:G(An,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),G("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#f4950c,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"})]})}),Re("div",{className:"flex flex-col gap-4",children:[G(Dn,{asChild:!0,children:Re(In,{href:O("/analytics",e,ae({domain:e,utm_content:"Dub Analytics"})),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:[G(En,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),G("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,#36D78F,transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-[0.2]"}),Re("div",{className:"h-56 p-5",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),G("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]})}),G("div",{className:"grid grow grid-rows-2 gap-4",children:Td.map(({title:t,description:r,icon:o,href:a})=>G(xr,{title:t,description:r,icon:o,href:O(a,e,ae({domain:e,utm_content:t}))},t))})]})]}),Re("div",{className:"px-6 py-4",children:[G("p",{className:i(qe,"mb-2"),children:"Customer Stories"}),Re("div",{className:"grid grid-cols-1",children:[Cn.map(({icon:t,iconClassName:r,title:o,description:a,href:l})=>G(Oe,{className:"-mx-2",href:O(l,e,ae({domain:e,utm_content:o})),icon:G("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:G(t,{className:i("h-4 w-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},l)),G(Oe,{className:"-mx-2",href:O("/customers",e,ae({domain:e,utm_content:"Customer Stories"})),title:"View all stories",showArrow:!0})]}),G("p",{className:i(qe,"mb-2 mt-5"),children:"Compare"}),G("div",{className:"flex flex-col",children:hr.map(({name:t,slug:r})=>G(Oe,{className:"-mx-2",href:O(`/compare/${r}`,e,ae({domain:e,utm_content:`Dub vs. ${t}`})),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import{Link as Hn}from"@radix-ui/react-navigation-menu";import Ed from"next/image";import Vn from"next/link";import{useId as Ld}from"react";import{jsx as x,jsxs as ct}from"react/jsx-runtime";function On({className:e,...t}){let r=Ld();return ct("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"114",viewBox:"0 0 247 114",fill:"none",className:i("",e),...t,children:[x("path",{stroke:"#fff",strokeWidth:"0.089",d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.854 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.79-85.496H0M246.057 43.06H0m246.057 41.544H0",opacity:"0.3"}),ct("g",{opacity:"0.5",children:[x("mask",{id:`${r}-a`,width:"187",height:"89",x:"27",y:"12",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:x("ellipse",{cx:"120.71",cy:"56.432",fill:"#D9D9D9",rx:"92.717",ry:"44.041"})}),x("g",{stroke:"#fff",strokeWidth:"0.089",mask:`url(#${r}-a)`,children:x("path",{d:"M147.901 0v113.578M141.661 0v113.578M132.924 0v113.578M108.853 0v113.578M100.116 0v113.578M93.876 0v113.578M85.139 0v113.578M52.509 0v113.578M156.639 0v113.578M189.267 0v113.578m56.789-85.496H-.001M246.056 43.06H-.001m246.057 41.544H-.001"})})]}),x("g",{filter:`url(#${r}-b)`,opacity:"0.3",children:x("path",{fill:"#fff",fillOpacity:"0.077",fillRule:"evenodd",d:"M147.733 29.33c0-.787.639-1.426 1.427-1.426h6.094c.788 0 1.427.639 1.427 1.427V46.57a20.77 20.77 0 0 1 11.93-3.745c11.531 0 20.878 9.353 20.878 20.89s-9.347 20.89-20.878 20.89c-11.53 0-20.878-9.353-20.878-20.89zm20.878 46.32c6.588 0 11.93-5.343 11.93-11.936 0-6.592-5.342-11.936-11.93-11.936-6.589 0-11.931 5.344-11.931 11.936 0 6.593 5.342 11.937 11.931 11.937M85.099 29.33c0-.787.639-1.426 1.427-1.426h6.095c.787 0 1.426.639 1.426 1.427v34.166a20 20 0 0 1 0 .436v19.245c0 .788-.639 1.426-1.426 1.426h-6.095a1.426 1.426 0 0 1-1.427-1.426V80.86a20.77 20.77 0 0 1-11.93 3.743c-11.53 0-20.877-9.352-20.877-20.89 0-11.536 9.347-20.889 20.878-20.889 4.435 0 8.548 1.384 11.93 3.744zM73.17 75.652c6.589 0 11.93-5.344 11.93-11.936 0-6.593-5.341-11.937-11.93-11.937s-11.93 5.344-11.93 11.937S66.58 75.65 73.17 75.65m28.27-32.826c-.788 0-1.427.639-1.427 1.427v19.463a20.9 20.9 0 0 0 6.116 14.77 20.87 20.87 0 0 0 29.526 0 20.9 20.9 0 0 0 6.115-14.77h-.001V44.252c0-.788-.639-1.427-1.427-1.427h-6.095c-.787 0-1.426.639-1.426 1.427v19.463a11.94 11.94 0 0 1-3.494 8.44 11.929 11.929 0 0 1-20.366-8.44V44.252c0-.788-.639-1.427-1.426-1.427z",clipRule:"evenodd"})}),x("path",{fill:`url(#${r}-c)`,fillOpacity:"0.4",stroke:`url(#${r}-d)`,strokeWidth:"0.233",d:"M93.926 63.996v20.577H85.21v-3.85l-.183.127a20.66 20.66 0 0 1-11.865 3.723c-11.468 0-20.765-9.302-20.765-20.776s9.297-20.776 20.765-20.776a20.66 20.66 0 0 1 11.865 3.723l.183.128V28.098h8.716v35.898Zm53.925-.199V28.098h8.717v18.775l.182-.128a20.66 20.66 0 0 1 11.866-3.724c11.468 0 20.765 9.302 20.765 20.776s-9.297 20.776-20.765 20.776-20.765-9.301-20.765-20.776Zm-6.198 0v.116h.001a20.8 20.8 0 0 1-6.082 14.575 20.757 20.757 0 0 1-29.366 0 20.79 20.79 0 0 1-6.082-14.69V43.02h8.717v20.776a12.047 12.047 0 1 0 24.096 0V43.021h8.716zM73.162 75.851c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055S61.114 57.14 61.114 63.797 66.508 75.85 73.162 75.85Zm95.454 0c6.654 0 12.048-5.397 12.048-12.054 0-6.658-5.394-12.055-12.048-12.055s-12.048 5.397-12.048 12.055 5.394 12.054 12.048 12.054Z"}),x("circle",{cx:"85.073",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"147.866",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"168.565",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"180.426",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"189.496",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"99.957",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"112.516",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"101.586",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"139.959",cy:"71.782",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"129.494",cy:"72.247",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"120.888",cy:"84.806",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"132.982",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"156.704",cy:"28.059",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"108.795",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"141.82",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"42.944",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"75.736",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"51.781",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"73.213",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"46.665",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"61.118",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"52.281",cy:"63.875",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"80.852",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"85.073",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),x("circle",{cx:"93.911",cy:"84.573",r:"0.814",fill:"#565656",stroke:"#fffa",strokeWidth:"0.233"}),ct("defs",{children:[ct("linearGradient",{id:`${r}-c`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#fff",stopOpacity:"0"}),x("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.3"})]}),ct("linearGradient",{id:`${r}-d`,x1:"120.889",x2:"120.889",y1:"27.982",y2:"84.689",gradientUnits:"userSpaceOnUse",children:[x("stop",{stopColor:"#5B5B5B"}),x("stop",{offset:"1",stopColor:"#757575"})]}),ct("filter",{id:`${r}-b`,width:"154.246",height:"73.748",x:"43.768",y:"19.38",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[x("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"4.262"}),x("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_7_2"}),x("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_7_2",result:"shape"}),x("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),x("feOffset",{dx:"-0.991",dy:"0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.354 0"}),x("feBlend",{in2:"shape",result:"effect2_innerShadow_7_2"}),x("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),x("feOffset",{dx:"0.991",dy:"-0.991"}),x("feGaussianBlur",{stdDeviation:"0.496"}),x("feComposite",{in2:"hardAlpha",k2:"-1",k3:"1",operator:"arithmetic"}),x("feColorMatrix",{values:"0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0 0.84 0 0 0 0.354 0"}),x("feBlend",{in2:"effect2_innerShadow_7_2",result:"effect3_innerShadow_7_2"}),x("feGaussianBlur",{result:"effect4_foregroundBlur_7_2",stdDeviation:"0.357"})]})]})]})}import{jsx as K,jsxs as He}from"react/jsx-runtime";var Ad=[{title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"},{title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"}];function _n({domain:e}){return He("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200",children:[K("div",{className:"grid grid-cols-2 gap-4 p-4",children:Ad.map(({title:t,description:r,thumbnail:o,href:a})=>K(Hn,{asChild:!0,children:He(Vn,{href:O(a,e,ae({domain:e,utm_content:t})),className:i("group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80","dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15"),children:[He("div",{className:"p-5 pb-0",children:[K("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),K("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),K("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:K("div",{className:i("relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10","[mask-image:linear-gradient(black_50%,transparent)]"),children:K(Ed,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)}))}),He("div",{className:"flex flex-col gap-2 px-6 py-4",children:[He("div",{children:[K("p",{className:i(qe,"mb-2"),children:"SDKs"}),K("div",{className:"flex flex-col gap-0.5",children:Nn.map(({icon:t,iconClassName:r,title:o,href:a})=>K(Oe,{className:"-mx-2",href:O(a,e,ae({domain:e,utm_content:o})),icon:K("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:K(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]}),K("div",{className:"-mx-2 flex grow flex-col justify-end",children:K(Hn,{asChild:!0,children:He(Vn,{href:O("/brand",e,ae({domain:e,utm_content:"Dub Brand"})),className:"group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20",children:[He("div",{className:"pointer-events-none absolute inset-0",children:[K("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:K("div",{className:i("absolute inset-0 rounded-xl","bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]")})}),K(On,{className:"absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]"})]}),K("div",{className:"relative flex items-center justify-between px-5 py-4",children:He("div",{children:[K("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),K("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})})]})]})}import{Fragment as Wd,jsx as W,jsxs as dt}from"react/jsx-runtime";var no=Od({theme:"light"}),io=[{name:"Product",content:zn,childItems:fr,segments:["/home","/analytics","/features","/compare"]},{name:"Resources",content:_n,childItems:kn,segments:["/solutions","/docs","/help","/brand"]},{name:"Company",content:Ln,childItems:gr,segments:["about","/blog","/changelog","/customers"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],Bn=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 o8({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Id();t&&(o=t);let a=Hd(),l=za(40),c=zd(),{data:s,isLoading:u}=Vd(o.endsWith("dub.co")&&"/api/auth/session",pe,{dedupingInterval:6e4});return W(no.Provider,{value:{theme:e},children:W(Dd,{id:a,children:dt("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",l&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),W(vr,{className:i("relative",r),children:dt("div",{className:"flex h-14 items-center justify-between",children:[W("div",{className:"grow basis-0",children:W(St,{className:"block w-fit py-2 pr-2",href:O("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:W(yr,{})})}),dt(de.Root,{delayDuration:0,className:"relative hidden lg:block",children:[W(de.List,{className:"group relative z-0 flex",children:io.map(({name:d,href:n,segments:p,content:f})=>{let g=p.some(b=>c==null?void 0:c.startsWith(b));return dt(de.Item,{children:[W(Bd,{trigger:!!f,children:n!==void 0?W(St,{id:`nav-${n}`,href:O(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:Bn,"data-active":g,children:d}):dt("button",{className:Bn,"data-active":g,children:[d,W(_d,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),f&&W(de.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(f,{domain:o})})]},d)})}),W("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:W(de.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(St,{href:we,className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):u?null:dt(Wd,{children:[W(St,{href:"https://app.dub.co/login",className:i(ie({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),W(St,{href:"https://app.dub.co/register",className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function _d(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 Bd({trigger:e,children:t}){return e?W(de.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Fd,Menu as Ud,X as Gd}from"lucide-react";import ut from"next/link";import{useParams as Wn}from"next/navigation";import{useEffect as $d,useState as Fn}from"react";import Kd from"swr";import{Fragment as Yd,jsx as V,jsxs as Ve}from"react/jsx-runtime";function v8({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Wn();t&&(r=t);let[o,a]=Fn(!1);$d(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l}=Kd(r.endsWith("dub.co")&&"/api/auth/session",pe,{dedupingInterval:6e4});return Ve("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[l&&Object.keys(l).length>0?V(so,{href:we,className:"max-[280px]:hidden",children:"Dashboard"}):Ve("div",{className:"flex gap-2 max-[280px]:hidden",children:[V(so,{variant:"secondary",href:`${we}/login`,children:"Log in"}),V(so,{href:`${we}/register`,children:"Sign Up"})]}),V("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?V(Gd,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):V(Ud,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),V("nav",{className:i("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:Ve("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[io.map(({name:c,href:s,childItems:u},d)=>V(jd,{name:c,href:s,childItems:u,setOpen:a},d)),l&&Object.keys(l).length>0?V("li",{className:"py-3 min-[281px]:hidden",children:V(ut,{href:we,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ve(Yd,{children:[V("li",{className:"py-3 min-[281px]:hidden",children:V(ut,{href:`${we}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),V("li",{className:"py-3 min-[281px]:hidden",children:V(ut,{href:`${we}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var jd=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Wn(),[l,c]=Fn(!1);return r?V("li",{className:"py-3",children:Ve(ke,{height:!0,children:[Ve("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[V("p",{className:"font-semibold",children:e}),V(Fd,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&V("div",{className:"grid gap-4 overflow-hidden py-4",children:r.map(({title:s,href:u,icon:d,description:n})=>Ve(ut,{href:O(u,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:s}),onClick:()=>o(!1),className:"flex w-full gap-3",children:[V("div",{className:"flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",children:V(d,{className:"size-5 text-neutral-700"})}),Ve("div",{children:[V("div",{className:"flex items-center gap-2",children:V("h2",{className:"text-sm font-medium text-neutral-900",children:s})}),V("p",{className:"text-sm text-neutral-500",children:n})]})]},u))})]})}):t?V("li",{className:"py-3",children:V(ut,{href:O(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};function so({variant:e,className:t,...r}){return V(ut,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ie({variant:e}),t)})}import{jsx as Un}from"react/jsx-runtime";function Gn({className:e}){return Un("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:Un("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 X,jsxs as $n}from"react/jsx-runtime";var au=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
49
49
  <path fill-rule="evenodd" clip-rule="evenodd" d="M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z" fill="black"/>
50
- </svg>`,Jd=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
50
+ </svg>`,nu=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
51
51
  <path fill-rule="evenodd" clip-rule="evenodd" d="M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z" fill="black"/>
52
- </svg>`;function yr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Kd(),{theme:a}=Yd(no),[l,c]=Zd(!1),s=jd(n=>{n.preventDefault(),c(!0)},[]),[,u]=tt();function d(n){qd.promise(u(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return _n(_e.Root,{open:l,onOpenChange:c,children:[X(_e.Anchor,{asChild:!0,children:X("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?X(Vn,{className:r}):X(Pt,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),X(_e.Portal,{children:X(_e.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),c(!1)},children:_n("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:[X(Mt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(Xd),icon:X(Pt,{className:"h-4 w-4"})}),X(Mt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Jd),icon:X($d,{strokeWidth:2,className:"h-4 w-4"})}),X(Mt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:X(Fd,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?X(Mt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:X(Ud,{strokeWidth:2,className:"h-4 w-4"})}):X(Mt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:X(Gd,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Mt({className:e,...t}){return X(se,{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 A,jsxs as $}from"react/jsx-runtime";var ou=[{name:"Twitter",icon:Ht,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Ot,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:zt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Vt,href:"https://www.youtube.com/@dubdotco"}],Rt={features:fr.map(({title:e,href:t})=>({name:e,href:t})),product:[{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"},{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Brand",href:"/brand"}],compare:hr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:xn.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Co.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},Tt="text-sm font-medium text-neutral-900",Lt="flex flex-col mt-2.5 gap-2.5",mt="text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function B8({staticDomain:e,className:t}){let{domain:r="dub.co"}=eu();return e&&(r=e),A(vr,{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:[A("div",{className:"grow",children:$(Be,{href:O("/",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"]}),A(yr,{className:"h-8 text-neutral-800"})]})}),A("div",{className:"flex items-center gap-3",children:ou.map(({name:o,icon:a,href:l})=>$("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[A("span",{className:"sr-only",children:o}),A(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),$("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{children:[A("h3",{className:Tt,children:"Product"}),A("ul",{role:"list",className:Lt,children:Rt.features.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]}),$("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Tt,children:"Resources"}),A("ul",{role:"list",className:Lt,children:Rt.product.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"flex flex-col space-y-8",children:[$("div",{children:[A("h3",{className:Tt,children:"Compare"}),A("ul",{role:"list",className:Lt,children:Rt.compare.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]}),$("div",{children:[A("h3",{className:Tt,children:"Legal"}),$("ul",{role:"list",className:Lt,children:[Rt.legal.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name)),A("li",{children:$("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:i(mt,"flex items-center gap-1"),children:["Trust Center ",A(ca,{className:"size-3.5"})]})})]})]})]}),$("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Tt,children:"Tools"}),A("ul",{role:"list",className:Lt,children:Rt.tools.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[A(au,{}),A(Be,{href:O("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:A(Qd,{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."]})]})]})})}function au(){let{data:e}=ru("https://status.dub.co/api/v1/summary",pe),[t,r]=Bn("bg-neutral-200"),[o,a]=Bn("Loading status...");return tu(()=>{if(!e)return;let{ongoing_incidents:l}=e;if(l.length>0){let{current_worst_impact:c,name:s}=l[0],u=c==="degraded_performance"?"bg-yellow-500":"bg-red-500";a(s),r(u)}else a("All systems operational"),r("bg-green-500")},[e]),$(Be,{href:"https://status.dub.co",target:"_blank",className:"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",children:[$("div",{className:"relative size-2",children:[A("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",t,o==="Loading status..."&&"animate-none")}),A("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",t)})]}),A("p",{className:"text-xs font-medium leading-none text-neutral-600",children:o})]})}import{AnimatePresence as nu,motion as iu}from"framer-motion";import{useEffect as su,useState as lu}from"react";import{jsx as Wn}from"react/jsx-runtime";var Fn=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=lu(!1);su(()=>{l(!0)},[]);let c=r?iu.div:"div";return Wn(nu,{children:a?Wn(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as cu}from"class-variance-authority";import{toast as du}from"sonner";import{jsx as lo,jsxs as mu}from"react/jsx-runtime";var uu=cu("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 J8({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=tt(),s=o||No;return mu("button",{onClick:u=>{u.stopPropagation(),du.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(uu({variant:e}),r),type:"button",children:[lo("span",{className:"sr-only",children:"Copy"}),l?lo(To,{className:"h-3.5 w-3.5"}):lo(s,{className:"h-3.5 w-3.5"})]})}import{toast as pu}from"sonner";import{jsx as fu}from"react/jsx-runtime";function o5({value:e,children:t,className:r,successMessage:o}){let[a,l]=tt();return fu("button",{onClick:c=>{c.stopPropagation(),pu.promise(l(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted hover:underline",a&&"cursor-default",r),children:t})}import{jsx as gu,jsxs as hu}from"react/jsx-runtime";function n5({icon:e,text:t}){return hu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,gu("p",{className:"truncate text-sm",children:t})]})}import{jsx as vu}from"react/jsx-runtime";var s5=({children:e})=>vu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as co}from"react/jsx-runtime";function m5({apexDomain:e,className:t,imageProps:r}){return e?co(kt,{src:`${It}${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}):co("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:co(ta,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Un}from"lucide-react";import{useRouter as bu,useSearchParams as xu}from"next/navigation";import{useEffect as yu,useMemo as wu,useRef as Cu}from"react";import Nu from"swr";import{useDebounce as ku}from"use-debounce";import{Fragment as Gn,jsx as j,jsxs as We}from"react/jsx-runtime";function C5({defaultUrl:e}){let t=bu(),r=xu(),o=e||(r==null?void 0:r.get("url"))||"https://github.com/dubinc/dub",[a]=ku(xo(o),500),l=wu(()=>yo(a||""),[a]),{data:c,isValidating:s}=Nu(a&&`/api/metatags?url=${encodeURIComponent(a)}`,pe,{revalidateOnFocus:!1}),{title:u,description:d,image:n}=c||{},p=Cu(null);yu(()=>{!e&&p.current&&p.current.select()},[e]);let{isMobile:f}=q();return We(Gn,{children:[!e&&We("div",{className:"relative flex items-center",children:[j(Un,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{ref:p,name:"url",id:"url",type:"url",autoFocus:!f,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:o,onChange:g=>t.replace(`/tools/metatags${g.target.value.length>0?`?url=${g.target.value}`:""}`),"aria-invalid":"true"})]}),We("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[s&&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(ft,{})}),n?j("img",{src:n,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):We("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(So,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),We("div",{className:"grid gap-1 bg-white p-3 text-left",children:[l?j("p",{className:"text-sm text-[#536471]",children:l}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),u?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:u}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),d?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:d}):We("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 N5({defaultUrl:e}){return We(Gn,{children:[We("div",{className:"relative flex items-center",children:[j(Un,{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(ft,{})})})]})}import{AnimatePresence as Pu}from"framer-motion";import $n from"js-cookie";import{createContext as Su,useState as Mu}from"react";import{jsx as uo}from"react/jsx-runtime";var Ru=Su({hidePopup:()=>{}});function L5({children:e,hiddenCookieId:t}){let[r,o]=Mu($n.get(t)==="1"),a=()=>{o(!0),$n.set(t,"1")};return uo(Fn,{children:uo(Ru.Provider,{value:{hidePopup:a},children:uo(Pu,{children:!r&&e})})})}import{motion as Tu}from"framer-motion";import{jsx as Kn}from"react/jsx-runtime";function I5({value:e=0,max:t=100,className:r}){return Kn("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Kn(Tu.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 Yn}from"class-variance-authority";import{LayoutGroup as Lu,motion as Eu}from"framer-motion";import{useId as Au}from"react";import{jsx as Et,jsxs as jn}from"react/jsx-runtime";var Du=Yn("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"}}),Iu=Yn("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function G5({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=Au();return Et("div",{className:i("flex text-sm",a),children:Et(Lu,{id:l,children:t.map(({id:c,label:s,href:u})=>{let d=c===r;return jn(u?"a":"div",{className:"relative",href:u??"#",target:u?"_blank":void 0,children:[jn("button",{type:"button",...!u&&{onClick:()=>o==null?void 0:o(c)},className:i(Du({variant:e}),u&&"group flex items-center gap-1.5"),"data-selected":d,"aria-selected":d,children:[s,u&&Et(Ho,{className:"size-2.5"})]}),d&&Et(Eu.div,{layoutId:"indicator",transition:{duration:.1},className:Iu({variant:e}),children:Et("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Zn,jsxs as zu}from"react/jsx-runtime";function j5({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:[Zn("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"}),Zn("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{Tr as AUTOPLAY_DEFAULT_DELAY,Tf as Accordion,ri as AccordionContent,ei as AccordionItem,ti as AccordionTrigger,Ju as Africa,dm as Airtm,ii as Alert,li as AlertDescription,si as AlertTitle,am as Amazon,hm as AndroidLogo,ke as AnimatedSizeContainer,vm as AppleLogo,bm as ArrowBoldUp,xm as ArrowRight,ym as ArrowTrendUp,wm as ArrowTurnLeft,Cm as ArrowTurnRight2,Ho as ArrowUpRight,Nm as ArrowsOppositeDirectionY,Qu as Asia,so as AuthButton,Hf as Avatar,U4 as Background,$t as Badge,km as BadgeCheck,Pm as BadgeCheck2Fill,a1 as BadgeTooltip,Sm as Blog,kt as BlurImage,Mm as Bolt,Rm as BoltFill,Lm as Book2,Vo as Book2Fill,Em as Book2Small,Tm as BookOpen,Am as Books2,Dm as BoxArchive,Im as BulletList,_o as BulletListFill,se as Button,n1 as ButtonTooltip,gr as COMPANY,hr as COMPARE_PAGES,hn as CUSTOMER_STORIES,Oa as Calendar,Vm as Calendar6,Om as CalendarDays,zm as CalendarIcon,Hm as CalendarRefresh,Yu as CardAmex,Zu as CardDiscover,T1 as CardList,qu as CardMastercard,Xu as CardVisa,_m as Cards,Bm as CaretUpFill,_i as Carousel,Bi as CarouselContent,Wi as CarouselItem,j1 as CarouselNavBar,Ui as CarouselNext,Fi as CarouselPrevious,og as CarouselThumbnail,rg as CarouselThumbnails,um as CashApp,Wm as ChartActivity2,Fm as ChartArea2,Um as ChartLine,nm as ChatGPT,Bo as Check,Wo as Check2,es as Checkbox,Fo as CheckboxCheckedFill,Uo as CheckboxUnchecked,Go as CircleCheck,Gm as CircleCheckFill,$m as CircleDollar,Km as CircleDotted,$o as CircleHalfDottedCheck,Ko as CircleHalfDottedClock,jo as CircleInfo,jm as CirclePercentage,Ym as CirclePlay,Zm as CirclePlayFill,qm as CircleQuestion,Xm as CircleUser,Nr as CircleWarning,Jm as CircleXmark,Qm as Circles,e0 as Circles3,Fn as ClientOnly,Yo as CloudUpload,t0 as Code,r0 as ColorPalette2,Kh as Combobox,j5 as CompositeLogo,o0 as ConnectedDots,a0 as ConnectedDots4,_t as ConnectedDotsFill,n0 as Connections3,No as Copy,J8 as CopyButton,o5 as CopyText,i0 as CreditCard,s0 as Crosshairs3,l0 as Crown,Ou as CrownSmall,c0 as Cube,d0 as CubeSettings,Bt as CubeSettingsFill,u0 as CurrencyDollar,m0 as CursorRays,p0 as DatabaseKey,Ir as DatePickerContext,T2 as DateRangePicker,f0 as Desktop,g0 as DiamondTurnRight,h0 as Directions,v0 as Discount,b0 as Dots,x0 as Download,Hu as DubCraftedShield,y0 as Duplicate,ua as DynamicTooltipWrapper,w0 as Earth,C0 as EarthPosition,z2 as EmptyState,N0 as EnvelopeAlert,k0 as EnvelopeArrowRight,em as Europe,ko as ExpandingArrow,Zo as Eye,qo as EyeSlash,fr as FEATURES_LIST,Bu as Facebook,Xo as FeatherFill,im as Figma,P0 as FileContent,K2 as FileUpload,S0 as FileZip2,hv as Filter,R0 as Filter2,M0 as FilterBars,L0 as Flag2,Jo as Flag6,T0 as FlagWavy,E0 as Flask,A0 as Folder,H0 as Folder5,D0 as FolderBookmark,I0 as FolderLock,z0 as FolderPlus,O0 as FolderShield,B8 as Footer,Nv as Form,V0 as GamingConsole,_0 as Gauge6,B0 as Gear,W0 as Gear2,F0 as Gear3,U0 as Gem,Qo as Gift,G0 as GiftFill,sm as GitHubEnhanced,zt as Github,$0 as Globe,ta as Globe2,ea as GlobePointer,K0 as GlobeSearch,Ao as Go,Wu as Google,lm as GoogleEnhanced,j0 as GreekTemple,Mv as Grid,Y0 as GridIcon,Z0 as GridLayoutRows,q0 as GridPlus,X0 as Headset,ra as HeadsetFill,oa as HeartFill,aa as HexadecagonStar,J0 as History,na as Hyperlink,n5 as IconMenu,Q0 as Icosahedron,ep as Incognito,r1 as InfoTooltip,s5 as InlineSnippet,Ql as Input,tp as InputPassword,rp as InputPasswordPointer,ia as InputSearch,eb as InputSelect,Fu as Instagram,op as InvoiceDollar,ap as Key,Ca as KeyboardShortcutContext,Ig as KeyboardShortcutProvider,xn as LEGAL_PAGES,xc as Label,np as LayoutSidebar,ip as License,sa as LinesY,lp as Link4,sp as LinkBroken,m5 as LinkLogo,C5 as LinkPreview,N5 as LinkPreviewPlaceholder,Ot as LinkedIn,t1 as LinkifyTooltipContent,ft as LoadingCircle,_u as LoadingDots,Ce as LoadingSpinner,cp as LocationPin,dp as LockFill,Pt as Logo,Po as Magic,up as Magnifier,mp as MapPosition,pp as MarketingTarget,Vu as MatrixLines,vr as MaxWidthWrapper,fp as Menu3,mb as MenuItem,gp as MessageSmile,Cb as MiniAreaChart,hp as MobilePhone,Rb as Modal,vp as MoneyBill,bp as MoneyBill2,xp as MoneyBills2,Qx as Nav,no as NavContext,p8 as NavMobile,yr as NavWordmark,tm as NorthAmerica,yp as Note,Rp as NucleoPhoto,o1 as NumberTooltip,rm as Oceania,wp as OfficeBuilding,la as Page2,Eb as PaginationControls,Cp as Paintbrush,Np as Palette2,kp as PaperPlane,mm as Payoneer,pm as Paypal,Sp as Pen2,Pp as PenWriting,Mp as PercentageArrowDown,So as Photo,Do as Php,Tp as Plug2,Wt as Plus,nt as Popover,L5 as Popup,Ru as PopupContext,Lp as Post,Uu as Prisma,Lo as ProductHunt,I5 as ProgressBar,Ep as Pyramid,Io as Python,Ap as QRCode,bn as RESOURCES,Hc as RadioGroup,Vc as RadioGroupItem,Eo as Raycast,Dp as Receipt2,ca as ReferredVia,Ip as Refresh2,zp as Robot,zo as Ruby,vn as SDKS,yn as SOCIAL_LINKS,da as SatelliteDish,Op as ScanText,Hp as Scribble,_b as Sheet,Vp as ShieldAlert,_p as ShieldCheck,Bp as ShieldKeyhole,Wp as ShieldSlash,Ub as ShimmerDots,Fp as Shuffle,e1 as SimpleTooltipContent,Gu as Slack,Up as Sliders,Mo as SortOrder,om as SouthAmerica,Gp as Sparkle3,cm as Spotify,$p as SquareChart,Kp as SquareLayoutGrid5,jp as SquareLayoutGrid6,Yp as SquareXmark,Zp as Stars2,Zb as StatusBadge,fm as StripeLink,Ro as Success,o4 as Switch,af as TV,G5 as TabSelect,R4 as Table,qp as TableIcon,Xp as TableRows2,Jp as Tablet,Qp as Tag,ef as Tags,To as Tick,$u as TikTok,tf as Timer2,Ku as Tinybird,rf as Toggle2Fill,D4 as ToggleGroup,Vf as TokenAvatar,J as Tooltip,Qf as TooltipContent,Jf as TooltipProvider,of as Trash,Ht as Twitter,Oo as Typescript,W4 as UTMBuilder,vd as UTM_PARAMETERS,nf as UiCard,ju as Unsplash,sf as User,lf as UserCheck,cf as UserCrown,df as UserDelete,uf as UserPlus,mf as Users,ff as Users2,gf as Users6,pf as UsersSettings,gm as Venmo,hf as Versions2,vf as Views,bf as Watch,xf as Webhook,yf as Window,wf as WindowSearch,Cf as WindowSettings,Vn as Wordmark,Nf as Xmark,Vt as YouTube,pi as badgeVariants,ie as buttonVariants,ui as getUserAvatarUrl,io as navItems,Jc as statusBadgeVariants,ge as useCarousel,ba as useCarouselActiveIndex,dg as useCookies,tt as useCopyToClipboard,gg as useCurrentAnchor,vg as useEnterSubmit,wg as useInViewport,kg as useInputFocused,Rg as useIntersectionObserver,rt as useKeyboardShortcut,Hg as useLocalStorage,q as useMediaQuery,Fg as useOptimisticUpdate,eh as usePagination,oh as useRemoveGAParams,jt as useResizeObserver,Sa as useRouterStuff,Ta as useScroll,ot as useScrollProgress,M4 as useTable,Pa as useTablePagination,vh as useToastWithUndo};
52
+ </svg>`;function yr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Qd(),{theme:a}=tu(no),[l,c]=ru(!1),s=eu(n=>{n.preventDefault(),c(!0)},[]),[,u]=tt();function d(n){ou.promise(u(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return $n(_e.Root,{open:l,onOpenChange:c,children:[X(_e.Anchor,{asChild:!0,children:X("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?X(Gn,{className:r}):X(Pt,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),X(_e.Portal,{children:X(_e.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),c(!1)},children:$n("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:[X(Mt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(au),icon:X(Pt,{className:"h-4 w-4"})}),X(Mt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(nu),icon:X(Jd,{strokeWidth:2,className:"h-4 w-4"})}),X(Mt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:X(Zd,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?X(Mt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:X(qd,{strokeWidth:2,className:"h-4 w-4"})}):X(Mt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:X(Xd,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Mt({className:e,...t}){return X(se,{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 A,jsxs as $}from"react/jsx-runtime";var du=[{name:"Twitter",icon:Ht,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Ot,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:zt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Vt,href:"https://www.youtube.com/@dubdotco"}],Rt={features:fr.map(({title:e,href:t})=>({name:e,href:t})),product:[{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"},{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Brand",href:"/brand"}],compare:hr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Pn.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:No.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},Tt="text-sm font-medium text-neutral-900",Lt="flex flex-col mt-2.5 gap-2.5",mt="text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function G8({staticDomain:e,className:t}){let{domain:r="dub.co"}=su();return e&&(r=e),A(vr,{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:[A("div",{className:"grow",children:$(Be,{href:O("/",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"]}),A(yr,{className:"h-8 text-neutral-800"})]})}),A("div",{className:"flex items-center gap-3",children:du.map(({name:o,icon:a,href:l})=>$("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[A("span",{className:"sr-only",children:o}),A(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),$("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{children:[A("h3",{className:Tt,children:"Product"}),A("ul",{role:"list",className:Lt,children:Rt.features.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]}),$("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Tt,children:"Resources"}),A("ul",{role:"list",className:Lt,children:Rt.product.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"flex flex-col space-y-8",children:[$("div",{children:[A("h3",{className:Tt,children:"Compare"}),A("ul",{role:"list",className:Lt,children:Rt.compare.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]}),$("div",{children:[A("h3",{className:Tt,children:"Legal"}),$("ul",{role:"list",className:Lt,children:[Rt.legal.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name)),A("li",{children:$("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:i(mt,"flex items-center gap-1"),children:["Trust Center ",A(pa,{className:"size-3.5"})]})})]})]})]}),$("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Tt,children:"Tools"}),A("ul",{role:"list",className:Lt,children:Rt.tools.map(o=>A("li",{children:A(Be,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:mt,children:o.name})},o.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[A(uu,{}),A(Be,{href:O("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:A(iu,{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."]})]})]})})}function uu(){let{data:e}=cu("https://status.dub.co/api/v1/summary",pe),[t,r]=Kn("bg-neutral-200"),[o,a]=Kn("Loading status...");return lu(()=>{if(!e)return;let{ongoing_incidents:l}=e;if(l.length>0){let{current_worst_impact:c,name:s}=l[0],u=c==="degraded_performance"?"bg-yellow-500":"bg-red-500";a(s),r(u)}else a("All systems operational"),r("bg-green-500")},[e]),$(Be,{href:"https://status.dub.co",target:"_blank",className:"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",children:[$("div",{className:"relative size-2",children:[A("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",t,o==="Loading status..."&&"animate-none")}),A("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",t)})]}),A("p",{className:"text-xs font-medium leading-none text-neutral-600",children:o})]})}import{AnimatePresence as mu,motion as pu}from"framer-motion";import{useEffect as fu,useState as gu}from"react";import{jsx as jn}from"react/jsx-runtime";var Yn=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=gu(!1);fu(()=>{l(!0)},[]);let c=r?pu.div:"div";return jn(mu,{children:a?jn(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as hu}from"class-variance-authority";import{toast as vu}from"sonner";import{jsx as lo,jsxs as xu}from"react/jsx-runtime";var bu=hu("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 r5({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=tt(),s=o||ko;return xu("button",{onClick:u=>{u.stopPropagation(),vu.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(bu({variant:e}),r),type:"button",children:[lo("span",{className:"sr-only",children:"Copy"}),l?lo(Lo,{className:"h-3.5 w-3.5"}):lo(s,{className:"h-3.5 w-3.5"})]})}import{toast as yu}from"sonner";import{jsx as wu}from"react/jsx-runtime";function s5({value:e,children:t,className:r,successMessage:o}){let[a,l]=tt();return wu("button",{onClick:c=>{c.stopPropagation(),yu.promise(l(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted hover:underline",a&&"cursor-default",r),children:t})}import{jsx as Cu,jsxs as Nu}from"react/jsx-runtime";function c5({icon:e,text:t}){return Nu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Cu("p",{className:"truncate text-sm",children:t})]})}import{jsx as ku}from"react/jsx-runtime";var u5=({children:e})=>ku("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as co}from"react/jsx-runtime";function h5({apexDomain:e,className:t,imageProps:r}){return e?co(kt,{src:`${It}${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}):co("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:co(oa,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Zn}from"lucide-react";import{useRouter as Pu,useSearchParams as Su}from"next/navigation";import{useEffect as Mu,useMemo as Ru,useRef as Tu}from"react";import Lu from"swr";import{useDebounce as Eu}from"use-debounce";import{Fragment as qn,jsx as j,jsxs as We}from"react/jsx-runtime";function S5({defaultUrl:e}){let t=Pu(),r=Su(),o=e||(r==null?void 0:r.get("url"))||"https://github.com/dubinc/dub",[a]=Eu(yo(o),500),l=Ru(()=>wo(a||""),[a]),{data:c,isValidating:s}=Lu(a&&`/api/metatags?url=${encodeURIComponent(a)}`,pe,{revalidateOnFocus:!1}),{title:u,description:d,image:n}=c||{},p=Tu(null);Mu(()=>{!e&&p.current&&p.current.select()},[e]);let{isMobile:f}=q();return We(qn,{children:[!e&&We("div",{className:"relative flex items-center",children:[j(Zn,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{ref:p,name:"url",id:"url",type:"url",autoFocus:!f,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:o,onChange:g=>t.replace(`/tools/metatags${g.target.value.length>0?`?url=${g.target.value}`:""}`),"aria-invalid":"true"})]}),We("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[s&&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(ft,{})}),n?j("img",{src:n,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):We("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(Mo,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),We("div",{className:"grid gap-1 bg-white p-3 text-left",children:[l?j("p",{className:"text-sm text-[#536471]",children:l}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),u?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:u}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),d?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:d}):We("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 M5({defaultUrl:e}){return We(qn,{children:[We("div",{className:"relative flex items-center",children:[j(Zn,{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(ft,{})})})]})}import{AnimatePresence as Au}from"framer-motion";import Xn from"js-cookie";import{createContext as Du,useState as Iu}from"react";import{jsx as uo}from"react/jsx-runtime";var zu=Du({hidePopup:()=>{}});function I5({children:e,hiddenCookieId:t}){let[r,o]=Iu(Xn.get(t)==="1"),a=()=>{o(!0),Xn.set(t,"1")};return uo(Yn,{children:uo(zu.Provider,{value:{hidePopup:a},children:uo(Au,{children:!r&&e})})})}import{motion as Ou}from"framer-motion";import{jsx as Jn}from"react/jsx-runtime";function V5({value:e=0,max:t=100,className:r}){return Jn("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Jn(Ou.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 Hu,motion as Vu}from"framer-motion";import{useId as _u}from"react";import{jsx as Et,jsxs as Qn}from"react/jsx-runtime";var Bu=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"}}),Wu=ei("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function Y5({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=_u();return Et("div",{className:i("flex text-sm",a),children:Et(Hu,{id:l,children:t.map(({id:c,label:s,href:u})=>{let d=c===r;return Qn(u?"a":"div",{className:"relative",href:u??"#",target:u?"_blank":void 0,children:[Qn("button",{type:"button",...!u&&{onClick:()=>o==null?void 0:o(c)},className:i(Bu({variant:e}),u&&"group flex items-center gap-1.5"),"data-selected":d,"aria-selected":d,children:[s,u&&Et(Vo,{className:"size-2.5"})]}),d&&Et(Vu.div,{layoutId:"indicator",transition:{duration:.1},className:Wu({variant:e}),children:Et("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as mo,jsxs as ti}from"react/jsx-runtime";var Fu=[{icon:ha,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:qo,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:ca,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:ga,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:la,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function X5(){return ti("div",{className:"p-3",children:[mo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),mo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Fu.map(({text:e,icon:t,href:r})=>ti("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[mo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as ri,jsxs as Uu}from"react/jsx-runtime";function e6({className:e}){return Uu("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:[ri("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"}),ri("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{Tr as AUTOPLAY_DEFAULT_DELAY,Df as Accordion,ci as AccordionContent,si as AccordionItem,li as AccordionTrigger,X5 as AdvancedLinkFeaturesTooltip,im as Africa,bm as Airtm,pi as Alert,gi as AlertDescription,fi as AlertTitle,mm as Amazon,km as AndroidLogo,ke as AnimatedSizeContainer,Pm as AppleLogo,Sm as ArrowBoldUp,Mm as ArrowRight,Rm as ArrowTrendUp,Tm as ArrowTurnLeft,Lm as ArrowTurnRight2,Vo as ArrowUpRight,Em as ArrowsOppositeDirectionY,sm as Asia,so as AuthButton,Wf as Avatar,j4 as Background,$t as Badge,Am as BadgeCheck,Dm as BadgeCheck2Fill,l1 as BadgeTooltip,Im as Blog,kt as BlurImage,zm as Bolt,Om as BoltFill,Vm as Book2,_o as Book2Fill,_m as Book2Small,Hm as BookOpen,Bm as Books2,Wm as BoxArchive,Fm as BulletList,Bo as BulletListFill,se as Button,c1 as ButtonTooltip,gr as COMPANY,hr as COMPARE_PAGES,Cn as CUSTOMER_STORIES,Fa as Calendar,Km as Calendar6,Gm as CalendarDays,Um as CalendarIcon,$m as CalendarRefresh,rm as CardAmex,om as CardDiscover,D1 as CardList,am as CardMastercard,nm as CardVisa,jm as Cards,Ym as CaretUpFill,Ki as Carousel,ji as CarouselContent,Yi as CarouselItem,X1 as CarouselNavBar,qi as CarouselNext,Zi as CarouselPrevious,sg as CarouselThumbnail,ig as CarouselThumbnails,xm as CashApp,Zm as ChartActivity2,qm as ChartArea2,Xm as ChartLine,pm as ChatGPT,Wo as Check,Fo as Check2,ss as Checkbox,Uo as CheckboxCheckedFill,Go as CheckboxUnchecked,$o as CircleCheck,Jm as CircleCheckFill,Qm as CircleDollar,e0 as CircleDotted,Ko as CircleHalfDottedCheck,jo as CircleHalfDottedClock,Yo as CircleInfo,t0 as CirclePercentage,r0 as CirclePlay,o0 as CirclePlayFill,a0 as CircleQuestion,n0 as CircleUser,Nr as CircleWarning,i0 as CircleXmark,s0 as Circles,l0 as Circles3,Yn as ClientOnly,Zo as CloudUpload,c0 as Code,d0 as ColorPalette2,qh as Combobox,e6 as CompositeLogo,u0 as ConnectedDots,m0 as ConnectedDots4,_t as ConnectedDotsFill,p0 as Connections3,ko as Copy,r5 as CopyButton,s5 as CopyText,f0 as CreditCard,g0 as Crosshairs3,h0 as Crown,Gu as CrownSmall,v0 as Cube,b0 as CubeSettings,Bt as CubeSettingsFill,x0 as CurrencyDollar,y0 as CursorRays,w0 as DatabaseKey,Ir as DatePickerContext,D2 as DateRangePicker,C0 as Desktop,N0 as DiamondTurnRight,k0 as Directions,P0 as Discount,S0 as Dots,M0 as Download,$u as DubCraftedShield,R0 as Duplicate,va as DynamicTooltipWrapper,qo as Earth,T0 as EarthPosition,_2 as EmptyState,L0 as EnvelopeAlert,E0 as EnvelopeArrowRight,lm as Europe,Po as ExpandingArrow,Xo as Eye,Jo as EyeSlash,fr as FEATURES_LIST,Yu as Facebook,Qo as FeatherFill,fm as Figma,A0 as FileContent,q2 as FileUpload,D0 as FileZip2,yv as Filter,z0 as Filter2,I0 as FilterBars,H0 as Flag2,ea as Flag6,O0 as FlagWavy,V0 as Flask,_0 as Folder,G0 as Folder5,B0 as FolderBookmark,W0 as FolderLock,F0 as FolderPlus,U0 as FolderShield,G8 as Footer,Mv as Form,$0 as GamingConsole,K0 as Gauge6,j0 as Gear,Y0 as Gear2,Z0 as Gear3,q0 as Gem,ta as Gift,X0 as GiftFill,gm as GitHubEnhanced,zt as Github,J0 as Globe,oa as Globe2,ra as GlobePointer,Q0 as GlobeSearch,Do as Go,Zu as Google,hm as GoogleEnhanced,ep as GreekTemple,Ev as Grid,tp as GridIcon,rp as GridLayoutRows,op as GridPlus,ap as Headset,aa as HeadsetFill,na as HeartFill,ia as HexadecagonStar,np as History,sa as Hyperlink,c5 as IconMenu,ip as Icosahedron,la as Incognito,i1 as InfoTooltip,u5 as InlineSnippet,ic as Input,sp as InputPassword,ca as InputPasswordPointer,da as InputSearch,ab as InputSelect,qu as Instagram,lp as InvoiceDollar,cp as Key,Ra as KeyboardShortcutContext,Vg as KeyboardShortcutProvider,Pn as LEGAL_PAGES,Sc as Label,dp as LayoutSidebar,up as License,ua as LinesY,pp as Link4,mp as LinkBroken,h5 as LinkLogo,S5 as LinkPreview,M5 as LinkPreviewPlaceholder,Ot as LinkedIn,n1 as LinkifyTooltipContent,ft as LoadingCircle,ju as LoadingDots,Ce as LoadingSpinner,fp as LocationPin,gp as LockFill,Pt as Logo,So as Magic,hp as Magnifier,vp as MapPosition,bp as MarketingTarget,Ku as MatrixLines,vr as MaxWidthWrapper,xp as Menu3,hb as MenuItem,yp as MessageSmile,Sb as MiniAreaChart,wp as MobilePhone,Ab as Modal,Cp as MoneyBill,Np as MoneyBill2,kp as MoneyBills2,o8 as Nav,no as NavContext,v8 as NavMobile,yr as NavWordmark,cm as NorthAmerica,Pp as Note,Dp as NucleoPhoto,s1 as NumberTooltip,dm as Oceania,Sp as OfficeBuilding,Mf as PLAN_FEATURE_ICONS,ma as Page2,zb as PaginationControls,Mp as Paintbrush,Rp as Palette2,Tp as PaperPlane,ym as Payoneer,wm as Paypal,Ep as Pen2,Lp as PenWriting,Ap as PercentageArrowDown,Mo as Photo,Io as Php,Ip as Plug2,Wt as Plus,nt as Popover,I5 as Popup,zu as PopupContext,zp as Post,Xu as Prisma,Eo as ProductHunt,V5 as ProgressBar,Op as Pyramid,zo as Python,Hp as QRCode,kn as RESOURCES,Gc as RadioGroup,$c as RadioGroupItem,Ao as Raycast,Vp as Receipt2,pa as ReferredVia,_p as Refresh2,Bp as Robot,Oo as Ruby,Nn as SDKS,Sn as SOCIAL_LINKS,fa as SatelliteDish,Wp as ScanText,Fp as Scribble,Ub as Sheet,Up as ShieldAlert,Gp as ShieldCheck,$p as ShieldKeyhole,Kp as ShieldSlash,jb as ShimmerDots,jp as Shuffle,a1 as SimpleTooltipContent,Ju as Slack,Yp as Sliders,Ro as SortOrder,um as SouthAmerica,Zp as Sparkle3,vm as Spotify,qp as SquareChart,Xp as SquareLayoutGrid5,Jp as SquareLayoutGrid6,Qp as SquareXmark,ef as Stars2,Qb as StatusBadge,Cm as StripeLink,To as Success,s4 as Switch,cf as TV,Y5 as TabSelect,A4 as Table,tf as TableIcon,rf as TableRows2,of as Tablet,af as Tag,nf as Tags,Lo as Tick,Qu as TikTok,ga as Timer2,em as Tinybird,sf as Toggle2Fill,H4 as ToggleGroup,Ff as TokenAvatar,J as Tooltip,o1 as TooltipContent,r1 as TooltipProvider,lf as Trash,Ht as Twitter,Ho as Typescript,$4 as UTMBuilder,kd as UTM_PARAMETERS,df as UiCard,tm as Unsplash,uf as User,mf as UserCheck,pf as UserCrown,ff as UserDelete,gf as UserPlus,hf as Users,bf as Users2,xf as Users6,vf as UsersSettings,Nm as Venmo,yf as Versions2,ha as Views,wf as Watch,Cf as Webhook,Nf as Window,kf as WindowSearch,Pf as WindowSettings,Gn as Wordmark,Sf as Xmark,Vt as YouTube,yi as badgeVariants,ie as buttonVariants,bi as getUserAvatarUrl,io as navItems,nd as statusBadgeVariants,ge as useCarousel,ka as useCarouselActiveIndex,fg as useCookies,tt as useCopyToClipboard,xg as useCurrentAnchor,wg as useEnterSubmit,Pg as useInViewport,Rg as useInputFocused,Ag as useIntersectionObserver,rt as useKeyboardShortcut,Wg as useLocalStorage,q as useMediaQuery,Kg as useOptimisticUpdate,ah as usePagination,sh as useRemoveGAParams,jt as useResizeObserver,Aa as useRouterStuff,za as useScroll,ot as useScrollProgress,E4 as useTable,Ea as useTablePagination,wh as useToastWithUndo};