@burdenoff/fe-libs 2026.717.1 → 2026.717.3

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.
@@ -56,6 +56,26 @@ export interface GraphQLFetchOptions {
56
56
  * The returned `errors` are still available to the caller.
57
57
  */
58
58
  suppressGlobalErrorEvent?: boolean;
59
+ /**
60
+ * Skip the automatic UNAUTHENTICATED → refresh-token → retry-once cycle for
61
+ * this call. Set internally on (a) the refresh mutation itself and (b) the
62
+ * one post-refresh retry, so the recovery path can never recurse. Callers
63
+ * implementing their own refresh handling (the Apollo error link) may also
64
+ * set it to opt out.
65
+ */
66
+ skipAuthRetry?: boolean;
67
+ }
68
+ /**
69
+ * Fired when the session is definitively expired: an authenticated request got
70
+ * UNAUTHENTICATED and the refresh-token attempt failed for a non-transient
71
+ * reason. AppShellProvider listens and performs the forced logout + redirect
72
+ * to login (with `reason=session-expired`), so the user is told the session
73
+ * ended instead of watching data silently disappear.
74
+ */
75
+ export declare const SESSION_EXPIRED_EVENT: "burdenoff:session-expired";
76
+ export interface SessionExpiredDetail {
77
+ operationName?: string;
78
+ gateway?: Gateway;
59
79
  }
60
80
  export interface GraphQLResponse<T = unknown> {
61
81
  data: T | null;
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/shared/graphql/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAY,KAAK,OAAO,EAAsB,MAAM,WAAW,CAAC;AAuBvE,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,SAAS,CAAC,EA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AAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAqCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAIrD;AA6ND,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,OAAO,CAAC,CAyElB;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,EAC5C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAsN7B"}
@@ -8,8 +8,12 @@ import { getValidAccessTokenFromStorage as c, sanitizeExtraHeaders as l, sanitiz
8
8
  import { isWorkspaceTokenValidForContext as f } from "./workspaceToken.js";
9
9
  import { dispatchBackendErrorEvent as p, markConnectionHealthy as m } from "../utils/backendErrors.js";
10
10
  //#region src/shared/graphql/fetch.ts
11
- var h = "\n mutation IssueWorkspaceToken($input: IssueWorkspaceTokenInput!) {\n issueWorkspaceToken(input: $input) {\n success\n token\n workspaceId\n error {\n message\n }\n }\n }\n", g = /* @__PURE__ */ new Map();
12
- function _() {
11
+ var h = "burdenoff:session-expired";
12
+ function g(e) {
13
+ typeof window > "u" || window.dispatchEvent(new CustomEvent(h, { detail: e }));
14
+ }
15
+ var _ = "\n mutation IssueWorkspaceToken($input: IssueWorkspaceTokenInput!) {\n issueWorkspaceToken(input: $input) {\n success\n token\n workspaceId\n error {\n message\n }\n }\n }\n", v = /* @__PURE__ */ new Map();
16
+ function y() {
13
17
  try {
14
18
  let e = sessionStorage.getItem("bf-active-profile");
15
19
  return e ? c(localStorage.getItem(`bf-p-${e}-tokens`)) : null;
@@ -17,21 +21,21 @@ function _() {
17
21
  return null;
18
22
  }
19
23
  }
20
- function v() {
24
+ function b() {
21
25
  try {
22
26
  return i();
23
27
  } catch {
24
28
  return null;
25
29
  }
26
30
  }
27
- function y() {
31
+ function x() {
28
32
  try {
29
33
  return sessionStorage.getItem("bf-active-profile");
30
34
  } catch {
31
35
  return null;
32
36
  }
33
37
  }
34
- function b(e) {
38
+ function S(e) {
35
39
  try {
36
40
  let [, t] = e.split(".");
37
41
  if (!t || typeof globalThis.atob != "function") return null;
@@ -41,11 +45,11 @@ function b(e) {
41
45
  return null;
42
46
  }
43
47
  }
44
- function x(e) {
45
- let t = b(e)?.exp;
48
+ function C(e) {
49
+ let t = S(e)?.exp;
46
50
  return typeof t == "number" ? t * 1e3 <= Date.now() + 3e4 : !1;
47
51
  }
48
- function S() {
52
+ function ee() {
49
53
  try {
50
54
  let e = sessionStorage.getItem("bf-active-profile");
51
55
  if (e) {
@@ -58,7 +62,7 @@ function S() {
58
62
  return null;
59
63
  }
60
64
  }
61
- function C() {
65
+ function w() {
62
66
  try {
63
67
  let e = sessionStorage.getItem("bf-active-profile");
64
68
  if (e) {
@@ -70,64 +74,64 @@ function C() {
70
74
  return "en";
71
75
  }
72
76
  }
73
- function w() {
77
+ function T() {
74
78
  return s("workspace");
75
79
  }
76
- function T() {
80
+ function E() {
77
81
  return s("organization");
78
82
  }
79
- function E() {
83
+ function D() {
80
84
  return s("tenant");
81
85
  }
82
- function D() {
86
+ function O() {
83
87
  return s("project");
84
88
  }
85
- function O() {
89
+ function k() {
86
90
  try {
87
91
  return typeof window > "u" ? null : new URLSearchParams(window.location.search).get("org");
88
92
  } catch {
89
93
  return null;
90
94
  }
91
95
  }
92
- function k(e) {
96
+ function A(e) {
93
97
  return {
94
- workspaceId: typeof e.workspaceId == "string" ? e.workspaceId : w() || void 0,
95
- organizationId: typeof e.organizationId == "string" ? e.organizationId : T() || O() || void 0,
96
- tenantId: typeof e.tenantId == "string" ? e.tenantId : E() || void 0,
97
- projectId: typeof e.projectId == "string" ? e.projectId : D() || void 0
98
+ workspaceId: typeof e.workspaceId == "string" ? e.workspaceId : T() || void 0,
99
+ organizationId: typeof e.organizationId == "string" ? e.organizationId : E() || k() || void 0,
100
+ tenantId: typeof e.tenantId == "string" ? e.tenantId : D() || void 0,
101
+ projectId: typeof e.projectId == "string" ? e.projectId : O() || void 0
98
102
  };
99
103
  }
100
- function A(e, t, n) {
104
+ function j(e, t, n) {
101
105
  try {
102
- let r = a() ?? y();
106
+ let r = a() ?? x();
103
107
  if (!r) return;
104
108
  o(r, t), sessionStorage.setItem("burdenoff-active-context-workspace", e), n && sessionStorage.setItem("burdenoff-active-context-organization", n);
105
109
  } catch {}
106
110
  }
107
- async function j(e) {
111
+ async function M(e) {
108
112
  let { url: t, authToken: n, workspaceId: r, organizationId: i, projectId: a, locale: o, signal: s, currentQuery: c } = e;
109
113
  if (!n || c.includes("issueWorkspaceToken")) return null;
110
- let l = r || w();
114
+ let l = r || T();
111
115
  if (!l) return null;
112
- let u = v(), d = w(), p = i || T() || O();
116
+ let u = b(), d = T(), p = i || E() || k();
113
117
  if (u && d === l && f(u, {
114
118
  workspaceId: l,
115
119
  organizationId: p,
116
120
  projectId: a
117
121
  })) return u;
118
122
  if (!p) return null;
119
- let m = `${p}:${l}:${a ?? ""}`, _ = g.get(m);
120
- if (_) return _;
121
- let y = fetch(t, {
123
+ let m = `${p}:${l}:${a ?? ""}`, h = v.get(m);
124
+ if (h) return h;
125
+ let g = fetch(t, {
122
126
  method: "POST",
123
127
  headers: {
124
128
  "Content-Type": "application/json",
125
- [W]: "true",
129
+ [G]: "true",
126
130
  Authorization: `Bearer ${n}`,
127
131
  ...o ? { "Accept-Language": o } : {}
128
132
  },
129
133
  body: JSON.stringify({
130
- query: h,
134
+ query: _,
131
135
  variables: { input: {
132
136
  organizationId: p,
133
137
  workspaceId: l,
@@ -137,80 +141,80 @@ async function j(e) {
137
141
  signal: s
138
142
  }).then(async (e) => {
139
143
  let t = (await e.json()).data?.issueWorkspaceToken;
140
- return t?.success && t.token ? (A(t.workspaceId || l, t.token, p), t.token) : null;
144
+ return t?.success && t.token ? (j(t.workspaceId || l, t.token, p), t.token) : null;
141
145
  }).catch(() => null).finally(() => {
142
- g.delete(m);
146
+ v.delete(m);
143
147
  });
144
- return g.set(m, y), y;
148
+ return v.set(m, g), g;
145
149
  }
146
- function M(e, n) {
150
+ function N(e, n) {
147
151
  let i = r[e], a = t(), o = e === "global" ? a.globalBaseUrl : a.workspaceBaseUrl, s = n || o;
148
152
  return `${s.endsWith("/") ? s.slice(0, -1) : s}${i.graphql}`;
149
153
  }
150
- function N() {
154
+ function P() {
151
155
  return globalThis;
152
156
  }
153
- function P() {
154
- let e = N();
157
+ function F() {
158
+ let e = P();
155
159
  return e.__graphqlFetchQueues ||= /* @__PURE__ */ new Map(), e.__graphqlFetchQueues;
156
160
  }
157
- function F() {
158
- let e = N();
161
+ function I() {
162
+ let e = P();
159
163
  return e.__graphqlFetchResponseCache ||= /* @__PURE__ */ new Map(), e.__graphqlFetchResponseCache;
160
164
  }
161
- function I() {
162
- let e = N();
165
+ function L() {
166
+ let e = P();
163
167
  return e.__graphqlFetchPendingResponses ||= /* @__PURE__ */ new Map(), e.__graphqlFetchPendingResponses;
164
168
  }
165
- function L() {
166
- F().clear(), I().clear(), n();
169
+ function R() {
170
+ I().clear(), L().clear(), n();
167
171
  }
168
- var R = 10, z = 600, B = 100, V = 1e4, H = 15e3, U = new Set([
172
+ var z = 10, B = 600, V = 100, H = 1e4, U = 15e3, W = new Set([
169
173
  "traceparent",
170
174
  "tracestate",
171
175
  "baggage"
172
- ]), W = "Apollo-Require-Preflight";
173
- function G() {
174
- if (typeof performance > "u") return B;
175
- let e = N();
176
- return e.__graphqlFetchBurstStartedAt ??= performance.now(), performance.now() - e.__graphqlFetchBurstStartedAt < V ? z : B;
176
+ ]), G = "Apollo-Require-Preflight";
177
+ function te() {
178
+ if (typeof performance > "u") return V;
179
+ let e = P();
180
+ return e.__graphqlFetchBurstStartedAt ??= performance.now(), performance.now() - e.__graphqlFetchBurstStartedAt < H ? B : V;
177
181
  }
178
- function K(e) {
182
+ function ne(e) {
179
183
  return typeof e.query == "string" ? /^\s*query\b/.test(e.query) : !1;
180
184
  }
181
- function ee(e) {
185
+ function re(e) {
182
186
  return typeof e.operationName == "string" && e.operationName.length > 0 ? {
183
187
  operationName: e.operationName,
184
188
  variables: e.variables ?? null
185
189
  } : e;
186
190
  }
187
- function te(e) {
191
+ function ie(e) {
188
192
  let t = /* @__PURE__ */ new Map();
189
193
  for (let [n, r] of Object.entries(e)) {
190
194
  let e = n.toLowerCase();
191
- U.has(e) || t.set(e, r);
195
+ W.has(e) || t.set(e, r);
192
196
  }
193
197
  return Object.fromEntries(Array.from(t.entries()).sort(([e], [t]) => e.localeCompare(t)));
194
198
  }
195
- function q(t) {
199
+ function K(t) {
196
200
  let n = e();
197
201
  return {
198
202
  ...t,
199
- [W]: "true",
203
+ [G]: "true",
200
204
  traceparent: n.traceparent
201
205
  };
202
206
  }
203
- function J(e) {
204
- return ne(e) && Array.isArray(e.errors);
207
+ function q(e) {
208
+ return ae(e) && Array.isArray(e.errors);
205
209
  }
206
- function Y(e) {
210
+ function J(e) {
207
211
  let t = e.status;
208
212
  return t === 401 ? "Invalid email or password." : t === 403 ? "You do not have permission to do that." : t === 404 ? "We could not find what you were looking for." : t === 408 || t === 504 ? "The server took too long to respond. Please try again." : t === 429 ? "Too many requests. Please wait a moment and try again." : t >= 500 && t < 600 ? "The server is having trouble right now. Please try again in a moment." : t >= 400 && t < 500 ? "The request could not be processed. Please refresh and try again." : "We could not reach the server. Please check your connection and try again.";
209
213
  }
210
- function ne(e) {
214
+ function ae(e) {
211
215
  return typeof e == "object" && !!e && !Array.isArray(e);
212
216
  }
213
- async function X(e) {
217
+ async function Y(e) {
214
218
  let t = await e.text();
215
219
  if (!t) return null;
216
220
  try {
@@ -219,21 +223,21 @@ async function X(e) {
219
223
  return t;
220
224
  }
221
225
  }
222
- async function Z(e, t, n) {
226
+ async function X(e, t, n) {
223
227
  if (n.length === 1) {
224
228
  let r = n[0];
225
229
  try {
226
230
  let n = await fetch(e, {
227
231
  method: "POST",
228
- headers: q(t),
232
+ headers: K(t),
229
233
  credentials: "include",
230
234
  body: JSON.stringify(r.body),
231
235
  signal: r.signal
232
- }), i = await X(n);
233
- if (!n.ok && !J(i)) throw Error(Y(n));
234
- r.cacheKey && F().set(r.cacheKey, {
236
+ }), i = await Y(n);
237
+ if (!n.ok && !q(i)) throw Error(J(n));
238
+ r.cacheKey && !q(i) && I().set(r.cacheKey, {
235
239
  value: i,
236
- expiresAt: Date.now() + H
240
+ expiresAt: Date.now() + U
237
241
  }), r.resolve(i);
238
242
  } catch (e) {
239
243
  r.reject(e);
@@ -244,40 +248,40 @@ async function Z(e, t, n) {
244
248
  try {
245
249
  let i = await fetch(e, {
246
250
  method: "POST",
247
- headers: q(t),
251
+ headers: K(t),
248
252
  credentials: "include",
249
253
  body: JSON.stringify(r)
250
- }), a = await X(i);
251
- if (!i.ok && !J(a)) throw Error(Y(i));
254
+ }), a = await Y(i);
255
+ if (!i.ok && !q(a)) throw Error(J(i));
252
256
  if (Array.isArray(a)) a.forEach((e, t) => {
253
257
  let r = n[t];
254
- r && (r.cacheKey && F().set(r.cacheKey, {
258
+ r && (r.cacheKey && !q(e) && I().set(r.cacheKey, {
255
259
  value: e,
256
- expiresAt: Date.now() + H
260
+ expiresAt: Date.now() + U
257
261
  }), r.resolve(e));
258
262
  });
259
263
  else {
260
- let e = J(a) ? a.errors?.[0]?.message ?? Y(i) : Y(i), t = Error(e);
261
- J(a) && (t.errors = a.errors), n.forEach((e) => e.reject(t));
264
+ let e = q(a) ? a.errors?.[0]?.message ?? J(i) : J(i), t = Error(e);
265
+ q(a) && (t.errors = a.errors), n.forEach((e) => e.reject(t));
262
266
  }
263
267
  } catch (e) {
264
268
  n.forEach((t) => t.reject(e));
265
269
  }
266
270
  }
267
- function Q(e, t, n, r, i) {
268
- let a = te(t), o = Math.max(1, i?.batchMax ?? R), s = Math.max(0, i?.batchInterval ?? G()), c = `${e}|${JSON.stringify(a)}`, l = K(n) ? `${c}|${JSON.stringify(ee(n))}` : void 0;
271
+ function Z(e, t, n, r, i) {
272
+ let a = ie(t), o = Math.max(1, i?.batchMax ?? z), s = Math.max(0, i?.batchInterval ?? te()), c = `${e}|${JSON.stringify(a)}`, l = ne(n) ? `${c}|${JSON.stringify(re(n))}` : void 0;
269
273
  if (l) {
270
- let e = F(), t = e.get(l);
274
+ let e = I(), t = e.get(l);
271
275
  if (t) {
272
276
  if (t.expiresAt > Date.now()) return Promise.resolve(t.value);
273
277
  e.delete(l);
274
278
  }
275
- let n = I().get(l);
279
+ let n = L().get(l);
276
280
  if (n) return n;
277
281
  }
278
282
  let u = new Promise((t, i) => {
279
283
  if (o <= 1) {
280
- Z(e, a, [{
284
+ X(e, a, [{
281
285
  body: n,
282
286
  resolve: t,
283
287
  reject: i,
@@ -286,7 +290,7 @@ function Q(e, t, n, r, i) {
286
290
  }]);
287
291
  return;
288
292
  }
289
- let u = P(), d = u.get(c);
293
+ let u = F(), d = u.get(c);
290
294
  if (d || (d = {
291
295
  requests: [],
292
296
  timer: null,
@@ -299,68 +303,94 @@ function Q(e, t, n, r, i) {
299
303
  signal: r,
300
304
  cacheKey: l
301
305
  }), d.requests.length >= d.batchMax) {
302
- $(e, a, c);
306
+ Q(e, a, c);
303
307
  return;
304
308
  }
305
- d.timer ||= setTimeout(() => $(e, a, c), d.batchInterval);
309
+ d.timer ||= setTimeout(() => Q(e, a, c), d.batchInterval);
306
310
  });
307
- return l && (I().set(l, u), u.finally(() => {
308
- I().delete(l);
311
+ return l && (L().set(l, u), u.finally(() => {
312
+ L().delete(l);
309
313
  }).catch(() => {})), u;
310
314
  }
311
- function $(e, t, n) {
312
- let r = P(), i = r.get(n);
313
- i && (r.delete(n), i.timer &&= (clearTimeout(i.timer), null), Z(e, t, i.requests));
315
+ function Q(e, t, n) {
316
+ let r = F(), i = r.get(n);
317
+ i && (r.delete(n), i.timer &&= (clearTimeout(i.timer), null), X(e, t, i.requests));
314
318
  }
315
- async function re(e) {
316
- let { gateway: t, query: n, variables: r, operationName: i, authToken: a, workspaceToken: o, workspaceId: s, organizationId: c, tenantId: u, projectId: h, locale: g, baseUrl: y, extraHeaders: b, signal: w, suppressGlobalErrorEvent: T } = e, D = d(M(t, y)), O = a && !x(a) ? a : _(), A = g ?? C(), N = k({
319
+ async function $(e) {
320
+ let { gateway: t, query: n, variables: r, operationName: i, authToken: a, workspaceToken: o, workspaceId: s, organizationId: c, tenantId: u, projectId: h, locale: _, baseUrl: v, extraHeaders: x, signal: S, suppressGlobalErrorEvent: T } = e, E = d(N(t, v)), O = a && !C(a) ? a : y(), k = _ ?? w(), j = A({
317
321
  workspaceId: s,
318
322
  organizationId: c,
319
323
  tenantId: u,
320
324
  projectId: h
321
325
  }), P = {
322
326
  "Content-Type": "application/json",
323
- [W]: "true"
327
+ [G]: "true"
324
328
  };
325
- O && (P.Authorization = `Bearer ${O}`), A && (P["Accept-Language"] = A);
326
- let F = S();
329
+ O && (P.Authorization = `Bearer ${O}`), k && (P["Accept-Language"] = k);
330
+ let F = ee();
327
331
  if (F?.country && (P["X-Geo-Country"] = F.country), F?.currency && (P["X-Geo-Currency"] = F.currency), F?.timezone && (P["X-Geo-Timezone"] = F.timezone), t === "workspace" ? o !== !1 : o) {
328
- let e = typeof o == "string" ? o : v();
329
- e && !f(e, N) && (e = null), !e && o === !0 && (e = await j({
330
- url: D,
332
+ let e = typeof o == "string" ? o : b();
333
+ e && !f(e, j) && (e = null), !e && (o === !0 || t === "workspace" && o === void 0 || typeof o == "string") && (e = await M({
334
+ url: E,
331
335
  authToken: O,
332
- workspaceId: N.workspaceId,
333
- organizationId: N.organizationId,
334
- projectId: N.projectId,
335
- locale: A,
336
- signal: w,
336
+ workspaceId: j.workspaceId,
337
+ organizationId: j.organizationId,
338
+ projectId: j.projectId,
339
+ locale: k,
340
+ signal: S,
337
341
  currentQuery: n
338
342
  })), e && (P["X-Workspace-Authorization"] = `Bearer ${e}`);
339
343
  }
340
344
  if (t === "workspace" || s) {
341
- let e = N.workspaceId;
345
+ let e = j.workspaceId;
342
346
  e && (P["x-workspace-id"] = e);
343
347
  }
344
348
  if (t === "global" || c) {
345
- let e = N.organizationId;
349
+ let e = j.organizationId;
346
350
  e && (P["x-org-id"] = e);
347
351
  }
348
352
  if (u) {
349
- let e = typeof u == "string" ? u : E();
353
+ let e = typeof u == "string" ? u : D();
350
354
  e && (P["x-tenant-id"] = e);
351
355
  }
352
356
  if (t === "workspace" || h) {
353
- let e = N.projectId;
357
+ let e = j.projectId;
354
358
  e && (P["x-project-id"] = e);
355
359
  }
356
- let I = l(b);
360
+ let I = l(x);
357
361
  I && Object.assign(P, I);
358
362
  let L = { query: n };
359
363
  r && (L.variables = r), i && (L.operationName = i);
364
+ let R = async (n) => {
365
+ if (e.skipAuthRetry || !O || typeof window > "u" || !n?.length) return null;
366
+ let r = await import("../utils/authErrorHandling.js");
367
+ return r.hasAuthGraphQLErrors(n) ? await r.attemptTokenRefresh({
368
+ globalBaseUrl: d(N("global", t === "global" ? v : void 0)),
369
+ ...r.getSharedTokenRefreshRefs()
370
+ }) ? $({
371
+ ...e,
372
+ authToken: void 0,
373
+ workspaceToken: typeof o == "string" ? !0 : o,
374
+ skipAuthRetry: !0
375
+ }) : (g({
376
+ operationName: i,
377
+ gateway: t
378
+ }), null) : null;
379
+ };
360
380
  try {
361
- let e = await Q(D, P, L, w);
362
- return m(), e.errors?.length && !T && p({ errors: e.errors }, { operationName: i }), e;
381
+ let e = await Z(E, P, L, S);
382
+ if (m(), e.errors?.length) {
383
+ let t = await R(e.errors);
384
+ if (t) return t;
385
+ T || p({ errors: e.errors }, { operationName: i });
386
+ }
387
+ return e;
363
388
  } catch (e) {
389
+ let t = e.errors;
390
+ if (t?.length) {
391
+ let e = await R(t);
392
+ if (e) return e;
393
+ }
364
394
  throw T || p(e, {
365
395
  operationName: i,
366
396
  fallbackMessage: "We could not reach the server. Please check your connection and try again."
@@ -368,4 +398,4 @@ async function re(e) {
368
398
  }
369
399
  }
370
400
  //#endregion
371
- export { L as clearGraphqlFetchResponseCache, Q as enqueueGraphQLFetch, j as ensureWorkspaceToken, _ as getStoredAuthToken, C as getStoredLocale, T as getStoredOrganizationId, D as getStoredProjectId, w as getStoredWorkspaceId, v as getStoredWorkspaceToken, re as graphqlFetch, M as resolveGatewayUrl };
401
+ export { h as SESSION_EXPIRED_EVENT, R as clearGraphqlFetchResponseCache, Z as enqueueGraphQLFetch, M as ensureWorkspaceToken, y as getStoredAuthToken, w as getStoredLocale, E as getStoredOrganizationId, O as getStoredProjectId, T as getStoredWorkspaceId, b as getStoredWorkspaceToken, $ as graphqlFetch, N as resolveGatewayUrl };
@@ -1 +1 @@
1
- {"version":3,"file":"AppShellProvider.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/AppShellProvider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa1F,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAY/B,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAQL,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AAyBnB,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IAEpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,sBAAsB;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,aAAa,EAA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Q,EAAE,SAAS,CAAC;IACpB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AA0eD,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,qBAAqB,2CA8U3F"}
@@ -1,44 +1,44 @@
1
1
  import { isShellLessRoute as e } from "../config/shellRoutes.js";
2
2
  import { readActiveContextValueWithUrlPrecedence as t } from "./shell/ActiveContextStorage.js";
3
3
  import { BACKEND_ERROR_EVENT as n, CONNECTION_STATUS_EVENT as r, dispatchBackendErrorEvent as i, isBackendErrorDisplay as a, shouldToastBackendError as o } from "../utils/backendErrors.js";
4
- import { graphqlFetch as s } from "../graphql/fetch.js";
5
- import { attemptTokenRefresh as c, clearAuthSessionStorage as l, isAuthNetworkError as u } from "../utils/authErrorHandling.js";
6
- import { AppShellContextProvider as d } from "./shell/AppShellContext.js";
7
- import { AuthProvider as f } from "./shell/AuthProvider.js";
8
- import { ActiveContextProvider as p } from "./shell/ActiveContextProvider.js";
9
- import { LogManager as ee } from "../logger/LogManager.js";
10
- import { ConsoleTransport as te } from "../logger/ConsoleTransport.js";
4
+ import { SESSION_EXPIRED_EVENT as s, graphqlFetch as c } from "../graphql/fetch.js";
5
+ import { attemptTokenRefresh as l, clearAuthSessionStorage as u, getSharedTokenRefreshRefs as d, isAuthNetworkError as f } from "../utils/authErrorHandling.js";
6
+ import { AppShellContextProvider as p } from "./shell/AppShellContext.js";
7
+ import { AuthProvider as ee } from "./shell/AuthProvider.js";
8
+ import { ActiveContextProvider as te } from "./shell/ActiveContextProvider.js";
9
+ import { LogManager as ne } from "../logger/LogManager.js";
10
+ import { ConsoleTransport as re } from "../logger/ConsoleTransport.js";
11
11
  import { ThemeProvider as m } from "./shell/ThemeProvider.js";
12
- import { ErrorFallback as ne } from "../components/ErrorFallback.js";
12
+ import { ErrorFallback as ie } from "../components/ErrorFallback.js";
13
13
  import { m as h } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
14
14
  import { PWAInstallBanner as g } from "../components/PWAInstallBanner.js";
15
15
  import { FeatureFlagsProvider as _ } from "./shell/FeatureFlagsProvider.js";
16
16
  import { FeatureFlagProvider as v } from "../feature-flags/FeatureFlagProvider.js";
17
17
  import { GlobalUiProvider as y } from "./shell/GlobalUiProvider.js";
18
18
  import { ShellUiProvider as b } from "./shell/ShellUiProvider.js";
19
- import { ContextManagerProvider as re } from "./shell/ContextManagerProvider.js";
20
- import { AuthTokenProvider as ie } from "./shell/AuthTokenProvider.js";
21
- import { MultiGatewayProvider as ae } from "./shell/MultiGatewayProvider.js";
22
- import { G as x, Q as S, j as C, w as oe } from "../../node_modules/web-vitals/dist/web-vitals.js";
23
- import { ProfileI18nBridge as se } from "./shell/ProfileI18nBridge.js";
24
- import { ProfileGeographyBridge as w } from "./shell/ProfileGeographyBridge.js";
25
- import { DevtoolsSink as T } from "../events/sinks/DevtoolsSink.js";
26
- import { BroadcastChannelSink as E } from "../events/sinks/BroadcastChannelSink.js";
27
- import { BackendAuditSink as D } from "../events/sinks/BackendAuditSink.js";
28
- import { RybbitSink as O } from "../events/sinks/RybbitSink.js";
29
- import { OtelBrowserSink as k } from "../events/sinks/OtelBrowserSink.js";
30
- import { EventBusProvider as ce, useEventBus as A } from "../../shared-events.js";
31
- import { useReferralAttribution as j } from "../hooks/useReferralAttribution.js";
32
- import { TourPlayerProvider as M } from "../tours/TourPlayerProvider.js";
33
- import { ToursProvider as N, useToursContext as P } from "../tours/ToursContext.js";
34
- import { TourInitializer as F } from "../tours/TourInitializer.js";
35
- import { Suspense as I, useCallback as L, useEffect as R, useMemo as z, useRef as B } from "react";
36
- import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
37
- import { BrowserRouter as le, useLocation as W } from "react-router-dom";
38
- import { Toaster as G, toast as K } from "sonner";
19
+ import { ContextManagerProvider as ae } from "./shell/ContextManagerProvider.js";
20
+ import { AuthTokenProvider as oe } from "./shell/AuthTokenProvider.js";
21
+ import { MultiGatewayProvider as se } from "./shell/MultiGatewayProvider.js";
22
+ import { G as x, Q as S, j as C, w } from "../../node_modules/web-vitals/dist/web-vitals.js";
23
+ import { ProfileI18nBridge as T } from "./shell/ProfileI18nBridge.js";
24
+ import { ProfileGeographyBridge as E } from "./shell/ProfileGeographyBridge.js";
25
+ import { DevtoolsSink as D } from "../events/sinks/DevtoolsSink.js";
26
+ import { BroadcastChannelSink as O } from "../events/sinks/BroadcastChannelSink.js";
27
+ import { BackendAuditSink as k } from "../events/sinks/BackendAuditSink.js";
28
+ import { RybbitSink as A } from "../events/sinks/RybbitSink.js";
29
+ import { OtelBrowserSink as j } from "../events/sinks/OtelBrowserSink.js";
30
+ import { EventBusProvider as ce, useEventBus as M } from "../../shared-events.js";
31
+ import { useReferralAttribution as N } from "../hooks/useReferralAttribution.js";
32
+ import { TourPlayerProvider as P } from "../tours/TourPlayerProvider.js";
33
+ import { ToursProvider as F, useToursContext as I } from "../tours/ToursContext.js";
34
+ import { TourInitializer as L } from "../tours/TourInitializer.js";
35
+ import { Suspense as R, useCallback as z, useEffect as B, useMemo as V, useRef as H } from "react";
36
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
37
+ import { BrowserRouter as le, useLocation as K } from "react-router-dom";
38
+ import { Toaster as q, toast as J } from "sonner";
39
39
  import { MutationCache as ue, QueryCache as de, QueryClient as fe, QueryClientProvider as pe } from "@tanstack/react-query";
40
40
  //#region src/shared/providers/AppShellProvider.tsx
41
- var q = {
41
+ var Y = {
42
42
  artistrybase: { prod: "cfbecacb6002" },
43
43
  atheletebridge: { prod: "c34c6ead7aa8" },
44
44
  adaptercloud: {},
@@ -67,8 +67,8 @@ var q = {
67
67
  subscriberbot: {},
68
68
  intelwatchtower: {},
69
69
  kadaikodi: {}
70
- }, J = /* @__PURE__ */ "nav.route.changed,auth.signed_in,auth.signed_out,support.ticket.created,support.ticket.closed,support.ticket.reopened,support.kb.article_rated,conversations.conversation.created,conversations.conversation.archived,notification.item.opened,notification.preference.updated,notification.admin.sent,notification.template.saved,notification.schedule.updated,collabkin.tree.created,collabkin.person.created,collabkin.memory.created,collabkin.story.created,collabkin.member.invited,crewfoundry.page.viewed,crewfoundry.dashboard.viewed,crewfoundry.job_posting.created,crewfoundry.candidate.created,crewfoundry.employee.created,crewfoundry.team.created,crewfoundry.project.created,crewfoundry.course.enrolled,crewfoundry.learning_path.created,crewfoundry.service.listed,crewfoundry.leave.approved,crewfoundry.payroll.processed,crewfoundry.invoice.created,coolandlovely.page.viewed,coolandlovely.brand.created,coolandlovely.collection.created,coolandlovely.style_item.created,coolandlovely.look.created,coolandlovely.collaboration.created,coolandlovely.lookbook.created,coolandlovely.wardrobe.item_added,coolandlovely.search.performed,vibecontrols.agent.registered,atheletebridge.page.viewed,atheletebridge.team.created,atheletebridge.fixture.created,atheletebridge.program.created,atheletebridge.session.completed,atheletebridge.metric.logged,atheletebridge.tournament.created,vibecontrols.agent.gateway_auth_setup,vibecontrols.session.created,vibecontrols.session.started,vibecontrols.session.terminal_opened_in_browser,vibecontrols.session.share_link_created,vibecontrols.session.joined_shared,vibecontrols.tunnel.created,vibecontrols.tunnel.started,vibecontrols.vibedeck.button_executed,vibecontrols.quota.agent_limit_hit,vibecontrols.quota.session_limit_hit,vibecontrols.quota.tunnel_limit_hit,vibecontrols.billing.upgrade_clicked,bigconsole.dashboard.imported,bigconsole.dashboard.shared,bigconsole.data_sink.imported,bigconsole.widget.created,bigconsole.widget.duplicated,bigconsole.ai.dashboard_generated,bigconsole.ai.dashboard_created,assethandler.page.viewed,assethandler.asset.viewed,assethandler.asset.created,assethandler.work_order.viewed,assethandler.work_order.created,assethandler.incident.viewed,assethandler.incident.created,assethandler.change.viewed,assethandler.change.created,assethandler.problem.viewed,assethandler.problem.created,assethandler.maintenance.viewed,assethandler.maintenance.created,assethandler.report.viewed,assethandler.analytics.viewed,movethewheels.page.viewed,movethewheels.shipment.created,movethewheels.shipment.delivered,movethewheels.order.created,movethewheels.route.planned,movethewheels.vehicle.assigned,movethewheels.warehouse.inbound_received,theglobalfuel.dashboard.viewed,theglobalfuel.asset.created,theglobalfuel.production.recorded,theglobalfuel.reserve.created,theglobalfuel.contract.created,theglobalfuel.shipment.scheduled,theglobalfuel.shipment.delivered,theglobalfuel.inventory_lot.created,theglobalfuel.emission.recorded,theglobalfuel.emission.verified,theglobalfuel.compliance_cert.created,housingvista.dashboard.viewed,housingvista.property.created,housingvista.property.updated,housingvista.property.deleted,housingvista.property.viewed,housingvista.shortlist.property_added,housingvista.transaction.created,housingvista.transaction.updated,housingvista.investment.created,housingvista.offer.created,housingvista.viewing.scheduled,housingvista.chat.conversation_opened,housingvista.chat.message_sent,housingvista.analytics.viewed,housingvista.asset.created,housingvista.asset.updated,housingvista.amc.purchased,housingvista.verification.submitted,housingvista.home_loan.apply_clicked,housingvista.market_analytics.viewed,housingvista.search.performed,housingvista.export.requested,manufacturedops.production_order.created,manufacturedops.production_order.updated,manufacturedops.production_order.transitioned,manufacturedops.operation.added,manufacturedops.operation.recorded,manufacturedops.work_center.created,manufacturedops.work_center.updated,manufacturedops.work_center.archived,manufacturedops.material_lot.created,manufacturedops.material_lot.updated,manufacturedops.material_lot.status_updated,manufacturedops.inspection_plan.created,manufacturedops.quality_inspection.recorded,manufacturedops.non_conformance.raised,manufacturedops.non_conformance.updated,manufacturedops.non_conformance.transitioned,manufacturedops.asset.created,manufacturedops.maintenance_work_order.created,manufacturedops.maintenance_work_order.transitioned,manufacturedops.downtime_event.recorded,manufacturedops.page.viewed,subscriberbot.page.viewed,adaptercloud.page.viewed,comradecircle.page.viewed,comradecircle.circle.created,comradecircle.post.created,comradecircle.event.created,comradecircle.member.invited,psw.client.created,psw.client.updated,psw.client.archived,psw.engagement.created,psw.engagement.transitioned,psw.matter.created,psw.matter.closed,psw.timeentry.created,psw.invoice.created,psw.compliance.resolved,psw.conflictcheck.recorded,psw.document.created,psw.practicearea.created,psw.search.performed,psw.export.requested,mybodyshield.page.viewed,mybodyshield.program.created,mybodyshield.program.updated,mybodyshield.program.status_changed,mybodyshield.program.archived,mybodyshield.workout.created,mybodyshield.exercise.created,mybodyshield.session.started,intelwatchtower.page.viewed,intelwatchtower.source.created,intelwatchtower.mission.created,intelwatchtower.mission.assigned,intelwatchtower.mission.completed,intelwatchtower.entity.created,intelwatchtower.entity.linked,intelwatchtower.indicator.created,intelwatchtower.observation.created,intelwatchtower.alert.created,intelwatchtower.alert.escalated,intelwatchtower.case.created,intelwatchtower.case.closed,intelwatchtower.report.created,intelwatchtower.report.exported,intelwatchtower.task.created,intelwatchtower.task.completed,intelwatchtower.cop.opened,govcitizenhub.page.viewed,govcitizenhub.dashboard.viewed,govcitizenhub.service.published,govcitizenhub.application.submitted,govcitizenhub.application.decided,govcitizenhub.permit.issued,govcitizenhub.payment.settled,govcitizenhub.grievance.reported,govcitizenhub.grievance.resolved,govcitizenhub.search.performed,cosmicintersection.page.viewed,labsofscience.page.viewed,labsofscience.project.created,labsofscience.experiment.created,labsofscience.protocol.created,labsofscience.dataset.created,labsofscience.inventory_item.created,labsofscience.notebook_entry.signed,labsofscience.pipeline.run_started,hookmovies.page.viewed,headshotmarketing.page.viewed,timecampus.page.viewed,timecampus.dashboard.viewed,timecampus.timer.started,timecampus.timer.stopped,timecampus.time_entry.created,timecampus.timesheet.submitted,timecampus.report.viewed,timecampus.project.viewed,timecampus.meeting.created,timecampus.pomodoro.session.completed,timecampus.focus_score.viewed,kadaikodi.page.viewed,healthybowl.farm.created,healthybowl.crop.created,healthybowl.crop.updated,healthybowl.harvest.recorded".split(","), Y = 4e3;
71
- function X(e) {
70
+ }, X = /* @__PURE__ */ "nav.route.changed,auth.signed_in,auth.signed_out,support.ticket.created,support.ticket.closed,support.ticket.reopened,support.kb.article_rated,conversations.conversation.created,conversations.conversation.archived,notification.item.opened,notification.preference.updated,notification.admin.sent,notification.template.saved,notification.schedule.updated,collabkin.tree.created,collabkin.person.created,collabkin.memory.created,collabkin.story.created,collabkin.member.invited,crewfoundry.page.viewed,crewfoundry.dashboard.viewed,crewfoundry.job_posting.created,crewfoundry.candidate.created,crewfoundry.employee.created,crewfoundry.team.created,crewfoundry.project.created,crewfoundry.course.enrolled,crewfoundry.learning_path.created,crewfoundry.service.listed,crewfoundry.leave.approved,crewfoundry.payroll.processed,crewfoundry.invoice.created,coolandlovely.page.viewed,coolandlovely.brand.created,coolandlovely.collection.created,coolandlovely.style_item.created,coolandlovely.look.created,coolandlovely.collaboration.created,coolandlovely.lookbook.created,coolandlovely.wardrobe.item_added,coolandlovely.search.performed,vibecontrols.agent.registered,atheletebridge.page.viewed,atheletebridge.team.created,atheletebridge.fixture.created,atheletebridge.program.created,atheletebridge.session.completed,atheletebridge.metric.logged,atheletebridge.tournament.created,vibecontrols.agent.gateway_auth_setup,vibecontrols.session.created,vibecontrols.session.started,vibecontrols.session.terminal_opened_in_browser,vibecontrols.session.share_link_created,vibecontrols.session.joined_shared,vibecontrols.tunnel.created,vibecontrols.tunnel.started,vibecontrols.vibedeck.button_executed,vibecontrols.quota.agent_limit_hit,vibecontrols.quota.session_limit_hit,vibecontrols.quota.tunnel_limit_hit,vibecontrols.billing.upgrade_clicked,bigconsole.dashboard.imported,bigconsole.dashboard.shared,bigconsole.data_sink.imported,bigconsole.widget.created,bigconsole.widget.duplicated,bigconsole.ai.dashboard_generated,bigconsole.ai.dashboard_created,assethandler.page.viewed,assethandler.asset.viewed,assethandler.asset.created,assethandler.work_order.viewed,assethandler.work_order.created,assethandler.incident.viewed,assethandler.incident.created,assethandler.change.viewed,assethandler.change.created,assethandler.problem.viewed,assethandler.problem.created,assethandler.maintenance.viewed,assethandler.maintenance.created,assethandler.report.viewed,assethandler.analytics.viewed,movethewheels.page.viewed,movethewheels.shipment.created,movethewheels.shipment.delivered,movethewheels.order.created,movethewheels.route.planned,movethewheels.vehicle.assigned,movethewheels.warehouse.inbound_received,theglobalfuel.dashboard.viewed,theglobalfuel.asset.created,theglobalfuel.production.recorded,theglobalfuel.reserve.created,theglobalfuel.contract.created,theglobalfuel.shipment.scheduled,theglobalfuel.shipment.delivered,theglobalfuel.inventory_lot.created,theglobalfuel.emission.recorded,theglobalfuel.emission.verified,theglobalfuel.compliance_cert.created,housingvista.dashboard.viewed,housingvista.property.created,housingvista.property.updated,housingvista.property.deleted,housingvista.property.viewed,housingvista.shortlist.property_added,housingvista.transaction.created,housingvista.transaction.updated,housingvista.investment.created,housingvista.offer.created,housingvista.viewing.scheduled,housingvista.chat.conversation_opened,housingvista.chat.message_sent,housingvista.analytics.viewed,housingvista.asset.created,housingvista.asset.updated,housingvista.amc.purchased,housingvista.verification.submitted,housingvista.home_loan.apply_clicked,housingvista.market_analytics.viewed,housingvista.search.performed,housingvista.export.requested,manufacturedops.production_order.created,manufacturedops.production_order.updated,manufacturedops.production_order.transitioned,manufacturedops.operation.added,manufacturedops.operation.recorded,manufacturedops.work_center.created,manufacturedops.work_center.updated,manufacturedops.work_center.archived,manufacturedops.material_lot.created,manufacturedops.material_lot.updated,manufacturedops.material_lot.status_updated,manufacturedops.inspection_plan.created,manufacturedops.quality_inspection.recorded,manufacturedops.non_conformance.raised,manufacturedops.non_conformance.updated,manufacturedops.non_conformance.transitioned,manufacturedops.asset.created,manufacturedops.maintenance_work_order.created,manufacturedops.maintenance_work_order.transitioned,manufacturedops.downtime_event.recorded,manufacturedops.page.viewed,subscriberbot.page.viewed,adaptercloud.page.viewed,comradecircle.page.viewed,comradecircle.circle.created,comradecircle.post.created,comradecircle.event.created,comradecircle.member.invited,psw.client.created,psw.client.updated,psw.client.archived,psw.engagement.created,psw.engagement.transitioned,psw.matter.created,psw.matter.closed,psw.timeentry.created,psw.invoice.created,psw.compliance.resolved,psw.conflictcheck.recorded,psw.document.created,psw.practicearea.created,psw.search.performed,psw.export.requested,mybodyshield.page.viewed,mybodyshield.program.created,mybodyshield.program.updated,mybodyshield.program.status_changed,mybodyshield.program.archived,mybodyshield.workout.created,mybodyshield.exercise.created,mybodyshield.session.started,intelwatchtower.page.viewed,intelwatchtower.source.created,intelwatchtower.mission.created,intelwatchtower.mission.assigned,intelwatchtower.mission.completed,intelwatchtower.entity.created,intelwatchtower.entity.linked,intelwatchtower.indicator.created,intelwatchtower.observation.created,intelwatchtower.alert.created,intelwatchtower.alert.escalated,intelwatchtower.case.created,intelwatchtower.case.closed,intelwatchtower.report.created,intelwatchtower.report.exported,intelwatchtower.task.created,intelwatchtower.task.completed,intelwatchtower.cop.opened,govcitizenhub.page.viewed,govcitizenhub.dashboard.viewed,govcitizenhub.service.published,govcitizenhub.application.submitted,govcitizenhub.application.decided,govcitizenhub.permit.issued,govcitizenhub.payment.settled,govcitizenhub.grievance.reported,govcitizenhub.grievance.resolved,govcitizenhub.search.performed,cosmicintersection.page.viewed,labsofscience.page.viewed,labsofscience.project.created,labsofscience.experiment.created,labsofscience.protocol.created,labsofscience.dataset.created,labsofscience.inventory_item.created,labsofscience.notebook_entry.signed,labsofscience.pipeline.run_started,hookmovies.page.viewed,headshotmarketing.page.viewed,timecampus.page.viewed,timecampus.dashboard.viewed,timecampus.timer.started,timecampus.timer.stopped,timecampus.time_entry.created,timecampus.timesheet.submitted,timecampus.report.viewed,timecampus.project.viewed,timecampus.meeting.created,timecampus.pomodoro.session.completed,timecampus.focus_score.viewed,kadaikodi.page.viewed,healthybowl.farm.created,healthybowl.crop.created,healthybowl.crop.updated,healthybowl.harvest.recorded".split(","), Z = 4e3;
71
+ function me(e) {
72
72
  let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
73
73
  code: e.code,
74
74
  operationName: e.operationName,
@@ -80,13 +80,13 @@ function X(e) {
80
80
  };
81
81
  console.error("[Burdenoff backend error]", e.message, n);
82
82
  }
83
- function Z(e) {
83
+ function he(e) {
84
84
  return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
85
85
  }
86
- function me(e, t) {
86
+ function ge(e, t) {
87
87
  return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
88
88
  }
89
- function he() {
89
+ function _e() {
90
90
  return {
91
91
  BASE_URL: "/",
92
92
  DEV: !1,
@@ -96,7 +96,7 @@ function he() {
96
96
  };
97
97
  }
98
98
  function Q(e, t) {
99
- let n = Z(t.VITE_DEPLOY_ENV ?? t.MODE), r = me(t, n), i = q[e], a = n === "prod" ? i?.prod : i?.nonProd, o = t.VITE_RYBBIT_SITE_ID || a, s = t.VITE_BACKEND_AUDIT_ENDPOINT || (t.PROD ? "/api/fe-events" : void 0);
99
+ let n = he(t.VITE_DEPLOY_ENV ?? t.MODE), r = ge(t, n), i = Y[e], a = n === "prod" ? i?.prod : i?.nonProd, o = t.VITE_RYBBIT_SITE_ID || a, s = t.VITE_BACKEND_AUDIT_ENDPOINT || (t.PROD ? "/api/fe-events" : void 0);
100
100
  return {
101
101
  enabled: r,
102
102
  appVersion: t.VITE_APP_VERSION || "0.0.0",
@@ -107,7 +107,7 @@ function Q(e, t) {
107
107
  enabled: r && !!o,
108
108
  siteId: o,
109
109
  scriptUrl: t.VITE_RYBBIT_SCRIPT_URL,
110
- allowlist: J,
110
+ allowlist: X,
111
111
  identifyOn: "auth.signed_in",
112
112
  rename: { "nav.route.changed": "pageview" }
113
113
  },
@@ -122,16 +122,16 @@ function Q(e, t) {
122
122
  }
123
123
  };
124
124
  }
125
- function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
126
- let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = P(), c = L((e, t) => e.steps?.[t], []);
127
- return /* @__PURE__ */ U(M, {
128
- onTourStart: L((e) => {
125
+ function ve({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
126
+ let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = I(), c = z((e, t) => e.steps?.[t], []);
127
+ return /* @__PURE__ */ G(P, {
128
+ onTourStart: z((e) => {
129
129
  a(e.id, "started"), s("TOUR_STARTED", e.id);
130
130
  }, [s, a]),
131
- onTourComplete: L((e) => {
131
+ onTourComplete: z((e) => {
132
132
  a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
133
133
  }, [s, a]),
134
- onTourSkip: L((e, t) => {
134
+ onTourSkip: z((e, t) => {
135
135
  let n = c(e, t);
136
136
  a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
137
137
  stepId: n?.id,
@@ -142,14 +142,14 @@ function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
142
142
  s,
143
143
  a
144
144
  ]),
145
- onStepChange: L((e, t) => {
145
+ onStepChange: z((e, t) => {
146
146
  let n = c(e, t);
147
147
  n && s("STEP_VIEWED", e.id, {
148
148
  stepId: n.id,
149
149
  stepOrder: n.stepOrder
150
150
  });
151
151
  }, [c, s]),
152
- onStepComplete: L((e, t) => {
152
+ onStepComplete: z((e, t) => {
153
153
  let n = c(e, t);
154
154
  n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
155
155
  stepId: n.id,
@@ -161,18 +161,18 @@ function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
161
161
  s
162
162
  ]),
163
163
  children: [
164
- /* @__PURE__ */ H(F, {}),
164
+ /* @__PURE__ */ W(L, {}),
165
165
  e,
166
- /* @__PURE__ */ H(_e, {}),
167
- /* @__PURE__ */ H(ye, {}),
168
- /* @__PURE__ */ H(G, {
166
+ /* @__PURE__ */ W(ye, {}),
167
+ /* @__PURE__ */ W(xe, {}),
168
+ /* @__PURE__ */ W(q, {
169
169
  position: n,
170
170
  richColors: !0,
171
171
  closeButton: !0
172
172
  }),
173
- t && /* @__PURE__ */ H(I, {
173
+ t && /* @__PURE__ */ W(R, {
174
174
  fallback: null,
175
- children: /* @__PURE__ */ H(g, {
175
+ children: /* @__PURE__ */ W(g, {
176
176
  productName: r,
177
177
  brandInitial: i
178
178
  })
@@ -180,44 +180,44 @@ function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
180
180
  ]
181
181
  });
182
182
  }
183
- function _e() {
184
- let e = B(null);
185
- return R(() => {
183
+ function ye() {
184
+ let e = H(null);
185
+ return B(() => {
186
186
  let t = (t) => {
187
187
  let n = t instanceof CustomEvent && a(t.detail) ? t.detail : null;
188
188
  if (!o(n)) return;
189
- X(n);
189
+ me(n);
190
190
  let r = `${n.code ?? ""}|${n.message}`, i = Date.now(), s = e.current;
191
- s?.key === r && i - s.shownAt < Y || (e.current = {
191
+ s?.key === r && i - s.shownAt < Z || (e.current = {
192
192
  key: r,
193
193
  shownAt: i
194
- }, K.error(n.message, { duration: 7e3 }));
194
+ }, J.error(n.message, { duration: 7e3 }));
195
195
  };
196
196
  return window.addEventListener(n, t), () => window.removeEventListener(n, t);
197
197
  }, []), null;
198
198
  }
199
- var $ = "burdenoff-connection-status", ve = 1500;
200
- function ye() {
201
- let e = B(null), t = B(!1);
202
- return R(() => {
199
+ var $ = "burdenoff-connection-status", be = 1500;
200
+ function xe() {
201
+ let e = H(null), t = H(!1);
202
+ return B(() => {
203
203
  let n = () => {
204
- t.current || (t.current = !0, K.error("Connection lost. Trying to reconnect…", {
204
+ t.current || (t.current = !0, J.error("Connection lost. Trying to reconnect…", {
205
205
  id: $,
206
206
  duration: Infinity
207
207
  }));
208
208
  }, i = () => {
209
209
  t.current || e.current || (e.current = setTimeout(() => {
210
210
  e.current = null, n();
211
- }, ve));
211
+ }, be));
212
212
  }, a = (n) => {
213
213
  if (e.current &&= (clearTimeout(e.current), null), !t.current) {
214
- K.dismiss($);
214
+ J.dismiss($);
215
215
  return;
216
216
  }
217
- t.current = !1, n ? K.success("Back online", {
217
+ t.current = !1, n ? J.success("Back online", {
218
218
  id: $,
219
219
  duration: 2500
220
- }) : K.dismiss($);
220
+ }) : J.dismiss($);
221
221
  }, o = (e) => {
222
222
  if (!(e instanceof CustomEvent)) return;
223
223
  let t = e.detail;
@@ -230,18 +230,18 @@ function ye() {
230
230
  };
231
231
  }, []), null;
232
232
  }
233
- function be({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, defaultMode: i, defaultDensity: a, defaultTypography: o, defaultGlass: s, productName: c, brandInitial: l, enablePWA: u, toasterPosition: d }) {
234
- let f = W();
235
- j();
236
- let p = /* @__PURE__ */ H(w, { children: /* @__PURE__ */ H(_, { children: /* @__PURE__ */ H(v, {
233
+ function Se({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, defaultMode: i, defaultDensity: a, defaultTypography: o, defaultGlass: s, productName: c, brandInitial: l, enablePWA: u, toasterPosition: d }) {
234
+ let f = K();
235
+ N();
236
+ let p = /* @__PURE__ */ W(E, { children: /* @__PURE__ */ W(_, { children: /* @__PURE__ */ W(v, {
237
237
  workspaceId: null,
238
238
  gateway: "global",
239
239
  defaultEnabled: !0,
240
- children: /* @__PURE__ */ H(y, { children: /* @__PURE__ */ H(b, { children: /* @__PURE__ */ H(h, {
240
+ children: /* @__PURE__ */ W(y, { children: /* @__PURE__ */ W(b, { children: /* @__PURE__ */ W(h, {
241
241
  fallback: null,
242
- children: /* @__PURE__ */ H(N, {
242
+ children: /* @__PURE__ */ W(F, {
243
243
  disabled: f.pathname.startsWith("/devportal") || f.pathname.startsWith("/organizations") || f.pathname.startsWith("/workspaces"),
244
- children: /* @__PURE__ */ H(ge, {
244
+ children: /* @__PURE__ */ W(ve, {
245
245
  enablePWA: u,
246
246
  toasterPosition: d,
247
247
  productName: c,
@@ -251,22 +251,22 @@ function be({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
251
251
  })
252
252
  }) }) })
253
253
  }) }) });
254
- return /* @__PURE__ */ U(m, {
254
+ return /* @__PURE__ */ G(m, {
255
255
  defaultBrand: r,
256
256
  defaultMode: i,
257
257
  defaultDensity: a,
258
258
  defaultTypography: o,
259
259
  defaultGlass: s,
260
- children: [/* @__PURE__ */ H(xe, {}), /* @__PURE__ */ H(se, {
260
+ children: [/* @__PURE__ */ W(Ce, {}), /* @__PURE__ */ W(T, {
261
261
  i18nProductId: t,
262
262
  fallbackTranslations: n,
263
263
  children: p
264
264
  })]
265
265
  });
266
266
  }
267
- function xe() {
268
- let e = W();
269
- return R(() => {
267
+ function Ce() {
268
+ let e = K();
269
+ return B(() => {
270
270
  e.hash || requestAnimationFrame(() => {
271
271
  window.scrollTo({
272
272
  top: 0,
@@ -284,7 +284,7 @@ function xe() {
284
284
  e.hash
285
285
  ]), null;
286
286
  }
287
- function Se(e) {
287
+ function we(e) {
288
288
  if (e instanceof Error) return e.message;
289
289
  if (typeof e == "string") return e;
290
290
  try {
@@ -293,9 +293,9 @@ function Se(e) {
293
293
  return String(e);
294
294
  }
295
295
  }
296
- function Ce() {
297
- let e = A(), t = W(), n = B(void 0), r = B(void 0), i = B(null);
298
- return R(() => {
296
+ function Te() {
297
+ let e = M(), t = K(), n = H(void 0), r = H(void 0), i = H(null);
298
+ return B(() => {
299
299
  let a = `${t.pathname}${t.search}${t.hash}`;
300
300
  if (r.current !== a) return i.current && clearTimeout(i.current), i.current = setTimeout(() => {
301
301
  i.current = null;
@@ -315,7 +315,7 @@ function Ce() {
315
315
  t.hash,
316
316
  t.pathname,
317
317
  t.search
318
- ]), R(() => {
318
+ ]), B(() => {
319
319
  let t = (t) => {
320
320
  e.emit("error.runtime.caught", {
321
321
  message: t.message || "Runtime error",
@@ -325,12 +325,12 @@ function Ce() {
325
325
  errorName: t.error instanceof Error ? t.error.name : void 0
326
326
  });
327
327
  }, n = (t) => {
328
- e.emit("error.unhandledrejection", { reason: Se(t.reason) });
328
+ e.emit("error.unhandledrejection", { reason: we(t.reason) });
329
329
  };
330
330
  return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
331
331
  window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
332
332
  };
333
- }, [e]), R(() => {
333
+ }, [e]), B(() => {
334
334
  x((t) => {
335
335
  e.emit("perf.lcp.measured", {
336
336
  metric: "LCP",
@@ -338,7 +338,7 @@ function Ce() {
338
338
  id: t.id,
339
339
  rating: t.rating
340
340
  });
341
- }), oe((t) => {
341
+ }), w((t) => {
342
342
  e.emit("perf.cls.measured", {
343
343
  metric: "CLS",
344
344
  value: t.value,
@@ -362,40 +362,40 @@ function Ce() {
362
362
  });
363
363
  }, [e]), null;
364
364
  }
365
- function we({ config: e, productSlug: t }) {
366
- return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(Ce, {}), e.enabled === !1 ? null : /* @__PURE__ */ U(V, { children: [
367
- e.devtools ? /* @__PURE__ */ H(T, { enabled: !0 }) : null,
368
- e.broadcast === !1 ? null : /* @__PURE__ */ H(E, {}),
369
- e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ H(D, { endpoint: e.backendAudit.endpoint }) : null,
370
- e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ H(O, {
365
+ function Ee({ config: e, productSlug: t }) {
366
+ return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(Te, {}), e.enabled === !1 ? null : /* @__PURE__ */ G(U, { children: [
367
+ e.devtools ? /* @__PURE__ */ W(D, { enabled: !0 }) : null,
368
+ e.broadcast === !1 ? null : /* @__PURE__ */ W(O, {}),
369
+ e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ W(k, { endpoint: e.backendAudit.endpoint }) : null,
370
+ e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ W(A, {
371
371
  siteId: e.rybbit.siteId,
372
372
  scriptUrl: e.rybbit.scriptUrl,
373
373
  allowlist: e.rybbit.allowlist,
374
374
  identifyOn: e.rybbit.identifyOn,
375
375
  rename: e.rybbit.rename
376
376
  }) : null,
377
- e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ H(k, {
377
+ e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ W(j, {
378
378
  endpoint: e.otel.endpoint,
379
379
  serviceName: e.otel.serviceName ?? `${t}-app`,
380
380
  flushInterval: e.otel.flushInterval
381
381
  }) : null
382
382
  ] })] });
383
383
  }
384
- function Te({ config: n, children: r, clearAuthStore: a }) {
385
- let { productName: o, productSlug: m = o.toLowerCase().replace(/\s+/g, ""), tagline: g = "", domain: _, i18nProductId: v, gatewayUrls: y, authBridge: b, defaultBrand: x = "default", defaultMode: S, defaultDensity: C, defaultTypography: oe, defaultGlass: se, enablePWA: w = !0, brandInitial: T = o.charAt(0), defaultGateway: E = "workspace", enableSubscriptions: D = !0, fallbackTranslations: O, queryClientOptions: k, toasterPosition: A = "bottom-right", observability: j } = n, M = j ?? Q(m, he()), N = z(() => ({
384
+ function De({ config: n, children: r, clearAuthStore: a }) {
385
+ let { productName: o, productSlug: m = o.toLowerCase().replace(/\s+/g, ""), tagline: g = "", domain: _, i18nProductId: v, gatewayUrls: y, authBridge: b, defaultBrand: x = "default", defaultMode: S, defaultDensity: C, defaultTypography: w, defaultGlass: T, enablePWA: E = !0, brandInitial: D = o.charAt(0), defaultGateway: O = "workspace", enableSubscriptions: k = !0, fallbackTranslations: A, queryClientOptions: j, toasterPosition: M = "bottom-right", observability: N } = n, P = N ?? Q(m, _e()), F = V(() => ({
386
386
  productName: o,
387
387
  productSlug: m,
388
- brandInitial: T,
388
+ brandInitial: D,
389
389
  tagline: g,
390
390
  domain: _
391
391
  }), [
392
392
  o,
393
393
  m,
394
- T,
394
+ D,
395
395
  g,
396
396
  _
397
- ]), P = B(!1), F = B(!1), I = B(null), V = B(!!b?.url), W = L(() => {
398
- if ((() => {
397
+ ]), I = H(!1), L = H(!!b?.url), R = z((t) => {
398
+ if (!t?.force && (() => {
399
399
  try {
400
400
  let e = sessionStorage.getItem("bf-active-profile");
401
401
  if (!e) return !1;
@@ -404,24 +404,23 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
404
404
  } catch {
405
405
  return !1;
406
406
  }
407
- })() || V.current || P.current) return;
408
- P.current = !0, l(a);
409
- let t = `${window.location.pathname}${window.location.search}`, n = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(t)}`, r = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
410
- if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || r) {
411
- P.current = !1;
407
+ })() || L.current || I.current) return;
408
+ I.current = !0, u(a);
409
+ let n = `${window.location.pathname}${window.location.search}`, r = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(n)}`, i = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
410
+ if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || i) {
411
+ I.current = !1;
412
412
  return;
413
413
  }
414
- window.location.replace(n);
415
- }, [a]), G = z(() => ({
414
+ window.location.replace(r);
415
+ }, [a]), U = V(() => ({
416
416
  globalBaseUrl: y.globalBaseUrl,
417
- isRefreshing: F,
418
- refreshPromise: I
419
- }), [y.globalBaseUrl]), K = L(async () => c(G), [G]), q = L(async () => {
420
- window.location.pathname.startsWith("/auth/") || await K() || W();
421
- }, [K, W]), J = L(async (e) => {
422
- u(e) ? await K() || W() : console.error("[Network] Backend unreachable:", e.message);
423
- }, [K, W]), Y = L(async (e) => {
424
- let t = await s({
417
+ ...d()
418
+ }), [y.globalBaseUrl]), K = z(async () => l(U), [U]), q = z(async () => {
419
+ window.location.pathname.startsWith("/auth/") || await K() || R({ force: !0 });
420
+ }, [K, R]), J = z(async (e) => {
421
+ f(e) ? await K() || R({ force: !0 }) : console.error("[Network] Backend unreachable:", e.message);
422
+ }, [K, R]), Y = z(async (e) => {
423
+ let t = await c({
425
424
  gateway: "global",
426
425
  baseUrl: y.globalBaseUrl,
427
426
  authToken: "",
@@ -435,7 +434,7 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
435
434
  refreshToken: n.refreshToken,
436
435
  expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
437
436
  };
438
- }, [y.globalBaseUrl]), X = L(() => t("organization"), []), Z = z(() => {
437
+ }, [y.globalBaseUrl]), X = z(() => t("organization"), []), Z = V(() => {
439
438
  let e = new fe({
440
439
  queryCache: new de({ onError: (e) => {
441
440
  i(e);
@@ -449,68 +448,75 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
449
448
  }
450
449
  }),
451
450
  defaultOptions: { queries: {
452
- staleTime: k?.staleTime ?? 300 * 1e3,
453
- retry: k?.retry ?? 1,
454
- refetchOnWindowFocus: k?.refetchOnWindowFocus ?? !1
451
+ staleTime: j?.staleTime ?? 300 * 1e3,
452
+ retry: j?.retry ?? 2,
453
+ refetchOnWindowFocus: j?.refetchOnWindowFocus ?? !1
455
454
  } }
456
455
  });
457
456
  return e;
458
- }, [k]);
459
- return R(() => {
460
- let e = ee.getInstance();
461
- e.getLogger("shell") || e.getLogger("shell").addTransport(new te());
462
- }, []), /* @__PURE__ */ H(d, {
463
- value: N,
464
- children: /* @__PURE__ */ H(ce, {
457
+ }, [j]);
458
+ return B(() => {
459
+ let e = () => {
460
+ R({ force: !0 });
461
+ };
462
+ return window.addEventListener(s, e), () => {
463
+ window.removeEventListener(s, e);
464
+ };
465
+ }, [R]), B(() => {
466
+ let e = ne.getInstance();
467
+ e.getLogger("shell") || e.getLogger("shell").addTransport(new re());
468
+ }, []), /* @__PURE__ */ W(p, {
469
+ value: F,
470
+ children: /* @__PURE__ */ W(ce, {
465
471
  appName: m,
466
- appVersion: M.appVersion,
467
- appEnv: M.appEnv,
472
+ appVersion: P.appVersion,
473
+ appEnv: P.appEnv,
468
474
  sourceMfe: m,
469
- children: /* @__PURE__ */ H(h, {
470
- FallbackComponent: ne,
471
- children: /* @__PURE__ */ U(le, { children: [/* @__PURE__ */ H(we, {
472
- config: M,
475
+ children: /* @__PURE__ */ W(h, {
476
+ FallbackComponent: ie,
477
+ children: /* @__PURE__ */ G(le, { children: [/* @__PURE__ */ W(Ee, {
478
+ config: P,
473
479
  productSlug: m
474
- }), /* @__PURE__ */ H(pe, {
480
+ }), /* @__PURE__ */ W(pe, {
475
481
  client: Z,
476
- children: /* @__PURE__ */ H(ie, { children: /* @__PURE__ */ H(ae, {
482
+ children: /* @__PURE__ */ W(oe, { children: /* @__PURE__ */ W(se, {
477
483
  workspaceBaseUrl: y.workspaceBaseUrl,
478
484
  globalBaseUrl: y.globalBaseUrl,
479
485
  organizationId: X,
480
486
  productSlug: m,
481
- defaultGateway: E,
482
- enableSubscriptions: D,
487
+ defaultGateway: O,
488
+ enableSubscriptions: k,
483
489
  onAuthError: q,
484
490
  onNetworkError: J,
485
491
  onRefreshToken: K,
486
- children: /* @__PURE__ */ H(f, {
492
+ children: /* @__PURE__ */ W(ee, {
487
493
  bridgeUrl: b?.url,
488
494
  bridgeAllowedOrigins: b?.allowedOrigins,
489
495
  bridgeDebug: b?.debug,
490
496
  onRefreshToken: Y,
491
497
  onBridgeReady: () => {
492
- V.current = !1;
498
+ L.current = !1;
493
499
  },
494
500
  onSessionExpiringSoon: () => {
495
501
  console.warn("[Auth] Session will expire in 5 minutes");
496
502
  },
497
503
  onTokenExpired: () => {
498
- W();
504
+ R();
499
505
  },
500
- children: /* @__PURE__ */ H(p, {
506
+ children: /* @__PURE__ */ W(te, {
501
507
  syncToUrl: !0,
502
- children: /* @__PURE__ */ H(re, { children: /* @__PURE__ */ H(be, {
508
+ children: /* @__PURE__ */ W(ae, { children: /* @__PURE__ */ W(Se, {
503
509
  i18nProductId: v,
504
- fallbackTranslations: O,
510
+ fallbackTranslations: A,
505
511
  defaultBrand: x,
506
512
  defaultMode: S,
507
513
  defaultDensity: C,
508
- defaultTypography: oe,
509
- defaultGlass: se,
514
+ defaultTypography: w,
515
+ defaultGlass: T,
510
516
  productName: o,
511
- brandInitial: T,
512
- enablePWA: w,
513
- toasterPosition: A,
517
+ brandInitial: D,
518
+ enablePWA: E,
519
+ toasterPosition: M,
514
520
  children: r
515
521
  }) })
516
522
  })
@@ -522,4 +528,4 @@ function Te({ config: n, children: r, clearAuthStore: a }) {
522
528
  });
523
529
  }
524
530
  //#endregion
525
- export { Te as AppShellProvider, Q as resolveAppShellObservabilityConfig };
531
+ export { De as AppShellProvider, Q as resolveAppShellObservabilityConfig };
@@ -48,6 +48,12 @@ export interface TokenRefreshConfig {
48
48
  current: Promise<void> | null;
49
49
  };
50
50
  }
51
+ /**
52
+ * The shared single-flight dedup refs for {@link attemptTokenRefresh}. Use
53
+ * these (rather than per-caller refs) so concurrent 401s from different code
54
+ * paths coalesce into one refresh mutation.
55
+ */
56
+ export declare function getSharedTokenRefreshRefs(): Pick<TokenRefreshConfig, 'isRefreshing' | 'refreshPromise'>;
51
57
  /**
52
58
  * Attempt to refresh the access token using the stored refresh token.
53
59
  * Returns true if refresh succeeded, false if it failed.
@@ -1 +1 @@
1
- {"version":3,"file":"authErrorHandling.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/authErrorHandling.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAoBzE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAOxD;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAqBnE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GACrD,OAAO,CAET;AAED,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,YAAY,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACnC,2DAA2D;IAC3D,cAAc,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;CACnD;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB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AAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAwItF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,EAAE,SAAS,SAAgB,GAAG,IAAI,CAW5F"}
@@ -25,10 +25,18 @@ function a(e) {
25
25
  function o(e) {
26
26
  return Array.isArray(e) && e.some((e) => a(e));
27
27
  }
28
- async function s(t) {
28
+ var s = { current: !1 }, c = { current: null };
29
+ function l() {
30
+ return {
31
+ isRefreshing: s,
32
+ refreshPromise: c
33
+ };
34
+ }
35
+ var u = !1;
36
+ async function d(t) {
29
37
  let { globalBaseUrl: r, isRefreshing: i, refreshPromise: a } = t;
30
38
  if (i.current && a.current) try {
31
- return await a.current, !0;
39
+ return await a.current, u;
32
40
  } catch {
33
41
  return !1;
34
42
  }
@@ -52,6 +60,8 @@ async function s(t) {
52
60
  gateway: "global",
53
61
  baseUrl: r,
54
62
  authToken: "",
63
+ skipAuthRetry: !0,
64
+ suppressGlobalErrorEvent: !0,
55
65
  query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
56
66
  variables: { token: s }
57
67
  });
@@ -70,21 +80,21 @@ async function s(t) {
70
80
  } catch (e) {
71
81
  return console.warn("[Auth] Token refresh attempt failed (will retry):", e), "transient";
72
82
  }
73
- }, u = (async () => {
83
+ }, d = (async () => {
74
84
  try {
75
85
  let e = await l();
76
- return e === "transient" && (await new Promise((e) => setTimeout(e, 800)), e = await l()), e !== "ok" && console.error("[Auth] Token refresh failed:", e), e === "ok";
86
+ return e === "transient" && (await new Promise((e) => setTimeout(e, 800)), e = await l()), e !== "ok" && console.error("[Auth] Token refresh failed:", e), u = e === "ok", e === "ok";
77
87
  } finally {
78
88
  i.current = !1, a.current = null;
79
89
  }
80
90
  })();
81
- return a.current = u.then(() => {}), u;
91
+ return a.current = d.then(() => {}), d;
82
92
  }
83
- function c(e, t = "/auth/login") {
93
+ function f(e, t = "/auth/login") {
84
94
  if (window.location.pathname.startsWith("/auth/")) return;
85
95
  r(e);
86
96
  let n = `${window.location.pathname}${window.location.search}`, i = `${t}?reason=session-expired&returnTo=${encodeURIComponent(n)}`;
87
97
  window.location.replace(i);
88
98
  }
89
99
  //#endregion
90
- export { s as attemptTokenRefresh, r as clearAuthSessionStorage, o as hasAuthGraphQLErrors, a as isAuthGraphQLError, i as isAuthNetworkError, c as redirectToLogin };
100
+ export { d as attemptTokenRefresh, r as clearAuthSessionStorage, l as getSharedTokenRefreshRefs, o as hasAuthGraphQLErrors, a as isAuthGraphQLError, i as isAuthNetworkError, f as redirectToLogin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.717.1",
3
+ "version": "2026.717.3",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {