@dub/ui 0.2.26 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts/index.mjs +1 -1
- package/dist/chunk-2WUETJWI.mjs +2 -0
- package/dist/chunk-4T7LXQQ5.mjs +2 -0
- package/dist/chunk-66IRBUYU.mjs +2 -0
- package/dist/chunk-6L6PDQYE.mjs +2 -0
- package/dist/chunk-6SXL72WH.mjs +2 -0
- package/dist/chunk-EFCYI6OD.mjs +2 -0
- package/dist/chunk-FWKDRZHC.mjs +2 -0
- package/dist/chunk-GDGLNI6P.mjs +2 -0
- package/dist/chunk-IFR7ANMA.mjs +2 -0
- package/dist/chunk-KKXE3GF2.mjs +2 -0
- package/dist/chunk-L6542PJ3.mjs +2 -0
- package/dist/chunk-MWNK3I2K.mjs +2 -0
- package/dist/chunk-NF3JUX6T.mjs +2 -0
- package/dist/chunk-NUAYUXZP.mjs +2 -0
- package/dist/chunk-RXQHZWUI.mjs +2 -0
- package/dist/chunk-SGJRMTCU.mjs +2 -0
- package/dist/chunk-UV7GEUS5.mjs +2 -0
- package/dist/chunk-UXIKFNOT.mjs +2 -0
- package/dist/chunk-W3QE2JLZ.mjs +2 -0
- package/dist/chunk-W6A3YT5H.mjs +2 -0
- package/dist/chunk-XFSPH3AD.mjs +2 -0
- package/dist/chunk-ZHJH75ZM.mjs +2 -0
- package/dist/chunk-ZJAFEYVE.mjs +2 -0
- package/dist/icons/index.d.ts +36 -1
- package/dist/icons/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +66 -47
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as 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&<(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 Em,$a as b0,$b as da,$c as wa,A as Ht,Aa as t0,Ab as na,Ac as Sp,Ad as wf,B as dm,Ba as r0,Bb as ia,Bc as Mp,Bd as Cf,C as um,Ca as o0,Cb as B0,Cc as Rp,Cd as Nf,D as mm,Da as a0,Db as F0,Dc as Wt,Dd as kf,E as pm,Ea as n0,Eb as W0,Ec as Tp,Ed as Gt,F as Bo,Fa as Yo,Fb as U0,Fc as Lp,Fd as Pf,G as Fo,Ga as Zo,Gb as G0,Gc as Ep,Gd as Sf,H as Wo,Ha as qo,Hb as $0,Hc as Ap,Hd as Mf,I as Uo,Ia as Xo,Ib as sa,Ic as Dp,Id as Rf,J as Go,Ja as Jo,Jb as K0,Jc as Ip,Jd as Na,K as fm,Ka as i0,Kb as j0,Kc as xa,Kd as Tf,L as gm,La as s0,Lb as Y0,Lc as zp,Ld as Lf,M as hm,Ma as l0,Mb as Z0,Mc as Op,Md as Ef,N as vm,Na as Qo,Nb as q0,Nc as _p,Nd as Af,O as bm,Oa as ea,Ob as X0,Oc as Hp,Od as Df,P as xm,Pa as ta,Pb as J0,Pc as Vp,Pd as If,Q as ym,Qa as c0,Qb as Q0,Qc as Bp,Qd as zf,R as wm,Ra as d0,Rb as ep,Rc as Fp,S as Cm,Sa as u0,Sb as tp,Sc as Wp,T as Nm,Ta as m0,Tb as rp,Tc as Ut,U as km,Ua as p0,Ub as op,Uc as Up,V as Pm,Va as Mr,Vb as ap,Vc as Gp,W as Sm,Wa as f0,Wb as la,Wc as $p,X as Mm,Xa as g0,Xb as np,Xc as Kp,Y as Rm,Ya as h0,Yb as ip,Yc as ya,Z as Tm,Za as ra,Zb as ca,Zc as jp,_ as Lm,_a as v0,_b as sp,_c as Yp,a as Eo,aa as Am,ab as x0,ac as lp,ad as Zp,b as Ju,ba as Dm,bb as Vt,bc as cp,bd as qp,c as Qu,ca as Im,cb as y0,cc as dp,cd as Xp,d as Ao,da as zm,db as w0,dc as up,dd as Jp,e as Do,ea as Om,eb as C0,ec as mp,ed as Qp,f as em,fa as _m,fb as N0,fc as ua,fd as ef,g as Io,ga as Hm,gb as k0,gc as ma,gd as tf,h as zo,ha as $o,hb as P0,hc as pa,hd as rf,i as Oo,ia as Vm,ib as S0,ic as pp,id as of,j as _o,ja as Bm,jb as Bt,jc as fa,jd as af,k as bt,ka as Fm,kb as M0,kc as fp,kd as nf,l as tm,la as Wm,lb as R0,lc as ga,ld as sf,m as Ne,ma as Um,mb as T0,mc as gp,md as lf,n as rm,na as Gm,nb as L0,nc as ha,nd as cf,o as zt,oa as $m,ob as E0,oc as va,od as df,p as om,pa as Km,pb as Ft,pc as hp,pd as uf,q as am,qa as Ko,qb as A0,qc as vp,qd as mf,r as Ot,ra as jm,rb as D0,rc as bp,rd as pf,s as nm,sa as Ym,sb as I0,sc as xp,sd as ff,t as Ho,ta as Zm,tb as z0,tc as ba,td as Ca,u as Vo,ua as qm,ub as O0,uc as yp,ud as gf,v as im,va as jo,vb as oa,vc as wp,vd as hf,w as sm,wa as Xm,wb as _0,wc as Cp,wd as vf,x as lm,xa as Jm,xb as H0,xc as Np,xd as bf,y as _t,ya as Qm,yb as V0,yc as kp,yd as xf,z as cm,za as e0,zb as aa,zc as Pp,zd as yf}from"./chunk-ZHJH75ZM.mjs";import{a as Z}from"./chunk-NWME2ANF.mjs";import{a as No,b as At,c as ko,d as Po,e as vt,f as So,g as Mo,h as O,i as Ce,j as Ro,k as fe,l as i,m as Dt,n as It,o as To,p as Lo}from"./chunk-MWNK3I2K.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as ui}from"lucide-react";import*as Kt from"react";import{jsx as $t,jsxs as gi}from"react/jsx-runtime";var Ff=ne.Root,mi=Kt.forwardRef(({className:e,...t},r)=>$t(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));mi.displayName="AccordionItem";var pi=Kt.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?ui:Ut;return $t(ne.Header,{className:"flex",children:gi(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,$t(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});pi.displayName=ne.Trigger.displayName;var fi=Kt.forwardRef(({className:e,children:t,...r},o)=>$t(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}));fi.displayName=ne.Content.displayName;import{cva as hi}from"class-variance-authority";import*as jt from"react";import{jsx as Rr}from"react/jsx-runtime";var vi=hi("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"}}),bi=jt.forwardRef(({className:e,variant:t,...r},o)=>Rr("div",{ref:o,role:"alert",className:i(vi({variant:t}),e),...r}));bi.displayName="Alert";var xi=jt.forwardRef(({className:e,...t},r)=>Rr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));xi.displayName="AlertTitle";var yi=jt.forwardRef(({className:e,...t},r)=>Rr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));yi.displayName="AlertDescription";import{sha256 as wi}from"js-sha256";import{useState as Ci}from"react";import{jsx as Tr}from"react/jsx-runtime";function Ni(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/${wi(e.email)}?d=${encodeURIComponent(r)}`:t}function Zf({user:e={},className:t}){if(!e)return Tr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ci(Ni(e));return Tr("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 qf({id:e,className:t}){return Tr("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 ki}from"class-variance-authority";import{jsx as Si}from"react/jsx-runtime";var Pi=ki("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 Yt({className:e,variant:t,...r}){return Si("span",{className:i(Pi({variant:t}),e),...r})}import{cva as Ei}from"class-variance-authority";import{forwardRef as Ai}from"react";import*as ge from"@radix-ui/react-tooltip";import Mi from"linkify-react";import{HelpCircle as Ri}from"lucide-react";import Ti from"next/link";import{useState as Li}from"react";import{jsx as $,jsxs as Je}from"react/jsx-runtime";function d1({children:e}){return $(ge.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]=Li(!1);return Je(ge.Root,{open:s,onOpenChange:u,delayDuration:l,disableHoverableContent:a,children:[$(ge.Trigger,{asChild:!0,onClick:()=>{u(!0)},onBlur:()=>{u(!1)},children:e}),$(ge.Portal,{children:$(ge.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?$("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 u1({title:e,cta:t,href:r,target:o,onClick:a}){return Je("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[$("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?$(Ti,{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?$(se,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function m1({title:e,cta:t,href:r}){return Je("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",$("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 p1({children:e}){return $("div",{className:"block max-w-md whitespace-pre-wrap px-4 py-2 text-center text-sm text-neutral-700",children:$(Mi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:"underline underline-offset-4 text-neutral-400 hover:text-neutral-700"},children:e})})}function f1(e){return $(J,{...e,children:$(Ri,{className:"h-4 w-4 text-neutral-500"})})}function g1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:$(J,{content:Je("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Je("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Dt(e||0,{full:!0})," ",t]}),a&&Je("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Po(a,{withAgo:!0})]})]}),children:o})}function h1({children:e,content:t,...r}){return $(J,{content:t,...r,children:$("div",{className:"flex cursor-pointer items-center",children:$(Yt,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function v1({children:e,tooltipProps:t,...r}){return $(J,{...t,children:$("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 ka({children:e,tooltipProps:t}){return t?$(J,{...t,children:$("div",{children:e})}):e}import{jsx as Qe,jsxs as Pa}from"react/jsx-runtime";var ie=Ei("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=Ai(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:s,disabledTooltip:u,right:d,...n},p)=>u?Qe(J,{content:u,children:Pa("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&&Qe("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&Qe("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})]})}):Pa("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?Qe(Ne,{}):c||null,e&&Qe("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&Qe("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 Di}from"class-variance-authority";import{createContext as Ii}from"react";import{jsx as Sa}from"react/jsx-runtime";var zi=Di("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"}}}),xt=Ii({variant:"loose"});function Ma({variant:e="loose",loading:t=!1,className:r,children:o}){return Sa("ul",{className:i(zi({variant:e,loading:t}),r),"data-variant":e,children:Sa(xt.Provider,{value:{variant:e},children:o})})}import{cva as Oi}from"class-variance-authority";import{createContext as _i,useContext as Hi,useEffect as Vi,useRef as Bi,useState as Fi}from"react";import{jsx as Ra,jsxs as Gi}from"react/jsx-runtime";var Wi=Oi("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"}}}),Ui="w-full py-2.5 px-4",Lr=_i({hovered:!1});function Ta({outerClassName:e,innerClassName:t,children:r,onClick:o,hoverStateEnabled:a=!0,banner:l}){let{variant:c}=Hi(xt),s=Bi(null),[u,d]=Fi(!1);return Vi(()=>{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]),Gi("li",{ref:s,className:i(Wi({variant:c}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":a,children:[l,Ra("div",{className:i(Ui,t),onClick:o?n=>{document.getElementById("modal-backdrop")||vt(n)||o()}:void 0,children:Ra(Lr.Provider,{value:{hovered:u},children:r})})]})}var F1=Object.assign(Ma,{Card:Object.assign(Ta,{Context:Lr}),Context:xt});import $i from"embla-carousel-autoplay";import Ki from"embla-carousel-react";import{ArrowLeft as ji,ArrowRight as Yi}from"lucide-react";import{createContext as Zi,forwardRef as wt,useCallback as yt,useContext as qi,useEffect as Er,useState as Ar}from"react";import{jsx as ke,jsxs as Aa}from"react/jsx-runtime";var Dr=2e3,La=Zi(null);function he(){let e=qi(La);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Ea(){let{api:e}=he(),[t,r]=Ar(0),o=yt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Er(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Xi=wt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...s},u)=>{let[d,n]=Ki({...t,axis:e==="horizontal"?"x":"y"},[...o?[$i(typeof o=="object"?o:{delay:Dr})]:[],...a||[]]),[p,f]=Ar(!1),[g,b]=Ar(!1),h=yt(M=>{!M||(f(M.canScrollPrev()),b(M.canScrollNext()))},[]),v=yt(()=>{n==null||n.scrollPrev()},[n]),N=yt(()=>{n==null||n.scrollNext()},[n]),C=yt(M=>{M.key==="ArrowLeft"?(M.preventDefault(),v()):M.key==="ArrowRight"&&(M.preventDefault(),N())},[v,N]);return Er(()=>{!n||!r||r(n)},[n,r]),Er(()=>{if(!!n)return h(n),n.on("reInit",h),n.on("select",h),()=>{n==null||n.off("select",h)}},[n,h]),ke(La.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:ke("div",{ref:u,onKeyDownCapture:C,className:i("relative",l),role:"region","aria-roledescription":"carousel",...s,children:c})})});Xi.displayName="Carousel";var Ji=wt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=he();return ke("div",{ref:o,className:"overflow-hidden",children:ke("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Ji.displayName="CarouselContent";var Qi=wt(({className:e,...t},r)=>{let{orientation:o}=he();return ke("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})});Qi.displayName="CarouselItem";var es=wt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=he();return Aa("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:[ke(ji,{className:"h-4 w-4"}),ke("span",{className:"sr-only",children:"Previous slide"})]})});es.displayName="CarouselPrevious";var ts=wt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=he();return Aa("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:[ke(Yi,{className:"h-4 w-4"}),ke("span",{className:"sr-only",children:"Next slide"})]})});ts.displayName="CarouselNext";import{cva as rs}from"class-variance-authority";import{motion as os}from"framer-motion";import{ChevronLeft as as,ChevronRight as ns}from"lucide-react";import*as Ae from"react";import{jsx as Ue,jsxs as Ct}from"react/jsx-runtime";var is=rs("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 "}}}),ng=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=he(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[u,d]=Ae.useState(0),[n,p]=Ae.useState(!1),f=Ae.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),g=Ae.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Ae.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]),Ct("div",{className:i(is({variant:e}),t),children:[e!=="simple"&&Ct("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:g(o),children:[Ue(as,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ue("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,v)=>Ct("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:[Ue("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&&Ue(os.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Dr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Ct("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Ct("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:g(r),children:[Ue(ns,{className:"h-4 w-4"}),Ue("span",{className:"sr-only",children:"Next slide"})]})]})};import ss from"embla-carousel-react";import{forwardRef as ls,useCallback as cs,useEffect as ds}from"react";import{jsx as Zt}from"react/jsx-runtime";var fg=({className:e,...t})=>{let{api:r}=he(),[o,a]=ss({dragFree:!0}),l=cs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return ds(()=>{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]),Zt("div",{className:"overflow-hidden",ref:o,children:Zt("div",{className:i("mx-4 flex gap-4",e),...t})})},gg=ls(({index:e,className:t,...r},o)=>{let{api:a}=he(),l=Ea();return Zt("div",{ref:o,children:Zt("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 Nt from"@radix-ui/react-checkbox";import{Check as us}from"lucide-react";import*as Da from"react";import{jsx as Ir}from"react/jsx-runtime";var ms=Da.forwardRef(({className:e,...t},r)=>Ir(Nt.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:Ir(Nt.Indicator,{className:"flex items-center justify-center",children:Ir(us,{className:"h-3 w-3 text-white"})})}));ms.displayName=Nt.Root.displayName;import{Command as Pt,CommandInput as rl,CommandItem as ol,useCommandState as al}from"cmdk";import{ChevronDown as nl}from"lucide-react";import{forwardRef as il,isValidElement as sl,useCallback as ll,useEffect as Qt,useRef as cl,useState as kt}from"react";import{motion as Qs}from"framer-motion";import{forwardRef as el,useRef as tl}from"react";import zr from"js-cookie";import{useEffect as ps,useState as fs}from"react";function Cg(e,t,r){let[o,a]=fs(()=>{let c=zr.get(e);return c?JSON.parse(c):t});return ps(()=>{let c=()=>{let s=zr.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),zr.set(e,JSON.stringify(c),r)}]}import{useCallback as gs,useEffect as hs,useRef as vs,useState as bs}from"react";var et=(e=3e3)=>{let t=vs(null),[r,o]=bs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=gs(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 hs(()=>()=>a(),[]),[r,l]};import{useEffect as xs,useState as ys}from"react";function Mg(){let[e,t]=ys(null);return xs(()=>{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 Tg(e){return{handleKeyDown:r=>{r.key==="Enter"&&r.metaKey&&(r.preventDefault(),e.current&&e.current.requestSubmit())}}}import{useEffect as ws,useState as Cs}from"react";function Dg(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Cs(o??!1);return ws(()=>{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 Ns,useState as ks}from"react";function Og(){let[e,t]=ks(!1);return Ns(()=>{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 Ss}from"react";function Bg(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=Ss(),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 Ms,useCallback as Rs,useContext as Ts,useEffect as Ia,useId as Ls,useState as Es}from"react";import{jsx as As}from"react/jsx-runtime";var za=Ms({listeners:[],setListeners:()=>{}});function Kg({children:e}){let[t,r]=Es([]);return As(za.Provider,{value:{listeners:t,setListeners:r},children:e})}function tt(e,t,r={}){let o=Ls(),{listeners:a,setListeners:l}=Ts(za),c=Rs(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||ko(p,(g,b)=>(b.priority??0)-(g.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.modal,r.sheet]);Ia(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),Ia(()=>(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 Ds,useState as Is}from"react";function Oa(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Zg(e,t){let[r,o]=Is(Oa(e)??t);return Ds(()=>{let l=Oa(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as zs}from"sonner";import Os from"swr";function eh(e,t){let{data:r,isLoading:o,mutate:a}=Os(e,fe);return{data:r,isLoading:o,update:async(l,c)=>zs.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 Ba,useMemo as Ws}from"react";import{useEffect as _a,useState as _s}from"react";function Ha({pageSize:e,page:t,onPageChange:r}){let[o,a]=_s({pageIndex:t,pageSize:e});return _a(()=>{a(l=>({...l,pageIndex:t}))},[t]),_a(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Hs,useRouter as Vs,useSearchParams as Bs}from"next/navigation";import{useCallback as Fs}from"react";function Va(){let e=Hs(),t=Vs(),r=Bs(),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=Fs(({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 mh(e=To){let{searchParams:t,queryParams:r}=Va(),o=Ws(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ha({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page"}:{set:{page:c.toString()}})}});return Ba(()=>{let c=parseInt(t.get("page")||"1")||1;l(s=>({...s,pageIndex:c}))},[t.get("page")]),Ba(()=>{r(a.pageIndex===1?{del:"page"}:{set:{page:a.pageIndex.toString()}})},[a]),{pagination:a,setPagination:l}}import{useEffect as Us}from"react";function gh(){Us(()=>{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 Gs,useState as $s}from"react";function qt(e){let[t,r]=$s(),o=([a])=>{r(a)};return Gs(()=>{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 Ks,useEffect as Fa,useState as js}from"react";function Wa(e){let[t,r]=js(!1),o=Ks(()=>{r(window.scrollY>e)},[e]);return Fa(()=>(window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)),[o]),Fa(()=>{o()},[o]),t}import{useCallback as Ys,useEffect as Zs,useState as qs}from"react";function rt(e){let[t,r]=qs(1),o=Ys(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(l/(c-s),1))},[]),a=qt(e);return Zs(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as Xs}from"react";import{toast as Ga}from"sonner";import{jsx as Xt,jsxs as Ua}from"react/jsx-runtime";function Js({id:e,message:t,undo:r}){let o=()=>{r(),Ga.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return Xs(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),Ua("div",{className:"flex w-full items-center justify-between space-x-2",children:[Ua("div",{className:"flex items-center space-x-2",children:[Xt(Oo,{}),Xt("p",{className:"font-medium",children:t})]}),Xt("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 Th(){return({id:t,message:r,undo:o,duration:a})=>Ga(Xt(Js,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as $a}from"react/jsx-runtime";var Pe=el(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let s=tl(null),u=qt(s);return $a(Qs.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:$a("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});Pe.displayName="AnimatedSizeContainer";import*as De from"@radix-ui/react-popover";import{Drawer as ot}from"vaul";import{jsx as Se,jsxs as Jt}from"react/jsx-runtime";function at({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}=Z();return c||g?Jt(ot.Root,{open:a,onOpenChange:l,children:[Se(ot.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Jt(ot.Portal,{children:[Se(ot.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),Jt(ot.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:[Se("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Se("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Se("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})]}),Se(ot.Overlay,{})]})]}):Jt(De.Root,{open:a,onOpenChange:l,children:[Se(De.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Se(De.Portal,{children:Se(De.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 er,jsx as E,jsxs as Me}from"react/jsx-runtime";function dl(e,t){return e===!0}function av({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:M,optionRight:k,optionClassName:w,matchTriggerWidth:D,hideSearch:y=!1,children:R}){let L=dl(e,r),F=Array.isArray(t)?t:t?[t]:[],{isMobile:S}=Z(),[z,X]=kt(!1),A=b??z,ue=h??X,[G,kr]=kt(""),[yo,Pr]=kt(!1),[Sr,li]=kt(void 0),[ci,wo]=kt(!1),di=H=>{var Xe;if(L){let Fe=F.some(({value:We})=>We===H.value);r(Fe?F.filter(({value:We})=>We!==H.value):[...F,H])}else r(F.length&&((Xe=F[0])==null?void 0:Xe.value)===H.value?null:H),ue(!1)},Co=ll((H,Xe)=>Xe===""?[...H.filter(Fe=>Fe.first&&!F.some(We=>We.value===Fe.value)),...F,...H.filter(Fe=>!Fe.first&&!F.some(We=>We.value===Fe.value))]:H,[F]);return Qt(()=>{yo&&(li(o&&Co(o,G)),Pr(!1))},[yo,o,Co,G]),Qt(()=>{Pr(!0)},[o]),Qt(()=>{A||(kr(""),Pr(!0))},[A]),Qt(()=>v==null?void 0:v(G),[G]),E(at,{openPopover:A,setOpenPopover:ue,align:"start",side:g,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(D&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(Pe,{width:!S&&!D,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Me(Pt,{loop:!0,shouldFilter:N,children:[!y&&Me("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(rl,{placeholder:c,value:G,onValueChange:kr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",M),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!G)&&(H.preventDefault(),H.stopPropagation(),ue(!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(ul,{children:E(Pt.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Sr!==void 0?Me(er,{children:[Sr.map(H=>E(ml,{option:H,multiple:L,selected:F.some(({value:Xe})=>Xe===H.value),onSelect:()=>di(H),right:k==null?void 0:k(H),className:w},`${H.label}, ${H.value}`)),G.length>0&&d&&Me(ol,{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()=>{wo(!0),await(d==null?void 0:d(G))&&(kr(""),ue(!1)),wo(!1)},children:[ci?E(Ne,{className:"size-4 shrink-0"}):E(Ut,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(u==null?void 0:u(G))||`Create "${G}"`})]}),N?E(fl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Sr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(Pt.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Ne,{})})})})})]})}),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:Me(er,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:R||F.map(H=>H.label).join(", ")||l}),f&&(f===!0?E(nl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:a?Ka(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var ul=({children:e})=>{let t=cl(null),{scrollProgress:r,updateScrollProgress:o}=rt(t);return Me(er,{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 ml({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Me(er,{children:[E(pl,{disabledTooltip:e.disabledTooltip,children:Me(Pt.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(qo,{className:"size-4 text-neutral-600"}):E(Xo,{className:"size-4 text-neutral-400"})}),Me("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:Ka(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(Zo,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(Pt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var pl=({children:e,disabledTooltip:t})=>t?E(J,{content:t,children:E("div",{children:e})}):e,Ka=e=>sl(e),fl=il((e,t)=>al(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as tr,format as gl,isSameMonth as hl}from"date-fns";import{ChevronLeft as ja,ChevronRight as Ya,ChevronsLeft as vl,ChevronsRight as bl}from"lucide-react";import{forwardRef as xl,useRef as yl}from"react";import{DayPicker as wl,useDayPicker as Cl,useDayRender as Nl,useNavigation as kl}from"react-day-picker";import{Fragment as Pl,jsx as oe,jsxs as rr}from"react/jsx-runtime";var St=xl(({onClick:e,icon:t,disabled:r,...o},a)=>oe("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:oe(t,{className:"h-full w-full shrink-0"})}));St.displayName="NavigationButton";function Za({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:s,...u}){return oe(wl,{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:()=>oe(ja,{className:"h-4 w-4"}),IconRight:()=>oe(Ya,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:p,previousMonth:f,currentMonth:g,displayMonths:b}=kl(),{numberOfMonths:h,fromDate:v,toDate:N}=Cl(),C=b.findIndex(L=>hl(d.displayMonth,L)),M=C===0,k=C===b.length-1,w=h>1&&(M||!k),D=h>1&&(k||!M),y=()=>{let L=tr(g,-1);f&&(!v||L.getTime()>=v.getTime())&&n(L)},R=()=>{let L=tr(g,1);p&&(!N||L.getTime()<=N.getTime())&&n(L)};return rr("div",{className:"flex items-center justify-between",children:[rr("div",{className:"flex items-center gap-1",children:[o&&!D&&oe(St,{disabled:a||!f||v&&tr(g,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:y,icon:vl}),!D&&oe(St,{disabled:a||!f,"aria-label":"Go to previous month",onClick:()=>f&&n(f),icon:ja})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:gl(d.displayMonth,"LLLL yyy",{locale:l})}),rr("div",{className:"flex items-center gap-1",children:[!w&&oe(St,{disabled:a||!p,"aria-label":"Go to next month",onClick:()=>p&&n(p),icon:Ya}),o&&!w&&oe(St,{disabled:a||!p||N&&tr(g,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:R,icon:bl})]})]})},Day:({date:d,displayMonth:n})=>{let p=yl(null),{activeModifiers:f,buttonProps:g,divProps:b,isButton:h,isHidden:v}=Nl(d,n,p),{selected:N,today:C,disabled:M,range_middle:k}=f;if(v)return oe(Pl,{});if(!h)return oe("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:w,...D}=g;return rr("button",{ref:p,...D,type:"button",children:[w,C&&oe("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!N,"!bg-white":N,"!bg-blue-400":N&&k,"text-neutral-400":M})})]})}},...u})}import{enUS as Ol}from"date-fns/locale";import{useEffect as Fr,useMemo as Xa,useState as ar}from"react";import{Command as Or}from"cmdk";import{Lock as Sl}from"lucide-react";import{jsx as Ge,jsxs as Ml}from"react/jsx-runtime";var _r=({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 Ge(Or,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ge(Or.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Ml(Or.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:[Ge("span",{children:d.label}),d.requiresUpgrade?Ge(Sl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?Ge("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&Ge(J,{side:"bottom",content:d.tooltipContent,children:Ge("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};_r.displayName="DatePicker.Presets";import{format as Ie}from"date-fns";import{createContext as Rl}from"react";var Hr=Rl({isOpen:!1,setIsOpen:()=>{}}),Tl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},Vr=(e,t,r=!1)=>{let o=!Tl(),a;return r?a=o?Ie(e,"d MMM, yyyy h:mm a",{locale:t}):Ie(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ie(e,"d MMM, yyyy",{locale:t}),a},qa=(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 ${Ie(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 M=(g=n.dateRange.from)==null?void 0:g.getMonth();if(M&&M<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ie(a,"MMM, yyyy")}.`)}if(l){let M=(b=n.dateRange.to)==null?void 0:b.getMonth();if(M&&M>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ie(l,"MMM, yyyy")}.`)}if(c){let M=(h=n.dateRange.from)==null?void 0:h.getDate();if(M&&M<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ie(c,"MMM dd, yyyy")}.`)}if(s){let M=(v=n.dateRange.to)==null?void 0:v.getDate();if(M&&M>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ie(s,"MMM dd, yyyy")}.`)}}})}};import{cva as Ll}from"class-variance-authority";import{Calendar as El,ChevronDown as Al}from"lucide-react";import{forwardRef as Dl}from"react";import{jsx as or,jsxs as zl}from"react/jsx-runtime";var Il=Ll(["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"}}}),Br=Dl(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>zl("button",{ref:l,className:i(Il({hasError:o}),e),...a,children:[or(El,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),or("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?or("span",{className:"text-neutral-400",children:r}):null)}),or(Al,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Br.displayName="DatePicker.Trigger";import{jsx as ve,jsxs as Hl}from"react/jsx-runtime";var _l=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:s,showYearNavigation:u=!1,locale:d=Ol,placeholder:n="Select date range",hasError:p,align:f="center",className:g,...b})=>{let{isDesktop:h}=Z(),[v,N]=ar(!1),[C,M]=ar(a&&r?a==null?void 0:a.find(({id:A})=>A===r):void 0),[k,w]=ar((C==null?void 0:C.dateRange)??e??t??void 0),[D,y]=ar(k==null?void 0:k.to),R=Xa(()=>k,[v]);Fr(()=>{w(e)},[e]),Fr(()=>{let A=a==null?void 0:a.find(({id:ue})=>ue===r);M(A),w((A==null?void 0:A.dateRange)??e??t)},[a,r]),Fr(()=>{v?k&&y(k.to):y(k==null?void 0:k.to)},[v]);let L=(A,ue)=>{let G=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:ue}:A;w(G),M(void 0),(G==null?void 0:G.from)&&(G==null?void 0:G.to)&&(o==null||o(G),N(!1))},F=A=>{w(A.dateRange),M(A),o==null||o(A.dateRange,A),N(!1)},S=()=>{w(R),N(!1)},z=A=>{A||S(),N(A)},X=Xa(()=>k?`${k.from?Vr(k.from,d):""} - ${k.to?Vr(k.to,d):""}`:null,[k,d]);return tt((a==null?void 0:a.filter(A=>A.shortcut).map(A=>A.shortcut))??[],A=>{let ue=a==null?void 0:a.find(G=>G.shortcut===A.key);ue&&F(ue)}),ve(Hr.Provider,{value:{isOpen:v,setIsOpen:N},children:ve(at,{align:f,openPopover:v,setOpenPopover:z,popoverContentClassName:"rounded-xl",content:ve("div",{className:"flex w-full",children:Hl("div",{className:"scrollbar-hide flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&ve("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:ve("div",{className:"absolute px-3 sm:inset-0 sm:left-0 sm:p-3",children:ve(_r,{currentPresetId:r,currentValue:k,presets:a,onSelect:F})})}),ve("div",{className:"scrollbar-hide overflow-x-scroll",children:ve(Za,{mode:"range",selected:k,onSelect:L,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:ve(Br,{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)??X})})})};function Fv({presets:e,...t}){return e&&qa(e,t),ve(_l,{presets:e,...t})}import{jsx as nr,jsxs as Ja}from"react/jsx-runtime";function jv({icon:e,title:t,description:r,learnMore:o,children:a}){return Ja("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[nr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:nr(e,{className:"size-6 text-neutral-800"})}),nr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&Ja("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&nr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Vl}from"class-variance-authority";import{useState as Qa}from"react";import{toast as en}from"sonner";import{Fragment as Fl,jsx as be,jsxs as Ur}from"react/jsx-runtime";var tn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],Wr={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:tn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg"],errorMessage:"File type not supported (.svg., .png, or .jpg only)"},programResourceFiles:{types:[...tn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Bl=Vl("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-neutral-50",{variants:{variant:{default:"rounded-md border border-neutral-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function a2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:s=ra,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[M,k]=Qa(!1),[w,D]=Qa(null),y=async R=>{let L="dataTransfer"in R?R.dataTransfer.files&&R.dataTransfer.files[0]:R.target.files&&R.target.files[0];if(!L)return;if(D(L.name),h>0&&L.size/1024/1024>h){en.error(`File size too big (max ${h} MB)`);return}let F=Wr[d].types;if(F.length&&!F.includes(L.type)){en.error(Wr[d].errorMessage??"File type not supported");return}let S=L;if(v&&L.type.startsWith("image/"))try{let z=await No(L,v),X=await fetch(z).then(A=>A.blob());S=new File([X],L.name,{type:L.type})}catch(z){console.error("Error resizing image:",z)}if(t){let z=new FileReader;z.onload=X=>{var A;return r==null?void 0:r({src:(A=X.target)==null?void 0:A.result,file:S})},z.readAsDataURL(S);return}r==null||r({file:S})};return Ur("label",{className:i(Bl({variant:o}),C?"cursor-not-allowed":i(f&&"cursor-pointer"),a),children:[p&&be("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:be(bt,{})}),be("div",{className:"absolute inset-0 z-[5]",onDragOver:R=>{R.preventDefault(),R.stopPropagation(),k(!0)},onDragEnter:R=>{R.preventDefault(),R.stopPropagation(),k(!0)},onDragLeave:R=>{R.preventDefault(),R.stopPropagation(),k(!1)},onDrop:async R=>{R.preventDefault(),R.stopPropagation(),y(R),k(!1)}}),Ur("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",M&&!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:[be(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",M?"scale-110":"scale-100"),l)}),b!==null&&be("div",{className:i("mt-2 text-center text-sm text-neutral-500",C&&"text-neutral-400"),children:b??be(Fl,{children:Ur("p",{children:["Drag and drop ",f&&"or click"," to upload."]})})}),be("span",{className:"sr-only",children:N})]}),n&&(u??be("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),f&&be("div",{className:"sr-only mt-1 flex shadow-sm",children:be("input",{id:e,type:"file",accept:Wr[d].types.join(","),onChange:y,disabled:C},w)})]})}import{AnimatePresence as Wl,motion as rn}from"framer-motion";import{X as Ul}from"lucide-react";import{isValidElement as Gl}from"react";import{Fragment as $l,jsx as ee,jsxs as Mt}from"react/jsx-runtime";function an({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return tt("Escape",o,{priority:1}),ee(Pe,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Mt("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[ee("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:ee(Wl,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return ee(rn.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 Mt(rn.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:[Mt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[ee("span",{className:"shrink-0 text-neutral-600",children:on(s.icon)?s.icon:ee(s.icon,{className:"h-4 w-4"})}),s.label]}),ee("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),ee("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?Mt($l,{children:[ee("span",{className:"shrink-0 text-neutral-600",children:on(n)?n:ee(n,{className:"h-4 w-4"})}),At(p,30)]}):ee("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),ee("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,u),children:ee(Ul,{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&&Mt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",ee("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var on=e=>Gl(e);import{Command as ze,useCommandState as Kl}from"cmdk";import{ChevronDown as jl,ListFilter as Yl}from"lucide-react";import{Fragment as Zl,forwardRef as ql,isValidElement as sn,useCallback as ir,useEffect as sr,useImperativeHandle as Xl,useRef as $r,useState as Gr}from"react";import{Fragment as oc,jsx as V,jsxs as xe}from"react/jsx-runtime";function ln({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:s,children:u,emptyState:d,className:n}){var L,F;let{isMobile:p}=Z(),f=$r(null),g=$r(),[b,h]=Gr(!1);tt("f",()=>h(!0),{enabled:!b});let[v,N]=Gr(""),[C,M]=Gr(null),k=ir(()=>{N(""),M(null)},[]);sr(()=>{b||k()},[b]);let w=C?e.find(({key:S})=>S===C):null,D=ir(S=>{f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight}),N(""),M(S),o==null||o(S)},[]),y=ir(S=>{if(!w||!c)return!1;let z=c.find(({key:X})=>X===C);return(z==null?void 0:z.value)===S||z&&w.multiple&&Array.isArray(z.value)&&z.value.includes(S)},[w]),R=ir(S=>{w&&(y(S)?r(w.key,S):t(w.key,S),w.multiple||h(!1))},[c,w,s]);return sr(()=>{a==null||a(v)},[v]),sr(()=>{l==null||l(C)},[C]),sr(()=>{(w==null?void 0:w.options)&&f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight})},[w==null?void 0:w.options]),V(at,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:S=>{C&&(S.preventDefault(),k())},content:V(Pe,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:xe(ze,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[xe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[V(Ql,{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)):R(v)}}),!w&&V("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),V(ec,{ref:f,children:xe(ze.List,{className:i("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((F=(L=w.options)==null?void 0:L.filter(S=>!v||!S.hideDuringSearch))==null?void 0:F.map(S=>{let z=y(S.value);return V(nn,{filter:w,option:S,right:z?V(Yo,{className:"h-4 w-4"}):S.right,onSelect:()=>R(S.value)},S.value)}))??V(ze.Loading,{children:V("div",{className:"-m-1 flex items-center justify-center",style:g.current,children:V(Ne,{})})}):e.map(S=>xe(Zl,{children:[V(nn,{filter:S,onSelect:()=>D(S.key)}),S.separatorAfter&&V(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},S.key)),(!w||w.options)&&V(tc,{search:v,askAI:s,children:d?Jl(d)?(d==null?void 0:d[C??"default"])??"No matches":d:"No matches"})]})},C)]})}),children:xe("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:[V(Yl,{className:"size-4 shrink-0"}),V("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:u??"Filter"}),c!=null&&c.length?V("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):V(jl,{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&&!sn(e)}var Ql=e=>{let t=Kl(r=>r.filtered.count===0);return V(ze.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},ec=ql(({children:e},t)=>{let r=$r(null);Xl(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=rt(r);return xe(oc,{children:[V("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),V("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function nn({filter:e,option:t,right:r,onSelect:o}){var s,u;let{isMobile:a}=Z(),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 xe(ze.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:[V("span",{className:"shrink-0 text-neutral-600",children:rc(l)?l:V(l,{className:"h-4 w-4"})}),At(c,48),V("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var tc=({search:e,askAI:t,children:r})=>t&&e?xe(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[V(Do,{className:"h-4 w-4"}),xe("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",xe("span",{className:"text-black",children:['"',e,'"']})]})]}):V(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),rc=e=>sn(e);var R2={Select:ln,List:an};import{useMemo as ac,useState as cn}from"react";import{jsx as $e,jsxs as lr}from"react/jsx-runtime";function z2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[s,u]=cn(r.defaultValue),[d,n]=cn(!1),p=ac(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return lr("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:[lr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[lr("div",{className:"flex flex-col space-y-3",children:[$e("h2",{className:"text-xl font-medium",children:e}),$e("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?$e("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})}):$e("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),lr("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"?$e("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,$e("div",{className:"shrink-0",children:$e(se,{text:a,loading:d,disabled:p,disabledTooltip:l})})]})]})}import{useId as nc}from"react";import{jsx as cr,jsxs as ic}from"react/jsx-runtime";function dn({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=nc();return ic("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[cr("defs",{children:cr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:cr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),cr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as sc}from"lucide-react";import lc,{useCallback as cc,useState as dc}from"react";import{jsx as Ke,jsxs as Kr}from"react/jsx-runtime";var uc=lc.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=dc(!1),c=cc(()=>l(!a),[a,l]);return Kr("div",{children:[Kr("div",{className:"relative flex",children:[Ke("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}),Kr("div",{className:"group",children:[r.error&&Ke("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ke(sc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ke("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?Ke(aa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ke(na,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ke("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});uc.displayName="Input";import{flip as gc,offset as hc,size as vc,useDismiss as bc,useFloating as xc,useInteractions as yc}from"@floating-ui/react";import{Command as Re,useCommandState as wc}from"cmdk";import{Check as Cc,ChevronDown as Nc,Search as kc,X as Pc}from"lucide-react";import{createContext as Sc,forwardRef as gn,useContext as qr,useEffect as jr,useMemo as mn,useRef as pn,useState as Yr}from"react";import{Drawer as nt}from"vaul";import mc from"next/image";import{useEffect as pc,useState as un}from"react";import{jsx as fc}from"react/jsx-runtime";function Rt(e){let[t,r]=un(!0),[o,a]=un(e.src);pc(()=>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 fc(mc,{...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 dr=Sc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function ub({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:s,noItemsElement:u}){let{isMobile:d}=Z(),n=pn(null),[p,f]=Yr(!1),[g,b]=Yr(""),[h,v]=Yr(!1);jr(()=>{p&&v(!1)},[p]),jr(()=>v(!0),[g]),jr(()=>{t&&b(t.value)},[t]);let N=mn(()=>{let z=g.toLowerCase();return h?e.filter(X=>X.value.toLowerCase().includes(z)):g?e.sort((X,A)=>(A.value.toLowerCase().includes(z)?1:0)-(X.value.toLowerCase().includes(z)?1:0)):e},[h,g,e]),{refs:C,floatingStyles:M,context:k}=xc({open:p,onOpenChange:f,middleware:[hc(8),vc({apply({elements:{floating:z},availableHeight:X}){Object.assign(z.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),gc({fallbackStrategy:"initialPlacement",padding:8})]}),w=bc(k,{enabled:!d||!l}),{getReferenceProps:D,getFloatingProps:y}=yc([w]),R=pn(null),{scrollProgress:L,updateScrollProgress:F}=rt(R),S=mn(()=>t&&t.icon?t.icon:t&&t.image?I(Rt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||I(kc,{className:"size-4 text-neutral-400"}),[t,c]);return I(dr.Provider,{value:{inputAttrs:s||{},openCommandList:p,setOpenCommandList:f,inputValue:g,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?le(nt.Root,{open:p,onOpenChange:f,children:[I(nt.Trigger,{className:"sm:hidden",asChild:!0,children:I(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:I(Zr,{className:o,iconElement:S})})}),I(nt.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(nt.Portal,{children:[I(nt.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(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I("div",{className:"p-2",children:I(Zr,{className:o,iconElement:S})}),p&&le(Re.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(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),I(fn,{items:N})]})]})}),I(nt.Overlay,{})]})]}):le(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[I(Zr,{className:o,iconElement:S,ref:C.setReference,...D()}),p&&le("div",{ref:C.setFloating,style:M,...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:R,onScroll:F,className:"grow overflow-y-auto p-2",children:[le(Re.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(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),I(fn,{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(L,2)}})]})]})})}var Zr=gn(({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(Mc,{}),I(Rc,{})]})]})),Mc=gn((e,t)=>{let r=wc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:s,disabled:u}=qr(dr);return I(Re.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 Rc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=qr(dr);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(Nc,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function fn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=qr(dr);return e.map(a=>le(Re.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[le("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&I(Rt,{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(Yt,{className:"text-xs",variant:"neutral",children:a.label})]}),I(Cc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as Xr from"@radix-ui/react-label";import{cva as Tc}from"class-variance-authority";import*as hn from"react";import{jsx as Ac}from"react/jsx-runtime";var Lc=Tc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ec=hn.forwardRef(({className:e,...t},r)=>Ac(Xr.Root,{ref:r,className:i(Lc(),e),...t}));Ec.displayName=Xr.Root.displayName;import{cva as Dc}from"class-variance-authority";import{isValidElement as Ic}from"react";import{jsx as vn,jsxs as bn}from"react/jsx-runtime";var zc=Dc(["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 Nb({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return bn(e||"button",{...e==="button"?{type:"button"}:{},className:i(zc({variant:t}),l),...c,children:[bn("div",{className:"flex grow items-center gap-2",children:[o&&(Oc(o)?o:vn(o,{className:"size-4"})),r]}),a&&vn("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 Oc=e=>Ic(e);import{curveNatural as xn}from"@visx/curve";import{LinearGradient as yn}from"@visx/gradient";import{Group as _c}from"@visx/group";import{ParentSize as Hc}from"@visx/responsive";import{scaleLinear as Vc,scaleUtc as Bc}from"@visx/scale";import{Area as Fc,AreaClosed as Wc}from"@visx/shape";import{motion as wn}from"framer-motion";import{useId as Uc,useMemo as Cn}from"react";import{jsx as ye,jsxs as Jr}from"react/jsx-runtime";function Db(e){return ye(Hc,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&ye(Gc,{...{width:t,height:r,...e}})})}var Oe={top:8,right:2,bottom:2,left:2};function Gc({width:e,height:t,data:r,curve:o=!0,color:a}){let l=Uc(),c=Cn(()=>r.map(({date:d})=>({date:d,value:0})),[r]),{yScale:s,xScale:u}=Cn(()=>{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:Vc({domain:[-2,Math.max(n,2)],range:[t-Oe.top-Oe.bottom,0],nice:!0,clamp:!0}),xScale:Bc({domain:[f,g],range:[0,e-Oe.left-Oe.right],nice:!0})}},[r,t,e]);return Jr("svg",{width:e,height:t,children:[Jr("defs",{children:[ye(yn,{id:`${l}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-Oe.left-Oe.right,gradientUnits:"userSpaceOnUse"}),ye(yn,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),ye("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:ye("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),Jr(_c,{left:Oe.left,top:Oe.top,children:[ye(Fc,{data:r,x:({date:d})=>u(d),y:({value:d})=>s(d)??0,curve:o?xn:void 0,children:({path:d})=>ye(wn.path,{initial:{d:d(c)||"",opacity:0},animate:{d:d(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),ye(Wc,{data:r,x:({date:d})=>u(d),y:({value:d})=>s(d)??0,yScale:s,curve:o?xn:void 0,children:({path:d})=>ye(wn.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 Qr from"@radix-ui/react-visually-hidden";import{useRouter as $c}from"next/navigation";import{Drawer as je}from"vaul";import{jsx as ae,jsxs as it}from"react/jsx-runtime";function Vb({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:s}){let u=$c(),d=({dragged:p}={})=>{c&&!p||(a&&a(),o?o(!1):u.back())},{isMobile:n}=Z();return n&&!l?ae(je.Root,{open:o?r:!0,onOpenChange:p=>{p||d({dragged:!0})},...s,children:it(je.Portal,{children:[ae(je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(je.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:it("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[it(Qr.Root,{children:[ae(je.Title,{children:"Modal"}),ae(je.Description,{children:"This is a modal"})]}),ae(Kc,{}),e]})}),ae(je.Overlay,{})]})}):ae(ce.Root,{open:o?r:!0,onOpenChange:p=>{p||d()},children:it(ce.Portal,{children:[ae(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),it(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:[it(Qr.Root,{children:[ae(ce.Title,{children:"Modal"}),ae(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Kc(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as jc,jsx as ur,jsxs as st}from"react/jsx-runtime";var Nn=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 Wb({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return st("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[st("div",{className:"flex items-center gap-2",children:[st("div",{children:[ur("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&st(jc,{children:[st("span",{className:"font-medium",children:[(e.pageIndex-1)*e.pageSize+1,"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r)]})," ",c&&"of "]}),c&&ur("span",{className:"font-medium",children:Dt(r,{full:!0})})," ",typeof o=="function"?o(r!==1):o]}),l]}),st("div",{className:"flex items-center gap-2",children:[ur("button",{type:"button",className:Nn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),ur("button",{type:"button",className:Nn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as Yc}from"lucide-react";import*as eo from"react";import{jsx as mr}from"react/jsx-runtime";var Zc=eo.forwardRef(({className:e,...t},r)=>mr(_e.Root,{className:i("grid gap-2",e),...t,ref:r}));Zc.displayName=_e.Root.displayName;var qc=eo.forwardRef(({className:e,...t},r)=>mr(_e.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:mr(_e.Indicator,{className:"flex items-center justify-center",children:mr(Yc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));qc.displayName=_e.Item.displayName;import{Drawer as He}from"vaul";import{jsx as Ye,jsxs as td}from"react/jsx-runtime";function Xc({children:e,contentProps:t,nested:r=!1,...o}){let a=r?He.NestedRoot:He.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:td(He.Portal,{children:[Ye(He.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(He.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:Ye("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 Ye(He.Title,{className:i("text-xl font-medium text-zinc-900",e),...t})}function Qc(e){return Ye(He.Description,{...e})}function ed(e){return Ye(He.Close,{...e})}var qb=Object.assign(Xc,{Title:Jc,Description:Qc,Close:ed});import{useEffect as rd,useRef as od,useState as ad}from"react";import{jsx as kn}from"react/jsx-runtime";var nd=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|
|
6
6
|
{
|
|
7
7
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,id=`
|
|
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
|
+
`,sd=60,ld=1e3/sd;function ex({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=od(null),[l,c]=ad(!1);return rd(()=>{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 R=y===0?nd:id,L=n.createShader(y===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!L){console.error("Failed to create shader");return}n.shaderSource(L,R),n.compileShader(L),n.getShaderParameter(L,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(L)),n.attachShader(p,L),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],M=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,M),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<ld){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]),kn("div",{className:i("absolute inset-0",o,l&&"opacity-0"),children:kn("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import{cva as cd}from"class-variance-authority";import{jsx as md,jsxs as pd}from"react/jsx-runtime";var dd=cd("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"}}),ud={neutral:ta,new:Qo,success:Jo,pending:ea,warning:Mr,error:Mr};function ix({className:e,variant:t,icon:r,onClick:o,children:a,...l}){let c=r!==null?r??ud[t??"neutral"]:null;return pd("span",{className:i(dd({variant:t}),o&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:o,...l,children:[c&&md(c,{className:"h-3 w-3 shrink-0"}),a]})}import*as fr from"@radix-ui/react-switch";import{useMemo as fd}from"react";import{jsx as pr}from"react/jsx-runtime";function fx({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=fd(()=>d?!0:u||s,[d,u,s]),p=pr(fr.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:pr(fr.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?pr(J,{content:d,children:pr("div",{className:"inline-block leading-none",children:p})}):p}import{flexRender as ro,getCoreRowModel as gd,useReactTable as hd}from"@tanstack/react-table";import{AnimatePresence as vd,motion as bd}from"framer-motion";import{memo as xd,useEffect as to,useState as Pn}from"react";import{jsx as K,jsxs as me}from"react/jsx-runtime";var oo=(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"]),yd=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 Hx(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]=Pn(e.columnVisibility??{}),[g,b]=Pn(e.selectedRows??{});to(()=>{var v;(v=e.onRowSelectionChange)==null||v.call(e,h.getSelectedRowModel().rows)},[g]),to(()=>{e.columnVisibility&&!So(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),to(()=>{var v;(v=e.onColumnVisibilityChange)==null||v.call(e,p)},[p]);let h=hd({data:t,rowCount:r,columns:o,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:gd(),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 wd=xd(function({row:t,onRowClick:r,cellRight:o,tdClassName:a,table:l}){return K("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=>{vt(c)||r(t,c)}:void 0,children:t.getVisibleCells().map(c=>K("td",{className:i(oo(c.column.id,!!r),"text-content-default group",ao(c.column,t.index===l.getRowModel().rows.length-1),typeof a=="function"?a(c.column.id):a),style:{width:c.column.getSize(),...no(c.column)},children:me("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[K("div",{className:"min-w-0 shrink grow truncate",children:ro(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 Vx({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:M,children:k,enableColumnResizing:w=!1}){return me("div",{className:i("border-border-subtle bg-bg-default relative rounded-xl border",p),children:[!o&&!!(t!=null&&t.length)||r?me("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[me("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:[K("thead",{children:h.getHeaderGroups().map(D=>K("tr",{children:D.headers.map(y=>{let R=d.includes(y.column.id),L=R?"button":"div";return me("th",{colSpan:y.colSpan,className:i(oo(y.id),"text-content-emphasis select-none font-medium",ao(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"},...no(y.column)},children:[K("div",{className:"flex items-center justify-between gap-6 !pr-0",children:me(L,{className:"flex items-center gap-2",...R&&{type:"button",disabled:!R,"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:ro(y.column.columnDef.header,y.getContext()),R&&c===y.column.id&&K(zo,{className:"h-3 w-3 shrink-0",order:s||"desc"})]})}),w&&y.column.getCanResize()&&y.column.id!=="menu"&&K("div",{onMouseDown:y.getResizeHandler(),onTouchStart:y.getResizeHandler(),onClick:F=>F.stopPropagation(),className:yd})]},y.id)})},D.id))}),K("tbody",{children:h.getRowModel().rows.map(D=>w?K(wd,{row:D,onRowClick:C,cellRight:l,tdClassName:b,table:h},D.id):K("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=>{vt(y)||C(D,y)}:void 0,children:D.getVisibleCells().map(y=>K("td",{className:i(oo(y.column.id,!!C),"text-content-default group",ao(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",...no(y.column)},children:me("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[K("div",{className:"min-w-0 shrink grow truncate",children:ro(y.column.columnDef.cell,y.getContext())}),l==null?void 0:l(y)]})},y.id))},D.id))})]}),k]}):K("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)&&!!M&&me("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:[me("div",{children:[K("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",me("span",{className:"font-medium",children:[(v.pageIndex-1)*v.pageSize+1,"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,h.getRowCount())]})," ","of"," ",K("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(N==null?void 0:N(h.getRowCount()!==1))||"items"]}),me("div",{className:"flex items-center gap-2",children:[K(se,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:v.pageIndex===1}),K(se,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:v.pageIndex===h.getPageCount()})]})]}),K(vd,{children:r&&K(bd.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:K(Ne,{})})})]})}var ao=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},no=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 Cd,motion as Sn}from"framer-motion";import{useId as Nd}from"react";import{jsx as gr,jsxs as kd}from"react/jsx-runtime";function Gx({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:l,style:c}){let s=Nd();return gr(Cd,{id:s,children:gr(Sn.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=>kd("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"?gr("p",{children:u.label}):u.label,u.badge,u.value===t&&gr(Sn.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 Sd,useRef as Md,useState as Rd}from"react";import{jsx as pe,jsxs as io}from"react/jsx-runtime";var Td=[{key:"utm_source",icon:ca,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:wa,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:sa,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:va,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:xa,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:la,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function Jx({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:l}){let{isMobile:c}=Z(),s=Sd(),[u,d]=Rd(!1),n=Md(null);return Pd(()=>{n.current&&!c&&o&&setTimeout(()=>{var p;return(p=n.current)==null?void 0:p.focus()},10)},[]),pe("div",{className:i("grid gap-y-3",l),children:Td.map(({key:p,icon:f,label:g,placeholder:b,description:h},v)=>pe("div",{className:"group relative",children:io("div",{className:"relative z-10 flex",children:[pe(J,{content:io("div",{className:"p-3 text-center text-xs",children:[pe("p",{className:"text-neutral-600",children:h}),pe("span",{className:"font-mono text-neutral-400",children:p})]}),sideOffset:4,disableHoverableContent:!0,children:io("div",{className:i("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",u?"sm:min-w-36":"sm:min-w-28"),onClick:()=>d(N=>!N),children:[pe(f,{className:"size-4 shrink-0"}),pe("label",{htmlFor:`${s}-${p}`,className:"select-none text-sm",children:u?pe("span",{className:"font-mono text-xs",children:p}):g})]})}),pe("div",{className:"min-w-0 grow",children:pe(ka,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:pe("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 so,jsxs as Ld}from"react/jsx-runtime";function e4(){return Ld("div",{style:hr.backgroundMain,children:[so("div",{style:hr.backgroundMainBefore}),so("div",{style:hr.backgroundMainAfter}),so("div",{style:hr.backgroundContent})]})}var hr={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 fu from"next/image";import Ee from"next/link";import{useParams as gu}from"next/navigation";import{useEffect as hu,useState as Xn}from"react";import vu from"swr";import{jsx as Mn}from"react/jsx-runtime";function Rn(e){return Mn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Mn("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}var vr=[{title:"Dub Links",description:"Short links with superpowers",icon:fa,href:"/home"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:ba,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:Vt,href:"/docs/integrations"}],Tn=[{icon:Vo,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:Ho,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Rn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],lo=[{icon:Go,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/solutions/typescript"},{icon:Wo,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/solutions/python"},{icon:Bo,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/solutions/go"},{icon:Uo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/solutions/ruby"},{icon:Fo,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/solutions/php"}],Ln=[{icon:Ft,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:Wt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Gt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:lo}],br=[{icon:Ko,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:ua,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:ia,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:jo,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:ma,title:"Customers",description:"Success stories and use cases",href:"/customers"},{icon:pa,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"}],xr=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],En=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],n4=[{name:"X (Twitter)",icon:_t,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:Ht,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Ed}from"react/jsx-runtime";function yr({className:e,children:t}){return Ed("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Ve from"@radix-ui/react-popover";import{BoxSelect as ou,Home as au,LayoutGrid as nu,Type as iu}from"lucide-react";import{useParams as su}from"next/navigation";import{useCallback as lu,useContext as cu,useState as du}from"react";import{toast as uu}from"sonner";import{jsx as An}from"react/jsx-runtime";function co({className:e}){return An("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:An("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 64C49.6731 64 64 49.6731 64 32C64 20.1555 57.5648 9.81398 48 4.28103V31.9999V47.9999H40V45.8594C37.6466 47.2208 34.9143 47.9999 32 47.9999C23.1634 47.9999 16 40.8365 16 31.9999C16 23.1634 23.1634 15.9999 32 15.9999C34.9143 15.9999 37.6466 16.7791 40 18.1404V1.00814C37.443 0.350024 34.7624 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"currentColor"})})}import*as de from"@radix-ui/react-navigation-menu";import{LayoutGroup as Fd}from"framer-motion";import Tt from"next/link";import{useParams as Wd,usePathname as Ud}from"next/navigation";import{createContext as Gd,useId as $d}from"react";import Kd from"swr";import{Link as _n}from"@radix-ui/react-navigation-menu";import Hn from"next/link";import{jsx as P,jsxs as uo}from"react/jsx-runtime";function Dn(e){return uo("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:[uo("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:uo("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 Ad}from"react";import{jsx as m,jsxs as B}from"react/jsx-runtime";function In(e){let t=Ad();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{Link as zn}from"@radix-ui/react-navigation-menu";import On from"next/link";import{jsx as we,jsxs as wr}from"react/jsx-runtime";var lt="text-xs uppercase text-neutral-500 dark:text-white/60",Dd="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",te=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function ct({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:l,...c}){return we(zn,{asChild:!0,children:we(On,{className:i(Dd,a),...c,children:wr("div",{className:"flex items-center justify-between gap-3",children:[e,wr("div",{className:"flex-1",children:[we("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&we("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),l&&we(Ao,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}function Cr({icon:e,title:t,description:r,iconClassName:o,...a}){return we(zn,{asChild:!0,children:we(On,{...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:wr("div",{className:"flex items-center justify-between px-5 py-4",children:[wr("div",{children:[we("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),we("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]}),we(e,{className:i("size-6 text-neutral-700 dark:text-neutral-200",o)})]})})})}import{jsx as j,jsxs as Te}from"react/jsx-runtime";var Id=[{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:Vt,href:"/docs/integrations"}];function Vn({domain:e}){return Te("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Te("div",{className:"grid grid-cols-2 gap-4 p-4",children:[j(_n,{asChild:!0,children:Te(Hn,{href:O("/home",e,te({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:[Te("div",{className:"p-5 pb-0",children:[j("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Links"}),j("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"})]}),j("div",{className:"relative grow overflow-hidden",children:j(In,{className:"absolute bottom-0 h-auto w-full [mask-image:linear-gradient(transparent,black_20%,black_80%,transparent)]"})}),j("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]"})]})}),Te("div",{className:"flex flex-col gap-4",children:[j(_n,{asChild:!0,children:Te(Hn,{href:O("/analytics",e,te({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:[j(Dn,{className:"absolute bottom-0 h-auto w-full translate-y-[15%] [mask-image:linear-gradient(90deg,transparent,black)]"}),j("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]"}),Te("div",{className:"h-56 p-5",children:[j("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:"Dub Analytics"}),j("p",{className:"mt-3 max-w-48 text-sm text-neutral-500 dark:text-white/60",children:"Powerful real-time analytics with conversion tracking"})]})]})}),j("div",{className:"grid grow grid-rows-2 gap-4",children:Id.map(({title:t,description:r,icon:o,href:a})=>j(Cr,{title:t,description:r,icon:o,href:O(a,e,te({domain:e,utm_content:t}))},t))})]})]}),Te("div",{className:"px-6 py-4",children:[j("p",{className:i(lt,"mb-2"),children:"Customer Stories"}),Te("div",{className:"grid grid-cols-1",children:[Tn.map(({icon:t,iconClassName:r,title:o,description:a,href:l})=>j(ct,{className:"-mx-2",href:O(l,e,te({domain:e,utm_content:o})),icon:j("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:j(t,{className:i("h-4 w-4 shrink-0 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,description:a},l)),j(ct,{className:"-mx-2",href:O("/customers",e,te({domain:e,utm_content:"Customer Stories"})),title:"View all stories",showArrow:!0})]}),j("p",{className:i(lt,"mb-2 mt-5"),children:"Compare"}),j("div",{className:"flex flex-col",children:xr.map(({name:t,slug:r})=>j(ct,{className:"-mx-2",href:O(`/compare/${r}`,e,te({domain:e,utm_content:`Dub vs. ${t}`})),title:`Dub vs. ${t}`,showArrow:!0},r))})]})]})}import{Link as Fn}from"@radix-ui/react-navigation-menu";import Od from"next/image";import Wn from"next/link";import{useId as zd}from"react";import{jsx as x,jsxs as dt}from"react/jsx-runtime";function Bn({className:e,...t}){let r=zd();return dt("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"}),dt("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"}),dt("defs",{children:[dt("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"})]}),dt("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"})]}),dt("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 Q,jsxs as Ze}from"react/jsx-runtime";var _d=[{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 Un({domain:e}){return Ze("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.45fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Q("div",{className:"grid grid-cols-2 gap-4 p-4",children:_d.map(({title:t,description:r,thumbnail:o,href:a})=>Q(Fn,{asChild:!0,children:Ze(Wn,{href:O(a,e,te({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:[Ze("div",{className:"p-5 pb-0",children:[Q("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:t}),Q("p",{className:"mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),Q("div",{className:"relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]",children:Q("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:Q(Od,{src:o,alt:`${t} thumbnail`,fill:!0,className:"bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"})})})]},t)},t))}),Ze("div",{className:"flex flex-col gap-4 p-4",children:[br.filter(({title:t})=>!["Docs","Help Center","Dub Brand"].includes(t)).map(({title:t,description:r,icon:o,href:a})=>Q(Cr,{title:t,description:r,icon:o,iconClassName:"size-5",href:O(a,e,te({domain:e,utm_content:t}))},t)),Q(Fn,{asChild:!0,children:Ze(Wn,{href:O("/brand",e,te({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:[Ze("div",{className:"pointer-events-none absolute inset-0",children:[Q("div",{className:"absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35",children:Q("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)]")})}),Q(Bn,{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)]"})]}),Q("div",{className:"relative flex items-center justify-between px-5 py-4",children:Ze("div",{children:[Q("span",{className:"block text-sm font-medium text-white",children:"Dub Brand"}),Q("p",{className:"text-sm text-white/60",children:"Logos, wordmark, etc."})]})})]})})]})]})}import{Link as Hd}from"@radix-ui/react-navigation-menu";import Vd from"next/link";import{jsx as re,jsxs as ut}from"react/jsx-runtime";var Bd=[{icon:Ft,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:Wt,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Gt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function Gn({domain:e}){return ut("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ut("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(lt,"mb-4 ml-2"),children:"By use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:Bd.map(({icon:t,title:r,description:o,href:a})=>re(Hd,{asChild:!0,children:ut(Vd,{href:O(a,e,te({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[ut("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[re("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:re(dn,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),re("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),re(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),ut("div",{className:"relative",children:[re("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),re("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),ut("div",{className:"px-6 py-4",children:[re("p",{className:i(lt,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:lo.map(({icon:t,iconClassName:r,title:o,href:a})=>re(ct,{className:"-mx-2",href:O(a,e,te({domain:e,utm_content:o})),icon:re("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:re(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Zd,jsx as U,jsxs as mt}from"react/jsx-runtime";var mo=Gd({theme:"light"}),po=[{name:"Product",content:Vn,childItems:vr,segments:["/home","/analytics","/features","/compare"]},{name:"Solutions",content:Gn,childItems:Ln,segments:["/solutions"]},{name:"Resources",content:Un,childItems:br,segments:["/docs","/help","/brand","/blog","/changelog","/customers"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],$n=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 f5({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Wd();t&&(o=t);let a=$d(),l=Wa(40),c=Ud(),{data:s,isLoading:u}=Kd(o.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return U(mo.Provider,{value:{theme:e},children:U(Fd,{id:a,children:mt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[U("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")}),U(yr,{className:i("relative",r),children:mt("div",{className:"flex h-14 items-center justify-between",children:[U("div",{className:"grow basis-0",children:U(Tt,{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:U(Nr,{})})}),mt(de.Root,{delayDuration:0,className:"relative hidden lg:block",children:[U(de.List,{className:"group relative z-0 flex",children:po.map(({name:d,href:n,segments:p,content:f})=>{let g=p.some(b=>c==null?void 0:c.startsWith(b));return mt(de.Item,{children:[U(Yd,{trigger:!!f,children:n!==void 0?U(Tt,{id:`nav-${n}`,href:O(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:$n,"data-active":g,children:d}):mt("button",{className:$n,"data-active":g,children:[d,U(jd,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),f&&U(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:U(f,{domain:o})})]},d)})}),U("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:U(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]")})})]}),U("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?U(Tt,{href:Ce,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:mt(Zd,{children:[U(Tt,{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"}),U(Tt,{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 jd(e){return U("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:U("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 Yd({trigger:e,children:t}){return e?U(de.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as qd,Menu as Xd,X as Jd}from"lucide-react";import pt from"next/link";import{useParams as go}from"next/navigation";import{useEffect as Qd,useState as jn}from"react";import eu from"swr";import{Fragment as ru,jsx as _,jsxs as Le}from"react/jsx-runtime";function M5({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=go();t&&(r=t);let[o,a]=jn(!1);Qd(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:l}=eu(r.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return Le("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?_(fo,{href:Ce,className:"max-[280px]:hidden",children:"Dashboard"}):Le("div",{className:"flex gap-2 max-[280px]:hidden",children:[_(fo,{variant:"secondary",href:`${Ce}/login`,children:"Log in"}),_(fo,{href:`${Ce}/register`,children:"Sign Up"})]}),_("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?_(Jd,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):_(Xd,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),_("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:Le("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[po.map(({name:c,href:s,childItems:u},d)=>_(tu,{name:c,href:s,childItems:u,setOpen:a},d)),l&&Object.keys(l).length>0?_("li",{className:"py-3 min-[281px]:hidden",children:_(pt,{href:Ce,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Le(ru,{children:[_("li",{className:"py-3 min-[281px]:hidden",children:_(pt,{href:`${Ce}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),_("li",{className:"py-3 min-[281px]:hidden",children:_(pt,{href:`${Ce}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var tu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=go(),[l,c]=jn(!1);return r?_("li",{className:"py-3",children:Le(Pe,{height:!0,children:[Le("button",{className:"flex w-full justify-between",onClick:()=>c(!l),children:[_("p",{className:"font-semibold",children:e}),_(qd,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",l&&"rotate-180")})]}),l&&_("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,u)=>"items"in s?Le("div",{className:"grid grid-cols-1 gap-3",children:[_("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((d,n)=>_(Kn,{item:d,setOpen:o,size:"small"},n))]},u):_(Kn,{item:s,setOpen:o},u))})]})}):t?_("li",{className:"py-3",children:_(pt,{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},Kn=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:l="normal"})=>{let{domain:c="dub.co"}=go();return Le(pt,{href:O(r,c,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:c,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[_("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",l==="small"&&"size-8"),children:_(o,{className:i("size-5 text-neutral-700 grayscale",l==="small"&&"size-4")})}),Le("div",{children:[_("div",{className:"flex items-center gap-2",children:_("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&_("p",{className:"text-sm text-neutral-500",children:t})]})]})};function fo({variant:e,className:t,...r}){return _(pt,{...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 Yn}from"react/jsx-runtime";function Zn({className:e}){return Yn("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:Yn("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z",fill:"currentColor"})})}import{jsx as q,jsxs as qn}from"react/jsx-runtime";var mu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
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>`,
|
|
50
|
+
</svg>`,pu=`<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 Nr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=su(),{theme:a}=cu(mo),[l,c]=du(!1),s=lu(n=>{n.preventDefault(),c(!0)},[]),[,u]=et();function d(n){uu.promise(u(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return qn(Ve.Root,{open:l,onOpenChange:c,children:[q(Ve.Anchor,{asChild:!0,children:q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?q(Zn,{className:r}):q(co,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),q(Ve.Portal,{children:q(Ve.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:qn("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[q(Lt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(mu),icon:q(co,{className:"h-4 w-4"})}),q(Lt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(pu),icon:q(iu,{strokeWidth:2,className:"h-4 w-4"})}),q(Lt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(ou,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Lt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(au,{strokeWidth:2,className:"h-4 w-4"})}):q(Lt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(nu,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Lt({className:e,...t}){return q(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 T,jsxs as W}from"react/jsx-runtime";var bu=[{name:"Twitter",icon:_t,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:Ht,href:"https://www.youtube.com/@dubdotco"}],ft={product:[...vr.map(({title:e,href:t})=>({name:e,href:t})),{name:"Dub Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"}],solutions:[{name:"Marketing attribution",href:"/analytics"},{name:"Content creators",href:"/solutions/creators"},{name:"Affiliate management",href:"/partners"}],resources:[{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Blog",href:"/blog"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Brand",href:"/brand"}],compare:xr.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:En.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Lo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},gt="text-sm font-medium text-neutral-900",ht="flex flex-col mt-2.5 gap-2.5",qe="text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function e8({staticDomain:e,className:t}){let{domain:r="dub.co"}=gu();return e&&(r=e),T(yr,{className:i("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:W("footer",{children:[W("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[W("div",{className:"flex flex-col gap-6",children:[T("div",{className:"grow",children:W(Ee,{href:O("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[W("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),T(Nr,{className:"h-8 text-neutral-800"})]})}),T("div",{className:"flex items-center gap-3",children:bu.map(({name:o,icon:a,href:l})=>W("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[T("span",{className:"sr-only",children:o}),T(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),W("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[T("h3",{className:gt,children:"Product"}),T("ul",{role:"list",className:ht,children:ft.product.map(o=>T("li",{children:T(Ee,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:qe,children:o.name})},o.name))})]}),W("div",{children:[T("h3",{className:gt,children:"Solutions"}),T("ul",{role:"list",className:ht,children:ft.solutions.map(o=>T("li",{children:T(Ee,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:qe,children:o.name})},o.name))})]})]}),W("div",{className:"mt-10 md:mt-0",children:[T("h3",{className:gt,children:"Resources"}),T("ul",{role:"list",className:ht,children:ft.resources.map(o=>T("li",{children:T(Ee,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:qe,children:o.name})},o.name))})]})]}),W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[T("h3",{className:gt,children:"Compare"}),T("ul",{role:"list",className:ht,children:ft.compare.map(o=>T("li",{children:T(Ee,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:qe,children:o.name})},o.name))})]}),W("div",{children:[T("h3",{className:gt,children:"Legal"}),W("ul",{role:"list",className:ht,children:[ft.legal.map(o=>T("li",{children:T(Ee,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:qe,children:o.name})},o.name)),T("li",{children:W("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:i(qe,"flex items-center gap-1"),children:["Trust Center ",T(ya,{className:"size-3.5"})]})})]})]})]}),W("div",{className:"mt-10 md:mt-0",children:[T("h3",{className:gt,children:"Tools"}),T("ul",{role:"list",className:ht,children:ft.tools.map(o=>T("li",{children:T(Ee,{href:O(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:qe,children:o.name})},o.name))})]})]})]})]}),W("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[T(xu,{}),T(Ee,{href:O("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:T(fu,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),W("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}function xu(){let{data:e}=vu("https://status.dub.co/api/v1/summary",fe),[t,r]=Xn("bg-neutral-200"),[o,a]=Xn("Loading status...");return hu(()=>{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]),W(Ee,{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:[W("div",{className:"relative size-2",children:[T("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")}),T("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",t)})]}),T("p",{className:"text-xs font-medium leading-none text-neutral-600",children:o})]})}import{AnimatePresence as yu,motion as wu}from"framer-motion";import{useEffect as Cu,useState as Nu}from"react";import{jsx as Jn}from"react/jsx-runtime";var Qn=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=Nu(!1);Cu(()=>{l(!0)},[]);let c=r?wu.div:"div";return Jn(yu,{children:a?Jn(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as ku}from"class-variance-authority";import{toast as Pu}from"sonner";import{jsx as ho,jsxs as Mu}from"react/jsx-runtime";var Su=ku("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 m8({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=et(),s=o||Eo;return Mu("button",{onClick:u=>{u.stopPropagation(),Pu.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(Su({variant:e}),r),type:"button",children:[ho("span",{className:"sr-only",children:"Copy"}),l?ho(_o,{className:"h-3.5 w-3.5"}):ho(s,{className:"h-3.5 w-3.5"})]})}import{toast as Ru}from"sonner";import{jsx as Tu}from"react/jsx-runtime";function v8({value:e,children:t,className:r,successMessage:o}){let[a,l]=et();return Tu("button",{onClick:c=>{c.stopPropagation(),Ru.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 Lu,jsxs as Eu}from"react/jsx-runtime";function x8({icon:e,text:t}){return Eu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Lu("p",{className:"truncate text-sm",children:t})]})}import{jsx as Au}from"react/jsx-runtime";var w8=({children:e})=>Au("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as vo}from"react/jsx-runtime";function S8({apexDomain:e,className:t,imageProps:r}){return e?vo(Rt,{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}):vo("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:vo(da,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as ei}from"lucide-react";import{useRouter as Du,useSearchParams as Iu}from"next/navigation";import{useEffect as zu,useMemo as Ou,useRef as _u}from"react";import Hu from"swr";import{useDebounce as Vu}from"use-debounce";import{Fragment as ti,jsx as Y,jsxs as Be}from"react/jsx-runtime";function O8({defaultUrl:e}){let t=Du(),r=Iu(),o=e||(r==null?void 0:r.get("url"))||"https://github.com/dubinc/dub",[a]=Vu(Mo(o),500),l=Ou(()=>Ro(a||""),[a]),{data:c,isValidating:s}=Hu(a&&`/api/metatags?url=${encodeURIComponent(a)}`,fe,{revalidateOnFocus:!1}),{title:u,description:d,image:n}=c||{},p=_u(null);zu(()=>{!e&&p.current&&p.current.select()},[e]);let{isMobile:f}=Z();return Be(ti,{children:[!e&&Be("div",{className:"relative flex items-center",children:[Y(ei,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),Y("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"})]}),Be("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[s&&Y("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:Y(bt,{})}),n?Y("img",{src:n,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Be("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[Y(Io,{className:"h-8 w-8 text-neutral-400"}),Y("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Be("div",{className:"grid gap-1 bg-white p-3 text-left",children:[l?Y("p",{className:"text-sm text-[#536471]",children:l}):Y("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),u?Y("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:u}):Y("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),d?Y("p",{className:"line-clamp-2 text-sm text-[#536471]",children:d}):Be("div",{className:"grid gap-2",children:[Y("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),Y("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function _8({defaultUrl:e}){return Be(ti,{children:[Be("div",{className:"relative flex items-center",children:[Y(ei,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),Y("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"})]}),Y("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:Y("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:Y(bt,{})})})]})}import{AnimatePresence as Bu}from"framer-motion";import ri from"js-cookie";import{createContext as Fu,useState as Wu}from"react";import{jsx as bo}from"react/jsx-runtime";var Uu=Fu({hidePopup:()=>{}});function G8({children:e,hiddenCookieId:t}){let[r,o]=Wu(ri.get(t)==="1"),a=()=>{o(!0),ri.set(t,"1")};return bo(Qn,{children:bo(Uu.Provider,{value:{hidePopup:a},children:bo(Bu,{children:!r&&e})})})}import{motion as Gu}from"framer-motion";import{jsx as oi}from"react/jsx-runtime";function Y8({value:e=0,max:t=100,className:r}){return oi("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:oi(Gu.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 ni}from"class-variance-authority";import{LayoutGroup as $u,motion as Ku}from"framer-motion";import{useId as ju}from"react";import{jsx as Et,jsxs as ai}from"react/jsx-runtime";var Yu=ni("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"}}),Zu=ni("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function a6({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=ju();return Et("div",{className:i("flex text-sm",a),children:Et($u,{id:l,children:t.map(({id:c,label:s,href:u})=>{let d=c===r;return ai(u?"a":"div",{className:"relative",href:u??"#",target:u?"_blank":void 0,children:[ai("button",{type:"button",...!u&&{onClick:()=>o==null?void 0:o(c)},className:i(Yu({variant:e}),u&&"group flex items-center gap-1.5"),"data-selected":d,"aria-selected":d,children:[s,u&&Et($o,{className:"size-2.5"})]}),d&&Et(Ku.div,{layoutId:"indicator",transition:{duration:.1},className:Zu({variant:e}),children:Et("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as xo,jsxs as ii}from"react/jsx-runtime";var qu=[{icon:Na,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:oa,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:ha,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Ca,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:ga,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function s6(){return ii("div",{className:"p-3",children:[xo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),xo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:qu.map(({text:e,icon:t,href:r})=>ii("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[xo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as si,jsxs as Xu}from"react/jsx-runtime";function d6({className:e}){return Xu("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:[si("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"}),si("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{Dr as AUTOPLAY_DEFAULT_DELAY,Ff as Accordion,fi as AccordionContent,mi as AccordionItem,pi as AccordionTrigger,s6 as AdvancedLinkFeaturesTooltip,fm as Africa,Sm as Airtm,bi as Alert,yi as AlertDescription,xi as AlertTitle,ym as Amazon,Am as AndroidLogo,Pe as AnimatedSizeContainer,Dm as AppleLogo,Im as ArrowBoldUp,zm as ArrowRight,Om as ArrowTrendUp,_m as ArrowTurnLeft,Hm as ArrowTurnRight2,$o as ArrowUpRight,Vm as ArrowsOppositeDirectionY,gm as Asia,fo as AuthButton,Zf as Avatar,e4 as Background,Yt as Badge,Bm as BadgeCheck,Fm as BadgeCheck2Fill,h1 as BadgeTooltip,Wm as Blog,Rt as BlurImage,Um as Bolt,Gm as BoltFill,Km as Book2,Ko as Book2Fill,jm as Book2Small,$m as BookOpen,Ym as Books2,Zm as BoxArchive,qm as BulletList,jo as BulletListFill,se as Button,v1 as ButtonTooltip,xr as COMPARE_PAGES,Tn as CUSTOMER_STORIES,Za as Calendar,e0 as Calendar6,Jm as CalendarDays,Xm as CalendarIcon,Qm as CalendarRefresh,dm as CardAmex,um as CardDiscover,F1 as CardList,mm as CardMastercard,pm as CardVisa,t0 as Cards,r0 as CaretUpFill,Xi as Carousel,Ji as CarouselContent,Qi as CarouselItem,ng as CarouselNavBar,ts as CarouselNext,es as CarouselPrevious,gg as CarouselThumbnail,fg as CarouselThumbnails,Mm as CashApp,o0 as ChartActivity2,a0 as ChartArea2,n0 as ChartLine,wm as ChatGPT,Yo as Check,Zo as Check2,ms as Checkbox,qo as CheckboxCheckedFill,Xo as CheckboxUnchecked,Jo as CircleCheck,i0 as CircleCheckFill,s0 as CircleDollar,l0 as CircleDotted,Qo as CircleHalfDottedCheck,ea as CircleHalfDottedClock,ta as CircleInfo,c0 as CirclePercentage,d0 as CirclePlay,u0 as CirclePlayFill,m0 as CircleQuestion,p0 as CircleUser,Mr as CircleWarning,f0 as CircleXmark,g0 as Circles,h0 as Circles3,Qn as ClientOnly,ra as CloudUpload,v0 as Code,b0 as ColorPalette2,av as Combobox,d6 as CompositeLogo,x0 as ConnectedDots,y0 as ConnectedDots4,Vt as ConnectedDotsFill,w0 as Connections3,Eo as Copy,m8 as CopyButton,v8 as CopyText,C0 as CreditCard,N0 as Crosshairs3,k0 as Crown,Ju as CrownSmall,P0 as Cube,S0 as CubeSettings,Bt as CubeSettingsFill,M0 as CurrencyDollar,R0 as CursorRays,T0 as DatabaseKey,Hr as DatePickerContext,Fv as DateRangePicker,L0 as Desktop,E0 as DiamondTurnRight,Ft as DiamondTurnRightFill,A0 as Directions,D0 as Discount,I0 as Dots,z0 as Download,Qu as DubCraftedShield,O0 as Duplicate,ka as DynamicTooltipWrapper,oa as Earth,_0 as EarthPosition,jv as EmptyState,H0 as EnvelopeAlert,V0 as EnvelopeArrowRight,hm as Europe,Ao as ExpandingArrow,aa as Eye,na as EyeSlash,vr as FEATURES_LIST,rm as Facebook,ia as FeatherFill,Cm as Figma,B0 as FileContent,a2 as FileUpload,F0 as FileZip2,R2 as Filter,U0 as Filter2,W0 as FilterBars,$0 as Flag2,sa as Flag6,G0 as FlagWavy,K0 as Flask,j0 as Folder,J0 as Folder5,Y0 as FolderBookmark,Z0 as FolderLock,q0 as FolderPlus,X0 as FolderShield,e8 as Footer,z2 as Form,Q0 as GamingConsole,ep as Gauge6,tp as Gear,rp as Gear2,op as Gear3,ap as Gem,la as Gift,np as GiftFill,Nm as GitHubEnhanced,zt as Github,ip as Globe,da as Globe2,ca as GlobePointer,sp as GlobeSearch,Bo as Go,om as Google,km as GoogleEnhanced,lp as GreekTemple,dn as Grid,cp as GridIcon,dp as GridLayoutRows,up as GridPlus,mp as Headset,ua as HeadsetFill,ma as HeartFill,pa as HexadecagonStar,pp as History,fa as Hyperlink,x8 as IconMenu,fp as Icosahedron,ga as Incognito,f1 as InfoTooltip,w8 as InlineSnippet,uc as Input,gp as InputPassword,ha as InputPasswordPointer,va as InputSearch,ub as InputSelect,am as Instagram,hp as InvoiceDollar,vp as Key,za as KeyboardShortcutContext,Kg as KeyboardShortcutProvider,En as LEGAL_PAGES,Ec as Label,bp as LayoutSidebar,xp as License,ba as LinesY,wp as Link4,yp as LinkBroken,S8 as LinkLogo,O8 as LinkPreview,_8 as LinkPreviewPlaceholder,Ot as LinkedIn,p1 as LinkifyTooltipContent,bt as LoadingCircle,tm as LoadingDots,Ne as LoadingSpinner,Cp as LocationPin,Np as LockFill,co as Logo,Do as Magic,kp as Magnifier,Pp as MapPosition,Sp as MarketingTarget,em as MatrixLines,yr as MaxWidthWrapper,Mp as Menu3,Nb as MenuItem,Rp as MessageSmile,Wt as MicrophoneFill,Db as MiniAreaChart,Tp as MobilePhone,Vb as Modal,Lp as MoneyBill,Ep as MoneyBill2,Ap as MoneyBills2,f5 as Nav,mo as NavContext,M5 as NavMobile,Nr as NavWordmark,vm as NorthAmerica,Dp as Note,Fp as NucleoPhoto,g1 as NumberTooltip,bm as Oceania,Ip as OfficeBuilding,zf as PLAN_FEATURE_ICONS,xa as Page2,Wb as PaginationControls,zp as Paintbrush,Op as Palette2,_p as PaperPlane,Rm as Payoneer,Tm as Paypal,Vp as Pen2,Hp as PenWriting,Bp as PercentageArrowDown,Io as Photo,Fo as Php,Wp as Plug2,Ut as Plus,at as Popover,G8 as Popup,Uu as PopupContext,Up as Post,nm as Prisma,Ho as ProductHunt,Y8 as ProgressBar,Gp as Pyramid,Wo as Python,$p as QRCode,br as RESOURCES,Zc as RadioGroup,qc as RadioGroupItem,Vo as Raycast,Kp as Receipt2,ya as ReferredVia,jp as Refresh2,Yp as Robot,Uo as Ruby,lo as SDKS,n4 as SOCIAL_LINKS,Ln as SOLUTIONS,wa as SatelliteDish,Zp as ScanText,qp as Scribble,qb as Sheet,Xp as ShieldAlert,Jp as ShieldCheck,Qp as ShieldKeyhole,ef as ShieldSlash,ex as ShimmerDots,tf as Shuffle,m1 as SimpleTooltipContent,im as Slack,rf as Sliders,zo as SortOrder,xm as SouthAmerica,of as Sparkle3,Pm as Spotify,af as SquareChart,nf as SquareLayoutGrid5,sf as SquareLayoutGrid6,lf as SquareXmark,cf as Stars2,ix as StatusBadge,Lm as StripeLink,Oo as Success,fx as Switch,vf as TV,a6 as TabSelect,Vx as Table,df as TableIcon,uf as TableRows2,mf as Tablet,pf as Tag,ff as Tags,_o as Tick,sm as TikTok,Ca as Timer2,lm as Tinybird,gf as Toggle2Fill,Gx as ToggleGroup,qf as TokenAvatar,J as Tooltip,u1 as TooltipContent,d1 as TooltipProvider,hf as Trash,_t as Twitter,Go as Typescript,Jx as UTMBuilder,Td as UTM_PARAMETERS,bf as UiCard,cm as Unsplash,xf as User,yf as UserCheck,wf as UserCrown,Cf as UserDelete,Nf as UserPlus,kf as Users,Sf as Users2,Mf as Users6,Gt as UsersFill,Pf as UsersSettings,Em as Venmo,Rf as Versions2,Na as Views,Tf as Watch,Lf as Webhook,Ef as Window,Af as WindowSearch,Df as WindowSettings,Zn as Wordmark,If as Xmark,Ht as YouTube,Pi as badgeVariants,ie as buttonVariants,Ni as getUserAvatarUrl,po as navItems,dd as statusBadgeVariants,he as useCarousel,Ea as useCarouselActiveIndex,Cg as useCookies,et as useCopyToClipboard,Mg as useCurrentAnchor,Tg as useEnterSubmit,Dg as useInViewport,Og as useInputFocused,Bg as useIntersectionObserver,tt as useKeyboardShortcut,Zg as useLocalStorage,Z as useMediaQuery,eh as useOptimisticUpdate,mh as usePagination,gh as useRemoveGAParams,qt as useResizeObserver,Va as useRouterStuff,Wa as useScroll,rt as useScrollProgress,Hx as useTable,Ha as useTablePagination,Th as useToastWithUndo};
|