@djangocfg/api 2.1.565 → 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/clients.cjs CHANGED
@@ -170,11 +170,10 @@ var _storageMode = "localStorage";
170
170
  var _storage = backendFor(_storageMode);
171
171
  function detectLocale() {
172
172
  try {
173
- if (typeof document !== "undefined") {
174
- const m = document.cookie.match(/(?:^|;\s*)NEXT_LOCALE=([^;]*)/);
175
- const locale = m?.[1];
176
- if (locale !== void 0) return decodeURIComponent(locale);
177
- }
173
+ if (typeof document === "undefined") return null;
174
+ const m = document.cookie.match(/(?:^|;\s*)NEXT_LOCALE=([^;]*)/);
175
+ const locale = m?.[1];
176
+ if (locale !== void 0) return decodeURIComponent(locale);
178
177
  if (typeof navigator !== "undefined" && navigator.language) {
179
178
  return navigator.language;
180
179
  }
@@ -306,7 +305,15 @@ function ensureStorageSync() {
306
305
  window.addEventListener(SESSION_SYNC_EVENT, () => notifySessionChanged());
307
306
  }
308
307
  __name(ensureStorageSync, "ensureStorageSync");
309
- var _sessionExpiredHandlers = /* @__PURE__ */ new Set();
308
+ var SESSION_EXPIRED_REGISTRY = `cfg-auth:expired-handlers:${ACCESS_KEY}`;
309
+ var _sessionExpiredHandlers = (() => {
310
+ const g = globalThis;
311
+ const existing = g[SESSION_EXPIRED_REGISTRY];
312
+ if (existing instanceof Set) return existing;
313
+ const created = /* @__PURE__ */ new Set();
314
+ g[SESSION_EXPIRED_REGISTRY] = created;
315
+ return created;
316
+ })();
310
317
  var _client = null;
311
318
  function pushClientConfig() {
312
319
  if (!_client) return;