import{m as t,I as o,ao as e,K as n,T5 as s,f as i,Nq as a,dN as r,bC as c,np as l,T6 as p,ng as d,cA as u,lu as f,hQ as w,cy as h,g7 as m,g5 as g,hO as y,T7 as x}from"./c818056db-BBpc4u6S.js";import{c as v}from"./vendor-zustand-IIUY2Tf-.js";import{j,r as W}from"./vendor-react-RSDKEZ60.js";import{bB as M,ac as P}from"./vendor-icons-CjJMeNuY.js";import{M as b}from"./vendor-intl-BNW8a19h.js";import{C as T}from"./cbf215181-BtpZx0Q9.js";import{cZ as z}from"./ca9c256b9-B7ADeATc.js";function S(){const n=o(),s=e(),i=t("chilling_sloth_multi");return!(!n||!s)&&(i&&"electron_window"in globalThis)}function k(){const o=S(),e=t("chilling_sloth_side_chat");return o&&e}function O(){const o=S(),e=t("cowork_artifact_popout"),i=n(),a=s();return o&&e&&i&&a}function _(t){return`side-chat:${t}`}const C=v((t,o)=>{const e=new Map;return{popoutWindows:new Map,openPopout:n=>{const s=function(t){switch(t.type){case"cowork-artifact":return`cowork-artifact:${t.artifactId}`;case"side-chat":return _(t.sessionId);default:return t.sessionId}}(n),i=o().popoutWindows.get(s);if(i){const o=e.get(s);if("code-session"===n.type&&"code-session"===i.type&&(n.initialPosition&&void 0===n.alwaysOnTop&&void 0===i.initialSize&&o&&o.setBounds({...n.initialPosition}),void 0!==n.alwaysOnTop)){const o=void 0!==i.initialSize,e=!1!==n.alwaysOnTop||o?n.alwaysOnTop:i.alwaysOnTop??!1,a=e?n.initialSize??i.initialSize:void 0,r=e?n.anchorHint??i.anchorHint:void 0,c=a!==i.initialSize||r!==i.anchorHint,l=e!==(i.alwaysOnTop??!1)||c,p={...i,entryPoint:l?n.entryPoint:i.entryPoint,alwaysOnTop:e,title:n.title??i.title,initialSize:a,anchorHint:r,initialPosition:void 0};(p.alwaysOnTop!==(i.alwaysOnTop??!1)||e&&(c||void 0!==p.initialSize&&p.initialPosition!==i.initialPosition)||p.entryPoint!==i.entryPoint&&c||p.title!==i.title)&&t(t=>{const o=new Map(t.popoutWindows);return o.set(s,p),{popoutWindows:o}})}return void o?.focus()}"cowork-artifact"===n.type&&o().closeCoworkArtifactPopouts(),t(t=>{const o=new Map(t.popoutWindows);return o.set(s,n),{popoutWindows:o}})},closePopout:o=>t(t=>{if(!t.popoutWindows.has(o))return t;const e=new Map(t.popoutWindows);return e.delete(o),{popoutWindows:e}}),closeCoworkArtifactPopouts:()=>t(t=>{const o=new Map(t.popoutWindows);for(const[e,n]of t.popoutWindows)"cowork-artifact"===n.type&&o.delete(e);return o.size===t.popoutWindows.size?t:{popoutWindows:o}}),closeSideChatPopoutsForStore:o=>t(t=>{const e=new Map(t.popoutWindows);for(const[n,s]of t.popoutWindows)"side-chat"===s.type&&s.sideChatStore===o&&e.delete(n);return e.size===t.popoutWindows.size?t:{popoutWindows:e}}),setPopoutTitle:(o,e)=>t(t=>{const n=t.popoutWindows.get(o);if(!n||n.title===e)return t;const s=new Map(t.popoutWindows);return s.set(o,{...n,title:e}),{popoutWindows:s}}),setPopoutAlwaysOnTop:(o,e)=>t(t=>{const n=t.popoutWindows.get(o);if(!n||"code-session"!==n.type)return t;const s=new Map(t.popoutWindows);return s.set(o,{...n,alwaysOnTop:e,...e?{}:{initialSize:void 0,initialPosition:void 0,anchorHint:void 0}}),{popoutWindows:s}}),registerHandle:(t,o)=>{o?e.set(t,o):e.delete(t)}}});function N(t){if(t)return Math.round((Date.now()-t)/864e5*10)/10}function H(t,o){t({event_key:"claudeai.sidebar.pin_changed",...o})}function A({points:t,align:o="start",className:e}){return j.jsx("ul",{role:"list",className:i("inline-flex flex-col gap-1 text-left",e),children:t.map((t,e)=>{const n=t.isHighlighted?M:P,s=t.isHighlighted?"text-accent-000":void 0;return j.jsxs("li",{className:i("flex gap-2","center"===o&&"items-center"),children:[j.jsx(n,{"aria-hidden":"true",className:i("size-4 shrink-0","start"===o&&"mt-[0.25em]",s??"text-text-500")}),s?j.jsx("span",{className:s,children:t.text}):t.text]},e)})})}function I({children:t}){return j.jsx("div",{className:"py-md text-footnote text-secondary",children:t})}function K(){const t=a(),o=r(t=>t.open),e=c(),{groups:n}=l({forModal:!0}),s=W.useMemo(()=>new Set(n.flatMap(t=>t.sections).map(t=>t.id)),[n]);return W.useCallback(n=>{const i=p(n),a=t&&null!==i&&d(i.section)&&"customize-plugins"!==i.section&&s.has(i.section);return function(t){return j.jsx(u,{href:n,onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button||(t.preventDefault(),a?o(i.section,i.subpath):e.push(n))},children:t})}},[t,o,e,s])}function B(){const t=f(),o=K();return T(z),j.jsxs("main",{children:[j.jsx(w,{id:"connected-accounts",children:j.jsx(b,{defaultMessage:"Connectors",id:"2mMJRvsAg1"})}),j.jsxs(h,{children:[t&&j.jsx("h3",{className:"text-heading-semibold text-primary",children:j.jsx(b,{defaultMessage:"Connectors",id:"2mMJRvsAg1"})}),j.jsx(I,{children:j.jsx(b,{defaultMessage:"Connectors have moved to <link>Customize</link>. Head there to browse, connect, and manage them.",id:"gshbVTjZni",values:{link:o(m)}})})]})]})}function D(){return g()||y("/settings"),j.jsx("div",{className:"flex flex-col gap-7 pb-10",children:j.jsx(B,{})})}const J=Object.freeze(Object.defineProperty({__proto__:null,default:D,useShowConnectorsPageInPersonalSettings:x},Symbol.toStringTag,{value:"Module"}));export{I as M,A as P,D as S,O as a,C as b,S as c,k as d,N as i,J as p,_ as s,H as t,K as u};
