@viasoftbr/shared-ui 0.0.4 → 0.0.5

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/index.js CHANGED
@@ -3013,140 +3013,6 @@ var authService = {
3013
3013
  }
3014
3014
  };
3015
3015
 
3016
- // src/services/loadRemoteModule.ts
3017
- import * as React from "react";
3018
- import * as ReactDOM from "react-dom";
3019
- var sharedScopeInitialized = false;
3020
- function getSharedScope() {
3021
- if (!globalThis.__federation_shared__) {
3022
- globalThis.__federation_shared__ = {};
3023
- }
3024
- if (!sharedScopeInitialized) {
3025
- globalThis.__federation_shared__["react"] = {
3026
- "18.3.1": {
3027
- get: () => Promise.resolve(() => React),
3028
- loaded: true,
3029
- from: "core",
3030
- scope: "default"
3031
- }
3032
- };
3033
- globalThis.__federation_shared__["react-dom"] = {
3034
- "18.3.1": {
3035
- get: () => Promise.resolve(() => ReactDOM),
3036
- loaded: true,
3037
- from: "core",
3038
- scope: "default"
3039
- }
3040
- };
3041
- sharedScopeInitialized = true;
3042
- }
3043
- return globalThis.__federation_shared__;
3044
- }
3045
- var loadedContainers = /* @__PURE__ */ new Map();
3046
- var initializedContainers = /* @__PURE__ */ new Set();
3047
- async function loadContainer(url) {
3048
- if (loadedContainers.has(url)) {
3049
- return loadedContainers.get(url);
3050
- }
3051
- const loadPromise = (async () => {
3052
- try {
3053
- const container = await import(
3054
- /* @vite-ignore */
3055
- url
3056
- );
3057
- if (container.init && !initializedContainers.has(url)) {
3058
- await container.init(getSharedScope());
3059
- initializedContainers.add(url);
3060
- }
3061
- return container;
3062
- } catch (error2) {
3063
- loadedContainers.delete(url);
3064
- initializedContainers.delete(url);
3065
- throw error2;
3066
- }
3067
- })();
3068
- loadedContainers.set(url, loadPromise);
3069
- return loadPromise;
3070
- }
3071
- async function loadRemoteModule(config) {
3072
- const container = await loadContainer(config.url);
3073
- if (!container || typeof container.get !== "function") {
3074
- throw new Error(`Container inv\xE1lido ou sem m\xE9todo get: ${config.scope}`);
3075
- }
3076
- if (typeof container.dynamicLoadingCss === "function") {
3077
- try {
3078
- await container.dynamicLoadingCss([]);
3079
- } catch (err) {
3080
- console.warn(`Aviso: Falha ao carregar CSS global do remote ${config.scope}`, err);
3081
- }
3082
- }
3083
- const factory2 = await container.get(config.module);
3084
- const moduleExports = await factory2();
3085
- if (moduleExports && typeof moduleExports === "object" && "default" in moduleExports) {
3086
- return moduleExports.default;
3087
- }
3088
- return moduleExports;
3089
- }
3090
-
3091
- // src/services/metadataLoader.ts
3092
- var MetadataLoader = class {
3093
- constructor() {
3094
- __publicField(this, "metadataCache", /* @__PURE__ */ new Map());
3095
- }
3096
- async loadMetadata(metadataUrl) {
3097
- if (this.metadataCache.has(metadataUrl)) {
3098
- return this.metadataCache.get(metadataUrl) || [];
3099
- }
3100
- try {
3101
- const response = await fetch(metadataUrl);
3102
- console.log(response);
3103
- if (!response.ok) {
3104
- throw new Error(`Failed to fetch metadata: ${response.statusText}`);
3105
- }
3106
- const data = await response.json();
3107
- let metadata;
3108
- if (Array.isArray(data)) {
3109
- metadata = data;
3110
- } else if (data.pages && Array.isArray(data.pages)) {
3111
- metadata = data.pages;
3112
- } else {
3113
- throw new Error(
3114
- "Invalid metadata format: expected array or object with pages property"
3115
- );
3116
- }
3117
- metadata.forEach((page, index3) => {
3118
- if (!page.id || !page.name || !page.path || !page.url) {
3119
- throw new Error(
3120
- `Invalid page metadata at index ${index3}: missing required fields`
3121
- );
3122
- }
3123
- });
3124
- this.metadataCache.set(metadataUrl, metadata);
3125
- return metadata;
3126
- } catch (error2) {
3127
- console.warn(`Failed to load metadata from ${metadataUrl}:`, error2);
3128
- return [];
3129
- }
3130
- }
3131
- async loadFromDirectory(directoryUrl) {
3132
- try {
3133
- const manifestUrl = `${directoryUrl}/manifest.json`;
3134
- return await this.loadMetadata(manifestUrl);
3135
- } catch (error2) {
3136
- throw new Error(
3137
- `Directory manifest not found at ${directoryUrl}/manifest.json: ${error2}`
3138
- );
3139
- }
3140
- }
3141
- clearCache() {
3142
- this.metadataCache.clear();
3143
- }
3144
- getCachedMetadata(metadataUrl) {
3145
- return this.metadataCache.get(metadataUrl);
3146
- }
3147
- };
3148
- var metadataLoader = new MetadataLoader();
3149
-
3150
3016
  // src/services/registry.ts
3151
3017
  var PluginRegistryImpl = class {
3152
3018
  constructor() {
@@ -25936,26 +25802,33 @@ var Accordion = ({ title, children, defaultOpen = false }) => {
25936
25802
  var Accordion_default = Accordion;
25937
25803
 
25938
25804
  // src/components/display/Section.tsx
25939
- import { useEffect as useEffect2, useRef, createContext as createContext2, useContext as useContext2 } from "react";
25805
+ import { useEffect as useEffect2, useRef, createContext as createContext2, use as use2 } from "react";
25940
25806
 
25941
25807
  // src/context/AuthContext.tsx
25942
- import { createContext, useContext, useEffect, useState as useState2 } from "react";
25808
+ import { createContext, use, useEffect, useState as useState2 } from "react";
25943
25809
  import { jsx as jsx2 } from "react/jsx-runtime";
25944
25810
  var AuthContext = createContext(void 0);
25945
- var AuthProvider = ({ children, onNavigate }) => {
25946
- const [user, setUser] = useState2(null);
25947
- const [accessToken, setToken] = useState2(null);
25811
+ var AuthProvider = ({
25812
+ children,
25813
+ onNavigate,
25814
+ storage = typeof window !== "undefined" ? window.localStorage : null,
25815
+ authService: authService2 = authService,
25816
+ initialUser = null,
25817
+ initialAccessToken = null
25818
+ }) => {
25819
+ const [user, setUser] = useState2(initialUser);
25820
+ const [accessToken, setToken] = useState2(initialAccessToken ?? null);
25948
25821
  const [loading, setLoading] = useState2(true);
25949
25822
  useEffect(() => {
25950
25823
  try {
25951
- const storedUser = localStorage.getItem("user");
25824
+ const storedUser = storage?.getItem("user");
25952
25825
  if (storedUser)
25953
25826
  setUser(JSON.parse(storedUser));
25954
25827
  } catch {
25955
25828
  }
25956
25829
  try {
25957
- const savedAccess = localStorage.getItem("accessToken");
25958
- const savedRefresh = localStorage.getItem("refreshToken");
25830
+ const savedAccess = storage?.getItem("accessToken");
25831
+ const savedRefresh = storage?.getItem("refreshToken");
25959
25832
  if (savedAccess) {
25960
25833
  setToken(savedAccess);
25961
25834
  setAccessToken(savedAccess);
@@ -25966,15 +25839,17 @@ var AuthProvider = ({ children, onNavigate }) => {
25966
25839
  } catch {
25967
25840
  }
25968
25841
  setLoading(false);
25969
- }, []);
25842
+ }, [storage]);
25970
25843
  const login = async (username, password, options) => {
25971
- const resp = await authService.login(username, password);
25844
+ const resp = await authService2.login(username, password);
25972
25845
  setToken(resp.accessToken);
25973
25846
  setAccessToken(resp.accessToken);
25974
25847
  setRefreshToken(resp.refreshToken);
25975
25848
  setUser(resp.user);
25976
25849
  try {
25977
- localStorage.setItem("user", JSON.stringify(resp.user));
25850
+ storage?.setItem("user", JSON.stringify(resp.user));
25851
+ storage?.setItem("accessToken", resp.accessToken);
25852
+ storage?.setItem("refreshToken", resp.refreshToken);
25978
25853
  } catch {
25979
25854
  }
25980
25855
  if (options?.redirect !== false)
@@ -25982,13 +25857,15 @@ var AuthProvider = ({ children, onNavigate }) => {
25982
25857
  };
25983
25858
  const logout = async () => {
25984
25859
  try {
25985
- await authService.logout();
25860
+ await authService2.logout();
25986
25861
  } finally {
25987
25862
  setToken(null);
25988
25863
  clearTokens();
25989
25864
  setUser(null);
25990
25865
  try {
25991
- localStorage.removeItem("user");
25866
+ storage?.removeItem("user");
25867
+ storage?.removeItem("accessToken");
25868
+ storage?.removeItem("refreshToken");
25992
25869
  } catch {
25993
25870
  }
25994
25871
  onNavigate?.("/login");
@@ -26000,10 +25877,10 @@ var AuthProvider = ({ children, onNavigate }) => {
26000
25877
  const want = Array.isArray(roles) ? roles : [roles];
26001
25878
  return want.some((r17) => user.role === r17);
26002
25879
  };
26003
- return /* @__PURE__ */ jsx2(AuthContext.Provider, { value: { user, accessToken, loading, login, logout, hasRole }, children });
25880
+ return /* @__PURE__ */ jsx2(AuthContext, { value: { user, accessToken, loading, login, logout, hasRole }, children });
26004
25881
  };
26005
25882
  function useAuth() {
26006
- const ctx = useContext(AuthContext);
25883
+ const ctx = use(AuthContext);
26007
25884
  if (!ctx)
26008
25885
  throw new Error("useAuth must be used within AuthProvider");
26009
25886
  return ctx;
@@ -26052,7 +25929,7 @@ var SkeletonBlock = ({ lines = 3, className = "" }) => {
26052
25929
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
26053
25930
  var SectionContext = createContext2(void 0);
26054
25931
  function useSection() {
26055
- const ctx = useContext2(SectionContext);
25932
+ const ctx = use2(SectionContext);
26056
25933
  return ctx ?? { readonly: false };
26057
25934
  }
26058
25935
  var Section2 = ({ id, title, icon, expanded, onToggle, children, readonly, loading = false }) => {
@@ -26097,7 +25974,7 @@ var Section2 = ({ id, title, icon, expanded, onToggle, children, readonly, loadi
26097
25974
  overflow-hidden
26098
25975
  ${expanded ? "max-h-fit opacity-100" : "max-h-0 opacity-0"}
26099
25976
  `,
26100
- children: /* @__PURE__ */ jsx4("div", { className: "px-6 py-4 border-t transition-all transition-discrete border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50", children: /* @__PURE__ */ jsx4(SectionContext.Provider, { value: { readonly: !!effectiveReadonly }, children: loading ? /* @__PURE__ */ jsx4(SkeletonBlock, { lines: 5 }) : children }) })
25977
+ children: /* @__PURE__ */ jsx4("div", { className: "px-6 py-4 border-t transition-all transition-discrete border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50", children: /* @__PURE__ */ jsx4(SectionContext, { value: { readonly: !!effectiveReadonly }, children: loading ? /* @__PURE__ */ jsx4(SkeletonBlock, { lines: 5 }) : children }) })
26101
25978
  }
26102
25979
  )
26103
25980
  ] });
@@ -28256,7 +28133,7 @@ function m6(u16, t15) {
28256
28133
  }
28257
28134
 
28258
28135
  // node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
28259
- import * as React6 from "react";
28136
+ import * as React5 from "react";
28260
28137
  import { useLayoutEffect as useLayoutEffect2, useEffect as useEffect5, useRef as useRef4 } from "react";
28261
28138
 
28262
28139
  // node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
@@ -28561,7 +28438,7 @@ function rectToClientRect(rect) {
28561
28438
  }
28562
28439
 
28563
28440
  // node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
28564
- import * as ReactDOM3 from "react-dom";
28441
+ import * as ReactDOM2 from "react-dom";
28565
28442
 
28566
28443
  // node_modules/.pnpm/@floating-ui+core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
28567
28444
  function computeCoordsFromPlacement(_ref, placement, rtl) {
@@ -29764,9 +29641,9 @@ var computePosition2 = (reference, floating, options) => {
29764
29641
  };
29765
29642
 
29766
29643
  // node_modules/.pnpm/@floating-ui+react-dom@2.1.7_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
29767
- import * as React5 from "react";
29644
+ import * as React4 from "react";
29768
29645
  import { useLayoutEffect } from "react";
29769
- import * as ReactDOM2 from "react-dom";
29646
+ import * as ReactDOM from "react-dom";
29770
29647
  var isClient = typeof document !== "undefined";
29771
29648
  var noop2 = function noop3() {
29772
29649
  };
@@ -29831,7 +29708,7 @@ function roundByDPR(element, value) {
29831
29708
  return Math.round(value * dpr) / dpr;
29832
29709
  }
29833
29710
  function useLatestRef(value) {
29834
- const ref = React5.useRef(value);
29711
+ const ref = React4.useRef(value);
29835
29712
  index(() => {
29836
29713
  ref.current = value;
29837
29714
  });
@@ -29854,7 +29731,7 @@ function useFloating(options) {
29854
29731
  whileElementsMounted,
29855
29732
  open
29856
29733
  } = options;
29857
- const [data, setData] = React5.useState({
29734
+ const [data, setData] = React4.useState({
29858
29735
  x: 0,
29859
29736
  y: 0,
29860
29737
  strategy,
@@ -29862,19 +29739,19 @@ function useFloating(options) {
29862
29739
  middlewareData: {},
29863
29740
  isPositioned: false
29864
29741
  });
29865
- const [latestMiddleware, setLatestMiddleware] = React5.useState(middleware);
29742
+ const [latestMiddleware, setLatestMiddleware] = React4.useState(middleware);
29866
29743
  if (!deepEqual(latestMiddleware, middleware)) {
29867
29744
  setLatestMiddleware(middleware);
29868
29745
  }
29869
- const [_reference, _setReference] = React5.useState(null);
29870
- const [_floating, _setFloating] = React5.useState(null);
29871
- const setReference = React5.useCallback((node) => {
29746
+ const [_reference, _setReference] = React4.useState(null);
29747
+ const [_floating, _setFloating] = React4.useState(null);
29748
+ const setReference = React4.useCallback((node) => {
29872
29749
  if (node !== referenceRef.current) {
29873
29750
  referenceRef.current = node;
29874
29751
  _setReference(node);
29875
29752
  }
29876
29753
  }, []);
29877
- const setFloating = React5.useCallback((node) => {
29754
+ const setFloating = React4.useCallback((node) => {
29878
29755
  if (node !== floatingRef.current) {
29879
29756
  floatingRef.current = node;
29880
29757
  _setFloating(node);
@@ -29882,14 +29759,14 @@ function useFloating(options) {
29882
29759
  }, []);
29883
29760
  const referenceEl = externalReference || _reference;
29884
29761
  const floatingEl = externalFloating || _floating;
29885
- const referenceRef = React5.useRef(null);
29886
- const floatingRef = React5.useRef(null);
29887
- const dataRef = React5.useRef(data);
29762
+ const referenceRef = React4.useRef(null);
29763
+ const floatingRef = React4.useRef(null);
29764
+ const dataRef = React4.useRef(data);
29888
29765
  const hasWhileElementsMounted = whileElementsMounted != null;
29889
29766
  const whileElementsMountedRef = useLatestRef(whileElementsMounted);
29890
29767
  const platformRef = useLatestRef(platform2);
29891
29768
  const openRef = useLatestRef(open);
29892
- const update = React5.useCallback(() => {
29769
+ const update = React4.useCallback(() => {
29893
29770
  if (!referenceRef.current || !floatingRef.current) {
29894
29771
  return;
29895
29772
  }
@@ -29912,7 +29789,7 @@ function useFloating(options) {
29912
29789
  };
29913
29790
  if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
29914
29791
  dataRef.current = fullData;
29915
- ReactDOM2.flushSync(() => {
29792
+ ReactDOM.flushSync(() => {
29916
29793
  setData(fullData);
29917
29794
  });
29918
29795
  }
@@ -29927,7 +29804,7 @@ function useFloating(options) {
29927
29804
  }));
29928
29805
  }
29929
29806
  }, [open]);
29930
- const isMountedRef = React5.useRef(false);
29807
+ const isMountedRef = React4.useRef(false);
29931
29808
  index(() => {
29932
29809
  isMountedRef.current = true;
29933
29810
  return () => {
@@ -29946,17 +29823,17 @@ function useFloating(options) {
29946
29823
  update();
29947
29824
  }
29948
29825
  }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
29949
- const refs = React5.useMemo(() => ({
29826
+ const refs = React4.useMemo(() => ({
29950
29827
  reference: referenceRef,
29951
29828
  floating: floatingRef,
29952
29829
  setReference,
29953
29830
  setFloating
29954
29831
  }), [setReference, setFloating]);
29955
- const elements = React5.useMemo(() => ({
29832
+ const elements = React4.useMemo(() => ({
29956
29833
  reference: referenceEl,
29957
29834
  floating: floatingEl
29958
29835
  }), [referenceEl, floatingEl]);
29959
- const floatingStyles = React5.useMemo(() => {
29836
+ const floatingStyles = React4.useMemo(() => {
29960
29837
  const initialStyles = {
29961
29838
  position: strategy,
29962
29839
  left: 0,
@@ -29982,7 +29859,7 @@ function useFloating(options) {
29982
29859
  top: y8
29983
29860
  };
29984
29861
  }, [strategy, transform, elements.floating, data.x, data.y]);
29985
- return React5.useMemo(() => ({
29862
+ return React4.useMemo(() => ({
29986
29863
  ...data,
29987
29864
  update,
29988
29865
  refs,
@@ -30009,12 +29886,12 @@ var size3 = (options, deps) => ({
30009
29886
 
30010
29887
  // node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
30011
29888
  var SafeReact = {
30012
- ...React6
29889
+ ...React5
30013
29890
  };
30014
29891
  var useInsertionEffect = SafeReact.useInsertionEffect;
30015
29892
  var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
30016
29893
  function useEffectEvent(callback) {
30017
- const ref = React6.useRef(() => {
29894
+ const ref = React5.useRef(() => {
30018
29895
  if (true) {
30019
29896
  throw new Error("Cannot call an event handler while rendering.");
30020
29897
  }
@@ -30022,7 +29899,7 @@ function useEffectEvent(callback) {
30022
29899
  useSafeInsertionEffect(() => {
30023
29900
  ref.current = callback;
30024
29901
  });
30025
- return React6.useCallback(function() {
29902
+ return React5.useCallback(function() {
30026
29903
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30027
29904
  args[_key] = arguments[_key];
30028
29905
  }
@@ -30045,13 +29922,13 @@ var genId = () => (
30045
29922
  "floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
30046
29923
  );
30047
29924
  function useFloatingId() {
30048
- const [id, setId] = React6.useState(() => serverHandoffComplete ? genId() : void 0);
29925
+ const [id, setId] = React5.useState(() => serverHandoffComplete ? genId() : void 0);
30049
29926
  index2(() => {
30050
29927
  if (id == null) {
30051
29928
  setId(genId());
30052
29929
  }
30053
29930
  }, []);
30054
- React6.useEffect(() => {
29931
+ React5.useEffect(() => {
30055
29932
  serverHandoffComplete = true;
30056
29933
  }, []);
30057
29934
  return id;
@@ -30102,13 +29979,13 @@ function createPubSub() {
30102
29979
  }
30103
29980
  };
30104
29981
  }
30105
- var FloatingNodeContext = /* @__PURE__ */ React6.createContext(null);
30106
- var FloatingTreeContext = /* @__PURE__ */ React6.createContext(null);
29982
+ var FloatingNodeContext = /* @__PURE__ */ React5.createContext(null);
29983
+ var FloatingTreeContext = /* @__PURE__ */ React5.createContext(null);
30107
29984
  var useFloatingParentNodeId = () => {
30108
29985
  var _React$useContext;
30109
- return ((_React$useContext = React6.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
29986
+ return ((_React$useContext = React5.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
30110
29987
  };
30111
- var useFloatingTree = () => React6.useContext(FloatingTreeContext);
29988
+ var useFloatingTree = () => React5.useContext(FloatingTreeContext);
30112
29989
  var FOCUSABLE_ATTRIBUTE = "data-floating-ui-focusable";
30113
29990
  function useFloatingRootContext(options) {
30114
29991
  const {
@@ -30117,8 +29994,8 @@ function useFloatingRootContext(options) {
30117
29994
  elements: elementsProp
30118
29995
  } = options;
30119
29996
  const floatingId = useId();
30120
- const dataRef = React6.useRef({});
30121
- const [events] = React6.useState(() => createPubSub());
29997
+ const dataRef = React5.useRef({});
29998
+ const [events] = React5.useState(() => createPubSub());
30122
29999
  const nested = useFloatingParentNodeId() != null;
30123
30000
  if (true) {
30124
30001
  const optionDomReference = elementsProp.reference;
@@ -30126,7 +30003,7 @@ function useFloatingRootContext(options) {
30126
30003
  error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
30127
30004
  }
30128
30005
  }
30129
- const [positionReference, setPositionReference] = React6.useState(elementsProp.reference);
30006
+ const [positionReference, setPositionReference] = React5.useState(elementsProp.reference);
30130
30007
  const onOpenChange = useEffectEvent((open2, event, reason) => {
30131
30008
  dataRef.current.openEvent = open2 ? event : void 0;
30132
30009
  events.emit("openchange", {
@@ -30137,15 +30014,15 @@ function useFloatingRootContext(options) {
30137
30014
  });
30138
30015
  onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
30139
30016
  });
30140
- const refs = React6.useMemo(() => ({
30017
+ const refs = React5.useMemo(() => ({
30141
30018
  setPositionReference
30142
30019
  }), []);
30143
- const elements = React6.useMemo(() => ({
30020
+ const elements = React5.useMemo(() => ({
30144
30021
  reference: positionReference || elementsProp.reference || null,
30145
30022
  floating: elementsProp.floating || null,
30146
30023
  domReference: elementsProp.reference
30147
30024
  }), [positionReference, elementsProp.reference, elementsProp.floating]);
30148
- return React6.useMemo(() => ({
30025
+ return React5.useMemo(() => ({
30149
30026
  dataRef,
30150
30027
  open,
30151
30028
  onOpenChange,
@@ -30172,11 +30049,11 @@ function useFloating2(options) {
30172
30049
  });
30173
30050
  const rootContext = options.rootContext || internalRootContext;
30174
30051
  const computedElements = rootContext.elements;
30175
- const [_domReference, setDomReference] = React6.useState(null);
30176
- const [positionReference, _setPositionReference] = React6.useState(null);
30052
+ const [_domReference, setDomReference] = React5.useState(null);
30053
+ const [positionReference, _setPositionReference] = React5.useState(null);
30177
30054
  const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
30178
30055
  const domReference = optionDomReference || _domReference;
30179
- const domReferenceRef = React6.useRef(null);
30056
+ const domReferenceRef = React5.useRef(null);
30180
30057
  const tree = useFloatingTree();
30181
30058
  index2(() => {
30182
30059
  if (domReference) {
@@ -30192,7 +30069,7 @@ function useFloating2(options) {
30192
30069
  }
30193
30070
  }
30194
30071
  });
30195
- const setPositionReference = React6.useCallback((node) => {
30072
+ const setPositionReference = React5.useCallback((node) => {
30196
30073
  const computedPositionReference = isElement(node) ? {
30197
30074
  getBoundingClientRect: () => node.getBoundingClientRect(),
30198
30075
  contextElement: node
@@ -30200,7 +30077,7 @@ function useFloating2(options) {
30200
30077
  _setPositionReference(computedPositionReference);
30201
30078
  position.refs.setReference(computedPositionReference);
30202
30079
  }, [position.refs]);
30203
- const setReference = React6.useCallback((node) => {
30080
+ const setReference = React5.useCallback((node) => {
30204
30081
  if (isElement(node) || node === null) {
30205
30082
  domReferenceRef.current = node;
30206
30083
  setDomReference(node);
@@ -30212,17 +30089,17 @@ function useFloating2(options) {
30212
30089
  position.refs.setReference(node);
30213
30090
  }
30214
30091
  }, [position.refs]);
30215
- const refs = React6.useMemo(() => ({
30092
+ const refs = React5.useMemo(() => ({
30216
30093
  ...position.refs,
30217
30094
  setReference,
30218
30095
  setPositionReference,
30219
30096
  domReference: domReferenceRef
30220
30097
  }), [position.refs, setReference, setPositionReference]);
30221
- const elements = React6.useMemo(() => ({
30098
+ const elements = React5.useMemo(() => ({
30222
30099
  ...position.elements,
30223
30100
  domReference
30224
30101
  }), [position.elements, domReference]);
30225
- const context = React6.useMemo(() => ({
30102
+ const context = React5.useMemo(() => ({
30226
30103
  ...position,
30227
30104
  ...rootContext,
30228
30105
  refs,
@@ -30236,7 +30113,7 @@ function useFloating2(options) {
30236
30113
  node.context = context;
30237
30114
  }
30238
30115
  });
30239
- return React6.useMemo(() => ({
30116
+ return React5.useMemo(() => ({
30240
30117
  ...position,
30241
30118
  context,
30242
30119
  refs,
@@ -30308,22 +30185,22 @@ function useInteractions(propsList) {
30308
30185
  const referenceDeps = propsList.map((key) => key == null ? void 0 : key.reference);
30309
30186
  const floatingDeps = propsList.map((key) => key == null ? void 0 : key.floating);
30310
30187
  const itemDeps = propsList.map((key) => key == null ? void 0 : key.item);
30311
- const getReferenceProps = React6.useCallback(
30188
+ const getReferenceProps = React5.useCallback(
30312
30189
  (userProps) => mergeProps(userProps, propsList, "reference"),
30313
30190
  // eslint-disable-next-line react-hooks/exhaustive-deps
30314
30191
  referenceDeps
30315
30192
  );
30316
- const getFloatingProps = React6.useCallback(
30193
+ const getFloatingProps = React5.useCallback(
30317
30194
  (userProps) => mergeProps(userProps, propsList, "floating"),
30318
30195
  // eslint-disable-next-line react-hooks/exhaustive-deps
30319
30196
  floatingDeps
30320
30197
  );
30321
- const getItemProps = React6.useCallback(
30198
+ const getItemProps = React5.useCallback(
30322
30199
  (userProps) => mergeProps(userProps, propsList, "item"),
30323
30200
  // eslint-disable-next-line react-hooks/exhaustive-deps
30324
30201
  itemDeps
30325
30202
  );
30326
- return React6.useMemo(() => ({
30203
+ return React5.useMemo(() => ({
30327
30204
  getReferenceProps,
30328
30205
  getFloatingProps,
30329
30206
  getItemProps
@@ -30394,7 +30271,7 @@ var inner = (props) => ({
30394
30271
  scrollEl.scrollTop = diffY;
30395
30272
  if (onFallbackChange) {
30396
30273
  const shouldFallback = scrollEl.offsetHeight < item.offsetHeight * min(minItemsVisible, listRef.current.length) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold;
30397
- ReactDOM3.flushSync(() => onFallbackChange(shouldFallback));
30274
+ ReactDOM2.flushSync(() => onFallbackChange(shouldFallback));
30398
30275
  }
30399
30276
  if (overflowRef) {
30400
30277
  overflowRef.current = await detectOverflow2(getArgsWithCustomFloatingHeight({
@@ -30419,10 +30296,10 @@ function useInnerOffset(context, props) {
30419
30296
  onChange: unstable_onChange
30420
30297
  } = props;
30421
30298
  const onChange = useEffectEvent(unstable_onChange);
30422
- const controlledScrollingRef = React6.useRef(false);
30423
- const prevScrollTopRef = React6.useRef(null);
30424
- const initialOverflowRef = React6.useRef(null);
30425
- React6.useEffect(() => {
30299
+ const controlledScrollingRef = React5.useRef(false);
30300
+ const prevScrollTopRef = React5.useRef(null);
30301
+ const initialOverflowRef = React5.useRef(null);
30302
+ React5.useEffect(() => {
30426
30303
  if (!enabled)
30427
30304
  return;
30428
30305
  function onWheel(e10) {
@@ -30440,7 +30317,7 @@ function useInnerOffset(context, props) {
30440
30317
  }
30441
30318
  if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {
30442
30319
  e10.preventDefault();
30443
- ReactDOM3.flushSync(() => {
30320
+ ReactDOM2.flushSync(() => {
30444
30321
  onChange((d9) => d9 + Math[method](dY, remainingScroll * sign));
30445
30322
  });
30446
30323
  } else if (/firefox/i.test(getUserAgent())) {
@@ -30465,7 +30342,7 @@ function useInnerOffset(context, props) {
30465
30342
  };
30466
30343
  }
30467
30344
  }, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);
30468
- const floating = React6.useMemo(() => ({
30345
+ const floating = React5.useMemo(() => ({
30469
30346
  onKeyDown() {
30470
30347
  controlledScrollingRef.current = true;
30471
30348
  },
@@ -30483,7 +30360,7 @@ function useInnerOffset(context, props) {
30483
30360
  if (prevScrollTopRef.current !== null) {
30484
30361
  const scrollDiff = el.scrollTop - prevScrollTopRef.current;
30485
30362
  if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {
30486
- ReactDOM3.flushSync(() => onChange((d9) => d9 + scrollDiff));
30363
+ ReactDOM2.flushSync(() => onChange((d9) => d9 + scrollDiff));
30487
30364
  }
30488
30365
  }
30489
30366
  requestAnimationFrame(() => {
@@ -30491,7 +30368,7 @@ function useInnerOffset(context, props) {
30491
30368
  });
30492
30369
  }
30493
30370
  }), [elements.floating, onChange, overflowRef, scrollRef]);
30494
- return React6.useMemo(() => enabled ? {
30371
+ return React5.useMemo(() => enabled ? {
30495
30372
  floating
30496
30373
  } : {}, [enabled, floating]);
30497
30374
  }
@@ -32849,7 +32726,7 @@ var MiddlewareServiceGroup = ({ expanded, onToggle, loading, settings, onChange
32849
32726
  var Service_default = MiddlewareServiceGroup;
32850
32727
 
32851
32728
  // src/components/encoder/DvB.tsx
32852
- import { useState as useState12, useEffect as useEffect9, useImperativeHandle, forwardRef as forwardRef4 } from "react";
32729
+ import { useState as useState12, useEffect as useEffect9 } from "react";
32853
32730
  import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
32854
32731
  var defaultDvBSettings = {
32855
32732
  engine: "cpu",
@@ -32994,7 +32871,8 @@ var normalizeDvBData = (data) => {
32994
32871
  protocol: parseProtocolUrl(data.output_url || defaultProtocolSettings.ffurl)
32995
32872
  };
32996
32873
  };
32997
- var DvB = forwardRef4(function DvB2({ settings, setSettings, encoderId, isLoading, setIsLoading }, ref) {
32874
+ var DvB = function DvB2(props) {
32875
+ const { settings, setSettings, encoderId, isLoading, setIsLoading, ref } = props;
32998
32876
  const [internalSettings, setInternalSettings] = useState12(defaultDvBSettings);
32999
32877
  const [expandedSections, setExpandedSections] = useState12({
33000
32878
  video: true,
@@ -33055,13 +32933,33 @@ var DvB = forwardRef4(function DvB2({ settings, setSettings, encoderId, isLoadin
33055
32933
  newTracks[idx] = { label: newTracks[idx].label, value: !newTracks[idx].value };
33056
32934
  setTracks(newTracks);
33057
32935
  };
33058
- useImperativeHandle(ref, () => ({
33059
- getSettings: () => ({ ...effectiveSettings, output_url: buildProtocolUrl(effectiveSettings.protocol) }),
33060
- reset: () => {
33061
- effectiveSetSettings(savedSettings);
33062
- },
33063
- isDirty: () => JSON.stringify(effectiveSettings) !== JSON.stringify(savedSettings)
33064
- }));
32936
+ useEffect9(() => {
32937
+ if (!ref)
32938
+ return;
32939
+ const impl = {
32940
+ getSettings: () => ({ ...effectiveSettings, output_url: buildProtocolUrl(effectiveSettings.protocol) }),
32941
+ reset: () => {
32942
+ effectiveSetSettings(savedSettings);
32943
+ },
32944
+ isDirty: () => JSON.stringify(effectiveSettings) !== JSON.stringify(savedSettings)
32945
+ };
32946
+ try {
32947
+ if (typeof ref === "function")
32948
+ ref(impl);
32949
+ else if ("current" in ref)
32950
+ ref.current = impl;
32951
+ } catch {
32952
+ }
32953
+ return () => {
32954
+ try {
32955
+ if (typeof ref === "function")
32956
+ ref(null);
32957
+ else if ("current" in ref)
32958
+ ref.current = null;
32959
+ } catch {
32960
+ }
32961
+ };
32962
+ }, [ref, effectiveSettings, savedSettings, effectiveSetSettings]);
33065
32963
  return /* @__PURE__ */ jsxs15("div", { className: "space-y-4 pl-4 border-l-[1px] border-gray-600 custom-scroll overflow-y-auto max-h-[670px]", children: [
33066
32964
  /* @__PURE__ */ jsxs15(VideoGroup_default, { expanded: expandedSections.video, onToggle: toggleSection, loading: isLoading ?? false, children: [
33067
32965
  /* @__PURE__ */ jsxs15("div", { children: [
@@ -33408,11 +33306,11 @@ var DvB = forwardRef4(function DvB2({ settings, setSettings, encoderId, isLoadin
33408
33306
  }
33409
33307
  )
33410
33308
  ] });
33411
- });
33309
+ };
33412
33310
  var DvB_default = DvB;
33413
33311
 
33414
33312
  // src/components/encoder/Livecast.tsx
33415
- import { useState as useState13, useEffect as useEffect10, useImperativeHandle as useImperativeHandle2, forwardRef as forwardRef5 } from "react";
33313
+ import { useState as useState13, useEffect as useEffect10 } from "react";
33416
33314
  import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
33417
33315
  var defaultLivecastSettings = {
33418
33316
  service_label: "Encoder 2",
@@ -33536,7 +33434,8 @@ var normalizeLivecastData = (data) => {
33536
33434
  protocol: parsed
33537
33435
  };
33538
33436
  };
33539
- var Livecast = forwardRef5(function Livecast2({ settings, setSettings, encoderId, isLoading, setIsLoading }, ref) {
33437
+ var Livecast = function Livecast2(props) {
33438
+ const { settings, setSettings, encoderId, isLoading, setIsLoading, ref } = props;
33540
33439
  const [expandedSections, setExpandedSections] = useState13({
33541
33440
  video: true,
33542
33441
  audio: false,
@@ -33592,16 +33491,33 @@ var Livecast = forwardRef5(function Livecast2({ settings, setSettings, encoderId
33592
33491
  const next = { ...effectiveSettings, [key]: !effectiveSettings[key] };
33593
33492
  effectiveSetSettings(next);
33594
33493
  };
33595
- useImperativeHandle2(ref, () => ({
33596
- getSettings: () => ({
33597
- ...effectiveSettings,
33598
- send_url: buildProtocolUrl2(effectiveSettings.protocol)
33599
- }),
33600
- reset: () => {
33601
- effectiveSetSettings(savedSettings);
33602
- },
33603
- isDirty: () => JSON.stringify(effectiveSettings) !== JSON.stringify(savedSettings)
33604
- }));
33494
+ useEffect10(() => {
33495
+ if (!ref)
33496
+ return;
33497
+ const impl = {
33498
+ getSettings: () => ({ ...effectiveSettings, send_url: buildProtocolUrl2(effectiveSettings.protocol) }),
33499
+ reset: () => {
33500
+ effectiveSetSettings(savedSettings);
33501
+ },
33502
+ isDirty: () => JSON.stringify(effectiveSettings) !== JSON.stringify(savedSettings)
33503
+ };
33504
+ try {
33505
+ if (typeof ref === "function")
33506
+ ref(impl);
33507
+ else if ("current" in ref)
33508
+ ref.current = impl;
33509
+ } catch {
33510
+ }
33511
+ return () => {
33512
+ try {
33513
+ if (typeof ref === "function")
33514
+ ref(null);
33515
+ else if ("current" in ref)
33516
+ ref.current = null;
33517
+ } catch {
33518
+ }
33519
+ };
33520
+ }, [ref, effectiveSettings, savedSettings, effectiveSetSettings]);
33605
33521
  return /* @__PURE__ */ jsxs16("div", { className: "space-y-4 px-4 border-x-[1px] border-gray-500 custom-scroll overflow-y-auto max-h-[670px]", children: [
33606
33522
  /* @__PURE__ */ jsx19(VideoGroup_default, { expanded: expandedSections.video, onToggle: toggleSection, loading: isLoading ?? false, children: /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 md:grid-cols-4 gap-4", children: [
33607
33523
  /* @__PURE__ */ jsx19(
@@ -33752,7 +33668,7 @@ var Livecast = forwardRef5(function Livecast2({ settings, setSettings, encoderId
33752
33668
  }
33753
33669
  )
33754
33670
  ] });
33755
- });
33671
+ };
33756
33672
  var Livecast_default = Livecast;
33757
33673
 
33758
33674
  // src/components/encoder/ViewLog.tsx
@@ -34535,31 +34451,39 @@ var EditInPlaceField = ({ initialValue, onSave }) => {
34535
34451
  var EditInPlaceField_default = EditInPlaceField;
34536
34452
 
34537
34453
  // src/context/ThemeContext.tsx
34538
- import { createContext as createContext4, useContext as useContext4, useEffect as useEffect14, useState as useState18 } from "react";
34454
+ import { createContext as createContext4, use as use3, useEffect as useEffect14, useState as useState18 } from "react";
34539
34455
  import { jsx as jsx25 } from "react/jsx-runtime";
34540
34456
  var ThemeContext = createContext4(void 0);
34541
- function ThemeProvider({ children }) {
34457
+ function ThemeProvider({ children, storage }) {
34458
+ const resolvedStorage = storage ?? (typeof window !== "undefined" ? window.localStorage : null);
34542
34459
  const [theme, setTheme] = useState18(() => {
34543
- const savedTheme = localStorage.getItem("theme");
34544
- const systemPreference = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
34545
- return savedTheme || systemPreference;
34460
+ try {
34461
+ if (!resolvedStorage)
34462
+ return "light";
34463
+ const savedTheme = resolvedStorage.getItem("theme");
34464
+ const systemPreference = typeof window !== "undefined" && window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
34465
+ return savedTheme ?? systemPreference;
34466
+ } catch {
34467
+ return "light";
34468
+ }
34546
34469
  });
34547
34470
  useEffect14(() => {
34548
- const root = document.documentElement;
34549
- if (theme === "dark") {
34550
- root.classList.add("dark");
34551
- } else {
34552
- root.classList.remove("dark");
34471
+ if (typeof document !== "undefined") {
34472
+ const root = document.documentElement;
34473
+ root.classList.toggle("dark", theme === "dark");
34553
34474
  }
34554
- localStorage.setItem("theme", theme);
34555
- }, [theme]);
34475
+ try {
34476
+ resolvedStorage?.setItem("theme", theme);
34477
+ } catch {
34478
+ }
34479
+ }, [theme, resolvedStorage]);
34556
34480
  const toggleTheme = () => {
34557
- setTheme((prevTheme) => prevTheme === "light" ? "dark" : "light");
34481
+ setTheme((prev) => prev === "light" ? "dark" : "light");
34558
34482
  };
34559
- return /* @__PURE__ */ jsx25(ThemeContext.Provider, { value: { theme, toggleTheme }, children });
34483
+ return /* @__PURE__ */ jsx25(ThemeContext, { value: { theme, toggleTheme }, children });
34560
34484
  }
34561
34485
  function useTheme() {
34562
- const context = useContext4(ThemeContext);
34486
+ const context = use3(ThemeContext);
34563
34487
  if (context === void 0) {
34564
34488
  throw new Error("useTheme must be used within a ThemeProvider");
34565
34489
  }
@@ -35536,18 +35460,18 @@ var Footer = () => {
35536
35460
  var Footer_default = Footer;
35537
35461
 
35538
35462
  // src/components/main/Header.tsx
35539
- import React19, { useEffect as useEffect15, useState as useState21 } from "react";
35463
+ import React18, { useEffect as useEffect15, useState as useState21 } from "react";
35540
35464
  import { Link as Link3 } from "react-router-dom";
35541
35465
  import { Fragment as Fragment3, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
35542
35466
  function classNames(...classes) {
35543
35467
  return classes.filter(Boolean).join(" ");
35544
35468
  }
35545
35469
  var Header = ({ isSidebarOpen, setSidebarOpen, onNavigate }) => {
35546
- const [status, setStatus] = React19.useState(null);
35547
- const [loading, setLoading] = React19.useState(true);
35548
- const [error2, setError] = React19.useState(null);
35470
+ const [status, setStatus] = React18.useState(null);
35471
+ const [loading, setLoading] = React18.useState(true);
35472
+ const [error2, setError] = React18.useState(null);
35549
35473
  const { theme, toggleTheme } = useTheme();
35550
- React19.useEffect(() => {
35474
+ React18.useEffect(() => {
35551
35475
  let active = true;
35552
35476
  (async () => {
35553
35477
  try {
@@ -35906,7 +35830,7 @@ var Header = ({ isSidebarOpen, setSidebarOpen, onNavigate }) => {
35906
35830
  var Header_default = Header;
35907
35831
 
35908
35832
  // src/components/main/PageHeader.tsx
35909
- import React20 from "react";
35833
+ import React19 from "react";
35910
35834
  import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
35911
35835
  var PageHeader = ({
35912
35836
  icon,
@@ -35916,7 +35840,7 @@ var PageHeader = ({
35916
35840
  hasStates = false,
35917
35841
  children
35918
35842
  }) => {
35919
- const [currentState, setState] = React20.useState(state);
35843
+ const [currentState, setState] = React19.useState(state);
35920
35844
  const startStop = () => {
35921
35845
  setState(currentState == "start" ? "stop" : "start");
35922
35846
  console.log("here", currentState);
@@ -36835,7 +36759,7 @@ var RequireAuth_default = RequireAuth;
36835
36759
  import { useEffect as useEffect19, useState as useState26 } from "react";
36836
36760
 
36837
36761
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/Trans.js
36838
- import { useContext as useContext5 } from "react";
36762
+ import { useContext as useContext2 } from "react";
36839
36763
 
36840
36764
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/TransWithoutContext.js
36841
36765
  import { Fragment as Fragment7, isValidElement, cloneElement as cloneElement2, createElement as createElement5, Children } from "react";
@@ -39228,7 +39152,7 @@ var dir = instance.dir;
39228
39152
  var init = instance.init;
39229
39153
  var loadResources = instance.loadResources;
39230
39154
  var reloadResources = instance.reloadResources;
39231
- var use = instance.use;
39155
+ var use4 = instance.use;
39232
39156
  var changeLanguage = instance.changeLanguage;
39233
39157
  var getFixedT = instance.getFixedT;
39234
39158
  var t14 = instance.t;
@@ -39395,10 +39319,10 @@ var ReportNamespaces = class {
39395
39319
  };
39396
39320
 
39397
39321
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTrans.js
39398
- import { useContext as useContext6 } from "react";
39322
+ import { useContext as useContext3 } from "react";
39399
39323
 
39400
39324
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTransWithoutContext.js
39401
- import React25 from "react";
39325
+ import React24 from "react";
39402
39326
 
39403
39327
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTransUtils/TranslationParserError.js
39404
39328
  var TranslationParserError = class _TranslationParserError extends Error {
@@ -39680,7 +39604,7 @@ var tokenize = (translation) => {
39680
39604
  };
39681
39605
 
39682
39606
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTransUtils/renderTranslation.js
39683
- import React24 from "react";
39607
+ import React23 from "react";
39684
39608
  var renderDeclarationNode = (declaration, children, childDeclarations) => {
39685
39609
  const {
39686
39610
  type,
@@ -39691,15 +39615,15 @@ var renderDeclarationNode = (declaration, children, childDeclarations) => {
39691
39615
  children: _childrenToRemove,
39692
39616
  ...propsWithoutChildren
39693
39617
  } = props;
39694
- return React24.createElement(type, propsWithoutChildren, ...children);
39618
+ return React23.createElement(type, propsWithoutChildren, ...children);
39695
39619
  }
39696
39620
  if (children.length === 0) {
39697
- return React24.createElement(type, props);
39621
+ return React23.createElement(type, props);
39698
39622
  }
39699
39623
  if (children.length === 1) {
39700
- return React24.createElement(type, props, children[0]);
39624
+ return React23.createElement(type, props, children[0]);
39701
39625
  }
39702
- return React24.createElement(type, props, ...children);
39626
+ return React23.createElement(type, props, ...children);
39703
39627
  };
39704
39628
  var renderTranslation = (translation, declarations = []) => {
39705
39629
  if (!translation) {
@@ -39799,7 +39723,7 @@ function IcuTransWithoutContext({
39799
39723
  warnOnce(i18n, "NO_I18NEXT_INSTANCE", `IcuTrans: You need to pass in an i18next instance using i18nextReactModule`, {
39800
39724
  i18nKey
39801
39725
  });
39802
- return React25.createElement(React25.Fragment, {}, defaultTranslation);
39726
+ return React24.createElement(React24.Fragment, {}, defaultTranslation);
39803
39727
  }
39804
39728
  const t15 = tFromProps || i18n.t?.bind(i18n) || ((k11) => k11);
39805
39729
  let namespaces = ns || t15.ns || i18n.options?.defaultNS;
@@ -39820,13 +39744,13 @@ function IcuTransWithoutContext({
39820
39744
  });
39821
39745
  try {
39822
39746
  const rendered = renderTranslation(translation, content);
39823
- return React25.createElement(React25.Fragment, {}, ...rendered);
39747
+ return React24.createElement(React24.Fragment, {}, ...rendered);
39824
39748
  } catch (error2) {
39825
39749
  warn2(i18n, "ICU_TRANS_RENDER_ERROR", `IcuTrans component error for key "${i18nKey}": ${error2.message}`, {
39826
39750
  i18nKey,
39827
39751
  error: error2
39828
39752
  });
39829
- return React25.createElement(React25.Fragment, {}, translation);
39753
+ return React24.createElement(React24.Fragment, {}, translation);
39830
39754
  }
39831
39755
  }
39832
39756
  IcuTransWithoutContext.displayName = "IcuTransWithoutContext";
@@ -39844,7 +39768,7 @@ function IcuTrans({
39844
39768
  const {
39845
39769
  i18n: i18nFromContext,
39846
39770
  defaultNS: defaultNSFromContext
39847
- } = useContext6(I18nContext) || {};
39771
+ } = useContext3(I18nContext) || {};
39848
39772
  const i18n = i18nFromProps || i18nFromContext || getI18n();
39849
39773
  const t15 = tFromProps || i18n?.t.bind(i18n);
39850
39774
  return IcuTransWithoutContext({
@@ -39860,7 +39784,7 @@ function IcuTrans({
39860
39784
  IcuTrans.displayName = "IcuTrans";
39861
39785
 
39862
39786
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/useTranslation.js
39863
- import { useContext as useContext7, useCallback as useCallback3, useMemo as useMemo6, useEffect as useEffect18, useRef as useRef9, useState as useState25 } from "react";
39787
+ import { useContext as useContext4, useCallback as useCallback3, useMemo as useMemo6, useEffect as useEffect18, useRef as useRef9, useState as useState25 } from "react";
39864
39788
  import { useSyncExternalStore } from "use-sync-external-store/shim";
39865
39789
  var notReadyT = (k11, optsOrDefaultValue) => {
39866
39790
  if (isString3(optsOrDefaultValue))
@@ -39882,7 +39806,7 @@ var useTranslation = (ns, props = {}) => {
39882
39806
  const {
39883
39807
  i18n: i18nFromContext,
39884
39808
  defaultNS: defaultNSFromContext
39885
- } = useContext7(I18nContext) || {};
39809
+ } = useContext4(I18nContext) || {};
39886
39810
  const i18n = i18nFromProps || i18nFromContext || getI18n();
39887
39811
  if (i18n && !i18n.reportNamespaces)
39888
39812
  i18n.reportNamespaces = new ReportNamespaces();
@@ -40032,7 +39956,7 @@ import { createElement as createElement7, useMemo as useMemo7 } from "react";
40032
39956
  import { createElement as createElement8 } from "react";
40033
39957
 
40034
39958
  // node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/useSSR.js
40035
- import { useContext as useContext8 } from "react";
39959
+ import { useContext as useContext5 } from "react";
40036
39960
 
40037
39961
  // src/locales/pt/translation.json
40038
39962
  var translation_default = {
@@ -40269,11 +40193,14 @@ instance.use(initReactI18next).init({
40269
40193
  var i18n_default = instance;
40270
40194
 
40271
40195
  // src/context/SharedUiProvider.tsx
40272
- import React26 from "react";
40196
+ import React25 from "react";
40273
40197
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
40274
40198
  import { jsx as jsx41 } from "react/jsx-runtime";
40275
40199
  function SharedUiProvider({ children, client }) {
40276
- const internal = React26.useMemo(() => client ?? new QueryClient(), [client]);
40200
+ const ref = React25.useRef(null);
40201
+ if (!ref.current)
40202
+ ref.current = client ?? new QueryClient();
40203
+ const internal = ref.current;
40277
40204
  return /* @__PURE__ */ jsx41(QueryClientProvider, { client: internal, children });
40278
40205
  }
40279
40206
 
@@ -40516,48 +40443,13 @@ var ConfigWizard = ({ basePath = "./config-xcoder-wizard/php", onComplete }) =>
40516
40443
  };
40517
40444
  var Wizard_default = ConfigWizard;
40518
40445
 
40519
- // src/components/RemoteModule.tsx
40520
- import { useEffect as useEffect20, useState as useState27 } from "react";
40521
- import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
40522
- function RemoteModule({ scope, url, module, fallback }) {
40523
- const [Component2, setComponent] = useState27(null);
40524
- const [error2, setError] = useState27(null);
40525
- const [loading, setLoading] = useState27(true);
40526
- useEffect20(() => {
40527
- setLoading(true);
40528
- setError(null);
40529
- loadRemoteModule({ scope, url, module }).then((mod) => {
40530
- setComponent(() => mod);
40531
- }).catch((err) => {
40532
- console.error("Erro ao carregar m\xF3dulo:", err);
40533
- setError(err.message);
40534
- }).finally(() => {
40535
- setLoading(false);
40536
- });
40537
- }, [scope, url, module]);
40538
- if (loading) {
40539
- return /* @__PURE__ */ jsx43("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx43("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-primary dark:border-primary-purple" }) });
40540
- }
40541
- if (error2) {
40542
- return /* @__PURE__ */ jsxs38("div", { className: "p-6 bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 rounded-lg", children: [
40543
- /* @__PURE__ */ jsx43("h3", { className: "text-lg font-semibold text-red-800 dark:text-red-300 mb-2", children: "Erro ao carregar m\xF3dulo" }),
40544
- /* @__PURE__ */ jsx43("p", { className: "text-red-600 dark:text-red-400", children: error2 }),
40545
- /* @__PURE__ */ jsx43("p", { className: "text-sm text-red-500 dark:text-red-500 mt-2", children: "Verifique se o m\xF3dulo est\xE1 instalado e o servidor est\xE1 rodando." })
40546
- ] });
40547
- }
40548
- if (!Component2) {
40549
- return /* @__PURE__ */ jsx43(Fragment8, { children: fallback || /* @__PURE__ */ jsx43("div", { className: "p-4 text-neutral-500 dark:text-neutral-400", children: "M\xF3dulo n\xE3o encontrado" }) });
40550
- }
40551
- return /* @__PURE__ */ jsx43(Component2, {});
40552
- }
40553
-
40554
40446
  // src/components/xcoder/Fflog.tsx
40555
- import { useEffect as useEffect21, useState as useState28 } from "react";
40556
- import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
40447
+ import { useEffect as useEffect20, useState as useState27 } from "react";
40448
+ import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
40557
40449
  var Fflog = ({ index: index3 }) => {
40558
- const [message, setMessage] = useState28("");
40559
- const [tooltip, setTooltip] = useState28("Copy to Clipboard");
40560
- useEffect21(() => {
40450
+ const [message, setMessage] = useState27("");
40451
+ const [tooltip, setTooltip] = useState27("Copy to Clipboard");
40452
+ useEffect20(() => {
40561
40453
  const cleanupSocket = subscribeToWebsocket(buildWsUrl("/ws"), (data) => {
40562
40454
  const aux = data?.logs[index3 - 1];
40563
40455
  setMessage(aux.log);
@@ -40570,7 +40462,7 @@ var Fflog = ({ index: index3 }) => {
40570
40462
  cleanupSocket();
40571
40463
  };
40572
40464
  }, []);
40573
- return /* @__PURE__ */ jsxs39(
40465
+ return /* @__PURE__ */ jsxs38(
40574
40466
  "div",
40575
40467
  {
40576
40468
  "data-tooltip-id": "tooltip",
@@ -40585,8 +40477,8 @@ var Fflog = ({ index: index3 }) => {
40585
40477
  },
40586
40478
  onMouseLeave: () => message == "" ? setTooltip("Copy to Clipboard") : "",
40587
40479
  children: [
40588
- /* @__PURE__ */ jsx44(M10, { id: "tooltip" }),
40589
- /* @__PURE__ */ jsx44("p", { className: "relative mt-[-10px] text-justify text-gray-900 dark:text-slate-200 font-mono", style: { overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis" }, children: message })
40480
+ /* @__PURE__ */ jsx43(M10, { id: "tooltip" }),
40481
+ /* @__PURE__ */ jsx43("p", { className: "relative mt-[-10px] text-justify text-gray-900 dark:text-slate-200 font-mono", style: { overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis" }, children: message })
40590
40482
  ]
40591
40483
  }
40592
40484
  );
@@ -40594,7 +40486,7 @@ var Fflog = ({ index: index3 }) => {
40594
40486
  var Fflog_default = Fflog;
40595
40487
 
40596
40488
  // src/components/xcoder/Metrics.tsx
40597
- import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
40489
+ import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
40598
40490
  var MetricBar = ({ label, value, suffix, color }) => {
40599
40491
  const colorClasses = {
40600
40492
  blue: "bg-blue-500",
@@ -40603,15 +40495,15 @@ var MetricBar = ({ label, value, suffix, color }) => {
40603
40495
  cyan: "bg-cyan-500",
40604
40496
  pink: "bg-pink-500"
40605
40497
  };
40606
- return /* @__PURE__ */ jsxs40("div", { className: "space-y-1", children: [
40607
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between text-sm", children: [
40608
- /* @__PURE__ */ jsx45("span", { className: "text-gray-900 dark:text-slate-400", children: label }),
40609
- /* @__PURE__ */ jsxs40("span", { className: "text-gray-900 dark:text-white font-mono", children: [
40498
+ return /* @__PURE__ */ jsxs39("div", { className: "space-y-1", children: [
40499
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between text-sm", children: [
40500
+ /* @__PURE__ */ jsx44("span", { className: "text-gray-900 dark:text-slate-400", children: label }),
40501
+ /* @__PURE__ */ jsxs39("span", { className: "text-gray-900 dark:text-white font-mono", children: [
40610
40502
  Math.round(value),
40611
40503
  suffix
40612
40504
  ] })
40613
40505
  ] }),
40614
- /* @__PURE__ */ jsx45("div", { className: "h-2 bg-slate-300 dark:bg-slate-800 rounded-full overflow-hidden", children: /* @__PURE__ */ jsx45(
40506
+ /* @__PURE__ */ jsx44("div", { className: "h-2 bg-slate-300 dark:bg-slate-800 rounded-full overflow-hidden", children: /* @__PURE__ */ jsx44(
40615
40507
  "div",
40616
40508
  {
40617
40509
  className: `h-full transition-all duration-300 ${colorClasses[color]}`,
@@ -40623,8 +40515,8 @@ var MetricBar = ({ label, value, suffix, color }) => {
40623
40515
  var Metrics_default = MetricBar;
40624
40516
 
40625
40517
  // src/components/xcoder/Panel.tsx
40626
- import { useState as useState29, useEffect as useEffect22 } from "react";
40627
- import { Fragment as Fragment9, jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
40518
+ import { useState as useState28, useEffect as useEffect21 } from "react";
40519
+ import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
40628
40520
  var convertServiceToOption = (serviceString) => {
40629
40521
  const match = serviceString.match(/^([^@]+)@/);
40630
40522
  if (!match) {
@@ -40638,12 +40530,12 @@ var convertServiceToOption = (serviceString) => {
40638
40530
  return { label, value: rawValue };
40639
40531
  };
40640
40532
  var EncoderDecoderPanel = ({ index: index3 }) => {
40641
- const [status, setStatus] = useState29("idle");
40642
- const [modes, setModes] = useState29([]);
40643
- const [oldModes, setOldModes] = useState29(modes);
40644
- const [open, setOpen] = useState29(false);
40645
- const [optionsList, setOptionsList] = useState29([]);
40646
- useEffect22(() => {
40533
+ const [status, setStatus] = useState28("idle");
40534
+ const [modes, setModes] = useState28([]);
40535
+ const [oldModes, setOldModes] = useState28(modes);
40536
+ const [open, setOpen] = useState28(false);
40537
+ const [optionsList, setOptionsList] = useState28([]);
40538
+ useEffect21(() => {
40647
40539
  const cleanupSocket = subscribeToWebsocket(buildWsUrl("/"), (data) => {
40648
40540
  setStatus(data?.services[`xcoder_${index3}`].status);
40649
40541
  });
@@ -40677,52 +40569,52 @@ var EncoderDecoderPanel = ({ index: index3 }) => {
40677
40569
  m: state ? "stop" : "start"
40678
40570
  });
40679
40571
  };
40680
- return /* @__PURE__ */ jsxs41("div", { className: "bg-gray-200 dark:bg-slate-900/50 border bg-gray-200 border-gray-400 dark:border-slate-800 rounded-lg", children: [
40681
- /* @__PURE__ */ jsxs41("div", { className: "px-6 py-3 border-b border-slate-800 flex items-center justify-between", children: [
40682
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-3", children: [
40683
- /* @__PURE__ */ jsx46(Radio, { className: "w-5 h-5 text-blue-500" }),
40684
- /* @__PURE__ */ jsx46("h1", { className: "text-base font-medium text-gray-800 dark:text-white hover:underline", children: /* @__PURE__ */ jsxs41("a", { href: `/page/${modes[index3 - 1]?.split("@")[0] ?? "encoder-dvb"}?channel=${index3}`, children: [
40572
+ return /* @__PURE__ */ jsxs40("div", { className: "bg-gray-200 dark:bg-slate-900/50 border bg-gray-200 border-gray-400 dark:border-slate-800 rounded-lg", children: [
40573
+ /* @__PURE__ */ jsxs40("div", { className: "px-6 py-3 border-b border-slate-800 flex items-center justify-between", children: [
40574
+ /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-3", children: [
40575
+ /* @__PURE__ */ jsx45(Radio, { className: "w-5 h-5 text-blue-500" }),
40576
+ /* @__PURE__ */ jsx45("h1", { className: "text-base font-medium text-gray-800 dark:text-white hover:underline", children: /* @__PURE__ */ jsxs40("a", { href: `/page/${modes[index3 - 1]?.split("@")[0] ?? "encoder-dvb"}?channel=${index3}`, children: [
40685
40577
  "Xcoder BMD Video Interface (",
40686
40578
  index3,
40687
40579
  ")"
40688
40580
  ] }) })
40689
40581
  ] }),
40690
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-4", children: [
40691
- /* @__PURE__ */ jsx46(
40582
+ /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-4", children: [
40583
+ /* @__PURE__ */ jsx45(
40692
40584
  "button",
40693
40585
  {
40694
40586
  onClick: () => startStop(status == "running"),
40695
40587
  className: `flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-all ${status == "running" ? "bg-red-600 hover:bg-red-700 text-white" : "bg-blue-600 hover:bg-blue-700 text-white"}`,
40696
- children: status == "running" ? /* @__PURE__ */ jsxs41(Fragment9, { children: [
40697
- /* @__PURE__ */ jsx46(Pause, { className: "w-4 h-4" }),
40588
+ children: status == "running" ? /* @__PURE__ */ jsxs40(Fragment8, { children: [
40589
+ /* @__PURE__ */ jsx45(Pause, { className: "w-4 h-4" }),
40698
40590
  "Stop"
40699
- ] }) : /* @__PURE__ */ jsxs41(Fragment9, { children: [
40700
- /* @__PURE__ */ jsx46(Play, { className: "w-4 h-4" }),
40591
+ ] }) : /* @__PURE__ */ jsxs40(Fragment8, { children: [
40592
+ /* @__PURE__ */ jsx45(Play, { className: "w-4 h-4" }),
40701
40593
  "Start"
40702
40594
  ] })
40703
40595
  }
40704
40596
  ),
40705
- /* @__PURE__ */ jsxs41("div", { className: `flex w-[100px] justify-center items-center gap-2 px-4 py-2 rounded-md ${status == "running" ? "bg-yellow-600" : "bg-slate-700"}`, children: [
40706
- /* @__PURE__ */ jsx46("div", { className: `w-2 h-2 rounded-full bg-white ${status == "running" ? "block" : "hidden"}` }),
40707
- /* @__PURE__ */ jsx46("span", { className: "text-sm text-slate-100 font-mono font-bold", children: status == "running" ? "READY" : "STANDBY" })
40597
+ /* @__PURE__ */ jsxs40("div", { className: `flex w-[100px] justify-center items-center gap-2 px-4 py-2 rounded-md ${status == "running" ? "bg-yellow-600" : "bg-slate-700"}`, children: [
40598
+ /* @__PURE__ */ jsx45("div", { className: `w-2 h-2 rounded-full bg-white ${status == "running" ? "block" : "hidden"}` }),
40599
+ /* @__PURE__ */ jsx45("span", { className: "text-sm text-slate-100 font-mono font-bold", children: status == "running" ? "READY" : "STANDBY" })
40708
40600
  ] }),
40709
- /* @__PURE__ */ jsx46(
40601
+ /* @__PURE__ */ jsx45(
40710
40602
  "button",
40711
40603
  {
40712
40604
  onClick: () => setOpen(true),
40713
40605
  className: "p-2 rounded-md transition-colors",
40714
- children: /* @__PURE__ */ jsx46(Settings, { className: "w-5 h-5 text-slate-400 hover:text-blue-400" })
40606
+ children: /* @__PURE__ */ jsx45(Settings, { className: "w-5 h-5 text-slate-400 hover:text-blue-400" })
40715
40607
  }
40716
40608
  )
40717
40609
  ] })
40718
40610
  ] }),
40719
- /* @__PURE__ */ jsx46(
40611
+ /* @__PURE__ */ jsx45(
40720
40612
  Modal_default,
40721
40613
  {
40722
40614
  open,
40723
40615
  setOpen,
40724
40616
  title: "Switching Operation Mode",
40725
- element: /* @__PURE__ */ jsx46("div", { children: optionsList[index3 - 1] && /* @__PURE__ */ jsx46("div", { className: "relative p-6", children: /* @__PURE__ */ jsx46(
40617
+ element: /* @__PURE__ */ jsx45("div", { children: optionsList[index3 - 1] && /* @__PURE__ */ jsx45("div", { className: "relative p-6", children: /* @__PURE__ */ jsx45(
40726
40618
  SelectField_default,
40727
40619
  {
40728
40620
  label: "New Mode",
@@ -40743,15 +40635,15 @@ var EncoderDecoderPanel = ({ index: index3 }) => {
40743
40635
  }
40744
40636
  }
40745
40637
  ),
40746
- /* @__PURE__ */ jsx46("div", { className: "p-6", children: /* @__PURE__ */ jsx46(Preview_default, { index: index3, setVuPts: () => {
40638
+ /* @__PURE__ */ jsx45("div", { className: "p-6", children: /* @__PURE__ */ jsx45(Preview_default, { index: index3, setVuPts: () => {
40747
40639
  } }) })
40748
40640
  ] });
40749
40641
  };
40750
40642
  var Panel_default = EncoderDecoderPanel;
40751
40643
 
40752
40644
  // src/components/xcoder/Preview.tsx
40753
- import { useEffect as useEffect23, useLayoutEffect as useLayoutEffect3, useMemo as useMemo8, useRef as useRef10, useState as useState30 } from "react";
40754
- import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
40645
+ import { useEffect as useEffect22, useLayoutEffect as useLayoutEffect3, useMemo as useMemo8, useRef as useRef10, useState as useState29 } from "react";
40646
+ import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
40755
40647
  var Preview = ({
40756
40648
  index: index3,
40757
40649
  setVuPts,
@@ -40761,8 +40653,8 @@ var Preview = ({
40761
40653
  orientation = "horizontal"
40762
40654
  }) => {
40763
40655
  const logEndRef = useRef10(null);
40764
- const [message, setMessage] = useState30([]);
40765
- useEffect23(() => {
40656
+ const [message, setMessage] = useState29([]);
40657
+ useEffect22(() => {
40766
40658
  const cleanupSocket = subscribeToWebsocket(buildWsUrl("/"), (data) => {
40767
40659
  const aux = data?.services[`xcoder_${index3}`];
40768
40660
  setMessage(aux.decklinkEvents.split("\n"));
@@ -40771,21 +40663,21 @@ var Preview = ({
40771
40663
  cleanupSocket();
40772
40664
  };
40773
40665
  }, []);
40774
- useEffect23(() => {
40666
+ useEffect22(() => {
40775
40667
  if (logEndRef.current) {
40776
40668
  logEndRef.current.scrollTop = logEndRef.current.scrollHeight;
40777
40669
  }
40778
40670
  }, [message]);
40779
- const [vuChannels, setVuChannels] = useState30(
40671
+ const [vuChannels, setVuChannels] = useState29(
40780
40672
  Array(8).fill({ left: 0, right: 0 })
40781
40673
  );
40782
40674
  const channelCount = 8;
40783
40675
  const vuBars = useMemo8(() => {
40784
- return Array.from({ length: channelCount }, (_7, i14) => /* @__PURE__ */ jsx47(VUMeter_default, { index: i14, volume: vuChannels }, `vu-bar-${i14}`));
40676
+ return Array.from({ length: channelCount }, (_7, i14) => /* @__PURE__ */ jsx46(VUMeter_default, { index: i14, volume: vuChannels }, `vu-bar-${i14}`));
40785
40677
  }, [channelCount, vuChannels]);
40786
40678
  const playerRef = useRef10(null);
40787
40679
  const vuRef = useRef10(null);
40788
- const [height, setHeight] = useState30("auto");
40680
+ const [height, setHeight] = useState29("auto");
40789
40681
  useLayoutEffect3(() => {
40790
40682
  const p8 = playerRef.current;
40791
40683
  const v6 = vuRef.current;
@@ -40800,15 +40692,15 @@ var Preview = ({
40800
40692
  }
40801
40693
  ;
40802
40694
  }, []);
40803
- const [isOpen, setIsOpen] = useState30(false);
40804
- const logData = message.map((log, i14) => /* @__PURE__ */ jsx47("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx47("span", { className: "text-slate-900 dark:text-slate-300 break-words", children: log }) }, i14));
40805
- return /* @__PURE__ */ jsxs42("div", { className: `"w-full h-full" ${orientation === "horizontal" ? "" : "py-6"}`, children: [
40806
- /* @__PURE__ */ jsxs42(
40695
+ const [isOpen, setIsOpen] = useState29(false);
40696
+ const logData = message.map((log, i14) => /* @__PURE__ */ jsx46("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx46("span", { className: "text-slate-900 dark:text-slate-300 break-words", children: log }) }, i14));
40697
+ return /* @__PURE__ */ jsxs41("div", { className: `"w-full h-full" ${orientation === "horizontal" ? "" : "py-6"}`, children: [
40698
+ /* @__PURE__ */ jsxs41(
40807
40699
  "div",
40808
40700
  {
40809
40701
  className: `grid gap-6 mb-5 ${orientation === "horizontal" ? "grid-cols-[1fr_300px] items-start" : "grid-cols-1"}`,
40810
40702
  children: [
40811
- /* @__PURE__ */ jsx47("div", { ref: playerRef, className: "bg-black rounded-lg overflow-hidden aspect-video", children: /* @__PURE__ */ jsx47("div", { className: "w-full h-full relative flex items-center justify-center", children: /* @__PURE__ */ jsx47(
40703
+ /* @__PURE__ */ jsx46("div", { ref: playerRef, className: "bg-black rounded-lg overflow-hidden aspect-video", children: /* @__PURE__ */ jsx46("div", { className: "w-full h-full relative flex items-center justify-center", children: /* @__PURE__ */ jsx46(
40812
40704
  VideoPlayer_default,
40813
40705
  {
40814
40706
  pgmIndex: index3,
@@ -40817,10 +40709,10 @@ var Preview = ({
40817
40709
  setVuChannels
40818
40710
  }
40819
40711
  ) }) }),
40820
- /* @__PURE__ */ jsxs42("div", { className: `flex flex-col ${orientation === "horizontal" ? "h-full" : "h-[200px]"}`, children: [
40821
- /* @__PURE__ */ jsx47("div", { ref: vuRef, className: `bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-4 ${showDlog || showStreamControl ? "mb-5" : "flex-1"}`, children: /* @__PURE__ */ jsx47("div", { className: `flex justify-between items-end ${showDlog || showStreamControl ? "h-32" : "h-full"}`, children: vuBars }) }),
40822
- showStreamControl && /* @__PURE__ */ jsx47(StreamControl_default, { index: index3 }),
40823
- showDlog && /* @__PURE__ */ jsx47("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg overflow-hidden flex-1", children: /* @__PURE__ */ jsxs42(
40712
+ /* @__PURE__ */ jsxs41("div", { className: `flex flex-col ${orientation === "horizontal" ? "h-full" : "h-[200px]"}`, children: [
40713
+ /* @__PURE__ */ jsx46("div", { ref: vuRef, className: `bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-4 ${showDlog || showStreamControl ? "mb-5" : "flex-1"}`, children: /* @__PURE__ */ jsx46("div", { className: `flex justify-between items-end ${showDlog || showStreamControl ? "h-32" : "h-full"}`, children: vuBars }) }),
40714
+ showStreamControl && /* @__PURE__ */ jsx46(StreamControl_default, { index: index3 }),
40715
+ showDlog && /* @__PURE__ */ jsx46("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg overflow-hidden flex-1", children: /* @__PURE__ */ jsxs41(
40824
40716
  "div",
40825
40717
  {
40826
40718
  ref: logEndRef,
@@ -40831,7 +40723,7 @@ var Preview = ({
40831
40723
  style: { height },
40832
40724
  onClick: () => setIsOpen(true),
40833
40725
  children: [
40834
- /* @__PURE__ */ jsx47(M10, { id: "tooltip" }),
40726
+ /* @__PURE__ */ jsx46(M10, { id: "tooltip" }),
40835
40727
  logData
40836
40728
  ]
40837
40729
  }
@@ -40840,15 +40732,15 @@ var Preview = ({
40840
40732
  ]
40841
40733
  }
40842
40734
  ),
40843
- showFflog && /* @__PURE__ */ jsx47(Fflog_default, { index: index3 }),
40844
- /* @__PURE__ */ jsx47(
40735
+ showFflog && /* @__PURE__ */ jsx46(Fflog_default, { index: index3 }),
40736
+ /* @__PURE__ */ jsx46(
40845
40737
  Modal_default,
40846
40738
  {
40847
40739
  open: isOpen,
40848
40740
  setOpen: () => setIsOpen(!isOpen),
40849
40741
  title: "Log Message",
40850
- element: /* @__PURE__ */ jsx47("div", { className: "custom-scroll overflow-y-auto p-3 h-[300px]", children: logData }),
40851
- icon: /* @__PURE__ */ jsx47(FileClock, { "aria-hidden": "true", className: "size-6 text-yellow-600" }),
40742
+ element: /* @__PURE__ */ jsx46("div", { className: "custom-scroll overflow-y-auto p-3 h-[300px]", children: logData }),
40743
+ icon: /* @__PURE__ */ jsx46(FileClock, { "aria-hidden": "true", className: "size-6 text-yellow-600" }),
40852
40744
  positiveLabel: "Copy",
40853
40745
  positiveCommand: () => {
40854
40746
  navigator.clipboard.writeText(message.join("\n"));
@@ -40860,11 +40752,11 @@ var Preview = ({
40860
40752
  var Preview_default = Preview;
40861
40753
 
40862
40754
  // src/components/xcoder/StreamControl.tsx
40863
- import { useState as useState31 } from "react";
40864
- import { jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
40755
+ import { useState as useState30 } from "react";
40756
+ import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
40865
40757
  var StreamControl = ({ index: index3 }) => {
40866
- const [bufferValue, setBufferValue] = useState31(0);
40867
- const [syncValue, setSyncValue] = useState31(0);
40758
+ const [bufferValue, setBufferValue] = useState30(0);
40759
+ const [syncValue, setSyncValue] = useState30(0);
40868
40760
  const minBuffer = 0;
40869
40761
  const maxBuffer = 100;
40870
40762
  const minSync = -30;
@@ -40877,45 +40769,45 @@ var StreamControl = ({ index: index3 }) => {
40877
40769
  true,
40878
40770
  1e3
40879
40771
  );
40880
- return /* @__PURE__ */ jsxs43("div", { className: "w-80 space-y-3", children: [
40881
- /* @__PURE__ */ jsx48("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-3 max-h-[300px] min-h-[100px] overflow-auto", children: /* @__PURE__ */ jsxs43("div", { className: "text-xs space-y-2 text-gray-800 dark:text-slate-200", children: [
40882
- /* @__PURE__ */ jsxs43("div", { className: "space-y-1", children: [
40883
- /* @__PURE__ */ jsxs43("div", { className: "flex gap-2", children: [
40884
- /* @__PURE__ */ jsx48("span", { className: "font-medium", children: "Service Name:" }),
40885
- /* @__PURE__ */ jsx48("span", { className: "truncate", children: data?.service_name ?? "\u2014" })
40772
+ return /* @__PURE__ */ jsxs42("div", { className: "w-80 space-y-3", children: [
40773
+ /* @__PURE__ */ jsx47("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-3 max-h-[300px] min-h-[100px] overflow-auto", children: /* @__PURE__ */ jsxs42("div", { className: "text-xs space-y-2 text-gray-800 dark:text-slate-200", children: [
40774
+ /* @__PURE__ */ jsxs42("div", { className: "space-y-1", children: [
40775
+ /* @__PURE__ */ jsxs42("div", { className: "flex gap-2", children: [
40776
+ /* @__PURE__ */ jsx47("span", { className: "font-medium", children: "Service Name:" }),
40777
+ /* @__PURE__ */ jsx47("span", { className: "truncate", children: data?.service_name ?? "\u2014" })
40886
40778
  ] }),
40887
- /* @__PURE__ */ jsxs43("div", { className: "flex gap-2", children: [
40888
- /* @__PURE__ */ jsx48("span", { className: "font-medium", children: "Service Provider:" }),
40889
- /* @__PURE__ */ jsx48("span", { className: "truncate", children: data?.service_provider ?? "\u2014" })
40779
+ /* @__PURE__ */ jsxs42("div", { className: "flex gap-2", children: [
40780
+ /* @__PURE__ */ jsx47("span", { className: "font-medium", children: "Service Provider:" }),
40781
+ /* @__PURE__ */ jsx47("span", { className: "truncate", children: data?.service_provider ?? "\u2014" })
40890
40782
  ] })
40891
40783
  ] }),
40892
- /* @__PURE__ */ jsxs43("div", { className: "space-y-1.5 pt-2", children: [
40893
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
40894
- /* @__PURE__ */ jsx48(Video, { className: "w-4 h-4 text-sky-400" }),
40895
- /* @__PURE__ */ jsxs43("span", { className: "truncate", children: [
40784
+ /* @__PURE__ */ jsxs42("div", { className: "space-y-1.5 pt-2", children: [
40785
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
40786
+ /* @__PURE__ */ jsx47(Video, { className: "w-4 h-4 text-sky-400" }),
40787
+ /* @__PURE__ */ jsxs42("span", { className: "truncate", children: [
40896
40788
  "Video 0: ",
40897
40789
  data?.input_streans[1].input_stream.type
40898
40790
  ] })
40899
40791
  ] }),
40900
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
40901
- /* @__PURE__ */ jsx48(Volume2, { className: "w-4 h-4 text-emerald-400" }),
40902
- /* @__PURE__ */ jsxs43("span", { className: "truncate", children: [
40792
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
40793
+ /* @__PURE__ */ jsx47(Volume2, { className: "w-4 h-4 text-emerald-400" }),
40794
+ /* @__PURE__ */ jsxs42("span", { className: "truncate", children: [
40903
40795
  "Audio 1: ",
40904
40796
  data?.input_streans[0].input_stream.type
40905
40797
  ] })
40906
40798
  ] })
40907
40799
  ] })
40908
40800
  ] }) }),
40909
- /* @__PURE__ */ jsx48("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-3", children: /* @__PURE__ */ jsxs43("div", { className: "space-y-3 text-slate-200 text-xs", children: [
40910
- /* @__PURE__ */ jsx48(SliderField_default, { value: bufferValue, setValue: setBufferValue, label: "Fifo Size:", min: minBuffer, max: maxBuffer }),
40911
- /* @__PURE__ */ jsx48(SliderField_default, { value: syncValue, setValue: setSyncValue, label: "A/V Sync:", min: minSync, max: maxSync, content: ["<", ">"], step: 10 }),
40912
- /* @__PURE__ */ jsxs43("div", { className: "pt-2 border-t border-slate-700 text-xs text-gray-700 dark:text-slate-300 flex justify-between", children: [
40913
- /* @__PURE__ */ jsxs43("span", { children: [
40801
+ /* @__PURE__ */ jsx47("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-3", children: /* @__PURE__ */ jsxs42("div", { className: "space-y-3 text-slate-200 text-xs", children: [
40802
+ /* @__PURE__ */ jsx47(SliderField_default, { value: bufferValue, setValue: setBufferValue, label: "Fifo Size:", min: minBuffer, max: maxBuffer }),
40803
+ /* @__PURE__ */ jsx47(SliderField_default, { value: syncValue, setValue: setSyncValue, label: "A/V Sync:", min: minSync, max: maxSync, content: ["<", ">"], step: 10 }),
40804
+ /* @__PURE__ */ jsxs42("div", { className: "pt-2 border-t border-slate-700 text-xs text-gray-700 dark:text-slate-300 flex justify-between", children: [
40805
+ /* @__PURE__ */ jsxs42("span", { children: [
40914
40806
  "Buffer: ",
40915
40807
  bufferValue,
40916
40808
  " frames"
40917
40809
  ] }),
40918
- /* @__PURE__ */ jsxs43("span", { children: [
40810
+ /* @__PURE__ */ jsxs42("span", { children: [
40919
40811
  "Sync: ",
40920
40812
  syncValue > 0 ? "+" : "",
40921
40813
  syncValue,
@@ -40928,8 +40820,8 @@ var StreamControl = ({ index: index3 }) => {
40928
40820
  var StreamControl_default = StreamControl;
40929
40821
 
40930
40822
  // src/components/xcoder/VideoPlayer.tsx
40931
- import { useEffect as useEffect24, useMemo as useMemo9, useRef as useRef11 } from "react";
40932
- import { jsx as jsx49 } from "react/jsx-runtime";
40823
+ import { useEffect as useEffect23, useMemo as useMemo9, useRef as useRef11 } from "react";
40824
+ import { jsx as jsx48 } from "react/jsx-runtime";
40933
40825
  var VideoPlayer = ({
40934
40826
  pgmIndex,
40935
40827
  vuChannels,
@@ -40940,7 +40832,7 @@ var VideoPlayer = ({
40940
40832
  const videoRef = useRef11(dummyCanvas);
40941
40833
  const prevRawChannelsRef = useRef11(null);
40942
40834
  const playerRef = useRef11(null);
40943
- useEffect24(() => {
40835
+ useEffect23(() => {
40944
40836
  let cancelled = false;
40945
40837
  if (!videoRef.current) {
40946
40838
  console.warn("Video canvas not ready yet");
@@ -41061,7 +40953,7 @@ var VideoPlayer = ({
41061
40953
  initPlayer();
41062
40954
  }
41063
40955
  }, [pgmIndex]);
41064
- return /* @__PURE__ */ jsx49(
40956
+ return /* @__PURE__ */ jsx48(
41065
40957
  "canvas",
41066
40958
  {
41067
40959
  ref: videoRef,
@@ -41072,15 +40964,15 @@ var VideoPlayer = ({
41072
40964
  var VideoPlayer_default = VideoPlayer;
41073
40965
 
41074
40966
  // src/components/xcoder/VUMeter.tsx
41075
- import { useRef as useRef12, useEffect as useEffect25, useCallback as useCallback4, useState as useState32 } from "react";
41076
- import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
40967
+ import { useRef as useRef12, useEffect as useEffect24, useCallback as useCallback4, useState as useState31 } from "react";
40968
+ import { jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
41077
40969
  var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) => {
41078
- const [tickerTarget, setTickerTarget] = useState32({ left: 0, right: 0 });
41079
- const [tickerTransition, setTickerTransition] = useState32({
40970
+ const [tickerTarget, setTickerTarget] = useState31({ left: 0, right: 0 });
40971
+ const [tickerTransition, setTickerTransition] = useState31({
41080
40972
  left: 0,
41081
40973
  right: 0
41082
40974
  });
41083
- const [resetVUTimeout, setResetVUTimeout] = useState32(0);
40975
+ const [resetVUTimeout, setResetVUTimeout] = useState31(0);
41084
40976
  const tickerLeftRef = useRef12(null);
41085
40977
  const tickerRightRef = useRef12(null);
41086
40978
  const blockerLeftRef = useRef12(null);
@@ -41135,7 +41027,7 @@ var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) =>
41135
41027
  } catch (e10) {
41136
41028
  }
41137
41029
  }, []);
41138
- useEffect25(() => {
41030
+ useEffect24(() => {
41139
41031
  calcVolume();
41140
41032
  if (resetVUTimeout) {
41141
41033
  clearTimeout(resetVUTimeout);
@@ -41150,9 +41042,9 @@ var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) =>
41150
41042
  const MIN_DB = -70;
41151
41043
  const MAX_DB = 0;
41152
41044
  const measures = [0, -10, -20, -30, -40, -50, -60, -70];
41153
- return /* @__PURE__ */ jsxs44("div", { className: "flex w-full h-full justify-center", children: [
41154
- /* @__PURE__ */ jsx50("div", { className: displayMarks ? "mt-[60px]" : "hidden", children: measures.map((db) => {
41155
- return /* @__PURE__ */ jsxs44(
41045
+ return /* @__PURE__ */ jsxs43("div", { className: "flex w-full h-full justify-center", children: [
41046
+ /* @__PURE__ */ jsx49("div", { className: displayMarks ? "mt-[60px]" : "hidden", children: measures.map((db) => {
41047
+ return /* @__PURE__ */ jsxs43(
41156
41048
  "div",
41157
41049
  {
41158
41050
  style: { marginBottom: `${(db - MIN_DB) / (MAX_DB - MIN_DB) * 100}px`, marginRight: "25px", textAlignLast: "center" },
@@ -41173,15 +41065,15 @@ var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) =>
41173
41065
  db
41174
41066
  );
41175
41067
  }) }),
41176
- /* @__PURE__ */ jsxs44("div", { className: `h-full w-full text-xs text-center text-white`, style: { maxWidth: `${width}` }, children: [
41177
- /* @__PURE__ */ jsxs44("div", { className: "flex border border-gray-400 w-full h-[96%] rotate-180 scale-x-[-1]", children: [
41178
- /* @__PURE__ */ jsxs44("div", { ref: fillerRef, className: "w-1/2 h-full", style: { background: "linear-gradient(180deg, rgba(0, 187, 0, 1) 0%, rgba(255, 162, 0, 1) 50%, rgba(255, 0, 0, 1) 100%)", borderRadius: "inherit" }, children: [
41179
- /* @__PURE__ */ jsx50("div", { ref: blockerLeftRef, className: "absolute bg-gray-200 dark:bg-[#18191d] bottom-0 w-1/2", style: { height: `${100 - volume[index3].left}%`, transition: "height 0.1s ease-out" } }),
41180
- /* @__PURE__ */ jsx50("div", { ref: tickerLeftRef, className: "absolute h-[5px] w-1/2 bg-white border border-black", style: { top: `${tickerTarget.left}%`, transition: `top ${tickerTransition.left}s ease-out` } })
41068
+ /* @__PURE__ */ jsxs43("div", { className: `h-full w-full text-xs text-center text-white`, style: { maxWidth: `${width}` }, children: [
41069
+ /* @__PURE__ */ jsxs43("div", { className: "flex border border-gray-400 w-full h-[96%] rotate-180 scale-x-[-1]", children: [
41070
+ /* @__PURE__ */ jsxs43("div", { ref: fillerRef, className: "w-1/2 h-full", style: { background: "linear-gradient(180deg, rgba(0, 187, 0, 1) 0%, rgba(255, 162, 0, 1) 50%, rgba(255, 0, 0, 1) 100%)", borderRadius: "inherit" }, children: [
41071
+ /* @__PURE__ */ jsx49("div", { ref: blockerLeftRef, className: "absolute bg-gray-200 dark:bg-[#18191d] bottom-0 w-1/2", style: { height: `${100 - volume[index3].left}%`, transition: "height 0.1s ease-out" } }),
41072
+ /* @__PURE__ */ jsx49("div", { ref: tickerLeftRef, className: "absolute h-[5px] w-1/2 bg-white border border-black", style: { top: `${tickerTarget.left}%`, transition: `top ${tickerTransition.left}s ease-out` } })
41181
41073
  ] }),
41182
- /* @__PURE__ */ jsxs44("div", { className: "w-1/2 h-full", style: { background: "linear-gradient(180deg, rgba(0, 187, 0, 1) 0%, rgba(255, 162, 0, 1) 50%, rgba(255, 0, 0, 1) 100%)", borderRadius: "inherit" }, children: [
41183
- /* @__PURE__ */ jsx50("div", { ref: blockerRightRef, className: "absolute bg-gray-200 dark:bg-[#18191d] bottom-0 w-1/2", style: { height: `${100 - volume[index3].right}%`, transition: "height 0.1s ease-out" } }),
41184
- /* @__PURE__ */ jsx50("div", { ref: tickerRightRef, className: "absolute h-[5px] w-1/2 bg-white border border-black", style: { top: `${tickerTarget.right}%`, transition: `top ${tickerTransition.right}s ease-out` } })
41074
+ /* @__PURE__ */ jsxs43("div", { className: "w-1/2 h-full", style: { background: "linear-gradient(180deg, rgba(0, 187, 0, 1) 0%, rgba(255, 162, 0, 1) 50%, rgba(255, 0, 0, 1) 100%)", borderRadius: "inherit" }, children: [
41075
+ /* @__PURE__ */ jsx49("div", { ref: blockerRightRef, className: "absolute bg-gray-200 dark:bg-[#18191d] bottom-0 w-1/2", style: { height: `${100 - volume[index3].right}%`, transition: "height 0.1s ease-out" } }),
41076
+ /* @__PURE__ */ jsx49("div", { ref: tickerRightRef, className: "absolute h-[5px] w-1/2 bg-white border border-black", style: { top: `${tickerTarget.right}%`, transition: `top ${tickerTransition.right}s ease-out` } })
41185
41077
  ] })
41186
41078
  ] }),
41187
41079
  index3 + 1
@@ -41191,7 +41083,7 @@ var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) =>
41191
41083
  var VUMeter_default = VUBar;
41192
41084
 
41193
41085
  // src/hooks/useSettings.ts
41194
- import { useState as useState33, useEffect as useEffect26, useCallback as useCallback5, useMemo as useMemo10 } from "react";
41086
+ import { useState as useState32, useEffect as useEffect25, useCallback as useCallback5, useMemo as useMemo10 } from "react";
41195
41087
  import { useQuery as useQuery2, useMutation, useQueryClient } from "@tanstack/react-query";
41196
41088
  function useSettings(defaultSettings4, options) {
41197
41089
  const {
@@ -41206,8 +41098,8 @@ function useSettings(defaultSettings4, options) {
41206
41098
  refetchInterval
41207
41099
  } = options;
41208
41100
  const queryClient = useQueryClient();
41209
- const [settings, setSettings] = useState33(defaultSettings4);
41210
- const [savedSettings, setSavedSettings] = useState33(defaultSettings4);
41101
+ const [settings, setSettings] = useState32(defaultSettings4);
41102
+ const [savedSettings, setSavedSettings] = useState32(defaultSettings4);
41211
41103
  const {
41212
41104
  data,
41213
41105
  isLoading,
@@ -41222,7 +41114,7 @@ function useSettings(defaultSettings4, options) {
41222
41114
  enabled,
41223
41115
  refetchInterval
41224
41116
  });
41225
- useEffect26(() => {
41117
+ useEffect25(() => {
41226
41118
  if (data) {
41227
41119
  setSettings(data);
41228
41120
  setSavedSettings(data);
@@ -41277,13 +41169,13 @@ function useSettings(defaultSettings4, options) {
41277
41169
  }
41278
41170
 
41279
41171
  // src/hooks/useAvailableSubservices.ts
41280
- import { useEffect as useEffect27, useState as useState34 } from "react";
41172
+ import { useEffect as useEffect26, useState as useState33 } from "react";
41281
41173
  function useAvailableSubservices(serviceKey, fallbackCount = 4) {
41282
- const [options, setOptions] = useState34(
41174
+ const [options, setOptions] = useState33(
41283
41175
  Array.from({ length: fallbackCount }).map((_7, i14) => ({ label: `Channel ${i14 + 1}`, value: `${i14}` }))
41284
41176
  );
41285
- const [loading, setLoading] = useState34(false);
41286
- useEffect27(() => {
41177
+ const [loading, setLoading] = useState33(false);
41178
+ useEffect26(() => {
41287
41179
  let mounted = true;
41288
41180
  (async () => {
41289
41181
  setLoading(true);
@@ -41324,6 +41216,7 @@ export {
41324
41216
  Accordion_default as Accordion,
41325
41217
  AddNetwork_default as AddNetwork,
41326
41218
  AudioGroup_default as AudioGroup,
41219
+ AuthContext,
41327
41220
  AuthProvider,
41328
41221
  CheckboxField_default as CheckboxField,
41329
41222
  ColorField_default as ColorField,
@@ -41341,7 +41234,6 @@ export {
41341
41234
  InterfacesTable_default as InterfacesTable,
41342
41235
  InterfacesTimeseries_default as InterfacesTimeseries,
41343
41236
  Livecast_default as Livecast,
41344
- MetadataLoader,
41345
41237
  Metrics_default as MetricBar,
41346
41238
  Auth_default as MiddlewareAuthGroup,
41347
41239
  Channels_default as MiddlewareChannelsGroup,
@@ -41355,7 +41247,6 @@ export {
41355
41247
  Protocol_default as Protocol,
41356
41248
  ProtocolGroup_default as ProtocolGroup,
41357
41249
  RangeField_default as RangeField,
41358
- RemoteModule,
41359
41250
  RequireAuth_default as RequireAuth,
41360
41251
  Role,
41361
41252
  SaveDiscard_default as SaveDiscard,
@@ -41366,6 +41257,7 @@ export {
41366
41257
  SliderField_default as SliderField,
41367
41258
  StreamControl_default as StreamControl,
41368
41259
  SwitchField_default as SwitchField,
41260
+ ThemeContext,
41369
41261
  ThemeProvider,
41370
41262
  VUMeter_default as VUBar,
41371
41263
  Validation_default as ValidationItem,
@@ -41387,8 +41279,6 @@ export {
41387
41279
  getRefreshToken,
41388
41280
  hostConfigLoader,
41389
41281
  isFirstRun,
41390
- loadRemoteModule,
41391
- metadataLoader,
41392
41282
  registry,
41393
41283
  saveConfig,
41394
41284
  setAccessToken,