vendor: 4,715 bytes, line 1
1import{r as i,j as P,R as h}from"./app-DP13319Q.js";function _(e,t=[]){let n=[];function c(u,s){const r=i.createContext(s);r.displayName=u+"Context";const f=n.length;n=[...n,s];const a=l=>{var M;const{scope:m,children:p,...N}=l,S=((M=m==null?void 0:m[e])==null?void 0:M[f])||r,v=i.useMemo(()=>N,Object.values(N));return P.jsx(S.Provider,{value:v,children:p})};a.displayName=u+"Provider";function d(l,m){var S;const p=((S=m==null?void 0:m[e])==null?void 0:S[f])||r,N=i.useContext(p);if(N)return N;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${u}\``)}return[a,d]}const o=()=>{const u=n.map(s=>i.createContext(s));return function(r){const f=(r==null?void 0:r[e])||u;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:f}}),[r,f])}};return o.scopeName=e,[c,x(o,...t)]}function x(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const c=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(u){const s=c.reduce((r,{useScope:f,scopeName:a})=>{const l=f(u)[`__scope${a}`];return{...r,...l}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function L(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var A=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},g=h[" useInsertionEffect ".trim().toString()]||A;function $({prop:e,defaultProp:t,onChange:n=()=>{},caller:c}){const[o,u,s]=w({defaultProp:t,onChange:n}),r=e!==void 0,f=r?e:o;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const l=d.current;l!==r&&console.warn(`${c} is changing from ${l?"controlled":"uncontrolled"} to ${r?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=r},[r,c])}const a=i.useCallback(d=>{var l;if(r){const m=O(d)?d(e):d;m!==e&&((l=s.current)==null||l.call(s,m))}else u(d)},[r,e,u,s]);return[f,a]}function w({defaultProp:e,onChange:t}){const[n,c]=i.useState(e),o=i.useRef(n),u=i.useRef(t);return g(()=>{u.current=t},[t]),i.useEffect(()=>{var s;o.current!==n&&((s=u.current)==null||s.call(u,n),o.current=n)},[n,o]),[n,c,u]}function O(e){return typeof e=="function"}function y(e,t){return i.useReducer((n,c)=>t[n][c]??n,e)}var E=e=>{const{present:t,children:n}=e,c=T(t),o=typeof n=="function"?n({present:c.isPresent}):i.Children.only(n),u=b(c.ref,I(o));return typeof n=="function"||c.isPresent?i.cloneElement(o,{ref:u}):null};E.displayName="Presence";function T(e){const[t,n]=i.useState(),c=i.useRef(null),o=i.useRef(e),u=i.useRef("none"),s=e?"mounted":"unmounted",[r,f]=y(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const a=R(c.current);u.current=r==="mounted"?a:"none"},[r]),A(()=>{const a=c.current,d=o.current;if(d!==e){const m=u.current,p=R(a);e?f("MOUNT"):p==="none"||(a==null?void 0:a.display)==="none"?f("UNMOUNT"):f(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),A(()=>{if(t){let a;const d=t.ownerDocument.defaultView??window,l=p=>{const S=R(c.current).includes(CSS.escape(p.animationName));if(p.target===t&&S&&(f("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",a=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=p=>{p.target===t&&(u.current=R(c.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(a),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(r),ref:i.useCallback(a=>{c.current=a?getComputedStyle(a):null,n(a)},[])}}function C(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function b(...e){const t=i.useRef(e);return t.current=e,i.useCallback(n=>{const c=t.current;let o=!1;const u=c.map(s=>{const r=C(s,n);return!o&&typeof r=="function"&&(o=!0),r});if(o)return()=>{for(let s=0;s<u.length;s++){const r=u[s];typeof r=="function"?r():C(c[s],null)}}},[])}function R(e){return(e==null?void 0:e.animationName)||"none"}function I(e){var c,o;let t=(c=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:c.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{E as P,$ as a,_ as b,L as c,A as u};
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.