const globalStoreId = `effect/GlobalValue`;
let globalStore;
const globalValue = (id, compute) => {
  if (!globalStore) {
    globalThis[globalStoreId] ??= /* @__PURE__ */ new Map();
    globalStore = globalThis[globalStoreId];
  }
  if (!globalStore.has(id)) {
    globalStore.set(id, compute());
  }
  return globalStore.get(id);
};
export {
  globalValue
};
//# sourceMappingURL=dist-esm-GlobalValue.js.map
