"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_mdts_frontend"] = self["webpackChunk_mdts_frontend"] || []).push([["node_modules_mermaid_dist_chunks_mermaid_core_diagram-5GNKFQAL_mjs"],{

/***/ "./node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs"
/*!**************************************************************************!*\
  !*** ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs ***!
  \**************************************************************************/
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   populateCommonDb: () => (/* binding */ populateCommonDb)\n/* harmony export */ });\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n\n\n// src/diagrams/common/populateCommonDb.ts\nfunction populateCommonDb(ast, db) {\n  if (ast.accDescr) {\n    db.setAccDescription?.(ast.accDescr);\n  }\n  if (ast.accTitle) {\n    db.setAccTitle?.(ast.accTitle);\n  }\n  if (ast.title) {\n    db.setDiagramTitle?.(ast.title);\n  }\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__.__name)(populateCommonDb, \"populateCommonDb\");\n\n\n\n\n//# sourceURL=webpack://@mdts/frontend/./node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs?\n}");

/***/ },

/***/ "./node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs"
/*!**************************************************************************!*\
  !*** ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs ***!
  \**************************************************************************/
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ImperativeState: () => (/* binding */ ImperativeState)\n/* harmony export */ });\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n\n\n// src/utils/imperativeState.ts\nvar ImperativeState = class {\n  /**\n   * @param init - Function that creates the default state.\n   */\n  constructor(init) {\n    this.init = init;\n    this.records = this.init();\n  }\n  static {\n    (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__.__name)(this, \"ImperativeState\");\n  }\n  reset() {\n    this.records = this.init();\n  }\n};\n\n\n\n\n//# sourceURL=webpack://@mdts/frontend/./node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs?\n}");

/***/ },

/***/ "./node_modules/mermaid/dist/chunks/mermaid.core/diagram-5GNKFQAL.mjs"
/*!****************************************************************************!*\
  !*** ./node_modules/mermaid/dist/chunks/mermaid.core/diagram-5GNKFQAL.mjs ***!
  \****************************************************************************/
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   diagram: () => (/* binding */ diagram)\n/* harmony export */ });\n/* harmony import */ var _chunk_WU5MYG2G_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-WU5MYG2G.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.mjs\");\n/* harmony import */ var _chunk_4BX2VUAB_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-4BX2VUAB.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs\");\n/* harmony import */ var _chunk_QZHKN3VN_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-QZHKN3VN.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs\");\n/* harmony import */ var _chunk_5ZQYHXKU_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-5ZQYHXKU.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.mjs\");\n/* harmony import */ var _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./chunk-CSCIHK7Q.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-CSCIHK7Q.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var _mermaid_js_parser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mermaid-js/parser */ \"./node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs\");\n\n\n\n\n\n\n\n// src/diagrams/treeView/db.ts\nvar state = new _chunk_QZHKN3VN_mjs__WEBPACK_IMPORTED_MODULE_2__.ImperativeState(() => ({\n  cnt: 1,\n  stack: [\n    {\n      id: 0,\n      level: -1,\n      name: \"/\",\n      children: []\n    }\n  ]\n}));\nvar clear2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => {\n  state.reset();\n  (0,_chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.clear)();\n}, \"clear\");\nvar getRoot = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => {\n  return state.records.stack[0];\n}, \"getRoot\");\nvar getCount = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => state.records.cnt, \"getCount\");\nvar defaultConfig = _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.defaultConfig_default.treeView;\nvar getConfig2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => {\n  return (0,_chunk_5ZQYHXKU_mjs__WEBPACK_IMPORTED_MODULE_3__.cleanAndMerge)(defaultConfig, (0,_chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig)().treeView);\n}, \"getConfig\");\nvar addNode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((level, name) => {\n  while (level <= state.records.stack[state.records.stack.length - 1].level) {\n    state.records.stack.pop();\n  }\n  const node = {\n    id: state.records.cnt++,\n    level,\n    name,\n    children: []\n  };\n  state.records.stack[state.records.stack.length - 1].children.push(node);\n  state.records.stack.push(node);\n}, \"addNode\");\nvar db = {\n  clear: clear2,\n  addNode,\n  getRoot,\n  getCount,\n  getConfig: getConfig2,\n  getAccTitle: _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.getAccTitle,\n  getAccDescription: _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.getAccDescription,\n  getDiagramTitle: _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.getDiagramTitle,\n  setAccDescription: _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.setAccDescription,\n  setAccTitle: _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.setAccTitle,\n  setDiagramTitle: _chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.setDiagramTitle\n};\nvar db_default = db;\n\n// src/diagrams/treeView/parser.ts\n\nvar populate = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((ast) => {\n  (0,_chunk_4BX2VUAB_mjs__WEBPACK_IMPORTED_MODULE_1__.populateCommonDb)(ast, db_default);\n  ast.nodes.map((node) => db_default.addNode(node.indent ? parseInt(node.indent) : 0, node.name));\n}, \"populate\");\nvar parser = {\n  parse: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async (input) => {\n    const ast = await (0,_mermaid_js_parser__WEBPACK_IMPORTED_MODULE_6__.parse)(\"treeView\", input);\n    _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(ast);\n    populate(ast);\n  }, \"parse\")\n};\n\n// src/diagrams/treeView/renderer.ts\nvar positionLabel = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((x, y, node, domElem, config) => {\n  const label = domElem.append(\"text\").text(node.name).attr(\"dominant-baseline\", \"middle\").attr(\"class\", \"treeView-node-label\");\n  const { height: labelHeight, width: labelWidth } = label.node().getBBox();\n  const height = labelHeight + config.paddingY * 2;\n  const width = labelWidth + config.paddingX * 2;\n  label.attr(\"x\", x + config.paddingX);\n  label.attr(\"y\", y + height / 2);\n  node.BBox = {\n    x,\n    y,\n    width,\n    height\n  };\n}, \"positionLabel\");\nvar positionLine = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((domElem, x1, y1, x2, y2, lineThickness) => {\n  return domElem.append(\"line\").attr(\"x1\", x1).attr(\"y1\", y1).attr(\"x2\", x2).attr(\"y2\", y2).attr(\"stroke-width\", lineThickness).attr(\"class\", \"treeView-node-line\");\n}, \"positionLine\");\nvar drawTree = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((elem, root, config) => {\n  let totalHeight = 0;\n  let totalWidth = 0;\n  const drawNode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((elem2, node, config2, depth) => {\n    const indent = depth * (config2.rowIndent + config2.paddingX);\n    positionLabel(indent, totalHeight, node, elem2, config2);\n    const { height, width } = node.BBox;\n    positionLine(\n      elem2,\n      indent - config2.rowIndent,\n      totalHeight + height / 2,\n      indent,\n      totalHeight + height / 2,\n      config2.lineThickness\n    );\n    totalWidth = Math.max(totalWidth, indent + width);\n    totalHeight += height;\n  }, \"drawNode\");\n  const processNode = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((node, depth = 0) => {\n    drawNode(elem, node, config, depth);\n    node.children.forEach((child) => {\n      processNode(child, depth + 1);\n    });\n    const { x, y, height } = node.BBox;\n    if (node.children.length) {\n      const { y: endY, height: endHeight } = node.children[node.children.length - 1].BBox;\n      positionLine(\n        elem,\n        x + config.paddingX,\n        y + height,\n        x + config.paddingX,\n        endY + endHeight / 2 + config.lineThickness / 2,\n        config.lineThickness\n      );\n    }\n  }, \"processNode\");\n  processNode(root);\n  return { totalHeight, totalWidth };\n}, \"drawTree\");\nvar draw = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((text, id, _ver, diagObj) => {\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(\"Rendering treeView diagram\\n\" + text);\n  const db2 = diagObj.db;\n  const root = db2.getRoot();\n  const config = db2.getConfig();\n  const svg = (0,_chunk_WU5MYG2G_mjs__WEBPACK_IMPORTED_MODULE_0__.selectSvgElement)(id);\n  const treeElem = svg.append(\"g\");\n  treeElem.attr(\"class\", \"tree-view\");\n  const { totalHeight, totalWidth } = drawTree(treeElem, root, config);\n  svg.attr(\"viewBox\", `-${config.lineThickness / 2} 0 ${totalWidth} ${totalHeight}`);\n  (0,_chunk_CSCIHK7Q_mjs__WEBPACK_IMPORTED_MODULE_4__.configureSvgSize)(svg, totalHeight, totalWidth, config.useMaxWidth);\n}, \"draw\");\nvar renderer = {\n  draw\n};\nvar renderer_default = renderer;\n\n// src/diagrams/treeView/styles.ts\nvar defaultTreeViewDiagramStyles = {\n  labelFontSize: \"16px\",\n  labelColor: \"black\",\n  lineColor: \"black\"\n};\nvar styles = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(({\n  treeView\n}) => {\n  const { labelFontSize, labelColor, lineColor } = (0,_chunk_5ZQYHXKU_mjs__WEBPACK_IMPORTED_MODULE_3__.cleanAndMerge)(\n    defaultTreeViewDiagramStyles,\n    treeView\n  );\n  return `\n    .treeView-node-label {\n        font-size: ${labelFontSize};\n        fill: ${labelColor};\n    }\n    .treeView-node-line {\n        stroke: ${lineColor};\n    }\n    `;\n}, \"styles\");\nvar styles_default = styles;\n\n// src/diagrams/treeView/diagram.ts\nvar diagram = {\n  db: db_default,\n  renderer: renderer_default,\n  parser,\n  styles: styles_default\n};\n\n\n\n//# sourceURL=webpack://@mdts/frontend/./node_modules/mermaid/dist/chunks/mermaid.core/diagram-5GNKFQAL.mjs?\n}");

/***/ }

}]);