Build 533169stable
Module 825913
1,747 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{CC:()=>d,JT:()=>_,Kq:()=>u,P_:()=>l,SK:()=>p,Sl:()=>c,_E:()=>f});var r=n(533715),i=n(561514),s=n(803082),a=n(3388),o=n(64700);let l=Symbol("default");function u({values:e,children:t}){for(let[n,r]of e)t=o.createElement(n.Provider,{value:r},t);return t}function c(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:s,defaultStyle:a,values:l}=e;return(0,o.useMemo)(()=>{let e,o,u;return e="function"==typeof t?t({...l,defaultClassName:i}):t,o="function"==typeof n?n({...l,defaultStyle:a||{}}):n,u="function"==typeof r?r({...l,defaultChildren:s}):null==r?s:r,{className:null!=e?e:i,style:o||a?{...a,...o}:void 0,children:null!=u?u:s,"data-rac":""}},[t,n,r,i,s,a,l])}function d(e,t){let n=(0,o.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||l;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function _(e,t,n){let{ref:a,...l}=d(n,e.slot)||{},u=(0,r.U)((0,o.useMemo)(()=>(0,i.P)(t,a),[t,a])),c=(0,s.v)(l,e);return"style"in l&&l.style&&"style"in e&&e.style&&("function"==typeof l.style||"function"==typeof e.style?c.style=t=>{let n="function"==typeof l.style?l.style(t):l.style,r={...t.defaultStyle,...n},i="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:c.style={...l.style,...e.style}),[c,u]}function f(e=!0){let[t,n]=(0,o.useState)(e),r=(0,o.useRef)(!1),i=(0,o.useCallback)(e=>{r.current=!0,n(!!e)},[]);return(0,a.N)(()=>{r.current||n(!1)},[]),[i,t]}function p(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}}