import{r as a,j as y,R as S}from"./markdown-9_JKOUHQ.js";import{z as j,B as E,c as V}from"./index-Z_QI94Zg.js";import{c as N}from"./createLucideIcon-CsWFljth.js";const R=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],w=N("loader-circle",R);var k=Symbol.for("react.lazy"),m=S[" use ".trim().toString()];function O(e){return typeof e=="object"&&e!==null&&"then"in e}function x(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===k&&"_payload"in e&&O(e._payload)}function P(e){const n=L(e),t=a.forwardRef((o,r)=>{let{children:i,...c}=o;x(i)&&typeof m=="function"&&(i=m(i._payload));const l=a.Children.toArray(i),u=l.find($);if(u){const s=u.props.children,d=l.map(f=>f===u?a.Children.count(s)>1?a.Children.only(null):a.isValidElement(s)?s.props.children:null:f);return y.jsx(n,{...c,ref:r,children:a.isValidElement(s)?a.cloneElement(s,void 0,d):null})}return y.jsx(n,{...c,ref:r,children:i})});return t.displayName=`${e}.Slot`,t}var A=P("Slot");function L(e){const n=a.forwardRef((t,o)=>{let{children:r,...i}=t;if(x(r)&&typeof m=="function"&&(r=m(r._payload)),a.isValidElement(r)){const c=I(r),l=B(i,r.props);return r.type!==a.Fragment&&(l.ref=o?j(o,c):c),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var z=Symbol("radix.slottable");function $(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z}function B(e,n){const t={...n};for(const o in n){const r=e[o],i=n[o];/^on[A-Z]/.test(o)?r&&i?t[o]=(...l)=>{const u=i(...l);return r(...l),u}:r&&(t[o]=r):o==="style"?t[o]={...r,...i}:o==="className"&&(t[o]=[r,i].filter(Boolean).join(" "))}return{...e,...t}}function I(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const b=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,h=E,T=(e,n)=>t=>{var o;if(n?.variants==null)return h(e,t?.class,t?.className);const{variants:r,defaultVariants:i}=n,c=Object.keys(r).map(s=>{const d=t?.[s],f=i?.[s];if(d===null)return null;const v=b(d)||b(f);return r[s][v]}),l=t&&Object.entries(t).reduce((s,d)=>{let[f,v]=d;return v===void 0||(s[f]=v),s},{}),u=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((s,d)=>{let{class:f,className:v,...C}=d;return Object.entries(C).every(_=>{let[g,p]=_;return Array.isArray(p)?p.includes({...i,...l}[g]):{...i,...l}[g]===p})?[...s,f,v]:s},[]);return h(e,c,u,t?.class,t?.className)},W=T("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-xs":"h-6 w-6","icon-sm":"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),D=a.forwardRef(({className:e,variant:n,size:t,asChild:o=!1,loading:r=!1,children:i,disabled:c,...l},u)=>{const s=o?A:"button";return y.jsxs(s,{className:V(W({variant:n,size:t,className:e})),ref:u,disabled:c||r,...l,children:[r&&y.jsx(w,{className:"h-4 w-4 animate-spin"}),i]})});D.displayName="Button";export{D as B,w as L,A as S,P as a,T as c};
