pi-roundtable-web 0.29.0 → 0.29.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 (242) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/chunk-account-dq0nhfvj.js +1 -0
  3. package/dist/{chunk-action-menu-q5y7xpry.js → chunk-action-menu-37zgbhje.js} +1 -1
  4. package/dist/chunk-agent-yqe6reej.js +1 -0
  5. package/dist/chunk-arranged-rooms-sx6xg9df.js +1 -0
  6. package/dist/chunk-attachments-3vbj05g5.js +102 -0
  7. package/dist/chunk-bulk-actions-6pehrsgb.js +1 -0
  8. package/dist/chunk-character-creator-bg3tdc8p.js +225 -0
  9. package/dist/chunk-codeeditor-102wa9bj.js +2 -0
  10. package/dist/chunk-confirm-ghxga720.js +1 -0
  11. package/dist/chunk-connectors-0jzzren3.js +37 -0
  12. package/dist/chunk-conversations-3276jq4q.js +1 -0
  13. package/dist/chunk-council-sheet-7m884s44.js +2 -0
  14. package/dist/chunk-council-view-rkzcxeg8.js +1 -0
  15. package/dist/{chunk-drag-7873fvzw.js → chunk-drag-sw692nr3.js} +1 -1
  16. package/dist/chunk-entry-mb6jd983.js +1 -0
  17. package/dist/chunk-folder-list-g7st6p1e.js +1 -0
  18. package/dist/chunk-folds-rb1b069h.js +1 -0
  19. package/dist/chunk-gate-3rxxyfev.js +1 -0
  20. package/dist/chunk-host-icons-cyj62pwp.js +1 -0
  21. package/dist/chunk-host-picture-9wnhqckv.js +1 -0
  22. package/dist/chunk-host-state-b858k3p8.js +1 -0
  23. package/dist/chunk-host-ui-j6wvj0pe.js +1 -0
  24. package/dist/{chunk-index-gj3n4dh5.js → chunk-index-0qzqzp6t.js} +2 -2
  25. package/dist/{chunk-index-7k5895sn.js → chunk-index-0t68az7d.js} +3 -3
  26. package/dist/chunk-index-0xdptr30.js +2 -0
  27. package/dist/{chunk-index-bjeg3e2j.js → chunk-index-1tkzdy4s.js} +2 -2
  28. package/dist/chunk-index-2s48qyrs.js +2 -0
  29. package/dist/chunk-index-33cqx9v2.js +2 -0
  30. package/dist/chunk-index-36m3knsk.js +2 -0
  31. package/dist/{chunk-index-r0hk9kyd.js → chunk-index-50syrmaq.js} +2 -2
  32. package/dist/{chunk-index-4krm48hm.js → chunk-index-50w6yq2d.js} +1 -1
  33. package/dist/{chunk-index-4jnn2g09.js → chunk-index-5fyqxh0r.js} +2 -2
  34. package/dist/chunk-index-5x3h176v.js +2 -0
  35. package/dist/{chunk-index-y6p8j3zv.js → chunk-index-6cs1wvhy.js} +1 -1
  36. package/dist/{chunk-index-aycxt14t.js → chunk-index-6m25qpa7.js} +2 -2
  37. package/dist/{chunk-index-35zqk1zr.js → chunk-index-6nja2vd8.js} +2 -2
  38. package/dist/{chunk-index-teyx2hz7.js → chunk-index-6q3dx093.js} +2 -2
  39. package/dist/{chunk-index-7c9fn21n.js → chunk-index-6ycrvwzs.js} +2 -2
  40. package/dist/{chunk-index-5ssncptg.js → chunk-index-6yfcfcc8.js} +2 -2
  41. package/dist/{chunk-index-rr73h4kc.js → chunk-index-7gk2sdf4.js} +3 -3
  42. package/dist/{chunk-index-h2a42p6s.js → chunk-index-7p31pda8.js} +19 -3
  43. package/dist/chunk-index-91wnf1k9.js +1 -0
  44. package/dist/chunk-index-9ehqccfe.js +2 -0
  45. package/dist/chunk-index-ar1x9fhw.js +2 -0
  46. package/dist/chunk-index-axw4wkqq.js +2 -0
  47. package/dist/chunk-index-b5patef1.js +2 -0
  48. package/dist/chunk-index-d941ae7c.js +2 -0
  49. package/dist/chunk-index-dagc92hw.js +2 -0
  50. package/dist/chunk-index-ddssgba9.js +2 -0
  51. package/dist/chunk-index-dpgn7kzp.js +2 -0
  52. package/dist/{chunk-index-zdzzf3fp.js → chunk-index-e8535c4h.js} +2 -2
  53. package/dist/{chunk-index-e46652wf.js → chunk-index-edjyj761.js} +1 -1
  54. package/dist/chunk-index-eez0kbk4.js +2 -0
  55. package/dist/chunk-index-ekp5mmvp.js +2 -0
  56. package/dist/{chunk-index-pcbkp62w.js → chunk-index-eyythjdx.js} +2 -2
  57. package/dist/chunk-index-fdg2qd3f.js +2 -0
  58. package/dist/chunk-index-g0sdxjxr.js +2 -0
  59. package/dist/{chunk-index-cttrqfm8.js → chunk-index-gmbk3sra.js} +1 -1
  60. package/dist/chunk-index-hsc9yz2x.js +2 -0
  61. package/dist/{chunk-index-a8c0ap8g.js → chunk-index-jrj09r5c.js} +2 -2
  62. package/dist/chunk-index-kvztbfqj.js +2 -0
  63. package/dist/{chunk-index-f4gqzfkv.js → chunk-index-m7wzrmcd.js} +2 -2
  64. package/dist/chunk-index-m8bv51r9.js +2 -0
  65. package/dist/{chunk-index-amspdq2j.js → chunk-index-mey1p7h8.js} +3 -3
  66. package/dist/{chunk-index-4re5prfp.js → chunk-index-mzw7nmkc.js} +2 -2
  67. package/dist/{chunk-index-en5dm1zv.js → chunk-index-n2v2bz8d.js} +2 -2
  68. package/dist/chunk-index-nncy9wxw.js +2 -0
  69. package/dist/chunk-index-p2e7rwac.js +2 -0
  70. package/dist/chunk-index-p98tt12y.js +2 -0
  71. package/dist/chunk-index-qdtmetsy.js +120 -0
  72. package/dist/{chunk-index-pfs6rm6w.js → chunk-index-qedt9szy.js} +2 -2
  73. package/dist/{chunk-index-evhaaqzk.js → chunk-index-qk7rp7fk.js} +11 -11
  74. package/dist/{chunk-index-hef4gwtb.js → chunk-index-qq86fxda.js} +2 -2
  75. package/dist/{chunk-index-v6h43553.js → chunk-index-qw9a7ken.js} +2 -2
  76. package/dist/chunk-index-s356ybxk.js +50 -0
  77. package/dist/{chunk-index-rtz4936v.js → chunk-index-sk8cvb4e.js} +3 -3
  78. package/dist/{chunk-index-3tjmyd1h.js → chunk-index-syxwqhry.js} +2 -2
  79. package/dist/{chunk-index-1652v386.css → chunk-index-t7csmbpy.css} +1 -1
  80. package/dist/{chunk-index-haac6nbt.js → chunk-index-tasbd41t.js} +2 -2
  81. package/dist/chunk-index-vxqzavgz.js +2 -0
  82. package/dist/chunk-index-x5xq9g9a.js +3 -0
  83. package/dist/chunk-index-xx0kecz9.js +2 -0
  84. package/dist/{chunk-index-q33ppq0j.js → chunk-index-y1xv3dxs.js} +100 -4
  85. package/dist/{chunk-index-ntt3em2k.js → chunk-index-yn1vvxj2.js} +1 -1
  86. package/dist/chunk-lang-css-rwkzd784.js +1 -0
  87. package/dist/{chunk-lang-dockerfile-2p7e3ssz.js → chunk-lang-dockerfile-e87ssppx.js} +1 -1
  88. package/dist/{chunk-lang-go-zxp9k517.js → chunk-lang-go-kbcbn346.js} +2 -2
  89. package/dist/chunk-lang-html-zhngbs9v.js +1 -0
  90. package/dist/chunk-lang-javascript-bk2s6a56.js +1 -0
  91. package/dist/{chunk-lang-json-zmym50rg.js → chunk-lang-json-4pe1fv7e.js} +1 -1
  92. package/dist/{chunk-lang-markdown-ww2kcs85.js → chunk-lang-markdown-67cm3tjx.js} +5 -5
  93. package/dist/{chunk-lang-python-ng1zdtd4.js → chunk-lang-python-mnfhcvww.js} +2 -2
  94. package/dist/{chunk-lang-rust-6ynhxjdd.js → chunk-lang-rust-e4a9s76x.js} +1 -1
  95. package/dist/{chunk-lang-shell-39t9bz2s.js → chunk-lang-shell-43nea8tq.js} +1 -1
  96. package/dist/{chunk-lang-sql-w875ejpg.js → chunk-lang-sql-28364npv.js} +2 -2
  97. package/dist/{chunk-lang-toml-b8ckgkg5.js → chunk-lang-toml-a83hr7bw.js} +1 -1
  98. package/dist/chunk-lang-typescript-r5npc6zf.js +1 -0
  99. package/dist/{chunk-lang-xml-bz91cjp1.js → chunk-lang-xml-2hv5xc8n.js} +1 -1
  100. package/dist/{chunk-lang-yaml-g9zy0tdv.js → chunk-lang-yaml-vw22drt8.js} +1 -1
  101. package/dist/chunk-layout-actions-rw5myg2t.js +1 -0
  102. package/dist/chunk-menu-items-q0hy5kzd.js +1 -0
  103. package/dist/chunk-mode-toggle-yk2t0tcy.js +1 -0
  104. package/dist/{chunk-note-row-314py1pp.js → chunk-note-row-c0trzayj.js} +33 -4
  105. package/dist/chunk-notes-0xcmm938.js +1 -0
  106. package/dist/chunk-notice-bell-f9nhxg71.js +1 -0
  107. package/dist/{chunk-notices-mtn7pg1z.js → chunk-notices-gkaqncqz.js} +1 -1
  108. package/dist/chunk-onboarding-fkq9ptcw.js +1 -0
  109. package/dist/chunk-overview-yssxbg0d.js +1 -0
  110. package/dist/chunk-palette-w6qbr7zp.js +1 -0
  111. package/dist/chunk-placement-items-wcwy91mp.js +1 -0
  112. package/dist/chunk-profile-9sjgayrx.js +1 -0
  113. package/dist/chunk-prompt-history-kn42sf8y.js +1 -0
  114. package/dist/chunk-prompts-824fwgvh.js +1 -0
  115. package/dist/chunk-room-confirms-hvs9tra4.js +1 -0
  116. package/dist/{chunk-room-menu-1m2c2ekt.js → chunk-room-menu-pkd0487m.js} +1 -1
  117. package/dist/chunk-rooms-menu-button-w5hfhsfv.js +1 -0
  118. package/dist/chunk-schedules-m9mn68gt.js +1 -0
  119. package/dist/{chunk-seat-menu-m2n9nvv0.js → chunk-seat-menu-3tdcr44t.js} +1 -1
  120. package/dist/chunk-section-fold-g0tx68cj.js +1 -0
  121. package/dist/chunk-settings-18qmhcyr.js +1 -0
  122. package/dist/chunk-sheet-hosts-tsppnmvv.js +29 -0
  123. package/dist/chunk-shortcut-help-wnm0cm8n.js +26 -0
  124. package/dist/chunk-shortcuts-qee393s5.js +1 -0
  125. package/dist/chunk-skill-editor-pryntvpr.js +8 -0
  126. package/dist/chunk-skills-sap3rysr.js +1 -0
  127. package/dist/chunk-start-over-line-azexcxj1.js +16 -0
  128. package/dist/chunk-switcher-list-6hacxjfe.js +1 -0
  129. package/dist/{chunk-tab-dot-gkpe06q8.js → chunk-tab-dot-h0eskhrt.js} +1 -1
  130. package/dist/{chunk-table-av3kh3tt.js → chunk-table-jtn49c2m.js} +1 -1
  131. package/dist/chunk-table2d-vy4w4r5k.js +1 -0
  132. package/dist/{chunk-table3d-rsvajx7r.js → chunk-table3d-0a62jerb.js} +22 -22
  133. package/dist/chunk-thread-actions-31scmndt.js +1 -0
  134. package/dist/{chunk-thread-cards-grzszfha.js → chunk-thread-cards-mwxzy02t.js} +1 -1
  135. package/dist/chunk-thread-list-52mx2m9p.js +227 -0
  136. package/dist/chunk-transcript-p5q2m795.js +1 -0
  137. package/dist/chunk-waiting-chip-wvkbsnw5.js +32 -0
  138. package/dist/chunk-waiting-s7nm3q0p.js +1 -0
  139. package/dist/chunk-where-j99f8pb8.js +1 -0
  140. package/dist/chunk-workspace-ne2nkf4h.js +586 -0
  141. package/dist/chunk-zh-tw-vm5d0w6j.js +1 -0
  142. package/dist/index.html +1 -1
  143. package/dist/sw.js +1 -1
  144. package/package.json +2 -2
  145. package/src/api-types.ts +12 -0
  146. package/src/app/app.ts +7 -0
  147. package/src/app/card-log.ts +10 -2
  148. package/src/app/protocol.ts +18 -0
  149. package/src/app/queued-delivery.ts +107 -0
  150. package/src/app/queued-frames.ts +115 -0
  151. package/src/app/room-log.ts +39 -7
  152. package/src/app/routes.ts +97 -5
  153. package/src/app/socket.ts +12 -2
  154. package/src/app/surface.ts +37 -6
  155. package/src/app/zip.ts +124 -0
  156. package/src/auth/sessions.ts +9 -1
  157. package/src/host/cards.ts +10 -3
  158. package/src/host/stored-json.ts +23 -0
  159. package/src/i18n/zh-tw.ts +14 -0
  160. package/src/notices/mount.ts +1 -0
  161. package/src/notices/store.ts +9 -1
  162. package/src/web-plugin.ts +4 -1
  163. package/dist/chunk-account-9616x405.js +0 -1
  164. package/dist/chunk-agent-x74xezyt.js +0 -1
  165. package/dist/chunk-arranged-rooms-9prq46vh.js +0 -1
  166. package/dist/chunk-bulk-actions-5dc4m9ad.js +0 -1
  167. package/dist/chunk-character-creator-wf02eg0h.js +0 -1
  168. package/dist/chunk-codeeditor-239ss6a2.js +0 -2
  169. package/dist/chunk-confirm-bhrx9195.js +0 -1
  170. package/dist/chunk-connectors-k77pd9by.js +0 -37
  171. package/dist/chunk-conversations-ftcpaqw1.js +0 -1
  172. package/dist/chunk-council-sheet-a5e6tspr.js +0 -2
  173. package/dist/chunk-council-view-6593rqbr.js +0 -1
  174. package/dist/chunk-entry-5zmjxadx.js +0 -1
  175. package/dist/chunk-folder-list-h9hmbm8e.js +0 -1
  176. package/dist/chunk-folds-vxq86t1s.js +0 -1
  177. package/dist/chunk-gate-fa6za28z.js +0 -1
  178. package/dist/chunk-host-icons-y6frbzqt.js +0 -1
  179. package/dist/chunk-host-picture-fqg55rbr.js +0 -1
  180. package/dist/chunk-host-state-65tdhkyq.js +0 -1
  181. package/dist/chunk-host-ui-233kz7qp.js +0 -1
  182. package/dist/chunk-index-2c00zf3z.js +0 -2
  183. package/dist/chunk-index-2dhrqvba.js +0 -2
  184. package/dist/chunk-index-2s4bkrz3.js +0 -2
  185. package/dist/chunk-index-2ypaqwjy.js +0 -2
  186. package/dist/chunk-index-39qq37j5.js +0 -2
  187. package/dist/chunk-index-4eag6s50.js +0 -2
  188. package/dist/chunk-index-57teqgct.js +0 -2
  189. package/dist/chunk-index-93f3e06v.js +0 -2
  190. package/dist/chunk-index-9m9v1p7s.js +0 -2
  191. package/dist/chunk-index-a8nqn3y0.js +0 -3
  192. package/dist/chunk-index-am7ghh75.js +0 -120
  193. package/dist/chunk-index-amxa2bn3.js +0 -2
  194. package/dist/chunk-index-dajanzxc.js +0 -1
  195. package/dist/chunk-index-e2eeckhh.js +0 -2
  196. package/dist/chunk-index-ek98d2rn.js +0 -2
  197. package/dist/chunk-index-gp4chnp3.js +0 -2
  198. package/dist/chunk-index-mg96sqpk.js +0 -2
  199. package/dist/chunk-index-nsya88fn.js +0 -1
  200. package/dist/chunk-index-pgxgq61x.js +0 -2
  201. package/dist/chunk-index-smz90j6p.js +0 -2
  202. package/dist/chunk-index-vzqwn3wp.js +0 -2
  203. package/dist/chunk-index-wt2asefx.js +0 -50
  204. package/dist/chunk-index-x4tq9btg.js +0 -2
  205. package/dist/chunk-index-yvcdg5hh.js +0 -2
  206. package/dist/chunk-index-zeqfnkty.js +0 -2
  207. package/dist/chunk-index-zpwb8mkk.js +0 -2
  208. package/dist/chunk-lang-css-avzhvm72.js +0 -1
  209. package/dist/chunk-lang-html-red02gep.js +0 -1
  210. package/dist/chunk-lang-javascript-n33kmjcx.js +0 -1
  211. package/dist/chunk-lang-typescript-qf8acbb2.js +0 -1
  212. package/dist/chunk-layout-actions-fyzzzeyp.js +0 -1
  213. package/dist/chunk-menu-items-yvnk3vds.js +0 -1
  214. package/dist/chunk-mode-toggle-ccv271hm.js +0 -1
  215. package/dist/chunk-notes-4rnrddzw.js +0 -1
  216. package/dist/chunk-notice-bell-z9wgamnz.js +0 -1
  217. package/dist/chunk-onboarding-f3hhxgg4.js +0 -1
  218. package/dist/chunk-overview-qmepntrr.js +0 -1
  219. package/dist/chunk-palette-edkn1ypq.js +0 -1
  220. package/dist/chunk-placement-items-trsa5t23.js +0 -1
  221. package/dist/chunk-profile-pwfq0wns.js +0 -1
  222. package/dist/chunk-prompt-history-xp9hmeqt.js +0 -1
  223. package/dist/chunk-prompts-a56qvytg.js +0 -1
  224. package/dist/chunk-room-confirms-gqpkz4h0.js +0 -1
  225. package/dist/chunk-rooms-menu-button-tcvda1gq.js +0 -1
  226. package/dist/chunk-schedules-kwnw7p8v.js +0 -1
  227. package/dist/chunk-sheet-hosts-pr8xktyq.js +0 -29
  228. package/dist/chunk-shortcut-help-sbvrds1m.js +0 -26
  229. package/dist/chunk-shortcuts-8705p7q3.js +0 -1
  230. package/dist/chunk-skill-editor-7xy09sq1.js +0 -8
  231. package/dist/chunk-skills-cnc25x7q.js +0 -1
  232. package/dist/chunk-start-over-line-97zdd9pb.js +0 -16
  233. package/dist/chunk-switcher-list-ehsn2wsk.js +0 -1
  234. package/dist/chunk-table2d-5x3jptp9.js +0 -1
  235. package/dist/chunk-thread-actions-7xtkegwm.js +0 -1
  236. package/dist/chunk-thread-list-9bjjac3j.js +0 -217
  237. package/dist/chunk-transcript-t5szb8r0.js +0 -1
  238. package/dist/chunk-waiting-chip-d8b6a0p8.js +0 -28
  239. package/dist/chunk-waiting-ts3kxjvv.js +0 -1
  240. package/dist/chunk-where-3d3ncsa5.js +0 -1
  241. package/dist/chunk-workspace-ct6hvn0z.js +0 -578
  242. package/dist/chunk-zh-tw-v9v1eerm.js +0 -1
@@ -1,120 +0,0 @@
1
- import{p,Q,S,ke,o,Ne,C,zn,a,r,t,u,g,e,n,s,Me,X,d,M,pn,In,rt,_,We,gn,At,Ot,Un,On,ge,we,os,xn,he,Nt,Je,De,ss,tr,nr,ir,Sn,Ce,He,Ee,wn,lr,cr}from"./chunk-index-wt2asefx.js";import{Ze}from"./chunk-index-4jnn2g09.js";import{ze}from"./chunk-index-hef4gwtb.js";import{Pn}from"./chunk-index-zeqfnkty.js";import{se}from"./chunk-index-amxa2bn3.js";import{R}from"./chunk-index-zdzzf3fp.js";var Ae=(i)=>`roundtable-console:council-mode:${i}`,Ge=(i)=>`rt-table-mode:${i}`,qe="roundtable-console:table-mode",Re=new Map,{emit:Ln,use:Nn}=M(),Te=(i)=>i==="scene"||i==="chat"?i:void 0;function ye(i){try{return globalThis.localStorage?.getItem(i)??void 0}catch{return}}function Le(i,c){try{if(c===void 0)globalThis.localStorage?.removeItem(i);else globalThis.localStorage?.setItem(i,c)}catch{}}function Hn(i){let c=ye(Ge(i)),m=c==="1"?"scene":c==="0"?"chat":void 0,f=m??Te(ye(qe))??"scene";if(m!==void 0||Te(ye(qe)))Le(Ae(i),f),Le(Ge(i),void 0);return f}function Dn(i){let c=Re.get(i);if(c!==void 0)return c;let m=Te(ye(Ae(i)))??Hn(i);return Re.set(i,m),m}function Vn(i,c){Re.set(i,c),Le(Ae(i),c),Ln()}function je(i){return[Nn(()=>Dn(i)),(c)=>Vn(i,c)]}var Fn=`
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
- `,Kn=`
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 that sit beside the council chip. */
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: on a phone its tools take a row of their own under the title. */
91
- @media (max-width: 719px) {
92
- .council-head {
93
- flex-wrap: wrap;
94
- }
95
- .council-head .table-tools {
96
- order: 3;
97
- flex-basis: 100%;
98
- min-width: 0;
99
- }
100
- .council-head .council-chip {
101
- flex: 1 1 0;
102
- min-width: 0;
103
- }
104
- }
105
- /* The council's messages as a chat fill the view under its header, like a room's own list. */
106
- .table-chat {
107
- position: relative;
108
- flex: 1;
109
- min-height: 0;
110
- display: flex;
111
- flex-direction: column;
112
- }
113
- `,Ye=()=>se("dialogue-fold",Fn),Ii=()=>se("table-page",Kn);function Ue(i,c,m,f){if(!i)return;let l=i.pending.at(-1);if(l&&!l.failed)return{id:`p${l.id}`,who:"owner",author:c,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 b=i.live.at(-1);if(b)return{id:`l${b.live??b.id}`,who:"agent",agent:b.agent,author:b.author,text:b.text,files:b.files,live:!0,pending:!1};for(let h=i.messages.length-1;h>=0;h-=1){let y=i.messages[h];if(!y||y.kind==="system")continue;return Xe(y)}return}function Xe(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 _n=(i,c)=>i.id===c.id||i.who===c.who&&i.agent===c.agent&&i.text!==""&&c.text!==""&&(c.text.startsWith(i.text)||i.text.startsWith(c.text));function Qe(){let i=[],c,m=(f)=>{let l=i.length-1,b=i[l];if(b&&_n(b,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 b=f.at(-1)?.id??0;if(!c){c=b,i=l?[l]:[];return}if(!l){c=Math.max(c,b),i=[];return}for(let h of f)if(h.id>c&&h.kind!=="system")m(Xe(h));if(c=Math.max(c,b),l&&!l.id.startsWith("m"))m(l)},advance(){if(i.length<2)return!1;return i=i.slice(1),!0}}}function en(i,c,m,f){if(i!==void 0&&f.includes(i))return i;if(c!==void 0&&f.includes(c))return c;return qn(m,f)}function nn(i,c,m){return i.cardOrder.map((l)=>({id:l,card:i.cards[l]})).filter((l)=>l.card?.room===c).filter((l)=>l.card.outcome===void 0||m===void 0||l.card.after>=m)}var Bn=90;function Gn(i,c,m,f={}){if(f.instant)return c;let l=i+m/1000*(f.cps??Bn);return Math.min(c,Math.max(i,l))}function tn(){let i,c="",m=0,f=0;return{get shown(){return Math.floor(f)},get done(){return Math.floor(f)>=m},feed(l,b){if(l!==i){let h=c!==""&&(b.startsWith(c)||c.startsWith(b));if(i=l,!h)f=0}if(c=b,m=Array.from(b).length,f>m)f=m},step(l,b){f=Gn(f,m,l,{instant:b})},finish(){f=m}}}function on(i,c,m){if(i?.who!=="agent")return;if(i.live&&m!==void 0)return m;return c?i.agent:void 0}function rn(i,c=80){let m=i.split(`
114
- `).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>c?`${f.slice(0,c-1).join("")}…`:m}var sn=(i,c)=>Array.from(i).slice(0,c).join("");function qn(i,c){if(!i||i.who!=="agent"||i.agent===void 0)return null;return c.includes(i.agent)?i.agent:null}function an(i,c,m){return m&&m.lineId===c?m.member:i}var Wn=["①","②","③","④","⑤","⑥","⑦","⑧"];function cn(i){if(!i)return[];return[...i.spoken.map((c)=>({name:c,place:"spoken"})),...i.current===void 0?[]:[{name:i.current,place:"current"}],...i.next.map((c,m)=>({name:c,place:"next",order:m+1}))]}function dn(i){let c={};if(i?.state!=="running")return c;for(let f of i.spoken)c[f]="✓";let m=new Set;if(i.next.forEach((f,l)=>{let b=Wn[l];if(b===void 0||m.has(f))return;m.add(f),c[f]=b}),i.current!==void 0)delete c[i.current];return c}var le=(i)=>i?.state==="running"?i.current:void 0;function ln(i){let c=i.current===void 0?i.replies:i.replies+1;return Math.min(Math.max(c,0),i.limit)}var un="roundtable-console:dialogue-folded",Oe=new Map,{emit:jn,use:Yn}=M();function Xn(i){let c=Oe.get(i);if(c!==void 0)return c;try{let m=globalThis.localStorage?.getItem(i)??void 0;if(m!==void 0)Oe.set(i,m);return m}catch{return}}function Zn(i,c){Oe.set(i,c);try{globalThis.localStorage?.setItem(i,c)}catch{}jn()}var Jn=()=>Xn(un)==="1";function Qn(i){Zn(un,i?"1":"0")}function ve(){return[Yn(Jn),Qn]}var Se={},{emit:et,use:nt}=M();function Ve(i,c){if(Se[i]===c)return;let m={...Se};if(c===void 0)delete m[i];else m[i]=c;Se=m,et()}var tt=()=>Se;function xe(){return nt(tt)}var ot=24;function mn(i,c,m){let f=a(!0);o(()=>{let l=i.current;if(!l)return;let b=()=>{f.current=l.scrollHeight-l.scrollTop-l.clientHeight<=ot};return l.addEventListener("scroll",b,{passive:!0}),()=>l.removeEventListener("scroll",b)},[i]),Ne(()=>{let l=i.current;if(!c){f.current=!0;return}if(l&&f.current)l.scrollTop=l.scrollHeight},[i,c,m])}function st(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)=>st({...i,n:ln(i)});function fn(i){let c=d((h)=>h.rooms[i.roomKey]?.round),m=d((h)=>{let y={};for(let v of Object.values(h.rooms))if(v.view?.kind==="agent")y[v.view.name]=v.view.displayName;return y}),f=De();if(!c)return null;let l=cn(c),b=(h)=>m[h]??h;return n("div",{className:"order-strip","data-state":c.state,children:[e("ol",{className:"order-faces","aria-label":t("Speaking order"),children:l.map((h,y)=>n("li",{className:"order-face","data-place":h.place,title:b(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:`${b(h.name)}, ${h.place==="spoken"?t("has spoken"):h.place==="current"?t("speaking"):t("next")}`})]},`${h.name}:${y}`))}),e("span",{className:"order-chip","aria-live":"polite",children:Pe(c)}),c.state==="running"&&(c.queued??0)>0?e("span",{className:"order-queued",children:t("Your message waits for the next round")}):null]})}Ye();function it(i){let c=a(tn()),[,m]=zn((h)=>h+1,0),f=Me();c.current.feed(i?.id??"",i?.text??"");let l=i?.text??"",b=i?.id;return o(()=>{let h=c.current;if(f||l===""||b===void 0){h.finish(),m();return}let y=performance.now(),v=0,x=()=>{let T=performance.now();if(h.step(T-y,!1),y=T,m(),!h.done)v=requestAnimationFrame(x)};if(!h.done)v=requestAnimationFrame(x);return()=>cancelAnimationFrame(v)},[f,b,l]),{shown:c.current.shown,done:c.current.done,finish(){c.current.finish(),m()}}}function Fe(i){let c=d((y)=>y.rooms[i]),m=d((y)=>y.principal?.name)??t("You"),f=d((y)=>{let v={};for(let x of Object.values(y.rooms))if(x.view?.kind==="agent")v[x.view.name]=x.view.displayName;return v}),l=c?.view,b=(y)=>(y===void 0?void 0:f[y])??y??l?.displayName??i,h=Ue(c,m,b,l?.kind==="agent"?l.name:void 0);return{room:c,view:l,line:h,displayOf:b}}function at(i){let{loaded:c,error:m}=i,f=d((y)=>y.rooms[i.roomKey]),[l,b]=r(!1),h=a(null);return o(()=>{if(i.open&&c)h.current?.scrollTo({top:h.current.scrollHeight})},[i.open,c]),e(R,{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()=>{b(!0),await ir(i.roomKey),b(!1)},children:l?t("Loading…"):t("Load earlier messages")}):null,e(Sn,{roomKey:i.roomKey,enterAfter:void 0,quotable:!0})]})})}function hn(i){let{roomKey:c}=i,m=Ee(),f=_(),l=nr(c),b=i.streams!==!1;o(()=>{if(!b)return;return m.focus(c),()=>m.focus(void 0)},[m,c,b]);let h=d((L)=>L.limits),y=d((L)=>nn(L,c,L.rooms[c]?.messages.at(-1)?.id)),v=De(),{room:x,view:T,line:O,displayOf:Z}=Fe(c),q=a(void 0);if(q.current?.room!==c)q.current={room:c,stage:Qe()};let{stage:H}=q.current;H.feed(x?.messages??[],O);let{line:k,waiting:V}=H,P=T?.kind==="agent"?T:void 0,F=P?P.name:k?.who==="agent"?k.agent:void 0,ne=Je(F?v[F]:void 0),B=P?P.displayName:k?k.author:T?.displayName??c,{shown:te,done:G,finish:K}=it(k),[,J]=zn((L)=>L+1,0);o(()=>{if(G&&V>0&&H.advance())J()},[G,V,H]);let oe=le(x?.round),re=Boolean(x?.typing&&x.progress.text!==""&&V===0),ae=on(k,!G,re?oe??k?.agent:void 0);o(()=>{Ve(c,ae)},[c,ae]),o(()=>()=>Ve(c,void 0),[c]);let z=a(null);mn(z,!G,te);let[j,Y]=r(!1),[D,I]=ve(),ce=k?.who==="owner"&&!P?{["--agent-accent"]:"var(--accent)"}:ne,ee=Boolean(x?.typing),w=G&&V===0&&k?.who==="agent"&&oe!==void 0&&oe!==k.agent,E=ee&&(!k||k.who==="owner"||w),N=k?sn(k.text,te):"",ie=P||k?.who==="agent"?e("span",{className:"scene-chip",children:e(he,{spec:F?v[F]:void 0,name:F??B,size:34,live:!1})}):null,W=y.some(({card:L})=>L.outcome===void 0),de=n("button",{type:"button",className:"icon-button scene-collapse","aria-expanded":!D,onClick:(L)=>{L.stopPropagation(),I(!D)},children:[e(s,{name:"chevron",style:{rotate:D?"-90deg":"90deg"}}),e("span",{children:D?t("Expand dialogue"):t("Collapse dialogue")})]});return n("section",{className:"scene-box","data-open":i.open||void 0,"data-collapsed":D||void 0,"data-who":k?.who,style:ce,"aria-label":t("Log"),children:[D?n("div",{className:"scene-bar",onClick:()=>I(!1),children:[ie,e("strong",{className:"scene-bar-name",children:B}),e("span",{className:"scene-bar-preview",children:k?rn(k.text):x?.round?Pe(x.round):""}),W?e("span",{className:"scene-bar-asking",children:t("Waiting for your answer")}):null,de]}):n("header",{className:"scene-tab",children:[ie,e("strong",{className:"scene-name",children:B}),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:(L)=>i.onMenu?.(L.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:()=>Y(!0),children:[e(s,{name:"conversations"}),e("span",{children:t("Log")})]}),de]})]}),D?null:i.strip,D?null:n("div",{className:"scene-body",ref:z,children:[e("div",{className:"scene-line","data-live":k?.live||void 0,"aria-live":"polite",...G?{}:{role:"button",tabIndex:0,title:t("Tap to show the whole message"),onClick:K,onKeyDown:(L)=>{if(L.key==="Enter"||L.key===" ")L.preventDefault(),K()}},children:k?n(g,{children:[P&&k.who==="owner"?e("span",{className:"scene-from",children:k.author}):null,e(We,{source:N}),G?e(Nt,{files:k.files}):null]}):null}),E&&x?e(On,{name:w?Z(oe):B,progress:x.progress}):null,y.map(({id:L,card:A})=>e("div",{className:"scene-card",children:e(tr,{card:A,timeZone:f.timeZone})},L))]}),T?.readOnly?null:e("div",{className:"scene-composer",hidden:D,children:e(At,{draftKey:c,name:T?.displayName??c,limits:h,stoppable:Boolean(x?.stoppable),blurAfterSend:i.blurAfterSend===!0,...T?.kind==="group"?{stopLabel:t("Stop the round")}:{},onSend:(L,A)=>m.say(c,L,A),onStop:()=>m.send({type:"stop",room:c})},c)}),e(at,{roomKey:c,open:j,loaded:l.loaded,error:l.error,name:T?.displayName??c,onClose:()=>Y(!1)})]})}var ct=8,dt={views:[],attention:{},loaded:!1},bn=dt,{emit:lt,use:ut}=M(),An=()=>ut(()=>bn);function ai(){let i=ke(rt)?.tier;return i!==void 0&&i!=="owner"}function mt(i,c){return{key:i.key,kind:"agent",name:`${c}.${i.id}`,displayName:i.title,home:!1,readOnly:!1,mode:{yolo:!1,longRunning:!1},typing:!1,stoppable:!1}}var ft=(i)=>i.attention===!0,pt=(i,c)=>(c.lastAt??"").localeCompare(i.lastAt??"");async function gt(i){let c=await Promise.allSettled(i.map((l)=>Ze.list(l))),m=[];c.forEach((l,b)=>{let h=i[b];if(l.status!=="fulfilled"||h===void 0)return;for(let y of l.value.rooms)m.push({room:y,kind:h})}),m.sort((l,b)=>pt(l.room,b.room));let f={};for(let{room:l}of m)if(ft(l))f[l.key]=!0;return{views:m.map(({room:l,kind:b})=>mt(l,b)),attention:f,loaded:!0}}function Uo(i){let c=Ee(),m=d((x)=>x.connects),f=ze((x)=>x.lists),l=a(0),b=a(0),h=i.join(`
115
- `),{views:y}=An();o(()=>{l.current+=1;let x=l.current,T=!0;return gt(h===""?[]:h.split(`
116
- `)).then((O)=>{if(!T||x<b.current)return;b.current=x,bn=O,lt()}),()=>{T=!1}},[h,m,f]);let v=y.slice(0,ct).map((x)=>x.key).join(`
117
- `);o(()=>{let x=v===""?[]:v.split(`
118
- `);for(let T of x)c.send({type:"subscribe",room:T});return()=>{for(let T of x)c.send({type:"unsubscribe",room:T})}},[c,v,m])}var ht=380,bt="cubic-bezier(0.7, 0, 0.84, 0)",yt=2.4,yn=0.35,vt=260,wt="cubic-bezier(0.2, 0.8, 0.2, 1)",St=1.06,xt=700,U;function vn(i){if(U?.host===i&&U.phase==="diving")U.abort()}var kt=(i)=>{if(!i||typeof i.animate!=="function")return;i.animate([{transform:`scale(${St})`,opacity:yn},{transform:"scale(1)",opacity:1}],{duration:vt,easing:wt})};function kn(i,c,m,f){if(U)return;let l=i.closest("main.route")??i;if(Me()||typeof l.animate!=="function"){m();return}f?.();let b=l.getBoundingClientRect(),h=`${c.x-b.left}px ${c.y-b.top}px`,y={overflow:l.style.overflow,events:l.style.pointerEvents};l.style.overflow="hidden",l.style.pointerEvents="none";let v=l.animate([{transformOrigin:h,transform:"scale(1)",opacity:1},{transformOrigin:h,transform:`scale(${yt})`,opacity:yn}],{duration:ht,easing:bt,fill:"forwards"}),x=document.documentElement,T,O,Z=()=>{l.style.overflow=y.overflow,l.style.pointerEvents=y.events,v.cancel()},q=()=>{window.removeEventListener("popstate",k),window.removeEventListener("hashchange",k)},H={host:i,phase:"diving",abort:k};function k(){if(U!==H||H.phase!=="diving")return;q(),Z(),U=void 0}let V=(P)=>{if(U!==H)return;if(O?.disconnect(),clearTimeout(T),x.removeAttribute("data-dive"),Z(),U=void 0,P)kt(document.querySelector("main.route"))};U=H,window.addEventListener("popstate",k),window.addEventListener("hashchange",k),v.finished.then(()=>{if(U!==H||H.phase!=="diving")return;if(H.phase="committing",q(),x.setAttribute("data-dive",""),m(),!i.isConnected){V(!0);return}O=new MutationObserver(()=>{if(!i.isConnected)V(!0)}),O.observe(l.parentElement??document.body,{childList:!0,subtree:!0}),T=setTimeout(()=>V(!i.isConnected),xt)},()=>{return})}var Rt=(i)=>i==="sleepy"?"idle":i;function Rn(i,c){let m={};for(let[l,b]of Object.entries(i))m[l]=Rt(b);let f=(l)=>l!==void 0&&(l in m)&&m[l]!=="waiting"&&m[l]!=="error";for(let l of c){let b=l.agent;if(l.typing&&f(b)){let h=m[b];if(h!=="thinking"&&h!=="working")m[b]="thinking"}}for(let l of c)if(f(l.voice))m[l.voice]="speaking";return m}function Ke(i,c){if(i==="speaking")return"happy";return(c?.STATE_EXPRESSION??Ct)[i]}var Ct={idle:"neutral",thinking:"thinking",working:"determined",waiting:"curious",done:"proud",error:"apologetic",sleepy:"sleepy"};function _e(i,c){return`s${i}${c.toLowerCase().replace(/[^a-z0-9]/g,"")}`.slice(0,16)}var Et={x:-7,y:-3,w:114,h:100},me=256;function Ie(i,c,m,f,l,b,h){let y=i.composeSvg(c,{bare:!0,look:m,expr:Ke(f,i),...h?{mouth:h}:{},state:"idle",still:!0,size:me,uid:l,skins:b}),{x:v,y:x,w:T,h:O}=Et;return y.replace('viewBox="0 0 100 100"',`viewBox="${v} ${x} ${T} ${O}"`).replace(`width="${me}" height="${me}"`,`width="${me}" height="${Math.round(me*O/T)}"`)}function $e(i,c,m,f,l,b){if(f!=="speaking")return{avatarSvg:Ie(i,c,m,f,l,b)};return{avatarSvg:Ie(i,c,m,f,l,b,"closed"),talkSvg:Ie(i,c,m,f,l,b,"open")}}function Cn(i){let c=i.delayMs??300,m=i.timers??{set:(h,y)=>setTimeout(h,y),clear:(h)=>clearTimeout(h)},f=new Map,l=new Map,b=(h)=>{let y=l.get(h);if(y===void 0)return;m.clear(y),l.delete(h)};return{seed(h,y){b(h),f.set(h,Ke(y))},update(h,y){let v=Ke(y);if(!f.has(h)){f.set(h,v);return}if(b(h),f.get(h)===v)return;l.set(h,m.set(()=>{l.delete(h),f.set(h,v),i.setAvatar(h,y)},c))},forget(h){b(h),f.delete(h)},dispose(){for(let h of[...l.keys()])b(h);f.clear()}}}var Mt={idle:u("idle"),thinking:u("thinking"),working:u("working"),waiting:u("waiting"),speaking:u("speaking"),done:u("done"),error:u("error")},Tt=()=>({table:t("Round table"),seat:(i,c)=>t("{name} ({state})",{name:i,state:t(Mt[c])})}),Lt=()=>{He().catch(()=>{return})};function li(i){let c=ai(),{views:m}=An(),f=d((l)=>{let b=l.order.map((y)=>l.rooms[y]?.view).filter((y)=>y!==void 0&&y.kind==="agent"&&!y.helper);return[...i?i.slice(0,Pn).map((y)=>b.find((v)=>v.name===y)).filter((y)=>y!==void 0):b].sort((y,v)=>Number(v.home)-Number(y.home)).slice(0,Pn)},i?.join(`
119
- `)??"");return c?m.slice(0,Pn):f}function ci(){return d((i)=>i.order.map((c)=>i.rooms[c]?.view).filter((c)=>c!==void 0&&c.kind==="agent"&&!c.helper),"agents")}function Ht(i){let c=xe(),m=d((f)=>Object.values(f.rooms).filter((l)=>i?l.key===i:l.view?.kind==="group").map((l)=>{let b=le(l.round),h=b??l.agent,y=l.typing&&l.progress.text!=="";return{key:l.key,typing:l.typing||b!==void 0,...h===void 0?{}:{agent:h},...y&&h!==void 0?{streamer:h}:{}}}),i??"");return C(()=>m.map(({key:f,streamer:l,...b})=>{let h=c[f]??l;return h===void 0?b:{...b,voice:h}}),[m,c])}function Dt(i){return d((c)=>dn(i?c.rooms[i]?.round:void 0),i??"")}function $n(i){let{variant:c="full",onHandle:m}=i,f=In(),l=Ot(),b=Un(),h=xn(),y=De(),v=li(i.members),x=ss(v.map((w)=>w.key)),T=Ht(i.groupRoom),O=Dt(i.groupRoom),Z=An().attention,q=ai(),H=a(q);H.current=q;let k=c==="full"&&i.list===!0,V=C(()=>Rn(Object.fromEntries(v.map((w)=>{let E=x[w.key]??"idle";return[w.name,Z[w.key]&&(E==="idle"||E==="sleepy")?"waiting":E]})),T),[v,x,T,Z]),P=a(V);P.current=V;let F=C(()=>{if(!f)return[];return v.map((w,E)=>{let N=y[w.name]??w.character??pn(f,w);return{id:w.name,name:w.displayName,color:f.accentOf(N,b.look),...$e(f,N,b.look,P.current[w.name]??"idle",_e(E,w.name),h)}})},[f,v,y,b.look,h]),ne=a(F);ne.current=F;let B=a(v);B.current=v;let te=a({look:l,scheme:b.scheme});te.current={look:l,scheme:b.scheme};let G=a(null),K=a(void 0),[J,oe]=r(0),re=a(void 0),ae=a(()=>{return});ae.current=(w)=>{let E=v.find((N)=>N.name===w);if(!f||!E)return;return y[w]??E.character??pn(f,E)};let z=a(b);z.current=b;let j=a(h);j.current=h;let Y=a(f);Y.current=f;let D=a(m);D.current=m;let I=a(i);I.current=i;let ce=f!==void 0&&F.length>0;o(()=>{let w=G.current;if(!ce||!w)return;let E=!0,N,ie=Cn({setAvatar:(W,de)=>{let L=ae.current(W),A=Y.current,ue=B.current.findIndex((be)=>be.name===W);if(!L||!A||ue<0)return;let{avatarSvg:fe,talkSvg:pe}=$e(A,L,z.current.look,de,_e(ue,W),j.current);N?.setAvatar(W,fe,pe)}});return re.current=ie,(async()=>{let{mountRoundTable:W}=await (p("5zmjxadx"),import("./chunk-entry-5zmjxadx.js")),de=ne.current.map((A)=>({...A,state:P.current[A.id]??"idle"})),L=await W(w,{theme:te.current.look,scheme:te.current.scheme,seats:de,onSeatClick:({id:A,at:ue})=>{let fe=I.current.onSeat;if(fe){fe(A);return}let pe=B.current.find((Tn)=>Tn.name===A);if(!pe)return;let be=()=>X("room",pe.key),Be=G.current;if(ue&&Be)kn(Be,ue,be,H.current?Lt:void 0);else be()},...I.current.onSeatMenu?{onSeatMenu:(A)=>I.current.onSeatMenu?.(A)}:{},ownerName:I.current.ownerName??t("You"),focus:I.current.focus??null,onFocus:(A)=>I.current.onFocus?.(A),reducedMotion:"auto",lowPower:"auto",variant:c,listBelow:k,labels:Tt()});if(!E){L.dispose();return}N=L,K.current=L;for(let A of de)ie.seed(A.id,A.state??"idle");D.current?.(L),oe((A)=>A+1)})(),()=>{E=!1,vn(w),ie.dispose(),re.current=void 0,K.current=void 0,D.current?.(void 0),N?.dispose()}},[ce,c,k]);let ee=i.focus??null;if(o(()=>{let w=K.current;if(w&&w.focused()!==ee)w.focus(ee)},[ee,J]),o(()=>{let w=K.current;if(!w||F.length===0)return;let E=P.current;w.setSeats(F.map((N)=>({...N,state:E[N.id]??"idle"})));for(let N of F)re.current?.seed(N.id,E[N.id]??"idle")},[F,J]),o(()=>{let w=K.current;if(!w)return;for(let E of ne.current)w.setMark(E.id,O[E.id]??null)},[O,F,J]),o(()=>{let w=K.current;if(w)w.setTheme(l,b.scheme)},[l,b.scheme,J]),o(()=>{let w=K.current;if(!w)return;for(let E of ne.current){let N=V[E.id]??"idle";w.setState(E.id,N),re.current?.update(E.id,N)}},[V,J]),v.length===0)return e("p",{className:"table-empty",children:t("No knights are seated yet.")});return e("section",{className:"table-host",ref:G,"aria-label":t("Round table")})}function En(i,c){let{line:m}=Fe(i),f=d((O)=>le(O.rooms[i]?.round)),l=xe()[i],[b,h]=r(),y=en(l,f,m,c),v=`${m?.id??""}|${y??""}`;return{focus:an(y,v,b),look:(O)=>h({lineId:v,member:O})}}function Mn(i){let{roomKey:c,members:m}=i,[f]=ve();return n("div",{className:"table-frame room-scene","data-focused":"","data-folded":f||void 0,children:[e($n,{members:m,groupRoom:c,variant:"full",focus:i.focus,onFocus:i.onLook,onSeat:i.onLook,...i.onHandle?{onHandle:i.onHandle}:{},...i.onSeatMenu?{onSeatMenu:i.onSeatMenu}:{}}),e(hn,{roomKey:c,open:!0,streams:i.streams??!1,blurAfterSend:i.blurAfterSend===!0,strip:e(fn,{roomKey:c})})]})}Ii();var Vt=S(()=>(p("a5e6tspr"),import("./chunk-council-sheet-a5e6tspr.js")).then((i)=>({default:i.CouncilSheet}))),Pt=S(()=>(p("ccv271hm"),import("./chunk-mode-toggle-ccv271hm.js")).then((i)=>({default:i.ModeToggle}))),Ft=S(()=>(p("1m2c2ekt"),import("./chunk-room-menu-1m2c2ekt.js")).then((i)=>({default:i.RoomMenu})));function It(i,c,m,f,l){os(i,c).then((b)=>{if(b)ge({...b,at:m,via:f,source:l})},()=>{return})}function Kt(){let i=Ce("(max-width: 719px)"),c=Ce("(pointer: coarse)");return i||c}function Di(i){return e("button",{type:"button",className:"secondary council-chip","aria-haspopup":"dialog",onClick:i.onOpen,children:i.council?t("Council: {name} ▾",{name:i.council.displayName}):t("Pick who sits")})}function Ui(i,c){let[m,f]=r(!1),[l,b]=r(!1),h=()=>{f(!0),b(!0)},y=m?e(Q,{fallback:null,children:e(Vt,{open:l,onClose:()=>b(!1),council:i,...c?{go:c}:{}})}):null;return{ask:h,sheet:y}}function _t(i){let c=(m,f)=>n("label",{"data-checked":i.mode===m,children:[e("input",{type:"radio",name:"table-mode",value:m,checked:i.mode===m,onChange:()=>i.onMode(m)}),f]});return n("fieldset",{className:"segmented table-mode",children:[e("legend",{className:"visually-hidden",children:t("Show the council as")}),c("scene",t("Animation mode")),c("chat",t("Chat mode"))]})}function xr(i){let{roomKey:c}=i,m=Ee(),f=d((w)=>w.rooms[c]),l=d((w)=>w.connection==="open"),b=d((w)=>w.limits),h=Ot(),y=Kt(),v=f?.view,x=v?.members??[],T=li(x),[O,Z]=je(c),[q,H]=r(),{focus:k,look:V}=En(c,x),{ask:P,sheet:F}=Ui(v,i.go),[ne,B]=r(!1),[te,G]=r(!1),K=a(null),[J,oe]=r(),[re,ae]=r(!1);o(()=>(m.focus(c),()=>m.focus(void 0)),[m,c]);let z=v?.displayName??c,j=f?.mode,Y=T.length>0||i.empty===void 0,D=Y&&O==="scene",I=v?.notes===!0,ce=I&&re,ee=I&&J===c&&!ce;return n(g,{children:[n("header",{className:"room-head council-head",children:[i.lead,n("div",{className:"table-tools",children:[D&&q?.kind==="webgl"?e("button",{type:"button",className:"icon-button","aria-label":t("Reset view"),title:t("Reset view"),onClick:()=>V(null),children:e(s,{name:"reset"})}):null,Y?e(_t,{mode:O,onMode:Z}):null,e(Di,{council:v,onOpen:P})]}),e(wn,{}),e("button",{ref:K,type:"button",className:"icon-button","aria-label":t("Room menu"),"aria-haspopup":"dialog",onClick:()=>{G(!0),B(!0)},children:e(s,{name:"menu"})})]}),h==="camelot"&&Y&&!D?e("div",{className:"group-strip",children:e($n,{members:x,groupRoom:c,variant:"compact"})}):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(lr,{room:c,mode:j&&(j.yolo||j.longRunning)?j:void 0,approved:f?.autoApproved??0}),!Y?e("div",{className:"table-frame",children:i.empty}):D?e(Mn,{roomKey:c,members:x,focus:k,onLook:V,blurAfterSend:y,onHandle:H,onSeatMenu:(w)=>{let E=T.find((N)=>N.name===w.id);if(E)It(E.key,c,w.at,w.via,w.source)}}):e("div",{className:"table-chat",children:e(cr,{roomKey:c,name:z,...i.surface?{surface:i.surface}:{},composer:(w)=>v?.readOnly?null:e(At,{draftKey:c,name:z,onAddressed:ae,...I?{placeholder:ee?t("Write an internal note…"):t("Ask AI…"),above:e(Q,{fallback:null,children:e(Pt,{on:!ee,label:t("@AI"),...ce?{locked:t("The message starts with @AI, so the knight answers.")}:{},onChange:(E)=>oe(E?void 0:c)})})}:{},limits:b,stoppable:Boolean(f?.stoppable),stopLabel:t("Stop the round"),blurAfterSend:y,onSend:(E,N,ie)=>{if(I&&ie){let W=gn(E);m.say(c,W===""&&N.length===0?E:W,N,"turn")}else m.say(c,E,N,ee?"note":void 0);w(!0)},onStop:()=>m.send({type:"stop",room:c}),...i.incoming&&i.onIncomingTaken?{incoming:i.incoming,onIncomingTaken:i.onIncomingTaken}:{}},c)})}),F,te?e(Q,{fallback:null,children:e(Ft,{open:ne,room:c,mode:j,muted:v?.muted===!0,agent:void 0,group:v?.name,coordinator:v?.coordinator===!0,displayName:z,readOnly:v?.readOnly??!1,parent:void 0,onClose:()=>B(!1),onAskYolo:()=>{B(!1),we({kind:"yolo",room:c,name:z,restoreFocus:()=>K.current})},onAskStartOver:()=>{B(!1),we({kind:"start-over",room:c,name:z,restoreFocus:()=>K.current})}})}):null]})}
120
- export{Ii,An,ai,Uo,li,ci,$n,Di,Ui,xr};
@@ -1,2 +0,0 @@
1
- var c=new WeakMap;function se(e,t){if(typeof document>"u")return;let n=c.get(document)??new Set;if(n.has(e))return;if(c.set(document,n.add(e)),typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype)try{let d=new CSSStyleSheet;d.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,d];return}catch{}let o=document.createElement("style");o.textContent=t,document.head.append(o)}
2
- export{se};
@@ -1 +0,0 @@
1
- import{je,Zr,jt,Wr,Z,ae,Qi,Yr,Ys,Hs,Hr,js,Ks,Js,_n}from"./chunk-index-r0hk9kyd.js";export{jt as AVATAR_STATES,Z as CATALOG,je as CLASS_IDS,ae as CharacterError,Hs as EAST_ASIAN_SKINS,Zr as EXPRESSIONS,Wr as STATE_EXPRESSION,Ks as accentOf,Js as characterCss,Hr as checkSkins,js as composeSvg,Yr as parseCharacter,Ys as readCharacter,Qi as resolveCharacter,_n as suggestCharacter};
@@ -1,2 +0,0 @@
1
- import{M,h}from"./chunk-index-wt2asefx.js";var uo={page:(e,t,o,c=50)=>h(`rooms/${encodeURIComponent(e)}/messages?archive=${t}&limit=${c}${o===void 0?"":`&before=${o}`}`)},n,{emit:r,use:s}=M();function Ns(e,t){n={room:e,until:t},r()}function Ls(){if(!n)return;n=void 0,r()}var Xs=()=>s(()=>n),i;function zs(e,t){i={author:e,text:t},r()}function fo(){if(!i)return;i=void 0,r()}var Is=()=>s(()=>i);
2
- export{uo,Ns,Ls,Xs,zs,fo,Is};
@@ -1,2 +0,0 @@
1
- import{o,r,l,J}from"./chunk-index-wt2asefx.js";function xe(f,e){let{version:u}=J(),[t,a]=r({data:void 0,error:void 0,subject:e});return o(()=>{let n=!0;return f().then((d)=>{if(n)a({data:d,error:void 0,subject:e})},(d)=>{if(n)a((i)=>({data:i.subject===e?i.data:void 0,error:l(d),subject:e}))}),()=>{n=!1}},[e,u]),t.subject===e?{data:t.data,error:t.error}:{data:void 0,error:void 0}}
2
- export{xe};
@@ -1,2 +0,0 @@
1
- import{p,t}from"./chunk-index-wt2asefx.js";import{yo}from"./chunk-index-hef4gwtb.js";import{Ai,Ds,Us}from"./chunk-index-aycxt14t.js";function ho(e){let n=yo();if(!e)return n;let r=new Set([...e,...Ds(e)]);return Object.fromEntries(Object.entries(n).filter(([s])=>r.has(s)))}var i=()=>(p("5dc4m9ad"),import("./chunk-bulk-actions-5dc4m9ad.js"));function Ei(e){let n=[];if(Object.keys(ho(e)).length>0)n.push({id:"read-all",label:t("Mark all as read"),icon:"check",run:()=>{i().then((r)=>r.markAllRead(e))}});if(Ai(e).size>0)n.push({id:"clear-finished",label:t("Clear all finished threads"),icon:"trash",tone:"danger",run:()=>{i().then((r)=>r.clearAllFinished(e))}});return n.push(...po(e)),n}function po(e){if(Us(e).size===0)return[];return[{id:"clear-helpers",label:t("Clear finished temp knights"),icon:"trash",tone:"danger",run:()=>{i().then((n)=>n.clearFinishedHelpers(e))}}]}
2
- export{ho,Ei,po};
@@ -1,2 +0,0 @@
1
- import{M}from"./chunk-index-wt2asefx.js";var o=!1,{emit:e,use:t}=M();function Xo(){if(o)return;o=!0,e()}function si(){if(!o)return;o=!1,e()}var zo=()=>t(()=>o),Io=()=>o,Do=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);
2
- export{Xo,si,zo,Io,Do};
@@ -1 +0,0 @@
1
- import{M}from"./chunk-index-wt2asefx.js";var a="roundtable-console:folders-collapsed";function i(){try{let e=localStorage.getItem(a),t=e?JSON.parse(e):[];return new Set(Array.isArray(t)?t.filter((o)=>typeof o==="string"):[])}catch{return new Set}}var l,{emit:d,use:c}=M(),n=()=>(l??=i(),l);function s(e){l=e;try{localStorage.setItem(a,JSON.stringify([...e]))}catch{}d()}var Sr=()=>c(n),wr=()=>n();function kr(e){let t=new Set(n());if(!t.delete(e))t.add(e);s(t)}function _r(e){if(!n().has(e))return;let t=new Set(n());t.delete(e),s(t)}function Tr(e){let t=new Set(e),o=n();if([...o].every((r)=>t.has(r)))return;s(new Set([...o].filter((r)=>t.has(r))))}export{Sr,wr,kr,_r,Tr};
@@ -1,2 +0,0 @@
1
- function Ct(e,n){if(e.detail!==0&&(e.clientX!==0||e.clientY!==0))return{x:e.clientX,y:e.clientY};let t=n.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2}}var Gt={table:"Round table",seat:(e,n)=>`${e} (${n})`};
2
- export{Ct,Gt};
@@ -1,2 +0,0 @@
1
- import{M}from"./chunk-index-wt2asefx.js";var e,{emit:o,use:n}=M();function Xe(i){e=i,o()}function Ri(){if(!e)return;e=void 0,o()}var ws=()=>n(()=>e);
2
- export{Xe,Ri,ws};
@@ -1,2 +0,0 @@
1
- import{t,ge,cs,Ti}from"./chunk-index-wt2asefx.js";import{Xe}from"./chunk-index-smz90j6p.js";import{Ei}from"./chunk-index-gp4chnp3.js";function ui(e){let r=e.getBoundingClientRect(),o=cs();ge({title:t("Rooms"),items:[...Ei(),{id:"new-folder",label:t("Add a folder"),icon:"plus",run:()=>Xe({kind:"new"})},{id:"arrange",label:o?t("Done"):t("Arrange"),icon:o?"check":"list",run:()=>Ti(!o)}],at:{x:r.left,y:r.bottom},via:"key",source:e})}
2
- export{ui};