{"version":3,"file":"c4Diagram-a7af8508.js","sources":["../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/c4/styles.js","../src/diagrams/c4/c4Diagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n[\\}] { this.popState(); }\n[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { this.begin(\"container_ext\"); return 'CONTAINER_EXT';}\n\"ContainerQueue\" { this.begin(\"container_queue\"); return 'CONTAINER_QUEUE';}\n\"ContainerDb\" { this.begin(\"container_db\"); return 'CONTAINER_DB';}\n\"Container\" { this.begin(\"container\"); return 'CONTAINER';}\n\n\"Container_Boundary\" { this.begin(\"container_boundary\"); return 'CONTAINER_BOUNDARY';}\n\n\"ComponentQueue_Ext\" { this.begin(\"component_ext_queue\"); return 'COMPONENT_EXT_QUEUE';}\n\"ComponentDb_Ext\" { this.begin(\"component_ext_db\"); return 'COMPONENT_EXT_DB';}\n\"Component_Ext\" { this.begin(\"component_ext\"); return 'COMPONENT_EXT';}\n\"ComponentQueue\" { this.begin(\"component_queue\"); return 'COMPONENT_QUEUE';}\n\"ComponentDb\" { this.begin(\"component_db\"); return 'COMPONENT_DB';}\n\"Component\" { this.begin(\"component\"); return 'COMPONENT';}\n\n\"Deployment_Node\" { this.begin(\"node\"); return 'NODE';}\n\"Node\" { this.begin(\"node\"); return 'NODE';}\n\"Node_L\" { this.begin(\"node_l\"); return 'NODE_L';}\n\"Node_R\" { this.begin(\"node_r\"); return 'NODE_R';}\n\n\n\"Rel\" { this.begin(\"rel\"); return 'REL';} \n\"BiRel\" { this.begin(\"birel\"); return 'BIREL';} \n\"Rel_Up\" { this.begin(\"rel_u\"); return 'REL_U';} \n\"Rel_U\" { this.begin(\"rel_u\"); return 'REL_U';} \n\"Rel_Down\" { this.begin(\"rel_d\"); return 'REL_D';} \n\"Rel_D\" { this.begin(\"rel_d\"); return 'REL_D';} \n\"Rel_Left\" { this.begin(\"rel_l\"); return 'REL_L';} \n\"Rel_L\" { this.begin(\"rel_l\"); return 'REL_L';} \n\"Rel_Right\" { this.begin(\"rel_r\"); return 'REL_R';} \n\"Rel_R\" { this.begin(\"rel_r\"); return 'REL_R';} \n\"Rel_Back\" { this.begin(\"rel_b\"); return 'REL_B';} \n\"RelIndex\" { this.begin(\"rel_index\"); return 'REL_INDEX';} \n\n\"UpdateElementStyle\" { this.begin(\"update_el_style\"); return 'UPDATE_EL_STYLE';} \n\"UpdateRelStyle\" { this.begin(\"update_rel_style\"); return 'UPDATE_REL_STYLE';} \n\"UpdateLayoutConfig\" { this.begin(\"update_layout_config\"); return 'UPDATE_LAYOUT_CONFIG';} \n\n<> return \"EOF_IN_STRUCT\";\n[(][ ]*[,] { this.begin(\"attribute\"); return \"ATTRIBUTE_EMPTY\";}\n[(] { this.begin(\"attribute\"); }\n[)] { this.popState();this.popState();}\n\n\",,\" { return 'ATTRIBUTE_EMPTY';}\n\",\" { }\n[ ]*[\"][\"] { return 'ATTRIBUTE_EMPTY';}\n[ ]*[\"] { this.begin(\"string\");}\n[\"] { this.popState(); }\n[^\"]* { return \"STR\";}\n\n[ ]*[\\$] { this.begin(\"string_kv\");}\n[^=]* { this.begin(\"string_kv_key\"); return \"STR_KEY\";}\n[=][ ]*[\"] { this.popState(); this.begin(\"string_kv_value\"); }\n[^\"]+ { return \"STR_VALUE\";}\n[\"] { this.popState(); this.popState(); }\n\n[^,]+ { return \"STR\";}\n\n'{' { /* this.begin(\"lbrace\"); */ return \"LBRACE\";}\n'}' { /* this.popState(); */ return \"RBRACE\";}\n \n[\\s]+ return 'SPACE';\n[\\n\\r]+ return 'EOL';\n<> return 'EOF';\n\n/lex\n\n/* operator associations and precedence */\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n : mermaidDoc\n | direction\n | directive start\n ;\n\ndirection\n : direction_tb\n { yy.setDirection('TB');}\n | direction_bt\n { yy.setDirection('BT');}\n | direction_rl\n { yy.setDirection('RL');}\n | direction_lr\n { yy.setDirection('LR');}\n ;\n\nmermaidDoc\n : graphConfig\n ;\n\ndirective\n : openDirective typeDirective closeDirective NEWLINE\n | openDirective typeDirective ':' argDirective closeDirective NEWLINE\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'c4Context'); }\n ;\n\ngraphConfig\n : C4_CONTEXT NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_CONTAINER NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_COMPONENT NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_DYNAMIC NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_DEPLOYMENT NEWLINE statements EOF {yy.setC4Type($1)}\n ;\n\nstatements\n : otherStatements\n | diagramStatements\n | otherStatements diagramStatements \n ;\n\notherStatements\n : otherStatement\n | otherStatement NEWLINE\n | otherStatement NEWLINE otherStatements\n ;\n\notherStatement\n : title {yy.setTitle($1.substring(6));$$=$1.substring(6);}\n | accDescription {yy.setAccDescription($1.substring(15));$$=$1.substring(15);} \n | acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } \n ;\n\nboundaryStatement\n : boundaryStartStatement diagramStatements boundaryStopStatement\n ;\n\nboundaryStartStatement\n : boundaryStart LBRACE NEWLINE\n | boundaryStart NEWLINE LBRACE\n | boundaryStart NEWLINE LBRACE NEWLINE\n ;\n\nboundaryStart\n : ENTERPRISE_BOUNDARY attributes {$2.splice(2, 0, 'ENTERPRISE'); yy.addPersonOrSystemBoundary(...$2); $$=$2;}\n | SYSTEM_BOUNDARY attributes {$2.splice(2, 0, 'ENTERPRISE'); yy.addPersonOrSystemBoundary(...$2); $$=$2;}\n | BOUNDARY attributes {yy.addPersonOrSystemBoundary(...$2); $$=$2;}\n | CONTAINER_BOUNDARY attributes {$2.splice(2, 0, 'CONTAINER'); yy.addContainerBoundary(...$2); $$=$2;}\n | NODE attributes {yy.addDeploymentNode('node', ...$2); $$=$2;}\n | NODE_L attributes {yy.addDeploymentNode('nodeL', ...$2); $$=$2;}\n | NODE_R attributes {yy.addDeploymentNode('nodeR', ...$2); $$=$2;}\n ;\n\nboundaryStopStatement\n : RBRACE { yy.popBoundaryParseStack() }\n ;\n\ndiagramStatements\n : diagramStatement\n | diagramStatement NEWLINE\n | diagramStatement NEWLINE statements \n ;\n\ndiagramStatement\n : PERSON attributes {yy.addPersonOrSystem('person', ...$2); $$=$2;}\n | PERSON_EXT attributes {yy.addPersonOrSystem('external_person', ...$2); $$=$2;}\n | SYSTEM attributes {yy.addPersonOrSystem('system', ...$2); $$=$2;}\n | SYSTEM_DB attributes {yy.addPersonOrSystem('system_db', ...$2); $$=$2;}\n | SYSTEM_QUEUE attributes {yy.addPersonOrSystem('system_queue', ...$2); $$=$2;}\n | SYSTEM_EXT attributes {yy.addPersonOrSystem('external_system', ...$2); $$=$2;}\n | SYSTEM_EXT_DB attributes {yy.addPersonOrSystem('external_system_db', ...$2); $$=$2;}\n | SYSTEM_EXT_QUEUE attributes {yy.addPersonOrSystem('external_system_queue', ...$2); $$=$2;} \n | CONTAINER attributes {yy.addContainer('container', ...$2); $$=$2;}\n | CONTAINER_DB attributes {yy.addContainer('container_db', ...$2); $$=$2;}\n | CONTAINER_QUEUE attributes {yy.addContainer('container_queue', ...$2); $$=$2;}\n | CONTAINER_EXT attributes {yy.addContainer('external_container', ...$2); $$=$2;}\n | CONTAINER_EXT_DB attributes {yy.addContainer('external_container_db', ...$2); $$=$2;}\n | CONTAINER_EXT_QUEUE attributes {yy.addContainer('external_container_queue', ...$2); $$=$2;} \n | COMPONENT attributes {yy.addComponent('component', ...$2); $$=$2;}\n | COMPONENT_DB attributes {yy.addComponent('component_db', ...$2); $$=$2;}\n | COMPONENT_QUEUE attributes {yy.addComponent('component_queue', ...$2); $$=$2;}\n | COMPONENT_EXT attributes {yy.addComponent('external_component', ...$2); $$=$2;}\n | COMPONENT_EXT_DB attributes {yy.addComponent('external_component_db', ...$2); $$=$2;}\n | COMPONENT_EXT_QUEUE attributes {yy.addComponent('external_component_queue', ...$2); $$=$2;} \n | boundaryStatement\n | REL attributes {yy.addRel('rel', ...$2); $$=$2;}\n | BIREL attributes {yy.addRel('birel', ...$2); $$=$2;}\n | REL_U attributes {yy.addRel('rel_u', ...$2); $$=$2;}\n | REL_D attributes {yy.addRel('rel_d', ...$2); $$=$2;}\n | REL_L attributes {yy.addRel('rel_l', ...$2); $$=$2;}\n | REL_R attributes {yy.addRel('rel_r', ...$2); $$=$2;}\n | REL_B attributes {yy.addRel('rel_b', ...$2); $$=$2;}\n | REL_INDEX attributes {$2.splice(0, 1); yy.addRel('rel', ...$2); $$=$2;}\n | UPDATE_EL_STYLE attributes {yy.updateElStyle('update_el_style', ...$2); $$=$2;}\n | UPDATE_REL_STYLE attributes {yy.updateRelStyle('update_rel_style', ...$2); $$=$2;}\n | UPDATE_LAYOUT_CONFIG attributes {yy.updateLayoutConfig('update_layout_config', ...$2); $$=$2;}\n ;\n\nattributes\n : attribute { $$ = [$1]; }\n | attribute attributes { $2.unshift($1); $$=$2;}\n ;\n\nattribute\n : STR { $$ = $1.trim(); }\n | STR_KEY STR_VALUE { let kv={}; kv[$1.trim()]=$2.trim(); $$=kv; }\n | ATTRIBUTE { $$ = $1.trim(); }\n | ATTRIBUTE_EMPTY { $$ = \"\"; }\n ;\n","import mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\nimport { sanitizeText } from '../common/common';\nimport { setAccTitle, getAccTitle, getAccDescription, setAccDescription } from '../../commonDb';\n\nlet c4ShapeArray = [];\nlet boundaryParseStack = [''];\nlet currentBoundaryParse = 'global';\nlet parentBoundaryParse = '';\nlet boundarys = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n];\nlet rels = [];\nlet title = '';\nlet wrapEnabled = false;\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\nvar c4Type;\n\nexport const getC4Type = function () {\n return c4Type;\n};\n\nexport const setC4Type = function (c4TypeParam) {\n let sanitizedText = sanitizeText(c4TypeParam, configApi.getConfig());\n c4Type = sanitizedText;\n};\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\n//type, from, to, label, ?techn, ?descr, ?sprite, ?tags, $link\nexport const addRel = function (type, from, to, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (\n type === undefined ||\n type === null ||\n from === undefined ||\n from === null ||\n to === undefined ||\n to === null ||\n label === undefined ||\n label === null\n ) {\n return;\n }\n\n let rel = {};\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old) {\n rel = old;\n } else {\n rels.push(rel);\n }\n\n rel.type = type;\n rel.from = from;\n rel.to = to;\n rel.label = { text: label };\n\n if (techn === undefined || techn === null) {\n rel.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n rel[key] = { text: value };\n } else {\n rel.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n rel.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n rel[key] = { text: value };\n } else {\n rel.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n rel[key] = value;\n } else {\n rel.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n rel[key] = value;\n } else {\n rel.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n rel[key] = value;\n } else {\n rel.link = link;\n }\n rel.wrap = autoWrap();\n};\n\n//type, alias, label, ?descr, ?sprite, ?tags, $link\nexport const addPersonOrSystem = function (typeC4Shape, alias, label, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let personOrSystem = {};\n const old = c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n if (old && alias === old.alias) {\n personOrSystem = old;\n } else {\n personOrSystem.alias = alias;\n c4ShapeArray.push(personOrSystem);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n personOrSystem.label = { text: '' };\n } else {\n personOrSystem.label = { text: label };\n }\n\n if (descr === undefined || descr === null) {\n personOrSystem.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n personOrSystem[key] = { text: value };\n } else {\n personOrSystem.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.link = link;\n }\n personOrSystem.typeC4Shape = { text: typeC4Shape };\n personOrSystem.parentBoundary = currentBoundaryParse;\n personOrSystem.wrap = autoWrap();\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addContainer = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let container = {};\n const old = c4ShapeArray.find((container) => container.alias === alias);\n if (old && alias === old.alias) {\n container = old;\n } else {\n container.alias = alias;\n c4ShapeArray.push(container);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n container.label = { text: '' };\n } else {\n container.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n container.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n container[key] = { text: value };\n } else {\n container.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n container.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n container[key] = { text: value };\n } else {\n container.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n container[key] = value;\n } else {\n container.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n container[key] = value;\n } else {\n container.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n container[key] = value;\n } else {\n container.link = link;\n }\n container.wrap = autoWrap();\n container.typeC4Shape = { text: typeC4Shape };\n container.parentBoundary = currentBoundaryParse;\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addComponent = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let component = {};\n const old = c4ShapeArray.find((component) => component.alias === alias);\n if (old && alias === old.alias) {\n component = old;\n } else {\n component.alias = alias;\n c4ShapeArray.push(component);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n component.label = { text: '' };\n } else {\n component.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n component.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n component[key] = { text: value };\n } else {\n component.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n component.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n component[key] = { text: value };\n } else {\n component.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n component[key] = value;\n } else {\n component.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n component[key] = value;\n } else {\n component.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n component[key] = value;\n } else {\n component.link = link;\n }\n component.wrap = autoWrap();\n component.typeC4Shape = { text: typeC4Shape };\n component.parentBoundary = currentBoundaryParse;\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addPersonOrSystemBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundarys.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'system' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addContainerBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundarys.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'container' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?descr, ?sprite, ?tags, $link\nexport const addDeploymentNode = function (\n nodeType,\n alias,\n label,\n type,\n descr,\n sprite,\n tags,\n link\n) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundarys.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'node' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (descr === undefined || descr === null) {\n boundary.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n boundary[key] = { text: value };\n } else {\n boundary.descr = { text: descr };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.nodeType = nodeType;\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\nexport const popBoundaryParseStack = function () {\n currentBoundaryParse = parentBoundaryParse;\n boundaryParseStack.pop();\n parentBoundaryParse = boundaryParseStack.pop();\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite\nexport const updateElStyle = function (\n typeC4Shape,\n elementName,\n bgColor,\n fontColor,\n borderColor,\n shadowing,\n shape,\n sprite,\n techn,\n legendText,\n legendSprite\n) {\n let old = c4ShapeArray.find((element) => element.alias === elementName);\n if (old === undefined) {\n old = boundarys.find((element) => element.alias === elementName);\n if (old === undefined) {\n return;\n }\n }\n if (bgColor !== undefined && bgColor !== null) {\n if (typeof bgColor === 'object') {\n let [key, value] = Object.entries(bgColor)[0];\n old[key] = value;\n } else {\n old.bgColor = bgColor;\n }\n }\n if (fontColor !== undefined && fontColor !== null) {\n if (typeof fontColor === 'object') {\n let [key, value] = Object.entries(fontColor)[0];\n old[key] = value;\n } else {\n old.fontColor = fontColor;\n }\n }\n if (borderColor !== undefined && borderColor !== null) {\n if (typeof borderColor === 'object') {\n let [key, value] = Object.entries(borderColor)[0];\n old[key] = value;\n } else {\n old.borderColor = borderColor;\n }\n }\n if (shadowing !== undefined && shadowing !== null) {\n if (typeof shadowing === 'object') {\n let [key, value] = Object.entries(shadowing)[0];\n old[key] = value;\n } else {\n old.shadowing = shadowing;\n }\n }\n if (shape !== undefined && shape !== null) {\n if (typeof shape === 'object') {\n let [key, value] = Object.entries(shape)[0];\n old[key] = value;\n } else {\n old.shape = shape;\n }\n }\n if (sprite !== undefined && sprite !== null) {\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n old[key] = value;\n } else {\n old.sprite = sprite;\n }\n }\n if (techn !== undefined && techn !== null) {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n old[key] = value;\n } else {\n old.techn = techn;\n }\n }\n if (legendText !== undefined && legendText !== null) {\n if (typeof legendText === 'object') {\n let [key, value] = Object.entries(legendText)[0];\n old[key] = value;\n } else {\n old.legendText = legendText;\n }\n }\n if (legendSprite !== undefined && legendSprite !== null) {\n if (typeof legendSprite === 'object') {\n let [key, value] = Object.entries(legendSprite)[0];\n old[key] = value;\n } else {\n old.legendSprite = legendSprite;\n }\n }\n};\n\n//textColor, lineColor, ?offsetX, ?offsetY\nexport const updateRelStyle = function (\n typeC4Shape,\n from,\n to,\n textColor,\n lineColor,\n offsetX,\n offsetY\n) {\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old === undefined) {\n return;\n }\n if (textColor !== undefined && textColor !== null) {\n if (typeof textColor === 'object') {\n let [key, value] = Object.entries(textColor)[0];\n old[key] = value;\n } else {\n old.textColor = textColor;\n }\n }\n if (lineColor !== undefined && lineColor !== null) {\n if (typeof lineColor === 'object') {\n let [key, value] = Object.entries(lineColor)[0];\n old[key] = value;\n } else {\n old.lineColor = lineColor;\n }\n }\n if (offsetX !== undefined && offsetX !== null) {\n if (typeof offsetX === 'object') {\n let [key, value] = Object.entries(offsetX)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetX = parseInt(offsetX);\n }\n }\n if (offsetY !== undefined && offsetY !== null) {\n if (typeof offsetY === 'object') {\n let [key, value] = Object.entries(offsetY)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetY = parseInt(offsetY);\n }\n }\n};\n\n//?c4ShapeInRow, ?c4BoundaryInRow\nexport const updateLayoutConfig = function (typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {\n let c4ShapeInRowValue = c4ShapeInRow;\n let c4BoundaryInRowValue = c4BoundaryInRow;\n\n if (typeof c4ShapeInRowParam === 'object') {\n const value = Object.values(c4ShapeInRowParam)[0];\n c4ShapeInRowValue = parseInt(value);\n } else {\n c4ShapeInRowValue = parseInt(c4ShapeInRowParam);\n }\n if (typeof c4BoundaryInRowParam === 'object') {\n const value = Object.values(c4BoundaryInRowParam)[0];\n c4BoundaryInRowValue = parseInt(value);\n } else {\n c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);\n }\n\n if (c4ShapeInRowValue >= 1) {\n c4ShapeInRow = c4ShapeInRowValue;\n }\n if (c4BoundaryInRowValue >= 1) {\n c4BoundaryInRow = c4BoundaryInRowValue;\n }\n};\n\nexport const getC4ShapeInRow = function () {\n return c4ShapeInRow;\n};\nexport const getC4BoundaryInRow = function () {\n return c4BoundaryInRow;\n};\nexport const getCurrentBoundaryParse = function () {\n return currentBoundaryParse;\n};\n\nexport const getParentBoundaryParse = function () {\n return parentBoundaryParse;\n};\n\nexport const getC4ShapeArray = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) {\n return c4ShapeArray;\n } else {\n return c4ShapeArray.filter((personOrSystem) => {\n return personOrSystem.parentBoundary === parentBoundary;\n });\n }\n};\nexport const getC4Shape = function (alias) {\n return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n};\nexport const getC4ShapeKeys = function (parentBoundary) {\n return Object.keys(getC4ShapeArray(parentBoundary));\n};\n\nexport const getBoundarys = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) {\n return boundarys;\n } else {\n return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary);\n }\n};\n\nexport const getRels = function () {\n return rels;\n};\n\nexport const getTitle = function () {\n return title;\n};\n\nexport const setWrap = function (wrapSetting) {\n wrapEnabled = wrapSetting;\n};\n\nexport const autoWrap = function () {\n return wrapEnabled;\n};\n\nexport const clear = function () {\n c4ShapeArray = [];\n boundarys = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n ];\n parentBoundaryParse = '';\n currentBoundaryParse = 'global';\n boundaryParseStack = [''];\n rels = [];\n\n boundaryParseStack = [''];\n title = '';\n wrapEnabled = false;\n c4ShapeInRow = 4;\n c4BoundaryInRow = 2;\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25,\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1,\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2,\n};\n\nexport const setTitle = function (txt) {\n let sanitizedText = sanitizeText(txt, configApi.getConfig());\n title = sanitizedText;\n};\n\nexport default {\n addPersonOrSystem,\n addPersonOrSystemBoundary,\n addContainer,\n addContainerBoundary,\n addComponent,\n addDeploymentNode,\n popBoundaryParseStack,\n addRel,\n updateElStyle,\n updateRelStyle,\n updateLayoutConfig,\n autoWrap,\n setWrap,\n getC4ShapeArray,\n getC4Shape,\n getC4ShapeKeys,\n getBoundarys,\n getCurrentBoundaryParse,\n getParentBoundaryParse,\n getRels,\n getTitle,\n getC4Type,\n getC4ShapeInRow,\n getC4BoundaryInRow,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n parseDirective,\n getConfig: () => configApi.getConfig().c4,\n clear,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n setTitle,\n setC4Type,\n // apply,\n};\n","import common from '../common/common';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nexport const drawRect = function (elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (rectData.attrs !== 'undefined' && rectData.attrs !== null) {\n for (let attrKey in rectData.attrs) {\n rectElem.attr(attrKey, rectData.attrs[attrKey]);\n }\n }\n\n if (rectData.class !== 'undefined') {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawImage = function (elem, width, height, x, y, link) {\n const imageElem = elem.append('image');\n imageElem.attr('width', width);\n imageElem.attr('height', height);\n imageElem.attr('x', x);\n imageElem.attr('y', y);\n let sanitizedLink = link.startsWith('data:image/png;base64') ? link : sanitizeUrl(link);\n imageElem.attr('xlink:href', sanitizedLink);\n};\n\nexport const drawRels = (elem, rels, conf) => {\n const relsElem = elem.append('g');\n let i = 0;\n for (let rel of rels) {\n let textColor = rel.textColor ? rel.textColor : '#444444';\n let strokeColor = rel.lineColor ? rel.lineColor : '#444444';\n let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;\n let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;\n\n let url = '';\n if (i === 0) {\n let line = relsElem.append('line');\n line.attr('x1', rel.startPoint.x);\n line.attr('y1', rel.startPoint.y);\n line.attr('x2', rel.endPoint.x);\n line.attr('y2', rel.endPoint.y);\n\n line.attr('stroke-width', '1');\n line.attr('stroke', strokeColor);\n line.style('fill', 'none');\n if (rel.type !== 'rel_b') {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (rel.type === 'birel' || rel.type === 'rel_b') {\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n }\n i = -1;\n } else {\n let line = relsElem.append('path');\n line\n .attr('fill', 'none')\n .attr('stroke-width', '1')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,starty Qcontrolx,controly stopx,stopy '\n .replaceAll('startx', rel.startPoint.x)\n .replaceAll('starty', rel.startPoint.y)\n .replaceAll(\n 'controlx',\n rel.startPoint.x +\n (rel.endPoint.x - rel.startPoint.x) / 2 -\n (rel.endPoint.x - rel.startPoint.x) / 4\n )\n .replaceAll('controly', rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2)\n .replaceAll('stopx', rel.endPoint.x)\n .replaceAll('stopy', rel.endPoint.y)\n );\n if (rel.type !== 'rel_b') {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (rel.type === 'birel' || rel.type === 'rel_b') {\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n }\n }\n\n let messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n rel.label.text,\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n offsetY,\n rel.label.width,\n rel.label.height,\n { fill: textColor },\n messageConf\n );\n\n if (rel.techn && rel.techn.text !== '') {\n messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n '[' + rel.techn.text + ']',\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n conf.messageFontSize +\n 5 +\n offsetY,\n Math.max(rel.label.width, rel.techn.width),\n rel.techn.height,\n { fill: textColor, 'font-style': 'italic' },\n messageConf\n );\n }\n }\n};\n\n/**\n * Draws an boundary in the diagram\n *\n * @param {any} elem - The diagram we'll draw to.\n * @param {any} boundary - The boundary to draw.\n * @param {any} conf - DrawText implementation discriminator object\n */\nconst drawBoundary = function (elem, boundary, conf) {\n const boundaryElem = elem.append('g');\n\n let fillColor = boundary.bgColor ? boundary.bgColor : 'none';\n let strokeColor = boundary.borderColor ? boundary.borderColor : '#444444';\n let fontColor = boundary.fontColor ? boundary.fontColor : 'black';\n\n let attrsValue = { 'stroke-width': 1.0, 'stroke-dasharray': '7.0,7.0' };\n if (boundary.nodeType) {\n attrsValue = { 'stroke-width': 1.0 };\n }\n let rectData = {\n x: boundary.x,\n y: boundary.y,\n fill: fillColor,\n stroke: strokeColor,\n width: boundary.width,\n height: boundary.height,\n rx: 2.5,\n ry: 2.5,\n attrs: attrsValue,\n };\n\n drawRect(boundaryElem, rectData);\n\n // draw label\n let boundaryConf = conf.boundaryFont();\n boundaryConf.fontWeight = 'bold';\n boundaryConf.fontSize = boundaryConf.fontSize + 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.label.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.label.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n\n // draw type\n if (boundary.type && boundary.type.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.type.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.type.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n\n // draw descr\n if (boundary.descr && boundary.descr.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontSize = boundaryConf.fontSize - 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.descr.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.descr.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n};\n\nexport const drawC4Shape = function (elem, c4Shape, conf) {\n let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf[c4Shape.typeC4Shape.text + '_bg_color'];\n let strokeColor = c4Shape.borderColor\n ? c4Shape.borderColor\n : conf[c4Shape.typeC4Shape.text + '_border_color'];\n let fontColor = c4Shape.fontColor ? c4Shape.fontColor : '#FFFFFF';\n\n let personImg =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7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LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=';\n break;\n }\n\n const c4ShapeElem = elem.append('g');\n c4ShapeElem.attr('class', 'person-man');\n\n // \n // draw rect of c4Shape\n const rect = getNoteRect();\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n case 'system':\n case 'external_system':\n case 'container':\n case 'external_container':\n case 'component':\n case 'external_component':\n rect.x = c4Shape.x;\n rect.y = c4Shape.y;\n rect.fill = fillColor;\n rect.width = c4Shape.width;\n rect.height = c4Shape.height;\n rect.stroke = strokeColor;\n rect.rx = 2.5;\n rect.ry = 2.5;\n rect.attrs = { 'stroke-width': 0.5 };\n drawRect(c4ShapeElem, rect);\n break;\n case 'system_db':\n case 'external_system_db':\n case 'container_db':\n case 'external_container_db':\n case 'component_db':\n case 'external_component_db':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n .replaceAll('height', c4Shape.height)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n );\n break;\n case 'system_queue':\n case 'external_system_queue':\n case 'container_queue':\n case 'external_container_queue':\n case 'component_queue':\n case 'external_component_queue':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('width', c4Shape.width)\n .replaceAll('half', c4Shape.height / 2)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half'\n .replaceAll('startx', c4Shape.x + c4Shape.width)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.height / 2)\n );\n break;\n }\n\n // draw type of c4Shape\n let c4ShapeFontConf = getC4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeElem\n .append('text')\n .attr('fill', fontColor)\n .attr('font-family', c4ShapeFontConf.fontFamily)\n .attr('font-size', c4ShapeFontConf.fontSize - 2)\n .attr('font-style', 'italic')\n .attr('lengthAdjust', 'spacing')\n .attr('textLength', c4Shape.typeC4Shape.width)\n .attr('x', c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2)\n .attr('y', c4Shape.y + c4Shape.typeC4Shape.Y)\n .text('<<' + c4Shape.typeC4Shape.text + '>>');\n\n // draw image/sprite\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n drawImage(\n c4ShapeElem,\n 48,\n 48,\n c4Shape.x + c4Shape.width / 2 - 24,\n c4Shape.y + c4Shape.image.Y,\n personImg\n );\n break;\n }\n\n // draw label\n let textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontWeight = 'bold';\n textFontConf.fontSize = textFontConf.fontSize + 2;\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.label.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.label.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n\n // draw techn/type\n textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontColor = fontColor;\n\n if (c4Shape.techn && c4Shape.techn?.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.techn.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.techn.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n } else if (c4Shape.type && c4Shape.type.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.type.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.type.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n }\n\n // draw descr\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n textFontConf = conf.personFont();\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.descr.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.descr.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n }\n\n return c4Shape.height;\n};\n\nexport const insertDatabaseIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'database')\n .attr('fill-rule', 'evenodd')\n .attr('clip-rule', 'evenodd')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z'\n );\n};\n\nexport const insertComputerIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'computer')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z'\n );\n};\n\nexport const insertClockIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'clock')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z'\n );\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param elem\n */\nexport const insertArrowHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\nexport const insertArrowEnd = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowend')\n .attr('refX', 1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 10 0 L 0 5 L 10 10 z'); // this is actual shape for arrowhead\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowFilledHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'filled-head')\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n/**\n * Setup node number. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertDynamicNumber = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowCrossHead = function (elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 16)\n .attr('refY', 4);\n\n // The arrow\n marker\n .append('path')\n .attr('fill', 'black')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 9,2 V 6 L16,4 Z');\n\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7');\n // this is actual shape for arrowhead\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n fill: '#EDF2AE',\n stroke: '#666',\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst getC4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { fontSize, fontFamily, fontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * fontSize - (fontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n text\n .append('tspan')\n // .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i])\n // .attr('y', y + height / 2)\n .attr('alignment-baseline', 'mathematical');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawBoundary,\n drawC4Shape,\n drawRels,\n drawImage,\n insertArrowHead,\n insertArrowEnd,\n insertArrowFilledHead,\n insertDynamicNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon,\n getNoteRect,\n sanitizeUrl, // TODO why is this exported?\n};\n","import { select } from 'd3';\nimport svgDraw from './svgDraw';\nimport { log } from '../../logger';\nimport { parser } from './parser/c4Diagram';\nimport common from '../common/common';\nimport c4Db from './c4Db';\nimport * as configApi from '../../config';\nimport assignWithDepth from '../../assignWithDepth';\nimport { wrapLabel, calculateTextWidth, calculateTextHeight } from '../../utils';\nimport { configureSvgSize } from '../../setupGraphViewbox';\n\nlet globalBoundaryMaxX = 0,\n globalBoundaryMaxY = 0;\n\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\n\nparser.yy = c4Db;\n\nlet conf = {};\n\nclass Bounds {\n constructor(diagObj) {\n this.name = '';\n this.data = {};\n this.data.startx = undefined;\n this.data.stopx = undefined;\n this.data.starty = undefined;\n this.data.stopy = undefined;\n this.data.widthLimit = undefined;\n\n this.nextData = {};\n this.nextData.startx = undefined;\n this.nextData.stopx = undefined;\n this.nextData.starty = undefined;\n this.nextData.stopy = undefined;\n this.nextData.cnt = 0;\n\n setConf(diagObj.db.getConfig());\n }\n\n setData(startx, stopx, starty, stopy) {\n this.nextData.startx = this.data.startx = startx;\n this.nextData.stopx = this.data.stopx = stopx;\n this.nextData.starty = this.data.starty = starty;\n this.nextData.stopy = this.data.stopy = stopy;\n }\n\n updateVal(obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n }\n\n insert(c4Shape) {\n this.nextData.cnt = this.nextData.cnt + 1;\n let _startx =\n this.nextData.startx === this.nextData.stopx\n ? this.nextData.stopx + c4Shape.margin\n : this.nextData.stopx + c4Shape.margin * 2;\n let _stopx = _startx + c4Shape.width;\n let _starty = this.nextData.starty + c4Shape.margin * 2;\n let _stopy = _starty + c4Shape.height;\n if (\n _startx >= this.data.widthLimit ||\n _stopx >= this.data.widthLimit ||\n this.nextData.cnt > c4ShapeInRow\n ) {\n _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;\n _starty = this.nextData.stopy + c4Shape.margin * 2;\n\n this.nextData.stopx = _stopx = _startx + c4Shape.width;\n this.nextData.starty = this.nextData.stopy;\n this.nextData.stopy = _stopy = _starty + c4Shape.height;\n this.nextData.cnt = 1;\n }\n\n c4Shape.x = _startx;\n c4Shape.y = _starty;\n\n this.updateVal(this.data, 'startx', _startx, Math.min);\n this.updateVal(this.data, 'starty', _starty, Math.min);\n this.updateVal(this.data, 'stopx', _stopx, Math.max);\n this.updateVal(this.data, 'stopy', _stopy, Math.max);\n\n this.updateVal(this.nextData, 'startx', _startx, Math.min);\n this.updateVal(this.nextData, 'starty', _starty, Math.min);\n this.updateVal(this.nextData, 'stopx', _stopx, Math.max);\n this.updateVal(this.nextData, 'stopy', _stopy, Math.max);\n }\n\n init(diagObj) {\n this.name = '';\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n widthLimit: undefined,\n };\n this.nextData = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n cnt: 0,\n };\n setConf(diagObj.db.getConfig());\n }\n\n bumpLastMargin(margin) {\n this.data.stopx += margin;\n this.data.stopy += margin;\n }\n}\n\nexport const setConf = function (cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst c4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst boundaryFont = (cnf) => {\n return {\n fontFamily: cnf.boundaryFontFamily,\n fontSize: cnf.boundaryFontSize,\n fontWeight: cnf.boundaryFontWeight,\n };\n};\n\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight,\n };\n};\n\n/**\n * @param textType\n * @param c4Shape\n * @param c4ShapeTextWrap\n * @param textConf\n * @param textLimitWidth\n */\nfunction calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {\n if (!c4Shape[textType].width) {\n if (c4ShapeTextWrap) {\n c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);\n c4Shape[textType].textLines = c4Shape[textType].text.split(common.lineBreakRegex).length;\n // c4Shape[textType].width = calculateTextWidth(c4Shape[textType].text, textConf);\n c4Shape[textType].width = textLimitWidth;\n // c4Shape[textType].height = c4Shape[textType].textLines * textConf.fontSize;\n c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);\n } else {\n let lines = c4Shape[textType].text.split(common.lineBreakRegex);\n c4Shape[textType].textLines = lines.length;\n let lineHeight = 0;\n c4Shape[textType].height = 0;\n c4Shape[textType].width = 0;\n for (const line of lines) {\n c4Shape[textType].width = Math.max(\n calculateTextWidth(line, textConf),\n c4Shape[textType].width\n );\n lineHeight = calculateTextHeight(line, textConf);\n c4Shape[textType].height = c4Shape[textType].height + lineHeight;\n }\n // c4Shapes[textType].height = c4Shapes[textType].textLines * textConf.fontSize;\n }\n }\n}\n\nexport const drawBoundary = function (diagram, boundary, bounds) {\n boundary.x = bounds.data.startx;\n boundary.y = bounds.data.starty;\n boundary.width = bounds.data.stopx - bounds.data.startx;\n boundary.height = bounds.data.stopy - bounds.data.starty;\n\n boundary.label.y = conf.c4ShapeMargin - 35;\n\n let boundaryTextWrap = boundary.wrap && conf.wrap;\n let boundaryLabelConf = boundaryFont(conf);\n boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;\n boundaryLabelConf.fontWeight = 'bold';\n let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);\n calcC4ShapeTextWH('label', boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);\n\n svgDraw.drawBoundary(diagram, boundary, conf);\n};\n\nexport const drawC4ShapeArray = function (currentBounds, diagram, c4ShapeArray, c4ShapeKeys) {\n // Upper Y is relative point\n let Y = 0;\n // Draw the c4ShapeArray\n for (const c4ShapeKey of c4ShapeKeys) {\n Y = 0;\n const c4Shape = c4ShapeArray[c4ShapeKey];\n\n // calc c4 shape type width and height\n\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;\n c4Shape.typeC4Shape.width = calculateTextWidth(\n '<<' + c4Shape.typeC4Shape.text + '>>',\n c4ShapeTypeConf\n );\n c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;\n c4Shape.typeC4Shape.Y = conf.c4ShapePadding;\n Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;\n\n // set image width and height c4Shape.x + c4Shape.width / 2 - 24, c4Shape.y + 28\n // let imageWidth = 0,\n // imageHeight = 0,\n // imageY = 0;\n //\n c4Shape.image = { width: 0, height: 0, Y: 0 };\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n break;\n }\n if (c4Shape.sprite) {\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n }\n\n // Y = conf.c4ShapePadding + c4Shape.image.height;\n\n let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;\n let textLimitWidth = conf.width - conf.c4ShapePadding * 2;\n\n let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;\n c4ShapeLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH('label', c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);\n c4Shape['label'].Y = Y + 8;\n Y = c4Shape['label'].Y + c4Shape['label'].height;\n\n if (c4Shape.type && c4Shape.type.text !== '') {\n c4Shape.type.text = '[' + c4Shape.type.text + ']';\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('type', c4Shape, c4ShapeTextWrap, c4ShapeTypeConf, textLimitWidth);\n c4Shape['type'].Y = Y + 5;\n Y = c4Shape['type'].Y + c4Shape['type'].height;\n } else if (c4Shape.techn && c4Shape.techn.text !== '') {\n c4Shape.techn.text = '[' + c4Shape.techn.text + ']';\n let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);\n calcC4ShapeTextWH('techn', c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);\n c4Shape['techn'].Y = Y + 5;\n Y = c4Shape['techn'].Y + c4Shape['techn'].height;\n }\n\n let rectHeight = Y;\n let rectWidth = c4Shape.label.width;\n\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('descr', c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);\n c4Shape['descr'].Y = Y + 20;\n Y = c4Shape['descr'].Y + c4Shape['descr'].height;\n\n rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);\n rectHeight = Y - c4Shape['descr'].textLines * 5;\n }\n\n rectWidth = rectWidth + conf.c4ShapePadding;\n // let rectHeight =\n\n c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);\n c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);\n c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;\n\n currentBounds.insert(c4Shape);\n\n svgDraw.drawC4Shape(diagram, c4Shape, conf);\n }\n\n currentBounds.bumpLastMargin(conf.c4ShapeMargin);\n};\n\nclass Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n}\n\n/* * *\n * Get the intersection of the line between the center point of a rectangle and a point outside the rectangle.\n * Algorithm idea.\n * Using a point outside the rectangle as the coordinate origin, the graph is divided into four quadrants, and each quadrant is divided into two cases, with separate treatment on the coordinate axes\n * 1. The case of coordinate axes.\n * 1. The case of the negative x-axis\n * 2. The case of the positive x-axis\n * 3. The case of the positive y-axis\n * 4. The negative y-axis case\n * 2. Quadrant cases.\n * 2.1. first quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the lower side of the rectangle\n * 2.2. second quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the lower edge of the rectangle\n * 2.3. third quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the upper edge of the rectangle\n * 2.4. fourth quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the upper side of the rectangle\n *\n */\nlet getIntersectPoint = function (fromNode, endPoint) {\n let x1 = fromNode.x;\n\n let y1 = fromNode.y;\n\n let x2 = endPoint.x;\n\n let y2 = endPoint.y;\n\n let fromCenterX = x1 + fromNode.width / 2;\n\n let fromCenterY = y1 + fromNode.height / 2;\n\n let dx = Math.abs(x1 - x2);\n\n let dy = Math.abs(y1 - y2);\n\n let tanDYX = dy / dx;\n\n let fromDYX = fromNode.height / fromNode.width;\n\n let returnPoint = null;\n\n if (y1 == y2 && x1 < x2) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY);\n } else if (y1 == y2 && x1 > x2) {\n returnPoint = new Point(x1, fromCenterY);\n } else if (x1 == x2 && y1 < y2) {\n returnPoint = new Point(fromCenterX, y1 + fromNode.height);\n } else if (x1 == x2 && y1 > y2) {\n returnPoint = new Point(fromCenterX, y1);\n }\n\n if (x1 > x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX - ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 < y2) {\n //\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX + ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY - (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(fromCenterX + ((fromNode.height / 2) * dx) / dy, y1);\n }\n } else if (x1 > x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY - (fromNode.width / 2) * tanDYX);\n } else {\n returnPoint = new Point(fromCenterX - ((fromNode.height / 2) * dx) / dy, y1);\n }\n }\n return returnPoint;\n};\n\nlet getIntersectPoints = function (fromNode, endNode) {\n let endIntersectPoint = { x: 0, y: 0 };\n endIntersectPoint.x = endNode.x + endNode.width / 2;\n endIntersectPoint.y = endNode.y + endNode.height / 2;\n let startPoint = getIntersectPoint(fromNode, endIntersectPoint);\n\n endIntersectPoint.x = fromNode.x + fromNode.width / 2;\n endIntersectPoint.y = fromNode.y + fromNode.height / 2;\n let endPoint = getIntersectPoint(endNode, endIntersectPoint);\n return { startPoint: startPoint, endPoint: endPoint };\n};\n\nexport const drawRels = function (diagram, rels, getC4ShapeObj, diagObj) {\n let i = 0;\n for (let rel of rels) {\n i = i + 1;\n let relTextWrap = rel.wrap && conf.wrap;\n let relConf = messageFont(conf);\n let diagramType = diagObj.db.getC4Type();\n if (diagramType === 'C4Dynamic') {\n rel.label.text = i + ': ' + rel.label.text;\n }\n let textLimitWidth = calculateTextWidth(rel.label.text, relConf);\n calcC4ShapeTextWH('label', rel, relTextWrap, relConf, textLimitWidth);\n\n if (rel.techn && rel.techn.text !== '') {\n textLimitWidth = calculateTextWidth(rel.techn.text, relConf);\n calcC4ShapeTextWH('techn', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n if (rel.descr && rel.descr.text !== '') {\n textLimitWidth = calculateTextWidth(rel.descr.text, relConf);\n calcC4ShapeTextWH('descr', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n let fromNode = getC4ShapeObj(rel.from);\n let endNode = getC4ShapeObj(rel.to);\n let points = getIntersectPoints(fromNode, endNode);\n rel.startPoint = points.startPoint;\n rel.endPoint = points.endPoint;\n }\n svgDraw.drawRels(diagram, rels, conf);\n};\n\n/**\n * @param diagram\n * @param parentBoundaryAlias\n * @param parentBounds\n * @param currentBoundaries\n * @param diagObj\n */\nfunction drawInsideBoundary(\n diagram,\n parentBoundaryAlias,\n parentBounds,\n currentBoundaries,\n diagObj\n) {\n let currentBounds = new Bounds(diagObj);\n // Calculate the width limit of the boundary. label/type 的长度,\n currentBounds.data.widthLimit =\n parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length);\n // Math.min(\n // conf.width * conf.c4ShapeInRow + conf.c4ShapeMargin * conf.c4ShapeInRow * 2,\n // parentBounds.data.widthLimit / Math.min(conf.c4BoundaryInRow, currentBoundaries.length)\n // );\n for (let [i, currentBoundary] of currentBoundaries.entries()) {\n let Y = 0;\n currentBoundary.image = { width: 0, height: 0, Y: 0 };\n if (currentBoundary.sprite) {\n currentBoundary.image.width = 48;\n currentBoundary.image.height = 48;\n currentBoundary.image.Y = Y;\n Y = currentBoundary.image.Y + currentBoundary.image.height;\n }\n\n let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;\n\n let currentBoundaryLabelConf = boundaryFont(conf);\n currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;\n currentBoundaryLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH(\n 'label',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryLabelConf,\n currentBounds.data.widthLimit\n );\n currentBoundary['label'].Y = Y + 8;\n Y = currentBoundary['label'].Y + currentBoundary['label'].height;\n\n if (currentBoundary.type && currentBoundary.type.text !== '') {\n currentBoundary.type.text = '[' + currentBoundary.type.text + ']';\n let currentBoundaryTypeConf = boundaryFont(conf);\n calcC4ShapeTextWH(\n 'type',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryTypeConf,\n currentBounds.data.widthLimit\n );\n currentBoundary['type'].Y = Y + 5;\n Y = currentBoundary['type'].Y + currentBoundary['type'].height;\n }\n\n if (currentBoundary.descr && currentBoundary.descr.text !== '') {\n let currentBoundaryDescrConf = boundaryFont(conf);\n currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;\n calcC4ShapeTextWH(\n 'descr',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryDescrConf,\n currentBounds.data.widthLimit\n );\n currentBoundary['descr'].Y = Y + 20;\n Y = currentBoundary['descr'].Y + currentBoundary['descr'].height;\n }\n\n if (i == 0 || i % c4BoundaryInRow === 0) {\n // Calculate the drawing start point of the currentBoundaries.\n let _x = parentBounds.data.startx + conf.diagramMarginX;\n let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;\n\n currentBounds.setData(_x, _x, _y, _y);\n } else {\n // Calculate the drawing start point of the currentBoundaries.\n let _x =\n currentBounds.data.stopx !== currentBounds.data.startx\n ? currentBounds.data.stopx + conf.diagramMarginX\n : currentBounds.data.startx;\n let _y = currentBounds.data.starty;\n\n currentBounds.setData(_x, _x, _y, _y);\n }\n currentBounds.name = currentBoundary.alias;\n let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);\n let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);\n\n if (currentPersonOrSystemKeys.length > 0) {\n drawC4ShapeArray(\n currentBounds,\n diagram,\n currentPersonOrSystemArray,\n currentPersonOrSystemKeys\n );\n }\n parentBoundaryAlias = currentBoundary.alias;\n let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias);\n\n if (nextCurrentBoundarys.length > 0) {\n // draw boundary inside currentBoundary\n drawInsideBoundary(\n diagram,\n parentBoundaryAlias,\n currentBounds,\n nextCurrentBoundarys,\n diagObj\n );\n }\n // draw boundary\n if (currentBoundary.alias !== 'global') {\n drawBoundary(diagram, currentBoundary, currentBounds);\n }\n parentBounds.data.stopy = Math.max(\n currentBounds.data.stopy + conf.c4ShapeMargin,\n parentBounds.data.stopy\n );\n parentBounds.data.stopx = Math.max(\n currentBounds.data.stopx + conf.c4ShapeMargin,\n parentBounds.data.stopx\n );\n globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);\n globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);\n }\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n *\n * @param {any} _text\n * @param {any} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (_text, id, _version, diagObj) {\n conf = configApi.getConfig().c4;\n const securityLevel = configApi.getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n let db = diagObj.db;\n\n diagObj.db.setWrap(conf.wrap);\n\n c4ShapeInRow = db.getC4ShapeInRow();\n c4BoundaryInRow = db.getC4BoundaryInRow();\n\n log.debug(`C:${JSON.stringify(conf, null, 2)}`);\n\n const diagram =\n securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n\n svgDraw.insertComputerIcon(diagram);\n svgDraw.insertDatabaseIcon(diagram);\n svgDraw.insertClockIcon(diagram);\n\n let screenBounds = new Bounds(diagObj);\n\n screenBounds.setData(\n conf.diagramMarginX,\n conf.diagramMarginX,\n conf.diagramMarginY,\n conf.diagramMarginY\n );\n\n screenBounds.data.widthLimit = screen.availWidth;\n globalBoundaryMaxX = conf.diagramMarginX;\n globalBoundaryMaxY = conf.diagramMarginY;\n\n const title = diagObj.db.getTitle();\n let currentBoundaries = diagObj.db.getBoundarys('');\n // switch (c4type) {\n // case 'C4Context':\n drawInsideBoundary(diagram, '', screenBounds, currentBoundaries, diagObj);\n // break;\n // }\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowEnd(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertArrowFilledHead(diagram);\n\n drawRels(diagram, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);\n\n screenBounds.data.stopx = globalBoundaryMaxX;\n screenBounds.data.stopy = globalBoundaryMaxY;\n\n const box = screenBounds.data;\n\n // Make sure the height of the diagram supports long menus.\n let boxHeight = box.stopy - box.starty;\n\n let height = boxHeight + 2 * conf.diagramMarginY;\n\n // Make sure the width of the diagram supports wide menus.\n let boxWidth = box.stopx - box.startx;\n const width = boxWidth + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX)\n .attr('y', box.starty + conf.diagramMarginY);\n }\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n const extraVertForTitle = title ? 60 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n\n log.debug(`models:`, box);\n};\n\nexport default {\n drawPersonOrSystemArray: drawC4ShapeArray,\n drawBoundary,\n setConf,\n draw,\n};\n","const getStyles = (options) =>\n `.person {\n stroke: ${options.personBorder};\n fill: ${options.personBkg};\n }\n`;\n\nexport default getStyles;\n","// @ts-ignore: TODO Fix ts errors\nimport c4Parser from './parser/c4Diagram';\nimport c4Db from './c4Db';\nimport c4Renderer from './c4Renderer';\nimport c4Styles from './styles';\nimport { MermaidConfig } from '../../config.type';\nimport { DiagramDefinition } from '../../diagram-api/types';\n\nexport const diagram: DiagramDefinition = {\n parser: c4Parser,\n db: c4Db,\n renderer: c4Renderer,\n styles: c4Styles,\n init: (cnf: MermaidConfig) => {\n c4Renderer.setConf(cnf.c4);\n },\n};\n"],"names":["parser","o","k","v","l","$V0","$V1","$V2","$V3","$V4","$V5","$V6","$V7","$V8","$V9","$Va","$Vb","$Vc","$Vd","$Ve","$Vf","$Vg","$Vh","$Vi","$Vj","$Vk","$Vl","$Vm","$Vn","$Vo","$Vp","$Vq","$Vr","$Vs","$Vt","$Vu","$Vv","$Vw","$Vx","$Vy","$Vz","$VA","$VB","$VC","$VD","$VE","$VF","$VG","$VH","$VI","$VJ","$VK","$VL","$VM","$VN","$VO","$VP","$VQ","$VR","$VS","$VT","$VU","$VV","$VW","$VX","$VY","$VZ","$V_","$V$","$V01","$V11","$V21","yytext","yyleng","yylineno","yy","yystate","$$","_$","$0","kv","str","hash","error","input","self","stack","tstack","vstack","lstack","table","TERROR","EOF","args","lexer","sharedState","yyloc","ranges","lex","token","symbol","state","action","r","yyval","p","len","newState","expected","errStr","ch","lines","oldLines","n","past","next","pre","c","match","indexed_rule","backup","tempMatch","index","rules","i","condition","yy_","$avoiding_name_collisions","YY_START","Parser","c4ShapeArray","boundaryParseStack","currentBoundaryParse","parentBoundaryParse","boundarys","rels","title","wrapEnabled","c4ShapeInRow","c4BoundaryInRow","c4Type","getC4Type","setC4Type","c4TypeParam","sanitizeText","configApi.getConfig","parseDirective","statement","context","type","mermaidAPI","addRel","from","to","label","techn","descr","sprite","tags","link","rel","old","key","value","autoWrap","addPersonOrSystem","typeC4Shape","alias","personOrSystem","addContainer","container","addComponent","component","addPersonOrSystemBoundary","boundary","addContainerBoundary","addDeploymentNode","nodeType","popBoundaryParseStack","updateElStyle","elementName","bgColor","fontColor","borderColor","shadowing","shape","legendText","legendSprite","element","updateRelStyle","textColor","lineColor","offsetX","offsetY","updateLayoutConfig","c4ShapeInRowParam","c4BoundaryInRowParam","c4ShapeInRowValue","c4BoundaryInRowValue","getC4ShapeInRow","getC4BoundaryInRow","getCurrentBoundaryParse","getParentBoundaryParse","getC4ShapeArray","parentBoundary","getC4Shape","getC4ShapeKeys","getBoundarys","getRels","getTitle","setWrap","wrapSetting","clear","LINETYPE","ARROWTYPE","PLACEMENT","setTitle","txt","c4Db","setAccTitle","getAccTitle","getAccDescription","setAccDescription","drawRect","elem","rectData","rectElem","attrKey","drawImage","width","height","x","y","imageElem","sanitizedLink","sanitizeUrl","drawRels","conf","relsElem","strokeColor","url","line","messageConf","_drawTextCandidateFunc","drawBoundary","boundaryElem","fillColor","attrsValue","boundaryConf","drawC4Shape","c4Shape","personImg","c4ShapeElem","rect","getNoteRect","c4ShapeFontConf","getC4ShapeFont","textFontConf","_a","insertDatabaseIcon","insertComputerIcon","insertClockIcon","insertArrowHead","insertArrowEnd","insertArrowFilledHead","insertDynamicNumber","insertArrowCrossHead","marker","cnf","byText","content","g","textAttrs","text","_setTextAttrs","byTspan","fontSize","fontFamily","fontWeight","common","dy","byFo","s","toText","fromTextAttrsDict","svgDraw","globalBoundaryMaxX","globalBoundaryMaxY","Bounds","diagObj","setConf","startx","stopx","starty","stopy","obj","val","fun","_startx","_stopx","_starty","_stopy","margin","assignWithDepth","c4ShapeFont","boundaryFont","messageFont","calcC4ShapeTextWH","textType","c4ShapeTextWrap","textConf","textLimitWidth","wrapLabel","calculateTextHeight","lineHeight","calculateTextWidth","diagram","bounds","boundaryTextWrap","boundaryLabelConf","drawC4ShapeArray","currentBounds","c4ShapeKeys","Y","c4ShapeKey","c4ShapeTypeConf","c4ShapeLabelConf","c4ShapeTechnConf","rectHeight","rectWidth","c4ShapeDescrConf","Point","getIntersectPoint","fromNode","endPoint","x1","y1","x2","y2","fromCenterX","fromCenterY","dx","tanDYX","fromDYX","returnPoint","getIntersectPoints","endNode","endIntersectPoint","startPoint","getC4ShapeObj","relTextWrap","relConf","points","drawInsideBoundary","parentBoundaryAlias","parentBounds","currentBoundaries","currentBoundary","currentBoundaryTextWrap","currentBoundaryLabelConf","currentBoundaryTypeConf","currentBoundaryDescrConf","_x","_y","currentPersonOrSystemArray","currentPersonOrSystemKeys","nextCurrentBoundarys","draw","_text","id","_version","securityLevel","sandboxElement","select","root","db","log","screenBounds","box","configureSvgSize","extraVertForTitle","c4Renderer","getStyles","options","c4Styles","c4Parser"],"mappings":";;;;;;AAyEA,IAAIA,KAAU,WAAU;AACxB,MAAIC,IAAE,SAASC,IAAEC,GAAEF,GAAEG,GAAE;AAAC,SAAIH,IAAEA,KAAG,IAAGG,IAAEF,GAAE,QAAOE,KAAIH,EAAEC,GAAEE,CAAC,CAAC,IAAED;AAAE;AAAC,WAAOF;AAAA,EAAC,GAAEI,IAAI,CAAC,GAAE,CAAC,GAAEC,IAAI,CAAC,GAAE,CAAC,GAAEC,IAAI,CAAC,GAAE,CAAC,GAAEC,IAAI,CAAC,GAAE,CAAC,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