wiki-viewer 2.12.0 → 2.14.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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +14 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/routes-manifest.json +81 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/approve/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/[regId]/deny/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/admin/registrations/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js +7 -7
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js +7 -7
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/live/attach/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route.js +11 -11
- package/.next/standalone/.next/server/app/api/agent/live/attach/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/attach/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route.js +17 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/md-preview/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route.js +17 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/poll/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route.js +17 -0
- package/.next/standalone/.next/server/app/api/agent/live/reply/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/{internal/span → live/reply}/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/live/reply/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route.js +18 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/agent/live/web-preview/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/pdf/save/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/branch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-branches/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-checkout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-file-info/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-history/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-pull/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route.js +18 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-request/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route.js +18 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-resolve/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/md-status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/{agent/internal/span → wiki/live/md-status}/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/live/request/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/request/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route.js +17 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/live/status/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/outlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route.js +7 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/picker.js/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/request/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route.js +17 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/resolve/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route.js +16 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/wiki/web-tweak/status/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +14 -1
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_031ecpl.js +274 -0
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0afqvqi.js +3 -0
- package/.next/standalone/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0ofi5.l.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07wa2lq._.js → [root-of-the-server]__0-l8919._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0e~2gkf._.js → [root-of-the-server]__0-vsohg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.xk8gi._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0002pqj._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01v1udu._.js +16 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01y-312._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__020sc-x._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__02373p-._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0n2r6u9._.js → [root-of-the-server]__03c8~ck._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03qy0.z._.js +55 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__056pu9b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06kspyc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07bxa4u._.js +90 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08xiuca._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0936qml._.js +43 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09g2xhj._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0badnl7._.js +43 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bqhp4b._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dk42.p._.js +90 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e_irm6._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iksibp._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jlrhzi._.js +55 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kamtmx._.js +50 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kpcc70._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0laknd~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0m.o598._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0mgvfb5._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0n7uto3._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oxzq2p._.js +8 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r-3u3v._.js +8 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t8r97l._.js +50 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vuw0yp._.js +50 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xoz8e8._.js → [root-of-the-server]__0wtrbmm._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0y4lx2l._.js +50 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z5xk6f._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zrcu6l._.js +20 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10-ona2._.js +20 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__130a-u1._.js +50 -0
- package/.next/standalone/.next/server/chunks/_079xuln._.js +1 -1
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_attach_route_actions_0cy5eae.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_md-preview_route_actions_07po~tm.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_poll_route_actions_0tef7r~.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_reply_route_actions_0modpib.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_live_web-preview_route_actions_0qjm1cw.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_md-request_route_actions_0z5ad2q.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_md-resolve_route_actions_0_8g88b.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_md-status_route_actions_02ykgzf.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_request_route_actions_00m8pc2.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_live_status_route_actions_0v.pypx.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_picker_js_route_actions_118~f~j.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_request_route_actions_0wlzrco.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_resolve_route_actions_0wq6pw5.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_web-tweak_status_route_actions_0vr4h6u.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{0~w0_katex_dist_katex_mjs_0-fyxoz._.js → 0~w0_katex_dist_katex_mjs_0okh~tf._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_blockDiagram-GPEHLZMM_mjs_0v204vn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_c4Diagram-AAUBKEIU_mjs_0.iwqva._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-3OPIFGDE_mjs_09p1amp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-5ZQYHXKU_mjs_0z1.978._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-727SXJPM_mjs_115~dsb._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-AQP2D5EJ_mjs_0euza.d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-CSCIHK7Q_mjs_01i7moi._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-KSCS5N6A_mjs_0v4oeem._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-O5CBEL6O_mjs_11437bo._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_dagre-BM42HDAG_mjs_05ekknz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_diagram-OG6HWLK6_mjs_0t5sus6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_erDiagram-TEJ5UH35_mjs_0v6rnqy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_flowDiagram-I6XJVG4X_mjs_13pu1pv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_gitGraphDiagram-PVQCEYII_mjs_0jp8i-h._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_ishikawaDiagram-YF4QCWOH_mjs_0tcayi4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_journeyDiagram-JHISSGLW_mjs_0-ln2o9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_kanban-definition-UN3LZRKU_mjs_0_sdvmq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_mindmap-definition-RKZ34NQL_mjs_002sdr9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_quadrantDiagram-W4KKPZXB_mjs_0re1qsf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_requirementDiagram-4Y6WPE33_mjs_067p6fg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_sankeyDiagram-5OEKKPKP_mjs_11ifrnu._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_sequenceDiagram-3UESZ5HK_mjs_015n5fb._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_stateDiagram-AJRCARHV_mjs_0q8ykwx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_timeline-definition-PNZ67QCA_mjs_0ie6b6s._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_vennDiagram-CIIHVFJN_mjs_0hds9fe._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_wardleyDiagram-YWT4CUSO_mjs_0s.dkn9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_xychartDiagram-2RQKCTM6_mjs_0v-eh5w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_mermaid_core_mjs_0hj_n-~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~4py6h._.js → [root-of-the-server]__0t5fses._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0d9d~c~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0kkaybx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0oq8kwv._.js +284 -12
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0f0qocb._.js → node_modules__pnpm_0-l23--._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0_g0a7t._.js → node_modules__pnpm_00d-n5v._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0v7wopg._.js → node_modules__pnpm_014r.0e._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0zdl7-7._.js → node_modules__pnpm_03j578g._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_04rulr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_09y5c~i._.js → node_modules__pnpm_05qsb2c._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0sdy2lv._.js → node_modules__pnpm_08i5ti8._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0b6_242._.js → node_modules__pnpm_09t82cx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0f6r-u~._.js → node_modules__pnpm_09~hu70._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0pggrwu._.js → node_modules__pnpm_0cfriah._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_02qa21p._.js → node_modules__pnpm_0ct341~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0d4-t2b._.js → node_modules__pnpm_0eps_u_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0fb6~r_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0q9s5k5._.js → node_modules__pnpm_0k47joo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0l9eomm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0q_v1_2._.js → node_modules__pnpm_0nsy85b._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0vahm7l._.js → node_modules__pnpm_0n~wbom._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0.xieh4._.js → node_modules__pnpm_0o1._vw._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0kib6pw._.js → node_modules__pnpm_0t21hj7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0~wqhb9._.js → node_modules__pnpm_0tl8mi0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0f9artj._.js → node_modules__pnpm_0tqv.ym._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05c~go7._.js → node_modules__pnpm_0v9mhna._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_07hg43b._.js → node_modules__pnpm_0w8.hpb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0_zd0nt._.js → node_modules__pnpm_0wrxa~f._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0g_tlt-._.js → node_modules__pnpm_0xrjcxa._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ghm84g._.js → node_modules__pnpm_0xrusyy._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0c6q9~6._.js → node_modules__pnpm_0y.wb-7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0tvmv0e._.js → node_modules__pnpm_0yu-3eu._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0k6yfdh._.js → node_modules__pnpm_11q1n~-._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_01~03ak._.js → node_modules__pnpm_1323nh~._.js} +2 -2
- package/.next/standalone/.next/server/functions-config-manifest.json +15 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0k~5ok-cacnor.js +417 -0
- package/.next/standalone/.next/static/chunks/{04um2f1eeqcss.js → 0noq2zqrh0z_0.js} +1 -1
- package/.next/standalone/.next/static/chunks/{04f8lhbw6m9ee.js → 0tn7wdt213lbb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{138ap~9f.rqkh.css → 12-umagms5yro.css} +1 -1
- package/.next/standalone/.next/static/chunks/17446l.6t9j17.css +1 -0
- package/.next/standalone/.test-floor +1 -1
- package/.next/standalone/_status.md +19 -0
- package/.next/standalone/meta/contract.md +67 -0
- package/.next/standalone/meta/overview.md +10 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/queries/lint-2026-08-15.md +28 -0
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/specs/changes/block-preconditions/proposal.md +90 -0
- package/.next/standalone/specs/changes/blockref-frontmatter-misalign/proposal.md +81 -0
- package/.next/standalone/specs/changes/collective-agent-review/design.md +183 -0
- package/.next/standalone/specs/changes/collective-agent-review/proposal.md +138 -0
- package/.next/standalone/specs/changes/collective-agent-review/requirements.md +100 -0
- package/.next/standalone/specs/changes/collective-agent-review/tasks.md +62 -0
- package/.next/standalone/specs/changes/live-collab/design.md +141 -0
- package/.next/standalone/specs/changes/live-collab/proposal.md +133 -0
- package/.next/standalone/specs/changes/live-collab/requirements.md +91 -0
- package/.next/standalone/specs/changes/live-collab/tasks.md +39 -0
- package/.next/standalone/specs/changes/live-collab-web/findings-termdeck.md +120 -0
- package/.next/standalone/specs/changes/live-collab-web/proposal.md +184 -0
- package/.next/standalone/specs/changes/live-unified/design.md +49 -0
- package/.next/standalone/specs/changes/live-unified/proposal.md +54 -0
- package/.next/standalone/specs/changes/web-tweak-variants/proposal.md +65 -0
- package/.next/standalone/wp-test-6mm5qr/burst-0.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-1.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-10.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-11.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-12.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-13.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-14.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-15.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-16.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-17.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-18.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-19.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-2.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-20.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-21.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-22.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-23.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-24.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-25.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-26.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-27.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-28.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-29.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-3.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-30.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-31.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-32.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-33.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-34.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-35.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-36.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-37.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-38.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-39.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-4.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-40.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-41.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-42.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-43.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-44.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-45.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-46.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-47.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-48.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-49.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-5.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-6.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-7.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-8.txt +1 -0
- package/.next/standalone/wp-test-6mm5qr/burst-9.txt +1 -0
- package/.next/standalone/wp-test-SiMBLk/child/nested.txt +1 -0
- package/.next/standalone/wp-test-SiMBLk/rootfile.txt +1 -0
- package/.next/standalone/wp-test-bFyuuZ/child/nested.txt +1 -0
- package/.next/standalone/wp-test-bFyuuZ/rootfile.txt +1 -0
- package/.next/standalone/wp-test-dn9shN/after-reset.txt +1 -0
- package/.next/standalone/wp-test-gL64l2/shared.txt +1 -0
- package/.next/standalone/wp-test-mlyQ7q/test.txt +1 -0
- package/.next/standalone/wp-test-o3g2XI/shared.txt +1 -0
- package/.next/standalone/wp-test-oHeYCM/subA/a.txt +1 -0
- package/.next/standalone/wp-test-oHeYCM/subB/b.txt +1 -0
- package/package.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/internal/span/route/app-paths-manifest.json +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04vo55d._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_g-.kr._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bpv09n._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e1kbl7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0omny3u._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q~ky91._.js +0 -16
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r--676._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0x.030x._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xlo2r_._.js +0 -3
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_agent_internal_span_route_actions_121if52.js +0 -3
- package/.next/standalone/.next/static/chunks/0gogvjz6oxo51.css +0 -1
- package/.next/standalone/.next/static/chunks/11ehczv8yax~_.js +0 -145
- /package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route/build-manifest.json +0 -0
- /package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route/server-reference-manifest.json +0 -0
- /package/.next/standalone/.next/server/app/api/agent/{internal/span → live/attach}/route.js.map +0 -0
- /package/.next/standalone/.next/static/{AsrmwC0YfrYEMAXj2s0Wx → BXRSlvxAOCUzi4h8wCLQi}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{AsrmwC0YfrYEMAXj2s0Wx → BXRSlvxAOCUzi4h8wCLQi}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{AsrmwC0YfrYEMAXj2s0Wx → BXRSlvxAOCUzi4h8wCLQi}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[265261,a=>{"use strict";var b,c=a.i(29336),d=a.i(197112),e=a.i(604225),f=a.i(762939);a.i(43066);var g=a.i(455784),h=a.i(4011),i=a.i(88589),j=a.i(602865),k=a.i(422241);let l=(a,b)=>(0,k.default)(a,"a",-b);function m(a,b){let c=function(a){let b=[];for(let c=0;c<a.length;++c)for(let d=c+1;d<a.length;++d)for(let e of q(a[c],a[d]))e.parentIndex=[c,d],b.push(e);return b}(a),d=c.filter(b=>{var c;return c=b,a.every(a=>o(c,a)<a.radius+1e-10)}),e=0,f=0,g=[];if(d.length>1){let b=r(d);for(let a=0;a<d.length;++a){let c=d[a];c.angle=Math.atan2(c.x-b.x,c.y-b.y)}d.sort((a,b)=>b.angle-a.angle);let c=d[d.length-1];for(let b=0;b<d.length;++b){let h=d[b];f+=(c.x+h.x)*(h.y-c.y);let i={x:(h.x+c.x)/2,y:(h.y+c.y)/2},j=null;for(let b=0;b<h.parentIndex.length;++b)if(c.parentIndex.includes(h.parentIndex[b])){let d=a[h.parentIndex[b]],e=Math.atan2(h.x-d.x,h.y-d.y),f=Math.atan2(c.x-d.x,c.y-d.y),g=f-e;g<0&&(g+=2*Math.PI);let k=f-g/2,l=o(i,{x:d.x+d.radius*Math.sin(k),y:d.y+d.radius*Math.cos(k)});l>2*d.radius&&(l=2*d.radius),(null==j||j.width>l)&&(j={circle:d,width:l,p1:h,p2:c,large:l>d.radius,sweep:!0})}null!=j&&(g.push(j),e+=n(j.circle.radius,j.width),c=h)}}else{let b=a[0];for(let c=1;c<a.length;++c)a[c].radius<b.radius&&(b=a[c]);let c=!1;for(let d=0;d<a.length;++d)if(o(a[d],b)>Math.abs(b.radius-a[d].radius)){c=!0;break}c?e=f=0:(e=b.radius*b.radius*Math.PI,g.push({circle:b,p1:{x:b.x,y:b.y+b.radius},p2:{x:b.x-1e-10,y:b.y+b.radius},width:2*b.radius,large:!0,sweep:!0}))}return f/=2,b&&(b.area=e+f,b.arcArea=e,b.polygonArea=f,b.arcs=g,b.innerPoints=d,b.intersectionPoints=c),e+f}function n(a,b){return a*a*Math.acos(1-b/a)-(a-b)*Math.sqrt(b*(2*a-b))}function o(a,b){return Math.sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))}function p(a,b,c){return c>=a+b?0:c<=Math.abs(a-b)?Math.PI*Math.min(a,b)*Math.min(a,b):n(a,a-(c*c-b*b+a*a)/(2*c))+n(b,b-(c*c-a*a+b*b)/(2*c))}function q(a,b){let c=o(a,b),d=a.radius,e=b.radius;if(c>=d+e||c<=Math.abs(d-e))return[];let f=(d*d-e*e+c*c)/(2*c),g=Math.sqrt(d*d-f*f),h=a.x+f*(b.x-a.x)/c,i=a.y+f*(b.y-a.y)/c,j=-(b.y-a.y)*(g/c),k=-(b.x-a.x)*(g/c);return[{x:h+j,y:i-k},{x:h-j,y:i+k}]}function r(a){let b={x:0,y:0};for(let c of a)b.x+=c.x,b.y+=c.y;return b.x/=a.length,b.y/=a.length,b}function s(a){let b=Array(a);for(let c=0;c<a;++c)b[c]=0;return b}function t(a,b){return s(a).map(()=>s(b))}function u(a,b){let c=0;for(let d=0;d<a.length;++d)c+=a[d]*b[d];return c}function v(a){return Math.sqrt(u(a,a))}function w(a,b,c){for(let d=0;d<b.length;++d)a[d]=b[d]*c}function x(a,b,c,d,e){for(let f=0;f<a.length;++f)a[f]=b*c[f]+d*e[f]}function y(a,b,c){let d,e=(c=c||{}).maxIterations||200*b.length,f=c.nonZeroDelta||1.05,g=c.zeroDelta||.001,h=c.minErrorDelta||1e-6,i=c.minErrorDelta||1e-5,j=void 0!==c.rho?c.rho:1,k=void 0!==c.chi?c.chi:2,l=void 0!==c.psi?c.psi:-.5,m=void 0!==c.sigma?c.sigma:.5,n=b.length,o=Array(n+1);o[0]=b,o[0].fx=a(b),o[0].id=0;for(let c=0;c<n;++c){let d=b.slice();d[c]=d[c]?d[c]*f:g,o[c+1]=d,o[c+1].fx=a(d),o[c+1].id=c+1}function p(a){for(let b=0;b<a.length;b++)o[n][b]=a[b];o[n].fx=a.fx}let q=(a,b)=>a.fx-b.fx,r=b.slice(),s=b.slice(),t=b.slice(),u=b.slice();for(let b=0;b<e;++b){if(o.sort(q),c.history){let a=o.map(a=>{let b=a.slice();return b.fx=a.fx,b.id=a.id,b});a.sort((a,b)=>a.id-b.id),c.history.push({x:o[0].slice(),fx:o[0].fx,simplex:a})}d=0;for(let a=0;a<n;++a)d=Math.max(d,Math.abs(o[0][a]-o[1][a]));if(Math.abs(o[0].fx-o[n].fx)<h&&d<i)break;for(let a=0;a<n;++a){r[a]=0;for(let b=0;b<n;++b)r[a]+=o[b][a];r[a]/=n}let b=o[n];if(x(s,1+j,r,-j,b),s.fx=a(s),s.fx<o[0].fx)x(u,1+k,r,-k,b),u.fx=a(u),p(u.fx<s.fx?u:s);else if(s.fx>=o[n-1].fx){let c=!1;if(s.fx>b.fx?(x(t,1+l,r,-l,b),t.fx=a(t),t.fx<b.fx?p(t):c=!0):(x(t,1-l*j,r,l*j,b),t.fx=a(t),t.fx<s.fx?p(t):c=!0),c){if(m>=1)break;for(let b=1;b<o.length;++b)x(o[b],1-m,o[0],m,o[b]),o[b].fx=a(o[b])}}else p(s)}return o.sort(q),{fx:o[0].fx,x:o[0]}}function z(a,b={}){b.maxIterations=b.maxIterations||500;let c=b.initialLayout||B,d=b.lossFunction||C,e=function(a,b={}){let c=b.distinct,d=a.map(a=>Object.assign({},a));function e(a){return a.join(";")}if(c){let a=new Map;for(let b of d)for(let c=0;c<b.sets.length;c++){let d=String(b.sets[c]);a.set(d,b.size+(a.get(d)||0));for(let e=c+1;e<b.sets.length;e++){let c=String(b.sets[e]),f=`${d};${c}`,g=`${c};${d}`;a.set(f,b.size+(a.get(f)||0)),a.set(g,b.size+(a.get(g)||0))}}for(let b of d)b.sets.length<3&&(b.size=a.get(e(b.sets)))}let f=[],g=new Set;for(let a of d)if(1===a.sets.length)f.push(a.sets[0]);else if(2===a.sets.length){let b=a.sets[0],c=a.sets[1];g.add(e(a.sets)),g.add(e([c,b]))}f.sort((a,b)=>a===b?0:a<b?-1:1);for(let a=0;a<f.length;++a){let b=f[a];for(let c=a+1;c<f.length;++c){let a=f[c];g.has(e([b,a]))||d.push({sets:[b,a],size:0})}}return d}(a,b),f=c(e,b),g=Object.keys(f),h=[];for(let a of g)h.push(f[a].x),h.push(f[a].y);let i=y(a=>{let b={};for(let c=0;c<g.length;++c){let d=g[c];b[d]={x:a[2*c],y:a[2*c+1],radius:f[d].radius}}return d(b,e)},h,b).x;for(let a=0;a<g.length;++a){let b=g[a];f[b].x=i[2*a],f[b].y=i[2*a+1]}return f}function A(a,b,c){return Math.min(a,b)*Math.min(a,b)*Math.PI<=c+1e-10?Math.abs(a-b):function(a,b,c,d){let e=(d=d||{}).maxIterations||100,f=d.tolerance||1e-10,g=a(b),h=a(c),i=c-b;if(g*h>0)throw"Initial bisect points must have opposite signs";if(0===g)return b;if(0===h)return c;for(let c=0;c<e;++c){let c=b+(i/=2),d=a(c);if(d*g>=0&&(b=c),Math.abs(i)<f||0===d)return c}return b+i}(d=>p(a,b,d)-c,0,a+b)}function B(a,b={}){let c=function(a,b){let c=b&&b.lossFunction?b.lossFunction:C,d={},e={};for(let b of a)if(1===b.sets.length){let a=b.sets[0];d[a]={x:1e10,y:1e10,rowid:d.length,size:b.size,radius:Math.sqrt(b.size/Math.PI)},e[a]=[]}for(let b of a=a.filter(a=>2===a.sets.length)){let a=null!=b.weight?b.weight:1,c=b.sets[0],f=b.sets[1];b.size+1e-10>=Math.min(d[c].size,d[f].size)&&(a=0),e[c].push({set:f,size:b.size,weight:a}),e[f].push({set:c,size:b.size,weight:a})}let f=[];function g(a,b){return b.size-a.size}Object.keys(e).forEach(a=>{let b=0;for(let c=0;c<e[a].length;++c)b+=e[a][c].size*e[a][c].weight;f.push({set:a,size:b})}),f.sort(g);let h={};function i(a){return a.set in h}function j(a,b){d[b].x=a.x,d[b].y=a.y,h[b]=!0}j({x:0,y:0},f[0].set);for(let b=1;b<f.length;++b){let h=f[b].set,l=e[h].filter(i),m=d[h];if(l.sort(g),0===l.length)throw"ERROR: missing pairwise overlap information";let n=[];for(var k=0;k<l.length;++k){let a=d[l[k].set],b=A(m.radius,a.radius,l[k].size);n.push({x:a.x+b,y:a.y}),n.push({x:a.x-b,y:a.y}),n.push({y:a.y+b,x:a.x}),n.push({y:a.y-b,x:a.x});for(let c=k+1;c<l.length;++c){let e=d[l[c].set],f=A(m.radius,e.radius,l[c].size),g=q({x:a.x,y:a.y,radius:b},{x:e.x,y:e.y,radius:f});n.push(...g)}}let o=1e50,p=n[0];for(let b of n){d[h].x=b.x,d[h].y=b.y;let e=c(d,a);e<o&&(o=e,p=b)}j(p,h)}return d}(a,b),d=b.lossFunction||C;if(a.length>=8){let e=function(a,b={}){let c,d,e=b.restarts||10,f=[],g={};for(let b of a)1===b.sets.length&&(g[b.sets[0]]=f.length,f.push(b));let{distances:h,constraints:i}=(c=t(f.length,f.length),d=t(f.length,f.length),a.filter(a=>2===a.sets.length).forEach(a=>{let b=g[a.sets[0]],e=g[a.sets[1]],h=A(Math.sqrt(f[b].size/Math.PI),Math.sqrt(f[e].size/Math.PI),a.size);c[b][e]=c[e][b]=h;let i=0;a.size+1e-10>=Math.min(f[b].size,f[e].size)?i=1:a.size<=1e-10&&(i=-1),d[b][e]=d[e][b]=i}),{distances:c,constraints:d}),j=v(h.map(v))/h.length;h=h.map(a=>a.map(a=>a/j));let k=(a,b)=>(function(a,b,c,d){for(let a=0;a<b.length;++a)b[a]=0;let e=0;for(let f=0;f<c.length;++f){let g=a[2*f],h=a[2*f+1];for(let i=f+1;i<c.length;++i){let j=a[2*i],k=a[2*i+1],l=c[f][i],m=d[f][i],n=(j-g)*(j-g)+(k-h)*(k-h),o=Math.sqrt(n),p=n-l*l;m>0&&o<=l||m<0&&o>=l||(e+=2*p*p,b[2*f]+=4*p*(g-j),b[2*f+1]+=4*p*(h-k),b[2*i]+=4*p*(j-g),b[2*i+1]+=4*p*(k-h))}}return e})(a,b,h,i),l=null;for(let a=0;a<e;++a){let a=function(a,b,c){let d,e,f,g={x:b.slice(),fx:0,fxprime:b.slice()},h={x:b.slice(),fx:0,fxprime:b.slice()},i=b.slice(),j=1;f=(c=c||{}).maxIterations||20*b.length,g.fx=a(g.x,g.fxprime),w(d=g.fxprime.slice(),g.fxprime,-1);for(let b=0;b<f;++b){if(j=function(a,b,c,d,e,f,g){let h=c.fx,i=u(c.fxprime,b),j=h,k=h,l=i,m=0;function n(k,m,n){for(let o=0;o<16;++o)if(e=(k+m)/2,x(d.x,1,c.x,e,b),j=d.fx=a(d.x,d.fxprime),l=u(d.fxprime,b),j>h+f*e*i||j>=n)m=e;else{if(Math.abs(l)<=-g*i)return e;l*(m-k)>=0&&(m=k),k=e,n=j}return 0}e=e||1,f=f||1e-6,g=g||.1;for(let o=0;o<10;++o){if(x(d.x,1,c.x,e,b),j=d.fx=a(d.x,d.fxprime),l=u(d.fxprime,b),j>h+f*e*i||o&&j>=k)return n(m,e,k);if(Math.abs(l)<=-g*i)break;if(l>=0)return n(e,m,j);k=j,m=e,e*=2}return e}(a,d,g,h,j),c.history&&c.history.push({x:g.x.slice(),fx:g.fx,fxprime:g.fxprime.slice(),alpha:j}),j){x(i,1,h.fxprime,-1,g.fxprime);let a=u(g.fxprime,g.fxprime);x(d,Math.max(0,u(i,h.fxprime)/a),d,-1,h.fxprime),e=g,g=h,h=e}else w(d,g.fxprime,-1);if(1e-5>=v(g.fxprime))break}return c.history&&c.history.push({x:g.x.slice(),fx:g.fx,fxprime:g.fxprime.slice(),alpha:j}),g}(k,s(2*h.length).map(Math.random),b);(!l||a.fx<l.fx)&&(l=a)}let m=l.x,n={};for(let a=0;a<f.length;++a){let b=f[a];n[b.sets[0]]={x:m[2*a]*j,y:m[2*a+1]*j,radius:Math.sqrt(b.size/Math.PI)}}if(b.history)for(let a of b.history)w(a.x,j);return n}(a,b);d(e,a)+1e-8<d(c,a)&&(c=e)}return c}function C(a,b){let c=0;for(let d of b){let b;if(1!==d.sets.length){if(2===d.sets.length){let c=a[d.sets[0]],e=a[d.sets[1]];b=p(c.radius,e.radius,o(c,e))}else b=m(d.sets.map(b=>a[b]));c+=(null!=d.weight?d.weight:1)*(b-d.size)*(b-d.size)}}return c}function D(a,b){let c=0;for(let d of b){let b;if(1===d.sets.length)continue;if(2===d.sets.length){let c=a[d.sets[0]],e=a[d.sets[1]];b=p(c.radius,e.radius,o(c,e))}else b=m(d.sets.map(b=>a[b]));let e=null!=d.weight?d.weight:1,f=Math.log((b+1)/(d.size+1));c+=e*f*f}return c}function E(a){let b=b=>({max:a.reduce((a,c)=>Math.max(a,c[b]+c.radius),-1/0),min:a.reduce((a,c)=>Math.min(a,c[b]-c.radius),1/0)});return{xRange:b("x"),yRange:b("y")}}function F(a,b,c){null==b&&(b=Math.PI/2);let d=I(a).map(a=>Object.assign({},a)),e=function(a){function b(a){return a.parent!==a&&(a.parent=b(a.parent)),a.parent}a.forEach(a=>{a.parent=a});for(let e=0;e<a.length;++e)for(let f=e+1;f<a.length;++f){var c,d;let g=a[e].radius+a[f].radius;o(a[e],a[f])+1e-10<g&&(c=a[f],d=a[e],b(c).parent=b(d))}let e=new Map;for(let c=0;c<a.length;++c){let d=b(a[c]).parent.setid;e.has(d)||e.set(d,[]),e.get(d).push(a[c])}return a.forEach(a=>{delete a.parent}),Array.from(e.values())}(d);for(let a of e){!function(a,b,c){if(null==c?a.sort((a,b)=>b.radius-a.radius):a.sort(c),a.length>0){let b=a[0].x,c=a[0].y;for(let d of a)d.x-=b,d.y-=c}if(2===a.length&&o(a[0],a[1])<Math.abs(a[1].radius-a[0].radius)&&(a[1].x=a[0].x+a[0].radius-a[1].radius-1e-10,a[1].y=a[0].y),a.length>1){let c=Math.atan2(a[1].x,a[1].y)-b,d=Math.cos(c),e=Math.sin(c);for(let b of a){let a=b.x,c=b.y;b.x=d*a-e*c,b.y=e*a+d*c}}if(a.length>2){let c=Math.atan2(a[2].x,a[2].y)-b;for(;c<0;)c+=2*Math.PI;for(;c>2*Math.PI;)c-=2*Math.PI;if(c>Math.PI){let b=a[1].y/(1e-10+a[1].x);for(let c of a){var d=(c.x+b*c.y)/(1+b*b);c.x=2*d-c.x,c.y=2*d*b-c.y}}}}(a,b,c);let d=E(a);a.size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),a.bounds=d}e.sort((a,b)=>b.size-a.size);let f=(d=e[0]).bounds,g=(f.xRange.max-f.xRange.min)/50;function h(a,b,c){let e,h;if(!a)return;let i=a.bounds;if(b)e=f.xRange.max-i.xRange.min+g;else{e=f.xRange.max-i.xRange.max;let a=(i.xRange.max-i.xRange.min)/2-(f.xRange.max-f.xRange.min)/2;a<0&&(e+=a)}if(c)h=f.yRange.max-i.yRange.min+g;else{h=f.yRange.max-i.yRange.max;let a=(i.yRange.max-i.yRange.min)/2-(f.yRange.max-f.yRange.min)/2;a<0&&(h+=a)}for(let b of a)b.x+=e,b.y+=h,d.push(b)}let i=1;for(;i<e.length;)h(e[i],!0,!1),h(e[i+1],!1,!0),h(e[i+2],!0,!0),i+=3,f=E(d);return H(d)}function G(a,b,c,d,e){let f,g,h=I(a);b-=2*d,c-=2*d;let{xRange:i,yRange:j}=E(h);if(i.max===i.min||j.max===j.min)return console.log("not scaling solution: zero size detected"),a;if(e){let a=2*Math.sqrt(e/Math.PI);f=b/a,g=c/a}else f=b/(i.max-i.min),g=c/(j.max-j.min);let k=Math.min(g,f),l=(b-(i.max-i.min)*k)/2,m=(c-(j.max-j.min)*k)/2;return H(h.map(a=>({radius:k*a.radius,x:d+l+(a.x-i.min)*k,y:d+m+(a.y-j.min)*k,setid:a.setid})))}function H(a){let b={};for(let c of a)b[c.setid]=c;return b}function I(a){return Object.keys(a).map(b=>Object.assign(a[b],{setid:b}))}function J(a,b){return function(c){let d=this,e=a[c.sets[0]].radius||50,f=b(c)||"",g=f.split(/\s+/).reverse(),h=(f.length+g.length)/3,i=g.pop(),j=[i],k=0;d.textContent=null;let l=[];function m(a){let b=d.ownerDocument.createElementNS(d.namespaceURI,"tspan");return b.textContent=a,l.push(b),d.append(b),b}let n=m(i);for(;i=g.pop();){j.push(i);let a=j.join(" ");n.textContent=a,a.length>h&&n.getComputedTextLength()>e&&(j.pop(),n.textContent=j.join(" "),j=[i],n=m(i),k++)}let o=.35-1.1*k/2,p=d.getAttribute("x"),q=d.getAttribute("y");l.forEach((a,b)=>{a.setAttribute("x",p),a.setAttribute("y",q),a.setAttribute("dy",`${o+1.1*b}em`)})}}function K(a,b,c){let d=b[0].radius-o(b[0],a);for(let c=1;c<b.length;++c){let e=b[c].radius-o(b[c],a);e<=d&&(d=e)}for(let b=0;b<c.length;++b){let e=o(c[b],a)-c[b].radius;e<=d&&(d=e)}return d}function L(a,b,c){let d={},e=function(a){let b={},c=Object.keys(a);for(let a of c)b[a]=[];for(let d=0;d<c.length;d++){let e=c[d],f=a[e];for(let g=d+1;g<c.length;++g){let d=c[g],h=a[d],i=o(f,h);i+h.radius<=f.radius+1e-10?b[d].push(e):i+f.radius<=h.radius+1e-10&&b[e].push(d)}}return b}(a);for(let f=0;f<b.length;++f){let g=b[f].sets,h={},i={};for(let a=0;a<g.length;++a){h[g[a]]=!0;let b=e[g[a]];for(let a=0;a<b.length;++a)i[b[a]]=!0}let j=[],k=[];for(let b in a)b in h?j.push(a[b]):b in i||k.push(a[b]);let l=function a(b,c,d){let e=[];for(let a of b)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let f=e[0],g=K(e[0],b,c);for(let a=1;a<e.length;++a){let d=K(e[a],b,c);d>=g&&(f=e[a],g=d)}let h=y(a=>-1*K({x:a[0],y:a[1]},b,c),[f.x,f.y],{maxIterations:500,minErrorDelta:1e-10}).x,i={x:d?0:h[0],y:h[1]},j=!0;for(let a of b)if(o(i,a)>a.radius){j=!1;break}for(let a of c)if(o(i,a)<a.radius){j=!1;break}if(j)return i;if(1==b.length)return{x:b[0].x,y:b[0].y};let k={};return(m(b,k),0===k.arcs.length)?{x:0,y:-1e3,disjoint:!0}:1==k.arcs.length?{x:k.arcs[0].circle.x,y:k.arcs[0].circle.y}:c.length?a(b,[]):r(k.arcs.map(a=>a.p1))}(j,k,c);d[g]=l,l.disjoint&&b[f].size>0&&console.log("WARNING: area "+g+" not represented on screen")}return d}function M(a){if(0===a.length)return[];let b={};return m(a,b),b.arcs}function N(a,b){if(0===a.length)return"M 0 0";let c=Math.pow(10,b||0),d=null!=b?a=>Math.round(a*c)/c:a=>a;if(1==a.length){var e,f,g;let b,c=a[0].circle;return e=d(c.x),f=d(c.y),g=d(c.radius),(b=[]).push("\nM",e,f),b.push("\nm",-g,0),b.push("\na",g,g,0,1,0,2*g,0),b.push("\na",g,g,0,1,0,-(2*g),0),b.join(" ")}let h=["\nM",d(a[0].p2.x),d(a[0].p2.y)];for(let b of a){let a=d(b.circle.radius);h.push("\nA",a,a,0,+!!b.large,+!!b.sweep,d(b.p1.x),d(b.p1.y))}return h.join(" ")}var O=a.i(504591),P=function(){var a=(0,f.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[5,8],c=[7,8,11,12,17,19,22,24],d=[1,17],e=[1,18],g=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],h=[1,31],i=[1,39],j=[7,8,11,12,17,19,22,24,27],k=[1,57],l=[1,56],m=[1,58],n=[1,59],o=[1,60],p=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],q={trace:(0,f.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,f.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:f[h-1].push(f[h]),this.$=f[h-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=f[h];break;case 8:d.setDiagramTitle(f[h].substr(6)),this.$=f[h].substr(6);break;case 9:d.addSubsetData([f[h]],void 0,void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 10:d.addSubsetData([f[h-1]],f[h],void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 11:d.addSubsetData([f[h-2]],void 0,parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 12:d.addSubsetData([f[h-3]],f[h-2],parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 13:if(f[h].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h]),d.addSubsetData(f[h],void 0,void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 14:if(f[h-1].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h-1]),d.addSubsetData(f[h-1],f[h],void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 15:if(f[h-2].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h-2]),d.addSubsetData(f[h-2],void 0,parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 16:if(f[h-3].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h-3]),d.addSubsetData(f[h-3],f[h-2],parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 17:case 18:case 19:d.addTextData(f[h-1],f[h],void 0);break;case 20:case 21:d.addTextData(f[h-2],f[h-1],f[h]);break;case 23:d.addStyleData(f[h-1],f[h]);break;case 24:case 25:case 26:var i=d.getCurrentSets();if(!i)throw Error("text requires set");d.addTextData(i,f[h],void 0);break;case 27:case 28:var i=d.getCurrentSets();if(!i)throw Error("text requires set");d.addTextData(i,f[h-1],f[h]);break;case 29:case 41:case 34:this.$=[f[h]];break;case 30:case 42:this.$=[...f[h-2],f[h]];break;case 31:this.$=[f[h-2],f[h]];break;case 33:this.$=f[h].join(" ")}},"anonymous"),table:[a(b,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},a(c,[2,4],{6:5}),a(b,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},a(c,[2,5]),a(c,[2,6]),a(c,[2,7]),a(c,[2,8]),{13:16,20:d,21:e},{13:20,18:19,20:d,21:e},{13:20,18:21,20:d,21:e},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:d,21:e},a(c,[2,9],{14:[1,27],15:[1,28]}),a(g,[2,43]),a(g,[2,44]),a(c,[2,13],{14:[1,29],15:[1,30],27:h}),a(g,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:h},a(c,[2,22]),a(c,[2,24],{14:[1,35]}),a(c,[2,25],{14:[1,36]}),a(c,[2,26]),{20:i,25:37,26:38,27:h},a(c,[2,10],{15:[1,40]}),{16:[1,41]},a(c,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:d,21:e},a(c,[2,17],{14:[1,45]}),a(c,[2,18],{14:[1,46]}),a(c,[2,19]),a(c,[2,27]),a(c,[2,28]),a(c,[2,23],{27:[1,47]}),a(j,[2,29]),{15:[1,48]},{16:[1,49]},a(c,[2,11]),{16:[1,50]},a(c,[2,15]),a(g,[2,42]),a(c,[2,20]),a(c,[2,21]),{20:i,26:51},{16:k,20:l,21:[1,53],28:52,29:54,30:55,31:m,32:n,33:o},a(c,[2,12]),a(c,[2,16]),a(j,[2,30]),a(j,[2,31]),a(j,[2,32]),a(j,[2,33],{30:61,16:k,20:l,31:m,32:n,33:o}),a(p,[2,34]),a(p,[2,36]),a(p,[2,37]),a(p,[2,38]),a(p,[2,39]),a(p,[2,40]),a(p,[2,35])],defaultActions:{6:[2,1]},parseError:(0,f.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,f.__name)(function(a){var b=this,c=[0],d=[],e=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=g.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;g.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,f.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,g.length=g.length-a},"popStack"),(0,f.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),g.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:g[g.length-(z||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(z||1)].first_column,last_column:g[g.length-1].last_column},r&&(C._$.range=[g[g.length-(z||1)].range[0],g[g.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,g].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),g=g.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),g.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function r(){this.yy={}}return q.lexer={EOF:1,parseError:(0,f.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,f.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,f.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,f.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,f.__name)(function(){return this._more=!0,this},"more"),reject:(0,f.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,f.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,f.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,f.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,f.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,f.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,f.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,f.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,f.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,f.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,f.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,f.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,f.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,f.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,f.__name)(function(a,b,c,d){switch(c){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(a.getIndentMode&&a.getIndentMode())return a.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:a.setIndentMode&&a.setIndentMode(!1),this.begin("INITIAL"),this.unput(b.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!a.consumeIndentText)return 19;a.consumeIndentText=!1;break;case 15:return 24;case 16:return b.yytext=b.yytext.slice(2,-2),14;case 17:return b.yytext=b.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}},(0,f.__name)(r,"Parser"),r.prototype=q,q.Parser=r,new r}();P.parser=P;var Q=[],R=[],S=[],T=new Set,U=!1,V=(0,f.__name)((a,c,d)=>{let e=aa(a).sort(),f=d??10/Math.pow(a.length,2);b=e,1===e.length&&T.add(e[0]),Q.push({sets:e,size:f,label:c?X(c):void 0})},"addSubsetData"),W=(0,f.__name)(()=>Q,"getSubsetData"),X=(0,f.__name)(a=>{let b=a.trim();return b.length>=2&&b.startsWith('"')&&b.endsWith('"')?b.slice(1,-1):b},"normalizeText"),Y=(0,f.__name)(a=>a?X(a):a,"normalizeStyleValue"),Z=(0,f.__name)((a,b,c)=>{let d=X(b);R.push({sets:aa(a).sort(),id:d,label:c?X(c):void 0})},"addTextData"),$=(0,f.__name)((a,b)=>{let c=aa(a).sort(),d={};for(let[a,c]of b)d[a]=Y(c)??c;S.push({targets:c,styles:d})},"addStyleData"),_=(0,f.__name)(()=>S,"getStyleData"),aa=(0,f.__name)(a=>a.map(a=>X(a)),"normalizeIdentifierList"),ab=(0,f.__name)(a=>{let b=aa(a).filter(a=>!T.has(a));if(b.length>0)throw Error(`unknown set identifier: ${b.join(", ")}`)},"validateUnionIdentifiers"),ac=(0,f.__name)(()=>R,"getTextData"),ad=(0,f.__name)(()=>b,"getCurrentSets"),ae=(0,f.__name)(()=>U,"getIndentMode"),af=(0,f.__name)(a=>{U=a},"setIndentMode"),ag=e.defaultConfig_default.venn;function ah(){return(0,d.cleanAndMerge)(ag,(0,e.getConfig)().venn)}(0,f.__name)(ah,"getConfig");var ai={getConfig:ah,clear:(0,f.__name)(()=>{(0,e.clear)(),Q.length=0,R.length=0,S.length=0,T.clear(),b=void 0,U=!1},"customClear"),setAccTitle:e.setAccTitle,getAccTitle:e.getAccTitle,setDiagramTitle:e.setDiagramTitle,getDiagramTitle:e.getDiagramTitle,getAccDescription:e.getAccDescription,setAccDescription:e.setAccDescription,addSubsetData:V,getSubsetData:W,addTextData:Z,addStyleData:$,validateUnionIdentifiers:ab,getTextData:ac,getStyleData:_,getCurrentSets:ad,getIndentMode:ae,setIndentMode:af},aj=(0,f.__name)(a=>`
|
|
1
|
+
module.exports=[265261,a=>{"use strict";var b,c=a.i(29336),d=a.i(197112),e=a.i(523526),f=a.i(762939);a.i(43066);var g=a.i(455784),h=a.i(4011),i=a.i(88589),j=a.i(602865),k=a.i(422241);let l=(a,b)=>(0,k.default)(a,"a",-b);function m(a,b){let c=function(a){let b=[];for(let c=0;c<a.length;++c)for(let d=c+1;d<a.length;++d)for(let e of q(a[c],a[d]))e.parentIndex=[c,d],b.push(e);return b}(a),d=c.filter(b=>{var c;return c=b,a.every(a=>o(c,a)<a.radius+1e-10)}),e=0,f=0,g=[];if(d.length>1){let b=r(d);for(let a=0;a<d.length;++a){let c=d[a];c.angle=Math.atan2(c.x-b.x,c.y-b.y)}d.sort((a,b)=>b.angle-a.angle);let c=d[d.length-1];for(let b=0;b<d.length;++b){let h=d[b];f+=(c.x+h.x)*(h.y-c.y);let i={x:(h.x+c.x)/2,y:(h.y+c.y)/2},j=null;for(let b=0;b<h.parentIndex.length;++b)if(c.parentIndex.includes(h.parentIndex[b])){let d=a[h.parentIndex[b]],e=Math.atan2(h.x-d.x,h.y-d.y),f=Math.atan2(c.x-d.x,c.y-d.y),g=f-e;g<0&&(g+=2*Math.PI);let k=f-g/2,l=o(i,{x:d.x+d.radius*Math.sin(k),y:d.y+d.radius*Math.cos(k)});l>2*d.radius&&(l=2*d.radius),(null==j||j.width>l)&&(j={circle:d,width:l,p1:h,p2:c,large:l>d.radius,sweep:!0})}null!=j&&(g.push(j),e+=n(j.circle.radius,j.width),c=h)}}else{let b=a[0];for(let c=1;c<a.length;++c)a[c].radius<b.radius&&(b=a[c]);let c=!1;for(let d=0;d<a.length;++d)if(o(a[d],b)>Math.abs(b.radius-a[d].radius)){c=!0;break}c?e=f=0:(e=b.radius*b.radius*Math.PI,g.push({circle:b,p1:{x:b.x,y:b.y+b.radius},p2:{x:b.x-1e-10,y:b.y+b.radius},width:2*b.radius,large:!0,sweep:!0}))}return f/=2,b&&(b.area=e+f,b.arcArea=e,b.polygonArea=f,b.arcs=g,b.innerPoints=d,b.intersectionPoints=c),e+f}function n(a,b){return a*a*Math.acos(1-b/a)-(a-b)*Math.sqrt(b*(2*a-b))}function o(a,b){return Math.sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))}function p(a,b,c){return c>=a+b?0:c<=Math.abs(a-b)?Math.PI*Math.min(a,b)*Math.min(a,b):n(a,a-(c*c-b*b+a*a)/(2*c))+n(b,b-(c*c-a*a+b*b)/(2*c))}function q(a,b){let c=o(a,b),d=a.radius,e=b.radius;if(c>=d+e||c<=Math.abs(d-e))return[];let f=(d*d-e*e+c*c)/(2*c),g=Math.sqrt(d*d-f*f),h=a.x+f*(b.x-a.x)/c,i=a.y+f*(b.y-a.y)/c,j=-(b.y-a.y)*(g/c),k=-(b.x-a.x)*(g/c);return[{x:h+j,y:i-k},{x:h-j,y:i+k}]}function r(a){let b={x:0,y:0};for(let c of a)b.x+=c.x,b.y+=c.y;return b.x/=a.length,b.y/=a.length,b}function s(a){let b=Array(a);for(let c=0;c<a;++c)b[c]=0;return b}function t(a,b){return s(a).map(()=>s(b))}function u(a,b){let c=0;for(let d=0;d<a.length;++d)c+=a[d]*b[d];return c}function v(a){return Math.sqrt(u(a,a))}function w(a,b,c){for(let d=0;d<b.length;++d)a[d]=b[d]*c}function x(a,b,c,d,e){for(let f=0;f<a.length;++f)a[f]=b*c[f]+d*e[f]}function y(a,b,c){let d,e=(c=c||{}).maxIterations||200*b.length,f=c.nonZeroDelta||1.05,g=c.zeroDelta||.001,h=c.minErrorDelta||1e-6,i=c.minErrorDelta||1e-5,j=void 0!==c.rho?c.rho:1,k=void 0!==c.chi?c.chi:2,l=void 0!==c.psi?c.psi:-.5,m=void 0!==c.sigma?c.sigma:.5,n=b.length,o=Array(n+1);o[0]=b,o[0].fx=a(b),o[0].id=0;for(let c=0;c<n;++c){let d=b.slice();d[c]=d[c]?d[c]*f:g,o[c+1]=d,o[c+1].fx=a(d),o[c+1].id=c+1}function p(a){for(let b=0;b<a.length;b++)o[n][b]=a[b];o[n].fx=a.fx}let q=(a,b)=>a.fx-b.fx,r=b.slice(),s=b.slice(),t=b.slice(),u=b.slice();for(let b=0;b<e;++b){if(o.sort(q),c.history){let a=o.map(a=>{let b=a.slice();return b.fx=a.fx,b.id=a.id,b});a.sort((a,b)=>a.id-b.id),c.history.push({x:o[0].slice(),fx:o[0].fx,simplex:a})}d=0;for(let a=0;a<n;++a)d=Math.max(d,Math.abs(o[0][a]-o[1][a]));if(Math.abs(o[0].fx-o[n].fx)<h&&d<i)break;for(let a=0;a<n;++a){r[a]=0;for(let b=0;b<n;++b)r[a]+=o[b][a];r[a]/=n}let b=o[n];if(x(s,1+j,r,-j,b),s.fx=a(s),s.fx<o[0].fx)x(u,1+k,r,-k,b),u.fx=a(u),p(u.fx<s.fx?u:s);else if(s.fx>=o[n-1].fx){let c=!1;if(s.fx>b.fx?(x(t,1+l,r,-l,b),t.fx=a(t),t.fx<b.fx?p(t):c=!0):(x(t,1-l*j,r,l*j,b),t.fx=a(t),t.fx<s.fx?p(t):c=!0),c){if(m>=1)break;for(let b=1;b<o.length;++b)x(o[b],1-m,o[0],m,o[b]),o[b].fx=a(o[b])}}else p(s)}return o.sort(q),{fx:o[0].fx,x:o[0]}}function z(a,b={}){b.maxIterations=b.maxIterations||500;let c=b.initialLayout||B,d=b.lossFunction||C,e=function(a,b={}){let c=b.distinct,d=a.map(a=>Object.assign({},a));function e(a){return a.join(";")}if(c){let a=new Map;for(let b of d)for(let c=0;c<b.sets.length;c++){let d=String(b.sets[c]);a.set(d,b.size+(a.get(d)||0));for(let e=c+1;e<b.sets.length;e++){let c=String(b.sets[e]),f=`${d};${c}`,g=`${c};${d}`;a.set(f,b.size+(a.get(f)||0)),a.set(g,b.size+(a.get(g)||0))}}for(let b of d)b.sets.length<3&&(b.size=a.get(e(b.sets)))}let f=[],g=new Set;for(let a of d)if(1===a.sets.length)f.push(a.sets[0]);else if(2===a.sets.length){let b=a.sets[0],c=a.sets[1];g.add(e(a.sets)),g.add(e([c,b]))}f.sort((a,b)=>a===b?0:a<b?-1:1);for(let a=0;a<f.length;++a){let b=f[a];for(let c=a+1;c<f.length;++c){let a=f[c];g.has(e([b,a]))||d.push({sets:[b,a],size:0})}}return d}(a,b),f=c(e,b),g=Object.keys(f),h=[];for(let a of g)h.push(f[a].x),h.push(f[a].y);let i=y(a=>{let b={};for(let c=0;c<g.length;++c){let d=g[c];b[d]={x:a[2*c],y:a[2*c+1],radius:f[d].radius}}return d(b,e)},h,b).x;for(let a=0;a<g.length;++a){let b=g[a];f[b].x=i[2*a],f[b].y=i[2*a+1]}return f}function A(a,b,c){return Math.min(a,b)*Math.min(a,b)*Math.PI<=c+1e-10?Math.abs(a-b):function(a,b,c,d){let e=(d=d||{}).maxIterations||100,f=d.tolerance||1e-10,g=a(b),h=a(c),i=c-b;if(g*h>0)throw"Initial bisect points must have opposite signs";if(0===g)return b;if(0===h)return c;for(let c=0;c<e;++c){let c=b+(i/=2),d=a(c);if(d*g>=0&&(b=c),Math.abs(i)<f||0===d)return c}return b+i}(d=>p(a,b,d)-c,0,a+b)}function B(a,b={}){let c=function(a,b){let c=b&&b.lossFunction?b.lossFunction:C,d={},e={};for(let b of a)if(1===b.sets.length){let a=b.sets[0];d[a]={x:1e10,y:1e10,rowid:d.length,size:b.size,radius:Math.sqrt(b.size/Math.PI)},e[a]=[]}for(let b of a=a.filter(a=>2===a.sets.length)){let a=null!=b.weight?b.weight:1,c=b.sets[0],f=b.sets[1];b.size+1e-10>=Math.min(d[c].size,d[f].size)&&(a=0),e[c].push({set:f,size:b.size,weight:a}),e[f].push({set:c,size:b.size,weight:a})}let f=[];function g(a,b){return b.size-a.size}Object.keys(e).forEach(a=>{let b=0;for(let c=0;c<e[a].length;++c)b+=e[a][c].size*e[a][c].weight;f.push({set:a,size:b})}),f.sort(g);let h={};function i(a){return a.set in h}function j(a,b){d[b].x=a.x,d[b].y=a.y,h[b]=!0}j({x:0,y:0},f[0].set);for(let b=1;b<f.length;++b){let h=f[b].set,l=e[h].filter(i),m=d[h];if(l.sort(g),0===l.length)throw"ERROR: missing pairwise overlap information";let n=[];for(var k=0;k<l.length;++k){let a=d[l[k].set],b=A(m.radius,a.radius,l[k].size);n.push({x:a.x+b,y:a.y}),n.push({x:a.x-b,y:a.y}),n.push({y:a.y+b,x:a.x}),n.push({y:a.y-b,x:a.x});for(let c=k+1;c<l.length;++c){let e=d[l[c].set],f=A(m.radius,e.radius,l[c].size),g=q({x:a.x,y:a.y,radius:b},{x:e.x,y:e.y,radius:f});n.push(...g)}}let o=1e50,p=n[0];for(let b of n){d[h].x=b.x,d[h].y=b.y;let e=c(d,a);e<o&&(o=e,p=b)}j(p,h)}return d}(a,b),d=b.lossFunction||C;if(a.length>=8){let e=function(a,b={}){let c,d,e=b.restarts||10,f=[],g={};for(let b of a)1===b.sets.length&&(g[b.sets[0]]=f.length,f.push(b));let{distances:h,constraints:i}=(c=t(f.length,f.length),d=t(f.length,f.length),a.filter(a=>2===a.sets.length).forEach(a=>{let b=g[a.sets[0]],e=g[a.sets[1]],h=A(Math.sqrt(f[b].size/Math.PI),Math.sqrt(f[e].size/Math.PI),a.size);c[b][e]=c[e][b]=h;let i=0;a.size+1e-10>=Math.min(f[b].size,f[e].size)?i=1:a.size<=1e-10&&(i=-1),d[b][e]=d[e][b]=i}),{distances:c,constraints:d}),j=v(h.map(v))/h.length;h=h.map(a=>a.map(a=>a/j));let k=(a,b)=>(function(a,b,c,d){for(let a=0;a<b.length;++a)b[a]=0;let e=0;for(let f=0;f<c.length;++f){let g=a[2*f],h=a[2*f+1];for(let i=f+1;i<c.length;++i){let j=a[2*i],k=a[2*i+1],l=c[f][i],m=d[f][i],n=(j-g)*(j-g)+(k-h)*(k-h),o=Math.sqrt(n),p=n-l*l;m>0&&o<=l||m<0&&o>=l||(e+=2*p*p,b[2*f]+=4*p*(g-j),b[2*f+1]+=4*p*(h-k),b[2*i]+=4*p*(j-g),b[2*i+1]+=4*p*(k-h))}}return e})(a,b,h,i),l=null;for(let a=0;a<e;++a){let a=function(a,b,c){let d,e,f,g={x:b.slice(),fx:0,fxprime:b.slice()},h={x:b.slice(),fx:0,fxprime:b.slice()},i=b.slice(),j=1;f=(c=c||{}).maxIterations||20*b.length,g.fx=a(g.x,g.fxprime),w(d=g.fxprime.slice(),g.fxprime,-1);for(let b=0;b<f;++b){if(j=function(a,b,c,d,e,f,g){let h=c.fx,i=u(c.fxprime,b),j=h,k=h,l=i,m=0;function n(k,m,n){for(let o=0;o<16;++o)if(e=(k+m)/2,x(d.x,1,c.x,e,b),j=d.fx=a(d.x,d.fxprime),l=u(d.fxprime,b),j>h+f*e*i||j>=n)m=e;else{if(Math.abs(l)<=-g*i)return e;l*(m-k)>=0&&(m=k),k=e,n=j}return 0}e=e||1,f=f||1e-6,g=g||.1;for(let o=0;o<10;++o){if(x(d.x,1,c.x,e,b),j=d.fx=a(d.x,d.fxprime),l=u(d.fxprime,b),j>h+f*e*i||o&&j>=k)return n(m,e,k);if(Math.abs(l)<=-g*i)break;if(l>=0)return n(e,m,j);k=j,m=e,e*=2}return e}(a,d,g,h,j),c.history&&c.history.push({x:g.x.slice(),fx:g.fx,fxprime:g.fxprime.slice(),alpha:j}),j){x(i,1,h.fxprime,-1,g.fxprime);let a=u(g.fxprime,g.fxprime);x(d,Math.max(0,u(i,h.fxprime)/a),d,-1,h.fxprime),e=g,g=h,h=e}else w(d,g.fxprime,-1);if(1e-5>=v(g.fxprime))break}return c.history&&c.history.push({x:g.x.slice(),fx:g.fx,fxprime:g.fxprime.slice(),alpha:j}),g}(k,s(2*h.length).map(Math.random),b);(!l||a.fx<l.fx)&&(l=a)}let m=l.x,n={};for(let a=0;a<f.length;++a){let b=f[a];n[b.sets[0]]={x:m[2*a]*j,y:m[2*a+1]*j,radius:Math.sqrt(b.size/Math.PI)}}if(b.history)for(let a of b.history)w(a.x,j);return n}(a,b);d(e,a)+1e-8<d(c,a)&&(c=e)}return c}function C(a,b){let c=0;for(let d of b){let b;if(1!==d.sets.length){if(2===d.sets.length){let c=a[d.sets[0]],e=a[d.sets[1]];b=p(c.radius,e.radius,o(c,e))}else b=m(d.sets.map(b=>a[b]));c+=(null!=d.weight?d.weight:1)*(b-d.size)*(b-d.size)}}return c}function D(a,b){let c=0;for(let d of b){let b;if(1===d.sets.length)continue;if(2===d.sets.length){let c=a[d.sets[0]],e=a[d.sets[1]];b=p(c.radius,e.radius,o(c,e))}else b=m(d.sets.map(b=>a[b]));let e=null!=d.weight?d.weight:1,f=Math.log((b+1)/(d.size+1));c+=e*f*f}return c}function E(a){let b=b=>({max:a.reduce((a,c)=>Math.max(a,c[b]+c.radius),-1/0),min:a.reduce((a,c)=>Math.min(a,c[b]-c.radius),1/0)});return{xRange:b("x"),yRange:b("y")}}function F(a,b,c){null==b&&(b=Math.PI/2);let d=I(a).map(a=>Object.assign({},a)),e=function(a){function b(a){return a.parent!==a&&(a.parent=b(a.parent)),a.parent}a.forEach(a=>{a.parent=a});for(let e=0;e<a.length;++e)for(let f=e+1;f<a.length;++f){var c,d;let g=a[e].radius+a[f].radius;o(a[e],a[f])+1e-10<g&&(c=a[f],d=a[e],b(c).parent=b(d))}let e=new Map;for(let c=0;c<a.length;++c){let d=b(a[c]).parent.setid;e.has(d)||e.set(d,[]),e.get(d).push(a[c])}return a.forEach(a=>{delete a.parent}),Array.from(e.values())}(d);for(let a of e){!function(a,b,c){if(null==c?a.sort((a,b)=>b.radius-a.radius):a.sort(c),a.length>0){let b=a[0].x,c=a[0].y;for(let d of a)d.x-=b,d.y-=c}if(2===a.length&&o(a[0],a[1])<Math.abs(a[1].radius-a[0].radius)&&(a[1].x=a[0].x+a[0].radius-a[1].radius-1e-10,a[1].y=a[0].y),a.length>1){let c=Math.atan2(a[1].x,a[1].y)-b,d=Math.cos(c),e=Math.sin(c);for(let b of a){let a=b.x,c=b.y;b.x=d*a-e*c,b.y=e*a+d*c}}if(a.length>2){let c=Math.atan2(a[2].x,a[2].y)-b;for(;c<0;)c+=2*Math.PI;for(;c>2*Math.PI;)c-=2*Math.PI;if(c>Math.PI){let b=a[1].y/(1e-10+a[1].x);for(let c of a){var d=(c.x+b*c.y)/(1+b*b);c.x=2*d-c.x,c.y=2*d*b-c.y}}}}(a,b,c);let d=E(a);a.size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),a.bounds=d}e.sort((a,b)=>b.size-a.size);let f=(d=e[0]).bounds,g=(f.xRange.max-f.xRange.min)/50;function h(a,b,c){let e,h;if(!a)return;let i=a.bounds;if(b)e=f.xRange.max-i.xRange.min+g;else{e=f.xRange.max-i.xRange.max;let a=(i.xRange.max-i.xRange.min)/2-(f.xRange.max-f.xRange.min)/2;a<0&&(e+=a)}if(c)h=f.yRange.max-i.yRange.min+g;else{h=f.yRange.max-i.yRange.max;let a=(i.yRange.max-i.yRange.min)/2-(f.yRange.max-f.yRange.min)/2;a<0&&(h+=a)}for(let b of a)b.x+=e,b.y+=h,d.push(b)}let i=1;for(;i<e.length;)h(e[i],!0,!1),h(e[i+1],!1,!0),h(e[i+2],!0,!0),i+=3,f=E(d);return H(d)}function G(a,b,c,d,e){let f,g,h=I(a);b-=2*d,c-=2*d;let{xRange:i,yRange:j}=E(h);if(i.max===i.min||j.max===j.min)return console.log("not scaling solution: zero size detected"),a;if(e){let a=2*Math.sqrt(e/Math.PI);f=b/a,g=c/a}else f=b/(i.max-i.min),g=c/(j.max-j.min);let k=Math.min(g,f),l=(b-(i.max-i.min)*k)/2,m=(c-(j.max-j.min)*k)/2;return H(h.map(a=>({radius:k*a.radius,x:d+l+(a.x-i.min)*k,y:d+m+(a.y-j.min)*k,setid:a.setid})))}function H(a){let b={};for(let c of a)b[c.setid]=c;return b}function I(a){return Object.keys(a).map(b=>Object.assign(a[b],{setid:b}))}function J(a,b){return function(c){let d=this,e=a[c.sets[0]].radius||50,f=b(c)||"",g=f.split(/\s+/).reverse(),h=(f.length+g.length)/3,i=g.pop(),j=[i],k=0;d.textContent=null;let l=[];function m(a){let b=d.ownerDocument.createElementNS(d.namespaceURI,"tspan");return b.textContent=a,l.push(b),d.append(b),b}let n=m(i);for(;i=g.pop();){j.push(i);let a=j.join(" ");n.textContent=a,a.length>h&&n.getComputedTextLength()>e&&(j.pop(),n.textContent=j.join(" "),j=[i],n=m(i),k++)}let o=.35-1.1*k/2,p=d.getAttribute("x"),q=d.getAttribute("y");l.forEach((a,b)=>{a.setAttribute("x",p),a.setAttribute("y",q),a.setAttribute("dy",`${o+1.1*b}em`)})}}function K(a,b,c){let d=b[0].radius-o(b[0],a);for(let c=1;c<b.length;++c){let e=b[c].radius-o(b[c],a);e<=d&&(d=e)}for(let b=0;b<c.length;++b){let e=o(c[b],a)-c[b].radius;e<=d&&(d=e)}return d}function L(a,b,c){let d={},e=function(a){let b={},c=Object.keys(a);for(let a of c)b[a]=[];for(let d=0;d<c.length;d++){let e=c[d],f=a[e];for(let g=d+1;g<c.length;++g){let d=c[g],h=a[d],i=o(f,h);i+h.radius<=f.radius+1e-10?b[d].push(e):i+f.radius<=h.radius+1e-10&&b[e].push(d)}}return b}(a);for(let f=0;f<b.length;++f){let g=b[f].sets,h={},i={};for(let a=0;a<g.length;++a){h[g[a]]=!0;let b=e[g[a]];for(let a=0;a<b.length;++a)i[b[a]]=!0}let j=[],k=[];for(let b in a)b in h?j.push(a[b]):b in i||k.push(a[b]);let l=function a(b,c,d){let e=[];for(let a of b)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let f=e[0],g=K(e[0],b,c);for(let a=1;a<e.length;++a){let d=K(e[a],b,c);d>=g&&(f=e[a],g=d)}let h=y(a=>-1*K({x:a[0],y:a[1]},b,c),[f.x,f.y],{maxIterations:500,minErrorDelta:1e-10}).x,i={x:d?0:h[0],y:h[1]},j=!0;for(let a of b)if(o(i,a)>a.radius){j=!1;break}for(let a of c)if(o(i,a)<a.radius){j=!1;break}if(j)return i;if(1==b.length)return{x:b[0].x,y:b[0].y};let k={};return(m(b,k),0===k.arcs.length)?{x:0,y:-1e3,disjoint:!0}:1==k.arcs.length?{x:k.arcs[0].circle.x,y:k.arcs[0].circle.y}:c.length?a(b,[]):r(k.arcs.map(a=>a.p1))}(j,k,c);d[g]=l,l.disjoint&&b[f].size>0&&console.log("WARNING: area "+g+" not represented on screen")}return d}function M(a){if(0===a.length)return[];let b={};return m(a,b),b.arcs}function N(a,b){if(0===a.length)return"M 0 0";let c=Math.pow(10,b||0),d=null!=b?a=>Math.round(a*c)/c:a=>a;if(1==a.length){var e,f,g;let b,c=a[0].circle;return e=d(c.x),f=d(c.y),g=d(c.radius),(b=[]).push("\nM",e,f),b.push("\nm",-g,0),b.push("\na",g,g,0,1,0,2*g,0),b.push("\na",g,g,0,1,0,-(2*g),0),b.join(" ")}let h=["\nM",d(a[0].p2.x),d(a[0].p2.y)];for(let b of a){let a=d(b.circle.radius);h.push("\nA",a,a,0,+!!b.large,+!!b.sweep,d(b.p1.x),d(b.p1.y))}return h.join(" ")}var O=a.i(504591),P=function(){var a=(0,f.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[5,8],c=[7,8,11,12,17,19,22,24],d=[1,17],e=[1,18],g=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],h=[1,31],i=[1,39],j=[7,8,11,12,17,19,22,24,27],k=[1,57],l=[1,56],m=[1,58],n=[1,59],o=[1,60],p=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],q={trace:(0,f.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,f.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:f[h-1].push(f[h]),this.$=f[h-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=f[h];break;case 8:d.setDiagramTitle(f[h].substr(6)),this.$=f[h].substr(6);break;case 9:d.addSubsetData([f[h]],void 0,void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 10:d.addSubsetData([f[h-1]],f[h],void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 11:d.addSubsetData([f[h-2]],void 0,parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 12:d.addSubsetData([f[h-3]],f[h-2],parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 13:if(f[h].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h]),d.addSubsetData(f[h],void 0,void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 14:if(f[h-1].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h-1]),d.addSubsetData(f[h-1],f[h],void 0),d.setIndentMode&&d.setIndentMode(!0);break;case 15:if(f[h-2].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h-2]),d.addSubsetData(f[h-2],void 0,parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 16:if(f[h-3].length<2)throw Error("union requires multiple identifiers");d.validateUnionIdentifiers&&d.validateUnionIdentifiers(f[h-3]),d.addSubsetData(f[h-3],f[h-2],parseFloat(f[h])),d.setIndentMode&&d.setIndentMode(!0);break;case 17:case 18:case 19:d.addTextData(f[h-1],f[h],void 0);break;case 20:case 21:d.addTextData(f[h-2],f[h-1],f[h]);break;case 23:d.addStyleData(f[h-1],f[h]);break;case 24:case 25:case 26:var i=d.getCurrentSets();if(!i)throw Error("text requires set");d.addTextData(i,f[h],void 0);break;case 27:case 28:var i=d.getCurrentSets();if(!i)throw Error("text requires set");d.addTextData(i,f[h-1],f[h]);break;case 29:case 41:case 34:this.$=[f[h]];break;case 30:case 42:this.$=[...f[h-2],f[h]];break;case 31:this.$=[f[h-2],f[h]];break;case 33:this.$=f[h].join(" ")}},"anonymous"),table:[a(b,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},a(c,[2,4],{6:5}),a(b,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},a(c,[2,5]),a(c,[2,6]),a(c,[2,7]),a(c,[2,8]),{13:16,20:d,21:e},{13:20,18:19,20:d,21:e},{13:20,18:21,20:d,21:e},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:d,21:e},a(c,[2,9],{14:[1,27],15:[1,28]}),a(g,[2,43]),a(g,[2,44]),a(c,[2,13],{14:[1,29],15:[1,30],27:h}),a(g,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:h},a(c,[2,22]),a(c,[2,24],{14:[1,35]}),a(c,[2,25],{14:[1,36]}),a(c,[2,26]),{20:i,25:37,26:38,27:h},a(c,[2,10],{15:[1,40]}),{16:[1,41]},a(c,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:d,21:e},a(c,[2,17],{14:[1,45]}),a(c,[2,18],{14:[1,46]}),a(c,[2,19]),a(c,[2,27]),a(c,[2,28]),a(c,[2,23],{27:[1,47]}),a(j,[2,29]),{15:[1,48]},{16:[1,49]},a(c,[2,11]),{16:[1,50]},a(c,[2,15]),a(g,[2,42]),a(c,[2,20]),a(c,[2,21]),{20:i,26:51},{16:k,20:l,21:[1,53],28:52,29:54,30:55,31:m,32:n,33:o},a(c,[2,12]),a(c,[2,16]),a(j,[2,30]),a(j,[2,31]),a(j,[2,32]),a(j,[2,33],{30:61,16:k,20:l,31:m,32:n,33:o}),a(p,[2,34]),a(p,[2,36]),a(p,[2,37]),a(p,[2,38]),a(p,[2,39]),a(p,[2,40]),a(p,[2,35])],defaultActions:{6:[2,1]},parseError:(0,f.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,f.__name)(function(a){var b=this,c=[0],d=[],e=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=g.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;g.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,f.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,g.length=g.length-a},"popStack"),(0,f.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),g.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:g[g.length-(z||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(z||1)].first_column,last_column:g[g.length-1].last_column},r&&(C._$.range=[g[g.length-(z||1)].range[0],g[g.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,g].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),g=g.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),g.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function r(){this.yy={}}return q.lexer={EOF:1,parseError:(0,f.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,f.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,f.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,f.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,f.__name)(function(){return this._more=!0,this},"more"),reject:(0,f.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,f.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,f.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,f.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,f.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,f.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,f.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,f.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,f.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,f.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,f.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,f.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,f.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,f.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,f.__name)(function(a,b,c,d){switch(c){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(a.getIndentMode&&a.getIndentMode())return a.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:a.setIndentMode&&a.setIndentMode(!1),this.begin("INITIAL"),this.unput(b.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!a.consumeIndentText)return 19;a.consumeIndentText=!1;break;case 15:return 24;case 16:return b.yytext=b.yytext.slice(2,-2),14;case 17:return b.yytext=b.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}},(0,f.__name)(r,"Parser"),r.prototype=q,q.Parser=r,new r}();P.parser=P;var Q=[],R=[],S=[],T=new Set,U=!1,V=(0,f.__name)((a,c,d)=>{let e=aa(a).sort(),f=d??10/Math.pow(a.length,2);b=e,1===e.length&&T.add(e[0]),Q.push({sets:e,size:f,label:c?X(c):void 0})},"addSubsetData"),W=(0,f.__name)(()=>Q,"getSubsetData"),X=(0,f.__name)(a=>{let b=a.trim();return b.length>=2&&b.startsWith('"')&&b.endsWith('"')?b.slice(1,-1):b},"normalizeText"),Y=(0,f.__name)(a=>a?X(a):a,"normalizeStyleValue"),Z=(0,f.__name)((a,b,c)=>{let d=X(b);R.push({sets:aa(a).sort(),id:d,label:c?X(c):void 0})},"addTextData"),$=(0,f.__name)((a,b)=>{let c=aa(a).sort(),d={};for(let[a,c]of b)d[a]=Y(c)??c;S.push({targets:c,styles:d})},"addStyleData"),_=(0,f.__name)(()=>S,"getStyleData"),aa=(0,f.__name)(a=>a.map(a=>X(a)),"normalizeIdentifierList"),ab=(0,f.__name)(a=>{let b=aa(a).filter(a=>!T.has(a));if(b.length>0)throw Error(`unknown set identifier: ${b.join(", ")}`)},"validateUnionIdentifiers"),ac=(0,f.__name)(()=>R,"getTextData"),ad=(0,f.__name)(()=>b,"getCurrentSets"),ae=(0,f.__name)(()=>U,"getIndentMode"),af=(0,f.__name)(a=>{U=a},"setIndentMode"),ag=e.defaultConfig_default.venn;function ah(){return(0,d.cleanAndMerge)(ag,(0,e.getConfig)().venn)}(0,f.__name)(ah,"getConfig");var ai={getConfig:ah,clear:(0,f.__name)(()=>{(0,e.clear)(),Q.length=0,R.length=0,S.length=0,T.clear(),b=void 0,U=!1},"customClear"),setAccTitle:e.setAccTitle,getAccTitle:e.getAccTitle,setDiagramTitle:e.setDiagramTitle,getDiagramTitle:e.getDiagramTitle,getAccDescription:e.getAccDescription,setAccDescription:e.setAccDescription,addSubsetData:V,getSubsetData:W,addTextData:Z,addStyleData:$,validateUnionIdentifiers:ab,getTextData:ac,getStyleData:_,getCurrentSets:ad,getIndentMode:ae,setIndentMode:af},aj=(0,f.__name)(a=>`
|
|
2
2
|
.venn-title {
|
|
3
3
|
font-size: 32px;
|
|
4
4
|
fill: ${a.vennTitleTextColor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[594600,a=>{"use strict";var b=a.i(29336),c=a.i(554804),d=a.i(197112),e=a.i(604225),f=a.i(762939),g=a.i(589961),h=(0,f.__name)((a,b)=>{let c=a<=1?100*a:a;if(c<0||c>100)throw Error(`${b} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return c},"toPercent"),i=(0,f.__name)((a,b,c)=>({x:h(b,`${c} evolution`),y:h(a,`${c} visibility`)}),"toCoordinates"),j=(0,f.__name)(a=>{if(a){if("+<>"===a)return"bidirectional";if("+<"===a)return"backward";if("+>"===a)return"forward"}},"getFlowFromPort"),k=(0,f.__name)(a=>{if(!a?.startsWith("+"))return{};let b=/^\+'([^']*)'/.exec(a),c=b?.[1];return a.includes("<>")?{flow:"bidirectional",label:c}:a.includes("<")?{flow:"backward",label:c}:a.includes(">")?{flow:"forward",label:c}:{label:c}},"extractFlowFromArrow"),l=(0,f.__name)((a,b)=>{if((0,c.populateCommonDb)(a,b),a.size&&b.setSize(a.size.width,a.size.height),a.evolution){let c=a.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),d=a.evolution.stages.filter(a=>void 0!==a.boundary).map(a=>a.boundary);b.updateAxes({stages:c,stageBoundaries:d})}if(a.anchors.forEach(a=>{let c=i(a.visibility,a.evolution,`Anchor "${a.name}"`);b.addNode(a.name,a.name,c.x,c.y,"anchor")}),a.components.forEach(a=>{let c=i(a.visibility,a.evolution,`Component "${a.name}"`),d=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,e=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,f=a.decorator?.strategy;b.addNode(a.name,a.name,c.x,c.y,"component",d,e,a.inertia,f)}),a.notes.forEach(a=>{let c=i(a.visibility,a.evolution,`Note "${a.text}"`);b.addNote(a.text,c.x,c.y)}),a.pipelines.forEach(a=>{let c=b.getNode(a.parent);if(!c||"number"!=typeof c.y)throw Error(`Pipeline "${a.parent}" must reference an existing component with coordinates.`);let d=c.y;b.startPipeline(a.parent),a.components.forEach(c=>{let e=`${a.parent}_${c.name}`,f=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,g=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,i=h(c.evolution,`Pipeline component "${c.name}" evolution`);b.addNode(e,c.name,i,d,"pipeline-component",f,g),b.addPipelineComponent(a.parent,e)})}),a.links.forEach(a=>{let c=!!a.arrow&&(a.arrow.includes("-.->")||a.arrow.includes(".-.")),d=j(a.fromPort)??j(a.toPort),{flow:e,label:f}=k(a.arrow);!d&&e&&(d=e);let g=a.linkLabel;b.addLink(b.resolveNodeId(a.from),b.resolveNodeId(a.to),c,f??g,d)}),a.evolves.forEach(a=>{let c=b.getNode(a.component);if(c?.y!==void 0){let d=h(a.target,`Evolve target for "${a.component}"`);b.addTrend(a.component,d,c.y)}}),a.annotations.length>0){let c=a.annotations[0],d=i(c.x,c.y,"Annotations box");b.setAnnotationsBox(d.x,d.y)}a.annotation.forEach(a=>{let c=i(a.x,a.y,`Annotation ${a.number}`);b.addAnnotation(a.number,[{x:c.x,y:c.y}],a.text)}),a.accelerators.forEach(a=>{let c=i(a.x,a.y,`Accelerator "${a.name}"`);b.addAccelerator(a.name,c.x,c.y)}),a.deaccelerators.forEach(a=>{let c=i(a.x,a.y,`Deaccelerator "${a.name}"`);b.addDeaccelerator(a.name,c.x,c.y)})},"populateDb"),m={parser:{yy:void 0},parse:(0,f.__name)(async a=>{let b=await (0,g.parse)("wardley",a);f.log.debug(b);let c=m.parser?.yy;if(!c||"function"!=typeof c.addNode)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.");l(b,c)},"parse")},n=new 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{(0,f.__name)(this,"WardleyBuilder")}addNode(a){let b=this.nodes.get(a.id)??{id:a.id,label:a.label},c={...b,...a,className:a.className??b.className,labelOffsetX:a.labelOffsetX??b.labelOffsetX,labelOffsetY:a.labelOffsetY??b.labelOffsetY};this.nodes.set(a.id,c)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let b=this.nodes.get(a);b&&(b.isPipelineParent=!0)}addPipelineComponent(a,b){let c=this.pipelines.get(a);c&&c.componentIds.push(b);let d=this.nodes.get(b);d&&(d.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,b){this.annotationsBox={x:a,y:b}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,b){this.size={width:a,height:b}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[b,c]of this.nodes)if(c.label===a)return b;return a}build(){let a=[];for(let b of this.nodes.values()){if("number"!=typeof b.x||"number"!=typeof b.y)throw Error(`Node "${b.label}" is missing coordinates`);a.push(b)}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}};function o(){return(0,e.getConfig2)()["wardley-beta"]}function p(a,b,c,d,e,f,g,h,i){n.addNode({id:a,label:b,x:c,y:d,className:e,labelOffsetX:f,labelOffsetY:g,inertia:h,sourceStrategy:i})}function q(a,b,c=!1,d,e){n.addLink({source:a,target:b,dashed:c,label:d,flow:e})}function r(a,b,c){n.addTrend({nodeId:a,targetX:b,targetY:c})}function s(a,b,c){n.addAnnotation({number:a,coordinates:b,text:c})}function t(a,b,c){n.addNote({text:a,x:b,y:c})}function u(a,b,c){n.addAccelerator({name:a,x:b,y:c})}function v(a,b,c){n.addDeaccelerator({name:a,x:b,y:c})}function w(a,b){n.setAnnotationsBox(a,b)}function x(a,b){n.setSize(a,b)}function y(a){n.startPipeline(a)}function z(a,b){n.addPipelineComponent(a,b)}function A(a){n.setAxes(a)}function B(a){return n.getNode(a)}function C(a){return n.resolveNodeId(a)}function D(){return n.build()}function E(){n.clear(),(0,e.clear)()}(0,f.__name)(o,"getConfig"),(0,f.__name)(p,"addNode"),(0,f.__name)(q,"addLink"),(0,f.__name)(r,"addTrend"),(0,f.__name)(s,"addAnnotation"),(0,f.__name)(t,"addNote"),(0,f.__name)(u,"addAccelerator"),(0,f.__name)(v,"addDeaccelerator"),(0,f.__name)(w,"setAnnotationsBox"),(0,f.__name)(x,"setSize"),(0,f.__name)(y,"startPipeline"),(0,f.__name)(z,"addPipelineComponent"),(0,f.__name)(A,"updateAxes"),(0,f.__name)(B,"getNode"),(0,f.__name)(C,"resolveNodeId"),(0,f.__name)(D,"getWardleyData"),(0,f.__name)(E,"clear");var F={getConfig:o,addNode:p,addLink:q,addTrend:r,addAnnotation:s,addNote:t,addAccelerator:u,addDeaccelerator:v,setAnnotationsBox:w,setSize:x,startPipeline:y,addPipelineComponent:z,updateAxes:A,getNode:B,resolveNodeId:C,getWardleyData:D,clear:E,setAccTitle:e.setAccTitle,getAccTitle:e.getAccTitle,setDiagramTitle:e.setDiagramTitle,getDiagramTitle:e.getDiagramTitle,getAccDescription:e.getAccDescription,setAccDescription:e.setAccDescription},G=["Genesis","Custom Built","Product","Commodity"],H=(0,f.__name)(()=>{let{themeVariables:a}=(0,e.getConfig2)();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"),I=(0,f.__name)(()=>{let a=(0,e.getConfig2)()["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"),J=(0,f.__name)((a,c,d,g)=>{f.log.debug("Rendering Wardley map\n"+a);let h=I(),i=H(),j=1.6*h.nodeRadius,k=g.db,l=k.getWardleyData(),m=k.getDiagramTitle(),n=l.size?.width??h.width,o=l.size?.height??h.height,p=(0,b.selectSvgElement)(c);p.selectAll("*").remove(),(0,e.configureSvgSize)(p,o,n,h.useMaxWidth),p.attr("viewBox",`0 0 ${n} ${o}`);let q=p.append("g").attr("class","wardley-map"),r=p.append("defs");r.append("marker").attr("id",`arrow-${c}`).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",i.evolutionStroke).attr("stroke","none"),r.append("marker").attr("id",`link-arrow-end-${c}`).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",i.linkStroke).attr("stroke","none"),r.append("marker").attr("id",`link-arrow-start-${c}`).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",i.linkStroke).attr("stroke","none"),q.append("rect").attr("class","wardley-background").attr("width",n).attr("height",o).attr("fill",i.backgroundColor);let s=n-2*h.padding,t=o-2*h.padding;m&&q.append("text").attr("class","wardley-title").attr("x",n/2).attr("y",h.padding/2).attr("fill",i.axisTextColor).attr("font-size",1.05*h.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(m);let u=(0,f.__name)(a=>h.padding+a/100*s,"projectX"),v=(0,f.__name)(a=>o-h.padding-a/100*t,"projectY"),w=q.append("g").attr("class","wardley-axes");w.append("line").attr("x1",h.padding).attr("x2",n-h.padding).attr("y1",o-h.padding).attr("y2",o-h.padding).attr("stroke",i.axisColor).attr("stroke-width",1),w.append("line").attr("x1",h.padding).attr("x2",h.padding).attr("y1",h.padding).attr("y2",o-h.padding).attr("stroke",i.axisColor).attr("stroke-width",1);let x=l.axes.xLabel??"Evolution",y=l.axes.yLabel??"Visibility";w.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",h.padding+s/2).attr("y",o-h.padding/4).attr("fill",i.axisTextColor).attr("font-size",h.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(x),w.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",h.padding/3).attr("y",h.padding+t/2).attr("fill",i.axisTextColor).attr("font-size",h.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${h.padding/3} ${h.padding+t/2})`).text(y);let z=l.axes.stages&&l.axes.stages.length>0?l.axes.stages:G;if(z.length>0){let a=q.append("g").attr("class","wardley-stages"),b=l.axes.stageBoundaries,c=[];if(b&&b.length===z.length){let a=0;b.forEach(b=>{c.push({start:a,end:b}),a=b})}else{let a=1/z.length;z.forEach((b,d)=>{c.push({start:d*a,end:(d+1)*a})})}z.forEach((b,d)=>{let e=c[d],f=h.padding+e.start*s,g=(f+(h.padding+e.end*s))/2;d>0&&a.append("line").attr("x1",f).attr("x2",f).attr("y1",h.padding).attr("y2",o-h.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),a.append("text").attr("class","wardley-stage-label").attr("x",g).attr("y",o-h.padding/1.5).attr("fill",i.axisTextColor).attr("font-size",h.axisFontSize-2).attr("text-anchor","middle").text(b)})}if(h.showGrid){let a=q.append("g").attr("class","wardley-grid");for(let b=1;b<4;b++){let c=b/4,d=h.padding+s*c;a.append("line").attr("x1",d).attr("x2",d).attr("y1",h.padding).attr("y2",o-h.padding).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6"),a.append("line").attr("x1",h.padding).attr("x2",n-h.padding).attr("y1",o-h.padding-t*c).attr("y2",o-h.padding-t*c).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6")}}let A=new Map;if(l.nodes.forEach(a=>{A.set(a.id,{x:u(a.x),y:v(a.y),node:a})}),l.pipelines.length>0){let a=q.append("g").attr("class","wardley-pipelines"),b=q.append("g").attr("class","wardley-pipeline-links");l.pipelines.forEach(c=>{if(0===c.componentIds.length)return;let d=c.componentIds.map(a=>({id:a,pos:A.get(a),node:l.nodes.find(b=>b.id===a)})).filter(a=>a.pos&&a.node).sort((a,b)=>a.node.x-b.node.x);for(let a=0;a<d.length-1;a++){let c=d[a],e=d[a+1];b.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",c.pos.x).attr("y1",c.pos.y).attr("x2",e.pos.x).attr("y2",e.pos.y).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let e=1/0,f=-1/0,g=0;if(c.componentIds.forEach(a=>{let b=A.get(a);b&&(e=Math.min(e,b.x),f=Math.max(f,b.x),g=b.y)}),e!==1/0&&f!==-1/0){let b=4*h.nodeRadius,d=g-b/2,k=A.get(c.nodeId);k&&(k.x=(e+f)/2,k.y=d-j/6),a.append("rect").attr("class","wardley-pipeline-box").attr("x",e-15).attr("y",d).attr("width",f-e+30).attr("height",b).attr("fill","none").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let B=q.append("g").attr("class","wardley-links"),C=new Map;l.pipelines.forEach(a=>{C.set(a.nodeId,new Set(a.componentIds))});let D=l.links.filter(a=>{if(!A.has(a.source)||!A.has(a.target))return!1;let b=C.get(a.target);return!b?.has(a.source)});B.selectAll("line").data(D).enter().append("line").attr("class",a=>`wardley-link${a.dashed?" wardley-link--dashed":""}`).attr("x1",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.source).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=c.x-b.x,f=c.y-b.y,g=Math.sqrt(e*e+f*f);return b.x+e/g*d}).attr("y1",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.source).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=c.x-b.x,f=c.y-b.y,g=Math.sqrt(e*e+f*f);return b.y+f/g*d}).attr("x2",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.target).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=b.x-c.x,f=b.y-c.y,g=Math.sqrt(e*e+f*f);return c.x+e/g*d}).attr("y2",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.target).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=b.x-c.x,f=b.y-c.y,g=Math.sqrt(e*e+f*f);return c.y+f/g*d}).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",a=>a.dashed?"6 6":null).attr("marker-end",a=>"forward"===a.flow||"bidirectional"===a.flow?`url(#link-arrow-end-${c})`:null).attr("marker-start",a=>"backward"===a.flow||"bidirectional"===a.flow?`url(#link-arrow-start-${c})`:null),B.selectAll("text").data(D.filter(a=>a.label)).enter().append("text").attr("class","wardley-link-label").attr("x",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.x+c.x)/2,e=c.y-b.y,f=c.x-b.x,g=Math.sqrt(f*f+e*e);return d+e/g*8}).attr("y",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.y+c.y)/2,e=c.x-b.x,f=c.y-b.y,g=Math.sqrt(e*e+f*f);return d+-e/g*8}).attr("fill",i.axisTextColor).attr("font-size",h.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.x+c.x)/2,e=(b.y+c.y)/2,f=c.x-b.x,g=c.y-b.y,h=Math.sqrt(f*f+g*g),i=180*Math.atan2(g,f)/Math.PI;return(i>90||i<-90)&&(i+=180),`rotate(${i} ${d+g/h*8} ${e+-f/h*8})`}).text(a=>a.label);let E=q.append("g").attr("class","wardley-trends"),F=l.trends.map(a=>{let b=A.get(a.nodeId);if(!b)return null;let c=u(a.targetX),d=v(a.targetY),e=c-b.x,f=d-b.y,g=Math.sqrt(e*e+f*f),i=h.nodeRadius+2;return{origin:b,targetX:c,targetY:d,adjustedX2:g>i?c-e/g*i:c,adjustedY2:g>i?d-f/g*i:d}}).filter(a=>null!==a);E.selectAll("line").data(F).enter().append("line").attr("class","wardley-trend").attr("x1",a=>a.origin.x).attr("y1",a=>a.origin.y).attr("x2",a=>a.adjustedX2).attr("y2",a=>a.adjustedY2).attr("stroke",i.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${c})`);let J=q.append("g").attr("class","wardley-nodes").selectAll("g").data(l.nodes).enter().append("g").attr("class",a=>["wardley-node",a.className?`wardley-node--${a.className}`:""].filter(Boolean).join(" "));J.filter(a=>"outsource"===a.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","#666").attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>"buy"===a.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","#ccc").attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>"build"===a.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let K=J.filter(a=>"market"===a.sourceStrategy);K.append("circle").attr("class","wardley-market-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>!a.isPipelineParent&&"market"!==a.sourceStrategy&&"anchor"!==a.className).append("circle").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",h.nodeRadius).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1);let L=.7*h.nodeRadius,M=1.2*h.nodeRadius;if(K.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x).attr("y1",a=>A.get(a.id).y-M).attr("x2",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("y2",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),K.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("y1",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("x2",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("y2",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),K.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("y1",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("x2",a=>A.get(a.id).x).attr("y2",a=>A.get(a.id).y-M).attr("stroke",i.componentStroke).attr("stroke-width",1),K.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y-M).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),K.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("cy",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),K.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("cy",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),J.filter(a=>!0===a.isPipelineParent).append("rect").attr("x",a=>A.get(a.id).x-j/2).attr("y",a=>A.get(a.id).y-j/2).attr("width",j).attr("height",j).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>!0===a.inertia).append("line").attr("class","wardley-inertia").attr("x1",a=>{let b=A.get(a.id),c=a.isPipelineParent?j/2+15:h.nodeRadius+15;return a.sourceStrategy&&(c+=h.nodeRadius+10),b.x+c}).attr("y1",a=>{let b=A.get(a.id),c=a.isPipelineParent?j:2*h.nodeRadius;return b.y-c/2}).attr("x2",a=>{let b=A.get(a.id),c=a.isPipelineParent?j/2+15:h.nodeRadius+15;return a.sourceStrategy&&(c+=h.nodeRadius+10),b.x+c}).attr("y2",a=>{let b=A.get(a.id),c=a.isPipelineParent?j:2*h.nodeRadius;return b.y+c/2}).attr("stroke",i.componentStroke).attr("stroke-width",6),J.append("text").attr("x",a=>{let b=A.get(a.id);if("anchor"===a.className)return void 0!==a.labelOffsetX?b.x+a.labelOffsetX:b.x;let c=h.nodeLabelOffset;a.sourceStrategy&&void 0===a.labelOffsetX&&(c+=10);let d=a.labelOffsetX??c;return b.x+d}).attr("y",a=>{let b=A.get(a.id);if("anchor"===a.className)return void 0!==a.labelOffsetY?b.y+a.labelOffsetY:b.y-3;let c=-h.nodeLabelOffset;a.sourceStrategy&&void 0===a.labelOffsetY&&(c-=10);let d=a.labelOffsetY??c;return b.y+d}).attr("class","wardley-node-label").attr("fill",a=>"evolved"===a.className?i.evolutionStroke:"anchor"===a.className?"#000":i.componentLabelColor).attr("font-size",h.labelFontSize).attr("font-weight",a=>"anchor"===a.className?"bold":"normal").attr("text-anchor",a=>"anchor"===a.className?"middle":"start").attr("dominant-baseline",a=>"anchor"===a.className?"middle":"auto").text(a=>a.label),l.annotations.length>0){let a=q.append("g").attr("class","wardley-annotations");if(l.annotations.forEach(b=>{let c=b.coordinates.map(a=>({x:u(a.x),y:v(a.y)}));if(c.length>1)for(let b=0;b<c.length-1;b++)a.append("line").attr("class","wardley-annotation-line").attr("x1",c[b].x).attr("y1",c[b].y).attr("x2",c[b+1].x).attr("y2",c[b+1].y).attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");c.forEach(c=>{let d=a.append("g").attr("class","wardley-annotation");d.append("circle").attr("cx",c.x).attr("cy",c.y).attr("r",10).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5),d.append("text").attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.number)})}),l.annotationsBox){let b=u(l.annotationsBox.x),c=v(l.annotationsBox.y),d=a.append("g").attr("class","wardley-annotations-box"),e=[...l.annotations].filter(a=>a.text).sort((a,b)=>a.number-b.number),f=[];if(e.forEach((a,e)=>{let g=d.append("text").attr("x",b+10).attr("y",c+10+(e+1)*16).attr("font-size",11).attr("fill",i.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${a.number}. ${a.text}`);f.push(g)}),f.length>0){let a=0,g=0;f.forEach(b=>{let c=b.node(),d=c.getComputedTextLength();a=Math.max(a,d);let e=c.getBBox();g=Math.max(g,e.height)});let j=a+20+105,k=16*e.length+20+g/2,l=h.padding,m=n-h.padding-j,p=h.padding,q=o-h.padding-k;b=Math.max(l,Math.min(b,m)),c=Math.max(p,Math.min(c,q)),f.forEach((a,d)=>{a.attr("x",b+10).attr("y",c+10+(d+1)*16)}),d.insert("rect","text").attr("x",b).attr("y",c).attr("width",j).attr("height",k).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(l.notes.length>0){let a=q.append("g").attr("class","wardley-notes");l.notes.forEach(b=>{let c=u(b.x),d=v(b.y);a.append("text").attr("x",c).attr("y",d).attr("text-anchor","start").attr("font-size",11).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.text)})}if(l.accelerators.length>0){let a=q.append("g").attr("class","wardley-accelerators");l.accelerators.forEach(b=>{let c=u(b.x),d=v(b.y),e=`
|
|
1
|
+
module.exports=[594600,a=>{"use strict";var b=a.i(29336),c=a.i(554804),d=a.i(197112),e=a.i(523526),f=a.i(762939),g=a.i(589961),h=(0,f.__name)((a,b)=>{let c=a<=1?100*a:a;if(c<0||c>100)throw Error(`${b} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return c},"toPercent"),i=(0,f.__name)((a,b,c)=>({x:h(b,`${c} evolution`),y:h(a,`${c} visibility`)}),"toCoordinates"),j=(0,f.__name)(a=>{if(a){if("+<>"===a)return"bidirectional";if("+<"===a)return"backward";if("+>"===a)return"forward"}},"getFlowFromPort"),k=(0,f.__name)(a=>{if(!a?.startsWith("+"))return{};let b=/^\+'([^']*)'/.exec(a),c=b?.[1];return a.includes("<>")?{flow:"bidirectional",label:c}:a.includes("<")?{flow:"backward",label:c}:a.includes(">")?{flow:"forward",label:c}:{label:c}},"extractFlowFromArrow"),l=(0,f.__name)((a,b)=>{if((0,c.populateCommonDb)(a,b),a.size&&b.setSize(a.size.width,a.size.height),a.evolution){let c=a.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),d=a.evolution.stages.filter(a=>void 0!==a.boundary).map(a=>a.boundary);b.updateAxes({stages:c,stageBoundaries:d})}if(a.anchors.forEach(a=>{let c=i(a.visibility,a.evolution,`Anchor "${a.name}"`);b.addNode(a.name,a.name,c.x,c.y,"anchor")}),a.components.forEach(a=>{let c=i(a.visibility,a.evolution,`Component "${a.name}"`),d=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,e=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,f=a.decorator?.strategy;b.addNode(a.name,a.name,c.x,c.y,"component",d,e,a.inertia,f)}),a.notes.forEach(a=>{let c=i(a.visibility,a.evolution,`Note "${a.text}"`);b.addNote(a.text,c.x,c.y)}),a.pipelines.forEach(a=>{let c=b.getNode(a.parent);if(!c||"number"!=typeof c.y)throw Error(`Pipeline "${a.parent}" must reference an existing component with coordinates.`);let d=c.y;b.startPipeline(a.parent),a.components.forEach(c=>{let e=`${a.parent}_${c.name}`,f=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,g=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,i=h(c.evolution,`Pipeline component "${c.name}" evolution`);b.addNode(e,c.name,i,d,"pipeline-component",f,g),b.addPipelineComponent(a.parent,e)})}),a.links.forEach(a=>{let c=!!a.arrow&&(a.arrow.includes("-.->")||a.arrow.includes(".-.")),d=j(a.fromPort)??j(a.toPort),{flow:e,label:f}=k(a.arrow);!d&&e&&(d=e);let g=a.linkLabel;b.addLink(b.resolveNodeId(a.from),b.resolveNodeId(a.to),c,f??g,d)}),a.evolves.forEach(a=>{let c=b.getNode(a.component);if(c?.y!==void 0){let d=h(a.target,`Evolve target for "${a.component}"`);b.addTrend(a.component,d,c.y)}}),a.annotations.length>0){let c=a.annotations[0],d=i(c.x,c.y,"Annotations box");b.setAnnotationsBox(d.x,d.y)}a.annotation.forEach(a=>{let c=i(a.x,a.y,`Annotation ${a.number}`);b.addAnnotation(a.number,[{x:c.x,y:c.y}],a.text)}),a.accelerators.forEach(a=>{let c=i(a.x,a.y,`Accelerator "${a.name}"`);b.addAccelerator(a.name,c.x,c.y)}),a.deaccelerators.forEach(a=>{let c=i(a.x,a.y,`Deaccelerator "${a.name}"`);b.addDeaccelerator(a.name,c.x,c.y)})},"populateDb"),m={parser:{yy:void 0},parse:(0,f.__name)(async a=>{let b=await (0,g.parse)("wardley",a);f.log.debug(b);let c=m.parser?.yy;if(!c||"function"!=typeof c.addNode)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.");l(b,c)},"parse")},n=new 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{(0,f.__name)(this,"WardleyBuilder")}addNode(a){let b=this.nodes.get(a.id)??{id:a.id,label:a.label},c={...b,...a,className:a.className??b.className,labelOffsetX:a.labelOffsetX??b.labelOffsetX,labelOffsetY:a.labelOffsetY??b.labelOffsetY};this.nodes.set(a.id,c)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let b=this.nodes.get(a);b&&(b.isPipelineParent=!0)}addPipelineComponent(a,b){let c=this.pipelines.get(a);c&&c.componentIds.push(b);let d=this.nodes.get(b);d&&(d.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,b){this.annotationsBox={x:a,y:b}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,b){this.size={width:a,height:b}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[b,c]of this.nodes)if(c.label===a)return b;return a}build(){let a=[];for(let b of this.nodes.values()){if("number"!=typeof b.x||"number"!=typeof b.y)throw Error(`Node "${b.label}" is missing coordinates`);a.push(b)}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}};function o(){return(0,e.getConfig2)()["wardley-beta"]}function p(a,b,c,d,e,f,g,h,i){n.addNode({id:a,label:b,x:c,y:d,className:e,labelOffsetX:f,labelOffsetY:g,inertia:h,sourceStrategy:i})}function q(a,b,c=!1,d,e){n.addLink({source:a,target:b,dashed:c,label:d,flow:e})}function r(a,b,c){n.addTrend({nodeId:a,targetX:b,targetY:c})}function s(a,b,c){n.addAnnotation({number:a,coordinates:b,text:c})}function t(a,b,c){n.addNote({text:a,x:b,y:c})}function u(a,b,c){n.addAccelerator({name:a,x:b,y:c})}function v(a,b,c){n.addDeaccelerator({name:a,x:b,y:c})}function w(a,b){n.setAnnotationsBox(a,b)}function x(a,b){n.setSize(a,b)}function y(a){n.startPipeline(a)}function z(a,b){n.addPipelineComponent(a,b)}function A(a){n.setAxes(a)}function B(a){return n.getNode(a)}function C(a){return n.resolveNodeId(a)}function D(){return n.build()}function E(){n.clear(),(0,e.clear)()}(0,f.__name)(o,"getConfig"),(0,f.__name)(p,"addNode"),(0,f.__name)(q,"addLink"),(0,f.__name)(r,"addTrend"),(0,f.__name)(s,"addAnnotation"),(0,f.__name)(t,"addNote"),(0,f.__name)(u,"addAccelerator"),(0,f.__name)(v,"addDeaccelerator"),(0,f.__name)(w,"setAnnotationsBox"),(0,f.__name)(x,"setSize"),(0,f.__name)(y,"startPipeline"),(0,f.__name)(z,"addPipelineComponent"),(0,f.__name)(A,"updateAxes"),(0,f.__name)(B,"getNode"),(0,f.__name)(C,"resolveNodeId"),(0,f.__name)(D,"getWardleyData"),(0,f.__name)(E,"clear");var F={getConfig:o,addNode:p,addLink:q,addTrend:r,addAnnotation:s,addNote:t,addAccelerator:u,addDeaccelerator:v,setAnnotationsBox:w,setSize:x,startPipeline:y,addPipelineComponent:z,updateAxes:A,getNode:B,resolveNodeId:C,getWardleyData:D,clear:E,setAccTitle:e.setAccTitle,getAccTitle:e.getAccTitle,setDiagramTitle:e.setDiagramTitle,getDiagramTitle:e.getDiagramTitle,getAccDescription:e.getAccDescription,setAccDescription:e.setAccDescription},G=["Genesis","Custom Built","Product","Commodity"],H=(0,f.__name)(()=>{let{themeVariables:a}=(0,e.getConfig2)();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"),I=(0,f.__name)(()=>{let a=(0,e.getConfig2)()["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"),J=(0,f.__name)((a,c,d,g)=>{f.log.debug("Rendering Wardley map\n"+a);let h=I(),i=H(),j=1.6*h.nodeRadius,k=g.db,l=k.getWardleyData(),m=k.getDiagramTitle(),n=l.size?.width??h.width,o=l.size?.height??h.height,p=(0,b.selectSvgElement)(c);p.selectAll("*").remove(),(0,e.configureSvgSize)(p,o,n,h.useMaxWidth),p.attr("viewBox",`0 0 ${n} ${o}`);let q=p.append("g").attr("class","wardley-map"),r=p.append("defs");r.append("marker").attr("id",`arrow-${c}`).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",i.evolutionStroke).attr("stroke","none"),r.append("marker").attr("id",`link-arrow-end-${c}`).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",i.linkStroke).attr("stroke","none"),r.append("marker").attr("id",`link-arrow-start-${c}`).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",i.linkStroke).attr("stroke","none"),q.append("rect").attr("class","wardley-background").attr("width",n).attr("height",o).attr("fill",i.backgroundColor);let s=n-2*h.padding,t=o-2*h.padding;m&&q.append("text").attr("class","wardley-title").attr("x",n/2).attr("y",h.padding/2).attr("fill",i.axisTextColor).attr("font-size",1.05*h.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(m);let u=(0,f.__name)(a=>h.padding+a/100*s,"projectX"),v=(0,f.__name)(a=>o-h.padding-a/100*t,"projectY"),w=q.append("g").attr("class","wardley-axes");w.append("line").attr("x1",h.padding).attr("x2",n-h.padding).attr("y1",o-h.padding).attr("y2",o-h.padding).attr("stroke",i.axisColor).attr("stroke-width",1),w.append("line").attr("x1",h.padding).attr("x2",h.padding).attr("y1",h.padding).attr("y2",o-h.padding).attr("stroke",i.axisColor).attr("stroke-width",1);let x=l.axes.xLabel??"Evolution",y=l.axes.yLabel??"Visibility";w.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",h.padding+s/2).attr("y",o-h.padding/4).attr("fill",i.axisTextColor).attr("font-size",h.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(x),w.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",h.padding/3).attr("y",h.padding+t/2).attr("fill",i.axisTextColor).attr("font-size",h.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${h.padding/3} ${h.padding+t/2})`).text(y);let z=l.axes.stages&&l.axes.stages.length>0?l.axes.stages:G;if(z.length>0){let a=q.append("g").attr("class","wardley-stages"),b=l.axes.stageBoundaries,c=[];if(b&&b.length===z.length){let a=0;b.forEach(b=>{c.push({start:a,end:b}),a=b})}else{let a=1/z.length;z.forEach((b,d)=>{c.push({start:d*a,end:(d+1)*a})})}z.forEach((b,d)=>{let e=c[d],f=h.padding+e.start*s,g=(f+(h.padding+e.end*s))/2;d>0&&a.append("line").attr("x1",f).attr("x2",f).attr("y1",h.padding).attr("y2",o-h.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),a.append("text").attr("class","wardley-stage-label").attr("x",g).attr("y",o-h.padding/1.5).attr("fill",i.axisTextColor).attr("font-size",h.axisFontSize-2).attr("text-anchor","middle").text(b)})}if(h.showGrid){let a=q.append("g").attr("class","wardley-grid");for(let b=1;b<4;b++){let c=b/4,d=h.padding+s*c;a.append("line").attr("x1",d).attr("x2",d).attr("y1",h.padding).attr("y2",o-h.padding).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6"),a.append("line").attr("x1",h.padding).attr("x2",n-h.padding).attr("y1",o-h.padding-t*c).attr("y2",o-h.padding-t*c).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6")}}let A=new Map;if(l.nodes.forEach(a=>{A.set(a.id,{x:u(a.x),y:v(a.y),node:a})}),l.pipelines.length>0){let a=q.append("g").attr("class","wardley-pipelines"),b=q.append("g").attr("class","wardley-pipeline-links");l.pipelines.forEach(c=>{if(0===c.componentIds.length)return;let d=c.componentIds.map(a=>({id:a,pos:A.get(a),node:l.nodes.find(b=>b.id===a)})).filter(a=>a.pos&&a.node).sort((a,b)=>a.node.x-b.node.x);for(let a=0;a<d.length-1;a++){let c=d[a],e=d[a+1];b.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",c.pos.x).attr("y1",c.pos.y).attr("x2",e.pos.x).attr("y2",e.pos.y).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let e=1/0,f=-1/0,g=0;if(c.componentIds.forEach(a=>{let b=A.get(a);b&&(e=Math.min(e,b.x),f=Math.max(f,b.x),g=b.y)}),e!==1/0&&f!==-1/0){let b=4*h.nodeRadius,d=g-b/2,k=A.get(c.nodeId);k&&(k.x=(e+f)/2,k.y=d-j/6),a.append("rect").attr("class","wardley-pipeline-box").attr("x",e-15).attr("y",d).attr("width",f-e+30).attr("height",b).attr("fill","none").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let B=q.append("g").attr("class","wardley-links"),C=new Map;l.pipelines.forEach(a=>{C.set(a.nodeId,new Set(a.componentIds))});let D=l.links.filter(a=>{if(!A.has(a.source)||!A.has(a.target))return!1;let b=C.get(a.target);return!b?.has(a.source)});B.selectAll("line").data(D).enter().append("line").attr("class",a=>`wardley-link${a.dashed?" wardley-link--dashed":""}`).attr("x1",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.source).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=c.x-b.x,f=c.y-b.y,g=Math.sqrt(e*e+f*f);return b.x+e/g*d}).attr("y1",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.source).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=c.x-b.x,f=c.y-b.y,g=Math.sqrt(e*e+f*f);return b.y+f/g*d}).attr("x2",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.target).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=b.x-c.x,f=b.y-c.y,g=Math.sqrt(e*e+f*f);return c.x+e/g*d}).attr("y2",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.target).isPipelineParent?j/Math.sqrt(2):h.nodeRadius,e=b.x-c.x,f=b.y-c.y,g=Math.sqrt(e*e+f*f);return c.y+f/g*d}).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",a=>a.dashed?"6 6":null).attr("marker-end",a=>"forward"===a.flow||"bidirectional"===a.flow?`url(#link-arrow-end-${c})`:null).attr("marker-start",a=>"backward"===a.flow||"bidirectional"===a.flow?`url(#link-arrow-start-${c})`:null),B.selectAll("text").data(D.filter(a=>a.label)).enter().append("text").attr("class","wardley-link-label").attr("x",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.x+c.x)/2,e=c.y-b.y,f=c.x-b.x,g=Math.sqrt(f*f+e*e);return d+e/g*8}).attr("y",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.y+c.y)/2,e=c.x-b.x,f=c.y-b.y,g=Math.sqrt(e*e+f*f);return d+-e/g*8}).attr("fill",i.axisTextColor).attr("font-size",h.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.x+c.x)/2,e=(b.y+c.y)/2,f=c.x-b.x,g=c.y-b.y,h=Math.sqrt(f*f+g*g),i=180*Math.atan2(g,f)/Math.PI;return(i>90||i<-90)&&(i+=180),`rotate(${i} ${d+g/h*8} ${e+-f/h*8})`}).text(a=>a.label);let E=q.append("g").attr("class","wardley-trends"),F=l.trends.map(a=>{let b=A.get(a.nodeId);if(!b)return null;let c=u(a.targetX),d=v(a.targetY),e=c-b.x,f=d-b.y,g=Math.sqrt(e*e+f*f),i=h.nodeRadius+2;return{origin:b,targetX:c,targetY:d,adjustedX2:g>i?c-e/g*i:c,adjustedY2:g>i?d-f/g*i:d}}).filter(a=>null!==a);E.selectAll("line").data(F).enter().append("line").attr("class","wardley-trend").attr("x1",a=>a.origin.x).attr("y1",a=>a.origin.y).attr("x2",a=>a.adjustedX2).attr("y2",a=>a.adjustedY2).attr("stroke",i.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${c})`);let J=q.append("g").attr("class","wardley-nodes").selectAll("g").data(l.nodes).enter().append("g").attr("class",a=>["wardley-node",a.className?`wardley-node--${a.className}`:""].filter(Boolean).join(" "));J.filter(a=>"outsource"===a.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","#666").attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>"buy"===a.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","#ccc").attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>"build"===a.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let K=J.filter(a=>"market"===a.sourceStrategy);K.append("circle").attr("class","wardley-market-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*h.nodeRadius).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>!a.isPipelineParent&&"market"!==a.sourceStrategy&&"anchor"!==a.className).append("circle").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",h.nodeRadius).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1);let L=.7*h.nodeRadius,M=1.2*h.nodeRadius;if(K.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x).attr("y1",a=>A.get(a.id).y-M).attr("x2",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("y2",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),K.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("y1",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("x2",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("y2",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),K.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("y1",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("x2",a=>A.get(a.id).x).attr("y2",a=>A.get(a.id).y-M).attr("stroke",i.componentStroke).attr("stroke-width",1),K.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y-M).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),K.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("cy",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),K.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("cy",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),J.filter(a=>!0===a.isPipelineParent).append("rect").attr("x",a=>A.get(a.id).x-j/2).attr("y",a=>A.get(a.id).y-j/2).attr("width",j).attr("height",j).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1),J.filter(a=>!0===a.inertia).append("line").attr("class","wardley-inertia").attr("x1",a=>{let b=A.get(a.id),c=a.isPipelineParent?j/2+15:h.nodeRadius+15;return a.sourceStrategy&&(c+=h.nodeRadius+10),b.x+c}).attr("y1",a=>{let b=A.get(a.id),c=a.isPipelineParent?j:2*h.nodeRadius;return b.y-c/2}).attr("x2",a=>{let b=A.get(a.id),c=a.isPipelineParent?j/2+15:h.nodeRadius+15;return a.sourceStrategy&&(c+=h.nodeRadius+10),b.x+c}).attr("y2",a=>{let b=A.get(a.id),c=a.isPipelineParent?j:2*h.nodeRadius;return b.y+c/2}).attr("stroke",i.componentStroke).attr("stroke-width",6),J.append("text").attr("x",a=>{let b=A.get(a.id);if("anchor"===a.className)return void 0!==a.labelOffsetX?b.x+a.labelOffsetX:b.x;let c=h.nodeLabelOffset;a.sourceStrategy&&void 0===a.labelOffsetX&&(c+=10);let d=a.labelOffsetX??c;return b.x+d}).attr("y",a=>{let b=A.get(a.id);if("anchor"===a.className)return void 0!==a.labelOffsetY?b.y+a.labelOffsetY:b.y-3;let c=-h.nodeLabelOffset;a.sourceStrategy&&void 0===a.labelOffsetY&&(c-=10);let d=a.labelOffsetY??c;return b.y+d}).attr("class","wardley-node-label").attr("fill",a=>"evolved"===a.className?i.evolutionStroke:"anchor"===a.className?"#000":i.componentLabelColor).attr("font-size",h.labelFontSize).attr("font-weight",a=>"anchor"===a.className?"bold":"normal").attr("text-anchor",a=>"anchor"===a.className?"middle":"start").attr("dominant-baseline",a=>"anchor"===a.className?"middle":"auto").text(a=>a.label),l.annotations.length>0){let a=q.append("g").attr("class","wardley-annotations");if(l.annotations.forEach(b=>{let c=b.coordinates.map(a=>({x:u(a.x),y:v(a.y)}));if(c.length>1)for(let b=0;b<c.length-1;b++)a.append("line").attr("class","wardley-annotation-line").attr("x1",c[b].x).attr("y1",c[b].y).attr("x2",c[b+1].x).attr("y2",c[b+1].y).attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");c.forEach(c=>{let d=a.append("g").attr("class","wardley-annotation");d.append("circle").attr("cx",c.x).attr("cy",c.y).attr("r",10).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5),d.append("text").attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.number)})}),l.annotationsBox){let b=u(l.annotationsBox.x),c=v(l.annotationsBox.y),d=a.append("g").attr("class","wardley-annotations-box"),e=[...l.annotations].filter(a=>a.text).sort((a,b)=>a.number-b.number),f=[];if(e.forEach((a,e)=>{let g=d.append("text").attr("x",b+10).attr("y",c+10+(e+1)*16).attr("font-size",11).attr("fill",i.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${a.number}. ${a.text}`);f.push(g)}),f.length>0){let a=0,g=0;f.forEach(b=>{let c=b.node(),d=c.getComputedTextLength();a=Math.max(a,d);let e=c.getBBox();g=Math.max(g,e.height)});let j=a+20+105,k=16*e.length+20+g/2,l=h.padding,m=n-h.padding-j,p=h.padding,q=o-h.padding-k;b=Math.max(l,Math.min(b,m)),c=Math.max(p,Math.min(c,q)),f.forEach((a,d)=>{a.attr("x",b+10).attr("y",c+10+(d+1)*16)}),d.insert("rect","text").attr("x",b).attr("y",c).attr("width",j).attr("height",k).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(l.notes.length>0){let a=q.append("g").attr("class","wardley-notes");l.notes.forEach(b=>{let c=u(b.x),d=v(b.y);a.append("text").attr("x",c).attr("y",d).attr("text-anchor","start").attr("font-size",11).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.text)})}if(l.accelerators.length>0){let a=q.append("g").attr("class","wardley-accelerators");l.accelerators.forEach(b=>{let c=u(b.x),d=v(b.y),e=`
|
|
2
2
|
M ${c} ${d-15}
|
|
3
3
|
L ${c+60-20} ${d-15}
|
|
4
4
|
L ${c+60-20} ${d-15-8}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[46246,a=>{"use strict";var b,c=a.i(29336),d=a.i(654669),e=a.i(197112),f=a.i(604225),g=a.i(762939);a.i(43066);var h=a.i(98071),i=a.i(443104);function j(){var a,b,c=(0,i.default)().unknown(void 0),d=c.domain,e=c.range,f=0,g=1,k=!1,l=0,m=0,n=.5;function o(){var c=d().length,h=g<f,i=h?g:f,j=h?f:g;a=(j-i)/Math.max(1,c-l+2*m),k&&(a=Math.floor(a)),i+=(j-i-a*(c-l))*n,b=a*(1-l),k&&(i=Math.round(i),b=Math.round(b));var o=(function(a,b,c){a*=1,b*=1,c=(e=arguments.length)<2?(b=a,a=0,1):e<3?1:+c;for(var d=-1,e=0|Math.max(0,Math.ceil((b-a)/c)),f=Array(e);++d<e;)f[d]=a+d*c;return f})(c).map(function(b){return i+a*b});return e(h?o.reverse():o)}return delete c.unknown,c.domain=function(a){return arguments.length?(d(a),o()):d()},c.range=function(a){return arguments.length?([f,g]=a,f*=1,g*=1,o()):[f,g]},c.rangeRound=function(a){return[f,g]=a,f*=1,g*=1,k=!0,o()},c.bandwidth=function(){return b},c.step=function(){return a},c.round=function(a){return arguments.length?(k=!!a,o()):k},c.padding=function(a){return arguments.length?(l=Math.min(1,m=+a),o()):l},c.paddingInner=function(a){return arguments.length?(l=Math.min(1,a),o()):l},c.paddingOuter=function(a){return arguments.length?(m=+a,o()):m},c.align=function(a){return arguments.length?(n=Math.max(0,Math.min(1,a)),o()):n},c.copy=function(){return j(d(),[f,g]).round(k).paddingInner(l).paddingOuter(m).align(n)},h.initRange.apply(o(),arguments)}var k=a.i(951),l=a.i(298648),m=function(){var a=(0,g.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,10,12,14,16,18,19,21,23],c=[2,6],d=[1,3],e=[1,5],f=[1,6],h=[1,7],i=[1,5,10,12,14,16,18,19,21,23,34,35,36],j=[1,25],k=[1,26],l=[1,28],m=[1,29],n=[1,30],o=[1,31],p=[1,32],q=[1,33],r=[1,34],s=[1,35],t=[1,36],u=[1,37],v=[1,43],w=[1,42],x=[1,47],y=[1,50],z=[1,10,12,14,16,18,19,21,23,34,35,36],A=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],B=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],C=[1,64],D={trace:(0,g.__name)(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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,g.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 5:d.setOrientation(f[h]);break;case 9:d.setDiagramTitle(f[h].text.trim());break;case 12:d.setLineData({text:"",type:"text"},f[h]);break;case 13:d.setLineData(f[h-1],f[h]);break;case 14:d.setBarData({text:"",type:"text"},f[h]);break;case 15:d.setBarData(f[h-1],f[h]);break;case 16:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 19:case 27:this.$=f[h-1];break;case 20:this.$=[Number(f[h-2]),...f[h]];break;case 21:this.$=[Number(f[h])];break;case 22:d.setXAxisTitle(f[h]);break;case 23:d.setXAxisTitle(f[h-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(f[h]);break;case 26:d.setXAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 28:this.$=[f[h-2],...f[h]];break;case 29:this.$=[f[h]];break;case 30:d.setYAxisTitle(f[h]);break;case 31:d.setYAxisTitle(f[h-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 37:case 38:this.$={text:f[h],type:"text"};break;case 39:this.$={text:f[h],type:"markdown"};break;case 40:this.$=f[h];break;case 41:this.$=f[h-1]+""+f[h]}},"anonymous"),table:[a(b,c,{3:1,4:2,7:4,5:d,34:e,35:f,36:h}),{1:[3]},a(b,c,{4:2,7:4,3:8,5:d,34:e,35:f,36:h}),a(b,c,{4:2,7:4,6:9,3:10,5:d,8:[1,11],34:e,35:f,36:h}),{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]},a(i,[2,34]),a(i,[2,35]),a(i,[2,36]),{1:[2,1]},a(b,c,{4:2,7:4,3:21,5:d,34:e,35:f,36:h}),{1:[2,3]},a(i,[2,5]),a(b,[2,7],{4:22,34:e,35:f,36:h}),{11:23,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:39,13:38,24:v,27:w,29:40,30:41,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:45,15:44,27:x,33:46,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:49,17:48,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:52,17:51,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{20:[1,53]},{22:[1,54]},a(z,[2,18]),{1:[2,2]},a(z,[2,8]),a(z,[2,9]),a(A,[2,37],{40:55,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u}),a(A,[2,38]),a(A,[2,39]),a(B,[2,40]),a(B,[2,42]),a(B,[2,43]),a(B,[2,44]),a(B,[2,45]),a(B,[2,46]),a(B,[2,47]),a(B,[2,48]),a(B,[2,49]),a(B,[2,50]),a(B,[2,51]),a(z,[2,10]),a(z,[2,22],{30:41,29:56,24:v,27:w}),a(z,[2,24]),a(z,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,11]),a(z,[2,30],{33:60,27:x}),a(z,[2,32]),{31:[1,61]},a(z,[2,12]),{17:62,24:y},{25:63,27:C},a(z,[2,14]),{17:65,24:y},a(z,[2,16]),a(z,[2,17]),a(B,[2,41]),a(z,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},a(z,[2,31]),{27:[1,69]},a(z,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},a(z,[2,15]),a(z,[2,26]),a(z,[2,27]),{11:59,32:72,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,33]),a(z,[2,19]),{25:73,27:C},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,g.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,g.__name)(function(a){var b=this,c=[0],d=[],e=[null],f=[],h=this.table,i="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,g.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return D.lexer={EOF:1,parseError:(0,g.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,g.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,g.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,g.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.__name)(function(){return this._more=!0,this},"more"),reject:(0,g.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,g.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,g.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,g.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,g.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,g.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,g.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,g.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,g.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,g.__name)(function(a,b,c,d){switch(c){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"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}}},(0,g.__name)(E,"Parser"),E.prototype=D,D.Parser=E,new E}();function n(a){return"bar"===a.type}function o(a){return"band"===a.type}function p(a){return"linear"===a.type}m.parser=m,(0,g.__name)(n,"isBarPlot"),(0,g.__name)(o,"isBandAxisData"),(0,g.__name)(p,"isLinearAxisData");var q=class{constructor(a){this.parentGroup=a}static{(0,g.__name)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(a,b){if(!this.parentGroup)return{width:a.reduce((a,b)=>Math.max(b.length,a),0)*b,height:b};let c={width:0,height:0},e=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",b);for(let f of a){let a=(0,d.computeDimensionOfText)(e,1,f),g=a?a.width:f.length*b,h=a?a.height:b;c.width=Math.max(c.width,g),c.height=Math.max(c.height,h)}return e.remove(),c}},r=class{constructor(a,b,c,d){this.axisConfig=a,this.title=b,this.textDimensionCalculator=c,this.axisThemeConfig=d,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.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,g.__name)(this,"BaseAxis")}setRange(a){this.range=a,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=a[1]-a[0]:this.boundingRect.width=a[1]-a[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(a){this.axisPosition=a,this.setRange(this.range)}getTickDistance(){let a=this.getRange();return Math.abs(a[0]-a[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(a=>a.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(a){let b=a.height;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.width;this.outerPadding=Math.min(c.width/2,d);let e=c.height+2*this.axisConfig.labelPadding;this.labelTextHeight=c.height,e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width,this.boundingRect.height=a.height-b}calculateSpaceIfDrawnVertical(a){let b=a.width;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.height;this.outerPadding=Math.min(c.height/2,d);let e=c.width+2*this.axisConfig.labelPadding;e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width-b,this.boundingRect.height=a.height}calculateSpace(a){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(a):this.calculateSpaceIfDrawnHorizontally(a),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}getDrawableElementsForLeftAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${b},${this.boundingRect.y} L ${b},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(a=>({text:a.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(a),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let b=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${b},${this.getScaleValue(a)} L ${b-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForBottomAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b} L ${this.getScaleValue(a)},${b+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForTopAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y;a.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${b+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},s=class extends r{static{(0,g.__name)(this,"BandAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.categories=c,this.scale=j().domain(this.categories).range(this.getRange())}setRange(a){super.setRange(a)}recalculateScale(){this.scale=j().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),g.log.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(a){return this.scale(a)??this.getRange()[0]}},t=class extends r{static{(0,g.__name)(this,"LinearAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.domain=c,this.scale=(0,k.scaleLinear)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let a=[...this.domain];"left"===this.axisPosition&&a.reverse(),this.scale=(0,k.scaleLinear)().domain(a).range(this.getRange())}getScaleValue(a){return this.scale(a)}};function u(a,b,c,d){let e=new q(d);return o(a)?new s(b,c,a.categories,a.title,e):new t(b,c,[a.min,a.max],a.title,e)}(0,g.__name)(u,"getAxis");var v=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,g.__name)(this,"ChartTitle")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){let b=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),c=Math.max(b.width,a.width),d=b.height+2*this.chartConfig.titlePadding;return b.width<=c&&b.height<=d&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=c,this.boundingRect.height=d,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let a=[];return this.showChartTitle&&a.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}]}),a}};function w(a,b,c,d){return new v(new q(d),a,b,c)}(0,g.__name)(w,"getChartTitleComponent");var x=class{constructor(a,b,c,d,e){this.plotData=a,this.xAxis=b,this.yAxis=c,this.orientation=d,this.plotIndex=e}static{(0,g.__name)(this,"LinePlot")}getDrawableElement(){let a,b=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);return(a="horizontal"===this.orientation?(0,l.line)().y(a=>a[0]).x(a=>a[1])(b):(0,l.line)().x(a=>a[0]).y(a=>a[1])(b))?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:a,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},y=class{constructor(a,b,c,d,e,f){this.barData=a,this.boundingRect=b,this.xAxis=c,this.yAxis=d,this.orientation=e,this.plotIndex=f}static{(0,g.__name)(this,"BarPlot")}getDrawableElement(){let a=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),b=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),c=b/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:this.boundingRect.x,y:a[0]-c,height:b,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:a[0]-c,y:a[1],width:b,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},z=class{constructor(a,b,c){this.chartConfig=a,this.chartData=b,this.chartThemeConfig=c,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,g.__name)(this,"BasePlot")}setAxes(a,b){this.xAxis=a,this.yAxis=b}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){return this.boundingRect.width=a.width,this.boundingRect.height=a.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 a=[];for(let[b,c]of this.chartData.plots.entries())switch(c.type){case"line":{let d=new x(c,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}break;case"bar":{let d=new y(c,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}}return a}};function A(a,b,c){return new z(a,b,c)}(0,g.__name)(A,"getPlotComponent");var B=class{constructor(a,b,c,d){this.chartConfig=a,this.chartData=b,this.componentStore={title:w(a,b,c,d),plot:A(a,b,c),xAxis:u(b.xAxis,a.xAxis,{titleColor:c.xAxisTitleColor,labelColor:c.xAxisLabelColor,tickColor:c.xAxisTickColor,axisLineColor:c.xAxisLineColor},d),yAxis:u(b.yAxis,a.yAxis,{titleColor:c.yAxisTitleColor,labelColor:c.yAxisLabelColor,tickColor:c.yAxisTickColor,axisLineColor:c.yAxisLineColor},d)}}static{(0,g.__name)(this,"Orchestrator")}calculateVerticalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:e,height:f});a-=g.width,b-=g.height,d=(g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:a,height:b}),b-=g.height,this.componentStore.yAxis.setAxisPosition("left"),c=(g=this.componentStore.yAxis.calculateSpace({width:a,height:b})).width,(a-=g.width)>0&&(e+=a,a=0),b>0&&(f+=b,b=0),this.componentStore.plot.calculateSpace({width:e,height:f}),this.componentStore.plot.setBoundingBoxXY({x:c,y:d}),this.componentStore.xAxis.setRange([c,c+e]),this.componentStore.xAxis.setBoundingBoxXY({x:c,y:d+f}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:d}),this.chartData.plots.some(a=>n(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=0,f=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:f,height:g});a-=h.width,b-=h.height,c=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:a,height:b}),a-=h.width,d=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:a,height:b}),b-=h.height,e=c+h.height,a>0&&(f+=a,a=0),b>0&&(g+=b,b=0),this.componentStore.plot.calculateSpace({width:f,height:g}),this.componentStore.plot.setBoundingBoxXY({x:d,y:e}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:d,y:c}),this.componentStore.xAxis.setRange([e,e+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:e}),this.chartData.plots.some(a=>n(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let a=[];for(let b of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))a.push(...b.getDrawableElements());return a}},C=class{static{(0,g.__name)(this,"XYChartBuilder")}static build(a,b,c,d){return new B(a,b,c,d).getDrawableElement()}},D=0,E=L(),F=K(),G=M(),H=F.plotColorPalette.split(",").map(a=>a.trim()),I=!1,J=!1;function K(){let a=(0,f.getThemeVariables)(),b=(0,f.getConfig)();return(0,e.cleanAndMerge)(a.xyChart,b.themeVariables.xyChart)}function L(){let a=(0,f.getConfig)();return(0,e.cleanAndMerge)(f.defaultConfig_default.xyChart,a.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function N(a){let b=(0,f.getConfig)();return(0,f.sanitizeText)(a.trim(),b)}function O(a){b=a}function P(a){"horizontal"===a?E.chartOrientation="horizontal":E.chartOrientation="vertical"}function Q(a){G.xAxis.title=N(a.text)}function R(a,b){G.xAxis={type:"linear",title:G.xAxis.title,min:a,max:b},I=!0}function S(a){G.xAxis={type:"band",title:G.xAxis.title,categories:a.map(a=>N(a.text))},I=!0}function T(a){G.yAxis.title=N(a.text)}function U(a,b){G.yAxis={type:"linear",title:G.yAxis.title,min:a,max:b},J=!0}function V(a){let b=Math.min(...a),c=Math.max(...a),d=p(G.yAxis)?G.yAxis.min:1/0,e=p(G.yAxis)?G.yAxis.max:-1/0;G.yAxis={type:"linear",title:G.yAxis.title,min:Math.min(d,b),max:Math.max(e,c)}}function W(a){let b=[];if(0===a.length)return b;if(I||R(Math.min(p(G.xAxis)?G.xAxis.min:1/0,1),Math.max(p(G.xAxis)?G.xAxis.max:-1/0,a.length)),J||V(a),o(G.xAxis)&&(b=G.xAxis.categories.map((b,c)=>[b,a[c]])),p(G.xAxis)){let c=G.xAxis.min,d=G.xAxis.max,e=(d-c)/(a.length-1),f=[];for(let a=c;a<=d;a+=e)f.push(`${a}`);b=f.map((b,c)=>[b,a[c]])}return b}function X(a){return H[0===a?0:a%H.length]}function Y(a,b){let c=W(b);G.plots.push({type:"line",strokeFill:X(D),strokeWidth:2,data:c}),D++}function Z(a,b){let c=W(b);G.plots.push({type:"bar",fill:X(D),data:c}),D++}function $(){if(0===G.plots.length)throw Error("No Plot to render, please provide a plot with some data");return G.title=(0,f.getDiagramTitle)(),C.build(E,G,F,b)}function _(){return F}function aa(){return E}function ab(){return G}(0,g.__name)(K,"getChartDefaultThemeConfig"),(0,g.__name)(L,"getChartDefaultConfig"),(0,g.__name)(M,"getChartDefaultData"),(0,g.__name)(N,"textSanitizer"),(0,g.__name)(O,"setTmpSVGG"),(0,g.__name)(P,"setOrientation"),(0,g.__name)(Q,"setXAxisTitle"),(0,g.__name)(R,"setXAxisRangeData"),(0,g.__name)(S,"setXAxisBand"),(0,g.__name)(T,"setYAxisTitle"),(0,g.__name)(U,"setYAxisRangeData"),(0,g.__name)(V,"setYAxisRangeFromPlotData"),(0,g.__name)(W,"transformDataWithoutCategory"),(0,g.__name)(X,"getPlotColorFromPalette"),(0,g.__name)(Y,"setLineData"),(0,g.__name)(Z,"setBarData"),(0,g.__name)($,"getDrawableElem"),(0,g.__name)(_,"getChartThemeConfig"),(0,g.__name)(aa,"getChartConfig"),(0,g.__name)(ab,"getXYChartData");var ac={getDrawableElem:$,clear:(0,g.__name)(function(){(0,f.clear)(),D=0,E=L(),G=M(),H=(F=K()).plotColorPalette.split(",").map(a=>a.trim()),I=!1,J=!1},"clear"),setAccTitle:f.setAccTitle,getAccTitle:f.getAccTitle,setDiagramTitle:f.setDiagramTitle,getDiagramTitle:f.getDiagramTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription,setOrientation:P,setXAxisTitle:Q,setXAxisRangeData:R,setXAxisBand:S,setYAxisTitle:T,setYAxisRangeData:U,setLineData:Y,setBarData:Z,setTmpSVGG:O,getChartThemeConfig:_,getChartConfig:aa,getXYChartData:ab},ad=(0,g.__name)((a,b,d,e)=>{let h=e.db,i=h.getChartThemeConfig(),j=h.getChartConfig(),k=h.getXYChartData().plots[0].data.map(a=>a[1]);function l(a){return"top"===a?"text-before-edge":"middle"}function m(a){return"left"===a?"start":"right"===a?"end":"middle"}function n(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}(0,g.__name)(l,"getDominantBaseLine"),(0,g.__name)(m,"getTextAnchor"),(0,g.__name)(n,"getTextTransformation"),g.log.debug("Rendering xychart chart\n"+a);let o=(0,c.selectSvgElement)(b),p=o.append("g").attr("class","main"),q=p.append("rect").attr("width",j.width).attr("height",j.height).attr("class","background");(0,f.configureSvgSize)(o,j.height,j.width,!0),o.attr("viewBox",`0 0 ${j.width} ${j.height}`),q.attr("fill",i.backgroundColor),h.setTmpSVGG(o.append("g").attr("class","mermaid-tmp-group"));let r=h.getDrawableElem(),s={};function t(a){let b=p,c="";for(let[d]of a.entries()){let e=p;d>0&&s[c]&&(e=s[c]),c+=a[d],(b=s[c])||(b=s[c]=e.append("g").attr("class",a[d]))}return b}for(let a of((0,g.__name)(t,"getGroup"),r)){if(0===a.data.length)continue;let b=t(a.groupTexts);switch(a.type){case"rect":if(b.selectAll("rect").data(a.data).enter().append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth),j.showDataLabel){let c=j.showDataLabelOutsideBar;if("horizontal"===j.chartOrientation){let d=function(a,b){let{data:c,label:d}=a;return b*d.length*e<=c.width-f};(0,g.__name)(d,"fitsHorizontally");let e=.7,f=10,h=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),j=Math.floor(Math.min(...h.map(a=>{let{data:b}=a,c=.7*b.height;for(;!d(a,c)&&c>0;)c-=1;return c}))),l=(0,g.__name)(a=>c?a.data.x+a.data.width+f:a.data.x+a.data.width-f,"determineLabelXPosition");b.selectAll("text").data(h).enter().append("text").attr("x",l).attr("y",a=>a.data.y+a.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",i.dataLabelColor).attr("font-size",`${j}px`).text(a=>a.label)}else{let d=function(a,b,c){let{data:d,label:e}=a,f=b*e.length*.7,g=d.x+d.width/2,h=g-f/2,i=g+f/2,j=h>=d.x&&i<=d.x+d.width,k=d.y+c+b<=d.y+d.height;return j&&k};(0,g.__name)(d,"fitsInBar");let e=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),f=Math.floor(Math.min(...e.map(a=>{let{data:b,label:c}=a,e=b.width/(.7*c.length);for(;!d(a,e,10)&&e>0;)e-=1;return e}))),h=(0,g.__name)(a=>c?a.data.y-10:a.data.y+10,"determineLabelYPosition");b.selectAll("text").data(e).enter().append("text").attr("x",a=>a.data.x+a.data.width/2).attr("y",h).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",i.dataLabelColor).attr("font-size",`${f}px`).text(a=>a.label)}}break;case"text":b.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>l(a.verticalPos)).attr("text-anchor",a=>m(a.horizontalPos)).attr("transform",a=>n(a)).text(a=>a.text);break;case"path":b.selectAll("path").data(a.data).enter().append("path").attr("d",a=>a.path).attr("fill",a=>a.fill?a.fill:"none").attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth)}}},"draw");a.s(["diagram",0,{parser:m,db:ac,renderer:{draw:ad}}],46246)}];
|
|
1
|
+
module.exports=[46246,a=>{"use strict";var b,c=a.i(29336),d=a.i(654669),e=a.i(197112),f=a.i(523526),g=a.i(762939);a.i(43066);var h=a.i(98071),i=a.i(443104);function j(){var a,b,c=(0,i.default)().unknown(void 0),d=c.domain,e=c.range,f=0,g=1,k=!1,l=0,m=0,n=.5;function o(){var c=d().length,h=g<f,i=h?g:f,j=h?f:g;a=(j-i)/Math.max(1,c-l+2*m),k&&(a=Math.floor(a)),i+=(j-i-a*(c-l))*n,b=a*(1-l),k&&(i=Math.round(i),b=Math.round(b));var o=(function(a,b,c){a*=1,b*=1,c=(e=arguments.length)<2?(b=a,a=0,1):e<3?1:+c;for(var d=-1,e=0|Math.max(0,Math.ceil((b-a)/c)),f=Array(e);++d<e;)f[d]=a+d*c;return f})(c).map(function(b){return i+a*b});return e(h?o.reverse():o)}return delete c.unknown,c.domain=function(a){return arguments.length?(d(a),o()):d()},c.range=function(a){return arguments.length?([f,g]=a,f*=1,g*=1,o()):[f,g]},c.rangeRound=function(a){return[f,g]=a,f*=1,g*=1,k=!0,o()},c.bandwidth=function(){return b},c.step=function(){return a},c.round=function(a){return arguments.length?(k=!!a,o()):k},c.padding=function(a){return arguments.length?(l=Math.min(1,m=+a),o()):l},c.paddingInner=function(a){return arguments.length?(l=Math.min(1,a),o()):l},c.paddingOuter=function(a){return arguments.length?(m=+a,o()):m},c.align=function(a){return arguments.length?(n=Math.max(0,Math.min(1,a)),o()):n},c.copy=function(){return j(d(),[f,g]).round(k).paddingInner(l).paddingOuter(m).align(n)},h.initRange.apply(o(),arguments)}var k=a.i(951),l=a.i(298648),m=function(){var a=(0,g.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,10,12,14,16,18,19,21,23],c=[2,6],d=[1,3],e=[1,5],f=[1,6],h=[1,7],i=[1,5,10,12,14,16,18,19,21,23,34,35,36],j=[1,25],k=[1,26],l=[1,28],m=[1,29],n=[1,30],o=[1,31],p=[1,32],q=[1,33],r=[1,34],s=[1,35],t=[1,36],u=[1,37],v=[1,43],w=[1,42],x=[1,47],y=[1,50],z=[1,10,12,14,16,18,19,21,23,34,35,36],A=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],B=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],C=[1,64],D={trace:(0,g.__name)(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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,g.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 5:d.setOrientation(f[h]);break;case 9:d.setDiagramTitle(f[h].text.trim());break;case 12:d.setLineData({text:"",type:"text"},f[h]);break;case 13:d.setLineData(f[h-1],f[h]);break;case 14:d.setBarData({text:"",type:"text"},f[h]);break;case 15:d.setBarData(f[h-1],f[h]);break;case 16:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 19:case 27:this.$=f[h-1];break;case 20:this.$=[Number(f[h-2]),...f[h]];break;case 21:this.$=[Number(f[h])];break;case 22:d.setXAxisTitle(f[h]);break;case 23:d.setXAxisTitle(f[h-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(f[h]);break;case 26:d.setXAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 28:this.$=[f[h-2],...f[h]];break;case 29:this.$=[f[h]];break;case 30:d.setYAxisTitle(f[h]);break;case 31:d.setYAxisTitle(f[h-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 37:case 38:this.$={text:f[h],type:"text"};break;case 39:this.$={text:f[h],type:"markdown"};break;case 40:this.$=f[h];break;case 41:this.$=f[h-1]+""+f[h]}},"anonymous"),table:[a(b,c,{3:1,4:2,7:4,5:d,34:e,35:f,36:h}),{1:[3]},a(b,c,{4:2,7:4,3:8,5:d,34:e,35:f,36:h}),a(b,c,{4:2,7:4,6:9,3:10,5:d,8:[1,11],34:e,35:f,36:h}),{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]},a(i,[2,34]),a(i,[2,35]),a(i,[2,36]),{1:[2,1]},a(b,c,{4:2,7:4,3:21,5:d,34:e,35:f,36:h}),{1:[2,3]},a(i,[2,5]),a(b,[2,7],{4:22,34:e,35:f,36:h}),{11:23,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:39,13:38,24:v,27:w,29:40,30:41,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:45,15:44,27:x,33:46,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:49,17:48,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:52,17:51,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{20:[1,53]},{22:[1,54]},a(z,[2,18]),{1:[2,2]},a(z,[2,8]),a(z,[2,9]),a(A,[2,37],{40:55,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u}),a(A,[2,38]),a(A,[2,39]),a(B,[2,40]),a(B,[2,42]),a(B,[2,43]),a(B,[2,44]),a(B,[2,45]),a(B,[2,46]),a(B,[2,47]),a(B,[2,48]),a(B,[2,49]),a(B,[2,50]),a(B,[2,51]),a(z,[2,10]),a(z,[2,22],{30:41,29:56,24:v,27:w}),a(z,[2,24]),a(z,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,11]),a(z,[2,30],{33:60,27:x}),a(z,[2,32]),{31:[1,61]},a(z,[2,12]),{17:62,24:y},{25:63,27:C},a(z,[2,14]),{17:65,24:y},a(z,[2,16]),a(z,[2,17]),a(B,[2,41]),a(z,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},a(z,[2,31]),{27:[1,69]},a(z,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},a(z,[2,15]),a(z,[2,26]),a(z,[2,27]),{11:59,32:72,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,33]),a(z,[2,19]),{25:73,27:C},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,g.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,g.__name)(function(a){var b=this,c=[0],d=[],e=[null],f=[],h=this.table,i="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,g.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return D.lexer={EOF:1,parseError:(0,g.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,g.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,g.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,g.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.__name)(function(){return this._more=!0,this},"more"),reject:(0,g.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,g.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,g.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,g.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,g.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,g.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,g.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,g.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,g.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,g.__name)(function(a,b,c,d){switch(c){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"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}}},(0,g.__name)(E,"Parser"),E.prototype=D,D.Parser=E,new E}();function n(a){return"bar"===a.type}function o(a){return"band"===a.type}function p(a){return"linear"===a.type}m.parser=m,(0,g.__name)(n,"isBarPlot"),(0,g.__name)(o,"isBandAxisData"),(0,g.__name)(p,"isLinearAxisData");var q=class{constructor(a){this.parentGroup=a}static{(0,g.__name)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(a,b){if(!this.parentGroup)return{width:a.reduce((a,b)=>Math.max(b.length,a),0)*b,height:b};let c={width:0,height:0},e=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",b);for(let f of a){let a=(0,d.computeDimensionOfText)(e,1,f),g=a?a.width:f.length*b,h=a?a.height:b;c.width=Math.max(c.width,g),c.height=Math.max(c.height,h)}return e.remove(),c}},r=class{constructor(a,b,c,d){this.axisConfig=a,this.title=b,this.textDimensionCalculator=c,this.axisThemeConfig=d,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.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,g.__name)(this,"BaseAxis")}setRange(a){this.range=a,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=a[1]-a[0]:this.boundingRect.width=a[1]-a[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(a){this.axisPosition=a,this.setRange(this.range)}getTickDistance(){let a=this.getRange();return Math.abs(a[0]-a[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(a=>a.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(a){let b=a.height;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.width;this.outerPadding=Math.min(c.width/2,d);let e=c.height+2*this.axisConfig.labelPadding;this.labelTextHeight=c.height,e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width,this.boundingRect.height=a.height-b}calculateSpaceIfDrawnVertical(a){let b=a.width;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.height;this.outerPadding=Math.min(c.height/2,d);let e=c.width+2*this.axisConfig.labelPadding;e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width-b,this.boundingRect.height=a.height}calculateSpace(a){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(a):this.calculateSpaceIfDrawnHorizontally(a),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}getDrawableElementsForLeftAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${b},${this.boundingRect.y} L ${b},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(a=>({text:a.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(a),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let b=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${b},${this.getScaleValue(a)} L ${b-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForBottomAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b} L ${this.getScaleValue(a)},${b+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForTopAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y;a.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${b+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},s=class extends r{static{(0,g.__name)(this,"BandAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.categories=c,this.scale=j().domain(this.categories).range(this.getRange())}setRange(a){super.setRange(a)}recalculateScale(){this.scale=j().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),g.log.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(a){return this.scale(a)??this.getRange()[0]}},t=class extends r{static{(0,g.__name)(this,"LinearAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.domain=c,this.scale=(0,k.scaleLinear)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let a=[...this.domain];"left"===this.axisPosition&&a.reverse(),this.scale=(0,k.scaleLinear)().domain(a).range(this.getRange())}getScaleValue(a){return this.scale(a)}};function u(a,b,c,d){let e=new q(d);return o(a)?new s(b,c,a.categories,a.title,e):new t(b,c,[a.min,a.max],a.title,e)}(0,g.__name)(u,"getAxis");var v=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,g.__name)(this,"ChartTitle")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){let b=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),c=Math.max(b.width,a.width),d=b.height+2*this.chartConfig.titlePadding;return b.width<=c&&b.height<=d&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=c,this.boundingRect.height=d,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let a=[];return this.showChartTitle&&a.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}]}),a}};function w(a,b,c,d){return new v(new q(d),a,b,c)}(0,g.__name)(w,"getChartTitleComponent");var x=class{constructor(a,b,c,d,e){this.plotData=a,this.xAxis=b,this.yAxis=c,this.orientation=d,this.plotIndex=e}static{(0,g.__name)(this,"LinePlot")}getDrawableElement(){let a,b=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);return(a="horizontal"===this.orientation?(0,l.line)().y(a=>a[0]).x(a=>a[1])(b):(0,l.line)().x(a=>a[0]).y(a=>a[1])(b))?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:a,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},y=class{constructor(a,b,c,d,e,f){this.barData=a,this.boundingRect=b,this.xAxis=c,this.yAxis=d,this.orientation=e,this.plotIndex=f}static{(0,g.__name)(this,"BarPlot")}getDrawableElement(){let a=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),b=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),c=b/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:this.boundingRect.x,y:a[0]-c,height:b,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:a[0]-c,y:a[1],width:b,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},z=class{constructor(a,b,c){this.chartConfig=a,this.chartData=b,this.chartThemeConfig=c,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,g.__name)(this,"BasePlot")}setAxes(a,b){this.xAxis=a,this.yAxis=b}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){return this.boundingRect.width=a.width,this.boundingRect.height=a.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 a=[];for(let[b,c]of this.chartData.plots.entries())switch(c.type){case"line":{let d=new x(c,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}break;case"bar":{let d=new y(c,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}}return a}};function A(a,b,c){return new z(a,b,c)}(0,g.__name)(A,"getPlotComponent");var B=class{constructor(a,b,c,d){this.chartConfig=a,this.chartData=b,this.componentStore={title:w(a,b,c,d),plot:A(a,b,c),xAxis:u(b.xAxis,a.xAxis,{titleColor:c.xAxisTitleColor,labelColor:c.xAxisLabelColor,tickColor:c.xAxisTickColor,axisLineColor:c.xAxisLineColor},d),yAxis:u(b.yAxis,a.yAxis,{titleColor:c.yAxisTitleColor,labelColor:c.yAxisLabelColor,tickColor:c.yAxisTickColor,axisLineColor:c.yAxisLineColor},d)}}static{(0,g.__name)(this,"Orchestrator")}calculateVerticalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:e,height:f});a-=g.width,b-=g.height,d=(g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:a,height:b}),b-=g.height,this.componentStore.yAxis.setAxisPosition("left"),c=(g=this.componentStore.yAxis.calculateSpace({width:a,height:b})).width,(a-=g.width)>0&&(e+=a,a=0),b>0&&(f+=b,b=0),this.componentStore.plot.calculateSpace({width:e,height:f}),this.componentStore.plot.setBoundingBoxXY({x:c,y:d}),this.componentStore.xAxis.setRange([c,c+e]),this.componentStore.xAxis.setBoundingBoxXY({x:c,y:d+f}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:d}),this.chartData.plots.some(a=>n(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=0,f=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:f,height:g});a-=h.width,b-=h.height,c=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:a,height:b}),a-=h.width,d=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:a,height:b}),b-=h.height,e=c+h.height,a>0&&(f+=a,a=0),b>0&&(g+=b,b=0),this.componentStore.plot.calculateSpace({width:f,height:g}),this.componentStore.plot.setBoundingBoxXY({x:d,y:e}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:d,y:c}),this.componentStore.xAxis.setRange([e,e+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:e}),this.chartData.plots.some(a=>n(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let a=[];for(let b of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))a.push(...b.getDrawableElements());return a}},C=class{static{(0,g.__name)(this,"XYChartBuilder")}static build(a,b,c,d){return new B(a,b,c,d).getDrawableElement()}},D=0,E=L(),F=K(),G=M(),H=F.plotColorPalette.split(",").map(a=>a.trim()),I=!1,J=!1;function K(){let a=(0,f.getThemeVariables)(),b=(0,f.getConfig)();return(0,e.cleanAndMerge)(a.xyChart,b.themeVariables.xyChart)}function L(){let a=(0,f.getConfig)();return(0,e.cleanAndMerge)(f.defaultConfig_default.xyChart,a.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function N(a){let b=(0,f.getConfig)();return(0,f.sanitizeText)(a.trim(),b)}function O(a){b=a}function P(a){"horizontal"===a?E.chartOrientation="horizontal":E.chartOrientation="vertical"}function Q(a){G.xAxis.title=N(a.text)}function R(a,b){G.xAxis={type:"linear",title:G.xAxis.title,min:a,max:b},I=!0}function S(a){G.xAxis={type:"band",title:G.xAxis.title,categories:a.map(a=>N(a.text))},I=!0}function T(a){G.yAxis.title=N(a.text)}function U(a,b){G.yAxis={type:"linear",title:G.yAxis.title,min:a,max:b},J=!0}function V(a){let b=Math.min(...a),c=Math.max(...a),d=p(G.yAxis)?G.yAxis.min:1/0,e=p(G.yAxis)?G.yAxis.max:-1/0;G.yAxis={type:"linear",title:G.yAxis.title,min:Math.min(d,b),max:Math.max(e,c)}}function W(a){let b=[];if(0===a.length)return b;if(I||R(Math.min(p(G.xAxis)?G.xAxis.min:1/0,1),Math.max(p(G.xAxis)?G.xAxis.max:-1/0,a.length)),J||V(a),o(G.xAxis)&&(b=G.xAxis.categories.map((b,c)=>[b,a[c]])),p(G.xAxis)){let c=G.xAxis.min,d=G.xAxis.max,e=(d-c)/(a.length-1),f=[];for(let a=c;a<=d;a+=e)f.push(`${a}`);b=f.map((b,c)=>[b,a[c]])}return b}function X(a){return H[0===a?0:a%H.length]}function Y(a,b){let c=W(b);G.plots.push({type:"line",strokeFill:X(D),strokeWidth:2,data:c}),D++}function Z(a,b){let c=W(b);G.plots.push({type:"bar",fill:X(D),data:c}),D++}function $(){if(0===G.plots.length)throw Error("No Plot to render, please provide a plot with some data");return G.title=(0,f.getDiagramTitle)(),C.build(E,G,F,b)}function _(){return F}function aa(){return E}function ab(){return G}(0,g.__name)(K,"getChartDefaultThemeConfig"),(0,g.__name)(L,"getChartDefaultConfig"),(0,g.__name)(M,"getChartDefaultData"),(0,g.__name)(N,"textSanitizer"),(0,g.__name)(O,"setTmpSVGG"),(0,g.__name)(P,"setOrientation"),(0,g.__name)(Q,"setXAxisTitle"),(0,g.__name)(R,"setXAxisRangeData"),(0,g.__name)(S,"setXAxisBand"),(0,g.__name)(T,"setYAxisTitle"),(0,g.__name)(U,"setYAxisRangeData"),(0,g.__name)(V,"setYAxisRangeFromPlotData"),(0,g.__name)(W,"transformDataWithoutCategory"),(0,g.__name)(X,"getPlotColorFromPalette"),(0,g.__name)(Y,"setLineData"),(0,g.__name)(Z,"setBarData"),(0,g.__name)($,"getDrawableElem"),(0,g.__name)(_,"getChartThemeConfig"),(0,g.__name)(aa,"getChartConfig"),(0,g.__name)(ab,"getXYChartData");var ac={getDrawableElem:$,clear:(0,g.__name)(function(){(0,f.clear)(),D=0,E=L(),G=M(),H=(F=K()).plotColorPalette.split(",").map(a=>a.trim()),I=!1,J=!1},"clear"),setAccTitle:f.setAccTitle,getAccTitle:f.getAccTitle,setDiagramTitle:f.setDiagramTitle,getDiagramTitle:f.getDiagramTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription,setOrientation:P,setXAxisTitle:Q,setXAxisRangeData:R,setXAxisBand:S,setYAxisTitle:T,setYAxisRangeData:U,setLineData:Y,setBarData:Z,setTmpSVGG:O,getChartThemeConfig:_,getChartConfig:aa,getXYChartData:ab},ad=(0,g.__name)((a,b,d,e)=>{let h=e.db,i=h.getChartThemeConfig(),j=h.getChartConfig(),k=h.getXYChartData().plots[0].data.map(a=>a[1]);function l(a){return"top"===a?"text-before-edge":"middle"}function m(a){return"left"===a?"start":"right"===a?"end":"middle"}function n(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}(0,g.__name)(l,"getDominantBaseLine"),(0,g.__name)(m,"getTextAnchor"),(0,g.__name)(n,"getTextTransformation"),g.log.debug("Rendering xychart chart\n"+a);let o=(0,c.selectSvgElement)(b),p=o.append("g").attr("class","main"),q=p.append("rect").attr("width",j.width).attr("height",j.height).attr("class","background");(0,f.configureSvgSize)(o,j.height,j.width,!0),o.attr("viewBox",`0 0 ${j.width} ${j.height}`),q.attr("fill",i.backgroundColor),h.setTmpSVGG(o.append("g").attr("class","mermaid-tmp-group"));let r=h.getDrawableElem(),s={};function t(a){let b=p,c="";for(let[d]of a.entries()){let e=p;d>0&&s[c]&&(e=s[c]),c+=a[d],(b=s[c])||(b=s[c]=e.append("g").attr("class",a[d]))}return b}for(let a of((0,g.__name)(t,"getGroup"),r)){if(0===a.data.length)continue;let b=t(a.groupTexts);switch(a.type){case"rect":if(b.selectAll("rect").data(a.data).enter().append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth),j.showDataLabel){let c=j.showDataLabelOutsideBar;if("horizontal"===j.chartOrientation){let d=function(a,b){let{data:c,label:d}=a;return b*d.length*e<=c.width-f};(0,g.__name)(d,"fitsHorizontally");let e=.7,f=10,h=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),j=Math.floor(Math.min(...h.map(a=>{let{data:b}=a,c=.7*b.height;for(;!d(a,c)&&c>0;)c-=1;return c}))),l=(0,g.__name)(a=>c?a.data.x+a.data.width+f:a.data.x+a.data.width-f,"determineLabelXPosition");b.selectAll("text").data(h).enter().append("text").attr("x",l).attr("y",a=>a.data.y+a.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",i.dataLabelColor).attr("font-size",`${j}px`).text(a=>a.label)}else{let d=function(a,b,c){let{data:d,label:e}=a,f=b*e.length*.7,g=d.x+d.width/2,h=g-f/2,i=g+f/2,j=h>=d.x&&i<=d.x+d.width,k=d.y+c+b<=d.y+d.height;return j&&k};(0,g.__name)(d,"fitsInBar");let e=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),f=Math.floor(Math.min(...e.map(a=>{let{data:b,label:c}=a,e=b.width/(.7*c.length);for(;!d(a,e,10)&&e>0;)e-=1;return e}))),h=(0,g.__name)(a=>c?a.data.y-10:a.data.y+10,"determineLabelYPosition");b.selectAll("text").data(e).enter().append("text").attr("x",a=>a.data.x+a.data.width/2).attr("y",h).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",i.dataLabelColor).attr("font-size",`${f}px`).text(a=>a.label)}}break;case"text":b.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>l(a.verticalPos)).attr("text-anchor",a=>m(a.horizontalPos)).attr("transform",a=>n(a)).text(a=>a.text);break;case"path":b.selectAll("path").data(a.data).enter().append("path").attr("d",a=>a.path).attr("fill",a=>a.fill?a.fill:"none").attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth)}}},"draw");a.s(["diagram",0,{parser:m,db:ac,renderer:{draw:ad}}],46246)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=12y~_mermaid_dist_chunks_mermaid_core_xychartDiagram-2RQKCTM6_mjs_0v-eh5w._.js.map
|