pi-roundtable-web 0.27.1 → 0.29.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 (257) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +25 -9
  3. package/dist/chunk-account-9616x405.js +1 -0
  4. package/dist/chunk-action-menu-q5y7xpry.js +1 -0
  5. package/dist/chunk-agent-x74xezyt.js +1 -0
  6. package/dist/chunk-arranged-rooms-9prq46vh.js +1 -0
  7. package/dist/chunk-bulk-actions-5dc4m9ad.js +1 -0
  8. package/dist/chunk-character-creator-wf02eg0h.js +1 -0
  9. package/dist/chunk-codeeditor-239ss6a2.js +2 -0
  10. package/dist/chunk-confirm-bhrx9195.js +1 -0
  11. package/dist/chunk-connectors-k77pd9by.js +37 -0
  12. package/dist/chunk-conversations-ftcpaqw1.js +1 -0
  13. package/dist/chunk-council-sheet-a5e6tspr.js +2 -0
  14. package/dist/chunk-council-view-6593rqbr.js +1 -0
  15. package/dist/chunk-drag-7873fvzw.js +1 -0
  16. package/dist/chunk-entry-5zmjxadx.js +1 -0
  17. package/dist/chunk-folder-list-h9hmbm8e.js +1 -0
  18. package/dist/chunk-folds-vxq86t1s.js +1 -0
  19. package/dist/chunk-gate-fa6za28z.js +1 -0
  20. package/dist/chunk-host-icons-y6frbzqt.js +1 -0
  21. package/dist/chunk-host-picture-fqg55rbr.js +1 -0
  22. package/dist/chunk-host-state-65tdhkyq.js +1 -0
  23. package/dist/chunk-host-ui-233kz7qp.js +1 -0
  24. package/dist/{chunk-index-j4x9dq30.css → chunk-index-1652v386.css} +1 -1
  25. package/dist/chunk-index-2c00zf3z.js +2 -0
  26. package/dist/chunk-index-2dhrqvba.js +2 -0
  27. package/dist/chunk-index-2s4bkrz3.js +2 -0
  28. package/dist/chunk-index-2ypaqwjy.js +2 -0
  29. package/dist/{chunk-index-k0z507h3.js → chunk-index-35zqk1zr.js} +2 -2
  30. package/dist/chunk-index-39qq37j5.js +2 -0
  31. package/dist/{chunk-index-j7pgphx3.js → chunk-index-3tjmyd1h.js} +2 -2
  32. package/dist/chunk-index-4eag6s50.js +2 -0
  33. package/dist/chunk-index-4jnn2g09.js +2 -0
  34. package/dist/{chunk-index-y60x5jbh.js → chunk-index-4krm48hm.js} +1 -1
  35. package/dist/{chunk-index-w42rcbx1.js → chunk-index-4re5prfp.js} +2 -2
  36. package/dist/chunk-index-57teqgct.js +2 -0
  37. package/dist/{chunk-index-3d8s3565.js → chunk-index-5ssncptg.js} +2 -2
  38. package/dist/{chunk-index-yrmqcay4.js → chunk-index-7c9fn21n.js} +2 -2
  39. package/dist/chunk-index-7k5895sn.js +14 -0
  40. package/dist/chunk-index-93f3e06v.js +2 -0
  41. package/dist/chunk-index-9m9v1p7s.js +2 -0
  42. package/dist/chunk-index-a8c0ap8g.js +2 -0
  43. package/dist/chunk-index-a8nqn3y0.js +3 -0
  44. package/dist/chunk-index-am7ghh75.js +120 -0
  45. package/dist/chunk-index-amspdq2j.js +4 -0
  46. package/dist/chunk-index-amxa2bn3.js +2 -0
  47. package/dist/{chunk-index-nsvwbjfe.js → chunk-index-aycxt14t.js} +2 -2
  48. package/dist/{chunk-index-n05yw5wd.js → chunk-index-bjeg3e2j.js} +2 -2
  49. package/dist/chunk-index-cttrqfm8.js +2 -0
  50. package/dist/chunk-index-dajanzxc.js +1 -0
  51. package/dist/chunk-index-e2eeckhh.js +2 -0
  52. package/dist/chunk-index-e46652wf.js +2 -0
  53. package/dist/chunk-index-ek98d2rn.js +2 -0
  54. package/dist/{chunk-index-f500nw4w.js → chunk-index-en5dm1zv.js} +2 -2
  55. package/dist/chunk-index-evhaaqzk.js +13 -0
  56. package/dist/chunk-index-f4gqzfkv.js +2 -0
  57. package/dist/{chunk-index-ak6ecqy3.js → chunk-index-gj3n4dh5.js} +2 -2
  58. package/dist/chunk-index-gp4chnp3.js +2 -0
  59. package/dist/{chunk-index-af4ebmkr.js → chunk-index-h2a42p6s.js} +3 -3
  60. package/dist/{chunk-index-4z4chg7v.js → chunk-index-haac6nbt.js} +2 -2
  61. package/dist/{chunk-index-3pnvpppa.js → chunk-index-hef4gwtb.js} +2 -2
  62. package/dist/chunk-index-mg96sqpk.js +2 -0
  63. package/dist/chunk-index-nsya88fn.js +1 -0
  64. package/dist/{chunk-index-ben4gv45.js → chunk-index-ntt3em2k.js} +1 -1
  65. package/dist/chunk-index-pcbkp62w.js +2 -0
  66. package/dist/chunk-index-pfs6rm6w.js +2 -0
  67. package/dist/chunk-index-pgxgq61x.js +2 -0
  68. package/dist/{chunk-index-9z13jw6q.js → chunk-index-q33ppq0j.js} +3 -3
  69. package/dist/chunk-index-r0hk9kyd.js +47 -0
  70. package/dist/{chunk-index-0ye10vk3.js → chunk-index-rr73h4kc.js} +3 -3
  71. package/dist/{chunk-index-983dmeaa.js → chunk-index-rtz4936v.js} +3 -3
  72. package/dist/chunk-index-smz90j6p.js +2 -0
  73. package/dist/chunk-index-teyx2hz7.js +2 -0
  74. package/dist/{chunk-index-sm7m4fej.js → chunk-index-v6h43553.js} +2 -2
  75. package/dist/chunk-index-vzqwn3wp.js +2 -0
  76. package/dist/chunk-index-wt2asefx.js +50 -0
  77. package/dist/chunk-index-x4tq9btg.js +2 -0
  78. package/dist/chunk-index-y6p8j3zv.js +2 -0
  79. package/dist/chunk-index-yvcdg5hh.js +2 -0
  80. package/dist/{chunk-index-afrhnrxj.js → chunk-index-zdzzf3fp.js} +2 -2
  81. package/dist/chunk-index-zeqfnkty.js +2 -0
  82. package/dist/chunk-index-zpwb8mkk.js +2 -0
  83. package/dist/chunk-lang-css-avzhvm72.js +1 -0
  84. package/dist/{chunk-lang-dockerfile-cnwqn660.js → chunk-lang-dockerfile-2p7e3ssz.js} +1 -1
  85. package/dist/{chunk-lang-go-yy6kgsxv.js → chunk-lang-go-zxp9k517.js} +3 -3
  86. package/dist/chunk-lang-html-red02gep.js +1 -0
  87. package/dist/chunk-lang-javascript-n33kmjcx.js +1 -0
  88. package/dist/chunk-lang-json-zmym50rg.js +1 -0
  89. package/dist/chunk-lang-markdown-ww2kcs85.js +6 -0
  90. package/dist/chunk-lang-python-ng1zdtd4.js +3 -0
  91. package/dist/chunk-lang-rust-6ynhxjdd.js +1 -0
  92. package/dist/{chunk-lang-shell-1rpgtepw.js → chunk-lang-shell-39t9bz2s.js} +1 -1
  93. package/dist/chunk-lang-sql-w875ejpg.js +2 -0
  94. package/dist/{chunk-lang-toml-tbj7467c.js → chunk-lang-toml-b8ckgkg5.js} +1 -1
  95. package/dist/chunk-lang-typescript-qf8acbb2.js +1 -0
  96. package/dist/chunk-lang-xml-bz91cjp1.js +1 -0
  97. package/dist/chunk-lang-yaml-g9zy0tdv.js +1 -0
  98. package/dist/chunk-layout-actions-fyzzzeyp.js +1 -0
  99. package/dist/chunk-menu-items-yvnk3vds.js +1 -0
  100. package/dist/chunk-mode-toggle-ccv271hm.js +1 -0
  101. package/dist/chunk-note-row-314py1pp.js +204 -0
  102. package/dist/chunk-notes-4rnrddzw.js +1 -0
  103. package/dist/chunk-notice-bell-z9wgamnz.js +1 -0
  104. package/dist/chunk-notices-mtn7pg1z.js +1 -0
  105. package/dist/chunk-onboarding-f3hhxgg4.js +1 -0
  106. package/dist/chunk-overview-qmepntrr.js +1 -0
  107. package/dist/chunk-palette-edkn1ypq.js +1 -0
  108. package/dist/chunk-placement-items-trsa5t23.js +1 -0
  109. package/dist/chunk-profile-pwfq0wns.js +1 -0
  110. package/dist/chunk-prompt-history-xp9hmeqt.js +1 -0
  111. package/dist/chunk-prompts-a56qvytg.js +1 -0
  112. package/dist/chunk-room-confirms-gqpkz4h0.js +1 -0
  113. package/dist/chunk-room-menu-1m2c2ekt.js +1 -0
  114. package/dist/chunk-rooms-menu-button-tcvda1gq.js +1 -0
  115. package/dist/chunk-schedules-kwnw7p8v.js +1 -0
  116. package/dist/{chunk-seat-menu-kwtjnpjj.js → chunk-seat-menu-m2n9nvv0.js} +1 -1
  117. package/dist/chunk-sheet-hosts-pr8xktyq.js +29 -0
  118. package/dist/{chunk-shortcut-help-g5cpqjjj.js → chunk-shortcut-help-sbvrds1m.js} +2 -2
  119. package/dist/chunk-shortcuts-8705p7q3.js +1 -0
  120. package/dist/chunk-skill-editor-7xy09sq1.js +8 -0
  121. package/dist/chunk-skills-cnc25x7q.js +1 -0
  122. package/dist/chunk-start-over-line-97zdd9pb.js +16 -0
  123. package/dist/chunk-switcher-list-ehsn2wsk.js +1 -0
  124. package/dist/{chunk-tab-dot-yse6wcfp.js → chunk-tab-dot-gkpe06q8.js} +1 -1
  125. package/dist/chunk-table-av3kh3tt.js +1 -0
  126. package/dist/chunk-table2d-5x3jptp9.js +1 -0
  127. package/dist/chunk-table3d-rsvajx7r.js +4220 -0
  128. package/dist/chunk-thread-actions-7xtkegwm.js +1 -0
  129. package/dist/{chunk-thread-cards-36rckyg7.js → chunk-thread-cards-grzszfha.js} +1 -1
  130. package/dist/chunk-thread-list-9bjjac3j.js +217 -0
  131. package/dist/chunk-transcript-t5szb8r0.js +1 -0
  132. package/dist/chunk-waiting-chip-d8b6a0p8.js +28 -0
  133. package/dist/chunk-waiting-ts3kxjvv.js +1 -0
  134. package/dist/chunk-where-3d3ncsa5.js +1 -0
  135. package/dist/chunk-workspace-ct6hvn0z.js +578 -0
  136. package/dist/chunk-zh-tw-v9v1eerm.js +1 -0
  137. package/dist/index.html +1 -1
  138. package/dist/sw.js +1 -1
  139. package/package.json +3 -3
  140. package/src/api-types.ts +137 -1
  141. package/src/app/app.ts +4 -7
  142. package/src/app/desk.ts +19 -4
  143. package/src/app/room-log.ts +66 -18
  144. package/src/app/rooms.ts +45 -7
  145. package/src/app/routes.ts +86 -11
  146. package/src/app/skill-doc-routes.ts +12 -2
  147. package/src/app/skill-group-routes.ts +126 -0
  148. package/src/app/surface.ts +26 -2
  149. package/src/app/team-routes.ts +3 -7
  150. package/src/authz.ts +2 -0
  151. package/src/cleanup-api.ts +9 -2
  152. package/src/connector-manage-api.ts +257 -0
  153. package/src/console-api.ts +60 -2
  154. package/src/features.ts +91 -0
  155. package/src/host/reads.ts +10 -1
  156. package/src/i18n/zh-tw.ts +137 -5
  157. package/src/push/channel.ts +1 -0
  158. package/src/web-plugin.ts +8 -1
  159. package/dist/chunk-account-83crfbn4.js +0 -1
  160. package/dist/chunk-action-menu-qw7h03x0.js +0 -1
  161. package/dist/chunk-agent-t1632ktv.js +0 -1
  162. package/dist/chunk-arranged-rooms-sb6tbsxw.js +0 -1
  163. package/dist/chunk-bulk-actions-v1g2bzk7.js +0 -1
  164. package/dist/chunk-character-creator-ye69w0kx.js +0 -1
  165. package/dist/chunk-codeeditor-5j6abj8k.js +0 -2
  166. package/dist/chunk-confirm-x8w877bz.js +0 -1
  167. package/dist/chunk-connectors-t7qbc6nk.js +0 -1
  168. package/dist/chunk-conversations-kmt6qzym.js +0 -1
  169. package/dist/chunk-council-sheet-bxvn7vza.js +0 -2
  170. package/dist/chunk-drag-03zgvd66.js +0 -1
  171. package/dist/chunk-entry-y5vwp5e5.js +0 -1
  172. package/dist/chunk-folder-list-h3vnjzpb.js +0 -1
  173. package/dist/chunk-folds-a3e22m7x.js +0 -1
  174. package/dist/chunk-gate-qzephvdv.js +0 -1
  175. package/dist/chunk-group-scene-w1ycabrm.js +0 -1
  176. package/dist/chunk-group-table-9nvmja8w.js +0 -1
  177. package/dist/chunk-host-icons-fccg3b2d.js +0 -1
  178. package/dist/chunk-host-picture-jaqz127q.js +0 -1
  179. package/dist/chunk-host-state-r01v1ywg.js +0 -1
  180. package/dist/chunk-host-ui-n54mh5af.js +0 -1
  181. package/dist/chunk-index-0a81da8z.js +0 -2
  182. package/dist/chunk-index-1kwp3spy.js +0 -2
  183. package/dist/chunk-index-47vq85ye.js +0 -2
  184. package/dist/chunk-index-5zmswz4s.js +0 -2
  185. package/dist/chunk-index-64rsz6pf.js +0 -2
  186. package/dist/chunk-index-6vcs0h0m.js +0 -2
  187. package/dist/chunk-index-6xqz6mg2.js +0 -2
  188. package/dist/chunk-index-83v0c9x6.js +0 -2
  189. package/dist/chunk-index-8xd6anam.js +0 -2
  190. package/dist/chunk-index-b73y2gc0.js +0 -47
  191. package/dist/chunk-index-bhqczxr3.js +0 -2
  192. package/dist/chunk-index-c44p8q87.js +0 -2
  193. package/dist/chunk-index-cbqhzf40.js +0 -13
  194. package/dist/chunk-index-db8zh8e6.js +0 -2
  195. package/dist/chunk-index-dvfkb699.js +0 -2
  196. package/dist/chunk-index-e02ddp46.js +0 -1
  197. package/dist/chunk-index-ebg48jgy.js +0 -2
  198. package/dist/chunk-index-ek5mek4j.js +0 -14
  199. package/dist/chunk-index-em7vndrb.js +0 -2
  200. package/dist/chunk-index-eq161yvp.js +0 -4
  201. package/dist/chunk-index-f5x2srr0.js +0 -2
  202. package/dist/chunk-index-fg42egv9.js +0 -50
  203. package/dist/chunk-index-h3v1d3nt.js +0 -2
  204. package/dist/chunk-index-kbgykazq.js +0 -2
  205. package/dist/chunk-index-n8ghdvxb.js +0 -2
  206. package/dist/chunk-index-p5jcwjx8.js +0 -2
  207. package/dist/chunk-index-qfgkfq86.js +0 -2
  208. package/dist/chunk-index-rcwdqn50.js +0 -7
  209. package/dist/chunk-index-s72hmse6.js +0 -2
  210. package/dist/chunk-index-sv9qpmhv.js +0 -1
  211. package/dist/chunk-index-x4enmj72.js +0 -2
  212. package/dist/chunk-index-xevnf9ew.js +0 -2
  213. package/dist/chunk-index-xx8jq73q.js +0 -2
  214. package/dist/chunk-index-ypkgw7gq.js +0 -2
  215. package/dist/chunk-lang-css-y9133ktr.js +0 -1
  216. package/dist/chunk-lang-html-r2xmryek.js +0 -1
  217. package/dist/chunk-lang-javascript-1r6wd177.js +0 -1
  218. package/dist/chunk-lang-json-dx56g11y.js +0 -1
  219. package/dist/chunk-lang-markdown-fpcf2dfq.js +0 -6
  220. package/dist/chunk-lang-python-zzp95955.js +0 -3
  221. package/dist/chunk-lang-rust-214fh7sp.js +0 -1
  222. package/dist/chunk-lang-sql-vvp46hpj.js +0 -2
  223. package/dist/chunk-lang-typescript-y5w4tt4g.js +0 -1
  224. package/dist/chunk-lang-xml-tbcqmedk.js +0 -1
  225. package/dist/chunk-lang-yaml-jh56t3sv.js +0 -1
  226. package/dist/chunk-layout-actions-8dzvysym.js +0 -1
  227. package/dist/chunk-menu-items-3jhya205.js +0 -2
  228. package/dist/chunk-mode-toggle-js49gvpd.js +0 -1
  229. package/dist/chunk-note-row-kv061030.js +0 -75
  230. package/dist/chunk-notes-sdkqz5hr.js +0 -1
  231. package/dist/chunk-notice-bell-r012f2zy.js +0 -1
  232. package/dist/chunk-notices-h4rk1zxc.js +0 -1
  233. package/dist/chunk-onboarding-a18cvkph.js +0 -1
  234. package/dist/chunk-overview-ynaqn4fp.js +0 -1
  235. package/dist/chunk-palette-jm79gb5q.js +0 -1
  236. package/dist/chunk-placement-items-mwm9q1zn.js +0 -1
  237. package/dist/chunk-profile-ajw6pp4r.js +0 -1
  238. package/dist/chunk-prompt-history-zcfvr3r8.js +0 -1
  239. package/dist/chunk-prompts-m5rzdk24.js +0 -1
  240. package/dist/chunk-room-confirms-ftsj15ja.js +0 -1
  241. package/dist/chunk-room-menu-b9ktw9pw.js +0 -1
  242. package/dist/chunk-rooms-menu-button-qe62t6nx.js +0 -1
  243. package/dist/chunk-schedules-t8yxnf8q.js +0 -1
  244. package/dist/chunk-sheet-hosts-yj5wszgj.js +0 -1
  245. package/dist/chunk-shortcuts-9ft5sqdw.js +0 -1
  246. package/dist/chunk-skill-editor-xdfq2708.js +0 -8
  247. package/dist/chunk-skills-9wa4mwdc.js +0 -1
  248. package/dist/chunk-switcher-list-vpg6wvtw.js +0 -1
  249. package/dist/chunk-table-1y76m54h.js +0 -1
  250. package/dist/chunk-table2d-g57vr6h0.js +0 -1
  251. package/dist/chunk-table3d-cv6069hy.js +0 -4220
  252. package/dist/chunk-thread-actions-xjhpdjk7.js +0 -1
  253. package/dist/chunk-thread-list-fd6agz77.js +0 -217
  254. package/dist/chunk-transcript-5nfn3r35.js +0 -1
  255. package/dist/chunk-where-ha8pc3cg.js +0 -1
  256. package/dist/chunk-workspace-e85twv32.js +0 -578
  257. package/dist/chunk-zh-tw-z5p5mpph.js +0 -1
@@ -0,0 +1 @@
1
+ import{Nn,Mr,Rr,Mt,an,ln,mi,Zo}from"./chunk-index-4re5prfp.js";import"./chunk-index-zeqfnkty.js";import{Ct,Gt}from"./chunk-index-pgxgq61x.js";var pe="http://www.w3.org/2000/svg",t=(d,s={},y)=>{let k=document.createElementNS(pe,d);for(let[S,G]of Object.entries(s))k.setAttribute(S,String(G));return y?.appendChild(k),k},ne=(d)=>{let s=/<svg[^>]*\swidth=/.test(d)?d:d.replace("<svg",'<svg width="256" height="256"');return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`},ye=0;function xe(d,s){let y=s||d<=6?1:2;return{rows:y,perRow:Math.max(1,Math.ceil(d/y))}}function $e(d,s){let y=`t2d${++ye}`,k=window.matchMedia("(prefers-reduced-motion: reduce)"),S=s.reducedMotion==="auto"||s.reducedMotion===void 0?k.matches:s.reducedMotion,G=s.labels??Gt,{theme:z,scheme:q}=s,v=[],B=new Map,A=new Map,R=new Map,N=new Map,C=s.focus??null,E=document.createElement("div");E.className="t2d";let m=t("svg",{role:"group","aria-label":G.table});if(E.appendChild(m),getComputedStyle(d).position==="static")d.style.position="relative";d.appendChild(E);function ie(e,r,a){let o=Math.max(1.6,a*0.022),u=o+Math.max(1.2,a*0.014),l=t("filter",{id:`${y}-rim`,x:"-15%",y:"-15%",width:"130%",height:"130%"},e);t("feMorphology",{in:"SourceAlpha",operator:"dilate",radius:u,result:"far"},l),t("feFlood",{"flood-color":r.ink,result:"ink"},l),t("feComposite",{in:"ink",in2:"far",operator:"in",result:"line"},l),t("feMorphology",{in:"SourceAlpha",operator:"dilate",radius:o,result:"near"},l),t("feFlood",{"flood-color":r.paper,result:"paper"},l),t("feComposite",{in:"paper",in2:"near",operator:"in",result:"rim"},l);let c=t("feMerge",{},l);for(let b of["line","rim","SourceGraphic"])t("feMergeNode",{in:b},c)}function x(){let e=Nn(z,q);E.classList.toggle("reduced",S),E.classList.toggle("focus",C!==null),E.classList.toggle("dim",v.some((i)=>R.get(i.id)==="speaking"));let r=s.variant==="compact",a=Math.max(d.clientWidth,200),o=Math.max(d.clientHeight,r?60:200);m.setAttribute("viewBox",`0 0 ${a} ${o}`),m.replaceChildren();let u=Math.max(v.length,1),{rows:l,perRow:c}=xe(u,r);t("rect",{width:a,height:o,fill:e.css.bg},m);let b=t("defs",{},m),T=a/2,O=r?o*0.82:o*0.62;if(t("ellipse",{cx:T,cy:O,rx:a*0.47,ry:r?o*0.2:o*0.34,fill:e.css.floor,stroke:e.ink,"stroke-width":2},m),!r)t("ellipse",{cx:T,cy:O,rx:a*0.3,ry:o*0.2,fill:"none",stroke:e.css.ring,"stroke-width":3,opacity:e.night?0.9:0.7},m);let I=a/c,V=r?o*0.95:o/(l+0.6),g=Math.max(46,Math.min(I*0.94,132,V*1.05)),h=g*0.72,n=g*1.05;ie(b,e,n),v.forEach((i,w)=>{let M=t("radialGradient",{id:`${y}-h${w}`},b);t("stop",{offset:0,"stop-color":i.color,"stop-opacity":0.95},M),t("stop",{offset:1,"stop-color":i.color,"stop-opacity":0},M)});let se=(i)=>{if(r)return o*0.92;return l===1?o*0.62:o*(0.46+i*0.3)};if(v.forEach((i,w)=>{let M=Math.floor(w/c),ae=Math.min(c,u-M*c),le=w-M*c,ce=a/ae*(le+0.5),de=se(M),F=R.get(i.id)??"idle",f=t("g",{class:"seat","data-seat":i.id,"data-state":F,...C===i.id?{"data-focus":""}:{},transform:`translate(${ce.toFixed(1)} ${de.toFixed(1)})`,tabindex:s.listBelow?-1:0,role:"button","aria-label":G.seat(i.name,F),color:e.css.text,...s.listBelow?{"aria-hidden":"true"}:{}},m);t("ellipse",{cx:0,cy:3,rx:g*0.55,ry:g*0.1,fill:"#000",opacity:0.35},f),t("ellipse",{class:"halo",cx:0,cy:-h-n*0.35,rx:n*0.8,ry:n*0.8,fill:`url(#${y}-h${w})`},f),t("polygon",{class:"beam",points:`${-n*0.12},${-n*2.1} ${n*0.12},${-n*2.1} ${n*0.5},0 ${-n*0.5},0`,fill:i.color,opacity:0.2},f);let _=t("g",{class:"lift"},f),Z=B.get(i.id);if(Z){let p={x:-n/2,y:-h-n*0.78,width:n,height:n*0.88,filter:`url(#${y}-rim)`};t("image",{href:ne(Z),...p,...i.dim?{opacity:0.55}:{}},_);let oe=A.get(i.id);if(F==="speaking"&&oe&&!S){let ge=t("image",{class:"talk",href:ne(oe),...p,opacity:0},_),{frames:he,seconds:ue}=Zo(w);t("animate",{attributeName:"opacity",values:he.join(";"),dur:`${ue.toFixed(3)}s`,calcMode:"discrete",repeatCount:"indefinite"},ge)}}else{t("circle",{cx:0,cy:-h-n*0.3,r:n*0.3,fill:i.color,stroke:e.ink,"stroke-width":2},_);let p=t("text",{x:0,y:-h-n*0.3+n*0.1,"text-anchor":"middle","font-size":n*0.3,"font-weight":700,fill:"#fff","font-family":Mt},_);p.textContent=Array.from(i.name)[0]?.toUpperCase()??"?"}let J=h*0.22;t("path",{d:`M ${-g*0.5} ${-h} L ${g*0.5} ${-h} L ${g*0.42} 0 L ${-g*0.42} 0 Z`,fill:e.wood,stroke:e.ink,"stroke-width":2,"stroke-linejoin":"round"},f),t("rect",{x:-g*0.54,y:-h-J*0.2,width:g*1.08,height:J,rx:2,fill:e.woodLight,stroke:e.ink,"stroke-width":2},f);let L=Math.max(11,Math.min(15,g*0.14)),j=Math.min(Math.max(g*0.9,L*5.5+14),Math.max(g*0.9,i.name.length*L*0.62+18),I*0.98),fe=L+8;t("rect",{class:"plate",x:-j/2,y:-h*0.78,width:j,height:fe,rx:3,fill:e.gold,stroke:e.ink,"stroke-width":2},f);let me=t("text",{x:0,y:-h*0.78+L+1.5,"text-anchor":"middle","font-size":L,"font-weight":700,"font-family":Mt,fill:e.plateInk},f),Q=N.get(i.id);me.textContent=Rr(Q?`${Q} ${i.name}`:i.name,(j-8)/L);let ee=t("g",{class:"badge"},t("g",{transform:`translate(${n*0.4} ${-h-n*0.78})`},f)),D=F==="done",P=F==="error",U=e.gold;if(D)U=Mr.done;else if(P)U=Mr.error;t("circle",{r:n*0.15,fill:U,stroke:e.ink,"stroke-width":2},ee);let W=t("text",{x:0,y:n*0.06,"text-anchor":"middle","font-size":n*0.2,"font-weight":800,"font-family":Mt,fill:D||P?"#fff":e.ink},ee);if(W.textContent="!",D)W.textContent="✓";else if(P)W.textContent="✕";let te=t("g",{class:"orbit"},f);t("circle",{cx:n*0.4,cy:-h-n*0.5,r:n*0.05,fill:i.color},te),t("circle",{cx:-n*0.4,cy:-h-n*0.5,r:n*0.035,fill:i.color,opacity:0.6},te),f.addEventListener("click",(p)=>s.onSeatClick({id:i.id,name:i.name,at:Ct(p,f)})),f.addEventListener("keydown",(p)=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),s.onSeatClick({id:i.id,name:i.name,at:Ct({clientX:0,clientY:0,detail:0},f)})})}),!r){let i=Math.min(a*0.34,190),w=o-6;t("rect",{x:T-i/2,y:w-22,width:i,height:22,rx:4,fill:e.wood,stroke:e.ink,"stroke-width":2},m);let M=t("text",{x:T,y:w-7,"text-anchor":"middle","font-size":12,"font-weight":700,"font-family":Mt,fill:e.gold},m);M.textContent=Rr(s.ownerName??"You",12)}}let H=new Set,re=(e,r)=>{if(e.mode==="cut")return;let a=Nn(z,q),o=(u,l)=>{let c=setTimeout(()=>{H.delete(c),u()},l);H.add(c)};for(let u of e.joining){let l=[...m.querySelectorAll("g.seat[data-seat]")].find((c)=>c.getAttribute("data-seat")===u);if(!l)continue;l.classList.add("seat-in"),l.prepend(t("ellipse",{class:"seat-ring",rx:44,ry:12,cy:4,stroke:a.css.ring})),o(()=>{l.classList.remove("seat-in"),l.querySelector(".seat-ring")?.remove()},ln)}for(let u of e.leaving){let l=r.get(u);if(!l)continue;let c=l.cloneNode(!0);c.classList.add("seat-out");for(let b of["data-seat","tabindex","role","aria-label"])c.removeAttribute(b);c.setAttribute("aria-hidden","true");for(let[b,[T,O,I]]of[[-26,-24,20],[24,-20,22],[0,-52,24],[-4,-4,26]].entries()){let V=t("circle",{class:"puff",cx:T,cy:O,r:I,fill:a.paper,stroke:a.ink,"stroke-width":3},c);V.style.animationDelay=`${b*40}ms`}m.appendChild(c),o(()=>c.remove(),an)}},Y=new ResizeObserver(x);Y.observe(d);let X=()=>{if(s.reducedMotion==="auto"||s.reducedMotion===void 0)K.setReducedMotion(k.matches)};k.addEventListener("change",X);let K={kind:"svg",setTheme(e,r){z=e,q=r,x()},setSeats(e){let r=v.map((o)=>o.id),a=new Map([...m.querySelectorAll("g.seat[data-seat]")].map((o)=>[o.getAttribute("data-seat")??"",o]));v=e;for(let o of e){if(R.set(o.id,o.state??"idle"),o.avatarSvg)B.set(o.id,o.avatarSvg);if(o.talkSvg)A.set(o.id,o.talkSvg);else A.delete(o.id)}if(x(),r.length>0||a.size>0)re(mi(r,e.map((o)=>o.id),S),a)},setState(e,r){if(R.get(e)===r)return;R.set(e,r),x()},setMark(e,r){if((N.get(e)??null)===r)return;if(r===null)N.delete(e);else N.set(e,r);x()},setAvatar(e,r,a){if(B.set(e,r),a)A.set(e,a);else A.delete(e);return x(),Promise.resolve()},setReducedMotion(e){S=e,x()},resetCamera(){C=null,x(),s.onFocus?.(null)},focus(e){if(e===C)return;C=e,x()},focused:()=>C,getStats(){return{kind:"svg",fps:0,frameMs:0,frameMsMax:0,drawCalls:0,triangles:0,textures:0,geometries:0,dpr:1,lowPower:!1,reduced:S,loop:"idle",seats:v.length,renders:0}},dispose(){for(let e of H)clearTimeout(e);H.clear(),Y.disconnect(),k.removeEventListener("change",X),E.remove()}};return K.setSeats(s.seats),K}export{$e as createTable2D};