@chrome-acp/proxy-server 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/server.d.ts.map +1 -1
  2. package/dist/server.js +73 -13
  3. package/dist/server.js.map +1 -1
  4. package/package.json +1 -1
  5. package/public/assets/{architectureDiagram-VXUJARFQ-XT5vbOhB.js → architectureDiagram-VXUJARFQ-sCkIxoin.js} +2 -2
  6. package/public/assets/{architectureDiagram-VXUJARFQ-XT5vbOhB.js.map → architectureDiagram-VXUJARFQ-sCkIxoin.js.map} +1 -1
  7. package/public/assets/{blockDiagram-VD42YOAC-DLFcIcr7.js → blockDiagram-VD42YOAC-iT0EVpEs.js} +2 -2
  8. package/public/assets/{blockDiagram-VD42YOAC-DLFcIcr7.js.map → blockDiagram-VD42YOAC-iT0EVpEs.js.map} +1 -1
  9. package/public/assets/{c4Diagram-YG6GDRKO-OYGPPbbp.js → c4Diagram-YG6GDRKO-FJvkcwxD.js} +2 -2
  10. package/public/assets/{c4Diagram-YG6GDRKO-OYGPPbbp.js.map → c4Diagram-YG6GDRKO-FJvkcwxD.js.map} +1 -1
  11. package/public/assets/channel-CyLd3bNA.js +2 -0
  12. package/public/assets/{channel-C-TQis6S.js.map → channel-CyLd3bNA.js.map} +1 -1
  13. package/public/assets/{chunk-ABZYJK2D-C5l8JSxq.js → chunk-ABZYJK2D-CNhdKuqi.js} +3 -3
  14. package/public/assets/{chunk-ABZYJK2D-C5l8JSxq.js.map → chunk-ABZYJK2D-CNhdKuqi.js.map} +1 -1
  15. package/public/assets/{chunk-ATLVNIR6-DJGS9xqy.js → chunk-ATLVNIR6-CbO2X_Tw.js} +2 -2
  16. package/public/assets/{chunk-ATLVNIR6-DJGS9xqy.js.map → chunk-ATLVNIR6-CbO2X_Tw.js.map} +1 -1
  17. package/public/assets/{chunk-B4BG7PRW-gDha-duc.js → chunk-B4BG7PRW-BaHtw4gW.js} +2 -2
  18. package/public/assets/{chunk-B4BG7PRW-gDha-duc.js.map → chunk-B4BG7PRW-BaHtw4gW.js.map} +1 -1
  19. package/public/assets/{chunk-DI55MBZ5-Cj4kDgD2.js → chunk-DI55MBZ5-2htM0VVO.js} +2 -2
  20. package/public/assets/{chunk-DI55MBZ5-Cj4kDgD2.js.map → chunk-DI55MBZ5-2htM0VVO.js.map} +1 -1
  21. package/public/assets/{chunk-EXTU4WIE-DOOS0Mse.js → chunk-EXTU4WIE-C_bM8CPH.js} +2 -2
  22. package/public/assets/{chunk-EXTU4WIE-DOOS0Mse.js.map → chunk-EXTU4WIE-C_bM8CPH.js.map} +1 -1
  23. package/public/assets/{chunk-JA3XYJ7Z-CJB6qwwg.js → chunk-JA3XYJ7Z-CGuln6zv.js} +2 -2
  24. package/public/assets/{chunk-JA3XYJ7Z-CJB6qwwg.js.map → chunk-JA3XYJ7Z-CGuln6zv.js.map} +1 -1
  25. package/public/assets/{chunk-JZLCHNYA-Bude0Tz9.js → chunk-JZLCHNYA-B8Ldycwo.js} +2 -2
  26. package/public/assets/{chunk-JZLCHNYA-Bude0Tz9.js.map → chunk-JZLCHNYA-B8Ldycwo.js.map} +1 -1
  27. package/public/assets/{chunk-N4CR4FBY-DGM8cqEA.js → chunk-N4CR4FBY-DAPshrUE.js} +3 -3
  28. package/public/assets/{chunk-N4CR4FBY-DGM8cqEA.js.map → chunk-N4CR4FBY-DAPshrUE.js.map} +1 -1
  29. package/public/assets/{chunk-QN33PNHL-gpj_VYvm.js → chunk-QN33PNHL-BG2wK195.js} +2 -2
  30. package/public/assets/{chunk-QN33PNHL-gpj_VYvm.js.map → chunk-QN33PNHL-BG2wK195.js.map} +1 -1
  31. package/public/assets/{chunk-QXUST7PY-C6ghehBu.js → chunk-QXUST7PY-BOQY0Xfy.js} +2 -2
  32. package/public/assets/{chunk-QXUST7PY-C6ghehBu.js.map → chunk-QXUST7PY-BOQY0Xfy.js.map} +1 -1
  33. package/public/assets/{chunk-S3R3BYOJ-CT_-fuX8.js → chunk-S3R3BYOJ-lQHMbpG7.js} +2 -2
  34. package/public/assets/{chunk-S3R3BYOJ-CT_-fuX8.js.map → chunk-S3R3BYOJ-lQHMbpG7.js.map} +1 -1
  35. package/public/assets/{chunk-TZMSLE5B-BDUbzQ8i.js → chunk-TZMSLE5B-Ddu4HD6D.js} +2 -2
  36. package/public/assets/{chunk-TZMSLE5B-BDUbzQ8i.js.map → chunk-TZMSLE5B-Ddu4HD6D.js.map} +1 -1
  37. package/public/assets/classDiagram-2ON5EDUG-DXiWlO2N.js +2 -0
  38. package/public/assets/{classDiagram-2ON5EDUG-BsYidIMb.js.map → classDiagram-2ON5EDUG-DXiWlO2N.js.map} +1 -1
  39. package/public/assets/classDiagram-v2-WZHVMYZB-CfVsna1C.js +2 -0
  40. package/public/assets/{classDiagram-v2-WZHVMYZB-7SoDg2VR.js.map → classDiagram-v2-WZHVMYZB-CfVsna1C.js.map} +1 -1
  41. package/public/assets/clone-BkO8YVlC.js +2 -0
  42. package/public/assets/{clone-CbWnVDR5.js.map → clone-BkO8YVlC.js.map} +1 -1
  43. package/public/assets/{code-block-IT6T5CEO-CfsMtPBR.js → code-block-IT6T5CEO-RwvK23k6.js} +2 -2
  44. package/public/assets/{code-block-IT6T5CEO-CfsMtPBR.js.map → code-block-IT6T5CEO-RwvK23k6.js.map} +1 -1
  45. package/public/assets/{dagre-6UL2VRFP-B6iR6NZe.js → dagre-6UL2VRFP-C9Ozm0MP.js} +2 -2
  46. package/public/assets/{dagre-6UL2VRFP-B6iR6NZe.js.map → dagre-6UL2VRFP-C9Ozm0MP.js.map} +1 -1
  47. package/public/assets/{dagre-EJDXa3E7.js → dagre-Dt0NDwrT.js} +2 -2
  48. package/public/assets/{dagre-EJDXa3E7.js.map → dagre-Dt0NDwrT.js.map} +1 -1
  49. package/public/assets/{diagram-PSM6KHXK-zhsJSeuB.js → diagram-PSM6KHXK-B-9CxbnI.js} +2 -2
  50. package/public/assets/{diagram-PSM6KHXK-zhsJSeuB.js.map → diagram-PSM6KHXK-B-9CxbnI.js.map} +1 -1
  51. package/public/assets/{diagram-QEK2KX5R-Co66CAEn.js → diagram-QEK2KX5R-WcE69a1G.js} +2 -2
  52. package/public/assets/{diagram-QEK2KX5R-Co66CAEn.js.map → diagram-QEK2KX5R-WcE69a1G.js.map} +1 -1
  53. package/public/assets/{diagram-S2PKOQOG-DiMADWLA.js → diagram-S2PKOQOG-qTE7kYb8.js} +2 -2
  54. package/public/assets/{diagram-S2PKOQOG-DiMADWLA.js.map → diagram-S2PKOQOG-qTE7kYb8.js.map} +1 -1
  55. package/public/assets/{erDiagram-Q2GNP2WA-DuvxJhfn.js → erDiagram-Q2GNP2WA-CsrooKbE.js} +2 -2
  56. package/public/assets/{erDiagram-Q2GNP2WA-DuvxJhfn.js.map → erDiagram-Q2GNP2WA-CsrooKbE.js.map} +1 -1
  57. package/public/assets/{flowDiagram-NV44I4VS-B7bAKMJi.js → flowDiagram-NV44I4VS-BGTyi6l5.js} +2 -2
  58. package/public/assets/{flowDiagram-NV44I4VS-B7bAKMJi.js.map → flowDiagram-NV44I4VS-BGTyi6l5.js.map} +1 -1
  59. package/public/assets/{ganttDiagram-JELNMOA3-IQRNHB_J.js → ganttDiagram-JELNMOA3-DN7V6mNH.js} +2 -2
  60. package/public/assets/{ganttDiagram-JELNMOA3-IQRNHB_J.js.map → ganttDiagram-JELNMOA3-DN7V6mNH.js.map} +1 -1
  61. package/public/assets/{gitGraphDiagram-NY62KEGX-DRnj3yjR.js → gitGraphDiagram-NY62KEGX-DIySZYvd.js} +2 -2
  62. package/public/assets/{gitGraphDiagram-NY62KEGX-DRnj3yjR.js.map → gitGraphDiagram-NY62KEGX-DIySZYvd.js.map} +1 -1
  63. package/public/assets/{graphlib-DdgjkuSE.js → graphlib-DTtyen5g.js} +2 -2
  64. package/public/assets/{graphlib-DdgjkuSE.js.map → graphlib-DTtyen5g.js.map} +1 -1
  65. package/public/assets/{infoDiagram-WHAUD3N6-BNobr0SN.js → infoDiagram-WHAUD3N6-Bv-GY92Y.js} +2 -2
  66. package/public/assets/{infoDiagram-WHAUD3N6-BNobr0SN.js.map → infoDiagram-WHAUD3N6-Bv-GY92Y.js.map} +1 -1
  67. package/public/assets/{journeyDiagram-XKPGCS4Q-DO0UQpgB.js → journeyDiagram-XKPGCS4Q-DW6RNfq2.js} +2 -2
  68. package/public/assets/{journeyDiagram-XKPGCS4Q-DO0UQpgB.js.map → journeyDiagram-XKPGCS4Q-DW6RNfq2.js.map} +1 -1
  69. package/public/assets/{kanban-definition-3W4ZIXB7-Jpay4_QZ.js → kanban-definition-3W4ZIXB7-CWT846-C.js} +2 -2
  70. package/public/assets/{kanban-definition-3W4ZIXB7-Jpay4_QZ.js.map → kanban-definition-3W4ZIXB7-CWT846-C.js.map} +1 -1
  71. package/public/assets/katex-DJMyQU16.js +1 -0
  72. package/public/assets/{line-BHjlwlMB.js → line-B6Rb3qg4.js} +2 -2
  73. package/public/assets/{line-BHjlwlMB.js.map → line-B6Rb3qg4.js.map} +1 -1
  74. package/public/assets/{main-PSzBtxbq.js → main-BMydeOxF.js} +68 -68
  75. package/public/assets/main-BMydeOxF.js.map +1 -0
  76. package/public/assets/main-CdjS9337.css +2 -0
  77. package/public/assets/{mermaid-VLURNSYL-BR8F8GU8.js → mermaid-VLURNSYL-ChlNLhSf.js} +1 -1
  78. package/public/assets/{mermaid.core-DQE-7lmT.js → mermaid.core-RqJdZ0fi.js} +4 -4
  79. package/public/assets/{mermaid.core-DQE-7lmT.js.map → mermaid.core-RqJdZ0fi.js.map} +1 -1
  80. package/public/assets/{mindmap-definition-VGOIOE7T-DS5SVw-k.js → mindmap-definition-VGOIOE7T-N5RK9_nf.js} +2 -2
  81. package/public/assets/{mindmap-definition-VGOIOE7T-DS5SVw-k.js.map → mindmap-definition-VGOIOE7T-N5RK9_nf.js.map} +1 -1
  82. package/public/assets/{pieDiagram-ADFJNKIX-CFAhlPkw.js → pieDiagram-ADFJNKIX-C3so7eY9.js} +2 -2
  83. package/public/assets/{pieDiagram-ADFJNKIX-CFAhlPkw.js.map → pieDiagram-ADFJNKIX-C3so7eY9.js.map} +1 -1
  84. package/public/assets/{quadrantDiagram-AYHSOK5B-CT_2FVkC.js → quadrantDiagram-AYHSOK5B-B9rusor8.js} +2 -2
  85. package/public/assets/{quadrantDiagram-AYHSOK5B-CT_2FVkC.js.map → quadrantDiagram-AYHSOK5B-B9rusor8.js.map} +1 -1
  86. package/public/assets/{requirementDiagram-UZGBJVZJ-Bpk1h2q4.js → requirementDiagram-UZGBJVZJ-W_vTa6sR.js} +2 -2
  87. package/public/assets/{requirementDiagram-UZGBJVZJ-Bpk1h2q4.js.map → requirementDiagram-UZGBJVZJ-W_vTa6sR.js.map} +1 -1
  88. package/public/assets/{sankeyDiagram-TZEHDZUN-CHlg_2in.js → sankeyDiagram-TZEHDZUN-oekRPPoE.js} +2 -2
  89. package/public/assets/{sankeyDiagram-TZEHDZUN-CHlg_2in.js.map → sankeyDiagram-TZEHDZUN-oekRPPoE.js.map} +1 -1
  90. package/public/assets/{sequenceDiagram-WL72ISMW-CaC09QcI.js → sequenceDiagram-WL72ISMW-Cln9cEgi.js} +2 -2
  91. package/public/assets/{sequenceDiagram-WL72ISMW-CaC09QcI.js.map → sequenceDiagram-WL72ISMW-Cln9cEgi.js.map} +1 -1
  92. package/public/assets/{stateDiagram-FKZM4ZOC-usQJ_ny0.js → stateDiagram-FKZM4ZOC-DNskec5X.js} +2 -2
  93. package/public/assets/{stateDiagram-FKZM4ZOC-usQJ_ny0.js.map → stateDiagram-FKZM4ZOC-DNskec5X.js.map} +1 -1
  94. package/public/assets/stateDiagram-v2-4FDKWEC3-CHFN0nby.js +2 -0
  95. package/public/assets/{stateDiagram-v2-4FDKWEC3-BX_iMt2G.js.map → stateDiagram-v2-4FDKWEC3-CHFN0nby.js.map} +1 -1
  96. package/public/assets/{timeline-definition-IT6M3QCI-FpeXVspc.js → timeline-definition-IT6M3QCI-Dc6yDbAi.js} +2 -2
  97. package/public/assets/{timeline-definition-IT6M3QCI-FpeXVspc.js.map → timeline-definition-IT6M3QCI-Dc6yDbAi.js.map} +1 -1
  98. package/public/assets/{xychartDiagram-PRI3JC2R-b8ZjczEa.js → xychartDiagram-PRI3JC2R-LVl4w1dh.js} +2 -2
  99. package/public/assets/{xychartDiagram-PRI3JC2R-b8ZjczEa.js.map → xychartDiagram-PRI3JC2R-LVl4w1dh.js.map} +1 -1
  100. package/public/index.html +2 -2
  101. package/public/assets/channel-C-TQis6S.js +0 -2
  102. package/public/assets/classDiagram-2ON5EDUG-BsYidIMb.js +0 -2
  103. package/public/assets/classDiagram-v2-WZHVMYZB-7SoDg2VR.js +0 -2
  104. package/public/assets/clone-CbWnVDR5.js +0 -2
  105. package/public/assets/katex-D-DHO72r.js +0 -1
  106. package/public/assets/main-L2l67V_s.css +0 -2
  107. package/public/assets/main-PSzBtxbq.js.map +0 -1
  108. package/public/assets/stateDiagram-v2-4FDKWEC3-BX_iMt2G.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"sankeyDiagram-TZEHDZUN-CHlg_2in.js","names":["colors","max","value","min","value","sum","value","x","nodes","link","links","x","y","value","dy","x","y","constant","x","x","pointX","y","pointY","link","path","constant","value","getConfig","link","d3SankeyLeft","d3SankeyRight","d3SankeyCenter","d3SankeyJustify","defaultConfig","d3select","d3Sankey","d3scaleOrdinal","d3schemeTableau10","d3SankeyLinkHorizontal"],"sources":["../../../../node_modules/d3-scale-chromatic/src/colors.js","../../../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js","../../../../node_modules/d3-sankey/node_modules/d3-array/src/max.js","../../../../node_modules/d3-sankey/node_modules/d3-array/src/min.js","../../../../node_modules/d3-sankey/node_modules/d3-array/src/sum.js","../../../../node_modules/d3-sankey/src/align.js","../../../../node_modules/d3-sankey/src/constant.js","../../../../node_modules/d3-sankey/src/sankey.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/node_modules/d3-path/src/path.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/constant.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/point.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/array.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js","../../../../node_modules/d3-sankey/src/sankeyLinkHorizontal.js","../../../../node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.mjs"],"sourcesContent":["export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n","import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","import {min} from \"d3-array\";\n\nfunction targetDepth(d) {\n return d.target.depth;\n}\n\nexport function left(node) {\n return node.depth;\n}\n\nexport function right(node, n) {\n return n - 1 - node.height;\n}\n\nexport function justify(node, n) {\n return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nexport function center(node) {\n return node.targetLinks.length ? node.depth\n : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1\n : 0;\n}\n","export default function constant(x) {\n return function() {\n return x;\n };\n}\n","import {max, min, sum} from \"d3-array\";\nimport {justify} from \"./align.js\";\nimport constant from \"./constant.js\";\n\nfunction ascendingSourceBreadth(a, b) {\n return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n return a.y0 - b.y0;\n}\n\nfunction value(d) {\n return d.value;\n}\n\nfunction defaultId(d) {\n return d.index;\n}\n\nfunction defaultNodes(graph) {\n return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n return graph.links;\n}\n\nfunction find(nodeById, id) {\n const node = nodeById.get(id);\n if (!node) throw new Error(\"missing: \" + id);\n return node;\n}\n\nfunction computeLinkBreadths({nodes}) {\n for (const node of nodes) {\n let y0 = node.y0;\n let y1 = y0;\n for (const link of node.sourceLinks) {\n link.y0 = y0 + link.width / 2;\n y0 += link.width;\n }\n for (const link of node.targetLinks) {\n link.y1 = y1 + link.width / 2;\n y1 += link.width;\n }\n }\n}\n\nexport default function Sankey() {\n let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent\n let dx = 24; // nodeWidth\n let dy = 8, py; // nodePadding\n let id = defaultId;\n let align = justify;\n let sort;\n let linkSort;\n let nodes = defaultNodes;\n let links = defaultLinks;\n let iterations = 6;\n\n function sankey() {\n const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n computeNodeLinks(graph);\n computeNodeValues(graph);\n computeNodeDepths(graph);\n computeNodeHeights(graph);\n computeNodeBreadths(graph);\n computeLinkBreadths(graph);\n return graph;\n }\n\n sankey.update = function(graph) {\n computeLinkBreadths(graph);\n return graph;\n };\n\n sankey.nodeId = function(_) {\n return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n };\n\n sankey.nodeAlign = function(_) {\n return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n };\n\n sankey.nodeSort = function(_) {\n return arguments.length ? (sort = _, sankey) : sort;\n };\n\n sankey.nodeWidth = function(_) {\n return arguments.length ? (dx = +_, sankey) : dx;\n };\n\n sankey.nodePadding = function(_) {\n return arguments.length ? (dy = py = +_, sankey) : dy;\n };\n\n sankey.nodes = function(_) {\n return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n };\n\n sankey.links = function(_) {\n return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n };\n\n sankey.linkSort = function(_) {\n return arguments.length ? (linkSort = _, sankey) : linkSort;\n };\n\n sankey.size = function(_) {\n return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n };\n\n sankey.extent = function(_) {\n return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n };\n\n sankey.iterations = function(_) {\n return arguments.length ? (iterations = +_, sankey) : iterations;\n };\n\n function computeNodeLinks({nodes, links}) {\n for (const [i, node] of nodes.entries()) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n }\n const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));\n for (const [i, link] of links.entries()) {\n link.index = i;\n let {source, target} = link;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n }\n if (linkSort != null) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(linkSort);\n targetLinks.sort(linkSort);\n }\n }\n }\n\n function computeNodeValues({nodes}) {\n for (const node of nodes) {\n node.value = node.fixedValue === undefined\n ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value))\n : node.fixedValue;\n }\n }\n\n function computeNodeDepths({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.depth = x;\n for (const {target} of node.sourceLinks) {\n next.add(target);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeHeights({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.height = x;\n for (const {source} of node.targetLinks) {\n next.add(source);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeLayers({nodes}) {\n const x = max(nodes, d => d.depth) + 1;\n const kx = (x1 - x0 - dx) / (x - 1);\n const columns = new Array(x);\n for (const node of nodes) {\n const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x))));\n node.layer = i;\n node.x0 = x0 + i * kx;\n node.x1 = node.x0 + dx;\n if (columns[i]) columns[i].push(node);\n else columns[i] = [node];\n }\n if (sort) for (const column of columns) {\n column.sort(sort);\n }\n return columns;\n }\n\n function initializeNodeBreadths(columns) {\n const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value));\n for (const nodes of columns) {\n let y = y0;\n for (const node of nodes) {\n node.y0 = y;\n node.y1 = y + node.value * ky;\n y = node.y1 + py;\n for (const link of node.sourceLinks) {\n link.width = link.value * ky;\n }\n }\n y = (y1 - y + py) / (nodes.length + 1);\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n node.y0 += y * (i + 1);\n node.y1 += y * (i + 1);\n }\n reorderLinks(nodes);\n }\n }\n\n function computeNodeBreadths(graph) {\n const columns = computeNodeLayers(graph);\n py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1));\n initializeNodeBreadths(columns);\n for (let i = 0; i < iterations; ++i) {\n const alpha = Math.pow(0.99, i);\n const beta = Math.max(1 - alpha, (i + 1) / iterations);\n relaxRightToLeft(columns, alpha, beta);\n relaxLeftToRight(columns, alpha, beta);\n }\n }\n\n // Reposition each node based on its incoming (target) links.\n function relaxLeftToRight(columns, alpha, beta) {\n for (let i = 1, n = columns.length; i < n; ++i) {\n const column = columns[i];\n for (const target of column) {\n let y = 0;\n let w = 0;\n for (const {source, value} of target.targetLinks) {\n let v = value * (target.layer - source.layer);\n y += targetTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - target.y0) * alpha;\n target.y0 += dy;\n target.y1 += dy;\n reorderNodeLinks(target);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n // Reposition each node based on its outgoing (source) links.\n function relaxRightToLeft(columns, alpha, beta) {\n for (let n = columns.length, i = n - 2; i >= 0; --i) {\n const column = columns[i];\n for (const source of column) {\n let y = 0;\n let w = 0;\n for (const {target, value} of source.sourceLinks) {\n let v = value * (target.layer - source.layer);\n y += sourceTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - source.y0) * alpha;\n source.y0 += dy;\n source.y1 += dy;\n reorderNodeLinks(source);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n function resolveCollisions(nodes, alpha) {\n const i = nodes.length >> 1;\n const subject = nodes[i];\n resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha);\n resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha);\n resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha);\n resolveCollisionsTopToBottom(nodes, y0, 0, alpha);\n }\n\n // Push any overlapping nodes down.\n function resolveCollisionsTopToBottom(nodes, y, i, alpha) {\n for (; i < nodes.length; ++i) {\n const node = nodes[i];\n const dy = (y - node.y0) * alpha;\n if (dy > 1e-6) node.y0 += dy, node.y1 += dy;\n y = node.y1 + py;\n }\n }\n\n // Push any overlapping nodes up.\n function resolveCollisionsBottomToTop(nodes, y, i, alpha) {\n for (; i >= 0; --i) {\n const node = nodes[i];\n const dy = (node.y1 - y) * alpha;\n if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy;\n y = node.y0 - py;\n }\n }\n\n function reorderNodeLinks({sourceLinks, targetLinks}) {\n if (linkSort === undefined) {\n for (const {source: {sourceLinks}} of targetLinks) {\n sourceLinks.sort(ascendingTargetBreadth);\n }\n for (const {target: {targetLinks}} of sourceLinks) {\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n function reorderLinks(nodes) {\n if (linkSort === undefined) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(ascendingTargetBreadth);\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n // Returns the target.y0 that would produce an ideal link from source to target.\n function targetTop(source, target) {\n let y = source.y0 - (source.sourceLinks.length - 1) * py / 2;\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y += width + py;\n }\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y -= width;\n }\n return y;\n }\n\n // Returns the source.y0 that would produce an ideal link from source to target.\n function sourceTop(source, target) {\n let y = target.y0 - (target.targetLinks.length - 1) * py / 2;\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y += width + py;\n }\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y -= width;\n }\n return y;\n }\n\n return sankey;\n}\n","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","export var slice = Array.prototype.slice;\n","import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n","import {linkHorizontal} from \"d3-shape\";\n\nfunction horizontalSource(d) {\n return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n return [d.target.x0, d.y1];\n}\n\nexport default function() {\n return linkHorizontal()\n .source(horizontalSource)\n .target(horizontalTarget);\n}\n","import {\n clear,\n common_default,\n defaultConfig2 as defaultConfig,\n getAccDescription,\n getAccTitle,\n getConfig2 as getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n setupGraphViewbox\n} from \"./chunk-ABZYJK2D.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/sankey/parser/sankey.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ __name(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12];\n var parser2 = {\n trace: /* @__PURE__ */ __name(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"SANKEY\": 4, \"NEWLINE\": 5, \"csv\": 6, \"opt_eof\": 7, \"record\": 8, \"csv_tail\": 9, \"EOF\": 10, \"field[source]\": 11, \"COMMA\": 12, \"field[target]\": 13, \"field[value]\": 14, \"field\": 15, \"escaped\": 16, \"non_escaped\": 17, \"DQUOTE\": 18, \"ESCAPED_TEXT\": 19, \"NON_ESCAPED_TEXT\": 20, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 4: \"SANKEY\", 5: \"NEWLINE\", 10: \"EOF\", 11: \"field[source]\", 12: \"COMMA\", 13: \"field[target]\", 14: \"field[value]\", 18: \"DQUOTE\", 19: \"ESCAPED_TEXT\", 20: \"NON_ESCAPED_TEXT\" },\n productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],\n performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 7:\n const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('\"\"', '\"'));\n const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('\"\"', '\"'));\n const value = parseFloat($$[$0].trim());\n yy.addLink(source, target, value);\n break;\n case 8:\n case 9:\n case 11:\n this.$ = $$[$0];\n break;\n case 10:\n this.$ = $$[$0 - 1];\n break;\n }\n }, \"anonymous\"),\n table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])],\n defaultActions: { 11: [2, 1], 12: [2, 5] },\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ __name(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n __name(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n __name(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ __name(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ __name(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ __name(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ __name(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ __name(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ __name(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ __name(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ __name(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ __name(function() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ __name(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ __name(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ __name(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ __name(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ __name(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ __name(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ __name(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: { \"case-insensitive\": true },\n performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n this.pushState(\"csv\");\n return 4;\n break;\n case 1:\n this.pushState(\"csv\");\n return 4;\n break;\n case 2:\n return 10;\n break;\n case 3:\n return 5;\n break;\n case 4:\n return 12;\n break;\n case 5:\n this.pushState(\"escaped_text\");\n return 18;\n break;\n case 6:\n return 20;\n break;\n case 7:\n this.popState(\"escaped_text\");\n return 18;\n break;\n case 8:\n return 19;\n break;\n }\n }, \"anonymous\"),\n rules: [/^(?:sankey-beta\\b)/i, /^(?:sankey\\b)/i, /^(?:$)/i, /^(?:((\\u000D\\u000A)|(\\u000A)))/i, /^(?:(\\u002C))/i, /^(?:(\\u0022))/i, /^(?:([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])*)/i, /^(?:(\\u0022)(?!(\\u0022)))/i, /^(?:(([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])|(\\u002C)|(\\u000D)|(\\u000A)|(\\u0022)(\\u0022))*)/i],\n conditions: { \"csv\": { \"rules\": [2, 3, 4, 5, 6, 7, 8], \"inclusive\": false }, \"escaped_text\": { \"rules\": [7, 8], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n __name(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar sankey_default = parser;\n\n// src/diagrams/sankey/sankeyDB.ts\nvar links = [];\nvar nodes = [];\nvar nodesMap = /* @__PURE__ */ new Map();\nvar clear2 = /* @__PURE__ */ __name(() => {\n links = [];\n nodes = [];\n nodesMap = /* @__PURE__ */ new Map();\n clear();\n}, \"clear\");\nvar SankeyLink = class {\n constructor(source, target, value = 0) {\n this.source = source;\n this.target = target;\n this.value = value;\n }\n static {\n __name(this, \"SankeyLink\");\n }\n};\nvar addLink = /* @__PURE__ */ __name((source, target, value) => {\n links.push(new SankeyLink(source, target, value));\n}, \"addLink\");\nvar SankeyNode = class {\n constructor(ID) {\n this.ID = ID;\n }\n static {\n __name(this, \"SankeyNode\");\n }\n};\nvar findOrCreateNode = /* @__PURE__ */ __name((ID) => {\n ID = common_default.sanitizeText(ID, getConfig());\n let node = nodesMap.get(ID);\n if (node === void 0) {\n node = new SankeyNode(ID);\n nodesMap.set(ID, node);\n nodes.push(node);\n }\n return node;\n}, \"findOrCreateNode\");\nvar getNodes = /* @__PURE__ */ __name(() => nodes, \"getNodes\");\nvar getLinks = /* @__PURE__ */ __name(() => links, \"getLinks\");\nvar getGraph = /* @__PURE__ */ __name(() => ({\n nodes: nodes.map((node) => ({ id: node.ID })),\n links: links.map((link) => ({\n source: link.source.ID,\n target: link.target.ID,\n value: link.value\n }))\n}), \"getGraph\");\nvar sankeyDB_default = {\n nodesMap,\n getConfig: /* @__PURE__ */ __name(() => getConfig().sankey, \"getConfig\"),\n getNodes,\n getLinks,\n getGraph,\n addLink,\n findOrCreateNode,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n getDiagramTitle,\n setDiagramTitle,\n clear: clear2\n};\n\n// src/diagrams/sankey/sankeyRenderer.ts\nimport {\n select as d3select,\n scaleOrdinal as d3scaleOrdinal,\n schemeTableau10 as d3schemeTableau10\n} from \"d3\";\nimport {\n sankey as d3Sankey,\n sankeyLinkHorizontal as d3SankeyLinkHorizontal,\n sankeyLeft as d3SankeyLeft,\n sankeyRight as d3SankeyRight,\n sankeyCenter as d3SankeyCenter,\n sankeyJustify as d3SankeyJustify\n} from \"d3-sankey\";\n\n// src/rendering-util/uid.ts\nvar Uid = class _Uid {\n static {\n __name(this, \"Uid\");\n }\n static {\n this.count = 0;\n }\n static next(name) {\n return new _Uid(name + ++_Uid.count);\n }\n constructor(id) {\n this.id = id;\n this.href = `#${id}`;\n }\n toString() {\n return \"url(\" + this.href + \")\";\n }\n};\n\n// src/diagrams/sankey/sankeyRenderer.ts\nvar alignmentsMap = {\n left: d3SankeyLeft,\n right: d3SankeyRight,\n center: d3SankeyCenter,\n justify: d3SankeyJustify\n};\nvar draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {\n const { securityLevel, sankey: conf } = getConfig();\n const defaultSankeyConfig = defaultConfig.sankey;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = d3select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select(\"body\");\n const svg = securityLevel === \"sandbox\" ? root.select(`[id=\"${id}\"]`) : d3select(`[id=\"${id}\"]`);\n const width = conf?.width ?? defaultSankeyConfig.width;\n const height = conf?.height ?? defaultSankeyConfig.width;\n const useMaxWidth = conf?.useMaxWidth ?? defaultSankeyConfig.useMaxWidth;\n const nodeAlignment = conf?.nodeAlignment ?? defaultSankeyConfig.nodeAlignment;\n const prefix = conf?.prefix ?? defaultSankeyConfig.prefix;\n const suffix = conf?.suffix ?? defaultSankeyConfig.suffix;\n const showValues = conf?.showValues ?? defaultSankeyConfig.showValues;\n const graph = diagObj.db.getGraph();\n const nodeAlign = alignmentsMap[nodeAlignment];\n const nodeWidth = 10;\n const sankey = d3Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([\n [0, 0],\n [width, height]\n ]);\n sankey(graph);\n const colorScheme = d3scaleOrdinal(d3schemeTableau10);\n svg.append(\"g\").attr(\"class\", \"nodes\").selectAll(\".node\").data(graph.nodes).join(\"g\").attr(\"class\", \"node\").attr(\"id\", (d) => (d.uid = Uid.next(\"node-\")).id).attr(\"transform\", function(d) {\n return \"translate(\" + d.x0 + \",\" + d.y0 + \")\";\n }).attr(\"x\", (d) => d.x0).attr(\"y\", (d) => d.y0).append(\"rect\").attr(\"height\", (d) => {\n return d.y1 - d.y0;\n }).attr(\"width\", (d) => d.x1 - d.x0).attr(\"fill\", (d) => colorScheme(d.id));\n const getText = /* @__PURE__ */ __name(({ id: id2, value }) => {\n if (!showValues) {\n return id2;\n }\n return `${id2}\n${prefix}${Math.round(value * 100) / 100}${suffix}`;\n }, \"getText\");\n svg.append(\"g\").attr(\"class\", \"node-labels\").attr(\"font-size\", 14).selectAll(\"text\").data(graph.nodes).join(\"text\").attr(\"x\", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr(\"y\", (d) => (d.y1 + d.y0) / 2).attr(\"dy\", `${showValues ? \"0\" : \"0.35\"}em`).attr(\"text-anchor\", (d) => d.x0 < width / 2 ? \"start\" : \"end\").text(getText);\n const link = svg.append(\"g\").attr(\"class\", \"links\").attr(\"fill\", \"none\").attr(\"stroke-opacity\", 0.5).selectAll(\".link\").data(graph.links).join(\"g\").attr(\"class\", \"link\").style(\"mix-blend-mode\", \"multiply\");\n const linkColor = conf?.linkColor ?? \"gradient\";\n if (linkColor === \"gradient\") {\n const gradient = link.append(\"linearGradient\").attr(\"id\", (d) => (d.uid = Uid.next(\"linearGradient-\")).id).attr(\"gradientUnits\", \"userSpaceOnUse\").attr(\"x1\", (d) => d.source.x1).attr(\"x2\", (d) => d.target.x0);\n gradient.append(\"stop\").attr(\"offset\", \"0%\").attr(\"stop-color\", (d) => colorScheme(d.source.id));\n gradient.append(\"stop\").attr(\"offset\", \"100%\").attr(\"stop-color\", (d) => colorScheme(d.target.id));\n }\n let coloring;\n switch (linkColor) {\n case \"gradient\":\n coloring = /* @__PURE__ */ __name((d) => d.uid, \"coloring\");\n break;\n case \"source\":\n coloring = /* @__PURE__ */ __name((d) => colorScheme(d.source.id), \"coloring\");\n break;\n case \"target\":\n coloring = /* @__PURE__ */ __name((d) => colorScheme(d.target.id), \"coloring\");\n break;\n default:\n coloring = linkColor;\n }\n link.append(\"path\").attr(\"d\", d3SankeyLinkHorizontal()).attr(\"stroke\", coloring).attr(\"stroke-width\", (d) => Math.max(1, d.width));\n setupGraphViewbox(void 0, svg, 0, useMaxWidth);\n}, \"draw\");\nvar sankeyRenderer_default = {\n draw\n};\n\n// src/diagrams/sankey/sankeyUtils.ts\nvar prepareTextForParsing = /* @__PURE__ */ __name((text) => {\n const textToParse = text.replaceAll(/^[^\\S\\n\\r]+|[^\\S\\n\\r]+$/g, \"\").replaceAll(/([\\n\\r])+/g, \"\\n\").trim();\n return textToParse;\n}, \"prepareTextForParsing\");\n\n// src/diagrams/sankey/styles.js\nvar getStyles = /* @__PURE__ */ __name((options) => `.label {\n font-family: ${options.fontFamily};\n }`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/sankey/sankeyDiagram.ts\nvar originalParse = sankey_default.parse.bind(sankey_default);\nsankey_default.parse = (text) => originalParse(prepareTextForParsing(text));\nvar diagram = {\n styles: styles_default,\n parser: sankey_default,\n db: sankeyDB_default,\n renderer: sankeyRenderer_default\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"mappings":"qOAAA,SAAA,EAAwB,EAAW,CAEjC,IADA,IAAI,EAAI,EAAU,OAAS,EAAI,EAAG,EAAa,MAAM,EAAE,CAAE,EAAI,EACtD,EAAI,GAAG,EAAO,GAAK,IAAM,EAAU,MAAM,EAAI,EAAG,EAAE,EAAI,EAAE,CAC/D,OAAO,ECDT,IAAA,EAAeA,EAAO,+DAA+D,CCFrF,SAAwB,EAAI,EAAQ,EAAS,CAC3C,IAAIC,EACJ,GAAI,IAAY,IAAA,OACT,IAAMC,KAAS,EACdA,GAAS,OACLD,EAAMC,GAAUD,IAAQ,IAAA,IAAaC,GAASA,KACpD,EAAMA,OAGL,CACL,IAAI,EAAQ,GACZ,IAAK,IAAIA,KAAS,GACX,EAAQ,EAAQA,EAAO,EAAE,EAAO,EAAO,GAAK,OACzCD,EAAMC,GAAUD,IAAQ,IAAA,IAAaC,GAASA,KACpD,EAAMA,GAIZ,OAAOD,EClBT,SAAwB,EAAI,EAAQ,EAAS,CAC3C,IAAIE,EACJ,GAAI,IAAY,IAAA,OACT,IAAMC,KAAS,EACdA,GAAS,OACLD,EAAMC,GAAUD,IAAQ,IAAA,IAAaC,GAASA,KACpD,EAAMA,OAGL,CACL,IAAI,EAAQ,GACZ,IAAK,IAA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CAAC,KAAK,gBAAiB,iBAAiB,CAAC,KAAK,KAAO,GAAM,EAAE,OAAO,GAAG,CAAC,KAAK,KAAO,GAAM,EAAE,OAAO,GAAG,CAChN,EAAS,OAAO,OAAO,CAAC,KAAK,SAAU,KAAK,CAAC,KAAK,aAAe,GAAM,EAAY,EAAE,OAAO,GAAG,CAAC,CAChG,EAAS,OAAO,OAAO,CAAC,KAAK,SAAU,OAAO,CAAC,KAAK,aAAe,GAAM,EAAY,EAAE,OAAO,GAAG,CAAC,CAEpG,IAAI,EACJ,OAAQ,EAAR,CACE,IAAK,WACH,EAA2B,EAAQ,GAAM,EAAE,IAAK,WAAW,CAC3D,MACF,IAAK,SACH,EAA2B,EAAQ,GAAM,EAAY,EAAE,OAAO,GAAG,CAAE,WAAW,CAC9E,MACF,IAAK,SACH,EAA2B,EAAQ,GAAM,EAAY,EAAE,OAAO,GAAG,CAAE,WAAW,CAC9E,MACF,QACE,EAAW,EAEf,EAAK,OAAO,OAAO,CAAC,KAAK,IAAKU,GAAwB,CAAC,CAAC,KAAK,SAAU,EAAS,CAAC,KAAK,eAAiB,GAAM,KAAK,IAAI,EAAG,EAAE,MAAM,CAAC,CAClI,EAAkB,IAAK,GAAG,EAAK,EAAG,EAAY,EAC7C,OAAO,CAGT,CAGG,GAAwC,EAAQ,GAC9B,EAAK,WAAW,2BAA4B,GAAG,CAAC,WAAW,aAAc;EAAK,CAAC,MAAM,CAExG,wBAAwB,CAMvB,GAH4B,EAAQ,GAAY;qBAC/B,EAAQ,WAAW;OAChC,YAAY,CAIhB,GAAgB,EAAe,MAAM,KAAK,EAAe,CAC7D,EAAe,MAAS,GAAS,GAAc,GAAsB,EAAK,CAAC,CAC3E,IAAI,GAAU,CACZ,OAAQ,GACR,OAAQ,EACR,GAAI,EACJ,SAAU,GACX"}
1
+ {"version":3,"file":"sankeyDiagram-TZEHDZUN-oekRPPoE.js","names":["colors","max","value","min","value","sum","value","x","nodes","link","links","x","y","value","dy","x","y","constant","x","x","pointX","y","pointY","link","path","constant","value","getConfig","link","d3SankeyLeft","d3SankeyRight","d3SankeyCenter","d3SankeyJustify","defaultConfig","d3select","d3Sankey","d3scaleOrdinal","d3schemeTableau10","d3SankeyLinkHorizontal"],"sources":["../../../../node_modules/d3-scale-chromatic/src/colors.js","../../../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js","../../../../node_modules/d3-sankey/node_modules/d3-array/src/max.js","../../../../node_modules/d3-sankey/node_modules/d3-array/src/min.js","../../../../node_modules/d3-sankey/node_modules/d3-array/src/sum.js","../../../../node_modules/d3-sankey/src/align.js","../../../../node_modules/d3-sankey/src/constant.js","../../../../node_modules/d3-sankey/src/sankey.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/node_modules/d3-path/src/path.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/constant.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/point.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/array.js","../../../../node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js","../../../../node_modules/d3-sankey/src/sankeyLinkHorizontal.js","../../../../node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.mjs"],"sourcesContent":["export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n","import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","import {min} from \"d3-array\";\n\nfunction targetDepth(d) {\n return d.target.depth;\n}\n\nexport function left(node) {\n return node.depth;\n}\n\nexport function right(node, n) {\n return n - 1 - node.height;\n}\n\nexport function justify(node, n) {\n return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nexport function center(node) {\n return node.targetLinks.length ? node.depth\n : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1\n : 0;\n}\n","export default function constant(x) {\n return function() {\n return x;\n };\n}\n","import {max, min, sum} from \"d3-array\";\nimport {justify} from \"./align.js\";\nimport constant from \"./constant.js\";\n\nfunction ascendingSourceBreadth(a, b) {\n return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n return a.y0 - b.y0;\n}\n\nfunction value(d) {\n return d.value;\n}\n\nfunction defaultId(d) {\n return d.index;\n}\n\nfunction defaultNodes(graph) {\n return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n return graph.links;\n}\n\nfunction find(nodeById, id) {\n const node = nodeById.get(id);\n if (!node) throw new Error(\"missing: \" + id);\n return node;\n}\n\nfunction computeLinkBreadths({nodes}) {\n for (const node of nodes) {\n let y0 = node.y0;\n let y1 = y0;\n for (const link of node.sourceLinks) {\n link.y0 = y0 + link.width / 2;\n y0 += link.width;\n }\n for (const link of node.targetLinks) {\n link.y1 = y1 + link.width / 2;\n y1 += link.width;\n }\n }\n}\n\nexport default function Sankey() {\n let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent\n let dx = 24; // nodeWidth\n let dy = 8, py; // nodePadding\n let id = defaultId;\n let align = justify;\n let sort;\n let linkSort;\n let nodes = defaultNodes;\n let links = defaultLinks;\n let iterations = 6;\n\n function sankey() {\n const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n computeNodeLinks(graph);\n computeNodeValues(graph);\n computeNodeDepths(graph);\n computeNodeHeights(graph);\n computeNodeBreadths(graph);\n computeLinkBreadths(graph);\n return graph;\n }\n\n sankey.update = function(graph) {\n computeLinkBreadths(graph);\n return graph;\n };\n\n sankey.nodeId = function(_) {\n return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n };\n\n sankey.nodeAlign = function(_) {\n return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n };\n\n sankey.nodeSort = function(_) {\n return arguments.length ? (sort = _, sankey) : sort;\n };\n\n sankey.nodeWidth = function(_) {\n return arguments.length ? (dx = +_, sankey) : dx;\n };\n\n sankey.nodePadding = function(_) {\n return arguments.length ? (dy = py = +_, sankey) : dy;\n };\n\n sankey.nodes = function(_) {\n return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n };\n\n sankey.links = function(_) {\n return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n };\n\n sankey.linkSort = function(_) {\n return arguments.length ? (linkSort = _, sankey) : linkSort;\n };\n\n sankey.size = function(_) {\n return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n };\n\n sankey.extent = function(_) {\n return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n };\n\n sankey.iterations = function(_) {\n return arguments.length ? (iterations = +_, sankey) : iterations;\n };\n\n function computeNodeLinks({nodes, links}) {\n for (const [i, node] of nodes.entries()) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n }\n const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));\n for (const [i, link] of links.entries()) {\n link.index = i;\n let {source, target} = link;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n }\n if (linkSort != null) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(linkSort);\n targetLinks.sort(linkSort);\n }\n }\n }\n\n function computeNodeValues({nodes}) {\n for (const node of nodes) {\n node.value = node.fixedValue === undefined\n ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value))\n : node.fixedValue;\n }\n }\n\n function computeNodeDepths({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.depth = x;\n for (const {target} of node.sourceLinks) {\n next.add(target);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeHeights({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.height = x;\n for (const {source} of node.targetLinks) {\n next.add(source);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeLayers({nodes}) {\n const x = max(nodes, d => d.depth) + 1;\n const kx = (x1 - x0 - dx) / (x - 1);\n const columns = new Array(x);\n for (const node of nodes) {\n const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x))));\n node.layer = i;\n node.x0 = x0 + i * kx;\n node.x1 = node.x0 + dx;\n if (columns[i]) columns[i].push(node);\n else columns[i] = [node];\n }\n if (sort) for (const column of columns) {\n column.sort(sort);\n }\n return columns;\n }\n\n function initializeNodeBreadths(columns) {\n const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value));\n for (const nodes of columns) {\n let y = y0;\n for (const node of nodes) {\n node.y0 = y;\n node.y1 = y + node.value * ky;\n y = node.y1 + py;\n for (const link of node.sourceLinks) {\n link.width = link.value * ky;\n }\n }\n y = (y1 - y + py) / (nodes.length + 1);\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n node.y0 += y * (i + 1);\n node.y1 += y * (i + 1);\n }\n reorderLinks(nodes);\n }\n }\n\n function computeNodeBreadths(graph) {\n const columns = computeNodeLayers(graph);\n py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1));\n initializeNodeBreadths(columns);\n for (let i = 0; i < iterations; ++i) {\n const alpha = Math.pow(0.99, i);\n const beta = Math.max(1 - alpha, (i + 1) / iterations);\n relaxRightToLeft(columns, alpha, beta);\n relaxLeftToRight(columns, alpha, beta);\n }\n }\n\n // Reposition each node based on its incoming (target) links.\n function relaxLeftToRight(columns, alpha, beta) {\n for (let i = 1, n = columns.length; i < n; ++i) {\n const column = columns[i];\n for (const target of column) {\n let y = 0;\n let w = 0;\n for (const {source, value} of target.targetLinks) {\n let v = value * (target.layer - source.layer);\n y += targetTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - target.y0) * alpha;\n target.y0 += dy;\n target.y1 += dy;\n reorderNodeLinks(target);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n // Reposition each node based on its outgoing (source) links.\n function relaxRightToLeft(columns, alpha, beta) {\n for (let n = columns.length, i = n - 2; i >= 0; --i) {\n const column = columns[i];\n for (const source of column) {\n let y = 0;\n let w = 0;\n for (const {target, value} of source.sourceLinks) {\n let v = value * (target.layer - source.layer);\n y += sourceTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - source.y0) * alpha;\n source.y0 += dy;\n source.y1 += dy;\n reorderNodeLinks(source);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n function resolveCollisions(nodes, alpha) {\n const i = nodes.length >> 1;\n const subject = nodes[i];\n resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha);\n resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha);\n resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha);\n resolveCollisionsTopToBottom(nodes, y0, 0, alpha);\n }\n\n // Push any overlapping nodes down.\n function resolveCollisionsTopToBottom(nodes, y, i, alpha) {\n for (; i < nodes.length; ++i) {\n const node = nodes[i];\n const dy = (y - node.y0) * alpha;\n if (dy > 1e-6) node.y0 += dy, node.y1 += dy;\n y = node.y1 + py;\n }\n }\n\n // Push any overlapping nodes up.\n function resolveCollisionsBottomToTop(nodes, y, i, alpha) {\n for (; i >= 0; --i) {\n const node = nodes[i];\n const dy = (node.y1 - y) * alpha;\n if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy;\n y = node.y0 - py;\n }\n }\n\n function reorderNodeLinks({sourceLinks, targetLinks}) {\n if (linkSort === undefined) {\n for (const {source: {sourceLinks}} of targetLinks) {\n sourceLinks.sort(ascendingTargetBreadth);\n }\n for (const {target: {targetLinks}} of sourceLinks) {\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n function reorderLinks(nodes) {\n if (linkSort === undefined) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(ascendingTargetBreadth);\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n // Returns the target.y0 that would produce an ideal link from source to target.\n function targetTop(source, target) {\n let y = source.y0 - (source.sourceLinks.length - 1) * py / 2;\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y += width + py;\n }\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y -= width;\n }\n return y;\n }\n\n // Returns the source.y0 that would produce an ideal link from source to target.\n function sourceTop(source, target) {\n let y = target.y0 - (target.targetLinks.length - 1) * py / 2;\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y += width + py;\n }\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y -= width;\n }\n return y;\n }\n\n return sankey;\n}\n","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","export var slice = Array.prototype.slice;\n","import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n","import {linkHorizontal} from \"d3-shape\";\n\nfunction horizontalSource(d) {\n return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n return [d.target.x0, d.y1];\n}\n\nexport default function() {\n return linkHorizontal()\n .source(horizontalSource)\n .target(horizontalTarget);\n}\n","import {\n clear,\n common_default,\n defaultConfig2 as defaultConfig,\n getAccDescription,\n getAccTitle,\n getConfig2 as getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n setupGraphViewbox\n} from \"./chunk-ABZYJK2D.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/sankey/parser/sankey.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ __name(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12];\n var parser2 = {\n trace: /* @__PURE__ */ __name(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"SANKEY\": 4, \"NEWLINE\": 5, \"csv\": 6, \"opt_eof\": 7, \"record\": 8, \"csv_tail\": 9, \"EOF\": 10, \"field[source]\": 11, \"COMMA\": 12, \"field[target]\": 13, \"field[value]\": 14, \"field\": 15, \"escaped\": 16, \"non_escaped\": 17, \"DQUOTE\": 18, \"ESCAPED_TEXT\": 19, \"NON_ESCAPED_TEXT\": 20, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 4: \"SANKEY\", 5: \"NEWLINE\", 10: \"EOF\", 11: \"field[source]\", 12: \"COMMA\", 13: \"field[target]\", 14: \"field[value]\", 18: \"DQUOTE\", 19: \"ESCAPED_TEXT\", 20: \"NON_ESCAPED_TEXT\" },\n productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],\n performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 7:\n const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('\"\"', '\"'));\n const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('\"\"', '\"'));\n const value = parseFloat($$[$0].trim());\n yy.addLink(source, target, value);\n break;\n case 8:\n case 9:\n case 11:\n this.$ = $$[$0];\n break;\n case 10:\n this.$ = $$[$0 - 1];\n break;\n }\n }, \"anonymous\"),\n table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])],\n defaultActions: { 11: [2, 1], 12: [2, 5] },\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ __name(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n __name(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n __name(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ __name(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ __name(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ __name(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ __name(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ __name(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ __name(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ __name(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ __name(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ __name(function() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ __name(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ __name(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ __name(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ __name(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ __name(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ __name(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ __name(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: { \"case-insensitive\": true },\n performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n this.pushState(\"csv\");\n return 4;\n break;\n case 1:\n this.pushState(\"csv\");\n return 4;\n break;\n case 2:\n return 10;\n break;\n case 3:\n return 5;\n break;\n case 4:\n return 12;\n break;\n case 5:\n this.pushState(\"escaped_text\");\n return 18;\n break;\n case 6:\n return 20;\n break;\n case 7:\n this.popState(\"escaped_text\");\n return 18;\n break;\n case 8:\n return 19;\n break;\n }\n }, \"anonymous\"),\n rules: [/^(?:sankey-beta\\b)/i, /^(?:sankey\\b)/i, /^(?:$)/i, /^(?:((\\u000D\\u000A)|(\\u000A)))/i, /^(?:(\\u002C))/i, /^(?:(\\u0022))/i, /^(?:([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])*)/i, /^(?:(\\u0022)(?!(\\u0022)))/i, /^(?:(([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])|(\\u002C)|(\\u000D)|(\\u000A)|(\\u0022)(\\u0022))*)/i],\n conditions: { \"csv\": { \"rules\": [2, 3, 4, 5, 6, 7, 8], \"inclusive\": false }, \"escaped_text\": { \"rules\": [7, 8], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n __name(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar sankey_default = parser;\n\n// src/diagrams/sankey/sankeyDB.ts\nvar links = [];\nvar nodes = [];\nvar nodesMap = /* @__PURE__ */ new Map();\nvar clear2 = /* @__PURE__ */ __name(() => {\n links = [];\n nodes = [];\n nodesMap = /* @__PURE__ */ new Map();\n clear();\n}, \"clear\");\nvar SankeyLink = class {\n constructor(source, target, value = 0) {\n this.source = source;\n this.target = target;\n this.value = value;\n }\n static {\n __name(this, \"SankeyLink\");\n }\n};\nvar addLink = /* @__PURE__ */ __name((source, target, value) => {\n links.push(new SankeyLink(source, target, value));\n}, \"addLink\");\nvar SankeyNode = class {\n constructor(ID) {\n this.ID = ID;\n }\n static {\n __name(this, \"SankeyNode\");\n }\n};\nvar findOrCreateNode = /* @__PURE__ */ __name((ID) => {\n ID = common_default.sanitizeText(ID, getConfig());\n let node = nodesMap.get(ID);\n if (node === void 0) {\n node = new SankeyNode(ID);\n nodesMap.set(ID, node);\n nodes.push(node);\n }\n return node;\n}, \"findOrCreateNode\");\nvar getNodes = /* @__PURE__ */ __name(() => nodes, \"getNodes\");\nvar getLinks = /* @__PURE__ */ __name(() => links, \"getLinks\");\nvar getGraph = /* @__PURE__ */ __name(() => ({\n nodes: nodes.map((node) => ({ id: node.ID })),\n links: links.map((link) => ({\n source: link.source.ID,\n target: link.target.ID,\n value: link.value\n }))\n}), \"getGraph\");\nvar sankeyDB_default = {\n nodesMap,\n getConfig: /* @__PURE__ */ __name(() => getConfig().sankey, \"getConfig\"),\n getNodes,\n getLinks,\n getGraph,\n addLink,\n findOrCreateNode,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n getDiagramTitle,\n setDiagramTitle,\n clear: clear2\n};\n\n// src/diagrams/sankey/sankeyRenderer.ts\nimport {\n select as d3select,\n scaleOrdinal as d3scaleOrdinal,\n schemeTableau10 as d3schemeTableau10\n} from \"d3\";\nimport {\n sankey as d3Sankey,\n sankeyLinkHorizontal as d3SankeyLinkHorizontal,\n sankeyLeft as d3SankeyLeft,\n sankeyRight as d3SankeyRight,\n sankeyCenter as d3SankeyCenter,\n sankeyJustify as d3SankeyJustify\n} from \"d3-sankey\";\n\n// src/rendering-util/uid.ts\nvar Uid = class _Uid {\n static {\n __name(this, \"Uid\");\n }\n static {\n this.count = 0;\n }\n static next(name) {\n return new _Uid(name + ++_Uid.count);\n }\n constructor(id) {\n this.id = id;\n this.href = `#${id}`;\n }\n toString() {\n return \"url(\" + this.href + \")\";\n }\n};\n\n// src/diagrams/sankey/sankeyRenderer.ts\nvar alignmentsMap = {\n left: d3SankeyLeft,\n right: d3SankeyRight,\n center: d3SankeyCenter,\n justify: d3SankeyJustify\n};\nvar draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {\n const { securityLevel, sankey: conf } = getConfig();\n const defaultSankeyConfig = defaultConfig.sankey;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = d3select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select(\"body\");\n const svg = securityLevel === \"sandbox\" ? root.select(`[id=\"${id}\"]`) : d3select(`[id=\"${id}\"]`);\n const width = conf?.width ?? defaultSankeyConfig.width;\n const height = conf?.height ?? defaultSankeyConfig.width;\n const useMaxWidth = conf?.useMaxWidth ?? defaultSankeyConfig.useMaxWidth;\n const nodeAlignment = conf?.nodeAlignment ?? defaultSankeyConfig.nodeAlignment;\n const prefix = conf?.prefix ?? defaultSankeyConfig.prefix;\n const suffix = conf?.suffix ?? defaultSankeyConfig.suffix;\n const showValues = conf?.showValues ?? defaultSankeyConfig.showValues;\n const graph = diagObj.db.getGraph();\n const nodeAlign = alignmentsMap[nodeAlignment];\n const nodeWidth = 10;\n const sankey = d3Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([\n [0, 0],\n [width, height]\n ]);\n sankey(graph);\n const colorScheme = d3scaleOrdinal(d3schemeTableau10);\n svg.append(\"g\").attr(\"class\", \"nodes\").selectAll(\".node\").data(graph.nodes).join(\"g\").attr(\"class\", \"node\").attr(\"id\", (d) => (d.uid = Uid.next(\"node-\")).id).attr(\"transform\", function(d) {\n return \"translate(\" + d.x0 + \",\" + d.y0 + \")\";\n }).attr(\"x\", (d) => d.x0).attr(\"y\", (d) => d.y0).append(\"rect\").attr(\"height\", (d) => {\n return d.y1 - d.y0;\n }).attr(\"width\", (d) => d.x1 - d.x0).attr(\"fill\", (d) => colorScheme(d.id));\n const getText = /* @__PURE__ */ __name(({ id: id2, value }) => {\n if (!showValues) {\n return id2;\n }\n return `${id2}\n${prefix}${Math.round(value * 100) / 100}${suffix}`;\n }, \"getText\");\n svg.append(\"g\").attr(\"class\", \"node-labels\").attr(\"font-size\", 14).selectAll(\"text\").data(graph.nodes).join(\"text\").attr(\"x\", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr(\"y\", (d) => (d.y1 + d.y0) / 2).attr(\"dy\", `${showValues ? \"0\" : \"0.35\"}em`).attr(\"text-anchor\", (d) => d.x0 < width / 2 ? \"start\" : \"end\").text(getText);\n const link = svg.append(\"g\").attr(\"class\", \"links\").attr(\"fill\", \"none\").attr(\"stroke-opacity\", 0.5).selectAll(\".link\").data(graph.links).join(\"g\").attr(\"class\", \"link\").style(\"mix-blend-mode\", \"multiply\");\n const linkColor = conf?.linkColor ?? \"gradient\";\n if (linkColor === \"gradient\") {\n const gradient = link.append(\"linearGradient\").attr(\"id\", (d) => (d.uid = Uid.next(\"linearGradient-\")).id).attr(\"gradientUnits\", \"userSpaceOnUse\").attr(\"x1\", (d) => d.source.x1).attr(\"x2\", (d) => d.target.x0);\n gradient.append(\"stop\").attr(\"offset\", \"0%\").attr(\"stop-color\", (d) => colorScheme(d.source.id));\n gradient.append(\"stop\").attr(\"offset\", \"100%\").attr(\"stop-color\", (d) => colorScheme(d.target.id));\n }\n let coloring;\n switch (linkColor) {\n case \"gradient\":\n coloring = /* @__PURE__ */ __name((d) => d.uid, \"coloring\");\n break;\n case \"source\":\n coloring = /* @__PURE__ */ __name((d) => colorScheme(d.source.id), \"coloring\");\n break;\n case \"target\":\n coloring = /* @__PURE__ */ __name((d) => colorScheme(d.target.id), \"coloring\");\n break;\n default:\n coloring = linkColor;\n }\n link.append(\"path\").attr(\"d\", d3SankeyLinkHorizontal()).attr(\"stroke\", coloring).attr(\"stroke-width\", (d) => Math.max(1, d.width));\n setupGraphViewbox(void 0, svg, 0, useMaxWidth);\n}, \"draw\");\nvar sankeyRenderer_default = {\n draw\n};\n\n// src/diagrams/sankey/sankeyUtils.ts\nvar prepareTextForParsing = /* @__PURE__ */ __name((text) => {\n const textToParse = text.replaceAll(/^[^\\S\\n\\r]+|[^\\S\\n\\r]+$/g, \"\").replaceAll(/([\\n\\r])+/g, \"\\n\").trim();\n return textToParse;\n}, \"prepareTextForParsing\");\n\n// src/diagrams/sankey/styles.js\nvar getStyles = /* @__PURE__ */ __name((options) => `.label {\n font-family: ${options.fontFamily};\n }`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/sankey/sankeyDiagram.ts\nvar originalParse = sankey_default.parse.bind(sankey_default);\nsankey_default.parse = (text) => originalParse(prepareTextForParsing(text));\nvar diagram = {\n styles: styles_default,\n parser: sankey_default,\n db: sankeyDB_default,\n renderer: sankeyRenderer_default\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"mappings":"qOAAA,SAAA,EAAwB,EAAW,CAEjC,IADA,IAAI,EAAI,EAAU,OAAS,EAAI,EAAG,EAAa,MAAM,EAAE,CAAE,EAAI,EACtD,EAAI,GAAG,EAAO,GAAK,IAAM,EAAU,MAAM,EAAI,EAAG,EAAE,EAAI,EAAE,CAC/D,OAAO,ECDT,IAAA,EAAeA,EAAO,+DAA+D,CCFrF,SAAwB,EAAI,EAAQ,EAAS,CAC3C,I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AkB,IAAK,GAAG,EAAK,EAAG,EAAY,EAC7C,OAAO,CAGT,CAGG,GAAwC,EAAQ,GAC9B,EAAK,WAAW,2BAA4B,GAAG,CAAC,WAAW,aAAc;EAAK,CAAC,MAAM,CAExG,wBAAwB,CAMvB,GAH4B,EAAQ,GAAY;qBAC/B,EAAQ,WAAW;OAChC,YAAY,CAIhB,GAAgB,EAAe,MAAM,KAAK,EAAe,CAC7D,EAAe,MAAS,GAAS,GAAc,GAAsB,EAAK,CAAC,CAC3E,IAAI,GAAU,CACZ,OAAQ,GACR,OAAQ,EACR,GAAI,EACJ,SAAU,GACX"}
@@ -1,4 +1,4 @@
1
- import"./shiki-BE3D5Aiv.js";import{g as e,h as t,p as n}from"./src-CK1-XQNk.js";import{B as r,C as i,E as a,H as o,I as s,N as c,O as l,U as u,_ as d,a as f,b as p,c as m,i as h,r as g,s as _,v,y,z as b}from"./chunk-ABZYJK2D-C5l8JSxq.js";import{g as x,p as S,t as C}from"./chunk-S3R3BYOJ-CT_-fuX8.js";import{t as w}from"./dist-CINaey7q.js";import{i as T,n as E,o as D,r as O,s as k,t as A}from"./chunk-TZMSLE5B-BDUbzQ8i.js";import{n as j,t as M}from"./chunk-MI3HLSF2-uJR7wcvf.js";import{t as N}from"./chunk-QZHKN3VN-CpvDzHVU.js";var P=w(),F=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,13],l=[1,14],u=[1,16],d=[1,17],f=[1,18],p=[1,24],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,41],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],I=[2,71],L=[4,5,16,50,52,53],R=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],ee=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],te=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],B=[69,70,71],V=[1,127],H={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,13:`create`,14:`box`,15:`restOfLine`,16:`end`,18:`autonumber`,19:`NUM`,20:`off`,21:`activate`,23:`deactivate`,29:`title`,30:`legacy_title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`loop`,37:`rect`,38:`opt`,39:`alt`,41:`par`,43:`par_over`,44:`critical`,46:`break`,47:`option`,48:`and`,49:`else`,50:`participant`,51:`AS`,52:`participant_actor`,53:`destroy`,55:`note`,58:`over`,60:`links`,61:`link`,62:`properties`,63:`details`,65:`,`,66:`left_of`,67:`right_of`,69:`+`,70:`-`,71:`ACTOR`,73:`CONFIG_START`,74:`CONFIG_CONTENT`,75:`CONFIG_END`,76:`SOLID_OPEN_ARROW`,77:`DOTTED_OPEN_ARROW`,78:`SOLID_ARROW`,79:`BIDIRECTIONAL_SOLID_ARROW`,80:`DOTTED_ARROW`,81:`BIDIRECTIONAL_DOTTED_ARROW`,82:`SOLID_CROSS`,83:`DOTTED_CROSS`,84:`SOLID_POINT`,85:`DOTTED_POINT`,86:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 9:this.$=[];break;case 5:case 10:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 11:case 12:this.$=a[s];break;case 8:case 13:this.$=[];break;case 15:a[s].type=`createParticipant`,this.$=a[s];break;case 16:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 18:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 23:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 29:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 30:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 43:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 45:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 47:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 48:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 49:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 50:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 51:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 52:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 53:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 54:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 55:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 56:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 57:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 58:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 59:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-2],a[s]];break;case 63:this.$=a[s];break;case 64:this.$=r.PLACEMENT.LEFTOF;break;case 65:this.$=r.PLACEMENT.RIGHTOF;break;case 66:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 67:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 68:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 69:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 70:this.$=a[s-1].trim();break;case 71:this.$={type:`addParticipant`,actor:a[s]};break;case 72:this.$=r.LINETYPE.SOLID_OPEN;break;case 73:this.$=r.LINETYPE.DOTTED_OPEN;break;case 74:this.$=r.LINETYPE.SOLID;break;case 75:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=r.LINETYPE.DOTTED;break;case 77:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=r.LINETYPE.SOLID_CROSS;break;case 79:this.$=r.LINETYPE.DOTTED_CROSS;break;case 80:this.$=r.LINETYPE.SOLID_POINT;break;case 81:this.$=r.LINETYPE.DOTTED_POINT;break;case 82:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,12:12,13:c,14:l,17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},e(F,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},e(F,[2,7]),e(F,[2,8]),e(F,[2,14]),{12:48,50:E,52:D,53:O},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:P},{22:55,71:P},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(F,[2,29]),e(F,[2,30]),{32:[1,61]},{34:[1,62]},e(F,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:P},{22:75,71:P},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:P},{22:92,71:P},{22:93,71:P},{22:94,71:P},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],I),e(F,[2,6]),e(F,[2,15]),e(L,[2,9],{10:95}),e(F,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(F,[2,21]),{5:[1,99]},{5:[1,100]},e(F,[2,24]),e(F,[2,25]),e(F,[2,26]),e(F,[2,27]),e(F,[2,28]),e(F,[2,31]),e(F,[2,32]),e(R,a,{7:101}),e(R,a,{7:102}),e(R,a,{7:103}),e(ee,a,{40:104,7:105}),e(z,a,{42:106,7:107}),e(z,a,{7:107,42:108}),e(te,a,{45:109,7:110}),e(R,a,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],I,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:P},e(B,[2,72]),e(B,[2,73]),e(B,[2,74]),e(B,[2,75]),e(B,[2,76]),e(B,[2,77]),e(B,[2,78]),e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),{22:123,71:P},{22:125,59:124,71:P},{71:[2,64]},{71:[2,65]},{57:126,86:V},{57:128,86:V},{57:129,86:V},{57:130,86:V},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:E,52:D,53:O},{5:[1,136]},e(F,[2,19]),e(F,[2,20]),e(F,[2,22]),e(F,[2,23]),{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,137],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,138],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,139],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{16:[1,140]},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,49:[1,141],50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{16:[1,142]},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,48:[1,143],50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{16:[1,144]},{16:[1,145]},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,47:[1,146],50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,147],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{15:[1,148]},e(F,[2,49]),e(F,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(F,[2,51]),e(F,[2,52]),{22:151,71:P},{22:152,71:P},{57:153,86:V},{57:154,86:V},{57:155,86:V},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(F,[2,16]),e(L,[2,10]),{12:157,50:E,52:D,53:O},e(L,[2,12]),e(L,[2,13]),e(F,[2,18]),e(F,[2,34]),e(F,[2,35]),e(F,[2,36]),e(F,[2,37]),{15:[1,158]},e(F,[2,38]),{15:[1,159]},e(F,[2,39]),e(F,[2,40]),{15:[1,160]},e(F,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:V},{57:165,86:V},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:P},e(L,[2,11]),e(ee,a,{7:105,40:167}),e(z,a,{7:107,42:168}),e(te,a,{7:110,45:169}),e(F,[2,48]),{5:[2,70]},e(F,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import"./shiki-BE3D5Aiv.js";import{g as e,h as t,p as n}from"./src-CK1-XQNk.js";import{B as r,C as i,E as a,H as o,I as s,N as c,O as l,U as u,_ as d,a as f,b as p,c as m,i as h,r as g,s as _,v,y,z as b}from"./chunk-ABZYJK2D-CNhdKuqi.js";import{g as x,p as S,t as C}from"./chunk-S3R3BYOJ-lQHMbpG7.js";import{t as w}from"./dist-CINaey7q.js";import{i as T,n as E,o as D,r as O,s as k,t as A}from"./chunk-TZMSLE5B-Ddu4HD6D.js";import{n as j,t as M}from"./chunk-MI3HLSF2-uJR7wcvf.js";import{t as N}from"./chunk-QZHKN3VN-CpvDzHVU.js";var P=w(),F=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,13],l=[1,14],u=[1,16],d=[1,17],f=[1,18],p=[1,24],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,41],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],I=[2,71],L=[4,5,16,50,52,53],R=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],ee=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],te=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],B=[69,70,71],V=[1,127],H={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,13:`create`,14:`box`,15:`restOfLine`,16:`end`,18:`autonumber`,19:`NUM`,20:`off`,21:`activate`,23:`deactivate`,29:`title`,30:`legacy_title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`loop`,37:`rect`,38:`opt`,39:`alt`,41:`par`,43:`par_over`,44:`critical`,46:`break`,47:`option`,48:`and`,49:`else`,50:`participant`,51:`AS`,52:`participant_actor`,53:`destroy`,55:`note`,58:`over`,60:`links`,61:`link`,62:`properties`,63:`details`,65:`,`,66:`left_of`,67:`right_of`,69:`+`,70:`-`,71:`ACTOR`,73:`CONFIG_START`,74:`CONFIG_CONTENT`,75:`CONFIG_END`,76:`SOLID_OPEN_ARROW`,77:`DOTTED_OPEN_ARROW`,78:`SOLID_ARROW`,79:`BIDIRECTIONAL_SOLID_ARROW`,80:`DOTTED_ARROW`,81:`BIDIRECTIONAL_DOTTED_ARROW`,82:`SOLID_CROSS`,83:`DOTTED_CROSS`,84:`SOLID_POINT`,85:`DOTTED_POINT`,86:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 9:this.$=[];break;case 5:case 10:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 11:case 12:this.$=a[s];break;case 8:case 13:this.$=[];break;case 15:a[s].type=`createParticipant`,this.$=a[s];break;case 16:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 18:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 23:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 29:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 30:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 43:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 45:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 47:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 48:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 49:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 50:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 51:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 52:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 53:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 54:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 55:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 56:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 57:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 58:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 59:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-2],a[s]];break;case 63:this.$=a[s];break;case 64:this.$=r.PLACEMENT.LEFTOF;break;case 65:this.$=r.PLACEMENT.RIGHTOF;break;case 66:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 67:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 68:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 69:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 70:this.$=a[s-1].trim();break;case 71:this.$={type:`addParticipant`,actor:a[s]};break;case 72:this.$=r.LINETYPE.SOLID_OPEN;break;case 73:this.$=r.LINETYPE.DOTTED_OPEN;break;case 74:this.$=r.LINETYPE.SOLID;break;case 75:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=r.LINETYPE.DOTTED;break;case 77:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=r.LINETYPE.SOLID_CROSS;break;case 79:this.$=r.LINETYPE.DOTTED_CROSS;break;case 80:this.$=r.LINETYPE.SOLID_POINT;break;case 81:this.$=r.LINETYPE.DOTTED_POINT;break;case 82:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,12:12,13:c,14:l,17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},e(F,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},e(F,[2,7]),e(F,[2,8]),e(F,[2,14]),{12:48,50:E,52:D,53:O},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:P},{22:55,71:P},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(F,[2,29]),e(F,[2,30]),{32:[1,61]},{34:[1,62]},e(F,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:P},{22:75,71:P},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:P},{22:92,71:P},{22:93,71:P},{22:94,71:P},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],I),e(F,[2,6]),e(F,[2,15]),e(L,[2,9],{10:95}),e(F,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(F,[2,21]),{5:[1,99]},{5:[1,100]},e(F,[2,24]),e(F,[2,25]),e(F,[2,26]),e(F,[2,27]),e(F,[2,28]),e(F,[2,31]),e(F,[2,32]),e(R,a,{7:101}),e(R,a,{7:102}),e(R,a,{7:103}),e(ee,a,{40:104,7:105}),e(z,a,{42:106,7:107}),e(z,a,{7:107,42:108}),e(te,a,{45:109,7:110}),e(R,a,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],I,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:P},e(B,[2,72]),e(B,[2,73]),e(B,[2,74]),e(B,[2,75]),e(B,[2,76]),e(B,[2,77]),e(B,[2,78]),e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),{22:123,71:P},{22:125,59:124,71:P},{71:[2,64]},{71:[2,65]},{57:126,86:V},{57:128,86:V},{57:129,86:V},{57:130,86:V},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:E,52:D,53:O},{5:[1,136]},e(F,[2,19]),e(F,[2,20]),e(F,[2,22]),e(F,[2,23]),{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,137],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,138],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,139],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{16:[1,140]},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,49:[1,141],50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{16:[1,142]},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,48:[1,143],50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{16:[1,144]},{16:[1,145]},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,47:[1,146],50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{4:o,5:s,8:8,9:10,12:12,13:c,14:l,16:[1,147],17:15,18:u,21:d,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:h,33:g,35:_,36:v,37:y,38:b,39:x,41:S,43:C,44:w,46:T,50:E,52:D,53:O,55:k,60:A,61:j,62:M,63:N,71:P},{15:[1,148]},e(F,[2,49]),e(F,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(F,[2,51]),e(F,[2,52]),{22:151,71:P},{22:152,71:P},{57:153,86:V},{57:154,86:V},{57:155,86:V},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(F,[2,16]),e(L,[2,10]),{12:157,50:E,52:D,53:O},e(L,[2,12]),e(L,[2,13]),e(F,[2,18]),e(F,[2,34]),e(F,[2,35]),e(F,[2,36]),e(F,[2,37]),{15:[1,158]},e(F,[2,38]),{15:[1,159]},e(F,[2,39]),e(F,[2,40]),{15:[1,160]},e(F,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:V},{57:165,86:V},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:P},e(L,[2,11]),e(ee,a,{7:105,40:167}),e(z,a,{7:107,42:168}),e(te,a,{7:110,45:169}),e(F,[2,48]),{5:[2,70]},e(F,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};H.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -143,4 +143,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
143
143
  a ${m},${h} 0 0 0 ${f},0
144
144
  l 0,-${p-2*h}
145
145
  `;g.append(`path`).attr(`d`,_).attr(`fill`,`#eaeaea`).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`class`,d),r?g.attr(`transform`,`translate(${f*1.5}, ${u.height/4-2*h})`):g.attr(`transform`,`translate(${f*1.5}, ${(u.height+h)/4})`),t.rectData=u,q(n,l(t.description))(t.description,c,u.x,u.y+(r?(u.height+p)/4:(u.height+h)/2),u.width,u.height,{class:`actor ${ne}`},n);let v=g.select(`path:last-child`);return v.node()&&(t.height=v.node().getBBox().height+(n.sequence.labelBoxHeight??0)),t.height},`drawActorTypeDatabase`),he=t(function(e,t,n,r){let i=r?t.stopy:t.starty,a=t.x+t.width/2,o=i+80,s=e.append(`g`).lower();r||(K++,s.append(`line`).attr(`id`,`actor`+K).attr(`x1`,a).attr(`y1`,o).attr(`x2`,a).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name),t.actorCnt=K);let c=e.append(`g`),u=W;r?u+=` ${U}`:u+=` ${H}`,c.attr(`class`,u),c.attr(`name`,t.name);let d=D();return d.x=t.x,d.y=i,d.fill=`#eaeaea`,d.width=t.width,d.height=t.height,d.class=`actor`,c.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-30*2.5).attr(`y1`,i+10).attr(`x2`,t.x+t.width/2-15).attr(`y2`,i+10),c.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-30*2.5).attr(`y1`,i+0).attr(`x2`,t.x+t.width/2-30*2.5).attr(`y2`,i+20),c.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,i+10).attr(`r`,30),t.height=c.node().getBBox().height+(n.sequence.labelBoxHeight??0),q(n,l(t.description))(t.description,c,d.x,d.y+(r?30/2-4:18),d.width,d.height,{class:`actor ${W}`},n),c.attr(`transform`,`translate(0,22)`),t.height},`drawActorTypeBoundary`),ge=t(function(e,t,n,r){let i=r?t.stopy:t.starty,a=t.x+t.width/2,o=i+80,s=e.append(`g`).lower();r||(K++,s.append(`line`).attr(`id`,`actor`+K).attr(`x1`,a).attr(`y1`,o).attr(`x2`,a).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name),t.actorCnt=K);let c=e.append(`g`),u=W;r?u+=` ${U}`:u+=` ${H}`,c.attr(`class`,u),c.attr(`name`,t.name);let d=D();d.x=t.x,d.y=i,d.fill=`#eaeaea`,d.width=t.width,d.height=t.height,d.class=`actor`,d.rx=3,d.ry=3,c.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,a).attr(`y1`,i+25).attr(`x2`,a).attr(`y2`,i+45),c.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,a-V/2).attr(`y1`,i+33).attr(`x2`,a+V/2).attr(`y2`,i+33),c.append(`line`).attr(`x1`,a-V/2).attr(`y1`,i+60).attr(`x2`,a).attr(`y2`,i+45),c.append(`line`).attr(`x1`,a).attr(`y1`,i+45).attr(`x2`,a+V/2-2).attr(`y2`,i+60);let f=c.append(`circle`);return f.attr(`cx`,t.x+t.width/2),f.attr(`cy`,i+10),f.attr(`r`,15),f.attr(`width`,t.width),f.attr(`height`,t.height),t.height=c.node().getBBox().height,q(n,l(t.description))(t.description,c,d.x,d.y+35,d.width,d.height,{class:`actor ${W}`},n),t.height},`drawActorTypeActor`),_e=t(async function(e,t,n,r){switch(t.type){case`actor`:return await ge(e,t,n,r);case`participant`:return await le(e,t,n,r);case`boundary`:return await he(e,t,n,r);case`control`:return await fe(e,t,n,r);case`entity`:return await pe(e,t,n,r);case`database`:return await me(e,t,n,r);case`collections`:return await ue(e,t,n,r);case`queue`:return await de(e,t,n,r)}},`drawActor`),ve=t(function(e,t,n){let r=e.append(`g`);Se(r,t),t.name&&q(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),ye=t(function(e){return e.append(`g`)},`anchorElement`),be=t(function(e,t,n,r,i){let a=D(),o=t.anchored;a.x=t.startx,a.y=t.starty,a.class=`activation`+i%3,a.width=t.stopx-t.startx,a.height=n-t.starty,re(o,a)},`drawActivation`),xe=t(async function(e,n,r,i){let{boxMargin:a,boxTextMargin:o,labelBoxHeight:s,labelBoxWidth:c,messageFontFamily:u,messageFontSize:d,messageFontWeight:f}=i,p=e.append(`g`),m=t(function(e,t,n,r){return p.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);m(n.startx,n.starty,n.stopx,n.starty),m(n.stopx,n.starty,n.stopx,n.stopy),m(n.startx,n.stopy,n.stopx,n.stopy),m(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){m(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let h=k();h.text=r,h.x=n.startx,h.y=n.starty,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.width=c||50,h.height=s||20,h.textMargin=o,h.class=`labelText`,se(p,h),h=Ae(),h.text=n.title,h.x=n.startx+c/2+(n.stopx-n.startx)/2,h.y=n.starty+a+o,h.anchor=`middle`,h.valign=`middle`,h.textMargin=o,h.class=`loopText`,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=!0;let g=l(h.text)?await oe(p,h,n):G(p,h);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){h.text=t.message,h.x=n.startx+(n.stopx-n.startx)/2,h.y=n.sections[e].y+a+o,h.class=`loopText`,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=n.wrap,l(h.text)?(n.starty=n.sections[e].y,await oe(p,h,n)):G(p,h);let r=Math.round(g.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=r-(a+o)}}return n.height=Math.round(n.stopy-n.starty),p},`drawLoop`),Se=t(function(e,t){A(e,t)},`drawBackgroundRect`),Ce=t(function(e){e.append(`defs`).append(`symbol`).attr(`id`,`database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`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`)},`insertDatabaseIcon`),we=t(function(e){e.append(`defs`).append(`symbol`).attr(`id`,`computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`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`)},`insertComputerIcon`),Te=t(function(e){e.append(`defs`).append(`symbol`).attr(`id`,`clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`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`)},`insertClockIcon`),Ee=t(function(e){e.append(`defs`).append(`marker`).attr(`id`,`arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),De=t(function(e){e.append(`defs`).append(`marker`).attr(`id`,`filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Oe=t(function(e){e.append(`defs`).append(`marker`).attr(`id`,`sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),ke=t(function(e){e.append(`defs`).append(`marker`).attr(`id`,`crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),Ae=t(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),je=t(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),q=(function(){function e(e,t,n,r,i,o,s){a(t.append(`text`).attr(`x`,n+i/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}t(e,`byText`);function n(e,t,n,r,i,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[f,p]=S(l),m=e.split(_.lineBreakRegex);for(let e=0;e<m.length;e++){let c=e*f-f*(m.length-1)/2,l=t.append(`text`).attr(`x`,n+i/2).attr(`y`,r).style(`text-anchor`,`middle`).style(`font-size`,p).style(`font-weight`,d).style(`font-family`,u);l.append(`tspan`).attr(`x`,n+i/2).attr(`dy`,c).text(m[e]),l.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),a(l,s)}}t(n,`byTspan`);function r(e,t,r,i,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,i).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,i,o,s,c,l),a(d,c)}t(r,`byFo`);async function i(e,t,r,i,o,s,l,u){let d=await h(e,y()),f=t.append(`switch`),p=f.append(`foreignObject`).attr(`x`,r+o/2-d.width/2).attr(`y`,i+s/2-d.height/2).attr(`width`,d.width).attr(`height`,d.height).append(`xhtml:div`).style(`height`,`100%`).style(`width`,`100%`);p.append(`div`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(await c(e,y())),n(e,f,r,i,o,s,l,u),a(p,l)}t(i,`byKatex`);function a(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return t(a,`_setTextAttrs`),function(t,a=!1){return a?i:t.textPlacement===`fo`?r:t.textPlacement===`old`?e:n}})(),Me=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n).attr(`y`,r).style(`text-anchor`,`start`).text(e),s)}t(e,`byText`);function n(e,t,n,r,a,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,f=e.split(_.lineBreakRegex);for(let e=0;e<f.length;e++){let a=e*l-l*(f.length-1)/2,c=t.append(`text`).attr(`x`,n).attr(`y`,r).style(`text-anchor`,`start`).style(`font-size`,l).style(`font-weight`,d).style(`font-family`,u);c.append(`tspan`).attr(`x`,n).attr(`dy`,a).text(f[e]),c.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(c,s)}}t(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}t(r,`byFo`);function i(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return t(i,`_setTextAttrs`),function(t){return t.textPlacement===`fo`?r:t.textPlacement===`old`?e:n}})(),J={drawRect:re,drawText:G,drawLabel:se,drawActor:_e,drawBox:ve,drawPopup:ie,anchorElement:ye,drawActivation:be,drawLoop:xe,drawBackgroundRect:Se,insertArrowHead:Ee,insertArrowFilledHead:De,insertSequenceNumber:Oe,insertArrowCrossHead:ke,insertDatabaseIcon:Ce,insertComputerIcon:we,insertClockIcon:Te,getTextObj:Ae,getNoteRect:je,fixLifeLineHeights:ce,sanitizeUrl:P.sanitizeUrl},Y={},X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:t(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:t(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:t(function(e){this.boxes.push(e)},`addBox`),addActor:t(function(e){this.actors.push(e)},`addActor`),addLoop:t(function(e){this.loops.push(e)},`addLoop`),addMessage:t(function(e){this.messages.push(e)},`addMessage`),addNote:t(function(e){this.notes.push(e)},`addNote`),lastActor:t(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:t(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:t(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:t(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:t(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Be(p())},`init`),updateVal:t(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:t(function(e,n,r,i){let a=this,o=0;function s(s){return t(function(t){o++;let c=a.sequenceItems.length-o+1;a.updateVal(t,`starty`,n-c*Y.boxMargin,Math.min),a.updateVal(t,`stopy`,i+c*Y.boxMargin,Math.max),a.updateVal(X.data,`startx`,e-c*Y.boxMargin,Math.min),a.updateVal(X.data,`stopx`,r+c*Y.boxMargin,Math.max),s!==`activation`&&(a.updateVal(t,`startx`,e-c*Y.boxMargin,Math.min),a.updateVal(t,`stopx`,r+c*Y.boxMargin,Math.max),a.updateVal(X.data,`starty`,n-c*Y.boxMargin,Math.min),a.updateVal(X.data,`stopy`,i+c*Y.boxMargin,Math.max))},`updateItemBounds`)}t(s,`updateFn`),this.sequenceItems.forEach(s()),this.activations.forEach(s(`activation`))},`updateBounds`),insert:t(function(e,t,n,r){let i=_.getMin(e,n),a=_.getMax(e,n),o=_.getMin(t,r),s=_.getMax(t,r);this.updateVal(X.data,`startx`,i,Math.min),this.updateVal(X.data,`starty`,o,Math.min),this.updateVal(X.data,`stopx`,a,Math.max),this.updateVal(X.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:t(function(e,t,n){let r=n.get(e.from),i=Ve(e.from).length||0,a=r.x+r.width/2+(i-1)*Y.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Y.activationWidth,stopy:void 0,actor:e.from,anchored:J.anchorElement(t)})},`newActivation`),endActivation:t(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:t(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:t(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:t(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:t(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:t(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:X.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:t(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:t(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:t(function(e){this.verticalPos+=e,this.data.stopy=_.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:t(function(){return this.verticalPos},`getVerticalPos`),getBounds:t(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Ne=t(async function(e,t){X.bumpVerticalPos(Y.boxMargin),t.height=Y.boxMargin,t.starty=X.getVerticalPos();let n=D();n.x=t.startx,n.y=t.starty,n.width=t.width||Y.width,n.class=`note`;let r=e.append(`g`),i=J.drawRect(r,n),a=k();a.x=t.startx,a.y=t.starty,a.width=n.width,a.dy=`1em`,a.text=t.message,a.class=`noteText`,a.fontFamily=Y.noteFontFamily,a.fontSize=Y.noteFontSize,a.fontWeight=Y.noteFontWeight,a.anchor=Y.noteAlign,a.textMargin=Y.noteMargin,a.valign=`center`;let o=l(a.text)?await oe(r,a):G(r,a),s=Math.round(o.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));i.attr(`height`,s+2*Y.noteMargin),t.height+=s+2*Y.noteMargin,X.bumpVerticalPos(s+2*Y.noteMargin),t.stopy=t.starty+s+2*Y.noteMargin,t.stopx=t.startx+n.width,X.insert(t.startx,t.starty,t.stopx,t.stopy),X.models.addNote(t)},`drawNote`),Z=t(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Q=t(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Pe=t(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function Fe(e,t){X.bumpVerticalPos(10);let{startx:n,stopx:r,message:i}=t,a=_.splitBreaks(i).length,o=l(i),s=o?await h(i,p()):x.calculateTextDimensions(i,Z(Y));if(!o){let e=s.height/a;t.height+=e,X.bumpVerticalPos(e)}let c,u=s.height-10,d=s.width;if(n===r){c=X.getVerticalPos()+u,Y.rightAngles||(u+=Y.boxMargin,c=X.getVerticalPos()+u),u+=30;let e=_.getMax(d/2,Y.width/2);X.insert(n-e,X.getVerticalPos()-10+u,r+e,X.getVerticalPos()+30+u)}else u+=Y.boxMargin,c=X.getVerticalPos()+u,X.insert(n,c-10,r,c);return X.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,X.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),c}t(Fe,`boundMessage`);var Ie=t(async function(e,t,n,r){let{startx:i,stopx:o,starty:s,message:c,type:u,sequenceIndex:d,sequenceVisible:f}=t,p=x.calculateTextDimensions(c,Z(Y)),m=k();m.x=i,m.y=s+10,m.width=o-i,m.class=`messageText`,m.dy=`1em`,m.text=c,m.fontFamily=Y.messageFontFamily,m.fontSize=Y.messageFontSize,m.fontWeight=Y.messageFontWeight,m.anchor=Y.messageAlign,m.valign=`center`,m.textMargin=Y.wrapPadding,m.tspan=!1,l(m.text)?await oe(e,m,{startx:i,stopx:o,starty:n}):G(e,m);let h=p.width,g;i===o?g=Y.rightAngles?e.append(`path`).attr(`d`,`M ${i},${n} H ${i+_.getMax(Y.width/2,h/2)} V ${n+25} H ${i}`):e.append(`path`).attr(`d`,`M `+i+`,`+n+` C `+(i+60)+`,`+(n-10)+` `+(i+60)+`,`+(n+30)+` `+i+`,`+(n+20)):(g=e.append(`line`),g.attr(`x1`,i),g.attr(`y1`,n),g.attr(`x2`,o),g.attr(`y2`,n)),u===r.db.LINETYPE.DOTTED||u===r.db.LINETYPE.DOTTED_CROSS||u===r.db.LINETYPE.DOTTED_POINT||u===r.db.LINETYPE.DOTTED_OPEN||u===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style(`stroke-dasharray`,`3, 3`),g.attr(`class`,`messageLine1`)):g.attr(`class`,`messageLine0`);let v=``;Y.arrowMarkerAbsolute&&(v=a(!0)),g.attr(`stroke-width`,2),g.attr(`stroke`,`none`),g.style(`fill`,`none`),(u===r.db.LINETYPE.SOLID||u===r.db.LINETYPE.DOTTED)&&g.attr(`marker-end`,`url(`+v+`#arrowhead)`),(u===r.db.LINETYPE.BIDIRECTIONAL_SOLID||u===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr(`marker-start`,`url(`+v+`#arrowhead)`),g.attr(`marker-end`,`url(`+v+`#arrowhead)`)),(u===r.db.LINETYPE.SOLID_POINT||u===r.db.LINETYPE.DOTTED_POINT)&&g.attr(`marker-end`,`url(`+v+`#filled-head)`),(u===r.db.LINETYPE.SOLID_CROSS||u===r.db.LINETYPE.DOTTED_CROSS)&&g.attr(`marker-end`,`url(`+v+`#crosshead)`),(f||Y.showSequenceNumbers)&&((u===r.db.LINETYPE.BIDIRECTIONAL_SOLID||u===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(i<o?g.attr(`x1`,i+12):g.attr(`x1`,i+6)),e.append(`line`).attr(`x1`,i).attr(`y1`,n).attr(`x2`,i).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+v+`#sequencenumber)`),e.append(`text`).attr(`x`,i).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,`12px`).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(d))},`drawMessage`),Le=t(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||X.models.addBox(l),c+=Y.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=r.width||Y.width,r.height=_.getMax(r.height||Y.height,Y.height),r.margin=r.margin||Y.actorMargin,u=_.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=X.getVerticalPos(),X.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,X.models.addActor(r)}l&&!o&&X.models.addBox(l),X.bumpVerticalPos(u)},`addActorRenderingData`),Re=t(async function(e,t,n,r){if(r){let r=0;X.bumpVerticalPos(Y.boxMargin*2);for(let i of n){let n=t.get(i);n.stopy||=X.getVerticalPos();let a=await J.drawActor(e,n,Y,!0);r=_.getMax(r,a)}X.bumpVerticalPos(r+Y.boxMargin)}else for(let r of n){let n=t.get(r);await J.drawActor(e,n,Y,!1)}},`drawActors`),ze=t(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=Ke(n),c=J.drawPopup(e,n,s,Y,Y.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),Be=t(function(e){g(Y,e),e.fontFamily&&(Y.actorFontFamily=Y.noteFontFamily=Y.messageFontFamily=e.fontFamily),e.fontSize&&(Y.actorFontSize=Y.noteFontSize=Y.messageFontSize=e.fontSize),e.fontWeight&&(Y.actorFontWeight=Y.noteFontWeight=Y.messageFontWeight=e.fontWeight)},`setConf`),Ve=t(function(e){return X.activations.filter(function(t){return t.actor===e})},`actorActivations`),He=t(function(e,t){let n=t.get(e),r=Ve(e);return[r.reduce(function(e,t){return _.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return _.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(t,n,r,i,a){X.bumpVerticalPos(r);let o=i;if(n.id&&n.message&&t[n.id]){let r=t[n.id].width,a=Z(Y);n.message=x.wrapLabel(`[${n.message}]`,r-2*Y.wrapPadding,a),n.width=r,n.wrap=!0;let s=x.calculateTextDimensions(n.message,a),c=_.getMax(s.height,Y.labelBoxHeight);o=i+c,e.debug(`${c} - ${n.message}`)}a(n),X.bumpVerticalPos(o)}t($,`adjustLoopHeightForWrap`);function Ue(e,n,r,i,a,o,s){function c(t,r){t.x<a.get(e.from).x?(X.insert(n.stopx-r,n.starty,n.startx,n.stopy+t.height/2+Y.noteMargin),n.stopx+=r):(X.insert(n.startx,n.starty,n.stopx+r,n.stopy+t.height/2+Y.noteMargin),n.stopx-=r)}t(c,`receiverAdjustment`);function l(t,r){t.x<a.get(e.to).x?(X.insert(n.startx-r,n.starty,n.stopx,n.stopy+t.height/2+Y.noteMargin),n.startx+=r):(X.insert(n.stopx,n.starty,n.startx+r,n.stopy+t.height/2+Y.noteMargin),n.startx-=r)}t(l,`senderAdjustment`);let u=[z.ACTOR,z.CONTROL,z.ENTITY,z.DATABASE];if(o.get(e.to)==i){let t=a.get(e.to);c(t,u.includes(t.type)?V/2+3:t.width/2+3),t.starty=r-t.height/2,X.bumpVerticalPos(t.height/2)}else if(s.get(e.from)==i){let t=a.get(e.from);Y.mirrorActors&&l(t,u.includes(t.type)?V/2:t.width/2),t.stopy=r-t.height/2,X.bumpVerticalPos(t.height/2)}else if(s.get(e.to)==i){let t=a.get(e.to);Y.mirrorActors&&c(t,u.includes(t.type)?V/2+3:t.width/2+3),t.stopy=r-t.height/2,X.bumpVerticalPos(t.height/2)}}t(Ue,`adjustCreatedDestroyedData`);var We=t(async function(r,i,a,o){let{securityLevel:s,sequence:c}=p();Y=c;let l;s===`sandbox`&&(l=n(`#i`+i));let u=n(s===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=s===`sandbox`?l.nodes()[0].contentDocument:document;X.init(),e.debug(o.db);let f=s===`sandbox`?u.select(`[id="${i}"]`):n(`[id="${i}"]`),h=o.db.getActors(),g=o.db.getCreatedActors(),_=o.db.getDestroyedActors(),v=o.db.getBoxes(),y=o.db.getActorKeys(),b=o.db.getMessages(),x=o.db.getDiagramTitle(),S=o.db.hasAtLeastOneBox(),C=o.db.hasAtLeastOneBoxWithTitle(),w=await Ge(h,b,o);if(Y.height=await qe(h,w,v),J.insertComputerIcon(f),J.insertDatabaseIcon(f),J.insertClockIcon(f),S&&(X.bumpVerticalPos(Y.boxMargin),C&&X.bumpVerticalPos(v[0].textMaxHeight)),Y.hideUnusedParticipants===!0){let e=new Set;b.forEach(t=>{e.add(t.from),e.add(t.to)}),y=y.filter(t=>e.has(t))}Le(f,h,g,y,0,b,!1);let T=await Xe(b,h,w,o);J.insertArrowHead(f),J.insertArrowCrossHead(f),J.insertArrowFilledHead(f),J.insertSequenceNumber(f);function E(e,t){let n=X.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),J.drawActivation(f,n,t,Y,Ve(e.from).length),X.insert(n.startx,t-10,n.stopx,t)}t(E,`activeEnd`);let D=1,O=1,k=[],A=[],j=0;for(let t of b){let n,r,i;switch(t.type){case o.db.LINETYPE.NOTE:X.resetVerticalPos(),r=t.noteModel,await Ne(f,r);break;case o.db.LINETYPE.ACTIVE_START:X.newActivation(t,f,h);break;case o.db.LINETYPE.ACTIVE_END:E(t,X.getVerticalPos());break;case o.db.LINETYPE.LOOP_START:$(T,t,Y.boxMargin,Y.boxMargin+Y.boxTextMargin,e=>X.newLoop(e));break;case o.db.LINETYPE.LOOP_END:n=X.endLoop(),await J.drawLoop(f,n,`loop`,Y),X.bumpVerticalPos(n.stopy-X.getVerticalPos()),X.models.addLoop(n);break;case o.db.LINETYPE.RECT_START:$(T,t,Y.boxMargin,Y.boxMargin,e=>X.newLoop(void 0,e.message));break;case o.db.LINETYPE.RECT_END:n=X.endLoop(),A.push(n),X.models.addLoop(n),X.bumpVerticalPos(n.stopy-X.getVerticalPos());break;case o.db.LINETYPE.OPT_START:$(T,t,Y.boxMargin,Y.boxMargin+Y.boxTextMargin,e=>X.newLoop(e));break;case o.db.LINETYPE.OPT_END:n=X.endLoop(),await J.drawLoop(f,n,`opt`,Y),X.bumpVerticalPos(n.stopy-X.getVerticalPos()),X.models.addLoop(n);break;case o.db.LINETYPE.ALT_START:$(T,t,Y.boxMargin,Y.boxMargin+Y.boxTextMargin,e=>X.newLoop(e));break;case o.db.LINETYPE.ALT_ELSE:$(T,t,Y.boxMargin+Y.boxTextMargin,Y.boxMargin,e=>X.addSectionToLoop(e));break;case o.db.LINETYPE.ALT_END:n=X.endLoop(),await J.drawLoop(f,n,`alt`,Y),X.bumpVerticalPos(n.stopy-X.getVerticalPos()),X.models.addLoop(n);break;case o.db.LINETYPE.PAR_START:case o.db.LINETYPE.PAR_OVER_START:$(T,t,Y.boxMargin,Y.boxMargin+Y.boxTextMargin,e=>X.newLoop(e)),X.saveVerticalPos();break;case o.db.LINETYPE.PAR_AND:$(T,t,Y.boxMargin+Y.boxTextMargin,Y.boxMargin,e=>X.addSectionToLoop(e));break;case o.db.LINETYPE.PAR_END:n=X.endLoop(),await J.drawLoop(f,n,`par`,Y),X.bumpVerticalPos(n.stopy-X.getVerticalPos()),X.models.addLoop(n);break;case o.db.LINETYPE.AUTONUMBER:D=t.message.start||D,O=t.message.step||O,t.message.visible?o.db.enableSequenceNumbers():o.db.disableSequenceNumbers();break;case o.db.LINETYPE.CRITICAL_START:$(T,t,Y.boxMargin,Y.boxMargin+Y.boxTextMargin,e=>X.newLoop(e));break;case o.db.LINETYPE.CRITICAL_OPTION:$(T,t,Y.boxMargin+Y.boxTextMargin,Y.boxMargin,e=>X.addSectionToLoop(e));break;case o.db.LINETYPE.CRITICAL_END:n=X.endLoop(),await J.drawLoop(f,n,`critical`,Y),X.bumpVerticalPos(n.stopy-X.getVerticalPos()),X.models.addLoop(n);break;case o.db.LINETYPE.BREAK_START:$(T,t,Y.boxMargin,Y.boxMargin+Y.boxTextMargin,e=>X.newLoop(e));break;case o.db.LINETYPE.BREAK_END:n=X.endLoop(),await J.drawLoop(f,n,`break`,Y),X.bumpVerticalPos(n.stopy-X.getVerticalPos()),X.models.addLoop(n);break;default:try{i=t.msgModel,i.starty=X.getVerticalPos(),i.sequenceIndex=D,i.sequenceVisible=o.db.showSequenceNumbers();let e=await Fe(f,i);Ue(t,i,e,j,h,g,_),k.push({messageModel:i,lineStartY:e}),X.models.addMessage(i)}catch(t){e.error(`error while drawing message`,t)}}[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT,o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(D+=O),j++}e.debug(`createdActors`,g),e.debug(`destroyedActors`,_),await Re(f,h,y,!1);for(let e of k)await Ie(f,e.messageModel,e.lineStartY,o);Y.mirrorActors&&await Re(f,h,y,!0),A.forEach(e=>J.drawBackgroundRect(f,e)),ce(f,h,y,Y);for(let e of X.models.boxes){e.height=X.getVerticalPos()-e.y,X.insert(e.x,e.y,e.x+e.width,e.height);let t=Y.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,J.drawBox(f,e,Y)}S&&X.bumpVerticalPos(Y.boxMargin);let M=ze(f,h,y,d),{bounds:N}=X.getBounds();N.startx===void 0&&(N.startx=0),N.starty===void 0&&(N.starty=0),N.stopx===void 0&&(N.stopx=0),N.stopy===void 0&&(N.stopy=0);let P=N.stopy-N.starty;P<M.maxHeight&&(P=M.maxHeight);let F=P+2*Y.diagramMarginY;Y.mirrorActors&&(F=F-Y.boxMargin+Y.bottomMarginAdj);let I=N.stopx-N.startx;I<M.maxWidth&&(I=M.maxWidth);let L=I+2*Y.diagramMarginX;x&&f.append(`text`).text(x).attr(`x`,(N.stopx-N.startx)/2-2*Y.diagramMarginX).attr(`y`,-25),m(f,F,L,Y.useMaxWidth);let R=x?40:0;f.attr(`viewBox`,N.startx-Y.diagramMarginX+` -`+(Y.diagramMarginY+R)+` `+L+` `+(F+R)),e.debug(`models:`,X.models)},`draw`);async function Ge(t,n,r){let i={};for(let e of n)if(t.get(e.to)&&t.get(e.from)){let n=t.get(e.to);if(e.placement===r.db.PLACEMENT.LEFTOF&&!n.prevActor||e.placement===r.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;let a=e.placement!==void 0,o=!a,s=a?Q(Y):Z(Y),c=e.wrap?x.wrapLabel(e.message,Y.width-2*Y.wrapPadding,s):e.message,u=(l(c)?await h(e.message,p()):x.calculateTextDimensions(c,s)).width+2*Y.wrapPadding;o&&e.from===n.nextActor?i[e.to]=_.getMax(i[e.to]||0,u):o&&e.from===n.prevActor?i[e.from]=_.getMax(i[e.from]||0,u):o&&e.from===e.to?(i[e.from]=_.getMax(i[e.from]||0,u/2),i[e.to]=_.getMax(i[e.to]||0,u/2)):e.placement===r.db.PLACEMENT.RIGHTOF?i[e.from]=_.getMax(i[e.from]||0,u):e.placement===r.db.PLACEMENT.LEFTOF?i[n.prevActor]=_.getMax(i[n.prevActor]||0,u):e.placement===r.db.PLACEMENT.OVER&&(n.prevActor&&(i[n.prevActor]=_.getMax(i[n.prevActor]||0,u/2)),n.nextActor&&(i[e.from]=_.getMax(i[e.from]||0,u/2)))}return e.debug(`maxMessageWidthPerActor:`,i),i}t(Ge,`getMaxMessageWidthPerActor`);var Ke=t(function(e){let t=0,n=Pe(Y);for(let r in e.links){let e=x.calculateTextDimensions(r,n).width+2*Y.wrapPadding+2*Y.boxMargin;t<e&&(t=e)}return t},`getRequiredPopupWidth`);async function qe(e,t,n){let r=0;for(let t of e.keys()){let n=e.get(t);n.wrap&&(n.description=x.wrapLabel(n.description,Y.width-2*Y.wrapPadding,Pe(Y)));let i=l(n.description)?await h(n.description,p()):x.calculateTextDimensions(n.description,Pe(Y));n.width=n.wrap?Y.width:_.getMax(Y.width,i.width+2*Y.wrapPadding),n.height=n.wrap?_.getMax(i.height,Y.height):Y.height,r=_.getMax(r,n.height)}for(let n in t){let r=e.get(n);if(!r)continue;let i=e.get(r.nextActor);if(!i){let e=t[n]+Y.actorMargin-r.width/2;r.margin=_.getMax(e,Y.actorMargin);continue}let a=t[n]+Y.actorMargin-r.width/2-i.width/2;r.margin=_.getMax(a,Y.actorMargin)}let i=0;return n.forEach(t=>{let n=Z(Y),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),a=Y.boxMargin*8;r+=a,r-=2*Y.boxTextMargin,t.wrap&&(t.name=x.wrapLabel(t.name,r-2*Y.wrapPadding,n));let o=x.calculateTextDimensions(t.name,n);i=_.getMax(o.height,i);let s=_.getMax(r,o.width+2*Y.wrapPadding);if(t.margin=Y.boxTextMargin,r<s){let e=(s-r)/2;t.margin+=e}}),n.forEach(e=>e.textMaxHeight=i),_.getMax(r,Y.height)}t(qe,`calculateActorMargins`);var Je=t(async function(t,n,r){let i=n.get(t.from),a=n.get(t.to),o=i.x,s=a.x,c=t.wrap&&t.message,u=l(t.message)?await h(t.message,p()):x.calculateTextDimensions(c?x.wrapLabel(t.message,Y.width,Q(Y)):t.message,Q(Y)),d={width:c?Y.width:_.getMax(Y.width,u.width+2*Y.noteMargin),height:0,startx:i.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(d.width=c?_.getMax(Y.width,u.width):_.getMax(i.width/2+a.width/2,u.width+2*Y.noteMargin),d.startx=o+(i.width+Y.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(d.width=c?_.getMax(Y.width,u.width+2*Y.noteMargin):_.getMax(i.width/2+a.width/2,u.width+2*Y.noteMargin),d.startx=o-d.width+(i.width-Y.actorMargin)/2):t.to===t.from?(u=x.calculateTextDimensions(c?x.wrapLabel(t.message,_.getMax(Y.width,i.width),Q(Y)):t.message,Q(Y)),d.width=c?_.getMax(Y.width,i.width):_.getMax(i.width,Y.width,u.width+2*Y.noteMargin),d.startx=o+(i.width-d.width)/2):(d.width=Math.abs(o+i.width/2-(s+a.width/2))+Y.actorMargin,d.startx=o<s?o+i.width/2-Y.actorMargin/2:s+a.width/2-Y.actorMargin/2),c&&(d.message=x.wrapLabel(t.message,d.width-2*Y.wrapPadding,Q(Y))),e.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${t.message}]`),d},`buildNoteModel`),Ye=t(function(e,n,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[i,a]=He(e.from,n),[o,s]=He(e.to,n),c=i<=o,l=c?a:i,u=c?o:s,d=Math.abs(o-s)>2,f=t(e=>c?-e:e,`adjustValue`);e.from===e.to?u=l:(e.activate&&!d&&(u+=f(Y.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(u+=f(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(l-=f(3)));let p=[i,a,o,s],m=Math.abs(l-u);e.wrap&&e.message&&(e.message=x.wrapLabel(e.message,_.getMax(m+2*Y.wrapPadding,Y.width),Z(Y)));let h=x.calculateTextDimensions(e.message,Z(Y));return{width:_.getMax(e.wrap?0:h.width+2*Y.wrapPadding,m+2*Y.wrapPadding,Y.width),height:0,startx:l,stopx:u,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},`buildMessageModel`),Xe=t(async function(t,n,r,i){let a={},o=[],s,c,l;for(let e of t){switch(e.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:e.id,msg:e.message,from:2**53-1,to:-(2**53-1),width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:e.message&&(s=o.pop(),a[s.id]=s,a[e.id]=s,o.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let t=n.get(e.from?e.from:e.to.actor),r=Ve(e.from?e.from:e.to.actor).length,i=t.x+t.width/2+(r-1)*Y.activationWidth/2,a={startx:i,stopx:i+Y.activationWidth,actor:e.from,enabled:!0};X.activations.push(a)}break;case i.db.LINETYPE.ACTIVE_END:{let t=X.activations.map(e=>e.actor).lastIndexOf(e.from);X.activations.splice(t,1).splice(0,1)}break}e.placement===void 0?(l=Ye(e,n,i),e.msgModel=l,l.startx&&l.stopx&&o.length>0&&o.forEach(t=>{if(s=t,l.startx===l.stopx){let t=n.get(e.from),r=n.get(e.to);s.from=_.getMin(t.x-l.width/2,t.x-t.width/2,s.from),s.to=_.getMax(r.x+l.width/2,r.x+t.width/2,s.to),s.width=_.getMax(s.width,Math.abs(s.to-s.from))-Y.labelBoxWidth}else s.from=_.getMin(l.startx,s.from),s.to=_.getMax(l.stopx,s.to),s.width=_.getMax(s.width,l.width)-Y.labelBoxWidth})):(c=await Je(e,n,i),e.noteModel=c,o.forEach(e=>{s=e,s.from=_.getMin(s.from,c.startx),s.to=_.getMax(s.to,c.startx+c.width),s.width=_.getMax(s.width,Math.abs(s.from-s.to))-Y.labelBoxWidth}))}return X.activations=[],e.debug(`Loop type widths:`,a),a},`calculateLoopBounds`),Ze={parser:I,get db(){return new te},renderer:{bounds:X,drawActors:Re,drawActorsPopup:ze,setConf:Be,draw:We},styles:B,init:t(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,o({sequence:{wrap:e.wrap}}))},`init`)};export{Ze as diagram};
146
- //# sourceMappingURL=sequenceDiagram-WL72ISMW-CaC09QcI.js.map
146
+ //# sourceMappingURL=sequenceDiagram-WL72ISMW-Cln9cEgi.js.map