@bkm016/basalt 0.1.8 → 0.1.10

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 (258) hide show
  1. package/{chunk-0039s4jt.js → chunk-02d3x4mj.js} +3 -3
  2. package/{chunk-ky55taar.js → chunk-0mjb3sm3.js} +327 -316
  3. package/{chunk-ckjw3b61.js → chunk-13gvs0ax.js} +2 -2
  4. package/{chunk-0d51ggzj.js → chunk-1n7dat03.js} +4 -4
  5. package/{chunk-ppxv5q7y.js → chunk-1zj3zvw5.js} +3 -3
  6. package/{chunk-2ek3wq4b.js → chunk-29qrxygd.js} +1 -1
  7. package/{chunk-7p6e2f5s.js → chunk-30rjf7my.js} +3 -3
  8. package/{chunk-v2srrqcv.js → chunk-38g3gctw.js} +2 -2
  9. package/chunk-3mqf9ped.js +479 -0
  10. package/{chunk-3j2kkgsc.js → chunk-4dw43syb.js} +1 -1
  11. package/{chunk-t66jqz12.js → chunk-4gtgqcct.js} +2 -2
  12. package/{chunk-qmdpgbg3.js → chunk-755sy11p.js} +1 -1
  13. package/{chunk-n015c8nx.js → chunk-7zkswxvk.js} +1 -1
  14. package/{chunk-91r5nvth.js → chunk-82v8jh1h.js} +2 -2
  15. package/{chunk-12trygzx.js → chunk-95964592.js} +16 -16
  16. package/{chunk-nmtk9xra.js → chunk-9as0p561.js} +2 -2
  17. package/{chunk-pn413hjw.js → chunk-a1352w87.js} +1 -1
  18. package/{chunk-rnt1ckk9.js → chunk-a1rb1a48.js} +5 -5
  19. package/{chunk-fzcmzbsq.js → chunk-a98wma9j.js} +1 -1
  20. package/{chunk-kgkrccr1.js → chunk-asyr3gnq.js} +2 -2
  21. package/{chunk-5gxj9560.js → chunk-ax04trym.js} +1 -1
  22. package/chunk-b2bxqeb4.js +2 -0
  23. package/{chunk-xjw78yey.js → chunk-bdjr0kfr.js} +4 -4
  24. package/{chunk-7kjr9gdx.js → chunk-bk4rpnm8.js} +2 -2
  25. package/{chunk-47vf66t6.js → chunk-c0zfefq8.js} +1 -1
  26. package/{chunk-kpvaqb7c.js → chunk-c6q04xrd.js} +2 -2
  27. package/chunk-c71173py.js +25 -0
  28. package/{chunk-adys4qq4.js → chunk-cmwdjes8.js} +5 -5
  29. package/{chunk-dcwdmpw2.js → chunk-d0a1jxk5.js} +1 -1
  30. package/{chunk-2nrkqq45.js → chunk-d5j74pcp.js} +7 -7
  31. package/{chunk-pkpj7s2k.js → chunk-dfh9m9n7.js} +1 -1
  32. package/{chunk-26cz8et8.js → chunk-dq01v5eq.js} +1 -1
  33. package/{chunk-fpxc6qjr.js → chunk-e1x629v0.js} +2 -2
  34. package/{chunk-86xhmz7k.js → chunk-en218k4y.js} +1 -1
  35. package/{chunk-3hg7yn1t.js → chunk-fgwda4m0.js} +1 -1
  36. package/chunk-gbjn6d81.js +2 -0
  37. package/{chunk-x496kg3v.js → chunk-gkf5jwvj.js} +1 -1
  38. package/{chunk-k3q5jqjj.js → chunk-hb4f2v34.js} +2 -2
  39. package/{chunk-mr807v9n.js → chunk-hbnmymaq.js} +1 -1
  40. package/{chunk-818nd6s1.js → chunk-jj4hqbrx.js} +2 -2
  41. package/{chunk-jyv9cae6.js → chunk-jn5pqy5v.js} +1 -1
  42. package/{chunk-yyy2yp6f.js → chunk-jtsve11b.js} +9 -9
  43. package/chunk-m1eam0s5.js +2 -0
  44. package/{chunk-6vnjg5x9.js → chunk-mbpb5c7w.js} +1 -1
  45. package/{chunk-t40fag3z.js → chunk-msm9hmk9.js} +1 -1
  46. package/{chunk-j781n7ca.js → chunk-n0ybj4h9.js} +2 -2
  47. package/{chunk-jp5afrwm.js → chunk-n2jcx65v.js} +2 -2
  48. package/{chunk-2ks2tnac.js → chunk-nrsd810j.js} +2 -2
  49. package/chunk-pnspvnyd.js +2 -0
  50. package/chunk-pz2afna8.js +2 -0
  51. package/{chunk-d37gemt2.js → chunk-q9f4xb0w.js} +3 -3
  52. package/{chunk-hd3x1w46.js → chunk-qaeyhe65.js} +1 -1
  53. package/chunk-qnkrrwmg.js +2 -0
  54. package/{chunk-e6c2mzxc.js → chunk-r4ttdkrz.js} +2 -2
  55. package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
  56. package/{chunk-g3ed130w.js → chunk-tevejprz.js} +4 -4
  57. package/{chunk-k3rmjrf1.js → chunk-v3ee9z3f.js} +1 -1
  58. package/{chunk-4n49ptbz.js → chunk-vtqr7dm8.js} +2 -2
  59. package/{chunk-z3ch1wg6.js → chunk-xh444pfn.js} +14 -14
  60. package/{chunk-pehyqj8k.js → chunk-zc9ar0r4.js} +1 -1
  61. package/{chunk-ef9yhnk3.js → chunk-zyyzk5ha.js} +1 -1
  62. package/compiled.js +9 -9
  63. package/package.json +1 -1
  64. package/ui-test-worker.js +8 -8
  65. package/web/chunk-045d3b5d.js +1 -0
  66. package/web/{chunk-r4ffr96e.js → chunk-0770q5e1.js} +1 -1
  67. package/web/chunk-12qf1r6m.js +1 -0
  68. package/web/{chunk-s7e93552.js → chunk-18neka5g.js} +4 -4
  69. package/web/{chunk-et8q775x.js → chunk-1ev0n3n4.js} +5 -5
  70. package/web/chunk-1ex3wgms.js +2 -0
  71. package/web/{chunk-svh2gkx8.js → chunk-1qh7f5kr.js} +1 -1
  72. package/web/{chunk-s38s9ff9.js → chunk-26ecc2xh.js} +30 -30
  73. package/web/chunk-2cz7tx8q.js +1 -0
  74. package/web/chunk-32ty2xfn.js +1 -0
  75. package/web/{chunk-q1xxs319.js → chunk-3eexx7y5.js} +4 -4
  76. package/web/{chunk-v14s4vgc.js → chunk-46jnkghq.js} +1 -1
  77. package/web/chunk-4am8j3k3.js +1 -0
  78. package/web/{chunk-85gdsmt4.js → chunk-5qvmefq2.js} +1 -1
  79. package/web/chunk-5svqfj4g.js +3 -0
  80. package/web/{chunk-f93pe4kb.js → chunk-5v5q13hz.js} +4 -4
  81. package/web/chunk-5z2n4z9x.css +1 -0
  82. package/web/{chunk-qcge7d6s.js → chunk-6e87m0nm.js} +2 -2
  83. package/web/chunk-6y55gk1n.js +1 -0
  84. package/web/chunk-7np1jp3x.js +8 -0
  85. package/web/chunk-87e8d1hv.js +1 -0
  86. package/web/{chunk-33w36n91.js → chunk-88wd49xe.js} +2 -2
  87. package/web/chunk-8h2x89tw.js +2 -0
  88. package/web/chunk-8y2526ve.js +1 -0
  89. package/web/chunk-905vw286.js +2 -0
  90. package/web/chunk-918e5t4x.js +2 -0
  91. package/web/chunk-96m2m3e8.js +1 -0
  92. package/web/chunk-9f4zzqbx.js +1 -0
  93. package/web/{chunk-fe31sv6t.js → chunk-9yfftz38.js} +1 -1
  94. package/web/{chunk-z0zrp8n8.js → chunk-a1n4468c.js} +1 -1
  95. package/web/chunk-arnzrqnm.js +1 -0
  96. package/web/{chunk-c01176kn.js → chunk-awkdw9rw.js} +2 -2
  97. package/web/{chunk-m5y2d4zv.js → chunk-b46ws7rf.js} +1 -1
  98. package/web/chunk-bc3ajvfg.js +24 -0
  99. package/web/chunk-bwy3e58v.js +1 -0
  100. package/web/{chunk-ja7w629n.js → chunk-c57f714b.js} +2 -2
  101. package/web/chunk-d5gshd1a.js +1 -0
  102. package/web/chunk-de40q05r.js +30 -0
  103. package/web/chunk-dp0k5vhd.js +1 -0
  104. package/web/{chunk-qq2v8h6d.js → chunk-dv1berk6.js} +5 -5
  105. package/web/{chunk-jzte2phh.js → chunk-eh7wp62z.js} +1 -1
  106. package/web/{chunk-823b7866.js → chunk-ehtmb6sn.js} +18 -18
  107. package/web/{chunk-d9wdsjkk.js → chunk-eqndhs21.js} +2 -2
  108. package/web/chunk-et1hytyv.js +1 -0
  109. package/web/chunk-f7jpakwh.js +1 -0
  110. package/web/chunk-f9m9seam.js +1 -0
  111. package/web/{chunk-7a4xk6j9.js → chunk-fmmrthpa.js} +5 -5
  112. package/web/{chunk-fv6vm14n.js → chunk-frnh4zqf.js} +2 -2
  113. package/web/chunk-g2erm7k0.js +1 -0
  114. package/web/chunk-g3kbn0t2.js +1 -0
  115. package/web/{chunk-h5cfg3vv.js → chunk-g7dc4hrd.js} +2 -2
  116. package/web/{chunk-dgwkqcz6.js → chunk-g7kz8f7q.js} +2 -2
  117. package/web/chunk-ght0t49g.js +1 -0
  118. package/web/{chunk-jjjtv2r1.js → chunk-ghwm7bdj.js} +2 -2
  119. package/web/{chunk-sda7cyrt.js → chunk-grm2208k.js} +21 -21
  120. package/web/{chunk-0zwc2rvh.js → chunk-gsw1tv96.js} +1 -1
  121. package/web/chunk-gw8x1g61.js +24 -0
  122. package/web/chunk-gx340asc.js +1 -0
  123. package/web/chunk-h2txs73e.js +39 -0
  124. package/web/chunk-h3tkacc7.js +1 -0
  125. package/web/{chunk-cyjnert7.js → chunk-h5ckjk48.js} +16 -16
  126. package/web/{chunk-1s8zg6fb.js → chunk-j37p0b13.js} +5 -5
  127. package/web/chunk-j89s11x8.js +78 -0
  128. package/web/{chunk-jam45rqg.js → chunk-jccz14ye.js} +2 -2
  129. package/web/chunk-je78j3vr.js +1 -0
  130. package/web/chunk-jke2ev6m.js +2 -0
  131. package/web/{chunk-1gx0zpmp.js → chunk-js6kb05s.js} +9 -9
  132. package/web/{chunk-30b33r2w.js → chunk-k0cg4n2k.js} +2 -2
  133. package/web/{chunk-tkp72r9b.js → chunk-knm82fw9.js} +1 -1
  134. package/web/{chunk-xb9m0092.js → chunk-kxdtg9dt.js} +1 -1
  135. package/web/{chunk-w37n09px.js → chunk-m4fxd5d9.js} +10 -10
  136. package/web/chunk-m9xzt9p7.js +1 -0
  137. package/web/{chunk-8773nwdc.js → chunk-myd6sc76.js} +1 -1
  138. package/web/{chunk-sf101c23.js → chunk-mykrm8ba.js} +2 -2
  139. package/web/chunk-mzzaet63.js +1 -0
  140. package/web/{chunk-2axwda8c.js → chunk-n4yzs2q0.js} +7 -7
  141. package/web/{chunk-wj3ymejj.js → chunk-nawxgz87.js} +4 -4
  142. package/web/chunk-ngt1j8py.js +1139 -0
  143. package/web/{chunk-hstbgb83.js → chunk-p55vhns6.js} +5 -5
  144. package/web/{chunk-xabcx3ry.js → chunk-pgwf37s2.js} +3 -3
  145. package/web/chunk-q34as3v6.js +1 -0
  146. package/web/{chunk-dtg5yhhs.js → chunk-q4bst4an.js} +1 -1
  147. package/web/chunk-qdzy124b.js +4 -0
  148. package/web/chunk-qe0bgeda.js +1 -0
  149. package/web/{chunk-sd3cdqcm.js → chunk-qh62nkem.js} +2 -2
  150. package/web/{chunk-j1bw5v1g.js → chunk-qq6m2my8.js} +2 -2
  151. package/web/{chunk-8dp7h6w8.js → chunk-qy1zx2yw.js} +16 -16
  152. package/web/chunk-rag65pfs.js +4 -0
  153. package/web/chunk-rbqnre6q.js +36 -0
  154. package/web/{chunk-hbkasy6c.js → chunk-rh3xb76f.js} +22 -22
  155. package/web/{chunk-fx4mackk.js → chunk-rwfmccmh.js} +4 -4
  156. package/web/{chunk-mf6xng5b.js → chunk-rxvm70w5.js} +2 -2
  157. package/web/chunk-sat7zyva.js +1 -0
  158. package/web/{chunk-cn0tmwjs.js → chunk-sc63488q.js} +2 -2
  159. package/web/{chunk-xsz1dfm2.js → chunk-sd3xat3r.js} +20 -20
  160. package/web/{chunk-nky3bqfg.js → chunk-se4h6wx0.js} +1 -1
  161. package/web/chunk-sjkg40ay.js +7 -0
  162. package/web/chunk-sk0hpa80.js +1 -0
  163. package/web/{chunk-xqyazzm7.js → chunk-t5nvgz7z.js} +5 -5
  164. package/web/{chunk-3q0v8w45.js → chunk-tfqarvdx.js} +80 -80
  165. package/web/{chunk-d0m0h0eb.js → chunk-tqze6d6b.js} +1 -1
  166. package/web/{chunk-rbdvc8x7.js → chunk-tt93zbn4.js} +7 -7
  167. package/web/chunk-tvcxrx6h.js +1 -0
  168. package/web/chunk-tzpnh70q.js +1 -0
  169. package/web/{chunk-8wg44w91.js → chunk-vasppf6b.js} +2 -2
  170. package/web/chunk-vb7g4xg6.js +1 -0
  171. package/web/chunk-w3zgfhjb.js +2 -0
  172. package/web/{chunk-0j9a7811.js → chunk-wrevb4ew.js} +6 -6
  173. package/web/chunk-wtvch4ad.js +106 -0
  174. package/web/chunk-wzfe6jtq.js +1 -0
  175. package/web/{chunk-cez1k71m.js → chunk-x5g1yy12.js} +1 -1
  176. package/web/chunk-x850q01z.js +1 -0
  177. package/web/chunk-xh4xn1az.js +1 -0
  178. package/web/chunk-xk904wqv.js +1 -0
  179. package/web/chunk-xtn305fd.js +1 -0
  180. package/web/chunk-xzwxcxb4.js +1 -0
  181. package/web/{chunk-4anjs6yp.js → chunk-y2rzeb4v.js} +2 -2
  182. package/web/chunk-yekaz74b.js +1 -0
  183. package/web/{chunk-8nv7q5ac.js → chunk-yppgejg7.js} +15 -15
  184. package/web/chunk-ys2tns0p.js +1 -0
  185. package/web/chunk-z4bp6p32.js +62 -0
  186. package/web/{chunk-p0cjvjdx.js → chunk-z5qn0xev.js} +1 -1
  187. package/web/{chunk-rkjkynm3.js → chunk-zms6mrqk.js} +12 -12
  188. package/web/{chunk-6e38yf3a.js → chunk-zse05v6j.js} +4 -4
  189. package/web/{chunk-cn1xpg3q.js → chunk-zz1qkaar.js} +2 -2
  190. package/web/index.html +1 -1
  191. package/worker.js +1 -1
  192. package/chunk-2gcp3xdc.js +0 -2
  193. package/chunk-320174qe.js +0 -2
  194. package/chunk-dvb5nd2x.js +0 -2
  195. package/chunk-frt9k18g.js +0 -480
  196. package/chunk-ndt6rjt9.js +0 -2
  197. package/chunk-xy2bxwq8.js +0 -2
  198. package/chunk-yzevjkms.js +0 -25
  199. package/chunk-zdyd8hbn.js +0 -2
  200. package/web/chunk-0jfda4jw.js +0 -2
  201. package/web/chunk-2p3fkhy8.js +0 -1
  202. package/web/chunk-3sz5qcwj.js +0 -1
  203. package/web/chunk-433c80pc.js +0 -1
  204. package/web/chunk-48cnmhvd.js +0 -106
  205. package/web/chunk-5r37rwq1.js +0 -4
  206. package/web/chunk-6bwgdvf6.js +0 -1
  207. package/web/chunk-7f1t7z72.js +0 -2
  208. package/web/chunk-7x35g67d.js +0 -78
  209. package/web/chunk-8pzg8qw4.js +0 -1
  210. package/web/chunk-8r0s8tx7.js +0 -1
  211. package/web/chunk-9p5dfvav.js +0 -1
  212. package/web/chunk-9q9w9pay.js +0 -1
  213. package/web/chunk-a3teqvz2.js +0 -39
  214. package/web/chunk-ahztazsg.js +0 -1
  215. package/web/chunk-bd8ftfxn.js +0 -3
  216. package/web/chunk-c03bt2pz.js +0 -1
  217. package/web/chunk-c1ha2xg6.js +0 -8
  218. package/web/chunk-cgng31df.js +0 -1
  219. package/web/chunk-cvd4f51j.js +0 -1
  220. package/web/chunk-cybvxssy.js +0 -1
  221. package/web/chunk-d22wq71s.js +0 -1
  222. package/web/chunk-dynajx8x.js +0 -2
  223. package/web/chunk-f3vv7n52.js +0 -1
  224. package/web/chunk-fmthkpff.js +0 -1
  225. package/web/chunk-fpa81dv7.js +0 -62
  226. package/web/chunk-g17n6asp.js +0 -1
  227. package/web/chunk-g9dzaw9e.js +0 -30
  228. package/web/chunk-gcwhx3av.js +0 -1139
  229. package/web/chunk-gf8vm6b5.js +0 -1
  230. package/web/chunk-gnmeyy4h.js +0 -1
  231. package/web/chunk-hn7mhsbg.js +0 -1
  232. package/web/chunk-jfvxxp5c.js +0 -1
  233. package/web/chunk-k8h8zx6r.js +0 -24
  234. package/web/chunk-m3ajw575.js +0 -1
  235. package/web/chunk-mbwwj216.js +0 -1
  236. package/web/chunk-mz9b5bsa.js +0 -1
  237. package/web/chunk-np33kmn4.js +0 -1
  238. package/web/chunk-nvk8mazs.js +0 -1
  239. package/web/chunk-nyw5ewgv.js +0 -1
  240. package/web/chunk-p56dcqpr.js +0 -1
  241. package/web/chunk-pdn4r8x4.js +0 -1
  242. package/web/chunk-qpt34d8d.js +0 -1
  243. package/web/chunk-qskt3tqa.js +0 -1
  244. package/web/chunk-qt3n897m.js +0 -4
  245. package/web/chunk-r1rt48h9.js +0 -1
  246. package/web/chunk-r7tgd2fm.js +0 -7
  247. package/web/chunk-rznszqmy.js +0 -1
  248. package/web/chunk-s1pefd34.js +0 -1
  249. package/web/chunk-sc29azev.js +0 -1
  250. package/web/chunk-t4jc4nac.js +0 -1
  251. package/web/chunk-t7g366a5.js +0 -24
  252. package/web/chunk-thbqwq6b.js +0 -1
  253. package/web/chunk-v94v68xg.js +0 -36
  254. package/web/chunk-wcphswcx.js +0 -2
  255. package/web/chunk-wwcnvyjh.css +0 -1
  256. package/web/chunk-xce8n339.js +0 -1
  257. package/web/chunk-xfd3b01q.js +0 -1
  258. package/web/chunk-xtss82z2.js +0 -1
@@ -1 +0,0 @@
1
- import{o,i,r,vt,g,e,n,b,s,Q,st,ie,tr,Z}from"./chunk-gcwhx3av.js";var re=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],_=s("at-sign",re);var le=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],J=s("file-code-2",le);var ce=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],X=s("maximize-2",ce);var me=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],G=s("notebook-pen",me);var de=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Y=s("user",de);var R={approve:{label:"通过",text:"text-success",ring:"ring-success/80",soft:"bg-success/12 text-success"},reject:{label:"反对",text:"text-danger",ring:"ring-danger/80",soft:"bg-danger/12 text-danger"},abstain:{label:"弃权",text:"text-dim",ring:"ring-line-strong",soft:"bg-raised text-dim"},pending:{label:"未表态",text:"text-faint",ring:"ring-line",soft:"bg-raised text-faint"}},ee={thinking:"思考中",reading:"查阅中",speaking:"发言中",idle:"等待中",error:"出错",aborted:"已中止"},H={success:"text-success",warning:"text-warning",danger:"text-danger",neutral:"text-faint"},q={success:"bg-success",warning:"bg-warning",danger:"bg-danger",neutral:"bg-faint"};function j(a){return a==="thinking"||a==="reading"||a==="speaking"}function F(a){let u=a.members.filter((y)=>y.verdict==="approve").length,f=a.members.filter((y)=>y.verdict==="reject").length;if(a.state==="running"){if(a.phase==="research")return{tone:"warning",label:"调研中"};if(a.phase==="opening")return{tone:"warning",label:"开场表态"};return{tone:"warning",label:"群聊交流"}}if(a.state==="consensus"){if(u===a.members.length)return{tone:"success",label:"全票通过"};if(f===a.members.length)return{tone:"danger",label:"全票反对"};if(f>u)return{tone:"danger",label:"共识:反对"};return{tone:"success",label:"共识:通过"}}if(a.state==="diverged")return{tone:"warning",label:"存在分歧"};if(a.state==="error")return{tone:"danger",label:"失败"};return{tone:"neutral",label:"已中止"}}function B(a){let u=Math.max(1,Math.round(a/1000));if(u<60)return`${u}s`;return`${Math.floor(u/60)}m ${String(u%60).padStart(2,"0")}s`}var pe={research:"调研",opening:"开场表态",discussion:"群聊交流"};function U(a){let{cn:u}=b(),{room:f}=a,y=F(f),v=f.state==="running",h=f.research?["research","opening","discussion"]:["opening","discussion"],m=v?h.indexOf(f.phase==="closed"?"discussion":f.phase??"discussion"):-1,t=[...h.map((p,c)=>({key:p,label:pe[p],done:!v||c<m,active:c===m})),{key:"closed",label:v?"结论":y.label,done:!v,active:!1}];return e("ol",{className:u("flex min-w-0 gap-1",a.className),children:t.map((p,c)=>{let N=c===t.length-1&&!v;return n("li",{className:"min-w-0 flex-1",children:[e("span",{className:u("block h-[3px] rounded-full transition-colors duration-300",N?q[y.tone]:p.active?"bg-accent animate-pulse":p.done?"bg-line-strong":"bg-line/60")}),e("span",{className:u("mt-1.5 block truncate text-[11px]",N?u("font-medium",H[y.tone]):p.active?"font-medium text-ink":p.done?"text-dim":"text-faint"),children:p.label})]},p.key)})})}function te(a){let{Collapsible:u,CollapsibleContent:f,Composer:y,Markdown:v,cn:h,confirm:m}=b(),{room:t,onClose:p}=a,[c,N]=r(!1),[M,w]=r(""),[O,d]=r(!1),[T,z]=r(),[E,L]=r(!1),[S,P]=r(!0),A=i(null),x=i(null),k=t.state==="running",I=F(t),D=new Map(t.members.map((l)=>[l.id,l]));o(()=>{let l=(W)=>{if(W.key==="Escape"&&!W.defaultPrevented)N(!0)},C=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l),document.body.style.overflow=C}},[]);let V=t.messages.length;o(()=>{let l=x.current;if(!l||!S||V===0)return;l.scrollTo({top:l.scrollHeight,behavior:"smooth"})},[V,S]);let ne=async(l)=>{await a.onPost(l),P(!0)},se=async()=>{if(O)return;if(!await m({title:"中止理事会?",description:"所有成员会立即停止,已有发言保留。",action:"中止",danger:!0}))return;d(!0),z(void 0);try{await a.onAbort()}catch(C){z(C instanceof Error?C.message:"中止理事会失败")}finally{d(!1)}},K=(l)=>{w((C)=>C.includes(`@${l}`)?C:`${C?`${C.trimEnd()} `:""}@${l} `),A.current?.focus()},ae=t.members.filter((l)=>l.verdict==="approve").length,oe=t.members.filter((l)=>l.verdict==="reject").length;return vt(n("div",{role:"dialog","aria-modal":"true","aria-label":`理事会:${t.topic}`,onAnimationEnd:(l)=>{if(c&&l.target===l.currentTarget)p()},className:h("fixed inset-0 z-50 flex flex-col bg-bg text-ink",c?"pointer-events-none animate-dialog-out":"animate-dialog-in"),children:[n(u,{open:E,onOpenChange:L,className:"shrink-0 border-b border-line px-4 pt-3 pb-3 sm:px-6",children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-3 text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-[0.2em] text-dim",children:"COUNCIL"}),e("span",{className:"tabular-nums",children:B(a.elapsedMs)}),n("span",{className:"tabular-nums",children:[t.messages.length," 条发言"]})]}),n("button",{type:"button","aria-expanded":E,onClick:()=>L((l)=>!l),className:"mt-0.5 flex max-w-full cursor-pointer items-center gap-1.5 text-left",children:[e("h2",{className:"truncate text-base font-semibold sm:text-lg",children:t.topic}),e(ie,{className:h("size-4 shrink-0 text-faint transition-transform duration-300 ease-out-quint",!E&&"-rotate-90")})]})]}),n("div",{className:"flex shrink-0 items-center gap-1",children:[n("span",{className:h("inline-flex items-center gap-1.5 rounded-full border border-line px-2.5 py-1 text-xs font-medium",H[I.tone]),children:[e("span",{className:h("size-1.5 rounded-full",q[I.tone],k&&"animate-pulse")}),I.label]}),e("button",{type:"button","aria-label":"关闭理事会页面",title:"关闭(Esc)",onClick:()=>N(!0),className:"ml-1 inline-flex size-8 cursor-pointer items-center justify-center rounded-full text-faint transition-colors hover:bg-raised hover:text-ink",children:e(Z,{className:"size-4"})})]})]}),e(f,{children:e("div",{className:"mt-2 max-h-48 overflow-y-auto rounded-xl bg-panel px-3.5 py-2.5 text-[13px] leading-relaxed text-dim",children:e(v,{text:t.brief})})}),e(U,{room:t,className:"mt-3"})]}),n("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[n("aside",{className:"flex shrink-0 gap-2 overflow-x-auto border-b border-line p-3 md:w-72 md:flex-col md:overflow-x-visible md:overflow-y-auto md:border-r md:border-b-0 md:p-4",children:[n("div",{className:"hidden items-center justify-between text-[11px] text-faint md:flex",children:[e("span",{className:"font-medium tracking-wide",children:"席位"}),n("span",{className:"tabular-nums",children:[e("span",{className:"text-success",children:ae})," / ",e("span",{className:"text-danger",children:oe})," /"," ",t.members.length]})]}),t.members.map((l)=>e(ue,{member:l,onMention:()=>K(l.name),onOpen:()=>a.onOpenMember(l.childSessionID)},l.id))]}),n("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e("div",{ref:x,onScroll:(l)=>{let C=l.currentTarget;P(C.scrollHeight-C.scrollTop-C.clientHeight<80)},className:"min-h-0 flex-1 overflow-y-auto",children:n("div",{className:"mx-auto w-full max-w-3xl px-4 py-5 sm:px-6",children:[t.messages.length===0?n("div",{className:"flex flex-col items-center justify-center gap-3 py-24 text-center text-faint",children:[k?e(Q,{className:"size-5 animate-spin"}):null,e("p",{className:"text-sm",children:k?t.phase==="research"?"成员正在各自调研,笔记不会进入群聊":"成员正在独立准备开场观点,彼此不可见":"这场理事会没有产生发言"})]}):e("ol",{className:"space-y-5",children:t.messages.map((l)=>e(xe,{message:l,membersByID:D,onMention:()=>K(l.senderName)},l.floor))}),t.summary&&!k&&n("section",{className:"mt-8 rounded-2xl border border-line bg-panel px-4 py-3",children:[n("h3",{className:h("text-xs font-semibold",H[I.tone]),children:["结论:",I.label]}),e("div",{className:"mt-1.5 text-[13px] leading-relaxed text-dim",children:e(v,{text:t.summary})})]})]})}),e("div",{className:"shrink-0 px-4 pb-4 sm:px-6",children:n("div",{className:"mx-auto w-full max-w-3xl",children:[T&&e("p",{role:"status",className:"px-1 pb-2 text-[13px] text-danger",children:T}),e(y,{draftKey:`council:${t.roomID}`,placeholder:k?"插话,@ 某位成员会点名要求其回应":"理事会已结束,插话会重新唤醒成员",busy:k,allowAttachments:!1,text:M,onTextChange:w,inputRef:A,onSend:ne,onAbort:()=>void se()})]})})]})]})]}),document.body)}function ue(a){let{Collapsible:u,CollapsibleContent:f,Markdown:y,ModelIcon:v,cn:h}=b(),{member:m}=a,[t,p]=r(!1),c=R[m.verdict]??R.pending,N=j(m.status),M=N&&m.activeTool?m.activeTool:ee[m.status];return n(u,{open:t,onOpenChange:p,className:"w-60 shrink-0 rounded-xl border border-line bg-panel/60 p-2.5 md:w-auto",children:[n("div",{className:"flex items-center gap-2.5",children:[e("span",{className:h("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",c.ring),children:e(v,{modelID:m.model,className:"size-4",size:16})}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"truncate text-[13px] font-medium",title:m.model,children:m.name}),e("span",{className:h("shrink-0 rounded px-1 text-[10.5px] font-medium",c.soft),children:c.label})]}),n("div",{className:h("flex min-w-0 items-center gap-1 text-[11px]",N?"text-accent":"text-faint"),children:[N&&e(Q,{className:"size-3 shrink-0 animate-spin"}),e("span",{className:"truncate",children:M})]})]})]}),n("div",{className:"mt-2 flex items-center gap-1 text-[11px] text-faint",children:[n("span",{className:"tabular-nums",children:["发言 ",m.turns??0," 次"]}),e("span",{className:"ml-auto"}),m.notes&&n("button",{type:"button","aria-expanded":t,onClick:()=>p((w)=>!w),className:h("inline-flex cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 hover:bg-raised hover:text-ink",t&&"text-ink"),children:[e(G,{className:"size-3"}),"笔记"]}),e("button",{type:"button","aria-label":`@ ${m.name}`,title:`@ ${m.name}`,onClick:a.onMention,className:"inline-flex cursor-pointer items-center rounded p-1 hover:bg-raised hover:text-ink",children:e(_,{className:"size-3"})}),e("button",{type:"button","aria-label":`查看 ${m.name} 的推理过程`,title:"查看推理与工具调用",onClick:a.onOpen,className:"inline-flex cursor-pointer items-center rounded p-1 hover:bg-raised hover:text-ink",children:e(st,{className:"size-3"})})]}),m.notes&&e(f,{children:e("div",{className:"mt-2 max-h-56 overflow-y-auto rounded-lg bg-bg/60 px-2.5 py-2 text-xs leading-relaxed text-dim",children:e(y,{text:m.notes})})})]})}function xe(a){let{Code:u,Collapsible:f,CollapsibleContent:y,Markdown:v,ModelIcon:h,cn:m}=b(),{message:t}=a,[p,c]=r(!1),N=t.senderID==="user"||t.senderID==="host",M=t.verdict&&t.verdict!=="pending"?R[t.verdict]:void 0,w=t.evidences??[],O=(t.mentions??[]).map((d)=>a.membersByID.get(d)).filter((d)=>d!==void 0);return n("li",{id:`council-floor-${t.floor}`,className:"group flex gap-3 animate-fade",children:[e("span",{className:m("mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full",N?"bg-accent/12 text-accent":"bg-raised"),children:t.senderModel?e(h,{modelID:t.senderModel,className:"size-4",size:16}):e(Y,{className:"size-4"})}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs",children:[e("span",{className:"font-semibold text-ink",title:t.senderModel,children:t.senderName}),n("a",{href:`#council-floor-${t.floor}`,className:"font-mono text-[11px] text-faint hover:text-dim",onClick:(d)=>d.preventDefault(),children:["#",t.floor]}),M&&e("span",{className:m("rounded px-1.5 py-px text-[10.5px] font-medium",M.soft),children:M.label}),!N&&n("button",{type:"button",onClick:a.onMention,className:"ml-auto inline-flex cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-faint opacity-0 transition-opacity group-hover:opacity-100 hover:bg-raised hover:text-ink focus-visible:opacity-100",children:[e(_,{className:"size-3"}),"回复"]})]}),(t.replyToFloor||O.length>0)&&n("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-[11px] text-faint",children:[t.replyToFloor&&n("button",{type:"button",onClick:()=>document.getElementById(`council-floor-${t.replyToFloor}`)?.scrollIntoView({block:"center",behavior:"smooth"}),className:"inline-flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-md bg-raised/70 px-1.5 py-0.5 hover:text-ink",children:[e(tr,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0 text-dim",children:["#",t.replyToFloor," ",t.replyToName]}),t.replyToPreview&&e("span",{className:"truncate",children:t.replyToPreview})]}),O.map((d)=>n("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent/10 px-1.5 py-0.5 text-accent",children:[e(_,{className:"size-3"}),d.name]},d.id))]}),e("div",{className:"mt-1.5 break-words text-[13.5px] leading-relaxed text-ink/90 [&_p]:my-1.5 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:e(v,{text:t.text})}),w.length>0&&n(f,{open:p,onOpenChange:c,className:"mt-2",children:[n("button",{type:"button","aria-expanded":p,onClick:()=>c((d)=>!d),className:"inline-flex max-w-full cursor-pointer items-center gap-1 text-[11px] text-faint hover:text-ink",children:[e(J,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0",children:["查阅 ",w.length," 处"]}),!p&&e("span",{className:"truncate font-mono",children:w.map((d)=>d.label).join(",")}),e(ie,{className:m("size-3 shrink-0 transition-transform duration-300 ease-out-quint",!p&&"-rotate-90")})]}),e(y,{children:e("div",{className:"mt-1.5 space-y-1.5",children:w.map((d)=>n("div",{className:"overflow-hidden rounded-lg border border-line bg-panel text-xs",children:[e("div",{className:"truncate border-b border-line/70 px-2.5 py-1 font-mono text-[11px] text-dim",children:d.label}),d.snippet&&e(u,{code:d.snippet,lang:d.lang||"ts",className:"max-h-40 overflow-auto px-2.5 py-1.5 text-[11.5px]"})]},`${d.tool}:${d.label}:${d.snippet?.slice(0,32)??""}`))})})]})]})]})}function He(a){let{ModelIcon:u,cn:f,useTheme:y}=b();y();let{connection:v,sessionID:h,payload:m,onOpen:t}=a,p=m,[c,N]=r(p),[M,w]=r(!1),[O,d]=r(Date.now);o(()=>{N(p)},[p]);let T=c.state==="running",z=`/api/sessions/${encodeURIComponent(h)}/council/${encodeURIComponent(c.roomID)}`;o(()=>{if(!T)return;let x=!1,I=setInterval(()=>{if(v.request(z).then((D)=>{if(!x&&D&&typeof D==="object"&&"roomID"in D)N(D)}).catch(()=>{}),!x)d(Date.now())},1200);return()=>{x=!0,clearInterval(I)}},[v,z,T]);let E=async(x)=>{let k=await v.request(`${z}/post`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:x})});N(k)},L=async()=>{let x=await v.request(`${z}/kill`,{method:"POST"});N(x)},S=(T?O:c.updatedAt)-c.createdAt,P=c.messages.at(-1),A=c.members.filter((x)=>j(x.status)).length;return n(g,{children:[n("button",{type:"button","aria-label":`进入理事会:${c.topic}`,onClick:()=>w(!0),className:"group relative my-2 block w-full cursor-pointer overflow-hidden rounded-2xl border border-line bg-panel text-left transition-colors hover:border-line-strong animate-fade",children:[n("div",{className:"px-4 pt-3.5",children:[n("div",{className:"flex items-center gap-1.5 text-[11px] text-faint",children:[e("span",{className:"font-medium text-dim",children:"理事会"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{className:"tabular-nums",children:B(S)}),n("span",{className:"ml-auto tabular-nums",children:[c.members.length," 位成员"]})]}),e("h4",{className:"mt-1 truncate text-sm font-semibold text-ink",title:c.topic,children:c.topic})]}),e(U,{room:c,className:"mt-3 px-4"}),e("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-2 px-4",children:c.members.map((x)=>{let k=R[x.verdict]??R.pending,I=j(x.status);return n("span",{className:"flex min-w-0 items-center gap-1.5 text-xs",title:x.model,children:[n("span",{className:f("relative flex size-6 shrink-0 items-center justify-center rounded-full bg-raised ring-2",k.ring),children:[e(u,{modelID:x.model,className:"size-3.5",size:14}),I&&e(Q,{className:"absolute -right-1 -bottom-1 size-3 animate-spin rounded-full bg-panel text-accent"})]}),e("span",{className:"truncate text-dim",children:x.name}),e("span",{className:f("shrink-0 text-[11px]",k.text),children:k.label})]},x.id)})}),n("div",{className:"mt-3 flex items-center gap-2 border-t border-line/70 px-4 py-2.5 text-xs",children:[P?n(g,{children:[e("span",{className:"shrink-0 font-medium text-dim",children:P.senderName}),e("span",{className:"min-w-0 flex-1 truncate text-faint",children:P.text.replace(/\s+/g," ")})]}):e("span",{className:"min-w-0 flex-1 truncate text-faint",children:T?`${A} 位成员正在${c.phase==="research"?"调研":"思考"}…`:"没有发言"}),n("span",{className:"inline-flex shrink-0 items-center gap-1 text-faint transition-colors group-hover:text-ink",children:[c.messages.length>0&&n("span",{className:"tabular-nums",children:[c.messages.length," 条"]}),e(X,{className:"size-3.5"})]})]})]}),M&&e(te,{room:c,elapsedMs:S,onClose:()=>w(!1),onOpenMember:t,onPost:E,onAbort:L})]})}export{He as CouncilCard};
@@ -1,8 +0,0 @@
1
- import{t}from"./chunk-3q0v8w45.js";import"./chunk-8wg44w91.js";import{Ai,Ri}from"./chunk-hbkasy6c.js";import"./chunk-p0cjvjdx.js";import"./chunk-dynajx8x.js";import"./chunk-cn0tmwjs.js";import"./chunk-svh2gkx8.js";var o=t((r)=>`${Ai(r)}
2
- .swimlane.cluster:not([data-color-id]) rect {
3
- stroke: ${r.clusterBorder} !important;
4
- }
5
- [data-look="neo"].cluster rect {
6
- filter: none;
7
- }
8
- `,"getStyles"),m=o,D=Ri({styles:m});export{D as diagram};
@@ -1 +0,0 @@
1
- import{Ti}from"./chunk-8dp7h6w8.js";export{Ti as createArchitectureServices};
@@ -1 +0,0 @@
1
- import{xi}from"./chunk-8dp7h6w8.js";export{xi as createCynefinServices};
@@ -1 +0,0 @@
1
- import{yi}from"./chunk-8dp7h6w8.js";export{yi as createTreemapServices};
@@ -1 +0,0 @@
1
- import{ai}from"./chunk-c01176kn.js";export{ai as default};
@@ -1,2 +0,0 @@
1
- import{z,De}from"./chunk-3q0v8w45.js";var n=(r,o)=>z.lang.round(De.parse(r)[o]),Bt=n;
2
- export{Bt};
@@ -1 +0,0 @@
1
- import{h,o,Y,r,e,n,b,K,J}from"./chunk-gcwhx3av.js";import{qt}from"./chunk-7f1t7z72.js";var O="/api/plugins/prompt-optimizer";function j({connection:g}){let{Button:f,ModelSelector:k,Select:L,SettingActions:A,SettingGroup:v,SettingRow:x,cn:C}=b(),M=Y(),[m,w]=r(null),[s,p]=r(null),[B,E]=r({models:[]}),[u,z]=r(!0),[R,I]=r(!1),[l,N]=r(!1),[d,a]=r(null),y=h(async(i=!1)=>{if(i)I(!0);else z(!0);a(null);try{let[t,c]=await Promise.all([g.request(`${O}/settings`),g.request("/api/models")]);w(t),p(t),E(c)}catch(t){a({type:"error",text:t instanceof Error?t.message:"读取优化插件设置失败"})}finally{z(!1),I(!1)}},[g]);o(()=>{y()},[y]);let P=s&&m?s.primaryModel?.providerID!==m.primaryModel?.providerID||s.primaryModel?.modelID!==m.primaryModel?.modelID||s.maxClarificationRounds!==m.maxClarificationRounds:!1,T=async(i)=>{if(i?.preventDefault(),!s||l||u)return;N(!0),a(null);try{let t=await g.request(`${O}/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({schemaVersion:1,revision:s.revision,primaryModel:s.primaryModel,maxClarificationRounds:s.maxClarificationRounds})});w(t),p(t),a({type:"success",text:"设置已保存"})}catch(t){a({type:"error",text:t instanceof Error?t.message:"保存设置失败"})}finally{N(!1)}},q=()=>{p(m),a(null)},S=s?.primaryModel??null,G=S?`${S.providerID}/${S.modelID}`:"";return n("form",{id:M,onSubmit:T,className:"min-w-0 space-y-5",children:[e(v,{title:"模型",children:n(x,{title:"优化模型",description:"未选择时拒绝改写,不会自动回退到其他模型",children:[e("div",{className:"w-56",children:e(k,{variant:"field",models:B,value:G,onChange:(i)=>{let t=i.indexOf("/"),c=t<0?"":i.slice(0,t),V=t<0?i:i.slice(t+1);p((D)=>D?{...D,primaryModel:{providerID:c,modelID:V}}:null),a(null)}})}),e(f,{type:"button",size:"icon-sm",variant:"ghost",disabled:u||R||l,"aria-label":"刷新模型列表",title:"刷新模型列表",onClick:()=>void y(!0),className:"text-dim",children:e(J,{className:C("size-3.5",R&&"animate-spin")})})]})}),e(v,{title:"交互",children:e(x,{title:"澄清提问轮数",description:"草稿有关键歧义时,模型最多可反问几轮",children:e("div",{className:"w-56",children:e(L,{value:String(s?.maxClarificationRounds??1),disabled:u||l,onValueChange:(i)=>{let t=i==="2"?2:1;p((c)=>c?{...c,maxClarificationRounds:t}:null),a(null)},groups:[{options:[{value:"1",label:"单轮澄清(推荐)",description:"提问一次后直接输出改写结果"},{value:"2",label:"最多两轮澄清",description:"首轮澄清后可针对残留疑问追问一次"}]}]})})})}),n(A,{children:[d&&n("span",{role:d.type==="error"?"alert":"status",className:C("mr-auto flex min-w-0 items-center gap-1.5 text-xs",d.type==="success"?"text-success":"text-danger"),children:[d.type==="success"?e(qt,{className:"size-3.5 shrink-0"}):e(K,{className:"size-3.5 shrink-0"}),e("span",{className:"min-w-0 break-words",children:d.text})]}),P&&e(f,{type:"button",variant:"ghost",size:"sm",disabled:u||l,onClick:q,children:"撤销更改"}),e(f,{form:M,type:"submit",variant:"primary",size:"sm",disabled:u||l||!P,children:l?"保存中…":"保存"})]})]})}export{j as PromptOptimizerSettingsSection};
@@ -1 +0,0 @@
1
- import{ct}from"./chunk-30b33r2w.js";export{ct as default};
@@ -1,62 +0,0 @@
1
- import{G}from"./chunk-jzte2phh.js";import{t,a,ke,D,x,B,C,S,E,T,A,L,R,V,U}from"./chunk-3q0v8w45.js";import{ee}from"./chunk-8dp7h6w8.js";var gt=t(()=>({domains:new Map,transitions:[]}),"createDefaultData"),nt=gt(),Bt=t(()=>nt.domains,"getDomains"),St=t(()=>nt.transitions,"getTransitions"),Mt=t((e)=>{if(!e)return;for(let n of e){let o=n.domain,r=(n.items??[]).map((l)=>({label:l.label}));nt.domains.set(o,{name:o,items:r})}},"setDomains"),zt=t((e)=>{if(!e)return;nt.transitions=e.filter((n)=>{if(n.from===n.to)return a.warn(`Cynefin: self-loop transition on domain "${n.from}" is not meaningful and will be skipped.`),!1;return!0}).map((n)=>({from:n.from,to:n.to,label:n.label||void 0}))},"setTransitions"),Lt=t(()=>U({...D.cynefin,...x().cynefin}),"getConfig"),Nt=t(()=>{C(),nt=gt()},"clear"),rt={getDomains:Bt,getTransitions:St,setDomains:Mt,setTransitions:zt,getConfig:Lt,clear:Nt,setAccTitle:S,getAccTitle:E,setDiagramTitle:L,getDiagramTitle:R,getAccDescription:A,setAccDescription:T},Pt=t((e)=>{G(e,rt),rt.setDomains(e.domains),rt.setTransitions(e.transitions)},"populate"),It={parse:t(async(e)=>{let n=await ee("cynefin",e);a.debug(n),Pt(n)},"parse")};function et(e){let n=e+1831565813|0;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}t(et,"seededRandom");function ht(e){let n=0;for(let o=0;o<e.length;o++){let r=e.charCodeAt(o);n=(n<<5)-n+r,n|=0}return n}t(ht,"hashString");function xt(e,n){if(typeof e==="number"&&Number.isFinite(e)&&e!==0)return e;return ht(n)}t(xt,"resolveSeed");function $t(e,n,o,r){let l=e/2,p=r??e*0.015,ot=7,Q=n/7,f=[];for(let i=0;i<=7;i++){let y=et(o+i*17)*p*2-p;f.push({x:l+y,y:i*Q})}let N=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.y+c.y)/2,k=i%2===0?1:-1,h=p*1.5*k*et(o+i*31+7),Z=y.x+h,J=m,K=c.x-h;N+=` C${Z},${J} ${K},${m} ${c.x},${c.y}`}return N}t($t,"generateFoldPath");function bt(e,n,o,r){let l=n/2,p=r??n*0.015,ot=7,Q=e/7,f=[];for(let i=0;i<=7;i++){let y=et(o+i*23)*p*2-p;f.push({x:i*Q,y:l+y})}let N=`M${f[0].x},${f[0].y}`;for(let i=0;i<f.length-1;i++){let y=f[i],c=f[i+1],m=(y.x+c.x)/2,k=i%2===0?1:-1,h=p*1.5*k*et(o+i*37+11),Z=m,J=y.y+h,K=m,Y=c.y-h;N+=` C${Z},${J} ${K},${Y} ${c.x},${c.y}`}return N}t(bt,"generateHorizontalBoundary");function wt(e,n){let o=e/2,r=n*0.5,l=n,p=e*0.03;return[`M${o},${r}`,`C${o+p},${r+(l-r)*0.2}`,`${o-p*1.5},${r+(l-r)*0.55}`,`${o+p*0.5},${r+(l-r)*0.75}`,`C${o-p},${r+(l-r)*0.85}`,`${o+p*0.3},${r+(l-r)*0.95}`,`${o},${l}`].join(" ")}t(wt,"generateCliffPath");function Ct(e,n,o,r){return[`M${e-o},${n}`,`A${o},${r} 0 1,1 ${e+o},${n}`,`A${o},${r} 0 1,1 ${e-o},${n}`,"Z"].join(" ")}t(Ct,"generateConfusionPath");var ut={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Wt=t((e,n)=>{let o=e/2,r=n/2;return{complex:{cx:o/2,cy:r/2,x:0,y:0,w:o,h:r},complicated:{cx:o+o/2,cy:r/2,x:o,y:0,w:o,h:r},chaotic:{cx:o/2,cy:r+r/2,x:0,y:r,w:o,h:r},clear:{cx:o+o/2,cy:r+r/2,x:o,y:r,w:o,h:r},confusion:{cx:o,cy:r,x:o*0.7,y:r*0.7,w:o*0.6,h:r*0.6}}},"getDomainLayouts"),Rt=t(()=>{let e=ke(),n=x();return U(e,n.themeVariables).cynefin},"getCynefinDomainColors"),ct=3,Ft=t((e,n,o,r)=>{let l=r.db,p=l.getDomains(),ot=l.getTransitions(),Q=l.getDiagramTitle(),f=l.getAccTitle(),N=l.getAccDescription(),i=l.getConfig(),y=Rt();a.debug("Rendering Cynefin diagram");let{width:c,height:m,padding:k,showDomainDescriptions:h,boundaryAmplitude:Z}=i,J=c+k*2,K=m+k*2,Y={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},P=V(n);if(B(P,K,J,i.useMaxWidth??!0),P.attr("viewBox",`0 0 ${J} ${K}`),f)P.append("title").text(f);if(N)P.append("desc").text(N);let I=P.append("g").attr("transform",`translate(${k}, ${k})`),tt=Wt(c,m),lt=xt(i.seed,n),vt=I.append("g").attr("class","cynefin-backgrounds"),it=["complex","complicated","chaotic","clear"];for(let d of it){let s=tt[d];vt.append("rect").attr("class","cynefinDomain").attr("x",s.x).attr("y",s.y).attr("width",s.w).attr("height",s.h).attr("fill",Y[d]).attr("fill-opacity",0.4).attr("stroke","none")}let st=I.append("g").attr("class","cynefin-boundaries");st.append("path").attr("class","cynefinBoundary").attr("d",$t(c,m,lt,Z)).attr("fill","none"),st.append("path").attr("class","cynefinBoundary").attr("d",bt(c,m,lt+100,Z)).attr("fill","none"),st.append("path").attr("class","cynefinCliff").attr("d",wt(c,m)).attr("fill","none");let Dt=c*0.15,kt=m*0.15;I.append("path").attr("class","cynefinConfusion").attr("d",Ct(c/2,m/2,Dt,kt)).attr("fill",Y.confusion).attr("fill-opacity",0.5);let dt=I.append("g").attr("class","cynefin-labels");for(let d of it){let s=tt[d];dt.append("text").attr("class","cynefinDomainLabel").attr("x",s.cx).attr("y",h?s.cy-30:s.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d.charAt(0).toUpperCase()+d.slice(1))}if(dt.append("text").attr("class","cynefinDomainLabel").attr("x",c/2).attr("y",h?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let d=I.append("g").attr("class","cynefin-subtitles");for(let s of it){let g=tt[s],u=ut[s];d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.model),d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.practice)}d.append("text").attr("class","cynefinSubtitle").attr("x",c/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(ut.confusion.practice)}let ft=I.append("g").attr("class","cynefin-items"),W=26,mt=10,Tt=["complex","complicated","chaotic","clear","confusion"];for(let d of Tt){let s=p.get(d);if(!s||s.items.length===0)continue;let g=tt[d],u=d==="confusion",O=s.items,X=0;if(u&&s.items.length>ct)X=s.items.length-ct,O=s.items.slice(0,ct);let F;if(u){let w=h?22:14;F=g.cy+w}else F=g.cy+(h?25:15);if([...O].forEach((w,_)=>{let M=F+_*(W+4),H=ft.append("g"),j=H.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",W/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(w.label),v=w.label.length*7,b=j.node();if(b&&typeof b.getBBox==="function"){let at=b.getBBox();if(at.width>0)v=at.width}let z=v+mt*2,q=g.cx-z/2;H.attr("transform",`translate(${q}, ${M})`),H.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",z).attr("height",W).attr("rx",4).attr("ry",4).attr("fill",Y[d]).attr("fill-opacity",0.95),j.attr("x",z/2).attr("y",W/2)}),X>0){let w=F+O.length*(W+4),_=`+${X} more`,M=ft.append("g"),H=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",W/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(_),j=_.length*7,v=H.node();if(v&&typeof v.getBBox==="function"){let q=v.getBBox();if(q.width>0)j=q.width}let b=j+mt*2,z=g.cx-b/2;M.attr("transform",`translate(${z}, ${w})`),M.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",b).attr("height",W).attr("rx",4).attr("ry",4).attr("fill",Y[d]).attr("fill-opacity",0.6),H.attr("x",b/2).attr("y",W/2)}}if(ot.length>0){let d=P.select("defs").empty()?P.append("defs"):P.select("defs"),s=`cynefin-arrow-${n}`;d.append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let g=I.append("g").attr("class","cynefin-arrows");ot.forEach((u)=>{let O=tt[u.from],X=tt[u.to];if(!O||!X)return;if(u.from===u.to){a.warn(`Cynefin renderer: skipping self-loop on domain "${u.from}"`);return}let{cx:F,cy:w}=O,{cx:_,cy:M}=X,H=(F+_)/2,j=(w+M)/2,v=_-F,b=M-w,z=Math.sqrt(v*v+b*b),q=z*0.15,at=-b/z,At=v/z,pt=H+at*q,yt=j+At*q;if(g.append("path").attr("class","cynefinArrowLine").attr("d",`M${F},${w} Q${pt},${yt} ${_},${M}`).attr("fill","none").attr("marker-end",`url(#${s})`),u.label)g.append("text").attr("class","cynefinArrowLabel").attr("x",pt).attr("y",yt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(u.label)})}if(Q)I.append("text").attr("class","cynefinTitle").attr("x",c/2).attr("y",-k/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(Q)},"draw"),Vt={draw:Ft},_t=t(()=>{let e=ke(),n=x();return U(e,n.themeVariables).cynefin},"getCynefinTheme"),Et=t(()=>{let e=_t();return`
2
- .cynefinDomain {
3
- stroke: none;
4
- }
5
- .cynefinDomainLabel {
6
- font-size: ${e.domainFontSize}px;
7
- font-weight: bold;
8
- fill: ${e.labelColor};
9
- }
10
- .cynefinSubtitle {
11
- font-size: ${e.itemFontSize-1}px;
12
- fill: ${e.textColor};
13
- font-style: italic;
14
- }
15
- .cynefinItem {
16
- fill-opacity: 0.95;
17
- stroke: ${e.boundaryColor};
18
- stroke-width: 1;
19
- }
20
- .cynefinItemText {
21
- font-size: ${e.itemFontSize}px;
22
- fill: ${e.textColor};
23
- }
24
- .cynefinItemOverflow {
25
- fill-opacity: 0.6;
26
- stroke: ${e.boundaryColor};
27
- stroke-width: 1;
28
- stroke-dasharray: 3 2;
29
- }
30
- .cynefinBoundary {
31
- stroke: ${e.boundaryColor};
32
- stroke-width: ${e.boundaryWidth};
33
- stroke-dasharray: 6 3;
34
- }
35
- .cynefinCliff {
36
- stroke: ${e.cliffColor};
37
- stroke-width: ${e.cliffWidth};
38
- }
39
- .cynefinConfusion {
40
- stroke: ${e.boundaryColor};
41
- stroke-width: 1.5;
42
- stroke-dasharray: 4 2;
43
- }
44
- .cynefinArrowLine {
45
- stroke: ${e.arrowColor};
46
- stroke-width: ${e.arrowWidth};
47
- fill: none;
48
- }
49
- .cynefinArrowHead {
50
- fill: ${e.arrowColor};
51
- stroke: none;
52
- }
53
- .cynefinArrowLabel {
54
- font-size: ${e.itemFontSize-1}px;
55
- fill: ${e.textColor};
56
- }
57
- .cynefinTitle {
58
- font-size: ${e.domainFontSize+2}px;
59
- font-weight: bold;
60
- fill: ${e.labelColor};
61
- }
62
- `},"styles"),Ht=Et,Qt={parser:It,db:rt,renderer:Vt,styles:Ht};export{Qt as diagram};
@@ -1 +0,0 @@
1
- import{Si}from"./chunk-8dp7h6w8.js";export{Si as createTreeViewServices};
@@ -1,30 +0,0 @@
1
- import{hn}from"./chunk-h5cfg3vv.js";import{G}from"./chunk-jzte2phh.js";import{t,a,D,x,O,B,C,S,E,T,A,L,R,V,In,nt,U}from"./chunk-3q0v8w45.js";import{ee}from"./chunk-8dp7h6w8.js";var Y=/[─━│┃└┗├┣]/,P=/[└┗├┣]/,Q=/[─━]/,H=/^[\s│┃]+$/,W=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,X=/^\s*%%/,te=" ";function F(n){return n.some((r)=>Y.test(r))}t(F,"isBoxDrawingFormat");function Z(n){for(let r of n){let e=P.exec(r);if(e?.index&&e.index>0)return e.index}return 4}t(Z,"inferSegmentWidth");function q(n,r){return n.replace(/\bline\s+(\d+)\b/gi,(e,i)=>{let c=parseInt(i,10),o=r.get(c);return o?`line ${o}`:e})}t(q,"remapErrorLines");function j(n){let r=n.split(`
2
- `),e=new Map,i=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){i=g;break}if(i===-1)return{text:n,lineMap:e};let c=[];for(let g=i+1;g<r.length;g++){let d=r[g];if(d.trim()===""||X.test(d)||W.test(d))continue;if(H.test(d))continue;c.push(d.replace(/\t/g," "))}if(!F(c))return{text:n,lineMap:e};let o=Z(c),s=[],l=0;for(let g=0;g<=i;g++)s.push(r[g]),l++,e.set(l,g+1);for(let g=i+1;g<r.length;g++){let d=r[g],p=d.trim(),f=g+1;if(p===""){s.push(d),l++,e.set(l,f);continue}if(X.test(d)){s.push(d),l++,e.set(l,f);continue}if(W.test(d)){s.push(d),l++,e.set(l,f);continue}if(H.test(d))continue;let h=d.replace(/\t/g," "),w=P.exec(h);if(w?.index!==void 0){let u=w.index,v=Math.round(u/o)+1,m=u+1;while(m<h.length&&Q.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let I=h.slice(m).trimEnd();if(!I)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let K=te.repeat(v);s.push(K+I),l++,e.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(Y.test(h))s.push(d),l++,e.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else s.push(d),l++,e.set(l,f)}return{text:s.join(`
3
- `),lineMap:e}}t(j,"preprocessBoxDrawing");var b=new hn(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),re=t(()=>{b.reset(),C()},"clear"),ne=t(()=>b.records.stack[0],"getRoot"),ie=t(()=>b.records.cnt,"getCount"),oe=D.treeView,se=t(()=>U(oe,x().treeView),"getConfig"),ae=t((n,r,e,i,c,o)=>{while(n<=b.records.stack[b.records.stack.length-1].level)b.records.stack.pop();let s={id:b.records.cnt++,level:n,name:r,nodeType:e,icon:c,cssClass:i,description:o,children:[]};b.records.stack[b.records.stack.length-1].children.push(s),b.records.stack.push(s)},"addNode"),ce={clear:re,addNode:ae,getRoot:ne,getCount:ie,getConfig:se,getAccTitle:E,getAccDescription:A,getDiagramTitle:R,setAccDescription:T,setAccTitle:S,setDiagramTitle:L},k=ce,le=t((n)=>{G(n,k);for(let r of n.nodes){let e=typeof r.indent==="number"?r.indent:0,i=r.name,c=i.endsWith("/");if(c)i=i.slice(0,-1);let o=c?"directory":"file",s=r.classAnnotation||void 0,l=r.iconAnnotation,g=l!==void 0?l||"none":void 0,d=r.descAnnotation||void 0,p=d?O(d,x()):void 0;k.addNode(e,i,o,s,g,p)}},"populate"),de={parse:t(async(n)=>{let{text:r,lineMap:e}=j(n);try{let i=await ee("treeView",r);a.debug(i),le(i)}catch(i){if(e.size>0&&i instanceof Error)i.message=q(i.message,e);throw i}},"parse")},y={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function J(n,r){let e=r?.filenameIcons?.[n];if(e)return e;let i=n.lastIndexOf(".");if(i>0){let c=n.substring(i).toLowerCase(),o=r?.extensionIcons;return o?.[c]??o?.[c.slice(1)]}return}t(J,"detectIcon");function N(n,r){if(n.includes(":"))return n;if(n in y.icons||!r)return`${y.prefix}:${n}`;return`${r}:${n}`}t(N,"qualifyIcon");function M(n,r){if(n.icon==="none")return;if(n.icon)return N(n.icon,r.defaultIconPack);if(!r.showIcons)return;if(n.nodeType==="file"){let e=J(n.name,r);if(e==="none")return;if(e)return N(e,r.defaultIconPack)}return`${y.prefix}:${n.nodeType==="directory"?"folder":"file"}`}t(M,"getNodeIcon");In([{name:y.prefix,icons:y}]);var _=14,he=4,pe=16,fe=t(async(n,r)=>{let e=[],i=t((o)=>{let s=M(o,r);if(s)e.push({icon:s,node:o});o.children.forEach(i)},"collect");i(n);let c=await Promise.all(e.map(async({icon:o,node:s})=>({id:s.id,svg:await nt(o,{height:_,width:_})})));return new Map(c.map(({id:o,svg:s})=>[o,s]))},"resolveNodeIcons"),ge=t((n,r,e,i,c,o)=>{let s=i.append("g"),l="treeView-node-label";if(e.nodeType==="directory")l+=" treeView-node-dir";if(e.cssClass)l+=` ${e.cssClass}`;let g=_+he,d=M(e,c),p=d!==void 0;if(d)s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+c.paddingX}, ${r+c.paddingY})`).html(o.get(e.id)??"");let f=s.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,v=n+c.paddingX+(p?g:0);f.attr("x",v),f.attr("y",r+u/2);let m=v+w,I=w+c.paddingX*2+(p?g:0);if(e.BBox={x:n,y:r,width:I,height:u},e.cssClass?.split(/\s+/).includes("highlight"))s.insert("rect",":first-child").attr("x",n).attr("y",r+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:e,nodeGroup:s,labelRightEdge:m,centerY:r+u/2}},"positionLabel"),z=t((n,r,e,i,c,o)=>n.append("line").attr("x1",r).attr("y1",e).attr("x2",i).attr("y2",c).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),ue=t((n,r,e,i)=>{let c=0,o=0,s=[],l=t((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),v=ge(u,c,f,p,h,i);s.push(v);let{height:m,width:I}=f.BBox;z(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),o=Math.max(o,u+I),c+=m},"drawNode"),g=t((p,f=0)=>{l(n,p,e,f),p.children.forEach((v)=>{g(v,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:v,height:m}=p.children[p.children.length-1].BBox;z(n,h+e.paddingX,w+u,h+e.paddingX,v+m/2+e.lineThickness/2,e.lineThickness)}},"processNode");g(r);let d=s.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...s.map((h)=>h.labelRightEdge))+pe;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();o=Math.max(o,f+u.width+e.paddingX)}}for(let p of s)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=o-p.node.BBox.x+8;f.attr("width",h),o=Math.max(o,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:o}},"drawTree"),me=t(async(n,r,e,i)=>{a.debug(`Rendering treeView diagram
4
- `+n);let c=i.db,o=c.getRoot(),s=c.getConfig(),l=V(r),g=l.append("g");g.attr("class","tree-view");let d=await fe(o,s),{totalHeight:p,totalWidth:f}=ue(g,o,s,d);l.attr("viewBox",`-${s.lineThickness/2} 0 ${f} ${p}`),B(l,p,f,s.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=t(({treeView:n})=>{let{labelFontSize:r,labelColor:e,lineColor:i,iconColor:c,descriptionColor:o,highlightBg:s,highlightStroke:l}=U(ve,n);return`
5
- .treeView-node-label {
6
- font-size: ${r};
7
- fill: ${e};
8
- white-space: pre;
9
- }
10
- .treeView-node-dir {
11
- font-weight: bold;
12
- }
13
- .treeView-node-line {
14
- stroke: ${i};
15
- }
16
- .treeView-node-icon {
17
- color: ${c};
18
- }
19
- .treeView-node-description {
20
- font-size: ${r};
21
- fill: ${o};
22
- font-style: italic;
23
- white-space: pre;
24
- }
25
- .treeView-highlight-bg {
26
- fill: ${s};
27
- stroke: ${l};
28
- stroke-width: 1;
29
- }
30
- `},"styles"),Ce=be,Ee={db:k,renderer:xe,parser:de,styles:Ce};export{Ee as diagram};