File: //opt/netdata/usr/share/netdata/web/v3/9962.27676c4206073d189eb2.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"d59f3e13055072acb481db3c59603d296982e8b2"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e67045d9-721d-476c-890e-9f36c90ad499",e._sentryDebugIdIdentifier="sentry-dbid-e67045d9-721d-476c-890e-9f36c90ad499")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[9962],{42318(e,t,n){n.d(t,{A:()=>s});var o=n(96540),i=n(61661),a=n(6988),r=n(32465);const s=()=>{const e=(0,i.AR)(),t=(0,r.A)(),[n,s]=(0,i.oE)(),l=(0,i.WB)(),d=(0,o.useMemo)(()=>(0,a.Cj)({searchTerm:n,integrations:e}),[n,e]),c=n?(0,a.M6)(d,t):l;return{integrations:(0,a.Fd)((0,a.xM)(c)),setSearchTerm:s}}},51318(e,t,n){n.d(t,{A:()=>r});var o=n(96540),i=n(61661),a=n(89942);const r=()=>{const e=(0,a.PP)(),[t,n]=(0,i.XL)(),{reset:r}=(0,i.b8)(),s=(0,o.useCallback)(()=>{r(),(0,a.Z8)({...e,integrationsModalOpen:"true"}),n("true")},[r,n,e]);return{isIntegrationsVisible:t,hideIntegrations:(0,o.useCallback)(()=>{(0,a.Z8)({...e,integrationsModalOpen:""}),n("")},[e,n]),onIntegrationsClick:s}}},4703(e,t,n){n.d(t,{A:()=>p});var o=n(882),i=n(38429),a=n(74891),r=n(74848);const s=(0,a.A)(i.IconButton),l=(0,o.default)(s).attrs({icon:"x",neutral:!0,tooltip:"Skip, doesn't apply to me"}).withConfig({displayName:"taskItem__SkipButton",componentId:"sc-1mf27rk-0"})(["opacity:0;transition:opacity 0.2s;"]),d=(0,o.default)(i.Flex).attrs({gap:3,alignItems:"center",padding:[4],border:!0,round:1,cursor:"pointer"}).withConfig({displayName:"taskItem__ChecklistItem",componentId:"sc-1mf27rk-1"})(["background:",";transition:border-color 0.2s,background 0.2s;&:hover{border-color:",";background:",";","{opacity:1;}}"],e=>{let{completed:t}=e;return(0,i.getColor)(t?"mainBackground":"panelBg")},(0,i.getColor)("primary"),(0,i.getColor)("mainBackground"),l),c=(0,o.default)(i.Flex).attrs({width:"24px",height:"24px",alignItems:"center",justifyContent:"center",flex:!1}).withConfig({displayName:"taskItem__CheckIcon",componentId:"sc-1mf27rk-2"})(["",""],e=>{let{completed:t}=e;return!t&&`\n border-radius: 50%;\n border: 2px solid ${(0,i.getColor)("borderSecondary")};\n `}),p=e=>{let{task:t,completed:n,onClick:o,onSkip:a,children:s}=e;return(0,r.jsxs)(d,{completed:n,onClick:o,children:[(0,r.jsx)(c,{completed:n,children:n&&(0,r.jsx)(i.Icon,{name:"check",color:"primary",width:"32px",height:"32px"})}),(0,r.jsxs)(i.Flex,{column:!0,gap:1,flex:!0,children:[(0,r.jsx)(i.Text,{strong:!0,color:n?"textLite":void 0,children:t.title}),(0,r.jsx)(i.TextSmall,{color:n?"textNoFocus":"textLite",children:s||t.description})]}),!n&&a&&(0,r.jsx)(l,{onClick:e=>{e.stopPropagation(),a?.()}})]})}},97926(e,t,n){n.d(t,{A:()=>p});var o=n(96540),i=n(41716),a=n(10602),r=n(67294),s=n(24609),l=n(86706),d=n(41258),c=n(31246);const p=()=>{const e=(0,a.nj)(),t=(0,a.CK)(),n=(0,i.s)("ids")||[],p=(0,i.s)("loaded"),u=(0,s.vt)();(0,d.A)(u);const h=(0,l.Gi)(),g=(0,l.gk)(),m=(0,r.q)(),x=(0,r.RQ)();return(0,o.useMemo)(()=>e&&p&&g&&x?{[c.aL.welcome]:!0,[c.aL.firstNodeConnected]:t.length>=1,[c.aL.firstAlertTriggered]:n.length>=1,[c.aL.secondNodeConnected]:t.length>=2,[c.aL.threeOrMoreNodes]:t.length>=3,[c.aL.firstTeamMemberInvited]:Array.isArray(h)&&h.length>1,[c.aL.firstDashboardCreated]:Array.isArray(m)&&m.length>=1}:null,[e,t.length,p,n.length,g,h,x,m])}},74290(e,t,n){n.d(t,{A:()=>u});n(74423),n(98992),n(23215),n(54520),n(81454),n(8872);var o=n(96540),i=n(24285),a=n(99728),r=n(24609),s=n(76571),l=n(56523),d=n(97926),c=n(17115),p=n(31246);const u=()=>{const{milestones:e,recordMilestones:t,markMilestonesSeen:n,settingsLoaded:u}=(0,l.A)(),h=(0,d.A)(),g=(0,c.Ay)(),m=(0,a.Sk)(),x=(0,c.Ex)(),f=(0,i.xd)("isLoaded"),b=(0,i.xd)("onboardingFormData"),w=(0,r.vt)(),y=(0,r.ap)("loaded"),k=(0,s.t5)(w,"channels"),C=(0,s.t5)(w,"loaded"),j=Array.isArray(k)?k.length:0,v=!!b?.usageType;(0,o.useEffect)(()=>{if(!u||!h)return;const n=Object.entries(h).filter(t=>{let[n,o]=t;return o&&!e.completed[n]?.completedAt});if(n.length>0){const e=n.map(e=>{let[t]=e;return t});t(e)}},[h,e.completed,t,u]),(0,o.useEffect)(()=>{if(!u||!C||!y||!f)return;const t={segment:g,permissions:m,isLargeTeam:x,channelCount:j,hasOnboarding:v},o=Object.entries(e.completed).reduce((e,n)=>{let[o,i]=n;if(!i.completedAt||i.seenAt)return e;const a=((e,t)=>{let{segment:n,permissions:o,isLargeTeam:i,channelCount:a,hasOnboarding:r}=t;return(p.a7[e]||[]).filter(e=>r?!!e.segments.includes(n)&&!(e.permission&&!o[e.permission])&&!(e.requiresLargeTeam&&!i)&&!(void 0!==e.maxChannels&&a>e.maxChannels):e.isFeatureAnnouncement)})(o,t);if(!a.length)return e;const r=i.tasks||{};return a.every(e=>r[e.id])&&e.push(o),e},[]);o.length&&n(o)},[j,C,v,x,n,m,e.completed,g,u,y,f])}},81187(e,t,n){n.d(t,{A:()=>b});var o=n(96540),i=n(76667),a=n(34843),r=n(24609),s=n(41716),l=n(19186),d=n(67294),c=n(92726),p=n(14070),u=n(49108),h=n(51318),g=n(42318),m=n(78069),x=n(97394),f=n(56523);const b=function(){let{onBeforeAction:e,skipCompletedCheck:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,i.Zp)(),b=(0,r.bq)(),w=(0,l.QW)(),{markTaskCompleted:y}=(0,f.A)(),{onIntegrationsClick:k}=(0,h.A)(),{setSearchTerm:C}=(0,g.A)(),{open:j}=(0,u.A)(),{handleOpenProfileModal:v}=(0,m.A)(),I=(0,a.Xr)(x.TZ),A=(0,s.s)("ids"),[,S]=(0,p.A)(),_=(0,d.q)(),F=(0,c.fz)(_?.[0],"slug"),T=(0,o.useCallback)(e=>t||!e.completed,[t]);return(0,o.useCallback)(t=>{e?.();let o=location.pathname,i={};if(t.openIntegrations)return t.integrationsSearchTerm&&C(t.integrationsSearchTerm),k(),void(T(t)&&y(t.milestoneId,t.id));if(t.openAiPanel)return j(),void(T(t)&&y(t.milestoneId,t.id));if(t.openProfileModal)return v(t.openProfileModal),t.spotlight?void I({...t.spotlight,taskId:t.id,milestoneId:t.milestoneId,targetPath:location.pathname}):void(T(t)&&y(t.milestoneId,t.id));if(t.openFirstDashboard&&F)return o=`/spaces/${b}/rooms/${w}/dashboards/${F}`,n(o),t.spotlight?void I({...t.spotlight,taskId:t.id,milestoneId:t.milestoneId,targetPath:o}):void(T(t)&&y(t.milestoneId,t.id));if(t.route){const e=t.isSpaceRoute?`/spaces/${b}`:`/spaces/${b}/rooms/${w}`;void 0!==t.alertTabIndex&&(i.alertTabIndex=t.alertTabIndex),o=`${e}/${t.route}`,n(o,{state:i}),t.openFirstAlert&&A?.[0]&&S({alertId:A[0]})}t.spotlight?I({...t.spotlight,taskId:t.id,milestoneId:t.milestoneId,targetPath:o}):T(t)&&y(t.milestoneId,t.id)},[e,n,b,w,y,k,C,j,v,I,A,S,F,T])}},17115(e,t,n){n.d(t,{Ay:()=>d,Ex:()=>l});var o=n(96540),i=n(24285),a=n(19186),r=n(31246);const s=()=>{const e=(0,i.xd)("onboardingFormData"),t=(0,a.XA)("memberCount")||0,n=(0,a.XA)("nodeCount")||0;return(0,o.useMemo)(()=>{const o=e?.usageType;return"Personal (homelab)"===o?r.JF.homelabber:"Work"===o?t>2||n>=50?r.JF.largeOrg:r.JF.smallOrg:r.JF.homelabber},[e?.usageType,t,n])},l=()=>{const e=s(),t=(0,a.XA)("memberCount")||0;return e===r.JF.largeOrg&&t>10},d=s},99962(e,t,n){n.r(t),n.d(t,{default:()=>mt});var o=n(96540),i=n(38429),a=n(24285),r=n(76667),s=n(18121),l=n(17702),d=n(6304),c=n(32742),p=(n(98992),n(81454),n(882)),u=n(24609),h=n(70140),g=n(24655),m=n(74848);const x=(0,p.default)(i.Flex).attrs(e=>({width:"100%",column:!0,alignItems:"center",overflow:{vertical:"auto",horizontal:"hidden"},...e})).withConfig({displayName:"spacesList__SpacesListContainer",componentId:"sc-vabwjt-0"})(["margin-top:-8px;&&{margin-bottom:8px;}"]),f=()=>{const e=(0,u.vt)(),t=(0,h.A)(),{spaceIds:n,colors:o}=t||{};return(0,m.jsx)(x,{"data-testid":"workspaceBar-spacesList",children:n.map(t=>{const n=o?.[t];return(0,m.jsx)(g.A,{testIdPrefix:"workspaceBar-space",spaceId:t,active:t===e,backgroundColor:n},t)})})};var b=n(72679),w=n(74891);const y=(0,w.A)(i.IconButton),k=()=>{const e=(0,u.dg)(),t=(0,b.A)();return(0,m.jsx)(y,{icon:"gear",iconColor:"text",neutral:!0,onClick:t,"data-testid":"settings-button",width:"16px",height:"16px",tooltip:{title:e?"Settings":"Space Settings",description:e?"Configure your Netdata settings and preferences":"Manage space members, permissions, and configurations"},tooltipProps:{align:"right"}})};var C=n(30582),j=(n(54520),n(34843)),v=(n(74423),n(23215),n(30670),n(99728)),I=n(76571),A=n(56523),S=n(97926),_=n(17115),F=n(31246);const T=()=>{const{milestones:e,settingsLoaded:t}=(0,A.A)(),{completed:n}=e,i=(0,S.A)(),r=(0,_.Ay)(),s=(0,v.Sk)(),l=(0,_.Ex)(),d=(0,a.xd)("isLoaded"),c=(0,a.xd)("onboardingFormData"),p=(0,u.vt)(),h=(0,u.ap)("loaded"),g=(0,I.t5)(p,"channels"),m=(0,I.t5)(p,"loaded"),x=Array.isArray(g)?g.length:0;return(0,o.useMemo)(()=>{if(!t||!m||!h||!d||!i)return[];const e=!!c?.usageType,o=Object.entries(i).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t}).filter(e=>n[e]?.completedAt);if(o.length>0&&o.every(e=>{if(!n[e]?.seenAt)return!1;const t=F.a7[e]||[],o=n[e]?.tasks||{};return t.every(e=>o[e.id])}))return[];return o.flatMap(e=>(F.a7[e]||[]).map(t=>({...t,milestoneId:e}))).filter(t=>e?!!t.segments.includes(r)&&(!(t.permission&&!s[t.permission])&&(!(t.requiresLargeTeam&&!l)&&!(void 0!==t.maxChannels&&x>t.maxChannels))):t.isFeatureAnnouncement).map(e=>{const t=n[e.milestoneId]?.tasks?.[e.id];return e.channelAwareContent&&x>0?{...e,title:e.channelAwareContent.title,description:e.channelAwareContent.description,completed:!!t}:{...e,completed:!!t}})},[n,i,r,s,l,x,t,m,h,d,c])};var E=n(74290),P=n(97394),N=n(56473),B=n(81187),L=n(4703);const M=(0,p.default)(i.Flex).attrs({column:!0,round:.5,border:{side:"all",color:"border"},background:"panelBg",padding:[4,0],gap:4,overflow:"hidden"}).withConfig({displayName:"sidebarPanel__Panel",componentId:"sc-i29dhk-0"})(["width:min(420px,90vw);box-shadow:0 4px 4px rgba(0,0,0,0.25);"]),z=(0,p.default)(i.Flex).attrs({justifyContent:"between",alignItems:"start",gap:4,padding:[0,4]}).withConfig({displayName:"sidebarPanel__Header",componentId:"sc-i29dhk-1"})([""]),O=(0,p.default)(i.Flex).attrs({alignItems:"center",gap:2,padding:[0,4]}).withConfig({displayName:"sidebarPanel__Progress",componentId:"sc-i29dhk-2"})([""]),R=e=>{let{description:t}=e;return`${(0,N.PP)({extraKey:"runningAlerts"}).length} ${t}`},q=()=>{const[e,t]=(0,j.fp)(P.xL),{dismissOnboarding:n,markTaskCompleted:a}=(0,A.A)(),r=T(),s=(0,o.useCallback)(()=>t(!1),[t]),l=(0,B.A)({onBeforeAction:s,skipCompletedCheck:!1}),d=(0,o.useCallback)(e=>a(e.milestoneId,e.id),[a]),{totalTasks:c,completedTasks:p}=(0,o.useMemo)(()=>({totalTasks:r.length,completedTasks:r.filter(e=>e.completed).length}),[r]);(0,o.useEffect)(()=>{e&&!c&&t(!1)},[e,c,t]);const u=(0,o.useCallback)(()=>{n(),t(!1)},[n,t]);return e&&c?(0,m.jsx)(i.Layer,{full:"vertical",onClickOutside:s,onEsc:s,margin:[5,14],position:"bottom-left",children:(0,m.jsxs)(M,{"data-testid":"onboarding-sidebar-panel",children:[(0,m.jsxs)(z,{children:[(0,m.jsxs)(i.Flex,{column:!0,gap:1,children:[(0,m.jsx)(i.Text,{strong:!0,children:"Getting started"}),(0,m.jsx)(i.TextSmall,{color:"textLite",children:"Stay on track with your onboarding tasks"})]}),(0,m.jsx)(i.IconButton,{icon:"x",neutral:!0,onClick:s})]}),(0,m.jsxs)(O,{children:[(0,m.jsx)(i.Icon,{name:p===c?"checkmark":p>0?"checkmark_s":"checkmark_partial_s",color:"primary"}),(0,m.jsxs)(i.TextSmall,{color:"textLite",children:[p," of ",c," tasks completed"]})]}),(0,m.jsx)(i.Flex,{column:!0,gap:2,overflow:"auto",flex:!0,padding:[0,4],children:r.map(e=>(0,m.jsx)(L.A,{task:e,completed:e.completed,onClick:()=>l(e),onSkip:()=>d(e),children:e.dynamicDescription?(0,m.jsx)(o.Suspense,{fallback:e.description,children:(0,m.jsx)(R,{description:e.description})}):e.description},`${e.milestoneId}-${e.id}`))}),(0,m.jsxs)(i.Flex,{justifyContent:"between",alignItems:"center",padding:[0,4],children:[(0,m.jsx)(i.Button,{flavour:"hollow",label:"Skip onboarding",onClick:u}),(0,m.jsx)(i.Button,{label:"Close",onClick:s})]})]})}):null},H=p.default.button.attrs({type:"button"}).withConfig({displayName:"sidebarButton__Button",componentId:"sc-23z3a0-0"})(["background:transparent;border:none;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;outline:none;&:hover{filter:drop-shadow(0 0 0 ",");}"],(0,i.getColor)("primary")),W=(0,p.default)(i.Flex).attrs({alignItems:"center",justifyContent:"center"}).withConfig({displayName:"sidebarButton__Ring",componentId:"sc-23z3a0-1"})(["width:36px;height:36px;border-radius:50%;padding:2px;background:",";transition:background 0.2s,transform 0.2s;transform:",";"],e=>{const t=Math.round(360*e.progress);return`conic-gradient(${(0,i.getColor)("primary")(e)} ${t}deg, ${(0,i.getColor)("borderSecondary")(e)} ${t}deg 360deg)`},e=>{let{isOpen:t}=e;return t?"scale(1.05)":"scale(1)"}),D=(0,p.default)(i.Flex).attrs({alignItems:"center",justifyContent:"center",round:"50%",width:"100%",height:"100%"}).withConfig({displayName:"sidebarButton__Inner",componentId:"sc-23z3a0-2"})(["background:",";border:1px solid ",";"],(0,i.getColor)("sideBarMini"),(0,i.getColor)("border")),$=(0,p.default)(i.TextSmall).withConfig({displayName:"sidebarButton__Count",componentId:"sc-23z3a0-3"})(["font-weight:700;"]),U=(0,w.A)(e=>{let{progress:t,remaining:n,isOpen:o,onClick:i}=e;return(0,m.jsx)(H,{onClick:i,"data-testid":"onboarding-sidebar-button","aria-label":`${n} onboarding ${1===n?"task":"tasks"} remaining`,"aria-pressed":o,children:(0,m.jsx)(W,{progress:t,isOpen:o,children:(0,m.jsx)(D,{children:(0,m.jsx)($,{color:"primary",children:n>9?"9+":n})})})})}),J=()=>{(0,E.A)();const[e,t]=(0,j.fp)(P.xL),n=T(),{totalTasks:i,completedTasks:a}=(0,o.useMemo)(()=>({totalTasks:n.length,completedTasks:n.filter(e=>e.completed).length}),[n]),r=(0,o.useCallback)(()=>t(e=>!e),[t]),s=i-a;if(!i||s<=0)return null;const l=a/i;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(U,{onClick:r,progress:l,remaining:s,isOpen:e,tooltip:{title:"Onboarding",description:`${a} of ${i} tasks completed`},tooltipProps:{align:"right"}}),(0,m.jsx)(q,{})]})};var X=n(99722),G=n(51571),Q=n(39175);const V=(0,w.A)(i.IconButton),Y=e=>{let{modalProps:t={},...n}=e;const o=(0,u.vt)(),a=(0,Q.ES)(o);return(0,m.jsx)(i.News,{app:Q.Ay?a?"agent":["cloud","agent"]:"cloud",modalProps:t,children:e=>{let{toggle:t,upToDate:o}=e;return(0,m.jsx)(V,{icon:"insights",iconColor:o?"text":"attention",onClick:t,"data-ga":"news::click-news::global-view","data-testid":"cloud-app-news",neutral:o,width:"20px",height:"20px",tooltip:{title:"News & Announcements",description:"Stay updated with the latest Netdata features and improvements"},tooltipProps:{align:"right"},...n})}})};n(33110),n(3949);var Z=n(41514),K=n(92318);const ee="https://nedi.netdata.cloud",te="nedi-persistent",ne="nedi-modal-size",oe=[{type:"css",src:`${ee}/ai-agent-ui.css?v=17`},{type:"js",src:"https://cdn.jsdelivr.net/npm/markdown-it@14.1.1/dist/markdown-it.min.js",integrity:"sha384-VjNpj0uWy3ya2VFiHXeS6MxjLjWGb1mSZTNAF0xfbZguX+9CXmTkYSmOxEyUWJ9S"},{type:"js",src:"https://cdn.jsdelivr.net/npm/mermaid@11.14.0/dist/mermaid.min.js",integrity:"sha384-1CMXl090wj8Dd6YfnzSQUOgWbE6suWCaenYG7pox5AX7apTpY3PmJMeS2oPql4Gk"},{type:"js",src:"https://cdn.jsdelivr.net/npm/@viz-js/viz@3.25.0/dist/viz-global.js",integrity:"sha384-bbbJqCCkrbrFHdih/d2MzpiSqV5mLvDohVnofcn0g0UCjDxyFF5QUiTCsRXPJNxH"},{type:"js",src:"https://cdn.jsdelivr.net/npm/turndown@7.2.4/dist/turndown.js",integrity:"sha384-VRHmZZ8b5mH5yknWcg48OJS6RmXZmlgvsqhOXJqY0rwvwirs1M12xd+49c3NpW6a"},{type:"js",src:"https://cdn.jsdelivr.net/npm/@guyplusplus/turndown-plugin-gfm@1.0.7/dist/turndown-plugin-gfm.js",integrity:"sha384-b4AQtiEmaWubq+mFwFnRJCHtHL9HxF2bSrT67eGId8giR2orvUqJFaLQN5NsUP89"},{type:"js",src:`${ee}/ai-agent-public.js?v=17`},{type:"js",src:`${ee}/ai-agent-ui.js?v=17`}],ie={en:["What's on your mind today?","How can I help?","What are you working on?","Where should we begin?","Ready when you are.","What's on the agenda today?","Hi! Ready to dive in?","Good to see you."],es:["\xbfQu\xe9 tienes en mente hoy?","\xbfC\xf3mo puedo ayudarte?","\xbfEn qu\xe9 est\xe1s trabajando?","\xbfPor d\xf3nde empezamos?","Listo cuando quieras.","\xbfQu\xe9 hay en la agenda hoy?","\xa1Hola! \xbfEmpezamos?","Me alegra verte."],fr:["Qu'avez-vous en t\xeate aujourd'hui ?","Comment puis-je vous aider ?","Sur quoi travaillez-vous ?","Par o\xf9 commen\xe7ons-nous ?","Pr\xeat quand vous voulez.","Qu'y a-t-il au programme aujourd'hui ?","Bonjour ! On commence ?","Content de vous voir."],de:["Was haben Sie heute auf dem Herzen?","Wie kann ich helfen?","Woran arbeiten Sie?","Wo fangen wir an?","Bereit, wenn Sie es sind.","Was steht heute auf der Agenda?","Hallo! Bereit loszulegen?","Sch\xf6n, Sie zu sehen."],pt:["O que voc\xea tem em mente hoje?","Como posso ajudar?","No que voc\xea est\xe1 trabalhando?","Por onde come\xe7amos?","Pronto quando voc\xea quiser.","O que temos na agenda hoje?","Oi! Vamos come\xe7ar?","Bom te ver."],zh:["\u4eca\u5929\u6709\u4ec0\u4e48\u60f3\u6cd5\uff1f","\u6211\u80fd\u5e2e\u4f60\u4ec0\u4e48\uff1f","\u4f60\u5728\u505a\u4ec0\u4e48\uff1f","\u4ece\u54ea\u91cc\u5f00\u59cb\uff1f","\u51c6\u5907\u597d\u4e86\u5c31\u5f00\u59cb\u5427\u3002","\u4eca\u5929\u7684\u8ba1\u5212\u662f\u4ec0\u4e48\uff1f","\u4f60\u597d\uff01\u51c6\u5907\u597d\u4e86\u5417\uff1f","\u5f88\u9ad8\u5174\u89c1\u5230\u4f60\u3002"],ja:["\u4eca\u65e5\u306f\u4f55\u3092\u304a\u8003\u3048\u3067\u3059\u304b\uff1f","\u304a\u624b\u4f1d\u3044\u3067\u304d\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u3059\u304b\uff1f","\u4f55\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u304b\uff1f","\u3069\u3053\u304b\u3089\u59cb\u3081\u307e\u3057\u3087\u3046\u304b\uff1f","\u3044\u3064\u3067\u3082\u3069\u3046\u305e\u3002","\u4eca\u65e5\u306e\u4e88\u5b9a\u306f\uff1f","\u3053\u3093\u306b\u3061\u306f\uff01\u59cb\u3081\u307e\u3057\u3087\u3046\u304b\uff1f","\u304a\u4f1a\u3044\u3067\u304d\u3066\u5b09\u3057\u3044\u3067\u3059\u3002"],ko:["\uc624\ub298 \ubb34\uc5c7\uc744 \ub3c4\uc640\ub4dc\ub9b4\uae4c\uc694?","\uc5b4\ub5bb\uac8c \ub3c4\uc640\ub4dc\ub9b4\uae4c\uc694?","\ubb34\uc5c7\uc744 \uc791\uc5c5\ud558\uace0 \uacc4\uc2e0\uac00\uc694?","\uc5b4\ub514\uc11c\ubd80\ud130 \uc2dc\uc791\ud560\uae4c\uc694?","\uc900\ube44\ub418\uc2dc\uba74 \uc2dc\uc791\ud558\uaca0\uc2b5\ub2c8\ub2e4.","\uc624\ub298\uc758 \uc77c\uc815\uc740 \ubb34\uc5c7\uc778\uac00\uc694?","\uc548\ub155\ud558\uc138\uc694! \uc2dc\uc791\ud560\uae4c\uc694?","\ubc18\uac11\uc2b5\ub2c8\ub2e4."]},ae={en:"Ask anything about Netdata...",es:"Pregunta lo que quieras sobre Netdata...",fr:"Posez vos questions sur Netdata...",de:"Fragen Sie alles \xfcber Netdata...",pt:"Pergunte qualquer coisa sobre o Netdata...",zh:"\u95ee\u4efb\u4f55\u5173\u4e8e Netdata \u7684\u95ee\u9898...",ja:"Netdata \u306b\u3064\u3044\u3066\u4f55\u3067\u3082\u805e\u3044\u3066\u304f\u3060\u3055\u3044...",ko:"Netdata\uc5d0 \ub300\ud574 \ubb34\uc5c7\uc774\ub4e0 \ubb3c\uc5b4\ubcf4\uc138\uc694..."},re=["Paste logs or error messages to trace issues","Find alternatives for monitoring any technology","Create alerts tailored to your use cases","Help with deploying and sizing Netdata Parents"],se=[{label:"Documentation",url:"https://learn.netdata.cloud/"},{label:"Report a Bug",url:"https://github.com/netdata/netdata/issues/new?assignees=&labels=bug%2Cneeds+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+"},{label:"Community",url:"https://www.netdata.cloud/community/"},{label:"Demo Space",url:K.A.demoUrl}],le={light:{"--ai-bg-primary":"#F6F7F7","--ai-bg-secondary":"#EDF0F0","--ai-bg-tertiary":"#E4E8E8","--ai-text-primary":"#526161","--ai-text-secondary":"#7E8E8E","--ai-border-color":"#E4E8E8","--ai-code-bg":"#E4E8E8","--ai-code-text":"#526161"},dark:{"--ai-bg-primary":"#0C0F0F","--ai-bg-secondary":"#101313","--ai-bg-tertiary":"#1D2222","--ai-text-primary":"#AEBBBB","--ai-text-secondary":"#7E8E8E","--ai-text-assistant-message":"#AEBBBB","--ai-border-color":"#1D2222","--ai-code-bg":"#1D2222","--ai-code-text":"#B7C2C2","--ai-scrollbar-thumb":"#313A3A","--ai-scrollbar-track":"#080A0A"}},de=p.default.div.withConfig({displayName:"nedi__Backdrop",componentId:"sc-u0ffuk-0"})(["position:fixed;inset:0;z-index:59;background:rgba(0,0,0,0.3);"]),ce=p.default.div.withConfig({displayName:"nedi__Container",componentId:"sc-u0ffuk-1"})(["position:fixed;bottom:","px;left:","px;z-index:60;display:flex;flex-direction:column;border:1px solid ",";background:",";box-shadow:0 8px 32px rgba(0,0,0,0.25);min-width:min(","px,calc(100vw - ","px));min-height:min(","px,calc(100vh - ","px));max-width:calc(100vw - ","px);max-height:calc(100vh - ","px);overflow:hidden;"],60,56,(0,i.getColor)("border"),(0,i.getColor)("mainBackground"),320,56,300,60,56,60),pe=p.default.div.withConfig({displayName:"nedi__TitleBar",componentId:"sc-u0ffuk-2"})(["display:flex;align-items:center;height:36px;padding:0 8px 0 12px;border-bottom:1px solid ",";flex-shrink:0;user-select:none;"],(0,i.getColor)("border")),ue=p.default.span.withConfig({displayName:"nedi__Title",componentId:"sc-u0ffuk-3"})(["flex:1;font-size:13px;font-weight:600;color:",";"],(0,i.getColor)("text")),he=p.default.button.attrs({type:"button"}).withConfig({displayName:"nedi__TitleButton",componentId:"sc-u0ffuk-4"})(["display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:none;cursor:pointer;padding:0;opacity:0.6;&:hover{opacity:1;}"]),ge=p.default.div.withConfig({displayName:"nedi__EdgeTop",componentId:"sc-u0ffuk-5"})(["position:absolute;top:-3px;left:0;right:0;height:6px;cursor:n-resize;z-index:1;"]),me=p.default.div.withConfig({displayName:"nedi__EdgeRight",componentId:"sc-u0ffuk-6"})(["position:absolute;top:0;right:-3px;bottom:0;width:6px;cursor:e-resize;z-index:1;"]),xe=p.default.div.withConfig({displayName:"nedi__CornerTopRight",componentId:"sc-u0ffuk-7"})(["position:absolute;top:-3px;right:-3px;width:12px;height:12px;cursor:ne-resize;z-index:2;"]),fe=p.default.div.withConfig({displayName:"nedi__NediWrapper",componentId:"sc-u0ffuk-8"})(["flex:1;overflow:hidden;.ai-agent-wrapper{height:100% !important;min-height:unset !important;}.ai-agent-wrapper .ai-agent-input{border-radius:0;scrollbar-gutter:stable;}.ai-agent-message-content ul,.ai-agent-message-content ol{list-style:revert;}.ai-agent-message-content li{list-style:revert;}.ai-agent-message-content h1,.ai-agent-message-content h2,.ai-agent-message-content h3,.ai-agent-message-content h4,.ai-agent-message-content h5,.ai-agent-message-content h6{font:revert;margin:revert;}.ai-agent-message-content blockquote{margin:revert;padding:revert;quotes:revert;}"]);let be=[],we=!1;function ye(){if("undefined"!==typeof window.AiAgentChatUI)return;be.forEach(e=>{e.onerror=null,e.remove()}),be=[],we=!1,window.AI_AGENT_UI_SOURCE=window.envSettings?.isAgent?"agent-dashboard":"cloud-dashboard";const e=()=>{we=!0};oe.forEach(t=>{let{type:n,src:o,integrity:i}=t;if("css"===n){const t=document.createElement("link");t.rel="stylesheet",t.href=o,t.onerror=e,document.head.appendChild(t),be.push(t)}else{const t=document.createElement("script");t.src=o,t.async=!1,t.onerror=e,i&&(t.integrity=i,t.crossOrigin="anonymous"),document.head.appendChild(t),be.push(t)}})}const ke=e=>{let{children:t}=e;const[n,r]=(0,o.useState)(!1),[s,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1),[p,u]=(0,o.useState)(!1),[h,g]=(0,o.useState)(()=>function(){try{const e=localStorage.getItem(ne);if(e)return JSON.parse(e)}catch{return null}return null}()||{width:Math.max(320,50*window.innerWidth/100),height:Math.max(300,50*window.innerHeight/100)}),x=(0,o.useRef)(null),f=(0,o.useRef)(null),b=(0,o.useRef)(null),w=function(e){return"dark"===e||"blue"===e||"unspecified"===e?"dark":"light"}((0,a.xd)("theme")),y=(0,o.useRef)(w);y.current=w;const k=(0,o.useCallback)(()=>{if("undefined"!==typeof window.AiAgentChatUI)return c(!0),void u(!1);u(!1),c(!1),ye()},[]),C=(0,o.useCallback)(()=>{n?((0,Z.H)("header-help","click-close","global-view"),r(!1)):((0,Z.H)("header-help","click-help","global-view"),k(),r(!0))},[n,k]),j=(0,o.useCallback)(()=>{r(!1),(0,Z.H)("header-help","click-out-modal","global-view")},[]),v=(0,o.useCallback)(()=>{r(!1),(0,Z.H)("header-help","click-close","global-view")},[]);(0,o.useEffect)(()=>{if(!n)return;const e=e=>{"Escape"===e.key&&v()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),b.current&&b.current()}},[n,v]),(0,o.useEffect)(()=>()=>{b.current&&b.current()},[]);const I=(0,o.useCallback)(()=>{l(e=>!e)},[]),A=(0,o.useCallback)((e,t)=>{e.preventDefault();const n=e.clientX,o=e.clientY,i=f.current;if(!i)return;const a=i.offsetWidth,r=i.offsetHeight,s=e=>{let i=a,s=r;if("top"!==t&&"top-right"!==t||(s=Math.max(300,r-(e.clientY-o))),"right"===t||"top-right"===t){const t=window.innerWidth-56;i=Math.min(t,Math.max(320,a+(e.clientX-n)))}g({width:i,height:s})},l=()=>{if(document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),b.current=null,f.current){const{offsetWidth:e,offsetHeight:t}=f.current;!function(e,t){try{localStorage.setItem(ne,JSON.stringify({width:e,height:t}))}catch{return}}(e,t)}},d=()=>l();document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),b.current=l},[]);(0,o.useEffect)(()=>{if(!n||d||p)return;const e=setInterval(()=>{"undefined"!==typeof window.AiAgentChatUI?(c(!0),clearInterval(e),clearTimeout(t)):we&&(u(!0),clearInterval(e),clearTimeout(t))},150),t=setTimeout(()=>{"undefined"===typeof window.AiAgentChatUI&&(clearInterval(e),u(!0))},15e3);return()=>{clearInterval(e),clearTimeout(t)}},[n,d,p]),(0,o.useEffect)(()=>{if(!n||!d||!x.current)return;let e;try{e=function(e){let t=document.getElementById(te);if(t)return t;t=document.createElement("div"),t.style.cssText="width:100%;height:100%",window.AiAgentChatConfig={endpoint:ee};const n=new window.AiAgentChatUI(t,{mode:"div",theme:e,showThemeToggle:!1,stickyInput:!1,cssVariables:le,homeWelcome:ie,homePlaceholder:ae,homeHints:re,homeQuickLinks:se,placeholders:[ae.en],onEvent:e=>{"user-message"===e.type&&((0,Z.H)("header-help","nedi-question","global-view"),window.envSettings?.tracking&&window.posthog?.__loaded&&"function"===typeof window.posthog.capture&&window.posthog.capture("nedi_question",{question:e.content}))}});return t.id=te,t.__nediInstance=n,t}(y.current)}catch{return c(!1),void u(!0)}x.current.appendChild(e);const t=e=>{const t=e.target.closest("a[href]");if(!t)return;let n;e.preventDefault();try{const e=new URL(t.href,window.location.href);if(!["http:","https:","mailto:"].includes(e.protocol))return;n=e.href}catch{return}window.open(n,"_blank","noopener,noreferrer")};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t);let n=document.getElementById("nedi-persistent-host");n||(n=document.createElement("div"),n.id="nedi-persistent-host",n.style.display="none",document.body.appendChild(n)),n.appendChild(e)}},[n,d]),(0,o.useEffect)(()=>{const e=document.getElementById(te);if(e&&e.__nediInstance)try{e.__nediInstance.setTheme(w)}catch{return}},[w]);return(0,m.jsxs)(m.Fragment,{children:[t(C),n&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(de,{onClick:j}),(0,m.jsxs)(ce,{ref:f,style:s?{width:"80vw",height:"85vh"}:{width:`${h.width}px`,height:`${h.height}px`},role:"dialog","aria-modal":"true","aria-labelledby":"nedi-dialog-title",children:[!s&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ge,{onMouseDown:e=>A(e,"top")}),(0,m.jsx)(me,{onMouseDown:e=>A(e,"right")}),(0,m.jsx)(xe,{onMouseDown:e=>A(e,"top-right")})]}),(0,m.jsxs)(pe,{children:[(0,m.jsx)(ue,{id:"nedi-dialog-title",children:"Ask Nedi"}),(0,m.jsx)(he,{onClick:I,title:s?"Restore":"Maximize","aria-label":s?"Restore":"Maximize",children:(0,m.jsx)(i.Icon,{name:s?"collapse":"expand",color:"text",width:"14px",height:"14px"})}),(0,m.jsx)(he,{onClick:v,title:"Close","aria-label":"Close",children:(0,m.jsx)(i.Icon,{name:"cross_s",color:"text",width:"12px",height:"12px"})})]}),(0,m.jsx)(fe,{ref:x,children:!d&&(0,m.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:"8px",opacity:.5},children:p?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{children:"Failed to load"}),(0,m.jsx)("button",{type:"button",onClick:k,style:{opacity:1,cursor:"pointer",background:"none",border:"none",color:"inherit",textDecoration:"underline",font:"inherit",padding:0},children:"Retry"})]}):(0,m.jsx)("span",{children:"Loading..."})})})]})]})]})},Ce=(0,w.A)(i.IconButton),je=(0,p.default)(i.Flex).attrs(e=>({width:"32px",height:"32px",alignItems:"center",justifyContent:"center",border:{side:"all",color:e.isOpen?"primary":"border"},round:"50%",...e})).withConfig({displayName:"spaceInfo__Accessor",componentId:"sc-1jvcnnq-0"})([""]),ve=(0,p.default)(i.Flex).attrs(e=>({column:!0,gap:1,alignItems:"center",...e})).withConfig({displayName:"spaceInfo__IconsContainer",componentId:"sc-1jvcnnq-1"})(["",""],e=>{let{visible:t}=e;return t?"":"visibility: hidden;"}),Ie=()=>{const[e,t]=(0,s.useHovered)({},[]),n=t,a=(0,o.useCallback)(()=>{window.open("https://status.netdata.cloud","_blank","noopener,noreferrer")},[]);return(0,m.jsx)(ke,{children:t=>(0,m.jsxs)(i.Flex,{id:"space-info-container",width:"100%",alignItems:"center",ref:e,column:!0,gap:2,children:[(0,m.jsxs)(ve,{visible:n,children:[(0,m.jsx)(Ce,{icon:"question",iconColor:"primary",neutral:!1,onClick:t,"data-ga":"header-help::click-help::global-view","data-testid":"documentation-button",width:"16px",height:"16px",tooltip:{title:"Help & Resources",description:"Ask Nedi, read documentation, engage with the community and let us know about any feature requests or bugs"},tooltipProps:{align:"right"}}),(0,m.jsx)(Ce,{icon:"antenna",iconColor:"primary",neutral:!1,onClick:a,width:"16px",height:"16px",tooltip:{title:"Operational Status",description:"View service status, incidents, and maintenance updates for Netdata Cloud"},tooltipProps:{align:"right"}}),!window.envSettings.onprem&&(0,m.jsx)(o.Suspense,{fallback:"",children:(0,m.jsx)(Y,{iconColor:"primary",neutral:!1,modalProps:{"data-testid":"space-info-content-container"},width:"16px",height:"16px"})})]}),(0,m.jsx)(je,{isOpen:n,children:(0,m.jsx)(i.Icon,{name:"informationPress",color:n?"primary":"text"})})]})})},Ae=p.default.div.withConfig({displayName:"separator__Separator",componentId:"sc-met802-0"})(["height:1px;width:",";background:",";"],(0,i.getSizeBy)(3),(0,i.getColor)("border"));var Se=n(49108),_e=n(94404),Fe=n(78152);const Te=(0,w.A)(G.A),Ee=(0,w.A)(l.A),Pe=(0,_e.A)(Te),Ne=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;const[a,,l,p]=(0,d.A)(),u=(0,r.Zp)(),h=(0,o.useCallback)(function(){let{slug:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(`/spaces/${e}`)},[]),[g,x]=(0,s.useHovered)({},[]),{accessorEnabled:b,open:w}=(0,Se.A)();return(0,m.jsxs)(i.Flex,{ref:g,height:"100vh",width:12,background:"sideBarMini","data-testid":"workspaceBar",padding:[3,0],column:!0,alignItems:"center",gap:6,justifyContent:"between",children:[(0,m.jsxs)(i.Flex,{width:"100%",column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden",children:[t&&x?(0,m.jsx)(i.Flex,{"data-testid":"workspaceBar-expandButton",width:"32px",height:"32px",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:n,role:"button",children:(0,m.jsx)(i.Icon,{name:"chevron_right",color:"primary",width:"24px",height:"22px"})}):(0,m.jsx)(c.A,{"data-testid":"workspaceBar-netdataLogo"}),(0,m.jsx)(Ee,{"data-testid":"workspaceBar-ai-button",icon:"conversationSubject",label:null,height:"24px",onClick:w,disabled:!b,tooltip:b?{title:"Netdata AI",description:"You can ask anything about your infrastructure"}:null,tooltipProps:{align:"right"}}),(0,m.jsx)(Ae,{"data-testid":"workspaceBar-separator"}),(0,m.jsx)(f,{}),(0,m.jsx)(Pe,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:l,"data-testid":"workspaceBar-addSpace-button",feature:"CreateSpace",isStart:!0,tooltip:{title:"Create New Space",description:"Spaces isolate infrastructure, providing fully independent administration and user management"},tooltipProps:{align:"right"},iconWidth:"20px",iconHeight:"20px",padding:[.5]}),(0,m.jsx)(Ae,{"data-testid":"workspaceBar-separator"}),(0,m.jsx)(k,{})]}),(0,m.jsxs)(i.Flex,{column:!0,"data-testid":"workspaceBar-actionsList",gap:4,alignItems:"center",children:[(0,m.jsx)(Ie,{}),Fe.OH&&(0,m.jsx)(J,{}),(0,m.jsx)(X.A,{})]}),a&&(0,m.jsx)(C.A,{onClose:p,onDone:h})]})};var Be=n(85005),Le=n(98595),Me=n(64602),ze=n(45087);const Oe=e=>t=>{const n=(0,u.vt)();return(0,o.createElement)(e,{...t,key:n})};var Re=n(31933);const qe={isSidebar:!0,padding:[1,2,1,4],textColor:"menuItem"},He=Oe(()=>{const e=(0,v.JT)("room:Create"),t=(0,v.JT)("room:Read"),[n,a]=(0,d.A)(t),[r,,s,l]=(0,d.A)(!1),c=(0,o.useCallback)(t=>{t.stopPropagation(),e&&s()},[e]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Le.A,{"data-testid":"workspaceRooms-menuList",disabled:!t,headerTestId:"workspaceRooms-warRooms",isOpen:n,label:(0,m.jsxs)(i.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px",children:[(0,m.jsxs)(i.Flex,{alignItems:"center",gap:2,children:[(0,m.jsx)(i.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),(0,m.jsx)(i.Text,{color:"menuItem",children:"Rooms"})]}),(0,m.jsxs)(i.Flex,{alignItems:"center",gap:2,children:[(0,m.jsx)(ze.A,{content:"Create a new room",align:"right",children:(0,m.jsx)(G.A,{permission:"room:Create",icon:"plus",flavour:"hollow",onClick:c,"data-testid":"workspaceRooms-addWarRoom-button"})}),(0,m.jsx)(Me.v,{right:!n,name:"chevron_down",size:"small",color:"textLite"})]})]}),toggleOpen:a,children:(0,m.jsx)(i.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1],children:(0,m.jsx)(Re.A,{...qe})})}),r&&(0,m.jsx)(Be.n,{onClose:l,isSubmodal:!1})]})});var We=n(7960),De=n(85720),$e=n(98591);const Ue=(0,p.default)(i.Flex).attrs({alignItems:"center",justifyContent:"center",width:10,height:4,round:.5,background:"sideBarMini"}).withConfig({displayName:"styled__AdminPill",componentId:"sc-1ps23b1-0"})(["opacity:0;",":hover &{opacity:1;}"],De.G),Je=(0,We.A)(()=>n.e(35).then(n.bind(n,70035)),"CurrentPlan"),Xe=e=>{let{children:t,onToggle:n}=e;return(0,m.jsxs)(i.Flex,{column:!0,gap:1,children:[(0,m.jsxs)(i.Flex,{justifyContent:"between",alignItems:"center",children:[(0,m.jsx)(i.Flex,{alignItems:"center",overflow:"hidden",children:t}),(0,m.jsx)(i.Button,{onClick:n,icon:"chevron_left",neutral:!0,flavour:"hollow",small:!0})]}),(0,m.jsx)(o.Suspense,{fallback:"",children:(0,m.jsx)(Je,{})})]})};var Ge=n(89590),Qe=n(1174),Ve=n(51318),Ye=n(56284);const Ze=(0,We.A)(()=>n.e(2201).then(n.bind(n,52201)).then(e=>({default:e.TrialWarning})),"TrialWarning"),Ke=(0,p.default)(Le.N).attrs({padding:[2],color:"textLite"}).withConfig({displayName:"spacePanel__ListHeader",componentId:"sc-1275zgk-0"})([""]),et=e=>(0,m.jsxs)(i.Flex,{alignItems:"center",gap:2,...e,children:[(0,m.jsx)(Ue,{children:(0,m.jsx)(i.TextFemto,{strong:!0,color:"text",children:"ADMIN"})}),(0,m.jsx)(i.Flex,{opacity:"medium",children:(0,m.jsx)(i.Icon,{name:"padlock",size:"small",width:"18px",height:"18px",color:"text"})})]}),tt={iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"menuItem",iconColor:"menuItem"},nt=e=>{let{toggleSpacePanel:t}=e;const n=(0,u.ap)(),[a,,r,s]=(0,d.A)(),[,l]=(0,$e.A)("manageInvitations"),c=(0,u.dg)(),{onIntegrationsClick:p}=(0,Ve.A)();return(0,m.jsxs)(m.Fragment,{children:[a&&(0,m.jsx)(Ge.A,{onClose:s}),(0,m.jsx)(Le.A,{"data-testid":"spacesPanel",isOpen:!0,label:(0,m.jsx)(Xe,{onToggle:t,children:(0,m.jsx)(Ye.default,{maxFontSize:20,Component:i.TextSmall,strong:!0,title:n.name,lineHeight:"unset",children:n.name})}),headerTestId:"spacesPanel-activeSpaceHeader",Header:Ke,children:(0,m.jsxs)(i.Flex,{column:!0,padding:[2,0,1],"data-testid":"spacesPanel-menuList",children:[(0,m.jsx)(o.Suspense,{fallback:"",children:(0,m.jsx)(Ze,{flavour:"sidebar"})}),(0,m.jsx)(De.A,{onClick:p,testid:"agentDashboard-addIntegrations",dataGa:"integrations::click-add-integrations::sideMenu",icon:"integrations",...tt,children:"Integrations"}),c?null:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Qe.A,{permission:"node:Create",children:e=>(0,m.jsx)(De.A,{actions:e?null:(0,m.jsx)(et,{"data-testid":"adminWarning-notAdmin"}),disabled:!e,onClick:r,testid:"spacesPanel-claimNodes",icon:"nodes_hollow",...tt,children:"Connect Nodes"})}),(0,m.jsx)(Qe.A,{permission:"space:InviteUser",children:e=>(0,m.jsx)(De.A,{actions:e?null:(0,m.jsx)(et,{"data-testid":"adminWarning-cannotInvite"}),disabled:!e,onClick:l,testid:"spacesPanel-inviteUsers",icon:"user",...tt,children:"Invite Users"})})]})]})})]})},ot=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;return(0,m.jsx)(i.Collapsible,{width:56,background:"sideBar",border:{side:"right",color:"borderSecondary"},open:!t,direction:"horizontal",children:(0,m.jsxs)(i.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"hidden"},padding:[2,0],position:"relative",children:[(0,m.jsx)(nt,{toggleSpacePanel:n}),(0,m.jsx)(i.Flex,{overflow:{vertical:"auto"},flex:!0,column:!0,children:(0,m.jsx)(He,{})})]})})};var it=n(29263),at=n(32788),rt=n(37846),st=n(62718),lt=n(14815),dt=n(60908);const ct=(0,We.A)(()=>Promise.all([n.e(8791),n.e(9462),n.e(6026)]).then(n.bind(n,89462))),pt={"data-testid":"addIntegrationModal"},ut={"data-testid":"addIntegration-header"},ht={"data-testid":"addIntegration-content",overflow:"hidden",hasFooter:!1,padding:[0],hasModalTitle:!1},gt=e=>{let{title:t="Integrations",onClose:n}=e;return(0,m.jsx)(dt.Ay,{feature:"IntegrationsModal",children:(0,m.jsxs)(rt.GO,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:n,...pt,children:[(0,m.jsx)(it.z,{title:(0,m.jsx)(i.TextBig,{color:"textLite",children:t}),onClose:n,...ut||{}}),(0,m.jsx)(at.Yv,{...ht||{},children:(0,m.jsx)(o.Suspense,{fallback:(0,m.jsx)(st.H$,{}),children:(0,m.jsx)(ct,{flavour:lt.D_.addNodesModal})})})]})})},mt=(0,o.memo)(()=>{const[e,t]=(0,a.tF)("spacePanelCollapsed"),{isIntegrationsVisible:n,hideIntegrations:r}=(0,Ve.A)(),s=(0,o.useCallback)(()=>t(!e),[e,t]);return(0,o.useLayoutEffect)(()=>{const e=setTimeout(()=>window.dispatchEvent(new Event("resize")),400);return()=>clearTimeout(e)},[e]),(0,m.jsxs)(i.Flex,{children:[(0,m.jsx)(Ne,{spacePanelCollapsed:e,toggleSpacePanel:s}),(0,m.jsx)(ot,{spacePanelCollapsed:e,toggleSpacePanel:s}),n&&(0,m.jsx)(gt,{onClose:r})]})})},48646(e,t,n){var o=n(69565),i=n(28551),a=n(1767),r=n(50851);e.exports=function(e,t){t&&"string"===typeof e||i(e);var n=r(e);return a(i(void 0!==n?o(n,e):e))}},30531(e,t,n){var o=n(46518),i=n(69565),a=n(79306),r=n(28551),s=n(1767),l=n(48646),d=n(19462),c=n(9539),p=n(96395),u=n(30684),h=n(84549);var g=!p&&!u("flatMap",function(){}),m=!p&&!g&&h("flatMap",TypeError),x=p||g||m||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e.return()}catch(t){return!0}}(),f=d(function(){for(var e,t,n=this.iterator,o=this.mapper;;){if(t=this.inner)try{if(!(e=r(i(t.next,t.iterator))).done)return e.value;this.inner=null}catch(a){c(n,"throw",a)}if(e=r(i(this.next,n)),this.done=!!e.done)return;try{this.inner=l(o(e.value,this.counter++),!1)}catch(a){c(n,"throw",a)}}});o({target:"Iterator",proto:!0,real:!0,forced:x},{flatMap:function(e){r(this);try{a(e)}catch(t){c(this,"throw",t)}return m?i(m,this,e):new f(s(this),{mapper:e,inner:null})}})},30670(e,t,n){n(30531)}}]);