@burdenoff/fe-libs 2026.1023.6 → 2026.1023.8

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.
Files changed (40) hide show
  1. package/dist/shared/assistant/gatewayClient.js +23 -19
  2. package/dist/shared/assistant/index.d.ts +1 -0
  3. package/dist/shared/assistant/productContext.d.ts +16 -0
  4. package/dist/shared/assistant/productContext.js +16 -0
  5. package/dist/shared/graphql/client.d.ts +9 -0
  6. package/dist/shared/graphql/client.js +241 -201
  7. package/dist/shared/graphql/fetch.js +135 -123
  8. package/dist/shared/graphql/index.d.ts +1 -0
  9. package/dist/shared/graphql/workspaceOperationGuard.d.ts +70 -0
  10. package/dist/shared/graphql/workspaceOperationGuard.js +62 -0
  11. package/dist/shared/providers/AppShellProvider.d.ts +16 -0
  12. package/dist/shared/providers/AppShellProvider.js +258 -251
  13. package/dist/shared/providers/shell/AuthProvider.d.ts +14 -1
  14. package/dist/shared/providers/shell/AuthProvider.js +105 -94
  15. package/dist/shared/providers/shell/MultiGatewayProvider.d.ts +8 -1
  16. package/dist/shared/providers/shell/MultiGatewayProvider.js +115 -119
  17. package/dist/shared/providers/shell/ProfileStorageManager.js +1 -1
  18. package/dist/shared/providers/shell/WorkspaceWriteRefusedToastListener.d.ts +4 -0
  19. package/dist/shared/providers/shell/WorkspaceWriteRefusedToastListener.js +23 -0
  20. package/dist/shared/providers/shell/authProvider/identityChange.d.ts +26 -0
  21. package/dist/shared/providers/shell/authProvider/identityChange.js +11 -0
  22. package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts +4 -1
  23. package/dist/shared/providers/shell/authProvider/useAuthActions.js +105 -92
  24. package/dist/shared/providers/shell/authProvider/useBridgeInitialization.d.ts +27 -1
  25. package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +82 -62
  26. package/dist/shared/providers/shell/authProvider/useRemoteSLO.d.ts +4 -1
  27. package/dist/shared/providers/shell/authProvider/useRemoteSLO.js +16 -14
  28. package/dist/shared/providers/shell/authProvider/useStorageSync.d.ts +4 -1
  29. package/dist/shared/providers/shell/authProvider/useStorageSync.js +19 -14
  30. package/dist/shared/providers/shell/contextSwitchCache.d.ts +4 -0
  31. package/dist/shared/providers/shell/contextSwitchCache.js +17 -0
  32. package/dist/shared/providers/shell/identityQueryReset.d.ts +17 -0
  33. package/dist/shared/providers/shell/identityQueryReset.js +21 -0
  34. package/dist/shared/providers/shell/identityScopedQueryReset.d.ts +16 -0
  35. package/dist/shared/providers/shell/identityScopedQueryReset.js +30 -0
  36. package/dist/shared/providers/shell/index.d.ts +1 -1
  37. package/dist/shared-assistant.js +306 -305
  38. package/dist/shared-graphql.js +11 -10
  39. package/dist/shared.js +129 -128
  40. package/package.json +2 -2
@@ -1,51 +1,55 @@
1
- import { legacyProductSlug as e } from "../config/productSlug.js";
2
- import { isShellLessRoute as t } from "../config/shellRoutes.js";
3
- import { readActiveContextValueWithUrlPrecedence as n } from "./shell/ActiveContextStorage.js";
4
- import { BACKEND_ERROR_EVENT as r, CONNECTION_STATUS_EVENT as i, dispatchBackendErrorEvent as a, isBackendErrorDisplay as o, shouldToastBackendError as s } from "../utils/backendErrors.js";
5
- import { SESSION_EXPIRED_EVENT as c, graphqlFetch as l } from "../graphql/fetch.js";
6
- import { attemptTokenRefresh as u, clearAuthSessionStorage as ee, getSharedTokenRefreshRefs as te, isAuthNetworkError as d } from "../utils/authErrorHandling.js";
1
+ import { emitProductSlug as e, legacyProductSlug as t } from "../config/productSlug.js";
2
+ import { isShellLessRoute as n } from "../config/shellRoutes.js";
3
+ import { readActiveContextValueWithUrlPrecedence as r } from "./shell/ActiveContextStorage.js";
4
+ import { BACKEND_ERROR_EVENT as i, CONNECTION_STATUS_EVENT as a, dispatchBackendErrorEvent as o, isBackendErrorDisplay as s, shouldToastBackendError as c } from "../utils/backendErrors.js";
5
+ import { SESSION_EXPIRED_EVENT as l, graphqlFetch as ee } from "../graphql/fetch.js";
6
+ import { attemptTokenRefresh as te, clearAuthSessionStorage as ne, getSharedTokenRefreshRefs as u, isAuthNetworkError as d } from "../utils/authErrorHandling.js";
7
7
  import { AppShellContextProvider as f } from "./shell/AppShellContext.js";
8
8
  import { AuthProvider as p } from "./shell/AuthProvider.js";
9
9
  import { ActiveContextProvider as m } from "./shell/ActiveContextProvider.js";
10
- import { LogManager as h } from "../logger/LogManager.js";
11
- import { ConsoleTransport as ne } from "../logger/ConsoleTransport.js";
12
- import { ThemeProvider as g } from "./shell/ThemeProvider.js";
13
- import { AuthTokenProvider as re } from "./shell/AuthTokenProvider.js";
14
- import { ErrorFallback as ie } from "../components/ErrorFallback.js";
15
- import { m as _ } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
16
- import { PWAInstallBanner as v } from "../components/PWAInstallBanner.js";
17
- import { FeatureFlagsProvider as y } from "./shell/FeatureFlagsProvider.js";
18
- import { FeatureFlagProvider as b } from "../feature-flags/FeatureFlagProvider.js";
19
- import { GlobalUiProvider as x } from "./shell/GlobalUiProvider.js";
20
- import { ShellUiProvider as S } from "./shell/ShellUiProvider.js";
21
- import { ContextManagerProvider as ae } from "./shell/ContextManagerProvider.js";
22
- import { MultiGatewayProvider as oe } from "./shell/MultiGatewayProvider.js";
23
- import { G as C, Q as se, j as ce, w as le } from "../../node_modules/web-vitals/dist/web-vitals.js";
24
- import { ProfileI18nBridge as ue } from "./shell/ProfileI18nBridge.js";
25
- import { ProfileGeographyBridge as w } from "./shell/ProfileGeographyBridge.js";
26
- import { DesktopUpdateToast as de } from "../components/DesktopUpdateToast.js";
27
- import { FLUIDGRIDS_RYBBIT_EVENTS as T } from "../events/fluidgrids.js";
28
- import { DevtoolsSink as E } from "../events/sinks/DevtoolsSink.js";
29
- import { BroadcastChannelSink as D } from "../events/sinks/BroadcastChannelSink.js";
30
- import { BackendAuditSink as O } from "../events/sinks/BackendAuditSink.js";
31
- import { AnalyticsConsentBanner as k, DEFAULT_RYBBIT_ALLOWLIST as A, RybbitSink as j } from "../events/sinks/RybbitSink.js";
32
- import { OtelBrowserSink as M } from "../events/sinks/OtelBrowserSink.js";
33
- import { EventBusProvider as fe, useEventBus as N } from "../../shared-events.js";
34
- import { useReferralAttribution as P } from "../hooks/useReferralAttribution.js";
35
- import { usePushDeviceRegistration as F } from "../hooks/usePushDeviceRegistration.js";
36
- import { TourPermissionsBoundary as I } from "../tours/TourPermissionsBoundary.js";
37
- import { resolveBrowserDirectionMode as pe } from "./shell/directionMode.js";
38
- import { TourPlayerProvider as L } from "../tours/TourPlayerProvider.js";
39
- import { ToursProvider as R, useToursContext as z } from "../tours/ToursContext.js";
40
- import { TourInitializer as B } from "../tours/TourInitializer.js";
41
- import { useRegisterTourRouteCatalog as me } from "../tours/useTourRouteCatalog.js";
42
- import { Suspense as V, useCallback as H, useEffect as U, useMemo as W, useRef as G, useState as he } from "react";
43
- import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
44
- import { BrowserRouter as ge, useLocation as Y } from "react-router";
45
- import { Toaster as X, toast as Z } from "sonner";
46
- import { MutationCache as _e, QueryCache as ve, QueryClient as ye, QueryClientProvider as be } from "@tanstack/react-query";
10
+ import { LogManager as re } from "../logger/LogManager.js";
11
+ import { ConsoleTransport as ie } from "../logger/ConsoleTransport.js";
12
+ import { ThemeProvider as h } from "./shell/ThemeProvider.js";
13
+ import { AuthTokenProvider as ae } from "./shell/AuthTokenProvider.js";
14
+ import { ErrorFallback as oe } from "../components/ErrorFallback.js";
15
+ import { m as g } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
16
+ import { PWAInstallBanner as _ } from "../components/PWAInstallBanner.js";
17
+ import { FeatureFlagsProvider as v } from "./shell/FeatureFlagsProvider.js";
18
+ import { FeatureFlagProvider as se } from "../feature-flags/FeatureFlagProvider.js";
19
+ import { GlobalUiProvider as y } from "./shell/GlobalUiProvider.js";
20
+ import { ShellUiProvider as b } from "./shell/ShellUiProvider.js";
21
+ import { ContextManagerProvider as ce } from "./shell/ContextManagerProvider.js";
22
+ import { MultiGatewayProvider as le } from "./shell/MultiGatewayProvider.js";
23
+ import { G as x, Q as ue, j as de, w as fe } from "../../node_modules/web-vitals/dist/web-vitals.js";
24
+ import { ProfileI18nBridge as pe } from "./shell/ProfileI18nBridge.js";
25
+ import { ProfileGeographyBridge as me } from "./shell/ProfileGeographyBridge.js";
26
+ import { DesktopUpdateToast as he } from "../components/DesktopUpdateToast.js";
27
+ import { FLUIDGRIDS_RYBBIT_EVENTS as S } from "../events/fluidgrids.js";
28
+ import { DevtoolsSink as C } from "../events/sinks/DevtoolsSink.js";
29
+ import { BroadcastChannelSink as w } from "../events/sinks/BroadcastChannelSink.js";
30
+ import { BackendAuditSink as T } from "../events/sinks/BackendAuditSink.js";
31
+ import { AnalyticsConsentBanner as E, DEFAULT_RYBBIT_ALLOWLIST as D, RybbitSink as O } from "../events/sinks/RybbitSink.js";
32
+ import { OtelBrowserSink as k } from "../events/sinks/OtelBrowserSink.js";
33
+ import { EventBusProvider as ge, useEventBus as A } from "../../shared-events.js";
34
+ import { useReferralAttribution as j } from "../hooks/useReferralAttribution.js";
35
+ import { usePushDeviceRegistration as M } from "../hooks/usePushDeviceRegistration.js";
36
+ import { useIdentityQueryReset as _e } from "./shell/identityQueryReset.js";
37
+ import { IdentityScopedQueryReset as ve } from "./shell/identityScopedQueryReset.js";
38
+ import { WorkspaceWriteRefusedToastListener as N } from "./shell/WorkspaceWriteRefusedToastListener.js";
39
+ import { TourPermissionsBoundary as P } from "../tours/TourPermissionsBoundary.js";
40
+ import { resolveBrowserDirectionMode as ye } from "./shell/directionMode.js";
41
+ import { TourPlayerProvider as F } from "../tours/TourPlayerProvider.js";
42
+ import { ToursProvider as I, useToursContext as L } from "../tours/ToursContext.js";
43
+ import { TourInitializer as R } from "../tours/TourInitializer.js";
44
+ import { setAssistantProductId as be } from "../assistant/productContext.js";
45
+ import { useRegisterTourRouteCatalog as xe } from "../tours/useTourRouteCatalog.js";
46
+ import { Suspense as z, useCallback as B, useEffect as V, useMemo as H, useRef as U, useState as Se } from "react";
47
+ import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
48
+ import { BrowserRouter as Ce, useLocation as q } from "react-router";
49
+ import { Toaster as J, toast as Y } from "sonner";
50
+ import { MutationCache as we, QueryCache as Te, QueryClient as Ee, QueryClientProvider as De } from "@tanstack/react-query";
47
51
  //#region src/shared/providers/AppShellProvider.tsx
48
- var Q = {
52
+ var X = {
49
53
  artistrybase: { prod: "cfbecacb6002" },
50
54
  atheletebridge: { prod: "c34c6ead7aa8" },
51
55
  adaptercloud: {},
@@ -71,7 +75,7 @@ var Q = {
71
75
  subscriberbot: {},
72
76
  intelwatchtower: {},
73
77
  kadaikodi: {}
74
- }, xe = [
78
+ }, Oe = [
75
79
  "nav.route.changed",
76
80
  "auth.signed_in",
77
81
  "auth.signed_out",
@@ -114,7 +118,7 @@ var Q = {
114
118
  "coolandlovely.wardrobe.item_added",
115
119
  "coolandlovely.search.performed",
116
120
  "vibecontrols.agent.registered",
117
- ...T,
121
+ ...S,
118
122
  "atheletebridge.page.viewed",
119
123
  "atheletebridge.team.created",
120
124
  "atheletebridge.fixture.created",
@@ -318,7 +322,7 @@ var Q = {
318
322
  "project.created",
319
323
  "workspace-member.added",
320
324
  "project-member.added"
321
- ], Se = {
325
+ ], ke = {
322
326
  "--success-bg": "var(--color-status-success-bgSubtle)",
323
327
  "--success-border": "var(--color-status-success-border)",
324
328
  "--success-text": "var(--color-status-success-text)",
@@ -331,8 +335,8 @@ var Q = {
331
335
  "--error-bg": "var(--color-status-error-bgSubtle)",
332
336
  "--error-border": "var(--color-status-error-border)",
333
337
  "--error-text": "var(--color-status-error-text)"
334
- }, Ce = 4e3;
335
- function we(e) {
338
+ }, Ae = 4e3;
339
+ function je(e) {
336
340
  let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
337
341
  code: e.code,
338
342
  operationName: e.operationName,
@@ -344,13 +348,13 @@ function we(e) {
344
348
  };
345
349
  console.error("[Burdenoff backend error]", e.message, n);
346
350
  }
347
- function Te(e) {
351
+ function Z(e) {
348
352
  return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
349
353
  }
350
- function Ee(e, t) {
354
+ function Q(e, t) {
351
355
  return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
352
356
  }
353
- function De() {
357
+ function Me() {
354
358
  return {
355
359
  BASE_URL: "/",
356
360
  DEV: !1,
@@ -359,9 +363,9 @@ function De() {
359
363
  SSR: !1
360
364
  };
361
365
  }
362
- function Oe(e, t) {
366
+ function Ne(e, t) {
363
367
  if (!t || t.length === 0 || !e.rybbit) return e;
364
- let n = e.rybbit.allowlist ?? A, r = [...new Set([...n, ...t])];
368
+ let n = e.rybbit.allowlist ?? D, r = [...new Set([...n, ...t])];
365
369
  return {
366
370
  ...e,
367
371
  rybbit: {
@@ -370,8 +374,8 @@ function Oe(e, t) {
370
374
  }
371
375
  };
372
376
  }
373
- function ke(t, n) {
374
- let r = Te(n.VITE_DEPLOY_ENV ?? n.MODE), i = Ee(n, r), a = Q[t] ?? Q[e(t)], o = r === "prod" ? a?.prod : a?.nonProd, s = n.VITE_RYBBIT_SITE_ID || o, c = n.VITE_BACKEND_AUDIT_ENDPOINT || (n.PROD ? "/api/fe-events" : void 0);
377
+ function Pe(e, n) {
378
+ let r = Z(n.VITE_DEPLOY_ENV ?? n.MODE), i = Q(n, r), a = X[e] ?? X[t(e)], o = r === "prod" ? a?.prod : a?.nonProd, s = n.VITE_RYBBIT_SITE_ID || o, c = n.VITE_BACKEND_AUDIT_ENDPOINT || (n.PROD ? "/api/fe-events" : void 0);
375
379
  return {
376
380
  enabled: i,
377
381
  appVersion: n.VITE_APP_VERSION || "0.0.0",
@@ -382,14 +386,14 @@ function ke(t, n) {
382
386
  enabled: i && !!s,
383
387
  siteId: s,
384
388
  scriptUrl: n.VITE_RYBBIT_SCRIPT_URL,
385
- allowlist: xe,
389
+ allowlist: Oe,
386
390
  identifyOn: "auth.signed_in",
387
391
  rename: { "nav.route.changed": "pageview" }
388
392
  },
389
393
  otel: {
390
394
  enabled: i && !!n.VITE_OTEL_HTTP_ENDPOINT,
391
395
  endpoint: n.VITE_OTEL_HTTP_ENDPOINT,
392
- serviceName: `${t}-app`
396
+ serviceName: `${e}-app`
393
397
  },
394
398
  backendAudit: {
395
399
  enabled: i && !!c,
@@ -397,17 +401,17 @@ function ke(t, n) {
397
401
  }
398
402
  };
399
403
  }
400
- function Ae({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
401
- let { trackProgress: a, recordStepCompletion: o, trackEvent: s, progressScopeKey: c } = z(), l = H((e, t) => e.steps?.[t], []);
402
- return /* @__PURE__ */ J(L, {
404
+ function Fe({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
405
+ let { trackProgress: a, recordStepCompletion: o, trackEvent: s, progressScopeKey: c } = L(), l = B((e, t) => e.steps?.[t], []);
406
+ return /* @__PURE__ */ K(F, {
403
407
  scopeKey: c,
404
- onTourStart: H((e) => {
408
+ onTourStart: B((e) => {
405
409
  a(e.id, "started"), s("TOUR_STARTED", e.id);
406
410
  }, [s, a]),
407
- onTourComplete: H((e) => {
411
+ onTourComplete: B((e) => {
408
412
  a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
409
413
  }, [s, a]),
410
- onTourSkip: H((e, t) => {
414
+ onTourSkip: B((e, t) => {
411
415
  let n = l(e, t);
412
416
  a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
413
417
  stepId: n?.id,
@@ -418,14 +422,14 @@ function Ae({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
418
422
  s,
419
423
  a
420
424
  ]),
421
- onStepChange: H((e, t) => {
425
+ onStepChange: B((e, t) => {
422
426
  let n = l(e, t);
423
427
  n && s("STEP_VIEWED", e.id, {
424
428
  stepId: n.id,
425
429
  stepOrder: n.stepOrder
426
430
  });
427
431
  }, [l, s]),
428
- onStepComplete: H((e, t) => {
432
+ onStepComplete: B((e, t) => {
429
433
  let n = l(e, t);
430
434
  n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
431
435
  stepId: n.id,
@@ -437,20 +441,21 @@ function Ae({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
437
441
  s
438
442
  ]),
439
443
  children: [
440
- /* @__PURE__ */ q(B, {}),
444
+ /* @__PURE__ */ G(R, {}),
441
445
  e,
442
- /* @__PURE__ */ q(je, {}),
443
- /* @__PURE__ */ q(Ne, {}),
444
- /* @__PURE__ */ q(X, {
446
+ /* @__PURE__ */ G(Ie, {}),
447
+ /* @__PURE__ */ G(N, {}),
448
+ /* @__PURE__ */ G(Re, {}),
449
+ /* @__PURE__ */ G(J, {
445
450
  position: n,
446
451
  richColors: !0,
447
452
  closeButton: !0,
448
- style: Se
453
+ style: ke
449
454
  }),
450
- /* @__PURE__ */ q(de, {}),
451
- t && /* @__PURE__ */ q(V, {
455
+ /* @__PURE__ */ G(he, {}),
456
+ t && /* @__PURE__ */ G(z, {
452
457
  fallback: null,
453
- children: /* @__PURE__ */ q(v, {
458
+ children: /* @__PURE__ */ G(_, {
454
459
  productName: r,
455
460
  brandInitial: i
456
461
  })
@@ -458,92 +463,92 @@ function Ae({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
458
463
  ]
459
464
  });
460
465
  }
461
- function je() {
462
- let e = G(null);
463
- return U(() => {
466
+ function Ie() {
467
+ let e = U(null);
468
+ return V(() => {
464
469
  let t = (t) => {
465
- let n = t instanceof CustomEvent && o(t.detail) ? t.detail : null;
466
- if (!s(n)) return;
467
- we(n);
470
+ let n = t instanceof CustomEvent && s(t.detail) ? t.detail : null;
471
+ if (!c(n)) return;
472
+ je(n);
468
473
  let r = `${n.code ?? ""}|${n.message}`, i = Date.now(), a = e.current;
469
- a?.key === r && i - a.shownAt < Ce || (e.current = {
474
+ a?.key === r && i - a.shownAt < Ae || (e.current = {
470
475
  key: r,
471
476
  shownAt: i
472
- }, Z.error(n.message, { duration: 7e3 }));
477
+ }, Y.error(n.message, { duration: 7e3 }));
473
478
  };
474
- return window.addEventListener(r, t), () => window.removeEventListener(r, t);
479
+ return window.addEventListener(i, t), () => window.removeEventListener(i, t);
475
480
  }, []), null;
476
481
  }
477
- var $ = "burdenoff-connection-status", Me = 1500;
478
- function Ne() {
479
- let e = G(null), t = G(!1);
480
- return U(() => {
482
+ var $ = "burdenoff-connection-status", Le = 1500;
483
+ function Re() {
484
+ let e = U(null), t = U(!1);
485
+ return V(() => {
481
486
  let n = () => {
482
- t.current || (t.current = !0, Z.error("Connection lost. Trying to reconnect…", {
487
+ t.current || (t.current = !0, Y.error("Connection lost. Trying to reconnect…", {
483
488
  id: $,
484
489
  duration: Infinity
485
490
  }));
486
491
  }, r = () => {
487
492
  t.current || e.current || (e.current = setTimeout(() => {
488
493
  e.current = null, n();
489
- }, Me));
490
- }, a = (n) => {
494
+ }, Le));
495
+ }, i = (n) => {
491
496
  if (e.current &&= (clearTimeout(e.current), null), !t.current) {
492
- Z.dismiss($);
497
+ Y.dismiss($);
493
498
  return;
494
499
  }
495
- t.current = !1, n ? Z.success("Back online", {
500
+ t.current = !1, n ? Y.success("Back online", {
496
501
  id: $,
497
502
  duration: 2500
498
- }) : Z.dismiss($);
503
+ }) : Y.dismiss($);
499
504
  }, o = (e) => {
500
505
  if (!(e instanceof CustomEvent)) return;
501
506
  let t = e.detail;
502
- t && (t.online ? a(!0) : r());
507
+ t && (t.online ? i(!0) : r());
503
508
  }, s = () => r(), c = () => {
504
509
  e.current &&= (clearTimeout(e.current), null);
505
510
  };
506
- return window.addEventListener(i, o), window.addEventListener("offline", s), window.addEventListener("online", c), () => {
507
- window.removeEventListener(i, o), window.removeEventListener("offline", s), window.removeEventListener("online", c), e.current && clearTimeout(e.current);
511
+ return window.addEventListener(a, o), window.addEventListener("offline", s), window.addEventListener("online", c), () => {
512
+ window.removeEventListener(a, o), window.removeEventListener("offline", s), window.removeEventListener("online", c), e.current && clearTimeout(e.current);
508
513
  };
509
514
  }, []), null;
510
515
  }
511
- function Pe() {
512
- return F(), null;
516
+ function ze() {
517
+ return M(), null;
513
518
  }
514
- function Fe({ children: e, i18nProductId: t, platformI18nProductId: n, directionMode: r, fallbackTranslations: i, defaultBrand: a, defaultMode: o, defaultDensity: s, defaultTypography: c, defaultGlass: l, productName: u, brandInitial: ee, enablePWA: te, toasterPosition: d, tourPageIdFromPath: f, enableWorkspaceTourPermissions: p }) {
515
- let m = Y();
516
- P();
517
- let h = m.pathname.startsWith("/devportal") || m.pathname.startsWith("/organizations") || m.pathname.startsWith("/workspaces");
518
- return /* @__PURE__ */ J(g, {
519
+ function Be({ children: e, i18nProductId: t, platformI18nProductId: n, directionMode: r, fallbackTranslations: i, defaultBrand: a, defaultMode: o, defaultDensity: s, defaultTypography: c, defaultGlass: l, productName: ee, brandInitial: te, enablePWA: ne, toasterPosition: u, tourPageIdFromPath: d, enableWorkspaceTourPermissions: f }) {
520
+ let p = q();
521
+ j();
522
+ let m = p.pathname.startsWith("/devportal") || p.pathname.startsWith("/organizations") || p.pathname.startsWith("/workspaces");
523
+ return /* @__PURE__ */ K(h, {
519
524
  defaultBrand: a,
520
525
  defaultMode: o,
521
526
  defaultDensity: s,
522
527
  defaultTypography: c,
523
528
  defaultGlass: l,
524
- children: [/* @__PURE__ */ q(Ie, {}), /* @__PURE__ */ q(ue, {
529
+ children: [/* @__PURE__ */ G(Ve, {}), /* @__PURE__ */ G(pe, {
525
530
  i18nProductId: t,
526
531
  platformI18nProductId: n,
527
532
  directionMode: r,
528
533
  fallbackTranslations: i,
529
- children: /* @__PURE__ */ q(w, { children: /* @__PURE__ */ q(y, { children: /* @__PURE__ */ q(b, {
534
+ children: /* @__PURE__ */ G(me, { children: /* @__PURE__ */ G(v, { children: /* @__PURE__ */ G(se, {
530
535
  workspaceId: null,
531
536
  gateway: "global",
532
537
  defaultEnabled: !0,
533
- children: /* @__PURE__ */ q(x, { children: /* @__PURE__ */ q(S, { children: /* @__PURE__ */ q(_, {
538
+ children: /* @__PURE__ */ G(y, { children: /* @__PURE__ */ G(b, { children: /* @__PURE__ */ G(g, {
534
539
  fallback: null,
535
- children: /* @__PURE__ */ q(I, {
536
- enabled: p && !h,
537
- children: /* @__PURE__ */ q(R, {
538
- requireWorkspace: p,
539
- disabled: h,
540
- getPageIdFromPath: f,
541
- children: /* @__PURE__ */ J(Ae, {
542
- enablePWA: te,
543
- toasterPosition: d,
544
- productName: u,
545
- brandInitial: ee,
546
- children: [/* @__PURE__ */ q(Pe, {}), e]
540
+ children: /* @__PURE__ */ G(P, {
541
+ enabled: f && !m,
542
+ children: /* @__PURE__ */ G(I, {
543
+ requireWorkspace: f,
544
+ disabled: m,
545
+ getPageIdFromPath: d,
546
+ children: /* @__PURE__ */ K(Fe, {
547
+ enablePWA: ne,
548
+ toasterPosition: u,
549
+ productName: ee,
550
+ brandInitial: te,
551
+ children: [/* @__PURE__ */ G(ze, {}), e]
547
552
  })
548
553
  })
549
554
  })
@@ -552,9 +557,9 @@ function Fe({ children: e, i18nProductId: t, platformI18nProductId: n, direction
552
557
  })]
553
558
  });
554
559
  }
555
- function Ie() {
556
- let e = Y();
557
- return U(() => {
560
+ function Ve() {
561
+ let e = q();
562
+ return V(() => {
558
563
  e.hash || requestAnimationFrame(() => {
559
564
  window.scrollTo({
560
565
  top: 0,
@@ -572,7 +577,7 @@ function Ie() {
572
577
  e.hash
573
578
  ]), null;
574
579
  }
575
- function Le(e) {
580
+ function He(e) {
576
581
  if (e instanceof Error) return e.message;
577
582
  if (typeof e == "string") return e;
578
583
  try {
@@ -581,9 +586,9 @@ function Le(e) {
581
586
  return String(e);
582
587
  }
583
588
  }
584
- function Re() {
585
- let e = N(), t = Y(), n = G(void 0), r = G(void 0), i = G(null);
586
- return U(() => {
589
+ function Ue() {
590
+ let e = A(), t = q(), n = U(void 0), r = U(void 0), i = U(null);
591
+ return V(() => {
587
592
  let a = `${t.pathname}${t.search}${t.hash}`;
588
593
  if (r.current !== a) return i.current && clearTimeout(i.current), i.current = setTimeout(() => {
589
594
  i.current = null;
@@ -603,7 +608,7 @@ function Re() {
603
608
  t.hash,
604
609
  t.pathname,
605
610
  t.search
606
- ]), U(() => {
611
+ ]), V(() => {
607
612
  let t = (t) => {
608
613
  e.emit("error.runtime.caught", {
609
614
  message: t.message || "Runtime error",
@@ -613,34 +618,34 @@ function Re() {
613
618
  errorName: t.error instanceof Error ? t.error.name : void 0
614
619
  });
615
620
  }, n = (t) => {
616
- e.emit("error.unhandledrejection", { reason: Le(t.reason) });
621
+ e.emit("error.unhandledrejection", { reason: He(t.reason) });
617
622
  };
618
623
  return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
619
624
  window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
620
625
  };
621
- }, [e]), U(() => {
622
- C((t) => {
626
+ }, [e]), V(() => {
627
+ x((t) => {
623
628
  e.emit("perf.lcp.measured", {
624
629
  metric: "LCP",
625
630
  value: t.value,
626
631
  id: t.id,
627
632
  rating: t.rating
628
633
  });
629
- }), le((t) => {
634
+ }), fe((t) => {
630
635
  e.emit("perf.cls.measured", {
631
636
  metric: "CLS",
632
637
  value: t.value,
633
638
  id: t.id,
634
639
  rating: t.rating
635
640
  });
636
- }), ce((t) => {
641
+ }), de((t) => {
637
642
  e.emit("perf.inp.measured", {
638
643
  metric: "INP",
639
644
  value: t.value,
640
645
  id: t.id,
641
646
  rating: t.rating
642
647
  });
643
- }), se((t) => {
648
+ }), ue((t) => {
644
649
  e.emit("perf.ttfb.measured", {
645
650
  metric: "TTFB",
646
651
  value: t.value,
@@ -650,16 +655,16 @@ function Re() {
650
655
  });
651
656
  }, [e]), null;
652
657
  }
653
- function ze({ config: e, productSlug: n, privacyConsent: r, consentRouteDenylist: i, rybbitSkipRoutes: a }) {
654
- let { pathname: o } = Y(), s = t(o) || i?.(o) === !0;
655
- return /* @__PURE__ */ J(K, { children: [
656
- /* @__PURE__ */ q(Re, {}),
657
- r && !s ? /* @__PURE__ */ q(k, { productName: n }) : null,
658
- e.enabled === !1 ? null : /* @__PURE__ */ J(K, { children: [
659
- e.devtools ? /* @__PURE__ */ q(E, { enabled: !0 }) : null,
660
- e.broadcast === !1 ? null : /* @__PURE__ */ q(D, {}),
661
- e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ q(O, { endpoint: e.backendAudit.endpoint }) : null,
662
- e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ q(j, {
658
+ function We({ config: e, productSlug: t, privacyConsent: r, consentRouteDenylist: i, rybbitSkipRoutes: a }) {
659
+ let { pathname: o } = q(), s = n(o) || i?.(o) === !0;
660
+ return /* @__PURE__ */ K(W, { children: [
661
+ /* @__PURE__ */ G(Ue, {}),
662
+ r && !s ? /* @__PURE__ */ G(E, { productName: t }) : null,
663
+ e.enabled === !1 ? null : /* @__PURE__ */ K(W, { children: [
664
+ e.devtools ? /* @__PURE__ */ G(C, { enabled: !0 }) : null,
665
+ e.broadcast === !1 ? null : /* @__PURE__ */ G(w, {}),
666
+ e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ G(T, { endpoint: e.backendAudit.endpoint }) : null,
667
+ e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ G(O, {
663
668
  siteId: e.rybbit.siteId,
664
669
  scriptUrl: e.rybbit.scriptUrl,
665
670
  allowlist: e.rybbit.allowlist,
@@ -668,37 +673,37 @@ function ze({ config: e, productSlug: n, privacyConsent: r, consentRouteDenylist
668
673
  skipRoutes: a,
669
674
  pathname: o
670
675
  }) : null,
671
- e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ q(M, {
676
+ e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ G(k, {
672
677
  endpoint: e.otel.endpoint,
673
- serviceName: e.otel.serviceName ?? `${n}-app`,
678
+ serviceName: e.otel.serviceName ?? `${t}-app`,
674
679
  flushInterval: e.otel.flushInterval
675
680
  }) : null
676
681
  ] })
677
682
  ] });
678
683
  }
679
- function Be({ config: e, children: r, clearAuthStore: i }) {
680
- let { productName: o, productSlug: s = o.toLowerCase().replace(/\s+/g, ""), tagline: g = "", domain: v, i18nProductId: y, platformI18nProductId: b, rtl: x, gatewayUrls: S, authBridge: C, defaultBrand: se = "default", defaultMode: ce, defaultDensity: le, defaultTypography: ue, defaultGlass: w, enablePWA: de = !0, brandInitial: T = o.charAt(0), defaultGateway: E = "workspace", enableSubscriptions: D = !0, fallbackTranslations: O, queryClientOptions: k, toasterPosition: A = "bottom-right", observability: j, privacyConsent: M = !1, consentRouteDenylist: N, rybbitEvents: P, rybbitSkipRoutes: F, tourPageIdFromPath: I, tourRouteCatalog: L, enableWorkspaceTourPermissions: R = !1 } = e;
681
- me(s, L);
682
- let [z] = he(() => pe({
683
- enabled: x?.enabled,
684
- allowPreview: x?.preview
685
- })), B = W(() => Oe(j ?? ke(s, De()), P), [
686
- j,
687
- s,
688
- P
689
- ]), V = W(() => ({
690
- productName: o,
691
- productSlug: s,
692
- brandInitial: T,
693
- tagline: g,
694
- domain: v
684
+ function Ge({ config: t, children: i, clearAuthStore: a }) {
685
+ let { productName: s, productSlug: c = s.toLowerCase().replace(/\s+/g, ""), tagline: h = "", domain: _, i18nProductId: v, platformI18nProductId: se, rtl: y, gatewayUrls: b, authBridge: x, defaultBrand: ue = "default", defaultMode: de, defaultDensity: fe, defaultTypography: pe, defaultGlass: me, enablePWA: he = !0, brandInitial: S = s.charAt(0), defaultGateway: C = "workspace", enableSubscriptions: w = !0, fallbackTranslations: T, queryClientOptions: E, toasterPosition: D = "bottom-right", observability: O, privacyConsent: k = !1, consentRouteDenylist: A, rybbitEvents: j, rybbitSkipRoutes: M, tourPageIdFromPath: N, tourRouteCatalog: P, enableWorkspaceTourPermissions: F = !1, workspaceOperationGuard: I = "off" } = t;
686
+ xe(c, P), V(() => be(e(c)), [c]);
687
+ let [L] = Se(() => ye({
688
+ enabled: y?.enabled,
689
+ allowPreview: y?.preview
690
+ })), R = H(() => Ne(O ?? Pe(c, Me()), j), [
691
+ O,
692
+ c,
693
+ j
694
+ ]), z = H(() => ({
695
+ productName: s,
696
+ productSlug: c,
697
+ brandInitial: S,
698
+ tagline: h,
699
+ domain: _
695
700
  }), [
696
- o,
697
701
  s,
698
- T,
699
- g,
700
- v
701
- ]), K = G(!1), Y = G(!!C?.url), X = H((e) => {
702
+ c,
703
+ S,
704
+ h,
705
+ _
706
+ ]), W = U(!1), q = U(!!x?.url), J = B((e) => {
702
707
  if (!e?.force && (() => {
703
708
  try {
704
709
  let e = sessionStorage.getItem("bf-active-profile");
@@ -708,25 +713,25 @@ function Be({ config: e, children: r, clearAuthStore: i }) {
708
713
  } catch {
709
714
  return !1;
710
715
  }
711
- })() || Y.current || K.current) return;
712
- K.current = !0, ee(i);
713
- let n = `${window.location.pathname}${window.location.search}`, r = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(n)}`, a = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
714
- if (window.location.pathname.startsWith("/auth/") || t(window.location.pathname) || a) {
715
- K.current = !1;
716
+ })() || q.current || W.current) return;
717
+ W.current = !0, ne(a);
718
+ let t = `${window.location.pathname}${window.location.search}`, r = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(t)}`, i = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
719
+ if (window.location.pathname.startsWith("/auth/") || n(window.location.pathname) || i) {
720
+ W.current = !1;
716
721
  return;
717
722
  }
718
723
  window.location.replace(r);
719
- }, [i]), Z = W(() => ({
720
- globalBaseUrl: S.globalBaseUrl,
721
- ...te()
722
- }), [S.globalBaseUrl]), Q = H(async () => u(Z), [Z]), xe = H(async () => {
723
- window.location.pathname.startsWith("/auth/") || await Q() || X({ force: !0 });
724
- }, [Q, X]), Se = H(async (e) => {
725
- d(e) ? await Q() || X({ force: !0 }) : console.error("[Network] Backend unreachable:", e.message);
726
- }, [Q, X]), Ce = H(async (e) => {
727
- let t = await l({
724
+ }, [a]), Y = H(() => ({
725
+ globalBaseUrl: b.globalBaseUrl,
726
+ ...u()
727
+ }), [b.globalBaseUrl]), X = B(async () => te(Y), [Y]), Oe = B(async () => {
728
+ window.location.pathname.startsWith("/auth/") || await X() || J({ force: !0 });
729
+ }, [X, J]), ke = B(async (e) => {
730
+ d(e) ? await X() || J({ force: !0 }) : console.error("[Network] Backend unreachable:", e.message);
731
+ }, [X, J]), Ae = B(async (e) => {
732
+ let t = await ee({
728
733
  gateway: "global",
729
- baseUrl: S.globalBaseUrl,
734
+ baseUrl: b.globalBaseUrl,
730
735
  authToken: "",
731
736
  query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
732
737
  variables: { token: e }
@@ -738,99 +743,101 @@ function Be({ config: e, children: r, clearAuthStore: i }) {
738
743
  refreshToken: n.refreshToken,
739
744
  expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
740
745
  };
741
- }, [S.globalBaseUrl]), we = H(() => n("organization"), []), Te = W(() => {
742
- let e = new ye({
743
- queryCache: new ve({ onError: (e) => {
744
- a(e);
746
+ }, [b.globalBaseUrl]), je = B(() => r("organization"), []), Z = H(() => {
747
+ let e = new Ee({
748
+ queryCache: new Te({ onError: (e) => {
749
+ o(e);
745
750
  } }),
746
- mutationCache: new _e({
751
+ mutationCache: new we({
747
752
  onSuccess: () => {
748
753
  e.invalidateQueries();
749
754
  },
750
755
  onError: (e) => {
751
- a(e);
756
+ o(e);
752
757
  }
753
758
  }),
754
759
  defaultOptions: { queries: {
755
- staleTime: k?.staleTime ?? 300 * 1e3,
756
- retry: k?.retry ?? 2,
757
- refetchOnWindowFocus: k?.refetchOnWindowFocus ?? !1
760
+ staleTime: E?.staleTime ?? 300 * 1e3,
761
+ retry: E?.retry ?? 2,
762
+ refetchOnWindowFocus: E?.refetchOnWindowFocus ?? !1
758
763
  } }
759
764
  });
760
765
  return e;
761
- }, [k]);
762
- return U(() => {
766
+ }, [E]), Q = _e(Z);
767
+ return V(() => {
763
768
  let e = () => {
764
- X({ force: !0 });
769
+ J({ force: !0 });
765
770
  };
766
- return window.addEventListener(c, e), () => {
767
- window.removeEventListener(c, e);
771
+ return window.addEventListener(l, e), () => {
772
+ window.removeEventListener(l, e);
768
773
  };
769
- }, [X]), U(() => {
770
- let e = h.getInstance();
771
- e.getLogger("shell") || e.getLogger("shell").addTransport(new ne());
772
- }, []), /* @__PURE__ */ q(f, {
773
- value: V,
774
- children: /* @__PURE__ */ q(fe, {
775
- appName: s,
776
- appVersion: B.appVersion,
777
- appEnv: B.appEnv,
778
- sourceMfe: s,
779
- children: /* @__PURE__ */ q(_, {
780
- FallbackComponent: ie,
781
- children: /* @__PURE__ */ J(ge, { children: [/* @__PURE__ */ q(ze, {
782
- config: B,
783
- productSlug: s,
784
- privacyConsent: M,
785
- consentRouteDenylist: N,
786
- rybbitSkipRoutes: F
787
- }), /* @__PURE__ */ q(be, {
788
- client: Te,
789
- children: /* @__PURE__ */ q(re, { children: /* @__PURE__ */ q(oe, {
790
- workspaceBaseUrl: S.workspaceBaseUrl,
791
- globalBaseUrl: S.globalBaseUrl,
792
- organizationId: we,
793
- productSlug: s,
794
- defaultGateway: E,
795
- enableSubscriptions: D,
796
- onAuthError: xe,
797
- onNetworkError: Se,
798
- onRefreshToken: Q,
799
- children: /* @__PURE__ */ q(p, {
800
- bridgeUrl: C?.url,
801
- bridgeAllowedOrigins: C?.allowedOrigins,
802
- bridgeDebug: C?.debug,
803
- onRefreshToken: Ce,
774
+ }, [J]), V(() => {
775
+ let e = re.getInstance();
776
+ e.getLogger("shell") || e.getLogger("shell").addTransport(new ie());
777
+ }, []), /* @__PURE__ */ G(f, {
778
+ value: z,
779
+ children: /* @__PURE__ */ G(ge, {
780
+ appName: c,
781
+ appVersion: R.appVersion,
782
+ appEnv: R.appEnv,
783
+ sourceMfe: c,
784
+ children: /* @__PURE__ */ G(g, {
785
+ FallbackComponent: oe,
786
+ children: /* @__PURE__ */ K(Ce, { children: [/* @__PURE__ */ G(We, {
787
+ config: R,
788
+ productSlug: c,
789
+ privacyConsent: k,
790
+ consentRouteDenylist: A,
791
+ rybbitSkipRoutes: M
792
+ }), /* @__PURE__ */ G(De, {
793
+ client: Z,
794
+ children: /* @__PURE__ */ G(ae, { children: /* @__PURE__ */ G(le, {
795
+ workspaceBaseUrl: b.workspaceBaseUrl,
796
+ globalBaseUrl: b.globalBaseUrl,
797
+ organizationId: je,
798
+ productSlug: c,
799
+ defaultGateway: C,
800
+ enableSubscriptions: w,
801
+ onAuthError: Oe,
802
+ onNetworkError: ke,
803
+ onRefreshToken: X,
804
+ workspaceOperationGuard: I,
805
+ children: /* @__PURE__ */ K(p, {
806
+ bridgeUrl: x?.url,
807
+ bridgeAllowedOrigins: x?.allowedOrigins,
808
+ bridgeDebug: x?.debug,
809
+ onRefreshToken: Ae,
804
810
  onBridgeReady: () => {
805
- Y.current = !1;
811
+ q.current = !1;
806
812
  },
807
813
  onSessionExpiringSoon: () => {
808
814
  console.warn("[Auth] Session will expire in 5 minutes");
809
815
  },
810
816
  onTokenExpired: () => {
811
- X();
817
+ J();
812
818
  },
813
- children: /* @__PURE__ */ q(m, {
819
+ onBeforeIdentityChange: Q.onBeforeIdentityChange,
820
+ children: [/* @__PURE__ */ G(ve, { announcementsRef: Q.announcementsRef }), /* @__PURE__ */ G(m, {
814
821
  syncToUrl: !0,
815
- children: /* @__PURE__ */ q(ae, { children: /* @__PURE__ */ q(Fe, {
816
- i18nProductId: y,
817
- platformI18nProductId: b,
818
- directionMode: z,
819
- fallbackTranslations: O,
820
- defaultBrand: se,
821
- defaultMode: ce,
822
- defaultDensity: le,
823
- defaultTypography: ue,
824
- defaultGlass: w,
825
- productName: o,
826
- brandInitial: T,
827
- enablePWA: de,
828
- toasterPosition: A,
829
- tourPageIdFromPath: I,
830
- enableWorkspaceTourPermissions: R,
831
- children: r
822
+ children: /* @__PURE__ */ G(ce, { children: /* @__PURE__ */ G(Be, {
823
+ i18nProductId: v,
824
+ platformI18nProductId: se,
825
+ directionMode: L,
826
+ fallbackTranslations: T,
827
+ defaultBrand: ue,
828
+ defaultMode: de,
829
+ defaultDensity: fe,
830
+ defaultTypography: pe,
831
+ defaultGlass: me,
832
+ productName: s,
833
+ brandInitial: S,
834
+ enablePWA: he,
835
+ toasterPosition: D,
836
+ tourPageIdFromPath: N,
837
+ enableWorkspaceTourPermissions: F,
838
+ children: i
832
839
  }) })
833
- })
840
+ })]
834
841
  })
835
842
  }) })
836
843
  })] })
@@ -839,4 +846,4 @@ function Be({ config: e, children: r, clearAuthStore: i }) {
839
846
  });
840
847
  }
841
848
  //#endregion
842
- export { Be as AppShellProvider, ke as resolveAppShellObservabilityConfig };
849
+ export { Ge as AppShellProvider, Pe as resolveAppShellObservabilityConfig };