@bkm016/basalt 0.1.7 → 0.1.8

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 (250) hide show
  1. package/README.md +1 -1
  2. package/{chunk-n981vx1t.js → chunk-0d51ggzj.js} +6 -6
  3. package/chunk-12trygzx.js +25 -0
  4. package/{chunk-s6dejhfj.js → chunk-26cz8et8.js} +1 -1
  5. package/{chunk-zxkq9m8e.js → chunk-2ek3wq4b.js} +2 -2
  6. package/chunk-2gcp3xdc.js +2 -0
  7. package/{chunk-x4874m8e.js → chunk-2ks2tnac.js} +2 -2
  8. package/{chunk-0javrjcm.js → chunk-2nrkqq45.js} +22 -22
  9. package/chunk-320174qe.js +2 -0
  10. package/{chunk-ey15ye2h.js → chunk-3hg7yn1t.js} +1 -1
  11. package/{chunk-benrzwea.js → chunk-3j2kkgsc.js} +1 -1
  12. package/{chunk-8x21n7y9.js → chunk-47vf66t6.js} +1 -1
  13. package/chunk-4n49ptbz.js +3 -0
  14. package/{chunk-7hr6zw2m.js → chunk-5gxj9560.js} +1 -1
  15. package/{chunk-g0t9c3gv.js → chunk-6vnjg5x9.js} +1 -1
  16. package/{chunk-dnx91jrd.js → chunk-7kjr9gdx.js} +2 -2
  17. package/{chunk-y8dkfpmj.js → chunk-7p6e2f5s.js} +3 -3
  18. package/{chunk-053vb71h.js → chunk-86xhmz7k.js} +1 -1
  19. package/{chunk-ebpyvs1d.js → chunk-91r5nvth.js} +2 -2
  20. package/{chunk-c7rcw9fb.js → chunk-adys4qq4.js} +4 -4
  21. package/{chunk-npez1492.js → chunk-ckjw3b61.js} +2 -2
  22. package/{chunk-f156y565.js → chunk-d37gemt2.js} +3 -3
  23. package/{chunk-j7yvh0ae.js → chunk-dcwdmpw2.js} +1 -1
  24. package/chunk-dvb5nd2x.js +2 -0
  25. package/{chunk-063vbmtp.js → chunk-e6c2mzxc.js} +2 -2
  26. package/{chunk-s7skpgm2.js → chunk-ef9yhnk3.js} +1 -1
  27. package/{chunk-ecf896fz.js → chunk-fpxc6qjr.js} +2 -2
  28. package/chunk-frt9k18g.js +480 -0
  29. package/{chunk-bdy4jksd.js → chunk-fzcmzbsq.js} +1 -1
  30. package/{chunk-q9dd6fhj.js → chunk-g3ed130w.js} +3 -3
  31. package/{chunk-d48bfd2e.js → chunk-h1kb8b49.js} +2 -2
  32. package/{chunk-arcqjt91.js → chunk-hd3x1w46.js} +1 -1
  33. package/{chunk-dpz4hwqb.js → chunk-j781n7ca.js} +2 -2
  34. package/{chunk-z02sj1je.js → chunk-jp5afrwm.js} +2 -2
  35. package/{chunk-r8vvcp6c.js → chunk-jyv9cae6.js} +1 -1
  36. package/{chunk-whj87h4r.js → chunk-k3q5jqjj.js} +3 -3
  37. package/{chunk-75434aay.js → chunk-k3rmjrf1.js} +1 -1
  38. package/{chunk-peja51xv.js → chunk-kgkrccr1.js} +2 -2
  39. package/{chunk-pg5nkf1y.js → chunk-kpvaqb7c.js} +2 -2
  40. package/{chunk-sjjtxpg2.js → chunk-ky55taar.js} +330 -288
  41. package/{chunk-10p3mb40.js → chunk-mr807v9n.js} +1 -1
  42. package/chunk-n015c8nx.js +2 -0
  43. package/chunk-ndt6rjt9.js +2 -0
  44. package/{chunk-gv7wqkey.js → chunk-nmtk9xra.js} +2 -2
  45. package/{chunk-d6p2hgxh.js → chunk-pehyqj8k.js} +1 -1
  46. package/{chunk-ca982n62.js → chunk-pkpj7s2k.js} +1 -1
  47. package/{chunk-fx7f4m3c.js → chunk-pn413hjw.js} +1 -1
  48. package/{chunk-6ptv4g5e.js → chunk-ppxv5q7y.js} +3 -3
  49. package/{chunk-8wj32837.js → chunk-qmdpgbg3.js} +1 -1
  50. package/{chunk-8wv5t0w6.js → chunk-rnt1ckk9.js} +6 -6
  51. package/{chunk-prgm07j4.js → chunk-t40fag3z.js} +2 -2
  52. package/{chunk-w67dvqtb.js → chunk-t66jqz12.js} +2 -2
  53. package/{chunk-39vwrg8n.js → chunk-v2srrqcv.js} +2 -2
  54. package/{chunk-n85qs7cs.js → chunk-x496kg3v.js} +1 -1
  55. package/{chunk-6kdgk70p.js → chunk-xjw78yey.js} +4 -4
  56. package/chunk-xy2bxwq8.js +2 -0
  57. package/{chunk-y69ewdn2.js → chunk-ypqjfv3a.js} +2 -2
  58. package/{chunk-f544p9rh.js → chunk-yyy2yp6f.js} +10 -10
  59. package/{chunk-8gw5bvh3.js → chunk-yzevjkms.js} +5 -5
  60. package/chunk-z3ch1wg6.js +16 -0
  61. package/chunk-zdyd8hbn.js +2 -0
  62. package/compiled.js +6 -6
  63. package/package.json +1 -1
  64. package/ui-test-worker.js +19 -19
  65. package/web/{chunk-kjacapzd.js → chunk-0j9a7811.js} +6 -6
  66. package/web/chunk-0jfda4jw.js +2 -0
  67. package/web/{chunk-z1geewdf.js → chunk-0zwc2rvh.js} +2 -2
  68. package/web/{chunk-ht4mx2dt.js → chunk-1gx0zpmp.js} +7 -7
  69. package/web/{chunk-q3jevm51.js → chunk-1s8zg6fb.js} +51 -51
  70. package/web/chunk-2axwda8c.js +89 -0
  71. package/web/chunk-2p3fkhy8.js +1 -0
  72. package/web/{chunk-tz4twwmw.js → chunk-33w36n91.js} +2 -2
  73. package/web/{chunk-1s53190z.js → chunk-3q0v8w45.js} +81 -81
  74. package/web/chunk-3sz5qcwj.js +1 -0
  75. package/web/chunk-433c80pc.js +1 -0
  76. package/web/chunk-48cnmhvd.js +106 -0
  77. package/web/{chunk-da7m1kva.js → chunk-4anjs6yp.js} +2 -2
  78. package/web/chunk-5r37rwq1.js +4 -0
  79. package/web/{chunk-pjz30xcp.js → chunk-6e38yf3a.js} +23 -23
  80. package/web/{chunk-xckxtfp8.js → chunk-7a4xk6j9.js} +72 -72
  81. package/web/chunk-7f1t7z72.js +2 -0
  82. package/web/chunk-7qq1ypvj.js +1 -0
  83. package/web/{chunk-h6k1x096.js → chunk-7tkgbbf9.js} +2 -2
  84. package/web/chunk-7x35g67d.js +78 -0
  85. package/web/{chunk-xbpc6x9m.js → chunk-823b7866.js} +15 -15
  86. package/web/chunk-85gdsmt4.js +1 -0
  87. package/web/{chunk-gyp6v7jd.js → chunk-8773nwdc.js} +2 -2
  88. package/web/{chunk-2cem4sv7.js → chunk-8dp7h6w8.js} +24 -24
  89. package/web/{chunk-y99ed8rd.js → chunk-8nv7q5ac.js} +9 -9
  90. package/web/chunk-8pzg8qw4.js +1 -0
  91. package/web/chunk-8wg44w91.js +2 -0
  92. package/web/chunk-9p5dfvav.js +1 -0
  93. package/web/chunk-9q9w9pay.js +1 -0
  94. package/web/chunk-a3teqvz2.js +39 -0
  95. package/web/chunk-bd8ftfxn.js +3 -0
  96. package/web/chunk-c03bt2pz.js +1 -0
  97. package/web/chunk-c1ha2xg6.js +8 -0
  98. package/web/chunk-cez1k71m.js +1 -0
  99. package/web/chunk-cgng31df.js +1 -0
  100. package/web/chunk-cn0tmwjs.js +2 -0
  101. package/web/{chunk-t6sq85s6.js → chunk-cn1xpg3q.js} +2 -2
  102. package/web/chunk-cvd4f51j.js +1 -0
  103. package/web/chunk-cybvxssy.js +1 -0
  104. package/web/{chunk-geh05ghh.js → chunk-cyjnert7.js} +19 -19
  105. package/web/{chunk-twdy2f67.js → chunk-d0m0h0eb.js} +1 -1
  106. package/web/{chunk-sn3tkwme.js → chunk-dgwkqcz6.js} +37 -37
  107. package/web/{chunk-nfvqjzz5.js → chunk-dtg5yhhs.js} +1 -1
  108. package/web/chunk-dynajx8x.js +2 -0
  109. package/web/{chunk-svh4n157.js → chunk-et8q775x.js} +4 -4
  110. package/web/chunk-f3vv7n52.js +1 -0
  111. package/web/{chunk-tmndcktk.js → chunk-f93pe4kb.js} +15 -15
  112. package/web/{chunk-5nda24gv.js → chunk-fe31sv6t.js} +1 -1
  113. package/web/chunk-fpa81dv7.js +62 -0
  114. package/web/{chunk-4q7wf0wd.js → chunk-fx4mackk.js} +9 -9
  115. package/web/chunk-g17n6asp.js +1 -0
  116. package/web/chunk-g9dzaw9e.js +30 -0
  117. package/web/chunk-gcwhx3av.js +1139 -0
  118. package/web/chunk-gf8vm6b5.js +1 -0
  119. package/web/chunk-gnmeyy4h.js +1 -0
  120. package/web/chunk-h5cfg3vv.js +2 -0
  121. package/web/{chunk-femhej5w.js → chunk-hbkasy6c.js} +46 -46
  122. package/web/chunk-hn7mhsbg.js +1 -0
  123. package/web/{chunk-tfn0rqg9.js → chunk-hstbgb83.js} +26 -26
  124. package/web/chunk-jjjtv2r1.js +2 -0
  125. package/web/chunk-jzte2phh.js +2 -0
  126. package/web/chunk-k8h8zx6r.js +24 -0
  127. package/web/chunk-m3ajw575.js +1 -0
  128. package/web/chunk-m5y2d4zv.js +1 -0
  129. package/web/chunk-mbwwj216.js +1 -0
  130. package/web/chunk-mf6xng5b.js +2 -0
  131. package/web/chunk-nky3bqfg.js +1 -0
  132. package/web/chunk-np33kmn4.js +1 -0
  133. package/web/chunk-nvk8mazs.js +1 -0
  134. package/web/chunk-nyw5ewgv.js +1 -0
  135. package/web/{chunk-dg3p8db5.js → chunk-p0cjvjdx.js} +1 -1
  136. package/web/chunk-p56dcqpr.js +1 -0
  137. package/web/chunk-pdn4r8x4.js +1 -0
  138. package/web/chunk-q1xxs319.js +41 -0
  139. package/web/chunk-qpt34d8d.js +1 -0
  140. package/web/{chunk-4fm55fgb.js → chunk-qq2v8h6d.js} +7 -7
  141. package/web/chunk-qskt3tqa.js +1 -0
  142. package/web/chunk-qt3n897m.js +4 -0
  143. package/web/chunk-r1rt48h9.js +1 -0
  144. package/web/{chunk-4sve9xrj.js → chunk-r4ffr96e.js} +1 -1
  145. package/web/chunk-r7tgd2fm.js +7 -0
  146. package/web/{chunk-gksf7cek.js → chunk-rbdvc8x7.js} +7 -7
  147. package/web/{chunk-q97hn4j5.js → chunk-rkjkynm3.js} +33 -33
  148. package/web/chunk-rznszqmy.js +1 -0
  149. package/web/chunk-s1pefd34.js +1 -0
  150. package/web/chunk-s38s9ff9.js +370 -0
  151. package/web/{chunk-n754s8xd.js → chunk-s7e93552.js} +8 -8
  152. package/web/chunk-sc29azev.js +1 -0
  153. package/web/{chunk-czjk218p.js → chunk-sda7cyrt.js} +52 -52
  154. package/web/chunk-svh2gkx8.js +2 -0
  155. package/web/chunk-t4jc4nac.js +1 -0
  156. package/web/chunk-t7g366a5.js +24 -0
  157. package/web/chunk-tj1fn8v2.js +1 -0
  158. package/web/{chunk-sy7e4dmq.js → chunk-tkp72r9b.js} +1 -1
  159. package/web/{chunk-5wbnjjhg.js → chunk-v14s4vgc.js} +1 -1
  160. package/web/chunk-v94v68xg.js +36 -0
  161. package/web/{chunk-0whceqes.js → chunk-vvvd3grf.js} +2 -2
  162. package/web/chunk-w37n09px.js +21 -0
  163. package/web/chunk-wcphswcx.js +2 -0
  164. package/web/{chunk-aangfjqc.js → chunk-wj3ymejj.js} +38 -38
  165. package/web/chunk-wwcnvyjh.css +1 -0
  166. package/web/{chunk-e8yj05t1.js → chunk-xabcx3ry.js} +6 -6
  167. package/web/chunk-xb9m0092.js +1 -0
  168. package/web/chunk-xfd3b01q.js +1 -0
  169. package/web/{chunk-4vjnrz87.js → chunk-xqyazzm7.js} +17 -17
  170. package/web/{chunk-bdydzbqk.js → chunk-xsz1dfm2.js} +23 -23
  171. package/web/chunk-z0zrp8n8.js +1 -0
  172. package/web/index.html +1 -1
  173. package/worker.js +1 -1
  174. package/chunk-654cny9a.js +0 -480
  175. package/chunk-8saewt61.js +0 -3
  176. package/chunk-a0c989ky.js +0 -2
  177. package/chunk-a5apjjcn.js +0 -16
  178. package/chunk-a81p46j7.js +0 -2
  179. package/chunk-agsfy9w7.js +0 -2
  180. package/chunk-d20p02ny.js +0 -2
  181. package/chunk-ejsneb6f.js +0 -2
  182. package/chunk-fmq3zwzk.js +0 -2
  183. package/chunk-rfb85nj7.js +0 -2
  184. package/chunk-rfdt992v.js +0 -25
  185. package/web/chunk-079091ar.js +0 -39
  186. package/web/chunk-083r4f80.js +0 -1
  187. package/web/chunk-0cng7r2x.js +0 -2
  188. package/web/chunk-0k0ande6.js +0 -1
  189. package/web/chunk-14deqqhr.js +0 -2
  190. package/web/chunk-2b63adsj.js +0 -89
  191. package/web/chunk-3baypnwn.js +0 -4
  192. package/web/chunk-4067nwjp.js +0 -19
  193. package/web/chunk-59678wmg.js +0 -1
  194. package/web/chunk-5k8sv4f5.js +0 -1
  195. package/web/chunk-5vjhvw1m.js +0 -2
  196. package/web/chunk-6ft5pz3c.js +0 -1
  197. package/web/chunk-7c8rwqtx.js +0 -1
  198. package/web/chunk-7qzz025k.js +0 -1
  199. package/web/chunk-7xbaqqd7.css +0 -1
  200. package/web/chunk-80eyv2mk.js +0 -1
  201. package/web/chunk-89paytbk.js +0 -4
  202. package/web/chunk-8ceej2g7.js +0 -1
  203. package/web/chunk-8nyhy122.js +0 -1
  204. package/web/chunk-989jq2h8.js +0 -2
  205. package/web/chunk-9w5tf22s.js +0 -1
  206. package/web/chunk-c3nn0vvc.js +0 -1
  207. package/web/chunk-cpwtt6ny.js +0 -1
  208. package/web/chunk-dsw5t58p.js +0 -1
  209. package/web/chunk-dv72fat3.js +0 -1
  210. package/web/chunk-dvvs1jjq.js +0 -3
  211. package/web/chunk-e131rg6p.js +0 -2
  212. package/web/chunk-ekw54h1q.js +0 -1
  213. package/web/chunk-hwsvhst3.js +0 -1
  214. package/web/chunk-k02b36g1.js +0 -62
  215. package/web/chunk-kkfrs7d1.js +0 -41
  216. package/web/chunk-kkyn8yhj.js +0 -106
  217. package/web/chunk-mh4rx5cf.js +0 -1
  218. package/web/chunk-n448vaba.js +0 -1
  219. package/web/chunk-n8j88qxy.js +0 -1
  220. package/web/chunk-nmpbsvwb.js +0 -2
  221. package/web/chunk-nws1s56b.js +0 -1
  222. package/web/chunk-p7126wwy.js +0 -7
  223. package/web/chunk-phnqnhj9.js +0 -1
  224. package/web/chunk-qg31p6cn.js +0 -1
  225. package/web/chunk-qhm3cfq9.js +0 -1
  226. package/web/chunk-qsd595b9.js +0 -1
  227. package/web/chunk-r7frwjqx.js +0 -2
  228. package/web/chunk-rddft5ce.js +0 -1139
  229. package/web/chunk-rgbdf2m9.js +0 -370
  230. package/web/chunk-rsbkbg6x.js +0 -78
  231. package/web/chunk-s2bs5vxh.js +0 -2
  232. package/web/chunk-sgwccs54.js +0 -1
  233. package/web/chunk-sjh8gtm9.js +0 -30
  234. package/web/chunk-t3658ehb.js +0 -2
  235. package/web/chunk-t81p4wqc.js +0 -24
  236. package/web/chunk-tewmsd7t.js +0 -1
  237. package/web/chunk-tf57s7ry.js +0 -1
  238. package/web/chunk-tqr80b5w.js +0 -2
  239. package/web/chunk-v282r683.js +0 -24
  240. package/web/chunk-v4vjjtn7.js +0 -1
  241. package/web/chunk-vbwdwcdp.js +0 -1
  242. package/web/chunk-vjngfh0q.js +0 -1
  243. package/web/chunk-vnt34mkb.js +0 -1
  244. package/web/chunk-wbgkwxrc.js +0 -1
  245. package/web/chunk-wjbk50hn.js +0 -2
  246. package/web/chunk-wjy848e2.js +0 -1
  247. package/web/chunk-wqsczy57.js +0 -36
  248. package/web/chunk-wvfmmw1v.js +0 -8
  249. package/web/chunk-x1jm4zsg.js +0 -1
  250. package/web/chunk-xmsb2g71.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{t,a,B}from"./chunk-3q0v8w45.js";var ue=t((e,i,o,h)=>{e.attr("class",o);let{width:r,height:n,x:w,y:x}=u(e,i);B(e,n,r,h);let c=m(w,x,r,n,i);e.attr("viewBox",c),a.debug(`viewBox configured: ${c} with padding: ${i}`)},"setupViewPortForSVG"),u=t((e,i)=>{let o=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:o.width+i*2,height:o.height+i*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),m=t((e,i,o,h,r)=>`${e-r} ${i-r} ${o} ${h}`,"createViewBox");
2
+ export{ue};
@@ -0,0 +1 @@
1
+ import{r,g,e,n,b,s,K,Q,j,lt}from"./chunk-gcwhx3av.js";var z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],h=s("circle-slash",z);function U(o){let{Button:N,Panel:y,style:k}=b(),t=o.payload,[i,c]=r(!1),[C,P]=r(!1),[l,p]=r();if(!t)return null;let a=C?"killed":t.state,m=a==="running",d=a==="exited"&&t.code===0,u=a==="killed"||a==="timeout",f=t.output?.trim(),I=async()=>{if(i)return;c(!0),p(void 0);try{await o.connection.request(`/api/sessions/${encodeURIComponent(o.sessionID)}/jobs/${encodeURIComponent(t.id)}/kill`,{method:"POST"}),P(!0)}catch(x){p(x instanceof Error?x.message:"停止失败,后台任务可能已结束")}finally{c(!1)}};return n(y,{className:"my-2",header:n(g,{children:[e(lt,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-mono text-ink/90",title:t.command??t.id,children:t.command??`任务 ${t.id}`})]}),actions:n(g,{children:[m&&n(g,{children:[n("span",{className:"flex items-center gap-1 text-warning",children:[e(Q,{className:"size-3.5 animate-spin"}),e("span",{children:"后台运行中"})]}),e(N,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:i,onClick:()=>{I()},children:"停止"})]}),d&&n("span",{className:"flex items-center gap-1 text-success",children:[e(j,{className:"size-3.5"}),e("span",{children:"已完成"})]}),u&&n("span",{className:"flex items-center gap-1 text-faint",children:[e(h,{className:"size-3.5"}),e("span",{children:a==="timeout"?"已超时":"已停止"})]}),!m&&!d&&!u&&n("span",{className:"flex items-center gap-1 text-danger",children:[e(K,{className:"size-3.5"}),n("span",{children:["退出码 ",t.code??"异常"]})]})]}),children:[l&&e("p",{role:"status",className:"border-b border-line px-4 py-2.5 text-xs text-danger",children:l}),f&&e("pre",{className:k("chat.toolOutput","max-h-60 text-ink/90 select-text"),children:f})]})}export{U as BashJobCard};
@@ -0,0 +1,24 @@
1
+ import{G}from"./chunk-jzte2phh.js";import{t,a,ke,D,x,B,C,S,E,T,A,L,R,p,V,Gr,k,U}from"./chunk-3q0v8w45.js";import{Pt}from"./chunk-fe31sv6t.js";import{ee}from"./chunk-8dp7h6w8.js";import{Xe}from"./chunk-07agqp8h.js";import{ue}from"./chunk-svh2gkx8.js";function je(e){var n=0,l=e.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;e.value=n}function ge(){return this.eachAfter(je)}function ye(e,n){let l=-1;for(let o of this)e.call(n,o,++l,this);return this}function xe(e,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(e.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(e,n){var l=this,o=[l],s=[],d,f,h,b=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())e.call(n,l,++b,this);return this}function ve(e,n){let l=-1;for(let o of this)if(e.call(n,o,++l,this))return o}function be(e){return this.eachAfter(function(n){var l=+e(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function we(e){return this.eachBefore(function(n){if(n.children)n.children.sort(e)})}function Ce(e){var n=this,l=Ze(n,e),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(e!==l)o.splice(s,0,e),e=e.parent;return o}function Ze(e,n){if(e===n)return e;var l=e.ancestors(),o=n.ancestors(),s=null;e=l.pop(),n=o.pop();while(e===n)s=e,e=l.pop(),n=o.pop();return s}function Te(){var e=this,n=[e];while(e=e.parent)n.push(e);return n}function Le(){return Array.from(this)}function $e(){var e=[];return this.eachBefore(function(n){if(!n.children)e.push(n)}),e}function Ae(){var e=this,n=[];return e.each(function(l){if(l!==e)n.push({source:l.parent,target:l})}),n}function*Fe(){var e=this,n,l=[e],o,s,d;do{n=l.reverse(),l=[];while(e=n.pop())if(yield e,o=e.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(e,n){if(e instanceof Map){if(e=[void 0,e],n===void 0)n=Ke}else if(n===void 0)n=Je;var l=new ie(e),o,s=[l],d,f,h,b;while(o=s.pop())if((f=n(o.data))&&(b=(f=Array.from(f)).length)){o.children=f;for(h=b-1;h>=0;--h)s.push(d=f[h]=new ie(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ue(){return re(this).eachBefore(Qe)}function Je(e){return e.children}function Ke(e){return Array.isArray(e)?e[1]:null}function Qe(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function et(e){var n=0;do e.height=n;while((e=e.parent)&&e.height<++n)}function ie(e){this.data=e,this.depth=this.height=0,this.parent=null}ie.prototype=re.prototype={constructor:ie,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:we,path:Ce,ancestors:Te,descendants:Le,leaves:$e,links:Ae,copy:Ue,[Symbol.iterator]:Fe};function Be(e){if(typeof e!=="function")throw Error();return e}function ne(){return 0}function K(e){return function(){return e}}function Ne(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Me(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(o-n)/e.value;while(++h<b)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(e,n,l,o,s){var d=e.children,f,h=-1,b=d.length,u=e.value&&(s-l)/e.value;while(++h<b)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(e,n,l,o,s,d){var f=[],h=n.children,b,u,m=0,_=0,i=h.length,M,F,N=n.value,g,w,X,O,Q,oe,Y;while(m<i){M=s-l,F=d-o;do g=h[_++].value;while(!g&&_<i);w=X=g,oe=Math.max(F/M,M/F)/(N*e),Y=g*g*oe,Q=Math.max(X/Y,Y/w);for(;_<i;++_){if(g+=u=h[_].value,u<w)w=u;if(u>X)X=u;if(Y=g*g*oe,O=Math.max(X/Y,Y/w),O>Q){g-=u;break}Q=O}if(f.push(b={value:g,dice:M<F,children:h.slice(m,_)}),b.dice)Me(b,l,o,s,N?o+=F*g/N:d);else _e(b,l,o,N?l+=M*g/N:s,d);N-=g,m=_}return f}var Ee=function e(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return e((o=+o)>1?o:1)},l}(tt);function fe(){var e=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,b=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(_),s=[0],n)i.eachBefore(Ne);return i}function _(i){var M=s[i.depth],F=i.x0+M,N=i.y0+M,g=i.x1-M,w=i.y1-M;if(g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;if(i.x0=F,i.y0=N,i.x1=g,i.y1=w,i.children){if(M=s[i.depth+1]=d(i)/2,F+=u(i)-M,N+=f(i)-M,g-=h(i)-M,w-=b(i)-M,g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;e(i,F,N,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(e=Be(i),m):e},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:K(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:K(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:K(+i),m):h},m.paddingBottom=function(i){return arguments.length?(b=typeof i==="function"?i:K(+i),m):b},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:K(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getAccDescription=A,this.setAccDescription=T}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=D,n=x();return U({...e.treemap,...n.treemap??{}})}addNode(e,n){if(this.nodes.push(e),this.levels.set(e,n),n===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,n){let l=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Gr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(e,l)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(e){if(!e.length)return[];let n=[],l=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}t(We,"buildHierarchy");var rt=t((e,n)=>{G(e,n);let l=[];for(let d of e.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of e.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,b=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,_={level:h,name:b,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(_)}let o=We(l),s=t((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=t((e)=>e.name?String(e.name):"","getItemName"),He={parser:{yy:void 0},parse:t(async(e)=>{try{let l=await ee("treemap",e);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,le=10,ce=25,ot=t((e,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),b=s.getRoot(),{themeVariables:u}=x();if(!b)return;let m=h?30:0,_=V(n),i=d.nodeWidth?d.nodeWidth*le:960,M=d.nodeHeight?d.nodeHeight*le:500,F=i,N=M+m;_.attr("viewBox",`0 0 ${F} ${N}`),B(_,N,F,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=t((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=t((z)=>"$"+Pt(","+y)(z),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=t((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Xe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),X=Xe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),O=Xe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)_.append("text").attr("x",F/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let Q=_.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),oe=re(b).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,M]).paddingTop((r)=>r.children&&r.children.length>0?ce+le:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?le:0).paddingRight((r)=>r.children&&r.children.length>0?le:0).paddingBottom((r)=>r.children&&r.children.length>0?le:0).round(!0)(oe),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),se=Q.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",ce).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),se.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",ce),se.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>X(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),se.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",ce/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let z=r.x1-r.x0,W=6,P;if(d.showValues!==!1&&r.value){let I=z-10,J=30,Ge=10;P=I-30-10-W}else P=z-W-6;let v=Math.max(15,P),Z=c.node();if(Z.getComputedTextLength()>v){let J=y;while(J.length>0){if(J=y.substring(0,J.length-1),J.length===0){if(c.text("..."),Z.getComputedTextLength()>v)c.text("");break}if(c.text(J+"..."),Z.getComputedTextLength()<=v)break}}}),d.showValues!==!1)se.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",ce/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),q=De.length>20,Oe=q?16:38,pe=q?14:28,te=q?4:8,ae=q?4:6,he=q?2:4,Ve=q?8:10,me=q?1:2,de=Q.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(de.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),de.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),de.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+O(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,z=r.y1-r.y0,W=c.node(),P=y-2*he,j=z-2*he;if(P<Ve||j<Ve){c.style("display","none");return}let v=parseInt(c.style("font-size"),10),Z=0.6;while(W.getComputedTextLength()>P&&v>te)v--,c.style("font-size",`${v}px`);let H=Math.max(ae,Math.min(pe,Math.round(v*Z))),I=v+me+H;while(I>j&&v>te){if(v--,H=Math.max(ae,Math.min(pe,Math.round(v*Z))),H<ae&&v===te)break;if(c.style("font-size",`${v}px`),I=v+me+H,H<=ae&&I>j);}if(c.style("font-size",`${v}px`),q){if(v<te||j<te)c.style("display","none")}else if(W.getComputedTextLength()>P||v<te||j<v)c.style("display","none")}),d.showValues!==!1)de.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${pe}px;fill:`+O(c.data.name)+";",z=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+z.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),z=this.parentNode;if(!z){y.style("display","none");return}let W=p(z).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let P=parseFloat(W.style("font-size")),v=Math.max(ae,Math.min(pe,Math.round(P*0.6)));y.style("font-size",`${v}px`);let H=(c.y1-c.y0)/2+P/2+me;y.attr("y",H);let I=c.x1-c.x0,Pe=c.y1-c.y0-4,Ye=I-2*he;if(y.node().getComputedTextLength()>Ye||H+v>Pe||v<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;ue(_,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=t(function(e,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=t(({treemap:e}={})=>{let n=ke(),l=x(),o=U(n,l.themeVariables),s=U(ct,e),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
2
+ .treemapNode.section {
3
+ stroke: ${s.sectionStrokeColor};
4
+ stroke-width: ${s.sectionStrokeWidth};
5
+ fill: ${s.sectionFillColor};
6
+ }
7
+ .treemapNode.leaf {
8
+ stroke: ${s.leafStrokeColor};
9
+ stroke-width: ${s.leafStrokeWidth};
10
+ fill: ${s.leafFillColor};
11
+ }
12
+ .treemapLabel {
13
+ fill: ${f};
14
+ font-size: ${s.labelFontSize};
15
+ }
16
+ .treemapValue {
17
+ fill: ${h};
18
+ font-size: ${s.valueFontSize};
19
+ }
20
+ .treemapTitle {
21
+ fill: ${d};
22
+ font-size: ${s.titleFontSize};
23
+ }
24
+ `},"getStyles"),dt=pt,fa={parser:He,get db(){return new Re},renderer:it,styles:dt};export{fa as diagram};
@@ -0,0 +1 @@
1
+ import{Xn}from"./chunk-7tkgbbf9.js";export{Xn as default};