@burdenoff/fe-libs 2026.819.4 → 2026.823.1

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 (239) hide show
  1. package/README.md +66 -0
  2. package/dist/button/Button.d.ts +1 -1
  3. package/dist/chrome/AppShellLayout.d.ts +14 -0
  4. package/dist/chrome/AppShellLayout.d.ts.map +1 -1
  5. package/dist/chrome/AppShellLayout.js +13 -10
  6. package/dist/chrome/DynamicFooter.d.ts +6 -1
  7. package/dist/chrome/DynamicFooter.d.ts.map +1 -1
  8. package/dist/chrome/DynamicFooter.js +21 -20
  9. package/dist/chrome/Footer.d.ts +6 -0
  10. package/dist/chrome/Footer.d.ts.map +1 -1
  11. package/dist/chrome/Footer.js +46 -45
  12. package/dist/chrome/FooterBar.d.ts +6 -1
  13. package/dist/chrome/FooterBar.d.ts.map +1 -1
  14. package/dist/chrome/FooterBar.js +28 -26
  15. package/dist/chrome/HeaderBar.d.ts.map +1 -1
  16. package/dist/chrome/HeaderBar.js +3 -0
  17. package/dist/chrome/MobileTabBar.d.ts +26 -0
  18. package/dist/chrome/MobileTabBar.d.ts.map +1 -0
  19. package/dist/chrome/MobileTabBar.js +194 -0
  20. package/dist/chrome/NativePageTransition.d.ts +10 -0
  21. package/dist/chrome/NativePageTransition.d.ts.map +1 -0
  22. package/dist/chrome/NativePageTransition.js +19 -0
  23. package/dist/chrome/NativeTopBar.d.ts +21 -0
  24. package/dist/chrome/NativeTopBar.d.ts.map +1 -0
  25. package/dist/chrome/NativeTopBar.js +72 -0
  26. package/dist/chrome/NotificationCenter.d.ts.map +1 -1
  27. package/dist/chrome/NotificationCenter.js +70 -65
  28. package/dist/chrome/ProductSideNav.d.ts.map +1 -1
  29. package/dist/chrome/ProductSideNav.js +44 -74
  30. package/dist/chrome/SwipeNavigation.d.ts +36 -0
  31. package/dist/chrome/SwipeNavigation.d.ts.map +1 -0
  32. package/dist/chrome/SwipeNavigation.js +111 -0
  33. package/dist/chrome/index.d.ts +13 -7
  34. package/dist/chrome/index.d.ts.map +1 -1
  35. package/dist/chrome/mobileTabBar/selectTabs.d.ts +45 -0
  36. package/dist/chrome/mobileTabBar/selectTabs.d.ts.map +1 -0
  37. package/dist/chrome/mobileTabBar/selectTabs.js +28 -0
  38. package/dist/chrome/mobileTabBar/useMobileTabBarVisible.d.ts +18 -0
  39. package/dist/chrome/mobileTabBar/useMobileTabBarVisible.d.ts.map +1 -0
  40. package/dist/chrome/mobileTabBar/useMobileTabBarVisible.js +16 -0
  41. package/dist/chrome/mobileTabBar/useVisibleNavItems.d.ts +18 -0
  42. package/dist/chrome/mobileTabBar/useVisibleNavItems.d.ts.map +1 -0
  43. package/dist/chrome/mobileTabBar/useVisibleNavItems.js +41 -0
  44. package/dist/chrome/swipe/swipeMath.d.ts +25 -0
  45. package/dist/chrome/swipe/swipeMath.d.ts.map +1 -0
  46. package/dist/chrome/swipe/swipeMath.js +14 -0
  47. package/dist/chrome/swipe/swipeState.d.ts +10 -0
  48. package/dist/chrome/swipe/swipeState.d.ts.map +1 -0
  49. package/dist/chrome/swipe/swipeState.js +11 -0
  50. package/dist/chrome.js +7 -1
  51. package/dist/shared/components/DesktopUpdateToast.d.ts +9 -0
  52. package/dist/shared/components/DesktopUpdateToast.d.ts.map +1 -0
  53. package/dist/shared/components/DesktopUpdateToast.js +39 -0
  54. package/dist/shared/components/PWAInstallBanner.js +1 -1
  55. package/dist/shared/components/SSORedirectGuard.d.ts.map +1 -1
  56. package/dist/shared/components/SSORedirectGuard.js +41 -45
  57. package/dist/shared/components/index.d.ts +2 -0
  58. package/dist/shared/components/index.d.ts.map +1 -1
  59. package/dist/shared/config/authBridgeUrls.d.ts +10 -0
  60. package/dist/shared/config/authBridgeUrls.d.ts.map +1 -1
  61. package/dist/shared/config/authBridgeUrls.js +16 -12
  62. package/dist/shared/config/gatewayUrls.d.ts.map +1 -1
  63. package/dist/shared/config/gatewayUrls.js +22 -19
  64. package/dist/shared/config/index.d.ts +1 -1
  65. package/dist/shared/config/index.d.ts.map +1 -1
  66. package/dist/shared/events/index.d.ts +13 -1
  67. package/dist/shared/events/index.d.ts.map +1 -1
  68. package/dist/shared/hooks/shell/useNavRegistry.d.ts +7 -0
  69. package/dist/shared/hooks/shell/useNavRegistry.d.ts.map +1 -1
  70. package/dist/shared/hooks/usePWA.d.ts.map +1 -1
  71. package/dist/shared/hooks/usePWA.js +34 -30
  72. package/dist/shared/native/consumers.d.ts +15 -1
  73. package/dist/shared/native/consumers.d.ts.map +1 -1
  74. package/dist/shared/native/consumers.js +26 -7
  75. package/dist/shared/native/desktop.d.ts +123 -0
  76. package/dist/shared/native/desktop.d.ts.map +1 -0
  77. package/dist/shared/native/desktop.js +280 -0
  78. package/dist/shared/native/entry.d.ts +39 -0
  79. package/dist/shared/native/entry.d.ts.map +1 -0
  80. package/dist/shared/native/entry.js +13 -0
  81. package/dist/shared/native/hooks/index.d.ts +10 -0
  82. package/dist/shared/native/hooks/index.d.ts.map +1 -1
  83. package/dist/shared/native/hooks/index.js +6 -0
  84. package/dist/shared/native/hooks/useActionSheet.d.ts +63 -0
  85. package/dist/shared/native/hooks/useActionSheet.d.ts.map +1 -0
  86. package/dist/shared/native/hooks/useActionSheet.js +45 -0
  87. package/dist/shared/native/hooks/useDesktop.d.ts +15 -0
  88. package/dist/shared/native/hooks/useDesktop.d.ts.map +1 -0
  89. package/dist/shared/native/hooks/useDesktop.js +18 -0
  90. package/dist/shared/native/hooks/useDesktopUpdateState.d.ts +7 -0
  91. package/dist/shared/native/hooks/useDesktopUpdateState.d.ts.map +1 -0
  92. package/dist/shared/native/hooks/useDesktopUpdateState.js +20 -0
  93. package/dist/shared/native/hooks/useDesktopWindowState.d.ts +7 -0
  94. package/dist/shared/native/hooks/useDesktopWindowState.d.ts.map +1 -0
  95. package/dist/shared/native/hooks/useDesktopWindowState.js +9 -0
  96. package/dist/shared/native/hooks/useHaptics.d.ts +1 -0
  97. package/dist/shared/native/hooks/useHaptics.d.ts.map +1 -1
  98. package/dist/shared/native/hooks/useHaptics.js +6 -6
  99. package/dist/shared/native/hooks/useNetworkStatus.d.ts +23 -0
  100. package/dist/shared/native/hooks/useNetworkStatus.d.ts.map +1 -0
  101. package/dist/shared/native/hooks/useNetworkStatus.js +29 -0
  102. package/dist/shared/native/hooks/usePullToRefresh.d.ts +62 -0
  103. package/dist/shared/native/hooks/usePullToRefresh.d.ts.map +1 -0
  104. package/dist/shared/native/hooks/usePullToRefresh.js +84 -0
  105. package/dist/shared/native/index.d.ts +6 -1
  106. package/dist/shared/native/index.d.ts.map +1 -1
  107. package/dist/shared/native/platform.d.ts.map +1 -1
  108. package/dist/shared/native/platform.js +2 -1
  109. package/dist/shared/native/purchases.d.ts +7 -1
  110. package/dist/shared/native/purchases.d.ts.map +1 -1
  111. package/dist/shared/native/purchases.js +3 -3
  112. package/dist/shared/native/types.d.ts +136 -0
  113. package/dist/shared/native/types.d.ts.map +1 -1
  114. package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
  115. package/dist/shared/providers/AppShellProvider.js +117 -115
  116. package/dist/shared/providers/shell/ThemeProvider.d.ts.map +1 -1
  117. package/dist/shared/providers/shell/ThemeProvider.js +64 -51
  118. package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.d.ts.map +1 -1
  119. package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.js +25 -29
  120. package/dist/shared/utils/gatewayFetchRewrite.d.ts.map +1 -1
  121. package/dist/shared/utils/gatewayFetchRewrite.js +87 -84
  122. package/dist/shared-components.js +2 -1
  123. package/dist/shared-config.js +10 -10
  124. package/dist/shared-native.js +21 -13
  125. package/dist/shared.js +120 -111
  126. package/dist/shell-native/actionSheet.d.ts +7 -0
  127. package/dist/shell-native/actionSheet.d.ts.map +1 -0
  128. package/dist/shell-native/actionSheet.js +26 -0
  129. package/dist/shell-native/app-lifecycle.d.ts +4 -0
  130. package/dist/shell-native/app-lifecycle.d.ts.map +1 -0
  131. package/dist/shell-native/app-lifecycle.js +12 -0
  132. package/dist/shell-native/auth-navigation.d.ts +4 -0
  133. package/dist/shell-native/auth-navigation.d.ts.map +1 -0
  134. package/dist/shell-native/auth-navigation.js +95 -0
  135. package/dist/shell-native/back-button.d.ts +8 -0
  136. package/dist/shell-native/back-button.d.ts.map +1 -0
  137. package/dist/shell-native/back-button.js +49 -0
  138. package/dist/shell-native/boot.d.ts +10 -0
  139. package/dist/shell-native/boot.d.ts.map +1 -0
  140. package/dist/shell-native/boot.js +65 -0
  141. package/dist/shell-native/bridge.d.ts +7 -0
  142. package/dist/shell-native/bridge.d.ts.map +1 -0
  143. package/dist/shell-native/bridge.js +30 -0
  144. package/dist/shell-native/browser.d.ts +12 -0
  145. package/dist/shell-native/browser.d.ts.map +1 -0
  146. package/dist/shell-native/browser.js +45 -0
  147. package/dist/shell-native/capacitor-config.d.ts +21 -0
  148. package/dist/shell-native/capacitor-config.d.ts.map +1 -0
  149. package/dist/shell-native/capacitor-config.js +103 -0
  150. package/dist/shell-native/clipboard.d.ts +3 -0
  151. package/dist/shell-native/clipboard.d.ts.map +1 -0
  152. package/dist/shell-native/clipboard.js +26 -0
  153. package/dist/shell-native/deep-link.d.ts +19 -0
  154. package/dist/shell-native/deep-link.d.ts.map +1 -0
  155. package/dist/shell-native/deep-link.js +53 -0
  156. package/dist/shell-native/desktop-bridge.d.ts +14 -0
  157. package/dist/shell-native/desktop-bridge.d.ts.map +1 -0
  158. package/dist/shell-native/desktop-bridge.js +17 -0
  159. package/dist/shell-native/device.d.ts +4 -0
  160. package/dist/shell-native/device.d.ts.map +1 -0
  161. package/dist/shell-native/device.js +27 -0
  162. package/dist/shell-native/dialog.d.ts +4 -0
  163. package/dist/shell-native/dialog.d.ts.map +1 -0
  164. package/dist/shell-native/dialog.js +13 -0
  165. package/dist/shell-native/feedback.d.ts +6 -0
  166. package/dist/shell-native/feedback.d.ts.map +1 -0
  167. package/dist/shell-native/feedback.js +29 -0
  168. package/dist/shell-native/index.d.ts +54 -0
  169. package/dist/shell-native/index.d.ts.map +1 -0
  170. package/dist/shell-native/keyboard.d.ts +15 -0
  171. package/dist/shell-native/keyboard.d.ts.map +1 -0
  172. package/dist/shell-native/keyboard.js +42 -0
  173. package/dist/shell-native/network.d.ts +9 -0
  174. package/dist/shell-native/network.d.ts.map +1 -0
  175. package/dist/shell-native/network.js +40 -0
  176. package/dist/shell-native/ota.d.ts +3 -0
  177. package/dist/shell-native/ota.d.ts.map +1 -0
  178. package/dist/shell-native/ota.js +21 -0
  179. package/dist/shell-native/platform.d.ts +21 -0
  180. package/dist/shell-native/platform.d.ts.map +1 -0
  181. package/dist/shell-native/platform.js +51 -0
  182. package/dist/shell-native/preview.d.ts +18 -0
  183. package/dist/shell-native/preview.d.ts.map +1 -0
  184. package/dist/shell-native/preview.js +124 -0
  185. package/dist/shell-native/push.d.ts +14 -0
  186. package/dist/shell-native/push.d.ts.map +1 -0
  187. package/dist/shell-native/push.js +62 -0
  188. package/dist/shell-native/pwa.d.ts +14 -0
  189. package/dist/shell-native/pwa.d.ts.map +1 -0
  190. package/dist/shell-native/pwa.js +49 -0
  191. package/dist/shell-native/service-worker.d.ts +5 -0
  192. package/dist/shell-native/service-worker.d.ts.map +1 -0
  193. package/dist/shell-native/service-worker.js +144 -0
  194. package/dist/shell-native/share.d.ts +4 -0
  195. package/dist/shell-native/share.d.ts.map +1 -0
  196. package/dist/shell-native/share.js +19 -0
  197. package/dist/shell-native/splash.d.ts +16 -0
  198. package/dist/shell-native/splash.d.ts.map +1 -0
  199. package/dist/shell-native/splash.js +25 -0
  200. package/dist/shell-native/system-bars.d.ts +24 -0
  201. package/dist/shell-native/system-bars.d.ts.map +1 -0
  202. package/dist/shell-native/system-bars.js +49 -0
  203. package/dist/shell-native/toast.d.ts +4 -0
  204. package/dist/shell-native/toast.d.ts.map +1 -0
  205. package/dist/shell-native/toast.js +16 -0
  206. package/dist/shell-native/types.d.ts +292 -0
  207. package/dist/shell-native/types.d.ts.map +1 -0
  208. package/dist/shell-native/web-manifest.d.ts +36 -0
  209. package/dist/shell-native/web-manifest.d.ts.map +1 -0
  210. package/dist/shell-native/web-manifest.js +55 -0
  211. package/dist/shell-native.d.ts +2 -0
  212. package/dist/shell-native.js +29 -0
  213. package/dist/ui/action-sheet.d.ts +29 -0
  214. package/dist/ui/action-sheet.d.ts.map +1 -0
  215. package/dist/ui/action-sheet.js +53 -0
  216. package/dist/ui/badge.d.ts +1 -1
  217. package/dist/ui/button.d.ts +1 -1
  218. package/dist/ui/index.d.ts +6 -0
  219. package/dist/ui/index.d.ts.map +1 -1
  220. package/dist/ui/native-welcome.d.ts +61 -0
  221. package/dist/ui/native-welcome.d.ts.map +1 -0
  222. package/dist/ui/native-welcome.js +152 -0
  223. package/dist/ui/offline-banner.d.ts +22 -0
  224. package/dist/ui/offline-banner.d.ts.map +1 -0
  225. package/dist/ui/offline-banner.js +34 -0
  226. package/dist/ui/pull-to-refresh.d.ts +29 -0
  227. package/dist/ui/pull-to-refresh.d.ts.map +1 -0
  228. package/dist/ui/pull-to-refresh.js +44 -0
  229. package/dist/ui/pwa-update-toast.d.ts +34 -0
  230. package/dist/ui/pwa-update-toast.d.ts.map +1 -0
  231. package/dist/ui/pwa-update-toast.js +43 -0
  232. package/dist/ui/select.d.ts +38 -0
  233. package/dist/ui/select.d.ts.map +1 -1
  234. package/dist/ui/select.js +162 -61
  235. package/dist/ui.js +40 -35
  236. package/package.json +93 -4
  237. package/src/shared/styles/app-shell.css +3 -0
  238. package/src/shared/styles/native.css +577 -0
  239. package/dist/node_modules/@capacitor/core/dist/index.js +0 -268
@@ -1,13 +1,14 @@
1
- import { createContext as e, use as t, useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
2
- import { jsx as o } from "react/jsx-runtime";
1
+ import { desktopSetTheme as e } from "../../native/desktop.js";
2
+ import { createContext as t, use as n, useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
3
+ import { jsx as s } from "react/jsx-runtime";
3
4
  //#region src/shared/providers/shell/ThemeProvider.tsx
4
- var s = new Set([
5
+ var c = new Set([
5
6
  "dark",
6
7
  "forest",
7
8
  "ocean",
8
9
  "sunset",
9
10
  "high-contrast"
10
- ]), c = [
11
+ ]), l = [
11
12
  {
12
13
  value: "light",
13
14
  label: "Light",
@@ -38,8 +39,8 @@ var s = new Set([
38
39
  label: "High Contrast",
39
40
  family: "dark"
40
41
  }
41
- ], l = (e) => s.has(e) ? "dark" : "light";
42
- function u(e) {
42
+ ], u = (e) => c.has(e) ? "dark" : "light";
43
+ function d(e) {
43
44
  let t = /^#?([0-9a-f]{6})$/i.exec(e.trim());
44
45
  if (!t) return 0;
45
46
  let n = parseInt(t[1], 16), r = [
@@ -52,8 +53,8 @@ function u(e) {
52
53
  });
53
54
  return .2126 * r[0] + .7152 * r[1] + .0722 * r[2];
54
55
  }
55
- var d = (e) => u(e) > .45;
56
- function f(e, t) {
56
+ var f = (e) => d(e) > .45;
57
+ function p(e, t) {
57
58
  if (typeof window > "u") return t;
58
59
  try {
59
60
  let n = localStorage.getItem(e);
@@ -62,63 +63,75 @@ function f(e, t) {
62
63
  return t;
63
64
  }
64
65
  }
65
- var p = e(null);
66
- function m({ children: e, defaultMode: t = "system", defaultBrand: s = "default", defaultDensity: c = "comfortable", defaultTypography: u = "default", defaultGlass: m = "full", storageKey: h = "burdenoff-theme" }) {
67
- let g = (e, t) => typeof window > "u" ? t : localStorage.getItem(`${h}-${e}`) || t, [_, v] = a(() => g("mode", t)), [y, b] = a(() => g("brand", s)), [x, S] = a(() => g("density", c)), [C, w] = a(() => g("typography", u)), [T, E] = a(() => g("glass", m)), [D, O] = a(() => g("reduce-motion", "") === "1"), [k, A] = a(() => f(`${h}-custom-list`, [])), [j, M] = a(() => g("active-custom", "") || null), N = i(() => _ === "custom" ? k.find((e) => e.id === j) ?? null : null, [
68
- _,
66
+ var m = t(null);
67
+ function h({ children: t, defaultMode: n = "system", defaultBrand: c = "default", defaultDensity: l = "comfortable", defaultTypography: d = "default", defaultGlass: h = "full", storageKey: g = "burdenoff-theme" }) {
68
+ let _ = (e, t) => typeof window > "u" ? t : localStorage.getItem(`${g}-${e}`) || t, [v, y] = o(() => _("mode", n)), [b, x] = o(() => _("brand", c)), [ee, S] = o(() => _("density", l)), [C, w] = o(() => _("typography", d)), [T, E] = o(() => _("glass", h)), [D, O] = o(() => _("reduce-motion", "") === "1"), [k, A] = o(() => p(`${g}-custom-list`, [])), [j, M] = o(() => _("active-custom", "") || null), N = a(() => v === "custom" ? k.find((e) => e.id === j) ?? null : null, [
69
+ v,
69
70
  k,
70
71
  j
71
- ]), [P, F] = a(() => _ === "custom" ? "light" : _ === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : _);
72
- r(() => {
73
- if (_ === "system") {
72
+ ]), [P, F] = o(() => v === "custom" ? "light" : v === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : v);
73
+ i(() => {
74
+ if (v === "system") {
74
75
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => F(e.matches ? "dark" : "light");
75
76
  return e.addEventListener("change", t), F(e.matches ? "dark" : "light"), () => e.removeEventListener("change", t);
76
77
  }
77
- F(_ === "custom" ? N?.base ?? "light" : _);
78
- }, [_, N]);
79
- let I = l(P), L = N?.density ?? x, R = N?.typography ?? C, z = N?.glass ?? T, B = N?.reduceMotion ?? D;
80
- r(() => {
81
- let e = document.documentElement;
82
- if (e.setAttribute("data-theme", P), e.setAttribute("data-brand", y), e.setAttribute("data-density", L), e.setAttribute("data-typography", R), e.setAttribute("data-glass", z), e.toggleAttribute("data-reduce-motion", B), I === "dark" ? e.classList.add("dark") : e.classList.remove("dark"), N) {
83
- let t = N.accent;
84
- e.style.setProperty("--color-action-primary-bg", t), e.style.setProperty("--color-action-primary-bgHover", `color-mix(in oklab, ${t} 84%, black)`), e.style.setProperty("--color-action-primary-bgActive", `color-mix(in oklab, ${t} 70%, black)`), d(t) ? e.style.setProperty("--color-action-primary-text", "#0a0a0a") : e.style.removeProperty("--color-action-primary-text");
85
- } else e.style.removeProperty("--color-action-primary-bg"), e.style.removeProperty("--color-action-primary-bgHover"), e.style.removeProperty("--color-action-primary-bgActive"), e.style.removeProperty("--color-action-primary-text");
78
+ F(v === "custom" ? N?.base ?? "light" : v);
79
+ }, [v, N]);
80
+ let I = u(P), L = N?.density ?? ee, R = N?.typography ?? C, z = N?.glass ?? T, B = N?.reduceMotion ?? D;
81
+ i(() => {
82
+ let t = document.documentElement;
83
+ if (t.setAttribute("data-theme", P), t.setAttribute("data-brand", b), t.setAttribute("data-density", L), t.setAttribute("data-typography", R), t.setAttribute("data-glass", z), t.toggleAttribute("data-reduce-motion", B), I === "dark" ? t.classList.add("dark") : t.classList.remove("dark"), N) {
84
+ let e = N.accent;
85
+ t.style.setProperty("--color-action-primary-bg", e), t.style.setProperty("--color-action-primary-bgHover", `color-mix(in oklab, ${e} 84%, black)`), t.style.setProperty("--color-action-primary-bgActive", `color-mix(in oklab, ${e} 70%, black)`), f(e) ? t.style.setProperty("--color-action-primary-text", "#0a0a0a") : t.style.removeProperty("--color-action-primary-text");
86
+ } else t.style.removeProperty("--color-action-primary-bg"), t.style.removeProperty("--color-action-primary-bgHover"), t.style.removeProperty("--color-action-primary-bgActive"), t.style.removeProperty("--color-action-primary-text");
87
+ let n = () => {
88
+ let n = getComputedStyle(t).getPropertyValue("--color-bg-canvas").trim();
89
+ e({
90
+ scheme: I === "dark" ? "dark" : "light",
91
+ backgroundColor: n || void 0
92
+ });
93
+ };
94
+ if (typeof requestAnimationFrame == "function") {
95
+ let e = requestAnimationFrame(n);
96
+ return () => cancelAnimationFrame(e);
97
+ }
98
+ n();
86
99
  }, [
87
100
  P,
88
101
  I,
89
- y,
102
+ b,
90
103
  L,
91
104
  R,
92
105
  z,
93
106
  B,
94
107
  N
95
108
  ]);
96
- let V = n((e, t) => localStorage.setItem(`${h}-${e}`, t), [h]), H = n((e) => {
97
- v(e), V("mode", e);
98
- }, [V]), U = n((e) => {
99
- b(e), V("brand", e);
100
- }, [V]), W = n((e) => {
109
+ let V = r((e, t) => localStorage.setItem(`${g}-${e}`, t), [g]), H = r((e) => {
110
+ y(e), V("mode", e);
111
+ }, [V]), U = r((e) => {
112
+ x(e), V("brand", e);
113
+ }, [V]), W = r((e) => {
101
114
  S(e), V("density", e);
102
- }, [V]), G = n((e) => {
115
+ }, [V]), G = r((e) => {
103
116
  w(e), V("typography", e);
104
- }, [V]), K = n((e) => {
117
+ }, [V]), K = r((e) => {
105
118
  E(e), V("glass", e);
106
- }, [V]), q = n((e) => {
119
+ }, [V]), q = r((e) => {
107
120
  O(e), V("reduce-motion", e ? "1" : "0");
108
- }, [V]), J = n((e) => {
109
- A(e), localStorage.setItem(`${h}-custom-list`, JSON.stringify(e));
110
- }, [h]), Y = n((e) => {
121
+ }, [V]), J = r((e) => {
122
+ A(e), localStorage.setItem(`${g}-custom-list`, JSON.stringify(e));
123
+ }, [g]), Y = r((e) => {
111
124
  let t = typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `ct-${Date.now()}-${Math.floor(performance.now())}`, n = {
112
125
  ...e,
113
126
  id: t
114
127
  };
115
128
  return J([...k, n]), n;
116
- }, [k, J]), X = n((e, t) => {
129
+ }, [k, J]), X = r((e, t) => {
117
130
  J(k.map((n) => n.id === e ? {
118
131
  ...n,
119
132
  ...t
120
133
  } : n));
121
- }, [k, J]), Z = n((e) => {
134
+ }, [k, J]), Z = r((e) => {
122
135
  J(k.filter((t) => t.id !== e)), j === e && (M(null), V("active-custom", ""), H("system"));
123
136
  }, [
124
137
  k,
@@ -126,13 +139,13 @@ function m({ children: e, defaultMode: t = "system", defaultBrand: s = "default"
126
139
  j,
127
140
  V,
128
141
  H
129
- ]), Q = n((e) => {
142
+ ]), Q = r((e) => {
130
143
  M(e), V("active-custom", e), H("custom");
131
- }, [V, H]), $ = n(() => {
144
+ }, [V, H]), $ = r(() => {
132
145
  H(I === "light" ? "dark" : "light");
133
- }, [I, H]), ee = i(() => ({
134
- mode: _,
135
- brand: y,
146
+ }, [I, H]), te = a(() => ({
147
+ mode: v,
148
+ brand: b,
136
149
  density: L,
137
150
  typography: R,
138
151
  glass: z,
@@ -154,8 +167,8 @@ function m({ children: e, defaultMode: t = "system", defaultBrand: s = "default"
154
167
  colorMode: I,
155
168
  toggleColorMode: $
156
169
  }), [
157
- _,
158
- y,
170
+ v,
171
+ b,
159
172
  L,
160
173
  R,
161
174
  z,
@@ -176,15 +189,15 @@ function m({ children: e, defaultMode: t = "system", defaultBrand: s = "default"
176
189
  Q,
177
190
  $
178
191
  ]);
179
- return /* @__PURE__ */ o(p.Provider, {
180
- value: ee,
181
- children: e
192
+ return /* @__PURE__ */ s(m.Provider, {
193
+ value: te,
194
+ children: t
182
195
  });
183
196
  }
184
- function h() {
185
- let e = t(p);
197
+ function g() {
198
+ let e = n(m);
186
199
  if (!e) throw Error("useTheme must be used within a ThemeProvider");
187
200
  return e;
188
201
  }
189
202
  //#endregion
190
- export { c as THEME_OPTIONS, m as ThemeProvider, h as useTheme };
203
+ export { l as THEME_OPTIONS, h as ThemeProvider, g as useTheme };
@@ -1 +1 @@
1
- {"version":3,"file":"useSsoDepositBootGuard.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts"],"names":[],"mappings":"AA+BA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CA4E7C"}
1
+ {"version":3,"file":"useSsoDepositBootGuard.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CA4E7C"}
@@ -2,51 +2,47 @@ import { resolveGatewayUrls as e } from "../../../config/gatewayUrls.js";
2
2
  import { resolveAuthBridgeConfig as t } from "../../../config/authBridgeUrls.js";
3
3
  import { resolveActiveProfileId as n } from "../ProfileStorageManager.js";
4
4
  import { isLocalDevSsoHost as r, isSharedSsoCookieDomain as i } from "../../../utils/authCookie.js";
5
- import { beginSsoNavigation as a, buildSsoDepositUrl as o, consumeSsoDepositMarker as s, markSsoDepositPending as c, mintSsoSessionTokens as l, shouldAttemptSsoDeposit as u } from "../../../utils/ssoDeposit.js";
6
- import { useEffect as d } from "react";
5
+ import { isElectron as a, isNative as o } from "../../../native/platform.js";
6
+ import { beginSsoNavigation as s, buildSsoDepositUrl as c, consumeSsoDepositMarker as l, markSsoDepositPending as u, mintSsoSessionTokens as d, shouldAttemptSsoDeposit as f } from "../../../utils/ssoDeposit.js";
7
+ import { useEffect as p } from "react";
7
8
  //#region src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts
8
- var f = 2500;
9
- function p() {
10
- if (typeof window > "u") return !1;
11
- try {
12
- let e = window.Capacitor;
13
- if (typeof e?.isNativePlatform == "function" && e.isNativePlatform()) return !0;
14
- } catch {}
15
- return typeof navigator < "u" && /Electron/i.test(navigator.userAgent || "");
9
+ var m = 2500;
10
+ function h() {
11
+ return o() || a();
16
12
  }
17
- function m() {
18
- d(() => {
13
+ function g() {
14
+ p(() => {
19
15
  if (typeof window > "u") return;
20
- let d = n();
21
- if (s(d) || !d || p() || r() || i() || window.location.pathname.startsWith("/auth/")) return;
22
- let m;
16
+ let a = n();
17
+ if (l(a) || !a || h() || r() || i() || window.location.pathname.startsWith("/auth/")) return;
18
+ let o;
23
19
  try {
24
20
  let e = t();
25
- m = new URL(e.url).origin;
21
+ o = new URL(e.url).origin;
26
22
  } catch {
27
23
  return;
28
24
  }
29
- if (m === window.location.origin || !u(d)) return;
30
- let h = setTimeout(async () => {
25
+ if (o === window.location.origin || !f(a)) return;
26
+ let p = setTimeout(async () => {
31
27
  try {
32
- if (n() !== d || window.location.pathname.startsWith("/auth/")) return;
33
- let t = localStorage.getItem(`bf-p-${d}-tokens`), r = localStorage.getItem(`bf-p-${d}-user`);
28
+ if (n() !== a || window.location.pathname.startsWith("/auth/")) return;
29
+ let t = localStorage.getItem(`bf-p-${a}-tokens`), r = localStorage.getItem(`bf-p-${a}-user`);
34
30
  if (!t || !r) return;
35
31
  let i = JSON.parse(t);
36
32
  if (!(i.accessToken && typeof i.expiresAt == "number" && i.expiresAt - Date.now() > 6e4) || !i.refreshToken) return;
37
- c(d);
38
- let { globalBaseUrl: s } = e(), { tokens: u } = await l(`${s}/global/graphql`, i.refreshToken);
39
- if (!u) return;
40
- a(), window.location.replace(o(m, window.location.href, {
41
- profileId: d,
42
- tokens: JSON.stringify(u),
33
+ u(a);
34
+ let { globalBaseUrl: l } = e(), { tokens: f } = await d(`${l}/global/graphql`, i.refreshToken);
35
+ if (!f) return;
36
+ s(), window.location.replace(c(o, window.location.href, {
37
+ profileId: a,
38
+ tokens: JSON.stringify(f),
43
39
  user: r,
44
40
  profiles: localStorage.getItem("bf-profiles")
45
41
  }));
46
42
  } catch {}
47
- }, f);
48
- return () => clearTimeout(h);
43
+ }, m);
44
+ return () => clearTimeout(p);
49
45
  }, []);
50
46
  }
51
47
  //#endregion
52
- export { m as useSsoDepositBootGuard };
48
+ export { g as useSsoDepositBootGuard };
@@ -1 +1 @@
1
- {"version":3,"file":"gatewayFetchRewrite.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/gatewayFetchRewrite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,YAAY,CAAC;CACrB;AAyGD,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAkPD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,kBAAkB,EAAE,EACpC,aAAa,CAAC,EAAE,YAAY,GAC3B,YAAY,CAad;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAET;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,YAAY,EACnB,QAAQ,CAAC,EAAE,0BAA0B,GACpC,IAAI,CA6HN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAyB,GAAG,IAAI,CAQtE"}
1
+ {"version":3,"file":"gatewayFetchRewrite.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/gatewayFetchRewrite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,YAAY,CAAC;CACrB;AA0GD,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAkPD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,kBAAkB,EAAE,EACpC,aAAa,CAAC,EAAE,YAAY,GAC3B,YAAY,CAmBd;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAET;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,YAAY,EACnB,QAAQ,CAAC,EAAE,0BAA0B,GACpC,IAAI,CA6HN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAyB,GAAG,IAAI,CAQtE"}
@@ -1,39 +1,40 @@
1
- import { ALL_PRODUCT_DOMAINS as e } from "../config/gatewayUrls.js";
1
+ import { getDesktopGatewayBases as e } from "../native/desktop.js";
2
+ import { ALL_PRODUCT_DOMAINS as t } from "../config/gatewayUrls.js";
2
3
  //#region src/shared/utils/gatewayFetchRewrite.ts
3
- var t = {
4
+ var n = {
4
5
  globalBase: "https://graphql.burdenoff.com",
5
6
  workspaceBase: "https://graphqlworkspaces.burdenoff.com"
6
7
  };
7
- function n(e) {
8
+ function r(e) {
8
9
  let t = `https://${e}`;
9
10
  return {
10
11
  globalBase: t,
11
12
  workspaceBase: t
12
13
  };
13
14
  }
14
- var r = [
15
- ...e.flatMap((e) => [{
15
+ var i = [
16
+ ...t.flatMap((e) => [{
16
17
  hostname: `app.${e}`,
17
- bases: t
18
+ bases: n
18
19
  }, {
19
20
  hostname: `alphaapp.${e}`,
20
- bases: n(`alphaapp.${e}`)
21
+ bases: r(`alphaapp.${e}`)
21
22
  }]),
22
23
  {
23
24
  hostname: "admin.burdenoff.com",
24
- bases: t
25
+ bases: n
25
26
  },
26
27
  {
27
28
  hostname: "alphaadmin.burdenoff.com",
28
- bases: n("alphaadmin.burdenoff.com")
29
+ bases: r("alphaadmin.burdenoff.com")
29
30
  }
30
- ], i = {
31
+ ], a = {
31
32
  globalBase: "https://gw-global.local.burdenoff.com",
32
33
  workspaceBase: "https://gw-wspace.local.burdenoff.com"
33
- }, a = 15e3, o = 1e4, s = {
34
+ }, o = 15e3, s = 1e4, c = {
34
35
  global: "https://alphagraphql.burdenoff.com/__cf-access-prime",
35
36
  workspace: "https://alphagraphqlworkspaces.burdenoff.com/__cf-access-prime"
36
- }, c = ["global", "workspace"], l = "bf-alpha-api-access-primed", u = 1200 * 60 * 1e3, d = "bf-alpha-api-access-prime-attempted", f = 15e3, p = new Set([
37
+ }, l = ["global", "workspace"], u = "bf-alpha-api-access-primed", d = 1200 * 60 * 1e3, f = "bf-alpha-api-access-prime-attempted", p = 15e3, m = new Set([
37
38
  "/auth/oauth/callback",
38
39
  "/auth/session-bridge",
39
40
  "/auth/sso-callback",
@@ -41,11 +42,11 @@ var r = [
41
42
  "/auth/sso-deposit",
42
43
  "/auth/sso-relay",
43
44
  "/auth/sso/callback"
44
- ]), m = [
45
+ ]), h = [
45
46
  "traceparent",
46
47
  "tracestate",
47
48
  "baggage"
48
- ], h = [
49
+ ], g = [
49
50
  "authorization",
50
51
  "accept-language",
51
52
  "x-org-id",
@@ -55,53 +56,53 @@ var r = [
55
56
  "x-geo-currency",
56
57
  "x-geo-timezone"
57
58
  ];
58
- function g() {
59
+ function _() {
59
60
  let e = globalThis;
60
61
  return e.__boffGraphQLResponseCache ||= /* @__PURE__ */ new Map(), e.__boffGraphQLResponseCache;
61
62
  }
62
- function _() {
63
- g().clear();
64
- }
65
- function v(t) {
66
- return t === "alphaadmin.burdenoff.com" || e.some((e) => t === `alphaapp.${e}`);
63
+ function v() {
64
+ _().clear();
67
65
  }
68
66
  function y(e) {
67
+ return e === "alphaadmin.burdenoff.com" || t.some((t) => e === `alphaapp.${t}`);
68
+ }
69
+ function b(e) {
69
70
  try {
70
71
  return new URL(e.globalBase).hostname === "alphagraphql.burdenoff.com" && new URL(e.workspaceBase).hostname === "alphagraphqlworkspaces.burdenoff.com";
71
72
  } catch {
72
73
  return !1;
73
74
  }
74
75
  }
75
- var b = "cf_primed";
76
- function x() {
76
+ var x = "cf_primed";
77
+ function S() {
77
78
  try {
78
79
  return globalThis.sessionStorage ?? null;
79
80
  } catch {
80
81
  return null;
81
82
  }
82
83
  }
83
- function S(e) {
84
- return `${l}-${e}-at`;
85
- }
86
84
  function C(e) {
87
- return `${d}-${e}-at`;
85
+ return `${u}-${e}-at`;
88
86
  }
89
87
  function w(e) {
88
+ return `${f}-${e}-at`;
89
+ }
90
+ function T(e) {
90
91
  try {
91
- return c.find((t) => e.getItem(C(t)) !== null) ?? null;
92
+ return l.find((t) => e.getItem(w(t)) !== null) ?? null;
92
93
  } catch {
93
94
  return null;
94
95
  }
95
96
  }
96
- function T(e, t, n) {
97
- let r = e.getItem(S(t)), i = r ? Number(r) : 0;
98
- return Number.isFinite(i) && n - i < u;
99
- }
100
97
  function E(e, t, n) {
101
98
  let r = e.getItem(C(t)), i = r ? Number(r) : 0;
102
- return Number.isFinite(i) && n - i < f;
99
+ return Number.isFinite(i) && n - i < d;
100
+ }
101
+ function D(e, t, n) {
102
+ let r = e.getItem(w(t)), i = r ? Number(r) : 0;
103
+ return Number.isFinite(i) && n - i < p;
103
104
  }
104
- function D() {
105
+ function O() {
105
106
  try {
106
107
  let e = new URL(window.location.href || window.location.origin);
107
108
  return e.hash = "", e.toString();
@@ -109,38 +110,38 @@ function D() {
109
110
  return window.location.origin;
110
111
  }
111
112
  }
112
- function O() {
113
- return window.location.hash ? !0 : p.has(window.location.pathname);
113
+ function k() {
114
+ return window.location.hash ? !0 : m.has(window.location.pathname);
114
115
  }
115
- function k(e, t) {
116
+ function A(e, t) {
116
117
  let n;
117
118
  try {
118
119
  n = new URL(window.location.href);
119
120
  } catch {
120
121
  return null;
121
122
  }
122
- let r = n.searchParams.get(b), i = r === "global" ? "global" : r === "workspace" ? "workspace" : r === "1" ? w(e) ?? "global" : null;
123
+ let r = n.searchParams.get(x), i = r === "global" ? "global" : r === "workspace" ? "workspace" : r === "1" ? T(e) ?? "global" : null;
123
124
  if (!i) return null;
124
- n.searchParams.delete(b);
125
+ n.searchParams.delete(x);
125
126
  try {
126
- e.setItem(S(i), String(t)), e.removeItem(C(i));
127
+ e.setItem(C(i), String(t)), e.removeItem(w(i));
127
128
  } catch {}
128
129
  return window.history.replaceState(window.history.state, "", n.toString()), i;
129
130
  }
130
- function A(e) {
131
- if (typeof window > "u" || !y(e) || !v(window.location.hostname.toLowerCase())) return !1;
132
- let t = x();
131
+ function j(e) {
132
+ if (typeof window > "u" || !b(e) || !y(window.location.hostname.toLowerCase())) return !1;
133
+ let t = S();
133
134
  if (!t) return !1;
134
135
  let n = Date.now();
135
- if (k(t, n), O()) return !1;
136
- let r = c.find((e) => !T(t, e, n));
137
- if (!r || E(t, r, n)) return !1;
136
+ if (A(t, n), k()) return !1;
137
+ let r = l.find((e) => !E(t, e, n));
138
+ if (!r || D(t, r, n)) return !1;
138
139
  try {
139
- t.setItem(C(r), String(n));
140
+ t.setItem(w(r), String(n));
140
141
  } catch {}
141
- let i = new URL(D());
142
- r === "workspace" && i.searchParams.set(b, r);
143
- let a = new URL(s[r]);
142
+ let i = new URL(O());
143
+ r === "workspace" && i.searchParams.set(x, r);
144
+ let a = new URL(c[r]);
144
145
  a.searchParams.set("returnTo", i.toString());
145
146
  try {
146
147
  return window.location.replace(a.toString()), !0;
@@ -148,25 +149,25 @@ function A(e) {
148
149
  return !1;
149
150
  }
150
151
  }
151
- function j(e) {
152
+ function M(e) {
152
153
  return typeof e.query == "string" ? /\bquery\b/.test(e.query) && !/\bmutation\b|\bsubscription\b/.test(e.query) : !1;
153
154
  }
154
- function M(e) {
155
+ function N(e) {
155
156
  return typeof e.operationName == "string" && e.operationName ? e.operationName : typeof e.query == "string" ? e.query.match(/(?:query|mutation|subscription)\s+([A-Za-z0-9_]+)/)?.[1] ?? null : null;
156
157
  }
157
- function N(e) {
158
- return Object.fromEntries(h.map((t) => [t, e.get(t) ?? ""]));
158
+ function P(e) {
159
+ return Object.fromEntries(g.map((t) => [t, e.get(t) ?? ""]));
159
160
  }
160
- function P(e, t) {
161
- let n = M(t);
162
- return !n || !j(t) ? null : JSON.stringify({
161
+ function F(e, t) {
162
+ let n = N(t);
163
+ return !n || !M(t) ? null : JSON.stringify({
163
164
  url: e.url,
164
- headers: N(e.headers),
165
+ headers: P(e.headers),
165
166
  operationName: n,
166
167
  variables: t.variables ?? null
167
168
  });
168
169
  }
169
- function F(e) {
170
+ function I(e) {
170
171
  try {
171
172
  let t = JSON.parse(e);
172
173
  return Array.isArray(t) ? t : t && typeof t == "object" ? [t] : null;
@@ -174,57 +175,59 @@ function F(e) {
174
175
  return null;
175
176
  }
176
177
  }
177
- function I(e, t) {
178
+ function L(e, t) {
178
179
  return new Response(JSON.stringify(t ? e : e[0]), {
179
180
  status: 200,
180
181
  headers: { "content-type": "application/json" }
181
182
  });
182
183
  }
183
- function L() {
184
- return typeof performance < "u" && performance.now() < o;
184
+ function R() {
185
+ return typeof performance < "u" && performance.now() < s;
185
186
  }
186
- function R(e) {
187
+ function z(e) {
187
188
  let t = new Headers(e.headers), n = !1;
188
- for (let e of m) t.has(e) && (t.delete(e), n = !0);
189
+ for (let e of h) t.has(e) && (t.delete(e), n = !0);
189
190
  return n ? new Request(e, { headers: t }) : e;
190
191
  }
191
- function z(e, t) {
192
- let n = window.location.hostname.toLowerCase(), a = [...r, ...e ?? []];
193
- for (let e of a) if (n === e.hostname) return e.bases;
194
- return t ?? i;
192
+ function B(t, n) {
193
+ let r = e();
194
+ if (r) return r;
195
+ let o = window.location.hostname.toLowerCase(), s = [...i, ...t ?? []];
196
+ for (let e of s) if (o === e.hostname) return e.bases;
197
+ return n ?? a;
195
198
  }
196
- function B(e, t) {
199
+ function V(e, t) {
197
200
  let { globalBase: n, workspaceBase: r } = e;
198
201
  if (!n || !r) return;
199
- let i = A(e), o = globalThis.fetch.bind(globalThis), s = window.location.origin, c = new Set([s, "https://gw-global.local.burdenoff.com"]), l = new Set([s, "https://gw-wspace.local.burdenoff.com"]), u = (e) => /(?:^|\/)global\/graphql$/.test(e) ? "/global/graphql" : /(?:^|\/)workspaces\/graphql$/.test(e) ? "/workspaces/graphql" : "", d = (e) => {
202
+ let i = j(e), a = globalThis.fetch.bind(globalThis), s = window.location.origin, c = new Set([s, "https://gw-global.local.burdenoff.com"]), l = new Set([s, "https://gw-wspace.local.burdenoff.com"]), u = (e) => /(?:^|\/)global\/graphql$/.test(e) ? "/global/graphql" : /(?:^|\/)workspaces\/graphql$/.test(e) ? "/workspaces/graphql" : "", d = (e) => {
200
203
  let t = new URL(e, window.location.origin), i = u(t.pathname);
201
204
  return i === "/global/graphql" && c.has(t.origin) ? `${n}${i}${t.search}${t.hash}` : i === "/workspaces/graphql" && l.has(t.origin) ? `${r}${i}${t.search}${t.hash}` : e;
202
205
  }, f = async (e) => {
203
206
  let t = /(?:^|\/)graphql$/.test(new URL(e.url).pathname);
204
207
  if (i && t) return new Promise(() => void 0);
205
- if (!(e.method.toUpperCase() === "POST" && t)) return o(e);
206
- let n = await e.clone().text(), r = R(e.clone()), s = F(n);
207
- if (!s?.length) return o(e);
208
- let c = n.trimStart().startsWith("["), l = s.map((e) => P(r, e));
209
- if (L() && l.every(Boolean)) {
210
- let e = g(), t = l.map((t) => e.get(t)), n = Date.now();
211
- if (t.every((e) => e && e.expiresAt > n)) return I(t.map((e) => e.value), c);
208
+ if (!(e.method.toUpperCase() === "POST" && t)) return a(e);
209
+ let n = await e.clone().text(), r = z(e.clone()), s = I(n);
210
+ if (!s?.length) return a(e);
211
+ let c = n.trimStart().startsWith("["), l = s.map((e) => F(r, e));
212
+ if (R() && l.every(Boolean)) {
213
+ let e = _(), t = l.map((t) => e.get(t)), n = Date.now();
214
+ if (t.every((e) => e && e.expiresAt > n)) return L(t.map((e) => e.value), c);
212
215
  }
213
- let u = await o(e);
214
- if (!u.ok || !l.some(Boolean) || !L()) return u;
216
+ let u = await a(e);
217
+ if (!u.ok || !l.some(Boolean) || !R()) return u;
215
218
  try {
216
- let e = await u.clone().json(), t = Array.isArray(e) ? e : [e], n = g();
219
+ let e = await u.clone().json(), t = Array.isArray(e) ? e : [e], n = _();
217
220
  t.forEach((e, t) => {
218
221
  let r = l[t];
219
222
  r && (e && typeof e == "object" && "errors" in e && Array.isArray(e.errors) || n.set(r, {
220
223
  value: e,
221
- expiresAt: Date.now() + a
224
+ expiresAt: Date.now() + o
222
225
  }));
223
226
  });
224
227
  } catch {}
225
228
  return u;
226
- }, p = o, m = ((e, t) => {
227
- if (e == null) return o(e, t);
229
+ }, p = a, m = ((e, t) => {
230
+ if (e == null) return a(e, t);
228
231
  if (e instanceof Request) {
229
232
  let n = d(e.url), r = new Request(n, e);
230
233
  return f(t ? new Request(r, t) : r);
@@ -234,7 +237,7 @@ function B(e, t) {
234
237
  });
235
238
  p.preconnect && (m.preconnect = p.preconnect), globalThis.fetch = m;
236
239
  }
237
- function V(e = "VITE_VERBOSE_CONSOLE") {
240
+ function H(e = "VITE_VERBOSE_CONSOLE") {
238
241
  ({
239
242
  BASE_URL: "/",
240
243
  DEV: !1,
@@ -244,4 +247,4 @@ function V(e = "VITE_VERBOSE_CONSOLE") {
244
247
  })?.[e] !== "true" && (console.log = () => {}, console.info = () => {}, console.debug = () => {});
245
248
  }
246
249
  //#endregion
247
- export { _ as clearGatewayGraphQLResponseCache, B as installGatewayFetchRewrite, z as resolveGatewayBases, V as suppressConsole };
250
+ export { v as clearGatewayGraphQLResponseCache, V as installGatewayFetchRewrite, B as resolveGatewayBases, H as suppressConsole };
@@ -17,4 +17,5 @@ import { UpgradeInlineBanner as D } from "./shared/components/UpgradeInlineBanne
17
17
  import { useVoiceInput as O } from "./shared/components/assistantWidget/useVoiceInput.js";
18
18
  import { ASSISTANT_WIDGET_TOGGLE_EVENT as k, AssistantWidget as A } from "./shared/components/assistantWidget/AssistantWidget.js";
19
19
  import { Markdown as j } from "./shared/components/Markdown.js";
20
- export { k as ASSISTANT_WIDGET_TOGGLE_EVENT, d as AccessDenied, b as AppErrorBoundary, A as AssistantWidget, v as ConditionalShell, x as ContextConversationWidget, a as ErrorBoundary, p as ErrorFallback, S as KeyboardHelpDialogWrapper, m as LoadingFallback, j as Markdown, _ as MicrofrontendErrorBoundary, y as PWAInstallBanner, h as PageLoadingFallback, c as PermissionButton, f as PermissionDenied, l as PermissionGate, u as PermissionLink, C as QuotaMeter, o as RequireAuth, s as RequireGuest, e as SSORedirectSpinner, g as SectionLoadingFallback, w as UPGRADE_PROMPT_EVENT, D as UpgradeInlineBanner, T as UpgradePromptModal, t as checkRemoteSLO, n as checkSLO, r as clearLocalAuthState, E as dispatchUpgradePrompt, i as getSSORedirectUrl, O as useVoiceInput };
20
+ import { DesktopUpdateToast as M } from "./shared/components/DesktopUpdateToast.js";
21
+ export { k as ASSISTANT_WIDGET_TOGGLE_EVENT, d as AccessDenied, b as AppErrorBoundary, A as AssistantWidget, v as ConditionalShell, x as ContextConversationWidget, M as DesktopUpdateToast, a as ErrorBoundary, p as ErrorFallback, S as KeyboardHelpDialogWrapper, m as LoadingFallback, j as Markdown, _ as MicrofrontendErrorBoundary, y as PWAInstallBanner, h as PageLoadingFallback, c as PermissionButton, f as PermissionDenied, l as PermissionGate, u as PermissionLink, C as QuotaMeter, o as RequireAuth, s as RequireGuest, e as SSORedirectSpinner, g as SectionLoadingFallback, w as UPGRADE_PROMPT_EVENT, D as UpgradeInlineBanner, T as UpgradePromptModal, t as checkRemoteSLO, n as checkSLO, r as clearLocalAuthState, E as dispatchUpgradePrompt, i as getSSORedirectUrl, O as useVoiceInput };