@djangocfg/api 2.1.563 → 2.1.566

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -213,11 +213,10 @@ var _storageMode = "localStorage";
213
213
  var _storage = backendFor(_storageMode);
214
214
  function detectLocale() {
215
215
  try {
216
- if (typeof document !== "undefined") {
217
- const m = document.cookie.match(/(?:^|;\s*)NEXT_LOCALE=([^;]*)/);
218
- const locale = m?.[1];
219
- if (locale !== void 0) return decodeURIComponent(locale);
220
- }
216
+ if (typeof document === "undefined") return null;
217
+ const m = document.cookie.match(/(?:^|;\s*)NEXT_LOCALE=([^;]*)/);
218
+ const locale = m?.[1];
219
+ if (locale !== void 0) return decodeURIComponent(locale);
221
220
  if (typeof navigator !== "undefined" && navigator.language) {
222
221
  return navigator.language;
223
222
  }
@@ -349,7 +348,15 @@ function ensureStorageSync() {
349
348
  window.addEventListener(SESSION_SYNC_EVENT, () => notifySessionChanged());
350
349
  }
351
350
  __name(ensureStorageSync, "ensureStorageSync");
352
- var _sessionExpiredHandlers = /* @__PURE__ */ new Set();
351
+ var SESSION_EXPIRED_REGISTRY = `cfg-auth:expired-handlers:${ACCESS_KEY}`;
352
+ var _sessionExpiredHandlers = (() => {
353
+ const g = globalThis;
354
+ const existing = g[SESSION_EXPIRED_REGISTRY];
355
+ if (existing instanceof Set) return existing;
356
+ const created = /* @__PURE__ */ new Set();
357
+ g[SESSION_EXPIRED_REGISTRY] = created;
358
+ return created;
359
+ })();
353
360
  var _client = null;
354
361
  function pushClientConfig() {
355
362
  if (!_client) return;