"use strict";const e=require("react"),c={prefix:String(Math.round(Math.random()*1e10)),current:0},d=e.createContext(c),f=e.createContext(!1);let l=!!(typeof window<"u"&&window.document&&window.document.createElement),i=new WeakMap;function p(r=!1){let t=e.useContext(d),n=e.useRef(null);if(n.current===null&&!r){var a,u;let o=(u=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||u===void 0||(a=u.ReactCurrentOwner)===null||a===void 0?void 0:a.current;if(o){let $=i.get(o);$==null?i.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==$.state&&(t.current=$.id,i.delete(o))}n.current=++t.current}return n.current}function v(r){let t=e.useContext(d);t===c&&!l&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=p(!!r),a=t===c&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return r||`${a}-${n}`}function b(r){let t=e.useId(),[n]=e.useState(s()),a=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${c.prefix}`;return r||`${a}-${t}`}const x=typeof e.useId=="function"?b:v;function S(){return!1}function m(){return!0}function w(r){return()=>{}}function s(){return typeof e.useSyncExternalStore=="function"?e.useSyncExternalStore(w,S,m):e.useContext(f)}exports.$b5e257d569688ac6$export$535bd6ca7f90a273=s;exports.$b5e257d569688ac6$export$619500959fc48b26=x;
//# sourceMappingURL=SSRProvider-DZRLwxPS.cjs.js.map
