reflex-agent 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +85 -85
- package/.next/app-path-routes-manifest.json +7 -7
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/agents/[agentId]/page.js +2 -2
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/callback/route.js +2 -2
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +2 -2
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js.nft.json +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
- package/.next/server/app/audit/page.js +1 -1
- package/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page.js +4 -4
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js +2 -2
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js +2 -2
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/page.js +3 -3
- package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/new/page.js +3 -3
- package/.next/server/app/roots/new/page.js.nft.json +1 -1
- package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +5 -5
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/file/page.js +2 -2
- package/.next/server/app/share/[id]/file/page.js.nft.json +1 -1
- package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/page.js +2 -2
- package/.next/server/app/share/[id]/page.js.nft.json +1 -1
- package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
- package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/page.js +2 -2
- package/.next/server/app/utilities/page.js.nft.json +1 -1
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +7 -7
- package/.next/server/chunks/1004.js +1 -0
- package/.next/server/chunks/106.js +148 -0
- package/.next/server/chunks/1100.js +34 -0
- package/.next/server/chunks/1189.js +1 -0
- package/.next/server/chunks/1220.js +115 -0
- package/.next/server/chunks/1271.js +79 -0
- package/.next/server/chunks/1378.js +23 -0
- package/.next/server/chunks/1640.js +29 -0
- package/.next/server/chunks/1811.js +1 -0
- package/.next/server/chunks/{8312.js → 1862.js} +2 -2
- package/.next/server/chunks/1869.js +93 -0
- package/.next/server/chunks/1973.js +166 -0
- package/.next/server/chunks/2249.js +1 -0
- package/.next/server/chunks/2264.js +287 -0
- package/.next/server/chunks/2278.js +1 -0
- package/.next/server/chunks/2318.js +1 -0
- package/.next/server/chunks/2485.js +2 -2
- package/.next/server/chunks/2521.js +1 -0
- package/.next/server/chunks/2552.js +1 -0
- package/.next/server/chunks/2626.js +1 -0
- package/.next/server/chunks/2669.js +104 -0
- package/.next/server/chunks/2673.js +153 -0
- package/.next/server/chunks/2749.js +1 -0
- package/.next/server/chunks/2761.js +90 -0
- package/.next/server/chunks/285.js +3 -3
- package/.next/server/chunks/2886.js +64 -0
- package/.next/server/chunks/2995.js +1 -1
- package/.next/server/chunks/3332.js +1 -1
- package/.next/server/chunks/3378.js +1 -0
- package/.next/server/chunks/352.js +79 -0
- package/.next/server/chunks/360.js +1 -0
- package/.next/server/chunks/3746.js +93 -0
- package/.next/server/chunks/3811.js +5 -0
- package/.next/server/chunks/383.js +80 -0
- package/.next/server/chunks/3870.js +215 -0
- package/.next/server/chunks/3935.js +34 -0
- package/.next/server/chunks/4031.js +2 -2
- package/.next/server/chunks/4046.js +141 -0
- package/.next/server/chunks/416.js +77 -0
- package/.next/server/chunks/4263.js +1 -0
- package/.next/server/chunks/4282.js +1 -0
- package/.next/server/chunks/431.js +1 -0
- package/.next/server/chunks/4339.js +23 -0
- package/.next/server/chunks/4343.js +148 -0
- package/.next/server/chunks/4450.js +80 -0
- package/.next/server/chunks/4457.js +1 -0
- package/.next/server/chunks/4537.js +43 -0
- package/.next/server/chunks/4580.js +1 -0
- package/.next/server/chunks/4653.js +1 -0
- package/.next/server/chunks/4695.js +77 -0
- package/.next/server/chunks/4733.js +1 -0
- package/.next/server/chunks/4812.js +1 -1
- package/.next/server/chunks/4828.js +80 -0
- package/.next/server/chunks/4851.js +1 -0
- package/.next/server/chunks/4863.js +29 -0
- package/.next/server/chunks/4925.js +1 -1
- package/.next/server/chunks/4934.js +1 -0
- package/.next/server/chunks/5080.js +43 -0
- package/.next/server/chunks/5142.js +1 -0
- package/.next/server/chunks/539.js +1 -0
- package/.next/server/chunks/5395.js +1 -0
- package/.next/server/chunks/5407.js +9 -0
- package/.next/server/chunks/5543.js +1 -1
- package/.next/server/chunks/5558.js +1 -0
- package/.next/server/chunks/5690.js +1 -0
- package/.next/server/chunks/5723.js +1 -0
- package/.next/server/chunks/5753.js +1 -0
- package/.next/server/chunks/5783.js +226 -0
- package/.next/server/chunks/5811.js +1 -0
- package/.next/server/chunks/5822.js +24 -0
- package/.next/server/chunks/6038.js +252 -0
- package/.next/server/chunks/617.js +24 -0
- package/.next/server/chunks/6294.js +1 -0
- package/.next/server/chunks/6332.js +1 -0
- package/.next/server/chunks/6355.js +1 -0
- package/.next/server/chunks/6448.js +3 -0
- package/.next/server/chunks/6460.js +5 -0
- package/.next/server/chunks/6483.js +252 -0
- package/.next/server/chunks/6888.js +1 -0
- package/.next/server/chunks/6909.js +3 -3
- package/.next/server/chunks/6946.js +1 -0
- package/.next/server/chunks/7068.js +1 -0
- package/.next/server/chunks/7118.js +24 -0
- package/.next/server/chunks/7242.js +166 -0
- package/.next/server/chunks/7315.js +1 -0
- package/.next/server/chunks/7356.js +141 -0
- package/.next/server/chunks/7520.js +226 -0
- package/.next/server/chunks/7759.js +1 -0
- package/.next/server/chunks/7800.js +1 -0
- package/.next/server/chunks/7934.js +1 -0
- package/.next/server/chunks/7948.js +1 -0
- package/.next/server/chunks/795.js +115 -0
- package/.next/server/chunks/8015.js +287 -0
- package/.next/server/chunks/8019.js +80 -0
- package/.next/server/chunks/8150.js +1 -0
- package/.next/server/chunks/824.js +1 -0
- package/.next/server/chunks/8326.js +1 -0
- package/.next/server/chunks/8384.js +153 -0
- package/.next/server/chunks/8451.js +1 -0
- package/.next/server/chunks/8674.js +104 -0
- package/.next/server/chunks/8897.js +64 -0
- package/.next/server/chunks/8945.js +1 -0
- package/.next/server/chunks/8948.js +36 -0
- package/.next/server/chunks/8977.js +1 -0
- package/.next/server/chunks/899.js +1 -0
- package/.next/server/chunks/9024.js +1 -0
- package/.next/server/chunks/9098.js +1 -1
- package/.next/server/chunks/9269.js +1 -0
- package/.next/server/chunks/9417.js +215 -0
- package/.next/server/chunks/9419.js +36 -0
- package/.next/server/chunks/9490.js +9 -0
- package/.next/server/chunks/9496.js +90 -0
- package/.next/server/chunks/9513.js +24 -0
- package/.next/server/chunks/9745.js +1 -0
- package/.next/server/chunks/9829.js +1 -0
- package/.next/server/chunks/9965.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/2905-ca16d00d09da792e.js +1 -0
- package/.next/static/chunks/3608-556a93ce17c48331.js +1 -0
- package/.next/static/chunks/4108.40efe5d61bfc7f08.js +1 -0
- package/.next/static/chunks/4200-fc9e833f8a521cff.js +1 -0
- package/.next/static/chunks/6919-830592f52172ae19.js +1 -0
- package/.next/static/chunks/{3496-59013c5bb64c51a9.js → 7320-00a597d3985d7624.js} +1 -1
- package/.next/static/chunks/app/layout-5d864c5e6de9cf17.js +1 -0
- package/.next/static/chunks/app/onboarding/page-ccaa9f5d106a765a.js +1 -0
- package/.next/static/chunks/app/page-bd26227f60ea0122.js +1 -0
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-f7c36b058c709b0a.js +1 -0
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-0ed3a1f1311c348d.js +1 -0
- package/.next/static/chunks/app/roots/[id]/page-cd62fc140883317f.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-5b08fe35708be776.js +1 -0
- package/.next/static/chunks/app/roots/new/page-1a712172486a0f8f.js +1 -0
- package/.next/static/chunks/app/settings/page-632b39256dcf7ebb.js +1 -0
- package/.next/static/chunks/app/share/[id]/page-975a2a05e33257c9.js +1 -0
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-424ecd0f018a58f0.js +1 -0
- package/.next/static/chunks/app/utilities/page-a5befa7a77ab5796.js +1 -0
- package/.next/static/chunks/{webpack-6c7ed0da8ba98645.js → webpack-f7bc4101f4444d07.js} +1 -1
- package/.next/trace +89 -47
- package/package.json +1 -1
- package/.next/server/chunks/1373.js +0 -1
- package/.next/server/chunks/1669.js +0 -1
- package/.next/server/chunks/3004.js +0 -1
- package/.next/server/chunks/3795.js +0 -3
- package/.next/server/chunks/9883.js +0 -1
- package/.next/static/chunks/1477-a74db494f91aeafc.js +0 -1
- package/.next/static/chunks/4108.71716ca4d2bdad01.js +0 -1
- package/.next/static/chunks/6132-51c867b4544ebefc.js +0 -1
- package/.next/static/chunks/7887-6a5dd2999717777f.js +0 -1
- package/.next/static/chunks/8151-41c02ad988318d11.js +0 -1
- package/.next/static/chunks/app/layout-8e0de66d47e2d411.js +0 -1
- package/.next/static/chunks/app/onboarding/page-1ec2ec3dadef91b8.js +0 -1
- package/.next/static/chunks/app/page-e9b67e9e2ee870ac.js +0 -1
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-438c36466499e15f.js +0 -1
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-21d327eaa0619f9e.js +0 -1
- package/.next/static/chunks/app/roots/[id]/page-cb8185fedf0f5f4d.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-40899d4270be9549.js +0 -1
- package/.next/static/chunks/app/roots/new/page-2379e2c4c2a63ce2.js +0 -1
- package/.next/static/chunks/app/settings/page-e3a46803ee1a5992.js +0 -1
- package/.next/static/chunks/app/share/[id]/page-c3b61aff7aa5d75e.js +0 -1
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-e378fbede449f071.js +0 -1
- package/.next/static/chunks/app/utilities/page-60d7c81fe67376d2.js +0 -1
- /package/.next/static/{q-lgiDq7RjplLNgYcdvi2 → AoffeFQkXIEvh9BnegJev}/_buildManifest.js +0 -0
- /package/.next/static/{q-lgiDq7RjplLNgYcdvi2 → AoffeFQkXIEvh9BnegJev}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";exports.id=4046,exports.ids=[4046],exports.modules={48492:(a,b,c)=>{c.d(b,{o:()=>d});var d=(0,c(57440).K2)(()=>`
|
|
2
|
+
/* Font Awesome icon styling - consolidated */
|
|
3
|
+
.label-icon {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
height: 1em;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
vertical-align: -0.125em;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.node .label-icon path {
|
|
11
|
+
fill: currentColor;
|
|
12
|
+
stroke: revert;
|
|
13
|
+
stroke-width: revert;
|
|
14
|
+
}
|
|
15
|
+
`,"getIconStyles")},78186:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(58338),e=c(92986);let f=(a,b)=>d.A.lang.round(e.A.parse(a)[b])},84046:(a,b,c)=>{c.d(b,{diagram:()=>br});var d=c(48492),e=c(49601),f=c(53724),g=c(63660),h=c(38371),i=c(10340),j=c(57440),k=c(8163),l=c(82598),m=c(711),n=c(25736);function o(a,b){for(let c in b)Object.hasOwn(b,c)&&(a[c]=b[c])}var p=c(78186),q=c(16499),r=c(31314),s=c(82249),t=function(){var a=(0,j.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,15],c=[1,7],d=[1,13],e=[1,14],f=[1,19],g=[1,16],h=[1,17],i=[1,18],k=[8,30],l=[8,10,21,28,29,30,31,39,43,46],m=[1,23],n=[1,24],o=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],q=[1,49],r={trace:(0,j.K2)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,j.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 4:d.getLogger().debug("Rule: separator (NL) ");break;case 5:d.getLogger().debug("Rule: separator (Space) ");break;case 6:d.getLogger().debug("Rule: separator (EOF) ");break;case 7:d.getLogger().debug("Rule: hierarchy: ",f[h-1]),d.setHierarchy(f[h-1]);break;case 8:d.getLogger().debug("Stop NL ");break;case 9:d.getLogger().debug("Stop EOF ");break;case 10:d.getLogger().debug("Stop NL2 ");break;case 11:d.getLogger().debug("Stop EOF2 ");break;case 12:d.getLogger().debug("Rule: statement: ",f[h]),"number"==typeof f[h].length?this.$=f[h]:this.$=[f[h]];break;case 13:d.getLogger().debug("Rule: statement #2: ",f[h-1]),this.$=[f[h-1]].concat(f[h]);break;case 14:d.getLogger().debug("Rule: link: ",f[h],a),this.$={edgeTypeStr:f[h],label:""};break;case 15:d.getLogger().debug("Rule: LABEL link: ",f[h-3],f[h-1],f[h]),this.$={edgeTypeStr:f[h],label:f[h-1]};break;case 18:let i=parseInt(f[h]),j=d.generateId();this.$={id:j,type:"space",label:"",width:i,children:[]};break;case 23:d.getLogger().debug("Rule: (nodeStatement link node) ",f[h-2],f[h-1],f[h]," typestr: ",f[h-1].edgeTypeStr);let k=d.edgeStrToEdgeData(f[h-1].edgeTypeStr),l=d.edgeStrToEdgeStartData(f[h-1].edgeTypeStr),m=d.edgeStrToThickness(f[h-1].edgeTypeStr),n=d.edgeStrToPattern(f[h-1].edgeTypeStr);this.$=[{id:f[h-2].id,label:f[h-2].label,type:f[h-2].type,directions:f[h-2].directions},{id:f[h-2].id+"-"+f[h].id,start:f[h-2].id,end:f[h].id,label:f[h-1].label,type:"edge",thickness:m,pattern:n,directions:f[h].directions,arrowTypeEnd:k,arrowTypeStart:l},{id:f[h].id,label:f[h].label,type:d.typeStr2Type(f[h].typeStr),directions:f[h].directions}];break;case 24:d.getLogger().debug("Rule: nodeStatement (abc88 node size) ",f[h-1],f[h]),this.$={id:f[h-1].id,label:f[h-1].label,type:d.typeStr2Type(f[h-1].typeStr),directions:f[h-1].directions,widthInColumns:parseInt(f[h],10)};break;case 25:d.getLogger().debug("Rule: nodeStatement (node) ",f[h]),this.$={id:f[h].id,label:f[h].label,type:d.typeStr2Type(f[h].typeStr),directions:f[h].directions,widthInColumns:1};break;case 26:d.getLogger().debug("APA123",this?this:"na"),d.getLogger().debug("COLUMNS: ",f[h]),this.$={type:"column-setting",columns:"auto"===f[h]?-1:parseInt(f[h])};break;case 27:d.getLogger().debug("Rule: id-block statement : ",f[h-2],f[h-1]),d.generateId(),this.$={...f[h-2],type:"composite",children:f[h-1]};break;case 28:d.getLogger().debug("Rule: blockStatement : ",f[h-2],f[h-1],f[h]);let o=d.generateId();this.$={id:o,type:"composite",label:"",children:f[h-1]};break;case 29:d.getLogger().debug("Rule: node (NODE_ID separator): ",f[h]),this.$={id:f[h]};break;case 30:d.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",f[h-1],f[h]),this.$={id:f[h-1],label:f[h].label,typeStr:f[h].typeStr,directions:f[h].directions};break;case 31:d.getLogger().debug("Rule: dirList: ",f[h]),this.$=[f[h]];break;case 32:d.getLogger().debug("Rule: dirList: ",f[h-1],f[h]),this.$=[f[h-1]].concat(f[h]);break;case 33:d.getLogger().debug("Rule: nodeShapeNLabel: ",f[h-2],f[h-1],f[h]),this.$={typeStr:f[h-2]+f[h],label:f[h-1]};break;case 34:d.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",f[h-3],f[h-2]," #3:",f[h-1],f[h]),this.$={typeStr:f[h-3]+f[h],label:f[h-2],directions:f[h-1]};break;case 35:case 36:this.$={type:"classDef",id:f[h-1].trim(),css:f[h].trim()};break;case 37:this.$={type:"applyClass",id:f[h-1].trim(),styleClass:f[h].trim()};break;case 38:this.$={type:"applyStyles",id:f[h-1].trim(),stylesStr:f[h].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:b,11:3,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{8:[1,20]},a(k,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:b,21:c,28:d,29:e,31:f,39:g,43:h,46:i}),a(l,[2,16],{14:22,15:m,16:n}),a(l,[2,17]),a(l,[2,18]),a(l,[2,19]),a(l,[2,20]),a(l,[2,21]),a(l,[2,22]),a(o,[2,25],{27:[1,25]}),a(l,[2,26]),{19:26,26:12,31:f},{10:b,11:27,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},a(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},a(k,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},a(o,[2,24]),{10:b,11:37,13:4,14:22,15:m,16:n,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},a(p,[2,30]),{18:[1,43]},{18:[1,44]},a(o,[2,23]),{18:[1,45]},{30:[1,46]},a(l,[2,28]),a(l,[2,35]),a(l,[2,36]),a(l,[2,37]),a(l,[2,38]),{36:[1,47]},{33:48,34:q},{15:[1,50]},a(l,[2,27]),a(p,[2,33]),{38:[1,51]},{33:52,34:q,38:[2,31]},{31:[2,15]},a(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,j.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,j.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,j.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,j.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function s(){this.yy={}}return r.lexer={EOF:1,parseError:(0,j.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,j.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,j.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,j.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,j.K2)(function(){return this._more=!0,this},"more"),reject:(0,j.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,j.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,j.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,j.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,j.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,j.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,j.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,j.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,j.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,j.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,j.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,j.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,j.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,j.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,j.K2)(function(a,b,c,d){switch(c){case 0:return a.getLogger().debug("Found block-beta"),10;case 1:return a.getLogger().debug("Found id-block"),29;case 2:return a.getLogger().debug("Found block"),10;case 3:a.getLogger().debug(".",b.yytext);break;case 4:a.getLogger().debug("_",b.yytext);break;case 5:return 5;case 6:return b.yytext=-1,28;case 7:return b.yytext=b.yytext.replace(/columns\s+/,""),a.getLogger().debug("COLUMNS (LEX)",b.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:a.getLogger().debug("LEX: POPPING STR:",b.yytext),this.popState();break;case 13:return a.getLogger().debug("LEX: STR end:",b.yytext),"STR";case 14:return b.yytext=b.yytext.replace(/space\:/,""),a.getLogger().debug("SPACE NUM (LEX)",b.yytext),21;case 15:return b.yytext="1",a.getLogger().debug("COLUMNS (LEX)",b.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),a.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),a.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),a.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),a.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),a.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),a.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),a.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),a.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),a.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),a.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),a.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return a.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return a.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return a.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return a.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return a.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return a.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return a.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),a.getLogger().debug("LEX ARR START"),37;case 74:return a.getLogger().debug("Lex: NODE_ID",b.yytext),31;case 75:return a.getLogger().debug("Lex: EOF",b.yytext),8;case 78:return"NODE_DESCR";case 80:a.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:a.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return a.getLogger().debug("LEX: NODE_DESCR:",b.yytext),"NODE_DESCR";case 83:a.getLogger().debug("LEX POPPING"),this.popState();break;case 84:a.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (right): dir:",b.yytext),"DIR";case 86:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (left):",b.yytext),"DIR";case 87:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (x):",b.yytext),"DIR";case 88:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (y):",b.yytext),"DIR";case 89:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (up):",b.yytext),"DIR";case 90:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (down):",b.yytext),"DIR";case 91:return b.yytext="]>",a.getLogger().debug("Lex (ARROW_DIR end):",b.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 93:case 94:case 95:return a.getLogger().debug("Lex: LINK",b.yytext),15;case 96:case 97:case 98:return a.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;case 100:return a.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 102:case 103:return this.popState(),a.getLogger().debug("Lex: LINK",b.yytext),15;case 104:return a.getLogger().debug("Lex: COLON",b.yytext),b.yytext=b.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}},(0,j.K2)(s,"Parser"),s.prototype=r,r.Parser=s,new s}();t.parser=t;var u=new Map,v=[],w=new Map,x="color",y="fill",z=(0,i.D7)(),A=new Map,B="",C=(0,j.K2)(a=>i.Y2.sanitizeText(a,z),"sanitizeText"),D=(0,j.K2)(function(a,b=""){let c=A.get(a);c||(c={id:a,styles:[],textStyles:[]},A.set(a,c)),null!=b&&b.split(",").forEach(a=>{let b=a.replace(/([^;]*);/,"$1").trim();if(RegExp(x).exec(a)){let a=b.replace(y,"bgFill").replace(x,y);c.textStyles.push(a)}c.styles.push(b)})},"addStyleClass"),E=(0,j.K2)(function(a,b=""){let c=u.get(a);null!=b&&(c.styles=b.split(","))},"addStyle2Node"),F=(0,j.K2)(function(a,b){a.split(",").forEach(function(a){let c=u.get(a);if(void 0===c){let b=a.trim();c={id:b,type:"na",children:[]},u.set(b,c)}c.classes||(c.classes=[]),c.classes.push(b)})},"setCssClass"),G=(0,j.K2)((a,b)=>{let c=a.flat(),d=[],e=c.find(a=>a?.type==="column-setting"),f=e?.columns??-1;for(let a of c){if("number"==typeof f&&f>0&&"column-setting"!==a.type&&"number"==typeof a.widthInColumns&&a.widthInColumns>f&&j.Rm.warn(`Block ${a.id} width ${a.widthInColumns} exceeds configured column width ${f}`),a.label&&(a.label=C(a.label)),"classDef"===a.type){D(a.id,a.css);continue}if("applyClass"===a.type){F(a.id,a?.styleClass??"");continue}if("applyStyles"===a.type){a?.stylesStr&&E(a.id,a?.stylesStr);continue}if("column-setting"===a.type)b.columns=a.columns??-1;else if("edge"===a.type){let b=(w.get(a.id)??0)+1;w.set(a.id,b),a.id=b+"-"+a.id,v.push(a)}else{a.label||("composite"===a.type?a.label="":a.label=a.id);let b=u.get(a.id);if(void 0===b?u.set(a.id,a):("na"!==a.type&&(b.type=a.type),a.label!==a.id&&(b.label=a.label)),a.children&&G(a.children,a),"space"===a.type){let b=a.width??1;for(let c=0;c<b;c++){let b=function(a){if((0,k.s)(a))return a;let b=(0,l.b)(a);if(!function(a){switch((0,l.b)(a)){case m.R_:case m.Uw:case m.cT:case m.iq:case m.$V:case m.vC:case m.ri:case m.ML:case m.XZ:case m.i1:case m._u:case m.pj:case m.kj:case m.GX:case m.Av:case m.NA:case m.OG:case m.VP:case m.Qb:case m.q:case m.x6:case m.ZR:return!0;default:return!1}}(a))return{};if(Array.isArray(a)){let b=Array.from(a);return a.length>0&&"string"==typeof a[0]&&Object.hasOwn(a,"index")&&(b.index=a.index,b.input=a.input),b}if((0,n.i)(a))return new a.constructor(a.buffer,a.byteOffset,a.length);if("[object ArrayBuffer]"===b)return new ArrayBuffer(a.byteLength);if("[object DataView]"===b){let b=a.buffer,c=a.byteOffset,d=a.byteLength,e=new ArrayBuffer(d),f=new Uint8Array(b,c,d);return new Uint8Array(e).set(f),new DataView(e)}if("[object Boolean]"===b||"[object Number]"===b||"[object String]"===b){let c=new a.constructor(a.valueOf());return"[object String]"===b?function(a,b){let c=b.valueOf().length;for(let d in b)Object.hasOwn(b,d)&&(Number.isNaN(Number(d))||Number(d)>=c)&&(a[d]=b[d])}(c,a):o(c,a),c}if("[object Date]"===b)return new Date(Number(a));if("[object RegExp]"===b){let b=new RegExp(a.source,a.flags);return b.lastIndex=a.lastIndex,b}if("[object Symbol]"===b)return Object(Symbol.prototype.valueOf.call(a));if("[object Map]"===b){let b=new Map;return a.forEach((a,c)=>{b.set(c,a)}),b}if("[object Set]"===b){let b=new Set;return a.forEach(a=>{b.add(a)}),b}if("[object Arguments]"===b){let b={};return o(b,a),b.length=a.length,b[Symbol.iterator]=a[Symbol.iterator],b}let c={};return function(a,b){let c=Object.getPrototypeOf(b);null!==c&&"function"==typeof b.constructor&&Object.setPrototypeOf(a,c)}(c,a),o(c,a),function(a,b){let c=Object.getOwnPropertySymbols(b);for(let d=0;d<c.length;d++){let e=c[d];Object.prototype.propertyIsEnumerable.call(b,e)&&(a[e]=b[e])}}(c,a),c}(a);b.id=b.id+"-"+c,u.set(b.id,b),d.push(b)}}else void 0===b&&d.push(a)}}b.children=d},"populateBlockDatabase"),H=[],I={id:"root",type:"composite",children:[],columns:-1},J=(0,j.K2)(()=>{j.Rm.debug("Clear called"),(0,i.IU)(),u=new Map([["root",I={id:"root",type:"composite",children:[],columns:-1}]]),H=[],A=new Map,v=[],w=new Map,B=""},"clear");function K(a){switch(j.Rm.debug("typeStr2Type",a),a){case"[]":return"square";case"()":return j.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function L(a){return(j.Rm.debug("typeStr2Type",a),"=="===a)?"thick":"normal"}function M(a){switch(a.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function N(a){switch(a.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function O(a){return a.includes("==")?"thick":"normal"}function P(a){return a.includes(".-")?"dotted":"solid"}(0,j.K2)(K,"typeStr2Type"),(0,j.K2)(L,"edgeTypeStr2Type"),(0,j.K2)(M,"edgeStrToEdgeData"),(0,j.K2)(N,"edgeStrToEdgeStartData"),(0,j.K2)(O,"edgeStrToThickness"),(0,j.K2)(P,"edgeStrToPattern");var Q=0,R=(0,j.K2)(()=>(Q++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Q),"generateId"),S=(0,j.K2)(a=>{I.children=a,G(a,I),H=I.children},"setHierarchy"),T=(0,j.K2)(a=>{let b=u.get(a);return b?b.columns?b.columns:b.children?b.children.length:-1:-1},"getColumns"),U=(0,j.K2)(()=>[...u.values()],"getBlocksFlat"),V=(0,j.K2)(()=>H||[],"getBlocks"),W=(0,j.K2)(()=>v,"getEdges"),X=(0,j.K2)(a=>u.get(a),"getBlock"),Y=(0,j.K2)(a=>{u.set(a.id,a)},"setBlock"),Z=(0,j.K2)(a=>{B=a},"setDiagramId"),$=(0,j.K2)(()=>B,"getDiagramId"),_=(0,j.K2)(()=>j.Rm,"getLogger"),aa=(0,j.K2)(function(){return A},"getClasses"),ab={getConfig:(0,j.K2)(()=>(0,i.zj)().block,"getConfig"),typeStr2Type:K,edgeTypeStr2Type:L,edgeStrToEdgeData:M,edgeStrToEdgeStartData:N,edgeStrToThickness:O,edgeStrToPattern:P,getLogger:_,getBlocksFlat:U,getBlocks:V,getEdges:W,setHierarchy:S,getBlock:X,setBlock:Y,getColumns:T,getClasses:aa,clear:J,generateId:R,setDiagramId:Z,getDiagramId:$},ac=(0,j.K2)((a,b)=>{let c=p.A,d=c(a,"r"),e=c(a,"g"),f=c(a,"b");return q.A(d,e,f,b)},"fade"),ad=(0,j.K2)(a=>`.label {
|
|
16
|
+
font-family: ${a.fontFamily};
|
|
17
|
+
color: ${a.nodeTextColor||a.textColor};
|
|
18
|
+
}
|
|
19
|
+
.cluster-label text {
|
|
20
|
+
fill: ${a.titleColor};
|
|
21
|
+
}
|
|
22
|
+
.cluster-label span,p {
|
|
23
|
+
color: ${a.titleColor};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
.label text,span,p {
|
|
29
|
+
fill: ${a.nodeTextColor||a.textColor};
|
|
30
|
+
color: ${a.nodeTextColor||a.textColor};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.node rect,
|
|
34
|
+
.node circle,
|
|
35
|
+
.node ellipse,
|
|
36
|
+
.node polygon,
|
|
37
|
+
.node path {
|
|
38
|
+
fill: ${a.mainBkg};
|
|
39
|
+
stroke: ${a.nodeBorder};
|
|
40
|
+
stroke-width: 1px;
|
|
41
|
+
}
|
|
42
|
+
.flowchart-label text {
|
|
43
|
+
text-anchor: middle;
|
|
44
|
+
}
|
|
45
|
+
// .flowchart-label .text-outer-tspan {
|
|
46
|
+
// text-anchor: middle;
|
|
47
|
+
// }
|
|
48
|
+
// .flowchart-label .text-inner-tspan {
|
|
49
|
+
// text-anchor: start;
|
|
50
|
+
// }
|
|
51
|
+
|
|
52
|
+
.node .label {
|
|
53
|
+
text-align: center;
|
|
54
|
+
}
|
|
55
|
+
.node.clickable {
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.arrowheadPath {
|
|
60
|
+
fill: ${a.arrowheadColor};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.edgePath .path {
|
|
64
|
+
stroke: ${a.lineColor};
|
|
65
|
+
stroke-width: 2.0px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.flowchart-link {
|
|
69
|
+
stroke: ${a.lineColor};
|
|
70
|
+
fill: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.edgeLabel {
|
|
74
|
+
background-color: ${a.edgeLabelBackground};
|
|
75
|
+
/*
|
|
76
|
+
* This is for backward compatibility with existing code that didn't
|
|
77
|
+
* add a \`<p>\` around edge labels.
|
|
78
|
+
*
|
|
79
|
+
* TODO: We should probably remove this in a future release.
|
|
80
|
+
*/
|
|
81
|
+
p {
|
|
82
|
+
margin: 0;
|
|
83
|
+
padding: 0;
|
|
84
|
+
display: inline;
|
|
85
|
+
}
|
|
86
|
+
rect {
|
|
87
|
+
opacity: 0.5;
|
|
88
|
+
background-color: ${a.edgeLabelBackground};
|
|
89
|
+
fill: ${a.edgeLabelBackground};
|
|
90
|
+
}
|
|
91
|
+
text-align: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* For html labels only */
|
|
95
|
+
.labelBkg {
|
|
96
|
+
background-color: ${a.edgeLabelBackground};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.node .cluster {
|
|
100
|
+
// fill: ${ac(a.mainBkg,.5)};
|
|
101
|
+
fill: ${ac(a.clusterBkg,.5)};
|
|
102
|
+
stroke: ${ac(a.clusterBorder,.2)};
|
|
103
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
104
|
+
stroke-width: 1px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cluster text {
|
|
108
|
+
fill: ${a.titleColor};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.cluster span,p {
|
|
112
|
+
color: ${a.titleColor};
|
|
113
|
+
}
|
|
114
|
+
/* .cluster div {
|
|
115
|
+
color: ${a.titleColor};
|
|
116
|
+
} */
|
|
117
|
+
|
|
118
|
+
div.mermaidTooltip {
|
|
119
|
+
position: absolute;
|
|
120
|
+
text-align: center;
|
|
121
|
+
max-width: 200px;
|
|
122
|
+
padding: 2px;
|
|
123
|
+
font-family: ${a.fontFamily};
|
|
124
|
+
font-size: 12px;
|
|
125
|
+
background: ${a.tertiaryColor};
|
|
126
|
+
border: 1px solid ${a.border2};
|
|
127
|
+
border-radius: 2px;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
z-index: 100;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.flowchartTitleText {
|
|
133
|
+
text-anchor: middle;
|
|
134
|
+
font-size: 18px;
|
|
135
|
+
fill: ${a.textColor};
|
|
136
|
+
}
|
|
137
|
+
${(0,d.o)()}
|
|
138
|
+
`,"getStyles"),ae=(0,j.K2)((a,b,c,d)=>{b.forEach(b=>{am[b](a,c,d)})},"insertMarkers"),af=(0,j.K2)((a,b,c)=>{j.Rm.trace("Making markers for ",c),a.append("defs").append("marker").attr("id",c+"_"+b+"-extensionStart").attr("class","marker extension "+b).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-extensionEnd").attr("class","marker extension "+b).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),ag=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionStart").attr("class","marker composition "+b).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionEnd").attr("class","marker composition "+b).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ah=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationStart").attr("class","marker aggregation "+b).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationEnd").attr("class","marker aggregation "+b).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),ai=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyStart").attr("class","marker dependency "+b).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyEnd").attr("class","marker dependency "+b).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),aj=(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopStart").attr("class","marker lollipop "+b).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopEnd").attr("class","marker lollipop "+b).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),ak=(0,j.K2)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-pointEnd").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-pointStart").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),al=(0,j.K2)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-circleEnd").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-circleStart").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),am={extension:af,composition:ag,aggregation:ah,dependency:ai,lollipop:aj,point:ak,circle:al,cross:(0,j.K2)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-crossEnd").attr("class","marker cross "+b).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-crossStart").attr("class","marker cross "+b).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,j.K2)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},an=(0,i.D7)()?.block?.padding??8;function ao(a,b){if(0===a||!Number.isInteger(a))throw Error("Columns must be an integer !== 0.");if(b<0||!Number.isInteger(b))throw Error("Position must be a non-negative integer."+b);return a<0?{px:b,py:0}:1===a?{px:0,py:b}:{px:b%a,py:Math.floor(b/a)}}(0,j.K2)(ao,"calculateBlockPosition");var ap=(0,j.K2)(a=>{let b=0,c=0;for(let d of a.children){let{width:a,height:e,x:f,y:g}=d.size??{width:0,height:0,x:0,y:0};if(j.Rm.debug("getMaxChildSize abc95 child:",d.id,"width:",a,"height:",e,"x:",f,"y:",g,d.type),"space"===d.type)continue;let h=a/(d.widthInColumns??1);h>b&&(b=h),e>c&&(c=e)}return{width:b,height:c}},"getMaxChildSize");function aq(a,b,c=0,d=0){j.Rm.debug("setBlockSizes abc95 (start)",a.id,a?.size?.x,"block width =",a?.size,"siblingWidth",c),a?.size?.width||(a.size={width:c,height:d,x:0,y:0});let e=0,f=0;if(a.children?.length>0){for(let c of a.children)aq(c,b);let g=ap(a);for(let b of(e=g.width,f=g.height,j.Rm.debug("setBlockSizes abc95 maxWidth of",a.id,":s children is ",e,f),a.children))b.size&&(j.Rm.debug(`abc95 Setting size of children of ${a.id} id=${b.id} ${e} ${f} ${JSON.stringify(b.size)}`),b.size.width=e*(b.widthInColumns??1)+an*((b.widthInColumns??1)-1),b.size.height=f,b.size.x=0,b.size.y=0,j.Rm.debug(`abc95 updating size of ${a.id} children child:${b.id} maxWidth:${e} maxHeight:${f}`));for(let c of a.children)aq(c,b,e,f);let h=a.columns??-1,i=0;for(let b of a.children)i+=b.widthInColumns??1;let k=a.children.length;h>0&&h<i&&(k=h);let l=Math.ceil(i/k),m=k*(e+an)+an,n=l*(f+an)+an;if(m<c){j.Rm.debug(`Detected to small sibling: abc95 ${a.id} siblingWidth ${c} siblingHeight ${d} width ${m}`),m=c,n=d;let b=(c-k*an-an)/k,g=(d-l*an-an)/l;for(let c of(j.Rm.debug("Size indata abc88",a.id,"childWidth",b,"maxWidth",e),j.Rm.debug("Size indata abc88",a.id,"childHeight",g,"maxHeight",f),j.Rm.debug("Size indata abc88 xSize",k,"padding",an),a.children))c.size&&(c.size.width=b,c.size.height=g,c.size.x=0,c.size.y=0)}if(j.Rm.debug(`abc95 (finale calc) ${a.id} xSize ${k} ySize ${l} columns ${h}${a.children.length} width=${Math.max(m,a.size?.width||0)}`),m<(a?.size?.width||0)){m=a?.size?.width||0;let b=h>0?Math.min(a.children.length,h):a.children.length;if(b>0){let c=(m-b*an-an)/b;for(let b of(j.Rm.debug("abc95 (growing to fit) width",a.id,m,a.size?.width,c),a.children))b.size&&(b.size.width=c)}}a.size={width:m,height:n,x:0,y:0}}j.Rm.debug("setBlockSizes abc94 (done)",a.id,a?.size?.x,a?.size?.width,a?.size?.y,a?.size?.height)}function ar(a,b){j.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${a.id} x: ${a?.size?.x} y: ${a?.size?.y} width: ${a?.size?.width}`);let c=a.columns??-1;if(j.Rm.debug("layoutBlocks columns abc95",a.id,"=>",c,a),a.children&&a.children.length>0){let d=a?.children[0]?.size?.width??0,e=a.children.length*d+(a.children.length-1)*an;j.Rm.debug("widthOfChildren 88",e,"posX");let f=new Map;{let b=0;for(let d of a.children){if(!d.size)continue;let{py:a}=ao(c,b),e=f.get(a)??0;d.size.height>e&&f.set(a,d.size.height);let g=d?.widthInColumns??1;c>0&&(g=Math.min(g,c-b%c)),b+=g}}let g=new Map;{let a=0;for(let b of[...f.keys()].sort((a,b)=>a-b))g.set(b,a),a+=(f.get(b)??0)+an}let h=0;j.Rm.debug("abc91 block?.size?.x",a.id,a?.size?.x);let i=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-an,k=0;for(let d of a.children){if(!d.size)continue;let{width:e,height:l}=d.size,{px:m,py:n}=ao(c,h);if(n!=k&&(k=n,i=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-an,j.Rm.debug("New row in layout for block",a.id," and child ",d.id,k)),j.Rm.debug(`abc89 layout blocks (child) id: ${d.id} Pos: ${h} (px, py) ${m},${n} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${e}${an}`),a.size){let b=e/2;d.size.x=i+an+b,j.Rm.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${i} new startingPosX${d.size.x} ${b} padding=${an} width=${e} halfWidth=${b} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${e*(d?.widthInColumns??1)/2}`),i=d.size.x+b;let c=g.get(n)??0,h=f.get(n)??l;d.size.y=a.size.y-a.size.height/2+c+h/2+an,j.Rm.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${i}${an}${b}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${e*(d?.widthInColumns??1)/2}`)}d.children&&ar(d,b);let o=d?.widthInColumns??1;c>0&&(o=Math.min(o,c-h%c)),h+=o,j.Rm.debug("abc88 columnsPos",d,h)}}j.Rm.debug(`layout blocks (<==layoutBlocks) ${a.id} x: ${a?.size?.x} y: ${a?.size?.y} width: ${a?.size?.width}`)}function as(a,{minX:b,minY:c,maxX:d,maxY:e}={minX:0,minY:0,maxX:0,maxY:0}){if(a.size&&"root"!==a.id){let{x:f,y:g,width:h,height:i}=a.size;f-h/2<b&&(b=f-h/2),g-i/2<c&&(c=g-i/2),f+h/2>d&&(d=f+h/2),g+i/2>e&&(e=g+i/2)}if(a.children)for(let f of a.children)({minX:b,minY:c,maxX:d,maxY:e}=as(f,{minX:b,minY:c,maxX:d,maxY:e}));return{minX:b,minY:c,maxX:d,maxY:e}}function at(a){let b=a.getBlock("root");if(!b)return;aq(b,a,0,0),ar(b,a),j.Rm.debug("getBlocks",JSON.stringify(b,null,2));let{minX:c,minY:d,maxX:e,maxY:f}=as(b);return{x:c,y:d,width:e-c,height:f-d}}(0,j.K2)(aq,"setBlockSizes"),(0,j.K2)(ar,"layoutBlocks"),(0,j.K2)(as,"findBounds"),(0,j.K2)(at,"layout");var au=(0,j.K2)(async(a,b,c,d=!1,e=!1)=>{let f=b||"";"object"==typeof f&&(f=f[0]);let h=(0,i.D7)(),j=(0,i.E)(h);return await (0,g.GZ)(a,f,{style:c,isTitle:d,useHtmlLabels:j,markdown:!1,isNode:e,width:1/0},h)},"createLabel"),av=(0,j.K2)((a,b,c,d,e)=>{b.arrowTypeStart&&ax(a,"start",b.arrowTypeStart,c,d,e),b.arrowTypeEnd&&ax(a,"end",b.arrowTypeEnd,c,d,e)},"addEdgeMarkers"),aw={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ax=(0,j.K2)((a,b,c,d,e,f)=>{let g=aw[c];if(!g)return void j.Rm.warn(`Unknown arrow type: ${c}`);a.attr(`marker-${b}`,`url(${d}#${e}_${f}-${g}${"start"===b?"Start":"End"})`)},"addEdgeMarker"),ay={},az={},aA=(0,j.K2)(async(a,b)=>{let c,d=(0,i.D7)(),f=(0,i.E)(d),h=a.insert("g").attr("class","edgeLabel"),j=h.insert("g").attr("class","label"),k="markdown"===b.labelType,l=await (0,g.GZ)(a,b.label,{style:b.labelStyle,useHtmlLabels:f,addSvgBackground:k,isNode:!1,markdown:k,width:k?void 0:1/0},d);j.node().appendChild(l);let m=l.getBBox(),n=m;if(f){let a=l.children[0],b=(0,r.Ltv)(l);n=m=a.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}else{let a=(0,r.Ltv)(l).select("text").node();a&&"function"==typeof a.getBBox&&(n=a.getBBox())}if(j.attr("transform",(0,e.Wg)(n,f)),ay[b.id]=h,b.width=m.width,b.height=m.height,b.startLabelLeft){let d=a.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),h=await au(g,b.startLabelLeft,b.labelStyle);c=h;let i=h.getBBox();if(f){let a=h.children[0],b=(0,r.Ltv)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}g.attr("transform",(0,e.Wg)(i,f)),az[b.id]||(az[b.id]={}),az[b.id].startLeft=d,aB(c,b.startLabelLeft)}if(b.startLabelRight){let d=a.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),h=await au(g,b.startLabelRight,b.labelStyle);c=h;let i=h.getBBox();if(f){let a=h.children[0],b=(0,r.Ltv)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}g.attr("transform",(0,e.Wg)(i,f)),az[b.id]||(az[b.id]={}),az[b.id].startRight=d,aB(c,b.startLabelRight)}if(b.endLabelLeft){let d=a.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),h=await au(d,b.endLabelLeft,b.labelStyle);c=h;let i=h.getBBox();if(f){let a=h.children[0],b=(0,r.Ltv)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}g.attr("transform",(0,e.Wg)(i,f)),az[b.id]||(az[b.id]={}),az[b.id].endLeft=d,aB(c,b.endLabelLeft)}if(b.endLabelRight){let d=a.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),h=await au(d,b.endLabelRight,b.labelStyle);c=h;let i=h.getBBox();if(f){let a=h.children[0],b=(0,r.Ltv)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}g.attr("transform",(0,e.Wg)(i,f)),az[b.id]||(az[b.id]={}),az[b.id].endRight=d,aB(c,b.endLabelRight)}return l},"insertEdgeLabel");function aB(a,b){(0,i.E)((0,i.D7)())&&a&&(a.style.width=9*b.length+"px",a.style.height="12px")}(0,j.K2)(aB,"setTerminalWidth");var aC=(0,j.K2)((a,b)=>{j.Rm.debug("Moving label abc88 ",a.id,a.label,ay[a.id],b);let c=b.updatedPath?b.updatedPath:b.originalPath,d=(0,i.D7)(),{subGraphTitleTotalMargin:e}=(0,f.O)(d);if(a.label){let d=ay[a.id],f=a.x,g=a.y;if(c){let d=h._K.calcLabelPosition(c);j.Rm.debug("Moving label "+a.label+" from (",f,",",g,") to (",d.x,",",d.y,") abc88"),b.updatedPath&&(f=d.x,g=d.y)}d.attr("transform",`translate(${f}, ${g+e/2})`)}if(a.startLabelLeft){let b=az[a.id].startLeft,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.startLabelRight){let b=az[a.id].startRight,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelLeft){let b=az[a.id].endLeft,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelRight){let b=az[a.id].endRight,d=a.x,e=a.y;if(c){let b=h._K.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}},"positionEdgeLabel"),aD=(0,j.K2)((a,b)=>{let c=a.x,d=a.y,e=Math.abs(b.x-c),f=Math.abs(b.y-d),g=a.width/2,h=a.height/2;return!!(e>=g)||!!(f>=h)},"outsideNode"),aE=(0,j.K2)((a,b,c)=>{j.Rm.debug(`intersection calc abc89:
|
|
139
|
+
outsidePoint: ${JSON.stringify(b)}
|
|
140
|
+
insidePoint : ${JSON.stringify(c)}
|
|
141
|
+
node : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`);let d=a.x,e=a.y,f=Math.abs(d-c.x),g=a.width/2,h=c.x<b.x?g-f:g+f,i=a.height/2,k=Math.abs(b.y-c.y),l=Math.abs(b.x-c.x);if(Math.abs(e-b.y)*g>Math.abs(d-b.x)*i){let a=c.y<b.y?b.y-i-e:e-i-b.y;h=l*a/k;let d={x:c.x<b.x?c.x+h:c.x-l+h,y:c.y<b.y?c.y+k-a:c.y-k+a};return 0===h&&(d.x=b.x,d.y=b.y),0===l&&(d.x=b.x),0===k&&(d.y=b.y),j.Rm.debug(`abc89 topp/bott calc, Q ${k}, q ${a}, R ${l}, r ${h}`,d),d}{let a=k*(h=c.x<b.x?b.x-g-d:d-g-b.x)/l,e=c.x<b.x?c.x+l-h:c.x-l+h,f=c.y<b.y?c.y+a:c.y-a;return j.Rm.debug(`sides calc abc89, Q ${k}, q ${a}, R ${l}, r ${h}`,{_x:e,_y:f}),0===h&&(e=b.x,f=b.y),0===l&&(e=b.x),0===k&&(f=b.y),{x:e,y:f}}},"intersection"),aF=(0,j.K2)((a,b)=>{j.Rm.debug("abc88 cutPathAtIntersect",a,b);let c=[],d=a[0],e=!1;return a.forEach(a=>{if(aD(b,a)||e)d=a,e||c.push(a);else{let f=aE(b,d,a),g=!1;c.forEach(a=>{g=g||a.x===f.x&&a.y===f.y}),c.some(a=>a.x===f.x&&a.y===f.y)||c.push(f),e=!0}}),c},"cutPathAtIntersect"),aG=(0,j.K2)(function(a,b,c,d,f,g,h){let k,l=c.points;j.Rm.debug("abc88 InsertEdge: edge=",c,"e=",b);let m=!1,n=g.node(b.v);var o=g.node(b.w);o?.intersect&&n?.intersect&&((l=l.slice(1,c.points.length-1)).unshift(n.intersect(l[0])),l.push(o.intersect(l[l.length-1]))),c.toCluster&&(j.Rm.debug("to cluster abc88",d[c.toCluster]),l=aF(c.points,d[c.toCluster].node),m=!0),c.fromCluster&&(j.Rm.debug("from cluster abc88",d[c.fromCluster]),l=aF(l.reverse(),d[c.fromCluster].node).reverse(),m=!0);let p=l.filter(a=>!Number.isNaN(a.y)),q=r.qrM;c.curve&&("graph"===f||"flowchart"===f)&&(q=c.curve);let{x:s,y:t}=(0,e.RI)(c),u=(0,r.n8j)().x(s).y(t).curve(q);switch(c.thickness){case"normal":k="edge-thickness-normal";break;case"thick":case"invisible":k="edge-thickness-thick";break;default:k=""}switch(c.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed"}let v=a.append("path").attr("d",u(p)).attr("id",c.id).attr("class"," "+k+(c.classes?" "+c.classes:"")).attr("style",c.style),w="";((0,i.D7)().flowchart.arrowMarkerAbsolute||(0,i.D7)().state.arrowMarkerAbsolute)&&(w=(0,i.ID)(!0)),av(v,c,w,h,f);let x={};return m&&(x.updatedPath=l),x.originalPath=c.points,x},"insertEdge"),aH=(0,j.K2)(a=>{let b=new Set;for(let c of a)switch(c){case"x":b.add("right"),b.add("left");break;case"y":b.add("up"),b.add("down");break;default:b.add(c)}return b},"expandAndDeduplicateDirections"),aI=(0,j.K2)((a,b,c,d)=>{let e=aH(a),f=b.height+2*c.padding,g=f/2,h=d??b.width+2*g+c.padding,i=c.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:g,y:0},{x:h/2,y:2*i},{x:h-g,y:0},{x:h,y:0},{x:h,y:-f/3},{x:h+2*i,y:-f/2},{x:h,y:-2*f/3},{x:h,y:-f},{x:h-g,y:-f},{x:h/2,y:-f-2*i},{x:g,y:-f},{x:0,y:-f},{x:0,y:-2*f/3},{x:-2*i,y:-f/2},{x:0,y:-f/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:g,y:0},{x:h-g,y:0},{x:h,y:-f/2},{x:h-g,y:-f},{x:g,y:-f},{x:0,y:-f/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:g,y:-f},{x:h-g,y:-f},{x:h,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:h,y:-g},{x:h,y:-f+g},{x:0,y:-f}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:h,y:0},{x:0,y:-g},{x:0,y:-f+g},{x:h,y:-f}]:e.has("right")&&e.has("left")?[{x:g,y:0},{x:g,y:-i},{x:h-g,y:-i},{x:h-g,y:0},{x:h,y:-f/2},{x:h-g,y:-f},{x:h-g,y:-f+i},{x:g,y:-f+i},{x:g,y:-f},{x:0,y:-f/2}]:e.has("up")&&e.has("down")?[{x:h/2,y:0},{x:0,y:-i},{x:g,y:-i},{x:g,y:-f+i},{x:0,y:-f+i},{x:h/2,y:-f},{x:h,y:-f+i},{x:h-g,y:-f+i},{x:h-g,y:-i},{x:h,y:-i}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:h,y:-g},{x:0,y:-f}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:h,y:0},{x:0,y:-f}]:e.has("left")&&e.has("up")?[{x:h,y:0},{x:0,y:-g},{x:h,y:-f}]:e.has("left")&&e.has("down")?[{x:h,y:0},{x:0,y:0},{x:h,y:-f}]:e.has("right")?[{x:g,y:-i},{x:g,y:-i},{x:h-g,y:-i},{x:h-g,y:0},{x:h,y:-f/2},{x:h-g,y:-f},{x:h-g,y:-f+i},{x:g,y:-f+i},{x:g,y:-f+i}]:e.has("left")?[{x:g,y:0},{x:g,y:-i},{x:h-g,y:-i},{x:h-g,y:-f+i},{x:g,y:-f+i},{x:g,y:-f},{x:0,y:-f/2}]:e.has("up")?[{x:g,y:-i},{x:g,y:-f+i},{x:0,y:-f+i},{x:h/2,y:-f},{x:h,y:-f+i},{x:h-g,y:-f+i},{x:h-g,y:-i}]:e.has("down")?[{x:h/2,y:0},{x:0,y:-i},{x:g,y:-i},{x:g,y:-f+i},{x:h-g,y:-f+i},{x:h-g,y:-i},{x:h,y:-i}]:[{x:0,y:0}]},"getArrowPoints");function aJ(a,b,c,d){var e=a.x,f=a.y,g=e-d.x,h=f-d.y,i=Math.sqrt(b*b*h*h+c*c*g*g),j=Math.abs(b*c*g/i);d.x<e&&(j=-j);var k=Math.abs(b*c*h/i);return d.y<f&&(k=-k),{x:e+j,y:f+k}}function aK(a,b,c){return aJ(a,b,b,c)}function aL(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;if(e=b.y-a.y,g=a.x-b.x,i=b.x*a.y-a.x*b.y,m=e*c.x+g*c.y+i,n=e*d.x+g*d.y+i,!(0!==m&&0!==n&&aM(m,n))){if((f=d.y-c.y,h=c.x-d.x,j=d.x*c.y-c.x*d.y,k=f*a.x+h*a.y+j,l=f*b.x+h*b.y+j,!(0!==k&&0!==l&&aM(k,l)))&&0!=(o=e*h-f*g))return p=Math.abs(o/2),{x:(q=g*j-h*i)<0?(q-p)/o:(q+p)/o,y:(q=f*i-e*j)<0?(q-p)/o:(q+p)/o}}}function aM(a,b){return a*b>0}function aN(a,b,c){var d=a.x,e=a.y,f=[],g=1/0,h=1/0;"function"==typeof b.forEach?b.forEach(function(a){g=Math.min(g,a.x),h=Math.min(h,a.y)}):(g=Math.min(g,b.x),h=Math.min(h,b.y));for(var i=d-a.width/2-g,j=e-a.height/2-h,k=0;k<b.length;k++){var l=b[k],m=b[k<b.length-1?k+1:0],n=aL(a,c,{x:i+l.x,y:j+l.y},{x:i+m.x,y:j+m.y});n&&f.push(n)}return f.length?(f.length>1&&f.sort(function(a,b){var d=a.x-c.x,e=a.y-c.y,f=Math.sqrt(d*d+e*e),g=b.x-c.x,h=b.y-c.y,i=Math.sqrt(g*g+h*h);return f<i?-1:+(f!==i)}),f[0]):a}(0,j.K2)(function(a,b){return a.intersect(b)},"intersectNode"),(0,j.K2)(aJ,"intersectEllipse"),(0,j.K2)(aK,"intersectCircle"),(0,j.K2)(aL,"intersectLine"),(0,j.K2)(aM,"sameSign"),(0,j.K2)(aN,"intersectPolygon");var aO={circle:aK,polygon:aN,rect:(0,j.K2)((a,b)=>{var c,d,e=a.x,f=a.y,g=b.x-e,h=b.y-f,i=a.width/2,j=a.height/2;return Math.abs(h)*i>Math.abs(g)*j?(h<0&&(j=-j),c=0===h?0:j*g/h,d=j):(g<0&&(i=-i),c=i,d=0===g?0:i*h/g),{x:e+c,y:f+d}},"intersectRect")},aP=(0,j.K2)(async(a,b,c,d)=>{let e,j,k=(0,i.D7)(),l=b.useHtmlLabels||(0,i.E)(k),m=a.insert("g").attr("class",c||"node default").attr("id",b.domId||b.id),n=m.insert("g").attr("class","label").attr("style",b.labelStyle);e=void 0===b.labelText?"":"string"==typeof b.labelText?b.labelText:b.labelText[0];let o=(j="markdown"===b.labelType?(0,g.GZ)(n,(0,i.jZ)((0,h.Sm)(e),k),{useHtmlLabels:l,width:b.width||k.flowchart.wrappingWidth,classes:"markdown-node-label"},k):await au(n,(0,i.jZ)((0,h.Sm)(e),k),b.labelStyle,!1,d)).getBBox(),p=b.padding/2;if((0,i.E)(k)){let a=j.children[0],b=(0,r.Ltv)(j);await (0,f.X)(a,e),o=a.getBoundingClientRect(),b.attr("width",o.width),b.attr("height",o.height)}return l?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),b.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:m,bbox:o,halfPadding:p,label:n}},"labelHelper"),aQ=(0,j.K2)((a,b)=>{let c=b.node().getBBox();a.width=c.width,a.height=c.height},"updateNodeBounds");function aR(a,b,c,d){return a.insert("polygon",":first-child").attr("points",d.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-b/2+","+c/2+")")}(0,j.K2)(aR,"insertPolygonShape");var aS=(0,j.K2)(async(a,b)=>{b.useHtmlLabels||(0,i.E)((0,i.D7)())||(b.centerLabel=!0);let{shapeSvg:c,bbox:d,halfPadding:e}=await aP(a,b,"node "+b.classes,!0);j.Rm.info("Classes = ",b.classes);let f=c.insert("rect",":first-child");return f.attr("rx",b.rx).attr("ry",b.ry).attr("x",-d.width/2-e).attr("y",-d.height/2-e).attr("width",d.width+b.padding).attr("height",d.height+b.padding),aQ(b,f),b.intersect=function(a){return aO.rect(b,a)},c},"note"),aT=(0,j.K2)(a=>a?" "+a:"","formatClass"),aU=(0,j.K2)((a,b)=>`${b||"node default"}${aT(a.classes)} ${aT(a.class)}`,"getClassesFromNode"),aV=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding+(d.height+b.padding),f=[{x:e/2,y:0},{x:e,y:-e/2},{x:e/2,y:-e},{x:0,y:-e/2}];j.Rm.info("Question main (Circle)");let g=aR(c,e,e,f);return g.attr("style",b.style),aQ(b,g),b.intersect=function(a){return j.Rm.warn("Intersect called"),aO.polygon(b,f,a)},c},"question"),aW=(0,j.K2)((a,b)=>{let c=a.insert("g").attr("class","node default").attr("id",b.domId||b.id);return c.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),b.width=28,b.height=28,b.intersect=function(a){return aO.circle(b,14,a)},c},"choice"),aX=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=b.positioned?b.height:d.height+b.padding,f=e/4,g=b.positioned?b.width:d.width+2*f+b.padding,h=[{x:f,y:0},{x:g-f,y:0},{x:g,y:-e/2},{x:g-f,y:-e},{x:f,y:-e},{x:0,y:-e/2}],i=aR(c,g,e,h);return i.attr("style",b.style),aQ(b,i),b.intersect=function(a){return aO.polygon(b,h,a)},c},"hexagon"),aY=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,void 0,!0),e=d.height+2*b.padding,f=e/2,g=d.width+2*f+b.padding,h=b.positioned&&(b.widthInColumns??1)>1&&b.width>g?b.width:g,i=aI(b.directions,d,b,h),j=aR(c,h,e,i);return j.attr("style",b.style),aQ(b,j),b.intersect=function(a){return aO.polygon(b,i,a)},c},"block_arrow"),aZ=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:-f/2,y:0},{x:e,y:0},{x:e,y:-f},{x:-f/2,y:-f},{x:0,y:-f/2}];return aR(c,e,f,g).attr("style",b.style),b.width=e+f,b.height=f,b.intersect=function(a){return aO.polygon(b,g,a)},c},"rect_left_inv_arrow"),a$=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:-2*f/6,y:0},{x:e-f/6,y:0},{x:e+2*f/6,y:-f},{x:f/6,y:-f}],h=aR(c,e,f,g);return h.attr("style",b.style),aQ(b,h),b.intersect=function(a){return aO.polygon(b,g,a)},c},"lean_right"),a_=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:2*f/6,y:0},{x:e+f/6,y:0},{x:e-2*f/6,y:-f},{x:-f/6,y:-f}],h=aR(c,e,f,g);return h.attr("style",b.style),aQ(b,h),b.intersect=function(a){return aO.polygon(b,g,a)},c},"lean_left"),a0=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:-2*f/6,y:0},{x:e+2*f/6,y:0},{x:e-f/6,y:-f},{x:f/6,y:-f}],h=aR(c,e,f,g);return h.attr("style",b.style),aQ(b,h),b.intersect=function(a){return aO.polygon(b,g,a)},c},"trapezoid"),a1=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:f/6,y:0},{x:e-f/6,y:0},{x:e+2*f/6,y:-f},{x:-2*f/6,y:-f}],h=aR(c,e,f,g);return h.attr("style",b.style),aQ(b,h),b.intersect=function(a){return aO.polygon(b,g,a)},c},"inv_trapezoid"),a2=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:0,y:0},{x:e+f/2,y:0},{x:e,y:-f/2},{x:e+f/2,y:-f},{x:0,y:-f}],h=aR(c,e,f,g);return h.attr("style",b.style),aQ(b,h),b.intersect=function(a){return aO.polygon(b,g,a)},c},"rect_right_inv_arrow"),a3=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding,f=e/2,g=f/(2.5+e/50),h=d.height+g+b.padding,i="M 0,"+g+" a "+f+","+g+" 0,0,0 "+e+" 0 a "+f+","+g+" 0,0,0 "+-e+" 0 l 0,"+h+" a "+f+","+g+" 0,0,0 "+e+" 0 l 0,"+-h,j=c.attr("label-offset-y",g).insert("path",":first-child").attr("style",b.style).attr("d",i).attr("transform","translate("+-e/2+","+-(h/2+g)+")");return aQ(b,j),b.intersect=function(a){let c=aO.rect(b,a),d=c.x-b.x;if(0!=f&&(Math.abs(d)<b.width/2||Math.abs(d)==b.width/2&&Math.abs(c.y-b.y)>b.height/2-g)){let e=g*g*(1-d*d/(f*f));0!=e&&(e=Math.sqrt(e)),e=g-e,a.y-b.y>0&&(e=-e),c.y+=e}return c},c},"cylinder"),a4=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aP(a,b,"node "+b.classes+" "+b.class,!0),f=c.insert("rect",":first-child"),g=b.positioned?b.width:d.width+b.padding,h=b.positioned?b.height:d.height+b.padding,i=b.positioned?-g/2:-d.width/2-e,k=b.positioned?-h/2:-d.height/2-e;if(f.attr("class","basic label-container").attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("x",i).attr("y",k).attr("width",g).attr("height",h),b.props){let a=new Set(Object.keys(b.props));b.props.borders&&(a7(f,b.props.borders,g,h),a.delete("borders")),a.forEach(a=>{j.Rm.warn(`Unknown node property ${a}`)})}return aQ(b,f),b.intersect=function(a){return aO.rect(b,a)},c},"rect"),a5=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aP(a,b,"node "+b.classes,!0),f=c.insert("rect",":first-child"),g=b.positioned?b.width:d.width+b.padding,h=b.positioned?b.height:d.height+b.padding,i=b.positioned?-g/2:-d.width/2-e,k=b.positioned?-h/2:-d.height/2-e;if(f.attr("class","basic cluster composite label-container").attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("x",i).attr("y",k).attr("width",g).attr("height",h),b.props){let a=new Set(Object.keys(b.props));b.props.borders&&(a7(f,b.props.borders,g,h),a.delete("borders")),a.forEach(a=>{j.Rm.warn(`Unknown node property ${a}`)})}return aQ(b,f),b.intersect=function(a){return aO.rect(b,a)},c},"composite"),a6=(0,j.K2)(async(a,b)=>{let{shapeSvg:c}=await aP(a,b,"label",!0);j.Rm.trace("Classes = ",b.class);let d=c.insert("rect",":first-child");if(d.attr("width",0).attr("height",0),c.attr("class","label edgeLabel"),b.props){let a=new Set(Object.keys(b.props));b.props.borders&&(a7(d,b.props.borders,0,0),a.delete("borders")),a.forEach(a=>{j.Rm.warn(`Unknown node property ${a}`)})}return aQ(b,d),b.intersect=function(a){return aO.rect(b,a)},c},"labelRect");function a7(a,b,c,d){let e=[],f=(0,j.K2)(a=>{e.push(a,0)},"addBorder"),g=(0,j.K2)(a=>{e.push(0,a)},"skipBorder");b.includes("t")?(j.Rm.debug("add top border"),f(c)):g(c),b.includes("r")?(j.Rm.debug("add right border"),f(d)):g(d),b.includes("b")?(j.Rm.debug("add bottom border"),f(c)):g(c),b.includes("l")?(j.Rm.debug("add left border"),f(d)):g(d),a.attr("stroke-dasharray",e.join(" "))}(0,j.K2)(a7,"applyNodePropertyBorders");var a8=(0,j.K2)(async(a,b)=>{let c;c=b.classes?"node "+b.classes:"node default";let d=a.insert("g").attr("class",c).attr("id",b.domId||b.id),e=d.insert("rect",":first-child"),f=d.insert("line"),g=d.insert("g").attr("class","label"),h=b.labelText.flat?b.labelText.flat():b.labelText,k="";k="object"==typeof h?h[0]:h,j.Rm.info("Label text abc79",k,h,"object"==typeof h);let l=await au(g,k,b.labelStyle,!0,!0),m={width:0,height:0};if((0,i.E)((0,i.D7)())){let a=l.children[0],b=(0,r.Ltv)(l);m=a.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}j.Rm.info("Text 2",h);let n=h.slice(1,h.length),o=l.getBBox(),p=await au(g,n.join?n.join("<br/>"):n,b.labelStyle,!0,!0);if((0,i.E)((0,i.D7)())){let a=p.children[0],b=(0,r.Ltv)(p);m=a.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}let q=b.padding/2;return(0,r.Ltv)(p).attr("transform","translate( "+(m.width>o.width?0:(o.width-m.width)/2)+", "+(o.height+q+5)+")"),(0,r.Ltv)(l).attr("transform","translate( "+(m.width<o.width?0:-(o.width-m.width)/2)+", 0)"),m=g.node().getBBox(),g.attr("transform","translate("+-m.width/2+", "+(-m.height/2-q+3)+")"),e.attr("class","outer title-state").attr("x",-m.width/2-q).attr("y",-m.height/2-q).attr("width",m.width+b.padding).attr("height",m.height+b.padding),f.attr("class","divider").attr("x1",-m.width/2-q).attr("x2",m.width/2+q).attr("y1",-m.height/2-q+o.height+q).attr("y2",-m.height/2-q+o.height+q),aQ(b,e),b.intersect=function(a){return aO.rect(b,a)},d},"rectWithTitle"),a9=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.height+b.padding,f=d.width+e/4+b.padding,g=c.insert("rect",":first-child").attr("style",b.style).attr("rx",e/2).attr("ry",e/2).attr("x",-f/2).attr("y",-e/2).attr("width",f).attr("height",e);return aQ(b,g),b.intersect=function(a){return aO.rect(b,a)},c},"stadium"),ba=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aP(a,b,aU(b,void 0),!0),f=c.insert("circle",":first-child");return f.attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("r",d.width/2+e).attr("width",d.width+b.padding).attr("height",d.height+b.padding),j.Rm.info("Circle main"),aQ(b,f),b.intersect=function(a){return j.Rm.info("Circle intersect",b,d.width/2+e,a),aO.circle(b,d.width/2+e,a)},c},"circle"),bb=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d,halfPadding:e}=await aP(a,b,aU(b,void 0),!0),f=c.insert("g",":first-child"),g=f.insert("circle"),h=f.insert("circle");return f.attr("class",b.class),g.attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("r",d.width/2+e+5).attr("width",d.width+b.padding+10).attr("height",d.height+b.padding+10),h.attr("style",b.style).attr("rx",b.rx).attr("ry",b.ry).attr("r",d.width/2+e).attr("width",d.width+b.padding).attr("height",d.height+b.padding),j.Rm.info("DoubleCircle main"),aQ(b,g),b.intersect=function(a){return j.Rm.info("DoubleCircle intersect",b,d.width/2+e+5,a),aO.circle(b,d.width/2+e+5,a)},c},"doublecircle"),bc=(0,j.K2)(async(a,b)=>{let{shapeSvg:c,bbox:d}=await aP(a,b,aU(b,void 0),!0),e=d.width+b.padding,f=d.height+b.padding,g=[{x:0,y:0},{x:e,y:0},{x:e,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:e+8,y:0},{x:e+8,y:-f},{x:-8,y:-f},{x:-8,y:0}],h=aR(c,e,f,g);return h.attr("style",b.style),aQ(b,h),b.intersect=function(a){return aO.polygon(b,g,a)},c},"subroutine"),bd=(0,j.K2)((a,b)=>{let c=a.insert("g").attr("class","node default").attr("id",b.domId||b.id),d=c.insert("circle",":first-child");return d.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),aQ(b,d),b.intersect=function(a){return aO.circle(b,7,a)},c},"start"),be=(0,j.K2)((a,b,c)=>{let d=a.insert("g").attr("class","node default").attr("id",b.domId||b.id),e=70,f=10;return"LR"===c&&(e=10,f=70),aQ(b,d.append("rect").attr("x",-1*e/2).attr("y",-1*f/2).attr("width",e).attr("height",f).attr("class","fork-join")),b.height=b.height+b.padding/2,b.width=b.width+b.padding/2,b.intersect=function(a){return aO.rect(b,a)},d},"forkJoin"),bf={rhombus:aV,composite:a5,question:aV,rect:a4,labelRect:a6,rectWithTitle:a8,choice:aW,circle:ba,doublecircle:bb,stadium:a9,hexagon:aX,block_arrow:aY,rect_left_inv_arrow:aZ,lean_right:a$,lean_left:a_,trapezoid:a0,inv_trapezoid:a1,rect_right_inv_arrow:a2,cylinder:a3,start:bd,end:(0,j.K2)((a,b)=>{let c=a.insert("g").attr("class","node default").attr("id",b.domId||b.id),d=c.insert("circle",":first-child"),e=c.insert("circle",":first-child");return e.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),d.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),aQ(b,e),b.intersect=function(a){return aO.circle(b,7,a)},c},"end"),note:aS,subroutine:bc,fork:be,join:be,class_box:(0,j.K2)(async(a,b)=>{let c,d=b.padding/2;c=b.classes?"node "+b.classes:"node default";let e=a.insert("g").attr("class",c).attr("id",b.domId||b.id),f=e.insert("rect",":first-child"),g=e.insert("line"),h=e.insert("line"),j=0,k=4,l=e.insert("g").attr("class","label"),m=0,n=b.classData.annotations?.[0],o=b.classData.annotations[0]?"\xab"+b.classData.annotations[0]+"\xbb":"",p=await au(l,o,b.labelStyle,!0,!0),q=p.getBBox();if((0,i.E)((0,i.D7)())){let a=p.children[0],b=(0,r.Ltv)(p);q=a.getBoundingClientRect(),b.attr("width",q.width),b.attr("height",q.height)}b.classData.annotations[0]&&(k+=q.height+4,j+=q.width);let s=b.classData.label;void 0!==b.classData.type&&""!==b.classData.type&&((0,i.E)((0,i.D7)())?s+="<"+b.classData.type+">":s+="<"+b.classData.type+">");let t=await au(l,s,b.labelStyle,!0,!0);(0,r.Ltv)(t).attr("class","classTitle");let u=t.getBBox();if((0,i.E)((0,i.D7)())){let a=t.children[0],b=(0,r.Ltv)(t);u=a.getBoundingClientRect(),b.attr("width",u.width),b.attr("height",u.height)}k+=u.height+4,u.width>j&&(j=u.width);let v=[];b.classData.members.forEach(async a=>{let c=a.getDisplayDetails(),d=c.displayText;(0,i.E)((0,i.D7)())&&(d=d.replace(/</g,"<").replace(/>/g,">"));let e=await au(l,d,c.cssStyle?c.cssStyle:b.labelStyle,!0,!0),f=e.getBBox();if((0,i.E)((0,i.D7)())){let a=e.children[0],b=(0,r.Ltv)(e);f=a.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}f.width>j&&(j=f.width),k+=f.height+4,v.push(e)}),k+=8;let w=[];if(b.classData.methods.forEach(async a=>{let c=a.getDisplayDetails(),d=c.displayText;(0,i.E)((0,i.D7)())&&(d=d.replace(/</g,"<").replace(/>/g,">"));let e=await au(l,d,c.cssStyle?c.cssStyle:b.labelStyle,!0,!0),f=e.getBBox();if((0,i.E)((0,i.D7)())){let a=e.children[0],b=(0,r.Ltv)(e);f=a.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}f.width>j&&(j=f.width),k+=f.height+4,w.push(e)}),k+=8,n){let a=(j-q.width)/2;(0,r.Ltv)(p).attr("transform","translate( "+(-1*j/2+a)+", "+-1*k/2+")"),m=q.height+4}let x=(j-u.width)/2;return(0,r.Ltv)(t).attr("transform","translate( "+(-1*j/2+x)+", "+(-1*k/2+m)+")"),m+=u.height+4,g.attr("class","divider").attr("x1",-j/2-d).attr("x2",j/2+d).attr("y1",-k/2-d+8+m).attr("y2",-k/2-d+8+m),m+=8,v.forEach(a=>{(0,r.Ltv)(a).attr("transform","translate( "+-j/2+", "+(-1*k/2+m+4)+")");let b=a?.getBBox();m+=(b?.height??0)+4}),m+=8,h.attr("class","divider").attr("x1",-j/2-d).attr("x2",j/2+d).attr("y1",-k/2-d+8+m).attr("y2",-k/2-d+8+m),m+=8,w.forEach(a=>{(0,r.Ltv)(a).attr("transform","translate( "+-j/2+", "+(-1*k/2+m)+")");let b=a?.getBBox();m+=(b?.height??0)+4}),f.attr("style",b.style).attr("class","outer title-state").attr("x",-j/2-d).attr("y",-(k/2)-d).attr("width",j+b.padding).attr("height",k+b.padding),aQ(b,f),b.intersect=function(a){return aO.rect(b,a)},e},"class_box")},bg={},bh=(0,j.K2)(async(a,b,c)=>{let d,e;if(b.link){let f;"sandbox"===(0,i.D7)().securityLevel?f="_top":b.linkTarget&&(f=b.linkTarget||"_blank"),d=a.insert("svg:a").attr("xlink:href",b.link).attr("target",f),e=await bf[b.shape](d,b,c)}else d=e=await bf[b.shape](a,b,c);return b.tooltip&&e.attr("title",b.tooltip),b.class&&e.attr("class","node default "+b.class),bg[b.id]=d,b.haveCallback&&bg[b.id].attr("class",bg[b.id].attr("class")+" clickable"),d},"insertNode"),bi=(0,j.K2)(a=>{let b=bg[a.id];j.Rm.trace("Transforming node",a.diff,a,"translate("+(a.x-a.width/2-5)+", "+a.width/2+")");let c=a.diff||0;return a.clusterNode?b.attr("transform","translate("+(a.x+c-a.width/2)+", "+(a.y-a.height/2-8)+")"):b.attr("transform","translate("+a.x+", "+a.y+")"),c},"positionNode");function bj(a,b,c=!1){let d,e="default";(a?.classes?.length||0)>0&&(e=(a?.classes??[]).join(" ")),e+=" flowchart-label";let f=0,g="";switch(a.type){case"round":f=5,g="rect";break;case"composite":f=0,g="composite",d=0;break;case"square":case"group":default:g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"block_arrow":g="block_arrow";break;case"odd":case"rect_left_inv_arrow":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"doublecircle":g="doublecircle"}let j=(0,h.sM)(a?.styles??[]),k=a.label,l=a.size??{width:0,height:0,x:0,y:0},m=b.getDiagramId();return{labelStyle:j.labelStyle,shape:g,labelText:k,rx:f,ry:f,class:e,style:j.style,id:a.id,domId:m?`${m}-${a.id}`:a.id,directions:a.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:c,intersect:void 0,type:a.type,padding:d??(0,i.zj)()?.block?.padding??0,widthInColumns:a.widthInColumns??1}}async function bk(a,b,c){let d=bj(b,c,!1);if("group"===d.type)return;let e=(0,i.zj)(),f=await bh(a,d,{config:e}),g=f.node().getBBox(),h=c.getBlock(d.id);h.size={width:g.width,height:g.height,x:0,y:0,node:f},c.setBlock(h),f.remove()}async function bl(a,b,c){let d=bj(b,c,!0);if("space"!==c.getBlock(d.id).type){let c=(0,i.zj)();await bh(a,d,{config:c}),b.intersect=d?.intersect,bi(d)}}async function bm(a,b,c,d){for(let e of b)await d(a,e,c),e.children&&await bm(a,e.children,c,d)}async function bn(a,b,c){await bm(a,b,c,bk)}async function bo(a,b,c){await bm(a,b,c,bl)}async function bp(a,b,c,d,e){let f=new s.T({multigraph:!0,compound:!0});for(let a of(f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),c))a.size&&f.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(let c of b)if(c.start&&c.end){let b=d.getBlock(c.start),g=d.getBlock(c.end);if(b?.size&&g?.size){let d=b.size,h=g.size,i=[{x:d.x,y:d.y},{x:d.x+(h.x-d.x)/2,y:d.y+(h.y-d.y)/2},{x:h.x,y:h.y}],j=e?`${e}-${c.id}`:c.id,k="thick"===c.thickness?"edge-thickness-thick":"edge-thickness-normal",l="dotted"===c.pattern?"edge-pattern-dotted":"edge-pattern-solid",m=`${k} ${l} flowchart-link LS-a1 LE-b1`;aG(a,{v:c.start,w:c.end,name:j},{...c,id:j,arrowTypeEnd:c.arrowTypeEnd,arrowTypeStart:c.arrowTypeStart,points:i,classes:m},void 0,"block",f,e),c.label&&(await aA(a,{...c,label:c.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:c.arrowTypeEnd,arrowTypeStart:c.arrowTypeStart,points:i,classes:m}),aC({...c,x:i[1].x,y:i[1].y},{originalPath:i}))}}}(0,j.K2)(bj,"getNodeFromBlock"),(0,j.K2)(bk,"calculateBlockSize"),(0,j.K2)(bl,"insertBlockPositioned"),(0,j.K2)(bm,"performOperations"),(0,j.K2)(bn,"calculateBlockSizes"),(0,j.K2)(bo,"insertBlocks"),(0,j.K2)(bp,"insertEdges");var bq=(0,j.K2)(function(a,b){return b.db.getClasses()},"getClasses"),br={parser:t,db:ab,renderer:{draw:(0,j.K2)(async function(a,b,c,d){let e,{securityLevel:f,block:g}=(0,i.zj)(),h=d.db;h.setDiagramId(b),"sandbox"===f&&(e=(0,r.Ltv)("#i"+b));let k="sandbox"===f?(0,r.Ltv)(e.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),l="sandbox"===f?k.select(`[id="${b}"]`):(0,r.Ltv)(`[id="${b}"]`);ae(l,["point","circle","cross"],d.type,b);let m=h.getBlocks(),n=h.getBlocksFlat(),o=h.getEdges(),p=l.insert("g").attr("class","block");await bn(p,m,h);let q=at(h);if(await bo(p,m,h),await bp(p,o,n,h,b),q){let a=Math.max(1,Math.round(.125*(q.width/q.height))),b=q.height+a+10,c=q.width+10,{useMaxWidth:d}=g;(0,i.a$)(l,b,c,!!d),j.Rm.debug("Here Bounds",q,q),l.attr("viewBox",`${q.x-5} ${q.y-5} ${q.width+10} ${q.height+10}`)}},"draw"),getClasses:bq},styles:ad}}};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";exports.id=416,exports.ids=[416],exports.modules={54422:(a,b,c)=>{function d(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}c.d(b,{S:()=>d}),(0,c(57440).K2)(d,"populateCommonDb")},60416:(a,b,c)=>{c.d(b,{diagram:()=>L});var d=c(1389),e=c(54422),f=c(38371),g=c(10340),h=c(57440),i=c(20383),j=(0,h.K2)((a,b)=>{let c=a<=1?100*a:a;if(c<0||c>100)throw Error(`${b} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return c},"toPercent"),k=(0,h.K2)((a,b,c)=>({x:j(b,`${c} evolution`),y:j(a,`${c} visibility`)}),"toCoordinates"),l=(0,h.K2)(a=>{if(a){if("+<>"===a)return"bidirectional";if("+<"===a)return"backward";if("+>"===a)return"forward"}},"getFlowFromPort"),m=(0,h.K2)(a=>{if(!a?.startsWith("+"))return{};let b=/^\+'([^']*)'/.exec(a),c=b?.[1];return a.includes("<>")?{flow:"bidirectional",label:c}:a.includes("<")?{flow:"backward",label:c}:a.includes(">")?{flow:"forward",label:c}:{label:c}},"extractFlowFromArrow"),n=(0,h.K2)((a,b)=>{if((0,e.S)(a,b),a.size&&b.setSize(a.size.width,a.size.height),a.evolution){let c=a.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),d=a.evolution.stages.filter(a=>void 0!==a.boundary).map(a=>a.boundary);b.updateAxes({stages:c,stageBoundaries:d})}if(a.anchors.forEach(a=>{let c=k(a.visibility,a.evolution,`Anchor "${a.name}"`);b.addNode(a.name,a.name,c.x,c.y,"anchor")}),a.components.forEach(a=>{let c=k(a.visibility,a.evolution,`Component "${a.name}"`),d=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,e=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,f=a.decorator?.strategy;b.addNode(a.name,a.name,c.x,c.y,"component",d,e,a.inertia,f)}),a.notes.forEach(a=>{let c=k(a.visibility,a.evolution,`Note "${a.text}"`);b.addNote(a.text,c.x,c.y)}),a.pipelines.forEach(a=>{let c=b.getNode(a.parent);if(!c||"number"!=typeof c.y)throw Error(`Pipeline "${a.parent}" must reference an existing component with coordinates.`);let d=c.y;b.startPipeline(a.parent),a.components.forEach(c=>{let e=`${a.parent}_${c.name}`,f=c.label?(c.label.negX?-1:1)*c.label.offsetX:void 0,g=c.label?(c.label.negY?-1:1)*c.label.offsetY:void 0,h=j(c.evolution,`Pipeline component "${c.name}" evolution`);b.addNode(e,c.name,h,d,"pipeline-component",f,g),b.addPipelineComponent(a.parent,e)})}),a.links.forEach(a=>{let c=!!a.arrow&&(a.arrow.includes("-.->")||a.arrow.includes(".-.")),d=l(a.fromPort)??l(a.toPort),{flow:e,label:f}=m(a.arrow);!d&&e&&(d=e);let g=a.linkLabel;b.addLink(b.resolveNodeId(a.from),b.resolveNodeId(a.to),c,f??g,d)}),a.evolves.forEach(a=>{let c=b.getNode(a.component);if(c?.y!==void 0){let d=j(a.target,`Evolve target for "${a.component}"`);b.addTrend(a.component,d,c.y)}}),a.annotations.length>0){let c=a.annotations[0],d=k(c.x,c.y,"Annotations box");b.setAnnotationsBox(d.x,d.y)}a.annotation.forEach(a=>{let c=k(a.x,a.y,`Annotation ${a.number}`);b.addAnnotation(a.number,[{x:c.x,y:c.y}],a.text)}),a.accelerators.forEach(a=>{let c=k(a.x,a.y,`Accelerator "${a.name}"`);b.addAccelerator(a.name,c.x,c.y)}),a.deaccelerators.forEach(a=>{let c=k(a.x,a.y,`Deaccelerator "${a.name}"`);b.addDeaccelerator(a.name,c.x,c.y)})},"populateDb"),o={parser:{yy:void 0},parse:(0,h.K2)(async a=>{let b=await (0,i.qg)("wardley",a);h.Rm.debug(b);let c=o.parser?.yy;if(!c||"function"!=typeof c.addNode)throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");n(b,c)},"parse")},p=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{(0,h.K2)(this,"WardleyBuilder")}addNode(a){let b=this.nodes.get(a.id)??{id:a.id,label:a.label},c={...b,...a,className:a.className??b.className,labelOffsetX:a.labelOffsetX??b.labelOffsetX,labelOffsetY:a.labelOffsetY??b.labelOffsetY};this.nodes.set(a.id,c)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let b=this.nodes.get(a);b&&(b.isPipelineParent=!0)}addPipelineComponent(a,b){let c=this.pipelines.get(a);c&&c.componentIds.push(b);let d=this.nodes.get(b);d&&(d.inPipeline=!0)}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,b){this.annotationsBox={x:a,y:b}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,b){this.size={width:a,height:b}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[b,c]of this.nodes)if(c.label===a)return b;return a}build(){let a=[];for(let b of this.nodes.values()){if("number"!=typeof b.x||"number"!=typeof b.y)throw Error(`Node "${b.label}" is missing coordinates`);a.push(b)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function q(){return(0,g.D7)()["wardley-beta"]}function r(a,b,c,d,e,f,g,h,i){p.addNode({id:a,label:b,x:c,y:d,className:e,labelOffsetX:f,labelOffsetY:g,inertia:h,sourceStrategy:i})}function s(a,b,c=!1,d,e){p.addLink({source:a,target:b,dashed:c,label:d,flow:e})}function t(a,b,c){p.addTrend({nodeId:a,targetX:b,targetY:c})}function u(a,b,c){p.addAnnotation({number:a,coordinates:b,text:c})}function v(a,b,c){p.addNote({text:a,x:b,y:c})}function w(a,b,c){p.addAccelerator({name:a,x:b,y:c})}function x(a,b,c){p.addDeaccelerator({name:a,x:b,y:c})}function y(a,b){p.setAnnotationsBox(a,b)}function z(a,b){p.setSize(a,b)}function A(a){p.startPipeline(a)}function B(a,b){p.addPipelineComponent(a,b)}function C(a){p.setAxes(a)}function D(a){return p.getNode(a)}function E(a){return p.resolveNodeId(a)}function F(){return p.build()}function G(){p.clear(),(0,g.IU)()}(0,h.K2)(q,"getConfig"),(0,h.K2)(r,"addNode"),(0,h.K2)(s,"addLink"),(0,h.K2)(t,"addTrend"),(0,h.K2)(u,"addAnnotation"),(0,h.K2)(v,"addNote"),(0,h.K2)(w,"addAccelerator"),(0,h.K2)(x,"addDeaccelerator"),(0,h.K2)(y,"setAnnotationsBox"),(0,h.K2)(z,"setSize"),(0,h.K2)(A,"startPipeline"),(0,h.K2)(B,"addPipelineComponent"),(0,h.K2)(C,"updateAxes"),(0,h.K2)(D,"getNode"),(0,h.K2)(E,"resolveNodeId"),(0,h.K2)(F,"getWardleyData"),(0,h.K2)(G,"clear");var H={getConfig:q,addNode:r,addLink:s,addTrend:t,addAnnotation:u,addNote:v,addAccelerator:w,addDeaccelerator:x,setAnnotationsBox:y,setSize:z,startPipeline:A,addPipelineComponent:B,updateAxes:C,getNode:D,resolveNodeId:E,getWardleyData:F,clear:G,setAccTitle:g.SV,getAccTitle:g.iN,setDiagramTitle:g.ke,getDiagramTitle:g.ab,getAccDescription:g.m7,setAccDescription:g.EI},I=["Genesis","Custom Built","Product","Commodity"],J=(0,h.K2)(()=>{let{themeVariables:a}=(0,g.D7)();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),K=(0,h.K2)(()=>{let a=(0,g.D7)()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),L={parser:o,db:H,renderer:{draw:(0,h.K2)((a,b,c,e)=>{h.Rm.debug("Rendering Wardley map\n"+a);let f=K(),i=J(),j=1.6*f.nodeRadius,k=e.db,l=k.getWardleyData(),m=k.getDiagramTitle(),n=l.size?.width??f.width,o=l.size?.height??f.height,p=(0,d.D)(b);p.selectAll("*").remove(),(0,g.a$)(p,o,n,f.useMaxWidth),p.attr("viewBox",`0 0 ${n} ${o}`);let q=p.append("g").attr("class","wardley-map"),r=p.append("defs");r.append("marker").attr("id",`arrow-${b}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",i.evolutionStroke).attr("stroke","none"),r.append("marker").attr("id",`link-arrow-end-${b}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",i.linkStroke).attr("stroke","none"),r.append("marker").attr("id",`link-arrow-start-${b}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",i.linkStroke).attr("stroke","none"),q.append("rect").attr("class","wardley-background").attr("width",n).attr("height",o).attr("fill",i.backgroundColor);let s=n-2*f.padding,t=o-2*f.padding;m&&q.append("text").attr("class","wardley-title").attr("x",n/2).attr("y",f.padding/2).attr("fill",i.axisTextColor).attr("font-size",1.05*f.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(m);let u=(0,h.K2)(a=>f.padding+a/100*s,"projectX"),v=(0,h.K2)(a=>o-f.padding-a/100*t,"projectY"),w=q.append("g").attr("class","wardley-axes");w.append("line").attr("x1",f.padding).attr("x2",n-f.padding).attr("y1",o-f.padding).attr("y2",o-f.padding).attr("stroke",i.axisColor).attr("stroke-width",1),w.append("line").attr("x1",f.padding).attr("x2",f.padding).attr("y1",f.padding).attr("y2",o-f.padding).attr("stroke",i.axisColor).attr("stroke-width",1);let x=l.axes.xLabel??"Evolution",y=l.axes.yLabel??"Visibility";w.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",f.padding+s/2).attr("y",o-f.padding/4).attr("fill",i.axisTextColor).attr("font-size",f.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(x),w.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",f.padding/3).attr("y",f.padding+t/2).attr("fill",i.axisTextColor).attr("font-size",f.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${f.padding/3} ${f.padding+t/2})`).text(y);let z=l.axes.stages&&l.axes.stages.length>0?l.axes.stages:I;if(z.length>0){let a=q.append("g").attr("class","wardley-stages"),b=l.axes.stageBoundaries,c=[];if(b&&b.length===z.length){let a=0;b.forEach(b=>{c.push({start:a,end:b}),a=b})}else{let a=1/z.length;z.forEach((b,d)=>{c.push({start:d*a,end:(d+1)*a})})}z.forEach((b,d)=>{let e=c[d],g=f.padding+e.start*s,h=(g+(f.padding+e.end*s))/2;d>0&&a.append("line").attr("x1",g).attr("x2",g).attr("y1",f.padding).attr("y2",o-f.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),a.append("text").attr("class","wardley-stage-label").attr("x",h).attr("y",o-f.padding/1.5).attr("fill",i.axisTextColor).attr("font-size",f.axisFontSize-2).attr("text-anchor","middle").text(b)})}if(f.showGrid){let a=q.append("g").attr("class","wardley-grid");for(let b=1;b<4;b++){let c=b/4,d=f.padding+s*c;a.append("line").attr("x1",d).attr("x2",d).attr("y1",f.padding).attr("y2",o-f.padding).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6"),a.append("line").attr("x1",f.padding).attr("x2",n-f.padding).attr("y1",o-f.padding-t*c).attr("y2",o-f.padding-t*c).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6")}}let A=new Map;if(l.nodes.forEach(a=>{A.set(a.id,{x:u(a.x),y:v(a.y),node:a})}),l.pipelines.length>0){let a=q.append("g").attr("class","wardley-pipelines"),b=q.append("g").attr("class","wardley-pipeline-links");l.pipelines.forEach(c=>{if(0===c.componentIds.length)return;let d=c.componentIds.map(a=>({id:a,pos:A.get(a),node:l.nodes.find(b=>b.id===a)})).filter(a=>a.pos&&a.node).sort((a,b)=>a.node.x-b.node.x);for(let a=0;a<d.length-1;a++){let c=d[a],e=d[a+1];b.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",c.pos.x).attr("y1",c.pos.y).attr("x2",e.pos.x).attr("y2",e.pos.y).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let e=1/0,g=-1/0,h=0;if(c.componentIds.forEach(a=>{let b=A.get(a);b&&(e=Math.min(e,b.x),g=Math.max(g,b.x),h=b.y)}),e!==1/0&&g!==-1/0){let b=4*f.nodeRadius,d=h-b/2,k=A.get(c.nodeId);k&&(k.x=(e+g)/2,k.y=d-j/6),a.append("rect").attr("class","wardley-pipeline-box").attr("x",e-15).attr("y",d).attr("width",g-e+30).attr("height",b).attr("fill","none").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let B=q.append("g").attr("class","wardley-links"),C=new Map;l.pipelines.forEach(a=>{C.set(a.nodeId,new Set(a.componentIds))});let D=l.links.filter(a=>{if(!A.has(a.source)||!A.has(a.target))return!1;let b=C.get(a.target);return!b?.has(a.source)});B.selectAll("line").data(D).enter().append("line").attr("class",a=>`wardley-link${a.dashed?" wardley-link--dashed":""}`).attr("x1",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.source).isPipelineParent?j/Math.sqrt(2):f.nodeRadius,e=c.x-b.x,g=c.y-b.y,h=Math.sqrt(e*e+g*g);return b.x+e/h*d}).attr("y1",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.source).isPipelineParent?j/Math.sqrt(2):f.nodeRadius,e=c.x-b.x,g=c.y-b.y,h=Math.sqrt(e*e+g*g);return b.y+g/h*d}).attr("x2",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.target).isPipelineParent?j/Math.sqrt(2):f.nodeRadius,e=b.x-c.x,g=b.y-c.y,h=Math.sqrt(e*e+g*g);return c.x+e/h*d}).attr("y2",a=>{let b=A.get(a.source),c=A.get(a.target),d=l.nodes.find(b=>b.id===a.target).isPipelineParent?j/Math.sqrt(2):f.nodeRadius,e=b.x-c.x,g=b.y-c.y,h=Math.sqrt(e*e+g*g);return c.y+g/h*d}).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",a=>a.dashed?"6 6":null).attr("marker-end",a=>"forward"===a.flow||"bidirectional"===a.flow?`url(#link-arrow-end-${b})`:null).attr("marker-start",a=>"backward"===a.flow||"bidirectional"===a.flow?`url(#link-arrow-start-${b})`:null),B.selectAll("text").data(D.filter(a=>a.label)).enter().append("text").attr("class","wardley-link-label").attr("x",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.x+c.x)/2,e=c.y-b.y,f=c.x-b.x,g=Math.sqrt(f*f+e*e);return d+e/g*8}).attr("y",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.y+c.y)/2,e=c.x-b.x,f=c.y-b.y,g=Math.sqrt(e*e+f*f);return d+-e/g*8}).attr("fill",i.axisTextColor).attr("font-size",f.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",a=>{let b=A.get(a.source),c=A.get(a.target),d=(b.x+c.x)/2,e=(b.y+c.y)/2,f=c.x-b.x,g=c.y-b.y,h=Math.sqrt(f*f+g*g),i=180*Math.atan2(g,f)/Math.PI;return(i>90||i<-90)&&(i+=180),`rotate(${i} ${d+g/h*8} ${e+-f/h*8})`}).text(a=>a.label);let E=q.append("g").attr("class","wardley-trends"),F=l.trends.map(a=>{let b=A.get(a.nodeId);if(!b)return null;let c=u(a.targetX),d=v(a.targetY),e=c-b.x,g=d-b.y,h=Math.sqrt(e*e+g*g),i=f.nodeRadius+2;return{origin:b,targetX:c,targetY:d,adjustedX2:h>i?c-e/h*i:c,adjustedY2:h>i?d-g/h*i:d}}).filter(a=>null!==a);E.selectAll("line").data(F).enter().append("line").attr("class","wardley-trend").attr("x1",a=>a.origin.x).attr("y1",a=>a.origin.y).attr("x2",a=>a.adjustedX2).attr("y2",a=>a.adjustedY2).attr("stroke",i.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${b})`);let G=q.append("g").attr("class","wardley-nodes").selectAll("g").data(l.nodes).enter().append("g").attr("class",a=>["wardley-node",a.className?`wardley-node--${a.className}`:""].filter(Boolean).join(" "));G.filter(a=>"outsource"===a.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*f.nodeRadius).attr("fill","#666").attr("stroke",i.componentStroke).attr("stroke-width",1),G.filter(a=>"buy"===a.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*f.nodeRadius).attr("fill","#ccc").attr("stroke",i.componentStroke).attr("stroke-width",1),G.filter(a=>"build"===a.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*f.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let H=G.filter(a=>"market"===a.sourceStrategy);H.append("circle").attr("class","wardley-market-overlay").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",2*f.nodeRadius).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),G.filter(a=>!a.isPipelineParent&&"market"!==a.sourceStrategy&&"anchor"!==a.className).append("circle").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y).attr("r",f.nodeRadius).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1);let L=.7*f.nodeRadius,M=1.2*f.nodeRadius;if(H.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x).attr("y1",a=>A.get(a.id).y-M).attr("x2",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("y2",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),H.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("y1",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("x2",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("y2",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),H.append("line").attr("class","wardley-market-line").attr("x1",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("y1",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("x2",a=>A.get(a.id).x).attr("y2",a=>A.get(a.id).y-M).attr("stroke",i.componentStroke).attr("stroke-width",1),H.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x).attr("cy",a=>A.get(a.id).y-M).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),H.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x-M*Math.cos(Math.PI/6)).attr("cy",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),H.append("circle").attr("class","wardley-market-dot").attr("cx",a=>A.get(a.id).x+M*Math.cos(Math.PI/6)).attr("cy",a=>A.get(a.id).y+M*Math.sin(Math.PI/6)).attr("r",L).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),G.filter(a=>!0===a.isPipelineParent).append("rect").attr("x",a=>A.get(a.id).x-j/2).attr("y",a=>A.get(a.id).y-j/2).attr("width",j).attr("height",j).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1),G.filter(a=>!0===a.inertia).append("line").attr("class","wardley-inertia").attr("x1",a=>{let b=A.get(a.id),c=a.isPipelineParent?j/2+15:f.nodeRadius+15;return a.sourceStrategy&&(c+=f.nodeRadius+10),b.x+c}).attr("y1",a=>{let b=A.get(a.id),c=a.isPipelineParent?j:2*f.nodeRadius;return b.y-c/2}).attr("x2",a=>{let b=A.get(a.id),c=a.isPipelineParent?j/2+15:f.nodeRadius+15;return a.sourceStrategy&&(c+=f.nodeRadius+10),b.x+c}).attr("y2",a=>{let b=A.get(a.id),c=a.isPipelineParent?j:2*f.nodeRadius;return b.y+c/2}).attr("stroke",i.componentStroke).attr("stroke-width",6),G.append("text").attr("x",a=>{let b=A.get(a.id);if("anchor"===a.className)return void 0!==a.labelOffsetX?b.x+a.labelOffsetX:b.x;let c=f.nodeLabelOffset;a.sourceStrategy&&void 0===a.labelOffsetX&&(c+=10);let d=a.labelOffsetX??c;return b.x+d}).attr("y",a=>{let b=A.get(a.id);if("anchor"===a.className)return void 0!==a.labelOffsetY?b.y+a.labelOffsetY:b.y-3;let c=-f.nodeLabelOffset;a.sourceStrategy&&void 0===a.labelOffsetY&&(c-=10);let d=a.labelOffsetY??c;return b.y+d}).attr("class","wardley-node-label").attr("fill",a=>"evolved"===a.className?i.evolutionStroke:"anchor"===a.className?"#000":i.componentLabelColor).attr("font-size",f.labelFontSize).attr("font-weight",a=>"anchor"===a.className?"bold":"normal").attr("text-anchor",a=>"anchor"===a.className?"middle":"start").attr("dominant-baseline",a=>"anchor"===a.className?"middle":"auto").text(a=>a.label),l.annotations.length>0){let a=q.append("g").attr("class","wardley-annotations");if(l.annotations.forEach(b=>{let c=b.coordinates.map(a=>({x:u(a.x),y:v(a.y)}));if(c.length>1)for(let b=0;b<c.length-1;b++)a.append("line").attr("class","wardley-annotation-line").attr("x1",c[b].x).attr("y1",c[b].y).attr("x2",c[b+1].x).attr("y2",c[b+1].y).attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");c.forEach(c=>{let d=a.append("g").attr("class","wardley-annotation");d.append("circle").attr("cx",c.x).attr("cy",c.y).attr("r",10).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5),d.append("text").attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.number)})}),l.annotationsBox){let b=u(l.annotationsBox.x),c=v(l.annotationsBox.y),d=a.append("g").attr("class","wardley-annotations-box"),e=[...l.annotations].filter(a=>a.text).sort((a,b)=>a.number-b.number),g=[];if(e.forEach((a,e)=>{let f=d.append("text").attr("x",b+10).attr("y",c+10+(e+1)*16).attr("font-size",11).attr("fill",i.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${a.number}. ${a.text}`);g.push(f)}),g.length>0){let a=0,h=0;g.forEach(b=>{let c=b.node(),d=c.getComputedTextLength();a=Math.max(a,d);let e=c.getBBox();h=Math.max(h,e.height)});let j=a+20+105,k=16*e.length+20+h/2,l=f.padding,m=n-f.padding-j,p=f.padding,q=o-f.padding-k;b=Math.max(l,Math.min(b,m)),c=Math.max(p,Math.min(c,q)),g.forEach((a,d)=>{a.attr("x",b+10).attr("y",c+10+(d+1)*16)}),d.insert("rect","text").attr("x",b).attr("y",c).attr("width",j).attr("height",k).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(l.notes.length>0){let a=q.append("g").attr("class","wardley-notes");l.notes.forEach(b=>{let c=u(b.x),d=v(b.y);a.append("text").attr("x",c).attr("y",d).attr("text-anchor","start").attr("font-size",11).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.text)})}if(l.accelerators.length>0){let a=q.append("g").attr("class","wardley-accelerators");l.accelerators.forEach(b=>{let c=u(b.x),d=v(b.y),e=`
|
|
2
|
+
M ${c} ${d-15}
|
|
3
|
+
L ${c+60-20} ${d-15}
|
|
4
|
+
L ${c+60-20} ${d-15-8}
|
|
5
|
+
L ${c+60} ${d}
|
|
6
|
+
L ${c+60-20} ${d+15+8}
|
|
7
|
+
L ${c+60-20} ${d+15}
|
|
8
|
+
L ${c} ${d+15}
|
|
9
|
+
Z
|
|
10
|
+
`;a.append("path").attr("d",e).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),a.append("text").attr("x",c+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.name)})}if(l.deaccelerators.length>0){let a=q.append("g").attr("class","wardley-deaccelerators");l.deaccelerators.forEach(b=>{let c=u(b.x),d=v(b.y),e=`
|
|
11
|
+
M ${c+60} ${d-15}
|
|
12
|
+
L ${c+20} ${d-15}
|
|
13
|
+
L ${c+20} ${d-15-8}
|
|
14
|
+
L ${c} ${d}
|
|
15
|
+
L ${c+20} ${d+15+8}
|
|
16
|
+
L ${c+20} ${d+15}
|
|
17
|
+
L ${c+60} ${d+15}
|
|
18
|
+
Z
|
|
19
|
+
`;a.append("path").attr("d",e).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),a.append("text").attr("x",c+30).attr("y",d+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(b.name)})}},"draw")},styles:(0,h.K2)(({wardley:a}={})=>{let b=(0,g.P$)(),c=(0,g.zj)(),d=(0,f.$t)(b,c.themeVariables),e=(0,f.$t)(d.wardley,a);return`
|
|
20
|
+
.wardley-background {
|
|
21
|
+
fill: ${e.backgroundColor};
|
|
22
|
+
}
|
|
23
|
+
.wardley-axes line, .wardley-axes path {
|
|
24
|
+
stroke: ${e.axisColor};
|
|
25
|
+
}
|
|
26
|
+
.wardley-axis-label {
|
|
27
|
+
fill: ${e.axisTextColor};
|
|
28
|
+
}
|
|
29
|
+
.wardley-stage-label {
|
|
30
|
+
fill: ${e.axisTextColor};
|
|
31
|
+
}
|
|
32
|
+
.wardley-grid line {
|
|
33
|
+
stroke: ${e.gridColor};
|
|
34
|
+
}
|
|
35
|
+
.wardley-node circle {
|
|
36
|
+
fill: ${e.componentFill};
|
|
37
|
+
stroke: ${e.componentStroke};
|
|
38
|
+
}
|
|
39
|
+
.wardley-node-label {
|
|
40
|
+
fill: ${e.componentLabelColor};
|
|
41
|
+
}
|
|
42
|
+
.wardley-link {
|
|
43
|
+
stroke: ${e.linkStroke};
|
|
44
|
+
}
|
|
45
|
+
.wardley-link--dashed {
|
|
46
|
+
stroke-dasharray: 4 4;
|
|
47
|
+
}
|
|
48
|
+
.wardley-link-label {
|
|
49
|
+
fill: ${e.axisTextColor};
|
|
50
|
+
}
|
|
51
|
+
.wardley-trend line {
|
|
52
|
+
stroke: ${e.evolutionStroke};
|
|
53
|
+
}
|
|
54
|
+
.wardley-annotation-line {
|
|
55
|
+
stroke: ${e.annotationStroke};
|
|
56
|
+
}
|
|
57
|
+
.wardley-annotation circle {
|
|
58
|
+
fill: ${e.annotationFill};
|
|
59
|
+
stroke: ${e.annotationStroke};
|
|
60
|
+
}
|
|
61
|
+
.wardley-annotation text {
|
|
62
|
+
fill: ${e.annotationTextColor};
|
|
63
|
+
}
|
|
64
|
+
.wardley-annotations-box rect {
|
|
65
|
+
fill: ${e.annotationFill};
|
|
66
|
+
stroke: ${e.annotationStroke};
|
|
67
|
+
}
|
|
68
|
+
.wardley-annotations-box text {
|
|
69
|
+
fill: ${e.annotationTextColor};
|
|
70
|
+
}
|
|
71
|
+
.wardley-pipeline-box {
|
|
72
|
+
stroke: ${e.componentStroke};
|
|
73
|
+
}
|
|
74
|
+
.wardley-notes text {
|
|
75
|
+
fill: ${e.axisTextColor};
|
|
76
|
+
}
|
|
77
|
+
`},"styles")}}};
|