@kabmo-labs/kabmo 0.43.1 → 0.45.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/dist/client/index.html +1 -1
- package/dist/client/index.js +337 -337
- package/dist/client/static/js/{CsvGrid-g67pk2zy.js → CsvGrid-z74weshk.js} +2 -2
- package/dist/client/static/js/{DocxView-pyh6p2kb.js → DocxView-dpe5x9ab.js} +5 -5
- package/dist/client/static/js/{DrawioView-g48r6y2m.js → DrawioView-ftzwjf8v.js} +2 -2
- package/dist/client/static/js/ImageView-vchn6wyq.js +1 -0
- package/dist/client/static/js/LayoutWrapper-1x0gnppc.js +2 -0
- package/dist/client/static/js/{Modal-edw446r8.js → Modal-tteg7vtb.js} +20 -20
- package/dist/client/static/js/{PdfView-6z3cgj37.js → PdfView-vjec8z3z.js} +1 -1
- package/dist/client/static/js/SessionsView-g7z3fxbp.js +1 -0
- package/dist/client/static/js/{SheetView-64076z1j.js → SheetView-hhtfkdhe.js} +25 -25
- package/dist/client/static/js/{SvgPreview-dmpgavgd.js → SvgPreview-48n3ex6p.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-nfz5z1vw.js → abnfDiagram-O67JEVCF-bpvzdara.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bch3nye9.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-jra2jyzw.js → architectureDiagram-NJMV4G6O-xw62cr7j.js} +11 -11
- package/dist/client/static/js/{astro-dpfdhc5e.js → astro-56b0as3q.js} +1 -1
- package/dist/client/static/js/bash-mevzaywf.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-3szktxam.js → blockDiagram-BEXU5L5S-x3a6cgar.js} +6 -6
- package/dist/client/static/js/c-y1y6v00q.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-xe9vbppt.js → c4Diagram-YGBWAQC7-katvaxbj.js} +6 -6
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-egzhj1xn.js → classDiagram-v2-NBCMYWYE-bjz4mqqh.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-dfrk1wnr.js → cose-bilkent-JH36ORCC-fsn80psf.js} +1 -1
- package/dist/client/static/js/cpp-wk9z0c5g.js +1 -0
- package/dist/client/static/js/css-3w3p9s67.js +1 -0
- package/dist/client/static/js/css-g85rwzty.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-vqy5jtnk.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-xefpcmpg.js → cynefinDiagram-VND7K2PF-cfhbsnkm.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-vtzjnrt9.js → dagre-6A5THRUB-j2wt7ns6.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-4vvn790v.js → diagram-22UHCM2B-abrdj714.js} +21 -21
- package/dist/client/static/js/{diagram-3UASUU5V-tmht3bew.js → diagram-3UASUU5V-dbn15bxn.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-p5wa5ztx.js → diagram-ATOU4E4O-y79pwf7w.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-8myesjfc.js → diagram-CDSNMT55-f8ryt86n.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-9t3x2d5f.js → diagram-MLGK6HIB-ws7wn3q9.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-8ahgnmhy.js → diagram-MPIPVDR6-zmznrg13.js} +2 -2
- package/dist/client/static/js/{dockerfile-x8aa0543.js → dockerfile-qgc921kw.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-5semw111.js → ebnfDiagram-ZINNZB2B-y5q7hy1v.js} +1 -1
- package/dist/client/static/js/{elixir-5ewfhvfh.js → elixir-12pgbgtq.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-jmhs58ww.js → elk-276RUBZZ-vddwbn6q.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-31wvbpdr.js → erDiagram-OPXOYQCR-qdqcx4g4.js} +6 -6
- package/dist/client/static/js/{erlang-jqqa3ehb.js → erlang-811btv6p.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-65ph4s3m.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-nh2tb65b.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-c2dycjrf.js → ganttDiagram-FUAMR5RP-763hk9rm.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-t45ekjb6.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-y4k4pdd8.js → gitGraphDiagram-X574FWY7-bgx1q5nw.js} +10 -10
- package/dist/client/static/js/graphql-027z8sc0.js +1 -0
- package/dist/client/static/js/html-fqda6wxx.js +1 -0
- package/dist/client/static/js/{index-38v0781h.js → index-03j5j1j0.js} +2 -2
- package/dist/client/static/js/{index-3588r3wg.js → index-05hx4ftf.js} +2 -2
- package/dist/client/static/js/index-0vk6v4y4.js +2 -0
- package/dist/client/static/js/{index-7dp90ad1.js → index-1nwwvv29.js} +2 -2
- package/dist/client/static/js/{index-aar68x31.js → index-228yzebd.js} +5 -5
- package/dist/client/static/js/{index-xf36nmbm.js → index-2b1wnvez.js} +2 -2
- package/dist/client/static/js/index-34ff2vq6.js +2 -0
- package/dist/client/static/js/{index-6fpd55cq.js → index-3d21hpk7.js} +2 -2
- package/dist/client/static/js/{index-181p91hf.js → index-3h2mr90j.js} +2 -2
- package/dist/client/static/js/{index-efra065v.js → index-3sqndc9n.js} +2 -2
- package/dist/client/static/js/{index-kc5znr75.js → index-47wn2gjx.js} +2 -2
- package/dist/client/static/js/{index-nt7nhchn.js → index-4b5b6g0k.js} +1 -1
- package/dist/client/static/js/index-5b2vsbcf.js +1 -0
- package/dist/client/static/js/index-5mrqfs82.js +12 -0
- package/dist/client/static/js/{index-m94f4ngb.js → index-61j9qkck.js} +3 -3
- package/dist/client/static/js/index-6bm4pw90.css +1 -0
- package/dist/client/static/js/{index-qhytrsyb.js → index-6sqmhdyv.js} +2 -2
- package/dist/client/static/js/{index-jz93j0at.js → index-8dtp7mt0.js} +2 -2
- package/dist/client/static/js/index-a11ptyzf.js +1 -0
- package/dist/client/static/js/index-acphtw1r.js +2 -0
- package/dist/client/static/js/{index-s78n0dtv.js → index-as1wptfa.js} +2 -2
- package/dist/client/static/js/index-cj39b26c.js +1 -0
- package/dist/client/static/js/index-dgjerk4w.js +3 -0
- package/dist/client/static/js/{index-sesghshh.js → index-dmv2zasz.js} +2 -2
- package/dist/client/static/js/index-dn6pqym4.js +9 -0
- package/dist/client/static/js/{index-ynaxep06.js → index-ehg2ftnp.js} +2 -2
- package/dist/client/static/js/{index-e7yf273s.js → index-f51jxezc.js} +2 -2
- package/dist/client/static/js/index-f7paep2f.js +2 -0
- package/dist/client/static/js/index-f98dhbt4.js +4 -0
- package/dist/client/static/js/{index-ys0xpw3q.js → index-fbct0jcf.js} +2 -2
- package/dist/client/static/js/index-fqatn0vh.js +1 -0
- package/dist/client/static/js/{index-bvjct7sp.js → index-gcwmpfr4.js} +2 -2
- package/dist/client/static/js/{index-cgzw43bc.js → index-gmq5pbcv.js} +67 -67
- package/dist/client/static/js/{index-q81rxwh7.js → index-gzafyqsr.js} +43 -43
- package/dist/client/static/js/{index-gmnmnfm0.js → index-gzp4j2h5.js} +2 -2
- package/dist/client/static/js/{index-cjhvtzdd.js → index-h0rmkz9n.js} +2 -2
- package/dist/client/static/js/{index-sk9ej289.js → index-jaqjvk22.js} +2 -2
- package/dist/client/static/js/{index-pt8440xh.js → index-jpp0zm7t.js} +15 -15
- package/dist/client/static/js/index-kg2sk8cf.js +1 -0
- package/dist/client/static/js/index-mrw7qweg.js +1 -0
- package/dist/client/static/js/index-mwm8aptp.js +1 -0
- package/dist/client/static/js/{index-yvgbr7ek.js → index-n1ga63de.js} +2 -2
- package/dist/client/static/js/{index-cqnpsw2m.js → index-nzhwd6t3.js} +2 -2
- package/dist/client/static/js/{index-vyw4tbn8.js → index-p21mvqc2.js} +2 -2
- package/dist/client/static/js/{index-fjnkzk12.js → index-pfj3sd1n.js} +3 -3
- package/dist/client/static/js/{index-fg965t62.js → index-pxq4v81r.js} +2 -2
- package/dist/client/static/js/index-q76jfb54.js +1 -0
- package/dist/client/static/js/{index-m9s9rg5k.js → index-qt9jc4ck.js} +2 -2
- package/dist/client/static/js/{index-48pb18zj.js → index-r6e44vkx.js} +2 -2
- package/dist/client/static/js/{index-2cbnjc32.js → index-szk3vk8h.js} +2 -2
- package/dist/client/static/js/{index-ycks7gyg.js → index-t0yv1375.js} +2 -2
- package/dist/client/static/js/{index-0c6vpk89.js → index-vgcm2g0g.js} +2 -2
- package/dist/client/static/js/{index-f7djda1g.js → index-vkerrwpa.js} +2 -2
- package/dist/client/static/js/{index-dkwhs38j.js → index-w57zbym7.js} +2 -2
- package/dist/client/static/js/{index-n9scbxy5.js → index-wqrdgt1g.js} +2 -2
- package/dist/client/static/js/{index-j17h4z6f.js → index-x2wvq4ae.js} +2 -2
- package/dist/client/static/js/{index-2b46dzw8.js → index-x7rfmwg8.js} +4 -4
- package/dist/client/static/js/{index-f77c3ag0.js → index-xkwybnf3.js} +200 -200
- package/dist/client/static/js/info-A6RAGUB7-mw29xbwf.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-z3pqx7w8.js → infoDiagram-VRGFBTTK-e66pw8d9.js} +1 -1
- package/dist/client/static/js/ini-3cx6tmv4.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-f5v6z8yr.js → ishikawaDiagram-OU5B5YK6-ehc0q24d.js} +3 -3
- package/dist/client/static/js/java-zs6qh1dm.js +1 -0
- package/dist/client/static/js/javascript-b9mkygak.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-js1yxatk.js → journeyDiagram-ZHPQQLJL-hye05qtd.js} +5 -5
- package/dist/client/static/js/json-qn73s8xb.js +1 -0
- package/dist/client/static/js/jsx-gahhfczw.js +1 -0
- package/dist/client/static/js/{julia-0h9krgsd.js → julia-mgsev9df.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-m0a6069c.js → kanban-definition-PNTS6WVX-vce614m8.js} +7 -7
- package/dist/client/static/js/lua-d8enp14s.js +1 -0
- package/dist/client/static/js/markdown-qetaj4vp.js +1 -0
- package/dist/client/static/js/{mermaid.core-6xvbnm63.js → mermaid.core-gc79re5p.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-a9f9yzc0.js → mindmap-definition-NLK3R4M7-ft1whaf5.js} +3 -3
- package/dist/client/static/js/one-dark-pro-rvg5xm1a.js +1 -0
- package/dist/client/static/js/one-light-2b5w3ksh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-md85wpjq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-4v4pf1h1.js → pegDiagram-GJSIUBJH-2s4ykhaa.js} +1 -1
- package/dist/client/static/js/{perl-rptyx23q.js → perl-6n93vjsa.js} +1 -1
- package/dist/client/static/js/{php-sagvq3wz.js → php-w23nmbtc.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-4grcqnp8.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-a54yrmfm.js → pieDiagram-5QR66LMP-7h8dp0z3.js} +2 -2
- package/dist/client/static/js/properties-g6tpq003.js +1 -0
- package/dist/client/static/js/python-cy06fzhg.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-1twhvnp2.js → quadrantDiagram-O4NWA36T-pteyxjxr.js} +6 -6
- package/dist/client/static/js/r-vw8berfv.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-7j9prhg1.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-g8x2jps1.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-cbg7k68h.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-xfvjk9f8.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-7w97805z.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-83tqfdcy.js → railroadDiagram-XR7U4H2S-68z9wdt0.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-73e3pzw6.js → requirementDiagram-PLB6GJNP-c08nmey6.js} +4 -4
- package/dist/client/static/js/{ruby-9qyx7knh.js → ruby-ag3b3t9t.js} +1 -1
- package/dist/client/static/js/{rust-jds4e4r7.js → rust-ke5ec0w5.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-1bzwj6sb.js → sankeyDiagram-IPEJSGJF-2r3kvjs5.js} +5 -5
- package/dist/client/static/js/{sass-07rteya0.js → sass-x0eez0kp.js} +1 -1
- package/dist/client/static/js/{scss-e2dndbfa.js → scss-qycakpjn.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-yh3h988k.js → sequenceDiagram-PO4LG4MO-ctjycd88.js} +19 -19
- package/dist/client/static/js/{sizeCapture-INFHLROL-1n121yp6.js → sizeCapture-INFHLROL-97ndea95.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-0tdrzn06.js → stateDiagram-v2-GCMORJYK-aqnmsb96.js} +5 -5
- package/dist/client/static/js/{svelte-w365cpwa.js → svelte-tg19by0f.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-77n1ttdw.js → swimlanes-2SLR337P-v50cx1nx.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-e227mz39.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-b6r0k3e8.js → timeline-definition-EJHVYXUP-1ggrtdcj.js} +7 -7
- package/dist/client/static/js/treeView-Q6P3EWNA-xhf1r6c3.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-4n3j7ekq.js +1 -0
- package/dist/client/static/js/tsx-3dzv8h6k.js +1 -0
- package/dist/client/static/js/typescript-44vs0wn4.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-efq58m3m.js → usecaseDiagram-POWQR4AR-ybcwhpzs.js} +39 -39
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-ad4gvd5r.js → vennDiagram-UO4OBE2U-p9ggrt07.js} +8 -8
- package/dist/client/static/js/{vue-d6cesny1.js → vue-mhj4sme0.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-fb0py35r.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-v89tys2p.js → wardleyDiagram-VNRHLVJA-v79nb9kx.js} +4 -4
- package/dist/client/static/js/xml-yvv5fn3k.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-xtgzmknw.js → xychartDiagram-PMCCYNJV-43thqscz.js} +5 -5
- package/dist/client/static/js/yaml-avewh7n5.js +1 -0
- package/marketplace/marketplace.json +7 -0
- package/marketplace/plugins/github-actions/README.md +142 -0
- package/marketplace/plugins/github-actions/icon.svg +12 -0
- package/marketplace/plugins/github-actions/package.json +30 -0
- package/marketplace/plugins/github-actions/settings-schema.json +27 -0
- package/marketplace/plugins/github-actions/src/app.tsx +32 -0
- package/marketplace/plugins/github-actions/src/panel/Actions.tsx +105 -0
- package/marketplace/plugins/github-actions/src/panel/LogView.tsx +76 -0
- package/marketplace/plugins/github-actions/src/panel/Row.tsx +59 -0
- package/marketplace/plugins/github-actions/src/panel/RunView.tsx +197 -0
- package/marketplace/plugins/github-actions/src/panel/format.ts +74 -0
- package/marketplace/plugins/github-actions/src/panel/index.test.tsx +86 -0
- package/marketplace/plugins/github-actions/src/panel/index.tsx +256 -0
- package/marketplace/plugins/github-actions/src/panel/picker.test.tsx +68 -0
- package/marketplace/plugins/github-actions/src/panel/test-fixtures.ts +98 -0
- package/marketplace/plugins/github-actions/src/panel/test-harness.tsx +175 -0
- package/marketplace/plugins/github-actions/src/protocol.ts +156 -0
- package/marketplace/plugins/github-actions/src/server/github.test.ts +264 -0
- package/marketplace/plugins/github-actions/src/server/github.ts +309 -0
- package/marketplace/plugins/github-actions/src/server/http.test.ts +150 -0
- package/marketplace/plugins/github-actions/src/server/http.ts +202 -0
- package/marketplace/plugins/github-actions/src/server/json.ts +44 -0
- package/marketplace/plugins/github-actions/src/server/logtext.test.ts +84 -0
- package/marketplace/plugins/github-actions/src/server/logtext.ts +59 -0
- package/marketplace/plugins/github-actions/src/server/progress.test.ts +96 -0
- package/marketplace/plugins/github-actions/src/server/progress.ts +62 -0
- package/marketplace/plugins/github-actions/src/server/remote.ts +84 -0
- package/marketplace/plugins/github-actions/src/server/scope.ts +51 -0
- package/marketplace/plugins/github-actions/src/server/token.ts +84 -0
- package/marketplace/plugins/github-actions/src/server.ts +163 -0
- package/marketplace/plugins/github-actions/src/state.test.ts +55 -0
- package/marketplace/plugins/github-actions/src/state.ts +63 -0
- package/marketplace/plugins/github-actions/tsconfig.json +16 -0
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/proc/identity.ts +4 -3
- package/package.json +2 -2
- package/src/client/App.tsx +1 -1
- package/src/client/borders.css +143 -0
- package/src/client/components/common/context-usage-button/Ring.tsx +34 -9
- package/src/client/components/common/context-usage-button/index.test.tsx +19 -2
- package/src/client/components/common/context-usage-button/index.tsx +4 -4
- package/src/client/components/common/header-controls/index.test.tsx +26 -59
- package/src/client/components/common/header-controls/index.tsx +41 -52
- package/src/client/components/common/header-controls/phone-row.test.tsx +265 -0
- package/src/client/components/common/header-controls/plugin-entry.test.tsx +25 -3
- package/src/client/components/common/header-controls/shell-chrome.test.tsx +2 -2
- package/src/client/components/layout/LeftDock.tsx +7 -0
- package/src/client/components/layout/desktop-layout/DesktopOverlays.tsx +51 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +117 -15
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +257 -0
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +23 -24
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +50 -78
- package/src/client/components/layout/desktop-layout/index.tsx +73 -73
- package/src/client/components/layout/session-sidebar/Footer.test.tsx +20 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +24 -2
- package/src/client/components/layout/session-sidebar/Header.test.ts +10 -0
- package/src/client/components/layout/session-sidebar/Header.tsx +2 -2
- package/src/client/components/mobile/RightSidebar.tsx +164 -66
- package/src/client/components/mobile/header-titlebar.test.tsx +92 -0
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +2 -3
- package/src/client/components/mobile/mobile-main-view/Header.tsx +12 -10
- package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +179 -0
- package/src/client/components/mobile/panel-chips.test.tsx +12 -0
- package/src/client/components/mobile/panel-chips.tsx +5 -1
- package/src/client/components/mobile/right-drawer-nav.test.tsx +258 -0
- package/src/client/components/settings/Modal.tsx +14 -9
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +18 -6
- package/src/client/components/settings/SettingsSidebarList.tsx +2 -1
- package/src/client/components/settings/Sidebar.tsx +6 -4
- package/src/client/components/settings/apply-side-effects.test.ts +17 -0
- package/src/client/components/settings/apply-side-effects.ts +32 -5
- package/src/client/components/settings/band-height.test.tsx +122 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +144 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +81 -39
- package/src/client/components/settings/categories/ChatSettings.tsx +9 -15
- package/src/client/components/settings/categories/UsageSettings.tsx +2 -1
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +101 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +134 -0
- package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/EditorFontSection.tsx +5 -5
- package/src/client/components/settings/categories/appearance-settings/EditorIndentSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +6 -6
- package/src/client/components/settings/categories/appearance-settings/EditorTypingSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/PanelNavSection.tsx +288 -0
- package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/ThemeSection.tsx +42 -0
- package/src/client/components/settings/categories/appearance-settings/TrayIconSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/groups.test.ts +47 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +95 -0
- package/src/client/components/settings/categories/chat-settings/LayoutSection.tsx +31 -14
- package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +2 -1
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +2 -1
- package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +2 -1
- package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +2 -1
- package/src/client/components/settings/master-detail/GroupDetail.tsx +38 -0
- package/src/client/components/settings/{categories/chat-settings/SidebarList.tsx → master-detail/GroupSidebar.tsx} +35 -12
- package/src/client/components/settings/master-detail/index.tsx +3 -1
- package/src/client/components/settings/pane-header.ts +25 -0
- package/src/client/components/workspace/browser-toolbar/index.test.tsx +39 -1
- package/src/client/components/workspace/browser-toolbar/index.tsx +53 -17
- package/src/client/components/workspace/chat-timeline/ColumnResizeHandle.tsx +107 -0
- package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +9 -3
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +35 -26
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +6 -0
- package/src/client/components/workspace/chat-timeline/column-resize.test.tsx +292 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +5 -3
- package/src/client/components/workspace/context-panel/index.tsx +10 -4
- package/src/client/components/workspace/editor/EditorHideButton.tsx +41 -0
- package/src/client/components/workspace/editor/EmptyEditor.tsx +11 -2
- package/src/client/components/workspace/editor/PluginColumn.tsx +11 -1
- package/src/client/components/workspace/editor/Tabs.tsx +8 -0
- package/src/client/components/workspace/editor/editor-hide-button.test.ts +144 -0
- package/src/client/components/workspace/editor/index.tsx +8 -2
- package/src/client/components/workspace/editor/props.ts +9 -0
- package/src/client/components/workspace/file-explorer/RowLabel.test.tsx +90 -0
- package/src/client/components/workspace/file-explorer/RowLabel.tsx +1 -4
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +52 -46
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +41 -21
- package/src/client/components/workspace/git-panel/commit-modal/GraphCanvas.tsx +6 -5
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +19 -22
- package/src/client/components/workspace/panel-header/title-policy.test.tsx +62 -0
- package/src/client/components/workspace/panel-header/title-policy.tsx +83 -0
- package/src/client/components/workspace/panel-tabs/Home.density.test.tsx +122 -0
- package/src/client/components/workspace/panel-tabs/Home.test.tsx +137 -0
- package/src/client/components/workspace/panel-tabs/Home.tsx +118 -0
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +173 -0
- package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +339 -0
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +302 -0
- package/src/client/components/workspace/panel-tabs/index.tsx +105 -0
- package/src/client/components/workspace/panels/builtin.tsx +9 -0
- package/src/client/components/workspace/plan-panel/index.tsx +7 -2
- package/src/client/components/workspace/repo-picker/Modal.tsx +1 -1
- package/src/client/components/workspace/repo-picker/index.test.tsx +32 -8
- package/src/client/components/workspace/repo-picker/index.tsx +2 -2
- package/src/client/components/workspace/search-panel/Body.tsx +7 -1
- package/src/client/components/workspace/search-panel/index.tsx +2 -1
- package/src/client/components/workspace/terminal-panel/Header.tsx +10 -3
- package/src/client/components/workspace/terminal-panel/index.tsx +4 -1
- package/src/client/components/workspace/todo-panel/index.tsx +6 -1
- package/src/client/components/workspace/usage-panel/index.tsx +7 -2
- package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +43 -4
- package/src/client/components/workspace/user-browser-panel/Frame.tsx +101 -45
- package/src/client/components/workspace/user-browser-panel/TabStrip.tsx +107 -0
- package/src/client/components/workspace/user-browser-panel/index.tsx +31 -6
- package/src/client/glass.test.ts +1 -1
- package/src/client/hooks/browser/use-annotate.ts +6 -5
- package/src/client/hooks/browser/use-user-browser.test.tsx +279 -0
- package/src/client/hooks/browser/use-user-browser.ts +190 -44
- package/src/client/hooks/chat/timeline/column-drag.ts +171 -0
- package/src/client/hooks/chat/timeline/width-mode.test.ts +112 -11
- package/src/client/hooks/chat/timeline/width-mode.ts +91 -18
- package/src/client/hooks/ui/border-style.test.ts +172 -0
- package/src/client/hooks/ui/border-style.ts +60 -0
- package/src/client/hooks/ui/navbar-controls.test.ts +27 -1
- package/src/client/hooks/ui/navbar-controls.ts +95 -20
- package/src/client/hooks/ui/style-attributes.test.ts +2 -0
- package/src/client/hooks/workspace/active-project.ts +46 -0
- package/src/client/hooks/workspace/commit-expansion.test.ts +135 -0
- package/src/client/hooks/workspace/commit-expansion.ts +56 -0
- package/src/client/hooks/workspace/mobile-right-panel-nav.ts +63 -0
- package/src/client/hooks/workspace/panel-nav.test.ts +140 -0
- package/src/client/hooks/workspace/panel-nav.ts +95 -0
- package/src/client/hooks/workspace/panel-tabs.session.test.tsx +235 -0
- package/src/client/hooks/workspace/panel-tabs.ts +194 -0
- package/src/client/hooks/workspace/right-open-request.ts +53 -0
- package/src/client/hooks/workspace/right-side.test.ts +204 -0
- package/src/client/hooks/workspace/right-side.ts +142 -0
- package/src/client/lib/ui/control-plate.ts +33 -0
- package/src/client/main.tsx +9 -4
- package/src/client/tailwind.css +6 -0
- package/src/server/lib/assets/shell-attributes.server.ts +26 -10
- package/src/server/lib/assets/shell-attributes.test.ts +26 -0
- package/src/server/lib/bundler/titlebar-css.test.ts +5 -3
- package/src/server/lib/harness/acp/background-replay.test.ts +16 -1
- package/src/server/lib/harness/acp/background-replay.ts +6 -1
- package/src/server/lib/harness/acp/background-work.ts +44 -31
- package/src/server/lib/harness/acp/session-turns.ts +4 -3
- package/src/server/lib/harness/acp/session-wiring.test.ts +53 -0
- package/src/server/lib/harness/acp/session-wiring.ts +11 -2
- package/src/server/lib/harness/session-lease.server.ts +3 -2
- package/src/server/lib/omp/session/lease-probe.server.test.ts +82 -0
- package/src/server/lib/omp/session/lease-probe.server.ts +180 -0
- package/src/server/lib/omp/session/ownership.server.test.ts +17 -6
- package/src/server/lib/omp/session/ownership.server.ts +7 -5
- package/src/server/plugins/ssr.ts +6 -3
- package/src/shared/lib/browser/user-tabs.test.ts +165 -0
- package/src/shared/lib/browser/user-tabs.ts +172 -0
- package/src/shared/lib/chat/timeline/width-mode.test.ts +34 -2
- package/src/shared/lib/chat/timeline/width-mode.ts +71 -22
- package/src/shared/lib/commands/catalog.ts +2 -2
- package/src/shared/lib/fs/git-status.test.ts +23 -0
- package/src/shared/lib/fs/git-status.ts +15 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +20 -20
- package/src/shared/lib/settings/defaults.ts +8 -1
- package/src/shared/lib/theme/border-style.test.ts +83 -0
- package/src/shared/lib/theme/border-style.ts +122 -0
- package/src/shared/lib/workspace/keymap.ts +2 -1
- package/src/shared/lib/workspace/panel-nav.test.ts +198 -0
- package/src/shared/lib/workspace/panel-nav.ts +148 -0
- package/src/shared/lib/workspace/panel-tabs-close.test.ts +154 -0
- package/src/shared/lib/workspace/panel-tabs.ts +105 -0
- package/src/shared/lib/workspace/session-state/cache.ts +22 -0
- package/src/shared/lib/workspace/session-state/merge.ts +6 -0
- package/src/shared/lib/workspace/session-state/store.ts +23 -0
- package/src/shared/types/settings/state.ts +58 -3
- package/src/test-support/header-controls-harness.ts +22 -0
- package/src/test-support/peer-harness.ts +2 -2
- package/dist/client/static/js/ImageView-rnzf5tve.js +0 -1
- package/dist/client/static/js/LayoutWrapper-rekrgth6.js +0 -2
- package/dist/client/static/js/SessionsView-e84tjbcr.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-7j23x20s.js +0 -1
- package/dist/client/static/js/bash-vv2ysp0a.js +0 -1
- package/dist/client/static/js/c-8jf64j6h.js +0 -1
- package/dist/client/static/js/cpp-vh94zee0.js +0 -1
- package/dist/client/static/js/css-a13jmmnc.js +0 -1
- package/dist/client/static/js/css-p57h1fme.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-me5xnx6a.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-5zbvjj84.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-36ygrbvm.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-tjhkv71w.js +0 -1
- package/dist/client/static/js/graphql-kesh8gk0.js +0 -1
- package/dist/client/static/js/html-sxpfydga.js +0 -1
- package/dist/client/static/js/index-0q2qfcjn.js +0 -1
- package/dist/client/static/js/index-48gh56ka.js +0 -3
- package/dist/client/static/js/index-4rv388z7.js +0 -2
- package/dist/client/static/js/index-52xmdeh2.js +0 -1
- package/dist/client/static/js/index-8kqepehd.js +0 -12
- package/dist/client/static/js/index-cje5gg45.js +0 -1
- package/dist/client/static/js/index-fbcg8y95.js +0 -1
- package/dist/client/static/js/index-g3shdymf.js +0 -1
- package/dist/client/static/js/index-h5n1btqy.js +0 -1
- package/dist/client/static/js/index-m1n4v0z7.js +0 -9
- package/dist/client/static/js/index-rn8w29pv.js +0 -2
- package/dist/client/static/js/index-s00j9042.js +0 -2
- package/dist/client/static/js/index-s7rfbydk.js +0 -4
- package/dist/client/static/js/index-sg6sz3g8.js +0 -1
- package/dist/client/static/js/index-vcrh95gf.css +0 -1
- package/dist/client/static/js/index-w5rw8f7w.js +0 -1
- package/dist/client/static/js/index-x6v37h3j.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-m6qz24p8.js +0 -1
- package/dist/client/static/js/ini-1x0ad976.js +0 -1
- package/dist/client/static/js/java-3944nq02.js +0 -1
- package/dist/client/static/js/javascript-zegm06a1.js +0 -1
- package/dist/client/static/js/json-g5ggnd94.js +0 -1
- package/dist/client/static/js/jsx-f6p72qpc.js +0 -1
- package/dist/client/static/js/lua-edn2b3wn.js +0 -1
- package/dist/client/static/js/markdown-9dhg1fax.js +0 -1
- package/dist/client/static/js/one-dark-pro-hteqzfb0.js +0 -1
- package/dist/client/static/js/one-light-dapnh0rs.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ng6wq5xj.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-rf6jhxf6.js +0 -1
- package/dist/client/static/js/properties-fcmj08pv.js +0 -1
- package/dist/client/static/js/python-532d8ezm.js +0 -1
- package/dist/client/static/js/r-ptmdxs2a.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-ygp6hxq4.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-rxgnrb2g.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-xkv52a2p.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-bvcktbqh.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-9c3v7jsq.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-akjqm31r.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-fb58a7z1.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-ej4qhksx.js +0 -1
- package/dist/client/static/js/tsx-zfy727zs.js +0 -1
- package/dist/client/static/js/typescript-683kkkaw.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-mkp0kanv.js +0 -1
- package/dist/client/static/js/xml-6ct32gys.js +0 -1
- package/dist/client/static/js/yaml-1d5m3bfj.js +0 -1
- package/src/server/lib/omp/session/lease-flock.server.ts +0 -117
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`+a);let r=Ft(),c=Bt(),k=r.nodeRadius*1.6,W=y.db,w=W.getWardleyData(),_=W.getDiagramTitle(),A=w.size?.width??r.width,S=w.size?.height??r.height,O=de(s);O.selectAll("*").remove(),te(O,S,A,r.useMaxWidth),O.attr("viewBox",`0 0 ${A} ${S}`);let N=O.append("g").attr("class","wardley-map"),tt=O.append("defs");tt.append("marker").attr("id",`arrow-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.evolutionStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-end-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.linkStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-start-${s}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",c.linkStroke).attr("stroke","none"),N.append("rect").attr("class","wardley-background").attr("width",A).attr("height",S).attr("fill",c.backgroundColor);let D=A-r.padding*2,j=S-r.padding*2;if(_)N.append("text").attr("class","wardley-title").attr("x",A/2).attr("y",r.padding/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(_);let H=t((e)=>r.padding+e/100*D,"projectX"),Y=t((e)=>S-r.padding-e/100*j,"projectY"),Z=N.append("g").attr("class","wardley-axes");Z.append("line").attr("x1",r.padding).attr("x2",A-r.padding).attr("y1",S-r.padding).attr("y2",S-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1),Z.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",S-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1);let Ct=w.axes.xLabel??"Evolution",St=w.axes.yLabel??"Visibility";Z.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+D/2).attr("y",S-r.padding/4).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Ct),Z.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+j/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+j/2})`).text(St);let V=w.axes.stages&&w.axes.stages.length>0?w.axes.stages:It;if(V.length>0){let e=N.append("g").attr("class","wardley-stages"),i=w.axes.stageBoundaries,n=[];if(i&&i.length===V.length){let d=0;i.forEach((f)=>{n.push({start:d,end:f}),d=f})}else{let d=1/V.length;V.forEach((f,x)=>{n.push({start:x*d,end:(x+1)*d})})}V.forEach((d,f)=>{let x=n[f],u=r.padding+x.start*D,g=r.padding+x.end*D,m=(u+g)/2;if(f>0)e.append("line").attr("x1",u).attr("x2",u).attr("y1",r.padding).attr("y2",S-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);e.append("text").attr("class","wardley-stage-label").attr("x",m).attr("y",S-r.padding/1.5).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(d)})}if(r.showGrid){let e=N.append("g").attr("class","wardley-grid");for(let i=1;i<4;i++){let n=i/4,d=r.padding+D*n;e.append("line").attr("x1",d).attr("x2",d).attr("y1",r.padding).attr("y2",S-r.padding).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6"),e.append("line").attr("x1",r.padding).attr("x2",A-r.padding).attr("y1",S-r.padding-j*n).attr("y2",S-r.padding-j*n).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6")}}let h=new Map;if(w.nodes.forEach((e)=>{h.set(e.id,{x:H(e.x),y:Y(e.y),node:e})}),w.pipelines.length>0){let e=N.append("g").attr("class","wardley-pipelines"),i=N.append("g").attr("class","wardley-pipeline-links");w.pipelines.forEach((n)=>{if(n.componentIds.length===0)return;let d=n.componentIds.map((g)=>({id:g,pos:h.get(g),node:w.nodes.find((m)=>m.id===g)})).filter((g)=>g.pos&&g.node).sort((g,m)=>g.node.x-m.node.x);for(let g=0;g<d.length-1;g++){let m=d[g],b=d[g+1];i.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",m.pos.x).attr("y1",m.pos.y).attr("x2",b.pos.x).attr("y2",b.pos.y).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let f=1/0,x=-1/0,u=0;if(n.componentIds.forEach((g)=>{let m=h.get(g);if(m)f=Math.min(f,m.x),x=Math.max(x,m.x),u=m.y}),f!==1/0&&x!==-1/0){let m=r.nodeRadius*4,b=u-m/2,T=h.get(n.nodeId);if(T){let E=(f+x)/2;T.x=E,T.y=b-k/6}e.append("rect").attr("class","wardley-pipeline-box").attr("x",f-15).attr("y",b).attr("width",x-f+30).attr("height",m).attr("fill","none").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let rt=N.append("g").attr("class","wardley-links"),ot=new Map;w.pipelines.forEach((e)=>{ot.set(e.nodeId,new Set(e.componentIds))});let nt=w.links.filter((e)=>{if(!h.has(e.source)||!h.has(e.target))return!1;if(ot.get(e.target)?.has(e.source))return!1;return!0});rt.selectAll("line").data(nt).enter().append("line").attr("class",(e)=>`wardley-link${e.dashed?" wardley-link--dashed":""}`).attr("x1",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=n.x-i.x,u=n.y-i.y,g=Math.sqrt(x*x+u*u);return i.x+x/g*f}).attr("y1",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=n.x-i.x,u=n.y-i.y,g=Math.sqrt(x*x+u*u);return i.y+u/g*f}).attr("x2",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=i.x-n.x,u=i.y-n.y,g=Math.sqrt(x*x+u*u);return n.x+x/g*f}).attr("y2",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=i.x-n.x,u=i.y-n.y,g=Math.sqrt(x*x+u*u);return n.y+u/g*f}).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(e)=>e.dashed?"6 6":null).attr("marker-end",(e)=>{if(e.flow==="forward"||e.flow==="bidirectional")return`url(#link-arrow-end-${s})`;return null}).attr("marker-start",(e)=>{if(e.flow==="backward"||e.flow==="bidirectional")return`url(#link-arrow-start-${s})`;return null}),rt.selectAll("text").data(nt.filter((e)=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(e)=>{let i=h.get(e.source),n=h.get(e.target),d=(i.x+n.x)/2,f=n.y-i.y,x=n.x-i.x,u=Math.sqrt(x*x+f*f),g=8,m=f/u;return d+m*8}).attr("y",(e)=>{let i=h.get(e.source),n=h.get(e.target),d=(i.y+n.y)/2,f=n.x-i.x,x=n.y-i.y,u=Math.sqrt(f*f+x*x),g=8,m=-f/u;return d+m*8}).attr("fill",c.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(e)=>{let i=h.get(e.source),n=h.get(e.target),d=(i.x+n.x)/2,f=(i.y+n.y)/2,x=n.x-i.x,u=n.y-i.y,g=Math.sqrt(x*x+u*u),m=8,b=u/g,T=-x/g,E=d+b*8,J=f+T*8,F=Math.atan2(u,x)*180/Math.PI;if(F>90||F<-90)F+=180;return`rotate(${F} ${E} ${J})`}).text((e)=>e.label);let Mt=N.append("g").attr("class","wardley-trends"),Nt=w.trends.map((e)=>{let i=h.get(e.nodeId);if(!i)return null;let n=H(e.targetX),d=Y(e.targetY),f=n-i.x,x=d-i.y,u=Math.sqrt(f*f+x*x),g=r.nodeRadius+2,m=u>g?n-f/u*g:n,b=u>g?d-x/u*g:d;return{origin:i,targetX:n,targetY:d,adjustedX2:m,adjustedY2:b}}).filter((e)=>e!==null);Mt.selectAll("line").data(Nt).enter().append("line").attr("class","wardley-trend").attr("x1",(e)=>e.origin.x).attr("y1",(e)=>e.origin.y).attr("x2",(e)=>e.adjustedX2).attr("y2",(e)=>e.adjustedY2).attr("stroke",c.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${s})`);let X=N.append("g").attr("class","wardley-nodes").selectAll("g").data(w.nodes).enter().append("g").attr("class",(e)=>["wardley-node",e.className?`wardley-node--${e.className}`:""].filter(Boolean).join(" "));X.filter((e)=>e.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((e)=>e.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((e)=>e.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let I=X.filter((e)=>e.sourceStrategy==="market");I.append("circle").attr("class","wardley-market-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((e)=>!e.isPipelineParent&&e.sourceStrategy!=="market"&&e.className!=="anchor").append("circle").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1);let et=r.nodeRadius*0.7,M=r.nodeRadius*1.2;if(I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x).attr("y1",(e)=>h.get(e.id).y-M).attr("x2",(e)=>h.get(e.id).x-M*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+M*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x-M*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+M*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x+M*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+M*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x+M*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+M*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x).attr("y2",(e)=>h.get(e.id).y-M).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y-M).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x-M*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+M*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x+M*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+M*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),X.filter((e)=>e.isPipelineParent===!0).append("rect").attr("x",(e)=>h.get(e.id).x-k/2).attr("y",(e)=>h.get(e.id).y-k/2).attr("width",k).attr("height",k).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1),X.filter((e)=>e.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y1",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y-n/2}).attr("x2",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y2",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y+n/2}).attr("stroke",c.componentStroke).attr("stroke-width",6),X.append("text").attr("x",(e)=>{let i=h.get(e.id);if(e.className==="anchor")return e.labelOffsetX!==void 0?i.x+e.labelOffsetX:i.x;let n=r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetX===void 0)n+=10;let d=e.labelOffsetX??n;return i.x+d}).attr("y",(e)=>{let i=h.get(e.id);if(e.className==="anchor")return e.labelOffsetY!==void 0?i.y+e.labelOffsetY:i.y-3;let n=-r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetY===void 0)n-=10;let d=e.labelOffsetY??n;return i.y+d}).attr("class","wardley-node-label").attr("fill",(e)=>{if(e.className==="evolved")return c.evolutionStroke;if(e.className==="anchor")return"#000";return c.componentLabelColor}).attr("font-size",r.labelFontSize).attr("font-weight",(e)=>e.className==="anchor"?"bold":"normal").attr("text-anchor",(e)=>e.className==="anchor"?"middle":"start").attr("dominant-baseline",(e)=>e.className==="anchor"?"middle":"auto").text((e)=>e.label),w.annotations.length>0){let e=N.append("g").attr("class","wardley-annotations");if(w.annotations.forEach((i)=>{let n=i.coordinates.map((d)=>({x:H(d.x),y:Y(d.y)}));if(n.length>1)for(let d=0;d<n.length-1;d++)e.append("line").attr("class","wardley-annotation-line").attr("x1",n[d].x).attr("y1",n[d].y).attr("x2",n[d+1].x).attr("y2",n[d+1].y).attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach((d)=>{let f=e.append("g").attr("class","wardley-annotation");f.append("circle").attr("cx",d.x).attr("cy",d.y).attr("r",10).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5),f.append("text").attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.number)})}),w.annotationsBox){let i=H(w.annotationsBox.x),n=Y(w.annotationsBox.y),d=10,f=16,x=11,u=e.append("g").attr("class","wardley-annotations-box"),g=[...w.annotations].filter((b)=>b.text).sort((b,T)=>b.number-T.number),m=[];if(g.forEach((b,T)=>{let E=u.append("text").attr("x",i+d).attr("y",n+d+(T+1)*f).attr("font-size",x).attr("fill",c.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${b.number}. ${b.text}`);m.push(E)}),m.length>0){let b=0,T=0;m.forEach((at)=>{let K=at.node(),Wt=K.getComputedTextLength();b=Math.max(b,Wt);let At=K.getBBox();T=Math.max(T,At.height)});let E=b+d*2+105,J=g.length*f+d*2+T/2,F=r.padding,zt=A-r.padding-E,Lt=r.padding,Tt=S-r.padding-J;i=Math.max(F,Math.min(i,zt)),n=Math.max(Lt,Math.min(n,Tt)),m.forEach((at,K)=>{at.attr("x",i+d).attr("y",n+d+(K+1)*f)}),u.insert("rect","text").attr("x",i).attr("y",n).attr("width",E).attr("height",J).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(w.notes.length>0){let e=N.append("g").attr("class","wardley-notes");w.notes.forEach((i)=>{let n=H(i.x),d=Y(i.y);e.append("text").attr("x",n).attr("y",d).attr("text-anchor","start").attr("font-size",11).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.text)})}if(w.accelerators.length>0){let e=N.append("g").attr("class","wardley-accelerators");w.accelerators.forEach((i)=>{let n=H(i.x),d=Y(i.y),f=60,x=30,u=20,g=`
|
|
1
|
+
import{ye}from"./index-f7paep2f.js";import{t,l,jt,C,te,R,M,G,z,j,H,q,p,de,ie}from"./index-gmq5pbcv.js";import{Qe}from"./index-gzafyqsr.js";var Q=t((a,s)=>{let o=a<=1?a*100:a;if(o<0||o>100)throw Error(`${s} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return o},"toPercent"),B=t((a,s,o)=>({x:Q(s,`${o} evolution`),y:Q(a,`${o} visibility`)}),"toCoordinates"),st=t((a)=>{if(!a)return;if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward";return},"getFlowFromPort"),Xt=t((a)=>{if(!a?.startsWith("+"))return{};let o=/^\+'([^']*)'/.exec(a)?.[1];if(a.includes("<>"))return{flow:"bidirectional",label:o};if(a.includes("<"))return{flow:"backward",label:o};if(a.includes(">"))return{flow:"forward",label:o};return{label:o}},"extractFlowFromArrow"),Et=t((a,s)=>{if(ye(a,s),a.size)s.setSize(a.size.width,a.size.height);if(a.evolution){let o=a.evolution.stages.map((r)=>{if(r.secondName)return`${r.name.trim()} / ${r.secondName.trim()}`;return r.name.trim()}),y=a.evolution.stages.filter((r)=>r.boundary!==void 0).map((r)=>r.boundary);s.updateAxes({stages:o,stageBoundaries:y})}if(a.anchors.forEach((o)=>{let y=B(o.visibility,o.evolution,`Anchor "${o.name}"`);s.addNode(o.name,o.name,y.x,y.y,"anchor")}),a.components.forEach((o)=>{let y=B(o.visibility,o.evolution,`Component "${o.name}"`),r=o.label?(o.label.negX?-1:1)*o.label.offsetX:void 0,c=o.label?(o.label.negY?-1:1)*o.label.offsetY:void 0,k=o.decorator?.strategy;s.addNode(o.name,o.name,y.x,y.y,"component",r,c,o.inertia,k)}),a.notes.forEach((o)=>{let y=B(o.visibility,o.evolution,`Note "${o.text}"`);s.addNote(o.text,y.x,y.y)}),a.pipelines.forEach((o)=>{let y=s.getNode(o.parent);if(!y||typeof y.y!=="number")throw Error(`Pipeline "${o.parent}" must reference an existing component with coordinates.`);let r=y.y;s.startPipeline(o.parent),o.components.forEach((c)=>{let k=`${o.parent}_${c.name}`,T=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,w=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,Z=Q(c.evolution,`Pipeline component "${c.name}" evolution`);s.addNode(k,c.name,Z,r,"pipeline-component",T,w),s.addPipelineComponent(o.parent,k)})}),a.links.forEach((o)=>{let y=!!o.arrow&&(o.arrow.includes("-.->")||o.arrow.includes(".-.")),r=st(o.fromPort)??st(o.toPort),{flow:c,label:k}=Xt(o.arrow);if(!r&&c)r=c;let T=o.linkLabel,w=k??T;s.addLink(s.resolveNodeId(o.from),s.resolveNodeId(o.to),y,w,r)}),a.evolves.forEach((o)=>{let y=s.getNode(o.component);if(y?.y!==void 0){let r=Q(o.target,`Evolve target for "${o.component}"`);s.addTrend(o.component,r,y.y)}}),a.annotations.length>0){let o=a.annotations[0],y=B(o.x,o.y,"Annotations box");s.setAnnotationsBox(y.x,y.y)}a.annotation.forEach((o)=>{let y=B(o.x,o.y,`Annotation ${o.number}`);s.addAnnotation(o.number,[{x:y.x,y:y.y}],o.text)}),a.accelerators.forEach((o)=>{let y=B(o.x,o.y,`Accelerator "${o.name}"`);s.addAccelerator(o.name,y.x,y.y)}),a.deaccelerators.forEach((o)=>{let y=B(o.x,o.y,`Deaccelerator "${o.name}"`);s.addDeaccelerator(o.name,y.x,y.y)})},"populateDb"),it={parser:{yy:void 0},parse:t(async(a)=>{let s=await Qe("wardley",a);l.debug(s);let o=it.parser?.yy;if(!o||typeof o.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Et(s,o)},"parse")},Ht=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,"WardleyBuilder")}addNode(a){let s=this.nodes.get(a.id)??{id:a.id,label:a.label},o={...s,...a,className:a.className??s.className,labelOffsetX:a.labelOffsetX??s.labelOffsetX,labelOffsetY:a.labelOffsetY??s.labelOffsetY};this.nodes.set(a.id,o)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let s=this.nodes.get(a);if(s)s.isPipelineParent=!0}addPipelineComponent(a,s){let o=this.pipelines.get(a);if(o)o.componentIds.push(s);let y=this.nodes.get(s);if(y)y.inPipeline=!0}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,s){this.annotationsBox={x:a,y:s}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,s){this.size={width:a,height:s}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[s,o]of this.nodes)if(o.label===a)return s;return a}build(){let a=[];for(let s of this.nodes.values()){if(typeof s.x!=="number"||typeof s.y!=="number")throw Error(`Node "${s.label}" is missing coordinates`);a.push(s)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},v=new Ht;function dt(){return p()["wardley-beta"]}t(dt,"getConfig");function lt(a,s,o,y,r,c,k,T,w){v.addNode({id:a,label:s,x:o,y,className:r,labelOffsetX:c,labelOffsetY:k,inertia:T,sourceStrategy:w})}t(lt,"addNode");function ct(a,s,o=!1,y,r){v.addLink({source:a,target:s,dashed:o,label:y,flow:r})}t(ct,"addLink");function pt(a,s,o){v.addTrend({nodeId:a,targetX:s,targetY:o})}t(pt,"addTrend");function ht(a,s,o){v.addAnnotation({number:a,coordinates:s,text:o})}t(ht,"addAnnotation");function ft(a,s,o){v.addNote({text:a,x:s,y:o})}t(ft,"addNote");function xt(a,s,o){v.addAccelerator({name:a,x:s,y:o})}t(xt,"addAccelerator");function gt(a,s,o){v.addDeaccelerator({name:a,x:s,y:o})}t(gt,"addDeaccelerator");function yt(a,s){v.setAnnotationsBox(a,s)}t(yt,"setAnnotationsBox");function ut(a,s){v.setSize(a,s)}t(ut,"setSize");function wt(a){v.startPipeline(a)}t(wt,"startPipeline");function mt(a,s){v.addPipelineComponent(a,s)}t(mt,"addPipelineComponent");function kt(a){v.setAxes(a)}t(kt,"updateAxes");function bt(a){return v.getNode(a)}t(bt,"getNode");function $t(a){return v.resolveNodeId(a)}t($t,"resolveNodeId");function vt(){return v.build()}t(vt,"getWardleyData");function Pt(){v.clear(),R()}t(Pt,"clear");var Yt={getConfig:dt,addNode:lt,addLink:ct,addTrend:pt,addAnnotation:ht,addNote:ft,addAccelerator:xt,addDeaccelerator:gt,setAnnotationsBox:yt,setSize:ut,startPipeline:wt,addPipelineComponent:mt,updateAxes:kt,getNode:bt,resolveNodeId:$t,getWardleyData:vt,clear:Pt,setAccTitle:M,getAccTitle:G,setDiagramTitle:H,getDiagramTitle:q,getAccDescription:j,setAccDescription:z},It=["Genesis","Custom Built","Product","Commodity"],Bt=t(()=>{let{themeVariables:a}=p();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),Ft=t(()=>{let a=p()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),Rt=t((a,s,o,y)=>{l.debug(`Rendering Wardley map
|
|
2
|
+
`+a);let r=Ft(),c=Bt(),k=r.nodeRadius*1.6,T=y.db,w=T.getWardleyData(),Z=T.getDiagramTitle(),W=w.size?.width??r.width,P=w.size?.height??r.height,O=de(s);O.selectAll("*").remove(),te(O,P,W,r.useMaxWidth),O.attr("viewBox",`0 0 ${W} ${P}`);let N=O.append("g").attr("class","wardley-map"),tt=O.append("defs");tt.append("marker").attr("id",`arrow-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.evolutionStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-end-${s}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",c.linkStroke).attr("stroke","none"),tt.append("marker").attr("id",`link-arrow-start-${s}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",c.linkStroke).attr("stroke","none"),N.append("rect").attr("class","wardley-background").attr("width",W).attr("height",P).attr("fill",c.backgroundColor);let D=W-r.padding*2,V=P-r.padding*2;if(Z)N.append("text").attr("class","wardley-title").attr("x",W/2).attr("y",r.padding/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(Z);let E=t((e)=>r.padding+e/100*D,"projectX"),Y=t((e)=>P-r.padding-e/100*V,"projectY"),U=N.append("g").attr("class","wardley-axes");U.append("line").attr("x1",r.padding).attr("x2",W-r.padding).attr("y1",P-r.padding).attr("y2",P-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1),U.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke",c.axisColor).attr("stroke-width",1);let Ct=w.axes.xLabel??"Evolution",St=w.axes.yLabel??"Visibility";U.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+D/2).attr("y",P-r.padding/4).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Ct),U.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+V/2).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+V/2})`).text(St);let _=w.axes.stages&&w.axes.stages.length>0?w.axes.stages:It;if(_.length>0){let e=N.append("g").attr("class","wardley-stages"),i=w.axes.stageBoundaries,n=[];if(i&&i.length===_.length){let d=0;i.forEach((f)=>{n.push({start:d,end:f}),d=f})}else{let d=1/_.length;_.forEach((f,x)=>{n.push({start:x*d,end:(x+1)*d})})}_.forEach((d,f)=>{let x=n[f],u=r.padding+x.start*D,g=r.padding+x.end*D,m=(u+g)/2;if(f>0)e.append("line").attr("x1",u).attr("x2",u).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);e.append("text").attr("class","wardley-stage-label").attr("x",m).attr("y",P-r.padding/1.5).attr("fill",c.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(d)})}if(r.showGrid){let e=N.append("g").attr("class","wardley-grid");for(let i=1;i<4;i++){let n=i/4,d=r.padding+D*n;e.append("line").attr("x1",d).attr("x2",d).attr("y1",r.padding).attr("y2",P-r.padding).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6"),e.append("line").attr("x1",r.padding).attr("x2",W-r.padding).attr("y1",P-r.padding-V*n).attr("y2",P-r.padding-V*n).attr("stroke",c.gridColor).attr("stroke-dasharray","2 6")}}let h=new Map;if(w.nodes.forEach((e)=>{h.set(e.id,{x:E(e.x),y:Y(e.y),node:e})}),w.pipelines.length>0){let e=N.append("g").attr("class","wardley-pipelines"),i=N.append("g").attr("class","wardley-pipeline-links");w.pipelines.forEach((n)=>{if(n.componentIds.length===0)return;let d=n.componentIds.map((g)=>({id:g,pos:h.get(g),node:w.nodes.find((m)=>m.id===g)})).filter((g)=>g.pos&&g.node).sort((g,m)=>g.node.x-m.node.x);for(let g=0;g<d.length-1;g++){let m=d[g],b=d[g+1];i.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",m.pos.x).attr("y1",m.pos.y).attr("x2",b.pos.x).attr("y2",b.pos.y).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let f=1/0,x=-1/0,u=0;if(n.componentIds.forEach((g)=>{let m=h.get(g);if(m)f=Math.min(f,m.x),x=Math.max(x,m.x),u=m.y}),f!==1/0&&x!==-1/0){let m=r.nodeRadius*4,b=u-m/2,L=h.get(n.nodeId);if(L){let X=(f+x)/2;L.x=X,L.y=b-k/6}e.append("rect").attr("class","wardley-pipeline-box").attr("x",f-15).attr("y",b).attr("width",x-f+30).attr("height",m).attr("fill","none").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let rt=N.append("g").attr("class","wardley-links"),ot=new Map;w.pipelines.forEach((e)=>{ot.set(e.nodeId,new Set(e.componentIds))});let nt=w.links.filter((e)=>{if(!h.has(e.source)||!h.has(e.target))return!1;if(ot.get(e.target)?.has(e.source))return!1;return!0});rt.selectAll("line").data(nt).enter().append("line").attr("class",(e)=>`wardley-link${e.dashed?" wardley-link--dashed":""}`).attr("x1",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=n.x-i.x,u=n.y-i.y,g=Math.sqrt(x*x+u*u);return i.x+x/g*f}).attr("y1",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.source).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=n.x-i.x,u=n.y-i.y,g=Math.sqrt(x*x+u*u);return i.y+u/g*f}).attr("x2",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=i.x-n.x,u=i.y-n.y,g=Math.sqrt(x*x+u*u);return n.x+x/g*f}).attr("y2",(e)=>{let i=h.get(e.source),n=h.get(e.target),f=w.nodes.find((m)=>m.id===e.target).isPipelineParent?k/Math.sqrt(2):r.nodeRadius,x=i.x-n.x,u=i.y-n.y,g=Math.sqrt(x*x+u*u);return n.y+u/g*f}).attr("stroke",c.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(e)=>e.dashed?"6 6":null).attr("marker-end",(e)=>{if(e.flow==="forward"||e.flow==="bidirectional")return`url(#link-arrow-end-${s})`;return null}).attr("marker-start",(e)=>{if(e.flow==="backward"||e.flow==="bidirectional")return`url(#link-arrow-start-${s})`;return null}),rt.selectAll("text").data(nt.filter((e)=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(e)=>{let i=h.get(e.source),n=h.get(e.target),d=(i.x+n.x)/2,f=n.y-i.y,x=n.x-i.x,u=Math.sqrt(x*x+f*f),g=8,m=f/u;return d+m*8}).attr("y",(e)=>{let i=h.get(e.source),n=h.get(e.target),d=(i.y+n.y)/2,f=n.x-i.x,x=n.y-i.y,u=Math.sqrt(f*f+x*x),g=8,m=-f/u;return d+m*8}).attr("fill",c.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(e)=>{let i=h.get(e.source),n=h.get(e.target),d=(i.x+n.x)/2,f=(i.y+n.y)/2,x=n.x-i.x,u=n.y-i.y,g=Math.sqrt(x*x+u*u),m=8,b=u/g,L=-x/g,X=d+b*8,J=f+L*8,F=Math.atan2(u,x)*180/Math.PI;if(F>90||F<-90)F+=180;return`rotate(${F} ${X} ${J})`}).text((e)=>e.label);let Mt=N.append("g").attr("class","wardley-trends"),Nt=w.trends.map((e)=>{let i=h.get(e.nodeId);if(!i)return null;let n=E(e.targetX),d=Y(e.targetY),f=n-i.x,x=d-i.y,u=Math.sqrt(f*f+x*x),g=r.nodeRadius+2,m=u>g?n-f/u*g:n,b=u>g?d-x/u*g:d;return{origin:i,targetX:n,targetY:d,adjustedX2:m,adjustedY2:b}}).filter((e)=>e!==null);Mt.selectAll("line").data(Nt).enter().append("line").attr("class","wardley-trend").attr("x1",(e)=>e.origin.x).attr("y1",(e)=>e.origin.y).attr("x2",(e)=>e.adjustedX2).attr("y2",(e)=>e.adjustedY2).attr("stroke",c.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${s})`);let A=N.append("g").attr("class","wardley-nodes").selectAll("g").data(w.nodes).enter().append("g").attr("class",(e)=>["wardley-node",e.className?`wardley-node--${e.className}`:""].filter(Boolean).join(" "));A.filter((e)=>e.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>e.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>e.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let I=A.filter((e)=>e.sourceStrategy==="market");I.append("circle").attr("class","wardley-market-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>!e.isPipelineParent&&e.sourceStrategy!=="market"&&e.className!=="anchor").append("circle").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",r.nodeRadius).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1);let et=r.nodeRadius*0.7,S=r.nodeRadius*1.2;if(I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x).attr("y1",(e)=>h.get(e.id).y-S).attr("x2",(e)=>h.get(e.id).x-S*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+S*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x-S*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+S*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x+S*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+S*Math.sin(Math.PI/6)).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x+S*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+S*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x).attr("y2",(e)=>h.get(e.id).y-S).attr("stroke",c.componentStroke).attr("stroke-width",1),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y-S).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x-S*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+S*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x+S*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+S*Math.sin(Math.PI/6)).attr("r",et).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",2),A.filter((e)=>e.isPipelineParent===!0).append("rect").attr("x",(e)=>h.get(e.id).x-k/2).attr("y",(e)=>h.get(e.id).y-k/2).attr("width",k).attr("height",k).attr("fill",c.componentFill).attr("stroke",c.componentStroke).attr("stroke-width",1),A.filter((e)=>e.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y1",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y-n/2}).attr("x2",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k/2+15:r.nodeRadius+15;if(e.sourceStrategy)n+=r.nodeRadius+10;return i.x+n}).attr("y2",(e)=>{let i=h.get(e.id),n=e.isPipelineParent?k:r.nodeRadius*2;return i.y+n/2}).attr("stroke",c.componentStroke).attr("stroke-width",6),A.append("text").attr("x",(e)=>{let i=h.get(e.id);if(e.className==="anchor")return e.labelOffsetX!==void 0?i.x+e.labelOffsetX:i.x;let n=r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetX===void 0)n+=10;let d=e.labelOffsetX??n;return i.x+d}).attr("y",(e)=>{let i=h.get(e.id);if(e.className==="anchor")return e.labelOffsetY!==void 0?i.y+e.labelOffsetY:i.y-3;let n=-r.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetY===void 0)n-=10;let d=e.labelOffsetY??n;return i.y+d}).attr("class","wardley-node-label").attr("fill",(e)=>{if(e.className==="evolved")return c.evolutionStroke;if(e.className==="anchor")return"#000";return c.componentLabelColor}).attr("font-size",r.labelFontSize).attr("font-weight",(e)=>e.className==="anchor"?"bold":"normal").attr("text-anchor",(e)=>e.className==="anchor"?"middle":"start").attr("dominant-baseline",(e)=>e.className==="anchor"?"middle":"auto").text((e)=>e.label),w.annotations.length>0){let e=N.append("g").attr("class","wardley-annotations");if(w.annotations.forEach((i)=>{let n=i.coordinates.map((d)=>({x:E(d.x),y:Y(d.y)}));if(n.length>1)for(let d=0;d<n.length-1;d++)e.append("line").attr("class","wardley-annotation-line").attr("x1",n[d].x).attr("y1",n[d].y).attr("x2",n[d+1].x).attr("y2",n[d+1].y).attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach((d)=>{let f=e.append("g").attr("class","wardley-annotation");f.append("circle").attr("cx",d.x).attr("cy",d.y).attr("r",10).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5),f.append("text").attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.number)})}),w.annotationsBox){let i=E(w.annotationsBox.x),n=Y(w.annotationsBox.y),d=10,f=16,x=11,u=e.append("g").attr("class","wardley-annotations-box"),g=[...w.annotations].filter((b)=>b.text).sort((b,L)=>b.number-L.number),m=[];if(g.forEach((b,L)=>{let X=u.append("text").attr("x",i+d).attr("y",n+d+(L+1)*f).attr("font-size",x).attr("fill",c.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${b.number}. ${b.text}`);m.push(X)}),m.length>0){let b=0,L=0;m.forEach((at)=>{let K=at.node(),Wt=K.getComputedTextLength();b=Math.max(b,Wt);let At=K.getBBox();L=Math.max(L,At.height)});let X=b+d*2+105,J=g.length*f+d*2+L/2,F=r.padding,zt=W-r.padding-X,Lt=r.padding,Tt=P-r.padding-J;i=Math.max(F,Math.min(i,zt)),n=Math.max(Lt,Math.min(n,Tt)),m.forEach((at,K)=>{at.attr("x",i+d).attr("y",n+d+(K+1)*f)}),u.insert("rect","text").attr("x",i).attr("y",n).attr("width",X).attr("height",J).attr("fill","white").attr("stroke",c.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(w.notes.length>0){let e=N.append("g").attr("class","wardley-notes");w.notes.forEach((i)=>{let n=E(i.x),d=Y(i.y);e.append("text").attr("x",n).attr("y",d).attr("text-anchor","start").attr("font-size",11).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.text)})}if(w.accelerators.length>0){let e=N.append("g").attr("class","wardley-accelerators");w.accelerators.forEach((i)=>{let n=E(i.x),d=Y(i.y),f=60,x=30,u=20,g=`
|
|
3
3
|
M ${n} ${d-15}
|
|
4
4
|
L ${n+60-20} ${d-15}
|
|
5
5
|
L ${n+60-20} ${d-15-8}
|
|
@@ -8,7 +8,7 @@ import{be}from"./index-s00j9042.js";import{t,l,Gt,C,te,R,L,z,P,U,q,G,p,de,ie}fro
|
|
|
8
8
|
L ${n+60-20} ${d+15}
|
|
9
9
|
L ${n} ${d+15}
|
|
10
10
|
Z
|
|
11
|
-
`;e.append("path").attr("d",g).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}if(w.deaccelerators.length>0){let e=N.append("g").attr("class","wardley-deaccelerators");w.deaccelerators.forEach((i)=>{let n=
|
|
11
|
+
`;e.append("path").attr("d",g).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}if(w.deaccelerators.length>0){let e=N.append("g").attr("class","wardley-deaccelerators");w.deaccelerators.forEach((i)=>{let n=E(i.x),d=Y(i.y),f=60,x=30,u=20,g=`
|
|
12
12
|
M ${n+60} ${d-15}
|
|
13
13
|
L ${n+20} ${d-15}
|
|
14
14
|
L ${n+20} ${d-15-8}
|
|
@@ -17,7 +17,7 @@ import{be}from"./index-s00j9042.js";import{t,l,Gt,C,te,R,L,z,P,U,q,G,p,de,ie}fro
|
|
|
17
17
|
L ${n+20} ${d+15}
|
|
18
18
|
L ${n+60} ${d+15}
|
|
19
19
|
Z
|
|
20
|
-
`;e.append("path").attr("d",g).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}},"draw"),Ot={draw:Rt},Dt=t(({wardley:a}={})=>{let s=
|
|
20
|
+
`;e.append("path").attr("d",g).attr("fill","white").attr("stroke",c.componentStroke).attr("stroke-width",1),e.append("text").attr("x",n+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",c.axisTextColor).attr("font-weight","bold").text(i.name)})}},"draw"),Ot={draw:Rt},Dt=t(({wardley:a}={})=>{let s=jt(),o=C(),y=ie(s,o.themeVariables),r=ie(y.wardley,a);return`
|
|
21
21
|
.wardley-background {
|
|
22
22
|
fill: ${r.backgroundColor};
|
|
23
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ti}from"./index-1nwwvv29.js";import"./index-n1ga63de.js";export{ti as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{t,l,
|
|
2
|
-
`+
|
|
3
|
-
Expecting `+pt.join(", ")+", got '"+(this.terminals_[
|
|
1
|
+
import{t,l,jt,Y,C,ee,te,R,M,G,z,j,H,q,Ao,Wn,Os,de,ie,Jf}from"./index-gmq5pbcv.js";import{sa}from"./index-3d21hpk7.js";function Rt(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function ct(){var e=Wn().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,_=0,v=0.5;delete e.unknown;function T(){var y=i().length,V=a<n,E=V?a:n,I=V?n:a;if(h=(I-E)/Math.max(1,y-f+_*2),x)h=Math.floor(h);if(E+=(I-E-h*(y-f))*v,c=h*(1-f),x)E=Math.round(E),c=Math.round(c);var F=Rt(y).map(function(Z){return E+h*Z});return s(V?F.reverse():F)}return e.domain=function(y){return arguments.length?(i(y),T()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,T()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,T()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,T()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,_=+y),T()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),T()):f},e.paddingOuter=function(y){return arguments.length?(_=+y,T()):_},e.align=function(y){return arguments.length?(v=Math.max(0,Math.min(1,y)),T()):v},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(_).align(v)},Ao.apply(T(),arguments)}var _t=function(){var e=t(function(U,r,g,d){for(g=g||{},d=U.length;d--;g[U[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],_=[1,26],v=[1,28],T=[1,29],y=[1,30],V=[1,31],E=[1,32],I=[1,33],F=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],W=[1,47],N=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],it=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],B=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],rt=[1,65],P=[26,28],k={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:t(function(r,g,d,p,S,o,st){var m=o.length-1;switch(S){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:_,41:27,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w},{11:39,13:38,24:X,29:u,30:f,31:40,32:41,39:24,40:_,41:27,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w},{11:45,15:44,29:W,30:f,35:46,39:24,40:_,41:27,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w},{11:49,17:48,24:N,30:f,39:24,40:_,41:27,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w},{11:52,17:51,24:N,30:f,39:24,40:_,41:27,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(it,[2,39],{41:55,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w}),e(it,[2,40]),e(it,[2,41]),e(B,[2,42]),e(B,[2,44]),e(B,[2,45]),e(B,[2,46]),e(B,[2,47]),e(B,[2,48]),e(B,[2,49]),e(B,[2,50]),e(B,[2,51]),e(B,[2,52]),e(B,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:X,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:_,41:27,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:W}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:N},{25:63,27:64,29:rt},e(A,[2,14]),{17:66,24:N},e(A,[2,16]),e(A,[2,17]),e(B,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(P,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:_,41:27,42:v,43:T,44:y,45:V,46:E,47:I,48:F,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(P,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],S=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,xe=2,Wt=1,fe=o.slice.call(arguments,1),L=Object.create(this.lexer),nt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))nt.yy[wt]=this.yy[wt];if(L.setInput(r,nt.yy),nt.yy.lexer=L,nt.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var kt=L.yylloc;o.push(kt);var pe=L.options&&L.options.ranges;if(typeof nt.yy.parseError==="function")this.parseError=nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(K){d.length=d.length-2*K,S.length=S.length-K,o.length=o.length-K}t(me,"popStack");function Xt(){var K=p.pop()||L.lex()||Wt;if(typeof K!=="number"){if(K instanceof Array)p=K,K=p.pop();K=g.symbols_[K]||K}return K}t(Xt,"lex");var O,At,at,Q,Be,Ct,ht={},ft,et,Nt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(O===null||typeof O>"u")O=Xt();Q=st[at]&&st[at][O]}if(typeof Q>"u"||!Q.length||!Q[0]){var St="";pt=[];for(ft in st[at])if(this.terminals_[ft]&&ft>xe)pt.push("'"+this.terminals_[ft]+"'");if(L.showPosition)St="Parse error on line "+(xt+1)+`:
|
|
2
|
+
`+L.showPosition()+`
|
|
3
|
+
Expecting `+pt.join(", ")+", got '"+(this.terminals_[O]||O)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(O==Wt?"end of input":"'"+(this.terminals_[O]||O)+"'");this.parseError(St,{text:L.match,token:this.terminals_[O]||O,line:L.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+O);switch(Q[0]){case 1:if(d.push(O),S.push(L.yytext),o.push(L.yylloc),d.push(Q[1]),O=null,!At){if(Vt=L.yyleng,m=L.yytext,xt=L.yylineno,kt=L.yylloc,Ft>0)Ft--}else O=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=S[S.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},pe)ht._$.range=[o[o.length-(et||1)].range[0],o[o.length-1].range[1]];if(Ct=this.performAction.apply(ht,[m,Vt,xt,nt.yy,Q[1],S,o].concat(fe)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),S=S.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),S.push(ht.$),o.push(ht._$),Nt=st[d[d.length-2]][d[d.length-1]],d.push(Nt);break;case 3:return!0}}return!0},"parse")},J=function(){var U={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)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),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var S=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:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[S[0],S[0]+this.yyleng-g];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
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(r){this.unput(this.match.slice(r))},"less"),pastInput:t(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var r=this.pastInput(),g=Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
5
|
`+g+"^"},"showPosition"),test_match:t(function(r,g){var d,p,S;if(this.options.backtrack_lexer){if(S={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)S.yylloc.range=this.yylloc.range.slice(0)}if(p=r[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],d=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var o in S)this[o]=S[o];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,g,d,p;if(!this._more)this.yytext="",this.match="";var S=this._currentRules();for(var o=0;o<S.length;o++)if(d=this._input.match(this.rules[S[o]]),d&&(!g||d[0].length>g[0].length)){if(g=d,p=o,this.options.backtrack_lexer)if(r=this.test_match(d,S[o]),r!==!1)return r;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(r=this.test_match(g,S[p]),r!==!1)return r;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 g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>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(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,S){var o=S;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return j}();k.lexer=J;function D(){this.yy={}}return t(D,"Parser"),D.prototype=k,k.Parser=D,new D}();_t.parser=_t;var be=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=zf(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=sa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=sa().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var ke=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return e}};function Ut(e,i,s,n){let a=new Pt(n);return new ke(a,e,i,s)}t(Ut,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[_,v]of this.visiblePlots.entries())if(mt(v))x.push({x:h,y:c+_*a,width:i,height:i,fill:v.fill,strokeFill:v.fill,strokeWidth:0});else{let T=c+_*a+i/2;f.push({path:`M ${h},${T} L ${h+i},${T}`,strokeFill:v.strokeFill,strokeWidth:v.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((_,v)=>({text:_.title,x:h+i+s,y:c+v*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(qt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=Rs().y((n)=>n[0]).x((n)=>n[1])(e);else i=Rs().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let _=this.plotData.pointLabels[c];if(!_)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:_,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:_,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function jt(e,i,s){return new De(e,i,s)}t(jt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:jt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((_)=>mt(_)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,Qt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=Gt(),i=C();return ie(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=C();return ie(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=C();return ee(e.trim(),i)}t(ot,"textSanitizer");function Kt(e){Qt=e}t(Kt,"setTmpSVGG");function Zt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Zt,"setOrientation");function Jt(e){b.xAxis.title=ot(e.text)}t(Jt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function se(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(se,"setXAxisBand");function ne(e){b.yAxis.title=ot(e.text)}t(ne,"setYAxisTitle");function ae(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(ae,"setYAxisRangeData");function oe(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(oe,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)oe(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function re(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(re,"setLineData");function he(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(he,"setBarData");function le(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=G(),Pe.build(ut,b,dt,Qt)}t(le,"getDrawableElem");function ce(){return dt}t(ce,"getChartThemeConfig");function ge(){return ut}t(ge,"getChartConfig");function ue(){return b}t(ue,"getXYChartData");var Le=t(function(){R(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:le,clear:Le,setAccTitle:L,getAccTitle:z,setDiagramTitle:q,getDiagramTitle:G,getAccDescription:U,setAccDescription:P,setOrientation:Zt,setXAxisTitle:Jt,setXAxisRangeData:Bt,setXAxisBand:se,setYAxisTitle:ne,setYAxisRangeData:ae,setLineData:re,setBarData:he,setTmpSVGG:Kt,getChartThemeConfig:ce,getChartConfig:ge,getXYChartData:ue},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function _(w){return w==="left"?"start":w==="right"?"end":"middle"}t(_,"getTextAnchor");function v(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(v,"getTextTransformation"),l.debug(`Rendering xychart chart
|
|
7
|
-
`+e);let T=de(i),y=T.append("g").attr("class","main"),
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>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(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,S){var o=S;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return U}();k.lexer=J;function D(){this.yy={}}return t(D,"Parser"),D.prototype=k,k.Parser=D,new D}();_t.parser=_t;var be=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=Jf(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=sa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=sa().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var ke=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return e}};function Ut(e,i,s,n){let a=new Pt(n);return new ke(a,e,i,s)}t(Ut,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[_,v]of this.visiblePlots.entries())if(mt(v))x.push({x:h,y:c+_*a,width:i,height:i,fill:v.fill,strokeFill:v.fill,strokeWidth:0});else{let T=c+_*a+i/2;f.push({path:`M ${h},${T} L ${h+i},${T}`,strokeFill:v.strokeFill,strokeWidth:v.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((_,v)=>({text:_.title,x:h+i+s,y:c+v*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(qt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=Os().y((n)=>n[0]).x((n)=>n[1])(e);else i=Os().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let _=this.plotData.pointLabels[c];if(!_)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:_,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:_,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Gt(e,i,s){return new De(e,i,s)}t(Gt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:Gt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((_)=>mt(_)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,Qt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=jt(),i=C();return ie(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=C();return ie(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=C();return ee(e.trim(),i)}t(ot,"textSanitizer");function Kt(e){Qt=e}t(Kt,"setTmpSVGG");function Zt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Zt,"setOrientation");function Jt(e){b.xAxis.title=ot(e.text)}t(Jt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function se(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(se,"setXAxisBand");function ne(e){b.yAxis.title=ot(e.text)}t(ne,"setYAxisTitle");function ae(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(ae,"setYAxisRangeData");function oe(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(oe,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)oe(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function re(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(re,"setLineData");function he(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(he,"setBarData");function le(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=q(),Pe.build(ut,b,dt,Qt)}t(le,"getDrawableElem");function ce(){return dt}t(ce,"getChartThemeConfig");function ge(){return ut}t(ge,"getChartConfig");function ue(){return b}t(ue,"getXYChartData");var Le=t(function(){R(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:le,clear:Le,setAccTitle:M,getAccTitle:G,setDiagramTitle:H,getDiagramTitle:q,getAccDescription:j,setAccDescription:z,setOrientation:Zt,setXAxisTitle:Jt,setXAxisRangeData:Bt,setXAxisBand:se,setYAxisTitle:ne,setYAxisRangeData:ae,setLineData:re,setBarData:he,setTmpSVGG:Kt,getChartThemeConfig:ce,getChartConfig:ge,getXYChartData:ue},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function _(w){return w==="left"?"start":w==="right"?"end":"middle"}t(_,"getTextAnchor");function v(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(v,"getTextTransformation"),l.debug(`Rendering xychart chart
|
|
7
|
+
`+e);let T=de(i),y=T.append("g").attr("class","main"),V=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");te(T,c.height,c.width,!0),T.attr("viewBox",`0 0 ${c.width} ${c.height}`),V.attr("fill",h.backgroundColor),a.setTmpSVGG(T.append("g").attr("class","mermaid-tmp-group"));let E=a.getDrawableElem(),I={};function F(w){let X=y,u="";for(let[W]of w.entries()){let N=y;if(W>0&&I[u])N=I[u];if(u+=w[W],X=I[u],!X)X=I[u]=N.append("g").attr("class",w[W])}return X}t(F,"getGroup");for(let w of E){if(w.data.length===0)continue;let X=F(w.groupTexts);switch(w.type){case"rect":if(X.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let W=function(k,J){let{data:D,label:U}=k;return J*U.length*N<=D.width-A};var Z=W;t(W,"fitsHorizontally");let N=0.7,A=10,it=w.data.map((k,J)=>({data:k,label:x[J].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),B=it.map((k)=>{let{data:J}=k,D=J.height*0.7;while(!W(k,D)&&D>0)D-=1;return D}),rt=Math.floor(Math.min(...B)),P=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");X.selectAll("text").data(it).enter().append("text").attr("x",P).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${rt}px`).text((k)=>k.label)}else{let W=function(P,k,J){let{data:D,label:U}=P,r=0.7,g=k*U.length*0.7,d=D.x+D.width/2,p=d-g/2,S=d+g/2,o=p>=D.x&&S<=D.x+D.width,st=D.y+J+k<=D.y+D.height;return o&&st};var tt=W;t(W,"fitsInBar");let N=10,A=w.data.map((P,k)=>({data:P,label:x[k].toString()})).filter((P)=>P.data.width>0&&P.data.height>0),it=A.map((P)=>{let{data:k,label:J}=P,D=k.width/(J.length*0.7);while(!W(P,D,N)&&D>0)D-=1;return D}),B=Math.floor(Math.min(...it)),rt=t((P)=>{if(u)return P.data.y-N;else return P.data.y+N},"determineLabelYPosition");X.selectAll("text").data(A).enter().append("text").attr("x",(P)=>P.data.x+P.data.width/2).attr("y",rt).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${B}px`).text((P)=>P.label)}}break;case"text":X.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>_(u.horizontalPos)).attr("transform",(u)=>v(u)).text((u)=>u.text);break;case"path":X.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Me={draw:Ie},Ke={parser:be,db:Ee,renderer:Me};export{Ke as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{og}from"./index-gzp4j2h5.js";export{og as default};
|
|
@@ -30,6 +30,13 @@
|
|
|
30
30
|
"description": "Reads and acts on a repository's issues, pull/merge requests and releases on GitHub, GitLab, Gitea or Bitbucket.",
|
|
31
31
|
"category": "utility",
|
|
32
32
|
"author": { "name": "Kabmo Labs", "url": "https://github.com/kabmo-labs" }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "github-actions",
|
|
36
|
+
"source": "plugins/github-actions",
|
|
37
|
+
"description": "Monitors a repository's GitHub Actions runs: the list, each run's jobs and steps, job logs, and the cancel/re-run verbs.",
|
|
38
|
+
"category": "utility",
|
|
39
|
+
"author": { "name": "Kabmo Labs", "url": "https://github.com/kabmo-labs" }
|
|
33
40
|
}
|
|
34
41
|
]
|
|
35
42
|
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Actions
|
|
2
|
+
|
|
3
|
+
A right-panel view of a repository's **GitHub Actions** runs: which workflows ran,
|
|
4
|
+
how far each has got, which job failed and what it printed — with cancel and
|
|
5
|
+
re-run where the token allows them.
|
|
6
|
+
|
|
7
|
+
It is the monitoring side of a checkout. Source Control shows what you changed;
|
|
8
|
+
this shows what the host is doing with it.
|
|
9
|
+
|
|
10
|
+
## Surfaces
|
|
11
|
+
|
|
12
|
+
| Surface | What it draws |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `rightPanel` — **Runs** | filter (`branch`, state) → run list → one run's jobs and steps → a job's log; cancel / re-run / re-run failed |
|
|
15
|
+
|
|
16
|
+
There is no navbar readout. A failing-count badge would have to keep a poll
|
|
17
|
+
running for a number nobody is looking at, and the panel is the only reader of
|
|
18
|
+
what it would print.
|
|
19
|
+
|
|
20
|
+
The repository is the **shared pick** (`useRepoScope`), so switching repos in
|
|
21
|
+
Files, Search, Source Control, Terminal or Forge moves this panel too.
|
|
22
|
+
|
|
23
|
+
## What one read costs
|
|
24
|
+
|
|
25
|
+
Measured on this repository (591 runs, 23 workflows) with a token carrying
|
|
26
|
+
`repo,workflow`:
|
|
27
|
+
|
|
28
|
+
| Read | Payload |
|
|
29
|
+
|---|---|
|
|
30
|
+
| 30 runs | 481 KB (~16 KB per run — every row embeds the repository object) |
|
|
31
|
+
| 100 runs | 1.6 MB |
|
|
32
|
+
| one run | 16.8 KB |
|
|
33
|
+
| its 31 jobs (steps included) | 75.8 KB |
|
|
34
|
+
| one job's log | 17 KB (small job) / 63 KB (an E2E shard) |
|
|
35
|
+
| the whole run's log archive (not fetched) | 2.1 MB zipped, 8.5 MB inflated, 179 entries |
|
|
36
|
+
|
|
37
|
+
A second read of an unchanged resource answers `304` and is **free**: six
|
|
38
|
+
consecutive conditional reads left `x-ratelimit-remaining` untouched. That is why
|
|
39
|
+
the list, the run and the jobs are all read conditionally.
|
|
40
|
+
|
|
41
|
+
## Progress is counted, not invented
|
|
42
|
+
|
|
43
|
+
GitHub's API has no percentage and no ETA. A run is jobs, a job is steps, and each
|
|
44
|
+
carries `status` plus `conclusion`, so the panel prints what it can prove:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
14/31 jobs · 2 failing · 7/13 Test
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
A percentage would move backwards the moment a dynamic matrix adds a job.
|
|
51
|
+
|
|
52
|
+
## The log redirect is two requests
|
|
53
|
+
|
|
54
|
+
`GET /actions/jobs/{id}/logs` answers `302` to a signed blob URL. **Forwarding the
|
|
55
|
+
GitHub token to that URL returns `401 InvalidAuthenticationInfo`** (measured), so
|
|
56
|
+
the first request follows the redirect manually and the second carries no headers
|
|
57
|
+
at all. `Range` is ignored by the blob host (a `bytes=-2000` request answered
|
|
58
|
+
`200` with all 63,430 bytes), so the tail is taken after the download.
|
|
59
|
+
|
|
60
|
+
Logs **require a token**: the same endpoint answers `403 Must have admin rights`
|
|
61
|
+
to an anonymous read, even on a public repository. The panel says that instead of
|
|
62
|
+
drawing an empty pane.
|
|
63
|
+
|
|
64
|
+
The text is a runner transcript: UTF-8 BOM, an ISO timestamp before every line,
|
|
65
|
+
ANSI colour, and `##[group]` markers. The server strips the first three and turns
|
|
66
|
+
the markers into `▸`, `⚠` and `✗`; nothing else is removed, because a log is
|
|
67
|
+
evidence.
|
|
68
|
+
|
|
69
|
+
## Credential
|
|
70
|
+
|
|
71
|
+
Three sources, in order:
|
|
72
|
+
|
|
73
|
+
1. the plugin's `token` setting (Settings → Plugins Kabmo → Actions);
|
|
74
|
+
2. `GITHUB_TOKEN` / `GH_TOKEN` in the **server's** environment;
|
|
75
|
+
3. `gh auth token --hostname <host>`, read once per host (failures included).
|
|
76
|
+
|
|
77
|
+
No token is a legitimate state for reading: runs and jobs are visible on a public
|
|
78
|
+
repository. Logs and the three verbs are not.
|
|
79
|
+
|
|
80
|
+
## Writes
|
|
81
|
+
|
|
82
|
+
| Verb | When offered | What GitHub answers |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| Cancel | the token exists and the run is not finished | `202`, or `409` when it already completed |
|
|
85
|
+
| Re-run | the token exists and the run finished | `201` |
|
|
86
|
+
| Re-run failed | the token exists and at least one job failed | `201` |
|
|
87
|
+
|
|
88
|
+
A verb the token cannot perform is **not rendered**, and each confirmation names
|
|
89
|
+
the consequence (how many jobs will be stopped) rather than asking "are you
|
|
90
|
+
sure?". A refusal is GitHub's own sentence, verbatim.
|
|
91
|
+
|
|
92
|
+
## What it does not do
|
|
93
|
+
|
|
94
|
+
- **No webhooks.** A webhook needs ingress and a secret; Kabmo is usually behind
|
|
95
|
+
NAT. The panel reads when it opens and on Refresh, and an unchanged read is a
|
|
96
|
+
free `304`, so a reader always sees the state the last read proved.
|
|
97
|
+
- **No artifacts, deployments or workflow dispatch.** Dispatch exists in the API
|
|
98
|
+
(a request without `ref` answers `422`), but its inputs are the workflow file's
|
|
99
|
+
own schema — a second feature.
|
|
100
|
+
- **No run-level log archive.** A job's own log is one request and 17–63 KB; the
|
|
101
|
+
whole run is a 2.1 MB zip (8.5 MB inflated) that would need an inflater only for
|
|
102
|
+
a file the reader has to pick out of 179 entries anyway.
|
|
103
|
+
- **No percentage, no ETA** (see above), and no cross-repository list.
|
|
104
|
+
- **No GitLab/Gitea/Bitbucket.** Actions is GitHub's vocabulary; another host is
|
|
105
|
+
refused by name.
|
|
106
|
+
- **No notifications.** The kit has no toast or OS-notification surface, and this
|
|
107
|
+
plugin draws no navbar badge: a red `main` is seen by opening the panel.
|
|
108
|
+
|
|
109
|
+
## Settings
|
|
110
|
+
|
|
111
|
+
| Setting | Default | What it does |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| GitHub token | empty | Read before the environment and `gh`. Stored as a secret. |
|
|
114
|
+
| API base URL | empty | GitHub Enterprise, e.g. `https://github.example.com/api/v3`. |
|
|
115
|
+
| Runs per read | 30 | 1–100. A full page is reported as truncated. |
|
|
116
|
+
| Log tail | 64 KB | The tail kept by default; "Whole log" asks for more. |
|
|
117
|
+
|
|
118
|
+
## Tests
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
bun test marketplace/plugins/github-actions/
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Each suite owns a rule that fails silently:
|
|
125
|
+
|
|
126
|
+
- `state.test.ts` — the vocabulary: an unfinished run is pending, a skipped job is
|
|
127
|
+
not a pass, an unknown word is neutral rather than red.
|
|
128
|
+
- `progress.test.ts` — the count, the roll-up, and the step line.
|
|
129
|
+
- `logtext.test.ts` — BOM, ANSI, timestamp and `##[group]` folding; a tail cut on a
|
|
130
|
+
line boundary.
|
|
131
|
+
- `github.test.ts` — the mapping over recorded bodies, the anonymous note, and the
|
|
132
|
+
log path that must not forward the token.
|
|
133
|
+
- `http.test.ts` — a second read of an unchanged resource is a `304` and writes
|
|
134
|
+
nothing new; a changed one replaces the body.
|
|
135
|
+
- `panel/index.test.tsx` — the assembled panel: rows open a run, a failed read is
|
|
136
|
+
not an empty list, a log refusal names the token.
|
|
137
|
+
- `panel/picker.test.tsx` — a repo pick writes the SHARED slot, and a pick that
|
|
138
|
+
cannot be read drops the previous scope's rows instead of leaving them on
|
|
139
|
+
screen under a moved trigger.
|
|
140
|
+
|
|
141
|
+
The panel suites mount through `panel/test-harness.tsx` (real DOM, faked kit
|
|
142
|
+
services) and read the bodies in `panel/test-fixtures.ts`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="24" height="24" role="img" aria-label="Actions">
|
|
2
|
+
<title>Actions</title>
|
|
3
|
+
<!-- The mark is GitHub's own `github-action` Octicon (MIT, github/octicons),
|
|
4
|
+
copied path for path rather than redrawn: a reader who knows the Actions
|
|
5
|
+
tab recognises it, and the host draws a plugin mark through a CSS MASK, so
|
|
6
|
+
only the shape matters — the surrounding ink supplies the colour. -->
|
|
7
|
+
<path
|
|
8
|
+
fill="currentColor"
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
d="M9 2h6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1H9a1 1 0 1 1-2 0H1c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h6a1 1 0 1 1 2 0zm6 1v10H1V3h14zm-2.5 4a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3z"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "github-actions",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Monitors a repository's GitHub Actions runs: the list, each run's jobs and steps, job logs, and the cancel/re-run verbs.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"kabmo": {
|
|
8
|
+
"id": "github-actions",
|
|
9
|
+
"name": "Actions",
|
|
10
|
+
"version": "0.2.0",
|
|
11
|
+
"description": "Monitors a repository's GitHub Actions runs: the list, each run's jobs and steps, job logs, and the cancel/re-run verbs.",
|
|
12
|
+
"app": "dist/app.js",
|
|
13
|
+
"server": "dist/server.js",
|
|
14
|
+
"icon": "icon.svg",
|
|
15
|
+
"color": "#60a5fa",
|
|
16
|
+
"author": { "name": "Kabmo Labs", "url": "https://github.com/kabmo-labs" },
|
|
17
|
+
"slots": ["rightPanel"],
|
|
18
|
+
"capabilities": ["server", "storage", "rpc", "realtime", "settings", "repo-scope"]
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@kabmo-labs/kabmo-sdk": "*",
|
|
22
|
+
"@kabmo-labs/kabmo-ui": "*",
|
|
23
|
+
"preact": "^10.29.8"
|
|
24
|
+
},
|
|
25
|
+
"peerDependenciesMeta": {
|
|
26
|
+
"@kabmo-labs/kabmo-sdk": { "optional": true },
|
|
27
|
+
"@kabmo-labs/kabmo-ui": { "optional": true },
|
|
28
|
+
"preact": { "optional": true }
|
|
29
|
+
}
|
|
30
|
+
}
|