"use strict";const i=require("./mergeProps-DD8aR8go.cjs.js"),m=require("./useObjectRef-4v2MxSjQ.cjs.js"),s=require("react");function y(...e){return e.length===1&&e[0]?e[0]:l=>{let t=!1;const a=e.map(n=>{const f=$(n,l);return t||(t=typeof f=="function"),f});if(t)return()=>{a.forEach((n,f)=>{typeof n=="function"?n():$(e[f],null)})}}}function $(e,l){if(typeof e=="function")return e(l);e!=null&&(e.current=l)}const x=Symbol("default");function S({values:e,children:l}){for(let[t,a]of e)l=s.createElement(t.Provider,{value:a},l);return l}function h(e){let{className:l,style:t,children:a,defaultClassName:n,defaultChildren:f,defaultStyle:r,values:u}=e;return s.useMemo(()=>{let o,c,d;return typeof l=="function"?o=l({...u,defaultClassName:n}):o=l,typeof t=="function"?c=t({...u,defaultStyle:r||{}}):c=t,typeof a=="function"?d=a({...u,defaultChildren:f}):a==null?d=f:d=a,{className:o??n,style:c||r?{...r,...c}:void 0,children:d??f,"data-rac":""}},[l,t,a,n,f,r,u])}function b(e,l){let t=s.useContext(e);if(l===null)return null;if(t&&typeof t=="object"&&"slots"in t&&t.slots){let a=l||x;if(!t.slots[a]){let n=new Intl.ListFormat().format(Object.keys(t.slots).map(r=>`"${r}"`)),f=l?`Invalid slot "${l}".`:"A slot prop is required.";throw new Error(`${f} Valid slot names are ${n}.`)}return t.slots[a]}return t}function C(e,l,t){let a=b(t,e.slot)||{},{ref:n,...f}=a,r=m.$df56164dff5785e2$export$4338b53315abf666(s.useMemo(()=>y(l,n),[l,n])),u=i.$3ef42575df84b30b$export$9d1611c77c2fe928(f,e);return"style"in f&&f.style&&"style"in e&&e.style&&(typeof f.style=="function"||typeof e.style=="function"?u.style=o=>{let c=typeof f.style=="function"?f.style(o):f.style,d={...o.defaultStyle,...c},p=typeof e.style=="function"?e.style({...o,defaultStyle:d}):e.style;return{...d,...p}}:u.style={...f.style,...e.style}),[u,r]}function v(e=!0){let[l,t]=s.useState(e),a=s.useRef(!1),n=s.useCallback(f=>{a.current=!0,t(!!f)},[]);return i.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{a.current||t(!1)},[]),[n,l]}function N(e){const l=/^(data-.*)$/;let t={};for(const a in e)l.test(a)||(t[a]=e[a]);return t}exports.$5dc95899b306f630$export$c9058316764c140e=y;exports.$64fa3d84918910a7$export$2881499e37b75b9a=S;exports.$64fa3d84918910a7$export$29f1550f4b0d4415=C;exports.$64fa3d84918910a7$export$4d86445c2cf5e3=h;exports.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8=v;exports.$64fa3d84918910a7$export$c62b8e45d58ddad9=x;exports.$64fa3d84918910a7$export$ef03459518577ad4=N;exports.$64fa3d84918910a7$export$fabf2dc03a41866e=b;
//# sourceMappingURL=utils-BNYGVv6l.cjs.js.map
