1import{$y as e,Jy as t,qy as n}from"./messages-D3yO1TLp.js";import{n as r,t as i}from"./utils-DXalBF5w.js";var a=e(t());function o(){return typeof window<`u`}function s(e){return u(e)?(e.nodeName||``).toLowerCase():`#document`}function c(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function l(e){return((u(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function u(e){return o()?e instanceof Node||e instanceof c(e).Node:!1}function d(e){return o()?e instanceof Element||e instanceof c(e).Element:!1}function f(e){return o()?e instanceof HTMLElement||e instanceof c(e).HTMLElement:!1}function p(e){return!o()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof c(e).ShadowRoot}function m(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=x(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ee(e){return/^(table|td|th)$/.test(s(e))}function h(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var te=/transform|translate|scale|rotate|perspective|filter/,ne=/paint|layout|strict|content/,g=e=>!!e&&e!==`none`,_;function v(e){let t=d(e)?x(e):e;return g(t.transform)||g(t.translate)||g(t.scale)||g(t.rotate)||g(t.perspective)||!y()&&(g(t.backdropFilter)||g(t.filter))||te.test(t.willChange||``)||ne.test(t.contain||``)}function re(e){let t=S(e);for(;f(t)&&!b(t);){if(v(t))return t;if(h(t))return null;t=S(t)}return null}function y(){return _??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),_}function b(e){return/^(html|body|#document)$/.test(s(e))}function x(e){return c(e).getComputedStyle(e)}function ie(e){return d(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function S(e){if(s(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||p(e)&&e.host||l(e);return p(t)?t.host:t}function C(e){let t=S(e);return b(t)?e.ownerDocument?e.ownerDocument.body:e.body:f(t)&&m(t)?t:C(t)}function w(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=C(e),i=r===e.ownerDocument?.body,a=c(r);if(i){let e=T(a);return t.concat(a,a.visualViewport||[],m(r)?r:[],e&&n?w(e):[])}else return t.concat(r,w(r,[],n))}function T(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var E={};function D(e,t){let n=a.useRef(E);return n.current===E&&(n.current=e(t)),n}var O=a[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ae=O&&O!==a.useLayoutEffect?O:e=>e();function k(e){let t=D(oe).current;return t.next=e,ae(t.effect),t.trampoline}function oe(){let e={next:void 0,callback:se,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function se(){}var ce={...a},A=typeof document<`u`?a.useLayoutEffect:()=>{};function j(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var M={};function N(e,t,n,r,i){let a={...I(e,M)};return t&&(a=P(a,t)),n&&(a=P(a,n)),r&&(a=P(a,r)),i&&(a=P(a,i)),a}function le(e){if(e.length===0)return M;if(e.length===1)return I(e[0],M);let t={...I(e[0],M)};for(let n=1;n<e.length;n+=1)t=P(t,e[n]);return t}function P(e,t){return F(t)?t(e):ue(e,t)}function ue(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=j(e.style,r);break;case`className`:e[n]=R(e.className,r);break;default:de(n,r)?e[n]=fe(e[n],r):e[n]=r}}return e}function de(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function F(e){return typeof e==`function`}function I(e,t){return F(e)?e(t):e??M}function fe(e,t){return t?e?n=>{if(pe(n)){let r=n;L(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function L(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function R(e,t){return t?e?t+` `+e:t:e}function pe(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function me(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var z=me(`https://base-ui.com/production-error`,`Base UI`),he=a.createContext(void 0);function B(e=!1){let t=a.useContext(he);if(t===void 0&&!e)throw Error(z(16));return t}function ge(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,s=r&&t!==!1,c=r&&t===!1;return{props:a.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!o&&n&&(e.tabIndex=t?i:-1)),(o&&(t||s)||!o&&n)&&(e[`aria-disabled`]=n),o&&(!t||c)&&(e.disabled=n),e},[r,n,t,s,c,o,i])}}function V(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:o}=e,s=a.useRef(null),c=B(!0),l=o??c!==void 0,{props:u}=ge({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=a.useCallback(()=>{let e=s.current;H(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return A(d,[d]),{getButtonProps:a.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...c}=e;return N({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(L(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=H(a),c=!i&&_e(a),u=r&&(i?s:!c),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(L(e),a?.(e),e.target===e.currentTarget&&i&&l&&H(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!l&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},u,c)},[t,u,l,i]),buttonRef:k(e=>{s.current=e,d()})}}function H(e){return f(e)&&e.tagName===`BUTTON`}function _e(e){return!!(e?.tagName===`A`&&e?.href)}function U(e,t,n,r){let i=D(W).current;return ye(i,e,t,n,r)&&G(i,[e,t,n,r]),i.callback}function ve(e){let t=D(W).current;return be(t,e)&&G(t,e),t.callback}function W(){return{callback:null,cleanup:null,refs:[]}}
1function ye(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function be(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function G(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var xe=19;function K(e){return xe>=e}function q(e){if(!a.isValidElement(e))return null;let t=e,n=t.props;return(K(19)?n?.ref:t.ref)??null}function Se(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Ce(e,t){return typeof e==`function`?e(t):e}function we(e,t){return typeof e==`function`?e(t):e}function Te(){}var Ee=Object.freeze([]),J=Object.freeze({}),De={style:{transition:`none`}},Oe=`data-base-ui-click-trigger`,ke={fallbackAxisSide:`none`},Ae={fallbackAxisSide:`end`},je={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function Y(e,t,n={}){let r=t.render,i=Me(t,n);return n.enabled===!1?null:Pe(e,r,i,n.state??J)}function Me(e,t={}){let{className:n,style:r,render:i}=e,{state:a=J,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ce(n,a):void 0,d=l?we(r,a):void 0,f=l?Se(a,c):J,p=l?j(f,Array.isArray(s)?le(s):s)??J:J;return typeof document<`u`&&(l?Array.isArray(o)?p.ref=ve([p.ref,q(i),...o]):p.ref=U(p.ref,q(i),o):U(null,null)),l?(u!==void 0&&(p.className=R(p.className,u)),d!==void 0&&(p.style=j(p.style,d)),p):J}var Ne=Symbol.for(`react.lazy`);function Pe(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=N(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===Ne&&(i=a.Children.toArray(t)[0]),a.cloneElement(i,e)}if(e&&typeof e==`string`)return Fe(e,n);throw Error(z(8))}function Fe(e,t){return e===`button`?(0,a.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,a.createElement)(`img`,{alt:``,...t,key:t.key}):a.createElement(e,t)}var Ie=a.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,...s}=e,{getButtonProps:c,buttonRef:l}=V({disabled:i,focusableWhenDisabled:a,native:o});return Y(`button`,e,{state:{disabled:i},ref:[t,l],props:[s,c]})}),X=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Z=r,Q=(e,t)=>n=>{if(t?.variants==null)return Z(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=X(t)||X(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Z(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Le=n(),$=Q(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focu
1s-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Re({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,Le.jsx)(Ie,{"data-slot":`button`,className:i($({variant:t,size:n,className:e})),...r})}export{S as A,h as B,x as C,s as D,T as E,b as F,u as I,m as L,v as M,d as N,ie as O,f as P,p as R,D as S,l as T,y as V,z as _,Oe as a,ce as b,Ae as c,J as d,Te as f,B as g,V as h,Y as i,c as j,w as k,je as l,U as m,$ as n,De as o,K as p,Q as r,ke as s,Re as t,Ee as u,N as v,re as w,k as x,A as y,ee as z};
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.