@bkm016/basalt 0.1.20 → 0.1.22
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/{chunk-tb3zsqe8.js → chunk-09tdbx7b.js} +1 -1
- package/{chunk-cks36jdh.js → chunk-0rsyawz5.js} +2 -2
- package/{chunk-nszq2z0w.js → chunk-16yz5ebn.js} +1 -1
- package/chunk-1kdd7xry.js +2 -0
- package/chunk-1td9hjn9.js +25 -0
- package/{chunk-s819vmwh.js → chunk-1xjkzzyh.js} +2 -2
- package/{chunk-gg3kfa12.js → chunk-38932kzp.js} +2 -2
- package/chunk-3qxq264t.js +2 -0
- package/{chunk-cwrf78vs.js → chunk-3s8rpc1w.js} +2 -2
- package/{chunk-5ja0vsam.js → chunk-5415fcz7.js} +3 -3
- package/{chunk-3phf8eg6.js → chunk-5kezbmgw.js} +2 -2
- package/{chunk-bkhsva5n.js → chunk-5m51j40e.js} +3 -3
- package/{chunk-2fts9k52.js → chunk-5mt8xxex.js} +2 -2
- package/{chunk-tp885r8h.js → chunk-5ph58x6w.js} +11 -11
- package/{chunk-eps1epfr.js → chunk-6jdqe7sz.js} +2 -2
- package/{chunk-mde2dd79.js → chunk-6ztgzx9s.js} +1 -1
- package/{chunk-3r38vbt5.js → chunk-7dzcdpdt.js} +1 -1
- package/{chunk-w9fdcchk.js → chunk-82djd5fk.js} +1 -1
- package/{chunk-x1y4s01x.js → chunk-86vhsd3y.js} +11 -11
- package/chunk-8rfv9mm1.js +15 -0
- package/{chunk-30bbdzma.js → chunk-8tvz5ht1.js} +12 -12
- package/{chunk-a2z1cy84.js → chunk-9pjmwz01.js} +1 -1
- package/{chunk-7kz9435k.js → chunk-9w1m9av8.js} +3 -3
- package/{chunk-w6nc3jn7.js → chunk-9wjd9bxm.js} +1 -1
- package/chunk-b49005n2.js +471 -0
- package/{chunk-w045zk55.js → chunk-bdz2561d.js} +1 -1
- package/{chunk-wj09qkyw.js → chunk-bkvhwgeb.js} +2 -2
- package/{chunk-1gaj43fx.js → chunk-bp9tfav3.js} +1 -1
- package/chunk-cc9htxzx.js +3557 -0
- package/chunk-chfzk1fx.js +3 -0
- package/{chunk-p0e82mee.js → chunk-cr0tqn6j.js} +2 -2
- package/{chunk-e3bgzeb3.js → chunk-cv5kdnsw.js} +2 -2
- package/{chunk-svx7mz0w.js → chunk-d79s1s4t.js} +4 -4
- package/{chunk-29g01nrz.js → chunk-ec6bzt7w.js} +5 -5
- package/{chunk-h2pp8mnh.js → chunk-eq54cmsa.js} +1 -1
- package/{chunk-1tbv5t08.js → chunk-g54nd4fd.js} +1 -1
- package/{chunk-v7da0aqn.js → chunk-g8p5c4vx.js} +5 -5
- package/chunk-g9bemxpt.js +3 -0
- package/{chunk-fgjw0r6g.js → chunk-hk5p2eee.js} +4 -4
- package/{chunk-0bgg0hdd.js → chunk-jerp4pj5.js} +1 -1
- package/{chunk-3sg32v3n.js → chunk-jsvqp20s.js} +1 -1
- package/{chunk-0g8rtf05.js → chunk-k9x1r69s.js} +8 -8
- package/{chunk-5e7yegea.js → chunk-kb526065.js} +1 -1
- package/{chunk-y83tnkr3.js → chunk-kpw1qa2n.js} +3 -3
- package/chunk-mbvy2t23.js +2 -0
- package/{chunk-sm9fpy18.js → chunk-mmnsdje8.js} +9 -9
- package/{chunk-d2f0hq8z.js → chunk-nffwakxq.js} +1 -1
- package/chunk-nfj8sj53.js +2 -0
- package/{chunk-ak9rkrf3.js → chunk-pzwaz2ew.js} +2 -2
- package/{chunk-yk29stq0.js → chunk-qtgc74er.js} +2 -2
- package/chunk-qtrd33pp.js +7 -0
- package/{chunk-6en06hkk.js → chunk-rbk6jxcr.js} +1 -1
- package/{chunk-y3vap4a1.js → chunk-rpbxbb92.js} +1 -1
- package/{chunk-agb771ak.js → chunk-rx812nrp.js} +2 -2
- package/{chunk-tpetsqzt.js → chunk-scy1p7x2.js} +3 -3
- package/{chunk-4dgqcp6q.js → chunk-sfgw0vmt.js} +1 -1
- package/chunk-tmefdwxy.js +2 -0
- package/chunk-tvg54x0x.js +2 -0
- package/{chunk-eyyxqb6y.js → chunk-v878x8zr.js} +2 -2
- package/chunk-v89f2k9b.js +2 -0
- package/{chunk-ewr51fwc.js → chunk-vhe16b65.js} +2 -2
- package/{chunk-z9p2ry9w.js → chunk-w3skxmvx.js} +2 -2
- package/{chunk-qxpx8dn6.js → chunk-w4kasz4j.js} +5 -5
- package/chunk-w4zkgn1c.js +4 -0
- package/chunk-we5emq6f.js +2 -0
- package/{chunk-11xxfc0x.js → chunk-x0dcabw6.js} +2 -2
- package/chunk-xtj7b70y.js +5 -0
- package/{chunk-a1vdrgsh.js → chunk-xwew53k7.js} +5 -5
- package/{chunk-np2xnt1g.js → chunk-xyhr89y5.js} +2 -2
- package/chunk-yce46csn.js +2 -0
- package/{chunk-s8m4svhf.js → chunk-yetcb1z9.js} +2 -2
- package/chunk-ypmpf75h.js +2 -0
- package/chunk-zz48zvk5.js +2 -0
- package/compiled.js +8 -8
- package/package.json +1 -1
- package/ui-test-worker.js +16 -16
- package/web/chunk-04c54f1s.js +1 -0
- package/web/chunk-04c54f1s.js.br +2 -0
- package/web/chunk-04c54f1s.js.gz +0 -0
- package/web/chunk-04m1cb8w.js +1 -0
- package/web/chunk-04m1cb8w.js.br +0 -0
- package/web/chunk-04m1cb8w.js.gz +0 -0
- package/web/{chunk-js940jjj.js → chunk-08z6mkgz.js} +4 -4
- package/web/chunk-08z6mkgz.js.br +0 -0
- package/web/chunk-08z6mkgz.js.gz +0 -0
- package/web/{chunk-x2hxq5yr.js → chunk-0g9m3rpw.js} +1 -1
- package/web/chunk-0g9m3rpw.js.br +0 -0
- package/web/chunk-0g9m3rpw.js.gz +0 -0
- package/web/{chunk-gk1bc3c3.js → chunk-0jccrdw3.js} +1 -1
- package/web/chunk-0jccrdw3.js.br +0 -0
- package/web/chunk-0jccrdw3.js.gz +0 -0
- package/web/{chunk-59h87pvn.js → chunk-0vweazdh.js} +1 -1
- package/web/chunk-0vweazdh.js.br +0 -0
- package/web/chunk-0vweazdh.js.gz +0 -0
- package/web/chunk-1vtf555r.js +1 -0
- package/web/chunk-1vtf555r.js.br +0 -0
- package/web/chunk-1vtf555r.js.gz +0 -0
- package/web/{chunk-znrsm604.js → chunk-29z0ft67.js} +17 -17
- package/web/chunk-29z0ft67.js.br +0 -0
- package/web/chunk-29z0ft67.js.gz +0 -0
- package/web/{chunk-tg3f9xmp.js → chunk-2q3m4btb.js} +1 -1
- package/web/chunk-2q3m4btb.js.br +0 -0
- package/web/chunk-2q3m4btb.js.gz +0 -0
- package/web/{chunk-qjg6dw46.js → chunk-2s6fhjjc.js} +94 -94
- package/web/chunk-2s6fhjjc.js.br +0 -0
- package/web/chunk-2s6fhjjc.js.gz +0 -0
- package/web/{chunk-fjrgg82c.js → chunk-2vdx4ykn.js} +4 -4
- package/web/chunk-2vdx4ykn.js.br +0 -0
- package/web/chunk-2vdx4ykn.js.gz +0 -0
- package/web/{chunk-zthww0ws.js → chunk-2zgqe8r7.js} +1 -1
- package/web/chunk-2zgqe8r7.js.br +0 -0
- package/web/chunk-2zgqe8r7.js.gz +0 -0
- package/web/{chunk-mbpv2w5h.js → chunk-3kqpmg83.js} +2 -2
- package/web/chunk-3kqpmg83.js.br +0 -0
- package/web/chunk-3kqpmg83.js.gz +0 -0
- package/web/chunk-3rmqxna0.js +1 -0
- package/web/chunk-3rmqxna0.js.br +0 -0
- package/web/chunk-3rmqxna0.js.gz +0 -0
- package/web/{chunk-jmnzcm1f.js → chunk-3xmv2349.js} +4 -4
- package/web/chunk-3xmv2349.js.br +0 -0
- package/web/chunk-3xmv2349.js.gz +0 -0
- package/web/{chunk-08w40agf.js → chunk-46cdys11.js} +7 -7
- package/web/chunk-46cdys11.js.br +0 -0
- package/web/chunk-46cdys11.js.gz +0 -0
- package/web/chunk-46mw23f0.js +8 -0
- package/web/chunk-46mw23f0.js.br +0 -0
- package/web/chunk-46mw23f0.js.gz +0 -0
- package/web/{chunk-mwfrxgbs.js → chunk-4r0dvjrr.js} +1 -1
- package/web/chunk-4r0dvjrr.js.br +0 -0
- package/web/chunk-4r0dvjrr.js.gz +0 -0
- package/web/{chunk-aw9bwd4w.js → chunk-4v6m84pg.js} +2 -2
- package/web/chunk-4v6m84pg.js.br +0 -0
- package/web/chunk-4v6m84pg.js.gz +0 -0
- package/web/{chunk-wvqcbp4a.js → chunk-4ye31s2w.js} +1 -1
- package/web/chunk-4ye31s2w.js.br +4 -0
- package/web/chunk-4ye31s2w.js.gz +0 -0
- package/web/{chunk-ezj5rjqr.js → chunk-5kavsn22.js} +1 -1
- package/web/chunk-5kavsn22.js.br +0 -0
- package/web/chunk-5kavsn22.js.gz +0 -0
- package/web/{chunk-vxadngbp.js → chunk-5q2h4tg8.js} +1 -1
- package/web/chunk-5q2h4tg8.js.br +4 -0
- package/web/chunk-5q2h4tg8.js.gz +0 -0
- package/web/{chunk-dmzvhbpn.js → chunk-5tbk6dx6.js} +3 -3
- package/web/chunk-5tbk6dx6.js.br +0 -0
- package/web/chunk-5tbk6dx6.js.gz +0 -0
- package/web/{chunk-9n1nsdqs.js → chunk-5yb0sm1r.js} +1 -1
- package/web/chunk-5yb0sm1r.js.br +0 -0
- package/web/chunk-5yb0sm1r.js.gz +0 -0
- package/web/chunk-5yz46tjw.js +2 -0
- package/web/chunk-5yz46tjw.js.br +0 -0
- package/web/chunk-5yz46tjw.js.gz +0 -0
- package/web/{chunk-3fd6mgf0.js → chunk-619a8t38.js} +1 -1
- package/web/chunk-619a8t38.js.br +0 -0
- package/web/chunk-619a8t38.js.gz +0 -0
- package/web/{chunk-cmhxtckb.js → chunk-6areryyn.js} +1 -1
- package/web/chunk-6areryyn.js.br +0 -0
- package/web/chunk-6areryyn.js.gz +0 -0
- package/web/{chunk-tgeeggkh.js → chunk-6ms78sx5.js} +1 -1
- package/web/chunk-6ms78sx5.js.br +0 -0
- package/web/chunk-6ms78sx5.js.gz +0 -0
- package/web/{chunk-bks2k04k.js → chunk-6ts9mtye.js} +1 -1
- package/web/chunk-6ts9mtye.js.br +0 -0
- package/web/chunk-6ts9mtye.js.gz +0 -0
- package/web/{chunk-kedjfh66.js → chunk-79whhay2.js} +1 -1
- package/web/chunk-79whhay2.js.br +0 -0
- package/web/chunk-79whhay2.js.gz +0 -0
- package/web/{chunk-ye7vge7s.js → chunk-7n1abr86.js} +1 -1
- package/web/chunk-7n1abr86.js.br +0 -0
- package/web/chunk-7n1abr86.js.gz +0 -0
- package/web/chunk-7qxfx983.js +1 -0
- package/web/chunk-7qxfx983.js.br +0 -0
- package/web/chunk-7qxfx983.js.gz +0 -0
- package/web/chunk-91k30q92.js +1 -0
- package/web/chunk-91k30q92.js.br +0 -0
- package/web/chunk-91k30q92.js.gz +0 -0
- package/web/{chunk-k6fwzn0z.js → chunk-91nyvkrb.js} +1 -1
- package/web/chunk-91nyvkrb.js.br +0 -0
- package/web/chunk-91nyvkrb.js.gz +0 -0
- package/web/{chunk-ahdca62g.js → chunk-9mbr6znb.js} +1 -1
- package/web/chunk-9mbr6znb.js.br +0 -0
- package/web/chunk-9mbr6znb.js.gz +0 -0
- package/web/{chunk-1yvcxpp2.js → chunk-9mvw6a5v.js} +4 -4
- package/web/chunk-9mvw6a5v.js.br +0 -0
- package/web/chunk-9mvw6a5v.js.gz +0 -0
- package/web/{chunk-kdegb6pd.js → chunk-a6hdn8tb.js} +5 -5
- package/web/chunk-a6hdn8tb.js.br +0 -0
- package/web/chunk-a6hdn8tb.js.gz +0 -0
- package/web/{chunk-37hmswdk.js → chunk-ar6m9fza.js} +5 -5
- package/web/chunk-ar6m9fza.js.br +0 -0
- package/web/chunk-ar6m9fza.js.gz +0 -0
- package/web/{chunk-q0srq8g5.js → chunk-ayqakyyq.js} +1 -1
- package/web/chunk-ayqakyyq.js.br +0 -0
- package/web/chunk-ayqakyyq.js.gz +0 -0
- package/web/{chunk-1ps9fj5n.js → chunk-cc6hn5xv.js} +2 -2
- package/web/chunk-cc6hn5xv.js.br +0 -0
- package/web/chunk-cc6hn5xv.js.gz +0 -0
- package/web/{chunk-d7f85w1y.js → chunk-ccymg1hp.js} +1 -1
- package/web/chunk-ccymg1hp.js.br +0 -0
- package/web/chunk-ccymg1hp.js.gz +0 -0
- package/web/{chunk-mhzqgzh0.js → chunk-cg9fe42b.js} +1 -1
- package/web/chunk-cg9fe42b.js.br +0 -0
- package/web/chunk-cg9fe42b.js.gz +0 -0
- package/web/chunk-cmcgmf94.js +1 -0
- package/web/chunk-cmcgmf94.js.br +0 -0
- package/web/chunk-cmcgmf94.js.gz +0 -0
- package/web/chunk-cnbbvd6n.js +1 -0
- package/web/chunk-cnbbvd6n.js.br +0 -0
- package/web/chunk-cnbbvd6n.js.gz +0 -0
- package/web/{chunk-wa8wr2y9.js → chunk-cxp2nbtc.js} +9 -9
- package/web/chunk-cxp2nbtc.js.br +0 -0
- package/web/chunk-cxp2nbtc.js.gz +0 -0
- package/web/{chunk-vh2prc6k.js → chunk-dj2b64aj.js} +1 -1
- package/web/chunk-dj2b64aj.js.br +0 -0
- package/web/chunk-dj2b64aj.js.gz +0 -0
- package/web/{chunk-gbcf0rdk.js → chunk-dsga6rp3.js} +1 -1
- package/web/chunk-dsga6rp3.js.br +0 -0
- package/web/chunk-dsga6rp3.js.gz +0 -0
- package/web/chunk-ek6q6a08.js +1 -0
- package/web/chunk-ek6q6a08.js.br +2 -0
- package/web/chunk-ek6q6a08.js.gz +0 -0
- package/web/{chunk-53cg6pxm.js → chunk-et1nm6h1.js} +2 -2
- package/web/chunk-et1nm6h1.js.br +0 -0
- package/web/chunk-et1nm6h1.js.gz +0 -0
- package/web/chunk-f1016wh6.js +1 -0
- package/web/chunk-f1016wh6.js.br +0 -0
- package/web/chunk-f1016wh6.js.gz +0 -0
- package/web/{chunk-6pbhqbv0.js → chunk-f42mwg61.js} +1 -1
- package/web/chunk-f42mwg61.js.br +0 -0
- package/web/chunk-f42mwg61.js.gz +0 -0
- package/web/{chunk-1ratg1jd.js → chunk-fk35d3bz.js} +1 -1
- package/web/chunk-fk35d3bz.js.br +0 -0
- package/web/chunk-fk35d3bz.js.gz +0 -0
- package/web/{chunk-e2z3kdhw.js → chunk-fpwztdhn.js} +3 -3
- package/web/chunk-fpwztdhn.js.br +0 -0
- package/web/chunk-fpwztdhn.js.gz +0 -0
- package/web/{chunk-1cwyy3gh.js → chunk-g30nqfka.js} +1 -1
- package/web/chunk-g30nqfka.js.br +0 -0
- package/web/chunk-g30nqfka.js.gz +0 -0
- package/web/chunk-gbwy4pfg.css +1 -0
- package/web/chunk-gbwy4pfg.css.br +0 -0
- package/web/chunk-gbwy4pfg.css.gz +0 -0
- package/web/{chunk-gj6bdv1y.js → chunk-gepgx19m.js} +9 -9
- package/web/chunk-gepgx19m.js.br +0 -0
- package/web/chunk-gepgx19m.js.gz +0 -0
- package/web/{chunk-v5p2fds9.js → chunk-grz69q28.js} +4 -4
- package/web/chunk-grz69q28.js.br +0 -0
- package/web/chunk-grz69q28.js.gz +0 -0
- package/web/{chunk-vhpzp7zd.js → chunk-gt62acsh.js} +1 -1
- package/web/chunk-gt62acsh.js.br +0 -0
- package/web/chunk-gt62acsh.js.gz +0 -0
- package/web/{chunk-81xbfpbq.js → chunk-h28xrvmg.js} +1 -1
- package/web/chunk-h28xrvmg.js.br +0 -0
- package/web/chunk-h28xrvmg.js.gz +0 -0
- package/web/{chunk-gpjytpyw.js → chunk-h80ypke7.js} +2 -2
- package/web/chunk-h80ypke7.js.br +0 -0
- package/web/chunk-h80ypke7.js.gz +0 -0
- package/web/chunk-k1cd6e24.js +1 -0
- package/web/chunk-k1cd6e24.js.br +0 -0
- package/web/chunk-k1cd6e24.js.gz +0 -0
- package/web/chunk-k9248573.js +1 -0
- package/web/chunk-k9248573.js.br +0 -0
- package/web/chunk-k9248573.js.gz +0 -0
- package/web/{chunk-6n1ha6ta.js → chunk-kqgn9dsa.js} +1 -1
- package/web/chunk-kqgn9dsa.js.br +0 -0
- package/web/chunk-kqgn9dsa.js.gz +0 -0
- package/web/chunk-kqngpw5m.js +1 -0
- package/web/chunk-kqngpw5m.js.br +0 -0
- package/web/chunk-kqngpw5m.js.gz +0 -0
- package/web/{chunk-dmhezjv3.js → chunk-kzj105r1.js} +4 -4
- package/web/chunk-kzj105r1.js.br +0 -0
- package/web/chunk-kzj105r1.js.gz +0 -0
- package/web/chunk-m14v2en1.js +1 -0
- package/web/chunk-m14v2en1.js.br +0 -0
- package/web/chunk-m14v2en1.js.gz +0 -0
- package/web/{chunk-1ghnag5v.js → chunk-m34et8g4.js} +1 -1
- package/web/chunk-m34et8g4.js.br +0 -0
- package/web/chunk-m34et8g4.js.gz +0 -0
- package/web/{chunk-esckazz2.js → chunk-md1f6gmk.js} +1 -1
- package/web/chunk-md1f6gmk.js.br +0 -0
- package/web/chunk-md1f6gmk.js.gz +0 -0
- package/web/{chunk-vpbnyz43.js → chunk-n05xf20n.js} +1 -1
- package/web/chunk-n05xf20n.js.br +0 -0
- package/web/chunk-n05xf20n.js.gz +0 -0
- package/web/{chunk-mh3nkkpx.js → chunk-n2k1gd6n.js} +6 -6
- package/web/chunk-n2k1gd6n.js.br +0 -0
- package/web/chunk-n2k1gd6n.js.gz +0 -0
- package/web/{chunk-apr33amc.js → chunk-nm8yza3v.js} +1 -1
- package/web/chunk-nm8yza3v.js.br +0 -0
- package/web/chunk-nm8yza3v.js.gz +0 -0
- package/web/chunk-pbg9rdwv.js +1 -0
- package/web/chunk-pbg9rdwv.js.br +2 -0
- package/web/chunk-pbg9rdwv.js.gz +0 -0
- package/web/chunk-qj9nd038.js +1 -0
- package/web/chunk-qj9nd038.js.br +0 -0
- package/web/chunk-qj9nd038.js.gz +0 -0
- package/web/chunk-qjaex9c0.js +1 -0
- package/web/chunk-qjaex9c0.js.br +2 -0
- package/web/chunk-qjaex9c0.js.gz +0 -0
- package/web/{chunk-72st75n7.js → chunk-qq79vsm8.js} +3 -3
- package/web/chunk-qq79vsm8.js.br +0 -0
- package/web/chunk-qq79vsm8.js.gz +0 -0
- package/web/{chunk-6a3wt5c5.js → chunk-qs5wnwd6.js} +3 -3
- package/web/chunk-qs5wnwd6.js.br +0 -0
- package/web/chunk-qs5wnwd6.js.gz +0 -0
- package/web/{chunk-wbxz2bjb.js → chunk-r381n550.js} +1 -1
- package/web/chunk-r381n550.js.br +0 -0
- package/web/chunk-r381n550.js.gz +0 -0
- package/web/{chunk-2rnnvxa5.js → chunk-r48vazdm.js} +3 -3
- package/web/chunk-r48vazdm.js.br +0 -0
- package/web/chunk-r48vazdm.js.gz +0 -0
- package/web/{chunk-hqt1f3fm.js → chunk-r55seq42.js} +1 -1
- package/web/chunk-r55seq42.js.br +0 -0
- package/web/chunk-r55seq42.js.gz +0 -0
- package/web/{chunk-82q4e8ff.js → chunk-r79zekav.js} +1 -1
- package/web/chunk-r79zekav.js.br +0 -0
- package/web/chunk-r79zekav.js.gz +0 -0
- package/web/{chunk-nb58m79v.js → chunk-r8qyvcks.js} +1 -1
- package/web/chunk-r8qyvcks.js.br +0 -0
- package/web/chunk-r8qyvcks.js.gz +0 -0
- package/web/chunk-r9dt0730.js +1 -0
- package/web/chunk-r9dt0730.js.br +0 -0
- package/web/chunk-r9dt0730.js.gz +0 -0
- package/web/chunk-rpjzwknn.js +1 -0
- package/web/chunk-rpjzwknn.js.br +0 -0
- package/web/chunk-rpjzwknn.js.gz +0 -0
- package/web/{chunk-186rp10x.js → chunk-sk3065js.js} +1 -1
- package/web/chunk-sk3065js.js.br +0 -0
- package/web/chunk-sk3065js.js.gz +0 -0
- package/web/{chunk-hwxj58j5.js → chunk-smywa1zw.js} +1 -1
- package/web/chunk-smywa1zw.js.br +0 -0
- package/web/chunk-smywa1zw.js.gz +0 -0
- package/web/{chunk-a8qe7kvz.js → chunk-trssyq9a.js} +1 -1
- package/web/chunk-trssyq9a.js.br +0 -0
- package/web/chunk-trssyq9a.js.gz +0 -0
- package/web/{chunk-0h0whn75.js → chunk-v329f8df.js} +1 -1
- package/web/chunk-v329f8df.js.br +0 -0
- package/web/chunk-v329f8df.js.gz +0 -0
- package/web/{chunk-zbzgd8kn.js → chunk-vb2feptd.js} +1 -1
- package/web/chunk-vb2feptd.js.br +0 -0
- package/web/chunk-vb2feptd.js.gz +0 -0
- package/web/chunk-vff33vj3.js +1 -0
- package/web/chunk-vff33vj3.js.br +2 -0
- package/web/chunk-vff33vj3.js.gz +0 -0
- package/web/{chunk-k4pknkvp.js → chunk-w9adyaze.js} +1 -1
- package/web/chunk-w9adyaze.js.br +0 -0
- package/web/chunk-w9adyaze.js.gz +0 -0
- package/web/{chunk-v6snw1sw.js → chunk-wgc8z5jv.js} +1 -1
- package/web/chunk-wgc8z5jv.js.br +0 -0
- package/web/chunk-wgc8z5jv.js.gz +0 -0
- package/web/{chunk-recfg8af.js → chunk-wvdk3w03.js} +1 -1
- package/web/chunk-wvdk3w03.js.br +0 -0
- package/web/chunk-wvdk3w03.js.gz +0 -0
- package/web/{chunk-bg0qgabv.js → chunk-wxmaw4ht.js} +1 -1
- package/web/chunk-wxmaw4ht.js.br +0 -0
- package/web/chunk-wxmaw4ht.js.gz +0 -0
- package/web/{chunk-7h59ac2b.js → chunk-x19jdqnt.js} +1 -1
- package/web/chunk-x19jdqnt.js.br +0 -0
- package/web/chunk-x19jdqnt.js.gz +0 -0
- package/web/{chunk-mj8dzc8q.js → chunk-x4153gx3.js} +5 -5
- package/web/chunk-x4153gx3.js.br +0 -0
- package/web/chunk-x4153gx3.js.gz +0 -0
- package/web/{chunk-qx5ab39c.js → chunk-x7wmb5d3.js} +2 -2
- package/web/chunk-x7wmb5d3.js.br +0 -0
- package/web/chunk-x7wmb5d3.js.gz +0 -0
- package/web/{chunk-v2bkkhb8.js → chunk-xp2zpmpp.js} +41 -41
- package/web/chunk-xp2zpmpp.js.br +0 -0
- package/web/chunk-xp2zpmpp.js.gz +0 -0
- package/web/chunk-y09v3sz7.js +1 -0
- package/web/chunk-y09v3sz7.js.br +0 -0
- package/web/chunk-y09v3sz7.js.gz +0 -0
- package/web/{chunk-h1c0m3g4.js → chunk-ywmsxe5z.js} +3 -3
- package/web/chunk-ywmsxe5z.js.br +0 -0
- package/web/chunk-ywmsxe5z.js.gz +0 -0
- package/web/{chunk-0tcmnvab.js → chunk-yzyxa823.js} +1 -1
- package/web/chunk-yzyxa823.js.br +0 -0
- package/web/chunk-yzyxa823.js.gz +0 -0
- package/web/{chunk-c28crzwk.js → chunk-zwx48gb8.js} +1 -1
- package/web/chunk-zwx48gb8.js.br +0 -0
- package/web/chunk-zwx48gb8.js.gz +0 -0
- package/web/index.html +1 -1
- package/web/index.html.br +0 -0
- package/web/index.html.gz +0 -0
- package/worker.js +1 -1
- package/chunk-0wwd4q6h.js +0 -5
- package/chunk-204c01mz.js +0 -25
- package/chunk-4wc2gbhe.js +0 -2
- package/chunk-51pfvmhh.js +0 -470
- package/chunk-5tsfqsmf.js +0 -2
- package/chunk-6hatfwsq.js +0 -2
- package/chunk-78ky455y.js +0 -4
- package/chunk-8mqaq042.js +0 -2
- package/chunk-as2mwf79.js +0 -2
- package/chunk-b516bp7n.js +0 -3
- package/chunk-c5pg2875.js +0 -3552
- package/chunk-g9hsrrj5.js +0 -2
- package/chunk-gpceyezp.js +0 -2
- package/chunk-h4n0gg11.js +0 -2
- package/chunk-jzya0e5n.js +0 -7
- package/chunk-ncb0tyaw.js +0 -2
- package/chunk-tpeg9fkd.js +0 -2
- package/chunk-v0mw006s.js +0 -15
- package/chunk-ys2fds2x.js +0 -3
- package/chunk-yshdvnsp.js +0 -2
- package/web/chunk-08w40agf.js.br +0 -0
- package/web/chunk-08w40agf.js.gz +0 -0
- package/web/chunk-0bfypmyv.js +0 -1
- package/web/chunk-0bfypmyv.js.br +0 -2
- package/web/chunk-0bfypmyv.js.gz +0 -0
- package/web/chunk-0h0whn75.js.br +0 -0
- package/web/chunk-0h0whn75.js.gz +0 -0
- package/web/chunk-0pzs9k06.js +0 -1
- package/web/chunk-0pzs9k06.js.br +0 -0
- package/web/chunk-0pzs9k06.js.gz +0 -0
- package/web/chunk-0tcmnvab.js.br +0 -0
- package/web/chunk-0tcmnvab.js.gz +0 -0
- package/web/chunk-186rp10x.js.br +0 -0
- package/web/chunk-186rp10x.js.gz +0 -0
- package/web/chunk-1cwyy3gh.js.br +0 -0
- package/web/chunk-1cwyy3gh.js.gz +0 -0
- package/web/chunk-1ecsxh85.js +0 -1
- package/web/chunk-1ecsxh85.js.br +0 -0
- package/web/chunk-1ecsxh85.js.gz +0 -0
- package/web/chunk-1ghnag5v.js.br +0 -0
- package/web/chunk-1ghnag5v.js.gz +0 -0
- package/web/chunk-1ps9fj5n.js.br +0 -0
- package/web/chunk-1ps9fj5n.js.gz +0 -0
- package/web/chunk-1ratg1jd.js.br +0 -0
- package/web/chunk-1ratg1jd.js.gz +0 -0
- package/web/chunk-1yvcxpp2.js.br +0 -0
- package/web/chunk-1yvcxpp2.js.gz +0 -0
- package/web/chunk-2r3w0pt0.js +0 -8
- package/web/chunk-2r3w0pt0.js.br +0 -0
- package/web/chunk-2r3w0pt0.js.gz +0 -0
- package/web/chunk-2rnnvxa5.js.br +0 -0
- package/web/chunk-2rnnvxa5.js.gz +0 -0
- package/web/chunk-2stffcvc.js +0 -1
- package/web/chunk-2stffcvc.js.br +0 -0
- package/web/chunk-2stffcvc.js.gz +0 -0
- package/web/chunk-2svqgkqw.js +0 -1
- package/web/chunk-2svqgkqw.js.br +0 -0
- package/web/chunk-2svqgkqw.js.gz +0 -0
- package/web/chunk-37hmswdk.js.br +0 -0
- package/web/chunk-37hmswdk.js.gz +0 -0
- package/web/chunk-3fd6mgf0.js.br +0 -0
- package/web/chunk-3fd6mgf0.js.gz +0 -0
- package/web/chunk-53cg6pxm.js.br +0 -0
- package/web/chunk-53cg6pxm.js.gz +0 -0
- package/web/chunk-59h87pvn.js.br +0 -0
- package/web/chunk-59h87pvn.js.gz +0 -0
- package/web/chunk-6a3wt5c5.js.br +0 -0
- package/web/chunk-6a3wt5c5.js.gz +0 -0
- package/web/chunk-6n1ha6ta.js.br +0 -0
- package/web/chunk-6n1ha6ta.js.gz +0 -0
- package/web/chunk-6pbhqbv0.js.br +0 -0
- package/web/chunk-6pbhqbv0.js.gz +0 -0
- package/web/chunk-72st75n7.js.br +0 -0
- package/web/chunk-72st75n7.js.gz +0 -0
- package/web/chunk-7h59ac2b.js.br +0 -0
- package/web/chunk-7h59ac2b.js.gz +0 -0
- package/web/chunk-81xbfpbq.js.br +0 -0
- package/web/chunk-81xbfpbq.js.gz +0 -0
- package/web/chunk-82q4e8ff.js.br +0 -0
- package/web/chunk-82q4e8ff.js.gz +0 -0
- package/web/chunk-89e8629e.js +0 -1
- package/web/chunk-89e8629e.js.br +0 -0
- package/web/chunk-89e8629e.js.gz +0 -0
- package/web/chunk-9n1nsdqs.js.br +0 -0
- package/web/chunk-9n1nsdqs.js.gz +0 -0
- package/web/chunk-a8qe7kvz.js.br +0 -0
- package/web/chunk-a8qe7kvz.js.gz +0 -0
- package/web/chunk-ahdca62g.js.br +0 -0
- package/web/chunk-ahdca62g.js.gz +0 -0
- package/web/chunk-apr33amc.js.br +0 -0
- package/web/chunk-apr33amc.js.gz +0 -0
- package/web/chunk-aw9bwd4w.js.br +0 -0
- package/web/chunk-aw9bwd4w.js.gz +0 -0
- package/web/chunk-bg0qgabv.js.br +0 -0
- package/web/chunk-bg0qgabv.js.gz +0 -0
- package/web/chunk-bks2k04k.js.br +0 -0
- package/web/chunk-bks2k04k.js.gz +0 -0
- package/web/chunk-c28crzwk.js.br +0 -0
- package/web/chunk-c28crzwk.js.gz +0 -0
- package/web/chunk-cmhxtckb.js.br +0 -0
- package/web/chunk-cmhxtckb.js.gz +0 -0
- package/web/chunk-d7f85w1y.js.br +0 -0
- package/web/chunk-d7f85w1y.js.gz +0 -0
- package/web/chunk-dmhezjv3.js.br +0 -0
- package/web/chunk-dmhezjv3.js.gz +0 -0
- package/web/chunk-dmzvhbpn.js.br +0 -0
- package/web/chunk-dmzvhbpn.js.gz +0 -0
- package/web/chunk-e2z3kdhw.js.br +0 -0
- package/web/chunk-e2z3kdhw.js.gz +0 -0
- package/web/chunk-eqmghkwh.js +0 -1
- package/web/chunk-eqmghkwh.js.br +0 -0
- package/web/chunk-eqmghkwh.js.gz +0 -0
- package/web/chunk-esckazz2.js.br +0 -0
- package/web/chunk-esckazz2.js.gz +0 -0
- package/web/chunk-ezj5rjqr.js.br +0 -0
- package/web/chunk-ezj5rjqr.js.gz +0 -0
- package/web/chunk-fjrgg82c.js.br +0 -0
- package/web/chunk-fjrgg82c.js.gz +0 -0
- package/web/chunk-gbcf0rdk.js.br +0 -0
- package/web/chunk-gbcf0rdk.js.gz +0 -0
- package/web/chunk-gj6bdv1y.js.br +0 -0
- package/web/chunk-gj6bdv1y.js.gz +0 -0
- package/web/chunk-gk1bc3c3.js.br +0 -0
- package/web/chunk-gk1bc3c3.js.gz +0 -0
- package/web/chunk-gpjytpyw.js.br +0 -0
- package/web/chunk-gpjytpyw.js.gz +0 -0
- package/web/chunk-h1c0m3g4.js.br +0 -0
- package/web/chunk-h1c0m3g4.js.gz +0 -0
- package/web/chunk-h1qv0cpd.css +0 -1
- package/web/chunk-h1qv0cpd.css.br +0 -0
- package/web/chunk-h1qv0cpd.css.gz +0 -0
- package/web/chunk-hq7e5xgd.js +0 -1
- package/web/chunk-hq7e5xgd.js.br +0 -0
- package/web/chunk-hq7e5xgd.js.gz +0 -0
- package/web/chunk-hqt1f3fm.js.br +0 -0
- package/web/chunk-hqt1f3fm.js.gz +0 -0
- package/web/chunk-hwxj58j5.js.br +0 -0
- package/web/chunk-hwxj58j5.js.gz +0 -0
- package/web/chunk-hxzb25a8.js +0 -1
- package/web/chunk-hxzb25a8.js.br +0 -0
- package/web/chunk-hxzb25a8.js.gz +0 -0
- package/web/chunk-jmnzcm1f.js.br +0 -0
- package/web/chunk-jmnzcm1f.js.gz +0 -0
- package/web/chunk-js940jjj.js.br +0 -0
- package/web/chunk-js940jjj.js.gz +0 -0
- package/web/chunk-jy9vkfbf.js +0 -1
- package/web/chunk-jy9vkfbf.js.br +0 -0
- package/web/chunk-jy9vkfbf.js.gz +0 -0
- package/web/chunk-k4pknkvp.js.br +0 -0
- package/web/chunk-k4pknkvp.js.gz +0 -0
- package/web/chunk-k6fwzn0z.js.br +0 -0
- package/web/chunk-k6fwzn0z.js.gz +0 -0
- package/web/chunk-kdegb6pd.js.br +0 -0
- package/web/chunk-kdegb6pd.js.gz +0 -0
- package/web/chunk-kedjfh66.js.br +0 -0
- package/web/chunk-kedjfh66.js.gz +0 -0
- package/web/chunk-mbpv2w5h.js.br +0 -0
- package/web/chunk-mbpv2w5h.js.gz +0 -0
- package/web/chunk-mh3nkkpx.js.br +0 -0
- package/web/chunk-mh3nkkpx.js.gz +0 -0
- package/web/chunk-mhzqgzh0.js.br +0 -0
- package/web/chunk-mhzqgzh0.js.gz +0 -0
- package/web/chunk-mj8dzc8q.js.br +0 -0
- package/web/chunk-mj8dzc8q.js.gz +0 -0
- package/web/chunk-mwfrxgbs.js.br +0 -0
- package/web/chunk-mwfrxgbs.js.gz +0 -0
- package/web/chunk-nb58m79v.js.br +0 -0
- package/web/chunk-nb58m79v.js.gz +0 -0
- package/web/chunk-nsna2v2r.js +0 -1
- package/web/chunk-nsna2v2r.js.br +0 -0
- package/web/chunk-nsna2v2r.js.gz +0 -0
- package/web/chunk-nxdp58nf.js +0 -1
- package/web/chunk-nxdp58nf.js.br +0 -0
- package/web/chunk-nxdp58nf.js.gz +0 -0
- package/web/chunk-nytgs01h.js +0 -1
- package/web/chunk-nytgs01h.js.br +0 -0
- package/web/chunk-nytgs01h.js.gz +0 -0
- package/web/chunk-pkxn54jm.js +0 -1
- package/web/chunk-pkxn54jm.js.br +0 -0
- package/web/chunk-pkxn54jm.js.gz +0 -0
- package/web/chunk-q0srq8g5.js.br +0 -0
- package/web/chunk-q0srq8g5.js.gz +0 -0
- package/web/chunk-qjg6dw46.js.br +0 -0
- package/web/chunk-qjg6dw46.js.gz +0 -0
- package/web/chunk-qjjxevxe.js +0 -1
- package/web/chunk-qjjxevxe.js.br +0 -0
- package/web/chunk-qjjxevxe.js.gz +0 -0
- package/web/chunk-qx5ab39c.js.br +0 -0
- package/web/chunk-qx5ab39c.js.gz +0 -0
- package/web/chunk-recfg8af.js.br +0 -0
- package/web/chunk-recfg8af.js.gz +0 -0
- package/web/chunk-tg3f9xmp.js.br +0 -0
- package/web/chunk-tg3f9xmp.js.gz +0 -0
- package/web/chunk-tgeeggkh.js.br +0 -0
- package/web/chunk-tgeeggkh.js.gz +0 -0
- package/web/chunk-v2bkkhb8.js.br +0 -0
- package/web/chunk-v2bkkhb8.js.gz +0 -0
- package/web/chunk-v5p2fds9.js.br +0 -0
- package/web/chunk-v5p2fds9.js.gz +0 -0
- package/web/chunk-v6snw1sw.js.br +0 -0
- package/web/chunk-v6snw1sw.js.gz +0 -0
- package/web/chunk-veadbga2.js +0 -1
- package/web/chunk-veadbga2.js.br +0 -2
- package/web/chunk-veadbga2.js.gz +0 -0
- package/web/chunk-vh2prc6k.js.br +0 -0
- package/web/chunk-vh2prc6k.js.gz +0 -0
- package/web/chunk-vhpzp7zd.js.br +0 -0
- package/web/chunk-vhpzp7zd.js.gz +0 -0
- package/web/chunk-vpbnyz43.js.br +0 -0
- package/web/chunk-vpbnyz43.js.gz +0 -0
- package/web/chunk-vxadngbp.js.br +0 -3
- package/web/chunk-vxadngbp.js.gz +0 -0
- package/web/chunk-wa8wr2y9.js.br +0 -0
- package/web/chunk-wa8wr2y9.js.gz +0 -0
- package/web/chunk-wbxz2bjb.js.br +0 -0
- package/web/chunk-wbxz2bjb.js.gz +0 -0
- package/web/chunk-wgzatts8.js +0 -1
- package/web/chunk-wgzatts8.js.br +0 -0
- package/web/chunk-wgzatts8.js.gz +0 -0
- package/web/chunk-whczyxqw.js +0 -1
- package/web/chunk-whczyxqw.js.br +0 -0
- package/web/chunk-whczyxqw.js.gz +0 -0
- package/web/chunk-wmzz2crn.js +0 -1
- package/web/chunk-wmzz2crn.js.br +0 -0
- package/web/chunk-wmzz2crn.js.gz +0 -0
- package/web/chunk-wvqcbp4a.js.br +0 -0
- package/web/chunk-wvqcbp4a.js.gz +0 -0
- package/web/chunk-x2hxq5yr.js.br +0 -0
- package/web/chunk-x2hxq5yr.js.gz +0 -0
- package/web/chunk-x8bnp6vr.js +0 -1
- package/web/chunk-x8bnp6vr.js.br +0 -0
- package/web/chunk-x8bnp6vr.js.gz +0 -0
- package/web/chunk-xvmzsftt.js +0 -2
- package/web/chunk-xvmzsftt.js.br +0 -0
- package/web/chunk-xvmzsftt.js.gz +0 -0
- package/web/chunk-ye7vge7s.js.br +0 -0
- package/web/chunk-ye7vge7s.js.gz +0 -0
- package/web/chunk-zbzgd8kn.js.br +0 -0
- package/web/chunk-zbzgd8kn.js.gz +0 -0
- package/web/chunk-zhwqscat.js +0 -1
- package/web/chunk-zhwqscat.js.br +0 -0
- package/web/chunk-zhwqscat.js.gz +0 -0
- package/web/chunk-znrsm604.js.br +0 -0
- package/web/chunk-znrsm604.js.gz +0 -0
- package/web/chunk-zthww0ws.js.br +0 -0
- package/web/chunk-zthww0ws.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{re}from"./chunk-mwfrxgbs.js";import{t,a,B,S,j,sn,A,R,I,L,D,P,M,u,h,Q,zs,Br,qt,X,bt,at}from"./chunk-v2bkkhb8.js";import{fe}from"./chunk-53cg6pxm.js";import{un,Ka}from"./chunk-1ratg1jd.js";import{Ze,Xe}from"./chunk-qjg6dw46.js";var ct=Xe(function(et,nt){(function(i,s){if(typeof et==="object"&&typeof nt==="object")nt.exports=s(Ka());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof et==="object")et.cytoscapeFcose=s(Ka());else i.cytoscapeFcose=s(i.coseBase)})(et,function(e){return(()=>{var i={658:(T)=>{T.exports=Object.assign!=null?Object.assign.bind(Object):function(O){for(var p=arguments.length,x=Array(p>1?p-1:0),l=1;l<p;l++)x[l-1]=arguments[l];return x.forEach(function(y){Object.keys(y).forEach(function(c){return O[c]=y[c]})}),O}},548:(T,O,p)=>{var x=function(){function c(d,f){var g=[],r=!0,G=!1,N=void 0;try{for(var o=d[Symbol.iterator](),v;!(r=(v=o.next()).done);r=!0)if(g.push(v.value),f&&g.length===f)break}catch(C){G=!0,N=C}finally{try{if(!r&&o.return)o.return()}finally{if(G)throw N}}return g}return function(d,f){if(Array.isArray(d))return d;else if(Symbol.iterator in Object(d))return c(d,f);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=p(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(c){var d={};for(var f=0;f<c.length;f++)d[c[f].id()]=!0;var g=c.filter(function(r,G){if(typeof r==="number")r=G;var N=r.parent()[0];while(N!=null){if(d[N.id()])return!1;N=N.parent()[0]}return!0});return g},y.connectComponents=function(c,d,f,g){var r=new l,G=new Set,N=[],o=void 0,v=void 0,C=void 0,n=!1,k=1,Y=[],b=[],U=function(){var w=c.collection();b.push(w);var _=f[0],q=c.collection();q.merge(_).merge(_.descendants().intersection(d)),N.push(_),q.forEach(function(ee){r.push(ee),G.add(ee),w.merge(ee)});var W=function(){_=r.shift();var ue=c.collection();_.neighborhood().nodes().forEach(function(H){if(d.intersection(_.edgesWith(H)).length>0)ue.merge(H)});for(var Ae=0;Ae<ue.length;Ae++){var Re=ue[Ae];if(o=f.intersection(Re.union(Re.ancestors())),o!=null&&!G.has(o[0])){var ce=o.union(o.descendants());ce.forEach(function(H){if(r.push(H),G.add(H),w.merge(H),f.has(H))N.push(H)})}}};while(r.length!=0)W();if(w.forEach(function(ee){d.intersection(ee.connectedEdges()).forEach(function(ue){if(w.has(ue.source())&&w.has(ue.target()))w.merge(ue)})}),N.length==f.length)n=!0;if(!n||n&&k>1){v=N[0],C=v.connectedEdges().length,N.forEach(function(ee){if(ee.connectedEdges().length<C)C=ee.connectedEdges().length,v=ee}),Y.push(v.id());var oe=c.collection();oe.merge(N[0]),N.forEach(function(ee){oe.merge(ee)}),N=[],f=f.difference(oe),k++}};do U();while(!n);if(g){if(Y.length>0)g.set("dummy"+(g.size+1),Y)}return b},y.relocateComponent=function(c,d,f){if(!f.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:G,NEGATIVE_INFINITY:N}=Number;if(f.quality=="draft"){var o=!0,v=!1,C=void 0;try{for(var n=d.nodeIndexes[Symbol.iterator](),k;!(o=(k=n.next()).done);o=!0){var Y=k.value,b=x(Y,2),U=b[0],z=b[1],w=f.cy.getElementById(U);if(w){var _=w.boundingBox(),q=d.xCoords[z]-_.w/2,W=d.xCoords[z]+_.w/2,oe=d.yCoords[z]-_.h/2,ee=d.yCoords[z]+_.h/2;if(q<g)g=q;if(W>r)r=W;if(oe<G)G=oe;if(ee>N)N=ee}}}catch(H){v=!0,C=H}finally{try{if(!o&&n.return)n.return()}finally{if(v)throw C}}var ue=c.x-(r+g)/2,Ae=c.y-(N+G)/2;d.xCoords=d.xCoords.map(function(H){return H+ue}),d.yCoords=d.yCoords.map(function(H){return H+Ae})}else{Object.keys(d).forEach(function(H){var ae=d[H],Ie=ae.getRect().x,be=ae.getRect().x+ae.getRect().width,Ne=ae.getRect().y,xe=ae.getRect().y+ae.getRect().height;if(Ie<g)g=Ie;if(be>r)r=be;if(Ne<G)G=Ne;if(xe>N)N=xe});var Re=c.x-(r+g)/2,ce=c.y-(N+G)/2;Object.keys(d).forEach(function(H){var ae=d[H];ae.setCenter(ae.getCenterX()+Re,ae.getCenterY()+ce)})}}},y.calcBoundingBox=function(c,d,f,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:G,MAX_SAFE_INTEGER:N,MIN_SAFE_INTEGER:o}=Number,v=void 0,C=void 0,n=void 0,k=void 0,Y=c.descendants().not(":parent"),b=Y.length;for(var U=0;U<b;U++){var z=Y[U];if(v=d[g.get(z.id())]-z.width()/2,C=d[g.get(z.id())]+z.width()/2,n=f[g.get(z.id())]-z.height()/2,k=f[g.get(z.id())]+z.height()/2,r>v)r=v;if(G<C)G=C;if(N>n)N=n;if(o<k)o=k}var w={};return w.topLeftX=r,w.topLeftY=N,w.width=G-r,w.height=o-N,w},y.calcParentsWithoutChildren=function(c,d){var f=c.collection();return d.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(G){if(G.css("display")!="none")r=!0}),!r)f.merge(g)}),f},T.exports=y},816:(T,O,p)=>{var x=p(548),l=p(140).CoSELayout,y=p(140).CoSENode,c=p(140).layoutBase.PointD,d=p(140).layoutBase.DimensionD,f=p(140).layoutBase.LayoutConstants,g=p(140).layoutBase.FDLayoutConstants,r=p(140).CoSEConstants,G=function(o,v){var{cy:C,eles:n}=o,k=n.nodes(),Y=n.edges(),b=void 0,U=void 0,z=void 0,w={};if(o.randomize)b=v.nodeIndexes,U=v.xCoords,z=v.yCoords;var _=function(H){return typeof H==="function"},q=function(H,ae){if(_(H))return H(ae);else return H},W=x.calcParentsWithoutChildren(C,n),oe=function ce(H,ae,Ie,be){var Ne=ae.length;for(var xe=0;xe<Ne;xe++){var V=ae[xe],Te=null;if(V.intersection(W).length==0)Te=V.children();var te=void 0,ve=V.layoutDimensions({nodeDimensionsIncludeLabels:be.nodeDimensionsIncludeLabels});if(V.outerWidth()!=null&&V.outerHeight()!=null)if(be.randomize)if(!V.isParent())te=H.add(new y(Ie.graphManager,new c(U[b.get(V.id())]-ve.w/2,z[b.get(V.id())]-ve.h/2),new d(parseFloat(ve.w),parseFloat(ve.h))));else{var ke=x.calcBoundingBox(V,U,z,b);if(V.intersection(W).length==0)te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new d(ke.width,ke.height)));else te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new d(parseFloat(ve.w),parseFloat(ve.h))))}else te=H.add(new y(Ie.graphManager,new c(V.position("x")-ve.w/2,V.position("y")-ve.h/2),new d(parseFloat(ve.w),parseFloat(ve.h))));else te=H.add(new y(this.graphManager));if(te.id=V.data("id"),te.nodeRepulsion=q(be.nodeRepulsion,V),te.paddingLeft=parseInt(V.css("padding")),te.paddingTop=parseInt(V.css("padding")),te.paddingRight=parseInt(V.css("padding")),te.paddingBottom=parseInt(V.css("padding")),be.nodeDimensionsIncludeLabels)te.labelWidth=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,te.labelHeight=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,te.labelPosVertical=V.css("text-valign"),te.labelPosHorizontal=V.css("text-halign");if(w[V.data("id")]=te,isNaN(te.rect.x))te.rect.x=0;if(isNaN(te.rect.y))te.rect.y=0;if(Te!=null&&Te.length>0){var $e=void 0;$e=Ie.getGraphManager().add(Ie.newGraph(),te),ce($e,Te,Ie,be)}}},ee=function(H,ae,Ie){var be=0,Ne=0;for(var xe=0;xe<Ie.length;xe++){var V=Ie[xe],Te=w[V.data("source")],te=w[V.data("target")];if(Te&&te&&Te!==te&&Te.getEdgesBetween(te).length==0){var ve=ae.add(H.newEdge(),Te,te);ve.id=V.id(),ve.idealLength=q(o.idealEdgeLength,V),ve.edgeElasticity=q(o.edgeElasticity,V),be+=ve.idealLength,Ne++}}if(o.idealEdgeLength!=null){if(Ne>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=be/Ne;else if(!_(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(H,ae){if(ae.fixedNodeConstraint)H.constraints.fixedNodeConstraint=ae.fixedNodeConstraint;if(ae.alignmentConstraint)H.constraints.alignmentConstraint=ae.alignmentConstraint;if(ae.relativePlacementConstraint)H.constraints.relativePlacementConstraint=ae.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")f.QUALITY=2;else f.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=f.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=f.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,f.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 Ae=new l,Re=Ae.newGraphManager();return oe(Re.addRoot(),x.getTopMostNodes(k),Ae,o),ee(Ae,Re,Y),ue(Ae,o),Ae.runLayout(),w};T.exports={coseLayout:G}},212:(T,O,p)=>{var x=function(){function o(v,C){for(var n=0;n<C.length;n++){var k=C[n];if(k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k)k.writable=!0;Object.defineProperty(v,k.key,k)}}return function(v,C,n){if(C)o(v.prototype,C);if(n)o(v,n);return v}}();function l(o,v){if(!(o instanceof v))throw TypeError("Cannot call a class as a function")}var y=p(658),c=p(548),d=p(657),f=d.spectralLayout,g=p(816),r=g.coseLayout,G=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(v){return 4500},idealEdgeLength:function(v){return 50},edgeElasticity:function(v){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(){}}),N=function(){function o(v){l(this,o),this.options=y({},G,v)}return x(o,[{key:"run",value:function(){var C=this,n=this.options,{cy:k,eles:Y}=n,b=[],U=void 0,z=void 0,w=[],_=void 0,q=[];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 W=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(W)n.tile=!1,n.packComponents=!1;var oe=void 0,ee=!1;if(k.layoutUtilities&&n.packComponents){if(oe=k.layoutUtilities("get"),!oe)oe=k.layoutUtilities();ee=!0}if(Y.nodes().length>0)if(!ee){var ue=n.eles.boundingBox();if(q.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Ae=f(n);b.push(Ae)}if(n.quality=="default"||n.quality=="proof")w.push(r(n,b[0])),c.relocateComponent(q[0],w[0],n);else c.relocateComponent(q[0],b[0],n)}else{var Re=c.getTopMostNodes(n.eles.nodes());if(_=c.connectComponents(k,n.eles,Re),_.forEach(function(J){var F=J.boundingBox();q.push({x:F.x1+F.w/2,y:F.y1+F.h/2})}),n.randomize)_.forEach(function(J){n.eles=J,b.push(f(n))});if(n.quality=="default"||n.quality=="proof"){var ce=k.collection();if(n.tile){var H=new Map,ae=[],Ie=[],be=0,Ne={nodeIndexes:H,xCoords:ae,yCoords:Ie},xe=[];if(_.forEach(function(J,F){if(J.edges().length==0)J.nodes().forEach(function(pe,se){if(ce.merge(J.nodes()[se]),!pe.isParent())Ne.nodeIndexes.set(J.nodes()[se].id(),be++),Ne.xCoords.push(J.nodes()[0].position().x),Ne.yCoords.push(J.nodes()[0].position().y)}),xe.push(F)}),ce.length>1){var V=ce.boundingBox();q.push({x:V.x1+V.w/2,y:V.y1+V.h/2}),_.push(ce),b.push(Ne);for(var Te=xe.length-1;Te>=0;Te--)_.splice(xe[Te],1),b.splice(xe[Te],1),q.splice(xe[Te],1)}}_.forEach(function(J,F){n.eles=J,w.push(r(n,b[F])),c.relocateComponent(q[F],w[F],n)})}else _.forEach(function(J,F){c.relocateComponent(q[F],b[F],n)});var te=new Set;if(_.length>1){var ve=[],ke=Y.filter(function(J){return J.css("display")=="none"});_.forEach(function(J,F){var pe=void 0;if(n.quality=="draft")pe=b[F].nodeIndexes;if(J.nodes().not(ke).length>0){var se={};se.edges=[],se.nodes=[];var me=void 0;if(J.nodes().not(ke).forEach(function(de){if(n.quality=="draft")if(!de.isParent())me=pe.get(de.id()),se.nodes.push({x:b[F].xCoords[me]-de.boundingbox().w/2,y:b[F].yCoords[me]-de.boundingbox().h/2,width:de.boundingbox().w,height:de.boundingbox().h});else{var he=c.calcBoundingBox(de,b[F].xCoords,b[F].yCoords,pe);se.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(w[F][de.id()])se.nodes.push({x:w[F][de.id()].getLeft(),y:w[F][de.id()].getTop(),width:w[F][de.id()].getWidth(),height:w[F][de.id()].getHeight()})}),J.edges().forEach(function(de){var he=de.source(),Ee=de.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Pe=pe.get(he.id()),Qe=pe.get(Ee.id()),Me=[],Ge=[];if(he.isParent()){var Ve=c.calcBoundingBox(he,b[F].xCoords,b[F].yCoords,pe);Me.push(Ve.topLeftX+Ve.width/2),Me.push(Ve.topLeftY+Ve.height/2)}else Me.push(b[F].xCoords[Pe]),Me.push(b[F].yCoords[Pe]);if(Ee.isParent()){var je=c.calcBoundingBox(Ee,b[F].xCoords,b[F].yCoords,pe);Ge.push(je.topLeftX+je.width/2),Ge.push(je.topLeftY+je.height/2)}else Ge.push(b[F].xCoords[Qe]),Ge.push(b[F].yCoords[Qe]);se.edges.push({startX:Me[0],startY:Me[1],endX:Ge[0],endY:Ge[1]})}else if(w[F][he.id()]&&w[F][Ee.id()])se.edges.push({startX:w[F][he.id()].getCenterX(),startY:w[F][he.id()].getCenterY(),endX:w[F][Ee.id()].getCenterX(),endY:w[F][Ee.id()].getCenterY()})}}),se.nodes.length>0)ve.push(se),te.add(F)}});var $e=oe.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")b.forEach(function(J,F){var pe=J.xCoords.map(function(me){return me+$e[F].dx}),se=J.yCoords.map(function(me){return me+$e[F].dy});J.xCoords=pe,J.yCoords=se});else{var Je=0;te.forEach(function(J){Object.keys(w[J]).forEach(function(F){var pe=w[J][F];pe.setCenter(pe.getCenterX()+$e[Je].dx,pe.getCenterY()+$e[Je].dy)}),Je++})}}}var Ue=function(F,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof F==="number")F=pe;var se=void 0,me=void 0,de=F.data("id");if(w.forEach(function(Ee){if(de in Ee)se={x:Ee[de].getRect().getCenterX(),y:Ee[de].getRect().getCenterY()},me=Ee[de]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")se.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")se.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")se.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")se.y-=me.labelHeight/2}}if(se==null)se={x:F.position("x"),y:F.position("y")};return{x:se.x,y:se.y}}else{var he=void 0;if(b.forEach(function(Ee){var Pe=Ee.nodeIndexes.get(F.id());if(Pe!=null)he={x:Ee.xCoords[Pe],y:Ee.yCoords[Pe]}}),he==null)he={x:F.position("x"),y:F.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var rt=c.calcParentsWithoutChildren(k,Y),He=Y.filter(function(J){return J.css("display")=="none"});if(n.eles=Y.not(He),Y.nodes().not(":parent").not(He).layoutPositions(C,n,Ue),rt.length>0)rt.forEach(function(J){J.position(Ue(J))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();T.exports=N},657:(T,O,p)=>{var x=p(548),l=p(140).layoutBase.Matrix,y=p(140).layoutBase.SVD,c=function(f){var{cy:g,eles:r}=f,G=r.nodes(),N=r.nodes(":parent"),o=new Map,v=new Map,C=new Map,n=[],k=[],Y=[],b=[],U=[],z=[],w=[],_=[],q=void 0,W=void 0,oe=1e8,ee=0.000000001,{piTol:ue,samplingType:Ae,nodeSeparation:Re}=f,ce=void 0,H=function(){var Z=0,K=0,ie=!1;while(K<ce){Z=Math.floor(Math.random()*W),ie=!1;for(var ne=0;ne<K;ne++)if(b[ne]==Z){ie=!0;break}if(!ie)b[K]=Z,K++;else continue}},ae=function(Z,K,ie){var ne=[],we=0,ge=0,le=0,Le=void 0,Ce=[],De=0,Oe=1;for(var ze=0;ze<W;ze++)Ce[ze]=oe;ne[ge]=Z,Ce[Z]=0;while(ge>=we){le=ne[we++];var Ye=n[le];for(var Be=0;Be<Ye.length;Be++)if(Le=v.get(Ye[Be]),Ce[Le]==oe)Ce[Le]=Ce[le]+1,ne[++ge]=Le;z[le][K]=Ce[le]*Re}if(ie){for(var Fe=0;Fe<W;Fe++)if(z[Fe][K]<U[Fe])U[Fe]=z[Fe][K];for(var Ke=0;Ke<W;Ke++)if(U[Ke]>De)De=U[Ke],Oe=Ke}return Oe},Ie=function(Z){var K=void 0;if(!Z){H();for(var ie=0;ie<ce;ie++)ae(b[ie],ie,Z,!1)}else{K=Math.floor(Math.random()*W),q=K;for(var ne=0;ne<W;ne++)U[ne]=oe;for(var we=0;we<ce;we++)b[we]=K,K=ae(K,we,Z)}for(var ge=0;ge<W;ge++)for(var le=0;le<ce;le++)z[ge][le]*=z[ge][le];for(var Le=0;Le<ce;Le++)w[Le]=[];for(var Ce=0;Ce<ce;Ce++)for(var De=0;De<ce;De++)w[Ce][De]=z[b[De]][Ce]},be=function(){var Z=y.svd(w),{S:K,U:ie,V:ne}=Z,we=K[0]*K[0]*K[0],ge=[];for(var le=0;le<ce;le++){ge[le]=[];for(var Le=0;Le<ce;Le++)if(ge[le][Le]=0,le==Le)ge[le][Le]=K[le]/(K[le]*K[le]+we/(K[le]*K[le]))}_=l.multMat(l.multMat(ne,ge),l.transpose(ie))},Ne=function(){var Z=void 0,K=void 0,ie=[],ne=[],we=[],ge=[];for(var le=0;le<W;le++)ie[le]=Math.random(),ne[le]=Math.random();ie=l.normalize(ie),ne=l.normalize(ne);var Le=0,Ce=ee,De=ee,Oe=void 0;while(!0){Le++;for(var ze=0;ze<W;ze++)we[ze]=ie[ze];if(ie=l.multGamma(l.multL(l.multGamma(we),z,_)),Z=l.dotProduct(we,ie),ie=l.normalize(ie),Ce=l.dotProduct(we,ie),Oe=Math.abs(Ce/De),Oe<=1+ue&&Oe>=1)break;De=Ce}for(var Ye=0;Ye<W;Ye++)we[Ye]=ie[Ye];Le=0,De=ee;while(!0){Le++;for(var Be=0;Be<W;Be++)ge[Be]=ne[Be];if(ge=l.minusOp(ge,l.multCons(we,l.dotProduct(we,ge))),ne=l.multGamma(l.multL(l.multGamma(ge),z,_)),K=l.dotProduct(ge,ne),ne=l.normalize(ne),Ce=l.dotProduct(ge,ne),Oe=Math.abs(Ce/De),Oe<=1+ue&&Oe>=1)break;De=Ce}for(var Fe=0;Fe<W;Fe++)ge[Fe]=ne[Fe];k=l.multCons(we,Math.sqrt(Math.abs(Z))),Y=l.multCons(ge,Math.sqrt(Math.abs(K)))};x.connectComponents(g,r,x.getTopMostNodes(G),o),N.forEach(function(ye){x.connectComponents(g,r,x.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var V=0;V<G.length;V++)if(!G[V].isParent())v.set(G[V].id(),xe++);var Te=!0,te=!1,ve=void 0;try{for(var ke=o.keys()[Symbol.iterator](),$e;!(Te=($e=ke.next()).done);Te=!0){var Je=$e.value;v.set(Je,xe++)}}catch(ye){te=!0,ve=ye}finally{try{if(!Te&&ke.return)ke.return()}finally{if(te)throw ve}}for(var Ue=0;Ue<v.size;Ue++)n[Ue]=[];N.forEach(function(ye){var Z=ye.children().intersection(r);while(Z.nodes(":childless").length==0)Z=Z.nodes()[0].children().intersection(r);var K=0,ie=Z.nodes(":childless")[0].connectedEdges().length;Z.nodes(":childless").forEach(function(ne,we){if(ne.connectedEdges().length<ie)ie=ne.connectedEdges().length,K=we}),C.set(ye.id(),Z.nodes(":childless")[K].id())}),G.forEach(function(ye){var Z=void 0;if(ye.isParent())Z=v.get(C.get(ye.id()));else Z=v.get(ye.id());ye.neighborhood().nodes().forEach(function(K){if(r.intersection(ye.edgesWith(K)).length>0)if(K.isParent())n[Z].push(C.get(K.id()));else n[Z].push(K.id())})});var rt=function(Z){var K=v.get(Z),ie=void 0;o.get(Z).forEach(function(ne){if(g.getElementById(ne).isParent())ie=C.get(ne);else ie=ne;n[K].push(ie),n[v.get(ie)].push(Z)})},He=!0,J=!1,F=void 0;try{for(var pe=o.keys()[Symbol.iterator](),se;!(He=(se=pe.next()).done);He=!0){var me=se.value;rt(me)}}catch(ye){J=!0,F=ye}finally{try{if(!He&&pe.return)pe.return()}finally{if(J)throw F}}W=v.size;var de=void 0;if(W>2){ce=W<f.sampleSize?W:f.sampleSize;for(var he=0;he<W;he++)z[he]=[];for(var Ee=0;Ee<ce;Ee++)_[Ee]=[];if(f.quality=="draft"||f.step=="all")Ie(Ae),be(),Ne(),de={nodeIndexes:v,xCoords:k,yCoords:Y};else v.forEach(function(ye,Z){k.push(g.getElementById(Z).position("x")),Y.push(g.getElementById(Z).position("y"))}),de={nodeIndexes:v,xCoords:k,yCoords:Y};return de}else{var Pe=v.keys(),Qe=g.getElementById(Pe.next().value),Me=Qe.position(),Ge=Qe.outerWidth();if(k.push(Me.x),Y.push(Me.y),W==2){var Ve=g.getElementById(Pe.next().value),je=Ve.outerWidth();k.push(Me.x+Ge/2+je/2+f.idealEdgeLength),Y.push(Me.y)}return de={nodeIndexes:v,xCoords:k,yCoords:Y},de}};T.exports={spectralLayout:c}},579:(T,O,p)=>{var x=p(212),l=function(c){if(!c)return;c("layout","fcose",x)};if(typeof cytoscape<"u")l(cytoscape);T.exports=l},140:(T)=>{T.exports=e}},s={};function E(T){var O=s[T];if(O!==void 0)return O.exports;var p=s[T]={exports:{}};return i[T](p,p.exports,E),p.exports}var m=E(579);return m})()})});var mt=Ze(ct(),1);var dt={L:"left",R:"right",T:"top",B:"bottom"},ft={L:t((e)=>`${e},${e/2} 0,${e} 0,0`,"L"),R:t((e)=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:t((e)=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:t((e)=>`${e/2},0 ${e},${e} 0,${e}`,"B")},it={L:t((e,i)=>e-i+2,"L"),R:t((e,i)=>e-2,"R"),T:t((e,i)=>e-i+2,"T"),B:t((e,i)=>e-2,"B")},It=t(function(e){if(Se(e))return e==="L"?"R":"L";else return e==="T"?"B":"T"},"getOppositeArchitectureDirection"),ut=t(function(e){let i=e;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Se=t(function(e){let i=e;return i==="L"||i==="R"},"isArchitectureDirectionX"),_e=t(function(e){let i=e;return i==="T"||i==="B"},"isArchitectureDirectionY"),lt=t(function(e,i){let s=Se(e)&&_e(i),E=_e(e)&&Se(i);return s||E},"isArchitectureDirectionXY"),Nt=t(function(e){let i=e[0],s=e[1],E=Se(i)&&_e(s),m=_e(i)&&Se(s);return E||m},"isArchitecturePairXY"),St=t(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),ot=t(function(e,i){let s=`${e}${i}`;return St(s)?s:void 0},"getArchitectureDirectionPair"),kt=t(function([e,i],s){let E=s[0],m=s[1];if(Se(E))if(_e(m))return[e+(E==="L"?-1:1),i+(m==="T"?1:-1)];else return[e+(E==="L"?-1:1),i];else if(Se(m))return[e+(m==="L"?1:-1),i+(E==="T"?1:-1)];else return[e,i+(E==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Dt=t(function(e){if(e==="LT"||e==="TL")return[1,1];else if(e==="BL"||e==="LB")return[1,-1];else if(e==="BR"||e==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),Rt=t(function(e,i){if(lt(e,i))return"bend";else if(Se(e))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Mt=t(function(e){return e.type==="service"},"isArchitectureService"),Ft=t(function(e){return e.type==="junction"},"isArchitectureJunction"),gt=t((e,i)=>{let[s,E]=[e,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(E)}`},"architectureGroupAlignmentKey"),ht=t((e)=>e.data(),"edgeData"),We=t((e)=>e.data(),"nodeData"),$t=B.architecture,vt=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=R,this.getAccTitle=I,this.setDiagramTitle=P,this.getDiagramTitle=M,this.getAccDescription=D,this.setAccDescription=L,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}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="",A()}addService({id:e,icon:i,in:s,title:E,iconText:m}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${e}]'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 [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:i,iconText:m,title:E,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Mt)}addJunction({id:e,in:i}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(i!==void 0){if(e===i)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${e}]'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 [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ft)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:i,in:s,title:E}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${e}]'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 [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:i,title:E,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:i,lhsDir:s,rhsDir:E,lhsInto:m,rhsInto:T,lhsGroup:O,rhsGroup:p,title:x}){if(!ut(s))throw Error(`Invalid direction given for left hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!ut(E))throw Error(`Invalid direction given for right hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(E)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] 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 l=this.nodes.get(e).in,y=this.nodes.get(i).in;if(O&&l&&y&&l==y)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(p&&l&&y&&l==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 c={lhsId:e,lhsDir:s,lhsInto:m,lhsGroup:O,rhsId:i,rhsDir:E,rhsInto:T,rhsGroup:p,title:x};this.edges.push(c);let d=this.nodes.get(e),f=this.nodes.get(i);if(d&&f)d.edges.push(this.edges[this.edges.length-1]),f.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let i=new Set;e.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${e.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${e.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,i=new Map;for(let[O,p]of this.nodes.entries()){let x=new Map;for(let l of p.edges){let y=this.getNode(l.lhsId)?.in,c=this.getNode(l.rhsId)?.in;if(y&&c&&y!==c){let d=Rt(l.lhsDir,l.rhsDir);if(d!=="bend")e.set(gt(y,c),d)}if(l.lhsId===O){let d=ot(l.lhsDir,l.rhsDir);if(d)x.set(d,l.rhsId)}else{let d=ot(l.rhsDir,l.lhsDir);if(d)x.set(d,l.lhsId)}}i.set(O,x)}let s=new Set,E=new Set(i.keys()),m=t((O)=>{let p=new Map([[O,[0,0]]]),x=[O];while(x.length>0){let l=x.shift();if(l){s.add(l),E.delete(l);let y=i.get(l);if(!y)throw Error(`BFS error: adjacency list for id ${l} not found. Please report this as a bug.`);let c=p.get(l);if(!c)throw Error(`BFS error: position for id ${l} not found in spatial map. Please report this as a bug.`);let[d,f]=c;y.forEach((g,r)=>{if(!s.has(g))p.set(g,kt([d,f],r)),x.push(g)})}}return p},"BFS"),T=[];while(E.size>0){let O=E.values().next().value;T.push(m(O))}this.dataStructures={adjList:i,spatialMaps:T,groupAlignments:e}}return this.dataStructures}setElementForId(e,i){this.elements.set(e,i)}getElementById(e){return this.elements.get(e)}getConfig(){return X({...$t,...S().architecture})}getConfigField(e){return this.getConfig()[e]}},Pt=t((e,i)=>{re(e,i),e.groups.map((s)=>i.addGroup(s)),e.services.map((s)=>i.addService({...s,type:"service"})),e.junctions.map((s)=>i.addJunction({...s,type:"junction"})),e.edges.map((s)=>i.addEdge(s)),e.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),pt={parser:{yy:void 0},parse:t(async(e)=>{let i=await fe("architecture",e);a.debug(i);let s=pt.parser?.yy;if(!(s instanceof vt))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.");Pt(i,s)},"parse")},Ot=t((e)=>`
|
|
1
|
+
import{re}from"./chunk-4r0dvjrr.js";import{t,a,B,S,j,sn,A,R,I,L,D,P,N,u,h,Q,zs,Br,qt,X,bt,it}from"./chunk-xp2zpmpp.js";import{fe}from"./chunk-et1nm6h1.js";import{un,Ka}from"./chunk-fk35d3bz.js";import{Ze,Xe}from"./chunk-2s6fhjjc.js";var ct=Xe(function(et,at){(function(i,s){if(typeof et==="object"&&typeof at==="object")at.exports=s(Ka());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof et==="object")et.cytoscapeFcose=s(Ka());else i.cytoscapeFcose=s(i.coseBase)})(et,function(e){return(()=>{var i={658:(T)=>{T.exports=Object.assign!=null?Object.assign.bind(Object):function(O){for(var p=arguments.length,x=Array(p>1?p-1:0),l=1;l<p;l++)x[l-1]=arguments[l];return x.forEach(function(y){Object.keys(y).forEach(function(c){return O[c]=y[c]})}),O}},548:(T,O,p)=>{var x=function(){function c(d,f){var g=[],r=!0,G=!1,k=void 0;try{for(var o=d[Symbol.iterator](),v;!(r=(v=o.next()).done);r=!0)if(g.push(v.value),f&&g.length===f)break}catch(C){G=!0,k=C}finally{try{if(!r&&o.return)o.return()}finally{if(G)throw k}}return g}return function(d,f){if(Array.isArray(d))return d;else if(Symbol.iterator in Object(d))return c(d,f);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=p(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(c){var d={};for(var f=0;f<c.length;f++)d[c[f].id()]=!0;var g=c.filter(function(r,G){if(typeof r==="number")r=G;var k=r.parent()[0];while(k!=null){if(d[k.id()])return!1;k=k.parent()[0]}return!0});return g},y.connectComponents=function(c,d,f,g){var r=new l,G=new Set,k=[],o=void 0,v=void 0,C=void 0,n=!1,M=1,Y=[],b=[],U=function(){var w=c.collection();b.push(w);var _=f[0],q=c.collection();q.merge(_).merge(_.descendants().intersection(d)),k.push(_),q.forEach(function(ee){r.push(ee),G.add(ee),w.merge(ee)});var W=function(){_=r.shift();var ue=c.collection();_.neighborhood().nodes().forEach(function(H){if(d.intersection(_.edgesWith(H)).length>0)ue.merge(H)});for(var Ae=0;Ae<ue.length;Ae++){var Re=ue[Ae];if(o=f.intersection(Re.union(Re.ancestors())),o!=null&&!G.has(o[0])){var ce=o.union(o.descendants());ce.forEach(function(H){if(r.push(H),G.add(H),w.merge(H),f.has(H))k.push(H)})}}};while(r.length!=0)W();if(w.forEach(function(ee){d.intersection(ee.connectedEdges()).forEach(function(ue){if(w.has(ue.source())&&w.has(ue.target()))w.merge(ue)})}),k.length==f.length)n=!0;if(!n||n&&M>1){v=k[0],C=v.connectedEdges().length,k.forEach(function(ee){if(ee.connectedEdges().length<C)C=ee.connectedEdges().length,v=ee}),Y.push(v.id());var oe=c.collection();oe.merge(k[0]),k.forEach(function(ee){oe.merge(ee)}),k=[],f=f.difference(oe),M++}};do U();while(!n);if(g){if(Y.length>0)g.set("dummy"+(g.size+1),Y)}return b},y.relocateComponent=function(c,d,f){if(!f.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:G,NEGATIVE_INFINITY:k}=Number;if(f.quality=="draft"){var o=!0,v=!1,C=void 0;try{for(var n=d.nodeIndexes[Symbol.iterator](),M;!(o=(M=n.next()).done);o=!0){var Y=M.value,b=x(Y,2),U=b[0],z=b[1],w=f.cy.getElementById(U);if(w){var _=w.boundingBox(),q=d.xCoords[z]-_.w/2,W=d.xCoords[z]+_.w/2,oe=d.yCoords[z]-_.h/2,ee=d.yCoords[z]+_.h/2;if(q<g)g=q;if(W>r)r=W;if(oe<G)G=oe;if(ee>k)k=ee}}}catch(H){v=!0,C=H}finally{try{if(!o&&n.return)n.return()}finally{if(v)throw C}}var ue=c.x-(r+g)/2,Ae=c.y-(k+G)/2;d.xCoords=d.xCoords.map(function(H){return H+ue}),d.yCoords=d.yCoords.map(function(H){return H+Ae})}else{Object.keys(d).forEach(function(H){var ae=d[H],Ie=ae.getRect().x,be=ae.getRect().x+ae.getRect().width,Ne=ae.getRect().y,xe=ae.getRect().y+ae.getRect().height;if(Ie<g)g=Ie;if(be>r)r=be;if(Ne<G)G=Ne;if(xe>k)k=xe});var Re=c.x-(r+g)/2,ce=c.y-(k+G)/2;Object.keys(d).forEach(function(H){var ae=d[H];ae.setCenter(ae.getCenterX()+Re,ae.getCenterY()+ce)})}}},y.calcBoundingBox=function(c,d,f,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:G,MAX_SAFE_INTEGER:k,MIN_SAFE_INTEGER:o}=Number,v=void 0,C=void 0,n=void 0,M=void 0,Y=c.descendants().not(":parent"),b=Y.length;for(var U=0;U<b;U++){var z=Y[U];if(v=d[g.get(z.id())]-z.width()/2,C=d[g.get(z.id())]+z.width()/2,n=f[g.get(z.id())]-z.height()/2,M=f[g.get(z.id())]+z.height()/2,r>v)r=v;if(G<C)G=C;if(k>n)k=n;if(o<M)o=M}var w={};return w.topLeftX=r,w.topLeftY=k,w.width=G-r,w.height=o-k,w},y.calcParentsWithoutChildren=function(c,d){var f=c.collection();return d.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(G){if(G.css("display")!="none")r=!0}),!r)f.merge(g)}),f},T.exports=y},816:(T,O,p)=>{var x=p(548),l=p(140).CoSELayout,y=p(140).CoSENode,c=p(140).layoutBase.PointD,d=p(140).layoutBase.DimensionD,f=p(140).layoutBase.LayoutConstants,g=p(140).layoutBase.FDLayoutConstants,r=p(140).CoSEConstants,G=function(o,v){var{cy:C,eles:n}=o,M=n.nodes(),Y=n.edges(),b=void 0,U=void 0,z=void 0,w={};if(o.randomize)b=v.nodeIndexes,U=v.xCoords,z=v.yCoords;var _=function(H){return typeof H==="function"},q=function(H,ae){if(_(H))return H(ae);else return H},W=x.calcParentsWithoutChildren(C,n),oe=function ce(H,ae,Ie,be){var Ne=ae.length;for(var xe=0;xe<Ne;xe++){var V=ae[xe],Te=null;if(V.intersection(W).length==0)Te=V.children();var te=void 0,ve=V.layoutDimensions({nodeDimensionsIncludeLabels:be.nodeDimensionsIncludeLabels});if(V.outerWidth()!=null&&V.outerHeight()!=null)if(be.randomize)if(!V.isParent())te=H.add(new y(Ie.graphManager,new c(U[b.get(V.id())]-ve.w/2,z[b.get(V.id())]-ve.h/2),new d(parseFloat(ve.w),parseFloat(ve.h))));else{var ke=x.calcBoundingBox(V,U,z,b);if(V.intersection(W).length==0)te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new d(ke.width,ke.height)));else te=H.add(new y(Ie.graphManager,new c(ke.topLeftX,ke.topLeftY),new d(parseFloat(ve.w),parseFloat(ve.h))))}else te=H.add(new y(Ie.graphManager,new c(V.position("x")-ve.w/2,V.position("y")-ve.h/2),new d(parseFloat(ve.w),parseFloat(ve.h))));else te=H.add(new y(this.graphManager));if(te.id=V.data("id"),te.nodeRepulsion=q(be.nodeRepulsion,V),te.paddingLeft=parseInt(V.css("padding")),te.paddingTop=parseInt(V.css("padding")),te.paddingRight=parseInt(V.css("padding")),te.paddingBottom=parseInt(V.css("padding")),be.nodeDimensionsIncludeLabels)te.labelWidth=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,te.labelHeight=V.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,te.labelPosVertical=V.css("text-valign"),te.labelPosHorizontal=V.css("text-halign");if(w[V.data("id")]=te,isNaN(te.rect.x))te.rect.x=0;if(isNaN(te.rect.y))te.rect.y=0;if(Te!=null&&Te.length>0){var $e=void 0;$e=Ie.getGraphManager().add(Ie.newGraph(),te),ce($e,Te,Ie,be)}}},ee=function(H,ae,Ie){var be=0,Ne=0;for(var xe=0;xe<Ie.length;xe++){var V=Ie[xe],Te=w[V.data("source")],te=w[V.data("target")];if(Te&&te&&Te!==te&&Te.getEdgesBetween(te).length==0){var ve=ae.add(H.newEdge(),Te,te);ve.id=V.id(),ve.idealLength=q(o.idealEdgeLength,V),ve.edgeElasticity=q(o.edgeElasticity,V),be+=ve.idealLength,Ne++}}if(o.idealEdgeLength!=null){if(Ne>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=be/Ne;else if(!_(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(H,ae){if(ae.fixedNodeConstraint)H.constraints.fixedNodeConstraint=ae.fixedNodeConstraint;if(ae.alignmentConstraint)H.constraints.alignmentConstraint=ae.alignmentConstraint;if(ae.relativePlacementConstraint)H.constraints.relativePlacementConstraint=ae.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")f.QUALITY=2;else f.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=f.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=f.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=f.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=f.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,f.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 Ae=new l,Re=Ae.newGraphManager();return oe(Re.addRoot(),x.getTopMostNodes(M),Ae,o),ee(Ae,Re,Y),ue(Ae,o),Ae.runLayout(),w};T.exports={coseLayout:G}},212:(T,O,p)=>{var x=function(){function o(v,C){for(var n=0;n<C.length;n++){var M=C[n];if(M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M)M.writable=!0;Object.defineProperty(v,M.key,M)}}return function(v,C,n){if(C)o(v.prototype,C);if(n)o(v,n);return v}}();function l(o,v){if(!(o instanceof v))throw TypeError("Cannot call a class as a function")}var y=p(658),c=p(548),d=p(657),f=d.spectralLayout,g=p(816),r=g.coseLayout,G=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(v){return 4500},idealEdgeLength:function(v){return 50},edgeElasticity:function(v){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(){}}),k=function(){function o(v){l(this,o),this.options=y({},G,v)}return x(o,[{key:"run",value:function(){var C=this,n=this.options,{cy:M,eles:Y}=n,b=[],U=void 0,z=void 0,w=[],_=void 0,q=[];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 W=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(W)n.tile=!1,n.packComponents=!1;var oe=void 0,ee=!1;if(M.layoutUtilities&&n.packComponents){if(oe=M.layoutUtilities("get"),!oe)oe=M.layoutUtilities();ee=!0}if(Y.nodes().length>0)if(!ee){var ue=n.eles.boundingBox();if(q.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Ae=f(n);b.push(Ae)}if(n.quality=="default"||n.quality=="proof")w.push(r(n,b[0])),c.relocateComponent(q[0],w[0],n);else c.relocateComponent(q[0],b[0],n)}else{var Re=c.getTopMostNodes(n.eles.nodes());if(_=c.connectComponents(M,n.eles,Re),_.forEach(function(J){var F=J.boundingBox();q.push({x:F.x1+F.w/2,y:F.y1+F.h/2})}),n.randomize)_.forEach(function(J){n.eles=J,b.push(f(n))});if(n.quality=="default"||n.quality=="proof"){var ce=M.collection();if(n.tile){var H=new Map,ae=[],Ie=[],be=0,Ne={nodeIndexes:H,xCoords:ae,yCoords:Ie},xe=[];if(_.forEach(function(J,F){if(J.edges().length==0)J.nodes().forEach(function(pe,se){if(ce.merge(J.nodes()[se]),!pe.isParent())Ne.nodeIndexes.set(J.nodes()[se].id(),be++),Ne.xCoords.push(J.nodes()[0].position().x),Ne.yCoords.push(J.nodes()[0].position().y)}),xe.push(F)}),ce.length>1){var V=ce.boundingBox();q.push({x:V.x1+V.w/2,y:V.y1+V.h/2}),_.push(ce),b.push(Ne);for(var Te=xe.length-1;Te>=0;Te--)_.splice(xe[Te],1),b.splice(xe[Te],1),q.splice(xe[Te],1)}}_.forEach(function(J,F){n.eles=J,w.push(r(n,b[F])),c.relocateComponent(q[F],w[F],n)})}else _.forEach(function(J,F){c.relocateComponent(q[F],b[F],n)});var te=new Set;if(_.length>1){var ve=[],ke=Y.filter(function(J){return J.css("display")=="none"});_.forEach(function(J,F){var pe=void 0;if(n.quality=="draft")pe=b[F].nodeIndexes;if(J.nodes().not(ke).length>0){var se={};se.edges=[],se.nodes=[];var me=void 0;if(J.nodes().not(ke).forEach(function(de){if(n.quality=="draft")if(!de.isParent())me=pe.get(de.id()),se.nodes.push({x:b[F].xCoords[me]-de.boundingbox().w/2,y:b[F].yCoords[me]-de.boundingbox().h/2,width:de.boundingbox().w,height:de.boundingbox().h});else{var he=c.calcBoundingBox(de,b[F].xCoords,b[F].yCoords,pe);se.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(w[F][de.id()])se.nodes.push({x:w[F][de.id()].getLeft(),y:w[F][de.id()].getTop(),width:w[F][de.id()].getWidth(),height:w[F][de.id()].getHeight()})}),J.edges().forEach(function(de){var he=de.source(),Ee=de.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Pe=pe.get(he.id()),Qe=pe.get(Ee.id()),Me=[],Ge=[];if(he.isParent()){var Ve=c.calcBoundingBox(he,b[F].xCoords,b[F].yCoords,pe);Me.push(Ve.topLeftX+Ve.width/2),Me.push(Ve.topLeftY+Ve.height/2)}else Me.push(b[F].xCoords[Pe]),Me.push(b[F].yCoords[Pe]);if(Ee.isParent()){var je=c.calcBoundingBox(Ee,b[F].xCoords,b[F].yCoords,pe);Ge.push(je.topLeftX+je.width/2),Ge.push(je.topLeftY+je.height/2)}else Ge.push(b[F].xCoords[Qe]),Ge.push(b[F].yCoords[Qe]);se.edges.push({startX:Me[0],startY:Me[1],endX:Ge[0],endY:Ge[1]})}else if(w[F][he.id()]&&w[F][Ee.id()])se.edges.push({startX:w[F][he.id()].getCenterX(),startY:w[F][he.id()].getCenterY(),endX:w[F][Ee.id()].getCenterX(),endY:w[F][Ee.id()].getCenterY()})}}),se.nodes.length>0)ve.push(se),te.add(F)}});var $e=oe.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")b.forEach(function(J,F){var pe=J.xCoords.map(function(me){return me+$e[F].dx}),se=J.yCoords.map(function(me){return me+$e[F].dy});J.xCoords=pe,J.yCoords=se});else{var Je=0;te.forEach(function(J){Object.keys(w[J]).forEach(function(F){var pe=w[J][F];pe.setCenter(pe.getCenterX()+$e[Je].dx,pe.getCenterY()+$e[Je].dy)}),Je++})}}}var Ue=function(F,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof F==="number")F=pe;var se=void 0,me=void 0,de=F.data("id");if(w.forEach(function(Ee){if(de in Ee)se={x:Ee[de].getRect().getCenterX(),y:Ee[de].getRect().getCenterY()},me=Ee[de]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")se.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")se.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")se.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")se.y-=me.labelHeight/2}}if(se==null)se={x:F.position("x"),y:F.position("y")};return{x:se.x,y:se.y}}else{var he=void 0;if(b.forEach(function(Ee){var Pe=Ee.nodeIndexes.get(F.id());if(Pe!=null)he={x:Ee.xCoords[Pe],y:Ee.yCoords[Pe]}}),he==null)he={x:F.position("x"),y:F.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var rt=c.calcParentsWithoutChildren(M,Y),He=Y.filter(function(J){return J.css("display")=="none"});if(n.eles=Y.not(He),Y.nodes().not(":parent").not(He).layoutPositions(C,n,Ue),rt.length>0)rt.forEach(function(J){J.position(Ue(J))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();T.exports=k},657:(T,O,p)=>{var x=p(548),l=p(140).layoutBase.Matrix,y=p(140).layoutBase.SVD,c=function(f){var{cy:g,eles:r}=f,G=r.nodes(),k=r.nodes(":parent"),o=new Map,v=new Map,C=new Map,n=[],M=[],Y=[],b=[],U=[],z=[],w=[],_=[],q=void 0,W=void 0,oe=1e8,ee=0.000000001,{piTol:ue,samplingType:Ae,nodeSeparation:Re}=f,ce=void 0,H=function(){var Z=0,K=0,ie=!1;while(K<ce){Z=Math.floor(Math.random()*W),ie=!1;for(var ne=0;ne<K;ne++)if(b[ne]==Z){ie=!0;break}if(!ie)b[K]=Z,K++;else continue}},ae=function(Z,K,ie){var ne=[],we=0,ge=0,le=0,Le=void 0,Ce=[],De=0,Oe=1;for(var ze=0;ze<W;ze++)Ce[ze]=oe;ne[ge]=Z,Ce[Z]=0;while(ge>=we){le=ne[we++];var Ye=n[le];for(var Be=0;Be<Ye.length;Be++)if(Le=v.get(Ye[Be]),Ce[Le]==oe)Ce[Le]=Ce[le]+1,ne[++ge]=Le;z[le][K]=Ce[le]*Re}if(ie){for(var Fe=0;Fe<W;Fe++)if(z[Fe][K]<U[Fe])U[Fe]=z[Fe][K];for(var Ke=0;Ke<W;Ke++)if(U[Ke]>De)De=U[Ke],Oe=Ke}return Oe},Ie=function(Z){var K=void 0;if(!Z){H();for(var ie=0;ie<ce;ie++)ae(b[ie],ie,Z,!1)}else{K=Math.floor(Math.random()*W),q=K;for(var ne=0;ne<W;ne++)U[ne]=oe;for(var we=0;we<ce;we++)b[we]=K,K=ae(K,we,Z)}for(var ge=0;ge<W;ge++)for(var le=0;le<ce;le++)z[ge][le]*=z[ge][le];for(var Le=0;Le<ce;Le++)w[Le]=[];for(var Ce=0;Ce<ce;Ce++)for(var De=0;De<ce;De++)w[Ce][De]=z[b[De]][Ce]},be=function(){var Z=y.svd(w),{S:K,U:ie,V:ne}=Z,we=K[0]*K[0]*K[0],ge=[];for(var le=0;le<ce;le++){ge[le]=[];for(var Le=0;Le<ce;Le++)if(ge[le][Le]=0,le==Le)ge[le][Le]=K[le]/(K[le]*K[le]+we/(K[le]*K[le]))}_=l.multMat(l.multMat(ne,ge),l.transpose(ie))},Ne=function(){var Z=void 0,K=void 0,ie=[],ne=[],we=[],ge=[];for(var le=0;le<W;le++)ie[le]=Math.random(),ne[le]=Math.random();ie=l.normalize(ie),ne=l.normalize(ne);var Le=0,Ce=ee,De=ee,Oe=void 0;while(!0){Le++;for(var ze=0;ze<W;ze++)we[ze]=ie[ze];if(ie=l.multGamma(l.multL(l.multGamma(we),z,_)),Z=l.dotProduct(we,ie),ie=l.normalize(ie),Ce=l.dotProduct(we,ie),Oe=Math.abs(Ce/De),Oe<=1+ue&&Oe>=1)break;De=Ce}for(var Ye=0;Ye<W;Ye++)we[Ye]=ie[Ye];Le=0,De=ee;while(!0){Le++;for(var Be=0;Be<W;Be++)ge[Be]=ne[Be];if(ge=l.minusOp(ge,l.multCons(we,l.dotProduct(we,ge))),ne=l.multGamma(l.multL(l.multGamma(ge),z,_)),K=l.dotProduct(ge,ne),ne=l.normalize(ne),Ce=l.dotProduct(ge,ne),Oe=Math.abs(Ce/De),Oe<=1+ue&&Oe>=1)break;De=Ce}for(var Fe=0;Fe<W;Fe++)ge[Fe]=ne[Fe];M=l.multCons(we,Math.sqrt(Math.abs(Z))),Y=l.multCons(ge,Math.sqrt(Math.abs(K)))};x.connectComponents(g,r,x.getTopMostNodes(G),o),k.forEach(function(ye){x.connectComponents(g,r,x.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var V=0;V<G.length;V++)if(!G[V].isParent())v.set(G[V].id(),xe++);var Te=!0,te=!1,ve=void 0;try{for(var ke=o.keys()[Symbol.iterator](),$e;!(Te=($e=ke.next()).done);Te=!0){var Je=$e.value;v.set(Je,xe++)}}catch(ye){te=!0,ve=ye}finally{try{if(!Te&&ke.return)ke.return()}finally{if(te)throw ve}}for(var Ue=0;Ue<v.size;Ue++)n[Ue]=[];k.forEach(function(ye){var Z=ye.children().intersection(r);while(Z.nodes(":childless").length==0)Z=Z.nodes()[0].children().intersection(r);var K=0,ie=Z.nodes(":childless")[0].connectedEdges().length;Z.nodes(":childless").forEach(function(ne,we){if(ne.connectedEdges().length<ie)ie=ne.connectedEdges().length,K=we}),C.set(ye.id(),Z.nodes(":childless")[K].id())}),G.forEach(function(ye){var Z=void 0;if(ye.isParent())Z=v.get(C.get(ye.id()));else Z=v.get(ye.id());ye.neighborhood().nodes().forEach(function(K){if(r.intersection(ye.edgesWith(K)).length>0)if(K.isParent())n[Z].push(C.get(K.id()));else n[Z].push(K.id())})});var rt=function(Z){var K=v.get(Z),ie=void 0;o.get(Z).forEach(function(ne){if(g.getElementById(ne).isParent())ie=C.get(ne);else ie=ne;n[K].push(ie),n[v.get(ie)].push(Z)})},He=!0,J=!1,F=void 0;try{for(var pe=o.keys()[Symbol.iterator](),se;!(He=(se=pe.next()).done);He=!0){var me=se.value;rt(me)}}catch(ye){J=!0,F=ye}finally{try{if(!He&&pe.return)pe.return()}finally{if(J)throw F}}W=v.size;var de=void 0;if(W>2){ce=W<f.sampleSize?W:f.sampleSize;for(var he=0;he<W;he++)z[he]=[];for(var Ee=0;Ee<ce;Ee++)_[Ee]=[];if(f.quality=="draft"||f.step=="all")Ie(Ae),be(),Ne(),de={nodeIndexes:v,xCoords:M,yCoords:Y};else v.forEach(function(ye,Z){M.push(g.getElementById(Z).position("x")),Y.push(g.getElementById(Z).position("y"))}),de={nodeIndexes:v,xCoords:M,yCoords:Y};return de}else{var Pe=v.keys(),Qe=g.getElementById(Pe.next().value),Me=Qe.position(),Ge=Qe.outerWidth();if(M.push(Me.x),Y.push(Me.y),W==2){var Ve=g.getElementById(Pe.next().value),je=Ve.outerWidth();M.push(Me.x+Ge/2+je/2+f.idealEdgeLength),Y.push(Me.y)}return de={nodeIndexes:v,xCoords:M,yCoords:Y},de}};T.exports={spectralLayout:c}},579:(T,O,p)=>{var x=p(212),l=function(c){if(!c)return;c("layout","fcose",x)};if(typeof cytoscape<"u")l(cytoscape);T.exports=l},140:(T)=>{T.exports=e}},s={};function E(T){var O=s[T];if(O!==void 0)return O.exports;var p=s[T]={exports:{}};return i[T](p,p.exports,E),p.exports}var m=E(579);return m})()})});var mt=Ze(ct(),1);var dt={L:"left",R:"right",T:"top",B:"bottom"},ft={L:t((e)=>`${e},${e/2} 0,${e} 0,0`,"L"),R:t((e)=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:t((e)=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:t((e)=>`${e/2},0 ${e},${e} 0,${e}`,"B")},nt={L:t((e,i)=>e-i+2,"L"),R:t((e,i)=>e-2,"R"),T:t((e,i)=>e-i+2,"T"),B:t((e,i)=>e-2,"B")},It=t(function(e){if(Se(e))return e==="L"?"R":"L";else return e==="T"?"B":"T"},"getOppositeArchitectureDirection"),ut=t(function(e){let i=e;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Se=t(function(e){let i=e;return i==="L"||i==="R"},"isArchitectureDirectionX"),_e=t(function(e){let i=e;return i==="T"||i==="B"},"isArchitectureDirectionY"),lt=t(function(e,i){let s=Se(e)&&_e(i),E=_e(e)&&Se(i);return s||E},"isArchitectureDirectionXY"),Nt=t(function(e){let i=e[0],s=e[1],E=Se(i)&&_e(s),m=_e(i)&&Se(s);return E||m},"isArchitecturePairXY"),St=t(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),ot=t(function(e,i){let s=`${e}${i}`;return St(s)?s:void 0},"getArchitectureDirectionPair"),kt=t(function([e,i],s){let E=s[0],m=s[1];if(Se(E))if(_e(m))return[e+(E==="L"?-1:1),i+(m==="T"?1:-1)];else return[e+(E==="L"?-1:1),i];else if(Se(m))return[e+(m==="L"?1:-1),i+(E==="T"?1:-1)];else return[e,i+(E==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Dt=t(function(e){if(e==="LT"||e==="TL")return[1,1];else if(e==="BL"||e==="LB")return[1,-1];else if(e==="BR"||e==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),Rt=t(function(e,i){if(lt(e,i))return"bend";else if(Se(e))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Mt=t(function(e){return e.type==="service"},"isArchitectureService"),Ft=t(function(e){return e.type==="junction"},"isArchitectureJunction"),gt=t((e,i)=>{let[s,E]=[e,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(E)}`},"architectureGroupAlignmentKey"),ht=t((e)=>e.data(),"edgeData"),We=t((e)=>e.data(),"nodeData"),$t=B.architecture,vt=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=R,this.getAccTitle=I,this.setDiagramTitle=P,this.getDiagramTitle=N,this.getAccDescription=D,this.setAccDescription=L,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}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="",A()}addService({id:e,icon:i,in:s,title:E,iconText:m}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${e}]'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 [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:i,iconText:m,title:E,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Mt)}addJunction({id:e,in:i}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(i!==void 0){if(e===i)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${e}]'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 [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ft)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:i,in:s,title:E}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(s!==void 0){if(e===s)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${e}]'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 [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:i,title:E,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:i,lhsDir:s,rhsDir:E,lhsInto:m,rhsInto:T,lhsGroup:O,rhsGroup:p,title:x}){if(!ut(s))throw Error(`Invalid direction given for left hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!ut(E))throw Error(`Invalid direction given for right hand side of edge ${e}--${i}. Expected (L,R,T,B) got ${String(E)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] 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 l=this.nodes.get(e).in,y=this.nodes.get(i).in;if(O&&l&&y&&l==y)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(p&&l&&y&&l==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 c={lhsId:e,lhsDir:s,lhsInto:m,lhsGroup:O,rhsId:i,rhsDir:E,rhsInto:T,rhsGroup:p,title:x};this.edges.push(c);let d=this.nodes.get(e),f=this.nodes.get(i);if(d&&f)d.edges.push(this.edges[this.edges.length-1]),f.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let i=new Set;e.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${e.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${e.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,i=new Map;for(let[O,p]of this.nodes.entries()){let x=new Map;for(let l of p.edges){let y=this.getNode(l.lhsId)?.in,c=this.getNode(l.rhsId)?.in;if(y&&c&&y!==c){let d=Rt(l.lhsDir,l.rhsDir);if(d!=="bend")e.set(gt(y,c),d)}if(l.lhsId===O){let d=ot(l.lhsDir,l.rhsDir);if(d)x.set(d,l.rhsId)}else{let d=ot(l.rhsDir,l.lhsDir);if(d)x.set(d,l.lhsId)}}i.set(O,x)}let s=new Set,E=new Set(i.keys()),m=t((O)=>{let p=new Map([[O,[0,0]]]),x=[O];while(x.length>0){let l=x.shift();if(l){s.add(l),E.delete(l);let y=i.get(l);if(!y)throw Error(`BFS error: adjacency list for id ${l} not found. Please report this as a bug.`);let c=p.get(l);if(!c)throw Error(`BFS error: position for id ${l} not found in spatial map. Please report this as a bug.`);let[d,f]=c;y.forEach((g,r)=>{if(!s.has(g))p.set(g,kt([d,f],r)),x.push(g)})}}return p},"BFS"),T=[];while(E.size>0){let O=E.values().next().value;T.push(m(O))}this.dataStructures={adjList:i,spatialMaps:T,groupAlignments:e}}return this.dataStructures}setElementForId(e,i){this.elements.set(e,i)}getElementById(e){return this.elements.get(e)}getConfig(){return X({...$t,...S().architecture})}getConfigField(e){return this.getConfig()[e]}},Pt=t((e,i)=>{re(e,i),e.groups.map((s)=>i.addGroup(s)),e.services.map((s)=>i.addService({...s,type:"service"})),e.junctions.map((s)=>i.addJunction({...s,type:"junction"})),e.edges.map((s)=>i.addEdge(s)),e.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),pt={parser:{yy:void 0},parse:t(async(e)=>{let i=await fe("architecture",e);a.debug(i);let s=pt.parser?.yy;if(!(s instanceof vt))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.");Pt(i,s)},"parse")},Ot=t((e)=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${e.archEdgeWidth};
|
|
4
4
|
stroke: ${e.archEdgeColor};
|
|
@@ -29,8 +29,8 @@ import{re}from"./chunk-mwfrxgbs.js";import{t,a,B,S,j,sn,A,R,I,L,D,P,M,u,h,Q,zs,B
|
|
|
29
29
|
display: -webkit-box;
|
|
30
30
|
-webkit-box-orient: vertical;
|
|
31
31
|
}
|
|
32
|
-
`,"getStyles"),Gt=Ot;function st(e,i){if(e===0)return i();let s=Math.random,E=e>>>0;Math.random=function(){E=E+1831565813>>>0;let m=E;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}}t(st,"withSeededRandom");var qe=t((e)=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),tt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:qe('<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:qe('<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:qe('<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:qe('<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:qe('<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:zs,blank:{body:qe("")}}},zt=t(async function(e,i,s,E){let m=s.getConfigField("padding"),T=s.getConfigField("iconSize"),O=T/2,p=T/6,x=p/2;await Promise.all(i.edges().map(async(l)=>{let{source:y,sourceDir:c,sourceArrow:d,sourceGroup:f,target:g,targetDir:r,targetArrow:G,targetGroup:
|
|
33
|
-
translate(${n}, ${
|
|
32
|
+
`,"getStyles"),Gt=Ot;function st(e,i){if(e===0)return i();let s=Math.random,E=e>>>0;Math.random=function(){E=E+1831565813>>>0;let m=E;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}}t(st,"withSeededRandom");var qe=t((e)=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`,"wrapIcon"),tt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:qe('<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:qe('<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:qe('<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:qe('<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:qe('<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:zs,blank:{body:qe("")}}},zt=t(async function(e,i,s,E){let m=s.getConfigField("padding"),T=s.getConfigField("iconSize"),O=T/2,p=T/6,x=p/2;await Promise.all(i.edges().map(async(l)=>{let{source:y,sourceDir:c,sourceArrow:d,sourceGroup:f,target:g,targetDir:r,targetArrow:G,targetGroup:k,label:o}=ht(l),{x:v,y:C}=l[0].sourceEndpoint(),{x:n,y:M}=l[0].midpoint(),{x:Y,y:b}=l[0].targetEndpoint(),U=m+4;if(f)if(Se(c))v+=c==="L"?-U:U;else C+=c==="T"?-U:U+18;if(k)if(Se(r))Y+=r==="L"?-U:U;else b+=r==="T"?-U:U+18;if(!f&&s.getNode(y)?.type==="junction")if(Se(c))v+=c==="L"?O:-O;else C+=c==="T"?O:-O;if(!k&&s.getNode(g)?.type==="junction")if(Se(r))Y+=r==="L"?O:-O;else b+=r==="T"?O:-O;if(l[0]._private.rscratch){let z=e.insert("g");if(z.insert("path").attr("d",`M ${v},${C} L ${n},${M} L${Y},${b} `).attr("class","edge").attr("id",`${E}-${bt(y,g,{prefix:"L"})}`),d){let w=Se(c)?nt[c](v,p):v-x,_=_e(c)?nt[c](C,p):C-x;z.insert("polygon").attr("points",ft[c](p)).attr("transform",`translate(${w},${_})`).attr("class","arrow")}if(G){let w=Se(r)?nt[r](Y,p):Y-x,_=_e(r)?nt[r](b,p):b-x;z.insert("polygon").attr("points",ft[r](p)).attr("transform",`translate(${w},${_})`).attr("class","arrow")}if(o){let w=!lt(c,r)?Se(c)?"X":"Y":"XY",_=0;if(w==="X")_=Math.abs(v-Y);else if(w==="Y")_=Math.abs(C-b)/1.5;else _=Math.abs(v-Y)/2;let q=z.append("g");if(await it(q,o,{useHtmlLabels:!1,width:_,classes:"architecture-service-label"},u()),q.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),w==="X")q.attr("transform","translate("+n+", "+M+")");else if(w==="Y")q.attr("transform","translate("+n+", "+M+") rotate(-90)");else if(w==="XY"){let W=ot(c,r);if(W&&Nt(W)){let oe=q.node().getBoundingClientRect(),[ee,ue]=Dt(W);q.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*ee*ue*45})`);let Ae=q.node().getBoundingClientRect();q.attr("transform",`
|
|
33
|
+
translate(${n}, ${M-oe.height/2})
|
|
34
34
|
translate(${ee*Ae.width/2}, ${ue*Ae.height/2})
|
|
35
35
|
rotate(${-1*ee*ue*45}, 0, ${oe.height/2})
|
|
36
|
-
`)}}}}}))},"drawEdges"),Bt=t(async function(e,i,s,E){let T=s.getConfigField("padding")*0.75,O=s.getConfigField("fontSize"),x=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(l)=>{let y=We(l);if(y.type==="group"){let{h:c,w:d,x1:f,y1:g}=l.boundingBox(),r=e.append("rect");r.attr("id",`${E}-group-${y.id}`).attr("x",f+x).attr("y",g+x).attr("width",d).attr("height",c).attr("class","node-bkg");let G=e.append("g"),N=f,o=g;if(y.icon){let v=G.append("g");v.html(`<g>${await qt(y.icon,{height:T,width:T,fallbackPrefix:tt.prefix})}</g>`),v.attr("transform","translate("+(N+x+1)+", "+(o+x+1)+")"),N+=T,o+=O/2-1-2}if(y.label){let v=G.append("g");await at(v,y.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},u()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),v.attr("transform","translate("+(N+x+4)+", "+(o+x+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),_t=t(async function(e,i,s,E){let m=u();for(let T of s){let O=i.append("g"),p=e.getConfigField("iconSize");if(T.title){let c=O.append("g");await at(c,T.title,{useHtmlLabels:!1,width:p*1.5,classes:"architecture-service-label"},m),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),c.attr("transform","translate("+p/2+", "+p+")")}let x=O.append("g");if(T.icon)x.html(`<g>${await qt(T.icon,{height:p,width:p,fallbackPrefix:tt.prefix})}</g>`);else if(T.iconText){x.html(`<g>${await qt("blank",{height:p,width:p,fallbackPrefix:tt.prefix})}</g>`);let f=x.append("g").append("foreignObject").attr("width",p).attr("height",p).append("div").attr("class","node-icon-text").attr("style",`height: ${p}px;`).append("div").html(j(T.iconText,m)),g=parseInt(window.getComputedStyle(f.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;f.attr("style",`-webkit-line-clamp: ${Math.floor((p-2)/g)};`)}else x.append("path").attr("class","node-bkg").attr("id",`${E}-node-${T.id}`).attr("d",`M0,${p} V5 Q0,0 5,0 H${p-5} Q${p},0 ${p},5 V${p} Z`);O.attr("id",`${E}-service-${T.id}`).attr("class","architecture-service");let{width:l,height:y}=O.node().getBBox();T.width=l,T.height=y,e.setElementForId(T.id,O)}return 0},"drawServices"),Yt=t(function(e,i,s,E){s.forEach((m)=>{let T=i.append("g"),O=e.getConfigField("iconSize");T.append("g").append("rect").attr("id",`${E}-node-${m.id}`).attr("fill-opacity","0").attr("width",O).attr("height",O),T.attr("class","architecture-junction");let{width:x,height:l}=T._groups[0][0].getBBox();T.width=x,T.height=l,e.setElementForId(m.id,T)})},"drawJunctions");Br([{name:tt.prefix,icons:tt}]);un.use(mt.default);function yt(e,i,s){e.forEach((E)=>{i.add({group:"nodes",data:{type:"service",id:E.id,icon:E.icon,label:E.title,parent:E.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}t(yt,"addServices");function Et(e,i,s){e.forEach((E)=>{i.add({group:"nodes",data:{type:"junction",id:E.id,parent:E.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}t(Et,"addJunctions");function wt(e,i){i.nodes().map((s)=>{let E=We(s);if(E.type==="group")return;E.x=s.position().x,E.y=s.position().y,e.getElementById(E.id).attr("transform","translate("+(E.x||0)+","+(E.y||0)+")")})}t(wt,"positionNodes");function xt(e,i){e.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}t(xt,"addGroups");function Tt(e,i){e.forEach((s)=>{let{lhsId:E,rhsId:m,lhsInto:T,lhsGroup:O,rhsInto:p,lhsDir:x,rhsDir:l,rhsGroup:y,title:c}=s,d=lt(s.lhsDir,s.rhsDir)?"segments":"straight",f={id:`${E}-${m}`,label:c,source:E,sourceDir:x,sourceArrow:T,sourceGroup:O,sourceEndpoint:x==="L"?"0 50%":x==="R"?"100% 50%":x==="T"?"50% 0":"50% 100%",target:m,targetDir:l,targetArrow:p,targetGroup:y,targetEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:f,classes:d})})}t(Tt,"addEdges");function At(e,i,s,E=[]){let m=t((d,f)=>{let g=new Map;for(let[r,G]of d.entries()){let N=`${r}`,o=0,v=[...G.entries()];if(v.length===1){g.set(N,v[0][1]);continue}for(let C=0;C<v.length-1;C++)for(let n=C+1;n<v.length;n++){let[k,Y]=v[C],[b,U]=v[n];if(s.get(gt(k,b))===f)g.set(N,[...g.get(N)??[],...Y,...U]);else if(k==="default"||b==="default")g.set(N,[...g.get(N)??[],...Y,...U]);else{let w=`${N}-${o++}`;g.set(w,Y);let _=`${N}-${o++}`;g.set(_,U)}}}return g},"flattenAlignments"),T=i.map((d)=>{let f=new Map,g=new Map;return d.forEach(([r,G],N)=>{let o=e.getNode(N)?.in??"default",v=f.get(G)??new Map;if(!f.has(G))f.set(G,v);let C=g.get(r)??new Map;if(!g.has(r))g.set(r,C);for(let n of[v,C]){let k=n.get(o)??[];if(!n.has(o))n.set(o,k);k.push(N)}}),{horiz:[...m(f,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[O,p]=T.reduce(([d,f],{horiz:g,vert:r})=>[[...d,...g],[...f,...r]],[[],[]]),x=new Set;E.forEach((d)=>d.members.forEach((f)=>x.add(f)));let l=t((d)=>d.filter((f)=>!f.some((g)=>x.has(g))),"dropOverlapping"),y=l(O),c=l(p);return E.forEach((d)=>{if(d.members.length<2)return;if(d.direction==="row")y.push([...d.members]);else c.push([...d.members])}),{horizontal:y,vertical:c}}t(At,"getAlignments");function Lt(e,i,s=[]){let E=[],m=i.getConfigField("iconSize"),T=i.getConfigField("idealEdgeLengthMultiplier"),O=T*m,p=new Set;s.forEach((y)=>{for(let c=0;c<y.members.length-1;c++){let d=y.members[c],f=y.members[c+1];if(p.add(`${d}|${f}`),p.add(`${f}|${d}`),y.direction==="row")E.push({left:d,right:f,gap:O});else E.push({top:d,bottom:f,gap:O})}});let x=t((y)=>`${y[0]},${y[1]}`,"posToStr"),l=t((y)=>y.split(",").map((c)=>parseInt(c)),"strToPos");return e.forEach((y)=>{let c=new Map([...y.entries()].map(([r,G])=>[x(G),r])),d=[x([0,0])],f={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(d.length>0){let r=d.shift();if(r){f[r]=1;let G=c.get(r);if(G){let N=l(r);Object.entries(g).forEach(([o,v])=>{let C=x([N[0]+v[0],N[1]+v[1]]),n=c.get(C);if(n&&!f[C]){if(d.push(C),p.has(`${G}|${n}`))return;E.push({[dt[o]]:n,[dt[It(o)]]:G,gap:T*m})}})}}}}),E}t(Lt,"getRelativeConstraints");function Ct(e,i,s,E,m,{spatialMaps:T,groupAlignments:O}){return new Promise((p)=>{let x=h("body").append("div").attr("id","cy").attr("style","display:none"),l=un({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}}});x.remove(),xt(s,l),yt(e,l,m),Et(i,l,m),Tt(E,l);let y=m.getLayoutHints(),c=At(m,T,O,y),d=Lt(T,m,y),f=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*f,r=0.5*f,G=m.getConfigField("edgeElasticity"),N=m.getConfigField("seed"),o=l.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(v){let[C,n]=v.connectedNodes(),{parent:k}=We(C),{parent:Y}=We(n);return k===Y?g:r},edgeElasticity(v){let[C,n]=v.connectedNodes(),{parent:k}=We(C),{parent:Y}=We(n);return k===Y?G:0.001},alignmentConstraint:c,relativePlacementConstraint:d});o.one("layoutstop",()=>{function v(C,n,k,Y){let b,U,{x:z,y:w}=C,{x:_,y:q}=n;U=(Y-w+(z-k)*(w-q)/(z-_))/Math.sqrt(1+Math.pow((w-q)/(z-_),2)),b=Math.sqrt(Math.pow(Y-w,2)+Math.pow(k-z,2)-Math.pow(U,2));let W=Math.sqrt(Math.pow(_-z,2)+Math.pow(q-w,2));b=b/W;let oe=(_-z)*(Y-w)-(q-w)*(k-z);switch(!0){case oe>=0:oe=1;break;case oe<0:oe=-1;break}let ee=(_-z)*(k-z)+(q-w)*(Y-w);switch(!0){case ee>=0:ee=1;break;case ee<0:ee=-1;break}return U=Math.abs(U)*oe,b=b*ee,{distances:U,weights:b}}t(v,"getSegmentWeights"),l.startBatch();for(let C of Object.values(l.edges()))if(C.data?.()){let{x:n,y:k}=C.source().position(),{x:Y,y:b}=C.target().position();if(n!==Y&&k!==b){let U=C.sourceEndpoint(),z=C.targetEndpoint(),{sourceDir:w}=ht(C),[_,q]=_e(w)?[U.x,z.y]:[z.x,U.y],{weights:W,distances:oe}=v(U,z,_,q);C.style("segment-distances",oe),C.style("segment-weights",W)}}l.endBatch(),st(N,()=>o.run())});try{st(N,()=>o.run())}catch(v){if(v instanceof RangeError&&v.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 v}l.ready((v)=>{a.info("Ready",v),p(l)})})}t(Ct,"layoutArchitecture");var Ut=t(async(e,i,s,E)=>{let m=E.db;m.setDiagramId(i);let T=m.getServices(),O=m.getJunctions(),p=m.getGroups(),x=m.getEdges(),l=m.getDataStructures(),y=Q(i),c=y.append("g");c.attr("class","architecture-edges");let d=y.append("g");d.attr("class","architecture-services");let f=y.append("g");f.attr("class","architecture-groups"),await _t(m,d,T,i),Yt(m,d,O,i);let g=await Ct(T,O,p,x,m,l);await zt(c,g,m,i),await Bt(f,g,m,i),wt(m,g),sn(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),Ht={draw:Ut},ir={parser:pt,get db(){return new vt},renderer:Ht,styles:Gt};export{ir as diagram};
|
|
36
|
+
`)}}}}}))},"drawEdges"),Bt=t(async function(e,i,s,E){let T=s.getConfigField("padding")*0.75,O=s.getConfigField("fontSize"),x=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(l)=>{let y=We(l);if(y.type==="group"){let{h:c,w:d,x1:f,y1:g}=l.boundingBox(),r=e.append("rect");r.attr("id",`${E}-group-${y.id}`).attr("x",f+x).attr("y",g+x).attr("width",d).attr("height",c).attr("class","node-bkg");let G=e.append("g"),k=f,o=g;if(y.icon){let v=G.append("g");v.html(`<g>${await qt(y.icon,{height:T,width:T,fallbackPrefix:tt.prefix})}</g>`),v.attr("transform","translate("+(k+x+1)+", "+(o+x+1)+")"),k+=T,o+=O/2-1-2}if(y.label){let v=G.append("g");await it(v,y.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},u()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),v.attr("transform","translate("+(k+x+4)+", "+(o+x+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),_t=t(async function(e,i,s,E){let m=u();for(let T of s){let O=i.append("g"),p=e.getConfigField("iconSize");if(T.title){let c=O.append("g");await it(c,T.title,{useHtmlLabels:!1,width:p*1.5,classes:"architecture-service-label"},m),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),c.attr("transform","translate("+p/2+", "+p+")")}let x=O.append("g");if(T.icon)x.html(`<g>${await qt(T.icon,{height:p,width:p,fallbackPrefix:tt.prefix})}</g>`);else if(T.iconText){x.html(`<g>${await qt("blank",{height:p,width:p,fallbackPrefix:tt.prefix})}</g>`);let f=x.append("g").append("foreignObject").attr("width",p).attr("height",p).append("div").attr("class","node-icon-text").attr("style",`height: ${p}px;`).append("div").html(j(T.iconText,m)),g=parseInt(window.getComputedStyle(f.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;f.attr("style",`-webkit-line-clamp: ${Math.floor((p-2)/g)};`)}else x.append("path").attr("class","node-bkg").attr("id",`${E}-node-${T.id}`).attr("d",`M0,${p} V5 Q0,0 5,0 H${p-5} Q${p},0 ${p},5 V${p} Z`);O.attr("id",`${E}-service-${T.id}`).attr("class","architecture-service");let{width:l,height:y}=O.node().getBBox();T.width=l,T.height=y,e.setElementForId(T.id,O)}return 0},"drawServices"),Yt=t(function(e,i,s,E){s.forEach((m)=>{let T=i.append("g"),O=e.getConfigField("iconSize");T.append("g").append("rect").attr("id",`${E}-node-${m.id}`).attr("fill-opacity","0").attr("width",O).attr("height",O),T.attr("class","architecture-junction");let{width:x,height:l}=T._groups[0][0].getBBox();T.width=x,T.height=l,e.setElementForId(m.id,T)})},"drawJunctions");Br([{name:tt.prefix,icons:tt}]);un.use(mt.default);function yt(e,i,s){e.forEach((E)=>{i.add({group:"nodes",data:{type:"service",id:E.id,icon:E.icon,label:E.title,parent:E.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}t(yt,"addServices");function Et(e,i,s){e.forEach((E)=>{i.add({group:"nodes",data:{type:"junction",id:E.id,parent:E.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}t(Et,"addJunctions");function wt(e,i){i.nodes().map((s)=>{let E=We(s);if(E.type==="group")return;E.x=s.position().x,E.y=s.position().y,e.getElementById(E.id).attr("transform","translate("+(E.x||0)+","+(E.y||0)+")")})}t(wt,"positionNodes");function xt(e,i){e.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}t(xt,"addGroups");function Tt(e,i){e.forEach((s)=>{let{lhsId:E,rhsId:m,lhsInto:T,lhsGroup:O,rhsInto:p,lhsDir:x,rhsDir:l,rhsGroup:y,title:c}=s,d=lt(s.lhsDir,s.rhsDir)?"segments":"straight",f={id:`${E}-${m}`,label:c,source:E,sourceDir:x,sourceArrow:T,sourceGroup:O,sourceEndpoint:x==="L"?"0 50%":x==="R"?"100% 50%":x==="T"?"50% 0":"50% 100%",target:m,targetDir:l,targetArrow:p,targetGroup:y,targetEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:f,classes:d})})}t(Tt,"addEdges");function At(e,i,s,E=[]){let m=t((d,f)=>{let g=new Map;for(let[r,G]of d.entries()){let k=`${r}`,o=0,v=[...G.entries()];if(v.length===1){g.set(k,v[0][1]);continue}for(let C=0;C<v.length-1;C++)for(let n=C+1;n<v.length;n++){let[M,Y]=v[C],[b,U]=v[n];if(s.get(gt(M,b))===f)g.set(k,[...g.get(k)??[],...Y,...U]);else if(M==="default"||b==="default")g.set(k,[...g.get(k)??[],...Y,...U]);else{let w=`${k}-${o++}`;g.set(w,Y);let _=`${k}-${o++}`;g.set(_,U)}}}return g},"flattenAlignments"),T=i.map((d)=>{let f=new Map,g=new Map;return d.forEach(([r,G],k)=>{let o=e.getNode(k)?.in??"default",v=f.get(G)??new Map;if(!f.has(G))f.set(G,v);let C=g.get(r)??new Map;if(!g.has(r))g.set(r,C);for(let n of[v,C]){let M=n.get(o)??[];if(!n.has(o))n.set(o,M);M.push(k)}}),{horiz:[...m(f,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[O,p]=T.reduce(([d,f],{horiz:g,vert:r})=>[[...d,...g],[...f,...r]],[[],[]]),x=new Set;E.forEach((d)=>d.members.forEach((f)=>x.add(f)));let l=t((d)=>d.filter((f)=>!f.some((g)=>x.has(g))),"dropOverlapping"),y=l(O),c=l(p);return E.forEach((d)=>{if(d.members.length<2)return;if(d.direction==="row")y.push([...d.members]);else c.push([...d.members])}),{horizontal:y,vertical:c}}t(At,"getAlignments");function Lt(e,i,s=[]){let E=[],m=i.getConfigField("iconSize"),T=i.getConfigField("idealEdgeLengthMultiplier"),O=T*m,p=new Set;s.forEach((y)=>{for(let c=0;c<y.members.length-1;c++){let d=y.members[c],f=y.members[c+1];if(p.add(`${d}|${f}`),p.add(`${f}|${d}`),y.direction==="row")E.push({left:d,right:f,gap:O});else E.push({top:d,bottom:f,gap:O})}});let x=t((y)=>`${y[0]},${y[1]}`,"posToStr"),l=t((y)=>y.split(",").map((c)=>parseInt(c)),"strToPos");return e.forEach((y)=>{let c=new Map([...y.entries()].map(([r,G])=>[x(G),r])),d=[x([0,0])],f={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(d.length>0){let r=d.shift();if(r){f[r]=1;let G=c.get(r);if(G){let k=l(r);Object.entries(g).forEach(([o,v])=>{let C=x([k[0]+v[0],k[1]+v[1]]),n=c.get(C);if(n&&!f[C]){if(d.push(C),p.has(`${G}|${n}`))return;E.push({[dt[o]]:n,[dt[It(o)]]:G,gap:T*m})}})}}}}),E}t(Lt,"getRelativeConstraints");function Ct(e,i,s,E,m,{spatialMaps:T,groupAlignments:O}){return new Promise((p)=>{let x=h("body").append("div").attr("id","cy").attr("style","display:none"),l=un({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}}});x.remove(),xt(s,l),yt(e,l,m),Et(i,l,m),Tt(E,l);let y=m.getLayoutHints(),c=At(m,T,O,y),d=Lt(T,m,y),f=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*f,r=0.5*f,G=m.getConfigField("edgeElasticity"),k=m.getConfigField("seed"),o=l.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(v){let[C,n]=v.connectedNodes(),{parent:M}=We(C),{parent:Y}=We(n);return M===Y?g:r},edgeElasticity(v){let[C,n]=v.connectedNodes(),{parent:M}=We(C),{parent:Y}=We(n);return M===Y?G:0.001},alignmentConstraint:c,relativePlacementConstraint:d});o.one("layoutstop",()=>{function v(C,n,M,Y){let b,U,{x:z,y:w}=C,{x:_,y:q}=n;U=(Y-w+(z-M)*(w-q)/(z-_))/Math.sqrt(1+Math.pow((w-q)/(z-_),2)),b=Math.sqrt(Math.pow(Y-w,2)+Math.pow(M-z,2)-Math.pow(U,2));let W=Math.sqrt(Math.pow(_-z,2)+Math.pow(q-w,2));b=b/W;let oe=(_-z)*(Y-w)-(q-w)*(M-z);switch(!0){case oe>=0:oe=1;break;case oe<0:oe=-1;break}let ee=(_-z)*(M-z)+(q-w)*(Y-w);switch(!0){case ee>=0:ee=1;break;case ee<0:ee=-1;break}return U=Math.abs(U)*oe,b=b*ee,{distances:U,weights:b}}t(v,"getSegmentWeights"),l.startBatch();for(let C of Object.values(l.edges()))if(C.data?.()){let{x:n,y:M}=C.source().position(),{x:Y,y:b}=C.target().position();if(n!==Y&&M!==b){let U=C.sourceEndpoint(),z=C.targetEndpoint(),{sourceDir:w}=ht(C),[_,q]=_e(w)?[U.x,z.y]:[z.x,U.y],{weights:W,distances:oe}=v(U,z,_,q);C.style("segment-distances",oe),C.style("segment-weights",W)}}l.endBatch(),st(k,()=>o.run())});try{st(k,()=>o.run())}catch(v){if(v instanceof RangeError&&v.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 v}l.ready((v)=>{a.info("Ready",v),p(l)})})}t(Ct,"layoutArchitecture");var Ut=t(async(e,i,s,E)=>{let m=E.db;m.setDiagramId(i);let T=m.getServices(),O=m.getJunctions(),p=m.getGroups(),x=m.getEdges(),l=m.getDataStructures(),y=Q(i),c=y.append("g");c.attr("class","architecture-edges");let d=y.append("g");d.attr("class","architecture-services");let f=y.append("g");f.attr("class","architecture-groups"),await _t(m,d,T,i),Yt(m,d,O,i);let g=await Ct(T,O,p,x,m,l);await zt(c,g,m,i),await Bt(f,g,m,i),wt(m,g),sn(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),Ht={draw:Ut},ir={parser:pt,get db(){return new vt},renderer:Ht,styles:Gt};export{ir as diagram};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t,a,G}from"./chunk-
|
|
1
|
+
import{t,a,G}from"./chunk-xp2zpmpp.js";var Le=t((e,i,o,h)=>{e.attr("class",o);let{width:r,height:n,x:w,y:x}=u(e,i);G(e,n,r,h);let c=m(w,x,r,n,i);e.attr("viewBox",c),a.debug(`viewBox configured: ${c} with padding: ${i}`)},"setupViewPortForSVG"),u=t((e,i)=>{let o=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:o.width+i*2,height:o.height+i*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),m=t((e,i,o,h,r)=>`${e-r} ${i-r} ${o} ${h}`,"createViewBox");
|
|
2
2
|
export{Le};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{re}from"./chunk-
|
|
1
|
+
import{re}from"./chunk-4r0dvjrr.js";import{t,a,He,B,S,G,A,R,I,L,D,P,N,Q,X}from"./chunk-xp2zpmpp.js";import{fe}from"./chunk-et1nm6h1.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},C=32,b={axes:[],curves:[],options:h},x=structuredClone(b),z=B.radar,W=t(()=>X({...z,...S().radar}),"getConfig"),M=t(()=>x.axes,"getAxes"),V=t(()=>x.curves,"getCurves"),H=t(()=>x.options,"getOptions"),j=t((n)=>{x.axes=n.map((e)=>({name:e.name,label:e.label??e.name}))},"setAxes"),U=t((n)=>{x.curves=n.map((e)=>({name:e.name,label:e.label??e.name,entries:K(e.entries)}))},"setCurves"),K=t((n)=>{if(n[0].axis==null)return n.map((r)=>r.value);let e=M();if(e.length===0)throw Error("Axes must be populated before curves for reference entries");return e.map((r)=>{let s=n.find((o)=>o.axis?.$refText===r.name);if(s===void 0)throw Error("Missing entry for axis "+r.label);return s.value})},"computeCurveEntries"),Y=t((n)=>{let e=n.reduce((r,s)=>(r[s.name]=s,r),{});if(x.options={showLegend:e.showLegend?.value??h.showLegend,ticks:e.ticks?.value??h.ticks,max:e.max?.value??h.max,min:e.min?.value??h.min,graticule:e.graticule?.value??h.graticule},x.options.ticks>C)a.warn(`Radar diagram ticks (${x.options.ticks}) exceeds maximum allowed (${C}). Using ${C} instead.`),x.options.ticks=C},"setOptions"),Z=t(()=>{A(),x=structuredClone(b)},"clear"),y={getAxes:M,getCurves:V,getOptions:H,setAxes:j,setCurves:U,setOptions:Y,getConfig:W,clear:Z,setAccTitle:R,getAccTitle:I,setDiagramTitle:P,getDiagramTitle:N,getAccDescription:D,setAccDescription:L},q=t((n)=>{re(n,y);let{axes:e,curves:r,options:s}=n;y.setAxes(e),y.setCurves(r),y.setOptions(s)},"populate"),J={parse:t(async(n)=>{let e=await fe("radar",n);a.debug(e),q(e)},"parse")},tt=t((n,e,r,s)=>{let o=s.db,c=o.getAxes(),d=o.getCurves(),i=o.getOptions(),l=o.getConfig(),u=o.getDiagramTitle(),m=Q(e),p=et(m,l),g=i.max??Math.max(...d.map((w)=>Math.max(...w.entries))),v=i.min,f=Math.min(l.width,l.height)/2;at(p,c,f,i.ticks,i.graticule),rt(p,c,f,l),T(p,c,d,v,g,i.graticule,l),_(p,d,i.showLegend,l),p.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),et=t((n,e)=>{let r=e.width+e.marginLeft+e.marginRight,s=e.height+e.marginTop+e.marginBottom,o={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return G(n,s,r,e.useMaxWidth??!0),n.attr("viewBox",`0 0 ${r} ${s}`).attr("overflow","visible"),n.append("g").attr("transform",`translate(${o.x}, ${o.y})`)},"drawFrame"),at=t((n,e,r,s,o)=>{if(o==="circle")for(let c=0;c<s;c++){let d=r*(c+1)/s;n.append("circle").attr("r",d).attr("class","radarGraticule")}else if(o==="polygon"){let c=e.length;for(let d=0;d<s;d++){let i=r*(d+1)/s,l=e.map((u,m)=>{let p=2*m*Math.PI/c-Math.PI/2,g=i*Math.cos(p),v=i*Math.sin(p);return`${g},${v}`}).join(" ");n.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),rt=t((n,e,r,s)=>{let o=e.length;for(let c=0;c<o;c++){let d=e[c].label,i=2*c*Math.PI/o-Math.PI/2,l=Math.cos(i),u=Math.sin(i);n.append("line").attr("x1",0).attr("y1",0).attr("x2",r*s.axisScaleFactor*l).attr("y2",r*s.axisScaleFactor*u).attr("class","radarAxisLine");let m=l>0.01?"start":l<-0.01?"end":"middle",p=u>0.01?"hanging":u<-0.01?"auto":"central",g=4;n.append("text").text(d).attr("x",r*s.axisLabelFactor*l+g*l).attr("y",r*s.axisLabelFactor*u+g*u).attr("text-anchor",m).attr("dominant-baseline",p).attr("class","radarAxisLabel")}},"drawAxes");function T(n,e,r,s,o,c,d){let i=e.length,l=Math.min(d.width,d.height)/2;r.forEach((u,m)=>{if(u.entries.length!==i)return;let p=u.entries.map((g,v)=>{let f=2*Math.PI*v/i-Math.PI/2,w=k(g,s,o,l),E=w*Math.cos(f),F=w*Math.sin(f);return{x:E,y:F}});if(c==="circle")n.append("path").attr("d",O(p,d.curveTension)).attr("class",`radarCurve-${m}`);else if(c==="polygon")n.append("polygon").attr("points",p.map((g)=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}t(T,"drawCurves");function k(n,e,r,s){let o=Math.min(Math.max(n,e),r);return s*(o-e)/(r-e)}t(k,"relativeRadius");function O(n,e){let r=n.length,s=`M${n[0].x},${n[0].y}`;for(let o=0;o<r;o++){let c=n[(o-1+r)%r],d=n[o],i=n[(o+1)%r],l=n[(o+2)%r],u={x:d.x+(i.x-c.x)*e,y:d.y+(i.y-c.y)*e},m={x:i.x-(l.x-d.x)*e,y:i.y-(l.y-d.y)*e};s+=` C${u.x},${u.y} ${m.x},${m.y} ${i.x},${i.y}`}return`${s} Z`}t(O,"closedRoundCurve");function _(n,e,r,s){if(!r)return;let o=(s.width/2+s.marginRight)*3/4,c=-(s.height/2+s.marginTop)*3/4,d=20;e.forEach((i,l)=>{let u=n.append("g").attr("transform",`translate(${o}, ${c+l*d})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(i.label)})}t(_,"drawLegend");var nt={draw:tt},st=t((n,e)=>{let r="";for(let s=0;s<n.THEME_COLOR_LIMIT;s++){let o=n[`cScale${s}`];r+=`
|
|
2
2
|
.radarCurve-${s} {
|
|
3
3
|
color: ${o};
|
|
4
4
|
fill: ${o};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o,r,p,e,n,y,Cn,xt,ge,
|
|
2
|
-
`).length>8,x=t?.retried??0,h=i&&x>0,J=h?`重试中 (${x})`:Ko[f]??f,K=h?"danger":Qo[f]??"neutral",w=[t&&i&&t.lastTool&&`最近 ${t.lastTool}`,t&&Jo(t.elapsedMs),t&&`输入 ${ba(t.usage.input)}`,t&&`输出 ${ba(t.usage.output)}`,t&&t.usage.cacheRead>0&&`缓存 ${ba(t.usage.cacheRead)}`,t&&t.usage.cost>0&&`$${t.usage.cost.toFixed(4)}`].filter((a)=>Boolean(a)),D=h&&t?.lastError?`模型请求异常:${t.lastError}`:void 0,V=Boolean(l||s.state==="waiting"&&!g||D||N),R=s.model||t?.session.model;return e(B,{className:"my-2 animate-fade",header:n(p,{children:[R?e(M,{modelID:R,className:"size-3.5 shrink-0",size:14}):e(
|
|
1
|
+
import{o,r,p,e,n,y,Cn,xt,ge,ot,Ko,Qo,ba,Jo}from"./chunk-2s6fhjjc.js";function te(z){let{Button:I,Panel:B,StatusChip:U,Markdown:A,ModelIcon:M,cn:d,style:Q,useTheme:q}=y();q();let{connection:k,sessionID:b,payload:L,onOpen:O}=z,s=L,[t,F]=r(),[W,S]=r(!1),[N,u]=r(),[T,P]=r(!1),[m,j]=r(!1),[G,_]=r(!1),g=G||s.state==="aborted"||s.state==="cancelled",f=g?"aborted":s.state,i=(s.state==="running"||s.state==="waiting")&&!g;o(()=>{let a,C=!1,E=()=>{k.request(`/api/sessions/${encodeURIComponent(b)}/tasks/${encodeURIComponent(s.childSessionID)}`).then((c)=>{if(!C)F(c),S(!1),u(void 0)}).catch((c)=>{if(!C){if(c instanceof Error&&c.message==="Task is not a direct child"){S(!0),u(void 0);return}u(c instanceof Error?c.message:"任务详情加载失败")}})};if(E(),i)a=setInterval(E,1500);return()=>{if(C=!0,a)clearInterval(a)}},[k,b,s.childSessionID,i]);let H=async()=>{if(T)return;P(!0);try{await k.request(`/api/sessions/${encodeURIComponent(b)}/tasks/${encodeURIComponent(s.childSessionID)}/kill`,{method:"POST"}),_(!0)}catch(a){u(a instanceof Error?a.message:"取消任务失败")}finally{P(!1)}},l=s.summary?.trim()||s.handoff?.conclusion.trim()||"",v=l.length>360||l.split(`
|
|
2
|
+
`).length>8,x=t?.retried??0,h=i&&x>0,J=h?`重试中 (${x})`:Ko[f]??f,K=h?"danger":Qo[f]??"neutral",w=[t&&i&&t.lastTool&&`最近 ${t.lastTool}`,t&&Jo(t.elapsedMs),t&&`输入 ${ba(t.usage.input)}`,t&&`输出 ${ba(t.usage.output)}`,t&&t.usage.cacheRead>0&&`缓存 ${ba(t.usage.cacheRead)}`,t&&t.usage.cost>0&&`$${t.usage.cost.toFixed(4)}`].filter((a)=>Boolean(a)),D=h&&t?.lastError?`模型请求异常:${t.lastError}`:void 0,V=Boolean(l||s.state==="waiting"&&!g||D||N),R=s.model||t?.session.model;return e(B,{className:"my-2 animate-fade",header:n(p,{children:[R?e(M,{modelID:R,className:"size-3.5 shrink-0",size:14}):e(ot,{className:d("size-3.5 shrink-0",i?"text-warning":"text-faint")}),e("h4",{className:"truncate font-medium text-ink",title:s.description,children:s.description}),h&&n("span",{className:"shrink-0 text-xs font-medium text-danger tabular-nums",children:["已失败重试 ",x," 次"]}),w.length>0&&e("span",{className:"min-w-0 truncate text-xs text-faint tabular-nums",title:w.join(" "),children:w.join(" ")})]}),actions:n(p,{children:[e(U,{tone:K,pulse:f==="running",children:J}),i&&e(I,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:T,onClick:()=>{H()},children:"取消"}),!W&&n(I,{size:"sm",variant:"ghost",className:"h-6 gap-1 rounded-md px-2 text-xs text-faint hover:text-ink",onClick:()=>O(s.childSessionID),children:["进入子会话",e(xt,{className:"size-3.5"})]})]}),children:V&&n(p,{children:[D&&n("div",{className:"flex items-center gap-2 border-b border-line bg-danger/10 px-4 py-2 text-xs text-danger",children:[n("span",{className:"font-medium",children:["已自动重试 ",x," 次:"]}),e("span",{className:"truncate",title:t?.lastError,children:t?.lastError})]}),s.state==="waiting"&&!g&&n("div",{className:d("px-4 py-3",l&&"border-b border-line"),children:[n("p",{className:"flex items-center gap-1.5 text-xs font-medium text-warning",children:[e(Cn,{className:"size-3.5"}),"子任务向主代理提问,等待回答"]}),s.pendingQuestions&&s.pendingQuestions.length>0&&e("ul",{className:"mt-1.5 flex flex-col gap-1 text-[13px] leading-relaxed text-ink",children:s.pendingQuestions.map((a)=>e("li",{className:"break-words",children:a.text},a.askedAt))})]}),l&&n("div",{className:"px-4 py-3",children:[n("div",{className:d("relative text-[13.5px] leading-[1.65] break-words text-ink/90 overflow-hidden transition-[max-height] duration-300 ease-out-quint [&_p]:my-1.5 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",v&&!m?"max-h-40":"max-h-[1800px]"),children:[e(A,{text:l}),v&&e("div",{className:d("pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-panel via-panel/70 to-transparent transition-opacity duration-300",m?"opacity-0":"opacity-100")})]}),v&&n("button",{type:"button",className:Q("chat.timelineRow","cursor-pointer select-none"),onClick:()=>j(!m),children:[e("span",{children:m?"收起":"展开全部"}),e(ge,{className:d("size-3.5 transition-transform duration-300 ease-out-quint",m&&"rotate-180")})]})]}),N&&e("p",{role:"status",className:"px-4 py-2.5 text-xs text-danger",children:N})]})})}export{te as TaskCard};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tl,$l,nl,Bl,Fl,rl}from"./chunk-5kavsn22.js";import"./chunk-g30nqfka.js";import"./chunk-cc6hn5xv.js";import"./chunk-xp2zpmpp.js";export{$l as applyDagreLayoutResult,tl as getEdgesToRender,Bl as measureDagreLayout,nl as prepareLayoutForDagre,rl as render,Fl as runDagreLayoutCore};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wa}from"./chunk-et1nm6h1.js";export{wa as createRailroadServices};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v,o,_,i,r,p,e,n,y,Mt}from"./chunk-qjg6dw46.js";var V="__chat__";function S(t){if(!Number.isFinite(t)||t<=0)return"0";if(t<1000)return Math.round(t).toString();if(t<1e6)return`${(t/1000).toFixed(1)}K`;if(t<1e9)return`${(t/1e6).toFixed(2)}M`;return`${(t/1e9).toFixed(2)}B`}function L(t){let u=Number.isFinite(t)?Math.max(0,t):0;return Math.round(u).toLocaleString("en-US")}function R(t){if(!Number.isFinite(t)||t<=0)return"0s";if(t<1000)return"<1s";if(t<60000)return`${Math.floor(t/1000)}s`;if(t<3600000){let c=Math.floor(t/1000),a=Math.floor(c/60),f=c%60;return f>0?`${a}m ${f}s`:`${a}m`}if(t<259200000){let c=Math.floor(t/60000),a=Math.floor(c/60),f=c%60;return f>0?`${a}h ${f}m`:`${a}h`}let u=Math.floor(t/3600000),g=Math.floor(u/24),m=u%24;return m>0?`${g}d ${m}h`:`${g}d`}function ae(t){if(!Number.isFinite(t)||t<=0)return"0s";if(t<1000)return"<1s";if(t<60000)return`${Math.round(t/1000)}s`;if(t<3600000)return`${Math.round(t/60000)}m`;if(t<86400000){let m=t/3600000;return`${m>=10?Math.round(m).toString():m.toFixed(1).replace(/\.0$/,"")}h`}let u=t/86400000;return`${u>=10?Math.round(u).toString():u.toFixed(1).replace(/\.0$/,"")}d`}function B(t,u=1){if(!Number.isFinite(t)||t<=0)return"0%";let g=10**-u/100;if(t<g)return`<${(g*100).toFixed(u)}%`;return`${(t*100).toFixed(u)}%`}function Q(t){if(!Number.isFinite(t)||t<=0)return"0 B";if(t<1024)return`${Math.round(t)} B`;if(t<1048576)return`${(t/1024).toFixed(1)} KB`;if(t<1073741824)return`${(t/1048576).toFixed(2)} MB`;return`${(t/1073741824).toFixed(2)} GB`}function W(t){let u=t.split("-"),g=u[1],m=u[2];if(g!==void 0&&m!==void 0)return`${g}/${m}`;return t}function Z(t){let u=t.split("-"),g=u[0],m=u[1],c=u[2];if(g===void 0||m===void 0||c===void 0)return t;let a=Number(g),f=Number(m)-1,b=Number(c),M=new Date(Date.UTC(a,f,b)),C=["周日","周一","周二","周三","周四","周五","周六"],w=M.getUTCDay(),F=C[w]??"";return`${t} ${F}`}function se(t,u=Date.now()){if(t===null||t===void 0||!Number.isFinite(t)||t<=0)return"从未";let g=Math.max(0,u-t);if(g<60000)return"刚刚";if(g<3600000)return`${Math.max(1,Math.floor(g/60000))} 分钟前`;if(g<86400000)return`${Math.max(1,Math.floor(g/3600000))} 小时前`;if(g<2592000000)return`${Math.max(1,Math.floor(g/86400000))} 天前`;let m=new Date(t),c=m.getFullYear(),a=String(m.getMonth()+1).padStart(2,"0"),f=String(m.getDate()).padStart(2,"0");return`${c}-${a}-${f}`}function K(t){return e("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:e("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${t.percent}%`}})})}function Y(t){return e("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:t.children})}function G(t){return e("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:t.children})}function J(t){return n(G,{children:[n("span",{children:["输入 ",e("span",{className:"text-ink",children:S(t.stat.inputTokens)})]}),n("span",{children:["输出 ",e("span",{className:"text-ink",children:S(t.stat.outputTokens)})]}),n("span",{children:["缓存读 ",e("span",{className:"text-ink",children:S(t.stat.cacheReadTokens)}),t.cacheHitRate!==void 0&&n("span",{className:"text-faint",children:[" (",B(t.cacheHitRate),")"]})]})]})}function oe(t){let{projects:u,selectedProjectID:g,onSelectProject:m}=t,{style:c}=y();if(u.length===0)return e("div",{className:c("surface.empty"),children:"暂无项目统计数据"});return e("div",{className:"divide-y divide-line",children:u.map((a)=>{let f=a.projectID??V,b=g===f,M=Math.max(a.tokenShare>0?1:0,a.tokenShare*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e("span",{className:"font-medium text-sm text-ink truncate",children:a.name}),e("span",{className:c("control.badge","font-mono truncate max-w-[240px]"),title:a.directory||"未绑定项目目录",children:a.directory||"独立会话"}),e("button",{type:"button",onClick:()=>m(b?null:f),className:"rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-accent/10 transition-colors cursor-pointer shrink-0",children:b?"取消筛选":"筛选"})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[e("span",{className:"text-xs font-medium text-ink",title:L(a.totalTokens),children:S(a.totalTokens)}),n("span",{className:"text-[11px] text-faint",children:["(",B(a.tokenShare),")"]})]})]}),e(K,{percent:M}),n(Y,{children:[e(J,{stat:a,cacheHitRate:a.cacheHitRate}),n(G,{children:[n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(a.activeDurationMs)})]}),n("span",{children:[e("span",{className:"text-ink",children:a.sessionCount.toLocaleString()})," 会话"]}),n("span",{children:["工具 ",e("span",{className:"text-ink",children:a.toolCalls.toLocaleString()})," 次"]})]})]})]},f)})})}function re(t){let{models:u}=t,{ModelIcon:g,style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无模型调用数据"});return e("div",{className:"divide-y divide-line",children:u.map((c)=>{let a=Math.max(c.share>0?1:0,c.share*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e(g,{modelID:c.model,className:"size-4 shrink-0"}),e("span",{className:"font-mono text-sm font-medium text-ink truncate",children:c.shortName}),e("span",{className:m("control.badge","font-mono shrink-0"),children:c.provider})]}),n("div",{className:"flex items-baseline gap-2.5 font-mono tabular-nums shrink-0",children:[c.avgTps!==null&&n("span",{className:"text-[11px] text-dim",children:[c.avgTps.toFixed(1)," tok/s"]}),n("span",{className:"text-xs font-medium text-ink",title:L(c.totalTokens),children:[S(c.totalTokens)," ",n("span",{className:"text-[11px] font-normal text-faint",children:["(",B(c.share),")"]})]})]})]}),e(K,{percent:a}),n(Y,{children:[e(J,{stat:c,cacheHitRate:c.cacheHitRate}),n(G,{children:[n("span",{children:[e("span",{className:"text-ink",children:c.turns.toLocaleString()})," 轮",c.errors>0?n("span",{className:"text-danger",children:[" (",c.errors," 错)"]}):null]}),n("span",{children:["工具 ",e("span",{className:"text-ink",children:c.toolCalls.toLocaleString()})," 次"]}),c.generationMs>0&&n("span",{children:["推理 ",e("span",{className:"text-ink",children:ae(c.generationMs)})]})]})]})]},c.model)})})}function ie(t){let{tools:u}=t,{StatusChip:g,style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无工具调用数据"});return e("div",{className:"divide-y divide-line",children:u.map((c)=>{let a=Math.max(c.share>0?1:0,c.share*100),f=c.successRate>=0.95?"success":c.successRate>=0.8?"warning":"danger",b=Math.max(0,c.calls-c.errors),M=c.calls>0?Math.round(c.outputBytes/c.calls):0;return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e("span",{className:"font-mono text-sm font-medium text-ink truncate",children:c.name}),n(g,{tone:f,children:["成功率 ",B(c.successRate)]})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[n("span",{className:"text-xs font-medium text-ink",children:[c.calls.toLocaleString()," 次"]}),n("span",{className:"text-[11px] text-faint",children:["(",B(c.share),")"]})]})]}),e(K,{percent:a}),n(Y,{children:[n(G,{children:[n("span",{children:["成功 ",e("span",{className:"text-ink",children:b.toLocaleString()})," 次"]}),n("span",{children:["失败 ",e("span",{className:c.errors>0?"text-danger":"text-ink",children:c.errors.toLocaleString()})," 次"]})]}),n(G,{children:[n("span",{children:["累计输出 ",e("span",{className:"text-ink",children:Q(c.outputBytes)})]}),n("span",{children:["单次均值 ",e("span",{className:"text-ink",children:Q(M)})]})]})]})]},c.name)})})}function le(t){let{sessions:u,onOpenSession:g}=t,{style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无高消耗会话记录"});let c=Math.max(1,...u.map((a)=>a.totalTokens));return e("div",{className:"divide-y divide-line",children:u.map((a)=>{let f=c>0?Math.max(1,a.totalTokens/c*100):0,b=a.model.split("/").pop()??a.model;return n("button",{type:"button",onClick:()=>g(a.id),className:"group block w-full p-4 text-left space-y-2.5 hover:bg-raised/40 transition-colors cursor-pointer",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e("span",{className:"font-medium text-sm text-ink truncate group-hover:text-accent transition-colors",children:a.title.trim()||"新会话"}),e("span",{className:m("control.badge","font-mono truncate max-w-[140px] shrink-0"),title:a.projectName,children:a.projectName}),a.kind==="sub"&&e("span",{className:"rounded bg-accent/15 px-1.5 py-0.5 text-[10.5px] text-accent shrink-0",children:"子代理"}),a.archivedAt!==null&&e("span",{className:m("control.badge","shrink-0"),children:"已归档"})]}),n("div",{className:"flex items-center gap-1.5 font-mono tabular-nums shrink-0",children:[e("span",{className:"text-xs font-medium text-ink",title:L(a.totalTokens),children:S(a.totalTokens)}),e(Mt,{className:"size-3.5 text-faint group-hover:text-ink group-hover:translate-x-0.5 transition-all"})]})]}),e(K,{percent:f}),n(Y,{children:[e(J,{stat:a}),n(G,{children:[e("span",{className:"text-ink",children:b}),n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(a.activeDurationMs)})]}),n("span",{children:[e("span",{className:"text-ink",children:a.assistantTurns})," 轮"]}),e("span",{className:"text-faint",children:se(a.updated)})]})]})]},a.id)})})}var ce=[{value:"tokens",label:"Token 用量"},{value:"duration",label:"活跃耗时"},{value:"activity",label:"交互轮次"}];function ue(t){let{cn:u,Segmented:g,SettingGroup:m,style:c}=y(),{daily:a}=t,[f,b]=r("tokens"),[M,C]=r(null),w=_(()=>a.some((s)=>s.totalTokens>0||s.activeDurationMs>0||s.runs>0),[a]),F=_(()=>{if(a.length===0)return{totalText:"0",avgText:"0",peakDate:"—",peakValueText:"0"};if(f==="tokens"){let N=a.reduce((P,A)=>P+A.totalTokens,0),j=a.filter((P)=>P.totalTokens>0).length,T=a[0];for(let P of a)if(!T||P.totalTokens>T.totalTokens)T=P;return{totalText:S(N),totalFullText:L(N),avgText:j>0?S(Math.round(N/j)):"0",peakDate:T&&T.totalTokens>0?W(T.date):"—",peakValueText:T&&T.totalTokens>0?S(T.totalTokens):"0"}}if(f==="duration"){let N=a.reduce((P,A)=>P+A.activeDurationMs,0),j=a.filter((P)=>P.activeDurationMs>0).length,T=a[0];for(let P of a)if(!T||P.activeDurationMs>T.activeDurationMs)T=P;return{totalText:R(N),totalFullText:R(N),avgText:j>0?R(Math.round(N/j)):"0s",peakDate:T&&T.activeDurationMs>0?W(T.date):"—",peakValueText:T&&T.activeDurationMs>0?R(T.activeDurationMs):"0s"}}let s=a.reduce((N,j)=>N+j.assistantTurns,0),l=a.reduce((N,j)=>N+j.userMessages,0),x=s+l,k=a.filter((N)=>N.assistantTurns>0||N.userMessages>0).length,h=a[0];for(let N of a){let j=h?h.assistantTurns+h.userMessages:0;if(!h||N.assistantTurns+N.userMessages>j)h=N}let H=h?h.assistantTurns+h.userMessages:0;return{totalText:`${x.toLocaleString()} 轮`,totalFullText:`助手 ${s.toLocaleString()} 轮 · 用户 ${l.toLocaleString()} 问`,avgText:k>0?`${(x/k).toFixed(1)} 轮/天`:"0 轮/天",peakDate:h&&H>0?W(h.date):"—",peakValueText:h&&H>0?`${H.toLocaleString()} 轮`:"0 轮"}},[a,f]),D=_(()=>{if(M){let s=a.find((l)=>l.date===M);if(s)return s}for(let s=a.length-1;s>=0;s--){let l=a[s];if(l&&(l.totalTokens>0||l.activeDurationMs>0||l.runs>0))return l}return a[a.length-1]},[a,M]),z=_(()=>{if(f==="tokens")return Math.max(1,...a.map((s)=>s.totalTokens));if(f==="duration")return Math.max(1000,...a.map((s)=>s.activeDurationMs));return Math.max(1,...a.map((s)=>s.assistantTurns+s.userMessages))},[a,f]),d=_(()=>{if(a.length<=7)return a.map((x)=>x.date);let s=6,l=[];for(let x=0;x<s;x++){let k=Math.round(x*(a.length-1)/(s-1)),h=a[k];if(h)l.push(h.date)}return l},[a]);if(!w)return e(m,{title:"每日趋势",action:e(g,{value:f,onChange:(s)=>b(s),options:ce}),children:e("div",{className:c("surface.empty"),children:"当前时间范围内暂无活跃数据"})});return e(m,{title:"每日趋势",action:e(g,{value:f,onChange:(s)=>b(s),options:ce}),children:n("div",{className:"p-4 space-y-4",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 font-mono text-dim tabular-nums",children:[n("span",{children:["汇总 ",e("span",{className:"text-ink",children:F.totalText})]}),n("span",{children:["日均 ",e("span",{className:"text-ink",children:F.avgText})]}),n("span",{children:["峰值 ",e("span",{className:"text-ink",children:F.peakValueText}),F.peakDate!=="—"?n("span",{className:"text-faint",children:[" (",F.peakDate,")"]}):null]})]}),n("div",{className:"flex items-center gap-3 text-[11px] text-dim",children:[f==="tokens"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent/40"}),"缓存读"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"输入"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"输出"]})]}),f==="duration"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"工作调度"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"模型推理"]})]}),f==="activity"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"助手回复"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"用户提问"]})]})]})]}),n("div",{className:"relative h-44 w-full pt-1",children:[n("div",{className:"absolute inset-0 flex flex-col justify-between pointer-events-none pb-5 text-[10px] text-faint/60",children:[e("div",{className:"border-b border-line/40 w-full"}),e("div",{className:"border-b border-line/30 w-full"}),e("div",{className:"border-b border-line/40 w-full"})]}),n("section",{"aria-label":"每日趋势柱状序列",className:"relative h-full flex flex-col justify-between",onMouseLeave:()=>C(null),children:[e("div",{className:"flex-1 flex items-end gap-1 sm:gap-1.5 pb-2",children:a.map((s)=>{let l=s.totalTokens;if(f==="duration")l=s.activeDurationMs;else if(f==="activity")l=s.assistantTurns+s.userMessages;let x=l<=0,k=x?0:Math.max(3,Math.min(100,l/z*100)),h=D?.date===s.date;return n("button",{type:"button","aria-label":`${s.date} 统计数据`,className:"flex-1 h-full flex flex-col justify-end items-center group cursor-pointer relative min-w-0 bg-transparent p-0 border-0 focus:outline-hidden",onMouseEnter:()=>C(s.date),onFocus:()=>C(s.date),onClick:()=>C(s.date),children:[e("div",{className:u("absolute inset-y-0 w-full rounded-xs transition-colors pointer-events-none",h?"bg-accent/10":"group-hover:bg-raised/60")}),x?e("div",{className:"h-1 w-full max-w-[24px] rounded-full bg-raised group-hover:bg-dim/30"}):n("div",{className:"w-full max-w-[24px] rounded-t-xs overflow-hidden flex flex-col justify-end transition-all duration-150",style:{height:`${k}%`},children:[f==="tokens"&&n(p,{children:[s.outputTokens>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${s.outputTokens/s.totalTokens*100}%`}}),s.inputTokens+s.cacheWriteTokens>0&&e("div",{className:"bg-accent transition-all duration-200",style:{height:`${(s.inputTokens+s.cacheWriteTokens)/s.totalTokens*100}%`}}),s.cacheReadTokens>0&&e("div",{className:"bg-accent/40 transition-all duration-200",style:{height:`${s.cacheReadTokens/s.totalTokens*100}%`}})]}),f==="duration"&&n(p,{children:[s.generationMs>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${Math.min(100,s.generationMs/Math.max(1,s.activeDurationMs)*100)}%`}}),e("div",{className:"bg-accent flex-1 transition-all duration-200"})]}),f==="activity"&&n(p,{children:[s.userMessages>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${s.userMessages/Math.max(1,s.assistantTurns+s.userMessages)*100}%`}}),e("div",{className:"bg-accent flex-1 transition-all duration-200"})]})]}),h&&e("div",{className:"absolute -bottom-1 size-1 rounded-full bg-accent"})]},s.date)})}),e("div",{className:u("flex items-center pt-1.5 text-[10px] text-faint font-mono tabular-nums",a.length<=7?"gap-1 sm:gap-1.5":"justify-between"),children:d.map((s)=>e("div",{className:u("whitespace-nowrap",a.length<=7&&"flex-1 text-center"),children:W(s)},s))})]})]}),e("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line pt-3 font-mono text-xs tabular-nums",children:D?n(p,{children:[e("span",{className:"text-ink",children:Z(D.date)}),n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 text-dim",children:[n("span",{children:["Token ",e("span",{className:"text-ink",children:S(D.totalTokens)})]}),n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(D.activeDurationMs)})]}),n("span",{children:["交互 ",n("span",{className:"text-ink",children:[D.assistantTurns+D.userMessages," 轮"]})]}),n("span",{children:["工具 ",n("span",{className:"text-ink",children:[D.toolCalls," 次"]})]})]})]}):e("span",{className:"font-sans text-faint",children:"悬停柱状图查看单日明细"})})]})})}function pe(t){let{cn:u,SettingGroup:g}=y(),{daily:m,hourly:c}=t,[a,f]=r(null),b=_(()=>{let l=new Map;for(let k of c)l.set(k.hour,k);let x=[];for(let k=0;k<24;k++){let h=l.get(k);if(h)x.push(h);else x.push({hour:k,totalTokens:0,activeDurationMs:0,userMessages:0,assistantTurns:0,runs:0})}return x},[c]),M=_(()=>{let l=b[0];for(let x of b)if(!l||x.totalTokens>l.totalTokens)l=x;return l&&l.totalTokens>0?l:null},[b]),C=_(()=>b.reduce((l,x)=>l+x.totalTokens,0),[b]),w=_(()=>Math.max(1,...b.map((l)=>l.totalTokens)),[b]),F=_(()=>{if(C<=0)return 0;return b.filter((x)=>x.hour>=8&&x.hour<20).reduce((x,k)=>x+k.totalTokens,0)/C},[b,C]),D=_(()=>Math.max(1,...m.map((l)=>l.totalTokens)),[m]),z=_(()=>{let l=0,x=0;for(let k of m)if(k.totalTokens>0||k.activeDurationMs>0||k.runs>0){if(x++,x>l)l=x}else x=0;return l},[m]),d=_(()=>m.filter((l)=>l.totalTokens>0||l.activeDurationMs>0||l.runs>0).length,[m]),s=a!==null?b[a]:M;return n(g,{title:"活跃时段与热力",action:n("div",{className:"flex items-center gap-3 font-mono text-xs text-faint tabular-nums",children:[n("span",{children:["日间占比 ",B(F)]}),n("span",{children:["连续活跃 ",z," 天"]}),n("span",{children:["活跃 ",d,"/",m.length," 天"]})]}),children:[n("div",{className:"p-4 space-y-3",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[e("span",{className:"text-dim",children:"24 小时分布"}),s?n("div",{className:"flex items-center gap-3 font-mono text-dim tabular-nums",children:[n("span",{className:"text-ink",children:[a!==null?"时段 ":"高峰 ",String(s.hour).padStart(2,"0"),":00 -"," ",String((s.hour+1)%24).padStart(2,"0"),":00"]}),e("span",{className:"text-ink",children:S(s.totalTokens)}),s.activeDurationMs>0&&e("span",{children:R(s.activeDurationMs)})]}):e("span",{className:"text-faint",children:"暂无时段分布"})]}),n("section",{"aria-label":"24 小时活跃分布序列",className:"h-28 w-full flex flex-col justify-between pt-1",onMouseLeave:()=>f(null),children:[e("div",{className:"flex-1 flex items-end gap-1.5 pb-1.5",children:b.map((l)=>{let x=M?.hour===l.hour,k=a===l.hour,h=l.totalTokens>0?Math.max(6,l.totalTokens/w*100):0,H=`${String(l.hour).padStart(2,"0")}:00 - ${String((l.hour+1)%24).padStart(2,"0")}:00
|
|
1
|
+
import{v,o,_,i,r,p,e,n,y,Nt}from"./chunk-2s6fhjjc.js";var V="__chat__";function S(t){if(!Number.isFinite(t)||t<=0)return"0";if(t<1000)return Math.round(t).toString();if(t<1e6)return`${(t/1000).toFixed(1)}K`;if(t<1e9)return`${(t/1e6).toFixed(2)}M`;return`${(t/1e9).toFixed(2)}B`}function L(t){let u=Number.isFinite(t)?Math.max(0,t):0;return Math.round(u).toLocaleString("en-US")}function R(t){if(!Number.isFinite(t)||t<=0)return"0s";if(t<1000)return"<1s";if(t<60000)return`${Math.floor(t/1000)}s`;if(t<3600000){let c=Math.floor(t/1000),a=Math.floor(c/60),f=c%60;return f>0?`${a}m ${f}s`:`${a}m`}if(t<259200000){let c=Math.floor(t/60000),a=Math.floor(c/60),f=c%60;return f>0?`${a}h ${f}m`:`${a}h`}let u=Math.floor(t/3600000),g=Math.floor(u/24),m=u%24;return m>0?`${g}d ${m}h`:`${g}d`}function ae(t){if(!Number.isFinite(t)||t<=0)return"0s";if(t<1000)return"<1s";if(t<60000)return`${Math.round(t/1000)}s`;if(t<3600000)return`${Math.round(t/60000)}m`;if(t<86400000){let m=t/3600000;return`${m>=10?Math.round(m).toString():m.toFixed(1).replace(/\.0$/,"")}h`}let u=t/86400000;return`${u>=10?Math.round(u).toString():u.toFixed(1).replace(/\.0$/,"")}d`}function B(t,u=1){if(!Number.isFinite(t)||t<=0)return"0%";let g=10**-u/100;if(t<g)return`<${(g*100).toFixed(u)}%`;return`${(t*100).toFixed(u)}%`}function Q(t){if(!Number.isFinite(t)||t<=0)return"0 B";if(t<1024)return`${Math.round(t)} B`;if(t<1048576)return`${(t/1024).toFixed(1)} KB`;if(t<1073741824)return`${(t/1048576).toFixed(2)} MB`;return`${(t/1073741824).toFixed(2)} GB`}function W(t){let u=t.split("-"),g=u[1],m=u[2];if(g!==void 0&&m!==void 0)return`${g}/${m}`;return t}function Z(t){let u=t.split("-"),g=u[0],m=u[1],c=u[2];if(g===void 0||m===void 0||c===void 0)return t;let a=Number(g),f=Number(m)-1,b=Number(c),M=new Date(Date.UTC(a,f,b)),C=["周日","周一","周二","周三","周四","周五","周六"],w=M.getUTCDay(),F=C[w]??"";return`${t} ${F}`}function se(t,u=Date.now()){if(t===null||t===void 0||!Number.isFinite(t)||t<=0)return"从未";let g=Math.max(0,u-t);if(g<60000)return"刚刚";if(g<3600000)return`${Math.max(1,Math.floor(g/60000))} 分钟前`;if(g<86400000)return`${Math.max(1,Math.floor(g/3600000))} 小时前`;if(g<2592000000)return`${Math.max(1,Math.floor(g/86400000))} 天前`;let m=new Date(t),c=m.getFullYear(),a=String(m.getMonth()+1).padStart(2,"0"),f=String(m.getDate()).padStart(2,"0");return`${c}-${a}-${f}`}function K(t){return e("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:e("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${t.percent}%`}})})}function Y(t){return e("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:t.children})}function G(t){return e("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:t.children})}function J(t){return n(G,{children:[n("span",{children:["输入 ",e("span",{className:"text-ink",children:S(t.stat.inputTokens)})]}),n("span",{children:["输出 ",e("span",{className:"text-ink",children:S(t.stat.outputTokens)})]}),n("span",{children:["缓存读 ",e("span",{className:"text-ink",children:S(t.stat.cacheReadTokens)}),t.cacheHitRate!==void 0&&n("span",{className:"text-faint",children:[" (",B(t.cacheHitRate),")"]})]})]})}function oe(t){let{projects:u,selectedProjectID:g,onSelectProject:m}=t,{style:c}=y();if(u.length===0)return e("div",{className:c("surface.empty"),children:"暂无项目统计数据"});return e("div",{className:"divide-y divide-line",children:u.map((a)=>{let f=a.projectID??V,b=g===f,M=Math.max(a.tokenShare>0?1:0,a.tokenShare*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e("span",{className:"font-medium text-sm text-ink truncate",children:a.name}),e("span",{className:c("control.badge","font-mono truncate max-w-[240px]"),title:a.directory||"未绑定项目目录",children:a.directory||"独立会话"}),e("button",{type:"button",onClick:()=>m(b?null:f),className:"rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-accent/10 transition-colors cursor-pointer shrink-0",children:b?"取消筛选":"筛选"})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[e("span",{className:"text-xs font-medium text-ink",title:L(a.totalTokens),children:S(a.totalTokens)}),n("span",{className:"text-[11px] text-faint",children:["(",B(a.tokenShare),")"]})]})]}),e(K,{percent:M}),n(Y,{children:[e(J,{stat:a,cacheHitRate:a.cacheHitRate}),n(G,{children:[n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(a.activeDurationMs)})]}),n("span",{children:[e("span",{className:"text-ink",children:a.sessionCount.toLocaleString()})," 会话"]}),n("span",{children:["工具 ",e("span",{className:"text-ink",children:a.toolCalls.toLocaleString()})," 次"]})]})]})]},f)})})}function re(t){let{models:u}=t,{ModelIcon:g,style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无模型调用数据"});return e("div",{className:"divide-y divide-line",children:u.map((c)=>{let a=Math.max(c.share>0?1:0,c.share*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e(g,{modelID:c.model,className:"size-4 shrink-0"}),e("span",{className:"font-mono text-sm font-medium text-ink truncate",children:c.shortName}),e("span",{className:m("control.badge","font-mono shrink-0"),children:c.provider})]}),n("div",{className:"flex items-baseline gap-2.5 font-mono tabular-nums shrink-0",children:[c.avgTps!==null&&n("span",{className:"text-[11px] text-dim",children:[c.avgTps.toFixed(1)," tok/s"]}),n("span",{className:"text-xs font-medium text-ink",title:L(c.totalTokens),children:[S(c.totalTokens)," ",n("span",{className:"text-[11px] font-normal text-faint",children:["(",B(c.share),")"]})]})]})]}),e(K,{percent:a}),n(Y,{children:[e(J,{stat:c,cacheHitRate:c.cacheHitRate}),n(G,{children:[n("span",{children:[e("span",{className:"text-ink",children:c.turns.toLocaleString()})," 轮",c.errors>0?n("span",{className:"text-danger",children:[" (",c.errors," 错)"]}):null]}),n("span",{children:["工具 ",e("span",{className:"text-ink",children:c.toolCalls.toLocaleString()})," 次"]}),c.generationMs>0&&n("span",{children:["推理 ",e("span",{className:"text-ink",children:ae(c.generationMs)})]})]})]})]},c.model)})})}function ie(t){let{tools:u}=t,{StatusChip:g,style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无工具调用数据"});return e("div",{className:"divide-y divide-line",children:u.map((c)=>{let a=Math.max(c.share>0?1:0,c.share*100),f=c.successRate>=0.95?"success":c.successRate>=0.8?"warning":"danger",b=Math.max(0,c.calls-c.errors),M=c.calls>0?Math.round(c.outputBytes/c.calls):0;return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e("span",{className:"font-mono text-sm font-medium text-ink truncate",children:c.name}),n(g,{tone:f,children:["成功率 ",B(c.successRate)]})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[n("span",{className:"text-xs font-medium text-ink",children:[c.calls.toLocaleString()," 次"]}),n("span",{className:"text-[11px] text-faint",children:["(",B(c.share),")"]})]})]}),e(K,{percent:a}),n(Y,{children:[n(G,{children:[n("span",{children:["成功 ",e("span",{className:"text-ink",children:b.toLocaleString()})," 次"]}),n("span",{children:["失败 ",e("span",{className:c.errors>0?"text-danger":"text-ink",children:c.errors.toLocaleString()})," 次"]})]}),n(G,{children:[n("span",{children:["累计输出 ",e("span",{className:"text-ink",children:Q(c.outputBytes)})]}),n("span",{children:["单次均值 ",e("span",{className:"text-ink",children:Q(M)})]})]})]})]},c.name)})})}function le(t){let{sessions:u,onOpenSession:g}=t,{style:m}=y();if(u.length===0)return e("div",{className:m("surface.empty"),children:"暂无高消耗会话记录"});let c=Math.max(1,...u.map((a)=>a.totalTokens));return e("div",{className:"divide-y divide-line",children:u.map((a)=>{let f=c>0?Math.max(1,a.totalTokens/c*100):0,b=a.model.split("/").pop()??a.model;return n("button",{type:"button",onClick:()=>g(a.id),className:"group block w-full p-4 text-left space-y-2.5 hover:bg-raised/40 transition-colors cursor-pointer",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e("span",{className:"font-medium text-sm text-ink truncate group-hover:text-accent transition-colors",children:a.title.trim()||"新会话"}),e("span",{className:m("control.badge","font-mono truncate max-w-[140px] shrink-0"),title:a.projectName,children:a.projectName}),a.kind==="sub"&&e("span",{className:"rounded bg-accent/15 px-1.5 py-0.5 text-[10.5px] text-accent shrink-0",children:"子代理"}),a.archivedAt!==null&&e("span",{className:m("control.badge","shrink-0"),children:"已归档"})]}),n("div",{className:"flex items-center gap-1.5 font-mono tabular-nums shrink-0",children:[e("span",{className:"text-xs font-medium text-ink",title:L(a.totalTokens),children:S(a.totalTokens)}),e(Nt,{className:"size-3.5 text-faint group-hover:text-ink group-hover:translate-x-0.5 transition-all"})]})]}),e(K,{percent:f}),n(Y,{children:[e(J,{stat:a}),n(G,{children:[e("span",{className:"text-ink",children:b}),n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(a.activeDurationMs)})]}),n("span",{children:[e("span",{className:"text-ink",children:a.assistantTurns})," 轮"]}),e("span",{className:"text-faint",children:se(a.updated)})]})]})]},a.id)})})}var ce=[{value:"tokens",label:"Token 用量"},{value:"duration",label:"活跃耗时"},{value:"activity",label:"交互轮次"}];function ue(t){let{cn:u,Segmented:g,SettingGroup:m,style:c}=y(),{daily:a}=t,[f,b]=r("tokens"),[M,C]=r(null),w=_(()=>a.some((s)=>s.totalTokens>0||s.activeDurationMs>0||s.runs>0),[a]),F=_(()=>{if(a.length===0)return{totalText:"0",avgText:"0",peakDate:"—",peakValueText:"0"};if(f==="tokens"){let N=a.reduce((P,A)=>P+A.totalTokens,0),j=a.filter((P)=>P.totalTokens>0).length,T=a[0];for(let P of a)if(!T||P.totalTokens>T.totalTokens)T=P;return{totalText:S(N),totalFullText:L(N),avgText:j>0?S(Math.round(N/j)):"0",peakDate:T&&T.totalTokens>0?W(T.date):"—",peakValueText:T&&T.totalTokens>0?S(T.totalTokens):"0"}}if(f==="duration"){let N=a.reduce((P,A)=>P+A.activeDurationMs,0),j=a.filter((P)=>P.activeDurationMs>0).length,T=a[0];for(let P of a)if(!T||P.activeDurationMs>T.activeDurationMs)T=P;return{totalText:R(N),totalFullText:R(N),avgText:j>0?R(Math.round(N/j)):"0s",peakDate:T&&T.activeDurationMs>0?W(T.date):"—",peakValueText:T&&T.activeDurationMs>0?R(T.activeDurationMs):"0s"}}let s=a.reduce((N,j)=>N+j.assistantTurns,0),l=a.reduce((N,j)=>N+j.userMessages,0),x=s+l,k=a.filter((N)=>N.assistantTurns>0||N.userMessages>0).length,h=a[0];for(let N of a){let j=h?h.assistantTurns+h.userMessages:0;if(!h||N.assistantTurns+N.userMessages>j)h=N}let H=h?h.assistantTurns+h.userMessages:0;return{totalText:`${x.toLocaleString()} 轮`,totalFullText:`助手 ${s.toLocaleString()} 轮 · 用户 ${l.toLocaleString()} 问`,avgText:k>0?`${(x/k).toFixed(1)} 轮/天`:"0 轮/天",peakDate:h&&H>0?W(h.date):"—",peakValueText:h&&H>0?`${H.toLocaleString()} 轮`:"0 轮"}},[a,f]),D=_(()=>{if(M){let s=a.find((l)=>l.date===M);if(s)return s}for(let s=a.length-1;s>=0;s--){let l=a[s];if(l&&(l.totalTokens>0||l.activeDurationMs>0||l.runs>0))return l}return a[a.length-1]},[a,M]),z=_(()=>{if(f==="tokens")return Math.max(1,...a.map((s)=>s.totalTokens));if(f==="duration")return Math.max(1000,...a.map((s)=>s.activeDurationMs));return Math.max(1,...a.map((s)=>s.assistantTurns+s.userMessages))},[a,f]),d=_(()=>{if(a.length<=7)return a.map((x)=>x.date);let s=6,l=[];for(let x=0;x<s;x++){let k=Math.round(x*(a.length-1)/(s-1)),h=a[k];if(h)l.push(h.date)}return l},[a]);if(!w)return e(m,{title:"每日趋势",action:e(g,{value:f,onChange:(s)=>b(s),options:ce}),children:e("div",{className:c("surface.empty"),children:"当前时间范围内暂无活跃数据"})});return e(m,{title:"每日趋势",action:e(g,{value:f,onChange:(s)=>b(s),options:ce}),children:n("div",{className:"p-4 space-y-4",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 font-mono text-dim tabular-nums",children:[n("span",{children:["汇总 ",e("span",{className:"text-ink",children:F.totalText})]}),n("span",{children:["日均 ",e("span",{className:"text-ink",children:F.avgText})]}),n("span",{children:["峰值 ",e("span",{className:"text-ink",children:F.peakValueText}),F.peakDate!=="—"?n("span",{className:"text-faint",children:[" (",F.peakDate,")"]}):null]})]}),n("div",{className:"flex items-center gap-3 text-[11px] text-dim",children:[f==="tokens"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent/40"}),"缓存读"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"输入"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"输出"]})]}),f==="duration"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"工作调度"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"模型推理"]})]}),f==="activity"&&n(p,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"助手回复"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-success"}),"用户提问"]})]})]})]}),n("div",{className:"relative h-44 w-full pt-1",children:[n("div",{className:"absolute inset-0 flex flex-col justify-between pointer-events-none pb-5 text-[10px] text-faint/60",children:[e("div",{className:"border-b border-line/40 w-full"}),e("div",{className:"border-b border-line/30 w-full"}),e("div",{className:"border-b border-line/40 w-full"})]}),n("section",{"aria-label":"每日趋势柱状序列",className:"relative h-full flex flex-col justify-between",onMouseLeave:()=>C(null),children:[e("div",{className:"flex-1 flex items-end gap-1 sm:gap-1.5 pb-2",children:a.map((s)=>{let l=s.totalTokens;if(f==="duration")l=s.activeDurationMs;else if(f==="activity")l=s.assistantTurns+s.userMessages;let x=l<=0,k=x?0:Math.max(3,Math.min(100,l/z*100)),h=D?.date===s.date;return n("button",{type:"button","aria-label":`${s.date} 统计数据`,className:"flex-1 h-full flex flex-col justify-end items-center group cursor-pointer relative min-w-0 bg-transparent p-0 border-0 focus:outline-hidden",onMouseEnter:()=>C(s.date),onFocus:()=>C(s.date),onClick:()=>C(s.date),children:[e("div",{className:u("absolute inset-y-0 w-full rounded-xs transition-colors pointer-events-none",h?"bg-accent/10":"group-hover:bg-raised/60")}),x?e("div",{className:"h-1 w-full max-w-[24px] rounded-full bg-raised group-hover:bg-dim/30"}):n("div",{className:"w-full max-w-[24px] rounded-t-xs overflow-hidden flex flex-col justify-end transition-all duration-150",style:{height:`${k}%`},children:[f==="tokens"&&n(p,{children:[s.outputTokens>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${s.outputTokens/s.totalTokens*100}%`}}),s.inputTokens+s.cacheWriteTokens>0&&e("div",{className:"bg-accent transition-all duration-200",style:{height:`${(s.inputTokens+s.cacheWriteTokens)/s.totalTokens*100}%`}}),s.cacheReadTokens>0&&e("div",{className:"bg-accent/40 transition-all duration-200",style:{height:`${s.cacheReadTokens/s.totalTokens*100}%`}})]}),f==="duration"&&n(p,{children:[s.generationMs>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${Math.min(100,s.generationMs/Math.max(1,s.activeDurationMs)*100)}%`}}),e("div",{className:"bg-accent flex-1 transition-all duration-200"})]}),f==="activity"&&n(p,{children:[s.userMessages>0&&e("div",{className:"bg-success transition-all duration-200",style:{height:`${s.userMessages/Math.max(1,s.assistantTurns+s.userMessages)*100}%`}}),e("div",{className:"bg-accent flex-1 transition-all duration-200"})]})]}),h&&e("div",{className:"absolute -bottom-1 size-1 rounded-full bg-accent"})]},s.date)})}),e("div",{className:u("flex items-center pt-1.5 text-[10px] text-faint font-mono tabular-nums",a.length<=7?"gap-1 sm:gap-1.5":"justify-between"),children:d.map((s)=>e("div",{className:u("whitespace-nowrap",a.length<=7&&"flex-1 text-center"),children:W(s)},s))})]})]}),e("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line pt-3 font-mono text-xs tabular-nums",children:D?n(p,{children:[e("span",{className:"text-ink",children:Z(D.date)}),n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 text-dim",children:[n("span",{children:["Token ",e("span",{className:"text-ink",children:S(D.totalTokens)})]}),n("span",{children:["耗时 ",e("span",{className:"text-ink",children:R(D.activeDurationMs)})]}),n("span",{children:["交互 ",n("span",{className:"text-ink",children:[D.assistantTurns+D.userMessages," 轮"]})]}),n("span",{children:["工具 ",n("span",{className:"text-ink",children:[D.toolCalls," 次"]})]})]})]}):e("span",{className:"font-sans text-faint",children:"悬停柱状图查看单日明细"})})]})})}function pe(t){let{cn:u,SettingGroup:g}=y(),{daily:m,hourly:c}=t,[a,f]=r(null),b=_(()=>{let l=new Map;for(let k of c)l.set(k.hour,k);let x=[];for(let k=0;k<24;k++){let h=l.get(k);if(h)x.push(h);else x.push({hour:k,totalTokens:0,activeDurationMs:0,userMessages:0,assistantTurns:0,runs:0})}return x},[c]),M=_(()=>{let l=b[0];for(let x of b)if(!l||x.totalTokens>l.totalTokens)l=x;return l&&l.totalTokens>0?l:null},[b]),C=_(()=>b.reduce((l,x)=>l+x.totalTokens,0),[b]),w=_(()=>Math.max(1,...b.map((l)=>l.totalTokens)),[b]),F=_(()=>{if(C<=0)return 0;return b.filter((x)=>x.hour>=8&&x.hour<20).reduce((x,k)=>x+k.totalTokens,0)/C},[b,C]),D=_(()=>Math.max(1,...m.map((l)=>l.totalTokens)),[m]),z=_(()=>{let l=0,x=0;for(let k of m)if(k.totalTokens>0||k.activeDurationMs>0||k.runs>0){if(x++,x>l)l=x}else x=0;return l},[m]),d=_(()=>m.filter((l)=>l.totalTokens>0||l.activeDurationMs>0||l.runs>0).length,[m]),s=a!==null?b[a]:M;return n(g,{title:"活跃时段与热力",action:n("div",{className:"flex items-center gap-3 font-mono text-xs text-faint tabular-nums",children:[n("span",{children:["日间占比 ",B(F)]}),n("span",{children:["连续活跃 ",z," 天"]}),n("span",{children:["活跃 ",d,"/",m.length," 天"]})]}),children:[n("div",{className:"p-4 space-y-3",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[e("span",{className:"text-dim",children:"24 小时分布"}),s?n("div",{className:"flex items-center gap-3 font-mono text-dim tabular-nums",children:[n("span",{className:"text-ink",children:[a!==null?"时段 ":"高峰 ",String(s.hour).padStart(2,"0"),":00 -"," ",String((s.hour+1)%24).padStart(2,"0"),":00"]}),e("span",{className:"text-ink",children:S(s.totalTokens)}),s.activeDurationMs>0&&e("span",{children:R(s.activeDurationMs)})]}):e("span",{className:"text-faint",children:"暂无时段分布"})]}),n("section",{"aria-label":"24 小时活跃分布序列",className:"h-28 w-full flex flex-col justify-between pt-1",onMouseLeave:()=>f(null),children:[e("div",{className:"flex-1 flex items-end gap-1.5 pb-1.5",children:b.map((l)=>{let x=M?.hour===l.hour,k=a===l.hour,h=l.totalTokens>0?Math.max(6,l.totalTokens/w*100):0,H=`${String(l.hour).padStart(2,"0")}:00 - ${String((l.hour+1)%24).padStart(2,"0")}:00
|
|
2
2
|
消耗: ${L(l.totalTokens)} Token
|
|
3
3
|
耗时: ${R(l.activeDurationMs)}
|
|
4
4
|
助手轮次: ${l.assistantTurns} 轮`;return e("button",{type:"button","aria-label":`${String(l.hour).padStart(2,"0")}:00 时段统计`,className:"flex-1 h-full flex flex-col justify-end items-center group relative cursor-pointer bg-transparent p-0 border-0 focus:outline-hidden",title:H,onMouseEnter:()=>f(l.hour),onFocus:()=>f(l.hour),onClick:()=>f(l.hour),children:h>0?e("div",{className:u("w-full max-w-[20px] rounded-t-xs transition-all duration-200",x||k?"bg-accent":"bg-accent/55 group-hover:bg-accent"),style:{height:`${h}%`}}):e("div",{className:"h-1 w-full max-w-[20px] rounded-full bg-raised group-hover:bg-dim/30"})},l.hour)})}),n("div",{className:"flex justify-between items-center text-[10px] text-faint font-mono pt-1.5 border-t border-line/40",children:[e("span",{children:"00:00"}),e("span",{children:"04:00"}),e("span",{children:"08:00"}),e("span",{children:"12:00"}),e("span",{children:"16:00"}),e("span",{children:"20:00"}),e("span",{children:"23:00"})]})]})]}),n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"text-xs text-dim",children:["自然日热力 (",m.length," 天)"]}),e("div",{className:"flex flex-wrap items-center gap-1.5",children:m.map((l)=>{let x="bg-raised";if(l.totalTokens>0){let h=l.totalTokens/D;if(h<=0.33)x="bg-accent/30";else if(h<=0.66)x="bg-accent/60";else x="bg-accent"}let k=`${Z(l.date)}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{xs}from"./chunk-et1nm6h1.js";export{xs as createWardleyServices};
|
|
Binary file
|
|
Binary file
|