@kabmo-labs/kabmo 0.60.0 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -49
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +1157 -825
- package/dist/client/static/js/{Body-p82s28sj.js → Body-z6kstvk6.js} +3 -3
- package/dist/client/static/js/{CsvGrid-erc5mcvc.js → CsvGrid-f73c0s4e.js} +2 -2
- package/dist/client/static/js/{DocxView-x3faj0jv.js → DocxView-a1pb7nsb.js} +3 -3
- package/dist/client/static/js/{DrawioView-t7fh3ens.js → DrawioView-r61gcg24.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-zy7x7jmm.js → HtmlPreview-vt7j0b05.js} +1 -1
- package/dist/client/static/js/ImageView-4nhr5dtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-vwhy0vhj.js +2 -0
- package/dist/client/static/js/MergeDiffView-f4h9ss71.js +1 -0
- package/dist/client/static/js/Modal-cadmjkak.js +60 -0
- package/dist/client/static/js/{PdfView-kqx472q7.js → PdfView-mppt2gkd.js} +1 -1
- package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
- package/dist/client/static/js/{SheetView-0n9fze50.js → SheetView-5s9zfx9g.js} +9 -9
- package/dist/client/static/js/{SvgPreview-6xc6ts46.js → SvgPreview-ff78xn3e.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2xdkkqwg.js → abnfDiagram-O67JEVCF-p29sh3w2.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-83w3kytq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-ja8cx19z.js → architectureDiagram-NJMV4G6O-nbpdyea3.js} +3 -3
- package/dist/client/static/js/{astro-yphdvdty.js → astro-qtfmc8x7.js} +1 -1
- package/dist/client/static/js/bash-wcy12qjx.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-ytf7s99c.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
- package/dist/client/static/js/c-vvantfth.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-5a0kdx0z.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-hd98dvjw.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-man3fqcj.js → cose-bilkent-JH36ORCC-k54mmydp.js} +1 -1
- package/dist/client/static/js/cpp-5x63r6g0.js +1 -0
- package/dist/client/static/js/css-j2j6f03w.js +1 -0
- package/dist/client/static/js/css-qk59j6rj.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-80z02zrj.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-2f0kbbv2.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-k7pyhgzn.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-qx0afa2m.js → diagram-22UHCM2B-197hemfa.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-ydpe77sv.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-e63v984n.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-8c765h3a.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-3pq0n7v8.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-638atzxz.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
- package/dist/client/static/js/{dockerfile-yehc914q.js → dockerfile-4nked309.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3gv43zvm.js → ebnfDiagram-ZINNZB2B-hvnkevqy.js} +1 -1
- package/dist/client/static/js/{elixir-3nwnd9yw.js → elixir-3jvh6v4k.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-6s5pggfc.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-x7cqyb89.js → erDiagram-OPXOYQCR-ww453xcy.js} +5 -5
- package/dist/client/static/js/{erlang-p5c4n3t0.js → erlang-4fz73a1q.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-y9pq2709.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-e6v7513q.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-g97te4v1.js → ganttDiagram-FUAMR5RP-abc5wy70.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-fzaf9azs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-sw4f94tc.js → gitGraphDiagram-X574FWY7-4acqzj2h.js} +7 -7
- package/dist/client/static/js/graphql-hpkvdvk7.js +1 -0
- package/dist/client/static/js/html-x12gb1wk.js +1 -0
- package/dist/client/static/js/{index-v88m5sva.js → index-0g82ph6h.js} +2 -2
- package/dist/client/static/js/{index-vejz38qt.js → index-0w1jzang.js} +5 -5
- package/dist/client/static/js/{index-bpcg34jp.js → index-1svt0cdw.js} +2 -2
- package/dist/client/static/js/{index-hgfyx8dt.js → index-1tb4py5v.js} +2 -2
- package/dist/client/static/js/index-2gt9krtj.js +4 -0
- package/dist/client/static/js/index-2x9m7s1a.js +1 -0
- package/dist/client/static/js/index-3fvqmz3m.js +4 -0
- package/dist/client/static/js/{index-pdz6j2g2.js → index-42wvbkm5.js} +2 -2
- package/dist/client/static/js/index-477vtt51.js +2 -0
- package/dist/client/static/js/{index-ca6tmamh.js → index-4px56qaz.js} +2 -2
- package/dist/client/static/js/{index-excgtjhx.js → index-5anvw7xg.js} +36 -36
- package/dist/client/static/js/index-5nb9k2ph.js +1 -0
- package/dist/client/static/js/{index-97sw4d9n.js → index-615je3km.js} +2 -2
- package/dist/client/static/js/{index-111bq6rs.js → index-66qxrh5n.js} +1 -1
- package/dist/client/static/js/{index-a145x0w2.js → index-7kct1sz1.js} +2 -2
- package/dist/client/static/js/{index-hwv7bfxc.js → index-8e0d8y30.js} +2 -2
- package/dist/client/static/js/{index-s4j2ghmx.js → index-90bq56xw.js} +2 -2
- package/dist/client/static/js/{index-wsy6y5em.js → index-b1gzh60t.js} +11 -11
- package/dist/client/static/js/{index-10vzyga1.js → index-bypkmjrz.js} +2 -2
- package/dist/client/static/js/{index-n8r7r86r.js → index-c1vd63yd.js} +2 -2
- package/dist/client/static/js/index-c9f0hejv.js +3 -0
- package/dist/client/static/js/{index-2dmew334.js → index-cgqj15g0.js} +2 -2
- package/dist/client/static/js/{index-mtav0rpf.js → index-cts5re1t.js} +2 -2
- package/dist/client/static/js/index-dxc14kmm.js +1 -0
- package/dist/client/static/js/{index-hwdkxe4n.js → index-dxyjxhm1.js} +2 -2
- package/dist/client/static/js/{index-43gmn7yb.js → index-edpyqz9f.js} +1 -1
- package/dist/client/static/js/{index-pdgc9ccr.js → index-eesepb70.js} +2 -2
- package/dist/client/static/js/{index-vec7m1yd.js → index-evh437bz.js} +2 -2
- package/dist/client/static/js/index-ey6v4t5b.js +1 -0
- package/dist/client/static/js/{index-025s3fp8.js → index-fsd7n336.js} +2 -2
- package/dist/client/static/js/{index-yfcy4cf6.js → index-h7a7fqag.js} +2 -2
- package/dist/client/static/js/{index-11qn05g9.js → index-hffgwnvz.js} +2 -2
- package/dist/client/static/js/index-j734ev6q.js +482 -0
- package/dist/client/static/js/{index-vcq6zfxx.js → index-jcbp1d9d.js} +6 -6
- package/dist/client/static/js/index-jg5h18sm.js +2 -0
- package/dist/client/static/js/{index-6qn9kygb.js → index-jtdve6xw.js} +7 -7
- package/dist/client/static/js/{index-4xbc0j7t.js → index-k0bqrb1y.js} +1 -1
- package/dist/client/static/js/{index-bdtftrym.js → index-kegevd10.js} +2 -2
- package/dist/client/static/js/{index-fr6wsqk8.js → index-kqcfxkch.js} +2 -2
- package/dist/client/static/js/{index-2n2evsg0.js → index-kv1xnem9.js} +2 -2
- package/dist/client/static/js/{index-8zct30zd.js → index-m54ctmxr.js} +1 -1
- package/dist/client/static/js/index-mgzbypt5.js +314 -0
- package/dist/client/static/js/{index-cf69bhjx.js → index-mh52531j.js} +2 -2
- package/dist/client/static/js/{index-0ze5bwvw.js → index-mhz5ywa4.js} +5 -5
- package/dist/client/static/js/{index-3j2he86h.js → index-nnwdbg3t.js} +2 -2
- package/dist/client/static/js/{index-9rz6kzsv.js → index-nxd6z7f9.js} +2 -2
- package/dist/client/static/js/{index-jfqd838j.js → index-pjrbt77c.js} +2 -2
- package/dist/client/static/js/index-r7h4pm42.js +2 -0
- package/dist/client/static/js/index-ratrdgc9.js +2 -0
- package/dist/client/static/js/{index-cfvc1zpk.js → index-rhmvh9w5.js} +2 -2
- package/dist/client/static/js/{index-twwsn91p.js → index-sqzjwy9h.js} +2 -2
- package/dist/client/static/js/{index-37apvxgj.js → index-tckzkw0f.js} +2 -2
- package/dist/client/static/js/index-tza9h3q6.css +1 -0
- package/dist/client/static/js/{index-qccydkze.js → index-vhjfr093.js} +2 -2
- package/dist/client/static/js/{index-z8k42dwz.js → index-w0j96eyy.js} +8 -8
- package/dist/client/static/js/{index-qkqkygrf.js → index-ws04kxy9.js} +1 -1
- package/dist/client/static/js/{index-a3bpmw2r.js → index-x1yqmzpr.js} +2 -2
- package/dist/client/static/js/{index-fb2fjndj.js → index-x2f7wykb.js} +6 -6
- package/dist/client/static/js/index-y8405hdg.js +10 -0
- package/dist/client/static/js/{index-sx83ans2.js → index-yxk7dgnb.js} +2 -2
- package/dist/client/static/js/{index-bkn6jtn1.js → index-zavecxak.js} +2 -2
- package/dist/client/static/js/{index-dv01prse.js → index-zg7q3kcb.js} +2 -2
- package/dist/client/static/js/{index-enm77k5z.js → index-zhn9vv3z.js} +2 -2
- package/dist/client/static/js/{index-ywp0sd1e.js → index-zy963qbh.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-pw2qaa27.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
- package/dist/client/static/js/ini-522adp5a.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-d13jhvxy.js → ishikawaDiagram-OU5B5YK6-38arfrx5.js} +2 -2
- package/dist/client/static/js/java-z0rgs7v6.js +1 -0
- package/dist/client/static/js/javascript-fv87f565.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-20gb8a04.js → journeyDiagram-ZHPQQLJL-kcwzjgtz.js} +4 -4
- package/dist/client/static/js/json-1czq1ped.js +1 -0
- package/dist/client/static/js/jsx-1fch2jyr.js +1 -0
- package/dist/client/static/js/{julia-rpd1y9vh.js → julia-pzzxbptm.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-s78e158c.js → kanban-definition-PNTS6WVX-nmegwy9w.js} +15 -15
- package/dist/client/static/js/lua-nn8bpjev.js +1 -0
- package/dist/client/static/js/markdown-38tqrgkn.js +1 -0
- package/dist/client/static/js/{mermaid.core-xbm27k28.js → mermaid.core-3aae27b9.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-6y7xe2zm.js → mindmap-definition-NLK3R4M7-zsaq4e65.js} +12 -12
- package/dist/client/static/js/one-dark-pro-trnff03z.js +1 -0
- package/dist/client/static/js/one-light-ck31ptqs.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-rwac7scq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-dmvewetf.js → pegDiagram-GJSIUBJH-2b6whj1p.js} +1 -1
- package/dist/client/static/js/{perl-kmtz9dnv.js → perl-zdkbbjd2.js} +1 -1
- package/dist/client/static/js/{php-bttrsbxy.js → php-ktaxff6g.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-gjz20apz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-1q9e7rcm.js → pieDiagram-5QR66LMP-y09ar7vz.js} +3 -3
- package/dist/client/static/js/properties-kncqeqhn.js +1 -0
- package/dist/client/static/js/python-gx8ggmyh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-mvrem3n6.js → quadrantDiagram-O4NWA36T-mapfzs06.js} +3 -3
- package/dist/client/static/js/r-x8rftkm3.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-akwdknab.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-m5v4rfhx.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-k2gmqcjb.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zdsfjf4.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-e98evqb6.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-axttcfhw.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-5qx7erta.js → requirementDiagram-PLB6GJNP-2vb2gp3e.js} +3 -3
- package/dist/client/static/js/{ruby-dve3y59w.js → ruby-ytqv3pqz.js} +1 -1
- package/dist/client/static/js/{rust-b3ckax3e.js → rust-6sddyxnt.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-es87a3j6.js → sankeyDiagram-IPEJSGJF-9jd8ebrn.js} +3 -3
- package/dist/client/static/js/{sass-emxqt5p2.js → sass-dvbra5b6.js} +1 -1
- package/dist/client/static/js/{scss-4j4t3r6y.js → scss-sy7w8916.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-dgpnjrtk.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-kyw0p86n.js → sizeCapture-INFHLROL-q8w7ehgx.js} +1 -1
- package/dist/client/static/js/sql-99y0qnag.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vnsbw8y9.js → stateDiagram-v2-GCMORJYK-4978hapr.js} +3 -3
- package/dist/client/static/js/{svelte-dbsx1ehx.js → svelte-xvs3fkza.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-060q1rep.js → swimlanes-2SLR337P-eshg5fjy.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-914e28hd.js +8 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-5h5q357k.js +120 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-fkm3a7gx.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-hm4ktxjf.js +1 -0
- package/dist/client/static/js/tsx-phngprp0.js +1 -0
- package/dist/client/static/js/typescript-m62a7zr2.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-18sp73v7.js → usecaseDiagram-POWQR4AR-4j69y3zx.js} +20 -20
- package/dist/client/static/js/vennDiagram-UO4OBE2U-pa9p5jpw.js +34 -0
- package/dist/client/static/js/{vue-hyr58df9.js → vue-p4g4avm3.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-3y2rvdmy.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-q0kwmbzh.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
- package/dist/client/static/js/xml-59n0cjn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-y0gpmg6m.js → xychartDiagram-PMCCYNJV-8ng5m849.js} +4 -4
- package/dist/client/static/js/yaml-9fw908s4.js +1 -0
- package/dist/client/tailwindcss-oxide.linux-x64-gnu-c0fa36dv.node +0 -0
- package/dist/client/tailwindcss-oxide.linux-x64-musl-kr04sh0e.node +0 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.tsx +2 -5
- package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +35 -52
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +6 -5
- package/marketplace/plugins/command-runner/src/panel/Header.tsx +18 -54
- package/marketplace/plugins/command-runner/src/panel/Output.tsx +3 -7
- package/marketplace/plugins/command-runner/src/panel/Row.tsx +19 -38
- package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/app.tsx +2 -0
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +8 -15
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +35 -66
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +7 -13
- package/marketplace/plugins/git-forge/src/panel/List.tsx +28 -56
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +7 -9
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +21 -31
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +26 -40
- package/marketplace/plugins/git-forge/src/panel/index.tsx +0 -1
- package/marketplace/plugins/github-actions/package.json +2 -2
- package/marketplace/plugins/github-actions/src/app.tsx +2 -0
- package/marketplace/plugins/github-actions/src/panel/Actions.tsx +9 -17
- package/marketplace/plugins/github-actions/src/panel/LogView.tsx +4 -13
- package/marketplace/plugins/github-actions/src/panel/Row.tsx +4 -5
- package/marketplace/plugins/github-actions/src/panel/RunView.tsx +8 -15
- package/marketplace/plugins/github-actions/src/panel/index.test.tsx +3 -2
- package/marketplace/plugins/github-actions/src/panel/index.tsx +31 -37
- package/marketplace/plugins/kanban/package.json +2 -2
- package/marketplace/plugins/kanban/src/app.tsx +2 -0
- package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +88 -98
- package/marketplace/plugins/kanban/src/panel/CardTile.tsx +6 -10
- package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +22 -18
- package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +59 -70
- package/marketplace/plugins/kanban/src/panel/index.tsx +37 -52
- package/marketplace/plugins/kanban/src/panel/use-board.ts +2 -0
- package/marketplace/plugins/session-info/package.json +2 -2
- package/marketplace/plugins/session-info/src/app.tsx +6 -3
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/KillConfirm.test.tsx +6 -4
- package/marketplace/plugins/stats/src/KillConfirm.tsx +26 -76
- package/marketplace/plugins/stats/src/ProcessTable.tsx +8 -6
- package/marketplace/plugins/stats/src/RefreshButton.tsx +7 -5
- package/marketplace/plugins/stats/src/app.tsx +11 -9
- package/package.json +10 -10
- package/src/cli/lib/commands/plugin.js +8 -5
- package/src/client/bootstrap.d.ts +5 -0
- package/src/client/chat-title-overlay.test.ts +53 -0
- package/src/client/components/auth/login-screen/index.tsx +31 -3
- package/src/client/components/common/SignOutButton.tsx +4 -5
- package/src/client/components/common/account-badge/index.tsx +31 -0
- package/src/client/components/common/footer-version/index.tsx +40 -0
- package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +24 -0
- package/src/client/components/common/fullscreen-viewer/index.tsx +22 -31
- package/src/client/components/common/header-controls/MoreMenu.tsx +5 -56
- package/src/client/components/common/header-controls/index.test.tsx +2 -6
- package/src/client/components/common/header-controls/index.tsx +9 -25
- package/src/client/components/common/header-controls/phone-row.test.tsx +3 -16
- package/src/client/components/common/shell-update-button/index.tsx +2 -2
- package/src/client/components/common/zoom-pan-stage/index.tsx +54 -50
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -5
- package/src/client/components/layout/desktop-layout/index.tsx +2 -4
- package/src/client/components/layout/left-bar/index.tsx +25 -3
- package/src/client/components/layout/rail-toggle.test.tsx +112 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.accent.test.tsx +81 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +11 -3
- package/src/client/components/layout/session-sidebar/Footer.test.tsx +36 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +42 -61
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +5 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +30 -10
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +4 -0
- package/src/client/components/layout/session-sidebar/modern/index.tsx +8 -1
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +25 -4
- package/src/client/components/layout/session-title-bar/index.tsx +13 -5
- package/src/client/components/layout/top-bars.test.tsx +4 -2
- package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
- package/src/client/components/mobile/RightSidebar.tsx +12 -3
- package/src/client/components/mobile/SessionSidebar.tsx +6 -2
- package/src/client/components/mobile/drawer-layout.test.tsx +7 -3
- package/src/client/components/mobile/drawer-strip.tsx +9 -2
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +29 -9
- package/src/client/components/mobile/mobile-main-view/Header.tsx +43 -12
- package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +12 -1
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +1 -0
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +9 -1
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +4 -2
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +48 -46
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +18 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +4 -6
- package/src/client/components/mobile/right-drawer-nav.test.tsx +53 -1
- package/src/client/components/settings/Band.tsx +5 -2
- package/src/client/components/settings/Modal.tsx +8 -5
- package/src/client/components/settings/Sidebar.tsx +5 -3
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AccountSettings.tsx +266 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +2 -0
- package/src/client/components/settings/categories/account-settings/Dialogs.tsx +223 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +3 -4
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +66 -39
- package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +7 -4
- package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +14 -1
- package/src/client/components/settings/categories/project-settings/ProjectSharing.tsx +130 -0
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +5 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +34 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +4 -1
- package/src/client/components/workspace/editor/Tab.tsx +19 -26
- package/src/client/components/workspace/editor/Tabs.test.ts +13 -7
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -0
- package/src/client/components/workspace/git-panel/commit-modal/floating.test.ts +46 -0
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -0
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +4 -5
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +40 -37
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -49
- package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +9 -9
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +14 -1
- package/src/client/components/workspace/panel-tabs/index.tsx +1 -1
- package/src/client/components/workspace/plugin-panel/catalog.tsx +22 -5
- package/src/client/components/workspace/plugin-panel/chrome.test.tsx +89 -0
- package/src/client/components/workspace/plugin-panel/chrome.tsx +62 -0
- package/src/client/data/settings/omp-schema.json +40 -4
- package/src/client/floating-phone.test.ts +189 -0
- package/src/client/floating.css +205 -2
- package/src/client/floating.test.ts +43 -0
- package/src/client/glass.css +47 -0
- package/src/client/hooks/chat/omp/index.ts +6 -5
- package/src/client/hooks/chat/omp/prompt-send.test.ts +18 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +26 -8
- package/src/client/hooks/chat/omp/session-list.tsx +20 -8
- package/src/client/hooks/chat/timeline/deferred-model.ts +13 -5
- package/src/client/hooks/chat/timeline/index.ts +2 -0
- package/src/client/hooks/chat/timeline/send-props.ts +14 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send-switch.test.ts +92 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +37 -7
- package/src/client/hooks/chat/timeline/send.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send.ts +62 -42
- package/src/client/hooks/editor/image-generation.ts +24 -0
- package/src/client/hooks/editor/resolve-viewer.test.ts +26 -20
- package/src/client/hooks/editor/resolve-viewer.ts +14 -5
- package/src/client/hooks/editor/use-file-editor.test.ts +34 -0
- package/src/client/hooks/editor/use-file-editor.ts +6 -2
- package/src/client/hooks/settings/accounts.ts +162 -0
- package/src/client/hooks/ui/auth.ts +58 -3
- package/src/client/hooks/ui/border-style.test.ts +5 -4
- package/src/client/hooks/ui/border-style.ts +3 -2
- package/src/client/hooks/ui/mobile-chrome-style.ts +68 -0
- package/src/client/hooks/ui/navbar-controls.test.ts +1 -2
- package/src/client/hooks/ui/navbar-controls.ts +0 -3
- package/src/client/hooks/ui/zoom-gesture.ts +104 -0
- package/src/client/lib/desktop/titlebar.test.ts +21 -0
- package/src/client/lib/desktop/titlebar.ts +34 -0
- package/src/client/lib/plugins/bootstrap.test.ts +20 -0
- package/src/client/lib/plugins/bootstrap.tsx +10 -15
- package/src/client/lib/plugins/kit-components.test.tsx +119 -0
- package/src/client/lib/plugins/kit-components.tsx +79 -0
- package/src/client/lib/plugins/kit.ts +8 -0
- package/src/client/lib/plugins/slots.test.ts +34 -0
- package/src/client/lib/plugins/slots.ts +31 -4
- package/src/client/lib/plugins/stylesheets.ts +10 -11
- package/src/client/lib/ui/pinch.test.ts +74 -0
- package/src/client/lib/ui/pinch.ts +104 -0
- package/src/client/lib/ui/safe-area.test.ts +25 -0
- package/src/client/lib/ui/safe-area.ts +23 -0
- package/src/client/main.tsx +8 -1
- package/src/client/tailwind.css +54 -1
- package/src/server/index.ts +2 -0
- package/src/server/lib/assets/shell-attributes.server.ts +12 -4
- package/src/server/lib/assets/shell-attributes.test.ts +19 -18
- package/src/server/lib/auth/client-address.test.ts +2 -2
- package/src/server/lib/auth/guard.test.ts +2 -2
- package/src/server/lib/auth/guard.ts +81 -97
- package/src/server/lib/auth/handover-guard.test.ts +1 -1
- package/src/server/lib/auth/rate-limit.test.ts +2 -2
- package/src/server/lib/auth/token.test.ts +1 -1
- package/src/server/lib/auth/workspace-gate.server.ts +34 -0
- package/src/server/lib/bundler/css.test.ts +16 -0
- package/src/server/lib/connect/devices.server.test.ts +12 -0
- package/src/server/lib/connect/devices.server.ts +63 -19
- package/src/server/lib/connect/pairing.server.ts +5 -3
- package/src/server/lib/connect/status.server.ts +2 -2
- package/src/server/lib/db/schema.test.ts +3 -3
- package/src/server/lib/db/schema.ts +6 -0
- package/src/server/lib/harness/update-spawn.server.test.ts +97 -0
- package/src/server/lib/harness/update-spawn.server.ts +10 -0
- package/src/server/lib/models/provider-icon-override.server.test.ts +140 -0
- package/src/server/lib/models/provider-icon-override.server.ts +197 -0
- package/src/server/lib/models/provider-icon-store.server.ts +8 -0
- package/src/server/lib/models/provider-icon.server.ts +31 -6
- package/src/server/lib/omp/session/artifacts.server.test.ts +11 -7
- package/src/server/lib/omp/session/artifacts.server.ts +21 -17
- package/src/server/lib/panels/build.server.ts +19 -2
- package/src/server/lib/panels/css.server.test.ts +141 -0
- package/src/server/lib/panels/css.server.ts +255 -0
- package/src/server/lib/panels/plugin-ui-contract.test.ts +64 -0
- package/src/server/lib/panels/registry-stylesheet.server.test.ts +69 -0
- package/src/server/lib/panels/scan.server.ts +13 -7
- package/src/server/lib/panels/source-warnings.server.test.ts +65 -0
- package/src/server/lib/panels/source-warnings.server.ts +71 -0
- package/src/server/lib/realtime/topics/catalog.server.ts +3 -0
- package/src/server/lib/realtime/topics.server.ts +14 -0
- package/src/server/lib/sessions/last-opened-client.server.ts +1 -1
- package/src/server/lib/workspace/access.server.ts +108 -0
- package/src/server/lib/workspace/project-patch.server.ts +4 -2
- package/src/server/lib/workspace/register-folder.server.ts +19 -5
- package/src/server/lib/workspace/session-access.server.ts +55 -0
- package/src/server/lib/workspace/tenancy-schema.server.ts +40 -0
- package/src/server/plugins/ssr.ts +19 -3
- package/src/server/routes/accounts/index.ts +8 -0
- package/src/server/routes/accounts/management.test.ts +174 -0
- package/src/server/routes/accounts/management.ts +166 -0
- package/src/server/routes/auth/login.ts +22 -8
- package/src/server/routes/auth/logout.ts +1 -1
- package/src/server/routes/auth/password.ts +40 -33
- package/src/server/routes/auth/revoke.test.ts +1 -1
- package/src/server/routes/auth/revoke.ts +26 -8
- package/src/server/routes/auth/routes.test.ts +3 -3
- package/src/server/routes/auth/state.ts +14 -7
- package/src/server/routes/connect/devices.ts +7 -4
- package/src/server/routes/connect/pair.ts +4 -3
- package/src/server/routes/connect/status.ts +4 -2
- package/src/server/routes/connect/tunnels.ts +2 -1
- package/src/server/routes/folders/batch-delete.ts +12 -0
- package/src/server/routes/folders/clone.ts +7 -2
- package/src/server/routes/folders/create.ts +3 -1
- package/src/server/routes/folders/folder.ts +44 -4
- package/src/server/routes/folders/index.ts +3 -0
- package/src/server/routes/folders/shares.ts +62 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/panels/build.ts +1 -1
- package/src/server/routes/panels/css.test.ts +22 -0
- package/src/server/routes/panels/css.ts +5 -7
- package/src/server/routes/realtime/ws.ts +16 -1
- package/src/server/routes/sessions/list.ts +3 -2
- package/src/server/routes/settings/projects.ts +46 -7
- package/src/server/routes/settings/provider-icon.ts +18 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +2 -2
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +6 -3
- package/src/shared/lib/icons/tint-hues.generated.ts +38 -37
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +27 -1
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +1 -1
- package/src/shared/lib/realtime/protocol.ts +16 -0
- package/src/shared/lib/settings/defaults.ts +2 -1
- package/src/shared/lib/settings/sections.ts +1 -1
- package/src/shared/lib/theme/border-style.test.ts +11 -9
- package/src/shared/lib/theme/border-style.ts +7 -7
- package/src/shared/lib/theme/chrome-style.test.ts +15 -0
- package/src/shared/lib/theme/chrome-style.ts +16 -1
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +6 -5
- package/src/test-support/file-editor.test-util.ts +25 -6
- package/tsconfig.json +21 -0
- package/dist/client/static/js/ImageView-xc90jc1c.js +0 -1
- package/dist/client/static/js/LayoutWrapper-wyqe98kf.js +0 -2
- package/dist/client/static/js/MergeDiffView-bng34cpr.js +0 -1
- package/dist/client/static/js/Modal-89jk7wff.js +0 -60
- package/dist/client/static/js/SessionsView-6bpz1faj.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +0 -1
- package/dist/client/static/js/bash-bcbct9gc.js +0 -1
- package/dist/client/static/js/c-fn9jz26e.js +0 -1
- package/dist/client/static/js/cpp-a1q64mke.js +0 -1
- package/dist/client/static/js/css-b92azee8.js +0 -1
- package/dist/client/static/js/css-sn00sq6v.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7sn6nwjv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +0 -1
- package/dist/client/static/js/graphql-8d8bn59j.js +0 -1
- package/dist/client/static/js/html-6hdrwtz2.js +0 -1
- package/dist/client/static/js/index-4h2zkrk1.js +0 -2
- package/dist/client/static/js/index-5nm8hm4k.js +0 -2
- package/dist/client/static/js/index-95jfphx5.js +0 -481
- package/dist/client/static/js/index-9pw441wc.js +0 -4
- package/dist/client/static/js/index-bjz54ht6.js +0 -1
- package/dist/client/static/js/index-bqapt2e8.js +0 -2
- package/dist/client/static/js/index-ddkjgv5h.js +0 -2
- package/dist/client/static/js/index-dekvtt2a.js +0 -314
- package/dist/client/static/js/index-fnwaxc6r.js +0 -1
- package/dist/client/static/js/index-h65zrhva.js +0 -1
- package/dist/client/static/js/index-hxsqw7sz.js +0 -4
- package/dist/client/static/js/index-hxy1sadd.js +0 -2
- package/dist/client/static/js/index-ja0ajnvq.js +0 -10
- package/dist/client/static/js/index-qkyy563e.js +0 -1
- package/dist/client/static/js/index-t6nqy2n5.css +0 -1
- package/dist/client/static/js/index-wrk99kks.js +0 -3
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +0 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +0 -1
- package/dist/client/static/js/java-n596am4c.js +0 -1
- package/dist/client/static/js/javascript-zc1qnyyp.js +0 -1
- package/dist/client/static/js/json-7k70qbkj.js +0 -1
- package/dist/client/static/js/jsx-sndenqrc.js +0 -1
- package/dist/client/static/js/lua-djd3g9q5.js +0 -1
- package/dist/client/static/js/markdown-r2tpvxpn.js +0 -1
- package/dist/client/static/js/one-dark-pro-7bgqnyhm.js +0 -1
- package/dist/client/static/js/one-light-47y6etng.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +0 -1
- package/dist/client/static/js/properties-brn72zdk.js +0 -1
- package/dist/client/static/js/python-g9mghwgm.js +0 -1
- package/dist/client/static/js/r-e247x4mw.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +0 -1
- package/dist/client/static/js/sql-0kar81jy.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y77g9dq0.js +0 -8
- package/dist/client/static/js/timeline-definition-EJHVYXUP-8a3yqmx0.js +0 -120
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +0 -1
- package/dist/client/static/js/tsx-gjxfjnbk.js +0 -1
- package/dist/client/static/js/typescript-bm89v3gk.js +0 -1
- package/dist/client/static/js/vennDiagram-UO4OBE2U-gf4y1r3s.js +0 -34
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +0 -1
- package/dist/client/static/js/xml-b7824nx0.js +0 -1
- package/dist/client/static/js/yaml-kqqktdv1.js +0 -1
- package/src/server/lib/auth/client-address.ts +0 -89
- package/src/server/lib/auth/config.ts +0 -133
- package/src/server/lib/auth/rate-limit.ts +0 -146
- package/src/server/lib/auth/token.ts +0 -220
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Fg}from"./index-excgtjhx.js";export{Fg as createRadarServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{nc}from"./index-excgtjhx.js";export{nc as createRailroadServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ac}from"./index-excgtjhx.js";export{ac as createRailroadAbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{rc}from"./index-excgtjhx.js";export{rc as createRailroadEbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{oc}from"./index-excgtjhx.js";export{oc as createRailroadPegServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Da}from"./index-025s3fp8.js";export{Da as default};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{t}from"./index-dekvtt2a.js";import"./index-bpcg34jp.js";import{Kg,Vg}from"./index-z8k42dwz.js";var o=t((r)=>`${Kg(r)}
|
|
2
|
-
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
-
stroke: ${r.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,"getStyles"),m=o,D=Vg({styles:m});export{D as diagram};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import{t,Qo,l,De,g,A,C,oa,dm,F,m,b,ia,Ae,Hn,mt,or}from"./index-dekvtt2a.js";var lt=function(){var r=t(function(w,a,u,h){for(u=u||{},h=w.length;h--;u[w[h]]=a);return u},"o"),e=[6,11,13,14,15,17,19,20,23,24],s=[1,12],i=[1,13],n=[1,14],d=[1,15],c=[1,16],o=[1,19],x=[1,20],y={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:t(function(a,u,h,f,v,p,T){var S=p.length-1;switch(v){case 1:return p[S-1];case 3:f.setDirection("LR");break;case 4:f.setDirection("TD");break;case 5:this.$=[];break;case 6:p[S-1].push(p[S]),this.$=p[S-1];break;case 7:case 8:this.$=p[S];break;case 9:case 10:this.$=[];break;case 11:f.getCommonDb().setDiagramTitle(p[S].substr(6)),this.$=p[S].substr(6);break;case 12:this.$=p[S].trim(),f.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=p[S].trim(),f.getCommonDb().setAccDescription(this.$);break;case 15:f.addSection(p[S].substr(8)),this.$=p[S].substr(8);break;case 18:f.addTask(p[S],0,""),this.$=p[S];break;case 19:f.addEvent(p[S].substr(2)),this.$=p[S];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(e,[2,5],{5:6}),r(e,[2,2]),r(e,[2,3]),r(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:i,17:n,19:d,20:c,21:17,22:18,23:o,24:x},r(e,[2,10],{1:[2,1]}),r(e,[2,6]),{12:21,14:s,15:i,17:n,19:d,20:c,21:17,22:18,23:o,24:x},r(e,[2,8]),r(e,[2,9]),r(e,[2,11]),{16:[1,22]},{18:[1,23]},r(e,[2,14]),r(e,[2,15]),r(e,[2,16]),r(e,[2,17]),r(e,[2,18]),r(e,[2,19]),r(e,[2,7]),r(e,[2,12]),r(e,[2,13])],defaultActions:{},parseError:t(function(a,u){if(u.recoverable)this.trace(a);else{var h=Error(a);throw h.hash=u,h}},"parseError"),parse:t(function(a){var u=this,h=[0],f=[],v=[null],p=[],T=this.table,S="",R=0,G=0,D=0,q=2,P=1,O=p.slice.call(arguments,1),I=Object.create(this.lexer),V={yy:{}};for(var U in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,U))V.yy[U]=this.yy[U];if(I.setInput(a,V.yy),V.yy.lexer=I,V.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var J=I.yylloc;p.push(J);var L=I.options&&I.options.ranges;if(typeof V.yy.parseError==="function")this.parseError=V.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function E(K){h.length=h.length-2*K,v.length=v.length-K,p.length=p.length-K}t(E,"popStack");function H(){var K=f.pop()||I.lex()||P;if(typeof K!=="number"){if(K instanceof Array)f=K,K=f.pop();K=u.symbols_[K]||K}return K}t(H,"lex");var N,W,B,M,at,tt,j={},et,X,ft,rt;while(!0){if(B=h[h.length-1],this.defaultActions[B])M=this.defaultActions[B];else{if(N===null||typeof N>"u")N=H();M=T[B]&&T[B][N]}if(typeof M>"u"||!M.length||!M[0]){var ot="";rt=[];for(et in T[B])if(this.terminals_[et]&&et>q)rt.push("'"+this.terminals_[et]+"'");if(I.showPosition)ot="Parse error on line "+(R+1)+`:
|
|
2
|
-
`+I.showPosition()+`
|
|
3
|
-
Expecting `+rt.join(", ")+", got '"+(this.terminals_[N]||N)+"'";else ot="Parse error on line "+(R+1)+": Unexpected "+(N==P?"end of input":"'"+(this.terminals_[N]||N)+"'");this.parseError(ot,{text:I.match,token:this.terminals_[N]||N,line:I.yylineno,loc:J,expected:rt})}if(M[0]instanceof Array&&M.length>1)throw Error("Parse Error: multiple actions possible at state: "+B+", token: "+N);switch(M[0]){case 1:if(h.push(N),v.push(I.yytext),p.push(I.yylloc),h.push(M[1]),N=null,!W){if(G=I.yyleng,S=I.yytext,R=I.yylineno,J=I.yylloc,D>0)D--}else N=W,W=null;break;case 2:if(X=this.productions_[M[1]][1],j.$=v[v.length-X],j._$={first_line:p[p.length-(X||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(X||1)].first_column,last_column:p[p.length-1].last_column},L)j._$.range=[p[p.length-(X||1)].range[0],p[p.length-1].range[1]];if(tt=this.performAction.apply(j,[S,G,R,V.yy,M[1],v,p].concat(O)),typeof tt<"u")return tt;if(X)h=h.slice(0,-1*X*2),v=v.slice(0,-1*X),p=p.slice(0,-1*X);h.push(this.productions_[M[1]][0]),v.push(j.$),p.push(j._$),ft=T[h[h.length-2]][h[h.length-1]],h.push(ft);break;case 3:return!0}}return!0},"parse")},_=function(){var w={EOF:1,parseError:t(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw Error(u)},"parseError"),setInput:t(function(a,u){if(this.yy=u||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var u=a.match(/(?:\r\n?|\n).*/g);if(u)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),a},"input"),unput:t(function(a){var u=a.length,h=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var v=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges)this.yylloc.range=[v[0],v[0]+this.yyleng-u];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(a){this.unput(this.match.slice(a))},"less"),pastInput:t(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var a=this.match;if(a.length<20)a+=this._input.substr(0,20-a.length);return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var a=this.pastInput(),u=Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
5
|
-
`+u+"^"},"showPosition"),test_match:t(function(a,u){var h,f,v;if(this.options.backtrack_lexer){if(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)v.yylloc.range=this.yylloc.range.slice(0)}if(f=a[0].match(/(?:\r\n?|\n).*/g),f)this.yylineno+=f.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var p in v)this[p]=v[p];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var a,u,h,f;if(!this._more)this.yytext="",this.match="";var v=this._currentRules();for(var p=0;p<v.length;p++)if(h=this._input.match(this.rules[v[p]]),h&&(!u||h[0].length>u[0].length)){if(u=h,f=p,this.options.backtrack_lexer)if(a=this.test_match(h,v[p]),a!==!1)return a;else if(this._backtrack){u=!1;continue}else return!1;else if(!this.options.flex)break}if(u){if(a=this.test_match(u,v[f]),a!==!1)return a;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var u=this.next();if(u)return u;else return this.lex()},"lex"),begin:t(function(u){this.conditionStack.push(u)},"begin"),popState:t(function(){var u=this.conditionStack.length-1;if(u>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:t(function(u){this.begin(u)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(u,h,f,v){var p=v;switch(f){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return w}();y.lexer=_;function k(){this.yy={}}return t(k,"Parser"),k.prototype=y,y.Parser=k,new k}();lt.parser=lt;var Ft=lt,_t={};Qo(_t,{addEvent:()=>Mt,addSection:()=>Nt,addTask:()=>Lt,addTaskOrg:()=>At,clear:()=>Et,default:()=>zt,getCommonDb:()=>St,getDirection:()=>$t,getSections:()=>It,getTasks:()=>Ht,setDirection:()=>Tt});var Q="",wt=0,ht="LR",dt=[],nt=[],Y=[],St=t(()=>dm,"getCommonDb"),Et=t(function(){dt.length=0,nt.length=0,Q="",Y.length=0,ht="LR",F()},"clear"),Tt=t(function(r){ht=r},"setDirection"),$t=t(function(){return ht},"getDirection"),Nt=t(function(r){Q=r,dt.push(r)},"addSection"),It=t(function(){return dt},"getSections"),Ht=t(function(){let r=yt(),e=100,s=0;while(!r&&s<e)r=yt(),s++;return nt.push(...Y),nt},"getTasks"),Lt=t(function(r,e,s){let i={id:wt++,section:Q,type:Q,task:r,score:e?e:0,events:s?[s]:[]};Y.push(i)},"addTask"),Mt=t(function(r){Y.find((s)=>s.id===wt-1).events.push(r)},"addEvent"),At=t(function(r){let e={section:Q,type:Q,description:r,task:r,classes:[]};nt.push(e)},"addTaskOrg"),yt=t(function(){let r=t(function(s){return Y[s].processed},"compileTask"),e=!0;for(let[s,i]of Y.entries())r(s),e=e&&i.processed;return e},"compileTasks"),zt={clear:Et,getCommonDb:St,getDirection:$t,setDirection:Tt,addSection:Nt,getSections:It,getTasks:Ht,addTask:Lt,addTaskOrg:At,addEvent:Mt},Ct=0,it=t(function(r,e){let s=r.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),s.attr("rx",e.rx),s.attr("ry",e.ry),e.class!==void 0)s.attr("class",e.class);return s},"drawRect"),Ot=t(function(r,e){let i=r.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=r.append("g");n.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function d(x){let y=ia().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);x.append("path").attr("class","mouth").attr("d",y).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}t(d,"smile");function c(x){let y=ia().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);x.append("path").attr("class","mouth").attr("d",y).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}t(c,"sad");function o(x){x.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}if(t(o,"ambivalent"),e.score>3)d(n);else if(e.score<3)c(n);else o(n);return i},"drawFace"),Gt=t(function(r,e){let s=r.append("circle");if(s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0)s.attr("class",s.class);if(e.title!==void 0)s.append("title").text(e.title);return s},"drawCircle"),Rt=t(function(r,e){let s=e.text.replace(/<br\s*\/?>/gi," "),i=r.append("text");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0)i.attr("class",e.class);let n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(s),i},"drawText"),Dt=t(function(r,e){function s(n,d,c,o,x){return n+","+d+" "+(n+c)+","+d+" "+(n+c)+","+(d+o-x)+" "+(n+c-x*1.2)+","+(d+o)+" "+n+","+(d+o)}t(s,"genPoints");let i=r.append("polygon");i.attr("points",s(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+0.5*e.labelMargin,Rt(r,e)},"drawLabel"),Kt=t(function(r,e,s){let i=r.append("g"),n=ut();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=s.width,n.height=s.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,it(i,n),Wt(s)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},s,e.colour)},"drawSection"),ct=-1,Ut=t(function(r,e,s,i){let n=e.x+s.width/2,d=r.append("g");ct++;let c=450;d.append("line").attr("id",i+"-task"+ct).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",c).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ot(d,{cx:n,cy:300+(5-e.score)*30,score:e.score});let o=ut();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=s.width,o.height=s.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,it(d,o),Wt(s)(e.task,d,o.x,o.y,o.width,o.height,{class:"task"},s,e.colour)},"drawTask"),Xt=t(function(r,e){it(r,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),Zt=t(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),ut=t(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Wt=function(){function r(n,d,c,o,x,y,_,k){let w=d.append("text").attr("x",c+x/2).attr("y",o+y/2+5).style("font-color",k).style("text-anchor","middle").text(n);i(w,_)}t(r,"byText");function e(n,d,c,o,x,y,_,k,w){let{taskFontSize:a,taskFontFamily:u}=k,h=n.split(/<br\s*\/?>/gi);for(let f=0;f<h.length;f++){let v=f*a-a*(h.length-1)/2,p=d.append("text").attr("x",c+x/2).attr("y",o).attr("fill",w).style("text-anchor","middle").style("font-size",a).style("font-family",u);p.append("tspan").attr("x",c+x/2).attr("dy",v).text(h[f]),p.attr("y",o+y/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(p,_)}}t(e,"byTspan");function s(n,d,c,o,x,y,_,k){let w=d.append("switch"),u=w.append("foreignObject").attr("x",c).attr("y",o).attr("width",x).attr("height",y).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,w,c,o,x,y,_,k),i(u,_)}t(s,"byFo");function i(n,d){for(let c in d)if(c in d)n.attr(c,d[c])}return t(i,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),jt=t(function(r,e){Ct=0,ct=-1,r.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function pt(r,e){r.each(function(){var s=b(this),i=s.text().split(/(\s+|<br>)/).reverse(),n,d=[],c=1.1,o=s.attr("y"),x=parseFloat(s.attr("dy")),y=s.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",x+"em");for(let _=0;_<i.length;_++)if(n=i[i.length-1-_],d.push(n),y.text(d.join(" ").trim()),y.node().getComputedTextLength()>e||n==="<br>"){if(d.pop(),y.text(d.join(" ").trim()),n==="<br>")d=[""];else d=[n];y=s.append("tspan").attr("x",0).attr("y",o).attr("dy",c+"em").text(n)}})}t(pt,"wrap");var qt=t(function(r,e,s,i,n,d=!1){let{theme:c,look:o}=i,x=c?.includes("redux"),y=i?.themeVariables?.THEME_COLOR_LIMIT??12,_=s%y-1,k=r.append("g");e.section=_,k.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+_));let w=k.append("g"),a=k.append("g"),h=a.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,e.width).node().getBBox(),f=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=h.height+f*1.1*0.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,a.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),x)a.attr("transform",`translate(${e.width/2}, ${d?e.padding/2+3:e.padding})`);if(Qt(w,e,_,n,i),o==="neo"){if(k.attr("data-look","neo"),x){let v=c.includes("dark"),p=r.node()?.ownerSVGElement??r.node(),T=b(p),S=T.attr("id")??"",R=S?`${S}-drop-shadow`:"drop-shadow";if(T.select(`#${R}`).empty()){let G=T.select("defs");(G.empty()?T.append("defs"):G).append("filter").attr("id",R).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",v?"0.2":"0.06").attr("flood-color",v?"#FFFFFF":"#000000")}}}return e},"drawNode"),Jt=t(function(r,e,s){let i=r.append("g"),d=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,e.width).node().getBBox(),c=s.fontSize?.replace?s.fontSize.replace("px",""):s.fontSize;return i.remove(),d.height+c*1.1*0.5+e.padding},"getVirtualNodeHeight"),Qt=t(function(r,e,s,i,n){let{theme:d}=n,c=d?.includes("redux")?0:5,o=5,x=c>0?`M0 ${e.height-5} v${-e.height+10} q0,-${c},${c},-${c} h${e.width-10} q${c},0,${c},${c} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;if(r.append("path").attr("id",i+"-node-"+Ct++).attr("class","node-bkg node-"+e.type).attr("d",x),!d?.includes("redux"))r.append("line").attr("class","node-line-"+s).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),z={drawRect:it,drawCircle:Gt,drawSection:Kt,drawText:Rt,drawLabel:Dt,drawTask:Ut,drawBackgroundRect:Xt,getTextObj:Zt,getNoteRect:ut,initGraphics:jt,drawNode:qt,getVirtualNodeHeight:Jt},Yt=t(function(r,e,s,i){let n=m(),{look:d,theme:c,themeVariables:o}=n,{useGradient:x,gradientStart:y,gradientStop:_}=o,k=n.timeline?.leftMargin??50;l.debug("timeline",i.db);let w=n.securityLevel,a;if(w==="sandbox")a=b("#i"+e);let h=(w==="sandbox"?b(a.nodes()[0].contentDocument.body):b("body")).select("#"+e);h.append("g");let f=i.db.getTasks(),v=i.db.getCommonDb().getDiagramTitle();l.debug("task",f),z.initGraphics(h,e);let p=i.db.getSections();l.debug("sections",p);let T=0,S=0,R=0,G=0,D=50+k,q=50;G=50;let P=0,O=!0;p.forEach(function(L){let E={number:P,descr:L,section:P,width:150,padding:20,maxHeight:T},H=z.getVirtualNodeHeight(h,E,n);l.debug("sectionHeight before draw",H),T=Math.max(T,H+20)});let I=0,V=0;l.debug("tasks.length",f.length);for(let[L,E]of f.entries()){let H={number:L,descr:E,section:E.section,width:150,padding:20,maxHeight:S},N=z.getVirtualNodeHeight(h,H,n);l.debug("taskHeight before draw",N),S=Math.max(S,N+20),I=Math.max(I,E.events.length);let W=0;for(let B of E.events){let M={descr:B,section:E.section,number:E.section,width:150,padding:20,maxHeight:50};W+=z.getVirtualNodeHeight(h,M,n)}if(E.events.length>0)W+=(E.events.length-1)*10;V=Math.max(V,W)}if(l.debug("maxSectionHeight before draw",T),l.debug("maxTaskHeight before draw",S),p&&p.length>0)p.forEach((L)=>{let E=f.filter((B)=>B.section===L),H={number:P,descr:L,section:P,width:200*Math.max(E.length,1)-50,padding:20,maxHeight:T};l.debug("sectionNode",H);let N=h.append("g"),W=z.drawNode(N,H,P,n,e);if(l.debug("sectionNode output",W),N.attr("transform",`translate(${D}, ${G})`),q+=T+50,E.length>0)kt(h,E,P,D,q,S,n,I,V,T,!1,e);D+=200*Math.max(E.length,1),q=G,P++});else O=!1,kt(h,f,P,D,q,S,n,I,V,T,!0,e);let U=h.node().getBBox();if(l.debug("bounds",U),v)h.append("text").text(v).attr("x",d==="neo"?U.x*2+k:U.width/2-k).attr("font-size","4ex").attr("font-weight","bold").attr("y",20);if(R=O?T+S+150:S+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",k).attr("y1",R).attr("x2",U.width+3*k).attr("y2",R).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),d==="neo"&&x&&c!=="neutral"){let L=h.select("defs"),H=(L.empty()?h.append("defs"):L).append("linearGradient").attr("id",h.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");H.append("stop").attr("offset","0%").attr("stop-color",y).attr("stop-opacity",1),H.append("stop").attr("offset","100%").attr("stop-color",_).attr("stop-opacity",1)}oa(void 0,h,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),kt=t(function(r,e,s,i,n,d,c,o,x,y,_,k){for(let w of e){let a={descr:w.task,section:s,number:s,width:150,padding:20,maxHeight:d};l.debug("taskNode",a);let u=r.append("g").attr("class","taskWrapper"),f=z.drawNode(u,a,s,c,k).height;if(l.debug("taskHeight after draw",f),u.attr("transform",`translate(${i}, ${n})`),d=Math.max(d,f),w.events){let v=r.append("g").attr("class","lineWrapper"),p=d;n+=100,p=p+te(r,w.events,s,i,n,c,k),n-=100,v.append("line").attr("x1",i+95).attr("y1",n+d).attr("x2",i+95).attr("y2",n+d+100+x+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${k}-arrowhead)`).attr("stroke-dasharray","5,5")}if(i=i+200,_&&!c.timeline?.disableMulticolor)s++}n=n-10},"drawTasks"),te=t(function(r,e,s,i,n,d,c){let o=0,x=n;n=n+100;for(let y of e){let _={descr:y,section:s,number:s,width:150,padding:20,maxHeight:50};l.debug("eventNode",_);let k=r.append("g").attr("class","eventWrapper"),a=z.drawNode(k,_,s,d,c,!0).height;o=o+a,k.attr("transform",`translate(${i}, ${n})`),n=n+10+a}return n=x,o},"drawEvents"),ee={setConf:t(()=>{},"setConf"),draw:Yt},st=200,Z=5,re=st+Z*2,gt=st+100,ne=gt+Z*2,Pt=10,ie=0,xt=20,Bt=20,bt=30,Vt=50,se=t(function(r,e,s,i){let n=m(),d=n.timeline?.leftMargin??50;l.debug("timeline",i.db);let c=Ae(e);c.append("g");let o=i.db.getTasks(),x=i.db.getCommonDb().getDiagramTitle();l.debug("task",o),z.initGraphics(c);let y=i.db.getSections();l.debug("sections",y);let _=0,k=0,w=50+d,a=50,u=a,h=w,f=re+Bt,v=ne+Vt,p=h+f,T=0,S=y&&y.length>0,R=S?p:w+f,G=Math.max(50,f+v-Z*2);y.forEach(function(L){let E={number:T,descr:L,section:T,width:G,padding:Z,maxHeight:_},H=z.getVirtualNodeHeight(c,E,n);l.debug("sectionHeight before draw",H),_=Math.max(_,H)});let D=0;l.debug("tasks.length",o.length);for(let[L,E]of o.entries()){let H={number:L,descr:E,section:E.section,width:st,padding:Z,maxHeight:k},N=z.getVirtualNodeHeight(c,H,n);l.debug("taskHeight before draw",N),k=Math.max(k,N);let W=0;for(let B of E.events){let M={descr:B,section:E.section,number:E.section,width:gt,padding:Z,maxHeight:50};W+=z.getVirtualNodeHeight(c,M,n)}if(E.events.length>0)W+=(E.events.length-1)*Pt;D=Math.max(D,W)+ie}l.debug("maxSectionHeight before draw",_),l.debug("maxTaskHeight before draw",k);let P=Math.max(k,D)+bt;if(S)y.forEach((L)=>{let E=o.filter((j)=>j.section===L),H={number:T,descr:L,section:T,width:G,padding:Z,maxHeight:_};l.debug("sectionNode",H);let N=c.append("g"),W=z.drawNode(N,H,T,n);l.debug("sectionNode output",W);let B=R-f;N.attr("transform",`translate(${B}, ${a})`);let M=a+W.height+xt;if(E.length>0)vt(c,E,T,R,M,k,n,P,!1);let at=E.length,tt=W.height+xt+P*Math.max(at,1)-(at>0?bt*2:0);a+=tt,T++});else vt(c,o,T,R,a,k,n,P,!0);let O=c.node()?.getBBox();if(!O)throw Error("bbox not found");if(l.debug("bounds",O),x){if(c.append("text").text(x).attr("x",O.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),O=c.node()?.getBBox(),!O)throw Error("bbox not found");l.debug("bounds after title",O)}let[I]=Hn(n.fontSize),V=(I??16)*2,U=(I??16)*0.5+20,J=c.append("g").attr("class","lineWrapper");J.append("line").attr("x1",R).attr("y1",u-V).attr("x2",R).attr("y2",O.y+O.height+U).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),J.lower(),oa(void 0,c,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),vt=t(function(r,e,s,i,n,d,c,o,x){for(let y of e){let _={descr:y.task,section:s,number:s,width:st,padding:Z,maxHeight:d};l.debug("taskNode",_);let k=r.append("g").attr("class","taskWrapper"),w=z.drawNode(k,_,s,c),a=w.height;l.debug("taskHeight after draw",a);let u=i-Bt-w.width;if(k.attr("transform",`translate(${u}, ${n})`),d=Math.max(d,a),y.events&&y.events.length>0){let h=n,f=i+Vt;ae(r,y.events,s,i,f,h,c)}if(n=n+o,x&&!c.timeline?.disableMulticolor)s++}},"drawTasks"),ae=t(function(r,e,s,i,n,d,c){let o=d;for(let x of e){let y={descr:x,section:s,number:s,width:gt,padding:Z,maxHeight:0};l.debug("eventNode",y);let _=r.append("g").attr("class","eventWrapper"),w=z.drawNode(_,y,s,c).height;_.attr("transform",`translate(${n}, ${o})`);let a=r.append("g").attr("class","lineWrapper"),u=o+w/2;a.append("line").attr("x1",i).attr("y1",u).attr("x2",n).attr("y2",u).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+w+Pt}return o-d},"drawEvents"),oe={setConf:t(()=>{},"setConf"),draw:se},le=t((r)=>{let{theme:e}=C(),s=e?.includes("dark"),i=mt(e,r.borderColorArray),n=r.svgId?.replace(/^#/,"")??"",d=n?`url(#${n}-drop-shadow)`:r.dropShadow??"none",c="";for(let o=0;o<or(r.THEME_COLOR_LIMIT);o++){let x=`${17-3*o}`,y=i?r.borderColorArray[o%r.borderColorArray.length]:void 0,_=y??r.mainBkg,k=y??r.nodeBorder;c+=`
|
|
7
|
-
.section-${o-1} rect,
|
|
8
|
-
.section-${o-1} path,
|
|
9
|
-
.section-${o-1} circle {
|
|
10
|
-
fill: ${s&&i?r.mainBkg:_};
|
|
11
|
-
stroke: ${k};
|
|
12
|
-
stroke-width: ${r.strokeWidth};
|
|
13
|
-
filter: ${d};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.section-${o-1} text {
|
|
17
|
-
fill: ${r.nodeBorder};
|
|
18
|
-
font-weight: ${r.fontWeight}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.node-icon-${o-1} {
|
|
22
|
-
font-size: 40px;
|
|
23
|
-
color: ${r["cScaleLabel"+o]};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.section-edge-${o-1} {
|
|
27
|
-
stroke: ${r["cScale"+o]};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.edge-depth-${o-1} {
|
|
31
|
-
stroke-width: ${x};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.section-${o-1} line {
|
|
35
|
-
stroke: ${r["cScaleInv"+o]};
|
|
36
|
-
stroke-width: 3;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.lineWrapper line {
|
|
40
|
-
stroke: ${r.nodeBorder};
|
|
41
|
-
stroke-width:${r.strokeWidth}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.disabled,
|
|
45
|
-
.disabled circle,
|
|
46
|
-
.disabled text {
|
|
47
|
-
fill: ${r.tertiaryColor??"lightgray"};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.disabled text {
|
|
51
|
-
fill: ${r.clusterBorder??"#efefef"};
|
|
52
|
-
}
|
|
53
|
-
`}return c},"genReduxSections"),ce=t((r)=>{let e="",s=or(r.THEME_COLOR_LIMIT);for(let i=0;i<s;i++)if(r["lineColor"+i]=r["lineColor"+i]??r["cScaleInv"+i],De(r["lineColor"+i]))r["lineColor"+i]=g(r["lineColor"+i],20);else r["lineColor"+i]=A(r["lineColor"+i],20);for(let i=0;i<s;i++){let n=""+(17-3*i);e+=`
|
|
54
|
-
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {
|
|
55
|
-
fill: ${r["cScale"+i]};
|
|
56
|
-
}
|
|
57
|
-
.section-${i-1} text {
|
|
58
|
-
fill: ${r["cScaleLabel"+i]};
|
|
59
|
-
}
|
|
60
|
-
.node-icon-${i-1} {
|
|
61
|
-
font-size: 40px;
|
|
62
|
-
color: ${r["cScaleLabel"+i]};
|
|
63
|
-
}
|
|
64
|
-
.section-edge-${i-1}{
|
|
65
|
-
stroke: ${r["cScale"+i]};
|
|
66
|
-
}
|
|
67
|
-
.edge-depth-${i-1}{
|
|
68
|
-
stroke-width: ${n};
|
|
69
|
-
}
|
|
70
|
-
.section-${i-1} line {
|
|
71
|
-
stroke: ${r["cScaleInv"+i]} ;
|
|
72
|
-
stroke-width: 3;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.lineWrapper line{
|
|
76
|
-
stroke: ${r["cScaleLabel"+i]} ;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.disabled, .disabled circle, .disabled text {
|
|
80
|
-
fill: ${r.tertiaryColor??"lightgray"};
|
|
81
|
-
}
|
|
82
|
-
.disabled text {
|
|
83
|
-
fill: ${r.clusterBorder??"#efefef"};
|
|
84
|
-
}
|
|
85
|
-
`}return e},"genSections"),he=t((r)=>{let{theme:e}=C(),s=e?.includes("redux"),i=e==="neutral",n=r.svgId?.replace(/^#/,"")??"",d="";if(r.useGradient&&n&&r.THEME_COLOR_LIMIT&&!i){let c=or(r.THEME_COLOR_LIMIT);for(let o=0;o<c;o++)d+=`
|
|
86
|
-
.section-${o-1}[data-look="neo"] rect,
|
|
87
|
-
.section-${o-1}[data-look="neo"] path,
|
|
88
|
-
.section-${o-1}[data-look="neo"] circle {
|
|
89
|
-
fill: ${r.mainBkg};
|
|
90
|
-
stroke: url(#${n}-gradient);
|
|
91
|
-
stroke-width: 2;
|
|
92
|
-
}
|
|
93
|
-
.section-${o-1}[data-look="neo"] line {
|
|
94
|
-
stroke: url(#${n}-gradient);
|
|
95
|
-
stroke-width: 2;
|
|
96
|
-
}`}return`
|
|
97
|
-
.edge {
|
|
98
|
-
stroke-width: 3;
|
|
99
|
-
}
|
|
100
|
-
${s?le(r):ce(r)}
|
|
101
|
-
${d}
|
|
102
|
-
.section-root rect, .section-root path, .section-root circle {
|
|
103
|
-
fill: ${r.git0};
|
|
104
|
-
}
|
|
105
|
-
.section-root text {
|
|
106
|
-
fill: ${r.gitBranchLabel0};
|
|
107
|
-
}
|
|
108
|
-
.icon-container {
|
|
109
|
-
height:100%;
|
|
110
|
-
display: flex;
|
|
111
|
-
justify-content: center;
|
|
112
|
-
align-items: center;
|
|
113
|
-
}
|
|
114
|
-
.edge {
|
|
115
|
-
fill: none;
|
|
116
|
-
}
|
|
117
|
-
.eventWrapper {
|
|
118
|
-
filter: brightness(120%);
|
|
119
|
-
}
|
|
120
|
-
`},"getStyles"),de=he,ue={setConf:t(()=>{},"setConf"),draw:t((r,e,s,i)=>{if((i?.db?.getDirection?.()??"LR")==="TD")return oe.draw(r,e,s,i);return ee.draw(r,e,s,i)},"draw")},_e={db:_t,renderer:ue,parser:Ft,styles:de};export{_e as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Hg}from"./index-excgtjhx.js";export{Hg as createTreeViewServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Pg}from"./index-excgtjhx.js";export{Pg as createTreemapServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yu}from"./index-3j2he86h.js";export{yu as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ka}from"./index-97sw4d9n.js";export{Ka as default};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import{t,De,hc,g,A,Y,C,ne,F,z,j,U,H,W,q,b,Ae,ue,y}from"./index-dekvtt2a.js";var le=(e,s)=>hc(e,"a",-s),kt=le;function mt(e,s){let i=fe(e),n=i.filter((c)=>ce(c,e)),r=0,o=0,a=[];if(n.length>1){let c=qt(n);for(let f=0;f<n.length;++f){let l=n[f];l.angle=Math.atan2(l.x-c.x,l.y-c.y)}n.sort((f,l)=>l.angle-f.angle);let h=n[n.length-1];for(let f=0;f<n.length;++f){let l=n[f];o+=(h.x+l.x)*(l.y-h.y);let v={x:(l.x+h.x)/2,y:(l.y+h.y)/2},x=null;for(let M=0;M<l.parentIndex.length;++M)if(h.parentIndex.includes(l.parentIndex[M])){let k=e[l.parentIndex[M]],E=Math.atan2(l.x-k.x,l.y-k.y),N=Math.atan2(h.x-k.x,h.y-k.y),D=N-E;if(D<0)D+=2*Math.PI;let T=N-D/2,p=st(v,{x:k.x+k.radius*Math.sin(T),y:k.y+k.radius*Math.cos(T)});if(p>k.radius*2)p=k.radius*2;if(x==null||x.width>p)x={circle:k,width:p,p1:l,p2:h,large:p>k.radius,sweep:!0}}if(x!=null)a.push(x),r+=St(x.circle.radius,x.width),h=l}}else{let c=e[0];for(let f=1;f<e.length;++f)if(e[f].radius<c.radius)c=e[f];let h=!1;for(let f=0;f<e.length;++f)if(st(e[f],c)>Math.abs(c.radius-e[f].radius)){h=!0;break}if(h)r=o=0;else r=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-0.0000000001,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0})}if(o/=2,s)s.area=r+o,s.arcArea=r,s.polygonArea=o,s.arcs=a,s.innerPoints=n,s.intersectionPoints=i;return r+o}function ce(e,s){return s.every((i)=>st(e,i)<i.radius+0.0000000001)}function fe(e){let s=[];for(let i=0;i<e.length;++i)for(let n=i+1;n<e.length;++n){let r=Bt(e[i],e[n]);for(let o of r)o.parentIndex=[i,n],s.push(o)}return s}function St(e,s){return e*e*Math.acos(1-s/e)-(e-s)*Math.sqrt(s*(2*e-s))}function st(e,s){return Math.sqrt((e.x-s.x)*(e.x-s.x)+(e.y-s.y)*(e.y-s.y))}function At(e,s,i){if(i>=e+s)return 0;if(i<=Math.abs(e-s))return Math.PI*Math.min(e,s)*Math.min(e,s);let n=e-(i*i-s*s+e*e)/(2*i),r=s-(i*i-e*e+s*s)/(2*i);return St(e,n)+St(s,r)}function Bt(e,s){let i=st(e,s),n=e.radius,r=s.radius;if(i>=n+r||i<=Math.abs(n-r))return[];let o=(n*n-r*r+i*i)/(2*i),a=Math.sqrt(n*n-o*o),c=e.x+o*(s.x-e.x)/i,h=e.y+o*(s.y-e.y)/i,f=-(s.y-e.y)*(a/i),l=-(s.x-e.x)*(a/i);return[{x:c+f,y:h-l},{x:c-f,y:h+l}]}function qt(e){let s={x:0,y:0};for(let i of e)s.x+=i.x,s.y+=i.y;return s.x/=e.length,s.y/=e.length,s}function he(e,s,i,n){n=n||{};let r=n.maxIterations||100,o=n.tolerance||0.0000000001,a=e(s),c=e(i),h=i-s;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return s;if(c===0)return i;for(let f=0;f<r;++f){h/=2;let l=s+h,v=e(l);if(v*a>=0)s=l;if(Math.abs(h)<o||v===0)return l}return s+h}function wt(e){let s=Array(e);for(let i=0;i<e;++i)s[i]=0;return s}function Pt(e,s){return wt(e).map(()=>wt(s))}function gt(e,s){let i=0;for(let n=0;n<e.length;++n)i+=e[n]*s[n];return i}function _t(e){return Math.sqrt(gt(e,e))}function Et(e,s,i){for(let n=0;n<s.length;++n)e[n]=s[n]*i}function ft(e,s,i,n,r){for(let o=0;o<e.length;++o)e[o]=s*i[o]+n*r[o]}function Ut(e,s,i){i=i||{};let n=i.maxIterations||s.length*200,r=i.nonZeroDelta||1.05,o=i.zeroDelta||0.001,a=i.minErrorDelta||0.000001,c=i.minErrorDelta||0.00001,h=i.rho!==void 0?i.rho:1,f=i.chi!==void 0?i.chi:2,l=i.psi!==void 0?i.psi:-0.5,v=i.sigma!==void 0?i.sigma:0.5,x,M=s.length,k=Array(M+1);k[0]=s,k[0].fx=e(s),k[0].id=0;for(let S=0;S<M;++S){let u=s.slice();u[S]=u[S]?u[S]*r:o,k[S+1]=u,k[S+1].fx=e(u),k[S+1].id=S+1}function E(S){for(let u=0;u<S.length;u++)k[M][u]=S[u];k[M].fx=S.fx}let N=(S,u)=>S.fx-u.fx,D=s.slice(),T=s.slice(),p=s.slice(),I=s.slice();for(let S=0;S<n;++S){if(k.sort(N),i.history){let m=k.map((d)=>{let P=d.slice();return P.fx=d.fx,P.id=d.id,P});m.sort((d,P)=>d.id-P.id),i.history.push({x:k[0].slice(),fx:k[0].fx,simplex:m})}x=0;for(let m=0;m<M;++m)x=Math.max(x,Math.abs(k[0][m]-k[1][m]));if(Math.abs(k[0].fx-k[M].fx)<a&&x<c)break;for(let m=0;m<M;++m){D[m]=0;for(let d=0;d<M;++d)D[m]+=k[d][m];D[m]/=M}let u=k[M];if(ft(T,1+h,D,-h,u),T.fx=e(T),T.fx<k[0].fx)if(ft(I,1+f,D,-f,u),I.fx=e(I),I.fx<T.fx)E(I);else E(T);else if(T.fx>=k[M-1].fx){let m=!1;if(T.fx>u.fx)if(ft(p,1+l,D,-l,u),p.fx=e(p),p.fx<u.fx)E(p);else m=!0;else if(ft(p,1-l*h,D,l*h,u),p.fx=e(p),p.fx<T.fx)E(p);else m=!0;if(m){if(v>=1)break;for(let d=1;d<k.length;++d)ft(k[d],1-v,k[0],v,k[d]),k[d].fx=e(k[d])}}else E(T)}return k.sort(N),{fx:k[0].fx,x:k[0]}}function de(e,s,i,n,r,o,a){let c=i.fx,h=gt(i.fxprime,s),f=c,l=c,v=h,x=0;r=r||1,o=o||0.000001,a=a||0.1;function M(k,E,N){for(let D=0;D<16;++D)if(r=(k+E)/2,ft(n.x,1,i.x,r,s),f=n.fx=e(n.x,n.fxprime),v=gt(n.fxprime,s),f>c+o*r*h||f>=N)E=r;else{if(Math.abs(v)<=-a*h)return r;if(v*(E-k)>=0)E=k;k=r,N=f}return 0}for(let k=0;k<10;++k){if(ft(n.x,1,i.x,r,s),f=n.fx=e(n.x,n.fxprime),v=gt(n.fxprime,s),f>c+o*r*h||k&&f>=l)return M(x,r,l);if(Math.abs(v)<=-a*h)return r;if(v>=0)return M(r,x,f);l=f,x=r,r*=2}return r}function ge(e,s,i){let n={x:s.slice(),fx:0,fxprime:s.slice()},r={x:s.slice(),fx:0,fxprime:s.slice()},o=s.slice(),a,c,h=1,f;i=i||{},f=i.maxIterations||s.length*20,n.fx=e(n.x,n.fxprime),a=n.fxprime.slice(),Et(a,n.fxprime,-1);for(let l=0;l<f;++l){if(h=de(e,a,n,r,h),i.history)i.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:h});if(!h)Et(a,n.fxprime,-1);else{ft(o,1,r.fxprime,-1,n.fxprime);let v=gt(n.fxprime,n.fxprime),x=Math.max(0,gt(o,r.fxprime)/v);ft(a,x,a,-1,r.fxprime),c=n,n=r,r=c}if(_t(n.fxprime)<=0.00001)break}if(i.history)i.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:h});return n}function Gt(e,s={}){s.maxIterations=s.maxIterations||500;let i=s.initialLayout||me,n=s.lossFunction||xt,r=xe(e,s),o=i(r,s),a=Object.keys(o),c=[];for(let l of a)c.push(o[l].x),c.push(o[l].y);let f=Ut((l)=>{let v={};for(let x=0;x<a.length;++x){let M=a[x];v[M]={x:l[2*x],y:l[2*x+1],radius:o[M].radius}}return n(v,r)},c,s).x;for(let l=0;l<a.length;++l){let v=a[l];o[v].x=f[2*l],o[v].y=f[2*l+1]}return o}var Wt=0.0000000001;function Tt(e,s,i){if(Math.min(e,s)*Math.min(e,s)*Math.PI<=i+Wt)return Math.abs(e-s);return he((n)=>At(e,s,n)-i,0,e+s)}function xe(e,s={}){let i=s.distinct,n=e.map((c)=>Object.assign({},c));function r(c){return c.join(";")}if(i){let c=new Map;for(let h of n)for(let f=0;f<h.sets.length;f++){let l=String(h.sets[f]);c.set(l,h.size+(c.get(l)||0));for(let v=f+1;v<h.sets.length;v++){let x=String(h.sets[v]),M=`${l};${x}`,k=`${x};${l}`;c.set(M,h.size+(c.get(M)||0)),c.set(k,h.size+(c.get(k)||0))}}for(let h of n)if(h.sets.length<3)h.size=c.get(r(h.sets))}let o=[],a=new Set;for(let c of n)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){let h=c.sets[0],f=c.sets[1];a.add(r(c.sets)),a.add(r([f,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){let h=o[c];for(let f=c+1;f<o.length;++f){let l=o[f];if(!a.has(r([h,l])))n.push({sets:[h,l],size:0})}}return n}function ye(e,s,i){let n=Pt(s.length,s.length),r=Pt(s.length,s.length);return e.filter((o)=>o.sets.length===2).forEach((o)=>{let a=i[o.sets[0]],c=i[o.sets[1]],h=Math.sqrt(s[a].size/Math.PI),f=Math.sqrt(s[c].size/Math.PI),l=Tt(h,f,o.size);n[a][c]=n[c][a]=l;let v=0;if(o.size+0.0000000001>=Math.min(s[a].size,s[c].size))v=1;else if(o.size<=0.0000000001)v=-1;r[a][c]=r[c][a]=v}),{distances:n,constraints:r}}function pe(e,s,i,n){for(let o=0;o<s.length;++o)s[o]=0;let r=0;for(let o=0;o<i.length;++o){let a=e[2*o],c=e[2*o+1];for(let h=o+1;h<i.length;++h){let f=e[2*h],l=e[2*h+1],v=i[o][h],x=n[o][h],M=(f-a)*(f-a)+(l-c)*(l-c),k=Math.sqrt(M),E=M-v*v;if(x>0&&k<=v||x<0&&k>=v)continue;r+=2*E*E,s[2*o]+=4*E*(a-f),s[2*o+1]+=4*E*(c-l),s[2*h]+=4*E*(f-a),s[2*h+1]+=4*E*(l-c)}}return r}function me(e,s={}){let i=ve(e,s),n=s.lossFunction||xt;if(e.length>=8){let r=be(e,s),o=n(r,e),a=n(i,e);if(o+0.00000001<a)i=r}return i}function be(e,s={}){let i=s.restarts||10,n=[],r={};for(let x of e)if(x.sets.length===1)r[x.sets[0]]=n.length,n.push(x);let{distances:o,constraints:a}=ye(e,n,r),c=_t(o.map(_t))/o.length;o=o.map((x)=>x.map((M)=>M/c));let h=(x,M)=>pe(x,M,o,a),f=null;for(let x=0;x<i;++x){let M=wt(o.length*2).map(Math.random),k=ge(h,M,s);if(!f||k.fx<f.fx)f=k}let l=f.x,v={};for(let x=0;x<n.length;++x){let M=n[x];v[M.sets[0]]={x:l[2*x]*c,y:l[2*x+1]*c,radius:Math.sqrt(M.size/Math.PI)}}if(s.history)for(let x of s.history)Et(x.x,c);return v}function ve(e,s){let i=s&&s.lossFunction?s.lossFunction:xt,n={},r={};for(let v of e)if(v.sets.length===1){let x=v.sets[0];n[x]={x:10000000000,y:10000000000,rowid:n.length,size:v.size,radius:Math.sqrt(v.size/Math.PI)},r[x]=[]}e=e.filter((v)=>v.sets.length===2);for(let v of e){let x=v.weight!=null?v.weight:1,M=v.sets[0],k=v.sets[1];if(v.size+Wt>=Math.min(n[M].size,n[k].size))x=0;r[M].push({set:k,size:v.size,weight:x}),r[k].push({set:M,size:v.size,weight:x})}let o=[];Object.keys(r).forEach((v)=>{let x=0;for(let M=0;M<r[v].length;++M)x+=r[v][M].size*r[v][M].weight;o.push({set:v,size:x})});function a(v,x){return x.size-v.size}o.sort(a);let c={};function h(v){return v.set in c}function f(v,x){n[x].x=v.x,n[x].y=v.y,c[x]=!0}f({x:0,y:0},o[0].set);for(let v=1;v<o.length;++v){let x=o[v].set,M=r[x].filter(h),k=n[x];if(M.sort(a),M.length===0)throw"ERROR: missing pairwise overlap information";let E=[];for(var l=0;l<M.length;++l){let T=n[M[l].set],p=Tt(k.radius,T.radius,M[l].size);E.push({x:T.x+p,y:T.y}),E.push({x:T.x-p,y:T.y}),E.push({y:T.y+p,x:T.x}),E.push({y:T.y-p,x:T.x});for(let I=l+1;I<M.length;++I){let S=n[M[I].set],u=Tt(k.radius,S.radius,M[I].size),m=Bt({x:T.x,y:T.y,radius:p},{x:S.x,y:S.y,radius:u});E.push(...m)}}let N=100000000000000000000000000000000000000000000000000,D=E[0];for(let T of E){n[x].x=T.x,n[x].y=T.y;let p=i(n,e);if(p<N)N=p,D=T}f(D,x)}return n}function xt(e,s){let i=0;for(let n of s){if(n.sets.length===1)continue;let r;if(n.sets.length===2){let a=e[n.sets[0]],c=e[n.sets[1]];r=At(a.radius,c.radius,st(a,c))}else r=mt(n.sets.map((a)=>e[a]));let o=n.weight!=null?n.weight:1;i+=o*(r-n.size)*(r-n.size)}return i}function Kt(e,s){let i=0;for(let n of s){if(n.sets.length===1)continue;let r;if(n.sets.length===2){let c=e[n.sets[0]],h=e[n.sets[1]];r=At(c.radius,h.radius,st(c,h))}else r=mt(n.sets.map((c)=>e[c]));let o=n.weight!=null?n.weight:1,a=Math.log((r+1)/(n.size+1));i+=o*a*a}return i}function ke(e,s,i){if(i==null)e.sort((r,o)=>o.radius-r.radius);else e.sort(i);if(e.length>0){let r=e[0].x,o=e[0].y;for(let a of e)a.x-=r,a.y-=o}if(e.length===2){if(st(e[0],e[1])<Math.abs(e[1].radius-e[0].radius))e[1].x=e[0].x+e[0].radius-e[1].radius-0.0000000001,e[1].y=e[0].y}if(e.length>1){let r=Math.atan2(e[1].x,e[1].y)-s,o=Math.cos(r),a=Math.sin(r);for(let c of e){let{x:h,y:f}=c;c.x=o*h-a*f,c.y=a*h+o*f}}if(e.length>2){let r=Math.atan2(e[2].x,e[2].y)-s;while(r<0)r+=2*Math.PI;while(r>2*Math.PI)r-=2*Math.PI;if(r>Math.PI){let o=e[1].y/(0.0000000001+e[1].x);for(let a of e){var n=(a.x+o*a.y)/(1+o*o);a.x=2*n-a.x,a.y=2*n*o-a.y}}}}function Ie(e){e.forEach((r)=>{r.parent=r});function s(r){if(r.parent!==r)r.parent=s(r.parent);return r.parent}function i(r,o){let a=s(r),c=s(o);a.parent=c}for(let r=0;r<e.length;++r)for(let o=r+1;o<e.length;++o){let a=e[r].radius+e[o].radius;if(st(e[r],e[o])+0.0000000001<a)i(e[o],e[r])}let n=new Map;for(let r=0;r<e.length;++r){let o=s(e[r]).parent.setid;if(!n.has(o))n.set(o,[]);n.get(o).push(e[r])}return e.forEach((r)=>{delete r.parent}),Array.from(n.values())}function zt(e){let s=(i)=>{let n=e.reduce((o,a)=>Math.max(o,a[i]+a.radius),Number.NEGATIVE_INFINITY),r=e.reduce((o,a)=>Math.min(o,a[i]-a.radius),Number.POSITIVE_INFINITY);return{max:n,min:r}};return{xRange:s("x"),yRange:s("y")}}function Ht(e,s,i){if(s==null)s=Math.PI/2;let n=Zt(e).map((f)=>Object.assign({},f)),r=Ie(n);for(let f of r){ke(f,s,i);let l=zt(f);f.size=(l.xRange.max-l.xRange.min)*(l.yRange.max-l.yRange.min),f.bounds=l}r.sort((f,l)=>l.size-f.size),n=r[0];let o=n.bounds,a=(o.xRange.max-o.xRange.min)/50;function c(f,l,v){if(!f)return;let x=f.bounds,M,k;if(l)M=o.xRange.max-x.xRange.min+a;else{M=o.xRange.max-x.xRange.max;let E=(x.xRange.max-x.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;if(E<0)M+=E}if(v)k=o.yRange.max-x.yRange.min+a;else{k=o.yRange.max-x.yRange.max;let E=(x.yRange.max-x.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;if(E<0)k+=E}for(let E of f)E.x+=M,E.y+=k,n.push(E)}let h=1;while(h<r.length)c(r[h],!0,!1),c(r[h+1],!1,!0),c(r[h+2],!0,!0),h+=3,o=zt(n);return Xt(n)}function Yt(e,s,i,n,r){let o=Zt(e);s-=2*n,i-=2*n;let{xRange:a,yRange:c}=zt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),e;let h,f;if(r){let M=Math.sqrt(r/Math.PI)*2;h=s/M,f=i/M}else h=s/(a.max-a.min),f=i/(c.max-c.min);let l=Math.min(f,h),v=(s-(a.max-a.min)*l)/2,x=(i-(c.max-c.min)*l)/2;return Xt(o.map((M)=>({radius:l*M.radius,x:n+v+(M.x-a.min)*l,y:n+x+(M.y-c.min)*l,setid:M.setid})))}function Xt(e){let s={};for(let i of e)s[i.setid]=i;return s}function Zt(e){return Object.keys(e).map((i)=>Object.assign(e[i],{setid:i}))}function Jt(e={}){let s=!1,i=600,n=350,r=15,o=1000,a=Math.PI/2,c=!0,h=null,f=!0,l=!0,v=null,x=null,M=!1,k=null,E=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,N={},D=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],T=0,p=function(m){if(m in N)return N[m];var d=N[m]=D[T];if(T+=1,T>=D.length)T=0;return d},I=Gt,S=xt;function u(m){let d=m.datum(),P=new Set;d.forEach((w)=>{if(w.size==0&&w.sets.length==1)P.add(w.sets[0])}),d=d.filter((w)=>!w.sets.some((K)=>P.has(K)));let _={},V={};if(d.length>0){let w=I(d,{lossFunction:S,distinct:M});if(c)w=Ht(w,a,x);_=Yt(w,i,n,r,h),V=$t(_,d,E)}let it={};d.forEach((w)=>{if(w.label)it[w.sets]=w.label});function Q(w){if(w.sets in it)return it[w.sets];if(w.sets.length==1)return""+w.sets[0]}m.selectAll("svg").data([_]).enter().append("svg");let G=m.select("svg");if(s)G.attr("viewBox",`0 0 ${i} ${n}`);else G.attr("width",i).attr("height",n);let L={},B=!1;G.selectAll(".venn-area path").each(function(w){let K=this.getAttribute("d");if(w.sets.length==1&&K&&!M)B=!0,L[w.sets[0]]=we(K)});function R(w){return(K)=>{let dt=w.sets.map((ut)=>{let ct=L[ut],nt=_[ut];if(!ct)ct={x:i/2,y:n/2,radius:1};if(!nt)nt={x:i/2,y:n/2,radius:1};return{x:ct.x*(1-K)+nt.x*K,y:ct.y*(1-K)+nt.y*K,radius:ct.radius*(1-K)+nt.radius*K}});return Vt(dt,k)}}let X=G.selectAll(".venn-area").data(d,(w)=>w.sets),tt=X.enter().append("g").attr("class",(w)=>`venn-area venn-${w.sets.length==1?"circle":"intersection"}${w.colour||w.color?" venn-coloured":""}`).attr("data-venn-sets",(w)=>w.sets.join("_")),Z=tt.append("path"),rt=tt.append("text").attr("class","label").text((w)=>Q(w)).attr("text-anchor","middle").attr("dy",".35em").attr("x",i/2).attr("y",n/2);if(l)Z.style("fill-opacity","0").filter((w)=>w.sets.length==1).style("fill",(w)=>w.colour?w.colour:w.color?w.color:p(w.sets)).style("fill-opacity",".25"),rt.style("fill",(w)=>{if(w.colour||w.color)return"#FFF";if(e.textFill)return e.textFill;return w.sets.length==1?p(w.sets):"#444"});function et(w){if(typeof w.transition==="function")return w.transition("venn").duration(o);return w}let J=m;if(B&&typeof J.transition==="function")J=et(m),J.selectAll("path").attrTween("d",R);else J.selectAll("path").attr("d",(w)=>Vt(w.sets.map((K)=>_[K])),k);let O=J.selectAll("text").filter((w)=>(w.sets in V)).text((w)=>Q(w)).attr("x",(w)=>Math.floor(V[w.sets].x)).attr("y",(w)=>Math.floor(V[w.sets].y));if(f)if(B)if("on"in O)O.on("end",It(_,Q));else O.each("end",It(_,Q));else O.each(It(_,Q));let lt=et(X.exit()).remove();if(typeof X.transition==="function")lt.selectAll("path").attrTween("d",R);let at=lt.selectAll("text").attr("x",i/2).attr("y",n/2);if(v!==null)rt.style("font-size","0px"),O.style("font-size",v),at.style("font-size","0px");return{circles:_,textCentres:V,nodes:X,enter:tt,update:J,exit:lt}}return u.wrap=function(m){if(!arguments.length)return f;return f=m,u},u.useViewBox=function(){return s=!0,u},u.width=function(m){if(!arguments.length)return i;return i=m,u},u.height=function(m){if(!arguments.length)return n;return n=m,u},u.padding=function(m){if(!arguments.length)return r;return r=m,u},u.distinct=function(m){if(!arguments.length)return M;return M=m,u},u.colours=function(m){if(!arguments.length)return p;return p=m,u},u.colors=function(m){if(!arguments.length)return p;return p=m,u},u.fontSize=function(m){if(!arguments.length)return v;return v=m,u},u.round=function(m){if(!arguments.length)return k;return k=m,u},u.duration=function(m){if(!arguments.length)return o;return o=m,u},u.layoutFunction=function(m){if(!arguments.length)return I;return I=m,u},u.normalize=function(m){if(!arguments.length)return c;return c=m,u},u.scaleToFit=function(m){if(!arguments.length)return h;return h=m,u},u.styled=function(m){if(!arguments.length)return l;return l=m,u},u.orientation=function(m){if(!arguments.length)return a;return a=m,u},u.orientationOrder=function(m){if(!arguments.length)return x;return x=m,u},u.lossFunction=function(m){if(!arguments.length)return S;return S=m==="default"?xt:m==="logRatio"?Kt:m,u},u}function It(e,s){return function(i){let n=this,r=e[i.sets[0]].radius||50,o=s(i)||"",a=o.split(/\s+/).reverse(),c=3,h=(o.length+a.length)/3,f=a.pop(),l=[f],v=0,x=1.1;n.textContent=null;let M=[];function k(p){let I=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return I.textContent=p,M.push(I),n.append(I),I}let E=k(f);while(!0){if(f=a.pop(),!f)break;l.push(f);let p=l.join(" ");if(E.textContent=p,p.length>h&&E.getComputedTextLength()>r)l.pop(),E.textContent=l.join(" "),l=[f],E=k(f),v++}let N=0.35-v*x/2,D=n.getAttribute("x"),T=n.getAttribute("y");M.forEach((p,I)=>{p.setAttribute("x",D),p.setAttribute("y",T),p.setAttribute("dy",`${N+I*x}em`)})}}function Mt(e,s,i){let n=s[0].radius-st(s[0],e);for(let r=1;r<s.length;++r){let o=s[r].radius-st(s[r],e);if(o<=n)n=o}for(let r=0;r<i.length;++r){let o=st(i[r],e)-i[r].radius;if(o<=n)n=o}return n}function Qt(e,s,i){let n=[];for(let l of e)n.push({x:l.x,y:l.y}),n.push({x:l.x+l.radius/2,y:l.y}),n.push({x:l.x-l.radius/2,y:l.y}),n.push({x:l.x,y:l.y+l.radius/2}),n.push({x:l.x,y:l.y-l.radius/2});let r=n[0],o=Mt(n[0],e,s);for(let l=1;l<n.length;++l){let v=Mt(n[l],e,s);if(v>=o)r=n[l],o=v}let a=Ut((l)=>-1*Mt({x:l[0],y:l[1]},e,s),[r.x,r.y],{maxIterations:500,minErrorDelta:0.0000000001}).x,c={x:i?0:a[0],y:a[1]},h=!0;for(let l of e)if(st(c,l)>l.radius){h=!1;break}for(let l of s)if(st(c,l)<l.radius){h=!1;break}if(h)return c;if(e.length==1)return{x:e[0].x,y:e[0].y};let f={};if(mt(e,f),f.arcs.length===0)return{x:0,y:-1000,disjoint:!0};if(f.arcs.length==1)return{x:f.arcs[0].circle.x,y:f.arcs[0].circle.y};if(s.length)return Qt(e,[]);return qt(f.arcs.map((l)=>l.p1))}function Me(e){let s={},i=Object.keys(e);for(let n of i)s[n]=[];for(let n=0;n<i.length;n++){let r=i[n],o=e[r];for(let a=n+1;a<i.length;++a){let c=i[a],h=e[c],f=st(o,h);if(f+h.radius<=o.radius+0.0000000001)s[c].push(r);else if(f+o.radius<=h.radius+0.0000000001)s[r].push(c)}}return s}function $t(e,s,i){let n={},r=Me(e);for(let o=0;o<s.length;++o){let a=s[o].sets,c={},h={};for(let x=0;x<a.length;++x){c[a[x]]=!0;let M=r[a[x]];for(let k=0;k<M.length;++k)h[M[k]]=!0}let f=[],l=[];for(let x in e)if(x in c)f.push(e[x]);else if(!(x in h))l.push(e[x]);let v=Qt(f,l,i);if(n[a]=v,v.disjoint&&s[o].size>0)console.log("WARNING: area "+a+" not represented on screen")}return n}function Se(e,s,i){let n=[];return n.push(`
|
|
2
|
-
M`,e,s),n.push(`
|
|
3
|
-
m`,-i,0),n.push(`
|
|
4
|
-
a`,i,i,0,1,0,i*2,0),n.push(`
|
|
5
|
-
a`,i,i,0,1,0,-i*2,0),n.join(" ")}function we(e){let s=e.split(" ");return{x:Number.parseFloat(s[1]),y:Number.parseFloat(s[2]),radius:-Number.parseFloat(s[4])}}function te(e){if(e.length===0)return[];let s={};return mt(e,s),s.arcs}function ee(e,s){if(e.length===0)return"M 0 0";let i=Math.pow(10,s||0),n=s!=null?(o)=>Math.round(o*i)/i:(o)=>o;if(e.length==1){let o=e[0].circle;return Se(n(o.x),n(o.y),n(o.radius))}let r=[`
|
|
6
|
-
M`,n(e[0].p2.x),n(e[0].p2.y)];for(let o of e){let a=n(o.circle.radius);r.push(`
|
|
7
|
-
A`,a,a,0,o.large?1:0,o.sweep?1:0,n(o.p1.x),n(o.p1.y))}return r.join(" ")}function Vt(e,s){return ee(te(e),s)}function se(e,s={}){let{lossFunction:i,layoutFunction:n=Gt,normalize:r=!0,orientation:o=Math.PI/2,orientationOrder:a,width:c=600,height:h=350,padding:f=15,scaleToFit:l=!1,symmetricalTextCentre:v=!1,distinct:x,round:M=2}=s,k=n(e,{lossFunction:i==="default"||!i?xt:i==="logRatio"?Kt:i,distinct:x});if(r)k=Ht(k,o,a);let E=Yt(k,c,h,f,l),N=$t(E,e,v),D=new Map(Object.keys(E).map((I)=>[I,{set:I,x:E[I].x,y:E[I].y,radius:E[I].radius}])),T=e.map((I)=>{let S=I.sets.map((d)=>D.get(d)),u=te(S),m=ee(u,M);return{circles:S,arcs:u,path:m,area:I,has:new Set(I.sets)}});function p(I){let S="";for(let u of T)if(u.has.size>I.length&&I.every((m)=>u.has.has(m)))S+=" "+u.path;return S}return T.map(({circles:I,arcs:S,path:u,area:m})=>({data:m,text:N[m.sets],circles:I,arcs:S,path:u,distinctPath:u+p(m.sets)}))}var Ct=function(){var e=t(function(T,p,I,S){for(I=I||{},S=T.length;S--;I[T[S]]=p);return I},"o"),s=[5,8],i=[7,8,11,12,17,19,22,24],n=[1,17],r=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],a=[1,31],c=[1,39],h=[7,8,11,12,17,19,22,24,27],f=[1,57],l=[1,56],v=[1,58],x=[1,59],M=[1,60],k=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:t(function(p,I,S,u,m,d,P){var _=d.length-1;switch(m){case 1:return d[_-1];case 2:case 3:case 4:this.$=[];break;case 5:d[_-1].push(d[_]),this.$=d[_-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=d[_];break;case 8:u.setDiagramTitle(d[_].substr(6)),this.$=d[_].substr(6);break;case 9:if(u.addSubsetData([d[_]],void 0,void 0),u.setIndentMode)u.setIndentMode(!0);break;case 10:if(u.addSubsetData([d[_-1]],d[_],void 0),u.setIndentMode)u.setIndentMode(!0);break;case 11:if(u.addSubsetData([d[_-2]],void 0,parseFloat(d[_])),u.setIndentMode)u.setIndentMode(!0);break;case 12:if(u.addSubsetData([d[_-3]],d[_-2],parseFloat(d[_])),u.setIndentMode)u.setIndentMode(!0);break;case 13:if(d[_].length<2)throw Error("union requires multiple identifiers");if(u.validateUnionIdentifiers)u.validateUnionIdentifiers(d[_]);if(u.addSubsetData(d[_],void 0,void 0),u.setIndentMode)u.setIndentMode(!0);break;case 14:if(d[_-1].length<2)throw Error("union requires multiple identifiers");if(u.validateUnionIdentifiers)u.validateUnionIdentifiers(d[_-1]);if(u.addSubsetData(d[_-1],d[_],void 0),u.setIndentMode)u.setIndentMode(!0);break;case 15:if(d[_-2].length<2)throw Error("union requires multiple identifiers");if(u.validateUnionIdentifiers)u.validateUnionIdentifiers(d[_-2]);if(u.addSubsetData(d[_-2],void 0,parseFloat(d[_])),u.setIndentMode)u.setIndentMode(!0);break;case 16:if(d[_-3].length<2)throw Error("union requires multiple identifiers");if(u.validateUnionIdentifiers)u.validateUnionIdentifiers(d[_-3]);if(u.addSubsetData(d[_-3],d[_-2],parseFloat(d[_])),u.setIndentMode)u.setIndentMode(!0);break;case 17:case 18:case 19:u.addTextData(d[_-1],d[_],void 0);break;case 20:case 21:u.addTextData(d[_-2],d[_-1],d[_]);break;case 23:u.addStyleData(d[_-1],d[_]);break;case 24:case 25:case 26:var V=u.getCurrentSets();if(!V)throw Error("text requires set");u.addTextData(V,d[_],void 0);break;case 27:case 28:var V=u.getCurrentSets();if(!V)throw Error("text requires set");u.addTextData(V,d[_-1],d[_]);break;case 29:case 41:this.$=[d[_]];break;case 30:case 42:this.$=[...d[_-2],d[_]];break;case 31:this.$=[d[_-2],d[_]];break;case 33:this.$=d[_].join(" ");break;case 34:this.$=[d[_]];break;case 35:d[_-1].push(d[_]),this.$=d[_-1];break;case 43:case 44:this.$=d[_];break}},"anonymous"),table:[e(s,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(i,[2,4],{6:5}),e(s,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(i,[2,5]),e(i,[2,6]),e(i,[2,7]),e(i,[2,8]),{13:16,20:n,21:r},{13:20,18:19,20:n,21:r},{13:20,18:21,20:n,21:r},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:r},e(i,[2,9],{14:[1,27],15:[1,28]}),e(o,[2,43]),e(o,[2,44]),e(i,[2,13],{14:[1,29],15:[1,30],27:a}),e(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:a},e(i,[2,22]),e(i,[2,24],{14:[1,35]}),e(i,[2,25],{14:[1,36]}),e(i,[2,26]),{20:c,25:37,26:38,27:a},e(i,[2,10],{15:[1,40]}),{16:[1,41]},e(i,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:r},e(i,[2,17],{14:[1,45]}),e(i,[2,18],{14:[1,46]}),e(i,[2,19]),e(i,[2,27]),e(i,[2,28]),e(i,[2,23],{27:[1,47]}),e(h,[2,29]),{15:[1,48]},{16:[1,49]},e(i,[2,11]),{16:[1,50]},e(i,[2,15]),e(o,[2,42]),e(i,[2,20]),e(i,[2,21]),{20:c,26:51},{16:f,20:l,21:[1,53],28:52,29:54,30:55,31:v,32:x,33:M},e(i,[2,12]),e(i,[2,16]),e(h,[2,30]),e(h,[2,31]),e(h,[2,32]),e(h,[2,33],{30:61,16:f,20:l,31:v,32:x,33:M}),e(k,[2,34]),e(k,[2,36]),e(k,[2,37]),e(k,[2,38]),e(k,[2,39]),e(k,[2,40]),e(k,[2,35])],defaultActions:{6:[2,1]},parseError:t(function(p,I){if(I.recoverable)this.trace(p);else{var S=Error(p);throw S.hash=I,S}},"parseError"),parse:t(function(p){var I=this,S=[0],u=[],m=[null],d=[],P=this.table,_="",V=0,it=0,Q=0,G=2,L=1,B=d.slice.call(arguments,1),R=Object.create(this.lexer),X={yy:{}};for(var tt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,tt))X.yy[tt]=this.yy[tt];if(R.setInput(p,X.yy),X.yy.lexer=R,X.yy.parser=this,typeof R.yylloc>"u")R.yylloc={};var Z=R.yylloc;d.push(Z);var rt=R.options&&R.options.ranges;if(typeof X.yy.parseError==="function")this.parseError=X.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function et(ot){S.length=S.length-2*ot,m.length=m.length-ot,d.length=d.length-ot}t(et,"popStack");function J(){var ot=u.pop()||R.lex()||L;if(typeof ot!=="number"){if(ot instanceof Array)u=ot,ot=u.pop();ot=I.symbols_[ot]||ot}return ot}t(J,"lex");var O,lt,at,w,K,dt,ut={},ct,nt,Ft,pt;while(!0){if(at=S[S.length-1],this.defaultActions[at])w=this.defaultActions[at];else{if(O===null||typeof O>"u")O=J();w=P[at]&&P[at][O]}if(typeof w>"u"||!w.length||!w[0]){var vt="";pt=[];for(ct in P[at])if(this.terminals_[ct]&&ct>G)pt.push("'"+this.terminals_[ct]+"'");if(R.showPosition)vt="Parse error on line "+(V+1)+`:
|
|
8
|
-
`+R.showPosition()+`
|
|
9
|
-
Expecting `+pt.join(", ")+", got '"+(this.terminals_[O]||O)+"'";else vt="Parse error on line "+(V+1)+": Unexpected "+(O==L?"end of input":"'"+(this.terminals_[O]||O)+"'");this.parseError(vt,{text:R.match,token:this.terminals_[O]||O,line:R.yylineno,loc:Z,expected:pt})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+O);switch(w[0]){case 1:if(S.push(O),m.push(R.yytext),d.push(R.yylloc),S.push(w[1]),O=null,!lt){if(it=R.yyleng,_=R.yytext,V=R.yylineno,Z=R.yylloc,Q>0)Q--}else O=lt,lt=null;break;case 2:if(nt=this.productions_[w[1]][1],ut.$=m[m.length-nt],ut._$={first_line:d[d.length-(nt||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(nt||1)].first_column,last_column:d[d.length-1].last_column},rt)ut._$.range=[d[d.length-(nt||1)].range[0],d[d.length-1].range[1]];if(dt=this.performAction.apply(ut,[_,it,V,X.yy,w[1],m,d].concat(B)),typeof dt<"u")return dt;if(nt)S=S.slice(0,-1*nt*2),m=m.slice(0,-1*nt),d=d.slice(0,-1*nt);S.push(this.productions_[w[1]][0]),m.push(ut.$),d.push(ut._$),Ft=P[S[S.length-2]][S[S.length-1]],S.push(Ft);break;case 3:return!0}}return!0},"parse")},N=function(){var T={EOF:1,parseError:t(function(I,S){if(this.yy.parser)this.yy.parser.parseError(I,S);else throw Error(I)},"parseError"),setInput:t(function(p,I){if(this.yy=I||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var I=p.match(/(?:\r\n?|\n).*/g);if(I)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),p},"input"),unput:t(function(p){var I=p.length,S=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var u=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1)this.yylineno-=S.length-1;var m=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===u.length?this.yylloc.first_column:0)+u[u.length-S.length].length-S[0].length:this.yylloc.first_column-I},this.options.ranges)this.yylloc.range=[m[0],m[0]+this.yyleng-I];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
10
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(p){this.unput(this.match.slice(p))},"less"),pastInput:t(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var p=this.match;if(p.length<20)p+=this._input.substr(0,20-p.length);return(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var p=this.pastInput(),I=Array(p.length+1).join("-");return p+this.upcomingInput()+`
|
|
11
|
-
`+I+"^"},"showPosition"),test_match:t(function(p,I){var S,u,m;if(this.options.backtrack_lexer){if(m={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)m.yylloc.range=this.yylloc.range.slice(0)}if(u=p[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],S=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(S)return S;else if(this._backtrack){for(var d in m)this[d]=m[d];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var p,I,S,u;if(!this._more)this.yytext="",this.match="";var m=this._currentRules();for(var d=0;d<m.length;d++)if(S=this._input.match(this.rules[m[d]]),S&&(!I||S[0].length>I[0].length)){if(I=S,u=d,this.options.backtrack_lexer)if(p=this.test_match(S,m[d]),p!==!1)return p;else if(this._backtrack){I=!1;continue}else return!1;else if(!this.options.flex)break}if(I){if(p=this.test_match(I,m[u]),p!==!1)return p;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
12
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var I=this.next();if(I)return I;else return this.lex()},"lex"),begin:t(function(I){this.conditionStack.push(I)},"begin"),popState:t(function(){var I=this.conditionStack.length-1;if(I>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(I){if(I=this.conditionStack.length-1-Math.abs(I||0),I>=0)return this.conditionStack[I];else return"INITIAL"},"topState"),pushState:t(function(I){this.begin(I)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(I,S,u,m){var d=m;switch(u){case 0:break;case 1:break;case 2:break;case 3:if(I.getIndentMode&&I.getIndentMode())return I.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:if(I.setIndentMode)I.setIndentMode(!1);this.begin("INITIAL"),this.unput(S.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(I.consumeIndentText)I.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return S.yytext=S.yytext.slice(2,-2),14;break;case 17:return S.yytext=S.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return T}();E.lexer=N;function D(){this.yy={}}return t(D,"Parser"),D.prototype=E,E.Parser=D,new D}();Ct.parser=Ct;var Ee=Ct,Dt=[],Rt=[],Nt=[],Ot=new Set,Lt,jt=!1,Te=t((e,s,i)=>{let n=bt(e).sort(),r=i??10/Math.pow(e.length,2);if(Lt=n,n.length===1)Ot.add(n[0]);Dt.push({sets:n,size:r,label:s?yt(s):void 0})},"addSubsetData"),ze=t(()=>Dt,"getSubsetData"),yt=t((e)=>{let s=e.trim();if(s.length>=2&&s.startsWith('"')&&s.endsWith('"'))return s.slice(1,-1);return s},"normalizeText"),Ce=t((e)=>e?yt(e):e,"normalizeStyleValue"),Re=t((e,s,i)=>{let n=yt(s);Rt.push({sets:bt(e).sort(),id:n,label:i?yt(i):void 0})},"addTextData"),Ne=t((e,s)=>{let i=bt(e).sort(),n={};for(let[r,o]of s)n[r]=Ce(o)??o;Nt.push({targets:i,styles:n})},"addStyleData"),Oe=t(()=>Nt,"getStyleData"),bt=t((e)=>e.map((s)=>yt(s)),"normalizeIdentifierList"),Le=t((e)=>{let i=bt(e).filter((n)=>!Ot.has(n));if(i.length>0)throw Error(`unknown set identifier: ${i.join(", ")}`)},"validateUnionIdentifiers"),je=t(()=>Rt,"getTextData"),Fe=t(()=>Lt,"getCurrentSets"),Pe=t(()=>jt,"getIndentMode"),Ve=t((e)=>{jt=e},"setIndentMode"),Be=Y.venn;function ie(){return ue(Be,C().venn)}t(ie,"getConfig");var qe=t(()=>{F(),Dt.length=0,Rt.length=0,Nt.length=0,Ot.clear(),Lt=void 0,jt=!1},"customClear"),Ue={getConfig:ie,clear:qe,setAccTitle:z,getAccTitle:j,setDiagramTitle:W,getDiagramTitle:q,getAccDescription:H,setAccDescription:U,addSubsetData:Te,getSubsetData:ze,addTextData:Re,addStyleData:Ne,validateUnionIdentifiers:Le,getTextData:je,getStyleData:Oe,getCurrentSets:Fe,getIndentMode:Pe,setIndentMode:Ve},Ge=t((e)=>`
|
|
13
|
-
.venn-title {
|
|
14
|
-
font-size: 32px;
|
|
15
|
-
fill: ${e.vennTitleTextColor};
|
|
16
|
-
font-family: ${e.fontFamily};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.venn-circle text {
|
|
20
|
-
font-size: 48px;
|
|
21
|
-
font-family: ${e.fontFamily};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.venn-intersection text {
|
|
25
|
-
font-size: 48px;
|
|
26
|
-
fill: ${e.vennSetTextColor};
|
|
27
|
-
font-family: ${e.fontFamily};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.venn-text-node {
|
|
31
|
-
font-family: ${e.fontFamily};
|
|
32
|
-
color: ${e.vennSetTextColor};
|
|
33
|
-
}
|
|
34
|
-
`,"getStyles"),We=Ge;function re(e){let s=new Map;for(let i of e){let n=i.targets.join("|"),r=s.get(n);if(r)Object.assign(r,i.styles);else s.set(n,{...i.styles})}return s}t(re,"buildStyleByKey");var Ke=t((e,s,i,n)=>{let r=n.db,o=r.getConfig?.(),{themeVariables:a,look:c,handDrawnSeed:h}=C(),f=c==="handDrawn",l=[a.venn1,a.venn2,a.venn3,a.venn4,a.venn5,a.venn6,a.venn7,a.venn8].filter(Boolean),v=r.getDiagramTitle?.(),x=r.getSubsetData(),M=r.getTextData(),k=re(r.getStyleData()),E=ae(x),N=o?.width??800,D=o?.height??450,T=1600,p=N/1600,I=v?48*p:0,S=a.primaryTextColor??a.textColor,u=Ae(s);if(u.attr("viewBox",`0 0 ${N} ${D}`),v)u.append("text").text(v).attr("class","venn-title").attr("font-size",`${32*p}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*p).style("fill",a.vennTitleTextColor||a.titleColor);let m=b(document.createElement("div")),d=Jt().width(N).height(D-I);m.datum(E).call(d);let P=f?y.svg(m.select("svg").node()):void 0,_=se(E,{width:N,height:D-I,padding:o?.padding??15}),V=new Map;for(let L of _){let B=ht([...L.data.sets].sort());V.set(B,L)}if(M.length>0)oe(o,V,m,M,p,k);let it=De(a.background||"#f4f4f4");if(m.selectAll(".venn-circle").each(function(L,B){let R=b(this),tt=ht([...L.sets].sort()),Z=k.get(tt),rt=l.length>0?l[B%l.length]:void 0,et=Z?.fill||rt||a.primaryColor;R.classed(`venn-set-${B%8}`,!0);let J=Z?.["fill-opacity"]??0.1,O=Z?.stroke||et,lt=Z?.["stroke-width"]||`${5*p}`;if(f&&P){let w=V.get(tt);if(w&&w.circles.length>0){let K=w.circles[0],dt=P.circle(K.x,K.y,K.radius*2,{roughness:0.7,seed:h,fill:kt(et,0.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+B*60,stroke:O,strokeWidth:parseFloat(String(lt))});R.select("path").remove(),R.node()?.insertBefore(dt,R.select("text").node())}}else R.select("path").style("fill",et).style("fill-opacity",J).style("stroke",O).style("stroke-width",lt).style("stroke-opacity",0.95);let at=Z?.color||(it?g(et,30):A(et,30));R.select("text").style("font-size",`${48*p}px`).style("fill",at)}),f&&P)m.selectAll(".venn-intersection").each(function(L){let B=b(this),X=ht([...L.sets].sort()),tt=k.get(X),Z=tt?.fill;if(Z){let rt=B.select("path"),et=rt.attr("d");if(et){let J=P.path(et,{roughness:0.7,seed:h,fill:kt(Z,0.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),O=rt.node();O?.parentNode?.insertBefore(J,O),rt.remove()}}else B.select("path").style("fill-opacity",0);B.select("text").style("font-size",`${48*p}px`).style("fill",tt?.color??a.vennSetTextColor??S)});else m.selectAll(".venn-intersection text").style("font-size",`${48*p}px`).style("fill",(L)=>{let R=ht([...L.sets].sort());return k.get(R)?.color??a.vennSetTextColor??S}),m.selectAll(".venn-intersection path").style("fill-opacity",(L)=>{let R=ht([...L.sets].sort());return k.get(R)?.fill?1:0}).style("fill",(L)=>{let R=ht([...L.sets].sort());return k.get(R)?.fill??"transparent"});let Q=u.append("g").attr("transform",`translate(0, ${I})`),G=m.select("svg").node();if(G&&"childNodes"in G)for(let L of[...G.childNodes])Q.node()?.appendChild(L);ne(u,D,N,o?.useMaxWidth??!0)},"draw");function ht(e){return e.join("|")}t(ht,"stableSetsKey");function oe(e,s,i,n,r,o){let a=e?.useDebugLayout??!1,h=i.select("svg").append("g").attr("class","venn-text-nodes"),f=new Map;for(let l of n){let v=ht(l.sets),x=f.get(v);if(x)x.push(l);else f.set(v,[l])}for(let[l,v]of f.entries()){let x=s.get(l);if(!x?.text)continue;let M=x.text.x,k=x.text.y,E=Math.min(...x.circles.map((G)=>G.radius)),N=Math.min(...x.circles.map((G)=>G.radius-Math.hypot(M-G.x,k-G.y))),D=Number.isFinite(N)?Math.max(0,N):0;if(D===0&&Number.isFinite(E))D=E*0.6;let T=h.append("g").attr("class","venn-text-area").attr("font-size",`${40*r}px`);if(a)T.append("circle").attr("class","venn-text-debug-circle").attr("cx",M).attr("cy",k).attr("r",D).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*r).attr("stroke-dasharray",`${6*r} ${4*r}`);let p=Math.max(80*r,D*2*0.95),I=Math.max(60*r,D*2*0.95),m=(x.data.label&&x.data.label.length>0?Math.min(32*r,D*0.25):0)+(v.length<=2?30*r:0),d=M-p/2,P=k-I/2+m,_=Math.max(1,Math.ceil(Math.sqrt(v.length))),V=Math.max(1,Math.ceil(v.length/_)),it=p/_,Q=I/V;for(let[G,L]of v.entries()){let B=G%_,R=Math.floor(G/_),X=d+it*(B+0.5),tt=P+Q*(R+0.5);if(a)T.append("rect").attr("class","venn-text-debug-cell").attr("x",d+it*B).attr("y",P+Q*R).attr("width",it).attr("height",Q).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*r).attr("stroke-dasharray",`${4*r} ${3*r}`);let Z=it*0.9,rt=Q*0.9,et=T.append("foreignObject").attr("class","venn-text-node-fo").attr("width",Z).attr("height",rt).attr("x",X-Z/2).attr("y",tt-rt/2).attr("overflow","visible"),J=o.get(L.id)?.color,O=et.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(L.label??L.id);if(J)O.style("color",J)}}}t(oe,"renderTextNodes");function ae(e){let s=new Set(e.map((r)=>[...r.sets].sort().join("|"))),i=new Map(e.filter((r)=>r.sets.length===1&&r.size!==void 0).map((r)=>[r.sets[0],r.size])),n=[];for(let r of e){if(r.sets.length<3)continue;let o=[...r.sets].sort();for(let a=0;a<o.length-1;a++)for(let c=a+1;c<o.length;c++){let h=[o[a],o[c]],f=h.join("|");if(!s.has(f)){s.add(f);let l=i.get(h[0]),v=i.get(h[1]),x=l!==void 0&&v!==void 0?Math.min(l,v)/4:2.5;n.push({sets:h,size:x,label:""})}}}return n.length>0?[...e,...n]:e}t(ae,"ensurePairwiseSubsets");var He={draw:Ke},rn={parser:Ee,db:Ue,renderer:He,styles:We};export{rn as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Og}from"./index-excgtjhx.js";export{Og as createWardleyServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ci}from"./index-qccydkze.js";import"./index-a145x0w2.js";export{Ci as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hA}from"./index-twwsn91p.js";export{hA as default};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The caller's socket address, captured by the auth gate for the login route.
|
|
8
|
-
*
|
|
9
|
-
* The address is only reachable from Elysia's handler context (`server.requestIP`),
|
|
10
|
-
* which the ported route modules never receive — they get `{ request, params }`
|
|
11
|
-
* and nothing else. The gate runs before every handler and does receive it, so it
|
|
12
|
-
* records the address against the `Request` object and the login route reads it
|
|
13
|
-
* back.
|
|
14
|
-
*
|
|
15
|
-
* A `WeakMap` keyed by the `Request` is safe here specifically because the gate
|
|
16
|
-
* and the handler are handed the SAME object (verified on Elysia 1.4.30). It is
|
|
17
|
-
* also self-cleaning: the entry disappears with the request.
|
|
18
|
-
*
|
|
19
|
-
* ## Why `x-forwarded-for` is read, and only from loopback
|
|
20
|
-
*
|
|
21
|
-
* The header is caller-supplied, so a rate limit keyed on it unconditionally is
|
|
22
|
-
* trivially evaded — that was the original rule, and it is still right for a
|
|
23
|
-
* direct connection. But a tunnel breaks the other way: `cloudflared` and
|
|
24
|
-
* `tailscale serve` both connect to this server from `127.0.0.1`, so EVERY
|
|
25
|
-
* client behind a tunnel shares one socket address. Ten failed logins from an
|
|
26
|
-
* attacker anywhere on the internet then locked the owner out for fifteen
|
|
27
|
-
* minutes — a denial of service against the person the limit exists to protect.
|
|
28
|
-
*
|
|
29
|
-
* The condition is therefore the socket, not the header: the forwarded value is
|
|
30
|
-
* used only when the connection itself came from loopback. A remote attacker
|
|
31
|
-
* cannot make their own socket address loopback, and a local process that can
|
|
32
|
-
* forge the header already has the machine.
|
|
33
|
-
*
|
|
34
|
-
* NOTE: there is deliberately no `clientAddressFromContext(context)` here.
|
|
35
|
-
*
|
|
36
|
-
* One existed, and calling it from the auth hook made every POST arrive with an
|
|
37
|
-
* already-consumed body — `request.bodyUsed === true` before any handler ran, so
|
|
38
|
-
* the login route parsed an empty body and rejected a correct password.
|
|
39
|
-
*
|
|
40
|
-
* Measured on Bun 1.4.2 + Elysia 1.4.30: `authGate(c.request,
|
|
41
|
-
* clientAddressFromContext(c))` lost the body, while the identical logic written
|
|
42
|
-
* inline kept it, and the same held for a helper whose entire body was
|
|
43
|
-
* `'request' in c` — the trigger is handing this context to any function, not
|
|
44
|
-
* the logic inside it. `src/server/index.ts` therefore reads `server.requestIP`
|
|
45
|
-
* inline. This module keeps only the WeakMap half, which is reached from a plain
|
|
46
|
-
* `Request` and is unaffected.
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
import { UNKNOWN_CLIENT_KEY } from '@/server/lib/auth/rate-limit';
|
|
50
|
-
|
|
51
|
-
const addresses = new WeakMap<Request, string>();
|
|
52
|
-
|
|
53
|
-
/** Whether a socket address is this machine talking to itself. */
|
|
54
|
-
function isLoopback(address: string): boolean {
|
|
55
|
-
return address === '127.0.0.1' || address === '::1' || address === '::ffff:127.0.0.1';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The address a rate limit should key on.
|
|
60
|
-
*
|
|
61
|
-
* Behind a tunnel the socket is loopback for every client, so the forwarded
|
|
62
|
-
* value is the only thing that distinguishes them. It is trusted ONLY in that
|
|
63
|
-
* case — see the module comment for why the socket, not the header, is the
|
|
64
|
-
* condition.
|
|
65
|
-
*/
|
|
66
|
-
export function effectiveClientAddress(request: Request, socketAddress: string | undefined): string {
|
|
67
|
-
if (!socketAddress) return UNKNOWN_CLIENT_KEY;
|
|
68
|
-
if (!isLoopback(socketAddress)) return socketAddress;
|
|
69
|
-
const forwarded = request.headers.get('x-forwarded-for');
|
|
70
|
-
if (!forwarded) return socketAddress;
|
|
71
|
-
const first = forwarded.split(',')[0]?.trim();
|
|
72
|
-
return first || socketAddress;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/** Record the socket address for `request`. Called by the auth gate. */
|
|
76
|
-
export function rememberClientAddress(request: Request, address: string | undefined): void {
|
|
77
|
-
addresses.set(request, effectiveClientAddress(request, address));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The socket address recorded for `request`, or the shared unknown-client key.
|
|
82
|
-
*
|
|
83
|
-
* Falling back to a single shared key (rather than to per-request randomness)
|
|
84
|
-
* is what keeps an unidentifiable caller throttled: they draw from the small
|
|
85
|
-
* shared budget instead of getting a fresh one.
|
|
86
|
-
*/
|
|
87
|
-
export function clientAddressFor(request: Request): string {
|
|
88
|
-
return addresses.get(request) ?? UNKNOWN_CLIENT_KEY;
|
|
89
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* UI-auth state for ONE run of the server.
|
|
8
|
-
*
|
|
9
|
-
* There is no stored password. A password is supplied per invocation — through
|
|
10
|
-
* `--ui-password` or `KABMO_UI_PASSWORD` — hashed in memory at boot, and
|
|
11
|
-
* forgotten when the process exits. A plain `bun run dev` therefore runs with no
|
|
12
|
-
* authentication, which is the default: a file on disk must not be able to
|
|
13
|
-
* decide that a server the user started needs a credential they never set.
|
|
14
|
-
*
|
|
15
|
-
* The only thing persisted is the SESSION SIGNING SECRET, and it holds no
|
|
16
|
-
* password. It is persisted for one reason: `bun run --hot` re-evaluates the
|
|
17
|
-
* server entry on every save, so an in-memory secret would log the user out on
|
|
18
|
-
* each edit — a dev loop that punishes the person using it. A file that only
|
|
19
|
-
* signs cookies can be shared across restarts without ever being able to enable
|
|
20
|
-
* authentication on its own.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import fs from 'fs';
|
|
24
|
-
import { scryptSync } from 'node:crypto';
|
|
25
|
-
|
|
26
|
-
import { getAuthPath, getDataDir } from '@kabmo-labs/kabmo-paths/paths';
|
|
27
|
-
|
|
28
|
-
/** Shape of the persisted secret file. `version` guards a future change. */
|
|
29
|
-
export interface AuthSecretFile {
|
|
30
|
-
version: 2;
|
|
31
|
-
/** HMAC key for session tokens. Never a password, and never sufficient to log in. */
|
|
32
|
-
sessionSecret: string;
|
|
33
|
-
updatedAt: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** The auth state of the running process. Null means authentication is off. */
|
|
37
|
-
export interface ActiveAuthConfig {
|
|
38
|
-
/** argon2id hash of the password supplied for this run. */
|
|
39
|
-
passwordHash: string;
|
|
40
|
-
/**
|
|
41
|
-
* Deterministic scrypt-derived key for THIS password and THIS secret. It is
|
|
42
|
-
* what a session's fingerprint binds to; unlike {@link passwordHash} it is
|
|
43
|
-
* stable across restarts, which is what keeps a session alive through one.
|
|
44
|
-
*/
|
|
45
|
-
credentialKey: string;
|
|
46
|
-
/** Signs session cookies; survives restarts so sessions do too. */
|
|
47
|
-
sessionSecret: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The stored session secret, or null when there is none.
|
|
52
|
-
*
|
|
53
|
-
* Any object carrying a non-empty `sessionSecret` is accepted, including the
|
|
54
|
-
* retired v1 shape — reusing it means upgrading does not sign every logged-in
|
|
55
|
-
* user out. The `passwordHash` that file may also carry is deliberately NOT
|
|
56
|
-
* read: under this design a stored hash can never enable authentication.
|
|
57
|
-
*/
|
|
58
|
-
export async function readSessionSecret(): Promise<string | null> {
|
|
59
|
-
try {
|
|
60
|
-
const parsed: unknown = JSON.parse(await Bun.file(getAuthPath()).text());
|
|
61
|
-
if (!parsed || typeof parsed !== 'object') return null;
|
|
62
|
-
const secret = (parsed as Record<string, unknown>).sessionSecret;
|
|
63
|
-
return typeof secret === 'string' && secret.length > 0 ? secret : null;
|
|
64
|
-
} catch {
|
|
65
|
-
// Absent, unreadable or malformed all mean "no secret to reuse": a fresh one
|
|
66
|
-
// is generated, which is a logout rather than an error.
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Persist the session secret (temp file + rename, mode 0600). Returns false
|
|
73
|
-
* instead of throwing when the data directory is not writable — the run
|
|
74
|
-
* continues with the secret it generated, it just will not survive a restart.
|
|
75
|
-
*/
|
|
76
|
-
export async function writeSessionSecret(sessionSecret: string): Promise<boolean> {
|
|
77
|
-
const target = getAuthPath();
|
|
78
|
-
const temp = `${target}.${process.pid}.tmp`;
|
|
79
|
-
const contents: AuthSecretFile = { version: 2, sessionSecret, updatedAt: new Date().toISOString() };
|
|
80
|
-
try {
|
|
81
|
-
fs.mkdirSync(getDataDir(), { recursive: true, mode: 0o700 });
|
|
82
|
-
fs.writeFileSync(temp, `${JSON.stringify(contents, null, 2)}\n`, { mode: 0o600 });
|
|
83
|
-
fs.renameSync(temp, target);
|
|
84
|
-
return true;
|
|
85
|
-
} catch {
|
|
86
|
-
try {
|
|
87
|
-
fs.rmSync(temp, { force: true });
|
|
88
|
-
} catch {
|
|
89
|
-
// Best-effort cleanup only.
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/** Hash a password for this run. argon2id, ~70 ms — the brute-force floor. */
|
|
96
|
-
export function hashPassword(password: string): Promise<string> {
|
|
97
|
-
return Bun.password.hash(password, { algorithm: 'argon2id' });
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Verify a candidate against the run's hash.
|
|
102
|
-
*
|
|
103
|
-
* `Bun.password.verify` compares in constant time and answers false for a
|
|
104
|
-
* malformed hash rather than throwing, so a corrupted value reads as "wrong
|
|
105
|
-
* password" — the outcome the user can act on.
|
|
106
|
-
*/
|
|
107
|
-
export function verifyPassword(candidate: string, passwordHash: string): Promise<boolean> {
|
|
108
|
-
return Bun.password.verify(candidate, passwordHash);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* The value a session's fingerprint binds to, for a password and a secret.
|
|
113
|
-
*
|
|
114
|
-
* DETERMINISTIC on purpose: the same password with the same session secret must
|
|
115
|
-
* produce the same key on every boot, because the fingerprint is what makes a
|
|
116
|
-
* token fail after a password change and the token must otherwise survive a
|
|
117
|
-
* restart. `passwordHash` cannot serve as that value — its argon2 salt is
|
|
118
|
-
* random per boot, so a restart with the SAME password minted a new hash and
|
|
119
|
-
* invalidated every session (measured: a token valid before a second `initAuth`
|
|
120
|
-
* call was rejected after it, with the persisted secret correctly reused). The
|
|
121
|
-
* stated point of persisting the secret — "a restart keeps its sessions" — was
|
|
122
|
-
* therefore not delivered at all.
|
|
123
|
-
*
|
|
124
|
-
* argon2's own `salt` option is not an alternative (verified on Bun 1.4.2: two
|
|
125
|
-
* hashes with the same salt still differ), so the derivation is scrypt, salted
|
|
126
|
-
* with the SECRET and memory-hard for the same reason the verifier is. Nothing
|
|
127
|
-
* is persisted: the secret comes from `auth.json` and the password from the
|
|
128
|
-
* command line, so a leaked cookie plus that file is what an attacker would
|
|
129
|
-
* need to brute-force against, exactly as before.
|
|
130
|
-
*/
|
|
131
|
-
export function deriveCredentialKey(password: string, sessionSecret: string): string {
|
|
132
|
-
return scryptSync(password, sessionSecret, 32, { N: 1 << 14, r: 8, p: 1 }).toString('base64url');
|
|
133
|
-
}
|