@lucapimenta/copy-chief-dashboard 1.0.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/LICENSE +21 -0
- package/README.md +107 -0
- package/bin/cli.js +48 -0
- package/dashboard/.next/BUILD_ID +1 -0
- package/dashboard/.next/app-build-manifest.json +152 -0
- package/dashboard/.next/app-path-routes-manifest.json +18 -0
- package/dashboard/.next/build-manifest.json +33 -0
- package/dashboard/.next/diagnostics/build-diagnostics.json +6 -0
- package/dashboard/.next/diagnostics/framework.json +1 -0
- package/dashboard/.next/export-detail.json +5 -0
- package/dashboard/.next/export-marker.json +6 -0
- package/dashboard/.next/images-manifest.json +58 -0
- package/dashboard/.next/next-minimal-server.js.nft.json +1 -0
- package/dashboard/.next/next-server.js.nft.json +1 -0
- package/dashboard/.next/package.json +1 -0
- package/dashboard/.next/prerender-manifest.json +397 -0
- package/dashboard/.next/react-loadable-manifest.json +251 -0
- package/dashboard/.next/required-server-files.json +321 -0
- package/dashboard/.next/routes-manifest.json +150 -0
- package/dashboard/.next/server/app/_not-found/page.js +2 -0
- package/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/_not-found.html +1 -0
- package/dashboard/.next/server/app/_not-found.meta +8 -0
- package/dashboard/.next/server/app/_not-found.rsc +19 -0
- package/dashboard/.next/server/app/agents/page.js +2 -0
- package/dashboard/.next/server/app/agents/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/agents/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/agents.html +1 -0
- package/dashboard/.next/server/app/agents.meta +7 -0
- package/dashboard/.next/server/app/agents.rsc +23 -0
- package/dashboard/.next/server/app/clickup/page.js +2 -0
- package/dashboard/.next/server/app/clickup/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/clickup/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/clickup.html +1 -0
- package/dashboard/.next/server/app/clickup.meta +7 -0
- package/dashboard/.next/server/app/clickup.rsc +23 -0
- package/dashboard/.next/server/app/context/page.js +2 -0
- package/dashboard/.next/server/app/context/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/context/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/context.html +1 -0
- package/dashboard/.next/server/app/context.meta +7 -0
- package/dashboard/.next/server/app/context.rsc +23 -0
- package/dashboard/.next/server/app/github/page.js +2 -0
- package/dashboard/.next/server/app/github/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/github/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/github.html +1 -0
- package/dashboard/.next/server/app/github.meta +7 -0
- package/dashboard/.next/server/app/github.rsc +23 -0
- package/dashboard/.next/server/app/helix/page.js +2 -0
- package/dashboard/.next/server/app/helix/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/helix/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/helix.html +1 -0
- package/dashboard/.next/server/app/helix.meta +7 -0
- package/dashboard/.next/server/app/helix.rsc +23 -0
- package/dashboard/.next/server/app/index.html +1 -0
- package/dashboard/.next/server/app/index.meta +9 -0
- package/dashboard/.next/server/app/index.rsc +20 -0
- package/dashboard/.next/server/app/insights/page.js +2 -0
- package/dashboard/.next/server/app/insights/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/insights/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/insights.html +1 -0
- package/dashboard/.next/server/app/insights.meta +7 -0
- package/dashboard/.next/server/app/insights.rsc +23 -0
- package/dashboard/.next/server/app/kanban/page.js +2 -0
- package/dashboard/.next/server/app/kanban/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/kanban/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/kanban.html +1 -0
- package/dashboard/.next/server/app/kanban.meta +7 -0
- package/dashboard/.next/server/app/kanban.rsc +23 -0
- package/dashboard/.next/server/app/monitor/page.js +2 -0
- package/dashboard/.next/server/app/monitor/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/monitor/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/monitor.html +1 -0
- package/dashboard/.next/server/app/monitor.meta +7 -0
- package/dashboard/.next/server/app/monitor.rsc +23 -0
- package/dashboard/.next/server/app/page.js +2 -0
- package/dashboard/.next/server/app/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/pipeline/page.js +2 -0
- package/dashboard/.next/server/app/pipeline/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/pipeline/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/pipeline.html +1 -0
- package/dashboard/.next/server/app/pipeline.meta +7 -0
- package/dashboard/.next/server/app/pipeline.rsc +23 -0
- package/dashboard/.next/server/app/roadmap/page.js +2 -0
- package/dashboard/.next/server/app/roadmap/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/roadmap/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/roadmap.html +1 -0
- package/dashboard/.next/server/app/roadmap.meta +7 -0
- package/dashboard/.next/server/app/roadmap.rsc +23 -0
- package/dashboard/.next/server/app/settings/page.js +2 -0
- package/dashboard/.next/server/app/settings/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/settings/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/settings.html +1 -0
- package/dashboard/.next/server/app/settings.meta +7 -0
- package/dashboard/.next/server/app/settings.rsc +23 -0
- package/dashboard/.next/server/app/squad/page.js +2 -0
- package/dashboard/.next/server/app/squad/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/squad/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/squad.html +1 -0
- package/dashboard/.next/server/app/squad.meta +7 -0
- package/dashboard/.next/server/app/squad.rsc +23 -0
- package/dashboard/.next/server/app/terminals/page.js +2 -0
- package/dashboard/.next/server/app/terminals/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/terminals/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/terminals.html +1 -0
- package/dashboard/.next/server/app/terminals.meta +7 -0
- package/dashboard/.next/server/app/terminals.rsc +23 -0
- package/dashboard/.next/server/app/warroom/page.js +2 -0
- package/dashboard/.next/server/app/warroom/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/warroom/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/warroom.html +1 -0
- package/dashboard/.next/server/app/warroom.meta +7 -0
- package/dashboard/.next/server/app/warroom.rsc +23 -0
- package/dashboard/.next/server/app-paths-manifest.json +18 -0
- package/dashboard/.next/server/chunks/1172.js +80 -0
- package/dashboard/.next/server/chunks/1227.js +4 -0
- package/dashboard/.next/server/chunks/1857.js +174 -0
- package/dashboard/.next/server/chunks/1894.js +1 -0
- package/dashboard/.next/server/chunks/1931.js +1 -0
- package/dashboard/.next/server/chunks/2044.js +1 -0
- package/dashboard/.next/server/chunks/228.js +1 -0
- package/dashboard/.next/server/chunks/2327.js +1 -0
- package/dashboard/.next/server/chunks/2348.js +1 -0
- package/dashboard/.next/server/chunks/2482.js +93 -0
- package/dashboard/.next/server/chunks/2624.js +1 -0
- package/dashboard/.next/server/chunks/2694.js +1 -0
- package/dashboard/.next/server/chunks/2839.js +1 -0
- package/dashboard/.next/server/chunks/2884.js +166 -0
- package/dashboard/.next/server/chunks/2942.js +43 -0
- package/dashboard/.next/server/chunks/3133.js +1 -0
- package/dashboard/.next/server/chunks/3442.js +1 -0
- package/dashboard/.next/server/chunks/3706.js +1 -0
- package/dashboard/.next/server/chunks/401.js +24 -0
- package/dashboard/.next/server/chunks/4135.js +36 -0
- package/dashboard/.next/server/chunks/4621.js +148 -0
- package/dashboard/.next/server/chunks/5154.js +5 -0
- package/dashboard/.next/server/chunks/5589.js +131 -0
- package/dashboard/.next/server/chunks/5611.js +6 -0
- package/dashboard/.next/server/chunks/5789.js +59 -0
- package/dashboard/.next/server/chunks/5949.js +1 -0
- package/dashboard/.next/server/chunks/5971.js +136 -0
- package/dashboard/.next/server/chunks/6044.js +1 -0
- package/dashboard/.next/server/chunks/6084.js +56 -0
- package/dashboard/.next/server/chunks/6148.js +201 -0
- package/dashboard/.next/server/chunks/6171.js +215 -0
- package/dashboard/.next/server/chunks/6442.js +62 -0
- package/dashboard/.next/server/chunks/6651.js +24 -0
- package/dashboard/.next/server/chunks/6673.js +262 -0
- package/dashboard/.next/server/chunks/6725.js +30 -0
- package/dashboard/.next/server/chunks/6743.js +1 -0
- package/dashboard/.next/server/chunks/7762.js +63 -0
- package/dashboard/.next/server/chunks/7945.js +1 -0
- package/dashboard/.next/server/chunks/8135.js +55 -0
- package/dashboard/.next/server/chunks/8192.js +1 -0
- package/dashboard/.next/server/chunks/8893.js +1 -0
- package/dashboard/.next/server/chunks/9286.js +29 -0
- package/dashboard/.next/server/chunks/9408.js +1 -0
- package/dashboard/.next/server/chunks/9596.js +1 -0
- package/dashboard/.next/server/chunks/9698.js +1 -0
- package/dashboard/.next/server/functions-config-manifest.json +4 -0
- package/dashboard/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/dashboard/.next/server/middleware-build-manifest.js +1 -0
- package/dashboard/.next/server/middleware-manifest.json +6 -0
- package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/dashboard/.next/server/next-font-manifest.js +1 -0
- package/dashboard/.next/server/next-font-manifest.json +1 -0
- package/dashboard/.next/server/pages/404.html +1 -0
- package/dashboard/.next/server/pages/500.html +1 -0
- package/dashboard/.next/server/pages/_app.js +1 -0
- package/dashboard/.next/server/pages/_app.js.nft.json +1 -0
- package/dashboard/.next/server/pages/_document.js +1 -0
- package/dashboard/.next/server/pages/_document.js.nft.json +1 -0
- package/dashboard/.next/server/pages/_error.js +19 -0
- package/dashboard/.next/server/pages/_error.js.nft.json +1 -0
- package/dashboard/.next/server/pages-manifest.json +6 -0
- package/dashboard/.next/server/server-reference-manifest.js +1 -0
- package/dashboard/.next/server/server-reference-manifest.json +1 -0
- package/dashboard/.next/server/webpack-runtime.js +1 -0
- package/dashboard/.next/static/JK-V08bhbMqDgo-zfSV9W/_buildManifest.js +1 -0
- package/dashboard/.next/static/JK-V08bhbMqDgo-zfSV9W/_ssgManifest.js +1 -0
- package/dashboard/.next/static/chunks/0dbeb660.c36e335de0d55418.js +53 -0
- package/dashboard/.next/static/chunks/1255-f98cc73ffd52f5bb.js +1 -0
- package/dashboard/.next/static/chunks/1345.7503fa6b29b871de.js +1 -0
- package/dashboard/.next/static/chunks/1380.77135630c8daf916.js +1 -0
- package/dashboard/.next/static/chunks/1490.c65d1aaee35b511a.js +1 -0
- package/dashboard/.next/static/chunks/1535.e648a03dbec3ff55.js +1 -0
- package/dashboard/.next/static/chunks/1750.43360397ece68aee.js +1 -0
- package/dashboard/.next/static/chunks/2320.015c7644b9ef5b70.js +93 -0
- package/dashboard/.next/static/chunks/2406.fb5bb75fd84ca1c5.js +1 -0
- package/dashboard/.next/static/chunks/2721.d8ec4517aa6c041e.js +63 -0
- package/dashboard/.next/static/chunks/2cdb6380.d3e32ab6aac21a0f.js +136 -0
- package/dashboard/.next/static/chunks/4093.2f7c452f6f30092f.js +1 -0
- package/dashboard/.next/static/chunks/4101.d9d1dfad9a7aa6e4.js +131 -0
- package/dashboard/.next/static/chunks/4153.5087e1e97addcb59.js +215 -0
- package/dashboard/.next/static/chunks/4243.d4ba4b8b4c2b5488.js +1 -0
- package/dashboard/.next/static/chunks/4290.da9364c5fcc0ecd1.js +80 -0
- package/dashboard/.next/static/chunks/4389.7312708ff9bb8d60.js +55 -0
- package/dashboard/.next/static/chunks/4459.bd1bcf0e75dafac8.js +1 -0
- package/dashboard/.next/static/chunks/461.02ddfe7abf885789.js +29 -0
- package/dashboard/.next/static/chunks/4776.f567801874e66499.js +1 -0
- package/dashboard/.next/static/chunks/4909-60c88923efbb24ad.js +1 -0
- package/dashboard/.next/static/chunks/4bd1b696-100b9d70ed4e49c1.js +1 -0
- package/dashboard/.next/static/chunks/526.47382bf23733427d.js +24 -0
- package/dashboard/.next/static/chunks/5281.51c549f558da3099.js +43 -0
- package/dashboard/.next/static/chunks/535.eb3a1482a7521647.js +1 -0
- package/dashboard/.next/static/chunks/5812.4f235560e1619a56.js +5 -0
- package/dashboard/.next/static/chunks/5836.34303e331382086a.js +1 -0
- package/dashboard/.next/static/chunks/5893.5744824d699de21b.js +1 -0
- package/dashboard/.next/static/chunks/5951.571c036629d38d80.js +1 -0
- package/dashboard/.next/static/chunks/6354.4bb95f70fe5dfbad.js +56 -0
- package/dashboard/.next/static/chunks/6706.f75cf4acecc1d556.js +166 -0
- package/dashboard/.next/static/chunks/6872.4915c5decbc84203.js +1 -0
- package/dashboard/.next/static/chunks/6892-033ce320fd438ed5.js +1 -0
- package/dashboard/.next/static/chunks/7083.da666db6cd05b140.js +174 -0
- package/dashboard/.next/static/chunks/7261.0e4f764520f61be4.js +262 -0
- package/dashboard/.next/static/chunks/7265.9e653a9dc3150886.js +59 -0
- package/dashboard/.next/static/chunks/7485.39ec2b59b81840e9.js +149 -0
- package/dashboard/.next/static/chunks/7557.07bfbf2344395f28.js +1 -0
- package/dashboard/.next/static/chunks/7815-3a3fed50c1f9f4a2.js +1 -0
- package/dashboard/.next/static/chunks/8175.9c76cdfbf4b95839.js +1 -0
- package/dashboard/.next/static/chunks/8433.7279330542021415.js +4 -0
- package/dashboard/.next/static/chunks/8456.8982722099740b7c.js +36 -0
- package/dashboard/.next/static/chunks/8458.4e9954c69b81ff6b.js +1 -0
- package/dashboard/.next/static/chunks/8629-d6d0d6655e6a1604.js +1 -0
- package/dashboard/.next/static/chunks/9014.9410ef55ed975a5b.js +1 -0
- package/dashboard/.next/static/chunks/90542734.c2386877103b1d80.js +1 -0
- package/dashboard/.next/static/chunks/9426.e5022dfcdc340cc9.js +1 -0
- package/dashboard/.next/static/chunks/9764.622ba6fdc3021279.js +24 -0
- package/dashboard/.next/static/chunks/9923.0a91d7c5812d587c.js +62 -0
- package/dashboard/.next/static/chunks/9937.22462c1efb33230c.js +148 -0
- package/dashboard/.next/static/chunks/app/_not-found/page-23c12faf3f32d11f.js +1 -0
- package/dashboard/.next/static/chunks/app/agents/page-897aad6c092db78f.js +1 -0
- package/dashboard/.next/static/chunks/app/clickup/page-4c7f1f73cee0cc1f.js +1 -0
- package/dashboard/.next/static/chunks/app/context/page-2fbe40350b7fbd6f.js +1 -0
- package/dashboard/.next/static/chunks/app/github/page-9d87a13179c596e7.js +1 -0
- package/dashboard/.next/static/chunks/app/helix/page-e152ee5b03cb16dd.js +1 -0
- package/dashboard/.next/static/chunks/app/insights/page-ba6765c3ba1baae9.js +1 -0
- package/dashboard/.next/static/chunks/app/kanban/page-63b90dbe0d4e8d7b.js +1 -0
- package/dashboard/.next/static/chunks/app/layout-bf2c2731f6484537.js +1 -0
- package/dashboard/.next/static/chunks/app/monitor/page-013728f1268859c9.js +1 -0
- package/dashboard/.next/static/chunks/app/page-ff65a92ee2f37737.js +1 -0
- package/dashboard/.next/static/chunks/app/pipeline/page-ff884b97e72ef0dc.js +1 -0
- package/dashboard/.next/static/chunks/app/roadmap/page-317896f93a48bd4d.js +1 -0
- package/dashboard/.next/static/chunks/app/settings/page-8d91e7f22a91e6c4.js +1 -0
- package/dashboard/.next/static/chunks/app/squad/page-3a4655e3c033a342.js +1 -0
- package/dashboard/.next/static/chunks/app/terminals/page-37d6ccad2c306dbc.js +1 -0
- package/dashboard/.next/static/chunks/app/warroom/page-40632273c9071c8e.js +1 -0
- package/dashboard/.next/static/chunks/d3ac728e.7efe4849e689f3b2.js +1 -0
- package/dashboard/.next/static/chunks/framework-a32a2a465584c0bc.js +1 -0
- package/dashboard/.next/static/chunks/main-app-43d91e7eb374bda1.js +1 -0
- package/dashboard/.next/static/chunks/main-b158c42304074eda.js +1 -0
- package/dashboard/.next/static/chunks/pages/_app-4b3fb5e477a0267f.js +1 -0
- package/dashboard/.next/static/chunks/pages/_error-c970d8b55ace1b48.js +1 -0
- package/dashboard/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dashboard/.next/static/chunks/webpack-28cfb0cda54bd302.js +1 -0
- package/dashboard/.next/static/css/edbd0cff8e611a55.css +1 -0
- package/dashboard/.next/trace +4 -0
- package/dashboard/.next/types/app/agents/page.ts +84 -0
- package/dashboard/.next/types/app/clickup/page.ts +84 -0
- package/dashboard/.next/types/app/context/page.ts +84 -0
- package/dashboard/.next/types/app/github/page.ts +84 -0
- package/dashboard/.next/types/app/helix/page.ts +84 -0
- package/dashboard/.next/types/app/insights/page.ts +84 -0
- package/dashboard/.next/types/app/kanban/page.ts +84 -0
- package/dashboard/.next/types/app/monitor/page.ts +84 -0
- package/dashboard/.next/types/app/page.ts +84 -0
- package/dashboard/.next/types/app/pipeline/page.ts +84 -0
- package/dashboard/.next/types/app/roadmap/page.ts +84 -0
- package/dashboard/.next/types/app/settings/page.ts +84 -0
- package/dashboard/.next/types/app/squad/page.ts +84 -0
- package/dashboard/.next/types/app/terminals/page.ts +84 -0
- package/dashboard/.next/types/app/warroom/page.ts +84 -0
- package/dashboard/.next/types/cache-life.d.ts +141 -0
- package/dashboard/.next/types/package.json +1 -0
- package/dashboard/.next/types/routes.d.ts +71 -0
- package/dashboard/.next/types/validator.ts +187 -0
- package/dashboard/next-env.d.ts +6 -0
- package/dashboard/next.config.ts +9 -0
- package/dashboard/out/404/index.html +1 -0
- package/dashboard/out/404.html +1 -0
- package/dashboard/out/_next/static/JK-V08bhbMqDgo-zfSV9W/_buildManifest.js +1 -0
- package/dashboard/out/_next/static/JK-V08bhbMqDgo-zfSV9W/_ssgManifest.js +1 -0
- package/dashboard/out/_next/static/chunks/0dbeb660.c36e335de0d55418.js +53 -0
- package/dashboard/out/_next/static/chunks/1255-f98cc73ffd52f5bb.js +1 -0
- package/dashboard/out/_next/static/chunks/1345.7503fa6b29b871de.js +1 -0
- package/dashboard/out/_next/static/chunks/1380.77135630c8daf916.js +1 -0
- package/dashboard/out/_next/static/chunks/1490.c65d1aaee35b511a.js +1 -0
- package/dashboard/out/_next/static/chunks/1535.e648a03dbec3ff55.js +1 -0
- package/dashboard/out/_next/static/chunks/1750.43360397ece68aee.js +1 -0
- package/dashboard/out/_next/static/chunks/2320.015c7644b9ef5b70.js +93 -0
- package/dashboard/out/_next/static/chunks/2406.fb5bb75fd84ca1c5.js +1 -0
- package/dashboard/out/_next/static/chunks/2721.d8ec4517aa6c041e.js +63 -0
- package/dashboard/out/_next/static/chunks/2cdb6380.d3e32ab6aac21a0f.js +136 -0
- package/dashboard/out/_next/static/chunks/4093.2f7c452f6f30092f.js +1 -0
- package/dashboard/out/_next/static/chunks/4101.d9d1dfad9a7aa6e4.js +131 -0
- package/dashboard/out/_next/static/chunks/4153.5087e1e97addcb59.js +215 -0
- package/dashboard/out/_next/static/chunks/4243.d4ba4b8b4c2b5488.js +1 -0
- package/dashboard/out/_next/static/chunks/4290.da9364c5fcc0ecd1.js +80 -0
- package/dashboard/out/_next/static/chunks/4389.7312708ff9bb8d60.js +55 -0
- package/dashboard/out/_next/static/chunks/4459.bd1bcf0e75dafac8.js +1 -0
- package/dashboard/out/_next/static/chunks/461.02ddfe7abf885789.js +29 -0
- package/dashboard/out/_next/static/chunks/4776.f567801874e66499.js +1 -0
- package/dashboard/out/_next/static/chunks/4909-60c88923efbb24ad.js +1 -0
- package/dashboard/out/_next/static/chunks/4bd1b696-100b9d70ed4e49c1.js +1 -0
- package/dashboard/out/_next/static/chunks/526.47382bf23733427d.js +24 -0
- package/dashboard/out/_next/static/chunks/5281.51c549f558da3099.js +43 -0
- package/dashboard/out/_next/static/chunks/535.eb3a1482a7521647.js +1 -0
- package/dashboard/out/_next/static/chunks/5812.4f235560e1619a56.js +5 -0
- package/dashboard/out/_next/static/chunks/5836.34303e331382086a.js +1 -0
- package/dashboard/out/_next/static/chunks/5893.5744824d699de21b.js +1 -0
- package/dashboard/out/_next/static/chunks/5951.571c036629d38d80.js +1 -0
- package/dashboard/out/_next/static/chunks/6354.4bb95f70fe5dfbad.js +56 -0
- package/dashboard/out/_next/static/chunks/6706.f75cf4acecc1d556.js +166 -0
- package/dashboard/out/_next/static/chunks/6872.4915c5decbc84203.js +1 -0
- package/dashboard/out/_next/static/chunks/6892-033ce320fd438ed5.js +1 -0
- package/dashboard/out/_next/static/chunks/7083.da666db6cd05b140.js +174 -0
- package/dashboard/out/_next/static/chunks/7261.0e4f764520f61be4.js +262 -0
- package/dashboard/out/_next/static/chunks/7265.9e653a9dc3150886.js +59 -0
- package/dashboard/out/_next/static/chunks/7485.39ec2b59b81840e9.js +149 -0
- package/dashboard/out/_next/static/chunks/7557.07bfbf2344395f28.js +1 -0
- package/dashboard/out/_next/static/chunks/7815-3a3fed50c1f9f4a2.js +1 -0
- package/dashboard/out/_next/static/chunks/8175.9c76cdfbf4b95839.js +1 -0
- package/dashboard/out/_next/static/chunks/8433.7279330542021415.js +4 -0
- package/dashboard/out/_next/static/chunks/8456.8982722099740b7c.js +36 -0
- package/dashboard/out/_next/static/chunks/8458.4e9954c69b81ff6b.js +1 -0
- package/dashboard/out/_next/static/chunks/8629-d6d0d6655e6a1604.js +1 -0
- package/dashboard/out/_next/static/chunks/9014.9410ef55ed975a5b.js +1 -0
- package/dashboard/out/_next/static/chunks/90542734.c2386877103b1d80.js +1 -0
- package/dashboard/out/_next/static/chunks/9426.e5022dfcdc340cc9.js +1 -0
- package/dashboard/out/_next/static/chunks/9764.622ba6fdc3021279.js +24 -0
- package/dashboard/out/_next/static/chunks/9923.0a91d7c5812d587c.js +62 -0
- package/dashboard/out/_next/static/chunks/9937.22462c1efb33230c.js +148 -0
- package/dashboard/out/_next/static/chunks/app/_not-found/page-23c12faf3f32d11f.js +1 -0
- package/dashboard/out/_next/static/chunks/app/agents/page-897aad6c092db78f.js +1 -0
- package/dashboard/out/_next/static/chunks/app/clickup/page-4c7f1f73cee0cc1f.js +1 -0
- package/dashboard/out/_next/static/chunks/app/context/page-2fbe40350b7fbd6f.js +1 -0
- package/dashboard/out/_next/static/chunks/app/github/page-9d87a13179c596e7.js +1 -0
- package/dashboard/out/_next/static/chunks/app/helix/page-e152ee5b03cb16dd.js +1 -0
- package/dashboard/out/_next/static/chunks/app/insights/page-ba6765c3ba1baae9.js +1 -0
- package/dashboard/out/_next/static/chunks/app/kanban/page-63b90dbe0d4e8d7b.js +1 -0
- package/dashboard/out/_next/static/chunks/app/layout-bf2c2731f6484537.js +1 -0
- package/dashboard/out/_next/static/chunks/app/monitor/page-013728f1268859c9.js +1 -0
- package/dashboard/out/_next/static/chunks/app/page-ff65a92ee2f37737.js +1 -0
- package/dashboard/out/_next/static/chunks/app/pipeline/page-ff884b97e72ef0dc.js +1 -0
- package/dashboard/out/_next/static/chunks/app/roadmap/page-317896f93a48bd4d.js +1 -0
- package/dashboard/out/_next/static/chunks/app/settings/page-8d91e7f22a91e6c4.js +1 -0
- package/dashboard/out/_next/static/chunks/app/squad/page-3a4655e3c033a342.js +1 -0
- package/dashboard/out/_next/static/chunks/app/terminals/page-37d6ccad2c306dbc.js +1 -0
- package/dashboard/out/_next/static/chunks/app/warroom/page-40632273c9071c8e.js +1 -0
- package/dashboard/out/_next/static/chunks/d3ac728e.7efe4849e689f3b2.js +1 -0
- package/dashboard/out/_next/static/chunks/framework-a32a2a465584c0bc.js +1 -0
- package/dashboard/out/_next/static/chunks/main-app-43d91e7eb374bda1.js +1 -0
- package/dashboard/out/_next/static/chunks/main-b158c42304074eda.js +1 -0
- package/dashboard/out/_next/static/chunks/pages/_app-4b3fb5e477a0267f.js +1 -0
- package/dashboard/out/_next/static/chunks/pages/_error-c970d8b55ace1b48.js +1 -0
- package/dashboard/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dashboard/out/_next/static/chunks/webpack-28cfb0cda54bd302.js +1 -0
- package/dashboard/out/_next/static/css/edbd0cff8e611a55.css +1 -0
- package/dashboard/out/agents/index.html +1 -0
- package/dashboard/out/agents/index.txt +23 -0
- package/dashboard/out/clickup/index.html +1 -0
- package/dashboard/out/clickup/index.txt +23 -0
- package/dashboard/out/context/index.html +1 -0
- package/dashboard/out/context/index.txt +23 -0
- package/dashboard/out/github/index.html +1 -0
- package/dashboard/out/github/index.txt +23 -0
- package/dashboard/out/helix/index.html +1 -0
- package/dashboard/out/helix/index.txt +23 -0
- package/dashboard/out/index.html +1 -0
- package/dashboard/out/index.txt +20 -0
- package/dashboard/out/insights/index.html +1 -0
- package/dashboard/out/insights/index.txt +23 -0
- package/dashboard/out/kanban/index.html +1 -0
- package/dashboard/out/kanban/index.txt +23 -0
- package/dashboard/out/monitor/index.html +1 -0
- package/dashboard/out/monitor/index.txt +23 -0
- package/dashboard/out/pipeline/index.html +1 -0
- package/dashboard/out/pipeline/index.txt +23 -0
- package/dashboard/out/roadmap/index.html +1 -0
- package/dashboard/out/roadmap/index.txt +23 -0
- package/dashboard/out/settings/index.html +1 -0
- package/dashboard/out/settings/index.txt +23 -0
- package/dashboard/out/squad/index.html +1 -0
- package/dashboard/out/squad/index.txt +23 -0
- package/dashboard/out/terminals/index.html +1 -0
- package/dashboard/out/terminals/index.txt +23 -0
- package/dashboard/out/warroom/index.html +1 -0
- package/dashboard/out/warroom/index.txt +23 -0
- package/dashboard/package-lock.json +3042 -0
- package/dashboard/package.json +33 -0
- package/dashboard/postcss.config.mjs +6 -0
- package/dashboard/src/app/agents/page.tsx +175 -0
- package/dashboard/src/app/clickup/page.tsx +237 -0
- package/dashboard/src/app/context/page.tsx +42 -0
- package/dashboard/src/app/github/page.tsx +27 -0
- package/dashboard/src/app/globals.css +259 -0
- package/dashboard/src/app/helix/page.tsx +101 -0
- package/dashboard/src/app/insights/page.tsx +124 -0
- package/dashboard/src/app/kanban/page.tsx +68 -0
- package/dashboard/src/app/layout.tsx +36 -0
- package/dashboard/src/app/monitor/page.tsx +96 -0
- package/dashboard/src/app/page.tsx +5 -0
- package/dashboard/src/app/pipeline/page.tsx +329 -0
- package/dashboard/src/app/roadmap/page.tsx +94 -0
- package/dashboard/src/app/settings/page.tsx +111 -0
- package/dashboard/src/app/squad/page.tsx +101 -0
- package/dashboard/src/app/terminals/page.tsx +82 -0
- package/dashboard/src/app/warroom/page.tsx +108 -0
- package/dashboard/src/components/agents/AgentCard.tsx +68 -0
- package/dashboard/src/components/agents/AgentGrid.tsx +51 -0
- package/dashboard/src/components/clickup/PendingBadge.tsx +26 -0
- package/dashboard/src/components/clickup/SyncExecutor.tsx +103 -0
- package/dashboard/src/components/context/ContextPanel.tsx +75 -0
- package/dashboard/src/components/context/McpStatus.tsx +29 -0
- package/dashboard/src/components/context/RulesTree.tsx +48 -0
- package/dashboard/src/components/github/GitHubPanel.tsx +154 -0
- package/dashboard/src/components/helix/HELIXMermaid.tsx +90 -0
- package/dashboard/src/components/helix/HELIXPipelinePanel.tsx +247 -0
- package/dashboard/src/components/helix/PhaseDetail.tsx +92 -0
- package/dashboard/src/components/insights/JourneysSection.tsx +83 -0
- package/dashboard/src/components/insights/MetricsSummary.tsx +87 -0
- package/dashboard/src/components/insights/PatternsSection.tsx +64 -0
- package/dashboard/src/components/insights/Sparkline.tsx +113 -0
- package/dashboard/src/components/insights/StatsOverview.tsx +133 -0
- package/dashboard/src/components/kanban/DnDKanbanBoard.tsx +166 -0
- package/dashboard/src/components/kanban/DroppableColumn.tsx +42 -0
- package/dashboard/src/components/kanban/KanbanColumn.tsx +46 -0
- package/dashboard/src/components/kanban/OfferCard.tsx +223 -0
- package/dashboard/src/components/kanban/SortableOfferCard.tsx +33 -0
- package/dashboard/src/components/layout/KeyboardShortcuts.tsx +8 -0
- package/dashboard/src/components/layout/Providers.tsx +41 -0
- package/dashboard/src/components/layout/Sidebar.tsx +91 -0
- package/dashboard/src/components/layout/StatusBar.tsx +54 -0
- package/dashboard/src/components/mermaidcn/mermaid.tsx +125 -0
- package/dashboard/src/components/monitor/ActivityFeed.tsx +115 -0
- package/dashboard/src/components/monitor/CurrentToolIndicator.tsx +66 -0
- package/dashboard/src/components/monitor/SessionsList.tsx +248 -0
- package/dashboard/src/components/monitor/SynapseWidget.tsx +61 -0
- package/dashboard/src/components/pipeline/PipelineStagePills.tsx +68 -0
- package/dashboard/src/components/squad/ExpertCard.tsx +81 -0
- package/dashboard/src/components/squad/ExpertDetail.tsx +120 -0
- package/dashboard/src/components/squad/SquadGrid.tsx +40 -0
- package/dashboard/src/components/terminals/TerminalGrid.tsx +54 -0
- package/dashboard/src/components/terminals/TerminalPanel.tsx +69 -0
- package/dashboard/src/components/ui/badge.tsx +32 -0
- package/dashboard/src/components/ui/error-boundary.tsx +47 -0
- package/dashboard/src/components/ui/progress-bar.tsx +45 -0
- package/dashboard/src/components/ui/score-badge.tsx +20 -0
- package/dashboard/src/components/ui/status-indicator.tsx +25 -0
- package/dashboard/src/components/ui/toast.tsx +77 -0
- package/dashboard/src/components/warroom/TaskKanbanBoard.tsx +149 -0
- package/dashboard/src/components/warroom/WarRoomActivityFeed.tsx +187 -0
- package/dashboard/src/components/warroom/WarRoomAgentStrip.tsx +68 -0
- package/dashboard/src/hooks/use-agents.ts +25 -0
- package/dashboard/src/hooks/use-context.ts +16 -0
- package/dashboard/src/hooks/use-dispatch-queue.ts +38 -0
- package/dashboard/src/hooks/use-github.ts +27 -0
- package/dashboard/src/hooks/use-helix.ts +39 -0
- package/dashboard/src/hooks/use-keyboard-shortcuts.ts +43 -0
- package/dashboard/src/hooks/use-metrics.ts +35 -0
- package/dashboard/src/hooks/use-monitor-events.ts +122 -0
- package/dashboard/src/hooks/use-offers.ts +36 -0
- package/dashboard/src/hooks/use-warroom.ts +103 -0
- package/dashboard/src/hooks/useSSE.ts +122 -0
- package/dashboard/src/lib/mermaid-themes.ts +41 -0
- package/dashboard/src/lib/nicho-colors.ts +10 -0
- package/dashboard/src/lib/persona-colors.ts +16 -0
- package/dashboard/src/lib/utils.ts +48 -0
- package/dashboard/src/stores/agent-store.ts +27 -0
- package/dashboard/src/stores/clickup-store.ts +101 -0
- package/dashboard/src/stores/dispatch-store.ts +40 -0
- package/dashboard/src/stores/helix-store.ts +43 -0
- package/dashboard/src/stores/monitor-store.ts +106 -0
- package/dashboard/src/stores/offer-store.ts +119 -0
- package/dashboard/src/stores/settings-store.ts +29 -0
- package/dashboard/src/stores/terminal-store.ts +44 -0
- package/dashboard/src/stores/ui-store.ts +21 -0
- package/dashboard/src/stores/warroom-store.ts +39 -0
- package/dashboard/tsconfig.json +41 -0
- package/dashboard/tsconfig.tsbuildinfo +1 -0
- package/package.json +32 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{80959:(t,e,a)=>{a.d(e,{DA:()=>$,IU:()=>B,U:()=>K,U7:()=>ec,U_:()=>ey,Zk:()=>c,aP:()=>eh,gh:()=>eg,lC:()=>y,on:()=>ed});var l=a(10524),r=a(61122),i=a(87617),n=a(43307),s=a(93973),h=a(20316),o=a(55508),d=a(22454),c=(0,h.K2)(async(t,e,a)=>{let l,r=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels),d=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),c=d.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle));l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=await (0,i.GZ)(c,(0,s.jZ)((0,n.Sm)(l),(0,s.D7)()),{useHtmlLabels:r,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),y=g.getBBox(),f=(e?.padding??0)/2;if(r){let t=g.children[0],e=(0,o.Ltv)(g),a=t.getElementsByTagName("img");if(a){let t=""===l.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.UI.fontSize]=(0,n.I5)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return r?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:y,halfPadding:f,label:c}},"labelHelper"),g=(0,h.K2)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.GZ)(r,(0,s.jZ)((0,n.Sm)(e),(0,s.D7)()),{useHtmlLabels:l,width:a.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ltv)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.K2)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.K2)(p,"createPathFromPoints"),(0,h.K2)(u,"generateFullSineWavePoints"),(0,h.K2)(m,"generateCirclePoints");var x=(0,h.K2)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function w(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.D7)(),r=t.label;t.label&&(0,s.Wi)(t.label)&&(r=await (0,s.dj)(t.label.replace(s.Y2.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.jZ)(i,l)),w(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.K2)(w,"applyStyle"),(0,h.K2)(b,"addHtmlLabel");var $=(0,h.K2)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.Rm.info("vertexText"+r);let t={isNode:l,label:(0,n.Sm)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.K2)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,"0 0 1",t+a,e+r,"V",e+l-r,"A",r,r,"0 0 1",t+a-r,e+l,"H",t+r,"A",r,r,"0 0 1",t,e+l-r,"V",e+r,"A",r,r,"0 0 1",t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,K,A,v,0),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.K2)(async(t,e)=>{let a,l=(0,s.D7)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),w=m.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let b=0*e.padding,M=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+b;e.width<=w.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-w.height-6,A=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.A.svg(y),r=e.rx||e.ry?l.path(k(A,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(A,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(A,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",A).attr("y",C).attr("width",M).attr("height",D);return p.attr("transform",`translate(${e.x-w.width/2}, ${v+1-3*!(0,s._3)(l.flowchart.htmlLabels)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:w}},"roundedWithTitle"),A=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,K,A,v,e.rx),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.K2)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:r}=(0,s.D7)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.A.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:A},C=new Map,K=(0,h.K2)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),B=(0,h.K2)(()=>{C=new Map},"clear");function N(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function L(t,e,a){return N(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&F(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&F(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function F(t,e){return t*e>0}function P(t,e,a){let l=t.x,r=t.y,i=[],n=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:+(i!==h)}),i[0]):t}(0,h.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.K2)(N,"intersectEllipse"),(0,h.K2)(L,"intersectCircle"),(0,h.K2)(R,"intersectLine"),(0,h.K2)(F,"sameSign"),(0,h.K2)(P,"intersectPolygon");var X={circle:L,polygon:P,rect:x};function G(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.A.svg(s),g=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.KL)(o)),y(e,u),e.intersect=function(t){return h.Rm.info("Circle intersect",e,1,t),X.circle(e,1,t)},s}function I(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function T(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...I(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...I(s/2,h/2,s/2,-h/2,g,o,!0)],x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=p(m),$=x.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return X.polygon(e,m,t)},i}function W(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function _(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=W(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return X.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.A.svg(l),o=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return X.polygon(e,s,t)},l}async function H(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(x))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return X.circle(t,a,e)},e.intersect=function(t){return h.Rm.info("Circle intersect",e,m,t),X.circle(e,m,t)},o}function j(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
|
|
2
|
+
M ${r.x},${r.y} L ${n.x},${n.y}`}function q(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.A.svg(i),c=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),p=j(n),u=o.path(p,c),m=i.insert(()=>g,":first-child");return m.insert(()=>u),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),y(e,m),e.intersect=function(t){return h.Rm.info("crossedCircle intersect",e,{radius:n,point:t}),X.circle(e,n,t)},i}function z(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function Z(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...z(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...z(h/2,o/2,g,20,0,90)],x=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...z(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...z(h/2+.1*h,-g,g,20,-180,-270),...z(h/2+.1*h,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...z(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2,y:o/2+g}],w=d.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=w.path($,b),M=p(x),S=w.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${g}, 0)`),s.attr("transform",`translate(${-h/2+g-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,x,t)},i}function O(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:i,y:o})}return n}async function Y(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...O(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...O(h/2+2*g,-g,g,20,-180,-270),...O(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...O(h/2,o/2,g,20,0,90)],x=[{x:-h/2,y:-o/2-g},{x:h/2,y:-o/2-g},...O(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...O(h/2+2*g,-g,g,20,-180,-270),...O(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...O(h/2,o/2,g,20,0,90),{x:h/2,y:o/2+g},{x:-h/2,y:o/2+g}],w=d.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=w.path($,b),M=p(x),S=w.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${-g}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,x,t)},i}function U(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function V(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...U(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...U(h/2+2*g,-g,g,20,-180,-270),...U(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...U(h/2,o/2,g,20,0,90)],x=[...U(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...U(-h/2-g/2,-g,g,20,0,90),...U(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...U(-h/2+g+g/2,o/2,g,30,-180,-270)],w=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...U(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...U(h/2+2*g,-g,g,20,-180,-270),...U(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...U(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2-g-g/2,y:o/2+g},...U(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...U(-h/2-g/2,-g,g,20,0,90),...U(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...U(-h/2+g+g/2,o/2,g,30,-180,-270)],b=d.A.svg(i),$=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(m).replace("Z",""),M=b.path(k,$),S=p(x).replace("Z",""),D=b.path(S,$),A=p(w),v=b.path(A,{...$}),C=i.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>D,":first-child"),C.attr("class","text"),u&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${g-g/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return X.polygon(e,w,t)},i}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),o=h/2,{cssStyles:g}=e,u=d.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=s-o,b=h/4,$=[{x:w,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:w,y:h},...m(-w,-h/2,o,50,270,90)],k=p($),M=u.path(k,x),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(${-s/2}, ${-h/2})`),y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}(0,h.K2)(G,"anchor"),(0,h.K2)(I,"generateArcPoints"),(0,h.K2)(T,"bowTieRect"),(0,h.K2)(W,"insertPolygonShape"),(0,h.K2)(_,"card"),(0,h.K2)(E,"choice"),(0,h.K2)(H,"circle"),(0,h.K2)(j,"createLine"),(0,h.K2)(q,"crossedCircle"),(0,h.K2)(z,"generateCirclePoints"),(0,h.K2)(Z,"curlyBraceLeft"),(0,h.K2)(O,"generateCirclePoints"),(0,h.K2)(Y,"curlyBraceRight"),(0,h.K2)(U,"generateCirclePoints"),(0,h.K2)(V,"curlyBraces"),(0,h.K2)(J,"curvedTrapezoid");var Q=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+e.padding,e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+e.padding,e.height??0),{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=tt(0,0,g,m,p,u),i=te(0,u,g,m,p,u),n=t.path(l,(0,r.Fr)(e,{})),h=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else{let t=Q(0,0,g,m,p,u);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(x)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=X.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tl(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+e.padding,o=n.height+e.padding,g=.2*o,p=-h/2,u=-o/2-g/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=x.polygon([{x:p,y:u+g},{x:-p,y:u+g},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+g}].map(t=>[t.x,t.y]),w),$=i.insert(()=>b,":first-child");return $.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",l),s.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${u+g+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,$),e.intersect=function(t){return X.rect(e,t)},i}async function tr(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g}=await c(t,e,f(e)),p=o.width/2+g+5,u=o.width/2+g,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=(0,r.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r.Fr)(e,{roughness:.2,strokeWidth:1.5}),h=t.circle(0,0,2*p,l),o=t.circle(0,0,2*u,i);(a=s.insert("g",":first-child")).attr("class",(0,n.KL)(e.cssClasses)).attr("style",(0,n.KL)(m)),a.node()?.appendChild(h),a.node()?.appendChild(o)}else{let t=(a=s.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.Rm.info("DoubleCircle intersect",e,p,t),X.circle(e,p,t)},s}function ti(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.A.svg(n),{nodeBorder:c}=a,g=(0,r.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=o.circle(0,0,14,g),u=n.insert(()=>p,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),y(e,u),e.intersect=function(t){return h.Rm.info("filledCircle intersect",e,{radius:7,point:t}),X.circle(e,7,t)},n}async function tn(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),o=n.width+(e.padding??0),g=o+n.height,u=o+n.height,m=[{x:0,y:-g},{x:u,y:-g},{x:u/2,y:0}],{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m),k=w.path($,b),M=i.insert(()=>k,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return x&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),e.width=o,e.height=g,y(e,M),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-g/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return h.Rm.info("Triangle intersect",e,m,t),X.polygon(e,m,t)},i}function ts(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.GX)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,p=-1*c/2,u=d.A.svg(s),m=(0,r.Fr)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=u.rectangle(g,p,o,c,m),w=s.insert(()=>x,":first-child");h&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),y(e,w);let b=l?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return X.rect(e,t)},s}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,n.width+(e.padding??0)*2,e?.width??0),o=Math.max(50,n.height+(e.padding??0)*2,e?.height??0),g=o/2,{cssStyles:u}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-s/2,y:-o/2},{x:s/2-g,y:-o/2},...m(-s/2+g,0,g,50,90,270),{x:s/2-g,y:o/2},{x:-s/2,y:o/2}],$=p(b),k=x.path($,w),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return h.Rm.info("Pill intersect",e,{radius:g,point:t}),X.polygon(e,b,t)},i}async function to(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+(e.padding??0),h=n.width+(e.padding??0)*2.5,{cssStyles:o}=e,g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=h/2,x=m/6,w=s/2,b=(m+=x)-w/2,$=[{x:-b,y:-w},{x:0,y:-w},{x:b,y:-w},{x:m,y:0},{x:b,y:w},{x:0,y:w},{x:-b,y:w},{x:-m,y:0}],k=p($),M=g.path(k,u),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=h,e.height=s,y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],x=p(m),w=g.path(x,u),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),b.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,b),e.intersect=function(t){return h.Rm.info("Pill intersect",e,{points:m}),X.polygon(e,m,t)},i}async function tc(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,label:f}=await c(t,e,"icon-shape default"),p="t"===e.pos,{nodeBorder:u}=a,{stylesMap:m}=(0,r.WW)(e),x=-s/2,w=-s/2,b=8*!!e.label,$=d.A.svg(o),k=(0,r.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.rectangle(x,w,s,s,k),S=Math.max(s,g.width),D=s+g.height+b,A=$.rectangle(-S/2,-D/2,S,D,{...k,fill:"transparent",stroke:"none"}),v=o.insert(()=>M,":first-child"),C=o.insert(()=>A);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?g.height/2+b/2-r/2-h:-g.height/2-b/2-r/2-h})`),t.attr("style",`color: ${m.get("stroke")??u};`)}return f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${p?-D/2:D/2-g.height})`),v.attr("transform",`translate(0,${p?g.height/2+b/2:-g.height/2-b/2})`),y(e,C),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=p?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+b},{x:a+s/2,y:l-r/2+g.height+b},{x:a+s/2,y:l+r/2},{x:a-s/2,y:l+r/2},{x:a-s/2,y:l-r/2+g.height+b},{x:a-g.width/2,y:l-r/2+g.height+b}]:[{x:a-s/2,y:l-r/2},{x:a+s/2,y:l-r/2},{x:a+s/2,y:l-r/2+s},{x:a+g.width/2,y:l-r/2+s},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+s},{x:a-s/2,y:l-r/2+s}],X.polygon(e,i,t)},o}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,label:f}=await c(t,e,"icon-shape default"),p=8*!!e.label,u="t"===e.pos,{nodeBorder:m,mainBkg:x}=a,{stylesMap:w}=(0,r.WW)(e),b=d.A.svg(o),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid"),$.stroke=w.get("fill")??x;let k=o.append("g");e.icon&&k.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let M=k.node().getBBox(),S=M.width,D=M.height,A=M.x,v=M.y,C=Math.max(S,D)*Math.SQRT2+40,K=b.circle(0,0,C,$),B=Math.max(C,g.width),N=C+g.height+p,L=b.rectangle(-B/2,-N/2,B,N,{...$,fill:"transparent",stroke:"none"}),R=o.insert(()=>K,":first-child"),F=o.insert(()=>L);return k.attr("transform",`translate(${-S/2-A},${u?g.height/2+p/2-D/2-v:-g.height/2-p/2-D/2-v})`),k.attr("style",`color: ${w.get("stroke")??m};`),f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-N/2:N/2-g.height})`),R.attr("transform",`translate(0,${u?g.height/2+p/2:-g.height/2-p/2})`),y(e,F),e.intersect=function(t){return h.Rm.info("iconSquare intersect",e,t),X.rect(e,t)},o}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,halfPadding:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,m=s+2*f,x=s+2*f,{nodeBorder:w,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),M=8*!!e.label,S=d.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=S.path(k(-x/2,-m/2,x,m,5),D),v=Math.max(x,g.width),C=m+g.height+M,K=S.rectangle(-v/2,-C/2,v,C,{...D,fill:"transparent",stroke:"none"}),B=o.insert(()=>A,":first-child").attr("class","icon-shape2"),N=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?g.height/2+M/2-r/2-h:-g.height/2-M/2-r/2-h})`),t.attr("style",`color: ${$.get("stroke")??w};`)}return p.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-C/2:C/2-g.height})`),B.attr("transform",`translate(0,${u?g.height/2+M/2:-g.height/2-M/2})`),y(e,N),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+M},{x:a+x/2,y:l-r/2+g.height+M},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+g.height+M},{x:a-g.width/2,y:l-r/2+g.height+M}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+m},{x:a+g.width/2,y:l-r/2+m},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+m},{x:a-x/2,y:l-r/2+m}],X.polygon(e,i,t)},o}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,halfPadding:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,m=s+2*f,x=s+2*f,{nodeBorder:w,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),M=8*!!e.label,S=d.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=S.path(k(-x/2,-m/2,x,m,.1),D),v=Math.max(x,g.width),C=m+g.height+M,K=S.rectangle(-v/2,-C/2,v,C,{...D,fill:"transparent",stroke:"none"}),B=o.insert(()=>A,":first-child"),N=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?g.height/2+M/2-r/2-h:-g.height/2-M/2-r/2-h})`),t.attr("style",`color: ${$.get("stroke")??w};`)}return p.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-C/2:C/2-g.height})`),B.attr("transform",`translate(0,${u?g.height/2+M/2:-g.height/2-M/2})`),y(e,N),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+M},{x:a+x/2,y:l-r/2+g.height+M},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+g.height+M},{x:a-g.width/2,y:l-r/2+g.height+M}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+m},{x:a+g.width/2,y:l-r/2+m},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+m},{x:a-x/2,y:l-r/2+m}],X.polygon(e,i,t)},o}async function tp(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:s}=(0,r.GX)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??i),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,p="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:u,bbox:m,label:x}=await c(t,e,"image-shape default"),w="t"===e.pos,b=-f/2,$=8*!!e.label,k=d.A.svg(u),M=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(b,-p/2,f,p,M),D=Math.max(f,m.width),A=p+m.height+$,v=k.rectangle(-D/2,-A/2,D,A,{...M,fill:"none",stroke:"none"}),C=u.insert(()=>S,":first-child"),K=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${w?A/2-p:-A/2})`)}return x.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${w?-p/2-m.height/2-$/2:p/2-m.height/2+$/2})`),C.attr("transform",`translate(0,${w?m.height/2+$/2:-m.height/2-$/2})`),y(e,K),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=w?[{x:a-m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2+m.height+$},{x:a+f/2,y:l-r/2+m.height+$},{x:a+f/2,y:l+r/2},{x:a-f/2,y:l+r/2},{x:a-f/2,y:l-r/2+m.height+$},{x:a-m.width/2,y:l-r/2+m.height+$}]:[{x:a-f/2,y:l-r/2},{x:a+f/2,y:l-r/2},{x:a+f/2,y:l-r/2+p},{x:a+m.width/2,y:l-r/2+p},{x:a+m.width/2/2,y:l+r/2},{x:a-m.width/2,y:l+r/2},{x:a-m.width/2,y:l-r/2+p},{x:a-f/2,y:l-r/2+p}],X.polygon(e,i,t)},u}async function tu(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),o=Math.max(s.height+(e.padding??0)*2,e?.height??0),g=[{x:0,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:-3*o/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}async function tm(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),p=Math.max(o.height+2*a.labelPaddingY,e?.height||0),u=-g/2,m=-p/2,{rx:x,ry:w}=e,{cssStyles:b}=e;if(a?.rx&&a.ry&&(x=a.rx,w=a.ry),"handDrawn"===e.look){let t=d.A.svg(h),a=(0,r.Fr)(e,{}),i=x||w?t.path(k(u,m,g,p,x||0),a):t.rectangle(u,m,g,p,a);(l=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(b))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.KL)(x)).attr("ry",(0,n.KL)(w)).attr("x",u).attr("y",m).attr("width",g).attr("height",p);return y(e,l),e.calcIntersect=function(t,e){return X.rect(t,e)},e.intersect=function(t){return X.rect(e,t)},h}async function tx(t,e){let{shapeSvg:a,bbox:l,label:r}=await c(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,i),e.intersect=function(t){return X.rect(e,t)},a}async function tw(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:0,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:-(3*o)/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}async function tb(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:-3*o/6,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}function t$(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=p(c),x=g.path(m,u),w=i.insert(()=>x,":first-child");return n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",l),w.attr("transform",`translate(-${s/2},${-o})`),y(e,w),e.intersect=function(t){return h.Rm.info("lightningBolt intersect",e,t),X.polygon(e,c,t)},i}(0,h.K2)(ta,"cylinder"),(0,h.K2)(tl,"dividedRectangle"),(0,h.K2)(tr,"doublecircle"),(0,h.K2)(ti,"filledCircle"),(0,h.K2)(tn,"flippedTriangle"),(0,h.K2)(ts,"forkJoin"),(0,h.K2)(th,"halfRoundedRectangle"),(0,h.K2)(to,"hexagon"),(0,h.K2)(td,"hourglass"),(0,h.K2)(tc,"icon"),(0,h.K2)(tg,"iconCircle"),(0,h.K2)(ty,"iconRounded"),(0,h.K2)(tf,"iconSquare"),(0,h.K2)(tp,"imageSquare"),(0,h.K2)(tu,"inv_trapezoid"),(0,h.K2)(tm,"drawRect"),(0,h.K2)(tx,"labelRect"),(0,h.K2)(tw,"lean_left"),(0,h.K2)(tb,"lean_right"),(0,h.K2)(t$,"lightningBolt");var tk=(0,h.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tM=(0,h.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tS=(0,h.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tD(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0),e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+(e.padding??0),e.height??0),x=.1*m,{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=tM(0,0,g,m,p,u,x),i=tS(0,u,g,m,p,u),n=(0,r.Fr)(e,{}),h=t.path(l,n),o=t.path(i,n);s.insert(()=>o,":first-child").attr("class","line"),(a=s.insert(()=>h,":first-child")).attr("class","basic label-container"),w&&a.attr("style",w)}else{let t=tk(0,0,g,m,p,u,x);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(w)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+u-(h.y-(h.top??0))})`),e.intersect=function(t){let a=X.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tA(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,p=o+g,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...u(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,g,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],$=x.polygon(b.map(t=>[t.x,t.y]),w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:g-5,y:u+5},{x:g-5,y:u+o+5},{x:g+h-5,y:u+o+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u+o-5},{x:g+h+5,y:u+o-5},{x:g+h+5,y:u-5},{x:g+5,y:u-5},{x:g+5,y:u},{x:g,y:u},{x:g,y:u+5}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=p(b),k=x.path($,w),M=p([{x:g,y:u+5},{x:g+h-5,y:u+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u},{x:g,y:u}]),S=x.path(M,{...w,fill:"none"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=o+g,x=-h/2,w=-m/2,{cssStyles:b}=e,$=u(x-5,w+m+5,x+h-5,w+m+5,g,.8),k=$?.[$.length-1],M=[{x:x-5,y:w+5},{x:x-5,y:w+m+5},...$,{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:k.y-10},{x:x+h+5,y:k.y-10},{x:x+h+5,y:w-5},{x:x+5,y:w-5},{x:x+5,y:w},{x,y:w},{x,y:w+5}],S=[{x,y:w+5},{x:x+h-5,y:w+5},{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:w},{x,y:w}],D=d.A.svg(i),A=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=p(M),C=D.path(v,A),K=p(S),B=D.path(K,A),N=i.insert(()=>C,":first-child");return N.insert(()=>B),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-g/2-(n.y-(n.top??0))})`),y(e,N),e.intersect=function(t){return X.polygon(e,M,t)},i}async function tK(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l,e.useHtmlLabels||(0,s.zj)().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),p=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,m=d.A.svg(n),x=(0,r.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=m.rectangle(-g/2,-p/2,g,p,x),b=n.insert(()=>w,":first-child");return b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,b),e.intersect=function(t){return X.rect(e,t)},n}(0,h.K2)(tD,"linedCylinder"),(0,h.K2)(tA,"linedWaveEdgedRect"),(0,h.K2)(tv,"multiRect"),(0,h.K2)(tC,"multiWaveEdgedRectangle"),(0,h.K2)(tK,"note");var tB=(0,h.K2)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tN(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding+(s.height+e.padding),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=tB(0,0,h),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=W(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return i&&a.attr("style",i),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=X.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),g=-h/2,u=-o/2,m=u/2,x=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:w}=e,b=d.A.svg(i),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(x),M=b.path(k,$),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",w),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),S.attr("transform",`translate(${-m/2},0)`),s.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),y(e,S),e.intersect=function(t){return X.polygon(e,x,t)},i}async function tR(t,e){let a,l,i,{labelStyles:n,nodeStyles:c}=(0,r.GX)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),p=g.insert("g").attr("class","label").attr("style",c),u=e.description,m=e.label,x=p.node().appendChild(await $(m,e.labelStyle,!0,!0)),w={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=x.children[0],e=(0,o.Ltv)(x);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}h.Rm.info("Text 2",u);let b=u||[],M=x.getBBox(),S=p.node().appendChild(await $(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),D=S.children[0],A=(0,o.Ltv)(S);w=D.getBoundingClientRect(),A.attr("width",w.width),A.attr("height",w.height);let v=(e.padding||0)/2;(0,o.Ltv)(S).attr("transform","translate( "+(w.width>M.width?0:(M.width-w.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ltv)(x).attr("transform","translate( "+(w.width<M.width?0:-(M.width-w.width)/2)+", 0)"),w=p.node().getBBox(),p.attr("transform","translate("+-w.width/2+", "+(-w.height/2-v+3)+")");let C=w.width+(e.padding||0),K=w.height+(e.padding||0),B=-w.width/2-v,N=-w.height/2-v;if("handDrawn"===e.look){let t=d.A.svg(g),a=(0,r.Fr)(e,{}),n=t.path(k(B,N,C,K,e.rx||0),a),s=t.line(-w.width/2-v,-w.height/2-v+M.height+v,w.width/2+v,-w.height/2-v+M.height+v,a);i=g.insert(()=>(h.Rm.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.Rm.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),i=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-w.width/2-v).attr("y",-w.height/2-v).attr("width",w.width+(e.padding||0)).attr("height",w.height+(e.padding||0)),i.attr("class","divider").attr("x1",-w.width/2-v).attr("x2",w.width/2+v).attr("y1",-w.height/2-v+M.height+v).attr("y2",-w.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return X.rect(e,t)},g}function tF(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function tP(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=e?.padding??0,h=e?.padding??0,o=(e?.width?e?.width:n.width)+2*s,g=(e?.height?e?.height:n.height)+2*h,u=e.radius||5,m=e.taper||5,{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});e.stroke&&(b.stroke=e.stroke),"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=[{x:-o/2+m,y:-g/2},{x:o/2-m,y:-g/2},...tF(o/2-m,-g/2,o/2,-g/2+m,u,u,!0),{x:o/2,y:-g/2+m},{x:o/2,y:g/2-m},...tF(o/2,g/2-m,o/2-m,g/2,u,u,!0),{x:o/2-m,y:g/2},{x:-o/2+m,y:g/2},...tF(-o/2+m,g/2,-o/2,g/2-m,u,u,!0),{x:-o/2,y:g/2-m},{x:-o/2,y:-g/2+m},...tF(-o/2,-g/2+m,-o/2+m,-g/2,u,u,!0)],k=p($),M=w.path(k,b),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s,label:h}=await c(t,e,f(e)),o=e?.padding??0,g=Math.max(s.width+(e.padding??0)*2,e?.width??0),p=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-s.width/2-o,m=-s.height/2-o,{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=w.polygon([{x:u,y:m},{x:u+g+8,y:m},{x:u+g+8,y:m+p},{x:u-8,y:m+p},{x:u-8,y:m},{x:u,y:m},{x:u,y:m+p}].map(t=>[t.x,t.y]),b),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container").attr("style",(0,n.KL)(x)),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),x&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),h.attr("transform",`translate(${-g/2+4+(e.padding??0)-(s.x-(s.left??0))},${-p/2+(e.padding??0)-(s.y-(s.top??0))})`),y(e,k),e.intersect=function(t){return X.rect(e,t)},i}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:g,y:u},{x:g,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u-o/2}],$=p(b),k=x.path($,w),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),M.attr("transform",`translate(0, ${o/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))}, ${-o/4+(e.padding??0)-(n.y-(n.top??0))})`),y(e,M),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tI(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:+(e?.padding||0)};return tm(t,e,a)}async function tT(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+e.padding,h=n.width+s/4+e.padding,o=s/2,{cssStyles:g}=e,u=d.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=[{x:-h/2+o,y:-s/2},{x:h/2-o,y:-s/2},...m(-h/2+o,0,o,50,90,270),{x:h/2-o,y:s/2},...m(h/2-o,0,o,50,270,450)],b=p(w),$=u.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",l),y(e,k),e.intersect=function(t){return X.polygon(e,w,t)},i}async function tW(t,e){return tm(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function t_(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o}=a,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),g=d.A.svg(c),f=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=g.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),u=h??o,m=g.circle(0,0,5,{...f,fill:u,stroke:u,strokeWidth:2,fillStyle:"solid"}),x=c.insert(()=>p,":first-child");return x.insert(()=>m),n&&x.selectAll("path").attr("style",n),i&&x.selectAll("path").attr("style",i),y(e,x),e.intersect=function(t){return X.circle(e,7,t)},c}function tE(t,e,{config:{themeVariables:a}}){let l,{lineColor:i}=a,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.A.svg(n).circle(0,0,14,(0,r.ue)(i));(l=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return y(e,l),e.intersect=function(t){return X.circle(e,7,t)},n}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s}=await c(t,e,f(e)),h=(e?.padding||0)/2,o=s.width+e.padding,g=s.height+e.padding,p=-s.width/2-h,u=-s.height/2-h,m=[{x:0,y:0},{x:o,y:0},{x:o,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.A.svg(i),a=(0,r.Fr)(e,{}),l=t.rectangle(p-8,u,o+16,g,a),s=t.line(p,u,p,u+g,a),h=t.line(p+o,u,p+o,u+g,a);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let c=i.insert(()=>l,":first-child"),{cssStyles:f}=e;c.attr("class","basic label-container").attr("style",(0,n.KL)(f)),y(e,c)}else{let t=W(i,o,g,m);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return X.polygon(e,m,t)},i}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=-s/2,g=-h/2,u=.2*h,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:o-u/2,y:g},{x:o+s+u/2,y:g},{x:o+s+u/2,y:g+h},{x:o-u/2,y:g+h}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=p(b),k=x.path($,w),M=p([{x:o+s-u/2,y:g+h},{x:o+s+u/2,y:g+h},{x:o+s+u/2,y:g+h-.2*h}]),S=x.path(M,{...w,fillStyle:"solid"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),y(e,D),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=.2*h,x=.2*o,w=o+g,{cssStyles:b}=e,$=d.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:w/2},...u(-h/2-h/2*.1,w/2,h/2+h/2*.1,w/2,g,.8),{x:h/2+h/2*.1,y:-w/2},{x:-h/2-h/2*.1,y:-w/2}],S=-h/2+h/2*.1,D=-w/2-.4*x,A=[{x:S+h-m,y:(D+o)*1.4},{x:S+h,y:D+o-x},{x:S+h,y:(D+o)*.9},...u(S+h,(D+o)*1.3,S+h-m,(D+o)*1.5,-(.03*o),.5)],v=p(M),C=$.path(v,k),K=p(A),B=$.path(K,{...k,fillStyle:"solid"}),N=i.insert(()=>B,":first-child");return N.insert(()=>C,":first-child"),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,N),e.intersect=function(t){return X.polygon(e,M,t)},i}async function tz(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+e.padding,e?.width||0),h=Math.max(n.height+e.padding,e?.height||0),o=i.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return X.rect(e,t)},i}(0,h.K2)(tN,"question"),(0,h.K2)(tL,"rect_left_inv_arrow"),(0,h.K2)(tR,"rectWithTitle"),(0,h.K2)(tF,"generateArcPoints"),(0,h.K2)(tP,"roundedRect"),(0,h.K2)(tX,"shadedProcess"),(0,h.K2)(tG,"slopedRect"),(0,h.K2)(tI,"squareRect"),(0,h.K2)(tT,"stadium"),(0,h.K2)(tW,"state"),(0,h.K2)(t_,"stateEnd"),(0,h.K2)(tE,"stateStart"),(0,h.K2)(tH,"subroutine"),(0,h.K2)(tj,"taggedRect"),(0,h.K2)(tq,"taggedWaveEdgedRectangle"),(0,h.K2)(tz,"text");var tZ=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e}
|
|
3
|
+
a${r},${i} 0,0,1 0,${-l}
|
|
4
|
+
l${a},0
|
|
5
|
+
a${r},${i} 0,0,1 0,${l}
|
|
6
|
+
M${a},${-l}
|
|
7
|
+
a${r},${i} 0,0,0 0,${l}
|
|
8
|
+
l${-a},0`,"createCylinderPathD"),tO=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e} M${t+a},${e} a${r},${i} 0,0,0 0,${-l} l${-a},0 a${r},${i} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tY=(0,h.K2)((t,e,a,l,r,i)=>`M${t+a/2},${-l/2} a${r},${i} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tU(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o,halfPadding:g}=await c(t,e,f(e)),p="neo"===e.look?2*g:g,u=h.height+p,m=u/2,x=m/(2.5+u/50),w=h.width+x+p,{cssStyles:b}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=tO(0,0,w,u,x,m),i=tY(0,0,w,u,x,m),n=t.path(l,(0,r.Fr)(e,{})),h=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=tZ(0,0,w,u,x,m);(a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(b)).attr("style",i)).attr("class","basic label-container"),b&&a.selectAll("path").attr("style",b),i&&a.selectAll("path").attr("style",i)}return a.attr("label-offset-x",x),a.attr("transform",`translate(${-w/2}, ${u/2} )`),o.attr("transform",`translate(${-(h.width/2)-x-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,a),e.intersect=function(t){let a=X.rect(e,t),l=a.y-(e.y??0);if(0!=m&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-x)){let r=x*x*(1-l*l/(m*m));0!=r&&(r=Math.sqrt(Math.abs(r))),r=x-r,t.x-(e.x??0)>0&&(r=-r),a.x+=r}return a},s}async function tV(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding,o=s.height+e.padding,g=[{x:-3*o/6,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}async function tJ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(60,n.width+(e.padding??0)*2,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),{cssStyles:o}=e,g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-s/2*.8,y:-h/2},{x:s/2*.8,y:-h/2},{x:s/2,y:-h/2*.6},{x:s/2,y:h/2},{x:-s/2,y:h/2},{x:-s/2,y:-h/2*.6}],x=p(m),w=g.path(x,u),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),y(e,b),e.intersect=function(t){return X.polygon(e,m,t)},i}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:o}=await c(t,e,f(e)),g=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),u=n.width+(e.padding??0),m=u+n.height,x=u+n.height,w=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-m}],{cssStyles:b}=e,$=d.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=p(w),S=$.path(M,k),D=i.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return b&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",b),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),e.width=u,e.height=m,y(e,D),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(g?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return h.Rm.info("Triangle intersect",e,w,t),X.polygon(e,w,t)},i}async function t0(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/8,m=o+g,{cssStyles:x}=e,w=70-h,b=w>0?w/2:0,$=d.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-b,y:m/2},...u(-h/2-b,m/2,h/2+b,m/2,g,.8),{x:h/2+b,y:-m/2},{x:-h/2-b,y:-m/2}],S=p(M),D=$.path(S,k),A=i.insert(()=>D,":first-child");return A.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return X.polygon(e,M,t)},i}async function t2(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=s/h,g=s,m=h;g>m*o?m=g/o:g=m*o,g=Math.max(g,100);let x=Math.min(.2*(m=Math.max(m,50)),m/4),w=m+2*x,{cssStyles:b}=e,$=d.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-g/2,y:w/2},...u(-g/2,w/2,g/2,w/2,x,1),{x:g/2,y:-w/2},...u(g/2,-w/2,-g/2,-w/2,x,-1)],S=p(M),D=$.path(S,k),A=i.insert(()=>D,":first-child");return A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),y(e,A),e.intersect=function(t){return X.polygon(e,M,t)},i}async function t1(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,p=-o/2,{cssStyles:u}=e,m=d.A.svg(i),x=(0,r.Fr)(e,{}),w=[{x:g-5,y:p-5},{x:g-5,y:p+o},{x:g+h,y:p+o},{x:g+h,y:p-5}],b=`M${g-5},${p-5} L${g+h},${p-5} L${g+h},${p+o} L${g-5},${p+o} L${g-5},${p-5}
|
|
9
|
+
M${g-5},${p} L${g+h},${p}
|
|
10
|
+
M${g},${p-5} L${g},${p+o}`;"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=m.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("transform","translate(2.5, 2.5)"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)+2.5-(n.x-(n.left??0))}, ${-(n.height/2)+2.5-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return X.polygon(e,w,t)},i}async function t5(t,e){if(e.alias&&(e.label=e.alias),"handDrawn"===e.look){let{themeVariables:a}=(0,s.zj)(),{background:l}=a,r={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t5(t,r)}let a=(0,s.zj)();e.useHtmlLabels=a.htmlLabels;let l=a.er?.diagramPadding??10,i=a.er?.entityPadding??6,{cssStyles:h}=e,{labelStyles:c,nodeStyles:g}=(0,r.GX)(e);if(0===e.attributes.length&&e.label){let r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l,classes:""};(0,n.Un)(e.label,a)+2*r.labelPaddingX<a.er.minEntityWidth&&(e.width=a.er.minEntityWidth);let i=await tm(t,e,r);if(!(0,s._3)(a.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}a.htmlLabels||(l*=1.25,i*=1.25);let p=f(e);p||(p="node default");let u=t.insert("g").attr("class",p).attr("id",e.domId||e.id),m=await t8(u,e.label??"",a,0,0,["name"],c);m.height+=i;let x=0,w=[],b=[],$=0,k=0,M=0,S=0,D=!0,A=!0;for(let t of e.attributes){let e=await t8(u,t.type,a,0,x,["attribute-type"],c);$=Math.max($,e.width+l);let r=await t8(u,t.name,a,0,x,["attribute-name"],c);k=Math.max(k,r.width+l);let n=await t8(u,t.keys.join(),a,0,x,["attribute-keys"],c);M=Math.max(M,n.width+l);let s=await t8(u,t.comment,a,0,x,["attribute-comment"],c);S=Math.max(S,s.width+l);let h=Math.max(e.height,r.height,n.height,s.height)+i;b.push({yOffset:x,rowHeight:h}),x+=h}let v=4;M<=l&&(D=!1,M=0,v--),S<=l&&(A=!1,S=0,v--);let C=u.node().getBBox();if(m.width+2*l-($+k+M+S)>0){let t=m.width+2*l-($+k+M+S);$+=t/v,k+=t/v,M>0&&(M+=t/v),S>0&&(S+=t/v)}let K=$+k+M+S,B=d.A.svg(u),N=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let L=0;b.length>0&&(L=b.reduce((t,e)=>t+(e?.rowHeight??0),0));let R=Math.max(C.width+2*l,e?.width||0,K),F=Math.max((L??0)+m.height,e?.height||0),P=-R/2,G=-F/2;u.selectAll("g:not(:first-child)").each((t,e,a)=>{let r=(0,o.Ltv)(a[e]),n=r.attr("transform"),s=0,h=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[1]),h=parseFloat(t[2]),r.attr("class").includes("attribute-name")?s+=$:r.attr("class").includes("attribute-keys")?s+=$+k:r.attr("class").includes("attribute-comment")&&(s+=$+k+M))}r.attr("transform",`translate(${P+l/2+s}, ${h+G+m.height+i/2})`)}),u.select(".name").attr("transform","translate("+-m.width/2+", "+(G+i/2)+")");let I=B.rectangle(P,G,R,F,N),T=u.insert(()=>I,":first-child").attr("style",h.join("")),{themeVariables:W}=(0,s.zj)(),{rowEven:_,rowOdd:E,nodeBorder:H}=W;for(let[t,e]of(w.push(0),b.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=B.rectangle(P,m.height+G+e?.yOffset,R,e?.rowHeight,{...N,fill:a?_:E,stroke:H});u.insert(()=>l,"g.label").attr("style",h.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let j=B.line(P,m.height+G,R+P,m.height+G,N);for(let t of(u.insert(()=>j).attr("class","divider"),j=B.line($+P,m.height+G,$+P,F+G,N),u.insert(()=>j).attr("class","divider"),D&&(j=B.line($+k+P,m.height+G,$+k+P,F+G,N),u.insert(()=>j).attr("class","divider")),A&&(j=B.line($+k+M+P,m.height+G,$+k+M+P,F+G,N),u.insert(()=>j).attr("class","divider")),w))j=B.line(P,m.height+G+t,R+P,m.height+G+t,N),u.insert(()=>j).attr("class","divider");if(y(e,T),g&&"handDrawn"!==e.look){let t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return X.rect(e,t)},u}async function t8(t,e,a,l=0,r=0,h=[],d=""){let c=t.insert("g").attr("class",`label ${h.join(" ")}`).attr("transform",`translate(${l}, ${r})`).attr("style",d);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));let g=c.node().appendChild(await (0,i.GZ)(c,e,{width:(0,n.Un)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let y=g.getBBox();if((0,s._3)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,o.Ltv)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}async function t3(t,e,a,l,r=a.class.padding??12){let i=3*!l,n=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,y=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t7(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t7(h,e,0,["font-weight: bolder"]);let p=h.node().getBBox();g=p.height,o=n.insert("g").attr("class","members-group text");let u=0;for(let t of e.members){let e=await t7(o,t,u,[t.parseClassifier()]);u+=e+i}(y=o.node().getBBox().height)<=0&&(y=r/2),d=n.insert("g").attr("class","methods-group text");let m=0;for(let t of e.methods){let e=await t7(d,t,m,[t.parseClassifier()]);m+=e+i}let x=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-p.width/2}, ${c})`),x=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*r})`),x=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*r:2*r)})`),x=n.node().getBBox(),{shapeSvg:n,bbox:x}}async function t7(t,e,a,l=[]){let r,d=t.insert("g").attr("class","label").attr("style",l.join("; ")),c=(0,s.zj)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(c.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,s.Wi)(y)&&(g=!0);let f=await (0,i.GZ)(d,(0,s.oB)((0,n.Sm)(y)),{width:(0,n.Un)(y,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),p=1;if(g){let t=f.children[0],e=(0,o.Ltv)(f);p=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(p+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,h.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{l.includes("font-weight: bolder")&&(0,o.Ltv)(f).selectAll("tspan").attr("font-weight",""),p=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes(">"))&&(t.textContent=y[0]+y.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),r=f.getBBox()}return d.attr("transform","translate(0,"+(-r.height/(2*p)+a)+")"),r.height}async function t4(t,e){let a=(0,s.D7)(),l=a.class.padding??12,i=e.useHtmlLabels??(0,s._3)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:n,bbox:h}=await t3(t,e,a,i,l),{labelStyles:c,nodeStyles:g}=(0,r.GX)(e);e.labelStyle=c,e.cssStyles=e.styles||"";let f=e.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,u=d.A.svg(n),m=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=h.width,w=h.height;0===e.members.length&&0===e.methods.length?w+=l:e.members.length>0&&0===e.methods.length&&(w+=2*l);let b=-x/2,$=-w/2,k=u.rectangle(b-l,$-l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0),x+2*l,w+2*l+(p?2*l:0===e.members.length&&0===e.methods.length?-l:0),m),M=n.insert(()=>k,":first-child");M.attr("class","basic label-container");let S=M.node().getBBox();n.selectAll(".text").each((t,a,r)=>{let s=(0,o.Ltv)(r[a]),h=s.attr("transform"),d=0;if(h){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(h);t&&(d=parseFloat(t[2]))}let c=d+$+l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0);i||(c-=4);let g=b;(s.attr("class").includes("label-group")||s.attr("class").includes("annotation-group"))&&(g=-s.node()?.getBBox().width/2||0,n.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(g=0)})),s.attr("transform",`translate(${g}, ${c})`)});let D=n.select(".annotation-group").node().getBBox().height-(p?l/2:0)||0,A=n.select(".label-group").node().getBBox().height-(p?l/2:0)||0,v=n.select(".members-group").node().getBBox().height-(p?l/2:0)||0;if(e.members.length>0||e.methods.length>0||p){let t=u.line(S.x,D+A+$+l,S.x+S.width,D+A+$+l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if(p||e.members.length>0||e.methods.length>0){let t=u.line(S.x,D+A+v+$+2*l+l,S.x+S.width,D+A+v+$+l+2*l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if("handDrawn"!==e.look&&n.selectAll("path").attr("style",f),M.select(":nth-child(2)").attr("style",f),n.selectAll(".divider").select("path").attr("style",f),e.labelStyle?n.selectAll("span").attr("style",e.labelStyle):n.selectAll("span").attr("style",f),!i){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(f);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}else if(c){let e=t.exec(c);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}}}return y(e,M),e.intersect=function(t){return X.rect(e,t)},n}async function t9(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n="verifyMethod"in e,s=f(e),h=t.insert("g").attr("class",s).attr("id",e.domId??e.id),c=a=n?await t6(h,`<<${e.type}>>`,0,e.labelStyle):await t6(h,"<<Element>>",0,e.labelStyle),g=await t6(h,e.name,c,e.labelStyle+"; font-weight: bold;");if(c+=g+20,n){let t=await t6(h,`${e.requirementId?`ID: ${e.requirementId}`:""}`,c,e.labelStyle);c+=t;let a=await t6(h,`${e.text?`Text: ${e.text}`:""}`,c,e.labelStyle);c+=a;let l=await t6(h,`${e.risk?`Risk: ${e.risk}`:""}`,c,e.labelStyle);c+=l,await t6(h,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,c,e.labelStyle)}else{let t=await t6(h,`${e.type?`Type: ${e.type}`:""}`,c,e.labelStyle);c+=t,await t6(h,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,c,e.labelStyle)}let p=(h.node()?.getBBox().width??200)+20,u=(h.node()?.getBBox().height??200)+20,m=-p/2,x=-u/2,w=d.A.svg(h),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=w.rectangle(m,x,p,u,b),k=h.insert(()=>$,":first-child");if(k.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((t,e,a)=>{let l=(0,o.Ltv)(a[e]),r=l.attr("transform"),i=0,n=0;if(r){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(r);t&&(i=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-u/2,h=m+10;(0===e||1===e)&&(h=i),l.attr("transform",`translate(${h}, ${s+20})`)}),c>a+g+20){let t=w.line(m,x+a+g+20,m+p,x+a+g+20,b);h.insert(()=>t).attr("style",i)}return y(e,k),e.intersect=function(t){return X.rect(e,t)},h}async function t6(t,e,a,l=""){let r;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",l),d=(0,s.D7)(),c=d.htmlLabels??!0,g=await (0,i.GZ)(h,(0,s.oB)((0,n.Sm)(e)),{width:(0,n.Un)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:l},d);if(c){let t=g.children[0],e=(0,o.Ltv)(g);r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{for(let t of g.children[0].children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),l&&t.setAttribute("style",l);r=g.getBBox(),r.height+=6}return h.attr("transform",`translate(${-r.width/2},${-r.height/2+a})`),r.height}(0,h.K2)(tU,"tiltedCylinder"),(0,h.K2)(tV,"trapezoid"),(0,h.K2)(tJ,"trapezoidalPentagon"),(0,h.K2)(tQ,"triangle"),(0,h.K2)(t0,"waveEdgedRectangle"),(0,h.K2)(t2,"waveRectangle"),(0,h.K2)(t1,"windowPane"),(0,h.K2)(t5,"erBox"),(0,h.K2)(t8,"addText"),(0,h.K2)(t3,"textHelper"),(0,h.K2)(t7,"addText"),(0,h.K2)(t4,"classBox"),(0,h.K2)(t9,"requirementBox"),(0,h.K2)(t6,"addText");var et=(0,h.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ee(t,e,{config:a}){let l,i,n,s,{labelStyles:h,nodeStyles:o}=(0,r.GX)(e);e.labelStyle=h||"";let p=e.width;e.width=(e.width??200)-10;let{shapeSvg:u,bbox:m,label:x}=await c(t,e,f(e)),w=e.padding||10,b="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&(b=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=u.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",b).attr("target","_blank"));let $={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:i,bbox:n}=await g(l,"ticket"in e&&e.ticket||"",$):{label:i,bbox:n}=await g(u,"ticket"in e&&e.ticket||"",$);let{label:M,bbox:S}=await g(u,"assigned"in e&&e.assigned||"",$);e.width=p;let D=e?.width||0,A=Math.max(n.height,S.height)/2,v=Math.max(m.height+20,e?.height||0)+A,C=-D/2,K=-v/2;x.attr("transform","translate("+(w-D/2)+", "+(-A-m.height/2)+")"),i.attr("transform","translate("+(w-D/2)+", "+(-A+m.height/2)+")"),M.attr("transform","translate("+(w+D/2-S.width-20)+", "+(-A+m.height/2)+")");let{rx:B,ry:N}=e,{cssStyles:L}=e;if("handDrawn"===e.look){let t=d.A.svg(u),a=(0,r.Fr)(e,{}),l=B||N?t.path(k(C,K,D,v,B||0),a):t.rectangle(C,K,D,v,a);(s=u.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",L||null)}else{(s=u.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",B??5).attr("ry",N??5).attr("x",C).attr("y",K).attr("width",D).attr("height",v);let t="priority"in e&&e.priority;if(t){let e=u.append("line"),a=C+2,l=K+Math.floor((B??0)/2),r=K+v-Math.floor((B??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",r).attr("stroke-width","4").attr("stroke",et(t))}}return y(e,s),e.height=v,e.intersect=function(t){return X.rect(e,t)},u}async function ea(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+10*g,m=o.height+8*g,x=.15*u,{cssStyles:w}=e,b=o.width+20,$=o.height+20,k=Math.max(u,b),M=Math.max(m,$);p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let S=`M0 0
|
|
11
|
+
a${x},${x} 1 0,0 ${.25*k},${-1*M*.1}
|
|
12
|
+
a${x},${x} 1 0,0 ${.25*k},0
|
|
13
|
+
a${x},${x} 1 0,0 ${.25*k},0
|
|
14
|
+
a${x},${x} 1 0,0 ${.25*k},${.1*M}
|
|
15
|
+
|
|
16
|
+
a${x},${x} 1 0,0 ${.15*k},${.33*M}
|
|
17
|
+
a${.8*x},${.8*x} 1 0,0 0,${.34*M}
|
|
18
|
+
a${x},${x} 1 0,0 ${-1*k*.15},${.33*M}
|
|
19
|
+
|
|
20
|
+
a${x},${x} 1 0,0 ${-1*k*.25},${.15*M}
|
|
21
|
+
a${x},${x} 1 0,0 ${-1*k*.25},0
|
|
22
|
+
a${x},${x} 1 0,0 ${-1*k*.25},0
|
|
23
|
+
a${x},${x} 1 0,0 ${-1*k*.25},${-1*M*.15}
|
|
24
|
+
|
|
25
|
+
a${x},${x} 1 0,0 ${-1*k*.1},${-1*M*.33}
|
|
26
|
+
a${.8*x},${.8*x} 1 0,0 0,${-1*M*.34}
|
|
27
|
+
a${x},${x} 1 0,0 ${.1*k},${-1*M*.33}
|
|
28
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=d.A.svg(s),l=(0,r.Fr)(e,{}),i=t.path(S,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(w))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",S);return a.attr("transform",`translate(${-k/2}, ${-M/2})`),y(e,a),e.calcIntersect=function(t,e){return X.rect(t,e)},e.intersect=function(t){return h.Rm.info("Bang intersect",e,t),X.rect(e,t)},s}async function el(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+2*g,m=o.height+2*g,x=.15*u,w=.25*u,b=.35*u,$=.2*u,{cssStyles:k}=e,M=`M0 0
|
|
29
|
+
a${x},${x} 0 0,1 ${.25*u},${-1*u*.1}
|
|
30
|
+
a${b},${b} 1 0,1 ${.4*u},${-1*u*.1}
|
|
31
|
+
a${w},${w} 1 0,1 ${.35*u},${.2*u}
|
|
32
|
+
|
|
33
|
+
a${x},${x} 1 0,1 ${.15*u},${.35*m}
|
|
34
|
+
a${$},${$} 1 0,1 ${-1*u*.15},${.65*m}
|
|
35
|
+
|
|
36
|
+
a${w},${x} 1 0,1 ${-1*u*.25},${.15*u}
|
|
37
|
+
a${b},${b} 1 0,1 ${-1*u*.5},0
|
|
38
|
+
a${x},${x} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
39
|
+
|
|
40
|
+
a${x},${x} 1 0,1 ${-1*u*.1},${-1*m*.35}
|
|
41
|
+
a${$},${$} 1 0,1 ${.1*u},${-1*m*.65}
|
|
42
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=d.A.svg(s),l=(0,r.Fr)(e,{}),i=t.path(M,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(k))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",M);return p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.attr("transform",`translate(${-u/2}, ${-m/2})`),y(e,a),e.calcIntersect=function(t,e){return X.rect(t,e)},e.intersect=function(t){return h.Rm.info("Cloud intersect",e,t),X.rect(e,t)},s}async function er(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,halfPadding:s,label:h}=await c(t,e,f(e)),o=n.width+8*s,d=n.height+2*s,g=`
|
|
43
|
+
M${-o/2} ${d/2-5}
|
|
44
|
+
v${-d+10}
|
|
45
|
+
q0,-5 5,-5
|
|
46
|
+
h${o-10}
|
|
47
|
+
q5,0 5,5
|
|
48
|
+
v${d-10}
|
|
49
|
+
q0,5 -5,5
|
|
50
|
+
h${-o+10}
|
|
51
|
+
q-5,0 -5,-5
|
|
52
|
+
Z
|
|
53
|
+
`,p=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",g);return i.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),i.append(()=>h.node()),y(e,p),e.calcIntersect=function(t,e){return X.rect(t,e)},e.intersect=function(t){return X.rect(e,t)},i}async function ei(t,e){let a={padding:e.padding??0};return H(t,e,a)}(0,h.K2)(ee,"kanbanItem"),(0,h.K2)(ea,"bang"),(0,h.K2)(el,"cloud"),(0,h.K2)(er,"defaultMindmapNode"),(0,h.K2)(ei,"mindmapCircle");var en=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tI},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tP},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tT},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tH},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ta},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:H},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ea},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:el},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tN},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:to},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tw},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tV},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tr},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tz},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:_},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tX},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tE},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:t_},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ts},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:td},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Z},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Y},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:V},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:t$},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:th},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tU},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tD},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:J},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tl},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tQ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ti},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tJ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tn},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tG},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tv},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:T},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:q},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tq},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tj},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t2},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tA}],es=(0,h.K2)(()=>Object.fromEntries([...Object.entries({state:tW,choice:E,note:tK,rectWithTitle:tR,labelRect:tx,iconSquare:tf,iconCircle:tg,icon:tc,iconRounded:ty,imageSquare:tp,anchor:G,kanbanItem:ee,mindmapCircle:ei,defaultMindmapNode:er,classBox:t4,erBox:t5,requirementBox:t9}),...en.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eh(t){return t in es}(0,h.K2)(eh,"isValidShape");var eo=new Map;async function ed(t,e,a){let l,r;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?es[e.shape]:void 0;if(!i)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),r=await i(l,e,a)}else l=r=await i(t,e,a);return e.tooltip&&r.attr("title",e.tooltip),eo.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,h.K2)(ed,"insertNode");var ec=(0,h.K2)((t,e)=>{eo.set(e.id,t)},"setNodeElem"),eg=(0,h.K2)(()=>{eo.clear()},"clear"),ey=(0,h.K2)(t=>{let e=eo.get(t.id);h.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);
|