"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
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);
};
exports.globalValue = globalValue;
//# sourceMappingURL=dist-esm-GlobalValue.cjs.map
