@burdenoff/fe-libs 2026.601.5 → 2026.601.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chrome/ProductSideNav.d.ts.map +1 -1
- package/dist/chrome/SideNavigation.d.ts.map +1 -1
- package/dist/chrome/sideNavigation/NavItemRenderer.d.ts.map +1 -1
- package/dist/shared/components/PWAInstallBanner.d.ts.map +1 -1
- package/dist/shared/events/index.d.ts +77 -1
- package/dist/shared/events/index.d.ts.map +1 -1
- package/dist/shared/graphql/client.d.ts.map +1 -1
- package/dist/shared/graphql/client.js +63 -63
- package/dist/shared/graphql/fetch.d.ts.map +1 -1
- package/dist/shared/graphql/fetch.js +120 -120
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +204 -184
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts +1 -1
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts.map +1 -1
- package/dist/shared/providers/shell/ProfileStorageManager.js +110 -102
- package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/useAuthActions.js +12 -10
- package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.js +8 -8
- package/dist/shared/utils/apollo.js +1 -1
- package/dist/shared/utils/authErrorHandling.d.ts.map +1 -1
- package/dist/shared/utils/authErrorHandling.js +23 -8
- package/dist/shared/utils/backendErrors.d.ts +23 -0
- package/dist/shared/utils/backendErrors.d.ts.map +1 -1
- package/dist/shared/utils/backendErrors.js +113 -39
- package/dist/shared/utils/index.d.ts +2 -2
- package/dist/shared/utils/index.d.ts.map +1 -1
- package/dist/shared-utils.js +12 -12
- package/dist/shared.js +97 -97
- package/package.json +1 -1
|
@@ -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
|
-
import { BACKEND_ERROR_EVENT as n,
|
|
4
|
-
import { graphqlFetch as
|
|
5
|
-
import { attemptTokenRefresh as
|
|
6
|
-
import { AuthProvider as
|
|
7
|
-
import { ActiveContextProvider as
|
|
8
|
-
import { LogManager as
|
|
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 ee } from "../utils/authErrorHandling.js";
|
|
6
|
+
import { AuthProvider as te } from "./shell/AuthProvider.js";
|
|
7
|
+
import { ActiveContextProvider as ne } from "./shell/ActiveContextProvider.js";
|
|
8
|
+
import { LogManager as u } from "../logger/LogManager.js";
|
|
9
9
|
import { ConsoleTransport as d } from "../logger/ConsoleTransport.js";
|
|
10
10
|
import { ThemeProvider as f } from "./shell/ThemeProvider.js";
|
|
11
|
-
import { ErrorFallback as
|
|
12
|
-
import { m } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
|
|
13
|
-
import { PWAInstallBanner as
|
|
14
|
-
import { FeatureFlagsProvider as
|
|
15
|
-
import { FeatureFlagProvider as
|
|
16
|
-
import { GlobalUiProvider as
|
|
17
|
-
import { ShellUiProvider as
|
|
18
|
-
import { ContextManagerProvider as
|
|
19
|
-
import { AuthTokenProvider as
|
|
20
|
-
import { MultiGatewayProvider as
|
|
11
|
+
import { ErrorFallback as re } from "../components/ErrorFallback.js";
|
|
12
|
+
import { m as p } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
|
|
13
|
+
import { PWAInstallBanner as m } from "../components/PWAInstallBanner.js";
|
|
14
|
+
import { FeatureFlagsProvider as h } from "./shell/FeatureFlagsProvider.js";
|
|
15
|
+
import { FeatureFlagProvider as g } from "../feature-flags/FeatureFlagProvider.js";
|
|
16
|
+
import { GlobalUiProvider as _ } from "./shell/GlobalUiProvider.js";
|
|
17
|
+
import { ShellUiProvider as v } from "./shell/ShellUiProvider.js";
|
|
18
|
+
import { ContextManagerProvider as y } from "./shell/ContextManagerProvider.js";
|
|
19
|
+
import { AuthTokenProvider as ie } from "./shell/AuthTokenProvider.js";
|
|
20
|
+
import { MultiGatewayProvider as ae } from "./shell/MultiGatewayProvider.js";
|
|
21
21
|
import { G as b, j as x, w as S } from "../../node_modules/web-vitals/dist/web-vitals.js";
|
|
22
22
|
import { ProfileI18nBridge as C } from "./shell/ProfileI18nBridge.js";
|
|
23
23
|
import { ProfileGeographyBridge as w } from "./shell/ProfileGeographyBridge.js";
|
|
24
|
-
import { AppShellContextProvider as
|
|
25
|
-
import { DevtoolsSink as
|
|
26
|
-
import { BroadcastChannelSink as
|
|
27
|
-
import { BackendAuditSink as
|
|
28
|
-
import { RybbitSink as
|
|
29
|
-
import { OtelBrowserSink as
|
|
30
|
-
import { EventBusProvider as
|
|
31
|
-
import { useReferralAttribution as
|
|
32
|
-
import { TourPlayerProvider as
|
|
33
|
-
import { ToursProvider as
|
|
34
|
-
import { TourInitializer as
|
|
35
|
-
import { Suspense as
|
|
36
|
-
import { Fragment as
|
|
37
|
-
import { BrowserRouter as
|
|
38
|
-
import { Toaster as
|
|
39
|
-
import { MutationCache as
|
|
24
|
+
import { AppShellContextProvider as oe } from "./shell/AppShellContext.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 A, useEventBus as j } from "../../shared-events.js";
|
|
31
|
+
import { useReferralAttribution as M } from "../hooks/useReferralAttribution.js";
|
|
32
|
+
import { TourPlayerProvider as N } from "../tours/TourPlayerProvider.js";
|
|
33
|
+
import { ToursProvider as P, useToursContext as F } from "../tours/ToursContext.js";
|
|
34
|
+
import { TourInitializer as I } from "../tours/TourInitializer.js";
|
|
35
|
+
import { Suspense as L, useCallback as R, useEffect as z, useMemo as B, useRef as V } from "react";
|
|
36
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
37
|
+
import { BrowserRouter as G, useLocation as K } from "react-router-dom";
|
|
38
|
+
import { Toaster as q, toast as J } from "sonner";
|
|
39
|
+
import { MutationCache as se, QueryCache as ce, QueryClient as le, QueryClientProvider as ue } from "@tanstack/react-query";
|
|
40
40
|
//#region src/shared/providers/AppShellProvider.tsx
|
|
41
|
-
var
|
|
41
|
+
var Y = {
|
|
42
42
|
bigconsole: {
|
|
43
43
|
prod: "292459a3e86c",
|
|
44
44
|
nonProd: "a7e7362b0de3"
|
|
@@ -57,23 +57,8 @@ var X = {
|
|
|
57
57
|
},
|
|
58
58
|
vibecontrols: { prod: "8a46449d9c07" },
|
|
59
59
|
workspaces: { prod: "da0c142f4b2e" }
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
"auth.signed_in",
|
|
63
|
-
"auth.signed_out",
|
|
64
|
-
"support.ticket.created",
|
|
65
|
-
"support.ticket.closed",
|
|
66
|
-
"support.ticket.reopened",
|
|
67
|
-
"support.kb.article_rated",
|
|
68
|
-
"conversations.conversation.created",
|
|
69
|
-
"conversations.conversation.archived",
|
|
70
|
-
"notification.item.opened",
|
|
71
|
-
"notification.preference.updated",
|
|
72
|
-
"notification.admin.sent",
|
|
73
|
-
"notification.template.saved",
|
|
74
|
-
"notification.schedule.updated"
|
|
75
|
-
], Q = 4e3;
|
|
76
|
-
function le(e) {
|
|
60
|
+
}, 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,vibecontrols.agent.registered,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".split(","), de = 4e3;
|
|
61
|
+
function fe(e) {
|
|
77
62
|
let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
|
|
78
63
|
code: e.code,
|
|
79
64
|
operationName: e.operationName,
|
|
@@ -85,13 +70,13 @@ function le(e) {
|
|
|
85
70
|
};
|
|
86
71
|
console.error("[Burdenoff backend error]", e.message, n);
|
|
87
72
|
}
|
|
88
|
-
function
|
|
73
|
+
function pe(e) {
|
|
89
74
|
return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
|
|
90
75
|
}
|
|
91
|
-
function
|
|
76
|
+
function me(e, t) {
|
|
92
77
|
return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
|
|
93
78
|
}
|
|
94
|
-
function
|
|
79
|
+
function he() {
|
|
95
80
|
return {
|
|
96
81
|
BASE_URL: "/",
|
|
97
82
|
DEV: !1,
|
|
@@ -100,8 +85,8 @@ function fe() {
|
|
|
100
85
|
SSR: !1
|
|
101
86
|
};
|
|
102
87
|
}
|
|
103
|
-
function
|
|
104
|
-
let n =
|
|
88
|
+
function Z(e, t) {
|
|
89
|
+
let n = pe(t.VITE_DEPLOY_ENV ?? t.MODE), r = me(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);
|
|
105
90
|
return {
|
|
106
91
|
enabled: r,
|
|
107
92
|
appVersion: t.VITE_APP_VERSION || "0.0.0",
|
|
@@ -112,7 +97,7 @@ function $(e, t) {
|
|
|
112
97
|
enabled: r && !!o,
|
|
113
98
|
siteId: o,
|
|
114
99
|
scriptUrl: t.VITE_RYBBIT_SCRIPT_URL,
|
|
115
|
-
allowlist:
|
|
100
|
+
allowlist: X,
|
|
116
101
|
identifyOn: "auth.signed_in",
|
|
117
102
|
rename: { "nav.route.changed": "pageview" }
|
|
118
103
|
},
|
|
@@ -127,16 +112,16 @@ function $(e, t) {
|
|
|
127
112
|
}
|
|
128
113
|
};
|
|
129
114
|
}
|
|
130
|
-
function
|
|
131
|
-
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } =
|
|
132
|
-
return /* @__PURE__ */
|
|
133
|
-
onTourStart:
|
|
115
|
+
function ge({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
|
|
116
|
+
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = F(), c = R((e, t) => e.steps?.[t], []);
|
|
117
|
+
return /* @__PURE__ */ W(N, {
|
|
118
|
+
onTourStart: R((e) => {
|
|
134
119
|
a(e.id, "started"), s("TOUR_STARTED", e.id);
|
|
135
120
|
}, [s, a]),
|
|
136
|
-
onTourComplete:
|
|
121
|
+
onTourComplete: R((e) => {
|
|
137
122
|
a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
|
|
138
123
|
}, [s, a]),
|
|
139
|
-
onTourSkip:
|
|
124
|
+
onTourSkip: R((e, t) => {
|
|
140
125
|
let n = c(e, t);
|
|
141
126
|
a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
|
|
142
127
|
stepId: n?.id,
|
|
@@ -147,14 +132,14 @@ function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
147
132
|
s,
|
|
148
133
|
a
|
|
149
134
|
]),
|
|
150
|
-
onStepChange:
|
|
135
|
+
onStepChange: R((e, t) => {
|
|
151
136
|
let n = c(e, t);
|
|
152
137
|
n && s("STEP_VIEWED", e.id, {
|
|
153
138
|
stepId: n.id,
|
|
154
139
|
stepOrder: n.stepOrder
|
|
155
140
|
});
|
|
156
141
|
}, [c, s]),
|
|
157
|
-
onStepComplete:
|
|
142
|
+
onStepComplete: R((e, t) => {
|
|
158
143
|
let n = c(e, t);
|
|
159
144
|
n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
|
|
160
145
|
stepId: n.id,
|
|
@@ -166,17 +151,18 @@ function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
166
151
|
s
|
|
167
152
|
]),
|
|
168
153
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ U(I, {}),
|
|
170
155
|
e,
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ U(_e, {}),
|
|
157
|
+
/* @__PURE__ */ U(ve, {}),
|
|
158
|
+
/* @__PURE__ */ U(q, {
|
|
173
159
|
position: n,
|
|
174
160
|
richColors: !0,
|
|
175
161
|
closeButton: !0
|
|
176
162
|
}),
|
|
177
|
-
t && /* @__PURE__ */
|
|
163
|
+
t && /* @__PURE__ */ U(L, {
|
|
178
164
|
fallback: null,
|
|
179
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ U(m, {
|
|
180
166
|
productName: r,
|
|
181
167
|
brandInitial: i
|
|
182
168
|
})
|
|
@@ -184,34 +170,68 @@ function pe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
184
170
|
]
|
|
185
171
|
});
|
|
186
172
|
}
|
|
187
|
-
function
|
|
188
|
-
let e =
|
|
189
|
-
return
|
|
173
|
+
function _e() {
|
|
174
|
+
let e = V(null);
|
|
175
|
+
return z(() => {
|
|
190
176
|
let t = (t) => {
|
|
191
|
-
let n = t instanceof CustomEvent &&
|
|
192
|
-
if (!
|
|
193
|
-
|
|
194
|
-
let r = `${n.code ?? ""}|${n.message}`,
|
|
195
|
-
s?.key === r &&
|
|
177
|
+
let n = t instanceof CustomEvent && a(t.detail) ? t.detail : null;
|
|
178
|
+
if (!o(n)) return;
|
|
179
|
+
fe(n);
|
|
180
|
+
let r = `${n.code ?? ""}|${n.message}`, i = Date.now(), s = e.current;
|
|
181
|
+
s?.key === r && i - s.shownAt < de || (e.current = {
|
|
196
182
|
key: r,
|
|
197
|
-
shownAt:
|
|
198
|
-
},
|
|
183
|
+
shownAt: i
|
|
184
|
+
}, J.error(n.message, { duration: 7e3 }));
|
|
199
185
|
};
|
|
200
186
|
return window.addEventListener(n, t), () => window.removeEventListener(n, t);
|
|
201
187
|
}, []), null;
|
|
202
188
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
189
|
+
var Q = "burdenoff-connection-status", $ = 1500;
|
|
190
|
+
function ve() {
|
|
191
|
+
let e = V(null), t = V(!1);
|
|
192
|
+
return z(() => {
|
|
193
|
+
let n = () => {
|
|
194
|
+
t.current || (t.current = !0, J.error("Connection lost. Trying to reconnect…", {
|
|
195
|
+
id: Q,
|
|
196
|
+
duration: Infinity
|
|
197
|
+
}));
|
|
198
|
+
}, i = () => {
|
|
199
|
+
t.current || e.current || (e.current = setTimeout(() => {
|
|
200
|
+
e.current = null, n();
|
|
201
|
+
}, $));
|
|
202
|
+
}, a = (n) => {
|
|
203
|
+
if (e.current &&= (clearTimeout(e.current), null), !t.current) {
|
|
204
|
+
J.dismiss(Q);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
t.current = !1, n ? J.success("Back online", {
|
|
208
|
+
id: Q,
|
|
209
|
+
duration: 2500
|
|
210
|
+
}) : J.dismiss(Q);
|
|
211
|
+
}, o = (e) => {
|
|
212
|
+
if (!(e instanceof CustomEvent)) return;
|
|
213
|
+
let t = e.detail;
|
|
214
|
+
t && (t.online ? a(!0) : i());
|
|
215
|
+
}, s = () => i(), c = () => {
|
|
216
|
+
e.current &&= (clearTimeout(e.current), null);
|
|
217
|
+
};
|
|
218
|
+
return window.addEventListener(r, o), window.addEventListener("offline", s), window.addEventListener("online", c), () => {
|
|
219
|
+
window.removeEventListener(r, o), window.removeEventListener("offline", s), window.removeEventListener("online", c), e.current && clearTimeout(e.current);
|
|
220
|
+
};
|
|
221
|
+
}, []), null;
|
|
222
|
+
}
|
|
223
|
+
function ye({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, productName: i, brandInitial: a, enablePWA: o, toasterPosition: s }) {
|
|
224
|
+
let c = K();
|
|
225
|
+
M();
|
|
226
|
+
let l = /* @__PURE__ */ U(w, { children: /* @__PURE__ */ U(h, { children: /* @__PURE__ */ U(g, {
|
|
207
227
|
workspaceId: null,
|
|
208
228
|
gateway: "global",
|
|
209
229
|
defaultEnabled: !0,
|
|
210
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ U(_, { children: /* @__PURE__ */ U(v, { children: /* @__PURE__ */ U(p, {
|
|
211
231
|
fallback: null,
|
|
212
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ U(P, {
|
|
213
233
|
disabled: c.pathname.startsWith("/devportal") || c.pathname.startsWith("/organizations") || c.pathname.startsWith("/workspaces"),
|
|
214
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ U(ge, {
|
|
215
235
|
enablePWA: o,
|
|
216
236
|
toasterPosition: s,
|
|
217
237
|
productName: i,
|
|
@@ -221,18 +241,18 @@ function he({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
|
|
|
221
241
|
})
|
|
222
242
|
}) }) })
|
|
223
243
|
}) }) });
|
|
224
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ W(f, {
|
|
225
245
|
defaultBrand: r,
|
|
226
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ U(be, {}), /* @__PURE__ */ U(C, {
|
|
227
247
|
i18nProductId: t,
|
|
228
248
|
fallbackTranslations: n,
|
|
229
249
|
children: l
|
|
230
250
|
})]
|
|
231
251
|
});
|
|
232
252
|
}
|
|
233
|
-
function
|
|
234
|
-
let e =
|
|
235
|
-
return
|
|
253
|
+
function be() {
|
|
254
|
+
let e = K();
|
|
255
|
+
return z(() => {
|
|
236
256
|
e.hash || requestAnimationFrame(() => {
|
|
237
257
|
window.scrollTo({
|
|
238
258
|
top: 0,
|
|
@@ -250,7 +270,7 @@ function ge() {
|
|
|
250
270
|
e.hash
|
|
251
271
|
]), null;
|
|
252
272
|
}
|
|
253
|
-
function
|
|
273
|
+
function xe(e) {
|
|
254
274
|
if (e instanceof Error) return e.message;
|
|
255
275
|
if (typeof e == "string") return e;
|
|
256
276
|
try {
|
|
@@ -259,9 +279,9 @@ function _e(e) {
|
|
|
259
279
|
return String(e);
|
|
260
280
|
}
|
|
261
281
|
}
|
|
262
|
-
function
|
|
263
|
-
let e =
|
|
264
|
-
return
|
|
282
|
+
function Se() {
|
|
283
|
+
let e = j(), t = K(), n = V(void 0), r = V(void 0);
|
|
284
|
+
return z(() => {
|
|
265
285
|
let i = `${t.pathname}${t.search}${t.hash}`;
|
|
266
286
|
r.current !== i && (e.emit("nav.route.changed", {
|
|
267
287
|
pathname: t.pathname,
|
|
@@ -275,7 +295,7 @@ function ve() {
|
|
|
275
295
|
t.hash,
|
|
276
296
|
t.pathname,
|
|
277
297
|
t.search
|
|
278
|
-
]),
|
|
298
|
+
]), z(() => {
|
|
279
299
|
let t = (t) => {
|
|
280
300
|
e.emit("error.runtime.caught", {
|
|
281
301
|
message: t.message || "Runtime error",
|
|
@@ -285,12 +305,12 @@ function ve() {
|
|
|
285
305
|
errorName: t.error instanceof Error ? t.error.name : void 0
|
|
286
306
|
});
|
|
287
307
|
}, n = (t) => {
|
|
288
|
-
e.emit("error.unhandledrejection", { reason:
|
|
308
|
+
e.emit("error.unhandledrejection", { reason: xe(t.reason) });
|
|
289
309
|
};
|
|
290
310
|
return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
|
|
291
311
|
window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
|
|
292
312
|
};
|
|
293
|
-
}, [e]),
|
|
313
|
+
}, [e]), z(() => {
|
|
294
314
|
b((t) => {
|
|
295
315
|
e.emit("perf.lcp.measured", {
|
|
296
316
|
metric: "LCP",
|
|
@@ -315,39 +335,39 @@ function ve() {
|
|
|
315
335
|
});
|
|
316
336
|
}, [e]), null;
|
|
317
337
|
}
|
|
318
|
-
function
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
-
e.devtools ? /* @__PURE__ */
|
|
321
|
-
e.broadcast === !1 ? null : /* @__PURE__ */
|
|
322
|
-
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */
|
|
323
|
-
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */
|
|
338
|
+
function Ce({ config: e, productSlug: t }) {
|
|
339
|
+
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Se, {}), e.enabled === !1 ? null : /* @__PURE__ */ W(H, { children: [
|
|
340
|
+
e.devtools ? /* @__PURE__ */ U(T, { enabled: !0 }) : null,
|
|
341
|
+
e.broadcast === !1 ? null : /* @__PURE__ */ U(E, {}),
|
|
342
|
+
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ U(D, { endpoint: e.backendAudit.endpoint }) : null,
|
|
343
|
+
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ U(O, {
|
|
324
344
|
siteId: e.rybbit.siteId,
|
|
325
345
|
scriptUrl: e.rybbit.scriptUrl,
|
|
326
346
|
allowlist: e.rybbit.allowlist,
|
|
327
347
|
identifyOn: e.rybbit.identifyOn,
|
|
328
348
|
rename: e.rybbit.rename
|
|
329
349
|
}) : null,
|
|
330
|
-
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */
|
|
350
|
+
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ U(k, {
|
|
331
351
|
endpoint: e.otel.endpoint,
|
|
332
352
|
serviceName: e.otel.serviceName ?? `${t}-app`,
|
|
333
353
|
flushInterval: e.otel.flushInterval
|
|
334
354
|
}) : null
|
|
335
355
|
] })] });
|
|
336
356
|
}
|
|
337
|
-
function
|
|
338
|
-
let { productName:
|
|
339
|
-
productName:
|
|
340
|
-
productSlug:
|
|
341
|
-
brandInitial:
|
|
342
|
-
tagline:
|
|
343
|
-
domain:
|
|
357
|
+
function we({ config: n, children: r, clearAuthStore: a }) {
|
|
358
|
+
let { productName: o, productSlug: f = o.toLowerCase().replace(/\s+/g, ""), tagline: m = "", domain: h, i18nProductId: g, gatewayUrls: _, authBridge: v, defaultBrand: b = "default", enablePWA: x = !0, brandInitial: S = o.charAt(0), defaultGateway: C = "workspace", enableSubscriptions: w = !0, fallbackTranslations: T, queryClientOptions: E, toasterPosition: D = "bottom-right", observability: O } = n, k = O ?? Z(f, he()), j = B(() => ({
|
|
359
|
+
productName: o,
|
|
360
|
+
productSlug: f,
|
|
361
|
+
brandInitial: S,
|
|
362
|
+
tagline: m,
|
|
363
|
+
domain: h
|
|
344
364
|
}), [
|
|
365
|
+
o,
|
|
345
366
|
f,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
]), P = H(!1), F = H(!1), I = H(null), L = H(!!b?.url), R = z(() => {
|
|
367
|
+
S,
|
|
368
|
+
m,
|
|
369
|
+
h
|
|
370
|
+
]), M = V(!1), N = V(!1), P = V(null), F = V(!!v?.url), I = R(() => {
|
|
351
371
|
if ((() => {
|
|
352
372
|
try {
|
|
353
373
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
@@ -357,26 +377,26 @@ function be({ config: n, children: i, clearAuthStore: a }) {
|
|
|
357
377
|
} catch {
|
|
358
378
|
return !1;
|
|
359
379
|
}
|
|
360
|
-
})() ||
|
|
361
|
-
|
|
380
|
+
})() || F.current || M.current) return;
|
|
381
|
+
M.current = !0, l(a);
|
|
362
382
|
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);
|
|
363
383
|
if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || r) {
|
|
364
|
-
|
|
384
|
+
M.current = !1;
|
|
365
385
|
return;
|
|
366
386
|
}
|
|
367
387
|
window.location.replace(n);
|
|
368
|
-
}, [a]),
|
|
369
|
-
globalBaseUrl:
|
|
370
|
-
isRefreshing:
|
|
371
|
-
refreshPromise:
|
|
372
|
-
}), [
|
|
373
|
-
window.location.pathname.startsWith("/auth/") || await
|
|
374
|
-
}, [
|
|
375
|
-
|
|
376
|
-
}, [
|
|
377
|
-
let t = await
|
|
388
|
+
}, [a]), L = B(() => ({
|
|
389
|
+
globalBaseUrl: _.globalBaseUrl,
|
|
390
|
+
isRefreshing: N,
|
|
391
|
+
refreshPromise: P
|
|
392
|
+
}), [_.globalBaseUrl]), H = R(async () => c(L), [L]), K = R(async () => {
|
|
393
|
+
window.location.pathname.startsWith("/auth/") || await H() || I();
|
|
394
|
+
}, [H, I]), q = R(async (e) => {
|
|
395
|
+
ee(e) ? await H() || I() : console.error("[Network] Backend unreachable:", e.message);
|
|
396
|
+
}, [H, I]), J = R(async (e) => {
|
|
397
|
+
let t = await s({
|
|
378
398
|
gateway: "global",
|
|
379
|
-
baseUrl:
|
|
399
|
+
baseUrl: _.globalBaseUrl,
|
|
380
400
|
authToken: "",
|
|
381
401
|
query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
|
|
382
402
|
variables: { token: e }
|
|
@@ -388,78 +408,78 @@ function be({ config: n, children: i, clearAuthStore: a }) {
|
|
|
388
408
|
refreshToken: n.refreshToken,
|
|
389
409
|
expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
|
|
390
410
|
};
|
|
391
|
-
}, [
|
|
392
|
-
let e = new
|
|
393
|
-
queryCache: new
|
|
394
|
-
|
|
411
|
+
}, [_.globalBaseUrl]), Y = R(() => t("organization"), []), X = B(() => {
|
|
412
|
+
let e = new le({
|
|
413
|
+
queryCache: new ce({ onError: (e) => {
|
|
414
|
+
i(e);
|
|
395
415
|
} }),
|
|
396
|
-
mutationCache: new
|
|
416
|
+
mutationCache: new se({
|
|
397
417
|
onSuccess: () => {
|
|
398
418
|
e.invalidateQueries();
|
|
399
419
|
},
|
|
400
420
|
onError: (e) => {
|
|
401
|
-
|
|
421
|
+
i(e);
|
|
402
422
|
}
|
|
403
423
|
}),
|
|
404
424
|
defaultOptions: { queries: {
|
|
405
|
-
staleTime:
|
|
406
|
-
retry:
|
|
407
|
-
refetchOnWindowFocus:
|
|
425
|
+
staleTime: E?.staleTime ?? 300 * 1e3,
|
|
426
|
+
retry: E?.retry ?? 1,
|
|
427
|
+
refetchOnWindowFocus: E?.refetchOnWindowFocus ?? !1
|
|
408
428
|
} }
|
|
409
429
|
});
|
|
410
430
|
return e;
|
|
411
|
-
}, [
|
|
412
|
-
return
|
|
413
|
-
let e =
|
|
431
|
+
}, [E]);
|
|
432
|
+
return z(() => {
|
|
433
|
+
let e = u.getInstance();
|
|
414
434
|
e.getLogger("shell") || e.getLogger("shell").addTransport(new d());
|
|
415
|
-
}, []), /* @__PURE__ */
|
|
416
|
-
value:
|
|
417
|
-
children: /* @__PURE__ */
|
|
418
|
-
appName:
|
|
419
|
-
appVersion:
|
|
420
|
-
appEnv:
|
|
421
|
-
sourceMfe:
|
|
422
|
-
children: /* @__PURE__ */
|
|
423
|
-
FallbackComponent:
|
|
424
|
-
children: /* @__PURE__ */ G
|
|
425
|
-
config:
|
|
426
|
-
productSlug:
|
|
427
|
-
}), /* @__PURE__ */
|
|
428
|
-
client:
|
|
429
|
-
children: /* @__PURE__ */
|
|
430
|
-
workspaceBaseUrl:
|
|
431
|
-
globalBaseUrl:
|
|
432
|
-
organizationId:
|
|
433
|
-
defaultGateway:
|
|
434
|
-
enableSubscriptions:
|
|
435
|
-
onAuthError:
|
|
436
|
-
onNetworkError:
|
|
437
|
-
onRefreshToken:
|
|
438
|
-
children: /* @__PURE__ */
|
|
439
|
-
bridgeUrl:
|
|
440
|
-
bridgeAllowedOrigins:
|
|
441
|
-
bridgeDebug:
|
|
442
|
-
onRefreshToken:
|
|
435
|
+
}, []), /* @__PURE__ */ U(oe, {
|
|
436
|
+
value: j,
|
|
437
|
+
children: /* @__PURE__ */ U(A, {
|
|
438
|
+
appName: f,
|
|
439
|
+
appVersion: k.appVersion,
|
|
440
|
+
appEnv: k.appEnv,
|
|
441
|
+
sourceMfe: f,
|
|
442
|
+
children: /* @__PURE__ */ U(p, {
|
|
443
|
+
FallbackComponent: re,
|
|
444
|
+
children: /* @__PURE__ */ W(G, { children: [/* @__PURE__ */ U(Ce, {
|
|
445
|
+
config: k,
|
|
446
|
+
productSlug: f
|
|
447
|
+
}), /* @__PURE__ */ U(ue, {
|
|
448
|
+
client: X,
|
|
449
|
+
children: /* @__PURE__ */ U(ie, { children: /* @__PURE__ */ U(ae, {
|
|
450
|
+
workspaceBaseUrl: _.workspaceBaseUrl,
|
|
451
|
+
globalBaseUrl: _.globalBaseUrl,
|
|
452
|
+
organizationId: Y,
|
|
453
|
+
defaultGateway: C,
|
|
454
|
+
enableSubscriptions: w,
|
|
455
|
+
onAuthError: K,
|
|
456
|
+
onNetworkError: q,
|
|
457
|
+
onRefreshToken: H,
|
|
458
|
+
children: /* @__PURE__ */ U(te, {
|
|
459
|
+
bridgeUrl: v?.url,
|
|
460
|
+
bridgeAllowedOrigins: v?.allowedOrigins,
|
|
461
|
+
bridgeDebug: v?.debug,
|
|
462
|
+
onRefreshToken: J,
|
|
443
463
|
onBridgeReady: () => {
|
|
444
|
-
|
|
464
|
+
F.current = !1;
|
|
445
465
|
},
|
|
446
466
|
onSessionExpiringSoon: () => {
|
|
447
467
|
console.warn("[Auth] Session will expire in 5 minutes");
|
|
448
468
|
},
|
|
449
469
|
onTokenExpired: () => {
|
|
450
|
-
|
|
470
|
+
I();
|
|
451
471
|
},
|
|
452
|
-
children: /* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ U(ne, {
|
|
453
473
|
syncToUrl: !0,
|
|
454
|
-
children: /* @__PURE__ */
|
|
455
|
-
i18nProductId:
|
|
456
|
-
fallbackTranslations:
|
|
457
|
-
defaultBrand:
|
|
458
|
-
productName:
|
|
459
|
-
brandInitial:
|
|
460
|
-
enablePWA:
|
|
461
|
-
toasterPosition:
|
|
462
|
-
children:
|
|
474
|
+
children: /* @__PURE__ */ U(y, { children: /* @__PURE__ */ U(ye, {
|
|
475
|
+
i18nProductId: g,
|
|
476
|
+
fallbackTranslations: T,
|
|
477
|
+
defaultBrand: b,
|
|
478
|
+
productName: o,
|
|
479
|
+
brandInitial: S,
|
|
480
|
+
enablePWA: x,
|
|
481
|
+
toasterPosition: D,
|
|
482
|
+
children: r
|
|
463
483
|
}) })
|
|
464
484
|
})
|
|
465
485
|
})
|
|
@@ -470,4 +490,4 @@ function be({ config: n, children: i, clearAuthStore: a }) {
|
|
|
470
490
|
});
|
|
471
491
|
}
|
|
472
492
|
//#endregion
|
|
473
|
-
export {
|
|
493
|
+
export { we as AppShellProvider, Z as resolveAppShellObservabilityConfig };
|
|
@@ -67,7 +67,7 @@ export declare function setActiveProfileId(profileId: string): void;
|
|
|
67
67
|
export declare function clearActiveProfileId(): void;
|
|
68
68
|
/**
|
|
69
69
|
* Get or initialize active profile.
|
|
70
|
-
*
|
|
70
|
+
* Resolution order: per-tab pointer → durable last-active hint → first profile.
|
|
71
71
|
*/
|
|
72
72
|
export declare function resolveActiveProfileId(): string | null;
|
|
73
73
|
export declare function getProfileUser(profileId: string): ProfileUser | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileStorageManager.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ProfileStorageManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"ProfileStorageManager.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ProfileStorageManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,WAAW;IAC1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