1import{r as d,o as g,j as v}from"./chunk-UIGDSWPH-ny9TRmO_.js";import{c as l}from"./index-DL16pZsE.js";import{S as N}from"./index-H31K7fMk.js";import{c as m}from"./index-CE2vBQ91.js";import{L as O}from"./trans-CPhFnFrp.js";import{m as W}from"./proxy-BGm5owjb.js";const x="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%2018'%3e%3cpath%20fill='%23FFFFFF'%20d='M61.82%2018c3.47-1.45%206.86-3.78%2011.3-7.34C78%206.76%2080.34%205.1%2083.87%203.42%2088.56%201.16%2093.75%200%20100%200v6.16C98.76%206.05%2097.43%206%2096%206c-9.59%200-14.23%202.23-23.13%209.34-1.28%201.03-2.39%201.9-3.4%202.66h-7.65zm-23.64%200H22.52c-1-.76-2.1-1.63-3.4-2.66C11.57%209.3%207.08%206.78%200%206.16V0c6.25%200%2011.44%201.16%2016.14%203.42%203.53%201.7%205.87%203.35%2010.73%207.24%204.45%203.56%207.84%205.9%2011.31%207.34zM61.82%200h7.66a39.57%2039.57%200%200%201-7.34%204.58C57.44%206.84%2052.25%208%2046%208S34.56%206.84%2029.86%204.58A39.57%2039.57%200%200%201%2022.52%200h15.66C41.65%201.44%2045.21%202%2050%202c4.8%200%208.35-.56%2011.82-2z'/%3e%3c/svg%3e",w="(prefers-reduced-motion: no-preference)",_=typeof window>"u",P=()=>_?!0:!window.matchMedia(w).matches;function Q(){const[i,r]=d.useState(P);return d.useEffect(()=>{const e=window.matchMedia(w),t=s=>{r(!s.matches)};return e.addEventListener?e.addEventListener("change",t):e.addListener(t),()=>{e.removeEventListener?e.removeEventListener("change",t):e.removeListener(t)}},[]),i}const T=({x:i=0,y:r=0,rotation:e=0,scale:t=1,timing:s=150,transitionConfig:u={type:"spring",stiffness:300,damping:10}})=>{const o=Q(),[n,a]=g.useState(!1),p=d.useMemo(()=>({boop:{translateX:i,translateY:r,rotate:e,scale:t,transformOrigin:"50% 50%",transition:u},rest:{rotate:0,scale:1,transformOrigin:"50% 50%"}}),[i,r,e,t,u]);g.useEffect(()=>{if(!n||o)return;const b=window.setTimeout(()=>{a(!1)},s);return()=>{window.clearTimeout(b)}},[n,s,o]);const c=g.useCallback(()=>{o?window.alreadyWarned||(window.alreadyWarned=!0,console.warn("Animations not triggered due to reduced motion preference.")):a(!0)},[o]);return[n,p,c]},Y=m("group focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive relative inline-flex !h-auto w-fit max-w-full shrink-0 items-center justify-center gap-2 rounded-md text-left !text-sm font-medium text-wrap whitespace-pre-wrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-interactive-brand-primary-strong hover:bg-interactive-brand-primary-strong text-content-inverse rounded-full px-4 py-2",destructive:"bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",outline:"hover:text-base-brand-primary-600 hover:border-base-brand-primary-600 dark:bg-input/30 dark:hover:bg-input/50 border-base-brand-primary-500 text-base-brand-primary-500 rounded-full border bg-transparent shadow-xs hover:bg-gray-100",secondary:"text-base-brand-primary-500 hover:text-base-brand-primary-600 rounded-full bg-white px-4 py-2 hover:bg-white/90",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 rounded-full",pattern:"text-brand-primary-500 hover:text-brand-primary-600 active:bg-brand-primary-500 hover:bg-brand-primary-600 bg-after relative rounded-full px-4 py-2 active:text-white",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-full px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),q=m("bottom absolute top-1/2 right-0 flex aspect-square h-[28px] w-[28px] translate-y-[-50%] items-center justify-center rounded-full p-1",{variants:{variant:{default:"bg-white",destructive:"bg-destructive",outline:"bg-transparent",secondary:"bg-base-brand-primary-500 group-hover:bg-base-brand-primary-600",ghost:"bg-transparent",pattern:"bg-transparent",link:"bg-transparent"}},defaultVariants:{variant:"default"}}),y=m("min-h-5 min-w-5",{variants:{variant:{default:"text-base-brand-primary-500 group-hover:text-base-brand-primary-600",destructive:"bg-destructive",outline:"red bg-transparent",secondary:"text-white group-hover:text-white",ghost:"bg-transparent",pattern:"text-brand-primary-500 group-hover:text-brand-primary-600 active:text-white",link:"bg-transparent"}},defaultVariants:{variant:"default"}});function J({className:i,variant:r,size:e,as:t="button",to:s,target:u,rel:o,children:n,icon:a,iconClassName:p,iconWrapperClassName:c,bgImage:b=x,bgRepeat:k="repeat",bgPosition:E="center",bgSize:z="50px",end:f=!1,...h}){const{x:L,y:M,rotation:B,scale:S,timing:V,transitionConfig:j}=h,[F,R,C]=T({x:L,y:M,rotation:B,scale:S,timing:V,transitionConfig:j}),I=t==="button"?"button":t==="link"?O:t==="slot"?N:"button",A=r==="pattern"&&b?{"--bg-image":`url("${x}")`,"--bg-size":z,"--bg-repeat":k,"--bg-position":E,border:"1px solid #613AF3"}:void 0;return v.jsxs(I,{"data-slot":"button",className:l(Y({variant:r,size:e,className:i}),a&&n?f?"ps-11":"pe-11":""),to:s,target:u,rel:o,onMouseEnter:C,style:A,...h,children:[n,a&&typeof a<"u"&&v.jsx("div",{className:l(q({variant:r}),n?f?"right-auto left-0 translate-x-[5px]":"right-0 left-auto translate-x-[-5px]":"relative translate-y-0",c),children:v.jsx(W.span,{animate:F?"boop":"rest",variants:R,children:d.isValidElement(a)?d.cloneElement(a,{className:l(y({variant:r}),p)}):d.createElement(a,{className:l(y({variant:r}),p)})})})]})}export{J as B,x as f,T as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.