@kaitranntt/ccs 7.77.1-dev.1 → 7.77.1-dev.2

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 (43) hide show
  1. package/dist/proxy/upstream-url.d.ts.map +1 -1
  2. package/dist/proxy/upstream-url.js +8 -0
  3. package/dist/proxy/upstream-url.js.map +1 -1
  4. package/dist/shared/provider-preset-catalog.d.ts +1 -1
  5. package/dist/shared/provider-preset-catalog.d.ts.map +1 -1
  6. package/dist/shared/provider-preset-catalog.js +1 -1
  7. package/dist/shared/provider-preset-catalog.js.map +1 -1
  8. package/dist/ui/assets/{accounts-CybVGDsm.js → accounts-TsSkNVen.js} +1 -1
  9. package/dist/ui/assets/{alert-dialog-C6npAhT0.js → alert-dialog-hGKLLafj.js} +1 -1
  10. package/dist/ui/assets/{api-DZosWVkR.js → api-DKvIxLdW.js} +1 -1
  11. package/dist/ui/assets/{auth-section-D4MZkgcP.js → auth-section-BOvKd0Sl.js} +1 -1
  12. package/dist/ui/assets/{backups-section-DvMJrmHH.js → backups-section-BktH4gXP.js} +1 -1
  13. package/dist/ui/assets/{channels-BVftYfOn.js → channels-Cu60Cd8-.js} +1 -1
  14. package/dist/ui/assets/{checkbox-BLRznRTO.js → checkbox-CvFR8Vac.js} +1 -1
  15. package/dist/ui/assets/{claude-extension-C6OeBQ73.js → claude-extension-yBbUoGj_.js} +1 -1
  16. package/dist/ui/assets/{cliproxy-B3Jyu3r9.js → cliproxy-B4OFi937.js} +1 -1
  17. package/dist/ui/assets/{cliproxy-ai-providers-BAJ78pUc.js → cliproxy-ai-providers-BKTmYHel.js} +1 -1
  18. package/dist/ui/assets/{cliproxy-control-panel-XEvUMVJe.js → cliproxy-control-panel-BhZWHeYe.js} +1 -1
  19. package/dist/ui/assets/{codex-CY2vikqX.js → codex-Dl4vlmaB.js} +1 -1
  20. package/dist/ui/assets/{confirm-dialog-DjLHh1qX.js → confirm-dialog-DC-s0Lza.js} +1 -1
  21. package/dist/ui/assets/{copilot-afee2lL9.js → copilot-Cl3Kj_ql.js} +1 -1
  22. package/dist/ui/assets/{cursor-DuWy60wp.js → cursor-CNjO4Z44.js} +1 -1
  23. package/dist/ui/assets/{droid-FlceoQ6k.js → droid-DTjmkIyQ.js} +1 -1
  24. package/dist/ui/assets/{globalenv-section-DpJ7unxC.js → globalenv-section-CId2zBTe.js} +1 -1
  25. package/dist/ui/assets/{health-BEMgcKD3.js → health-BudwIkEr.js} +1 -1
  26. package/dist/ui/assets/{index-0n_43sCZ.js → index-BGuD2ZzA.js} +1 -1
  27. package/dist/ui/assets/{index-Cq9VySs6.js → index-D9dQkYrN.js} +1 -1
  28. package/dist/ui/assets/{index-Cj7EjEq6.js → index-DS_mOUz0.js} +1 -1
  29. package/dist/ui/assets/{index-Ba4ysocb.js → index-DXnvUKiV.js} +1 -1
  30. package/dist/ui/assets/{index-BRtgic66.js → index-DinHmYv0.js} +3 -3
  31. package/dist/ui/assets/{index-DOC7_hun.js → index-G4oOKx1a.js} +1 -1
  32. package/dist/ui/assets/{index-0GkznW41.js → index-QAYRGqq3.js} +1 -1
  33. package/dist/ui/assets/{logs-Dth4naJl.js → logs-BkEGnqlr.js} +1 -1
  34. package/dist/ui/assets/{masked-input-DL6pJ8pE.js → masked-input-auFe8ZWs.js} +1 -1
  35. package/dist/ui/assets/{proxy-status-widget-DW4cPFeD.js → proxy-status-widget-CtR9rShF.js} +1 -1
  36. package/dist/ui/assets/{raw-json-settings-editor-panel-Dcumu3Qi.js → raw-json-settings-editor-panel-BL9CRBUf.js} +1 -1
  37. package/dist/ui/assets/{searchable-select-CWL2D5Ft.js → searchable-select-DFa4XBEG.js} +1 -1
  38. package/dist/ui/assets/{separator-Do_vqTQD.js → separator-BdwlLg_X.js} +1 -1
  39. package/dist/ui/assets/{shared-CwWuZx24.js → shared-CaCM5JhJ.js} +1 -1
  40. package/dist/ui/assets/{table-BP6nBZzg.js → table-cBvaa4dp.js} +1 -1
  41. package/dist/ui/assets/{updates-BTHJZ7Rk.js → updates-CPLM0pNI.js} +1 -1
  42. package/dist/ui/index.html +1 -1
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"upstream-url.d.ts","sourceRoot":"","sources":["../../src/proxy/upstream-url.ts"],"names":[],"mappings":"AA6BA,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9D"}
1
+ {"version":3,"file":"upstream-url.d.ts","sourceRoot":"","sources":["../../src/proxy/upstream-url.ts"],"names":[],"mappings":"AAuCA,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -10,6 +10,10 @@ function ensureSupportedProtocol(parsed) {
10
10
  throw new Error(`Unsupported upstream protocol: ${parsed.protocol}`);
11
11
  }
12
12
  }
13
+ function isOpenRouterHost(hostname) {
14
+ const normalized = hostname.toLowerCase();
15
+ return normalized === 'openrouter.ai' || normalized.endsWith('.openrouter.ai');
16
+ }
13
17
  function buildResolvedUrl(baseUrl, suffix) {
14
18
  const parsed = new URL(baseUrl);
15
19
  ensureSupportedProtocol(parsed);
@@ -17,6 +21,10 @@ function buildResolvedUrl(baseUrl, suffix) {
17
21
  if (pathname.endsWith(suffix)) {
18
22
  return parsed.toString();
19
23
  }
24
+ if (isOpenRouterHost(parsed.hostname) && pathname.endsWith('/api')) {
25
+ parsed.pathname = `${pathname}/v1${suffix}`;
26
+ return parsed.toString();
27
+ }
20
28
  if (pathname.endsWith('/v1') || pathname.endsWith('/api')) {
21
29
  parsed.pathname = `${pathname}${suffix.startsWith('/') ? suffix : `/${suffix}`}`;
22
30
  return parsed.toString();
@@ -1 +1 @@
1
- {"version":3,"file":"upstream-url.js","sourceRoot":"","sources":["../../src/proxy/upstream-url.ts"],"names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AED,IAAI,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACnE,MAAM,CAAC,QAAQ,GAAG,GAAG,QAAQ,MAAM,MAAM,EAAE,CAAC;QAC5C,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1D,MAAM,CAAC,QAAQ,GAAG,GAAG,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,EAAE,CAAC;QACjF,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,MAAM,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,MAAM,EAAE,CAAC;IACxE,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC;AAED,SAAgB,+BAA+B,CAAC,OAAe;IAC7D,OAAO,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;AACxD,CAAC;AAFD,0EAEC;AAED,SAAgB,sBAAsB,CAAC,OAAe;IACpD,OAAO,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAC9C,CAAC;AAFD,wDAEC"}
@@ -29,7 +29,7 @@ export interface ProviderPresetDefinition {
29
29
  featured?: boolean;
30
30
  icon?: string;
31
31
  }
32
- export declare const OPENROUTER_BASE_URL = "https://openrouter.ai/api";
32
+ export declare const OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1";
33
33
  /**
34
34
  * Legacy aliases mapped to canonical preset IDs.
35
35
  * Keep this minimal and explicit to avoid hidden implicit behavior.
@@ -1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,MAAM,2BAA2B,EAAE,SAAS,wBAAwB,EAE1E,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,wBAAwB,EAAE,CAE5E;AAED,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAG5D"}
@@ -23,7 +23,7 @@ exports.PROVIDER_PRESET_IDS = [
23
23
  'ollama-cloud',
24
24
  'novita',
25
25
  ];
26
- exports.OPENROUTER_BASE_URL = 'https://openrouter.ai/api';
26
+ exports.OPENROUTER_BASE_URL = 'https://openrouter.ai/api/v1';
27
27
  /**
28
28
  * Legacy aliases mapped to canonical preset IDs.
29
29
  * Keep this minimal and explicit to avoid hidden implicit behavior.
@@ -1 +1 @@
1
- {"version":3,"file":"provider-preset-catalog.js","sourceRoot":"","sources":["../../src/shared/provider-preset-catalog.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKU,QAAA,mBAAmB,GAAG;IACjC,YAAY;IACZ,qBAAqB;IACrB,aAAa;IACb,QAAQ;IACR,UAAU;IACV,WAAW;IACX,KAAK;IACL,IAAI;IACJ,SAAS;IACT,IAAI;IACJ,UAAU;IACV,MAAM;IACN,cAAc;IACd,QAAQ;CACA,CAAC;AA0BE,QAAA,mBAAmB,GAAG,2BAA2B,CAAC;AAE/D;;;GAGG;AACU,QAAA,uBAAuB,GAA+C,MAAM,CAAC,MAAM,CAAC;IAC/F,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,qBAAqB;IAC9B,GAAG,EAAE,qBAAqB;IAC1B,EAAE,EAAE,aAAa;CAClB,CAAC,CAAC;AAEH,MAAM,+BAA+B,GAAwC;IAC3E;QACE,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,2BAAmB;QAC5B,kBAAkB,EAAE,YAAY;QAChC,YAAY,EAAE,2BAA2B;QACzC,iBAAiB,EAAE,WAAW;QAC9B,UAAU,EAAE,wC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I,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,+BAA+B,MAAM,GAAG,CAAC,CAAC;QAClF,CAAC;QACD,IAAI,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CACb,iBAAiB,KAAK,wCAAwC,eAAe,GAAG,CACjF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,oCAAoC,CAAC,+BAA+B,EAAE,+BAAuB,CAAC,CAAC;AAElF,QAAA,2BAA2B,GAAwC,MAAM,CAAC,MAAM,CAC3F,+BAA+B,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAC5D,CAAC;AAEF,SAAgB,+BAA+B;IAC7C,OAAO,mCAA2B,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAChE,CAAC;AAFD,0EAEC;AAED,SAAgB,yBAAyB,CAAC,EAAU;IAClD,MAAM,UAAU,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC3C,OAAO,+BAAuB,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;AAC3D,CAAC;AAHD,8DAGC"}
1
+ {"version":3,"file":"provider-preset-catalog.js","sourceRoot":"","sources":["../../src/shared/provider-preset-catalog.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKU,QAAA,mBAAmB,GAAG;IACjC,YAAY;IACZ,qBAAqB;IACrB,aAAa;IACb,QAAQ;IACR,UAAU;IACV,WAAW;IACX,KAAK;IACL,IAAI;IACJ,SAAS;IACT,IAAI;IACJ,UAAU;IACV,MAAM;IACN,cAAc;IACd,QAAQ;CACA,CAAC;AA0BE,QAAA,mBAAmB,GAAG,8BAA8B,CAAC;AAElE;;;GAGG;AACU,QAAA,uBAAuB,GAA+C,MAAM,CAAC,MAAM,CAAC;IAC/F,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,IAA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}from"./tanstack-bhJxV1h8.js";import{T as Pe,a as Ae,b as te,c as De,d as _e,e as Te}from"./table-BP6nBZzg.js";import{a as P,Y as z,ah as de,ai as ue,aj as xe,ak as me,al as he,L as S,I as V,x as _,aD as Se,d as b,B as A,C as O,b as R,e as Ge,f as Me,g as Oe,n as Re,j as I,k as q,_ as Q}from"./index-BRtgic66.js";import{A as ze,a as $e,b as Fe,c as Le,d as Ke,e as He,f as Ie,g as qe}from"./alert-dialog-C6npAhT0.js";import{t as k}from"./notifications-B4_o8bcr.js";import{b1 as W,b2 as E,b3 as pe,aH as ge,_ as fe,b4 as Ee,b5 as Ue,m as Y,at as Be,Q as Qe,a6 as U,T as J,x as Ze,$ as Xe,o as se,U as Ve,a9 as ae,Z as ne}from"./icons-DQFHtVq5.js";import{C as re}from"./checkbox-BLRznRTO.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./code-highlight-D4E79GKQ.js";function Z(a){return Array.from(a).sort((c,t)=>c.localeCompare(t))}function We(a){const c=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const p=n.context_group||"default",m=c.get(p)??{group:p,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),c.set(p,m)}const t=Array.from(c.values()).sort((n,p)=>n.group.localeCompare(p.group)),o=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const p=n.context_group||"default",m=c.get(p),y=Math.max((m?.sharedCount??1)-1,0),x=Math.max((m?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:y,sameGroupDeeperPeerCount:x}}),s=o.filter(n=>n.context_mode==="shared").length,u=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,l=o.filter(n=>n.context_inferred).length,h=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:o,sharedCount:s,sharedStandardCount:Math.max(s-u,0),deeperSharedCount:u,isolatedCount:o.length-s,legacyContextCount:l,legacyContinuityCount:h,sharedAloneCount:o.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function Ye(){return Ce({queryKey:["accounts"],queryFn:()=>z.accounts.list(),select:a=>{const c=a.accounts.filter(u=>u.type!=="cliproxy"),t=We(c),o=a.accounts.length-c.length,s=t.accounts.some(u=>u.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:o,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:a.plain_ccs_lane??null}}})}function Je(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.setDefault(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountSet",{name:o}))},onError:t=>{k.error(t.message)}})}function et(){const a=$(),{t:c}=P();return F({mutationFn:()=>z.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountReset"))},onError:t=>{k.error(t.message)}})}function tt(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.delete(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.accountDeleted",{name:o}))},onError:t=>{k.error(t.message)}})}function be(){const a=$(),{t:c}=P();return F({mutationFn:({name:t,context_mode:o,context_group:s,continuity_mode:u})=>z.accounts.updateContext(t,{context_mode:o,context_group:s,continuity_mode:u}),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]});const s=(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-"),u=o.context_mode==="shared"?o.continuity_mode==="deeper"?`${c("accountsPage.sharedDeeper")} (${s})`:`${c("accountsPage.sharedStandard")} (${s})`:c("accountsPage.isolated");k.success(c("toasts.contextUpdated",{name:o.name,summary:u}))},onError:t=>{k.error(t.message)}})}function st(){const a=$(),{t:c}=P();return F({mutationFn:async t=>{const o=t.filter(l=>l.context_inferred||l.continuity_inferred),u=(await Promise.allSettled(o.map(l=>{const h=l.context_mode==="shared";return z.accounts.updateContext(l.name,{context_mode:h?"shared":"isolated",context_group:h?l.context_group||"default":void 0,continuity_mode:h?l.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(l=>l.status==="rejected").length;return{updatedCount:o.length-u,failedCount:u}},onSuccess:({updatedCount:t,failedCount:o})=>{if(a.invalidateQueries({queryKey:["accounts"]}),o>0&&t>0){k.error(c("toasts.legacyConfirmPartial",{updated:t,failed:o}));return}if(o>0){k.error(c("toasts.legacyConfirmAllFailed",{failed:o}));return}if(t>0){k.success(c("toasts.legacyConfirmSuccess",{count:t}));return}k.info(c("toasts.noLegacyAccounts"))},onError:t=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(t.message)}})}const oe=64,at=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:a,groupSummaries:c,plainCcsLane:t,onClose:o}){const{t:s}=P(),u=be(),[l,h]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,p]=C.useState(a.context_group||"default"),[m,y]=C.useState(a.continuity_mode==="deeper"?"deeper":"standard"),x=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),i=C.useMemo(()=>c.find(g=>g.group===x),[c,x]),N=x.length>0&&x.length<=oe&&at.test(x),r=l==="isolated"||N,d=l==="shared"?Math.max((i?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===x?1:0),0):0,f=l==="shared"?Math.max((i?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===x?1:0),0):0,v=t?.account_name===a.name,j=!!t&&!v,G=`ccs auth default ${a.name}`,T=`ccs auth backup ${a.name}`,w=(g,K,M,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=M.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+M.length)%M.length;H(M[Ne])},L=t?t.kind==="native"?s("continuityOverview.lane.native"):t.kind==="account-default"?s("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?s("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?s("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",D=()=>{r&&u.mutate({name:a.name,context_mode:l,context_group:l==="shared"?x:void 0,continuity_mode:l==="shared"?m:void 0},{onSuccess:()=>{o()}})},B=g=>{g||o()};return e.jsx(de,{open:!0,onOpenChange:B,children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:s("editAccountContext.title")}),e.jsx(he,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="isolated",tabIndex:l==="isolated"?0:-1,onClick:()=>h("isolated"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="shared",tabIndex:l==="shared"?0:-1,onClick:()=>h("shared"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(l==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:g=>p(g.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="standard",tabIndex:m==="standard"?0:-1,onClick:()=>y("standard"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="deeper",tabIndex:m==="deeper"?0:-1,onClick:()=>y("deeper"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(pe,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(m==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),j&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:s("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s("continuityOverview.plainLaneDescription",{lane:L||"plain ccs",name:a.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:T}),e.jsx(_,{value:T,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:G}),e.jsx(_,{value:G,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${l==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[l==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[l==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group:x})})," ",d>0?s("editAccountContext.sameGroupPeerCount",{count:d}):s("editAccountContext.noSameGroupPeer")]}),m==="deeper"&&e.jsx("p",{children:f>0?s("editAccountContext.deeperReady",{count:f}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${l==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:o,disabled:u.isPending,children:s("editAccountContext.cancel")}),e.jsx(b,{onClick:D,disabled:!r||u.isPending,children:u.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function ce({data:a,defaultAccount:c,groupSummaries:t,plainCcsLane:o}){const{t:s}=P(),u=Je(),l=tt(),h=et(),n=be(),[p,m]=C.useState(null),[y,x]=C.useState(null),i=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:r.original.name}),r.original.name===c&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:s("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:s("accountsTable.type"),size:100,cell:({row:r})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:r.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:r})=>{const d=new Date(r.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:r})=>{if(!r.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(r.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:r})=>{if(r.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((r.original.context_mode||"isolated")==="shared"){const f=r.original.context_group||"default",v=r.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(A,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:s(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:f})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:r.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:r.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return r.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(A,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:s("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(A,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:s("accountsTable.badges.isolated")})})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:r})=>{const d=r.original.name===c,f=u.isPending||l.isPending||n.isPending,v=r.original.type==="cliproxy",j=r.original.context_inferred||r.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(b,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:f,onClick:()=>x(r.original),title:s("accountsTable.syncTitle"),children:[e.jsx(Ee,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!v&&j&&e.jsxs(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:f,onClick:()=>n.mutate({name:r.original.name,context_mode:r.original.context_mode==="shared"?"shared":"isolated",context_group:r.original.context_mode==="shared"?r.original.context_group||"default":void 0,continuity_mode:r.original.context_mode==="shared"?r.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(b,{variant:d?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:d||f,onClick:()=>u.mutate(r.original.name),children:[e.jsx(Y,{className:`w-3 h-3 mr-1 ${d?"opacity-50":""}`}),s(d?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:d||f,onClick:()=>m(r.original.name),title:s(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:a,columns:i,getCoreRowModel:we()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(r=>e.jsx(te,{children:r.headers.map(d=>{const f={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[d.id]||"w-auto";return e.jsx(De,{className:f,children:d.isPlaceholder?null:ee(d.column.columnDef.header,d.getContext())},d.id)})},r.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(r=>e.jsx(te,{children:r.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},r.id))})]})}),c&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:o,onClose:()=>x(null)}),e.jsx(ze,{open:!!p,onOpenChange:r=>!r&&m(null),children:e.jsxs($e,{children:[e.jsxs(Fe,{children:[e.jsx(Le,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ke,{children:s("accountsTable.deleteDialogDesc",{name:p??""})})]}),e.jsxs(He,{children:[e.jsx(Ie,{children:s("accountsTable.cancel")}),e.jsx(qe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{p&&(l.mutate(p),m(null))},children:s("accountsTable.delete")})]})]})})]})}const X=({titleKey:a,descKey:c})=>{const{t}=P();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Oe,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(c)})]})]})};function le({totalAccounts:a,primaryAccountName:c,isolatedCount:t,sharedStandardCount:o,deeperSharedCount:s,sharedAloneCount:u,sharedPeerAccountCount:l,deeperReadyAccountCount:h,sharedPeerGroups:n,deeperReadyGroups:p,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:i}=P(),N=x?x.kind==="native"?i("continuityOverview.lane.native"):x.kind==="account-default"?i("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?i("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?i("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",r=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":p.length===0?"shared-standard":t>0||u>0||h<l||p.length<n.length?"partial":"ready",d=p[0]||n[0]||"default",f=p.length>0&&(t>0||o>0||n.length>p.length),j={ready:e.jsx(Ze,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(E,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(ge,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[r],G=!!c&&x?.account_name===c,T=a>0&&!!x&&(!c||!G),w=a>1&&r!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(O,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(R,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:j}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:i(`continuityReadiness.messages.${r}.title`,{group:d})}),e.jsx(A,{variant:r==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:i(`continuityReadiness.state.${r}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:i(`continuityReadiness.messages.${r}.description`,{group:d,count:u})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(A,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:i("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(A,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:i("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&p.length===0&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.partialBadge",{group:d})})]})]})}),(T||w)&&e.jsx(O,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[T&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),c?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${c}`}),e.jsx(_,{value:`ccs auth default ${c}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:i("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:i("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:i("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:i("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:i("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:i("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:i("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:o})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:i("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const ie=64;function rt({open:a,onClose:c}){const{t}=P(),[o,s]=C.useState(""),[u,l]=C.useState(!1),[h,n]=C.useState(""),[p,m]=C.useState(!1),[y,x]=C.useState(!1),i=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),N=h.trim().toLowerCase().replace(/\s+/g,"-"),r=N.length===0||N.length<=ie&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=o&&i?[`ccs auth create ${o}`,u?N.length>0?`--context-group ${N}`:"--share-context":"",u&&p?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!i||u&&!r||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{s(""),l(!1),n(""),m(!1),x(!1),c()};return e.jsx(de,{open:a,onOpenChange:j=>!j&&v(),children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:t("createAuthProfileDialog.title")}),e.jsx(he,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:o,onChange:j=>s(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),o&&!i&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:u,onCheckedChange:j=>l(j===!0)}),e.jsx(S,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),u&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(S,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:h,onChange:j=>n(j.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(re,{id:"deeper-continuity",checked:p,onCheckedChange:j=>m(j===!0)}),e.jsx(S,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),h.trim().length>0&&!r&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ie})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!i||u&&!r,children:y?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!i||u&&!r,children:y?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function bt(){const{t:a}=P(),c=ve(),{data:t,isLoading:o}=Ye(),s=st(),[u,l]=C.useState(!1),h=t?.accounts||[],n=t?.cliproxyCount||0,p=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,i=t?.deeperSharedCount||0,N=t?.isolatedCount||0,r=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],G=t?.sharedGroups||[],T=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=h.filter(H=>H.context_inferred||H.continuity_inferred),D=L.length,B=D>0,g=()=>c("/cliproxy?provider=claude"),K=()=>c("/cliproxy?provider=claude&action=auth"),M=()=>s.mutate(L);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:a("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.manageSuffix")]})]}),e.jsx(Re,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[p>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:p})}),m>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:m})})]})]}),e.jsx(b,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(O,{children:[e.jsxs(I,{className:"pb-2",children:[e.jsx(q,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(Q,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --context-group sprint-a --deeper-continuity"}),e.jsx(_,{value:"ccs auth create work --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(_,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(A,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{className:"flex flex-col",children:[e.jsxs(I,{className:"pb-3",children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(Q,{children:a("accountsPage.sharedTotalDesc",{count:y})})]}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(O,{children:[e.jsxs(I,{children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(Q,{children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.mobileManageSuffix")]})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs(b,{className:"w-full",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[a("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}),e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]}),e.jsx(rt,{open:u,onClose:()=>l(!1)})]})}export{bt as AccountsPage};
1
+ import{j as e}from"./radix-ui-nu4wz29m.js";import{r as C,e as ve}from"./react-vendor-Bjx91N7w.js";import{u as Ce,a as $,b as F,e as ke,f as ee,g as we}from"./tanstack-bhJxV1h8.js";import{T as Pe,a as Ae,b as te,c as De,d as _e,e as Te}from"./table-cBvaa4dp.js";import{a as P,Y as z,ah as de,ai as ue,aj as xe,ak as me,al as he,L as S,I as V,x as _,aD as Se,d as b,B as A,C as O,b as R,e as Ge,f as Me,g as Oe,n as Re,j as I,k as q,_ as Q}from"./index-DinHmYv0.js";import{A as ze,a as $e,b as Fe,c as Le,d as Ke,e as He,f as Ie,g as qe}from"./alert-dialog-hGKLLafj.js";import{t as k}from"./notifications-B4_o8bcr.js";import{b1 as W,b2 as E,b3 as pe,aH as ge,_ as fe,b4 as Ee,b5 as Ue,m as Y,at as Be,Q as Qe,a6 as U,T as J,x as Ze,$ as Xe,o as se,U as Ve,a9 as ae,Z as ne}from"./icons-DQFHtVq5.js";import{C as re}from"./checkbox-CvFR8Vac.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./code-highlight-D4E79GKQ.js";function Z(a){return Array.from(a).sort((c,t)=>c.localeCompare(t))}function We(a){const c=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const p=n.context_group||"default",m=c.get(p)??{group:p,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),c.set(p,m)}const t=Array.from(c.values()).sort((n,p)=>n.group.localeCompare(p.group)),o=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const p=n.context_group||"default",m=c.get(p),y=Math.max((m?.sharedCount??1)-1,0),x=Math.max((m?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:y,sameGroupDeeperPeerCount:x}}),s=o.filter(n=>n.context_mode==="shared").length,u=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,l=o.filter(n=>n.context_inferred).length,h=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:o,sharedCount:s,sharedStandardCount:Math.max(s-u,0),deeperSharedCount:u,isolatedCount:o.length-s,legacyContextCount:l,legacyContinuityCount:h,sharedAloneCount:o.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function Ye(){return Ce({queryKey:["accounts"],queryFn:()=>z.accounts.list(),select:a=>{const c=a.accounts.filter(u=>u.type!=="cliproxy"),t=We(c),o=a.accounts.length-c.length,s=t.accounts.some(u=>u.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:o,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:a.plain_ccs_lane??null}}})}function Je(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.setDefault(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountSet",{name:o}))},onError:t=>{k.error(t.message)}})}function et(){const a=$(),{t:c}=P();return F({mutationFn:()=>z.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountReset"))},onError:t=>{k.error(t.message)}})}function tt(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.delete(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.accountDeleted",{name:o}))},onError:t=>{k.error(t.message)}})}function be(){const a=$(),{t:c}=P();return F({mutationFn:({name:t,context_mode:o,context_group:s,continuity_mode:u})=>z.accounts.updateContext(t,{context_mode:o,context_group:s,continuity_mode:u}),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]});const s=(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-"),u=o.context_mode==="shared"?o.continuity_mode==="deeper"?`${c("accountsPage.sharedDeeper")} (${s})`:`${c("accountsPage.sharedStandard")} (${s})`:c("accountsPage.isolated");k.success(c("toasts.contextUpdated",{name:o.name,summary:u}))},onError:t=>{k.error(t.message)}})}function st(){const a=$(),{t:c}=P();return F({mutationFn:async t=>{const o=t.filter(l=>l.context_inferred||l.continuity_inferred),u=(await Promise.allSettled(o.map(l=>{const h=l.context_mode==="shared";return z.accounts.updateContext(l.name,{context_mode:h?"shared":"isolated",context_group:h?l.context_group||"default":void 0,continuity_mode:h?l.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(l=>l.status==="rejected").length;return{updatedCount:o.length-u,failedCount:u}},onSuccess:({updatedCount:t,failedCount:o})=>{if(a.invalidateQueries({queryKey:["accounts"]}),o>0&&t>0){k.error(c("toasts.legacyConfirmPartial",{updated:t,failed:o}));return}if(o>0){k.error(c("toasts.legacyConfirmAllFailed",{failed:o}));return}if(t>0){k.success(c("toasts.legacyConfirmSuccess",{count:t}));return}k.info(c("toasts.noLegacyAccounts"))},onError:t=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(t.message)}})}const oe=64,at=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:a,groupSummaries:c,plainCcsLane:t,onClose:o}){const{t:s}=P(),u=be(),[l,h]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,p]=C.useState(a.context_group||"default"),[m,y]=C.useState(a.continuity_mode==="deeper"?"deeper":"standard"),x=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),i=C.useMemo(()=>c.find(g=>g.group===x),[c,x]),N=x.length>0&&x.length<=oe&&at.test(x),r=l==="isolated"||N,d=l==="shared"?Math.max((i?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===x?1:0),0):0,f=l==="shared"?Math.max((i?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===x?1:0),0):0,v=t?.account_name===a.name,j=!!t&&!v,G=`ccs auth default ${a.name}`,T=`ccs auth backup ${a.name}`,w=(g,K,M,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=M.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+M.length)%M.length;H(M[Ne])},L=t?t.kind==="native"?s("continuityOverview.lane.native"):t.kind==="account-default"?s("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?s("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?s("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",D=()=>{r&&u.mutate({name:a.name,context_mode:l,context_group:l==="shared"?x:void 0,continuity_mode:l==="shared"?m:void 0},{onSuccess:()=>{o()}})},B=g=>{g||o()};return e.jsx(de,{open:!0,onOpenChange:B,children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:s("editAccountContext.title")}),e.jsx(he,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="isolated",tabIndex:l==="isolated"?0:-1,onClick:()=>h("isolated"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="shared",tabIndex:l==="shared"?0:-1,onClick:()=>h("shared"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(l==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:g=>p(g.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="standard",tabIndex:m==="standard"?0:-1,onClick:()=>y("standard"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="deeper",tabIndex:m==="deeper"?0:-1,onClick:()=>y("deeper"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(pe,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(m==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),j&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:s("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s("continuityOverview.plainLaneDescription",{lane:L||"plain ccs",name:a.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:T}),e.jsx(_,{value:T,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:G}),e.jsx(_,{value:G,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${l==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[l==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[l==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group:x})})," ",d>0?s("editAccountContext.sameGroupPeerCount",{count:d}):s("editAccountContext.noSameGroupPeer")]}),m==="deeper"&&e.jsx("p",{children:f>0?s("editAccountContext.deeperReady",{count:f}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${l==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:o,disabled:u.isPending,children:s("editAccountContext.cancel")}),e.jsx(b,{onClick:D,disabled:!r||u.isPending,children:u.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function ce({data:a,defaultAccount:c,groupSummaries:t,plainCcsLane:o}){const{t:s}=P(),u=Je(),l=tt(),h=et(),n=be(),[p,m]=C.useState(null),[y,x]=C.useState(null),i=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:r.original.name}),r.original.name===c&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:s("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:s("accountsTable.type"),size:100,cell:({row:r})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:r.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:r})=>{const d=new Date(r.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:r})=>{if(!r.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(r.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:r})=>{if(r.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((r.original.context_mode||"isolated")==="shared"){const f=r.original.context_group||"default",v=r.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(A,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:s(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:f})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:r.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:r.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return r.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(A,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:s("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(A,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:s("accountsTable.badges.isolated")})})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:r})=>{const d=r.original.name===c,f=u.isPending||l.isPending||n.isPending,v=r.original.type==="cliproxy",j=r.original.context_inferred||r.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(b,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:f,onClick:()=>x(r.original),title:s("accountsTable.syncTitle"),children:[e.jsx(Ee,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!v&&j&&e.jsxs(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:f,onClick:()=>n.mutate({name:r.original.name,context_mode:r.original.context_mode==="shared"?"shared":"isolated",context_group:r.original.context_mode==="shared"?r.original.context_group||"default":void 0,continuity_mode:r.original.context_mode==="shared"?r.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(b,{variant:d?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:d||f,onClick:()=>u.mutate(r.original.name),children:[e.jsx(Y,{className:`w-3 h-3 mr-1 ${d?"opacity-50":""}`}),s(d?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:d||f,onClick:()=>m(r.original.name),title:s(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:a,columns:i,getCoreRowModel:we()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(r=>e.jsx(te,{children:r.headers.map(d=>{const f={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[d.id]||"w-auto";return e.jsx(De,{className:f,children:d.isPlaceholder?null:ee(d.column.columnDef.header,d.getContext())},d.id)})},r.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(r=>e.jsx(te,{children:r.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},r.id))})]})}),c&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:o,onClose:()=>x(null)}),e.jsx(ze,{open:!!p,onOpenChange:r=>!r&&m(null),children:e.jsxs($e,{children:[e.jsxs(Fe,{children:[e.jsx(Le,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ke,{children:s("accountsTable.deleteDialogDesc",{name:p??""})})]}),e.jsxs(He,{children:[e.jsx(Ie,{children:s("accountsTable.cancel")}),e.jsx(qe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{p&&(l.mutate(p),m(null))},children:s("accountsTable.delete")})]})]})})]})}const X=({titleKey:a,descKey:c})=>{const{t}=P();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Oe,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(c)})]})]})};function le({totalAccounts:a,primaryAccountName:c,isolatedCount:t,sharedStandardCount:o,deeperSharedCount:s,sharedAloneCount:u,sharedPeerAccountCount:l,deeperReadyAccountCount:h,sharedPeerGroups:n,deeperReadyGroups:p,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:i}=P(),N=x?x.kind==="native"?i("continuityOverview.lane.native"):x.kind==="account-default"?i("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?i("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?i("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",r=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":p.length===0?"shared-standard":t>0||u>0||h<l||p.length<n.length?"partial":"ready",d=p[0]||n[0]||"default",f=p.length>0&&(t>0||o>0||n.length>p.length),j={ready:e.jsx(Ze,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(E,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(ge,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[r],G=!!c&&x?.account_name===c,T=a>0&&!!x&&(!c||!G),w=a>1&&r!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(O,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(R,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:j}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:i(`continuityReadiness.messages.${r}.title`,{group:d})}),e.jsx(A,{variant:r==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:i(`continuityReadiness.state.${r}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:i(`continuityReadiness.messages.${r}.description`,{group:d,count:u})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(A,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:i("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(A,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:i("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&p.length===0&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.partialBadge",{group:d})})]})]})}),(T||w)&&e.jsx(O,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[T&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),c?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${c}`}),e.jsx(_,{value:`ccs auth default ${c}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:i("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:i("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:i("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:i("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:i("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:i("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:i("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:o})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:i("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const ie=64;function rt({open:a,onClose:c}){const{t}=P(),[o,s]=C.useState(""),[u,l]=C.useState(!1),[h,n]=C.useState(""),[p,m]=C.useState(!1),[y,x]=C.useState(!1),i=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),N=h.trim().toLowerCase().replace(/\s+/g,"-"),r=N.length===0||N.length<=ie&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=o&&i?[`ccs auth create ${o}`,u?N.length>0?`--context-group ${N}`:"--share-context":"",u&&p?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!i||u&&!r||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{s(""),l(!1),n(""),m(!1),x(!1),c()};return e.jsx(de,{open:a,onOpenChange:j=>!j&&v(),children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:t("createAuthProfileDialog.title")}),e.jsx(he,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:o,onChange:j=>s(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),o&&!i&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:u,onCheckedChange:j=>l(j===!0)}),e.jsx(S,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),u&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(S,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:h,onChange:j=>n(j.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(re,{id:"deeper-continuity",checked:p,onCheckedChange:j=>m(j===!0)}),e.jsx(S,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),h.trim().length>0&&!r&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ie})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!i||u&&!r,children:y?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!i||u&&!r,children:y?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function bt(){const{t:a}=P(),c=ve(),{data:t,isLoading:o}=Ye(),s=st(),[u,l]=C.useState(!1),h=t?.accounts||[],n=t?.cliproxyCount||0,p=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,i=t?.deeperSharedCount||0,N=t?.isolatedCount||0,r=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],G=t?.sharedGroups||[],T=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=h.filter(H=>H.context_inferred||H.continuity_inferred),D=L.length,B=D>0,g=()=>c("/cliproxy?provider=claude"),K=()=>c("/cliproxy?provider=claude&action=auth"),M=()=>s.mutate(L);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:a("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.manageSuffix")]})]}),e.jsx(Re,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[p>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:p})}),m>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:m})})]})]}),e.jsx(b,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(O,{children:[e.jsxs(I,{className:"pb-2",children:[e.jsx(q,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(Q,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --context-group sprint-a --deeper-continuity"}),e.jsx(_,{value:"ccs auth create work --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(_,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(A,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{className:"flex flex-col",children:[e.jsxs(I,{className:"pb-3",children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(Q,{children:a("accountsPage.sharedTotalDesc",{count:y})})]}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(O,{children:[e.jsxs(I,{children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(Q,{children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.mobileManageSuffix")]})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs(b,{className:"w-full",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[a("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}),e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]}),e.jsx(rt,{open:u,onClose:()=>l(!1)})]})}export{bt as AccountsPage};
@@ -1 +1 @@
1
- import{j as e,a3 as s,a4 as r,a5 as n,a6 as i,a7 as d,a8 as c,a9 as u,aa as f}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as o,bY as l}from"./index-BRtgic66.js";function A({...a}){return e.jsx(s,{"data-slot":"alert-dialog",...a})}function g({...a}){return e.jsx(u,{"data-slot":"alert-dialog-portal",...a})}function m({className:a,...t}){return e.jsx(f,{"data-slot":"alert-dialog-overlay",className:o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...t})}function D({className:a,...t}){return e.jsxs(g,{children:[e.jsx(m,{}),e.jsx(r,{"data-slot":"alert-dialog-content",className:o("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...t})]})}function b({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:o("flex flex-col gap-2 text-center sm:text-left",a),...t})}function N({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...t})}function v({className:a,...t}){return e.jsx(n,{"data-slot":"alert-dialog-title",className:o("text-lg font-semibold",a),...t})}function w({className:a,...t}){return e.jsx(i,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground text-sm",a),...t})}function y({className:a,...t}){return e.jsx(c,{className:o(l(),a),...t})}function z({className:a,...t}){return e.jsx(d,{className:o(l({variant:"outline"}),a),...t})}export{A,D as a,b,v as c,w as d,N as e,z as f,y as g};
1
+ import{j as e,a3 as s,a4 as r,a5 as n,a6 as i,a7 as d,a8 as c,a9 as u,aa as f}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as o,bY as l}from"./index-DinHmYv0.js";function A({...a}){return e.jsx(s,{"data-slot":"alert-dialog",...a})}function g({...a}){return e.jsx(u,{"data-slot":"alert-dialog-portal",...a})}function m({className:a,...t}){return e.jsx(f,{"data-slot":"alert-dialog-overlay",className:o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...t})}function D({className:a,...t}){return e.jsxs(g,{children:[e.jsx(m,{}),e.jsx(r,{"data-slot":"alert-dialog-content",className:o("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...t})]})}function b({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:o("flex flex-col gap-2 text-center sm:text-left",a),...t})}function N({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...t})}function v({className:a,...t}){return e.jsx(n,{"data-slot":"alert-dialog-title",className:o("text-lg font-semibold",a),...t})}function w({className:a,...t}){return e.jsx(i,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground text-sm",a),...t})}function y({className:a,...t}){return e.jsx(c,{className:o(l(),a),...t})}function z({className:a,...t}){return e.jsx(d,{className:o(l({variant:"outline"}),a),...t})}export{A,D as a,b,v as c,w as d,N as e,z as f,y as g};