@odigos/ui-kit 0.0.299 → 0.0.300

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 (52) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/lib/chunks/{helpers-lW-r7stw.js → helpers-BwRnPdlh.js} +1 -1
  3. package/lib/chunks/index-nYW7_cdJ.js +364 -0
  4. package/lib/chunks/source-instrument-form-context-Rz3TBYRM.js +5 -0
  5. package/lib/chunks/ui-components-DObOt6F8.js +2273 -0
  6. package/lib/components/button-tab/index.d.ts +2 -1
  7. package/lib/components/code/index.d.ts +2 -2
  8. package/lib/components/drop-data/index.d.ts +7 -7
  9. package/lib/components/index.d.ts +2 -0
  10. package/lib/components/morph-icon/index.d.ts +74 -0
  11. package/lib/components/morph-icon/path-morph.d.ts +16 -0
  12. package/lib/components/morph-icon/registry.d.ts +34 -0
  13. package/lib/components/table/types.d.ts +2 -0
  14. package/lib/components/terminal/context.d.ts +17 -0
  15. package/lib/components/terminal/index.d.ts +10 -0
  16. package/lib/components.js +1 -1
  17. package/lib/constants.js +1 -1
  18. package/lib/containers/_drawers/create-cloud-connector-drawer/index.d.ts +0 -4
  19. package/lib/containers/_drawers/create-cloud-connector-drawer/is-done-modal/index.d.ts +7 -0
  20. package/lib/containers/_modals/create-k8s-connection-modal/index.d.ts +5 -0
  21. package/lib/containers/central-connections/helpers.d.ts +3 -6
  22. package/lib/containers/central-connections/index.d.ts +1 -8
  23. package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/helpers.d.ts +6 -4
  24. package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/index.d.ts +2 -0
  25. package/lib/containers.js +539 -536
  26. package/lib/contexts/cloud-connector-form-context.d.ts +0 -1
  27. package/lib/contexts/odigos-api/hooks/use-connections-api.d.ts +58 -0
  28. package/lib/contexts/odigos-api/index.d.ts +2 -1
  29. package/lib/contexts/odigos-api/types.d.ts +20 -1
  30. package/lib/contexts/odigos-api/use-odigos-api.d.ts +2 -0
  31. package/lib/contexts.js +1 -1
  32. package/lib/functions.js +1 -1
  33. package/lib/hooks.js +1 -1
  34. package/lib/icons.js +1 -1
  35. package/lib/snippets/index.d.ts +1 -1
  36. package/lib/snippets/intro-modal/index.d.ts +10 -0
  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/common/index.d.ts +2 -1
  41. package/lib/types.js +1 -1
  42. package/lib/visuals/index.d.ts +2 -0
  43. package/lib/visuals/visual-connection-morph/index.d.ts +12 -0
  44. package/lib/visuals/visual-odigos-logo/index.d.ts +1 -1
  45. package/lib/visuals/visual-terminal/index.d.ts +5 -0
  46. package/lib/visuals.js +1 -1
  47. package/package.json +3 -1
  48. package/lib/chunks/index-DH7pdkVR.js +0 -358
  49. package/lib/chunks/source-instrument-form-context-D3jXhnvh.js +0 -5
  50. package/lib/chunks/ui-components-BnY4B3Vq.js +0 -2163
  51. package/lib/snippets/connector-created-modal/index.d.ts +0 -7
  52. /package/lib/{containers/_modals/onboarding-done → snippets/intro-modal}/background.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.300](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.299...ui-kit-v0.0.300) (2026-09-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * add reusable MorphIcon for animated icon swaps ([#1306](https://github.com/odigos-io/ui-kit/issues/1306)) ([c7bbe16](https://github.com/odigos-io/ui-kit/commit/c7bbe16905ded7993eeb9f264aae4a00f9e04551))
9
+ * added flow for "add k8s proxy" via central connections ([#1302](https://github.com/odigos-io/ui-kit/issues/1302)) ([2697343](https://github.com/odigos-io/ui-kit/commit/269734332335f01a6811a5ae00ebe8ebcff25eba))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **anomaly:** trace compare view ([#1304](https://github.com/odigos-io/ui-kit/issues/1304)) ([a16d031](https://github.com/odigos-io/ui-kit/commit/a16d031a2ec7031c4bc30c5f454e6dada914e3a0))
15
+
3
16
  ## [0.0.299](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.298...ui-kit-v0.0.299) (2026-09-10)
4
17
 
5
18
 
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-BnY4B3Vq.js";import p from"styled-components";var d;(e=>{e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"})(d||(d={}));const f=[d.Action,d.Endpoint,d.Scope,d.Duration],h=p.span`
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-DObOt6F8.js";import p from"styled-components";var d;(e=>{e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"})(d||(d={}));const f=[d.Action,d.Endpoint,d.Scope,d.Duration],h=p.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;
@@ -0,0 +1,364 @@
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import o,{css as r,useTheme as s}from"styled-components";import l from"elkjs/lib/elk.bundled.js";import i,{useMemo as n,useRef as c,useCallback as p,useState as d,memo as u,useEffect as h,Fragment as g,forwardRef as m,useImperativeHandle as f}from"react";import{Handle as v,Position as y,useReactFlow as b,ReactFlowProvider as C,ReactFlow as x,Background as $,getSmoothStepPath as w,BaseEdge as S,EdgeLabelRenderer as k,MarkerType as F}from"@xyflow/react";import{D as T,c as O,F as M,d as B,e as P,f as L,g as A,h as _,B as E,i as I,j as N,k as R,u as V,l as z,m as X,C as D,N as H,n as U,W as j,o as G,p as q,q as K,r as W,s as Y,v as Z,w as J,x as Q,I as ee,y as te,z as ae,E as oe,G as re,H as se,J as le,K as ie,S as ne,L as ce,M as pe,U as de,O as ue,Q as he,V as ge,X as me,Y as fe,Z as ve,_ as ye,$ as be,a0 as Ce,a1 as xe,a2 as $e,a3 as we,a4 as Se,a5 as ke,a6 as Fe,a7 as Te,T as Oe,a8 as Me,a9 as Be,aa as Pe,ab as Le,ac as Ae,ad as _e,ae as Ee,af as Ie,ag as Ne,ah as Re,ai as Ve,aj as ze,ak as Xe,b as De,al as He,am as Ue,an as je,ao as Ge,ap as qe,aq as Ke,ar as We,as as Ye,at as Ze,au as Je,av as Qe,aw as et,ax as tt,ay as at,az as ot,aA as rt,aB as st,aC as lt,aD as it,aE as nt,aF as ct,aG as pt,aH as dt,aI as ut,aJ as ht,aK as gt,aL as mt,aM as ft,aN as vt,aO as yt,aP as bt,aQ as Ct,aR as xt,aS as $t,aT as wt,aU as St,aV as kt,aW as Ft,aX as Tt,aY as Ot,aZ as Mt,a_ as Bt,a$ as Pt,b0 as Lt,b1 as At,b2 as _t,b3 as Et,b4 as It,b5 as Nt,b6 as Rt,R as Vt,b7 as zt,b8 as Xt,b9 as Dt,A as Ht,ba as Ut,bb as jt,bc as Gt}from"./ui-components-DObOt6F8.js";import{UserIcon as qt,DestinationIcon as Kt,HomeIcon as Wt,TrashIcon as Yt,PlusIcon as Zt,VSquareIcon as Jt,XSquareIcon as Qt,EditIcon as ea,OdigosLogoTextCentral as ta,OdigosLogoTextEnterprise as aa,OdigosLogoTextCommunity as oa,OdigosLogoTextColoredCentral as ra,OdigosLogoTextColoredEnterprise as sa,OdigosLogoTextColoredCommunity as la,ArrowLeftIcon as ia,ArrowRightIcon as na,YamlIcon as ca}from"../icons.js";import"@xyflow/react/dist/style.css";import{i as pa,m as da,u as ua,n as ha,a as ga,C as ma,b as fa,d as va,e as ya,f as ba,g as Ca,h as xa,j as $a,k as wa}from"./helpers-BwRnPdlh.js";const Sa=/^[a-zA-Z]$/,ka=new Set(["*","+","?"]),Fa=new Set(["^","$"]),Ta={group:"rgba(102, 242, 102, 0.5)","anchor-quantifier":"rgba(102, 191, 255, 0.5)","class-bracket":"rgba(255, 153, 153, 0.5)","class-content":"rgba(178, 1, 1, 0.5)",alternation:"rgba(255, 153, 153, 0.5)",literal:"transparent"},Oa=o.div`
2
+ padding: 8px 16px;
3
+ border-radius: 6px;
4
+ border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
5
+ background: ${({theme:e})=>e.v2.colors.black[500]};
6
+ font-family: ${({theme:e})=>e.font_family.code};
7
+ font-size: 12px;
8
+ line-height: 20px;
9
+ color: ${({theme:e})=>e.v2.colors.white[500]};
10
+ word-break: break-all;
11
+ white-space: pre-wrap;
12
+ user-select: text;
13
+
14
+ /* Wraps the background tightly to each visual fragment when a colored
15
+ token gets split across two visual lines. Without this the highlight
16
+ stretches all the way to the right edge of the container. */
17
+ & > span {
18
+ box-decoration-break: clone;
19
+ -webkit-box-decoration-break: clone;
20
+ }
21
+ `,Ma=o.span`
22
+ background: ${({$kind:e})=>Ta[e]};
23
+ `,Ba=({pattern:t,"data-id":a})=>{const o=n(()=>(e=>{const t=[];let a=0,o=!1;const r=(e,a)=>{const o=t[t.length-1];o&&o.kind===a?o.text+=e:t.push({text:e,kind:a})};for(;a<e.length;){const t=e[a];if(o){if("]"===t){r("]","class-bracket"),o=!1,a++;continue}if("\\"===t&&a+1<e.length){r(e.slice(a,a+2),"class-content"),a+=2;continue}r(t,"class-content"),a++}else{if("("===t&&"?"===e[a+1]){let t=2;const o=e[a+2];if(":"===o||"="===o||"!"===o)t=3;else if("<"===o){const o=e[a+3];if("="===o||"!"===o)t=4;else{const o=e.indexOf(">",a+2);-1!==o&&(t=o-a+1)}}r(e.slice(a,a+t),"group"),a+=t;continue}if("("!==t&&")"!==t)if("["!==t)if(ka.has(t)||Fa.has(t))r(t,"anchor-quantifier"),a++;else{if("{"===t){const t=e.indexOf("}",a);if(t>a&&/^\{\d+,?\d*\}$/.test(e.slice(a,t+1))){r(e.slice(a,t+1),"anchor-quantifier"),a=t+1;continue}}if("\\"===t&&a+1<e.length){const t=e[a+1];Sa.test(t)?r(e.slice(a,a+2),"anchor-quantifier"):r(e.slice(a,a+2),"literal"),a+=2;continue}"|"!==t?(r(t,"literal"),a++):(r("|","alternation"),a++)}else"^"===e[a+1]?(r("[^","class-bracket"),a+=2):(r("[","class-bracket"),a++),o=!0;else r(t,"group"),a++}}return t})(t),[t]);return e(Oa,t?{"data-id":a,children:o.map((t,a)=>e(Ma,{$kind:t.kind,children:t.text},a))}:{"data-id":a,children:" "})},Pa="rgba(102, 191, 255, 0.5)",La=r`
24
+ font-family: ${({theme:e})=>e.font_family.code};
25
+ font-size: 12px;
26
+ line-height: 20px;
27
+ letter-spacing: 0;
28
+ white-space: pre-wrap;
29
+ word-wrap: break-word;
30
+ overflow-wrap: break-word;
31
+ /* tab-size keeps tabs visually consistent across the two layers — some
32
+ browsers default to 8 on a textarea but 4 on a div. */
33
+ -moz-tab-size: 4;
34
+ tab-size: 4;
35
+ margin: 0;
36
+ `,Aa=o.div`
37
+ position: relative;
38
+ width: 100%;
39
+ min-height: ${({$minHeight:e})=>e}px;
40
+ border-radius: 6px;
41
+ border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
42
+ background: ${({theme:e})=>e.v2.colors.black[500]};
43
+
44
+ &:hover,
45
+ &:focus-within {
46
+ border-color: ${({theme:e})=>e.v2.colors.silver[300]};
47
+ }
48
+ `,_a=o.div`
49
+ ${La}
50
+ position: absolute;
51
+ inset: 0;
52
+ padding: 12px;
53
+ pointer-events: none;
54
+ color: transparent;
55
+ overflow: hidden;
56
+
57
+ /* Mandatory for backgrounds that wrap across visual lines. */
58
+ & > span {
59
+ box-decoration-break: clone;
60
+ -webkit-box-decoration-break: clone;
61
+ }
62
+ `,Ea=o.textarea`
63
+ ${La}
64
+ position: relative;
65
+ z-index: 1;
66
+ display: block;
67
+ width: 100%;
68
+ min-height: ${({$minHeight:e})=>e}px;
69
+ padding: 12px;
70
+ border: 0;
71
+ background: transparent;
72
+ outline: none;
73
+ resize: vertical;
74
+ color: ${({theme:e})=>e.v2.colors.white[500]};
75
+ caret-color: ${({theme:e})=>e.v2.colors.white[500]};
76
+ box-sizing: border-box;
77
+
78
+ &::placeholder {
79
+ color: ${({theme:e})=>e.v2.colors.silver[600]};
80
+ }
81
+ `,Ia=e=>({before:e,matchPre:"",capture:"",matchPost:"",after:""}),Na=({regex:a,value:o,onChange:r,minHeight:s=240,...l})=>{const i=c(null),d=c(null),u=n(()=>((e,t)=>{if(!e||!t)return Ia(t);let a;try{a=new RegExp(e)}catch{return Ia(t)}const o=a.exec(t);if(!o)return Ia(t);const r=o.index,s=o.index+o[0].length;if(o.length<2||null==o[1])return{before:t.slice(0,r),matchPre:"",capture:t.slice(r,s),matchPost:"",after:t.slice(s)};const l=o[0].indexOf(o[1]),i=l>=0?r+l:r,n=i+o[1].length;return{before:t.slice(0,r),matchPre:t.slice(r,i),capture:t.slice(i,n),matchPost:t.slice(n,s),after:t.slice(s)}})(a,o),[a,o]),h=p(()=>{i.current&&d.current&&(i.current.scrollTop=d.current.scrollTop,i.current.scrollLeft=d.current.scrollLeft)},[]);return t(Aa,{$minHeight:s,children:[t(_a,{ref:i,"aria-hidden":!0,children:[u.before,e("span",{style:{background:Pa},children:u.matchPre}),e("span",{style:{background:"rgba(102, 242, 102, 0.5)"},children:u.capture}),e("span",{style:{background:Pa},children:u.matchPost}),u.after,o.endsWith("\n")?" ":""]}),e(Ea,{ref:d,$minHeight:s,value:o,onChange:e=>r(e.target.value),onScroll:h,spellCheck:!1,...l})]})},Ra=o.div`
82
+ flex: 1;
83
+ min-height: 0;
84
+ overflow-y: auto;
85
+ `,Va=o.div`
86
+ background: ${({theme:e})=>e.v2.colors.silver[900]};
87
+ border-radius: 8px;
88
+ padding: 8px;
89
+ display: flex;
90
+ flex-direction: column;
91
+ gap: 12px;
92
+ `,za=o.div`
93
+ padding: 8px 16px;
94
+ border-radius: 8px;
95
+ background: ${({theme:e})=>e.v2.colors.silver[800]};
96
+ font-family: ${({theme:e})=>e.font_family.code};
97
+ font-size: 12px;
98
+ line-height: 20px;
99
+ color: ${({theme:e,$tone:t})=>"error"===t?e.v2.colors.red[500]:"match"===t?e.v2.colors.white[500]:e.v2.colors.silver[200]};
100
+ word-break: break-all;
101
+ white-space: pre-wrap;
102
+ user-select: text;
103
+ `,Xa=({isOpen:a,regex:o,onClose:r,initialTestString:s=""})=>{const[l,i]=d(s),c=n(()=>((e,t)=>{if(!e)return{ok:!0,isMatch:!1,message:O.RESULT_EMPTY_REGEX};if(!t)return{ok:!0,isMatch:!1,message:O.RESULT_EMPTY_INPUT};let a;try{a=new RegExp(e)}catch(e){return{ok:!1,message:e instanceof Error?e.message:O.RESULT_INVALID_REGEX_FALLBACK}}const o=a.exec(t);return o?{ok:!0,isMatch:!0,message:o.length>1?o[1]:o[0]}:{ok:!0,isMatch:!1,message:O.RESULT_NO_MATCH}})(o,l),[o,l]),p=c.ok?c.isMatch?"match":"neutral":"error";return e(T,{isOpen:a,header:{title:O.TITLE,onClose:()=>{i(""),r()}},children:e(Ra,{children:t(Va,{children:[t(M,{$gap:6,children:[e(B,{label:O.REGEX_LABEL}),e(Ba,{pattern:o,"data-id":"regex-tester-regex"}),!o&&e(P,{size:A.XXS,color:L.Secondary,children:O.REGEX_EMPTY_HINT})]}),t(M,{$gap:6,children:[t(_,{$width:"100%",$justifyContent:"space-between",$alignItems:"center",children:[e(B,{label:O.TEST_STRING_LABEL}),e(E,{"data-id":"regex-tester-unescape",label:O.UNESCAPE_LABEL,tooltip:O.UNESCAPE_TOOLTIP,variant:N.Secondary,size:I.S,onClick:()=>i(e=>(e=>{let t="";for(let a=0;a<e.length;a++){if("\\"===e[a]&&a+1<e.length){const o=e[a+1],r="n"===o?"\n":"t"===o?"\t":"r"===o?"\r":'"'===o?'"':"'"===o?"'":"\\"===o?"\\":null;if(null!=r){t+=r,a++;continue}}t+=e[a]}return t})(e)),disabled:(u=l,!/\\["'\\nrt]/.test(u))})]}),e(Na,{name:"regex-tester-test-string","data-id":"regex-tester-test-string",placeholder:O.TEST_STRING_PLACEHOLDER,regex:o,value:l,onChange:i,minHeight:240}),e(R,{helpMessage:O.TEST_STRING_HELP})]}),t(M,{$gap:8,children:[e(B,{label:O.RESULT_LABEL}),e(za,{$tone:p,"data-id":"regex-tester-result",children:c.message}),c.ok&&c.isMatch&&e(P,{size:A.XXS,color:L.Secondary,children:O.RESULT_CAPTURE_HINT})]})]})})});var u},Da=o.div`
104
+ display: grid;
105
+ grid-template-rows: ${({$open:e})=>e?"1fr":"0fr"};
106
+ opacity: ${({$open:e})=>e?1:0};
107
+ margin-bottom: ${({$open:e,$gapCancelPx:t})=>e?"0":`-${t}px`};
108
+ transition:
109
+ grid-template-rows ${220}ms ease,
110
+ opacity ${220}ms ease ${({$open:e,$delayInMs:t})=>e?`${t}ms`:"0ms"},
111
+ margin-bottom ${220}ms ease;
112
+ pointer-events: ${({$open:e})=>e?"auto":"none"};
113
+
114
+ > .animated-collapse-inner {
115
+ overflow: hidden;
116
+ min-height: 0;
117
+ }
118
+ `,Ha=({open:t,children:a,delayInMs:o=0,gapCancelPx:r=0})=>e(Da,{$open:t,$delayInMs:o,$gapCancelPx:r,"aria-hidden":!t,children:e("div",{className:"animated-collapse-inner",children:a})}),Ua=o.div`
119
+ box-sizing: border-box;
120
+ min-width: 109px;
121
+ max-width: 160px;
122
+ padding: 12px;
123
+ border-radius: 8px;
124
+ display: flex;
125
+ flex-direction: column;
126
+ gap: 8px;
127
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
128
+ border: 1px
129
+ ${({$accent:e,$isVirtual:t})=>t?`dashed ${e}`:`solid ${e}`};
130
+ `,ja=o.div`
131
+ display: flex;
132
+ align-items: center;
133
+ gap: 4px;
134
+ min-width: 0;
135
+ `,Ga=o.div`
136
+ flex-shrink: 0;
137
+ width: 16px;
138
+ height: 16px;
139
+ display: flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ `,qa={visibility:"hidden"},Ka=u(({data:o})=>{const r=s(),{service:l,namespace:i,isVirtual:n,isRoot:c,isUser:p}=o,d=((e,t)=>"user"===e?qt:t?Kt:Wt)(l,n),u=i?`${i}/${l}`:l,h=n?"virtual":"-",g=c?r.v2.colors.purple[300]:n?r.v2.colors.pink[500]:r.v2.colors.silver[200];return t(a,{children:[e(v,p?{type:"source",position:y.Bottom,style:qa}:{type:"source",position:y.Top,style:qa}),e(v,p?{type:"target",position:y.Right,style:qa}:{type:"target",position:y.Left,style:qa}),t(Ua,{$accent:g,$isVirtual:n,children:[t(ja,{children:[e(Ga,{children:e(d,{size:16,fill:g})}),e(P,{size:A.XXXS,color:g,nowrap:!0,children:u})]}),e(P,{size:A.XXXS,color:g,nowrap:!0,children:h})]})]})});Ka.displayName=Ka.name;const Wa={duration:300,padding:.2,includeHiddenNodes:!0,maxZoom:1},Ya=({trigger:e,options:t=Wa})=>{const{fitView:a}=b(),o=c(!0);return h(()=>{o.current?o.current=!1:e>0&&requestAnimationFrame(()=>a(t))},[e,a,t]),null},Za=o.div`
143
+ position: relative;
144
+ width: 100%;
145
+ height: ${({$height:e})=>e};
146
+ border-radius: 8px;
147
+ overflow: hidden;
148
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
149
+
150
+ .react-flow__attribution {
151
+ visibility: hidden;
152
+ }
153
+
154
+ ${({$lockPointerEvents:e})=>e?"\n .react-flow__node {\n cursor: default;\n pointer-events: none;\n }\n ":""}
155
+
156
+ ${({$suppressFocus:e})=>e?"\n .react-flow__node:focus,\n .react-flow__node:focus-visible,\n .react-flow__node.selected {\n outline: none;\n box-shadow: none;\n }\n ":""}
157
+
158
+ * {
159
+ transition: none;
160
+ }
161
+ `,Ja=o(X)`
162
+ position: absolute;
163
+ top: 12px;
164
+ right: 12px;
165
+ z-index: ${({theme:e})=>e.v2.zIndex.island};
166
+ `;function Qa({nodes:a,edges:o,nodeTypes:r,edgeTypes:l,height:i=420,interactive:p=!1,minZoom:u=.2,maxZoom:g=1.5,fitViewPadding:m=.2,fitViewTrigger:f=0,showBackground:v=!0,suppressNodeFocusStyle:y,withFullscreen:b=!0,onFullscreenChange:C,onNodesChange:w,onEdgesChange:S,onNodeClick:k,onNodeMouseEnter:F,onNodeMouseLeave:T,className:O,style:M,children:B}){const P=s(),{isFullscreen:L,toggle:A}=V({onChange:C}),[_,E]=d(0),I=c(!0),N=!p,R=y??N,X=(e=>"number"==typeof e?`${e}px`:e)(i),D=f+_,H=n(()=>({...Wa,padding:m,maxZoom:Math.min(Wa.maxZoom??1,g)}),[m,g]);h(()=>{if(I.current)return void(I.current=!1);const e=requestAnimationFrame(()=>{E(e=>e+1)});return()=>cancelAnimationFrame(e)},[L]);const U=t(Za,{className:O,style:M,$height:L?"calc(100vh - 32px)":X,$lockPointerEvents:N,$suppressFocus:R,children:[t(x,{nodes:a,edges:o,nodeTypes:r,edgeTypes:l,onNodesChange:w,onEdgesChange:S,onNodeClick:k,onNodeMouseEnter:F,onNodeMouseLeave:T,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,nodesFocusable:!N,edgesFocusable:!1,panOnDrag:!0,zoomOnScroll:!0,minZoom:u,maxZoom:g,proOptions:{hideAttribution:!0},children:[v&&e($,{color:P.v2.colors.silver[600],gap:17,size:1}),e(Ya,{trigger:D,options:H}),B]}),b&&e(Ja,{isFullscreen:L,onToggle:A})]});return b?e(z,{isFullscreen:L,spacerHeight:X,children:U}):U}function eo(t){return e(C,{children:e(Qa,{...t})})}const to=t=>e(eo,{...t}),ao=({sourceX:e,sourceY:t,targetX:a,targetY:o,sourcePosition:r=y.Right,targetPosition:s=y.Left,isSelfLoop:l,selfLoopNodeHeight:i})=>l?(({sourceX:e,sourceY:t,targetX:a,targetY:o,selfLoopNodeHeight:r=80})=>{const s=(e+a)/2,l=r/2+40,i=Math.min(t,o)-l;return[`M ${e},${t} C ${e+28},${t} ${e+28},${i} ${s},${i} C ${a-28},${i} ${a-28},${o} ${a},${o}`,s,i,0,0]})({sourceX:e,sourceY:t,targetX:a,targetY:o,selfLoopNodeHeight:i}):w({sourceX:e,sourceY:t,targetX:a,targetY:o,sourcePosition:r,targetPosition:s}),oo=new l,ro=async(e,t,a)=>{const{nodeWidth:o,nodeHeight:r,rootIds:s=[],rootLayerConstraint:l="FIRST",rootAlignCenter:i="FIRST"===l,spacing:n,direction:c,extraOptions:p}=a,d=new Set(s),u=(({direction:e="RIGHT",spacing:t,extraOptions:a})=>({"elk.algorithm":"layered","elk.direction":e,"elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.layered.spacing.nodeNodeBetweenLayers":String(t?.betweenLayers??120),"elk.spacing.nodeNode":String(t?.nodeNode??24),"elk.layered.spacing.edgeEdgeBetweenLayers":String(t?.edgeEdge??24),"elk.layered.spacing.edgeNodeBetweenLayers":String(t?.edgeNode??32),...a}))({direction:c,spacing:n,extraOptions:p}),h={id:"root",layoutOptions:u,children:e.map(e=>({id:e.id,width:o,height:r,...d.has(e.id)?{layoutOptions:{"elk.layered.layering.layerConstraint":l,...i?{"elk.alignment":"CENTER"}:{}}}:{}})),edges:t.map(e=>({id:e.id,sources:[e.source],targets:[e.target]}))},g=await oo.layout(h),m=new Map;return g.children?.forEach(e=>{m.set(e.id,{x:e.x??0,y:e.y??0})}),{nodes:e.map(e=>({...e,position:m.get(e.id)??e.position})),edges:t}},so="0;0.5;1",lo=u(({id:o,source:r,target:l,sourceX:i,sourceY:c,targetX:p,targetY:d,sourcePosition:u,targetPosition:h,markerEnd:g,style:m,data:f})=>{const v=s(),y=f?.mode??"fixed",b=r===l||Boolean(f?.isSelfLoop),[C]=ao({sourceX:i,sourceY:c,targetX:p,targetY:d,sourcePosition:u,targetPosition:h,isSelfLoop:b,selfLoopNodeHeight:f?.selfLoopNodeHeight}),x=`${o}__graph-flow-motion`,$=f?.trackColor??("string"==typeof m?.stroke?m.stroke:"path-length"===y?v.v2.colors.silver[400]:v.v2.colors.blue[700]),w=f?.ballColorSmall??("path-length"===y?v.v2.colors.silver[600]:v.v2.colors.blue[900]),F=f?.ballColorLarge??("path-length"===y?v.v2.colors.silver[200]:v.v2.colors.blue[500]),{travelDuration:T,ballCount:O}=n(()=>{if("fixed"===y)return{travelDuration:4,ballCount:5};const e=Math.hypot(p-i,d-c),t=((e,t)=>{if("undefined"==typeof document)return t;const a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d",e),a.getTotalLength()||t})(C,e);return{travelDuration:Math.max(1.2,t/100),ballCount:Math.min(10,Math.max(3,Math.round(t/72)))}},[y,C,i,c,p,d]),M=`${T.toFixed(3)}s`;return t(a,{children:[e(S,{id:o,path:C,markerEnd:g,style:{...m,stroke:$,strokeWidth:1}}),e(k,{children:t("svg",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"visible",pointerEvents:"none"},children:[e("path",{id:x,d:C,fill:"none",stroke:"none"}),Array.from({length:O}).map((a,o)=>{const r=`-${(T/O*o).toFixed(3)}s`;return t("circle",{r:0,fill:w,children:[e("animateMotion",{dur:M,begin:r,repeatCount:"indefinite",children:e("mpath",{href:`#${x}`})}),e("animate",{attributeName:"r",dur:M,begin:r,repeatCount:"indefinite",keyTimes:so,values:"0;3.5;3.5"}),e("animate",{attributeName:"fill",dur:M,begin:r,repeatCount:"indefinite",keyTimes:so,values:`${w};${F};${F}`})]},o)})]})})]})});lo.displayName=lo.name;const io="graph-flow-animated";var no,co;(e=>{e.Service="blast-radius-service"})(no||(no={})),(e=>{e.Animated="blast-radius-animated"})(co||(co={}));const po=(e,t)=>{const a=(e||"").trim();return a?`${a}/${t}`:t},uo=e=>po(e.namespace,e.service),ho=(e,t,a)=>{const o=new Set(e),r=[...e];for(;r.length;){const e=r.shift();for(const s of a.get(e)??[])s===t||o.has(s)||(o.add(s),r.push(s))}return o},go=(e,t,a)=>{const o=new Map;if(!e.length)return o;const r=[];for(let t=0;t<e.length;t+=6)r.push(e.slice(t,t+6));const s=-72*(r.length-1)/2;return r.forEach((e,r)=>{const l=s+72*r;e.forEach((e,r)=>{const s=t+a*(r+1)*160;o.set(e,{x:s,y:l})})}),o},mo=(e,t,a)=>{const o=t.map(e=>a.get(e)).filter(e=>!!e);if(!o.length)return{x:0,y:72};const r={x:o.reduce((e,t)=>e+t.x,0)/o.length,y:o.reduce((e,t)=>e+t.y,0)/o.length+72},s=new Set([...a.entries()].filter(([t])=>t!==e).map(([,e])=>`${e.x},${e.y}`));let l=r;for(;s.has(`${l.x},${l.y}`);)l={x:l.x,y:l.y+72};return l},fo={[no.Service]:Ka},vo={[co.Animated]:lo,[io]:lo},yo=o.div`
167
+ display: flex;
168
+ flex-direction: column;
169
+ gap: 8px;
170
+ padding: 12px;
171
+ width: fit-content;
172
+ border-radius: 8px;
173
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
174
+ position: absolute;
175
+ top: 12px;
176
+ left: 12px;
177
+ z-index: ${({theme:e})=>e.v2.zIndex.island};
178
+ `,bo=({subgraph:a})=>{const o=s(),[r,l]=d([]),[i,c]=d([]),[p,u]=d(0),[g,m]=d(null),f=n(()=>{const e=a.nodes.map(e=>`${e.namespace||""}/${e.service}:${e.isVirtual?1:0}`).join("|"),t=a.edges.map(e=>`${e.clientNamespace||""}/${e.clientService}->${e.serverNamespace||""}/${e.serverService}`).join("|");return`${(e=>`${e.root.namespace||""}/${e.root.service}`)(a)}::${e}::${t}`},[a]);h(()=>{const e=(e=>{const t=uo(e.root);return e.nodes.map(e=>{const a=uo(e);return{id:a,type:no.Service,position:{x:0,y:0},data:{service:e.service,namespace:e.namespace||"",isVirtual:e.isVirtual,isRoot:a===t,isUser:"user"===e.service},measured:{width:120,height:58}}})})(a),t=new Set(e.map(e=>e.id)),r=((e,t,a)=>e.edges.flatMap(e=>{const o=(e=>po(e.clientNamespace,e.clientService))(e),r=(e=>po(e.serverNamespace,e.serverService))(e);if(!a.has(o)||!a.has(r))return[];const s=t.v2.colors.silver[400];return[{id:`${o}->${r}`,type:"smoothstep",source:o,target:r,markerEnd:{type:F.ArrowClosed,color:s,width:16,height:16},style:{stroke:s,strokeWidth:1}}]}))(a,o,t),s=((e,t)=>{if(!e.length)return{nodes:e,edges:t};const a=(e.find(e=>e.data.isRoot)??e[0]).id,o=e.find(e=>e.data.isUser)?.id??null,r=new Map,s=new Map,l=new Map;for(const t of e)r.set(t.id,[]),s.set(t.id,[]),l.set(t.id,[]);for(const e of t)r.get(e.source)?.push(e.target),s.get(e.target)?.push(e.source),l.get(e.source)?.push(e.target),l.get(e.target)?.push(e.source);const i=ho((s.get(a)??[]).filter(e=>e!==o),a,l),n=ho((r.get(a)??[]).filter(e=>e!==o&&!i.has(e)),a,l);o&&(i.delete(o),n.delete(o));const c=((e,t)=>{const a=new Map([[e,0]]),o=[e];for(;o.length;){const e=o.shift(),r=(a.get(e)??0)+1;for(const s of t.get(e)??[])a.has(s)||(a.set(s,r),o.push(s))}return a})(a,l),p=[...i].sort((e,t)=>{const a=(c.get(t)??0)-(c.get(e)??0);return 0!==a?a:e.localeCompare(t)}),d=[...n].filter(e=>!i.has(e)).sort((e,t)=>{const a=(c.get(e)??0)-(c.get(t)??0);return 0!==a?a:e.localeCompare(t)});for(const t of e)t.id===a||t.id===o||i.has(t.id)||n.has(t.id)||p.push(t.id);const u=new Map([[a,{x:0,y:0}]]);for(const[e,t]of go(p,0,-1))u.set(e,t);for(const[e,t]of go(d,0,1))u.set(e,t);return o&&u.set(o,mo(o,l.get(o)??[],u)),{nodes:e.map(e=>({...e,position:u.get(e.id)??e.position})),edges:t}})(e,r);l(s.nodes),c(s.edges),m(null),u(e=>e+1)},[f,a,o]);const v=n(()=>g?i.map(e=>{if(e.source===g||e.target===g)return{...e,type:co.Animated,data:{...e.data,mode:"path-length"}};const t={opacity:.3};return{...e,style:{...e.style,...t},labelStyle:{...e.labelStyle,...t},labelBgStyle:{...e.labelBgStyle,...t}}}):i,[i,g]);return e(eo,{height:286,interactive:!0,nodeTypes:fo,edgeTypes:vo,nodes:r,edges:v,fitViewTrigger:p,fitViewPadding:.2,minZoom:.4,maxZoom:1.5,onNodeMouseEnter:(e,t)=>m(t.id),onNodeMouseLeave:()=>m(null),children:t(yo,{children:[t(_,{$gap:4,children:[e(U,{color:o.v2.colors.purple[400]}),e(P,{size:A.XXXS,children:"This Service"})]}),t(_,{$gap:4,children:[e(U,{color:o.v2.colors.pink[500]}),e(P,{size:A.XXXS,children:"Non-Instrumented Service"})]}),t(_,{$gap:4,children:[e(U,{color:o.v2.colors.silver[200]}),e(P,{size:A.XXXS,children:"Instrumented Service"})]})]})})},Co=({blastRadius:t})=>t?.nodes?.length?e(bo,{subgraph:t}):e(D,{children:e(H,{subTitle:"No blast-radius neighborhood for this service yet."})}),xo=({isOpen:t,onClose:a,onDeny:o,onApprove:r})=>e(j,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:t,onClose:a,denyButton:{label:"Keep editing",variant:N.Secondary,onClick:()=>{o?.(),a()}},approveButton:{label:"Discard changes",variant:N.Primary,onClick:()=>{r?.(),a()}}}),$o=({isOpen:t,onClose:a,onDeny:o,onApprove:r,action:s="delete",target:l,description:i,overrideApproveButtonLabel:n,overrideDenyButtonLabel:c})=>{const p=s.charAt(0).toUpperCase()+s.substring(1),d=l?.endsWith("s")?"these":"this";return e(j,{title:`${p}${l?` ${l}`:""}?`,description:i??`Are you sure you want to ${s}${l?` ${d} ${l}`:""}?`,isOpen:t,onClose:a,denyButton:{label:c??"Go back",variant:N.Secondary,onClick:()=>{o?.(),a()}},approveButton:{label:n??p,variant:N.Primary,onClick:()=>{r?.(),a()}}})},wo=({componentType:t,inputType:a,name:o,label:r,tooltip:s,badge:l,placeholder:i,required:n,disabled:c,value:p,setValue:d,errorMessage:u,warnMessage:h,helpMessage:g,dropdownOptions:m,dropdownNoSearch:f,dropdownNoCheckbox:v,timeUnits:y,timeDefaultUnit:b,toggleSize:C=W.L,keyLabel:x,valueLabel:$})=>{switch(t){case G.Input:return e(oe,{name:o,type:a,label:r,tooltip:s,badge:l,placeholder:i,required:n,disabled:c,value:p??"",onChange:e=>{const t=e.target.value;d(a===re.Number?""===t?null:Number(t):t)},errorMessage:u,warnMessage:h,helpMessage:g},o);case G.MultiInput:return e(ae,{name:o,label:r,tooltip:s,badge:l,placeholder:i,required:n,disabled:c,values:Array.isArray(p)?p:te(p,[]),setValues:e=>d(e),errorMessage:u,warnMessage:h,helpMessage:g,plain:!0},o);case G.KeyValuePair:return e(ee,{name:o,label:r,tooltip:s,badge:l,required:n,disabled:c,limitFieldsPerRow:2,columns:[{keyName:"key",label:x||"Key",placeholder:x||"Key"},{keyName:"value",label:$||"Value",placeholder:$||"Value"}],values:Array.isArray(p)?p:te(p,[]),setValues:e=>d(e),errorMessage:u,warnMessage:h,helpMessage:g},o);case G.TextArea:return e(Q,{name:o,label:r,tooltip:s,badge:l,required:n,disabled:c,placeholder:i,value:p??"",onChange:e=>d(e.target.value),errorMessage:u,warnMessage:h,helpMessage:g},o);case G.Dropdown:return e(J,{name:o,label:r,tooltip:s,badge:l,placeholder:i,required:n,disabled:c,withSearch:!f,options:m?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!v}))||[],values:p?[String(p)]:[],setValues:e=>d(e[0]),errorMessage:u,warnMessage:h,helpMessage:g},o);case G.Checkbox:return e(Z,{name:o,label:r,tooltip:s,badge:l,value:!0===p||"true"===p,onChange:e=>d(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},o);case G.Time:return e(Y,{name:o,label:r,tooltip:s,badge:l,placeholder:i,required:n,disabled:c,value:p??"",setValue:e=>d(e),units:y,defaultUnit:b,errorMessage:u,warnMessage:h,helpMessage:g},o);case G.Toggle:return e(q,{name:o,size:C,labelAlign:K.Right,label:r,tooltip:s,badge:l,value:!0===p||"true"===p,onChange:e=>d(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},o);default:return null}},So=o.div`
179
+ display: flex;
180
+ flex-wrap: wrap;
181
+ gap: 8px;
182
+ `,ko=o.div`
183
+ display: flex;
184
+ align-items: center;
185
+ gap: 8px;
186
+ padding: 8px 12px;
187
+ border-radius: 8px;
188
+ cursor: pointer;
189
+ background: ${({theme:e,$selected:t})=>t?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
190
+ border: 1px solid ${({theme:e,$selected:t})=>t?e.v2.colors.silver[500]:e.v2.colors.silver[750]};
191
+
192
+ &:hover {
193
+ background: ${({theme:e})=>e.v2.colors.silver[700]};
194
+ }
195
+ `,Fo=o.div`
196
+ display: flex;
197
+ width: 32px;
198
+ height: 32px;
199
+ justify-content: center;
200
+ align-items: center;
201
+ flex-shrink: 0;
202
+ `,To=o.div`
203
+ display: flex;
204
+ flex-direction: column;
205
+ gap: 12px;
206
+ `,Oo=o.div`
207
+ display: flex;
208
+ flex-wrap: wrap;
209
+ gap: 6px;
210
+ `,Mo=o.div`
211
+ display: flex;
212
+ align-items: center;
213
+ gap: 8px;
214
+ &::before,
215
+ &::after {
216
+ content: '';
217
+ flex: 1;
218
+ height: 1px;
219
+ background-color: ${({theme:e})=>e.v2.colors.silver[700]};
220
+ }
221
+ `,Bo=o.div`
222
+ padding: 2px 10px;
223
+ border-radius: 999px;
224
+ background-color: ${({theme:e})=>e.v2.colors.silver[700]};
225
+ border: 1px solid ${({theme:e})=>e.v2.colors.silver[600]};
226
+ `,Po={[me.JavaScript]:"Node.js",[me.DotNet]:".NET",[me.Php]:"PHP",[me.Java]:"Java",[me.Go]:"Go",[me.Python]:"Python",[me.Ruby]:"Ruby",[me.Rust]:"Rust"},Lo=[me.Python,me.Java,me.JavaScript,me.DotNet,me.Php,me.Ruby,me.Go],Ao=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function _o(e){return Po[e]||e.charAt(0).toUpperCase()+e.slice(1)}function Eo(e){return null!=e?`${e}. ${ke}`:ke}const Io=({readOnly:t,...a})=>e(t?Vo:Xo,{...a}),No=({title:a,count:o,children:r})=>t(M,{$gap:6,children:[t(_,{$gap:8,$alignItems:"center",children:[e(P,{size:A.XS,color:L.Primary,nowrap:!0,children:a}),o>1&&e(P,{size:A.XXS,color:L.Secondary,nowrap:!0,children:`(${we})`})]}),e(Oo,{children:r})]}),Ro=()=>{const t=s();return e(Mo,{children:e(Bo,{children:e(P,{size:A.XXS,color:t.v2.colors.white[500],nowrap:!0,children:Se})})})},Vo=({scopes:a,titleNumber:o,title:r,subTitle:s,icon:l,bgTint:n="900",entireClusterWarningMessage:c})=>{const p=r??Eo(o),d={icon:l,title:p,subTitle:s,alignItems:s||l?"flex-start":void 0};if(pa(a))return e(se,{bgTint:n,richTitle:d,withCollapse:!0,collapseIsDefaultOpen:!0,children:t(M,{$gap:8,children:[e(le,{status:ne.Default,message:ie,fullWidth:!0}),c&&e(le,{status:ne.Warning,message:c,fullWidth:!0,smallIcon:!0})]})});const u=a.sources??[],h=a.namespaces??[],g=a.languages??[],m=[];u.length&&m.push({kind:"sources",node:e(No,{title:ce,count:u.length,children:u.map((t,a)=>{const o=[t.namespace,t.kind,t.name].filter(Boolean),r=o.length?o.join(" / "):de;return e(pe,{label:r},`src-${a}-${r}`)})})}),h.length&&m.push({kind:"namespaces",node:e(No,{title:ue,count:h.length,children:h.map((t,a)=>e(pe,{label:t},`ns-${a}-${t}`))})}),g.length&&m.push({kind:"languages",node:e(No,{title:he,count:g.length,children:g.map((t,a)=>{const o=fe(t);return e(pe,{label:_o(t),leftIcon:o},`lang-${a}-${t}`)})})});const f=s??(m.length>1?ge:void 0);return e(se,{bgTint:n,richTitle:{icon:l,title:p,subTitle:f,alignItems:f||l?"flex-start":void 0},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(se,{bgTint:"800",children:e(To,{children:m.map((a,o)=>t(i.Fragment,{children:[o>0&&e(Ro,{}),a.node]},a.kind))})})})},zo=(e,t="all")=>e.sources.length>0?"source":e.namespaces.length>0?"namespace":e.languages.length>0?"language":t,Xo=({scopes:o,onChange:r,sourceOptions:s=[],namespaceOptions:l=[],supportedLanguages:i,titleNumber:c,title:u,subTitle:g,icon:m,dataIdPrefix:f="source-scope",slim:v,disabled:y,hideLogicNote:b,hideEntireClusterNote:C,hideEntireClusterOption:x,entireClusterWarningMessage:$,defaultScopeTab:w="all"})=>{const S=o??da(),k=x&&"all"===w?"source":w,[F,T]=d(()=>zo(S,k)),{sources:O,namespaces:B,languages:_}=S,E=O.length>0||B.length>0||_.length>0;h(()=>{(E||x)&&"all"===F&&T(zo(S,k))},[k,E,x,F,S]);const I=n(()=>Ao.map(e=>"all"===e.value&&x||"language"===e.value&&0===i?.length?null:{...e,disabled:"all"===e.value&&E}).filter(Boolean),[E,x,i]),N=n(()=>O.map(e=>`${e.namespace}/${e.kind}/${e.name}`),[O]),R=n(()=>[...B],[B]),V=n(()=>new Set(_),[_]),z=p(e=>{T(e)},[]),X=p(e=>{const t=e.map(e=>(e=>{const t=e.split("/");return 3!==t.length?null:{namespace:t[0],kind:t[1],name:t[2]}})(e)).filter(e=>null!=e).map(e=>({namespace:e.namespace,kind:e.kind,name:e.name}));r({...S,sources:t})},[S,r]),D=p(e=>{r({...S,namespaces:e})},[S,r]),H=p(e=>{const t=S.languages,a=t.includes(e)?t.filter(t=>t!==e):[...t,e];r({...S,languages:a})},[S,r]),U=!E&&"all"===F,j=(i||Lo).map(e=>({id:e,label:Po[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:fe(e)})),G=u??Eo(c),q=g??ye;return e(ve,{richTitle:v?{icon:m,title:G,titleSize:A.XS,titleColor:L.Secondary,tooltip:q,alignItems:m?"flex-start":void 0}:{icon:m,title:G,subTitle:q,subTitleWrap:!0,alignItems:m||q?"flex-start":void 0},backgroundColor:v?"transparent":void 0,padding:v?0:void 0,children:t(M,{$gap:16,children:[U?t(a,{children:[!C&&e(le,{status:ne.Default,message:ie,fullWidth:!0,smallIcon:!0}),$&&e(le,{status:ne.Warning,message:$,fullWidth:!0,smallIcon:!0})]}):!b&&e(le,{status:ne.Info,message:ge,fullWidth:!0,smallIcon:!0}),e(M,{$alignItems:"flex-start",children:e(be,{options:I,selected:F,setSelected:z,disabled:y})}),"source"===F&&e(Ce,{multiple:!0,"data-id":`${f}-autocomplete-source`,options:s,value:N,onSelect:X,placeholder:xe,disabled:y}),"namespace"===F&&e(Ce,{multiple:!0,"data-id":`${f}-autocomplete-namespace`,options:l,value:R,onSelect:D,placeholder:"Search namespace",disabled:y}),"language"===F&&j.length>0&&e(So,{children:j.map(({id:a,label:o,Icon:r})=>{const s=V.has(a);return t(ko,{$selected:s,onClick:()=>H(a),children:[e(Z,{name:`${f}-lang-${a}`,size:$e.S,value:s,onChange:()=>H(a),disabled:y}),e(Fo,{children:e(r,{size:20})}),e(P,{size:A.XS,nowrap:!0,children:o})]},a)})})]})})},Do=e=>{if(null!=e){if(!Array.isArray(e)&&"object"==typeof e)return Object.entries(e).map(([e,t])=>({id:e,label:null==t?e:String(t)}));if(Array.isArray(e))return e.map(e=>"string"==typeof e?{id:e,label:e}:e)}},Ho=e=>{if(!Array.isArray(e)||e.length<3)return;const[t,a,o]=e;return e=>{const r=null==e?.[t]?"":String(e[t]);switch(a){case"=":case"==":case"===":return r===o;case"!=":case"!==":return r!==o;default:return!0}}},Uo=e=>{if(Array.isArray(e))return e.map(e=>{const t=e;return{keyName:String(t.keyName??t.name??""),label:t.label??t.displayName,tooltip:t.tooltip,placeholder:t.placeholder,helpMessage:t.helpMessage,componentType:t.componentType,options:Do(t.options??t.values),fullRow:t.fullRow,defaultValue:t.defaultValue,withRegexTester:t.withRegexTester,separator:t.separator,copyByColumn:t.copyByColumn,renderCondition:Ho(t.renderCondition)}})},jo=e=>{if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return{id:e,label:e};const t=e;return{id:String(t.id??t.keyName??t.name??""),label:t.label??t.displayName??String(t.id??""),tooltip:t.tooltip,fields:Array.isArray(t.fields)?t.fields.map(Go):void 0}})},Go=e=>{const t="string"==typeof e.componentProperties?te(e.componentProperties,{}):e.componentProps||{};return{name:e.name,componentType:e.componentType,inputType:e.inputType??t.inputType??t.type,title:e.displayName,tooltip:t.tooltip,placeholder:t.placeholder,helpMessage:t.helpMessage,required:t.required,initialValue:e.initialValue,renderCondition:e.renderCondition,options:Do(t.options??t.values),itemWrapperKey:t.itemWrapperKey,columns:Uo(t.columns),limitFieldsPerRow:t.limitFieldsPerRow,variant:t.variant,wrapKey:t.wrapKey,checkboxOptions:jo(t.options??t.values),checkedValue:t.checkedValue??"true",valueMode:t.valueMode??"object",fields:Array.isArray(t.fields)?t.fields.map(Go):void 0,addLabel:t.addLabel,itemLabel:t.itemLabel,keyLabel:t.titleKey??t.keyLabel,valueLabel:t.titleValue??t.valueLabel,persistAs:t.persistAs}},qo=e=>{const t=e.initialValue;if(void 0!==t&&""!==t)return e.componentType===G.CheckboxList?"array"===e.valueMode?te(t,[]):te(t,{}):e.componentType!==G.MultiInput&&e.componentType!==G.MultiTabledInput||!e.wrapKey?e.componentType===G.MultiInput||e.componentType===G.MultiTabledInput?te(t,[]):e.componentType===G.SourceScopes?"null"===t||"{}"===t?da():ha(te(t,null)):e.componentType===G.Toggle||e.componentType===G.Checkbox?"true"===t:t:{[e.wrapKey]:te(t,[])}},Ko=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),Wo=e=>Array.isArray(e)?e:[],Yo=e=>{const t={};return e.forEach(e=>{t[String(e.key??"")]=String(e.value??"")}),t},Zo=e=>Ko(e)?Object.entries(e).map(([e,t])=>({key:e,value:String(t??"")})):[],Jo=({field:t,value:a,setValue:o,errorMessage:r,disabled:s})=>{const[l,i]=d(()=>Zo(a));return h(()=>{const e=Ko(a)?a:{};((e,t)=>{const a=Object.keys(e),o=Object.keys(t);return a.length===o.length&&a.every(a=>Object.prototype.hasOwnProperty.call(t,a)&&t[a]===e[a])})(Yo(l),e)||i(Zo(a))},[a]),e(ee,{name:t.name,label:t.title,tooltip:t.tooltip,helpMessage:t.helpMessage,required:t.required,disabled:s,limitFieldsPerRow:2,columns:[{keyName:"key",label:t.keyLabel||"Key",placeholder:t.keyLabel||"Key"},{keyName:"value",label:t.valueLabel||"Value",placeholder:t.valueLabel||"Value"}],values:l,setValues:e=>{i(e),o(Yo(e))},errorMessage:r})},Qo=({field:o,value:r,setValue:s,errorMessage:l,disabled:i,keyValuePersistAs:n,sourceOptions:c,namespaceOptions:p})=>{const{name:u,componentType:h,inputType:g,title:m,tooltip:f,placeholder:v,helpMessage:y,required:b,initialValue:C,options:x,itemWrapperKey:$,columns:w,limitFieldsPerRow:S,variant:k,wrapKey:F,checkboxOptions:T}=o,[O,_]=d({open:!1,value:""});if(h===G.SourceScopes)return e(Io,{scopes:ha(r),onChange:e=>s(e),sourceOptions:c,namespaceOptions:p,dataIdPrefix:`dynamic-field-${u}`,slim:!0});if(h===G.CheckboxList&&"array"===o.valueMode){const a=Wo(r),o=(e,t)=>s(t?[...a.filter(t=>t!==e),e]:a.filter(t=>t!==e));return t(M,{$gap:12,children:[m&&e(B,{label:m,tooltip:f,required:b}),e(M,{$gap:8,children:(T||[]).map(t=>{const r=e(Z,{name:t.id,label:t.label,value:a.includes(t.id),disabled:i,onChange:e=>o(t.id,e)},t.id);return t.tooltip?e(Oe,{text:t.tooltip,withIcon:!0,children:r},t.id):r})}),e(R,{errorMessage:l,helpMessage:y})]})}if(h===G.CheckboxList){const a=Ko(r)?r:{},c=(e=>"emptyObject"!==e.checkedValue||{})(o),p=e=>"emptyObject"===o.checkedValue?Ko(e):!!e;return t(M,{$gap:12,children:[m&&e(P,{size:A.XS,color:L.Secondary,nowrap:!0,children:m}),e(M,{$gap:12,children:(T||[]).map(o=>{const r=a[o.id],l=p(r),d=Ko(r)?r:{},h=e(Z,{label:o.label,value:l,disabled:i,onChange:e=>s({...a,[o.id]:e?Ko(r)?r:c:null})}),g=o.tooltip?e(Oe,{text:o.tooltip,withIcon:!0,children:h}):h,m=l&&o.fields?.length?e(M,{$gap:12,$padding:"0 0 0 24px",children:o.fields.map(t=>e(Qo,{field:t,value:d[t.name],setValue:e=>s({...a,[o.id]:{...d,[t.name]:e}}),disabled:i,keyValuePersistAs:n},`${u}-${o.id}-${t.name}`))}):null;return t(M,{$gap:12,children:[g,m]},o.id)})}),e(R,{errorMessage:l,helpMessage:y})]})}if(h===G.MultiTabledInput){const o=Wo(F?r?.[F]:r),n=e=>s(F?{...Ko(r)?r:{},[F]:e}:e),c=(w||[]).some(e=>e.withRegexTester);return t(a,{children:[e("cards"===k?Me:ee,{name:u,label:m,tooltip:f,helpMessage:y,required:b,disabled:i,columns:w||[],limitFieldsPerRow:S,values:o,setValues:n,errorMessage:l,onTestRegex:c?e=>_({open:!0,value:e}):void 0}),c&&e(Xa,{isOpen:O.open,regex:O.value,onClose:()=>_({open:!1,value:""})})]})}if(h===G.MultiInput&&F){const t=Wo(r?.[F]);return e(ae,{name:u,label:m,tooltip:f,helpMessage:y,required:b,disabled:i,placeholder:v,values:t,setValues:e=>s({...Ko(r)?r:{},[F]:e}),errorMessage:l})}if(h===G.MultiInput&&$){const t=Wo(r).map(e=>String(e?.[$]??""));return e(ae,{name:u,label:m,tooltip:f,helpMessage:y,required:b,disabled:i,placeholder:v,values:t,setValues:e=>s(e.map(e=>({[$]:e}))),errorMessage:l})}return h===G.KeyValuePair?"map"===(o.persistAs??n)?e(Jo,{field:o,value:r,setValue:s,errorMessage:l,disabled:i}):e(wo,{componentType:h,name:u,label:m,tooltip:f,helpMessage:y,disabled:i,required:b,errorMessage:l,keyLabel:o.keyLabel,valueLabel:o.valueLabel,value:r??[],setValue:s}):e(wo,{componentType:h,inputType:g,name:u,label:m,tooltip:f,helpMessage:y,disabled:i,required:b,placeholder:v,errorMessage:l,dropdownOptions:x,value:(null==r?C:r)??"",setValue:s})},er=({field:o,value:r,setValue:l,disabled:i,keyValuePersistAs:n,sourceOptions:c,namespaceOptions:p})=>{const d=s(),u=Wo(r),h=u.length?u:[{}],m=o.fields||[],f=e=>l(e);return t(a,{children:[h.map((a,r)=>t(g,{children:[e(Te,{}),t(M,{$gap:12,children:[t(_,{$justifyContent:"space-between",$alignItems:"center",children:[e(B,{label:`${o.itemLabel||o.title||"Item"} ${r+1}`}),e(E,{leftIcon:()=>e(Yt,{fill:d.v2.colors.red[500]}),variant:N.Secondary,size:I.S,onClick:()=>(e=>{const t=h.filter((t,a)=>a!==e);f(t)})(r),disabled:i||1===h.length})]}),m.map(t=>e(Qo,{field:t,value:a[t.name],setValue:e=>((e,t,a)=>f(h.map((o,r)=>r===e?{...o,[t]:a}:o)))(r,t.name,e),disabled:i,keyValuePersistAs:n,sourceOptions:c,namespaceOptions:p},`${o.name}-group-${r}-${t.name}`))]})]},`${o.name}-group-${r}`)),e(E,{variant:N.Secondary,label:o.addLabel||"Add",leftIcon:Zt,onClick:()=>f([...h,{}]),disabled:i}),e(Te,{})]})},tr=({field:a,value:o,setValue:r,errorMessage:s,disabled:l})=>t(M,{$gap:12,children:[a.title&&e(B,{label:a.title,tooltip:a.tooltip,required:a.required}),e(M,{$gap:8,children:(a.checkboxOptions||[]).map(t=>{const a=e(Z,{name:t.id,label:t.label,value:!0===o?.[t.id],disabled:l,onChange:e=>r(t.id,e)},t.id);return t.tooltip?e(Oe,{text:t.tooltip,withIcon:!0,children:a},t.id):a})}),e(R,{errorMessage:s,helpMessage:a.helpMessage})]}),ar=({signals:t,fields:o,value:r,setValue:s,formErrors:l,disabled:i,seedInitialValues:n,keyValuePersistAs:c="map",sourceOptions:p,namespaceOptions:d})=>{const{isK8s:u}=ua(),g=(o||[]).filter(e=>!!e).map(e=>Go(e));return h(()=>{if(!n)return;const e=r||{},t={};g.forEach(a=>{if(a.componentType===G.SourceScopes&&!u)return;const o=a.componentType===G.SourceScopes?qo(a)??da():qo(a);if(void 0===o)return;if(a.componentType===G.CheckboxList&&"flatFields"===a.valueMode&&Ko(o))return void Object.entries(o).forEach(([a,o])=>{void 0!==e[a]&&null!==e[a]||(t[a]=o)});const r=e[a.name];if(a.componentType===G.SourceScopes){if(void 0!==r)return}else if(null!=r)return;t[a.name]=Ko(o)&&Ko(t[a.name])?{...t[a.name],...o}:o}),Object.entries(t).forEach(([e,t])=>s(e,t))},[]),e(a,{children:g.map((a,o)=>{const n=Object.entries(r||{}).map(([e,t])=>({name:e,key:e,value:t}));if(a.renderCondition&&!Fe(a.renderCondition,t,n))return null;if(a.componentType===G.SourceScopes&&!u)return null;const h=r?.[a.name],g=`${a.name}-${o}`;if(a.componentType===G.FieldGroup)return e(er,{field:a,value:h,setValue:e=>s(a.name,e),disabled:i,keyValuePersistAs:c,sourceOptions:p,namespaceOptions:d},g);if(a.componentType===G.CheckboxList&&"flatFields"===a.valueMode){const t=a.checkboxOptions?.map(e=>l[e.id]).find(Boolean);return e(tr,{field:a,value:r||{},setValue:s,errorMessage:t,disabled:i},g)}return e(Qo,{field:a,value:h,setValue:e=>s(a.name,e),errorMessage:l[a.name],disabled:i,keyValuePersistAs:c,sourceOptions:p,namespaceOptions:d},g)})})},or=ar,rr=({isEnabled:t,setIsEnabled:a,fieldDisabled:o})=>{const r=s();return e(be,{options:[{icon:Jt,label:"Enable",value:!0,selectedBgColor:r.v2.colors.green[1e3],selectedBorderColor:r.v2.colors.green[400],selectedTextColor:r.v2.colors.green[400]},{icon:Qt,label:"Disable",value:!1,selectedBgColor:r.v2.colors.red[1e3],selectedBorderColor:r.v2.colors.red[500],selectedTextColor:r.v2.colors.red[400]}],size:Be.S,selected:t,setSelected:a,disabled:o})},sr=o.div`
227
+ display: flex;
228
+ align-items: center;
229
+ gap: 24px;
230
+ padding: 8px 16px;
231
+ border-radius: 12px;
232
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
233
+ `,lr=o.div`
234
+ flex: 1;
235
+ min-width: 0;
236
+ white-space: pre;
237
+ overflow-x: auto;
238
+ `,ir=({title:a,summary:o,onEdit:r,renderAction:s})=>{const l=n(()=>{const e=[];return a&&(e.push({text:a,variant:ga.Default}),e.push({text:" - ",variant:ga.Default})),e.push(...o),e},[a,o]);return t(sr,{children:[e(lr,{children:e(ma,{parts:l})}),s&&s(),r&&e(E,{"data-id":"sampling-btn-edit-auto-rule",label:Pe,rightIcon:ea,variant:N.Text,size:I.S,onClick:r})]})},nr={[Ve.HttpRequest]:"HTTP request",[Ve.HttpResponse]:"HTTP response",[Ve.DbQuery]:"DB query",[Ve.Messaging]:"messaging"};function cr(e,t,a){return 1===e?t:a??`${t}s`}function pr(e,t){const a=[],o=e.slice(0,3),r=e.slice(3);return o.forEach((e,o)=>{o>0&&a.push({text:", ",variant:ga.Default}),a.push({text:e,variant:t})}),r.length>0&&a.push({text:` + ${r.length} more`,variant:ga.Default,tooltipItems:r}),a}const dr=({option:t,formState:a,renderAction:o})=>{const r=n(()=>{const e=function(e,t){switch(e){case Ae.CodeAttributes:return(e=>{const t=Object.values(ze).filter(t=>!!e.codeAttributes?.[t]).map(e=>Xe(e).toLowerCase());return t.length?[{text:"Collect",variant:ga.Action},{text:" ",variant:ga.Default},...pr(t,ga.Endpoint)]:null})(t);case Ae.PayloadCollection:return(e=>{const t=Object.values(Ve).filter(t=>null!=e.payloadCollection?.[t]).map(e=>nr[e]);return t.length?[{text:"Collect",variant:ga.Action},{text:" ",variant:ga.Default},...pr(t,ga.Endpoint)]:null})(t);case Ae.HeadersCollection:return(e=>{const t=(e.headersCollection?.[Re.HeaderKeys]??[]).map(e=>e.trim()).filter(e=>e.length>0);if(!t.length)return null;const a=cr(t.length,"HTTP header");return[{text:`Collect ${t.length} ${a}`,variant:ga.Action},{text:"",variant:ga.Default,tooltipItems:t}]})(t);case Ae.CustomInstrumentation:return(e=>{const t=(e.customInstrumentations?.[_e.Java]??[]).map(e=>new Ee(e.className,e.methodName)).filter(e=>e.Verify()),a=(e.customInstrumentations?.[_e.Golang]??[]).map(e=>new Ie(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>e.Verify()),o=(e.customInstrumentations?.[_e.Php]??[]).map(e=>new Ne(e.className,e.functionName)).filter(e=>e.Verify());if(!(t.length+a.length+o.length))return null;const r=[];t.length&&r.push(`${t.length} Java ${cr(t.length,"probe")}`),a.length&&r.push(`${a.length} Go ${cr(a.length,"probe")}`),o.length&&r.push(`${o.length} PHP ${cr(o.length,"probe")}`);const s=[...t.map(e=>`Java: ${e.toString()}`),...a.map(e=>`Go: ${e.toString()}`),...o.map(e=>`PHP: ${e.toString()}`)];return[{text:`Apply ${r.join(" + ")}`,variant:ga.Action},{text:"",variant:ga.Default,tooltipItems:s}]})(t);case Ae.NetworkMetrics:return[{text:"Collect",variant:ga.Action},{text:" ",variant:ga.Default},{text:"network flow and TCP stats metrics",variant:ga.Endpoint}];default:return null}}(t?.type,a);return e?[...e,...fa(a.sourceScopes)]:[]},[t?.type,a]),s=0===r.length;return e(ir,{title:s?Le:"Instrumentation Rule Preview",summary:r,renderAction:o})},ur=({scale:a=1})=>t("svg",{width:742*a,height:533*a,viewBox:"0 0 742 533",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M0 0H722C733.046 0 742 8.95431 742 20V513C742 524.046 733.046 533 722 533H0V0Z",fill:"url(#paint0_linear_1585_55266)"}),t("g",{clipPath:"url(#clip0_1585_55266)",children:[e("path",{opacity:"0.1",d:"M817.963 1364.02C1052.53 1129.46 1052.53 749.151 817.96 514.585C583.394 280.019 203.089 280.018 -31.4751 514.583C-266.039 749.147 -266.038 1129.45 -31.4725 1364.02C203.093 1598.58 583.398 1598.58 817.963 1364.02Z",fill:"url(#paint1_radial_1585_55266)"}),e("path",{opacity:"0.3",d:"M789.266 1335.32C1007.98 1116.61 1007.98 761.998 789.264 543.281C570.547 324.565 215.938 324.563 -2.7781 543.279C-221.494 761.995 -221.493 1116.6 -2.77577 1335.32C215.941 1554.04 570.55 1554.04 789.266 1335.32Z",fill:"url(#paint2_radial_1585_55266)"}),e("path",{opacity:"0.5",d:"M736.156 1282.21C925.539 1092.83 925.538 785.776 736.153 596.392C546.769 407.007 239.717 407.006 50.333 596.39C-139.05 785.773 -139.05 1092.83 50.3351 1282.21C239.72 1471.59 546.772 1471.6 736.156 1282.21Z",fill:"url(#paint3_radial_1585_55266)"}),e("path",{opacity:"0.7",d:"M628.365 1174.42C758.218 1044.57 758.217 834.036 628.364 704.182C498.51 574.329 287.977 574.328 158.124 704.181C28.2713 834.033 28.272 1044.57 158.125 1174.42C287.979 1304.27 498.512 1304.27 628.365 1174.42Z",fill:"url(#paint4_radial_1585_55266)"}),e("path",{opacity:"0.1",d:"M795.717 29.8993C1030.28 -204.665 1030.28 -584.97 795.714 -819.536C561.148 -1054.1 180.843 -1054.1 -53.7211 -819.539C-288.285 -584.974 -288.284 -204.669 -53.7185 29.8967C180.847 264.462 561.152 264.464 795.717 29.8993Z",fill:"url(#paint5_radial_1585_55266)"}),e("path",{opacity:"0.3",d:"M767.02 1.20219C985.736 -217.513 985.734 -572.123 767.017 -790.84C548.301 -1009.56 193.691 -1009.56 -25.0242 -790.842C-243.74 -572.126 -243.739 -217.517 -25.0219 1.19982C193.695 219.917 548.304 219.918 767.02 1.20219Z",fill:"url(#paint6_radial_1585_55266)"}),e("path",{opacity:"0.5",d:"M713.909 -51.908C903.293 -241.292 903.292 -548.344 713.907 -737.728C524.523 -927.113 217.47 -927.114 28.0869 -737.731C-161.297 -548.347 -161.296 -241.295 28.089 -51.91C217.474 137.475 524.526 137.476 713.909 -51.908Z",fill:"url(#paint7_radial_1585_55266)"}),e("path",{opacity:"0.7",d:"M606.119 -159.699C735.972 -289.552 735.971 -500.085 606.118 -629.939C476.264 -759.792 265.731 -759.793 135.878 -629.94C6.0252 -500.088 6.02586 -289.554 135.879 -159.701C265.733 -29.8472 476.266 -29.8465 606.119 -159.699Z",fill:"url(#paint8_radial_1585_55266)"})]}),t("defs",{children:[t("linearGradient",{id:"paint0_linear_1585_55266",x1:"371",y1:"0",x2:"371",y2:"533",gradientUnits:"userSpaceOnUse",children:[e("stop",{offset:"0.028197",stopColor:"#0B0517"}),e("stop",{offset:"1",stopColor:"#190D31"})]}),t("radialGradient",{id:"paint1_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(334.074 991.405) rotate(-45) scale(599.732 599.736)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),e("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]}),t("radialGradient",{id:"paint2_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(368.968 957.913) rotate(-45) scale(560.978 560.981)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),e("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),e("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]}),t("radialGradient",{id:"paint3_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(351.265 971.313) rotate(-45) scale(484.947 484.95)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]}),t("radialGradient",{id:"paint4_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(362.239 963.064) rotate(-45) scale(332.216 332.218)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]}),t("radialGradient",{id:"paint5_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(311.828 -342.716) rotate(-45) scale(599.733 599.736)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),e("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]}),t("radialGradient",{id:"paint6_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(346.722 -376.208) rotate(-45) scale(560.977 560.981)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),e("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),e("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]}),t("radialGradient",{id:"paint7_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(329.019 -362.807) rotate(-45) scale(484.947 484.95)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]}),t("radialGradient",{id:"paint8_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(339.993 -371.057) rotate(-45) scale(332.216 332.218)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("clipPath",{id:"clip0_1585_55266",children:e("rect",{width:"929.477",height:"667",fill:"white",transform:"translate(-93.7383 -134)"})})]})]}),hr=({size:t=200,central:a=!1,useInline:o=!1})=>{const{tier:r}=ua();if(o){if(a)return e(ta,{size:t});switch(r){case De.Community:return e(oa,{size:t});case De.Onprem:return e(aa,{size:t});default:return null}}if(a)return e(ra,{size:t});switch(r){case De.Community:return e(la,{size:t});case De.Onprem:return e(sa,{size:t});default:return null}},gr=o.div`
239
+ position: absolute;
240
+ top: 50%;
241
+ left: 50%;
242
+ transform: translate(-50%, -50%);
243
+ z-index: ${({theme:e})=>e.v2.zIndex.modal};
244
+ `,mr=({isOpen:a,onClose:o,title:r,description:s,button:l})=>{const{onClick:i,...n}=l;return t(He,{isOpen:a,onClose:o,children:[e(ur,{}),e(gr,{children:t(M,{$gap:32,$alignItems:"center",children:[t(M,{$gap:24,$alignItems:"center",children:[r&&e(P,{size:A.L,weight:500,children:r}),e(hr,{size:260}),e(P,{size:A.S,children:s})]}),e(E,{onClick:i||o,...n})]})})]})},fr=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"custom",label:"Custom"}],vr=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"custom",label:"Custom"}],yr=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],br=({description:a,options:o,selected:r,onSelect:s,customName:l,customLabel:i,customPlaceholder:n,customValue:c,onCustomChange:p,customInputType:d=re.Number,customMin:u,customMax:h})=>t(M,{$gap:6,children:[e(B,{label:a}),t(_,{$gap:8,$alignItems:"flex-end",children:[e(be,{options:o,selected:r,setSelected:s}),"custom"===r&&e(oe,{name:l,label:i,placeholder:n,type:d,value:c,onChange:p,width:160,min:u,max:h})]})]}),Cr=()=>{},xr=t=>t.readOnly?e($r,{rule:t.rule}):e(wr,{ruleType:t.ruleType,formState:t.formState,onChange:t.onChange}),$r=({rule:a})=>{const o=null!=a.durationAtLeastMs;return a.error?e(ve,{richTitle:{title:Ue},children:e(q,{name:"sampling-view-toggle-keep-errors",onChange:Cr,value:!0,size:W.S,label:je,labelAlign:K.Right})}):o?e(ve,{richTitle:{title:Ge},children:t("div",{children:[e(P,{size:A.XXXS,color:L.Secondary,children:qe}),e(P,{size:A.XS,children:`${a.durationAtLeastMs}ms`})]})}):null},wr=({ruleType:t,formState:a,onChange:o})=>{const r=p(e=>o({durationPreset:e}),[o]),s=p(e=>o({customDurationMs:e.target.value}),[o]);return"Duration"===t?e(ve,{richTitle:{title:Ge,subTitle:Ke},children:e(br,{description:qe,options:yr,selected:a.durationPreset,onSelect:r,customName:"sampling-input-custom-duration",customLabel:We,customPlaceholder:"200ms",customValue:a.customDurationMs,onCustomChange:s})}):null},Sr=o.div`
245
+ display: flex;
246
+ gap: 32px;
247
+ `,kr=o.div`
248
+ display: flex;
249
+ flex-direction: column;
250
+ gap: 4px;
251
+ `,Fr=o.div`
252
+ display: flex;
253
+ flex-wrap: wrap;
254
+ align-items: flex-end;
255
+ gap: 16px;
256
+ `,Tr=o.div`
257
+ display: flex;
258
+ align-items: flex-end;
259
+ gap: 16px;
260
+ padding: 12px 16px;
261
+ border-radius: 8px;
262
+ background-color: ${({theme:e})=>e.v2.colors.black[500]};
263
+ `,Or=o.div`
264
+ display: flex;
265
+ align-items: flex-end;
266
+ gap: 10px;
267
+ flex: 1;
268
+ `,Mr=o.div`
269
+ display: flex;
270
+ align-items: center;
271
+ height: 32px;
272
+ `,Br=o.div`
273
+ display: flex;
274
+ align-items: flex-end;
275
+ gap: 16px;
276
+ margin-bottom: 12px;
277
+ `,Pr="Any",Lr="Kafka topic",Ar=()=>e("div",{style:{marginBottom:"8px"},children:e(P,{size:A.XS,weight:500,children:"And"})}),_r=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],Er=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Ir=[{id:"",label:Pr},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}],Nr=t=>t.readOnly?e(Rr,{data:t.data}):e(Vr,{category:t.category,formState:t.formState,onChange:t.onChange}),Rr=({data:a})=>{const o=n(()=>(e=>{if("noisy"===e.category){const t=e.rule.operation;if(t?.httpServer)return[{id:"type",title:pt,value:ct},{id:"route",title:ot,value:t.httpServer.route||t.httpServer.routePrefix||dt},{id:"method",title:it,value:t.httpServer.method||Pr}];if(t?.httpClient){const e=[{id:"type",title:pt,value:ut}];return t.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:t.httpClient.serverAddress}),e.push({id:"route",title:ot,value:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||dt}),e.push({id:"method",title:it,value:t.httpClient.method||Pr}),e}return[{id:"type",title:pt,value:ht}]}const t=e.rule.operation;return t?.httpServer?[{id:"type",title:pt,value:ct},{id:"route",title:ot,value:t.httpServer.route||t.httpServer.routePrefix||dt},{id:"method",title:it,value:t.httpServer.method||Pr}]:t?.kafkaConsumer?[{id:"type",title:pt,value:gt},{id:"topic",title:Lr,value:t.kafkaConsumer.kafkaTopic||dt}]:t?.kafkaProducer?[{id:"type",title:pt,value:mt},{id:"topic",title:Lr,value:t.kafkaProducer.kafkaTopic||dt}]:[{id:"type",title:pt,value:ht}]})(a),[a]);return e(ve,{richTitle:{title:Ye},children:e(Sr,{children:o.map(({id:a,title:o,value:r})=>t(kr,{children:[e(P,{size:A.XXXS,color:L.Secondary,nowrap:!0,children:o}),e(P,{size:A.XS,nowrap:!0,children:r})]},a))})})},Vr=({category:a,formState:o,onChange:r})=>{const s=n(()=>"noisy"===a?_r:Er,[a]),l=p(e=>r({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[r]),i=p(e=>t=>{t&&r({routeType:e,route:""})},[r]),c=p(e=>r({route:e.target.value}),[r]),d=p(e=>r({serverAddress:e.target.value}),[r]),u=p(e=>r({method:e[0]||""}),[r]),h=p(e=>r({kafkaTopic:e.target.value}),[r]),g="httpServer"===o.operationType||"httpClient"===o.operationType,m="kafkaConsumer"===o.operationType||"kafkaProducer"===o.operationType,f="httpClient"===o.operationType?at:ot,v="httpClient"===o.operationType?rt:st;return t(ve,{richTitle:{title:`2. ${Ye}`,subTitle:Ze},children:[e(M,{$alignItems:"flex-start",children:e(be,{options:s,selected:o.operationType,setSelected:l})}),g&&t(Fr,{children:["httpClient"===o.operationType&&t(Br,{children:[e(oe,{name:"sampling-input-server-address",label:Qe,placeholder:Je,value:o.serverAddress,onChange:d}),e(Ar,{})]}),t(Tr,{children:[t(Or,{children:[e(Mr,{children:e(et,{"data-id":"sampling-radio-route",value:"route"===o.routeType,onChange:i("route")})}),e(oe,{name:"sampling-input-route",label:f,placeholder:tt,value:"route"===o.routeType?o.route:"",onChange:c,disabled:"route"!==o.routeType})]}),t(Or,{children:[e(Mr,{children:e(et,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===o.routeType,onChange:i("routePrefix")})}),e(oe,{name:"sampling-input-route-prefix",label:v,placeholder:tt,value:"routePrefix"===o.routeType?o.route:"",onChange:c,disabled:"routePrefix"!==o.routeType})]})]}),t(Br,{children:[e(Ar,{}),e(lt,{label:it,items:Ir,selectedIds:[o.method||""],setSelectedIds:e=>u(e),buttonProps:{"data-id":"sampling-btn-method",label:Ir.find(e=>e.id===o.method)?.label||Pr,size:I.S,variant:N.Secondary}})]})]}),m&&e(oe,{name:"sampling-input-kafka-topic",label:nt,placeholder:"Type kafka topic",value:o.kafkaTopic,onChange:h,width:"320px"})]})},zr=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Xr=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}],Dr=t=>t.readOnly?e(Hr,{data:t.data}):e(Ur,{category:t.category,formState:t.formState,onChange:t.onChange}),Hr=({data:a})=>{const o=n(()=>(e=>{switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:vt,method:Ct,description:yt,value:`${e.rule.percentageAtLeast}%`}:{title:vt,method:$t,description:null,value:null};case"noisy":return va(e.rule.percentageAtMost)?{title:vt,method:xt,description:null,value:null}:{title:vt,method:Ct,description:bt,value:`${e.rule.percentageAtMost}%`};case"costReduction":return{title:vt,method:Ct,description:bt,value:`${e.rule.percentageAtMost}%`}}})(a),[a]),r=[{id:"method",title:it,value:o.method},...null!=o.description?[{id:"value",title:o.description,value:o.value}]:[]];return e(ve,{richTitle:{title:o.title},children:e(Sr,{children:r.map(({id:a,title:o,value:r})=>t(kr,{children:[e(P,{size:A.XXXS,color:L.Secondary,nowrap:!0,children:o}),e(P,{size:A.XS,nowrap:!0,children:r})]},a))})})},Ur=({category:a,formState:o,onChange:r})=>{const s="highlyRelevant"===a,l=s?Xr:zr,i=`${s?4:3}. ${vt}`,n=ft[a],c=s?yt:bt,d="noisy"===a?vr:fr,u=p(e=>r({percentageMode:e}),[r]),h=p(e=>r({percentagePreset:e}),[r]),g=p(e=>r({customPercentage:e.target.value}),[r]);return t(ve,{richTitle:{title:i,subTitle:n},children:["costReduction"!==a&&e(M,{$alignItems:"flex-start",children:e(be,{options:l,selected:o.percentageMode,setSelected:u})}),("costReduction"===a||"sample"===o.percentageMode)&&e(br,{description:c,options:d,selected:o.percentagePreset,onSelect:h,customName:"sampling-input-custom-percentage",customPlaceholder:"5%",customValue:o.customPercentage,onCustomChange:g,customInputType:re.Decimal,customMin:0,customMax:100})]})},jr=o.div`
278
+ display: flex;
279
+ align-items: flex-end;
280
+ gap: 16px;
281
+ `,Gr=o.div`
282
+ width: 280px;
283
+ flex-shrink: 0;
284
+ `,qr=o.div`
285
+ flex: 1;
286
+ min-width: 0;
287
+ `;function Kr(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":Bt[e.category]}const Wr=t=>t.readOnly?e(Yr,{data:t.data}):e(Zr,{formState:t.formState,onChange:t.onChange}),Yr=({data:a})=>{const o=n(()=>[{id:"name",title:St,value:a.rule.name||wt},{id:"type",title:kt,value:Kr(a)}],[a]),r=a.rule.notes||dt;return t(ve,{children:[e(Sr,{children:o.map(({id:a,title:o,value:r})=>t(kr,{children:[e(P,{size:A.XXXS,color:L.Secondary,nowrap:!0,children:o}),e(P,{size:A.XS,nowrap:!0,children:r})]},a))}),t(kr,{children:[e(P,{size:A.XXXS,color:L.Secondary,children:Ft}),e(P,{size:A.XS,children:r})]})]})},Zr=({formState:a,onChange:o})=>{const r=p(e=>o({name:e.target.value}),[o]),s=p(e=>o({notes:e.target.value}),[o]);return e(ve,{children:t(jr,{children:[e(Gr,{children:e(oe,{name:"sampling-input-rule-name",label:St,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:Tt,value:a.name,onChange:r})}),e(qr,{children:e(oe,{name:"sampling-input-note",label:Ft,tooltip:Mt,placeholder:Ot,value:a.notes,onChange:s})})]})})},Jr=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}],Qr=({formState:t,onChange:a})=>{const o=p(e=>a({ruleType:e,keepErrors:"Error"===e}),[a]);return e(ve,{richTitle:{title:`3. ${kt}`,subTitle:Pt},children:e(M,{$alignItems:"flex-start",children:e(be,{options:Jr,selected:t.ruleType,setSelected:o})})})},es=t=>{const a=n(()=>{if(t.readOnly)return t.summary;switch(t.category){case"noisy":return Ca(wa(t.formState));case"highlyRelevant":return ba($a(t.formState));case"costReduction":return ya(xa(t.formState))}},[t]);if(t.readOnly)return e(ir,{title:Lt,summary:a,renderAction:t.renderAction});const o=1===a.length&&"default"===a[0].variant;return e(ir,{title:o?Le:Lt,summary:o?[]:a,renderAction:t.renderAction})},ts=(e,t)=>!t?.length||!!t?.find(t=>t===e),as=({title:a="Signals",required:o,errorMessage:r,allowedSignals:s,selectedSignals:l,setSelectedSignals:i,disabled:n})=>{const[p,u]=d(1===l.length),g=c(JSON.stringify(l));return h(()=>{let e=At(l).filter(e=>ts(e,s));e.length||(e=_t.filter(({id:e})=>ts(e,s)).map(({id:e})=>e));const t=JSON.stringify(e);g.current!==t&&(g.current=t,i(e),u(1===e.length))},[s,l]),t(M,{$gap:12,children:[e(B,{label:a,required:o}),e(_,{$gap:12,children:_t.map(t=>{const a=ts(t.id,s),o=((e,t)=>!!t?.find(t=>t===e))(t.id,l);return a?e(Z,{label:t.value,disabled:n||!a||p&&o,value:o,onChange:e=>((e,t)=>{const a=e,o=t?[...l,a]:l.filter(e=>e!==a);i(o),u(1===o.length)})(t.id,e)},t.id):null})}),e(R,{errorMessage:r})]})},os=({minSupportedVersion:t,currentVersion:a})=>e(j,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>e(It,{scale:2.4,icon:()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:e("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:Et.UPGRADE_REQUIRED,description:`${Et.UPGRADE_TO_USE_FEATURE(t)}\n${Et.CURRENT_VERSION(a)}`}),rs=o.div`
288
+ display: flex;
289
+ flex-direction: column;
290
+ justify-content: flex-end;
291
+ width: ${({$width:e})=>e};
292
+ gap: ${({$columnHasHeader:e})=>e?"0":"12px"};
293
+ `,ss=o.div`
294
+ display: flex;
295
+ align-items: center;
296
+ min-height: 24px;
297
+ padding: 12px;
298
+ border-radius: 16px 16px 0 0;
299
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
300
+ `,ls=o.div`
301
+ display: flex;
302
+ flex-direction: column;
303
+ gap: ${({$gap:e})=>e}px;
304
+ padding: 12px 12px 0 12px;
305
+ width: 100%;
306
+ height: ${({$heightOffset:e,$columnHasHeader:t})=>`calc(100vh - 180px - ${e}px ${t?"- 48px":""})`};
307
+ border-radius: ${({$columnHasHeader:e,$isLeft:t,$isRight:a})=>e?t?"0 0 0 16px":a?"0 16px 0 0":"0":t?"16px 0 0 16px":a?"0 16px 16px 0":"16px"};
308
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
309
+ overflow-y: auto;
310
+ overflow-x: hidden;
311
+ `,is=({isLeft:o,isRight:r,heightOffset:s=0,width:l,header:i,list:n})=>t(rs,{$width:l,$columnHasHeader:!!i,children:[i&&e(ss,{children:i}),e(ls,{$gap:8,$isLeft:o,$isRight:r,$heightOffset:s,$columnHasHeader:!!i,children:n.length?n.length>1?e(Nt,{gap:8,elements:n}):e(a,{children:n[0]}):e(D,{$height:"100%",children:e(H,{})})})]}),ns="75vw",cs=o.div`
312
+ display: flex;
313
+ flex-direction: column;
314
+ border-radius: 16px;
315
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
316
+ overflow: hidden;
317
+ `,ps=o.div`
318
+ display: flex;
319
+ gap: 12px;
320
+ padding: 16px 16px 0 16px;
321
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
322
+ position: sticky;
323
+ top: 0;
324
+ `,ds=o.div`
325
+ padding: 12px 12px 0 12px;
326
+ `,us=o.div`
327
+ display: flex;
328
+ gap: 12px;
329
+ padding: 16px;
330
+ `,hs=o.div`
331
+ padding: 5vh 10vw;
332
+ border-radius: 12px;
333
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
334
+ `,gs=m(({isOpen:a,withOverlay:o,disableAnimation:r,onClose:s,onBack:l,onNext:i,nextIsSkip:c,onSave:u,disableSave:h,connectionIds:g,header:m,subHeader:v,leftColumn:y,rightColumn:b,search:C,filters:x,errorMessage:$,isFormDirty:w,allowSaveWhenPristine:S,hideDirtyNote:k,forcedNote:F,isFetching:O,progress:M},B)=>{const[P,L]=d(!1),[_,E]=d(!1),[I,R]=d(void 0);f(B,()=>({clearErrors:()=>R(void 0)}));const V=_,z=p(()=>{w&&!P?L(!0):(L(!1),s?.())},[w,P,s]),X=h||_||!S&&"boolean"==typeof w&&!w,H=p(async()=>{E(!0);const e=await u();E(!1),!1!==e&&(e?.error?R(e.error):(g?.setValue([]),s?.()))},[u,g,s]),U=!!C||!!g||!!x,G=!!v,q=(U?48:0)+(G?50:0),K=n(()=>F||(O?{status:ne.Info,message:"Fetching Data..."}:_&&!M?{status:ne.Info,message:"Saving Changes..."}:I||$?{status:ne.Error,message:I||$}:"boolean"!=typeof w||k?void 0:w?{status:ne.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:{status:ne.Success,message:"The values reflect the current configuration of the selected cluster."}),[O,_,M,I,$,w,k,F]),W=n(()=>l?{label:"Back",leftIcon:ia,variant:N.Secondary,onClick:l}:{label:"Cancel",variant:N.Secondary,onClick:z,disabled:V},[l,z,V]),[Y,Z]=d(!1),J=n(()=>i?c?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:na,variant:N.Secondary,onClick:()=>Z(!0)}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:na,variant:N.Primary,onClick:i}:{"data-id":"wide-drawer-save",label:"Save",variant:N.Primary,onClick:H,disabled:X},[i,c,H,X]);return t(T,{width:ns,isOpen:a,disableAnimation:r,hideOverlay:!_&&!o,header:{...m,onClose:s?z:void 0,onCloseDisabled:V},footer:{note:K,actions:[W,J]},children:[_?e(D,{$height:"calc(100vh - 136px)",children:e(hs,{children:e(Rt,{titleSize:A.S,subTitleSize:A.XXXS,withGradient:!0,withSpinner:!0,...M})})}):t(cs,{children:[U&&t(ps,{children:[g&&e(Vt,{icon:Jt,title:"Selected Clusters",badge:{label:g.value.length}}),C&&e(zt,{...C,width:C.width??"100%"}),x]}),G&&e(ds,{children:e(Vt,{icon:v.icon,title:v.title,subTitle:v.description,badge:v.badge})}),t(us,{children:[e(is,{isLeft:!0,heightOffset:q,...y}),e(is,{isRight:!0,heightOffset:q,...b})]})]}),e(xo,{isOpen:P,onClose:()=>L(!1),onApprove:z}),e(j,{title:"Skip setup?",description:"Without completing setup, Odigos won't be able to collect and send your telemetry data. This may interrupt your data flow and limit the platform's ability to provide value.",isOpen:Y,onClose:()=>Z(!1),denyButton:{label:"Go Back",variant:N.Secondary,onClick:()=>Z(!1)},approveButton:{label:"Skip",variant:N.Primary,onClick:()=>{i?.(),Z(!1)}}})]})});gs.displayName=gs.name;const ms=o.div`
335
+ padding: 0 24px;
336
+ border-radius: 12px;
337
+ background-color: ${({$codeBgColor:e})=>e||"transparent"};
338
+ `,fs=o.div`
339
+ display: flex;
340
+ flex-direction: column;
341
+ gap: 8px;
342
+ width: 100%;
343
+ padding: 8px;
344
+ border: 1px solid ${({theme:e})=>e.v2.colors.silver[700]};
345
+ border-radius: 12px;
346
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
347
+ `,vs=o.div`
348
+ display: flex;
349
+ align-items: center;
350
+ gap: 4px;
351
+ width: 100%;
352
+ `,ys=o.div`
353
+ flex: 1;
354
+ min-width: 0;
355
+ `,bs=o.div`
356
+ width: 100%;
357
+ max-height: 180px;
358
+ overflow: auto;
359
+ padding: 0 12px;
360
+
361
+ pre {
362
+ margin: 0;
363
+ }
364
+ `,Cs=({title:a="YAML",yaml:o,defaultOpen:r,fullHeight:s,bgTint:l="1000",codeBgColor:i,compact:c})=>{const{clickCopy:p,isCopied:d,CopyButton:u}=Xt(),h=n(()=>o?[{id:Ut(),type:Ht.Button,buttonProps:{variant:N.Text,size:I.S,leftIcon:Dt,onClick:()=>p(o||""),disabled:d}}]:[],[o,d,p]);return c?t(fs,{children:[t(vs,{children:[e(ca,{size:16}),e(ys,{children:e(P,{size:A.XXS,color:L.Primary,children:a})}),o&&e(u,{value:o})]}),o?e(bs,{children:e(jt,{code:o,language:"yaml",theme:"duotoneDark"})}):e(H,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})]}):e(Gt,{value:d,children:e(se,{bgTint:l,richTitle:{icon:ca,title:a},actions:h,withCollapse:!0,collapseIsDefaultOpen:r,fullHeight:s,children:e(ms,{$codeBgColor:i,children:o?e(jt,{code:o,language:"yaml",theme:"duotoneDark"}):e(D,{children:e(H,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})})};export{Ha as A,Co as B,xo as C,Wa as D,rr as E,io as G,dr as I,vr as N,hr as O,fr as P,Wr as R,es as S,os as U,ns as W,Cs as Y,lo as a,Ya as b,yr as c,$o as d,xr as e,or as f,wo as g,ar as h,eo as i,to as j,mr as k,Nr as l,Dr as m,br as n,Qr as o,as as p,Io as q,gs as r,ro as s,ao as t,Xa as u,ir as v};