@bkm016/basalt 0.1.4 → 0.1.5
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.
- package/README.md +53 -5
- package/{chunk-y648fzx0.js → chunk-0039s4jt.js} +3 -3
- package/{chunk-m40gxwq4.js → chunk-00gwse5r.js} +3 -3
- package/{chunk-t6zs4kw0.js → chunk-0fwdxd45.js} +2 -2
- package/{chunk-nmca5h6m.js → chunk-0j0qggej.js} +1 -1
- package/chunk-0n99m9m4.js +2 -0
- package/{chunk-pjyn2s97.js → chunk-0stvywr8.js} +1 -1
- package/{chunk-ztsjgssj.js → chunk-1xa7d5mh.js} +1 -1
- package/chunk-2nb3d92s.js +2 -0
- package/chunk-2nkfxhef.js +3868 -0
- package/chunk-2pa1z37c.js +2 -0
- package/{chunk-fw2bpqmw.js → chunk-2qcpq99g.js} +1 -1
- package/{chunk-981f9dw8.js → chunk-36cqq0ga.js} +6 -6
- package/{chunk-whvj83b7.js → chunk-3c330qna.js} +2 -2
- package/chunk-3k627vf2.js +3 -0
- package/{chunk-r7fpkb49.js → chunk-3k7ejpkc.js} +1 -1
- package/chunk-4g5f43ea.js +3 -0
- package/{chunk-fjtvjrkg.js → chunk-539ekagy.js} +4 -4
- package/{chunk-97rzj7f6.js → chunk-5v4g21rw.js} +1 -1
- package/{chunk-r0scgfwx.js → chunk-6dsq0fns.js} +2 -2
- package/{chunk-pbcy6zdt.js → chunk-7as47pcw.js} +1 -1
- package/{chunk-g2t6t8fk.js → chunk-7jezts2n.js} +2 -2
- package/{chunk-8wc8qdx8.js → chunk-7qq99360.js} +6 -6
- package/{chunk-9rmqgc3c.js → chunk-7tgqhveh.js} +15 -15
- package/{chunk-mvfsxdx6.js → chunk-7w0mefgk.js} +10 -10
- package/{chunk-y58ygzn9.js → chunk-818nd6s1.js} +3 -3
- package/{chunk-vv7fp27r.js → chunk-8mezk0cb.js} +2 -2
- package/{chunk-q7t30zz2.js → chunk-8xb636vr.js} +5 -5
- package/{chunk-ev6yvy5y.js → chunk-980drajf.js} +15 -15
- package/{chunk-3x94302m.js → chunk-9z7sdh5e.js} +3 -3
- package/{chunk-zggzfa7j.js → chunk-a4b75ekk.js} +2 -2
- package/{chunk-2zp1mv3q.js → chunk-ar3dbfp9.js} +1 -1
- package/{chunk-vk1gxk1t.js → chunk-aw65h276.js} +1 -1
- package/{chunk-f3xadvab.js → chunk-b9fqretv.js} +2 -2
- package/{chunk-7tbya5b5.js → chunk-bgkegf0k.js} +22 -22
- package/{chunk-0y7ne3d0.js → chunk-bwawt15q.js} +2 -2
- package/{chunk-pxsrqrd0.js → chunk-c4qr1f41.js} +2 -2
- package/chunk-dddsrff6.js +478 -0
- package/{chunk-xfvvh1s5.js → chunk-e63c1186.js} +1 -1
- package/{chunk-em187cy3.js → chunk-ebzkckyw.js} +2 -2
- package/chunk-eegztdzb.js +2 -0
- package/{chunk-rmj5b73e.js → chunk-gw05p4g3.js} +1 -1
- package/{chunk-k23t7vhs.js → chunk-h1rypb99.js} +5 -5
- package/{chunk-akr0a8nc.js → chunk-hq5ke1yp.js} +1 -1
- package/{chunk-jwdb0ccj.js → chunk-jvwg4rn1.js} +3 -3
- package/{chunk-7afmgncg.js → chunk-jyrwk08p.js} +1 -1
- package/chunk-kns4kv7b.js +3 -0
- package/{chunk-8d46jtbj.js → chunk-mat08ab1.js} +2 -2
- package/{chunk-jk25nt60.js → chunk-mkp28k1x.js} +2 -2
- package/{chunk-3ct2tkr8.js → chunk-npez1492.js} +2 -2
- package/{chunk-shadcb9z.js → chunk-nx3jnbv8.js} +2 -2
- package/{chunk-ykens1hy.js → chunk-nxkmd29x.js} +1 -1
- package/{chunk-y7nma9rk.js → chunk-pjr91g6k.js} +2 -2
- package/{chunk-m8vkwdgr.js → chunk-r0jc8e7t.js} +4 -4
- package/chunk-rxj6tct8.js +2 -0
- package/{chunk-362g64pd.js → chunk-sqaam5ak.js} +1 -1
- package/{chunk-4w17tzp5.js → chunk-srjgvdvs.js} +12 -12
- package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
- package/{chunk-k6w6y71k.js → chunk-t7sc0wwc.js} +2 -2
- package/{chunk-kp22kaez.js → chunk-v4k3qmdm.js} +2 -2
- package/{chunk-1vd0f74z.js → chunk-vt1anydc.js} +4 -4
- package/chunk-wd3z74av.js +2 -0
- package/{chunk-xh3vr5vz.js → chunk-wfyrfvfn.js} +1 -1
- package/{chunk-2hbfk5xd.js → chunk-wnzvnskb.js} +2 -2
- package/{chunk-cjc90f84.js → chunk-x89em726.js} +3 -3
- package/{chunk-vexrrw1b.js → chunk-xtq1xpq0.js} +2 -2
- package/chunk-yna8bwqc.js +2 -0
- package/{chunk-aky4tztg.js → chunk-zn0g0859.js} +2 -2
- package/{chunk-qe0teyn1.js → chunk-zrkh5dw7.js} +1 -1
- package/chunk-zzwjt7fp.js +2 -0
- package/compiled.js +12 -12
- package/package.json +1 -1
- package/ui-test-worker.js +20 -20
- package/web/chunk-01hcjafh.js +2 -0
- package/web/{chunk-n8sky2q6.js → chunk-07agqp8h.js} +1 -1
- package/web/{chunk-hvw3gn2a.js → chunk-0k9aec1s.js} +20 -20
- package/web/{chunk-74j07k8k.js → chunk-0p1nmj5n.js} +2 -2
- package/web/chunk-0qr891eq.js +70 -0
- package/web/{chunk-ts7zrf5b.js → chunk-0whceqes.js} +2 -2
- package/web/chunk-0ytga215.js +1 -0
- package/web/{chunk-0z0y25zf.js → chunk-12z7d0hp.js} +3 -3
- package/web/chunk-14bad871.js +2 -0
- package/web/chunk-1amzv4ha.js +1 -0
- package/web/chunk-1cfh0e2e.js +324 -0
- package/web/chunk-1pasbxwh.js +89 -0
- package/web/{chunk-4d3a7xs2.js → chunk-1s2hp6h1.js} +1 -1
- package/web/chunk-26bwh1sb.js +169 -0
- package/web/{chunk-wnskxerq.js → chunk-2nht58dc.js} +5 -5
- package/web/chunk-2y0rc1fe.js +1 -0
- package/web/chunk-3hkgdw6f.js +36 -0
- package/web/chunk-4a4j030b.js +1 -0
- package/web/{chunk-nvhmq4z5.js → chunk-4m3zdd41.js} +6 -6
- package/web/chunk-4w298aqs.js +1 -0
- package/web/{chunk-t4c8xavd.js → chunk-56krfj3b.js} +7 -7
- package/web/{chunk-ds7srg4p.js → chunk-5nda24gv.js} +1 -1
- package/web/{chunk-42e3b9hv.js → chunk-5shygfgb.js} +19 -19
- package/web/chunk-65nwc4cf.js +1 -0
- package/web/chunk-6bwgdvf6.js +1 -0
- package/web/chunk-6enn8p66.js +1 -0
- package/web/chunk-6stt9d18.js +1 -0
- package/web/{chunk-4gavbw65.js → chunk-7a3c137d.js} +1 -1
- package/web/chunk-7e47b1sn.js +1 -0
- package/web/chunk-7pypx5h8.js +2 -0
- package/web/chunk-7znyd1mj.js +39 -0
- package/web/{chunk-3re8y26v.js → chunk-892nf39p.js} +7 -7
- package/web/chunk-8r0s8tx7.js +1 -0
- package/web/chunk-9dy7z3ej.js +2 -0
- package/web/chunk-9mq2cdtq.js +1 -0
- package/web/chunk-9w5tf22s.js +1 -0
- package/web/{chunk-bhsaj6qq.js → chunk-9xgspn75.js} +2 -2
- package/web/{chunk-zx8zec24.js → chunk-abhad4zj.js} +56 -56
- package/web/chunk-advfpyb9.js +140 -0
- package/web/chunk-affear07.js +3 -0
- package/web/chunk-ahztazsg.js +1 -0
- package/web/chunk-aqt7kc3s.js +106 -0
- package/web/chunk-b5hah4mf.js +1 -0
- package/web/chunk-b8tfetd8.js +1 -0
- package/web/{chunk-9cx1be43.js → chunk-bnb9xhgw.js} +15 -15
- package/web/{chunk-n1dmrz44.js → chunk-c01176kn.js} +2 -2
- package/web/chunk-c3nn0vvc.js +1 -0
- package/web/chunk-c53xmf48.js +30 -0
- package/web/chunk-ckgpy4r4.js +1 -0
- package/web/chunk-crzseqbx.js +24 -0
- package/web/chunk-d22wq71s.js +1 -0
- package/web/{chunk-pws2seas.js → chunk-d60dpf69.js} +19 -19
- package/web/{chunk-6cnek1xh.js → chunk-d6ddkh6e.js} +1 -1
- package/web/{chunk-cg3jterp.js → chunk-d9wdsjkk.js} +2 -2
- package/web/{chunk-ttg6tbwx.js → chunk-da7m1kva.js} +2 -2
- package/web/chunk-dbnrfxt1.js +8 -0
- package/web/chunk-ddxf8e84.js +1 -0
- package/web/chunk-dzg1pv80.js +200 -0
- package/web/{chunk-yqbnps3a.js → chunk-e8h45nyr.js} +1 -1
- package/web/chunk-ej9vb61c.js +1 -0
- package/web/chunk-f9k3xrwb.js +2 -0
- package/web/{chunk-fh2vj0wv.js → chunk-fjag6yg8.js} +2 -2
- package/web/chunk-fnnrrzqa.js +78 -0
- package/web/{chunk-n90cqdvg.js → chunk-fv6vm14n.js} +2 -2
- package/web/{chunk-b1bgzz66.js → chunk-g5jxwkdh.js} +1 -1
- package/web/{chunk-sspfxp5e.js → chunk-g8kkc6vz.js} +1 -1
- package/web/chunk-g9sqbafw.js +2 -0
- package/web/{chunk-0h0vb6gt.js → chunk-gcv91974.js} +4 -4
- package/web/{chunk-sfg2wkhe.js → chunk-gxqaa4sv.js} +7 -7
- package/web/chunk-gxsb5tx3.js +1 -0
- package/web/{chunk-54thej0t.js → chunk-gyp6v7jd.js} +2 -2
- package/web/chunk-h0c42zy3.js +1 -0
- package/web/chunk-h2ag4kvz.js +2 -0
- package/web/{chunk-kmr7r9xj.js → chunk-h6gh63xj.js} +2 -2
- package/web/{chunk-6m69hczt.js → chunk-h6k1x096.js} +2 -2
- package/web/{chunk-24mfx6w1.js → chunk-j1bw5v1g.js} +2 -2
- package/web/chunk-j34q5jn6.js +1 -0
- package/web/{chunk-0pbjgdgp.js → chunk-ja7w629n.js} +2 -2
- package/web/{chunk-zbj1trar.js → chunk-jam45rqg.js} +2 -2
- package/web/{chunk-f4tacm06.js → chunk-jcdw85mv.js} +1 -1
- package/web/chunk-jfvxxp5c.js +1 -0
- package/web/chunk-jg6fmz2d.js +1 -0
- package/web/{chunk-92ssjk2y.js → chunk-k67v6dyg.js} +40 -40
- package/web/chunk-ka7c5rhx.js +99 -0
- package/web/{chunk-df5zx17h.js → chunk-kza0t0gj.js} +1 -1
- package/web/{chunk-0b47eyrf.js → chunk-m8knte9z.js} +1 -1
- package/web/{chunk-v5cnt7c8.js → chunk-mnzramhc.js} +1 -1
- package/web/{chunk-a408enpy.js → chunk-mpfgr049.js} +1 -1
- package/web/chunk-mz1dabxh.js +1 -0
- package/web/chunk-mz9b5bsa.js +1 -0
- package/web/chunk-p53n0hwr.js +1 -0
- package/web/chunk-paywgcf7.js +40 -0
- package/web/chunk-pfcnr9tw.js +1 -0
- package/web/chunk-pyg1mr80.js +303 -0
- package/web/chunk-q7xkscc5.js +1 -0
- package/web/{chunk-xzp7jf7e.js → chunk-qcge7d6s.js} +2 -2
- package/web/chunk-qmbgb79a.js +1139 -0
- package/web/{chunk-pjkdrgm0.js → chunk-qq5gh5zr.js} +1 -1
- package/web/chunk-qrdh9j62.js +1 -0
- package/web/{chunk-9t5dnjaz.js → chunk-s24qs1bn.js} +9 -9
- package/web/chunk-sd22cnjy.js +1 -0
- package/web/{chunk-ydtrc1ay.js → chunk-sd3cdqcm.js} +2 -2
- package/web/{chunk-rykfak98.js → chunk-sf101c23.js} +2 -2
- package/web/{chunk-1gbd61z0.js → chunk-sfq6cw45.js} +2 -2
- package/web/chunk-svqj4az8.js +1 -0
- package/web/chunk-t7jwyvvr.js +1 -0
- package/web/{chunk-rvrf0f3h.js → chunk-tcp77cp2.js} +2 -2
- package/web/chunk-tf18d2dk.css +1 -0
- package/web/chunk-thbqwq6b.js +1 -0
- package/web/chunk-v0g4cqc1.js +4 -0
- package/web/chunk-vhzys0rr.js +292 -0
- package/web/chunk-vnt34mkb.js +1 -0
- package/web/chunk-vqfz99ff.js +1 -0
- package/web/chunk-vttgyb5v.js +2 -0
- package/web/chunk-x7sb3bwf.js +370 -0
- package/web/chunk-xce8n339.js +1 -0
- package/web/{chunk-kwccs9f6.js → chunk-xk1t58c4.js} +12 -12
- package/web/chunk-xsrvw7dt.js +4 -0
- package/web/chunk-xtss82z2.js +1 -0
- package/web/{chunk-2j4m0bh1.js → chunk-y7jq61nv.js} +2 -2
- package/web/{chunk-1eg9sbbt.js → chunk-ybw6vgf6.js} +2 -2
- package/web/{chunk-ybrf9mhz.js → chunk-yvgs6bm3.js} +4 -4
- package/web/{chunk-b53bfkys.js → chunk-z4aj066q.js} +1 -1
- package/web/chunk-zazs8p6c.js +1 -0
- package/web/{chunk-aqfpnhmt.js → chunk-zc1mk10n.js} +19 -19
- package/web/{chunk-d11v5s7w.js → chunk-zqht0jzx.js} +6 -6
- package/web/{chunk-pz9ps2jm.js → chunk-zz397b0v.js} +12 -12
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-06hdzq5n.js +0 -2
- package/chunk-5dfbezv9.js +0 -2
- package/chunk-5x1sankd.js +0 -3753
- package/chunk-71h08f4g.js +0 -2
- package/chunk-7nzhdrv9.js +0 -2
- package/chunk-7q51n619.js +0 -2
- package/chunk-9mmz6wt3.js +0 -2
- package/chunk-bpw6q7g0.js +0 -3
- package/chunk-fvn32nzj.js +0 -478
- package/chunk-n6e43rvk.js +0 -3
- package/chunk-ry0z4ev6.js +0 -2
- package/chunk-vkpvcxjr.js +0 -2
- package/web/chunk-0rmkpsgp.js +0 -1
- package/web/chunk-0s80zw00.js +0 -1
- package/web/chunk-0xkyryrq.js +0 -1
- package/web/chunk-2s0bmrkv.js +0 -39
- package/web/chunk-2z1rwr28.js +0 -2
- package/web/chunk-344bq59c.js +0 -89
- package/web/chunk-3t0211rw.js +0 -1
- package/web/chunk-44rmrmcn.js +0 -1
- package/web/chunk-4bzqrwr0.js +0 -1139
- package/web/chunk-4jmazh6x.js +0 -370
- package/web/chunk-4re74xwm.js +0 -140
- package/web/chunk-4rm1vy7w.js +0 -1
- package/web/chunk-59kqahb3.js +0 -1
- package/web/chunk-5qtyq3ce.js +0 -292
- package/web/chunk-5z4jcqct.js +0 -200
- package/web/chunk-5z6x2n5h.js +0 -1
- package/web/chunk-6beqrmtq.js +0 -1
- package/web/chunk-6f5ke0x9.js +0 -1
- package/web/chunk-6xaqxcq8.js +0 -1
- package/web/chunk-7q6wvv2x.js +0 -1
- package/web/chunk-7qsa4p8h.js +0 -1
- package/web/chunk-8nja0ygy.js +0 -1
- package/web/chunk-8y64fkpz.js +0 -24
- package/web/chunk-9ad7v7bm.js +0 -8
- package/web/chunk-9dzxv335.js +0 -4
- package/web/chunk-a497tykb.js +0 -70
- package/web/chunk-b6k9w215.js +0 -2
- package/web/chunk-cjfssg3m.js +0 -2
- package/web/chunk-cqp1d4p0.js +0 -1
- package/web/chunk-dy2gm1fs.js +0 -1
- package/web/chunk-e0zre35a.js +0 -1
- package/web/chunk-e9twvs9n.js +0 -3
- package/web/chunk-f2kgtyfp.js +0 -1
- package/web/chunk-f8bn5tzf.js +0 -1
- package/web/chunk-f91wzwtk.js +0 -1
- package/web/chunk-fdp9bsj7.js +0 -1
- package/web/chunk-g1ev11wx.js +0 -1
- package/web/chunk-gmzqdm7v.js +0 -1
- package/web/chunk-hfaffkrh.js +0 -1
- package/web/chunk-j2vt8c8v.js +0 -1
- package/web/chunk-ka3q31t1.js +0 -1
- package/web/chunk-khxcn8tt.js +0 -106
- package/web/chunk-kqqmp1am.js +0 -1
- package/web/chunk-m2d1sp30.js +0 -1
- package/web/chunk-nbgqbxcy.js +0 -1
- package/web/chunk-ncpnpe9w.js +0 -99
- package/web/chunk-ne0v8mfb.js +0 -2
- package/web/chunk-ngx2cp8x.js +0 -2
- package/web/chunk-nxcgf7ec.js +0 -1
- package/web/chunk-p0kvmf28.js +0 -2
- package/web/chunk-p3k7m5nr.js +0 -1
- package/web/chunk-pggaffrh.js +0 -169
- package/web/chunk-pxe3vna4.js +0 -1
- package/web/chunk-qh15dxav.css +0 -1
- package/web/chunk-qpmbxhh6.js +0 -1
- package/web/chunk-r0rctnxz.js +0 -1
- package/web/chunk-rn3dnqm8.js +0 -1
- package/web/chunk-rtf2zzzv.js +0 -1
- package/web/chunk-srrfphes.js +0 -1
- package/web/chunk-tdr6x2xc.js +0 -1
- package/web/chunk-tncvg1nn.js +0 -1
- package/web/chunk-vyp0ns1f.js +0 -2
- package/web/chunk-wvdehm9y.js +0 -303
- package/web/chunk-x7ahcpj7.js +0 -1
- package/web/chunk-y38bf0wm.js +0 -1
- package/web/chunk-y56aaba5.js +0 -2
- package/web/chunk-ye58t45p.js +0 -4
- package/web/chunk-z1h20s8c.js +0 -78
- package/web/chunk-zj4q9jth.js +0 -36
- package/web/chunk-zj5k94dk.js +0 -40
- package/web/chunk-zqch0sc8.js +0 -30
- package/web/install.ps1 +0 -91
- package/web/install.sh +0 -177
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{e,
|
|
1
|
+
import{e,a,ke,D,b,O,B,C,S,E,T,A,R,L,Wn,V,U,Vi}from"./chunk-pyg1mr80.js";import"./chunk-5nda24gv.js";import{Xe}from"./chunk-07agqp8h.js";import{wt}from"./chunk-h6gh63xj.js";import{Ot}from"./chunk-h0c42zy3.js";function Pt(t,i,s){t=+t,i=+i,s=(o=arguments.length)<2?(i=t,t=0,1):o<3?1:+s;var n=-1,o=Math.max(0,Math.ceil((i-t)/s))|0,c=Array(o);while(++n<o)c[n]=t+n*s;return c}function xt(){var t=Xe().unknown(void 0),{domain:i,range:s}=t,n=0,o=1,c,l,f=!1,g=0,y=0,z=0.5;delete t.unknown;function M(){var k=i().length,G=o<n,Y=G?o:n,N=G?n:o;if(c=(N-Y)/Math.max(1,k-g+y*2),f)c=Math.floor(c);if(Y+=(N-Y-c*(k-g))*z,l=c*(1-g),f)Y=Math.round(Y),l=Math.round(l);var j=Pt(k).map(function(it){return Y+c*it});return s(G?j.reverse():j)}return t.domain=function(k){return arguments.length?(i(k),M()):i()},t.range=function(k){return arguments.length?([n,o]=k,n=+n,o=+o,M()):[n,o]},t.rangeRound=function(k){return[n,o]=k,n=+n,o=+o,f=!0,M()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(k){return arguments.length?(f=!!k,M()):f},t.padding=function(k){return arguments.length?(g=Math.min(1,y=+k),M()):g},t.paddingInner=function(k){return arguments.length?(g=Math.min(1,k),M()):g},t.paddingOuter=function(k){return arguments.length?(y=+k,M()):y},t.align=function(k){return arguments.length?(z=Math.max(0,Math.min(1,k)),M()):z},t.copy=function(){return xt(i(),[n,o]).round(f).paddingInner(g).paddingOuter(y).align(z)},Ot.apply(M(),arguments)}var Lt=function(){var t=e(function(J,h,u,x){for(u=u||{},x=J.length;x--;u[J[x]]=h);return u},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],o=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],g=[1,25],y=[1,26],z=[1,28],M=[1,29],k=[1,30],G=[1,31],Y=[1,32],N=[1,33],j=[1,34],it=[1,35],nt=[1,36],_=[1,37],K=[1,43],d=[1,42],Q=[1,47],Z=[1,50],P=[1,10,12,14,16,18,19,21,23,36,37,38],ot=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],gt=[1,65],F=[26,28],v={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(h,u,x,p,I,r,rt){var m=r.length-1;switch(I){case 5:p.setOrientation(r[m]);break;case 9:p.setDiagramTitle(r[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},r[m]);break;case 13:p.setLineData(r[m-1],r[m]);break;case 14:p.setBarData({text:"",type:"text"},r[m]);break;case 15:p.setBarData(r[m-1],r[m]);break;case 16:this.$=r[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=r[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=r[m-1];break;case 20:case 30:this.$=[r[m-2],...r[m]];break;case 21:case 31:this.$=[r[m]];break;case 22:this.$={value:Number(r[m-1]),label:r[m]};break;case 23:this.$={value:Number(r[m]),label:""};break;case 24:p.setXAxisTitle(r[m]);break;case 25:p.setXAxisTitle(r[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(r[m]);break;case 28:p.setXAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 29:this.$=r[m-1];break;case 32:p.setYAxisTitle(r[m]);break;case 33:p.setYAxisTitle(r[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 39:this.$={text:r[m],type:"text"};break;case 40:this.$={text:r[m],type:"text"};break;case 41:this.$={text:r[m],type:"markdown"};break;case 42:this.$=r[m];break;case 43:this.$=r[m-1]+""+r[m];break}},"anonymous"),table:[t(i,s,{3:1,4:2,7:4,5:n,36:o,37:c,38:l}),{1:[3]},t(i,s,{4:2,7:4,3:8,5:n,36:o,37:c,38:l}),t(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:o,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(i,s,{4:2,7:4,3:21,5:n,36:o,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(i,[2,7],{4:22,36:o,37:c,38:l}),{11:23,30:g,39:24,40:y,41:27,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_},{11:39,13:38,24:K,29:d,30:g,31:40,32:41,39:24,40:y,41:27,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_},{11:45,15:44,29:Q,30:g,35:46,39:24,40:y,41:27,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_},{11:49,17:48,24:Z,30:g,39:24,40:y,41:27,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_},{11:52,17:51,24:Z,30:g,39:24,40:y,41:27,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_},{20:[1,53]},{22:[1,54]},t(P,[2,18]),{1:[2,2]},t(P,[2,8]),t(P,[2,9]),t(ot,[2,39],{41:55,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_}),t(ot,[2,40]),t(ot,[2,41]),t(H,[2,42]),t(H,[2,44]),t(H,[2,45]),t(H,[2,46]),t(H,[2,47]),t(H,[2,48]),t(H,[2,49]),t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(P,[2,10]),t(P,[2,24],{32:41,31:56,24:K,29:d}),t(P,[2,26]),t(P,[2,27]),{33:[1,57]},{11:59,30:g,34:58,39:24,40:y,41:27,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_},t(P,[2,11]),t(P,[2,32],{35:60,29:Q}),t(P,[2,34]),{33:[1,61]},t(P,[2,12]),{17:62,24:Z},{25:63,27:64,29:gt},t(P,[2,14]),{17:66,24:Z},t(P,[2,16]),t(P,[2,17]),t(H,[2,43]),t(P,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(P,[2,33]),{29:[1,70]},t(P,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(F,[2,23],{30:[1,73]}),t(P,[2,15]),t(P,[2,28]),t(P,[2,29]),{11:59,30:g,34:74,39:24,40:y,41:27,42:z,43:M,44:k,45:G,46:Y,47:N,48:j,49:it,50:nt,51:_},t(P,[2,35]),t(P,[2,19]),{25:75,27:64,29:gt},t(F,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(h,u){if(u.recoverable)this.trace(h);else{var x=Error(h);throw x.hash=u,x}},"parseError"),parse:e(function(h){var u=this,x=[0],p=[],I=[null],r=[],rt=this.table,m="",bt=0,Ht=0,$t=0,fe=2,Ut=1,pe=r.slice.call(arguments,1),X=Object.create(this.lexer),ht={yy:{}};for(var Rt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Rt))ht.yy[Rt]=this.yy[Rt];if(X.setInput(h,ht.yy),ht.yy.lexer=X,ht.yy.parser=this,typeof X.yylloc>"u")X.yylloc={};var _t=X.yylloc;r.push(_t);var me=X.options&&X.options.ranges;if(typeof ht.yy.parseError==="function")this.parseError=ht.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function be(et){x.length=x.length-2*et,I.length=I.length-et,r.length=r.length-et}e(be,"popStack");function qt(){var et=p.pop()||X.lex()||Ut;if(typeof et!=="number"){if(et instanceof Array)p=et,et=p.pop();et=u.symbols_[et]||et}return et}e(qt,"lex");var q,Tt,lt,tt,Oe,Dt,ut={},yt,at,Gt,kt;while(!0){if(lt=x[x.length-1],this.defaultActions[lt])tt=this.defaultActions[lt];else{if(q===null||typeof q>"u")q=qt();tt=rt[lt]&&rt[lt][q]}if(typeof tt>"u"||!tt.length||!tt[0]){var vt="";kt=[];for(yt in rt[lt])if(this.terminals_[yt]&&yt>fe)kt.push("'"+this.terminals_[yt]+"'");if(X.showPosition)vt="Parse error on line "+(bt+1)+`:
|
|
2
2
|
`+X.showPosition()+`
|
|
3
|
-
Expecting `+kt.join(", ")+", got '"+(this.terminals_[q]||q)+"'";else vt="Parse error on line "+(
|
|
3
|
+
Expecting `+kt.join(", ")+", got '"+(this.terminals_[q]||q)+"'";else vt="Parse error on line "+(bt+1)+": Unexpected "+(q==Ut?"end of input":"'"+(this.terminals_[q]||q)+"'");this.parseError(vt,{text:X.match,token:this.terminals_[q]||q,line:X.yylineno,loc:_t,expected:kt})}if(tt[0]instanceof Array&&tt.length>1)throw Error("Parse Error: multiple actions possible at state: "+lt+", token: "+q);switch(tt[0]){case 1:if(x.push(q),I.push(X.yytext),r.push(X.yylloc),x.push(tt[1]),q=null,!Tt){if(Ht=X.yyleng,m=X.yytext,bt=X.yylineno,_t=X.yylloc,$t>0)$t--}else q=Tt,Tt=null;break;case 2:if(at=this.productions_[tt[1]][1],ut.$=I[I.length-at],ut._$={first_line:r[r.length-(at||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(at||1)].first_column,last_column:r[r.length-1].last_column},me)ut._$.range=[r[r.length-(at||1)].range[0],r[r.length-1].range[1]];if(Dt=this.performAction.apply(ut,[m,Ht,bt,ht.yy,tt[1],I,r].concat(pe)),typeof Dt<"u")return Dt;if(at)x=x.slice(0,-1*at*2),I=I.slice(0,-1*at),r=r.slice(0,-1*at);x.push(this.productions_[tt[1]][0]),I.push(ut.$),r.push(ut._$),Gt=rt[x[x.length-2]][x[x.length-1]],x.push(Gt);break;case 3:return!0}}return!0},"parse")},st=function(){var J={EOF:1,parseError:e(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw Error(u)},"parseError"),setInput:e(function(h,u){if(this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);if(u)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),h},"input"),unput:e(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1)this.yylineno-=x.length-1;var I=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===p.length?this.yylloc.first_column:0)+p[p.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges)this.yylloc.range=[I[0],I[0]+this.yyleng-u];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),u=Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
|
-
`+u+"^"},"showPosition"),test_match:e(function(h,u){var x,p,
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var u=this.next();if(u)return u;else return this.lex()},"lex"),begin:e(function(u){this.conditionStack.push(u)},"begin"),popState:e(function(){var u=this.conditionStack.length-1;if(u>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:e(function(u){this.begin(u)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(u,x,p,M){var o=M;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return J}();_.lexer=st;function W(){this.yy={}}return e(W,"Parser"),W.prototype=_,_.Parser=W,new W}();Lt.parser=Lt;var ye=Lt;function At(t){return t.type==="bar"}e(At,"isBarPlot");function Ct(t){return t.type==="band"}e(Ct,"isBandAxisData");function dt(t){return t.type==="linear"}e(dt,"isLinearAxisData");var zt=class{constructor(t){this.parentGroup=t}static{e(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((g,y)=>Math.max(y.length,g),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i),a=n.node()?.getScreenCTM?.(),c=e((g)=>g&&g>0?g:1,"toScale"),l=c(a?.a),f=c(a?.d);for(let g of t){let y=qi(n,1,g),z=y?y.width/l:g.length*i,P=y?y.height/f:i;s.width=Math.max(s.width,z),s.height=Math.max(s.height,P)}return n.remove(),s}},jt=0.7,Qt=0.2,Kt=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,"BaseAxis")}setRange(t){if(this.range=t,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=t[1]-t[0];else this.boundingRect.width=t[1]-t[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t)=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(jt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(jt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Qt*t.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Qt*t.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(t);else this.calculateSpaceIfDrawnHorizontally(t);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ke=class extends Kt{static{e(this,"BandAxis")}constructor(t,i,s,n,a){super(t,n,a,i);this.categories=s,this.scale=ft().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=ft().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),r.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},Ae=class extends Kt{static{e(this,"LinearAxis")}constructor(t,i,s,n,a){super(t,n,a,i);this.domain=s,this.scale=xt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];if(this.axisPosition==="left")t.reverse();this.scale=xt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function Et(t,i,s,n){let a=new zt(n);if(Ct(t))return new ke(i,s,t.categories,t.title,a);return new Ae(i,s,[t.min,t.max],t.title,a)}e(Et,"getAxis");var Ce=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;if(n<=t.height&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.titleWidth=i.width,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,i){let s=Math.min(this.titleWidth,this.chartConfig.width)/2,n=Math.min(Math.max((t+i)/2,s),this.chartConfig.width-s);this.boundingRect.x=n-s,this.boundingRect.width=s*2}getDrawableElements(){let t=[];if(this.showChartTitle)t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return t}};function Zt(t,i,s,n){let a=new zt(n);return new Ce(a,t,i,s)}e(Zt,"getChartTitleComponent");var Se=0.75,Re=0.5,_e=0.35;function It(t){return{fontSize:t,markerSize:t*Se,markerSpacing:t*_e,itemSpacing:t*Re}}e(It,"getLegendLayout");var Te=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{e(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((g)=>g.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=It(this.chartConfig.legendFontSize),c=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((g)=>g.title),i),l=this.chartConfig.legendPadding*2+s+n+c.width,f=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(l<=t.width&&f<=t.height)this.boundingRect.width=l,this.boundingRect.height=f;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:t,markerSize:i,markerSpacing:s,itemSpacing:n}=It(this.chartConfig.legendFontSize),a=t+n,c=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,f=[],g=[];for(let[y,z]of this.visiblePlots.entries())if(At(z))f.push({x:c,y:l+y*a,width:i,height:i,fill:z.fill,strokeFill:z.fill,strokeWidth:0});else{let P=l+y*a+i/2;g.push({path:`M ${c},${P} L ${c+i},${P}`,strokeFill:z.strokeFill,strokeWidth:z.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:f},{groupTexts:["legend","markers"],type:"path",data:g},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((y,z)=>({text:y.title,x:c+i+s,y:l+z*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Jt(t,i,s,n){let a=new zt(n);return new Te(a,t,i,s)}e(Jt,"getChartLegendComponent");var De=class{constructor(t,i,s,n,a){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{e(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=qn().y((n)=>n[0]).x((n)=>n[1])(t);else i=qn().x((n)=>n[0]).y((n)=>n[1])(t);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let c=[];for(let[l,[f,g]]of t.entries()){let y=this.plotData.pointLabels[l];if(!y)continue;if(this.orientation==="horizontal")c.push({x:g+10,y:f,text:y,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else c.push({x:f,y:g-10,text:y,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(c.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return s}},ve=class{constructor(t,i,s,n,a,c){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=c}static{e(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Pe=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new De(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{let n=new ve(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}};function te(t,i,s){return new Pe(t,i,s)}e(te,"getPlotComponent");var Le=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Zt(t,i,s,n),plot:te(t,i,s),legend:Jt(t,i,s,n),xAxis:Et(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Et(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{e(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:l});if(t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,a=this.componentStore.legend.calculateSpace({width:t,height:l}),t-=a.width,t>0)c+=t,t=0;if(i>0)l+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:l}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.title.alignTo(s,s+c),this.componentStore.legend.setBoundingBoxXY({x:s+c,y:n+Math.max((l-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+c]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+l}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((g)=>At(g)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,c={width:0,height:0},l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:l,height:f});if(t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("left"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=g.width,n=g.width,this.componentStore.yAxis.setAxisPosition("top"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=g.height,a=s+g.height,c=this.componentStore.legend.calculateSpace({width:t,height:f}),t-=c.width,t>0)l+=t,t=0;if(i>0)f+=i,i=0;if(this.componentStore.plot.calculateSpace({width:l,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.title.alignTo(n,n+l),this.componentStore.legend.setBoundingBoxXY({x:n+l,y:a+Math.max((f-c.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((y)=>At(y)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},Ee=class{static{e(this,"XYChartBuilder")}static build(t,i,s,n){return new Le(t,i,s,n).getDrawableElement()}},pt=0,ee,mt=Wt(),bt=Vt(),w=Ft(),Bt=bt.plotColorPalette.split(",").map((t)=>t.trim()),St=!1,Ot=!1;function Vt(){let t=we(),i=b();return U(t.xyChart,i.themeVariables.xyChart)}e(Vt,"getChartDefaultThemeConfig");function Wt(){let t=b();return U(D.xyChart,t.xyChart)}e(Wt,"getChartDefaultConfig");function Ft(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}e(Ft,"getChartDefaultData");function ct(t){let i=b();return O(t.trim(),i)}e(ct,"textSanitizer");function ie(t){ee=t}e(ie,"setTmpSVGG");function se(t){if(t==="horizontal")mt.chartOrientation="horizontal";else mt.chartOrientation="vertical"}e(se,"setOrientation");function ne(t){w.xAxis.title=ct(t.text)}e(ne,"setXAxisTitle");function Xt(t,i){w.xAxis={type:"linear",title:w.xAxis.title,min:t,max:i},St=!0}e(Xt,"setXAxisRangeData");function ae(t){w.xAxis={type:"band",title:w.xAxis.title,categories:t.map((i)=>ct(i.text))},St=!0}e(ae,"setXAxisBand");function oe(t){w.yAxis.title=ct(t.text)}e(oe,"setYAxisTitle");function re(t,i){w.yAxis={type:"linear",title:w.yAxis.title,min:t,max:i},Ot=!0}e(re,"setYAxisRangeData");function he(t){let i=Math.min(...t),s=Math.max(...t),n=dt(w.yAxis)?w.yAxis.min:1/0,a=dt(w.yAxis)?w.yAxis.max:-1/0;w.yAxis={type:"linear",title:w.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}e(he,"setYAxisRangeFromPlotData");function Yt(t){let i=[];if(t.length===0)return i;if(!St){let s=dt(w.xAxis)?w.xAxis.min:1/0,n=dt(w.xAxis)?w.xAxis.max:-1/0;Xt(Math.min(s,1),Math.max(n,t.length))}if(Ct(w.xAxis)&&t.length>w.xAxis.categories.length)t=t.slice(0,w.xAxis.categories.length);if(!Ot)he(t);if(Ct(w.xAxis))i=w.xAxis.categories.map((s,n)=>[s,t[n]]);if(dt(w.xAxis)){let s=w.xAxis.min,n=w.xAxis.max;if(t.length===1)i=[[`${s}`,t[0]]];else{let a=(n-s)/(t.length-1);i=t.map((c,l)=>[`${s+l*a}`,c])}}return i}e(Yt,"transformDataWithoutCategory");function Nt(t){return Bt[t===0?0:t%Bt.length]}e(Nt,"getPlotColorFromPalette");function le(t,i){let s=i.map((l)=>l.value),n=i.map((l)=>l.label?ct(l.label):""),a=Yt(s),c=n.some((l)=>l!=="");w.plots.push({type:"line",title:ct(t.text),strokeFill:Nt(pt),strokeWidth:2,data:a,...c?{pointLabels:n}:{}}),pt++}e(le,"setLineData");function ce(t,i){let s=i.map((a)=>a.value),n=Yt(s);w.plots.push({type:"bar",title:ct(t.text),fill:Nt(pt),data:n}),pt++}e(ce,"setBarData");function ge(){if(w.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return w.title=L(),Ee.build(mt,w,bt,ee)}e(ge,"getDrawableElem");function ue(){return bt}e(ue,"getChartThemeConfig");function de(){return mt}e(de,"getChartConfig");function xe(){return w}e(xe,"getXYChartData");var Me=e(function(){C(),pt=0,mt=Wt(),w=Ft(),bt=Vt(),Bt=bt.plotColorPalette.split(",").map((t)=>t.trim()),St=!1,Ot=!1},"clear"),Ie={getDrawableElem:ge,clear:Me,setAccTitle:S,getAccTitle:E,setDiagramTitle:I,getDiagramTitle:L,getAccDescription:A,setAccDescription:T,setOrientation:se,setXAxisTitle:ne,setXAxisRangeData:Xt,setXAxisBand:ae,setYAxisTitle:oe,setYAxisRangeData:re,setLineData:le,setBarData:ce,setTmpSVGG:ie,getChartThemeConfig:ue,getChartConfig:de,getXYChartData:xe},Be=e((t,i,s,n)=>{let a=n.db,c=a.getChartThemeConfig(),l=a.getChartConfig(),f=a.getXYChartData().plots[0].data.map((R)=>R[1]);function g(R){return R==="top"?"text-before-edge":"middle"}e(g,"getDominantBaseLine");function y(R){return R==="left"?"start":R==="right"?"end":"middle"}e(y,"getTextAnchor");function z(R){return`translate(${R.x}, ${R.y}) rotate(${R.rotation||0})`}e(z,"getTextTransformation"),r.debug(`Rendering xychart chart
|
|
7
|
-
`+t);let
|
|
5
|
+
`+u+"^"},"showPosition"),test_match:e(function(h,u){var x,p,I;if(this.options.backtrack_lexer){if(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)I.yylloc.range=this.yylloc.range.slice(0)}if(p=h[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],x=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(x)return x;else if(this._backtrack){for(var r in I)this[r]=I[r];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,u,x,p;if(!this._more)this.yytext="",this.match="";var I=this._currentRules();for(var r=0;r<I.length;r++)if(x=this._input.match(this.rules[I[r]]),x&&(!u||x[0].length>u[0].length)){if(u=x,p=r,this.options.backtrack_lexer)if(h=this.test_match(x,I[r]),h!==!1)return h;else if(this._backtrack){u=!1;continue}else return!1;else if(!this.options.flex)break}if(u){if(h=this.test_match(u,I[p]),h!==!1)return h;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var u=this.next();if(u)return u;else return this.lex()},"lex"),begin:e(function(u){this.conditionStack.push(u)},"begin"),popState:e(function(){var u=this.conditionStack.length-1;if(u>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:e(function(u){this.begin(u)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(u,x,p,I){var r=I;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return J}();v.lexer=st;function W(){this.yy={}}return e(W,"Parser"),W.prototype=v,v.Parser=W,new W}();Lt.parser=Lt;var ye=Lt;function At(t){return t.type==="bar"}e(At,"isBarPlot");function Ct(t){return t.type==="band"}e(Ct,"isBandAxisData");function dt(t){return t.type==="linear"}e(dt,"isLinearAxisData");var Bt=class{constructor(t){this.parentGroup=t}static{e(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((g,y)=>Math.max(y.length,g),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i),o=n.node()?.getScreenCTM?.(),c=e((g)=>g&&g>0?g:1,"toScale"),l=c(o?.a),f=c(o?.d);for(let g of t){let y=Vi(n,1,g),z=y?y.width/l:g.length*i,M=y?y.height/f:i;s.width=Math.max(s.width,z),s.height=Math.max(s.height,M)}return n.remove(),s}},jt=0.7,Qt=0.2,Kt=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,"BaseAxis")}setRange(t){if(this.range=t,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=t[1]-t[0];else this.boundingRect.width=t[1]-t[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t)=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(jt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(jt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Qt*t.width;this.outerPadding=Math.min(s.width/2,n);let o=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)o=Math.max(o,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(o+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,o<=i)i-=o,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Qt*t.height;this.outerPadding=Math.min(s.height/2,n);let o=s.width+this.axisConfig.labelPadding*2;if(o<=i)i-=o,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(t);else this.calculateSpaceIfDrawnHorizontally(t);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},we=class extends Kt{static{e(this,"BandAxis")}constructor(t,i,s,n,o){super(t,n,o,i);this.categories=s,this.scale=xt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=xt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),a.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},Ae=class extends Kt{static{e(this,"LinearAxis")}constructor(t,i,s,n,o){super(t,n,o,i);this.domain=s,this.scale=wt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];if(this.axisPosition==="left")t.reverse();this.scale=wt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function Et(t,i,s,n){let o=new Bt(n);if(Ct(t))return new we(i,s,t.categories,t.title,o);return new Ae(i,s,[t.min,t.max],t.title,o)}e(Et,"getAxis");var Ce=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;if(n<=t.height&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.titleWidth=i.width,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,i){let s=Math.min(this.titleWidth,this.chartConfig.width)/2,n=Math.min(Math.max((t+i)/2,s),this.chartConfig.width-s);this.boundingRect.x=n-s,this.boundingRect.width=s*2}getDrawableElements(){let t=[];if(this.showChartTitle)t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return t}};function Zt(t,i,s,n){let o=new Bt(n);return new Ce(o,t,i,s)}e(Zt,"getChartTitleComponent");var Se=0.75,Re=0.5,_e=0.35;function Mt(t){return{fontSize:t,markerSize:t*Se,markerSpacing:t*_e,itemSpacing:t*Re}}e(Mt,"getLegendLayout");var Te=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{e(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((g)=>g.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:o}=Mt(this.chartConfig.legendFontSize),c=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((g)=>g.title),i),l=this.chartConfig.legendPadding*2+s+n+c.width,f=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*o;if(l<=t.width&&f<=t.height)this.boundingRect.width=l,this.boundingRect.height=f;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:t,markerSize:i,markerSpacing:s,itemSpacing:n}=Mt(this.chartConfig.legendFontSize),o=t+n,c=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,f=[],g=[];for(let[y,z]of this.visiblePlots.entries())if(At(z))f.push({x:c,y:l+y*o,width:i,height:i,fill:z.fill,strokeFill:z.fill,strokeWidth:0});else{let M=l+y*o+i/2;g.push({path:`M ${c},${M} L ${c+i},${M}`,strokeFill:z.strokeFill,strokeWidth:z.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:f},{groupTexts:["legend","markers"],type:"path",data:g},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((y,z)=>({text:y.title,x:c+i+s,y:l+z*o+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Jt(t,i,s,n){let o=new Bt(n);return new Te(o,t,i,s)}e(Jt,"getChartLegendComponent");var De=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}static{e(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=Wn().y((n)=>n[0]).x((n)=>n[1])(t);else i=Wn().x((n)=>n[0]).y((n)=>n[1])(t);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let c=[];for(let[l,[f,g]]of t.entries()){let y=this.plotData.pointLabels[l];if(!y)continue;if(this.orientation==="horizontal")c.push({x:g+10,y:f,text:y,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else c.push({x:f,y:g-10,text:y,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(c.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return s}},ve=class{constructor(t,i,s,n,o,c){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=c}static{e(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map((o)=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((o)=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((o)=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Pe=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new De(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{let n=new ve(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}};function te(t,i,s){return new Pe(t,i,s)}e(te,"getPlotComponent");var Le=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Zt(t,i,s,n),plot:te(t,i,s),legend:Jt(t,i,s,n),xAxis:Et(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Et(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{e(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o={width:0,height:0},c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:l});if(t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,o=this.componentStore.legend.calculateSpace({width:t,height:l}),t-=o.width,t>0)c+=t,t=0;if(i>0)l+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:l}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.title.alignTo(s,s+c),this.componentStore.legend.setBoundingBoxXY({x:s+c,y:n+Math.max((l-o.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+c]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+l}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((g)=>At(g)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,c={width:0,height:0},l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:l,height:f});if(t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("left"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=g.width,n=g.width,this.componentStore.yAxis.setAxisPosition("top"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=g.height,o=s+g.height,c=this.componentStore.legend.calculateSpace({width:t,height:f}),t-=c.width,t>0)l+=t,t=0;if(i>0)f+=i,i=0;if(this.componentStore.plot.calculateSpace({width:l,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.title.alignTo(n,n+l),this.componentStore.legend.setBoundingBoxXY({x:n+l,y:o+Math.max((f-c.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+l]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some((y)=>At(y)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},Ee=class{static{e(this,"XYChartBuilder")}static build(t,i,s,n){return new Le(t,i,s,n).getDrawableElement()}},ft=0,ee,pt=Wt(),mt=Vt(),w=Ft(),It=mt.plotColorPalette.split(",").map((t)=>t.trim()),St=!1,zt=!1;function Vt(){let t=ke(),i=b();return U(t.xyChart,i.themeVariables.xyChart)}e(Vt,"getChartDefaultThemeConfig");function Wt(){let t=b();return U(D.xyChart,t.xyChart)}e(Wt,"getChartDefaultConfig");function Ft(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}e(Ft,"getChartDefaultData");function ct(t){let i=b();return O(t.trim(),i)}e(ct,"textSanitizer");function ie(t){ee=t}e(ie,"setTmpSVGG");function se(t){if(t==="horizontal")pt.chartOrientation="horizontal";else pt.chartOrientation="vertical"}e(se,"setOrientation");function ne(t){w.xAxis.title=ct(t.text)}e(ne,"setXAxisTitle");function Xt(t,i){w.xAxis={type:"linear",title:w.xAxis.title,min:t,max:i},St=!0}e(Xt,"setXAxisRangeData");function ae(t){w.xAxis={type:"band",title:w.xAxis.title,categories:t.map((i)=>ct(i.text))},St=!0}e(ae,"setXAxisBand");function oe(t){w.yAxis.title=ct(t.text)}e(oe,"setYAxisTitle");function re(t,i){w.yAxis={type:"linear",title:w.yAxis.title,min:t,max:i},zt=!0}e(re,"setYAxisRangeData");function he(t){let i=Math.min(...t),s=Math.max(...t),n=dt(w.yAxis)?w.yAxis.min:1/0,o=dt(w.yAxis)?w.yAxis.max:-1/0;w.yAxis={type:"linear",title:w.yAxis.title,min:Math.min(n,i),max:Math.max(o,s)}}e(he,"setYAxisRangeFromPlotData");function Yt(t){let i=[];if(t.length===0)return i;if(!St){let s=dt(w.xAxis)?w.xAxis.min:1/0,n=dt(w.xAxis)?w.xAxis.max:-1/0;Xt(Math.min(s,1),Math.max(n,t.length))}if(Ct(w.xAxis)&&t.length>w.xAxis.categories.length)t=t.slice(0,w.xAxis.categories.length);if(!zt)he(t);if(Ct(w.xAxis))i=w.xAxis.categories.map((s,n)=>[s,t[n]]);if(dt(w.xAxis)){let s=w.xAxis.min,n=w.xAxis.max;if(t.length===1)i=[[`${s}`,t[0]]];else{let o=(n-s)/(t.length-1);i=t.map((c,l)=>[`${s+l*o}`,c])}}return i}e(Yt,"transformDataWithoutCategory");function Nt(t){return It[t===0?0:t%It.length]}e(Nt,"getPlotColorFromPalette");function le(t,i){let s=i.map((l)=>l.value),n=i.map((l)=>l.label?ct(l.label):""),o=Yt(s),c=n.some((l)=>l!=="");w.plots.push({type:"line",title:ct(t.text),strokeFill:Nt(ft),strokeWidth:2,data:o,...c?{pointLabels:n}:{}}),ft++}e(le,"setLineData");function ce(t,i){let s=i.map((o)=>o.value),n=Yt(s);w.plots.push({type:"bar",title:ct(t.text),fill:Nt(ft),data:n}),ft++}e(ce,"setBarData");function ge(){if(w.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return w.title=L(),Ee.build(pt,w,mt,ee)}e(ge,"getDrawableElem");function ue(){return mt}e(ue,"getChartThemeConfig");function de(){return pt}e(de,"getChartConfig");function xe(){return w}e(xe,"getXYChartData");var Me=e(function(){C(),ft=0,pt=Wt(),w=Ft(),mt=Vt(),It=mt.plotColorPalette.split(",").map((t)=>t.trim()),St=!1,zt=!1},"clear"),Ie={getDrawableElem:ge,clear:Me,setAccTitle:S,getAccTitle:E,setDiagramTitle:R,getDiagramTitle:L,getAccDescription:A,setAccDescription:T,setOrientation:se,setXAxisTitle:ne,setXAxisRangeData:Xt,setXAxisBand:ae,setYAxisTitle:oe,setYAxisRangeData:re,setLineData:le,setBarData:ce,setTmpSVGG:ie,getChartThemeConfig:ue,getChartConfig:de,getXYChartData:xe},Be=e((t,i,s,n)=>{let o=n.db,c=o.getChartThemeConfig(),l=o.getChartConfig(),f=o.getXYChartData().plots[0].data.map((_)=>_[1]);function g(_){return _==="top"?"text-before-edge":"middle"}e(g,"getDominantBaseLine");function y(_){return _==="left"?"start":_==="right"?"end":"middle"}e(y,"getTextAnchor");function z(_){return`translate(${_.x}, ${_.y}) rotate(${_.rotation||0})`}e(z,"getTextTransformation"),a.debug(`Rendering xychart chart
|
|
7
|
+
`+t);let M=V(i),k=M.append("g").attr("class","main"),G=k.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");B(M,l.height,l.width,!0),M.attr("viewBox",`0 0 ${l.width} ${l.height}`),G.attr("fill",c.backgroundColor),o.setTmpSVGG(M.append("g").attr("class","mermaid-tmp-group"));let Y=o.getDrawableElem(),N={};function j(_){let K=k,d="";for(let[Q]of _.entries()){let Z=k;if(Q>0&&N[d])Z=N[d];if(d+=_[Q],K=N[d],!K)K=N[d]=Z.append("g").attr("class",_[Q])}return K}e(j,"getGroup");for(let _ of Y){if(_.data.length===0)continue;let K=j(_.groupTexts);switch(_.type){case"rect":if(K.selectAll("rect").data(_.data).enter().append("rect").attr("x",(d)=>d.x).attr("y",(d)=>d.y).attr("width",(d)=>d.width).attr("height",(d)=>d.height).attr("fill",(d)=>d.fill).attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth),l.showDataLabel){let d=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let Q=function(v,st){let{data:W,label:J}=v;return st*J.length*Z<=W.width-P};var it=Q;e(Q,"fitsHorizontally");let Z=0.7,P=10,ot=_.data.map((v,st)=>({data:v,label:f[st].toString()})).filter((v)=>v.data.width>0&&v.data.height>0),H=ot.map((v)=>{let{data:st}=v,W=st.height*0.7;while(!Q(v,W)&&W>0)W-=1;return W}),gt=Math.floor(Math.min(...H)),F=e((v)=>{if(d)return v.data.x+v.data.width+P;else return v.data.x+v.data.width-P},"determineLabelXPosition");K.selectAll("text").data(ot).enter().append("text").attr("x",F).attr("y",(v)=>v.data.y+v.data.height/2).attr("text-anchor",d?"start":"end").attr("dominant-baseline","middle").attr("fill",c.dataLabelColor).attr("font-size",`${gt}px`).text((v)=>v.label)}else{let Q=function(F,v,st){let{data:W,label:J}=F,h=0.7,u=v*J.length*0.7,x=W.x+W.width/2,p=x-u/2,I=x+u/2,r=p>=W.x&&I<=W.x+W.width,rt=W.y+st+v<=W.y+W.height;return r&&rt};var nt=Q;e(Q,"fitsInBar");let Z=10,P=_.data.map((F,v)=>({data:F,label:f[v].toString()})).filter((F)=>F.data.width>0&&F.data.height>0),ot=P.map((F)=>{let{data:v,label:st}=F,W=v.width/(st.length*0.7);while(!Q(F,W,Z)&&W>0)W-=1;return W}),H=Math.floor(Math.min(...ot)),gt=e((F)=>{if(d)return F.data.y-Z;else return F.data.y+Z},"determineLabelYPosition");K.selectAll("text").data(P).enter().append("text").attr("x",(F)=>F.data.x+F.data.width/2).attr("y",gt).attr("text-anchor","middle").attr("dominant-baseline",d?"auto":"hanging").attr("fill",c.dataLabelColor).attr("font-size",`${H}px`).text((F)=>F.label)}}break;case"text":K.selectAll("text").data(_.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(d)=>d.fill).attr("font-size",(d)=>d.fontSize).attr("dominant-baseline",(d)=>g(d.verticalPos)).attr("text-anchor",(d)=>y(d.horizontalPos)).attr("transform",(d)=>z(d)).text((d)=>d.text);break;case"path":K.selectAll("path").data(_.data).enter().append("path").attr("d",(d)=>d.path).attr("fill",(d)=>d.fill?d.fill:"none").attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth);break}}},"draw"),ze={draw:Be},ti={parser:ye,db:Ie,renderer:ze};export{ti as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{gi}from"./chunk-zc1mk10n.js";export{gi as createRadarServices};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{G}from"./chunk-14bad871.js";import{e,a,D,b,O,ft,C,S,E,T,A,R,L,l,p,V,Fi,Dn,nt,U,ze,Ie}from"./chunk-pyg1mr80.js";import{X}from"./chunk-zc1mk10n.js";import{ct,lr}from"./chunk-892nf39p.js";import{Se,Te}from"./chunk-qmbgb79a.js";var gt=Te(function(rt,st){(function(i,s){if(typeof rt==="object"&&typeof st==="object")st.exports=s(lr());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof rt==="object")rt.cytoscapeFcose=s(lr());else i.cytoscapeFcose=s(i.coseBase)})(rt,function(t){return(()=>{var i={658:(N)=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(B){for(var v=arguments.length,I=Array(v>1?v-1:0),c=1;c<v;c++)I[c-1]=arguments[c];return I.forEach(function(y){Object.keys(y).forEach(function(d){return B[d]=y[d]})}),B}},548:(N,B,v)=>{var I=function(){function d(f,u){var g=[],r=!0,_=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(r=(h=o.next()).done);r=!0)if(g.push(h.value),u&&g.length===u)break}catch(k){_=!0,F=k}finally{try{if(!r&&o.return)o.return()}finally{if(_)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(r,_){if(typeof r==="number")r=_;var F=r.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var r=new c,_=new Set,F=[],o=void 0,h=void 0,k=void 0,n=!1,P=1,j=[],M=[],q=function(){var x=d.collection();M.push(x);var H=u[0],Z=d.collection();Z.merge(H).merge(H.descendants().intersection(f)),F.push(H),Z.forEach(function(re){r.push(re),_.add(re),x.merge(re)});var Q=function(){H=r.shift();var ue=d.collection();H.neighborhood().nodes().forEach(function(W){if(f.intersection(H.edgesWith(W)).length>0)ue.merge(W)});for(var Le=0;Le<ue.length;Le++){var $e=ue[Le];if(o=u.intersection($e.union($e.ancestors())),o!=null&&!_.has(o[0])){var de=o.union(o.descendants());de.forEach(function(W){if(r.push(W),_.add(W),x.merge(W),u.has(W))F.push(W)})}}};while(r.length!=0)Q();if(x.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(x.has(ue.source())&&x.has(ue.target()))x.merge(ue)})}),F.length==u.length)n=!0;if(!n||n&&P>1){h=F[0],k=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<k)k=re.connectedEdges().length,h=re}),j.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do q();while(!n);if(g){if(j.length>0)g.set("dummy"+(g.size+1),j)}return M},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:_,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,k=void 0;try{for(var n=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=n.next()).done);o=!0){var j=P.value,M=I(j,2),q=M[0],Y=M[1],x=u.cy.getElementById(q);if(x){var H=x.boundingBox(),Z=f.xCoords[Y]-H.w/2,Q=f.xCoords[Y]+H.w/2,se=f.yCoords[Y]-H.h/2,re=f.yCoords[Y]+H.h/2;if(Z<g)g=Z;if(Q>r)r=Q;if(se<_)_=se;if(re>F)F=re}}}catch(W){h=!0,k=W}finally{try{if(!o&&n.return)n.return()}finally{if(h)throw k}}var ue=d.x-(r+g)/2,Le=d.y-(F+_)/2;f.xCoords=f.xCoords.map(function(W){return W+ue}),f.yCoords=f.yCoords.map(function(W){return W+Le})}else{Object.keys(f).forEach(function(W){var oe=f[W],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>r)r=ke;if(De<_)_=De;if(xe>F)F=xe});var $e=d.x-(r+g)/2,de=d.y-(F+_)/2;Object.keys(f).forEach(function(W){var oe=f[W];oe.setCenter(oe.getCenterX()+$e,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:_,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,k=void 0,n=void 0,P=void 0,j=d.descendants().not(":parent"),M=j.length;for(var q=0;q<M;q++){var Y=j[q];if(h=f[g.get(Y.id())]-Y.width()/2,k=f[g.get(Y.id())]+Y.width()/2,n=u[g.get(Y.id())]-Y.height()/2,P=u[g.get(Y.id())]+Y.height()/2,r>h)r=h;if(_<k)_=k;if(F>n)F=n;if(o<P)o=P}var x={};return x.topLeftX=r,x.topLeftY=F,x.width=_-r,x.height=o-F,x},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(_){if(_.css("display")!="none")r=!0}),!r)u.merge(g)}),u},N.exports=y},816:(N,B,v)=>{var I=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,r=v(140).CoSEConstants,_=function(o,h){var{cy:k,eles:n}=o,P=n.nodes(),j=n.edges(),M=void 0,q=void 0,Y=void 0,x={};if(o.randomize)M=h.nodeIndexes,q=h.xCoords,Y=h.yCoords;var H=function(W){return typeof W==="function"},Z=function(W,oe){if(H(W))return W(oe);else return W},Q=I.calcParentsWithoutChildren(k,n),se=function de(W,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var J=oe[xe],Ae=null;if(J.intersection(Q).length==0)Ae=J.children();var ie=void 0,ve=J.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(J.outerWidth()!=null&&J.outerHeight()!=null)if(ke.randomize)if(!J.isParent())ie=W.add(new y(Ne.graphManager,new d(q[M.get(J.id())]-ve.w/2,Y[M.get(J.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=I.calcBoundingBox(J,q,Y,M);if(J.intersection(Q).length==0)ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=W.add(new y(Ne.graphManager,new d(J.position("x")-ve.w/2,J.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=W.add(new y(this.graphManager));if(ie.id=J.data("id"),ie.nodeRepulsion=Z(ke.nodeRepulsion,J),ie.paddingLeft=parseInt(J.css("padding")),ie.paddingTop=parseInt(J.css("padding")),ie.paddingRight=parseInt(J.css("padding")),ie.paddingBottom=parseInt(J.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=J.css("text-valign"),ie.labelPosHorizontal=J.css("text-halign");if(x[J.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Ae!=null&&Ae.length>0){var Ge=void 0;Ge=Ne.getGraphManager().add(Ne.newGraph(),ie),de(Ge,Ae,Ne,ke)}}},re=function(W,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var J=Ne[xe],Ae=x[J.data("source")],ie=x[J.data("target")];if(Ae&&ie&&Ae!==ie&&Ae.getEdgesBetween(ie).length==0){var ve=oe.add(W.newEdge(),Ae,ie);ve.id=J.id(),ve.idealLength=Z(o.idealEdgeLength,J),ve.edgeElasticity=Z(o.edgeElasticity,J),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!H(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(W,oe){if(oe.fixedNodeConstraint)W.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)W.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)W.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Le=new c,$e=Le.newGraphManager();return se($e.addRoot(),I.getTopMostNodes(P),Le,o),re(Le,$e,j),ue(Le,o),Le.runLayout(),x};N.exports={coseLayout:_}},212:(N,B,v)=>{var I=function(){function o(h,k){for(var n=0;n<k.length;n++){var P=k[n];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,k,n){if(k)o(h.prototype,k);if(n)o(h,n);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),r=g.coseLayout,_=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},_,h)}return I(o,[{key:"run",value:function(){var k=this,n=this.options,{cy:P,eles:j}=n,M=[],q=void 0,Y=void 0,x=[],H=void 0,Z=[];if(n.fixedNodeConstraint&&(!Array.isArray(n.fixedNodeConstraint)||n.fixedNodeConstraint.length==0))n.fixedNodeConstraint=void 0;if(n.alignmentConstraint){if(n.alignmentConstraint.vertical&&(!Array.isArray(n.alignmentConstraint.vertical)||n.alignmentConstraint.vertical.length==0))n.alignmentConstraint.vertical=void 0;if(n.alignmentConstraint.horizontal&&(!Array.isArray(n.alignmentConstraint.horizontal)||n.alignmentConstraint.horizontal.length==0))n.alignmentConstraint.horizontal=void 0}if(n.relativePlacementConstraint&&(!Array.isArray(n.relativePlacementConstraint)||n.relativePlacementConstraint.length==0))n.relativePlacementConstraint=void 0;var Q=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(Q)n.tile=!1,n.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&n.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(j.nodes().length>0)if(!re){var ue=n.eles.boundingBox();if(Z.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Le=u(n);M.push(Le)}if(n.quality=="default"||n.quality=="proof")x.push(r(n,M[0])),d.relocateComponent(Z[0],x[0],n);else d.relocateComponent(Z[0],M[0],n)}else{var $e=d.getTopMostNodes(n.eles.nodes());if(H=d.connectComponents(P,n.eles,$e),H.forEach(function(K){var z=K.boundingBox();Z.push({x:z.x1+z.w/2,y:z.y1+z.h/2})}),n.randomize)H.forEach(function(K){n.eles=K,M.push(u(n))});if(n.quality=="default"||n.quality=="proof"){var de=P.collection();if(n.tile){var W=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:W,xCoords:oe,yCoords:Ne},xe=[];if(H.forEach(function(K,z){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(z)}),de.length>1){var J=de.boundingBox();Z.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),H.push(de),M.push(De);for(var Ae=xe.length-1;Ae>=0;Ae--)H.splice(xe[Ae],1),M.splice(xe[Ae],1),Z.splice(xe[Ae],1)}}H.forEach(function(K,z){n.eles=K,x.push(r(n,M[z])),d.relocateComponent(Z[z],x[z],n)})}else H.forEach(function(K,z){d.relocateComponent(Z[z],M[z],n)});var ie=new Set;if(H.length>1){var ve=[],Me=j.filter(function(K){return K.css("display")=="none"});H.forEach(function(K,z){var pe=void 0;if(n.quality=="draft")pe=M[z].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(n.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:M[z].xCoords[me]-fe.boundingbox().w/2,y:M[z].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,M[z].xCoords,M[z].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(x[z][fe.id()])le.nodes.push({x:x[z][fe.id()].getLeft(),y:x[z][fe.id()].getTop(),width:x[z][fe.id()].getWidth(),height:x[z][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Pe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,M[z].xCoords,M[z].yCoords,pe);Pe.push(We.topLeftX+We.width/2),Pe.push(We.topLeftY+We.height/2)}else Pe.push(M[z].xCoords[Be]),Pe.push(M[z].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,M[z].xCoords,M[z].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(M[z].xCoords[et]),Ye.push(M[z].yCoords[et]);le.edges.push({startX:Pe[0],startY:Pe[1],endX:Ye[0],endY:Ye[1]})}else if(x[z][he.id()]&&x[z][Ee.id()])le.edges.push({startX:x[z][he.id()].getCenterX(),startY:x[z][he.id()].getCenterY(),endX:x[z][Ee.id()].getCenterX(),endY:x[z][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(z)}});var Ge=se.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")M.forEach(function(K,z){var pe=K.xCoords.map(function(me){return me+Ge[z].dx}),le=K.yCoords.map(function(me){return me+Ge[z].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(x[K]).forEach(function(z){var pe=x[K][z];pe.setCenter(pe.getCenterX()+Ge[Ke].dx,pe.getCenterY()+Ge[Ke].dy)}),Ke++})}}}var je=function(z,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof z==="number")z=pe;var le=void 0,me=void 0,fe=z.data("id");if(x.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:z.position("x"),y:z.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(M.forEach(function(Ee){var Be=Ee.nodeIndexes.get(z.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:z.position("x"),y:z.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var at=d.calcParentsWithoutChildren(P,j),qe=j.filter(function(K){return K.css("display")=="none"});if(n.eles=j.not(qe),j.nodes().not(":parent").not(qe).layoutPositions(k,n,je),at.length>0)at.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();N.exports=F},657:(N,B,v)=>{var I=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:r}=u,_=r.nodes(),F=r.nodes(":parent"),o=new Map,h=new Map,k=new Map,n=[],P=[],j=[],M=[],q=[],Y=[],x=[],H=[],Z=void 0,Q=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Le,nodeSeparation:$e}=u,de=void 0,W=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Q),ne=!1;for(var ae=0;ae<te;ae++)if(M[ae]==ee){ne=!0;break}if(!ne)M[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Ce=void 0,be=[],Fe=0,_e=1;for(var Ue=0;Ue<Q;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=n[ce];for(var He=0;He<Xe.length;He++)if(Ce=h.get(Xe[He]),be[Ce]==se)be[Ce]=be[ce]+1,ae[++ge]=Ce;Y[ce][te]=be[ce]*$e}if(ne){for(var Oe=0;Oe<Q;Oe++)if(Y[Oe][te]<q[Oe])q[Oe]=Y[Oe][te];for(var tt=0;tt<Q;tt++)if(q[tt]>Fe)Fe=q[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){W();for(var ne=0;ne<de;ne++)oe(M[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Q),Z=te;for(var ae=0;ae<Q;ae++)q[ae]=se;for(var we=0;we<de;we++)M[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Q;ge++)for(var ce=0;ce<de;ce++)Y[ge][ce]*=Y[ge][ce];for(var Ce=0;Ce<de;Ce++)x[Ce]=[];for(var be=0;be<de;be++)for(var Fe=0;Fe<de;Fe++)x[be][Fe]=Y[M[Fe]][be]},ke=function(){var ee=y.svd(x),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Ce=0;Ce<de;Ce++)if(ge[ce][Ce]=0,ce==Ce)ge[ce][Ce]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}H=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Q;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Ce=0,be=re,Fe=re,_e=void 0;while(!0){Ce++;for(var Ue=0;Ue<Q;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),Y,H)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Xe=0;Xe<Q;Xe++)we[Xe]=ne[Xe];Ce=0,Fe=re;while(!0){Ce++;for(var He=0;He<Q;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),Y,H)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Oe=0;Oe<Q;Oe++)ge[Oe]=ae[Oe];P=c.multCons(we,Math.sqrt(Math.abs(ee))),j=c.multCons(ge,Math.sqrt(Math.abs(te)))};I.connectComponents(g,r,I.getTopMostNodes(_),o),F.forEach(function(ye){I.connectComponents(g,r,I.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var J=0;J<_.length;J++)if(!_[J].isParent())h.set(_[J].id(),xe++);var Ae=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),Ge;!(Ae=(Ge=Me.next()).done);Ae=!0){var Ke=Ge.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Ae&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)n[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(r);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(r);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),k.set(ye.id(),ee.nodes(":childless")[te].id())}),_.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(k.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(r.intersection(ye.edgesWith(te)).length>0)if(te.isParent())n[ee].push(k.get(te.id()));else n[ee].push(te.id())})});var at=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=k.get(ae);else ne=ae;n[te].push(ne),n[h.get(ne)].push(ee)})},qe=!0,K=!1,z=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;at(me)}}catch(ye){K=!0,z=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw z}}Q=h.size;var fe=void 0;if(Q>2){de=Q<u.sampleSize?Q:u.sampleSize;for(var he=0;he<Q;he++)Y[he]=[];for(var Ee=0;Ee<de;Ee++)H[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Le),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:j};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),j.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:j};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Pe=et.position(),Ye=et.outerWidth();if(P.push(Pe.x),j.push(Pe.y),Q==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Pe.x+Ye/2+Je/2+u.idealEdgeLength),j.push(Pe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:j},fe}};N.exports={spectralLayout:d}},579:(N,B,v)=>{var I=v(212),c=function(d){if(!d)return;d("layout","fcose",I)};if(typeof cytoscape<"u")c(cytoscape);N.exports=c},140:(N)=>{N.exports=t}},s={};function w(N){var B=s[N];if(B!==void 0)return B.exports;var v=s[N]={exports:{}};return i[N](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Se(gt(),1);var ht={L:"left",R:"right",T:"top",B:"bottom"},vt={L:e((t)=>`${t},${t/2} 0,${t} 0,0`,"L"),R:e((t)=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:e((t)=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:e((t)=>`${t/2},0 ${t},${t} 0,${t}`,"B")},ot={L:e((t,i)=>t-i+2,"L"),R:e((t,i)=>t-2,"R"),T:e((t,i)=>t-i+2,"T"),B:e((t,i)=>t-2,"B")},kt=e(function(t){if(Re(t))return t==="L"?"R":"L";else return t==="T"?"B":"T"},"getOppositeArchitectureDirection"),pt=e(function(t){let i=t;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Re=e(function(t){let i=t;return i==="L"||i==="R"},"isArchitectureDirectionX"),Ve=e(function(t){let i=t;return i==="T"||i==="B"},"isArchitectureDirectionY"),ut=e(function(t,i){let s=Re(t)&&Ve(i),w=Ve(t)&&Re(i);return s||w},"isArchitectureDirectionXY"),Dt=e(function(t){let i=t[0],s=t[1],w=Re(i)&&Ve(s),m=Ve(i)&&Re(s);return w||m},"isArchitecturePairXY"),Rt=e(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),lt=e(function(t,i){let s=`${t}${i}`;return Rt(s)?s:void 0},"getArchitectureDirectionPair"),Mt=e(function([t,i],s){let w=s[0],m=s[1];if(Re(w))if(Ve(m))return[t+(w==="L"?-1:1),i+(m==="T"?1:-1)];else return[t+(w==="L"?-1:1),i];else if(Re(m))return[t+(m==="L"?1:-1),i+(w==="T"?1:-1)];else return[t,i+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=e(function(t){if(t==="LT"||t==="TL")return[1,1];else if(t==="BL"||t==="LB")return[1,-1];else if(t==="BR"||t==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=e(function(t,i){if(ut(t,i))return"bend";else if(Re(t))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=e(function(t){return t.type==="service"},"isArchitectureService"),Ot=e(function(t){return t.type==="junction"},"isArchitectureJunction"),mt=e((t,i)=>{let[s,w]=[t,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=e((t)=>t.data(),"edgeData"),Qe=e((t)=>t.data(),"nodeData"),Gt=D.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:t,icon:i,in:s,title:w,iconText:m}){if(this.registeredIds.has(t))throw Error(`The service id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The service [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"service",icon:i,iconText:m,title:w,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:t,in:i}){if(this.registeredIds.has(t))throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(i!==void 0){if(t===i)throw Error(`The junction [${t}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(i)==="node")throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(t){return this.nodes.get(t)??null}addGroup({id:t,icon:i,in:s,title:w}){if(this.registeredIds.has(t))throw Error(`The group id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The group [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds.set(t,"group"),this.groups.set(t,{id:t,icon:i,title:w,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:t,rhsId:i,lhsDir:s,rhsDir:w,lhsInto:m,rhsInto:N,lhsGroup:B,rhsGroup:v,title:I}){if(!pt(s))throw Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!pt(w))throw Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(i)&&!this.groups.has(i))throw Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(t).in,y=this.nodes.get(i).in;if(B&&c&&y&&c==y)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:t,lhsDir:s,lhsInto:m,lhsGroup:B,rhsId:i,rhsDir:w,rhsInto:N,rhsGroup:v,title:I};this.edges.push(d);let f=this.nodes.get(t),u=this.nodes.get(i);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw Error(`An align directive requires at least two members; got ${t.members.length}`);let i=new Set;t.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${t.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${t.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let t=new Map,i=new Map;for(let[B,v]of this.nodes.entries()){let I=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")t.set(mt(y,d),f)}if(c.lhsId===B){let f=lt(c.lhsDir,c.rhsDir);if(f)I.set(f,c.rhsId)}else{let f=lt(c.rhsDir,c.lhsDir);if(f)I.set(f,c.lhsId)}}i.set(B,I)}let s=new Set,w=new Set(i.keys()),m=e((B)=>{let v=new Map([[B,[0,0]]]),I=[B];while(I.length>0){let c=I.shift();if(c){s.add(c),w.delete(c);let y=i.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,r)=>{if(!s.has(g))v.set(g,Mt([f,u],r)),I.push(g)})}}return v},"BFS"),N=[];while(w.size>0){let B=w.values().next().value;N.push(m(B))}this.dataStructures={adjList:i,spatialMaps:N,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements.set(t,i)}getElementById(t){return this.elements.get(t)}getConfig(){return U({...Gt,...b().architecture})}getConfigField(t){return this.getConfig()[t]}},zt=e((t,i)=>{G(t,i),t.groups.map((s)=>i.addGroup(s)),t.services.map((s)=>i.addService({...s,type:"service"})),t.junctions.map((s)=>i.addJunction({...s,type:"junction"})),t.edges.map((s)=>i.addEdge(s)),t.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:e(async(t)=>{let i=await X("architecture",t);a.debug(i);let s=wt.parser?.yy;if(!(s instanceof Et))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");zt(i,s)},"parse")},Bt=e((t)=>`
|
|
2
|
+
.edge {
|
|
3
|
+
stroke-width: ${t.archEdgeWidth};
|
|
4
|
+
stroke: ${t.archEdgeColor};
|
|
5
|
+
fill: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.arrow {
|
|
9
|
+
fill: ${t.archEdgeArrowColor};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.node-bkg {
|
|
13
|
+
fill: none;
|
|
14
|
+
stroke: ${t.archGroupBorderColor};
|
|
15
|
+
stroke-width: ${t.archGroupBorderWidth};
|
|
16
|
+
stroke-dasharray: 8;
|
|
17
|
+
}
|
|
18
|
+
.node-icon-text {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.node-icon-text > div {
|
|
24
|
+
color: #fff;
|
|
25
|
+
margin: 1px;
|
|
26
|
+
height: fit-content;
|
|
27
|
+
text-align: center;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
display: -webkit-box;
|
|
30
|
+
-webkit-box-orient: vertical;
|
|
31
|
+
}
|
|
32
|
+
`,"getStyles"),_t=Bt;function dt(t,i){if(t===0)return i();let s=Math.random,w=t>>>0;Math.random=function(){w=w+1831565813>>>0;let m=w;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296};try{return i()}finally{Math.random=s}}e(dt,"withSeededRandom");var Ze=e((t)=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),it={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Ze('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:Ze('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:Ze('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:Ze('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:Ze('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Fi,blank:{body:Ze("")}}},Yt=e(async function(t,i,s,w){let m=s.getConfigField("padding"),N=s.getConfigField("iconSize"),B=N/2,v=N/6,I=v/2;await Promise.all(i.edges().map(async(c)=>{let{source:y,sourceDir:d,sourceArrow:f,sourceGroup:u,target:g,targetDir:r,targetArrow:_,targetGroup:F,label:o}=yt(c),{x:h,y:k}=c[0].sourceEndpoint(),{x:n,y:P}=c[0].midpoint(),{x:j,y:M}=c[0].targetEndpoint(),q=m+4;if(u)if(Re(d))h+=d==="L"?-q:q;else k+=d==="T"?-q:q+18;if(F)if(Re(r))j+=r==="L"?-q:q;else M+=r==="T"?-q:q+18;if(!u&&s.getNode(y)?.type==="junction")if(Re(d))h+=d==="L"?B:-B;else k+=d==="T"?B:-B;if(!F&&s.getNode(g)?.type==="junction")if(Re(r))j+=r==="L"?B:-B;else M+=r==="T"?B:-B;if(c[0]._private.rscratch){let Y=t.insert("g");if(Y.insert("path").attr("d",`M ${h},${k} L ${n},${P} L${j},${M} `).attr("class","edge").attr("id",`${w}-${ze(y,g,{prefix:"L"})}`),f){let x=Re(d)?ot[d](h,v):h-I,H=Ve(d)?ot[d](k,v):k-I;Y.insert("polygon").attr("points",vt[d](v)).attr("transform",`translate(${x},${H})`).attr("class","arrow")}if(_){let x=Re(r)?ot[r](j,v):j-I,H=Ve(r)?ot[r](M,v):M-I;Y.insert("polygon").attr("points",vt[r](v)).attr("transform",`translate(${x},${H})`).attr("class","arrow")}if(o){let x=!ut(d,r)?Re(d)?"X":"Y":"XY",H=0;if(x==="X")H=Math.abs(h-j);else if(x==="Y")H=Math.abs(k-M)/1.5;else H=Math.abs(h-j)/2;let Z=Y.append("g");if(await Ie(Z,o,{useHtmlLabels:!1,width:H,classes:"architecture-service-label"},l()),Z.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),x==="X")Z.attr("transform","translate("+n+", "+P+")");else if(x==="Y")Z.attr("transform","translate("+n+", "+P+") rotate(-90)");else if(x==="XY"){let Q=lt(d,r);if(Q&&Dt(Q)){let se=Z.node().getBoundingClientRect(),[re,ue]=Ft(Q);Z.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*re*ue*45})`);let Le=Z.node().getBoundingClientRect();Z.attr("transform",`
|
|
33
|
+
translate(${n}, ${P-se.height/2})
|
|
34
|
+
translate(${re*Le.width/2}, ${ue*Le.height/2})
|
|
35
|
+
rotate(${-1*re*ue*45}, 0, ${se.height/2})
|
|
36
|
+
`)}}}}}))},"drawEdges"),Ut=e(async function(t,i,s,w){let N=s.getConfigField("padding")*0.75,B=s.getConfigField("fontSize"),I=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(c)=>{let y=Qe(c);if(y.type==="group"){let{h:d,w:f,x1:u,y1:g}=c.boundingBox(),r=t.append("rect");r.attr("id",`${w}-group-${y.id}`).attr("x",u+I).attr("y",g+I).attr("width",f).attr("height",d).attr("class","node-bkg");let _=t.append("g"),F=u,o=g;if(y.icon){let h=_.append("g");h.html(`<g>${await nt(y.icon,{height:N,width:N,fallbackPrefix:it.prefix})}</g>`),h.attr("transform","translate("+(F+I+1)+", "+(o+I+1)+")"),F+=N,o+=B/2-1-2}if(y.label){let h=_.append("g");await Ie(h,y.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},l()),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),h.attr("transform","translate("+(F+I+4)+", "+(o+I+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),Ht=e(async function(t,i,s,w){let m=l();for(let N of s){let B=i.append("g"),v=t.getConfigField("iconSize");if(N.title){let d=B.append("g");await Ie(d,N.title,{useHtmlLabels:!1,width:v*1.5,classes:"architecture-service-label"},m),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),d.attr("transform","translate("+v/2+", "+v+")")}let I=B.append("g");if(N.icon)I.html(`<g>${await nt(N.icon,{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);else if(N.iconText){I.html(`<g>${await nt("blank",{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);let u=I.append("g").append("foreignObject").attr("width",v).attr("height",v).append("div").attr("class","node-icon-text").attr("style",`height: ${v}px;`).append("div").html(O(N.iconText,m)),g=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((v-2)/g)};`)}else I.append("path").attr("class","node-bkg").attr("id",`${w}-node-${N.id}`).attr("d",`M0,${v} V5 Q0,0 5,0 H${v-5} Q${v},0 ${v},5 V${v} Z`);B.attr("id",`${w}-service-${N.id}`).attr("class","architecture-service");let{width:c,height:y}=B.node().getBBox();N.width=c,N.height=y,t.setElementForId(N.id,B)}return 0},"drawServices"),Vt=e(function(t,i,s,w){s.forEach((m)=>{let N=i.append("g"),B=t.getConfigField("iconSize");N.append("g").append("rect").attr("id",`${w}-node-${m.id}`).attr("fill-opacity","0").attr("width",B).attr("height",B),N.attr("class","architecture-junction");let{width:I,height:c}=N._groups[0][0].getBBox();N.width=I,N.height=c,t.setElementForId(m.id,N)})},"drawJunctions");Dn([{name:it.prefix,icons:it}]);ct.use(xt.default);function Tt(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"service",id:w.id,icon:w.icon,label:w.title,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}e(Tt,"addServices");function At(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"junction",id:w.id,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}e(At,"addJunctions");function Lt(t,i){i.nodes().map((s)=>{let w=Qe(s);if(w.type==="group")return;w.x=s.position().x,w.y=s.position().y,t.getElementById(w.id).attr("transform","translate("+(w.x||0)+","+(w.y||0)+")")})}e(Lt,"positionNodes");function Ct(t,i){t.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}e(Ct,"addGroups");function It(t,i){t.forEach((s)=>{let{lhsId:w,rhsId:m,lhsInto:N,lhsGroup:B,rhsInto:v,lhsDir:I,rhsDir:c,rhsGroup:y,title:d}=s,f=ut(s.lhsDir,s.rhsDir)?"segments":"straight",u={id:`${w}-${m}`,label:d,source:w,sourceDir:I,sourceArrow:N,sourceGroup:B,sourceEndpoint:I==="L"?"0 50%":I==="R"?"100% 50%":I==="T"?"50% 0":"50% 100%",target:m,targetDir:c,targetArrow:v,targetGroup:y,targetEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:u,classes:f})})}e(It,"addEdges");function bt(t,i,s,w=[]){let m=e((f,u)=>{let g=new Map;for(let[r,_]of f.entries()){let F=`${r}`,o=0,h=[..._.entries()];if(h.length===1){g.set(F,h[0][1]);continue}for(let k=0;k<h.length-1;k++)for(let n=k+1;n<h.length;n++){let[P,j]=h[k],[M,q]=h[n];if(s.get(mt(P,M))===u)g.set(F,[...g.get(F)??[],...j,...q]);else if(P==="default"||M==="default")g.set(F,[...g.get(F)??[],...j,...q]);else{let x=`${F}-${o++}`;g.set(x,j);let H=`${F}-${o++}`;g.set(H,q)}}}return g},"flattenAlignments"),N=i.map((f)=>{let u=new Map,g=new Map;return f.forEach(([r,_],F)=>{let o=t.getNode(F)?.in??"default",h=u.get(_)??new Map;if(!u.has(_))u.set(_,h);let k=g.get(r)??new Map;if(!g.has(r))g.set(r,k);for(let n of[h,k]){let P=n.get(o)??[];if(!n.has(o))n.set(o,P);P.push(F)}}),{horiz:[...m(u,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[B,v]=N.reduce(([f,u],{horiz:g,vert:r})=>[[...f,...g],[...u,...r]],[[],[]]),I=new Set;w.forEach((f)=>f.members.forEach((u)=>I.add(u)));let c=e((f)=>f.filter((u)=>!u.some((g)=>I.has(g))),"dropOverlapping"),y=c(B),d=c(v);return w.forEach((f)=>{if(f.members.length<2)return;if(f.direction==="row")y.push([...f.members]);else d.push([...f.members])}),{horizontal:y,vertical:d}}e(bt,"getAlignments");function Nt(t,i,s=[]){let w=[],m=i.getConfigField("iconSize"),N=i.getConfigField("idealEdgeLengthMultiplier"),B=N*m,v=new Set;s.forEach((y)=>{for(let d=0;d<y.members.length-1;d++){let f=y.members[d],u=y.members[d+1];if(v.add(`${f}|${u}`),v.add(`${u}|${f}`),y.direction==="row")w.push({left:f,right:u,gap:B});else w.push({top:f,bottom:u,gap:B})}});let I=e((y)=>`${y[0]},${y[1]}`,"posToStr"),c=e((y)=>y.split(",").map((d)=>parseInt(d)),"strToPos");return t.forEach((y)=>{let d=new Map([...y.entries()].map(([r,_])=>[I(_),r])),f=[I([0,0])],u={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(f.length>0){let r=f.shift();if(r){u[r]=1;let _=d.get(r);if(_){let F=c(r);Object.entries(g).forEach(([o,h])=>{let k=I([F[0]+h[0],F[1]+h[1]]),n=d.get(k);if(n&&!u[k]){if(f.push(k),v.has(`${_}|${n}`))return;w.push({[ht[o]]:n,[ht[kt(o)]]:_,gap:N*m})}})}}}}),w}e(Nt,"getRelativeConstraints");function St(t,i,s,w,m,{spatialMaps:N,groupAlignments:B}){return new Promise((v)=>{let I=p("body").append("div").attr("id","cy").attr("style","display:none"),c=ct({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[0.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${m.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${m.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});I.remove(),Ct(s,c),Tt(t,c,m),At(i,c,m),It(w,c);let y=m.getLayoutHints(),d=bt(m,N,B,y),f=Nt(N,m,y),u=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*u,r=0.5*u,_=m.getConfigField("edgeElasticity"),F=m.getConfigField("seed"),o=c.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?g:r},edgeElasticity(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?_:0.001},alignmentConstraint:d,relativePlacementConstraint:f});o.one("layoutstop",()=>{function h(k,n,P,j){let M,q,{x:Y,y:x}=k,{x:H,y:Z}=n;q=(j-x+(Y-P)*(x-Z)/(Y-H))/Math.sqrt(1+Math.pow((x-Z)/(Y-H),2)),M=Math.sqrt(Math.pow(j-x,2)+Math.pow(P-Y,2)-Math.pow(q,2));let Q=Math.sqrt(Math.pow(H-Y,2)+Math.pow(Z-x,2));M=M/Q;let se=(H-Y)*(j-x)-(Z-x)*(P-Y);switch(!0){case se>=0:se=1;break;case se<0:se=-1;break}let re=(H-Y)*(P-Y)+(Z-x)*(j-x);switch(!0){case re>=0:re=1;break;case re<0:re=-1;break}return q=Math.abs(q)*se,M=M*re,{distances:q,weights:M}}e(h,"getSegmentWeights"),c.startBatch();for(let k of Object.values(c.edges()))if(k.data?.()){let{x:n,y:P}=k.source().position(),{x:j,y:M}=k.target().position();if(n!==j&&P!==M){let q=k.sourceEndpoint(),Y=k.targetEndpoint(),{sourceDir:x}=yt(k),[H,Z]=Ve(x)?[q.x,Y.y]:[Y.x,q.y],{weights:Q,distances:se}=h(q,Y,H,Z);k.style("segment-distances",se),k.style("segment-weights",Q)}}c.endBatch(),dt(F,()=>o.run())});try{dt(F,()=>o.run())}catch(h){if(h instanceof RangeError&&h.message.includes("Invalid array length"))throw Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw h}c.ready((h)=>{a.info("Ready",h),v(c)})})}e(St,"layoutArchitecture");var Xt=e(async(t,i,s,w)=>{let m=w.db;m.setDiagramId(i);let N=m.getServices(),B=m.getJunctions(),v=m.getGroups(),I=m.getEdges(),c=m.getDataStructures(),y=V(i),d=y.append("g");d.attr("class","architecture-edges");let f=y.append("g");f.attr("class","architecture-services");let u=y.append("g");u.attr("class","architecture-groups"),await Ht(m,f,N,i),Vt(m,f,B,i);let g=await St(N,B,v,I,m,c);await Yt(d,g,m,i),await Ut(u,g,m,i),Lt(m,g),ft(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),jt={draw:Xt},ar={parser:wt,get db(){return new Et},renderer:jt,styles:_t};export{ar as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e,a}from"./chunk-pyg1mr80.js";import{K,Dt,Mt}from"./chunk-1pasbxwh.js";import{G}from"./chunk-14bad871.js";import{ar,kt}from"./chunk-zc1mk10n.js";var o=ar().Railroad.parser.LangiumParser,n=e((r)=>{switch(r.$type){case"RailroadTerminalExpr":return{type:"terminal",value:r.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:r.name};case"RailroadSpecialExpr":return{type:"special",text:r.text};case"RailroadSequenceExpr":{let t=r.elements.map(n);return t.length===1?t[0]:{type:"sequence",elements:t}}case"RailroadChoiceExpr":{let t=r.alternatives.map(n);return t.length===1?t[0]:{type:"choice",alternatives:t}}case"RailroadOptionalExpr":return{type:"optional",element:n(r.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:n(r.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:n(r.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${r.$type}`)}},"transformExpression"),l=e((r)=>({name:r.name,definition:n(r.definition)}),"transformRule"),s=e((r)=>{if(G(r,K),r.title)K.setTitle(r.title);r.rules.map((t)=>K.addRule(l(t)))},"populateDb"),m={parse:e((r)=>{K.clear(),a.debug("[Railroad Parser] Starting Langium parse");let t=o.parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new kt(t);let i=t.value;a.debug("[Railroad Parser] Parsed rules:",i.rules.length),s(i),a.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:K}},R={parser:m,db:K,renderer:Mt,styles:Dt};export{R as diagram};
|