pi-roundtable-web 0.29.1 → 0.30.0

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 (219) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +3 -3
  3. package/dist/chunk-account-51nmc9g6.js +1 -0
  4. package/dist/{chunk-action-menu-ap5xn7bf.js → chunk-action-menu-mxcvx4a1.js} +1 -1
  5. package/dist/chunk-agent-x53f7c2h.js +1 -0
  6. package/dist/chunk-arranged-rooms-1w3zqdtt.js +1 -0
  7. package/dist/{chunk-attachments-p5v9gqyt.js → chunk-attachments-qbv5ar62.js} +2 -2
  8. package/dist/chunk-bulk-actions-aktwxqc9.js +1 -0
  9. package/dist/{chunk-character-creator-m7tw20ef.js → chunk-character-creator-1mfybhjz.js} +2 -2
  10. package/dist/chunk-codeeditor-y2emmmr0.js +2 -0
  11. package/dist/chunk-command-menu-sj2kfe4d.js +59 -0
  12. package/dist/chunk-confirm-ex5kc1st.js +1 -0
  13. package/dist/{chunk-connectors-tw0tbm21.js → chunk-connectors-1nmm8yc3.js} +2 -2
  14. package/dist/chunk-conversations-ec3aqjxs.js +1 -0
  15. package/dist/chunk-council-sheet-hdsg3fes.js +2 -0
  16. package/dist/chunk-council-view-sba8fs4c.js +1 -0
  17. package/dist/{chunk-drag-d1bpy8w6.js → chunk-drag-pkghf4ts.js} +1 -1
  18. package/dist/chunk-entry-e24gjxtd.js +1 -0
  19. package/dist/chunk-folder-list-kghgyc0x.js +1 -0
  20. package/dist/chunk-folds-crd9k375.js +1 -0
  21. package/dist/{chunk-gate-dt91egcd.js → chunk-gate-xay9vedw.js} +1 -1
  22. package/dist/chunk-host-icons-y9hd1qqd.js +1 -0
  23. package/dist/chunk-host-picture-k16n5wm3.js +1 -0
  24. package/dist/chunk-host-state-1mbsrmhk.js +1 -0
  25. package/dist/chunk-host-ui-4pymhn6v.js +1 -0
  26. package/dist/{chunk-index-cmzvq3nf.js → chunk-index-0dyf2gdm.js} +2 -2
  27. package/dist/chunk-index-0xdptr30.js +2 -0
  28. package/dist/chunk-index-14cxgacv.js +2 -0
  29. package/dist/{chunk-index-vpq2cj14.js → chunk-index-37g8ggry.js} +1 -1
  30. package/dist/chunk-index-39gw0qhr.js +2 -0
  31. package/dist/chunk-index-4p45h04z.js +2 -0
  32. package/dist/chunk-index-5e8wn6r3.js +2 -0
  33. package/dist/{chunk-index-55ps4x5n.js → chunk-index-65p4hfkr.js} +2 -2
  34. package/dist/{chunk-index-1kb8tv4v.js → chunk-index-6e9nmad3.js} +2 -2
  35. package/dist/chunk-index-6f4qvp5p.js +2 -0
  36. package/dist/{chunk-index-8pbwr3rs.js → chunk-index-6hy2fabj.js} +1 -1
  37. package/dist/{chunk-index-6s2pqwna.js → chunk-index-6j75embz.js} +2 -2
  38. package/dist/{chunk-index-8wpvj7k5.js → chunk-index-70pq2k7q.js} +2 -2
  39. package/dist/{chunk-index-4a1tdadd.js → chunk-index-726w3145.js} +3 -3
  40. package/dist/chunk-index-86x6b7dx.js +3 -0
  41. package/dist/chunk-index-8cxmgzhy.js +2 -0
  42. package/dist/{chunk-index-prq011b6.js → chunk-index-93dr9fh8.js} +1 -1
  43. package/dist/chunk-index-97238pp8.js +2 -0
  44. package/dist/{chunk-index-q4k9vk04.js → chunk-index-ads1abh1.js} +3 -3
  45. package/dist/{chunk-index-ffnd0jcj.js → chunk-index-awc03q99.js} +2 -2
  46. package/dist/chunk-index-bh6m0bpm.js +2 -0
  47. package/dist/chunk-index-br1wechm.js +2 -0
  48. package/dist/{chunk-index-ysv36nbk.js → chunk-index-c8vsw9h8.js} +2 -2
  49. package/dist/{chunk-index-v9jqyr1f.js → chunk-index-cd0ymvtj.js} +3 -3
  50. package/dist/{chunk-index-5j1v2q7w.js → chunk-index-e3encn5p.js} +1 -1
  51. package/dist/{chunk-index-d941ae7c.js → chunk-index-fw6kawhw.js} +2 -2
  52. package/dist/{chunk-index-6rdywten.js → chunk-index-g3f1sdw0.js} +2 -2
  53. package/dist/{chunk-index-6btdp13p.js → chunk-index-gae833v6.js} +1 -1
  54. package/dist/{chunk-index-cfesmk1f.js → chunk-index-gc30hm37.js} +2 -2
  55. package/dist/{chunk-index-ce7hsda9.js → chunk-index-gpaychmm.js} +2 -2
  56. package/dist/chunk-index-hk6aq03d.js +2 -0
  57. package/dist/chunk-index-k3hj2310.js +2 -0
  58. package/dist/chunk-index-maf6wr1b.js +2 -0
  59. package/dist/{chunk-index-en728705.js → chunk-index-mhb8mpg3.js} +2 -2
  60. package/dist/chunk-index-n92zea3s.js +2 -0
  61. package/dist/{chunk-index-53fwc7sc.js → chunk-index-ndhwytvz.js} +2 -2
  62. package/dist/{chunk-index-gdh7wsd5.js → chunk-index-ne8v2rxx.js} +12 -12
  63. package/dist/{chunk-index-2g8xtwqg.js → chunk-index-p4rc9swx.js} +2 -2
  64. package/dist/chunk-index-pce4byw4.js +2 -0
  65. package/dist/{chunk-index-d4mx2vvf.js → chunk-index-ptvrkv0r.js} +2 -2
  66. package/dist/{chunk-index-0h99xcs3.js → chunk-index-pz6926p5.js} +2 -2
  67. package/dist/{chunk-index-bxf8eq1s.js → chunk-index-qb41kkt3.js} +2 -2
  68. package/dist/chunk-index-qqaaxh63.js +2 -0
  69. package/dist/chunk-index-qwztcbjz.js +2 -0
  70. package/dist/chunk-index-r1g24er0.js +2 -0
  71. package/dist/chunk-index-rvatmx8s.js +50 -0
  72. package/dist/{chunk-index-nr275sa7.js → chunk-index-tfgd7vr5.js} +2 -2
  73. package/dist/{chunk-index-xbj816p0.js → chunk-index-tqrjr37v.js} +2 -2
  74. package/dist/chunk-index-tvsvtd4q.js +2 -0
  75. package/dist/chunk-index-vaxytvde.js +2 -0
  76. package/dist/{chunk-index-3tksdmx7.js → chunk-index-ve07gdef.js} +2 -2
  77. package/dist/chunk-index-vw592m3p.js +2 -0
  78. package/dist/{chunk-index-sz381vda.js → chunk-index-vwd5drzh.js} +100 -4
  79. package/dist/{chunk-index-w17wgjby.js → chunk-index-vxn4zws9.js} +3 -3
  80. package/dist/{chunk-index-yr758n6t.js → chunk-index-wqbcade7.js} +2 -2
  81. package/dist/chunk-index-x7p6k52w.js +138 -0
  82. package/dist/{chunk-index-m76gdwnk.js → chunk-index-xekytvrr.js} +2 -2
  83. package/dist/{chunk-index-wgrx2ybn.js → chunk-index-xkb336kq.js} +2 -2
  84. package/dist/{chunk-index-dr0jr7d3.js → chunk-index-xv3e4x0j.js} +3 -3
  85. package/dist/{chunk-index-7mrkq793.js → chunk-index-xvdna54d.js} +2 -2
  86. package/dist/chunk-index-yzd9cg0s.js +1 -0
  87. package/dist/{chunk-index-ze9p4npm.js → chunk-index-zr2qwzz4.js} +2 -2
  88. package/dist/chunk-lang-css-6t2q4xw4.js +1 -0
  89. package/dist/{chunk-lang-dockerfile-y24eejnh.js → chunk-lang-dockerfile-9rc0adjw.js} +1 -1
  90. package/dist/{chunk-lang-go-qzgv1161.js → chunk-lang-go-t47kg9n0.js} +2 -2
  91. package/dist/chunk-lang-html-c6p22v5m.js +1 -0
  92. package/dist/chunk-lang-javascript-m57t19pw.js +1 -0
  93. package/dist/{chunk-lang-json-99v80v88.js → chunk-lang-json-y33kawwg.js} +1 -1
  94. package/dist/{chunk-lang-markdown-gn8he877.js → chunk-lang-markdown-2c2sqc4z.js} +5 -5
  95. package/dist/{chunk-lang-python-prsw4p4k.js → chunk-lang-python-ymasvj52.js} +2 -2
  96. package/dist/{chunk-lang-rust-g6xqta16.js → chunk-lang-rust-qcg53mkn.js} +1 -1
  97. package/dist/{chunk-lang-shell-dmpnzc6w.js → chunk-lang-shell-996wb0dk.js} +1 -1
  98. package/dist/{chunk-lang-sql-wz7ca27b.js → chunk-lang-sql-60rh2y3y.js} +2 -2
  99. package/dist/{chunk-lang-toml-160prtq4.js → chunk-lang-toml-q1yzt70y.js} +1 -1
  100. package/dist/chunk-lang-typescript-7gcbrhbd.js +1 -0
  101. package/dist/{chunk-lang-xml-9htkz2dd.js → chunk-lang-xml-k2a92cm3.js} +1 -1
  102. package/dist/{chunk-lang-yaml-08749wd5.js → chunk-lang-yaml-qp3asq06.js} +1 -1
  103. package/dist/chunk-layout-actions-yxh77zcz.js +1 -0
  104. package/dist/chunk-mention-menu-qpksygcf.js +43 -0
  105. package/dist/chunk-menu-items-95evdhk1.js +1 -0
  106. package/dist/chunk-mode-toggle-dqwvcr2p.js +1 -0
  107. package/dist/{chunk-note-row-28e5x7n8.js → chunk-note-row-ngzxbdn6.js} +4 -4
  108. package/dist/chunk-notes-9ykcajzc.js +1 -0
  109. package/dist/chunk-notice-bell-eryn2k5m.js +1 -0
  110. package/dist/{chunk-notices-d0cwvk27.js → chunk-notices-jkv1derx.js} +1 -1
  111. package/dist/chunk-onboarding-ka11bgd0.js +1 -0
  112. package/dist/{chunk-overview-9sb3ywa8.js → chunk-overview-dgvrjwbc.js} +1 -1
  113. package/dist/{chunk-palette-5sfhrv4x.js → chunk-palette-wmvynt7n.js} +1 -1
  114. package/dist/chunk-placement-items-zyqq2mp7.js +1 -0
  115. package/dist/chunk-profile-sdn7bs08.js +1 -0
  116. package/dist/{chunk-prompt-history-1jz2gk3v.js → chunk-prompt-history-qfnj4w2y.js} +1 -1
  117. package/dist/chunk-prompts-4hdcvy6t.js +1 -0
  118. package/dist/chunk-room-confirms-b8gvak47.js +1 -0
  119. package/dist/chunk-room-menu-18mnqcja.js +1 -0
  120. package/dist/chunk-rooms-menu-button-hjg4zqjy.js +1 -0
  121. package/dist/{chunk-schedules-e12y8fw2.js → chunk-schedules-cy2dv8x0.js} +1 -1
  122. package/dist/{chunk-seat-menu-n2bcw0mf.js → chunk-seat-menu-cw3z9560.js} +1 -1
  123. package/dist/chunk-section-fold-9tc2m103.js +1 -0
  124. package/dist/chunk-settings-rhdv64p7.js +1 -0
  125. package/dist/chunk-sheet-hosts-hhs1e3a8.js +29 -0
  126. package/dist/chunk-shortcut-help-fv6b6ntc.js +26 -0
  127. package/dist/chunk-shortcuts-sjwrv858.js +1 -0
  128. package/dist/{chunk-skill-editor-98492yrt.js → chunk-skill-editor-zzmv9nfq.js} +2 -2
  129. package/dist/chunk-skills-b2enxk30.js +1 -0
  130. package/dist/{chunk-start-over-line-m526193z.js → chunk-start-over-line-4rwasr8k.js} +2 -2
  131. package/dist/chunk-switcher-list-dcq91xxa.js +1 -0
  132. package/dist/{chunk-tab-dot-tzjkahj5.js → chunk-tab-dot-b3gcgcrq.js} +1 -1
  133. package/dist/chunk-table-6j64ps89.js +1 -0
  134. package/dist/chunk-table2d-k4z439nt.js +1 -0
  135. package/dist/{chunk-table3d-5a7vbgyj.js → chunk-table3d-mx0afnv8.js} +23 -23
  136. package/dist/chunk-thread-actions-rs5xpf1r.js +1 -0
  137. package/dist/{chunk-thread-cards-n0n603vf.js → chunk-thread-cards-k9m7p5fn.js} +1 -1
  138. package/dist/{chunk-thread-list-7bkdn51x.js → chunk-thread-list-zz7596zy.js} +2 -2
  139. package/dist/chunk-transcript-8yjp18cr.js +1 -0
  140. package/dist/chunk-waiting-9gshhhx0.js +1 -0
  141. package/dist/{chunk-waiting-chip-y83c90v3.js → chunk-waiting-chip-nr9cza2j.js} +2 -2
  142. package/dist/chunk-where-8mq8azgw.js +1 -0
  143. package/dist/{chunk-workspace-dw71mshw.js → chunk-workspace-hdamnf4r.js} +2 -2
  144. package/dist/chunk-zh-tw-ama40y87.js +1 -0
  145. package/dist/index.html +1 -1
  146. package/dist/sw.js +1 -1
  147. package/package.json +3 -3
  148. package/src/api-types.ts +17 -0
  149. package/src/app/app.ts +3 -0
  150. package/src/app/command-routes.ts +45 -0
  151. package/src/app/routes.ts +13 -0
  152. package/src/i18n/zh-tw.ts +8 -1
  153. package/src/web-plugin.ts +2 -0
  154. package/dist/chunk-account-66e6ezdq.js +0 -1
  155. package/dist/chunk-agent-sapt5qhn.js +0 -1
  156. package/dist/chunk-arranged-rooms-n6bk696f.js +0 -1
  157. package/dist/chunk-bulk-actions-aze4ewc4.js +0 -1
  158. package/dist/chunk-codeeditor-yy6pq8mv.js +0 -2
  159. package/dist/chunk-confirm-0cajsfhk.js +0 -1
  160. package/dist/chunk-conversations-wkm23m5r.js +0 -1
  161. package/dist/chunk-council-sheet-mz7s23nq.js +0 -2
  162. package/dist/chunk-council-view-zgvzxtgn.js +0 -1
  163. package/dist/chunk-entry-7zr5b1fp.js +0 -1
  164. package/dist/chunk-folder-list-bs4eh3g9.js +0 -1
  165. package/dist/chunk-folds-eez1q41c.js +0 -1
  166. package/dist/chunk-host-icons-nfe2t8tk.js +0 -1
  167. package/dist/chunk-host-picture-4rtswxwa.js +0 -1
  168. package/dist/chunk-host-state-1vxzmmq6.js +0 -1
  169. package/dist/chunk-host-ui-x38bf0et.js +0 -1
  170. package/dist/chunk-index-24cggw6k.js +0 -50
  171. package/dist/chunk-index-3n38xe7m.js +0 -2
  172. package/dist/chunk-index-5w6tb7p0.js +0 -2
  173. package/dist/chunk-index-6m7dwsmv.js +0 -1
  174. package/dist/chunk-index-7xcbpeqz.js +0 -2
  175. package/dist/chunk-index-88wh5eyj.js +0 -2
  176. package/dist/chunk-index-97dcp1vh.js +0 -1
  177. package/dist/chunk-index-a7e6rhxy.js +0 -2
  178. package/dist/chunk-index-c8gm1crh.js +0 -120
  179. package/dist/chunk-index-d74tpnkd.js +0 -2
  180. package/dist/chunk-index-fb3kzyyp.js +0 -2
  181. package/dist/chunk-index-fn6305vn.js +0 -3
  182. package/dist/chunk-index-mr391t49.js +0 -2
  183. package/dist/chunk-index-n3khm9fq.js +0 -2
  184. package/dist/chunk-index-nn4w6a04.js +0 -2
  185. package/dist/chunk-index-pgxgq61x.js +0 -2
  186. package/dist/chunk-index-rgdaec7y.js +0 -2
  187. package/dist/chunk-index-rjs1can6.js +0 -2
  188. package/dist/chunk-index-s4a8e4qm.js +0 -2
  189. package/dist/chunk-index-vsaggfns.js +0 -2
  190. package/dist/chunk-index-wsv46y9p.js +0 -2
  191. package/dist/chunk-index-zfdvyrjt.js +0 -2
  192. package/dist/chunk-lang-css-3h22se37.js +0 -1
  193. package/dist/chunk-lang-html-9rvrmmpg.js +0 -1
  194. package/dist/chunk-lang-javascript-4kv8s3tk.js +0 -1
  195. package/dist/chunk-lang-typescript-mp0yw903.js +0 -1
  196. package/dist/chunk-layout-actions-tdx896xf.js +0 -1
  197. package/dist/chunk-menu-items-trhybv1g.js +0 -1
  198. package/dist/chunk-mode-toggle-4dtfphq4.js +0 -1
  199. package/dist/chunk-notes-5nkayhw8.js +0 -1
  200. package/dist/chunk-notice-bell-xz8a04am.js +0 -1
  201. package/dist/chunk-onboarding-zs4rtea9.js +0 -1
  202. package/dist/chunk-placement-items-e2neja55.js +0 -1
  203. package/dist/chunk-profile-jffhtpqf.js +0 -1
  204. package/dist/chunk-prompts-0t30ttd0.js +0 -1
  205. package/dist/chunk-room-confirms-6595921h.js +0 -1
  206. package/dist/chunk-room-menu-hwkjyxwe.js +0 -1
  207. package/dist/chunk-rooms-menu-button-k0eq1tcr.js +0 -1
  208. package/dist/chunk-sheet-hosts-myvm2vhd.js +0 -29
  209. package/dist/chunk-shortcut-help-434sqnxc.js +0 -26
  210. package/dist/chunk-shortcuts-mjxph0g7.js +0 -1
  211. package/dist/chunk-skills-mfv8ppfh.js +0 -1
  212. package/dist/chunk-switcher-list-5ngjar24.js +0 -1
  213. package/dist/chunk-table-xbtbex2z.js +0 -1
  214. package/dist/chunk-table2d-61bvrykm.js +0 -1
  215. package/dist/chunk-thread-actions-bf6vf2mt.js +0 -1
  216. package/dist/chunk-transcript-8ztrkt6g.js +0 -1
  217. package/dist/chunk-waiting-s273kcgz.js +0 -1
  218. package/dist/chunk-where-jr791gzj.js +0 -1
  219. package/dist/chunk-zh-tw-vm5d0w6j.js +0 -1
@@ -0,0 +1,138 @@
1
+ import{p,T,b,Qe,o,Se,C,jn,a,r,t,c,g,e,n,s,_e,x,X,u,P,Sn,Jn,lt,_,je,pr,kn,Nt,_n,Re,ct,ii,Tn,Oe,ye,ta,Rn,he,zt,et,tt,ia,vr,xr,Sr,En,$e,si,Be,ze,An,Mr,Rr}from"./chunk-index-rvatmx8s.js";import{bt}from"./chunk-index-qwztcbjz.js";import{He}from"./chunk-index-gpaychmm.js";import{me}from"./chunk-index-tfgd7vr5.js";import{On}from"./chunk-index-r1g24er0.js";import{A}from"./chunk-index-0dyf2gdm.js";import{B}from"./chunk-index-fw6kawhw.js";var Ne=(i)=>`roundtable-console:council-mode:${i}`,qe=(i)=>`rt-table-mode:${i}`,We="roundtable-console:table-mode",Ce=new Map,{emit:Pn,use:Dn}=P(),Ee=(i)=>i==="scene"||i==="chat"?i:void 0;function ve(i){try{return globalThis.localStorage?.getItem(i)??void 0}catch{return}}function Te(i,d){try{if(d===void 0)globalThis.localStorage?.removeItem(i);else globalThis.localStorage?.setItem(i,d)}catch{}}function Fn(i){let d=ve(qe(i)),m=d==="1"?"scene":d==="0"?"chat":void 0,f=m??Ee(ve(We))??"scene";if(m!==void 0||Ee(ve(We)))Te(Ne(i),f),Te(qe(i),void 0);return f}function In(i){let d=Ce.get(i);if(d!==void 0)return d;let m=Ee(ve(Ne(i)))??Fn(i);return Ce.set(i,m),m}function Kn(i,d){Ce.set(i,d),Te(Ne(i),d),Pn()}function Ye(i){return[Dn(()=>In(i)),(d)=>Kn(i,d)]}var $n=`
2
+ /* The box's fold button says what it does, in words beside its chevron. */
3
+ .scene-collapse {
4
+ width: auto;
5
+ flex: none;
6
+ gap: var(--space-1);
7
+ padding-inline: var(--space-2);
8
+ font-size: var(--text-xs);
9
+ }
10
+ .scene-collapse span {
11
+ white-space: nowrap;
12
+ }
13
+ /* Folded, the box is one bar: who speaks, the start of their newest line, and the button that opens it. */
14
+ .scene-bar {
15
+ display: flex;
16
+ align-items: center;
17
+ gap: var(--space-2);
18
+ min-height: var(--touch);
19
+ padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2);
20
+ cursor: pointer;
21
+ }
22
+ .scene-bar .scene-chip {
23
+ width: 2rem;
24
+ height: 2rem;
25
+ margin: 0;
26
+ border-width: 2px;
27
+ flex: none;
28
+ }
29
+ .scene-bar-name {
30
+ flex: 0 1 auto;
31
+ min-width: 3ch;
32
+ max-width: 35%;
33
+ overflow: hidden;
34
+ text-overflow: ellipsis;
35
+ white-space: nowrap;
36
+ }
37
+ .scene-bar-preview {
38
+ flex: 1 1 0;
39
+ min-width: 0;
40
+ overflow: hidden;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ color: var(--muted);
44
+ font-size: var(--text-sm);
45
+ }
46
+ .scene-bar-asking {
47
+ flex: none;
48
+ padding: 0 var(--space-2);
49
+ border-radius: var(--radius-full);
50
+ background: color-mix(in srgb, var(--accent) 16%, transparent);
51
+ font-size: var(--text-xs);
52
+ white-space: nowrap;
53
+ }
54
+ .scene-composer[hidden] {
55
+ display: none;
56
+ }
57
+
58
+ /* On a phone the tab's tools are narrow, but the fold button keeps its words. */
59
+ @media (max-width: 719px) {
60
+ .scene-tools .scene-collapse,
61
+ .scene-bar .scene-collapse {
62
+ width: auto;
63
+ min-width: 0;
64
+ padding-inline: var(--space-1);
65
+ }
66
+ }
67
+ /* Phones held upright: folded, the box is only its bar and the scene takes the rest. */
68
+ @media (max-width: 719px) and (orientation: portrait) {
69
+ .table-frame[data-focused][data-folded] {
70
+ grid-template-rows: minmax(0, 1fr) auto;
71
+ }
72
+ }
73
+ `,Bn=`
74
+ /* The header's tools wrap under the title on a narrow screen rather than overflow it. */
75
+ .table-tools {
76
+ flex-wrap: wrap;
77
+ justify-content: flex-end;
78
+ }
79
+ /* The switch between the scene and the chat: two short choices, each an icon and its words. */
80
+ .table-mode {
81
+ flex: none;
82
+ margin: 0;
83
+ }
84
+ .table-mode label {
85
+ min-height: 2rem;
86
+ padding: 0 var(--space-2);
87
+ font-size: var(--text-sm);
88
+ white-space: nowrap;
89
+ }
90
+ /* A council's header is one row: its tools stay as wide as they are, the name gives way and is cut. */
91
+ .council-head {
92
+ gap: var(--space-2);
93
+ }
94
+ .council-head .table-tools {
95
+ flex: none;
96
+ flex-wrap: nowrap;
97
+ gap: var(--space-1);
98
+ }
99
+ .council-head .room-picture {
100
+ padding: 0;
101
+ }
102
+ /* The round table's name is its council picker: a title that opens the sheet. */
103
+ .council-head button.council-pick {
104
+ font-weight: var(--weight-bold);
105
+ }
106
+ /* On a narrow or touched screen the switch shows icons only; the words stay for a screen reader and as the tooltip. */
107
+ @media (max-width: 719px), (pointer: coarse) {
108
+ .table-mode .mode-label {
109
+ position: absolute;
110
+ width: 1px;
111
+ height: 1px;
112
+ overflow: hidden;
113
+ clip-path: inset(50%);
114
+ white-space: nowrap;
115
+ }
116
+ .table-mode label {
117
+ padding: 0 var(--space-2);
118
+ }
119
+ .council-head {
120
+ gap: var(--space-1);
121
+ }
122
+ }
123
+ /* The council's messages as a chat fill the view under its header, like a room's own list. */
124
+ .table-chat {
125
+ position: relative;
126
+ flex: 1;
127
+ min-height: 0;
128
+ display: flex;
129
+ flex-direction: column;
130
+ }
131
+ `,Ue=()=>B("dialogue-fold",$n),Ji=()=>B("table-page",Bn);function Gn(i){let d=(m,f,l)=>n("label",{"data-checked":i.mode===m,title:f,children:[e("input",{type:"radio",name:"table-mode",value:m,checked:i.mode===m,onChange:()=>i.onMode(m)}),e(s,{name:l,size:16}),e("span",{className:"mode-label",children:f})]});return n("fieldset",{className:"segmented table-mode",children:[e("legend",{className:"visually-hidden",children:t("Show the council as")}),d("scene",t("Animation mode"),"table"),d("chat",t("Chat mode"),"rooms")]})}function Xe(i){let{view:d,name:m,room:f}=i,l=d?.kind==="group"?d.name:void 0,y=d?e($e,{view:d,size:36}):null;return n("header",{className:"room-head council-head",children:[f?e("a",{className:"icon-button room-back",href:x("rooms"),"aria-label":t("Back to rooms"),children:e(s,{name:"back"})}):null,y?e(_n,{open:f?.drawer,children:y}):null,n("div",{className:"room-title",children:[n("h1",{children:[f?l?e("button",{type:"button",className:"room-name","aria-haspopup":"dialog",title:t("Edit group"),onClick:()=>bt({kind:"group",name:l}),children:m}):m:n("button",{type:"button",className:"room-name council-pick","aria-haspopup":"dialog",title:t("Switch council"),onClick:i.onPick,children:[m,e("span",{"aria-hidden":"true",children:" ▾"})]}),d?.muted?e(s,{name:"bell-off",size:14,className:"room-muted",role:"img","aria-hidden":!1,"aria-label":t("Notifications are off")}):null]}),e("span",{className:"room-status","data-working":i.working||void 0,children:d?.readOnly?t("Read-only"):i.working?t("Working…"):t("Group")})]}),n("div",{className:"table-tools",children:[i.onReset?e("button",{type:"button",className:"icon-button","aria-label":t("Reset view"),title:t("Reset view"),onClick:i.onReset,children:e(s,{name:"reset"})}):null,i.mode?e(Gn,{mode:i.mode,onMode:i.onMode}):null]}),e(An,{}),e("button",{ref:i.menuButton,type:"button",className:"icon-button","aria-label":t("Room menu"),"aria-haspopup":"dialog",onClick:i.onMenu,children:e(s,{name:"menu"})})]})}function Ze(i,d,m,f){if(!i)return;let l=i.pending.at(-1);if(l&&!l.failed)return{id:`p${l.id}`,who:"owner",author:d,text:l.text,files:[],live:!1,pending:!0};if(i.typing&&i.progress.text!==""){let h=i.agent??f;return{id:`s${i.messages.at(-1)?.id??0}`,who:"agent",agent:h,author:m(h),text:i.progress.text,files:[],live:!0,pending:!1}}let y=i.live.at(-1);if(y)return{id:`l${y.live??y.id}`,who:"agent",agent:y.agent,author:y.author,text:y.text,files:y.files,live:!0,pending:!1};for(let h=i.messages.length-1;h>=0;h-=1){let v=i.messages[h];if(!v||v.kind==="system")continue;return Je(v)}return}function Je(i){return{id:`m${i.id}`,who:i.kind==="owner"?"owner":"agent",agent:i.agent,author:i.author,text:i.text,files:i.files,live:!1,pending:!1}}var zn=(i,d)=>i.id===d.id||i.who===d.who&&i.agent===d.agent&&i.text!==""&&d.text!==""&&(d.text.startsWith(i.text)||i.text.startsWith(d.text));function en(){let i=[],d,m=(f)=>{let l=i.length-1,y=i[l];if(y&&zn(y,f))i[l]=f;else i.push(f)};return{get line(){return i[0]},get waiting(){return Math.max(0,i.length-1)},feed(f,l){let y=f.at(-1)?.id??0;if(!d){d=y,i=l?[l]:[];return}if(!l){d=Math.max(d,y),i=[];return}for(let h of f)if(h.id>d&&h.kind!=="system")m(Je(h));if(d=Math.max(d,y),l&&!l.id.startsWith("m"))m(l)},advance(){if(i.length<2)return!1;return i=i.slice(1),!0}}}function nn(i,d,m){if(i!==void 0&&m.includes(i))return i;return Yn(d,m)}function tn(i,d,m){return i.cardOrder.map((l)=>({id:l,card:i.cards[l]})).filter((l)=>l.card?.room===d).filter((l)=>l.card.outcome===void 0||m===void 0||l.card.after>=m)}var qn=90;function Wn(i,d,m,f={}){if(f.instant)return d;let l=i+m/1000*(f.cps??qn);return Math.min(d,Math.max(i,l))}function on(){let i,d="",m=0,f=0;return{get shown(){return Math.floor(f)},get done(){return Math.floor(f)>=m},feed(l,y){if(l!==i){let h=d!==""&&(y.startsWith(d)||d.startsWith(y));if(i=l,!h)f=0}if(d=y,m=Array.from(y).length,f>m)f=m},step(l,y){f=Wn(f,m,l,{instant:y})},finish(){f=m}}}function rn(i,d,m){if(i?.who!=="agent")return;if(i.live&&m!==void 0)return m;return d?i.agent:void 0}function sn(i,d=80){let m=i.split(`
132
+ `).map((l)=>l.replace(/^\s*(?:#{1,6}\s|>\s?|[-*+]\s|\d+\.\s)+/,"").replace(/[*_`~]/g,"").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\s+/g," ").trim()).find((l)=>l!=="")??"",f=Array.from(m);return f.length>d?`${f.slice(0,d-1).join("")}…`:m}var an=(i,d)=>Array.from(i).slice(0,d).join("");function Yn(i,d){if(!i||i.who!=="agent"||i.agent===void 0)return null;return d.includes(i.agent)?i.agent:null}function cn(i,d,m){return m&&m.lineId===d?m.member:i}var ln="roundtable-console:dialogue-folded",Le=new Map,{emit:Xn,use:Zn}=P();function Qn(i){let d=Le.get(i);if(d!==void 0)return d;try{let m=globalThis.localStorage?.getItem(i)??void 0;if(m!==void 0)Le.set(i,m);return m}catch{return}}function nt(i,d){Le.set(i,d);try{globalThis.localStorage?.setItem(i,d)}catch{}Xn()}var ot=()=>Qn(ln)==="1";function rt(i){nt(ln,i?"1":"0")}function we(){return[Zn(ot),rt]}var xe={},{emit:it,use:st}=P();function Ae(i,d){if(xe[i]===d)return;let m={...xe};if(d===void 0)delete m[i];else m[i]=d;xe=m,it()}var at=()=>xe;function ke(){return st(at)}var dt=24;function un(i,d,m){let f=a(!0);o(()=>{let l=i.current;if(!l)return;let y=()=>{f.current=l.scrollHeight-l.scrollTop-l.clientHeight<=dt};return l.addEventListener("scroll",y,{passive:!0}),()=>l.removeEventListener("scroll",y)},[i]),Se(()=>{let l=i.current;if(!d){f.current=!0;return}if(l&&f.current)l.scrollTop=l.scrollHeight},[i,d,m])}var ut=["①","②","③","④","⑤","⑥","⑦","⑧"];function mn(i){if(!i)return[];return[...i.spoken.map((d)=>({name:d,place:"spoken"})),...i.current===void 0?[]:[{name:i.current,place:"current"}],...i.next.map((d,m)=>({name:d,place:"next",order:m+1}))]}function fn(i){let d={};if(i?.state!=="running")return d;for(let f of i.spoken)d[f]="✓";let m=new Set;if(i.next.forEach((f,l)=>{let y=ut[l];if(y===void 0||m.has(f))return;m.add(f),d[f]=y}),i.current!==void 0)delete d[i.current];return d}var Me=(i)=>i?.state==="running"?i.current:void 0;function pn(i){let d=i.current===void 0?i.replies:i.replies+1;return Math.min(Math.max(d,0),i.limit)}function mt(i){if(i.ended==="limit")return t("Limit reached");if(i.ended==="stopped")return t("Round stopped");if(i.ended==="done")return t("{count} of {limit} replies",{count:i.replies,limit:i.limit});return t("Reply {n} of {limit}",{n:i.n,limit:i.limit})}var Pe=(i)=>mt({...i,n:pn(i)});function gn(i){let d=u((h)=>h.rooms[i.roomKey]?.round),m=u((h)=>{let v={};for(let w of Object.values(h.rooms))if(w.view?.kind==="agent")v[w.view.name]=w.view.displayName;return v}),f=tt();if(!d)return null;let l=mn(d),y=(h)=>m[h]??h;return n("div",{className:"order-strip","data-state":d.state,children:[e("ol",{className:"order-faces","aria-label":t("Speaking order"),children:l.map((h,v)=>n("li",{className:"order-face","data-place":h.place,title:y(h.name),children:[e(he,{spec:f[h.name],name:h.name,size:h.place==="current"?36:26,live:!1}),e("span",{className:"order-badge","aria-hidden":"true",children:h.place==="spoken"?"✓":h.place==="next"?h.order:null}),e("span",{className:"visually-hidden",children:`${y(h.name)}, ${h.place==="spoken"?t("has spoken"):h.place==="current"?t("speaking"):t("next")}`})]},`${h.name}:${v}`))}),e("span",{className:"order-chip","aria-live":"polite",children:Pe(d)}),d.state==="running"&&(d.queued??0)>0?e("span",{className:"order-queued",children:t("Your message waits for the next round")}):null]})}Ue();function ft(i){let d=a(on()),[,m]=jn((h)=>h+1,0),f=_e();d.current.feed(i?.id??"",i?.text??"");let l=i?.text??"",y=i?.id;return o(()=>{let h=d.current;if(f||l===""||y===void 0){h.finish(),m();return}let v=performance.now(),w=0,k=()=>{let E=performance.now();if(h.step(E-v,!1),v=E,m(),!h.done)w=requestAnimationFrame(k)};if(!h.done)w=requestAnimationFrame(k);return()=>cancelAnimationFrame(w)},[f,y,l]),{shown:d.current.shown,done:d.current.done,finish(){d.current.finish(),m()}}}function De(i){let d=u((v)=>v.rooms[i]),m=u((v)=>v.principal?.name)??t("You"),f=u((v)=>{let w={};for(let k of Object.values(v.rooms))if(k.view?.kind==="agent")w[k.view.name]=k.view.displayName;return w}),l=d?.view,y=(v)=>(v===void 0?void 0:f[v])??v??l?.displayName??i,h=Ze(d,m,y,l?.kind==="agent"?l.name:void 0);return{room:d,view:l,line:h,displayOf:y}}function pt(i){let{loaded:d,error:m}=i,f=u((v)=>v.rooms[i.roomKey]),[l,y]=r(!1),h=a(null);return o(()=>{if(i.open&&d)h.current?.scrollTo({top:h.current.scrollHeight})},[i.open,d]),e(A,{open:i.open,title:`${i.name} · ${t("Log")}`,onClose:i.onClose,children:n("div",{className:"scene-log",ref:h,children:[m?e("p",{className:"failure-text",children:m}):null,f?.more?e("button",{type:"button",className:"secondary older",disabled:l,onClick:async()=>{y(!0),await Sr(i.roomKey),y(!1)},children:l?t("Loading…"):t("Load earlier messages")}):null,e(En,{roomKey:i.roomKey,enterAfter:void 0,quotable:!0})]})})}function hn(i){let{roomKey:d}=i,m=ze(),f=_(),l=xr(d),y=i.streams!==!1;o(()=>{if(!y)return;return m.focus(d),()=>m.focus(void 0)},[m,d,y]);let h=u((M)=>M.limits),v=u((M)=>tn(M,d,M.rooms[d]?.messages.at(-1)?.id)),w=tt(),{room:k,view:E,line:V,displayOf:oe}=De(d),re=si(d,E?.displayName??d,!1),F=a(void 0);if(F.current?.room!==d)F.current={room:d,stage:en()};let{stage:I}=F.current;I.feed(k?.messages??[],V);let{line:N,waiting:G}=I,D=E?.kind==="agent"?E:void 0,q=D?D.name:N?.who==="agent"?N.agent:void 0,U=et(q?w[q]:void 0),Z=D?D.displayName:N?N.author:E?.displayName??d,{shown:ae,done:H,finish:J}=ft(N),[,ue]=jn((M)=>M+1,0);o(()=>{if(H&&G>0&&I.advance())ue()},[H,G,I]);let W=Me(k?.round),le=Boolean(k?.typing&&k.progress.text!==""&&G===0),z=rn(N,!H,le?W??N?.agent:void 0);o(()=>{Ae(d,z)},[d,z]),o(()=>()=>Ae(d,void 0),[d]);let de=a(null);un(de,!H,ae);let[Q,j]=r(!1),[O,ee]=we(),ce=N?.who==="owner"&&!D?{["--agent-accent"]:"var(--accent)"}:U,R=Boolean(k?.typing),S=H&&G===0&&N?.who==="agent"&&W!==void 0&&W!==N.agent,L=R&&(!N||N.who==="owner"||S),K=N?an(N.text,ae):"",Y=D||N?.who==="agent"?e("span",{className:"scene-chip",children:e(he,{spec:q?w[q]:void 0,name:q??Z,size:34,live:!1})}):null,ie=v.some(({card:M})=>M.outcome===void 0),ne=n("button",{type:"button",className:"icon-button scene-collapse","aria-expanded":!O,onClick:(M)=>{M.stopPropagation(),ee(!O)},children:[e(s,{name:"chevron",style:{rotate:O?"-90deg":"90deg"}}),e("span",{children:O?t("Expand dialogue"):t("Collapse dialogue")})]});return n("section",{className:"scene-box","data-open":i.open||void 0,"data-collapsed":O||void 0,"data-who":N?.who,style:ce,"aria-label":t("Log"),children:[O?n("div",{className:"scene-bar",onClick:()=>ee(!1),children:[Y,e("strong",{className:"scene-bar-name",children:Z}),e("span",{className:"scene-bar-preview",children:N?sn(N.text):k?.round?Pe(k.round):""}),ie?e("span",{className:"scene-bar-asking",children:t("Waiting for your answer")}):null,ne]}):n("header",{className:"scene-tab",children:[Y,e("strong",{className:"scene-name",children:Z}),n("span",{className:"scene-tools",children:[i.onBack?e("button",{type:"button",className:"icon-button","aria-label":t("Back to the whole table"),onClick:i.onBack,children:e(s,{name:"back"})}):null,i.onMenu?e("button",{type:"button",className:"icon-button scene-more","aria-label":t("More"),"aria-haspopup":"menu",onClick:(M)=>i.onMenu?.(M.currentTarget),children:e(s,{name:"more"})}):null,n("button",{type:"button",className:"icon-button scene-log-button","aria-label":t("Log"),"aria-haspopup":"dialog",onClick:()=>j(!0),children:[e(s,{name:"conversations"}),e("span",{children:t("Log")})]}),ne]})]}),O?null:i.strip,O?null:n("div",{className:"scene-body",ref:de,children:[e("div",{className:"scene-line","data-live":N?.live||void 0,"aria-live":"polite",...H?{}:{role:"button",tabIndex:0,title:t("Tap to show the whole message"),onClick:J,onKeyDown:(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),J()}},children:N?n(g,{children:[D&&N.who==="owner"?e("span",{className:"scene-from",children:N.author}):null,e(je,{source:K}),H?e(zt,{files:N.files}):null]}):null}),L&&k?e(Tn,{name:S?oe(W):Z,progress:k.progress}):null,v.map(({id:M,card:se})=>e("div",{className:"scene-card",children:e(vr,{card:se,timeZone:f.timeZone})},M))]}),E?.readOnly?null:e("div",{className:"scene-composer",hidden:O,children:e(Nt,{draftKey:d,...i.mentionable?{mentionable:i.mentionable}:{},name:E?.displayName??d,commands:re,limits:h,stoppable:Boolean(k?.stoppable),blurAfterSend:i.blurAfterSend===!0,...E?.kind==="group"?{stopLabel:t("Stop the round")}:{},onSend:(M,se)=>m.say(d,M,se),onStop:()=>m.send({type:"stop",room:d})},d)}),e(pt,{roomKey:d,open:Q,loaded:l.loaded,error:l.error,name:E?.displayName??d,onClose:()=>j(!1)})]})}var gt=8,ht={views:[],attention:{},loaded:!1},bn=ht,{emit:yt,use:vt}=P(),Un=()=>vt(()=>bn);function vi(){let i=Qe(lt)?.tier;return i!==void 0&&i!=="owner"}function wt(i,d){return{key:i.key,kind:"agent",name:`${d}.${i.id}`,displayName:i.title,home:!1,readOnly:!1,mode:{yolo:!1,longRunning:!1},typing:!1,stoppable:!1}}var St=(i)=>i.attention===!0,xt=(i,d)=>(d.lastAt??"").localeCompare(i.lastAt??"");async function kt(i){let d=await Promise.allSettled(i.map((l)=>He.list(l))),m=[];d.forEach((l,y)=>{let h=i[y];if(l.status!=="fulfilled"||h===void 0)return;for(let v of l.value.rooms)m.push({room:v,kind:h})}),m.sort((l,y)=>xt(l.room,y.room));let f={};for(let{room:l}of m)if(St(l))f[l.key]=!0;return{views:m.map(({room:l,kind:y})=>wt(l,y)),attention:f,loaded:!0}}function ss(i){let d=ze(),m=u((k)=>k.connects),f=me((k)=>k.lists),l=a(0),y=a(0),h=i.join(`
133
+ `),{views:v}=Un();o(()=>{l.current+=1;let k=l.current,E=!0;return kt(h===""?[]:h.split(`
134
+ `)).then((V)=>{if(!E||k<y.current)return;y.current=k,bn=V,yt()}),()=>{E=!1}},[h,m,f]);let w=v.slice(0,gt).map((k)=>k.key).join(`
135
+ `);o(()=>{let k=w===""?[]:w.split(`
136
+ `);for(let E of k)d.send({type:"subscribe",room:E});return()=>{for(let E of k)d.send({type:"unsubscribe",room:E})}},[d,w,m])}var Rt=380,Mt="cubic-bezier(0.7, 0, 0.84, 0)",Ct=2.4,yn=0.35,Et=260,Tt="cubic-bezier(0.2, 0.8, 0.2, 1)",Lt=1.06,Ot=700,te;function vn(i){if(te?.host===i&&te.phase==="diving")te.abort()}var At=(i)=>{if(!i||typeof i.animate!=="function")return;i.animate([{transform:`scale(${Lt})`,opacity:yn},{transform:"scale(1)",opacity:1}],{duration:Et,easing:Tt})};function wn(i,d,m,f){if(te)return;let l=i.closest("main.route")??i;if(_e()||typeof l.animate!=="function"){m();return}f?.();let y=l.getBoundingClientRect(),h=`${d.x-y.left}px ${d.y-y.top}px`,v={overflow:l.style.overflow,events:l.style.pointerEvents};l.style.overflow="hidden",l.style.pointerEvents="none";let w=l.animate([{transformOrigin:h,transform:"scale(1)",opacity:1},{transformOrigin:h,transform:`scale(${Ct})`,opacity:yn}],{duration:Rt,easing:Mt,fill:"forwards"}),k=document.documentElement,E,V,oe=()=>{l.style.overflow=v.overflow,l.style.pointerEvents=v.events,w.cancel()},re=()=>{window.removeEventListener("popstate",I),window.removeEventListener("hashchange",I)},F={host:i,phase:"diving",abort:I};function I(){if(te!==F||F.phase!=="diving")return;re(),oe(),te=void 0}let N=(G)=>{if(te!==F)return;if(V?.disconnect(),clearTimeout(E),k.removeAttribute("data-dive"),oe(),te=void 0,G)At(document.querySelector("main.route"))};te=F,window.addEventListener("popstate",I),window.addEventListener("hashchange",I),w.finished.then(()=>{if(te!==F||F.phase!=="diving")return;if(F.phase="committing",re(),k.setAttribute("data-dive",""),m(),!i.isConnected){N(!0);return}V=new MutationObserver(()=>{if(!i.isConnected)N(!0)}),V.observe(l.parentElement??document.body,{childList:!0,subtree:!0}),E=setTimeout(()=>N(!i.isConnected),Ot)},()=>{return})}var Ht=(i)=>i==="sleepy"?"idle":i;function xn(i,d){let m={};for(let[l,y]of Object.entries(i))m[l]=Ht(y);let f=(l)=>l!==void 0&&(l in m)&&m[l]!=="waiting"&&m[l]!=="error";for(let l of d){let y=l.agent;if(l.typing&&f(y)){let h=m[y];if(h!=="thinking"&&h!=="working")m[y]="thinking"}}for(let l of d)if(f(l.voice))m[l.voice]="speaking";return m}function Fe(i,d){if(i==="speaking")return"happy";return(d?.STATE_EXPRESSION??Pt)[i]}var Pt={idle:"neutral",thinking:"thinking",working:"determined",waiting:"curious",done:"proud",error:"apologetic",sleepy:"sleepy"};function Ie(i,d){return`s${i}${d.toLowerCase().replace(/[^a-z0-9]/g,"")}`.slice(0,16)}var Dt={x:-7,y:-3,w:114,h:100},fe=256;function Ve(i,d,m,f,l,y,h){let v=i.composeSvg(d,{bare:!0,look:m,expr:Fe(f,i),...h?{mouth:h}:{},state:"idle",still:!0,size:fe,uid:l,skins:y}),{x:w,y:k,w:E,h:V}=Dt;return v.replace('viewBox="0 0 100 100"',`viewBox="${w} ${k} ${E} ${V}"`).replace(`width="${fe}" height="${fe}"`,`width="${fe}" height="${Math.round(fe*V/E)}"`)}function Ke(i,d,m,f,l,y){if(f!=="speaking")return{avatarSvg:Ve(i,d,m,f,l,y)};return{avatarSvg:Ve(i,d,m,f,l,y,"closed"),talkSvg:Ve(i,d,m,f,l,y,"open")}}function Mn(i){let d=i.delayMs??300,m=i.timers??{set:(h,v)=>setTimeout(h,v),clear:(h)=>clearTimeout(h)},f=new Map,l=new Map,y=(h)=>{let v=l.get(h);if(v===void 0)return;m.clear(v),l.delete(h)};return{seed(h,v){y(h),f.set(h,Fe(v))},update(h,v){let w=Fe(v);if(!f.has(h)){f.set(h,w);return}if(y(h),f.get(h)===w)return;l.set(h,m.set(()=>{l.delete(h),f.set(h,w),i.setAvatar(h,v)},d))},forget(h){y(h),f.delete(h)},dispose(){for(let h of[...l.keys()])y(h);f.clear()}}}var Vt={idle:c("idle"),thinking:c("thinking"),working:c("working"),waiting:c("waiting"),speaking:c("speaking"),done:c("done"),error:c("error")},Ft=()=>({table:t("Round table"),seat:(i,d)=>t("{name} ({state})",{name:i,state:t(Vt[d])})}),It=()=>{Be().catch(()=>{return})};function dn(i){let d=vi(),{views:m}=Un(),f=u((l)=>{let y=l.order.map((v)=>l.rooms[v]?.view).filter((v)=>v!==void 0&&v.kind==="agent"&&!v.helper);return[...i?i.slice(0,On).map((v)=>y.find((w)=>w.name===v)).filter((v)=>v!==void 0):y].sort((v,w)=>Number(w.home)-Number(v.home)).slice(0,On)},i?.join(`
137
+ `)??"");return d?m.slice(0,On):f}function xi(){return u((i)=>i.order.map((d)=>i.rooms[d]?.view).filter((d)=>d!==void 0&&d.kind==="agent"&&!d.helper),"agents")}function Kt(i){let d=ke(),m=u((f)=>Object.values(f.rooms).filter((l)=>i?l.key===i:l.view?.kind==="group").map((l)=>{let y=Me(l.round),h=y??l.agent,v=l.typing&&l.progress.text!=="";return{key:l.key,typing:l.typing||y!==void 0,...h===void 0?{}:{agent:h},...v&&h!==void 0?{streamer:h}:{}}}),i??"");return C(()=>m.map(({key:f,streamer:l,...y})=>{let h=d[f]??l;return h===void 0?y:{...y,voice:h}}),[m,d])}function _t(i){return u((d)=>fn(i?d.rooms[i]?.round:void 0),i??"")}function Vn(i){let{variant:d="full",onHandle:m}=i,f=Jn(),l=ct(),y=ii(),h=Rn(),v=tt(),w=dn(i.members),k=ia(w.map((R)=>R.key)),E=Kt(i.groupRoom),V=_t(i.groupRoom),oe=Un().attention,re=vi(),F=a(re);F.current=re;let I=d==="full"&&i.list===!0,N=C(()=>xn(Object.fromEntries(w.map((R)=>{let S=k[R.key]??"idle";return[R.name,oe[R.key]&&(S==="idle"||S==="sleepy")?"waiting":S]})),E),[w,k,E,oe]),G=a(N);G.current=N;let D=C(()=>{if(!f)return[];return w.map((R,S)=>{let L=v[R.name]??R.character??Sn(f,R);return{id:R.name,name:R.displayName,color:f.accentOf(L,y.look),...Ke(f,L,y.look,G.current[R.name]??"idle",Ie(S,R.name),h)}})},[f,w,v,y.look,h]),q=a(D);q.current=D;let U=a(w);U.current=w;let Z=a({look:l,scheme:y.scheme});Z.current={look:l,scheme:y.scheme};let ae=a(null),H=a(void 0),[J,ue]=r(0),W=a(void 0),le=a(()=>{return});le.current=(R)=>{let S=w.find((L)=>L.name===R);if(!f||!S)return;return v[R]??S.character??Sn(f,S)};let z=a(y);z.current=y;let de=a(h);de.current=h;let Q=a(f);Q.current=f;let j=a(m);j.current=m;let O=a(i);O.current=i;let ee=f!==void 0&&D.length>0;o(()=>{let R=ae.current;if(!ee||!R)return;let S=!0,L,K=Mn({setAvatar:(Y,ie)=>{let ne=le.current(Y),M=Q.current,se=U.current.findIndex((be)=>be.name===Y);if(!ne||!M||se<0)return;let{avatarSvg:pe,talkSvg:ge}=Ke(M,ne,z.current.look,ie,Ie(se,Y),de.current);L?.setAvatar(Y,pe,ge)}});return W.current=K,(async()=>{let{mountRoundTable:Y}=await (p("e24gjxtd"),import("./chunk-entry-e24gjxtd.js")),ie=q.current.map((M)=>({...M,state:G.current[M.id]??"idle"})),ne=await Y(R,{theme:Z.current.look,scheme:Z.current.scheme,seats:ie,onSeatClick:({id:M,at:se})=>{let pe=O.current.onSeat;if(pe){pe(M);return}let ge=U.current.find((Hn)=>Hn.name===M);if(!ge)return;let be=()=>X("room",ge.key),Ge=ae.current;if(se&&Ge)wn(Ge,se,be,F.current?It:void 0);else be()},...O.current.onSeatMenu?{onSeatMenu:(M)=>O.current.onSeatMenu?.(M)}:{},ownerName:O.current.ownerName??t("You"),focus:O.current.focus??null,onFocus:(M)=>O.current.onFocus?.(M),reducedMotion:"auto",lowPower:"auto",variant:d,listBelow:I,labels:Ft()});if(!S){ne.dispose();return}L=ne,H.current=ne;for(let M of ie)K.seed(M.id,M.state??"idle");j.current?.(ne),ue((M)=>M+1)})(),()=>{S=!1,vn(R),K.dispose(),W.current=void 0,H.current=void 0,j.current?.(void 0),L?.dispose()}},[ee,d,I]);let ce=i.focus??null;if(o(()=>{let R=H.current;if(R&&R.focused()!==ce)R.focus(ce)},[ce,J]),o(()=>{let R=H.current;if(!R||D.length===0)return;let S=G.current;R.setSeats(D.map((L)=>({...L,state:S[L.id]??"idle"})));for(let L of D)W.current?.seed(L.id,S[L.id]??"idle")},[D,J]),o(()=>{let R=H.current;if(!R)return;for(let S of q.current)R.setMark(S.id,V[S.id]??null)},[V,D,J]),o(()=>{let R=H.current;if(R)R.setTheme(l,y.scheme)},[l,y.scheme,J]),o(()=>{let R=H.current;if(!R)return;for(let S of q.current){let L=N[S.id]??"idle";R.setState(S.id,L),W.current?.update(S.id,L)}},[N,J]),w.length===0)return e("p",{className:"table-empty",children:t("No knights are seated yet.")});return e("section",{className:"table-host",ref:ae,"aria-label":t("Round table")})}function Cn(i,d){let{line:m}=De(i),f=ke()[i],[l,y]=r(),h=nn(f,m,d),v=`${m?.id??""}|${h??""}`;return{focus:cn(h,v,l),look:(E)=>y({lineId:v,member:E})}}function Nn(i){let{roomKey:d,members:m}=i,f=dn(m),[l]=we();return n("div",{className:"table-frame room-scene","data-focused":"","data-folded":l||void 0,children:[e(Vn,{members:m,groupRoom:d,variant:"full",focus:i.focus,onFocus:i.onLook,onSeat:(y)=>{i.onLook(y);let h=f.find((v)=>v.name===y);if(h)pr(d,h.displayName)},...i.onHandle?{onHandle:i.onHandle}:{},...i.onSeatMenu?{onSeatMenu:i.onSeatMenu}:{}}),e(hn,{roomKey:d,open:!0,streams:i.streams??!1,blurAfterSend:i.blurAfterSend===!0,mentionable:f,strip:e(gn,{roomKey:d})})]})}Ji();var $t=b(()=>(p("hdsg3fes"),import("./chunk-council-sheet-hdsg3fes.js")).then((i)=>({default:i.CouncilSheet}))),Bt=b(()=>(p("dqwvcr2p"),import("./chunk-mode-toggle-dqwvcr2p.js")).then((i)=>({default:i.ModeToggle}))),Gt=b(()=>(p("18mnqcja"),import("./chunk-room-menu-18mnqcja.js")).then((i)=>({default:i.RoomMenu})));function Ln(i,d,m,f,l){ta(i,d).then((y)=>{if(y)Oe({...y,at:m,via:f,source:l})},()=>{return})}function qt(){let i=Re("(max-width: 719px)"),d=Re("(pointer: coarse)");return i||d}function er(i,d){let[m,f]=r(!1),[l,y]=r(!1),h=()=>{f(!0),y(!0)},v=m?e(T,{fallback:null,children:e($t,{open:l,onClose:()=>y(!1),council:i,...d?{go:d}:{}})}):null;return{ask:h,sheet:v}}function Ur(i){let{roomKey:d}=i,m=ze(),f=u((S)=>S.rooms[d]),l=u((S)=>S.connection==="open"),y=u((S)=>S.limits),h=ct(),v=qt(),w=f?.view,k=w?.members??[],E=dn(k),[V,oe]=Ye(d),[re,F]=r(),{focus:I,look:N}=Cn(d,k),{ask:G,sheet:D}=er(w,i.go),[q,U]=r(!1),[Z,ae]=r(!1),H=a(null),[J,ue]=r(),[W,le]=r(!1);o(()=>(m.focus(d),()=>m.focus(void 0)),[m,d]);let z=w?.displayName??d,de=si(d,z,!1),Q=f?.mode,j=E.length>0||i.empty===void 0,O=j&&V==="scene",ee=w?.notes===!0,ce=ee&&W,R=ee&&J===d&&!ce;return n(g,{children:[e(Xe,{view:w,name:z,working:f?.typing===!0,room:i.room,onPick:G,onReset:O&&re?.kind==="webgl"?()=>N(null):void 0,mode:j?V:void 0,onMode:oe,menuButton:H,onMenu:()=>{ae(!0),U(!0)}}),h==="camelot"&&j&&!O?e("div",{className:"group-strip",onMouseDown:(S)=>S.preventDefault(),children:e(Vn,{members:k,groupRoom:d,variant:"compact",onSeat:(S)=>{let L=E.find((K)=>K.name===S);if(L)pr(d,L.displayName)},onSeatMenu:(S)=>{let L=E.find((K)=>K.name===S.id);if(L)Ln(L.key,d,S.at,S.via,S.source)}})}):null,!l?n("div",{className:"offline-banner",role:"status",children:[e("span",{className:"spinner","aria-hidden":"true"}),t("Reconnecting… messages wait here until it is back.")]}):null,e(Mr,{room:d,mode:Q&&(Q.yolo||Q.longRunning)?Q:void 0,approved:f?.autoApproved??0}),!j?e("div",{className:"table-frame",children:i.empty}):O?e(Nn,{roomKey:d,members:k,focus:I,onLook:N,blurAfterSend:v,onHandle:F,onSeatMenu:(S)=>{let L=E.find((K)=>K.name===S.id);if(L)Ln(L.key,d,S.at,S.via,S.source)}}):e("div",{className:"table-chat",children:e(Rr,{roomKey:d,name:z,composer:(S)=>w?.readOnly?null:e(Nt,{draftKey:d,mentionable:E,name:z,commands:de,onAddressed:le,...ee?{placeholder:R?t("Write an internal note…"):t("Ask AI…"),above:e(T,{fallback:null,children:e(Bt,{on:!R,label:t("@AI"),...ce?{locked:t("The message starts with @AI, so the knight answers.")}:{},onChange:(L)=>ue(L?void 0:d)})})}:{},limits:y,stoppable:Boolean(f?.stoppable),stopLabel:t("Stop the round"),blurAfterSend:v,onSend:(L,K,Y)=>{if(ee&&Y){let ie=kn(L);m.say(d,ie===""&&K.length===0?L:ie,K,"turn")}else m.say(d,L,K,R?"note":void 0);S(!0)},onStop:()=>m.send({type:"stop",room:d}),...i.incoming&&i.onIncomingTaken?{incoming:i.incoming,onIncomingTaken:i.onIncomingTaken}:{}},d)})}),D,Z?e(T,{fallback:null,children:e(Gt,{open:q,room:d,mode:Q,muted:w?.muted===!0,agent:void 0,group:w?.name,coordinator:w?.coordinator===!0,displayName:z,readOnly:w?.readOnly??!1,parent:void 0,onClose:()=>U(!1),onEditCouncil:G,onAskYolo:()=>{U(!1),ye({kind:"yolo",room:d,name:z,restoreFocus:()=>H.current})},onAskStartOver:()=>{U(!1),ye({kind:"start-over",room:d,name:z,restoreFocus:()=>H.current})}})}):null]})}
138
+ export{Ji,Un,vi,ss,dn,xi,Vn,er,Ur};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-index-24cggw6k.js";function Qt(a){return e("button",{type:"button",id:a.id,role:"switch","aria-checked":a.checked,"aria-label":a.label,"aria-busy":a.busy||void 0,disabled:a.disabled||a.busy,className:"switch",onClick:()=>a.onChange(!a.checked),children:e("span",{className:"switch-thumb"})})}
2
- export{Qt};
1
+ import{e}from"./chunk-index-rvatmx8s.js";function Mt(a){return e("button",{type:"button",id:a.id,role:"switch","aria-checked":a.checked,"aria-label":a.label,"aria-busy":a.busy||void 0,disabled:a.disabled||a.busy,className:"switch",onClick:()=>a.onChange(!a.checked),children:e("span",{className:"switch-thumb"})})}
2
+ export{Mt};
@@ -1,2 +1,2 @@
1
- import{O,h,y}from"./chunk-index-24cggw6k.js";var r=(e,o,i)=>h(e,{method:o,...i===void 0?{}:{body:JSON.stringify(i)}}),t=(e)=>encodeURIComponent(e),re={createAgent:(e)=>r("agents","POST",e),archiveAgent:(e)=>r(`agents/${t(e)}/archive`,"POST"),restoreAgent:(e)=>r(`agents/${t(e)}/restore`,"POST"),deleteAgent:(e)=>r(`agents/${t(e)}`,"DELETE"),skills:(e)=>h(`agents/${t(e)}/skills`),setSkills:(e,o)=>r(`agents/${t(e)}/skills`,"PUT",o),archive:()=>h("archive"),createGroup:(e)=>r("groups","POST",e),group:(e)=>h(`groups/${t(e)}`),updateGroup:(e,o)=>r(`groups/${t(e)}`,"PATCH",o),archiveGroup:(e)=>r(`groups/${t(e)}/archive`,"POST"),restoreGroup:(e)=>r(`groups/${t(e)}/restore`,"POST"),deleteGroup:(e)=>r(`groups/${t(e)}`,"DELETE")};async function Ne(){let e=await y.rooms();O.dispatch({type:"rooms_loaded",rooms:e.rooms})}
2
- export{re,Ne};
1
+ import{O,h,y}from"./chunk-index-rvatmx8s.js";var r=(e,o,i)=>h(e,{method:o,...i===void 0?{}:{body:JSON.stringify(i)}}),t=(e)=>encodeURIComponent(e),re={createAgent:(e)=>r("agents","POST",e),archiveAgent:(e)=>r(`agents/${t(e)}/archive`,"POST"),restoreAgent:(e)=>r(`agents/${t(e)}/restore`,"POST"),deleteAgent:(e)=>r(`agents/${t(e)}`,"DELETE"),skills:(e)=>h(`agents/${t(e)}/skills`),setSkills:(e,o)=>r(`agents/${t(e)}/skills`,"PUT",o),archive:()=>h("archive"),createGroup:(e)=>r("groups","POST",e),group:(e)=>h(`groups/${t(e)}`),updateGroup:(e,o)=>r(`groups/${t(e)}`,"PATCH",o),archiveGroup:(e)=>r(`groups/${t(e)}/archive`,"POST"),restoreGroup:(e)=>r(`groups/${t(e)}/restore`,"POST"),deleteGroup:(e)=>r(`groups/${t(e)}`,"DELETE")};async function Ie(){let e=await y.rooms();O.dispatch({type:"rooms_loaded",rooms:e.rooms})}
2
+ export{re,Ie};
@@ -1,4 +1,4 @@
1
- import{e,n,s}from"./chunk-index-24cggw6k.js";import{Y}from"./chunk-index-d941ae7c.js";var r=`
1
+ import{e,n,s}from"./chunk-index-rvatmx8s.js";import{B}from"./chunk-index-fw6kawhw.js";var r=`
2
2
  /* A drop-down: the inputs' box with the one chevron of the icon set, turned to point down. */
3
3
  .select {
4
4
  position: relative;
@@ -38,5 +38,5 @@ import{e,n,s}from"./chunk-index-24cggw6k.js";import{Y}from"./chunk-index-d941ae7
38
38
  font-size: 1rem;
39
39
  }
40
40
  }
41
- `;function Re({chip:i,className:o,...t}){if((t.size??1)>1||t.multiple===!0)return e("select",{className:o,...t});return Y("select",r),n("span",{className:o?`select ${o}`:"select","data-chip":i||void 0,children:[e("select",{...t}),e(s,{name:"chevron",size:16})]})}
42
- export{Re};
41
+ `;function Ee({chip:i,className:o,...t}){if((t.size??1)>1||t.multiple===!0)return e("select",{className:o,...t});return B("select",r),n("span",{className:o?`select ${o}`:"select","data-chip":i||void 0,children:[e("select",{...t}),e(s,{name:"chevron",size:16})]})}
42
+ export{Ee};