vendor: 3,741 bytes, lines 1-9
1import{r as s,j as E}from"./index-BOmeIgAd.js";import{M as W,b as _,u as b,P as A,t as D,j as H,L as K,c as U}from"./createLucideIcon-RMQ4wG6C.js";function $(e,o){if(typeof e=="function")return e(o);e!=null&&(e.current=o)}function X(...e){return o=>{let t=!1;const i=e.map(c=>{const n=$(c,o);return!t&&typeof n=="function"&&(t=!0),n});if(t)return()=>{for(let c=0;c<i.length;c++){const n=i[c];typeof n=="function"?n():$(e[c],null)}}}}function B(...e){return s.useCallback(X(...e),e)}class F extends s.Component{getSnapshotBeforeUpdate(o){const t=this.props.childRef.current;if(t&&o.isPresent&&!this.props.isPresent){const i=t.offsetParent,c=_(i)&&i.offsetWidth||0,n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft,n.right=c-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}}function G({children:e,isPresent:o,anchorX:t,root:i}){const c=s.useId(),n=s.useRef(null),h=s.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:R}=s.useContext(W),M=e.props?.ref??e?.ref,u=B(n,M);return s.useInsertionEffect(()=>{const{width:g,height:f,top:l,left:a,right:m}=h.current;if(o||!n.current||!g||!f)return;const C=t==="left"?`left: ${a}`:`right: ${m}`;n.current.dataset.motionPopId=c;const d=document.createElement("style");R&&(d.nonce=R);const P=i??document.head;return P.appendChild(d),d.sheet&&d.sheet.insertRule(` 2 [data-motion-pop-id="${c}"] { 3 position: absolute !important; 4 width: ${g}px !important; 5 height: ${f}px !important; 6 ${C}px !important; 7 top: ${l}px !important; 8 } 9 `),()=>{P.contains(d)&&P.removeChild(d)}},[o]),E.jsx(F,{isPresent:o,childRef:n,sizeRef:h,children:s.cloneElement(e,{ref:u})})}const N=({children:e,initial:o,isPresent:t,onExitComplete:i,custom:c,presenceAffectsLayout:n,mode:h,anchorX:R,root:M})=>{const u=b(V),g=s.useId();let f=!0,l=s.useMemo(()=>(f=!1,{id:g,initial:o,isPresent:t,custom:c,onExitComplete:a=>{u.set(a,!0);for(const m of u.values())if(!m)return;i&&i()},register:a=>(u.set(a,!1),()=>u.delete(a))}),[t,u,i]);return n&&f&&(l={...l}),s.useMemo(()=>{u.forEach((a,m)=>u.set(m,!1))},[t]),s.useEffect(()=>{!t&&!u.size&&i&&i()},[t]),h==="popLayout"&&(e=E.jsx(G,{isPresent:t,anchorX:R,root:M,children:e})),E.jsx(A.Provider,{value:l,children:e})};function V(){return new Map}const w=e=>e.key||"";function I(e){const o=[];return s.Children.forEach(e,t=>{s.isValidElement(t)&&o.push(t)}),o}const Q=({children:e,custom:o,initial:t=!0,onExitComplete:i,presenceAffectsLayout:c=!0,mode:n="sync",propagate:h=!1,anchorX:R="left",root:M})=>{const[u,g]=D(h),f=s.useMemo(()=>I(e),[e]),l=h&&!u?[]:f.map(w),a=s.useRef(!0),m=s.useRef(f),C=b(()=>new Map),d=s.useRef(new Set),[P,z]=s.useState(f),[x,v]=s.useState(f);H(()=>{a.current=!1,m.current=f;for(let p=0;p<x.length;p++){const r=w(x[p]);l.includes(r)?(C.delete(r),d.current.delete(r)):C.get(r)!==!0&&C.set(r,!1)}},[x,l.length,l.join("-")]);const j=[];if(f!==P){let p=[...f];for(let r=0;r<x.length;r++){const y=x[r],k=w(y);l.includes(k)||(p.splice(r,0,y),j.push(y))}return n==="wait"&&j.length&&(p=j),v(I(p)),z(f),null}const{forceRender:S}=s.useContext(K);return E.jsx(E.Fragment,{children:x.map(p=>{const r=w(p),y=h&&!u?!1:f===x||l.includes(r),k=()=>{if(d.current.has(r))return;if(d.current.add(r),C.has(r))C.set(r,!0);else return;let L=!0;C.forEach(T=>{T||(L=!1)}),L&&(S?.(),v(m.current),h&&g?.(),i&&i())};return E.jsx(N,{isPresent:y,initial:!a.current||t?void 0:!1,custom:o,presenceAffectsLayout:c,mode:n,root:M,onExitComplete:y?void 0:k,anchorX:R,children:p},r)})})};const q=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Y=U("x",q);export{Q as A,Y as X};
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.