@odigos/ui-kit 0.0.252 → 0.0.253

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 (45) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/docs/api-context.md +44 -38
  3. package/lib/chunks/connections-scope-h3bbPbRd.js +1 -0
  4. package/lib/chunks/{flow-CAOY59Tu.js → flow-BnkrFBJL.js} +1 -1
  5. package/lib/chunks/{helpers-CXxRJd5C.js → helpers-BEkhis3j.js} +1 -1
  6. package/lib/chunks/{index-BgflYoEI.js → index-DIVbcB6F.js} +1 -1
  7. package/lib/chunks/source-instrument-form-context-6ViZM1Z_.js +1 -0
  8. package/lib/chunks/{ui-components-Dc15jc-B.js → ui-components-TeG65JGy.js} +1 -1
  9. package/lib/chunks/use-odigos-api-li2VrVHH.js +5 -0
  10. package/lib/components/v2.js +1 -1
  11. package/lib/components.js +1 -1
  12. package/lib/constants.js +1 -1
  13. package/lib/containers/v2.js +138 -138
  14. package/lib/containers.js +7 -7
  15. package/lib/contexts/odigos-api/hooks/use-actions-api.d.ts +16 -8
  16. package/lib/contexts/odigos-api/hooks/use-collectors-api.d.ts +12 -1
  17. package/lib/contexts/odigos-api/hooks/use-config-api.d.ts +10 -1
  18. package/lib/contexts/odigos-api/hooks/use-data-streams-api.d.ts +19 -13
  19. package/lib/contexts/odigos-api/hooks/use-destinations-api.d.ts +30 -21
  20. package/lib/contexts/odigos-api/hooks/use-instrumentation-rules-api.d.ts +12 -4
  21. package/lib/contexts/odigos-api/hooks/use-metrics-api.d.ts +9 -3
  22. package/lib/contexts/odigos-api/hooks/use-namespace-api.d.ts +14 -4
  23. package/lib/contexts/odigos-api/hooks/use-profiling-api.d.ts +5 -0
  24. package/lib/contexts/odigos-api/hooks/use-sampling-api.d.ts +18 -1
  25. package/lib/contexts/odigos-api/hooks/use-service-map-api.d.ts +8 -1
  26. package/lib/contexts/odigos-api/hooks/use-snapshots-api.d.ts +24 -0
  27. package/lib/contexts/odigos-api/hooks/use-sources-api.d.ts +24 -6
  28. package/lib/contexts/odigos-api/hooks/use-tokens-api.d.ts +11 -4
  29. package/lib/contexts/odigos-api/index.d.ts +3 -3
  30. package/lib/contexts/odigos-api/types.d.ts +26 -27
  31. package/lib/contexts/odigos-api/use-odigos-api.d.ts +21 -36
  32. package/lib/contexts/odigos-api.js +1 -1
  33. package/lib/contexts.js +1 -1
  34. package/lib/functions.js +1 -1
  35. package/lib/hooks.js +1 -1
  36. package/lib/snippets/v2.js +1 -1
  37. package/lib/snippets.js +1 -1
  38. package/lib/store.js +1 -1
  39. package/lib/theme.js +1 -1
  40. package/lib/types.js +1 -1
  41. package/lib/visuals.js +1 -1
  42. package/package.json +1 -1
  43. package/lib/chunks/connections-scope-Cb3gZ8MW.js +0 -1
  44. package/lib/chunks/source-instrument-form-context-Rk2YlyRb.js +0 -1
  45. package/lib/chunks/use-odigos-api-qSWLSy9S.js +0 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.253](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.252...ui-kit-v0.0.253) (2026-06-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **api:** streamline operation execution by introducing custom executor support and removing legacy types ([#1006](https://github.com/odigos-io/ui-kit/issues/1006)) ([c425b82](https://github.com/odigos-io/ui-kit/commit/c425b82568dfa61bf96b4fefc068085c1548d79b))
9
+
3
10
  ## [0.0.252](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.251...ui-kit-v0.0.252) (2026-06-16)
4
11
 
5
12
 
@@ -9,7 +9,7 @@
9
9
  - **Containers fetch their own data.** Every `_v2` container that previously took a forest of API-function props now consumes `useOdigosApi()` / `useApiQuery(key)` from the kit's API context. Pages collapse to one-liners.
10
10
  - **Hosts ship a thin adapter** (~250 lines) mapping GraphQL documents to typed `Operation` slots. No more 16 CRUD hooks per host (`useSourceCRUD`, `useDestinationCRUD`, …).
11
11
  - **Apollo cache is the entity store.** The kit's `useEntityStore` Zustand store is gone — sources/destinations/actions/rules/namespaces all flow through Apollo's normalized cache via `useApiQuery('GET_X', …, { fetchPolicy: 'cache-first' })`. Mutations call `runMutation` then `await fetchAll()`; cache writes broadcast to every active subscriber.
12
- - **Uniform API surface.** `useOdigosApi()` returns `{ sourcesApi, destinationsApi, actionsApi, instrumentationRulesApi, …, capabilities, resetCache }` — every entity-list namespace exposes `{ items, loading, fetchAll,}`. No aliasing on destructure, no stuttery `sourcesApi.sources`.
12
+ - **Uniform API surface.** `useOdigosApi()` returns `{ sourcesApi, destinationsApi, actionsApi, instrumentationRulesApi, …, capabilities, resetCache }` — every namespace exposes its reactive reads as `use…()` sub-hooks (`sourcesApi.useSources()` → `{ items, loading, refetch }`) plus imperative methods (`fetchAll`, `create`, ) as top-level keys. No aliasing on destructure, no stuttery `sourcesApi.sources`.
13
13
  - **Strict types end-to-end.** ~80 named `OdigosApiOperations` slots, each typed as `Operation<TData, TVars>`. Zero `any`, zero envelope/bare unions, zero `unknown` data fields at the public hook surface.
14
14
  - **Storybook is production-unaware.** The kit's runtime has no mock context, no interceptor hooks. The Storybook mock provider uses a custom Apollo `ApolloLink` that intercepts stub queries with predefined data.
15
15
  - **Mock data lives in `.storybook/`.** `src/mock-data/` was relocated; production builds never touch it.
@@ -89,7 +89,7 @@ graph TB
89
89
  ADAPTER --> PROVIDER[OdigosApiProvider]
90
90
  PROVIDER --> APOLLO["ApolloClient<br/>(normalized cache)"]
91
91
  PROVIDER --> CTX[OdigosApiContext]
92
- CTX --> HOOK1["useOdigosApi()<br/>sourcesApi.items, fetchAll, …"]
92
+ CTX --> HOOK1["useOdigosApi()<br/>sourcesApi.useSources(), fetchAll, …"]
93
93
  CTX --> HOOK2["useApiQuery('GET_X')"]
94
94
  CTX --> HOOK3["useApiMutation('CREATE_X')"]
95
95
  HOOK1 -.reads / writes.-> APOLLO
@@ -353,16 +353,17 @@ const [updateToken, { loading: saving }] = useApiMutation('UPDATE_TOKEN', {
353
353
 
354
354
  `useApiQuery` consults the operations map, applies `transformVariables` / `transformResult` automatically, and returns `{ data: SlotData<K>, loading, error, refetch, unsupported }`. The `unsupported` flag is `true` when the host adapter omitted the slot — containers either render an "operation not supported" UI or hide the affordance via `capabilities.canX`.
355
355
 
356
- ### Imperative — `useOdigosApi()` + per-domain APIs
356
+ ### Imperative + reactive — `useOdigosApi()` + per-domain APIs
357
357
 
358
358
  For places that need both a cached list and dispatchable methods (event handlers, side-effect chains, drawers):
359
359
 
360
360
  ```typescript
361
- // Subscribe to the entity lists this view actually reads.
362
- const { sourcesApi } = useOdigosApi({ subscribe: ['sources'] });
361
+ const { sourcesApi } = useOdigosApi();
363
362
 
364
- // Cached list — read-only, kept fresh by Apollo's cache + SSE-driven refetch.
365
- const { items: sources, loading } = sourcesApi;
363
+ // Cached list — read it via the domain's reactive `use…()` sub-hook. The
364
+ // sub-hook owns `useApiQuery('GET_WORKLOADS')`, so calling it IS the
365
+ // subscription. Kept fresh by Apollo's cache + SSE-driven refetch.
366
+ const { items: sources, loading } = sourcesApi.useSources();
366
367
 
367
368
  const onClick = async () => {
368
369
  await sourcesApi.update(sourceId, formData);
@@ -371,50 +372,55 @@ const onClick = async () => {
371
372
  };
372
373
  ```
373
374
 
374
- Every entity-list namespace (`sourcesApi`, `destinationsApi`, `actionsApi`, `instrumentationRulesApi`, `namespacesApi`, `dataStreamsApi`) follows the same `{ items, loading, fetchAll, … }` shape. The `*Api` suffix on the top-level keys means destructuring stays rename-free even when the consumer has a local `sources` / `destinations` variable.
375
+ Every domain API splits its surface into two consistent halves:
375
376
 
376
- #### `subscribe` opt-in the six entity-list domains
377
+ - **Reactive reads** are exposed as `use…()` sub-hooks (`sourcesApi.useSources()`, `actionsApi.useActions()`, `destinationsApi.useDestinations()`, `collectorsApi.useGatewayInfo()`, `configApi.useEffectiveConfig()`, …). Each owns a `useApiQuery('GET_…')` and returns the reactive `{ items, loading, refetch }` (list hooks) or `{ data, loading, … }` (single/parameterized hooks).
378
+ - **Imperative methods** (`fetchAll`, `create`, `update`, `remove`, `persist`, `testConnection`, …) stay as plain top-level keys.
377
379
 
378
- The six entity-list domain APIs (`sourcesApi`, `destinationsApi`, `actionsApi`, `instrumentationRulesApi`, `namespacesApi`, `dataStreamsApi`) own a `useApiQuery('GET_…')` subscription that auto-fetches and broadcasts to every consumer. **Without an explicit opt-in those subscriptions stay `skip: true`** — calling `useOdigosApi()` from a page that only needs `configApi` (e.g. `/settings`) does NOT trigger every list query. Containers that read `.items` / `.loading` MUST list the domains they need:
380
+ The `*Api` suffix on the top-level keys means destructuring stays rename-free even when the consumer has a local `sources` / `destinations` variable.
379
381
 
380
- ```typescript
381
- // Module-level constant so the array reference is stable across renders.
382
- const SUBSCRIBE_ENTITIES: SubscribableDomain[] = ['sources', 'destinations', 'actions', 'rules'];
382
+ #### Reactive reads via `use…()` sub-hooks
383
+
384
+ Calling a `use…()` sub-hook is the opt-in: the underlying `useApiQuery('GET_…')` only mounts (and the network request only fires) for the queries a container actually reads. `useOdigosApi()` itself fires nothing — calling it from a page that only needs `configApi` (e.g. `/settings`) does NOT trigger any list query. Because the sub-hooks are React hooks, call them unconditionally at the top level of a container, exactly like any other hook:
383
385
 
386
+ ```typescript
384
387
  export const Columns: FC = () => {
385
- const { sourcesApi, destinationsApi, actionsApi, instrumentationRulesApi } = useOdigosApi({
386
- subscribe: SUBSCRIBE_ENTITIES,
387
- });
388
- const { items: sources, loading: sourcesLoading } = sourcesApi;
388
+ const { sourcesApi, destinationsApi, actionsApi, instrumentationRulesApi } = useOdigosApi();
389
+ const { items: sources, loading: sourcesLoading } = sourcesApi.useSources();
390
+ const { items: destinations } = destinationsApi.useDestinations();
391
+ const { items: actions } = actionsApi.useActions();
392
+ const { items: rules } = instrumentationRulesApi.useRules();
389
393
  // …
390
394
  };
391
395
  ```
392
396
 
393
- Symptoms of forgetting the opt-in: empty lists in the UI, `loading` permanently `false`, no auto-refresh on SSE. The fix is always to add the missing domain key. Containers that only call imperative methods (create / update / delete / fetchAll) leave the option off entirely — the domain still exposes those methods, just without the auto-fetch.
394
-
395
- | Container | Subscribes to |
396
- | --------------------------------------- | ------------------------------------------------- |
397
- | `_v2/overview/columns` | `['sources', 'destinations', 'actions', 'rules']` |
398
- | `_v2/overview/drawers` | `['sources']` |
399
- | `_v2/overview/filters` | `['sources', 'namespaces']` |
400
- | `_v2/overview/search` | `['sources', 'destinations', 'actions', 'rules']` |
401
- | `_v2/overview/data-stream-select` | `['dataStreams']` |
402
- | `_v2/sampling-rules` | `['sources']` |
403
- | `service-map` | `['sources']` |
404
- | `_v2/_drawers/edit-source-drawer/peers` | `['sources']` |
405
- | `_v2/_drawers/system-drawer/diagnose` | `['namespaces']` |
406
- | `contexts/destination-form-context` | `['destinations']` |
397
+ Symptoms of forgetting to call the sub-hook: empty lists in the UI, `loading` permanently `false`, no auto-refresh on SSE. The fix is always to call the missing `use…()` sub-hook. Containers that only call imperative methods (create / update / delete / fetchAll) never call the sub-hook — the domain still exposes those methods, just without any auto-fetch.
398
+
399
+ | Container | Reactive sub-hooks called |
400
+ | --------------------------------------- | ------------------------------------------------------------------------------- |
401
+ | `_v2/overview/columns` | `useSources()`, `useDestinations()`, `useActions()`, `useRules()` |
402
+ | `_v2/overview/drawers` | `useSources()` |
403
+ | `_v2/overview/filters` | `useSources()`, `useNamespaces()` |
404
+ | `_v2/overview/search` | `useSources()`, `useDestinations()`, `useActions()`, `useRules()` |
405
+ | `_v2/overview/data-stream-select` | `useDataStreams()` |
406
+ | `_v2/sampling-rules` | `useSources()`, `useSamplingRules()` |
407
+ | `service-map` | `useSources()` |
408
+ | `_v2/_drawers/edit-source-drawer/peers` | `useSources()` |
409
+ | `_v2/_drawers/system-drawer/diagnose` | `useNamespaces()` |
410
+ | `_v2/_drawers/add-source-drawer` | `useSnapshots()`, `useNamespaces()` |
411
+ | `_v2/_drawers/add-destination-drawer` | `useDestinations()`, `useDestinationCategories()`, `usePotentialDestinations()` |
412
+ | `contexts/destination-form-context` | `useDestinations()` |
407
413
 
408
414
  The full surface returned by `useOdigosApi()`:
409
415
 
410
416
  ```typescript
411
417
  const {
412
- sourcesApi, // { items, loading, fetchAll, fetchByTargets, fetchById, persist, update, … }
413
- destinationsApi, // { items, loading, fetchAll, create, update, remove, testConnection, }
414
- actionsApi, // { items, loading, fetchAll, create, update, remove }
415
- instrumentationRulesApi, // { items, loading, fetchAll, create, update, remove }
416
- namespacesApi, // { items, loading, fetchAll, persist }
417
- dataStreamsApi, // { items, loading, fetchAll, create, update, remove }
418
+ sourcesApi, // { useSources, fetchAll, fetchByTargets, fetchById, persist, update, usePeerSources, … }
419
+ destinationsApi, // { useDestinations, useDestinationCategories, usePotentialDestinations, fetchAll, create, update, remove, testConnection }
420
+ actionsApi, // { useActions, fetchAll, create, update, remove }
421
+ instrumentationRulesApi, // { useRules, fetchAll, create, update, remove }
422
+ namespacesApi, // { useNamespaces, fetchAll, persist }
423
+ dataStreamsApi, // { useDataStreams, fetchAll, create, update, remove }
418
424
  k8sManifestApi,
419
425
  configApi,
420
426
  describeApi,
@@ -463,7 +469,7 @@ graph LR
463
469
 
464
470
  **Reads.** Every consumer of `useOdigosApi().sourcesApi` registers an Apollo observer of `GET_WORKLOADS` via `useApiQuery`. The first observer fetches over the network, every subsequent one hits the shared cache (`fetchPolicy: 'cache-first'`). Cache writes broadcast — when _any_ refetch lands, every observer re-renders with the new list.
465
471
 
466
- **Writes.** Mutations call `runMutation` and `await fetchAll()` immediately after success. The runner's `client.query({ fetchPolicy: 'network-only' })` writes the response into the cache, which broadcasts. Every container that reads `sourcesApi.items` updates within one render — no Zustand selector hop, no manual `setEntities`. Apollo's request dedup keeps the cost of "fan-out from one mutation" at a single network round-trip.
472
+ **Writes.** Mutations call `runMutation` and `await fetchAll()` immediately after success. The runner's `client.query({ fetchPolicy: 'network-only' })` writes the response into the cache, which broadcasts. Every container that reads `sourcesApi.useSources().items` updates within one render — no Zustand selector hop, no manual `setEntities`. Apollo's request dedup keeps the cost of "fan-out from one mutation" at a single network round-trip.
467
473
 
468
474
  **SSE.** Both host SSE handlers (`useSSE.ts`) drop their old `useEntityStore` imports and refresh through the same `sourcesApi.fetchAll()` / `destinationsApi.fetchAll()` entry points. The deleted-target eviction primitive is gone — for an envelope-aware kit (central-ui's `REMOTE_FETCH` makes generic `cache.modify` impractical), refetching the canonical list is simpler and the result is identical.
469
475
 
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{useMemo as n}from"react";import{b as t,_ as r}from"./use-odigos-api-li2VrVHH.js";const e=({connectionIds:e,children:i})=>{const s=t(),a=n(()=>({operations:s.operations,context:{...s.context,connectionIds:e},apolloConfig:s.apolloConfig}),[s.operations,s.context,s.apolloConfig,e.join(",")]);return o(r.Provider,{value:a,children:i})};export{e as O};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{memo as i,useRef as r,useEffect as n}from"react";import"@xyflow/react/dist/style.css";import d,{useTheme as s}from"styled-components";import{N as a,F as l,I as c,T as p,S as h,g as m,u,a as g,b}from"./ui-components-Dc15jc-B.js";import{Handle as x,Position as f,ReactFlowProvider as y,ReactFlow as w,Controls as v,ControlButton as N,useReactFlow as k}from"@xyflow/react";import{RefreshIcon as $}from"../icons.js";const C=d(l)`
1
+ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{memo as i,useRef as r,useEffect as n}from"react";import"@xyflow/react/dist/style.css";import d,{useTheme as s}from"styled-components";import{N as a,F as l,I as c,T as p,S as h,g as m,u,a as g,b}from"./ui-components-TeG65JGy.js";import{Handle as x,Position as f,ReactFlowProvider as y,ReactFlow as w,Controls as v,ControlButton as N,useReactFlow as k}from"@xyflow/react";import{RefreshIcon as $}from"../icons.js";const C=d(l)`
2
2
  max-width: 300px;
3
3
  padding: 12px;
4
4
  border-radius: 12px;
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useMemo as n,useContext as o,createContext as a,Fragment as s}from"react";import{t as i,c as u,P as l,d as c,e as p,f as d,h as f}from"./ui-components-Dc15jc-B.js";import h from"styled-components";const m=a({platformType:l.K8s,tier:u.Community,version:"v0.0.0"}),v=({children:t,platformType:r,tier:o,version:a})=>{const s=n(()=>({platformType:r,tier:o,version:a}),[r,o,a]);return e(m.Provider,{value:s,children:t})},g=(e,t)=>!t||i(e)>=i(t),y=e=>{const t=o(m),r=g(t.version,e),n=t.platformType===l.Vm;return{...t,isVersionSupported:r,isVm:n,isEnterprise:t.tier===u.Onprem}};function x(){return{sources:[],namespaces:[],languages:[]}}function k(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function S(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function A(e){return null==e||0===e}function T(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:{sources:[],namespaces:[],languages:[]},operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function R(e){return k(e.sourceScopes)?null:e.sourceScopes}function P(e){return R(e)}function b(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function M(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function D(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function I(e){return"all"===e.operationType?null:"httpServer"===e.operationType?D(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function $(e){return"all"===e.operationType?null:"httpServer"===e.operationType?D(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function C(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),percentageAtMost:b(e),operation:I(e)}}function E(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?M(e):null,percentageAtLeast:b(e),operation:$(e)}}function w(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),percentageAtMost:b(e)??0,operation:$(e)}}function L(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:I(e),percentageAtMost:b(e),notes:e.notes||null}}function O(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?M(e):null,operation:$(e),percentageAtLeast:b(e),notes:e.notes||null}}function N(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:$(e),percentageAtMost:b(e)??0,notes:e.notes||null}}const H=["5000","1000","500","100","50"],K=["50","25","10","1","0.5","0.1","0"];function j(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=K.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function z(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function F(e){const t=T(),r=S(e.rule.sourceScopes);const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let o,a,s={durationPreset:"500",customDurationMs:""},i=!1;switch(e.category){case"noisy":o=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=A(u=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:j(u);break;case"highlyRelevant":o=z(e.rule.operation),a=j(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=H.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),i=e.rule.error;break;case"costReduction":o=z(e.rule.operation),a=j(e.rule.percentageAtMost)}var u;return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...o,...s,keepErrors:i,...a}}var X;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(X||(X={}));const J=[X.Action,X.Endpoint,X.Scope,X.Duration],V=h.span`
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useMemo as n,useContext as o,createContext as a,Fragment as s}from"react";import{t as i,c as u,P as l,d as c,e as p,f as d,h as f}from"./ui-components-TeG65JGy.js";import h from"styled-components";const m=a({platformType:l.K8s,tier:u.Community,version:"v0.0.0"}),v=({children:t,platformType:r,tier:o,version:a})=>{const s=n(()=>({platformType:r,tier:o,version:a}),[r,o,a]);return e(m.Provider,{value:s,children:t})},g=(e,t)=>!t||i(e)>=i(t),y=e=>{const t=o(m),r=g(t.version,e),n=t.platformType===l.Vm;return{...t,isVersionSupported:r,isVm:n,isEnterprise:t.tier===u.Onprem}};function x(){return{sources:[],namespaces:[],languages:[]}}function k(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function S(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function A(e){return null==e||0===e}function T(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:{sources:[],namespaces:[],languages:[]},operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function R(e){return k(e.sourceScopes)?null:e.sourceScopes}function P(e){return R(e)}function b(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function M(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function D(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function I(e){return"all"===e.operationType?null:"httpServer"===e.operationType?D(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function $(e){return"all"===e.operationType?null:"httpServer"===e.operationType?D(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function C(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),percentageAtMost:b(e),operation:I(e)}}function E(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?M(e):null,percentageAtLeast:b(e),operation:$(e)}}function w(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),percentageAtMost:b(e)??0,operation:$(e)}}function L(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:I(e),percentageAtMost:b(e),notes:e.notes||null}}function O(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?M(e):null,operation:$(e),percentageAtLeast:b(e),notes:e.notes||null}}function N(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:$(e),percentageAtMost:b(e)??0,notes:e.notes||null}}const H=["5000","1000","500","100","50"],K=["50","25","10","1","0.5","0.1","0"];function j(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=K.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function z(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function F(e){const t=T(),r=S(e.rule.sourceScopes);const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let o,a,s={durationPreset:"500",customDurationMs:""},i=!1;switch(e.category){case"noisy":o=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=A(u=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:j(u);break;case"highlyRelevant":o=z(e.rule.operation),a=j(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=H.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),i=e.rule.error;break;case"costReduction":o=z(e.rule.operation),a=j(e.rule.percentageAtMost)}var u;return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...o,...s,keepErrors:i,...a}}var X;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(X||(X={}));const J=[X.Action,X.Endpoint,X.Scope,X.Duration],V=h.span`
2
2
  font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
3
3
  font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
4
4
  line-height: 20px;
@@ -1,4 +1,4 @@
1
- import{aA as e,ag as a,L as t,a9 as l,aa as r,dT as n,a5 as i,aN as s,ar as o,a7 as d,J as c,ab as u,an as p,dU as h,ae as g,af as m,dV as v,dW as f,V as b,Q as y,U as x,R as C,O as S,aw as $,au as k,b4 as T,c as w,n as A,F as P,a4 as M,ah as L,aJ as I,dX as O,dY as D,aU as z,dZ as N,f as X,d_ as R,ad as H,h as E,d$ as B,e0 as V,e1 as q,e2 as j,e3 as G,e4 as J,e5 as U,ak as K,e6 as F,e7 as W,e8 as Y,e9 as Q,ea as Z,bV as _,eb as ee,ec as ae,ed as te,ee as le,ef as re,eg as ne,eh as ie,ei as se,ej as oe,ek as de,el as ce,aK as ue,em as pe,en as he,eo as ge,ep as me,eq as ve,bI as fe,er as be,es as ye,et as xe,eu as Ce,ev as Se,ew as $e,ex as ke,ey as Te,ez as we,a_ as Ae,q as Pe,eA as Me,S as Le,eB as Ie,b5 as Oe,eC as De,eD as ze,eE as Ne,eF as Xe,by as Re,az as He,eG as Ee,eH as Be,eI as Ve,di as qe,eJ as je,eK as Ge,eL as Je,s as Ue,dg as Ke,a6 as Fe,eM as We,bk as Ye,aM as Qe,N as Ze,l as _e,aQ as ea,du as aa,bj as ta,bq as la,bi as ra,bY as na,eN as ia}from"./ui-components-Dc15jc-B.js";import{jsx as sa,jsxs as oa,Fragment as da}from"react/jsx-runtime";import{D as ca,C as ua,E as pa,u as ha,F as ga,h as ma,f as va,e as fa,G as ba,H as ya,I as xa,i as Ca,m as Sa}from"./helpers-CXxRJd5C.js";import{EditIcon as $a,OdigosLogoTextCentral as ka,OdigosLogoTextEnterprise as Ta,OdigosLogoTextCommunity as wa,OdigosLogoTextColoredCentral as Aa,OdigosLogoTextColoredEnterprise as Pa,OdigosLogoTextColoredCommunity as Ma,ArrowLeftIcon as La,ArrowRightIcon as Ia,VSquareIcon as Oa,VIcon as Da,CopyIcon as za,YamlIcon as Na}from"../icons.js";import Xa,{useMemo as Ra,useCallback as Ha,useState as Ea,useRef as Ba,useEffect as Va,forwardRef as qa,useImperativeHandle as ja}from"react";import Ga,{useTheme as Ja}from"styled-components";const Ua=({isOpen:t,onClose:l,onDeny:r,onApprove:n})=>sa(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:t,onClose:l,denyButton:{label:"Keep editing",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:"Discard changes",variant:a.Primary,onClick:()=>{n?.(),l()}}}),Ka=({isOpen:t,onClose:l,onDeny:r,onApprove:n,action:i="delete",target:s,description:o,overrideApproveButtonLabel:d,overrideDenyButtonLabel:c})=>{const u=i.charAt(0).toUpperCase()+i.substring(1),p=s?.endsWith("s")?"these":"this";return sa(e,{title:`${u}${s?` ${s}`:""}?`,description:o??`Are you sure you want to ${i}${s?` ${p} ${s}`:""}?`,isOpen:t,onClose:l,denyButton:{label:c??"Go back",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:d??u,variant:a.Primary,onClick:()=>{n?.(),l()}}})},Fa=({componentType:e,inputType:a,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C,setValue:S,errorMessage:$,warnMessage:k,helpMessage:T,dropdownOptions:w,dropdownNoSearch:A,dropdownNoCheckbox:P,timeUnits:M,timeDefaultUnit:L})=>{switch(e){case t.Input:return sa(p,{name:g,type:a,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",onChange:e=>{const t=e.target.value;S(a===h.Number?""===t?null:Number(t):t)},errorMessage:$,warnMessage:k,helpMessage:T},g);case t.MultiInput:return sa(u,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.KeyValuePair:return sa(d,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key",placeholder:"Key"},{keyName:"value",label:"Value",placeholder:"Value"}],values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.TextArea:return sa(o,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:C??"",onChange:e=>S(e.target.value),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Dropdown:return sa(s,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!A,options:w?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!P}))||[],values:C?[String(C)]:[],setValues:e=>S(e[0]),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Checkbox:return sa(i,{name:g,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Time:return sa(n,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",setValue:e=>S(e),units:M,defaultUnit:L,errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Toggle:return sa(l,{name:g,labelAlign:r.Right,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:k,helpMessage:T},g);default:return null}},Wa=Ga.div`
1
+ import{aA as e,ag as a,L as t,a9 as l,aa as r,dT as n,a5 as i,aN as s,ar as o,a7 as d,J as c,ab as u,an as p,dU as h,ae as g,af as m,dV as v,dW as f,V as b,Q as y,U as x,R as C,O as S,aw as $,au as k,b4 as T,c as w,n as A,F as P,a4 as M,ah as L,aJ as I,dX as O,dY as D,aU as z,dZ as N,f as X,d_ as R,ad as H,h as E,d$ as B,e0 as V,e1 as q,e2 as j,e3 as G,e4 as J,e5 as U,ak as K,e6 as F,e7 as W,e8 as Y,e9 as Q,ea as Z,bV as _,eb as ee,ec as ae,ed as te,ee as le,ef as re,eg as ne,eh as ie,ei as se,ej as oe,ek as de,el as ce,aK as ue,em as pe,en as he,eo as ge,ep as me,eq as ve,bI as fe,er as be,es as ye,et as xe,eu as Ce,ev as Se,ew as $e,ex as ke,ey as Te,ez as we,a_ as Ae,q as Pe,eA as Me,S as Le,eB as Ie,b5 as Oe,eC as De,eD as ze,eE as Ne,eF as Xe,by as Re,az as He,eG as Ee,eH as Be,eI as Ve,di as qe,eJ as je,eK as Ge,eL as Je,s as Ue,dg as Ke,a6 as Fe,eM as We,bk as Ye,aM as Qe,N as Ze,l as _e,aQ as ea,du as aa,bj as ta,bq as la,bi as ra,bY as na,eN as ia}from"./ui-components-TeG65JGy.js";import{jsx as sa,jsxs as oa,Fragment as da}from"react/jsx-runtime";import{D as ca,C as ua,E as pa,u as ha,F as ga,h as ma,f as va,e as fa,G as ba,H as ya,I as xa,i as Ca,m as Sa}from"./helpers-BEkhis3j.js";import{EditIcon as $a,OdigosLogoTextCentral as ka,OdigosLogoTextEnterprise as Ta,OdigosLogoTextCommunity as wa,OdigosLogoTextColoredCentral as Aa,OdigosLogoTextColoredEnterprise as Pa,OdigosLogoTextColoredCommunity as Ma,ArrowLeftIcon as La,ArrowRightIcon as Ia,VSquareIcon as Oa,VIcon as Da,CopyIcon as za,YamlIcon as Na}from"../icons.js";import Xa,{useMemo as Ra,useCallback as Ha,useState as Ea,useRef as Ba,useEffect as Va,forwardRef as qa,useImperativeHandle as ja}from"react";import Ga,{useTheme as Ja}from"styled-components";const Ua=({isOpen:t,onClose:l,onDeny:r,onApprove:n})=>sa(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:t,onClose:l,denyButton:{label:"Keep editing",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:"Discard changes",variant:a.Primary,onClick:()=>{n?.(),l()}}}),Ka=({isOpen:t,onClose:l,onDeny:r,onApprove:n,action:i="delete",target:s,description:o,overrideApproveButtonLabel:d,overrideDenyButtonLabel:c})=>{const u=i.charAt(0).toUpperCase()+i.substring(1),p=s?.endsWith("s")?"these":"this";return sa(e,{title:`${u}${s?` ${s}`:""}?`,description:o??`Are you sure you want to ${i}${s?` ${p} ${s}`:""}?`,isOpen:t,onClose:l,denyButton:{label:c??"Go back",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:d??u,variant:a.Primary,onClick:()=>{n?.(),l()}}})},Fa=({componentType:e,inputType:a,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C,setValue:S,errorMessage:$,warnMessage:k,helpMessage:T,dropdownOptions:w,dropdownNoSearch:A,dropdownNoCheckbox:P,timeUnits:M,timeDefaultUnit:L})=>{switch(e){case t.Input:return sa(p,{name:g,type:a,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",onChange:e=>{const t=e.target.value;S(a===h.Number?""===t?null:Number(t):t)},errorMessage:$,warnMessage:k,helpMessage:T},g);case t.MultiInput:return sa(u,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.KeyValuePair:return sa(d,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key",placeholder:"Key"},{keyName:"value",label:"Value",placeholder:"Value"}],values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.TextArea:return sa(o,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:C??"",onChange:e=>S(e.target.value),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Dropdown:return sa(s,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!A,options:w?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!P}))||[],values:C?[String(C)]:[],setValues:e=>S(e[0]),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Checkbox:return sa(i,{name:g,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Time:return sa(n,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",setValue:e=>S(e),units:M,defaultUnit:L,errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Toggle:return sa(l,{name:g,labelAlign:r.Right,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:k,helpMessage:T},g);default:return null}},Wa=Ga.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: 24px;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useCallback as a,useMemo as r,useContext as n,createContext as s,useRef as o,useEffect as i}from"react";import{r as l,s as d,A as c,v as u,w as m,x as p,y as h,z as f,B as g,C as v,G as b,H as y,J as D,K as E,L as S,M as k,O as C,Q as A,R as F,U as I,V as w,W as N,c as x,E as R}from"./ui-components-TeG65JGy.js";import{u as P}from"./use-odigos-api-li2VrVHH.js";import{n as O,m as T,i as L,b as M,a as U,d as j,v as K,g as V,u as G}from"./helpers-BEkhis3j.js";const _={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},q=s(null),H="All row fields are required",z="At least one row is required",J=(e,t)=>!!e&&t.every(t=>{const a=e[t];return Array.isArray(a)?a.length>0:!("string"==typeof(r=a)?!r.trim():p(r));var r}),Q=({children:n})=>{const[s,o]=t(null),i=l(_),f=a(e=>{i.resetFormData(),i.handleErrorChange(void 0,void 0,{}),e?.type&&i.handleFormChange("type",e.type),o(e)},[]),g=a(e=>{var t;i.resetFormData((({type:e,name:t,notes:a,disabled:r,signals:n,fields:s})=>({type:e,name:t||"",notes:a||"",disabled:!!r,signals:n??[],fields:s??{}}))(e)),i.handleErrorChange(void 0,void 0,{}),o((t=e.type,c.find(e=>e.type===t)??null))},[]),v=a(()=>{if(!s)return{errorMessage:"No action type selected",preparedFormData:d(_)};const e=(e=>{const t=d(e),a=t.fields||{},r=a[u.UrlTemplatizationRulesGroups];r?.length&&(a[u.UrlTemplatizationRulesGroups]=r.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const n=a[u.AttributeNamesToDelete];n?.length&&(a[u.AttributeNamesToDelete]=n.filter(e=>!!e?.trim()));const s=a[u.Renames];s&&(a[u.Renames]=Object.fromEntries(Object.entries(s).filter(([e,t])=>!!e?.trim()&&!!t?.trim())));const o=a[u.ExtractAttribute];return o?.extractions?.length&&(a[u.ExtractAttribute]={extractions:o.extractions.map(e=>({targetAttributeName:e.targetAttributeName?.trim()||"",lookupKey:e.lookupKey?.trim()||"",dataFormat:e.dataFormat||"",regex:e.regex?.trim()||""})).filter(e=>!!(e.targetAttributeName||e.lookupKey||e.dataFormat||e.regex))}),t.fields=a,t})(i.formData),t={};p(e.signals)&&(t.signals=h.FIELD_IS_REQUIRED),s.type&&Object.assign(t,((e,t,a)=>{const r={},n=t.fields||{},s=a.fields||{};switch(e){case m.K8sAttributes:{const e=!(n[u.CollectContainerAttributes]||n[u.CollectReplicaSetAttributes]||n[u.CollectWorkloadId]||n[u.CollectClusterId]),t=!n[u.LabelsAttributes]?.length,a=!n[u.AnnotationsAttributes]?.length;e&&t&&a&&(r[u.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const s=n[u.LabelsAttributes];s?.some(e=>!J(e,["labelKey","attributeKey","fromSources"]))&&(r[u.LabelsAttributes]=H);const o=n[u.AnnotationsAttributes];o?.some(e=>!J(e,["annotationKey","attributeKey","fromSources"]))&&(r[u.AnnotationsAttributes]=H);break}case m.AddClusterInfo:{const e=n[u.ClusterAttributes];e?.length?e.some(e=>!J(e,["attributeName","attributeStringValue"]))&&(r[u.ClusterAttributes]=H):r[u.ClusterAttributes]=z;break}case m.DeleteAttributes:{const e=s[u.AttributeNamesToDelete]||[],t=n[u.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(r[u.AttributeNamesToDelete]=H):r[u.AttributeNamesToDelete]=e.length?H:z;break}case m.RenameAttributes:{const e=Object.entries(s[u.Renames]||{}),t=Object.entries(n[u.Renames]||{}),a=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?a&&(r[u.Renames]=H):r[u.Renames]=e.length?H:z;break}case m.PiiMasking:{const e=n[u.PiiCategories];e?.length||(r[u.PiiCategories]="Select at least one attribute to mask");break}case m.URLTemplatization:{const e=n[u.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(r[u.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}case m.ExtractAttribute:{const e=n[u.ExtractAttribute]?.extractions||[],t=s[u.ExtractAttribute]?.extractions||[];if(e.length)if(e.some(e=>{if(!e.targetAttributeName?.trim())return!0;const t=!!e.regex?.trim(),a=!!e.lookupKey?.trim();return a!==!!e.dataFormat||t===a}))r[u.ExtractAttribute]="Each row needs a target attribute name and either a regex or both lookup key and data format";else{const t=new Set;e.some(e=>{const a=e.targetAttributeName?.trim()||"";return!!t.has(a)||(t.add(a),!1)})&&(r[u.ExtractAttribute]="Each new span attribute name must be unique")}else r[u.ExtractAttribute]=t.length?H:z;break}}return r})(s.type,e,i.formData)),i.handleErrorChange(void 0,void 0,t);return{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[i,s]),b=r(()=>({selectedOption:s,onSelectOption:f,loadAction:g,genericForm:i,validateFormData:v}),[s,f,g,i,v]);return e(q.Provider,{value:b,children:n})},W=()=>{const e=n(q);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},$={name:""},B=s(null),X=({children:n,defaultExcludeName:s=""})=>{const{dataStreams:i}=f(),[c,u]=t(void 0),[m,p]=t(s),[v,b]=t(void 0),[y,D]=t(null),E=o(null),S=l($),k=a(e=>{S.resetFormData({name:e}),S.handleErrorChange(void 0,void 0,{}),u(void 0),p(e),b(e),D(null),E.current=null},[]),C=a(()=>{const e=d(S.formData),t=(e=>{const t={};return e.name?g(e.name)||(t.name=h.ILLEGAL_K8S_LABEL):t.name=h.FIELD_IS_REQUIRED,t})(e);S.handleErrorChange(void 0,void 0,t);const a=Object.keys(t).length>0?h.REQUIRED_FIELDS:void 0;return u(a),{errorMessage:a,preparedFormData:e}},[S]),A=a(async e=>{const{errorMessage:t,preparedFormData:a}=C();if(t)return;const r=i.find(e=>e.name===a.name&&e.name!==m);if(r)return E.current=e,void D({preparedFormData:a,existingName:r.name,editingName:v});await e(a)},[C,i,m,v]),F=a(async()=>{const e=E.current,t=y?.preparedFormData;E.current=null,D(null),e&&t&&await e(t)},[y]),I=a(()=>{E.current=null,D(null)},[]),w=r(()=>({genericForm:S,loadDataStream:k,editingName:v,validateFormData:C,requestSubmit:A,pendingMerge:y,confirmMerge:F,cancelMerge:I,errorMessage:c,excludeName:m,setExcludeName:p}),[S,k,v,C,A,y,F,I,c,m]);return e(B.Provider,{value:w,children:n})},Y=()=>{const e=n(B);if(!e)throw new Error("useDataStreamFormContext must be used within a DataStreamFormContextProvider");return e},Z={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[]},ee={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,validateFormData:()=>({isOk:!1,preparedFormData:d(Z)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},te=s(ee),ae=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:a,componentProperties:r,displayName:n,initialValue:s,renderCondition:o}=e,i=a===S.Dropdown,l=D(r,{});return{componentType:a,renderCondition:o,name:t,title:n,value:s,placeholder:l.placeholder||(i?"Select an option":void 0),options:i&&Array.isArray(l.values)?l.values.map(e=>({id:e,label:e})):void 0,...l}}),re=({children:n})=>{const{selectedStreamName:s}=f(),{items:o}=P().destinationsApi.useDestinations(),[c,u]=t(null),[m,g]=t(ee.unsavedDestinations),S=r(()=>"number"==typeof c?.unsavedIdx?m[c.unsavedIdx]:void 0,[c,m]),k=a((e,t)=>{c&&(g(t=>[...t,{...e,option:c.option}]),u(t?e=>e?{...e,listType:v.UNSAVED,unsavedIdx:m.length}:null:null))},[c,m.length]),C=a((e,t,a)=>{c&&(g(a=>a.map((a,r)=>r===e?{...a,...t,option:c.option}:a)),u(a?e=>e?{...e,listType:v.UNSAVED}:null:null))},[c]),A=a(e=>{g(t=>t.filter((t,a)=>a!==e)),u(null)},[]),F=l({...Z,currentStreamName:s});i(()=>{if(!c)return;if(S)return void F.resetFormData({...S.formData});if(c.listType===v.EXISTS&&c.option.id){const e=o.find(e=>e.id===c.option.id);if(e)return void F.resetFormData({type:e.destinationType.type,name:e.name||e.destinationType.displayName,currentStreamName:s,disabled:!!e.disabled,exportedSignals:{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces,profiles:!!e.exportedSignals?.profiles},fields:c.dynamicFields.map(e=>({key:e.name,value:e.value}))})}const e=b(c.option.supportedSignals);F.resetFormData({type:c.option.type,name:c.option.displayName,currentStreamName:s,disabled:!1,exportedSignals:{logs:e.includes(y.Logs),metrics:e.includes(y.Metrics),traces:e.includes(y.Traces),profiles:e.includes(y.Profiles)},fields:c.dynamicFields.map(e=>({key:e.name,value:e.value}))})},[c,S]);const I=a(e=>{F.resetFormData(),F.handleErrorChange(void 0,void 0,{}),u(e?{...e,dynamicFields:e.option?.fields?ae(e.option.fields):[]}:null)},[]),w=a((e,t)=>{let a;for(const r of t){const t=r.items.find(t=>t.type===e.destinationType.type);if(t){a=t;break}}const r=D(e.fields,{}),n={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:a?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:a?a.fields.map(e=>({...e,initialValue:r[e.name]??e.initialValue})):[]},s=ae(n.fields);u({listType:v.EXISTS,option:n,dynamicFields:s})},[]),N=a(()=>{const e=d(F.formData),t={};c?.dynamicFields.forEach(({name:a,required:r})=>{if(r){const r=e.fields.find(e=>e.key===a)?.value;p(r)&&(t[a]=h.FIELD_IS_REQUIRED)}});return E(e.exportedSignals).length||(t.exportedSignals=h.FIELD_IS_REQUIRED),F.handleErrorChange(void 0,void 0,t),{errorMessage:0===Object.keys(t).length?void 0:"Invalid form values",preparedFormData:e}},[F,c]);return e(te.Provider,{value:{activeForm:c,onChangeActiveForm:I,loadDestination:w,genericForm:F,validateFormData:N,unsavedDestinations:m,thisUnsavedDestination:S,setUnsavedDestinations:g,addUnsavedDestination:k,updateUnsavedDestination:C,deleteUnsavedDestination:A},children:n})},ne=()=>n(te),se={disabled:!1,ruleName:"",notes:"",sourceScopes:T(),workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},oe=s(null),ie=({children:n,sourceOptions:s=[],namespaceOptions:o=[]})=>{const[i,c]=t(null),u=l(se),m=a(e=>{u.resetFormData(),u.handleErrorChange(void 0,void 0,{}),c(e)},[]),p=a(e=>{var t;u.resetFormData((({ruleName:e,notes:t,disabled:a,sourceScopes:r,instrumentationLibraries:n,payloadCollection:s,codeAttributes:o,headersCollection:i,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!a,sourceScopes:O(r),workloads:null,instrumentationLibraries:n??null,payloadCollection:s??null,codeAttributes:o??null,headersCollection:i??null,customInstrumentations:l??null}))(e)),u.handleErrorChange(void 0,void 0,{}),c((t=e.type,k.find(e=>e.type===t)??null))},[]),h=a(()=>{if(!i)return{errorMessage:"No rule type selected",preparedFormData:d(se)};const e=(e=>{const t=d(e),a={...t,sourceScopes:L(t.sourceScopes)?null:t.sourceScopes,workloads:null};return a.headersCollection?.[C.HeaderKeys]?.length&&(a.headersCollection[C.HeaderKeys]=a.headersCollection[C.HeaderKeys].map(e=>e.trim()).filter(e=>e)),a.customInstrumentations?.[A.Golang]?.length&&(a.customInstrumentations[A.Golang]=a.customInstrumentations[A.Golang].map(e=>new F(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>{return t=e,!!(t.packageName?.trim()||t.functionName?.trim()||t.receiverName?.trim()||t.receiverMethodName?.trim());var t})),a.customInstrumentations?.[A.Java]?.length&&(a.customInstrumentations[A.Java]=a.customInstrumentations[A.Java].map(e=>new I(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),a})(u.formData),t=((e,t)=>{const a={};switch(e){case w.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(a.codeAttributes="Code attributes are required");break;case w.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(a.payloadCollection="Payload collection are required");break;case w.HeadersCollection:t.headersCollection?.[C.HeaderKeys]?.length||(a.headersCollection="Header keys are required");break;case w.CustomInstrumentation:{const e=t.customInstrumentations?.[A.Golang]||[],r=t.customInstrumentations?.[A.Java]||[];if(!e.length&&!r.length){a.customInstrumentations="Custom instrumentation are required";break}const n=e.findIndex(e=>!new F(e.packageName,e.functionName,e.receiverName,e.receiverMethodName).Verify());if(-1!==n){a.customInstrumentations=`Golang probe #${n+1} is invalid: provide a package name plus either a function name OR both a receiver name and receiver method name`;break}const s=r.findIndex(e=>!new I(e.className,e.methodName).Verify());if(-1!==s){a.customInstrumentations=`Java probe #${s+1} is invalid: both class name and method name are required`;break}break}}return a})(i.type,e);return u.handleErrorChange(void 0,void 0,t),{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[u,i]),f=r(()=>({selectedOption:i,onSelectOption:m,loadRule:p,genericForm:u,validateFormData:h,sourceOptions:s,namespaceOptions:o}),[i,m,p,u,h,s,o]);return e(oe.Provider,{value:f,children:n})},le=()=>{const e=n(oe);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};var de;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(de||(de={}));const ce=s(null),ue=["50","25","10","1"];function me(e){const t=String(e);return ue.includes(t)?t:"custom"}const pe=({category:n,sourceOptions:s=[],namespaceOptions:o=[],children:d})=>{const{formData:c,handleFormChange:u,resetFormData:m}=l(V(n)),[p,h]=t(null);i(()=>{m(V(n)),h(null)},[n]);const f=a(e=>{h(null),u(void 0,void 0,{...c,...e})},[c,u]),g=a(()=>{m(V(n)),h(null)},[n,m]),v=r(()=>({formType:de.Create,category:n,formData:c,handleChange:f,resetForm:g,duplicateWarning:p,setDuplicateWarning:h,sourceOptions:s,namespaceOptions:o}),[n,c,f,g,p,s,o]);return e(ce.Provider,{value:v,children:d})},he=({data:n,defaultEditMode:s,sourceOptions:d=[],namespaceOptions:c=[],children:u})=>{const[m,p]=t(!1),{formData:h,handleFormChange:f,resetFormData:g}=l(void 0),v=o(null),[b,y]=t(null);i(()=>{n!==v.current&&(v.current=n,n&&s?(g(K(n)),y(null),p(!0)):(p(!1),y(null)))},[n,s]);const D=a(e=>{y(null),f(void 0,void 0,{...h,...e})},[h,f]),E=a(()=>{n&&(g(K(n)),y(null),p(!0))},[n,g]),S=a(()=>{p(!1),y(null)},[]),k=r(()=>({formType:de.View,data:n,isEditing:m,formData:h,handleChange:D,handleEdit:E,handleCancelEdit:S,duplicateWarning:b,setDuplicateWarning:y,sourceOptions:d,namespaceOptions:c}),[n,m,h,D,E,S,b,d,c]);return e(ce.Provider,{value:k,children:u})};function fe(e){const[a,n]=t(()=>0===e?"all":"sample"),[s,o]=t(()=>me(e)),[l,d]=t(()=>"custom"===me(e)?String(e):"");i(()=>{n(0===e?"all":"sample");const t=me(e);o(t),d("custom"===t?String(e):"")},[e]);const c=r(()=>"all"===a?0:"custom"===s?Number(l)||0:Number(s),[a,s,l]);return{percentageMode:a,setPercentageMode:n,percentagePreset:s,setPercentagePreset:o,customPercentage:l,setCustomPercentage:d,resolvedPercentage:c}}const ge=({enabled:a,keepPercentage:n,children:s})=>{const[o,l]=t(a),d=fe(n);i(()=>{l(a)},[a]);const c=r(()=>j({enabled:o,keepPercentage:d.resolvedPercentage}),[o,d.resolvedPercentage]),u=r(()=>({formType:de.EditAutoNoisy,localEnabled:o,setLocalEnabled:l,...d,summary:c}),[o,d,c]);return e(ce.Provider,{value:u,children:s})},ve=({enabled:a,dropPercentage:n,children:s})=>{const[o,l]=t(a),d=fe(n);i(()=>{l(a)},[a]);const c=r(()=>U(o?{disabled:!1,percentageAtMost:d.resolvedPercentage}:null),[o,d.resolvedPercentage]),u=r(()=>({formType:de.EditAutoCostReduction,localEnabled:o,setLocalEnabled:l,...d,summary:c}),[o,d,c]);return e(ce.Provider,{value:u,children:s})},be=({enabled:a,children:n})=>{const[s,o]=t(a);i(()=>{o(a)},[a]);const l=r(()=>M(s?{disabled:!1}:null),[s]),d=r(()=>({formType:de.EditAutoHighlyRelevant,localEnabled:s,setLocalEnabled:o,summary:l}),[s,l]);return e(ce.Provider,{value:d,children:n})},ye=t=>{switch(t.formType){case de.Create:return e(pe,{...t});case de.View:return e(he,{...t});case de.EditAutoNoisy:return e(ge,{...t});case de.EditAutoCostReduction:return e(ve,{...t});case de.EditAutoHighlyRelevant:return e(be,{...t})}};function De(e){const t=n(ce);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const Ee={otelServiceName:"",currentStreamName:""},Se=s(null),ke=({children:n})=>{const[s,o]=t(void 0),i=l(Ee),c=a(e=>{i.resetFormData((({serviceName:e,id:t})=>({otelServiceName:e||t.name||"",currentStreamName:""}))(e)),i.handleErrorChange(void 0,void 0,{}),o(void 0)},[]),u=a(()=>{const e=d(i.formData);return i.handleErrorChange(void 0,void 0,{}),o(void 0),{errorMessage:void 0,preparedFormData:e}},[i]),m=r(()=>({loadSource:c,genericForm:i,validateFormData:u,errorMessage:s}),[c,i,u,s]);return e(Se.Provider,{value:m,children:n})},Ce=()=>{const e=n(Se);if(!e)throw new Error("useSourceEditFormContext must be used within a SourceEditFormContextProvider");return e},Ae=new Set([N.StaticPod]),Fe=e=>{const t=e.workloads.filter(({selected:e})=>e).length,a=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===a,isSomeSourced:t>0&&t<a,isFutureApps:e.selected||!1}},Ie=(e,t,a)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(a.showOnlySelected){const{isAllSourced:t,isSomeSourced:a,isFutureApps:r}=Fe(e);return t||a||r}return!0},we=(e,t,a)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!a.showOnlySelected||e.selected),Ne=s({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),xe=({children:n,selectedConnectionIds:s,initialInputs:o})=>{const{tier:l}=G(),c=l===x.Onprem,{selectedStreamName:u}=f(),[m,p]=t(!1),[h,g]=t(null),[v,b]=t([]);i(()=>{h&&b(e=>{const t=((e,t)=>d(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(h,s);return t.map(t=>{const a=e?.find(e=>e.clusterId===t.clusterId),r=a??t;if(o?.[t.clusterId]){const e=o[t.clusterId],a=d(r);return e.forEach(e=>{const t=a.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const a=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);a&&(a.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{Ae.has(e.kind)&&!c||(e.selected=!0)})}),a}return r})})},[h,s,o]);const{formDiff:y,isFormDirty:D}=r(()=>{const e=((e,t,a)=>{const r={};return e.forEach(e=>{e.namespaces.forEach(n=>{const s=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),o=n.selected||!1;if(o!==s?.selected)r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push({namespace:n.name,selected:o,currentStreamName:a}),o?r[e.clusterId]=r[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)):n.workloads.forEach(t=>{t.selected&&r[e.clusterId].push({namespace:n.name,name:t.name,kind:t.kind,selected:!0,currentStreamName:a})});else{const t=((e,t,a)=>{const r=[];return t.workloads.forEach(n=>{const s=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==s?.selected&&r.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:a})}),r})(s,n,a);t.length>0&&(r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push(...t))}})}),r})(v,h?.clusters||[],u);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[v,h,u]),E=a(e=>!c&&Ae.has(e),[c]),S=a(({clusterId:e,workloadId:t,selected:a,auto:r})=>{b(n=>{const s=d(n),o=s.findIndex(t=>t.clusterId===e);if(-1===o)return s;const i=s[o].namespaces.findIndex(e=>e.name===t.namespace);if(-1===i)return s;if(t.kind&&t.name){const e=s[o].namespaces[i].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return s;const r="boolean"==typeof a?a:!s[o].namespaces[i].workloads[e].selected;if(s[o].namespaces[i].workloads[e].selected=r,r){s[o].namespaces[i].workloads.filter(e=>!E(e.kind)).every(e=>e.selected)&&(s[o].namespaces[i].selected=!0)}else s[o].namespaces[i].selected=!1}else{const e="boolean"==typeof r?r:!s[o].namespaces[i].selected;s[o].namespaces[i].selected=e,e?s[o].namespaces[i].workloads.forEach(e=>{E(e.kind)||(e.selected=!0)}):"boolean"!=typeof a||a||s[o].namespaces[i].workloads.forEach(e=>{e.selected=!1})}return s})},[E]),k=a(({clusterId:e,namespaceName:t,boolean:a,searchText:r="",searchBy:n="",filters:s})=>{b(o=>{const i=d(o),l=n===R.Namespace?r:"",c=n===R.Source?r:"",u=!!l||!!c||!!s?.showOnlySelected;return i.forEach((r,n)=>{e&&r.clusterId!==e||r.namespaces.forEach(({name:e,workloads:r},o)=>{if(!t||e===t)if(u)if(t){r.forEach((e,t)=>{a&&E(e.kind)||we(e,c,s||{showOnlySelected:!1})&&(i[n].namespaces[o].workloads[t].selected=a)});const e=i[n].namespaces[o].workloads.filter(e=>!E(e.kind)).every(e=>e.selected);i[n].namespaces[o].selected=e}else{if(!Ie(i[n].namespaces[o],l,s||{showOnlySelected:!1}))return;i[n].namespaces[o].selected=a,r.forEach((e,t)=>{a&&E(e.kind)||(i[n].namespaces[o].workloads[t].selected=a)})}else i[n].namespaces[o].selected=a,r.forEach((e,t)=>{a&&E(e.kind)||(i[n].namespaces[o].workloads[t].selected=a)})})}),i})},[E]);return e(Ne.Provider,{value:{snapshots:h,setSnapshots:g,isFetching:m,setIsFetching:p,formData:v,handleSourceChange:S,handleSelectAll:k,formDiff:y,isFormDirty:D},children:n})},Re=()=>n(Ne);export{Q as A,X as D,Ae as E,ie as R,de as S,re as a,ye as b,ke as c,xe as d,Y as e,ne as f,le as g,De as h,Ce as i,Re as j,we as k,Ie as l,Fe as m,W as u};
@@ -1671,4 +1671,4 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as
1671
1671
  padding: 16px 24px;
1672
1672
  width: 100%;
1673
1673
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
1674
- `,Jg=({visual:n,title:o,description:r,isOpen:i,onClose:a,denyButton:s,approveButton:l,children:c,...d})=>e(tg,{isOpen:i,onClose:a,...d,children:t(Xg,{children:[t(Kg,{children:[n&&e(n,{}),e(cn,{size:on.M,weight:500,color:rn.Primary,children:o}),e(Dr,{$alignItems:"center",$gap:4,children:r.split("\n").map(t=>e(cn,{size:on.XS,weight:400,color:rn.Secondary,children:t},t))}),c]}),(s||l)&&t(Vg,{children:[s&&e(Kd,{"data-id":"deny",...s}),l&&e(Kd,{"data-id":"approve",...l})]})]})});export{hc as $,ki as A,ri as B,Ni as C,fn as D,_n as E,Dr as F,hi as G,lo as H,ru as I,Yr as J,pi as K,Pn as L,Oi as M,Gu as N,to as O,kn as P,no as Q,po as R,Mn as S,td as T,uo as U,Zn as V,Yn as W,ar as X,Rn as Y,fc as Z,vc as _,rc as a,nh as a$,qo as a0,Ko as a1,ti as a2,ni as a3,Iu as a4,Ju as a5,ku as a6,Vh as a7,vn as a8,ch as a9,Jg as aA,ms as aB,xa as aC,ka as aD,fs as aE,La as aF,gs as aG,Qi as aH,Zi as aI,Ep as aJ,la as aK,Td as aL,Or as aM,Oh as aN,Nc as aO,Ic as aP,jr as aQ,Di as aR,Go as aS,Bn as aT,rh as aU,nn as aV,hn as aW,pn as aX,yn as aY,kr as aZ,xp as a_,ih as aa,jh as ab,Ri as ac,rn as ad,Kd as ae,Gd as af,Hd as ag,Uu as ah,_i as ai,Cn as aj,ug as ak,Li as al,lg as am,Ru as an,hp as ao,_u as ap,dn as aq,Bg as ar,So as as,bi as at,eo as au,ld as av,oo as aw,Cu as ax,Zl as ay,zo as az,Xn as b,Xl as b$,Lo as b0,ui as b1,Io as b2,qr as b3,tn as b4,Mg as b5,Qo as b6,Yc as b7,Bc as b8,bo as b9,mg as bA,jo as bB,Pi as bC,ji as bD,Mi as bE,Bi as bF,Kl as bG,Jl as bH,Sa as bI,Ui as bJ,Vl as bK,ws as bL,Ss as bM,Ts as bN,Cs as bO,vs as bP,$s as bQ,Fi as bR,cs as bS,Fc as bT,ii as bU,rp as bV,Zu as bW,Qu as bX,_o as bY,uc as bZ,tg as b_,Qn as ba,qp as bb,yo as bc,Ql as bd,Uo as be,Un as bf,Lg as bg,Xp as bh,up as bi,Wu as bj,yu as bk,lc as bl,Jr as bm,Uh as bn,wu as bo,Oo as bp,Dc as bq,Hr as br,zc as bs,nc as bt,ec as bu,ci as bv,Bo as bw,Lu as bx,On as by,_g as bz,In as c,Sl as c$,ks as c0,js as c1,Ws as c2,Hs as c3,Gs as c4,Ks as c5,Xs as c6,Vs as c7,Tr as c8,Ul as c9,al as cA,sl as cB,rl as cC,il as cD,ol as cE,cl as cF,dl as cG,ll as cH,Ds as cI,Dl as cJ,Ol as cK,Rl as cL,Nl as cM,Ll as cN,Pl as cO,Fl as cP,Ml as cQ,zl as cR,_l as cS,Il as cT,kl as cU,$l as cV,Cl as cW,Tl as cX,Al as cY,xl as cZ,wl as c_,Bl as ca,jl as cb,Wl as cc,Hl as cd,Gl as ce,Ns as cf,Os as cg,Rs as ch,_s as ci,Ps as cj,Ls as ck,Ms as cl,Fs as cm,Us as cn,zs as co,Bs as cp,As as cq,Is as cr,Js as cs,Ys as ct,nl as cu,el as cv,tl as cw,Qs as cx,Zs as cy,qs as cz,Wc as d,Ra as d$,ul as d0,pl as d1,hl as d2,gl as d3,ml as d4,fl as d5,yl as d6,bl as d7,vl as d8,El as d9,Np as dA,Ir as dB,ca as dC,Ka as dD,Gi as dE,Wi as dF,Hi as dG,Xi as dH,ys as dI,ls as dJ,as as dK,ss as dL,is as dM,rs as dN,ps as dO,hs as dP,us as dQ,ds as dR,jc as dS,Gg as dT,Fn as dU,zi as dV,$a as dW,Ia as dX,ia as dY,Aa as dZ,ra as d_,Ar as da,Yh as db,gg as dc,dc as dd,No as de,gn as df,ql as dg,Hc as dh,Xu as di,yc as dj,Jo as dk,Yo as dl,Vo as dm,Xo as dn,Ac as dp,ko as dq,Ao as dr,To as ds,un as dt,mp as du,pp as dv,lr as dw,ro as dx,Ap as dy,Bp as dz,Ii as e,qn as e$,Oa as e0,ba as e1,Ta as e2,Da as e3,Ba as e4,va as e5,za as e6,ma as e7,ta as e8,fa as e9,Wa as eA,Va as eB,Ca as eC,Ja as eD,Ya as eE,Ha as eF,Na as eG,ip as eH,Ua as eI,qa as eJ,Qa as eK,Ea as eL,$r as eM,bd as eN,Vn as eO,Hn as eP,wn as eQ,jn as eR,Jn as eS,Kn as eT,Nn as eU,Dn as eV,zn as eW,En as eX,mo as eY,Tn as eZ,Sn as e_,ga as ea,na as eb,ya as ec,es as ed,ha as ee,Xa as ef,ts as eg,Za as eh,ns as ei,os as ej,Pa as ek,oa as el,aa as em,sa as en,da as eo,pa as ep,ua as eq,Ki as er,Vi as es,ea as et,Fa as eu,Ma as ev,ja as ew,Yl as ex,Ji as ey,wa as ez,cn as f,Cd as f$,Ln as f0,so as f1,ao as f2,io as f3,Gn as f4,go as f5,ho as f6,co as f7,An as f8,xn as f9,di as fA,mi as fB,fi as fC,yi as fD,$i as fE,vi as fF,Co as fG,xi as fH,Si as fI,Ga as fJ,Es as fK,xs as fL,bs as fM,_a as fN,qi as fO,Yi as fP,tc as fQ,oc as fR,ic as fS,Mc as fT,wc as fU,Ec as fV,Oc as fW,_c as fX,Pc as fY,Uc as fZ,Xc as f_,Wn as fa,xr as fb,vr as fc,Er as fd,$o as fe,vo as ff,gi as fg,Do as fh,Ro as fi,Mo as fj,Eo as fk,Wo as fl,fo as fm,er as fn,tr as fo,nr as fp,or as fq,rr as fr,ir as fs,sr as ft,Gr as fu,Qr as fv,Zr as fw,ei as fx,ai as fy,si as fz,Wr as g,Rd as g0,Ad as g1,Ed as g2,Jd as g3,Ud as g4,Qd as g5,tu as g6,Zd as g7,Wd as g8,Lr as g9,hu as ga,_r as gb,mu as gc,Pr as gd,Fr as ge,Mr as gf,ud as gg,Rr as gh,Qc as gi,Zc as gj,ed as gk,cp as gl,dp as gm,qu as gn,jg as go,Dp as gp,Lh as gq,Fh as gr,sg as gs,hg as gt,Sp as gu,uh as gv,oh as gw,sn as gx,on as h,Vr as i,Ho as j,Po as k,Dh as l,Ld as m,Nr as n,pc as o,Tc as p,Eh as q,xc as r,wo as s,wi as t,Cc as u,$n as v,bn as w,oi as x,mn as y,sc as z};
1674
+ `,Jg=({visual:n,title:o,description:r,isOpen:i,onClose:a,denyButton:s,approveButton:l,children:c,...d})=>e(tg,{isOpen:i,onClose:a,...d,children:t(Xg,{children:[t(Kg,{children:[n&&e(n,{}),e(cn,{size:on.M,weight:500,color:rn.Primary,children:o}),e(Dr,{$alignItems:"center",$gap:4,children:r.split("\n").map(t=>e(cn,{size:on.XS,weight:400,color:rn.Secondary,children:t},t))}),c]}),(s||l)&&t(Vg,{children:[s&&e(Kd,{"data-id":"deny",...s}),l&&e(Kd,{"data-id":"approve",...l})]})]})});export{hc as $,ki as A,ri as B,Ni as C,fn as D,_n as E,Dr as F,hi as G,lo as H,ru as I,Yr as J,pi as K,Pn as L,Oi as M,Gu as N,to as O,kn as P,no as Q,po as R,Mn as S,td as T,uo as U,Zn as V,Yn as W,ar as X,Rn as Y,fc as Z,vc as _,rc as a,nh as a$,qo as a0,Ko as a1,ni as a2,ti as a3,Iu as a4,Ju as a5,ku as a6,Vh as a7,vn as a8,ch as a9,Jg as aA,ms as aB,xa as aC,ka as aD,fs as aE,La as aF,gs as aG,Qi as aH,Zi as aI,Ep as aJ,la as aK,Td as aL,Or as aM,Oh as aN,Nc as aO,Ic as aP,jr as aQ,Di as aR,Go as aS,Bn as aT,rh as aU,nn as aV,hn as aW,pn as aX,yn as aY,kr as aZ,xp as a_,ih as aa,jh as ab,Ri as ac,rn as ad,Kd as ae,Gd as af,Hd as ag,Uu as ah,_i as ai,Cn as aj,ug as ak,Li as al,lg as am,Ru as an,hp as ao,_u as ap,dn as aq,Bg as ar,So as as,bi as at,eo as au,ld as av,oo as aw,Cu as ax,Zl as ay,zo as az,Xn as b,Xl as b$,Lo as b0,ui as b1,Io as b2,qr as b3,tn as b4,Mg as b5,Qo as b6,Yc as b7,Bc as b8,bo as b9,mg as bA,jo as bB,Pi as bC,ji as bD,Mi as bE,Bi as bF,Kl as bG,Jl as bH,Sa as bI,Ui as bJ,Vl as bK,ws as bL,Ss as bM,Ts as bN,Cs as bO,vs as bP,$s as bQ,Fi as bR,cs as bS,Fc as bT,ii as bU,rp as bV,Zu as bW,Qu as bX,_o as bY,uc as bZ,tg as b_,Qn as ba,qp as bb,yo as bc,Ql as bd,Uo as be,Un as bf,Lg as bg,Xp as bh,up as bi,Wu as bj,yu as bk,lc as bl,Jr as bm,Uh as bn,wu as bo,Oo as bp,Dc as bq,Hr as br,zc as bs,nc as bt,ec as bu,ci as bv,Bo as bw,Lu as bx,On as by,_g as bz,In as c,Sl as c$,ks as c0,js as c1,Ws as c2,Hs as c3,Gs as c4,Ks as c5,Xs as c6,Vs as c7,Tr as c8,Ul as c9,al as cA,sl as cB,rl as cC,il as cD,ol as cE,cl as cF,dl as cG,ll as cH,Ds as cI,Dl as cJ,Ol as cK,Rl as cL,Nl as cM,Ll as cN,Pl as cO,Fl as cP,Ml as cQ,zl as cR,_l as cS,Il as cT,kl as cU,$l as cV,Cl as cW,Tl as cX,Al as cY,xl as cZ,wl as c_,Bl as ca,jl as cb,Wl as cc,Hl as cd,Gl as ce,Ns as cf,Os as cg,Rs as ch,_s as ci,Ps as cj,Ls as ck,Ms as cl,Fs as cm,Us as cn,zs as co,Bs as cp,As as cq,Is as cr,Js as cs,Ys as ct,nl as cu,el as cv,tl as cw,Qs as cx,Zs as cy,qs as cz,Wc as d,Ra as d$,ul as d0,pl as d1,hl as d2,gl as d3,ml as d4,fl as d5,yl as d6,bl as d7,vl as d8,El as d9,Np as dA,Ir as dB,ca as dC,Ka as dD,Gi as dE,Wi as dF,Hi as dG,Xi as dH,ys as dI,ls as dJ,as as dK,ss as dL,is as dM,rs as dN,ps as dO,hs as dP,us as dQ,ds as dR,jc as dS,Gg as dT,Fn as dU,zi as dV,$a as dW,Ia as dX,ia as dY,Aa as dZ,ra as d_,Ar as da,Yh as db,gg as dc,dc as dd,No as de,gn as df,ql as dg,Hc as dh,Xu as di,yc as dj,Jo as dk,Yo as dl,Vo as dm,Xo as dn,Ac as dp,ko as dq,Ao as dr,To as ds,un as dt,mp as du,pp as dv,lr as dw,ro as dx,Ap as dy,Bp as dz,Ii as e,qn as e$,Oa as e0,ba as e1,Ta as e2,Da as e3,Ba as e4,va as e5,za as e6,ma as e7,ta as e8,fa as e9,Wa as eA,Va as eB,Ca as eC,Ja as eD,Ya as eE,Ha as eF,Na as eG,ip as eH,Ua as eI,qa as eJ,Qa as eK,Ea as eL,$r as eM,bd as eN,Vn as eO,Hn as eP,wn as eQ,jn as eR,Jn as eS,Kn as eT,Nn as eU,Dn as eV,zn as eW,En as eX,mo as eY,Tn as eZ,Sn as e_,ga as ea,na as eb,ya as ec,es as ed,ha as ee,Xa as ef,ts as eg,Za as eh,ns as ei,os as ej,Pa as ek,oa as el,aa as em,sa as en,da as eo,pa as ep,ua as eq,Ki as er,Vi as es,ea as et,Fa as eu,Ma as ev,ja as ew,Yl as ex,Ji as ey,wa as ez,cn as f,Cd as f$,Ln as f0,so as f1,ao as f2,io as f3,Gn as f4,go as f5,ho as f6,co as f7,An as f8,xn as f9,di as fA,mi as fB,fi as fC,yi as fD,$i as fE,vi as fF,Co as fG,xi as fH,Si as fI,Ga as fJ,Es as fK,xs as fL,bs as fM,_a as fN,qi as fO,Yi as fP,tc as fQ,oc as fR,ic as fS,Mc as fT,wc as fU,Ec as fV,Oc as fW,_c as fX,Pc as fY,Uc as fZ,Xc as f_,Wn as fa,xr as fb,vr as fc,Er as fd,$o as fe,vo as ff,gi as fg,Do as fh,Ro as fi,Mo as fj,Eo as fk,Wo as fl,fo as fm,er as fn,tr as fo,nr as fp,or as fq,rr as fr,ir as fs,sr as ft,Gr as fu,Qr as fv,Zr as fw,ei as fx,ai as fy,si as fz,Wr as g,Rd as g0,Ad as g1,Ed as g2,Jd as g3,Ud as g4,Qd as g5,tu as g6,Zd as g7,Wd as g8,Lr as g9,hu as ga,_r as gb,mu as gc,Pr as gd,Fr as ge,Mr as gf,ud as gg,Rr as gh,Qc as gi,Zc as gj,ed as gk,cp as gl,dp as gm,qu as gn,jg as go,Dp as gp,Lh as gq,Fh as gr,sg as gs,hg as gt,Sp as gu,uh as gv,oh as gw,sn as gx,on as h,Vr as i,Ho as j,Po as k,Dh as l,Ld as m,Nr as n,pc as o,Tc as p,Eh as q,xc as r,wo as s,wi as t,Cc as u,$n as v,bn as w,oi as x,mn as y,sc as z};
@@ -0,0 +1,5 @@
1
+ import{useMemo as e,useContext as t,createContext as r,useCallback as a,useEffect as n}from"react";import{HttpLink as o,from as s,split as i,ApolloClient as c,InMemoryCache as d,ApolloProvider as u,useQuery as l,gql as E,useApolloClient as f}from"@apollo/client";import{jsx as T}from"react/jsx-runtime";import{onError as _}from"@apollo/client/link/error";import{setContext as S}from"@apollo/client/link/context";import{getMainDefinition as R}from"@apollo/client/utilities";import{o as y,y as p,D as O,S as m,X as A,Y as I,E as N,P as C,c as h,z as g,Z as L,_ as G,$ as P,a0 as U,a1 as D,a2 as v,a3 as w}from"./ui-components-TeG65JGy.js";const F=e=>{if(!e)return!1;const t=e.toLowerCase();return t.includes("authentication required")||t.includes("authentication expired")||t.includes("http 401")},M=r(null),k=()=>{const e=t(M);if(!e)throw new Error("[ui-kit] useOdigosApi() / useXxxApi() called outside of <OdigosApiProvider>. Make sure the host app mounts the provider at its layout level.");return e},b=({apolloConfig:t,operations:r,context:a,children:n})=>{const l=e(()=>(e=>{const t=new o({uri:e.httpUrl,credentials:e.credentials??"same-origin"}),r=_(({graphQLErrors:t,networkError:r})=>{t&&t.length>0&&t.some(e=>F(e.message))&&e.onAuthError?.(),r&&(401===r.statusCode||F(r.message))&&e.onAuthError?.()}),a=S(async(t,r)=>{const a={...r.headers};if(e.authHeader){const t=await e.authHeader();Object.assign(a,t)}return e.csrfHeader&&Object.assign(a,e.csrfHeader()),{headers:a}}),n=[];e.additionalLinks?.length&&n.push(...e.additionalLinks),n.push(a,r,t);let u=s(n);e.wsLink&&(u=i(({query:e})=>{const t=R(e);return"OperationDefinition"===t.kind&&"subscription"===t.operation},e.wsLink,u));const l=e.defaultFetchPolicies;return new c({link:u,cache:new d({addTypename:e.addTypename??!0,typePolicies:e.cacheTypePolicies}),defaultOptions:{watchQuery:{fetchPolicy:l?.watchQuery??"cache-and-network"},query:{fetchPolicy:l?.query??"cache-first"},mutate:{fetchPolicy:l?.mutate??"network-only"}}})})(t),[t.httpUrl,t.wsLink,t.addTypename,t.credentials]),E=e(()=>({operations:r,context:a,apolloConfig:t}),[r,a,t]);return T(u,{client:l,children:T(M.Provider,{value:E,children:n})})},Y=M,H=(e,t)=>{if(e)return"string"==typeof e?e:A(e,t)},W=e=>{const{addNotification:t}=y(),r=(r,a,n,o,s)=>t({type:r,title:a,message:n,crdType:e,target:H(o,e),hideFromHistory:s});return{notify:r,notifyError:(e,t,a)=>r(m.Error,e,t,a),notifySuccess:(e,t,a)=>r(m.Success,e,t,a),notifyPending:(e,t)=>r(m.Default,"Pending",e,t,!0),notifyReadonly:()=>{t({type:m.Warning,title:O.READONLY,message:p.READONLY_WARNING,hideFromHistory:!0})}}},K=e=>{e({type:m.Warning,title:O.READONLY,message:p.READONLY_WARNING,hideFromHistory:!0})},V=e=>({error:e,results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:0}),x=(e,t)=>{if(e)return"function"==typeof e?e(t):e},$=e=>{if(!e)return"Unknown error";if(e instanceof Error)return e.cause instanceof Error?e.cause.message:e.message;if("object"==typeof e){const t=e;return t.cause?.message||t.message||String(e)}return String(e)},B=(e,t)=>e.client??t,j=async(e,t,r,a,n)=>{if(!t)return{error:"Query operation not configured"};if(t.canRun&&!t.canRun(a))return{data:void 0};if(t.run)try{return await t.run(B(t,e),r,a)}catch(e){return{error:$(e)}}const o=x(t.document,a);if(!o)return{error:"Query operation not supported in this context"};const s=t.transformVariables?t.transformVariables(r,a):r,i=B(t,e);try{const e=await i.query({query:o,variables:s,fetchPolicy:n??"network-only"});return{data:t.transformResult?t.transformResult(e.data,a):e.data,error:e.error?$(e.error):void 0}}catch(e){return{error:$(e)}}},q=async(e,t,r,a)=>{if(!t)return{error:"Mutation operation not configured"};if(t.canRun&&!t.canRun(a))return{data:void 0};if(t.run)try{return await t.run(B(t,e),r,a)}catch(e){return{error:$(e)}}const n=x(t.document,a);if(!n)return{error:"Mutation operation not supported in this context"};const o=t.transformVariables?t.transformVariables(r,a):r,s=B(t,e);try{const e=await s.mutate({mutation:n,variables:o});return{data:t.transformResult?t.transformResult(e.data,a):e.data,error:void 0}}catch(e){return{error:$(e)}}},Q=async(e,t,r,a,n)=>{if(!t)return V("Multi fetch operation not configured");if(!r.length)return V("No proxy ids supplied for multi fetch");const o=B(t,e);if(t.transformVariablesMulti&&(t.documentMulti||t.document)){const e=t.transformVariablesMulti(r,a,n),s=[];for(const r of e)try{const e=await o.query({query:r.document,variables:r.variables,fetchPolicy:"network-only"});t.transformMultiResult?t.transformMultiResult(e.data,n).forEach(e=>s.push(e)):r.proxyIDs.forEach(t=>{s.push({proxyID:t,success:!e.error,data:e.data,error:e.error?.message})})}catch(e){const t=$(e);r.proxyIDs.forEach(e=>s.push({proxyID:e,success:!1,error:t}))}const i=s.filter(e=>e.success).length,c=s.length-i,d=Array.from(new Set(s.filter(e=>!!e.error).map(e=>e.error)));return{results:s,allSucceeded:0===c,anySucceeded:i>0,successCount:i,failureCount:c,error:d.length?d.join(", "):void 0}}const s=await Promise.all(r.map(async r=>{const o={...n,proxyID:r},s=await j(e,t,a,o);return{proxyID:r,success:!s.error,data:s.data,error:s.error}})),i=s.filter(e=>e.success).length,c=s.length-i,d=Array.from(new Set(s.filter(e=>!!e.error).map(e=>e.error)));return{results:s,allSucceeded:0===c,anySucceeded:i>0,successCount:i,failureCount:c,error:d.length?d.join(", "):void 0}},z=E`
2
+ query OdigosApiNoop {
3
+ __typename
4
+ }
5
+ `,X=(e,t,r)=>{if(void 0===t)return;return e?.transformResult?e.transformResult(t,r):t},J=(t,r,n)=>{const{operations:o,context:s}=k(),i=((e,t)=>e[t])(o,t),c=e(()=>((e,t)=>{if(e)return"function"==typeof e?e(t):e})(i?.document,s),[i,s]),d=e(()=>((e,t,r)=>{if(!e)return;const a=e.transformVariables;return a?a(t,r):t})(i,r,s),[i,r,s]),u=!i||!c,E=!!i?.canRun&&!i.canRun(s),f=n?.skip||u||E,T=l(c??z,{variables:d,skip:f,pollInterval:n?.pollInterval,fetchPolicy:n?.fetchPolicy??"cache-and-network",notifyOnNetworkStatusChange:n?.notifyOnNetworkStatusChange,client:i?.client,onCompleted:n?.onCompleted?e=>{const t=X(i,e,s);void 0!==t&&n.onCompleted(t)}:void 0,onError:n?.onError}),_=e(()=>{if(!f)return X(i,T.data,s)},[i,s,T.data,f]),S=a(async()=>{if(u)return{data:void 0};const e=await T.refetch();return{data:X(i,e.data,s)}},[i,s,T,u]);return{data:_,loading:!f&&T.loading,error:T.error,refetch:S,unsupported:u}},Z=[],ee=(e,t,r,a)=>{let n=!0;const o={sources:[]};for(const[s,i]of Object.entries(e)){if(!i.length)continue;n=!1;const e=i.map(({id:e,selected:t,currentStreamName:a})=>({namespace:e.namespace,name:e.name,kind:e.kind,selected:void 0!==t&&t,currentStreamName:a||r}));let c=0,d=0;for(const r of e){const e=t.find(e=>e.id.namespace===s&&e.id.name===r.name&&e.id.kind===r.kind),a=e?.dataStreamNames||[];r.selected&&!e?c++:!r.selected&&e&&a.length<=1&&d++}a(c,d),o.sources.push(...e)}return{payload:o,isEmpty:n}},te=(e,t)=>{let r=!0;const a={namespaces:[]};for(const[n,{selected:o,currentStreamName:s}]of Object.entries(e))"boolean"==typeof o&&(r=!1,a.namespaces.push({namespace:n,selected:o,currentStreamName:s||t}));return{payload:a,isEmpty:r}},re={filter:{markedForInstrumentation:!0}},ae=[],ne=[],oe=async e=>{const t=(e=>{try{return new URL("/diagnose/download",e).toString()}catch{return null}})(e.httpUrl);if(t)try{const[r,a]=await Promise.all([Promise.resolve(e.authHeader?.()??{}),Promise.resolve(e.csrfHeader?.()??{})]),n=await fetch(t,{credentials:e.credentials??"same-origin",headers:{...r,...a}});if(!n.ok)throw new Error(`Failed to download diagnose archive: ${n.status} ${n.statusText}`);((e,t)=>{if("undefined"==typeof document)return;const r=URL.createObjectURL(e),a=document.createElement("a");a.href=r,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)})(await n.blob(),`odigos-diagnose-${Date.now()}.tar.gz`)}catch(e){}},se=[],ie=[],ce=[],de=[],ue=(e,t)=>({...e,fields:e.fields.filter(({value:e})=>void 0!==e),currentStreamName:t}),le=()=>{const{operations:t,context:r}=k(),o=f(),s=((e,t)=>{const r=f(),{notifyError:n,notifySuccess:o,notifyPending:s,notifyReadonly:i}=W(N.Source),{selectedStreamName:c}=g(),{setProgress:d,resetProgress:u}=L(),{setConfiguredSources:l,setConfiguredFutureApps:E}=G(),T=(e,t)=>{const{progress:r}=L.getState();e>0&&d(P.Instrumenting,{total:(r[P.Instrumenting]?.total||0)+e,current:r[P.Instrumenting]?.current||0}),t>0&&d(P.Uninstrumenting,{total:(r[P.Uninstrumenting]?.total||0)+t,current:r[P.Uninstrumenting]?.current||0})},_=a(async()=>{const{error:a}=await j(r,e.GET_WORKLOADS,re,t);a&&n(I.Read,a)},[r,e.GET_WORKLOADS,t,n]);return{useSources:()=>{const e=J("GET_WORKLOADS",re,{fetchPolicy:"cache-first"});return{items:e.data?.workloads??ae,loading:e.loading,refetch:_}},fetchAll:_,fetchByTargets:async(a,o)=>{const s=!!o?.slim,i=a.map(e=>U(e,N.Source)).filter(e=>e.namespace&&e.name&&e.kind);if(0===i.length)return;if(i.length>50)return void await _();const c=s&&e.GET_WORKLOADS_BY_IDS_SLIM?e.GET_WORKLOADS_BY_IDS_SLIM:e.GET_WORKLOADS_BY_IDS,{error:d}=await j(r,c,{ids:i.map(({namespace:e,kind:t,name:r})=>({namespace:e,kind:t,name:r}))},t);d?n(I.Read,d):await _()},fetchById:async a=>{const{data:o,error:s}=await j(r,e.GET_WORKLOADS_BY_IDS,{ids:[{namespace:a.namespace,kind:a.kind,name:a.name}]},t);if(!s)return await _(),o?.workloadsByIds?.find(e=>e.id.namespace===a.namespace&&e.id.kind===a.kind&&e.id.name===a.name);n(I.Read,s)},fetchLibraries:async a=>j(r,e.GET_SOURCE_LIBRARIES,a,t),fetchPeerSources:async a=>j(r,e.GET_PEER_SOURCES,{serviceName:a},t),usePeerSources:(e,t)=>J("GET_PEER_SOURCES",e,t),persist:async(a,o)=>{if(t.isReadonly)return i();const{data:d}=await j(r,e.GET_WORKLOADS,re,t,"cache-first"),f=d?.workloads??ae,{payload:_,isEmpty:S}=ee(a,f,c,T),{payload:R,isEmpty:y}=te(o,c);let p=!1;S||(p=!0,s("Persisting sources...")),y||p||s("Persisting namespaces...");const{error:O}=await q(r,e.PERSIST_SOURCES,_,t);if(O&&(u(P.Instrumenting),u(P.Uninstrumenting),n(I.Update,O)),e.PERSIST_NAMESPACES){const{error:a}=await q(r,e.PERSIST_NAMESPACES,R,t);a&&n(I.Update,a)}l({}),E({})},persistV2:async a=>{if(t.isReadonly)return i(),{error:"readonly"};const n=[];for(const[,o]of Object.entries(a)){const a={sources:[]},s={namespaces:[]};for(const e of o)e.name&&e.kind?a.sources.push(e):s.namespaces.push(e);if(s.namespaces.length>0&&e.PERSIST_NAMESPACES){const{error:a}=await q(r,e.PERSIST_NAMESPACES,s,t);a&&n.push(a)}if(a.sources.length>0){const{error:o}=await q(r,e.PERSIST_SOURCES,a,t);o&&n.push(o)}}return n.length?{error:n.join(", ")}:void 0},update:async(a,d)=>{if(t.isReadonly)return i();s("Updating source...");const u={sourceId:a,patchSourceRequest:{...d,currentStreamName:c}},{data:l,error:E}=await q(r,e.UPDATE_SOURCE,u,t);E?n(I.Update,E,a):l?.updateK8sActualSource&&o(I.Update,`Successfully updated "${a.name}" source`,a)},restartWorkloads:async a=>{if(t.isReadonly)return i();s("Restarting sources...");const{data:c,error:d}=await q(r,e.RESTART_WORKLOADS,{sourceIds:a},t);d?n(I.Update,d):c?.restartWorkloads&&o(I.Update,`Successfully restarted ${a.length} sources`)},restartPod:async(a,c)=>{if(t.isReadonly)return i();s("Restarting pod...");const{data:d,error:u}=await q(r,e.RESTART_POD,{namespace:a,name:c},t);u?n(I.Update,u):d?.restartPod&&o(I.Update,`Successfully restarted pod ${a}/${c}`)},recoverFromRollback:async a=>{if(t.isReadonly)return i();s("Recovering from rollback...");const{data:c,error:d}=await q(r,e.RECOVER_FROM_ROLLBACK,{sourceId:a},t);d?n(I.Update,d,a):c?.recoverFromRollbackForWorkload&&o(I.Update,"Successfully triggered recovery from rollback")}}})(t,r),i=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=W(N.Destination),{selectedStreamName:s}=g(),i=async()=>{const{error:n}=await j(r,e.GET_DESTINATIONS,void 0,t);n&&a(I.Read,n)};return{useDestinations:()=>{const e=J("GET_DESTINATIONS",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.computePlatform?.destinations??e.data?.destinations??de,loading:e.loading,refetch:i}},useDestinationCategories:()=>{const e=J("GET_DESTINATION_CATEGORIES",void 0);return{data:e.data,loading:e.loading}},usePotentialDestinations:()=>{const e=J("GET_POTENTIAL_DESTINATIONS",void 0);return{data:e.data,loading:e.loading}},fetchAll:i,testConnection:async a=>{const{data:n}=await q(r,e.TEST_DESTINATION_CONNECTION,{destination:ue(a,s)},t);return n},create:async c=>{if(t.isReadonly)return o();const{error:d}=await q(r,e.CREATE_DESTINATION,{destination:ue(c,s)},t);d?a(I.Create,d):(n(I.Create,`Successfully created "${c.type}" destination`),await i())},update:async(c,d)=>{if(t.isReadonly)return o();const{data:u,error:l}=await q(r,e.UPDATE_DESTINATION,{id:c,destination:ue(d,s)},t);l?a(I.Update,l,c):u?.updateDestination&&(n(I.Update,`Successfully updated "${d.type}" destination`,c),await i())},remove:async c=>{if(t.isReadonly)return o();const{data:d}=await j(r,e.GET_DESTINATIONS,void 0,t,"cache-first"),u=d?.computePlatform?.destinations??d?.destinations??de,l=u.find(e=>D(e)===c)?.destinationType?.type,{error:E}=await q(r,e.DELETE_DESTINATION,{id:c,currentStreamName:s},t);E?a(I.Delete,E,c):(n(I.Delete,`Successfully deleted "${l??c}" destination`,c),await i())}}})(t,r),c=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=W(N.Action),s=async()=>{const{error:n}=await j(r,e.GET_ACTIONS,void 0,t);n&&a(I.Read,n)};return{useActions:()=>{const e=J("GET_ACTIONS",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.computePlatform?.actions??e.data?.actions??ne,loading:e.loading,refetch:s}},fetchAll:s,create:async i=>{if(t.isReadonly)return o();if(!e.CREATE_ACTION)return;const{error:c}=await q(r,e.CREATE_ACTION,{action:i},t);c?a(I.Create,c):(n(I.Create,`Successfully created "${i.type}" action`),await s())},update:async(i,c)=>{if(t.isReadonly)return o();if(!e.UPDATE_ACTION)return;const{error:d}=await q(r,e.UPDATE_ACTION,{id:i,action:c},t);d?a(I.Update,d,i):(n(I.Update,`Successfully updated "${c.type}" action`,i),await s())},remove:async(i,c)=>{if(t.isReadonly)return o();if(!e.DELETE_ACTION)return;const{error:d}=await q(r,e.DELETE_ACTION,{id:i,actionType:c},t);d?a(I.Delete,d,i):(n(I.Delete,`Successfully deleted "${c}" action`,i),await s())}}})(t,r),d=((t,r)=>{const a=f(),{notifyError:n,notifySuccess:o,notifyReadonly:s}=W(N.InstrumentationRule),i=async()=>{const{error:e}=await j(a,t.GET_INSTRUMENTATION_RULES,void 0,r);e&&n(I.Read,e)};return{useRules:()=>{const t=J("GET_INSTRUMENTATION_RULES",void 0,{fetchPolicy:"cache-first"});return{items:e(()=>(t.data?.computePlatform?.instrumentationRules??t.data?.instrumentationRules??[]).map(w),[t.data]),loading:t.loading,refetch:i}},fetchAll:i,create:async(e,c)=>{if(r.isReadonly)return s();if(!t.CREATE_INSTRUMENTATION_RULE)return;const{error:d}=await q(a,t.CREATE_INSTRUMENTATION_RULE,{instrumentationRule:v(e)},r);d?n(I.Create,d):(o(I.Create,`Successfully created${c?` "${c}"`:""} rule`),await i())},update:async(e,c,d)=>{if(r.isReadonly)return s();if(!t.UPDATE_INSTRUMENTATION_RULE)return;const{error:u}=await q(a,t.UPDATE_INSTRUMENTATION_RULE,{ruleId:e,instrumentationRule:v(c)},r);u?n(I.Update,u,e):(o(I.Update,`Successfully updated${d?` "${d}"`:""} rule`,e),await i())},remove:async(e,c)=>{if(r.isReadonly)return s();if(!t.DELETE_INSTRUMENTATION_RULE)return;const{error:d}=await q(a,t.DELETE_INSTRUMENTATION_RULE,{ruleId:e},r);d?n(I.Delete,d,e):(o(I.Delete,`Successfully deleted${c?` "${c}"`:""} rule`,e),await i())}}})(t,r),u=((e,t)=>{const r=f(),{addNotification:a}=y(),{setDataStreams:o}=g(),s=(e,t)=>a({type:m.Error,title:e,message:t}),i=async()=>{const{data:a,error:n}=await j(r,e.GET_DATA_STREAMS,void 0,t);if(n)s(I.Read,n);else if(a){const e=a.computePlatform?.dataStreams??a.dataStreams??[];o(e)}},c=e.CREATE_DATA_STREAM?async n=>{if(t.isReadonly)return K(a);const{error:o}=await q(r,e.CREATE_DATA_STREAM,{stream:n},t);o?s(I.Create,o):await i()}:void 0;return{useDataStreams:()=>{const e=J("GET_DATA_STREAMS",void 0,{fetchPolicy:"cache-first"}),t=e.data?.computePlatform?.dataStreams??e.data?.dataStreams??ce;return n(()=>{o(t)},[JSON.stringify(t.map(e=>e.name))]),{items:t,loading:e.loading,refetch:i}},fetchAll:i,create:c,update:async(n,o)=>{if(t.isReadonly)return K(a);const{error:c}=await q(r,e.UPDATE_DATA_STREAM,{id:n,dataStream:o},t);c?s(I.Update,c):await i()},remove:async n=>{if(t.isReadonly)return K(a);const{error:o}=await q(r,e.DELETE_DATA_STREAM,{id:n},t);o?s(I.Delete,o):await i()}}})(t,r),l=((e,t)=>{const r=f(),{notifyError:a,notifyReadonly:n}=W(N.Namespace),o=async()=>{const n=await j(r,e.GET_NAMESPACES_WITH_WORKLOADS,void 0,t);return n.error&&a(I.Read,n.error),n};return{useNamespaces:()=>{const e=J("GET_NAMESPACES_WITH_WORKLOADS",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.namespaces??ie,loading:e.loading,refetch:o}},fetchAll:o,persist:async o=>{if(t.isReadonly)return n();const{error:s}=await q(r,e.PERSIST_NAMESPACES,o,t);return s&&a(I.Update,s),s?{error:s}:void 0}}})(t,r),E=((e,t)=>{const r=f(),{notifyError:a}=W(N.Source);return{fetch:async n=>{const o=await j(r,e.GET_K8S_MANIFEST,n,t);return o.error&&a(I.Read,o.error),o}}})(t,r),T=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=W(N.Source);return{useEffectiveConfig:(e,t)=>J("GET_EFFECTIVE_CONFIG",e,t),useConfigYamls:e=>J("GET_CONFIG_YAMLS",void 0,e),getEffectiveConfig:async a=>e.GET_EFFECTIVE_CONFIG?j(r,e.GET_EFFECTIVE_CONFIG,{id:a},t):{error:"GET_EFFECTIVE_CONFIG not configured"},applyConfigurations:e.UPDATE_REMOTE_CONFIG?async(n,s)=>{if(t.isReadonly)return o();const{error:i}=await q(r,e.UPDATE_REMOTE_CONFIG,{formData:n,connectionIds:s},t);return i&&a(I.Update,i),i?{error:i}:void 0}:void 0,getConfigYamls:e.GET_CONFIG_YAMLS?async()=>j(r,e.GET_CONFIG_YAMLS,void 0,t):void 0,updateLocalUiConfig:e.UPDATE_LOCAL_UI_CONFIG?async s=>{if(t.isReadonly)return o();const{error:i}=await q(r,e.UPDATE_LOCAL_UI_CONFIG,{config:s},t);return i?a(I.Update,i):n(I.Update,"Local UI configuration updated successfully"),i?{error:i}:void 0}:void 0,resetLocalUiConfigToDefaults:e.RESET_LOCAL_UI_CONFIG_TO_FACTORY_DEFAULTS?async()=>{if(t.isReadonly)return o();const{error:s}=await q(r,e.RESET_LOCAL_UI_CONFIG_TO_FACTORY_DEFAULTS,void 0,t);return s?a(I.Update,s):n(I.Update,"Local UI configuration reset to factory defaults"),s?{error:s}:void 0}:void 0}})(t,r),_=((e,t)=>{const r=f(),{apolloConfig:a}=k();return{fetchDescribeOdigos:e.GET_DESCRIBE_ODIGOS?async()=>j(r,e.GET_DESCRIBE_ODIGOS,void 0,t):void 0,fetchDescribeSource:e.GET_DESCRIBE_SOURCE?async a=>j(r,e.GET_DESCRIBE_SOURCE,a,t):void 0,downloadDiagnose:e.GET_DIAGNOSE?async(n,o)=>{const s=await j(r,e.GET_DIAGNOSE,{input:n,dryRun:o?.dryRun??!1},t),i=s?.data?.stats?.fileCount??0;return!s.error&&i>0&&!o?.dryRun&&await oe(a),s}:void 0}})(t,r),S=((e,t)=>{const r=f(),{notifyError:a,notifyReadonly:n}=W(N.Source),o=async()=>{e.GET_TOKENS&&await j(r,e.GET_TOKENS,void 0,t)};return{useTokens:()=>{const e=J("GET_TOKENS",void 0,{fetchPolicy:"cache-first"});return{items:e.data??Z,loading:e.loading,refetch:o}},updateToken:e.UPDATE_TOKEN?async o=>{if(t.isReadonly)return n();const{error:s}=await q(r,e.UPDATE_TOKEN,{token:o},t);return s&&a(I.Update,s),s?{error:s}:void 0}:void 0}})(t,r),R=((e,t)=>{const r=f();return{useMetrics:e=>J("GET_METRICS",void 0,e),fetch:async()=>j(r,e.GET_METRICS,void 0,t)}})(t,r),p=((e,t)=>{const r=f();return{useServiceMap:e=>J("GET_SERVICE_MAP",void 0,e),fetch:e.GET_SERVICE_MAP?async()=>j(r,e.GET_SERVICE_MAP,void 0,t):void 0}})(t,r),O=((e,t)=>{const r=f();return{useSlots:e=>J("GET_PROFILING_SLOTS",void 0,e),useSourceProfiling:(e,t)=>J("GET_SOURCE_PROFILING",e,t),fetchSlots:e.GET_PROFILING_SLOTS?async()=>j(r,e.GET_PROFILING_SLOTS,void 0,t):void 0,fetchSourceProfiling:e.GET_SOURCE_PROFILING?async a=>j(r,e.GET_SOURCE_PROFILING,a,t):void 0,enableProfiling:e.ENABLE_SOURCE_PROFILING?async a=>q(r,e.ENABLE_SOURCE_PROFILING,a,t):void 0}})(t,r),A=((e,t)=>{const r=f();return{useGatewayInfo:e=>J("GET_GATEWAY_INFO",void 0,e),useGatewayPods:e=>J("GET_GATEWAY_PODS",void 0,e),useNodeCollectorInfo:e=>J("GET_NODE_COLLECTOR_INFO",void 0,e),useNodeCollectorPods:e=>J("GET_NODE_COLLECTOR_PODS",void 0,e),usePodInfo:(e,t)=>J("GET_COLLECTOR_POD_INFO",e,t),getGatewayInfo:e.GET_GATEWAY_INFO?async()=>j(r,e.GET_GATEWAY_INFO,void 0,t):void 0,getGatewayPods:e.GET_GATEWAY_PODS?async()=>j(r,e.GET_GATEWAY_PODS,void 0,t):void 0,getNodeCollectorInfo:e.GET_NODE_COLLECTOR_INFO?async()=>j(r,e.GET_NODE_COLLECTOR_INFO,void 0,t):void 0,getNodeCollectorPods:e.GET_NODE_COLLECTOR_PODS?async()=>j(r,e.GET_NODE_COLLECTOR_PODS,void 0,t):void 0,getExtendedPodInfo:e.GET_COLLECTOR_POD_INFO?async(a,n)=>j(r,e.GET_COLLECTOR_POD_INFO,{namespace:a,name:n},t):void 0}})(t,r),F=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=W(N.SamplingRule),s=async()=>{e.GET_SAMPLING_RULES&&await j(r,e.GET_SAMPLING_RULES,void 0,t)},i=(e,i)=>e?async c=>{if(t.isReadonly)return o();const{error:d}=await q(r,e,c,t);return d?a(i,d):(n(I.Create,"Successfully created sampling rule"),await s()),d?{error:d}:void 0}:void 0,c=(e,i)=>e?async(c,d)=>{if(t.isReadonly)return o();const{error:u}=await q(r,e,{samplingId:d.samplingId,ruleId:c,rule:d.rule},t);return u?a(i,u):(n(I.Update,"Successfully updated sampling rule"),await s()),u?{error:u}:void 0}:void 0,d=e=>e?async(i,c)=>{if(t.isReadonly)return o();const{error:d}=await q(r,e,{samplingId:c,ruleId:i},t);return d?a(I.Delete,d):(n(I.Delete,"Successfully deleted sampling rule"),await s()),d?{error:d}:void 0}:void 0;return{useSamplingRules:()=>{const e=J("GET_SAMPLING_RULES",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.computePlatform?.samplingRules??e.data?.samplingRules??se,k8sHealthProbesConfig:e.data?.computePlatform?.k8sHealthProbesConfig??e.data?.k8sHealthProbesConfig??null,loading:e.loading,refetch:s}},fetchAll:e.GET_SAMPLING_RULES?async()=>j(r,e.GET_SAMPLING_RULES,void 0,t):void 0,createNoisy:i(e.CREATE_NOISY_OPERATION_RULE,I.Create),updateNoisy:c(e.UPDATE_NOISY_OPERATION_RULE,I.Update),deleteNoisy:d(e.DELETE_NOISY_OPERATION_RULE),createHighlyRelevant:i(e.CREATE_HIGHLY_RELEVANT_OPERATION_RULE,I.Create),updateHighlyRelevant:c(e.UPDATE_HIGHLY_RELEVANT_OPERATION_RULE,I.Update),deleteHighlyRelevant:d(e.DELETE_HIGHLY_RELEVANT_OPERATION_RULE),createCostReduction:i(e.CREATE_COST_REDUCTION_RULE,I.Create),updateCostReduction:c(e.UPDATE_COST_REDUCTION_RULE,I.Update),deleteCostReduction:d(e.DELETE_COST_REDUCTION_RULE),updateK8sHealthProbesConfig:e.UPDATE_LOCAL_UI_SAMPLING_CONFIG?async n=>{if(t.isReadonly)return o();const{error:i}=await q(r,e.UPDATE_LOCAL_UI_SAMPLING_CONFIG,{config:n},t);return i?a(I.Update,i):await s(),i?{error:i}:void 0}:void 0}})(t,r),M=((e,t)=>{const r=f();return{useSnapshots:()=>{const e=J("GET_ALL_CLUSTER_SNAPSHOTS",void 0,{fetchPolicy:"cache-first"});return{data:e.data,loading:e.loading,unsupported:e.unsupported}},getAllClusterSnapshots:e.GET_ALL_CLUSTER_SNAPSHOTS?async()=>j(r,e.GET_ALL_CLUSTER_SNAPSHOTS,void 0,t):void 0,getClusterSnapshot:e.GET_CLUSTER_SNAPSHOT?async a=>j(r,e.GET_CLUSTER_SNAPSHOT,{clusterId:a},t):void 0}})(t,r);return{sourcesApi:s,destinationsApi:i,actionsApi:c,instrumentationRulesApi:d,dataStreamsApi:u,namespacesApi:l,k8sManifestApi:E,configApi:T,describeApi:_,tokensApi:S,metricsApi:R,serviceMapApi:p,profilingApi:O,collectorsApi:A,samplingApi:F,snapshotsApi:M,capabilities:e(()=>((e,t)=>{const r=t.platformType===C.Vm,a=t.tier===h.Onprem,n=!r;return{canBulkPersistSources:n&&!!e.PERSIST_SOURCES,canFetchSnapshots:n&&!!e.GET_ALL_CLUSTER_SNAPSHOTS,canRecoverFromRollback:n&&!!e.RECOVER_FROM_ROLLBACK,canRestartWorkloads:n&&!!e.RESTART_WORKLOADS,canFetchPeerSources:!!e.GET_PEER_SOURCES,canFetchSourceLibraries:!!e.GET_SOURCE_LIBRARIES,canFetchK8sManifest:n&&!!e.GET_K8S_MANIFEST,canCreateDestination:n&&!!e.CREATE_DESTINATION,canTestConnection:n&&!!e.TEST_DESTINATION_CONNECTION,canFetchDestinationCategories:!!e.GET_DESTINATION_CATEGORIES,canFetchPotentialDestinations:n&&!!e.GET_POTENTIAL_DESTINATIONS,canCreateAction:n&&!!e.CREATE_ACTION,canCreateInstrumentationRule:n&&!!e.CREATE_INSTRUMENTATION_RULE,canApplyEffectiveConfig:n&&!!e.UPDATE_REMOTE_CONFIG&&!!e.GET_EFFECTIVE_CONFIG,canFetchEffectiveConfig:!!e.GET_EFFECTIVE_CONFIG,canFetchConfigYamls:!!e.GET_CONFIG_YAMLS,canFetchProfiling:n&&!!e.GET_PROFILING_SLOTS,canFetchCollectorInfo:n&&!!e.GET_GATEWAY_INFO,canManageSamplingRules:!!e.GET_SAMPLING_RULES,isEnterprise:a,isVm:r}})(t,r),[t,r]),resetCache:a(async()=>{await o.cache.reset()},[o])}};export{b as O,Y as _,ee as a,k as b,Q as c,te as p,q as r,le as u};
@@ -1 +1 @@
1
- export{eH as Autocomplete,ax as Badge,ae as Button,af as ButtonSize,gl as ButtonTab,gm as ButtonTabList,ag as ButtonVariants,a5 as Checkbox,gn as CheckboxList,di as CheckboxSize,bh as CliCommand,bb as Condition,a$ as Conditions,go as DEFAULT_TIME_UNITS,a_ as DataCard,l as Drawer,bV as DropData,bX as DropDataAlignX,bW as DropDataAlignY,aN as DropDown,a6 as FieldMessage,a4 as FieldTitle,dz as GaugeChart,gp as GaugeChartVariant,gq as Header,gr as HoverActions,aO as IconButton,aP as IconButtonSize,bn as IconGroup,an as Input,ab as InputList,a7 as InputTable,db as Island,aQ as Loader,b_ as Modal,gs as Navbar,N as NoData,q as Note,ak as Radio,gt as RadioGroup,am as RadioSize,bj as Search,aJ as SectionCard,gu as SectionCardSize,ah as Segment,ap as SegmentSize,bx as SegmentVariant,dy as StatusCard,dc as Stepper,bz as Table,bA as TableVariant,b5 as Tag,bg as TagVariants,ar as TextArea,dA as TextCard,dT as TimeInput,a9 as Toggle,aa as ToggleLabelAlign,gv as ToggleList,aU as ToggleSize,gw as ToggleVariant,ao as TruncatableTypography,f as Typography,ad as TypographyColor,h as TypographySize,aV as TypographyVariants,aA as WarningModal,gx as resolveTypographyColor}from"../chunks/ui-components-Dc15jc-B.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"../chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{eH as Autocomplete,ax as Badge,ae as Button,af as ButtonSize,gl as ButtonTab,gm as ButtonTabList,ag as ButtonVariants,a5 as Checkbox,gn as CheckboxList,di as CheckboxSize,bh as CliCommand,bb as Condition,a$ as Conditions,go as DEFAULT_TIME_UNITS,a_ as DataCard,l as Drawer,bV as DropData,bX as DropDataAlignX,bW as DropDataAlignY,aN as DropDown,a6 as FieldMessage,a4 as FieldTitle,dz as GaugeChart,gp as GaugeChartVariant,gq as Header,gr as HoverActions,aO as IconButton,aP as IconButtonSize,bn as IconGroup,an as Input,ab as InputList,a7 as InputTable,db as Island,aQ as Loader,b_ as Modal,gs as Navbar,N as NoData,q as Note,ak as Radio,gt as RadioGroup,am as RadioSize,bj as Search,aJ as SectionCard,gu as SectionCardSize,ah as Segment,ap as SegmentSize,bx as SegmentVariant,dy as StatusCard,dc as Stepper,bz as Table,bA as TableVariant,b5 as Tag,bg as TagVariants,ar as TextArea,dA as TextCard,dT as TimeInput,a9 as Toggle,aa as ToggleLabelAlign,gv as ToggleList,aU as ToggleSize,gw as ToggleVariant,ao as TruncatableTypography,f as Typography,ad as TypographyColor,h as TypographySize,aV as TypographyVariants,aA as WarningModal,gx as resolveTypographyColor}from"../chunks/ui-components-TeG65JGy.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"../chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{aM as CenterThis,eN as Code,m as Divider,g3 as ErrorBoundary,g4 as FadeLoader,F as FlexColumn,n as FlexRow,g5 as IconButton,I as IconGroup,g6 as IconWrapped,g7 as ImageControlled,g8 as LoadingText,g9 as ModalBody,ga as NotificationNote,gb as Overlay,aZ as Padding,da as PageContent,e as Popup,gc as ScrollX,bk as ScrollY,bo as SkeletonLoader,gd as TableContainer,ge as TableTitleWrap,gf as TableWrap,T as Text,gg as ToggleCodeComponent,av as Tooltip,dB as UpgradeRequiredWrapper,gh as VerticalScroll,gi as getLinksFromText,gj as getStrongsFromText,gk as renderText}from"./chunks/ui-components-Dc15jc-B.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{aM as CenterThis,eN as Code,m as Divider,g3 as ErrorBoundary,g4 as FadeLoader,F as FlexColumn,n as FlexRow,g5 as IconButton,I as IconGroup,g6 as IconWrapped,g7 as ImageControlled,g8 as LoadingText,g9 as ModalBody,ga as NotificationNote,gb as Overlay,aZ as Padding,da as PageContent,e as Popup,gc as ScrollX,bk as ScrollY,bo as SkeletonLoader,gd as TableContainer,ge as TableTitleWrap,gf as TableWrap,T as Text,gg as ToggleCodeComponent,av as Tooltip,dB as UpgradeRequiredWrapper,gh as VerticalScroll,gi as getLinksFromText,gj as getStrongsFromText,gk as renderText}from"./chunks/ui-components-TeG65JGy.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{A as ACTION_OPTIONS,fJ as ALL_SOURCES,bC as BTN_CANCEL,dF as BTN_CREATE_FIRST_RULE,bJ as BTN_CREATE_RULE,bF as BTN_DELETE_RULE,dV as BTN_EDIT_AUTO_RULE,bE as BTN_EDIT_RULE,bR as BTN_SAVE,bD as BTN_SAVE_RULE,aY as BUTTON_TEXTS,bG as CATEGORY_DESCRIPTIONS,ex as CATEGORY_LABELS,bK as CATEGORY_TITLES,fK as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fL as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fM as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,aX as DEFAULT_CLUSTER_ID,aW as DEFAULT_CLUSTER_NAME,dt as DEFAULT_DATA_STREAM_NAME,e0 as DESC_DURATION,d$ as DESC_ERRORS,e3 as DESC_OPERATION,fN as DESC_PERCENTAGE_HIGHLY_RELEVANT,aF as DESC_PERCENTAGE_NOISY,ey as DESC_RULE_TYPE,eG as DESC_SOURCE_SCOPE,aR as DESTINATION_CATEGORIES,ay as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,aq as DOCS_BASE_URL,C as DestinationCategoryTypes,bN as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,bO as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,bL as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,bM as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,bP as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,bQ as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,bH as EDIT_TITLES,ef as EMPTY_VALUE,al as EXTRACTION_FORMAT_COPY,ai as EXTRACT_ATTRIBUTE_FORM,dD as FILTER_TYPE_ALL,y as FORM_ALERTS,M as INSTRUMENTATION_RULE_OPTIONS,e1 as LABEL_CUSTOM_DURATION,aK as LABEL_CUSTOM_PERCENTAGE,aI as LABEL_DISABLED,dC as LABEL_DISABLED_RULE,ep as LABEL_DROP_ALL,aC as LABEL_DROP_AT_MOST,aH as LABEL_ENABLED,e8 as LABEL_HTTP_ROUTE,ea as LABEL_HTTP_ROUTE_PREFIX,ec as LABEL_KAFKA_TOPIC,eq as LABEL_KEEP_ALL,em as LABEL_KEEP_AT_LEAST,en as LABEL_KEEP_AT_MOST,el as LABEL_KEEP_PERCENTAGE,d_ as LABEL_KEEP_TRACES_DURATION,dY as LABEL_KEEP_TRACES_ERRORS,eb as LABEL_METHOD,et as LABEL_NOTE,dW as LABEL_NO_PREVIEW,ee as LABEL_OPERATION_TYPE,fO as LABEL_RULE_DISABLED,fP as LABEL_RULE_ENABLED,er as LABEL_RULE_NAME,es as LABEL_RULE_TYPE,eo as LABEL_SAMPLE,e5 as LABEL_SERVER_ADDRESS,e7 as LABEL_TEMPLATED_PATH,e9 as LABEL_TEMPLATED_PATH_PREFIX,bu as LANGUAGE_OPTIONS,dg as MONITORS_OPTIONS,eA as NOTE_ENTIRE_CLUSTER,eF as NOTE_SOURCE_SCOPE_LOGIC,fQ as OPENTELEMETRY_EBPF_DISTRO_OPTION,eh as OPERATION_ALL,eg as OPERATION_HTTP_CLIENT,ed as OPERATION_HTTP_SERVER,ei as OPERATION_KAFKA_CONSUMER,ej as OPERATION_KAFKA_PRODUCER,bt as OTEL_DISTRO_NAME_OPTIONS,ek as PERCENTAGE_SECTION_DESCRIPTIONS,ev as PLACEHOLDER_NOTE,e6 as PLACEHOLDER_ROUTE,eu as PLACEHOLDER_RULE_NAME,eI as PLACEHOLDER_SEARCH_SOURCE,e4 as PLACEHOLDER_SERVER_ADDRESS,bd as PROCESS_ATTRIBUTE_NAMES,ac as REGEX_TESTER_DRAWER,aG as SAMPLING_AUTO_RULE_TITLE,dL as SAMPLING_BTN_CREATE_RULE,dJ as SAMPLING_BTN_DOCS,dK as SAMPLING_BTN_REFRESH,aE as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,dO as SAMPLING_DELETE_MODAL_APPROVE,dP as SAMPLING_DELETE_MODAL_CANCEL,dQ as SAMPLING_DELETE_MODAL_DESCRIPTION,dR as SAMPLING_DELETE_MODAL_TITLE,bS as SAMPLING_DRAWER_WIDTH,dI as SAMPLING_DUPLICATE_RULE_WARNING,aB as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,cJ as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,cK as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,cL as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,cM as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,cN as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,cO as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,cP as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,cQ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,cR as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,cS as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,cU as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,cT as SAMPLING_ONBOARDING_ADVANCED_TITLE,d9 as SAMPLING_ONBOARDING_AMBIENT_LABEL,cf as SAMPLING_ONBOARDING_BTN_GO_TO,c0 as SAMPLING_ONBOARDING_BTN_NEXT,cI as SAMPLING_ONBOARDING_BTN_READ_MORE,cq as SAMPLING_ONBOARDING_BTN_SKIP,cr as SAMPLING_ONBOARDING_BTN_START,cV as SAMPLING_ONBOARDING_COMMON_BANNER,d8 as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,cY as SAMPLING_ONBOARDING_DROP_DESCRIPTION,cX as SAMPLING_ONBOARDING_DROP_SUBTITLE,cW as SAMPLING_ONBOARDING_DROP_TITLE,c$ as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,c_ as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,d2 as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,d1 as SAMPLING_ONBOARDING_KEEP_SUBTITLE,d0 as SAMPLING_ONBOARDING_KEEP_TITLE,d3 as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,d4 as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,d5 as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,d6 as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,d7 as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,c7 as SAMPLING_ONBOARDING_NOISY_BANNER,c3 as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,c6 as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,c4 as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,c5 as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,c2 as SAMPLING_ONBOARDING_NOISY_SUBTITLE,c1 as SAMPLING_ONBOARDING_NOISY_TITLE,cZ as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,b$ as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,cF as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,cG as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,cH as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,cC as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,cA as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,cB as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,cD as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,cE as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,cx as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,cv as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,cw as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,cy as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,cz as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,cu as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,ct as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,cs as SAMPLING_ONBOARDING_STRATEGY_TITLE,cc as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,cd as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,ce as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,cb as SAMPLING_ONBOARDING_SUCCESS_INTRO,ca as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,c9 as SAMPLING_ONBOARDING_SUCCESS_TITLE,cp as SAMPLING_ONBOARDING_WELCOME_BANNER,ci as SAMPLING_ONBOARDING_WELCOME_INTRO,cj as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,ck as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,cl as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,cm as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,cn as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,co as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,ch as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,cg as SAMPLING_ONBOARDING_WELCOME_TITLE,dM as SAMPLING_PAGE_DESCRIPTION,dN as SAMPLING_PAGE_TITLE,eK as SCOPE_AND_LABEL,eJ as SCOPE_GROUP_ANY_OF_HINT,eE as SCOPE_GROUP_LANGUAGES_TITLE,eD as SCOPE_GROUP_NAMESPACES_TITLE,eB as SCOPE_GROUP_SOURCES_TITLE,dZ as SECTION_DURATION,dX as SECTION_ERRORS,aD as SECTION_KEEP_PERCENTAGE,e2 as SECTION_OPERATION,ez as SECTION_SAMPLING_PREVIEW,eL as SECTION_SOURCE_SCOPE,df as STORAGE_KEYS,dE as TITLE_NO_RESULTS,dG as TITLE_NO_RULES,fR as TOKEN_ABOUT_TO_EXPIRE,ew as TOOLTIP_NOTE,eC as UNKNOWN_SOURCE_LABEL,bI as UNNAMED_RULE,dH as getNoResultsSubTitle}from"./chunks/ui-components-Dc15jc-B.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
1
+ export{A as ACTION_OPTIONS,fJ as ALL_SOURCES,bC as BTN_CANCEL,dF as BTN_CREATE_FIRST_RULE,bJ as BTN_CREATE_RULE,bF as BTN_DELETE_RULE,dV as BTN_EDIT_AUTO_RULE,bE as BTN_EDIT_RULE,bR as BTN_SAVE,bD as BTN_SAVE_RULE,aY as BUTTON_TEXTS,bG as CATEGORY_DESCRIPTIONS,ex as CATEGORY_LABELS,bK as CATEGORY_TITLES,fK as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fL as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fM as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,aX as DEFAULT_CLUSTER_ID,aW as DEFAULT_CLUSTER_NAME,dt as DEFAULT_DATA_STREAM_NAME,e0 as DESC_DURATION,d$ as DESC_ERRORS,e3 as DESC_OPERATION,fN as DESC_PERCENTAGE_HIGHLY_RELEVANT,aF as DESC_PERCENTAGE_NOISY,ey as DESC_RULE_TYPE,eG as DESC_SOURCE_SCOPE,aR as DESTINATION_CATEGORIES,ay as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,aq as DOCS_BASE_URL,C as DestinationCategoryTypes,bN as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,bO as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,bL as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,bM as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,bP as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,bQ as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,bH as EDIT_TITLES,ef as EMPTY_VALUE,al as EXTRACTION_FORMAT_COPY,ai as EXTRACT_ATTRIBUTE_FORM,dD as FILTER_TYPE_ALL,y as FORM_ALERTS,M as INSTRUMENTATION_RULE_OPTIONS,e1 as LABEL_CUSTOM_DURATION,aK as LABEL_CUSTOM_PERCENTAGE,aI as LABEL_DISABLED,dC as LABEL_DISABLED_RULE,ep as LABEL_DROP_ALL,aC as LABEL_DROP_AT_MOST,aH as LABEL_ENABLED,e8 as LABEL_HTTP_ROUTE,ea as LABEL_HTTP_ROUTE_PREFIX,ec as LABEL_KAFKA_TOPIC,eq as LABEL_KEEP_ALL,em as LABEL_KEEP_AT_LEAST,en as LABEL_KEEP_AT_MOST,el as LABEL_KEEP_PERCENTAGE,d_ as LABEL_KEEP_TRACES_DURATION,dY as LABEL_KEEP_TRACES_ERRORS,eb as LABEL_METHOD,et as LABEL_NOTE,dW as LABEL_NO_PREVIEW,ee as LABEL_OPERATION_TYPE,fO as LABEL_RULE_DISABLED,fP as LABEL_RULE_ENABLED,er as LABEL_RULE_NAME,es as LABEL_RULE_TYPE,eo as LABEL_SAMPLE,e5 as LABEL_SERVER_ADDRESS,e7 as LABEL_TEMPLATED_PATH,e9 as LABEL_TEMPLATED_PATH_PREFIX,bu as LANGUAGE_OPTIONS,dg as MONITORS_OPTIONS,eA as NOTE_ENTIRE_CLUSTER,eF as NOTE_SOURCE_SCOPE_LOGIC,fQ as OPENTELEMETRY_EBPF_DISTRO_OPTION,eh as OPERATION_ALL,eg as OPERATION_HTTP_CLIENT,ed as OPERATION_HTTP_SERVER,ei as OPERATION_KAFKA_CONSUMER,ej as OPERATION_KAFKA_PRODUCER,bt as OTEL_DISTRO_NAME_OPTIONS,ek as PERCENTAGE_SECTION_DESCRIPTIONS,ev as PLACEHOLDER_NOTE,e6 as PLACEHOLDER_ROUTE,eu as PLACEHOLDER_RULE_NAME,eI as PLACEHOLDER_SEARCH_SOURCE,e4 as PLACEHOLDER_SERVER_ADDRESS,bd as PROCESS_ATTRIBUTE_NAMES,ac as REGEX_TESTER_DRAWER,aG as SAMPLING_AUTO_RULE_TITLE,dL as SAMPLING_BTN_CREATE_RULE,dJ as SAMPLING_BTN_DOCS,dK as SAMPLING_BTN_REFRESH,aE as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,dO as SAMPLING_DELETE_MODAL_APPROVE,dP as SAMPLING_DELETE_MODAL_CANCEL,dQ as SAMPLING_DELETE_MODAL_DESCRIPTION,dR as SAMPLING_DELETE_MODAL_TITLE,bS as SAMPLING_DRAWER_WIDTH,dI as SAMPLING_DUPLICATE_RULE_WARNING,aB as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,cJ as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,cK as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,cL as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,cM as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,cN as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,cO as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,cP as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,cQ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,cR as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,cS as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,cU as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,cT as SAMPLING_ONBOARDING_ADVANCED_TITLE,d9 as SAMPLING_ONBOARDING_AMBIENT_LABEL,cf as SAMPLING_ONBOARDING_BTN_GO_TO,c0 as SAMPLING_ONBOARDING_BTN_NEXT,cI as SAMPLING_ONBOARDING_BTN_READ_MORE,cq as SAMPLING_ONBOARDING_BTN_SKIP,cr as SAMPLING_ONBOARDING_BTN_START,cV as SAMPLING_ONBOARDING_COMMON_BANNER,d8 as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,cY as SAMPLING_ONBOARDING_DROP_DESCRIPTION,cX as SAMPLING_ONBOARDING_DROP_SUBTITLE,cW as SAMPLING_ONBOARDING_DROP_TITLE,c$ as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,c_ as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,d2 as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,d1 as SAMPLING_ONBOARDING_KEEP_SUBTITLE,d0 as SAMPLING_ONBOARDING_KEEP_TITLE,d3 as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,d4 as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,d5 as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,d6 as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,d7 as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,c7 as SAMPLING_ONBOARDING_NOISY_BANNER,c3 as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,c6 as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,c4 as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,c5 as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,c2 as SAMPLING_ONBOARDING_NOISY_SUBTITLE,c1 as SAMPLING_ONBOARDING_NOISY_TITLE,cZ as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,b$ as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,cF as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,cG as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,cH as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,cC as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,cA as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,cB as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,cD as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,cE as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,cx as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,cv as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,cw as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,cy as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,cz as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,cu as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,ct as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,cs as SAMPLING_ONBOARDING_STRATEGY_TITLE,cc as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,cd as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,ce as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,cb as SAMPLING_ONBOARDING_SUCCESS_INTRO,ca as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,c9 as SAMPLING_ONBOARDING_SUCCESS_TITLE,cp as SAMPLING_ONBOARDING_WELCOME_BANNER,ci as SAMPLING_ONBOARDING_WELCOME_INTRO,cj as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,ck as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,cl as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,cm as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,cn as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,co as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,ch as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,cg as SAMPLING_ONBOARDING_WELCOME_TITLE,dM as SAMPLING_PAGE_DESCRIPTION,dN as SAMPLING_PAGE_TITLE,eK as SCOPE_AND_LABEL,eJ as SCOPE_GROUP_ANY_OF_HINT,eE as SCOPE_GROUP_LANGUAGES_TITLE,eD as SCOPE_GROUP_NAMESPACES_TITLE,eB as SCOPE_GROUP_SOURCES_TITLE,dZ as SECTION_DURATION,dX as SECTION_ERRORS,aD as SECTION_KEEP_PERCENTAGE,e2 as SECTION_OPERATION,ez as SECTION_SAMPLING_PREVIEW,eL as SECTION_SOURCE_SCOPE,df as STORAGE_KEYS,dE as TITLE_NO_RESULTS,dG as TITLE_NO_RULES,fR as TOKEN_ABOUT_TO_EXPIRE,ew as TOOLTIP_NOTE,eC as UNKNOWN_SOURCE_LABEL,bI as UNNAMED_RULE,dH as getNoResultsSubTitle}from"./chunks/ui-components-TeG65JGy.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";