1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`2a2642b6dfacef97687e3efcbfceddb15cf2ec44`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`3aa6ed48-be66-4e38-b336-1eecf8f5c26c`,e._sentryDebugIdIdentifier=`sentry-dbid-3aa6ed48-be66-4e38-b336-1eecf8f5c26c`)}catch{}})();import{o as e}from"./rolldown-runtime-Dq-L5ofj.js";import{y as t}from"./vendor-highcharts-D9LiJ1jq.js";import{x as n}from"./vendor-mui-CwwA7Cvy.js";import{Nn as r,Vr as i}from"./vendors-_iXptsBn.js";import{$t as a}from"./apiSingleton-DoXPG3Va.js";import{G as o}from"./Popover-BFBsLyOX.js";import{H as s}from"./selectors-DjN9nLzP.js";import{On as c,jn as u,xn as d}from"./selectors-hQNTf6lX.js";import{f}from"./selectors-DD8ZJ_5Q.js";import{t as p}from"./InlineSelect-DU2kVeC4.js";import{t as m}from"./Select-DXHsthy3.js";import"./Select-CIAmarnx.js";var h=e(t()),g=n(),_=e(i()),v={container:`_container_bl6fp_1`,select:`_select_bl6fp_7`,inlineLabel:`_inlineLabel_bl6fp_11`,spaceSelectMenu:`_spaceSelectMenu_bl6fp_22`},y=r((e,t)=>({spaces:t.filterByCreationRights?u(e):c(e),globalSelectedSpaceId:d(e),currentUserSpacePermissions:f(e),isSpacesEnabled:s(e)}))(({spaces:e=[],globalSelectedSpaceId:t,currentUserSpacePermissions:n,selectedSpaceId:r,showAllSpacesOption:i,allItemsLabel:s=l(`All topics`),label:c,className:u,error:d,isClearable:f,disabled:y,inline:b,onSpaceChange:x,isSpacesEnabled:S,filterByCreationRights:C,disableAutoSelect:w})=>{let T=e.length===1?e[0].id:null;(0,h.useEffect)(()=>{w||r==null&&t&&x(t)},[]),(0,h.useEffect)(()=>{if(!w&&(T&&x(T),!e.length&&Object.keys(n).length)){let e=Object.keys(n).map(Number);if(C){let t=e.find(e=>n[e]?.canCreateTopics);t&&x(t)}else x(e[0])}},[T,r,t,C,w]);let E=(0,h.useMemo)(()=>{let t=[...e].sort((e,t)=>e.name.localeCompare(t.name));return[i?{value:void 0,label:s}:null,...t.map(e=>({value:e.id,label:e.name}))].filter(Boolean)},[e,i,s]);if(!e.length||!S&&T)return null;let D=E.find(e=>e.value===r)??null;return b?(0,g.jsx)(p,{className:(0,_.default)(v.container,u),options:E,value:r,disabled:y,onChange:e=>x(e?Number(e):void 0),menuClassName:v.spaceSelectMenu,children:(0,g.jsxs)(`span`,{className:(0,_.default)(v.inlineLabel),children:[D?.label,(0,g.jsx)(a,{}),(0,g.jsx)(o,{type:`chevron-down`})]})}):(0,g.jsxs)(`div`,{className:(0,_.default)(v.container,u),children:[c&&(0,g.jsx)(`span`,{className:v.label,children:c}),(0,g.jsx)(m,{isClearable:f,className:(0,_.default)(v.select),placeholder:l(`Select space`),options:E,value:D,error:d?Error(`Space is required`):void 0,onChange:e=>x(e?Number(e.value):void 0),isDisabled:y})]})});export{y as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.