gitnexus 1.6.4-rc.99 → 1.6.4

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 (143) hide show
  1. package/dist/_shared/index.d.ts +8 -0
  2. package/dist/_shared/index.d.ts.map +1 -1
  3. package/dist/_shared/index.js +9 -0
  4. package/dist/_shared/index.js.map +1 -1
  5. package/dist/_shared/integrations/circuit-breaker.d.ts +183 -0
  6. package/dist/_shared/integrations/circuit-breaker.d.ts.map +1 -0
  7. package/dist/_shared/integrations/circuit-breaker.js +236 -0
  8. package/dist/_shared/integrations/circuit-breaker.js.map +1 -0
  9. package/dist/_shared/integrations/resilient-fetch.d.ts +99 -0
  10. package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -0
  11. package/dist/_shared/integrations/resilient-fetch.js +204 -0
  12. package/dist/_shared/integrations/resilient-fetch.js.map +1 -0
  13. package/dist/_shared/integrations/retry.d.ts +60 -0
  14. package/dist/_shared/integrations/retry.d.ts.map +1 -0
  15. package/dist/_shared/integrations/retry.js +67 -0
  16. package/dist/_shared/integrations/retry.js.map +1 -0
  17. package/dist/_shared/integrations/understand-quickly.d.ts +79 -0
  18. package/dist/_shared/integrations/understand-quickly.d.ts.map +1 -0
  19. package/dist/_shared/integrations/understand-quickly.js +139 -0
  20. package/dist/_shared/integrations/understand-quickly.js.map +1 -0
  21. package/dist/_shared/test-helpers.d.ts +13 -0
  22. package/dist/_shared/test-helpers.d.ts.map +1 -0
  23. package/dist/_shared/test-helpers.js +13 -0
  24. package/dist/_shared/test-helpers.js.map +1 -0
  25. package/dist/cli/index.js +9 -0
  26. package/dist/cli/publish.d.ts +29 -0
  27. package/dist/cli/publish.js +174 -0
  28. package/dist/config/ignore-service.js +2 -0
  29. package/dist/core/embeddings/hf-env.d.ts +9 -37
  30. package/dist/core/embeddings/hf-env.js +65 -83
  31. package/dist/core/embeddings/http-client.d.ts +6 -0
  32. package/dist/core/embeddings/http-client.js +22 -18
  33. package/dist/core/group/bridge-db.js +7 -6
  34. package/dist/core/group/config-parser.js +19 -1
  35. package/dist/core/group/extractors/include-extractor.d.ts +39 -0
  36. package/dist/core/group/extractors/include-extractor.js +565 -0
  37. package/dist/core/group/extractors/manifest-extractor.js +8 -0
  38. package/dist/core/group/extractors/thrift-extractor.js +8 -0
  39. package/dist/core/group/matching.js +2 -0
  40. package/dist/core/group/storage.js +8 -1
  41. package/dist/core/group/sync.js +33 -0
  42. package/dist/core/group/types.d.ts +2 -1
  43. package/dist/core/ingestion/call-processor.js +6 -4
  44. package/dist/core/ingestion/cpp-ue-preprocessor.d.ts +12 -0
  45. package/dist/core/ingestion/cpp-ue-preprocessor.js +260 -0
  46. package/dist/core/ingestion/heritage-processor.js +9 -4
  47. package/dist/core/ingestion/import-processor.js +3 -2
  48. package/dist/core/ingestion/language-provider.d.ts +32 -0
  49. package/dist/core/ingestion/languages/c-cpp.js +2 -0
  50. package/dist/core/ingestion/parsing-processor.js +4 -0
  51. package/dist/core/ingestion/workers/parse-worker.js +4 -0
  52. package/dist/core/wiki/llm-client.d.ts +16 -0
  53. package/dist/core/wiki/llm-client.js +101 -63
  54. package/dist/server/api.js +7 -2
  55. package/package.json +2 -2
  56. package/vendor/node_modules/node-addon-api/node_addon_api.target.mk +16 -14
  57. package/vendor/node_modules/node-addon-api/node_addon_api_except.target.mk +16 -14
  58. package/vendor/node_modules/node-addon-api/node_addon_api_except_all.target.mk +16 -14
  59. package/vendor/node_modules/node-addon-api/node_addon_api_maybe.target.mk +16 -14
  60. package/web/assets/{agent-Dl2d-mDi.js → agent-BpHQleHE.js} +17 -17
  61. package/web/assets/architecture-YZFGNWBL-S5CXDPWN-BUzkWgDl.js +1 -0
  62. package/web/assets/{architectureDiagram-EMZXCZ2Q-uiiIna83.js → architectureDiagram-EMZXCZ2Q-CXbzok1G.js} +3 -3
  63. package/web/assets/{blockDiagram-IGV67L2C-uBKdDzXA.js → blockDiagram-IGV67L2C-DA1QJ4ZB.js} +4 -4
  64. package/web/assets/{c4Diagram-DFAF54RM-DTxaX43T.js → c4Diagram-DFAF54RM-DeJV1rCn.js} +2 -2
  65. package/web/assets/{chunk-3GS5O3IE-BxKKu7d7.js → chunk-3GS5O3IE-B8hpnia8.js} +2 -2
  66. package/web/assets/{chunk-3YCYZ6SJ-BJZnGFjg.js → chunk-3YCYZ6SJ-B-BVu21C.js} +1 -1
  67. package/web/assets/{chunk-6NTNNK5N-CIL_eO2d.js → chunk-6NTNNK5N-DW-jYSDr.js} +1 -1
  68. package/web/assets/{chunk-A34GCYZU-Dv4Vkem9.js → chunk-A34GCYZU-BbZl-IKy.js} +1 -1
  69. package/web/assets/{chunk-DJ7UZH7F-Cskl-nb3.js → chunk-DJ7UZH7F-B5tMfF87.js} +1 -1
  70. package/web/assets/{chunk-DKKBVRCY-D3S2BD56.js → chunk-DKKBVRCY-Djm-6K_e.js} +2 -2
  71. package/web/assets/{chunk-DU5LTGQ6-B8Zh51LG.js → chunk-DU5LTGQ6-QPoynYcp.js} +1 -1
  72. package/web/assets/{chunk-FXACKDTF-Cb4xHVUz.js → chunk-FXACKDTF-jieSmbe2.js} +3 -3
  73. package/web/assets/chunk-H3VCZNTA-8EMHZ3SV.js +1 -0
  74. package/web/assets/chunk-HN6EAY2L-CgE_agsD.js +1 -0
  75. package/web/assets/{chunk-O5ABG6QK-V3sk7Bps.js → chunk-O5ABG6QK-DEZV1O19.js} +1 -1
  76. package/web/assets/{chunk-PK6DOVAG-FvG7aKfZ.js → chunk-PK6DOVAG-BXv0JnsJ.js} +3 -3
  77. package/web/assets/{chunk-RNJOYNJ4-BPANsy8V.js → chunk-RNJOYNJ4-BiBkF9dN.js} +1 -1
  78. package/web/assets/chunk-RWUO3TPN-DTWzAhQ1.js +1 -0
  79. package/web/assets/chunk-TBF5ZNIQ-BSl6s9lT.js +1 -0
  80. package/web/assets/{chunk-TYMNRAUI-BnMe6HfP.js → chunk-TYMNRAUI-D1NDLIMG.js} +1 -1
  81. package/web/assets/{chunk-W7ZLLLMY-BqZFKM5j.js → chunk-W7ZLLLMY-Bu-cdLzs.js} +1 -1
  82. package/web/assets/{chunk-WSB5WSVC-EKS7-Nnc.js → chunk-WSB5WSVC-Dor71SOz.js} +1 -1
  83. package/web/assets/{chunk-XGPFEOL4-BBab-enK.js → chunk-XGPFEOL4-CUonLRle.js} +1 -1
  84. package/web/assets/classDiagram-PPOCWD7C-Cdd6UdVv.js +1 -0
  85. package/web/assets/classDiagram-v2-23LJLIIU-DNhxY2Ib.js +1 -0
  86. package/web/assets/{cose-bilkent-PNC4W37J-DjEQkTZ4.js → cose-bilkent-PNC4W37J-DdZq7Qz_.js} +1 -1
  87. package/web/assets/dagre-E77IOHMT-Cfj_6e17.js +4 -0
  88. package/web/assets/{diagram-H7BISOXX-CMuISoJL.js → diagram-H7BISOXX-BNvpsrBv.js} +2 -2
  89. package/web/assets/{diagram-JC5VWROH-DHq_eoeM.js → diagram-JC5VWROH-Cn0rtDbJ.js} +1 -1
  90. package/web/assets/{diagram-LXUTUG65-C0NczIgW.js → diagram-LXUTUG65-CHfoVKNm.js} +2 -2
  91. package/web/assets/{diagram-WEHSV5V5-WsBnpSuc.js → diagram-WEHSV5V5-BLxHksnu.js} +1 -1
  92. package/web/assets/{erDiagram-GCSMX5X6-DxHFHFR6.js → erDiagram-GCSMX5X6-DfdN6iqF.js} +2 -2
  93. package/web/assets/flowDiagram-OTCZ4VVT-aAZw4c_M.js +162 -0
  94. package/web/assets/ganttDiagram-MUNLMDZQ-BEfC_7Or.js +292 -0
  95. package/web/assets/gitGraph-7Q5UKJZL-54BCDZD5-B6ZeRLP0.js +1 -0
  96. package/web/assets/gitGraphDiagram-3HKGZ4G3-CG0kC8Q5.js +106 -0
  97. package/web/assets/{index-DDcYO1IJ.js → index-3NUCUW2s.js} +119 -119
  98. package/web/assets/info-OMHHGYJF-BF2H5H6G-BIOsZy0W.js +1 -0
  99. package/web/assets/infoDiagram-MN7RKWGX-DUoMH-pq.js +2 -0
  100. package/web/assets/{ishikawaDiagram-YMYX4NHK-C-JI2Ih7.js → ishikawaDiagram-YMYX4NHK-BF8AtDaj.js} +2 -2
  101. package/web/assets/{journeyDiagram-SO5T7YLQ-IPX4h3iD.js → journeyDiagram-SO5T7YLQ-BW8oKa3N.js} +3 -3
  102. package/web/assets/{kanban-definition-LJHFXRCJ-B23LtshQ.js → kanban-definition-LJHFXRCJ-DzbOsR-2.js} +6 -6
  103. package/web/assets/{mindmap-definition-2EUWGEK5-DJKUsrCo.js → mindmap-definition-2EUWGEK5-BIXGQALq.js} +25 -25
  104. package/web/assets/packet-4T2RLAQJ-EV4IVRXR-Bs7ysNMU.js +1 -0
  105. package/web/assets/pie-ZZUOXDRM-N23DN5KN-Csi8nnbH.js +1 -0
  106. package/web/assets/{pieDiagram-3IATQBI2-Bj26KTKk.js → pieDiagram-3IATQBI2-QY-u7P6a.js} +3 -3
  107. package/web/assets/{quadrantDiagram-E256RVCF-VAk5oIRr.js → quadrantDiagram-E256RVCF-Di4aNiU8.js} +3 -3
  108. package/web/assets/radar-PYXPWWZC-P6TP7ZYP-DJlyXh2-.js +1 -0
  109. package/web/assets/{requirementDiagram-M5DCFWZL-CmlTJ_vQ.js → requirementDiagram-M5DCFWZL-CzUUrhQD.js} +4 -4
  110. package/web/assets/{sankeyDiagram-L3NBLAOT-C-f_DdcX.js → sankeyDiagram-L3NBLAOT-D2fbMiIU.js} +3 -3
  111. package/web/assets/{sequenceDiagram-ZOUHS735-DmtNf1NF.js → sequenceDiagram-ZOUHS735-BNdkqguh.js} +6 -6
  112. package/web/assets/stateDiagram-MLPALWAM-51_Q2w2L.js +1 -0
  113. package/web/assets/stateDiagram-v2-B5LQ5ZB2-8nHs2aNE.js +1 -0
  114. package/web/assets/{timeline-definition-5SPVSISX-BkpqZxt2.js → timeline-definition-5SPVSISX-DkMiGj4Z.js} +9 -9
  115. package/web/assets/treeView-SZITEDCU-5DXDK3XO-Cy6P0_CZ.js +1 -0
  116. package/web/assets/treemap-W4RFUUIX-WYLRDWKO-C_pp1R7A.js +1 -0
  117. package/web/assets/{vennDiagram-IE5QUKF5-iAJ08JBe.js → vennDiagram-IE5QUKF5-BCxMmf9q.js} +3 -3
  118. package/web/assets/wardley-RL74JXVD-BCRCBASE-CMStJhpn.js +1 -0
  119. package/web/assets/{wardleyDiagram-XU3VSMPF-BDiKTkL4.js → wardleyDiagram-XU3VSMPF-ijlLF77s.js} +4 -4
  120. package/web/assets/{xychartDiagram-ZHJ5623Y-CknyZyQK.js → xychartDiagram-ZHJ5623Y-DZ7fP1_3.js} +3 -3
  121. package/web/index.html +1 -1
  122. package/web/assets/architecture-YZFGNWBL-S5CXDPWN-BYXnTu07.js +0 -1
  123. package/web/assets/chunk-H3VCZNTA-BOGhqvxW.js +0 -1
  124. package/web/assets/chunk-HN6EAY2L-CitKFy1e.js +0 -1
  125. package/web/assets/chunk-RWUO3TPN-BHusg2jI.js +0 -1
  126. package/web/assets/chunk-TBF5ZNIQ-CXamrpH3.js +0 -1
  127. package/web/assets/classDiagram-PPOCWD7C-B-LkKU0P.js +0 -1
  128. package/web/assets/classDiagram-v2-23LJLIIU-_NGI4VEh.js +0 -1
  129. package/web/assets/dagre-E77IOHMT-D6Xacg1x.js +0 -4
  130. package/web/assets/flowDiagram-OTCZ4VVT-_G1VxyQS.js +0 -162
  131. package/web/assets/ganttDiagram-MUNLMDZQ-BIHObj0t.js +0 -292
  132. package/web/assets/gitGraph-7Q5UKJZL-54BCDZD5-BXJXsixL.js +0 -1
  133. package/web/assets/gitGraphDiagram-3HKGZ4G3-COZUkHTD.js +0 -106
  134. package/web/assets/info-OMHHGYJF-BF2H5H6G-C820LK0J.js +0 -1
  135. package/web/assets/infoDiagram-MN7RKWGX-BeOjfPc_.js +0 -2
  136. package/web/assets/packet-4T2RLAQJ-EV4IVRXR-BvWtM5jq.js +0 -1
  137. package/web/assets/pie-ZZUOXDRM-N23DN5KN-BnDgj0TQ.js +0 -1
  138. package/web/assets/radar-PYXPWWZC-P6TP7ZYP-2IuDlZ6r.js +0 -1
  139. package/web/assets/stateDiagram-MLPALWAM-Lq7UVrkj.js +0 -1
  140. package/web/assets/stateDiagram-v2-B5LQ5ZB2-DCiXBPeS.js +0 -1
  141. package/web/assets/treeView-SZITEDCU-5DXDK3XO-Ipq1EIaF.js +0 -1
  142. package/web/assets/treemap-W4RFUUIX-WYLRDWKO-DESFxovu.js +0 -1
  143. package/web/assets/wardley-RL74JXVD-BCRCBASE-BVkhckBY.js +0 -1
@@ -1,7 +1,7 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{$t as t,C as n,It as r,Jt as i,Kn as a,Kt as o,N as s,Sn as c,Ut as l,en as u,fn as d,gn as f,hn as p,in as m,qn as h,sn as g,tn as _,un as v,zn as y}from"./index-DDcYO1IJ.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],D=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],O=[1,64],k={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,27:`NUMBER_WITH_DECIMAL`,28:`COMMA`,31:`ARROW_DELIMITER`,34:`NEWLINE`,35:`SEMI`,36:`EOF`,38:`STR`,39:`MD_STR`,41:`AMP`,42:`NUM`,43:`ALPHA`,44:`PLUS`,45:`EQUALS`,46:`MULT`,47:`DOT`,48:`BRKT`,49:`MINUS`,50:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:this.$=[Number(a[s-2]),...a[s]];break;case 21:this.$=[Number(a[s])];break;case 22:r.setXAxisTitle(a[s]);break;case 23:r.setXAxisTitle(a[s-1]);break;case 24:r.setXAxisTitle({type:`text`,text:``});break;case 25:r.setXAxisBand(a[s]);break;case 26:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 27:this.$=a[s-1];break;case 28:this.$=[a[s-2],...a[s]];break;case 29:this.$=[a[s]];break;case 30:r.setYAxisTitle(a[s]);break;case 31:r.setYAxisTitle(a[s-1]);break;case 32:r.setYAxisTitle({type:`text`,text:``});break;case 33:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 37:this.$={text:a[s],type:`text`};break;case 38:this.$={text:a[s],type:`text`};break;case 39:this.$={text:a[s],type:`markdown`};break;case 40:this.$=a[s];break;case 41:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[t(n,r,{3:1,4:2,7:4,5:i,34:a,35:o,36:s}),{1:[3]},t(n,r,{4:2,7:4,3:8,5:i,34:a,35:o,36:s}),t(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:o,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),{1:[2,1]},t(n,r,{4:2,7:4,3:21,5:i,34:a,35:o,36:s}),{1:[2,3]},t(c,[2,5]),t(n,[2,7],{4:22,34:a,35:o,36:s}),{11:23,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:39,13:38,24:x,27:S,29:40,30:41,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:45,15:44,27:C,33:46,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:49,17:48,24:w,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:52,17:51,24:w,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{20:[1,53]},{22:[1,54]},t(T,[2,18]),{1:[2,2]},t(T,[2,8]),t(T,[2,9]),t(E,[2,37],{40:55,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b}),t(E,[2,38]),t(E,[2,39]),t(D,[2,40]),t(D,[2,42]),t(D,[2,43]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(T,[2,10]),t(T,[2,22],{30:41,29:56,24:x,27:S}),t(T,[2,24]),t(T,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},t(T,[2,11]),t(T,[2,30],{33:60,27:C}),t(T,[2,32]),{31:[1,61]},t(T,[2,12]),{17:62,24:w},{25:63,27:O},t(T,[2,14]),{17:65,24:w},t(T,[2,16]),t(T,[2,17]),t(D,[2,41]),t(T,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(T,[2,31]),{27:[1,69]},t(T,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(T,[2,15]),t(T,[2,26]),t(T,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},t(T,[2,33]),t(T,[2,19]),{25:73,27:O},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){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(t,g.yy),g.yy.lexer=h,g.yy.parser=this,typeof h.yylloc>`u`&&(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}e(b,`popStack`);function x(){var e;return e=i.pop()||h.lex()||p,typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(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===null||typeof S>`u`)&&(S=x()),T=s[w]&&s[w][S]),typeof T>`u`||!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{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{$t as t,Gn as n,Kt as r,Ln as i,Pt as a,Qt as o,Vt as s,Wn as c,Wt as l,Zt as u,an as d,bn as f,cn as p,j as m,mn as h,nn as g,pn as _,un as v,x as y}from"./index-3NUCUW2s.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],D=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],O=[1,64],k={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,27:`NUMBER_WITH_DECIMAL`,28:`COMMA`,31:`ARROW_DELIMITER`,34:`NEWLINE`,35:`SEMI`,36:`EOF`,38:`STR`,39:`MD_STR`,41:`AMP`,42:`NUM`,43:`ALPHA`,44:`PLUS`,45:`EQUALS`,46:`MULT`,47:`DOT`,48:`BRKT`,49:`MINUS`,50:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:this.$=[Number(a[s-2]),...a[s]];break;case 21:this.$=[Number(a[s])];break;case 22:r.setXAxisTitle(a[s]);break;case 23:r.setXAxisTitle(a[s-1]);break;case 24:r.setXAxisTitle({type:`text`,text:``});break;case 25:r.setXAxisBand(a[s]);break;case 26:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 27:this.$=a[s-1];break;case 28:this.$=[a[s-2],...a[s]];break;case 29:this.$=[a[s]];break;case 30:r.setYAxisTitle(a[s]);break;case 31:r.setYAxisTitle(a[s-1]);break;case 32:r.setYAxisTitle({type:`text`,text:``});break;case 33:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 37:this.$={text:a[s],type:`text`};break;case 38:this.$={text:a[s],type:`text`};break;case 39:this.$={text:a[s],type:`markdown`};break;case 40:this.$=a[s];break;case 41:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[t(n,r,{3:1,4:2,7:4,5:i,34:a,35:o,36:s}),{1:[3]},t(n,r,{4:2,7:4,3:8,5:i,34:a,35:o,36:s}),t(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:o,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),{1:[2,1]},t(n,r,{4:2,7:4,3:21,5:i,34:a,35:o,36:s}),{1:[2,3]},t(c,[2,5]),t(n,[2,7],{4:22,34:a,35:o,36:s}),{11:23,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:39,13:38,24:x,27:S,29:40,30:41,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:45,15:44,27:C,33:46,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:49,17:48,24:w,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:52,17:51,24:w,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{20:[1,53]},{22:[1,54]},t(T,[2,18]),{1:[2,2]},t(T,[2,8]),t(T,[2,9]),t(E,[2,37],{40:55,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b}),t(E,[2,38]),t(E,[2,39]),t(D,[2,40]),t(D,[2,42]),t(D,[2,43]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(T,[2,10]),t(T,[2,22],{30:41,29:56,24:x,27:S}),t(T,[2,24]),t(T,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},t(T,[2,11]),t(T,[2,30],{33:60,27:C}),t(T,[2,32]),{31:[1,61]},t(T,[2,12]),{17:62,24:w},{25:63,27:O},t(T,[2,14]),{17:65,24:w},t(T,[2,16]),t(T,[2,17]),t(D,[2,41]),t(T,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(T,[2,31]),{27:[1,69]},t(T,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(T,[2,15]),t(T,[2,26]),t(T,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},t(T,[2,33]),t(T,[2,19]),{25:73,27:O},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){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(t,g.yy),g.yy.lexer=h,g.yy.parser=this,typeof h.yylloc>`u`&&(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}e(b,`popStack`);function x(){var e;return e=i.pop()||h.lex()||p,typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(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===null||typeof S>`u`)&&(S=x()),T=s[w]&&s[w][S]),typeof T>`u`||!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)),typeof E<`u`)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`)};k.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(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:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
5
  `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 31;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 43;case 33:return`COLON`;case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function A(){this.yy={}}return e(A,`Parser`),A.prototype=k,k.Parser=A,new A})();b.parser=b;var x=b;function S(e){return e.type===`bar`}e(S,`isBarPlot`);function C(e){return e.type===`band`}e(C,`isBandAxisData`);function w(e){return e.type===`linear`}e(w,`isLinearAxisData`);var T=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let r={width:0,height:0},i=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let a of e){let e=n(i,1,a),o=e?e.width:a.length*t,s=e?e.height:t;r.width=Math.max(r.width,o),r.height=Math.max(r.height,s)}return i.remove(),r}},E=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=.2*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=.2*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},D=class extends E{static{e(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=a().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=a().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},O=class extends E{static{e(this,`LinearAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=y().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=y().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function k(e,t,n,r){let i=new T(r);return C(e)?new D(t,n,e.categories,e.title,i):new O(t,n,[e.min,e.max],e.title,i)}e(k,`getAxis`);var A=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function j(e,t,n,r){return new A(new T(r),e,t,n)}e(j,`getChartTitleComponent`);var M=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;return t=this.orientation===`horizontal`?c().y(e=>e[0]).x(e=>e[1])(e):c().x(e=>e[0]).y(e=>e[1])(e),t?[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},ee=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},te=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new M(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new ee(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break}return e}};function ne(e,t,n){return new te(e,t,n)}e(ne,`getPlotComponent`);var re=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:j(e,t,n,r),plot:ne(e,t,n),xAxis:k(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:k(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},ie=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new re(e,t,n,r).getDrawableElement()}},N=0,ae,P=V(),F=B(),I=H(),L=F.plotColorPalette.split(`,`).map(e=>e.trim()),R=!1,z=!1;function B(){let e=o(),t=l();return s(e.xyChart,t.themeVariables.xyChart)}e(B,`getChartDefaultThemeConfig`);function V(){let e=l();return s(v.xyChart,e.xyChart)}e(V,`getChartDefaultConfig`);function H(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(H,`getChartDefaultData`);function U(e){let t=l();return f(e.trim(),t)}e(U,`textSanitizer`);function W(e){ae=e}e(W,`setTmpSVGG`);function G(e){e===`horizontal`?P.chartOrientation=`horizontal`:P.chartOrientation=`vertical`}e(G,`setOrientation`);function K(e){I.xAxis.title=U(e.text)}e(K,`setXAxisTitle`);function q(e,t){I.xAxis={type:`linear`,title:I.xAxis.title,min:e,max:t},R=!0}e(q,`setXAxisRangeData`);function J(e){I.xAxis={type:`band`,title:I.xAxis.title,categories:e.map(e=>U(e.text))},R=!0}e(J,`setXAxisBand`);function Y(e){I.yAxis.title=U(e.text)}e(Y,`setYAxisTitle`);function X(e,t){I.yAxis={type:`linear`,title:I.yAxis.title,min:e,max:t},z=!0}e(X,`setYAxisRangeData`);function oe(e){let t=Math.min(...e),n=Math.max(...e),r=w(I.yAxis)?I.yAxis.min:1/0,i=w(I.yAxis)?I.yAxis.max:-1/0;I.yAxis={type:`linear`,title:I.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(oe,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!R){let t=w(I.xAxis)?I.xAxis.min:1/0,n=w(I.xAxis)?I.xAxis.max:-1/0;q(Math.min(t,1),Math.max(n,e.length))}if(z||oe(e),C(I.xAxis)&&(t=I.xAxis.categories.map((t,n)=>[t,e[n]])),w(I.xAxis)){let n=I.xAxis.min,r=I.xAxis.max,i=(r-n)/(e.length-1),a=[];for(let e=n;e<=r;e+=i)a.push(`${e}`);t=a.map((t,n)=>[t,e[n]])}return t}e(Z,`transformDataWithoutCategory`);function Q(e){return L[e===0?0:e%L.length]}e(Q,`getPlotColorFromPalette`);function $(e,t){let n=Z(t);I.plots.push({type:`line`,strokeFill:Q(N),strokeWidth:2,data:n}),N++}e($,`setLineData`);function se(e,t){let n=Z(t);I.plots.push({type:`bar`,fill:Q(N),data:n}),N++}e(se,`setBarData`);function ce(){if(I.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return I.title=g(),ie.build(P,I,F,ae)}e(ce,`getDrawableElem`);function le(){return F}e(le,`getChartThemeConfig`);function ue(){return P}e(ue,`getChartConfig`);function de(){return I}e(de,`getXYChartData`);var fe={parser:x,db:{getDrawableElem:ce,clear:e(function(){d(),N=0,P=V(),I=H(),F=B(),L=F.plotColorPalette.split(`,`).map(e=>e.trim()),R=!1,z=!1},`clear`),setAccTitle:t,getAccTitle:p,setDiagramTitle:u,getDiagramTitle:g,getAccDescription:m,setAccDescription:i,setOrientation:G,setXAxisTitle:K,setXAxisRangeData:q,setXAxisBand:J,setYAxisTitle:Y,setYAxisRangeData:X,setLineData:$,setBarData:se,setTmpSVGG:W,getChartThemeConfig:le,getChartConfig:ue,getXYChartData:de},renderer:{draw:e((t,n,i,a)=>{let o=a.db,s=o.getChartThemeConfig(),c=o.getChartConfig(),l=o.getXYChartData().plots[0].data.map(e=>e[1]);function u(e){return e===`top`?`text-before-edge`:`middle`}e(u,`getDominantBaseLine`);function d(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(d,`getTextAnchor`);function f(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(f,`getTextTransformation`),h.debug(`Rendering xychart chart
7
- `+t);let p=r(n),m=p.append(`g`).attr(`class`,`main`),g=m.append(`rect`).attr(`width`,c.width).attr(`height`,c.height).attr(`class`,`background`);_(p,c.height,c.width,!0),p.attr(`viewBox`,`0 0 ${c.width} ${c.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(p.append(`g`).attr(`class`,`mermaid-tmp-group`));let v=o.getDrawableElem(),y={};function b(e){let t=m,n=``;for(let[r]of e.entries()){let i=m;r>0&&y[n]&&(i=y[n]),n+=e[r],t=y[n],t||=y[n]=i.append(`g`).attr(`class`,e[r])}return t}e(b,`getGroup`);for(let t of v){if(t.data.length===0)continue;let n=b(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),c.showDataLabel){let r=c.showDataLabelOutsideBar;if(c.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*.7<=n.width-10};e(i,`fitsHorizontally`);let a=t.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),c=Math.floor(Math.min(...o)),u=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,u).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),u=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,u).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>u(e.verticalPos)).attr(`text-anchor`,e=>d(e.horizontalPos)).attr(`transform`,e=>f(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth);break}}},`draw`)}};export{fe as diagram};
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 31;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 43;case 33:return`COLON`;case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function A(){this.yy={}}return e(A,`Parser`),A.prototype=k,k.Parser=A,new A})();b.parser=b;var x=b;function S(e){return e.type===`bar`}e(S,`isBarPlot`);function C(e){return e.type===`band`}e(C,`isBandAxisData`);function w(e){return e.type===`linear`}e(w,`isLinearAxisData`);var T=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=y(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},E=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=.2*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=.2*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},D=class extends E{static{e(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=c().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=c().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),n.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},O=class extends E{static{e(this,`LinearAxis`)}constructor(e,t,n,r,a){super(e,r,a,t),this.domain=n,this.scale=i().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=i().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function k(e,t,n,r){let i=new T(r);return C(e)?new D(t,n,e.categories,e.title,i):new O(t,n,[e.min,e.max],e.title,i)}e(k,`getAxis`);var A=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function j(e,t,n,r){return new A(new T(r),e,t,n)}e(j,`getChartTitleComponent`);var M=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;return t=this.orientation===`horizontal`?f().y(e=>e[0]).x(e=>e[1])(e):f().x(e=>e[0]).y(e=>e[1])(e),t?[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},ee=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},te=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new M(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new ee(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break}return e}};function ne(e,t,n){return new te(e,t,n)}e(ne,`getPlotComponent`);var re=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:j(e,t,n,r),plot:ne(e,t,n),xAxis:k(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:k(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},ie=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new re(e,t,n,r).getDrawableElement()}},N=0,ae,P=V(),F=B(),I=H(),L=F.plotColorPalette.split(`,`).map(e=>e.trim()),R=!1,z=!1;function B(){let e=l(),t=s();return m(e.xyChart,t.themeVariables.xyChart)}e(B,`getChartDefaultThemeConfig`);function V(){let e=s();return m(p.xyChart,e.xyChart)}e(V,`getChartDefaultConfig`);function H(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(H,`getChartDefaultData`);function U(e){let t=s();return h(e.trim(),t)}e(U,`textSanitizer`);function W(e){ae=e}e(W,`setTmpSVGG`);function G(e){e===`horizontal`?P.chartOrientation=`horizontal`:P.chartOrientation=`vertical`}e(G,`setOrientation`);function K(e){I.xAxis.title=U(e.text)}e(K,`setXAxisTitle`);function q(e,t){I.xAxis={type:`linear`,title:I.xAxis.title,min:e,max:t},R=!0}e(q,`setXAxisRangeData`);function J(e){I.xAxis={type:`band`,title:I.xAxis.title,categories:e.map(e=>U(e.text))},R=!0}e(J,`setXAxisBand`);function Y(e){I.yAxis.title=U(e.text)}e(Y,`setYAxisTitle`);function X(e,t){I.yAxis={type:`linear`,title:I.yAxis.title,min:e,max:t},z=!0}e(X,`setYAxisRangeData`);function oe(e){let t=Math.min(...e),n=Math.max(...e),r=w(I.yAxis)?I.yAxis.min:1/0,i=w(I.yAxis)?I.yAxis.max:-1/0;I.yAxis={type:`linear`,title:I.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(oe,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!R){let t=w(I.xAxis)?I.xAxis.min:1/0,n=w(I.xAxis)?I.xAxis.max:-1/0;q(Math.min(t,1),Math.max(n,e.length))}if(z||oe(e),C(I.xAxis)&&(t=I.xAxis.categories.map((t,n)=>[t,e[n]])),w(I.xAxis)){let n=I.xAxis.min,r=I.xAxis.max,i=(r-n)/(e.length-1),a=[];for(let e=n;e<=r;e+=i)a.push(`${e}`);t=a.map((t,n)=>[t,e[n]])}return t}e(Z,`transformDataWithoutCategory`);function Q(e){return L[e===0?0:e%L.length]}e(Q,`getPlotColorFromPalette`);function $(e,t){let n=Z(t);I.plots.push({type:`line`,strokeFill:Q(N),strokeWidth:2,data:n}),N++}e($,`setLineData`);function se(e,t){let n=Z(t);I.plots.push({type:`bar`,fill:Q(N),data:n}),N++}e(se,`setBarData`);function ce(){if(I.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return I.title=d(),ie.build(P,I,F,ae)}e(ce,`getDrawableElem`);function le(){return F}e(le,`getChartThemeConfig`);function ue(){return P}e(ue,`getChartConfig`);function de(){return I}e(de,`getXYChartData`);var fe={parser:x,db:{getDrawableElem:ce,clear:e(function(){v(),N=0,P=V(),I=H(),F=B(),L=F.plotColorPalette.split(`,`).map(e=>e.trim()),R=!1,z=!1},`clear`),setAccTitle:u,getAccTitle:_,setDiagramTitle:o,getDiagramTitle:d,getAccDescription:g,setAccDescription:r,setOrientation:G,setXAxisTitle:K,setXAxisRangeData:q,setXAxisBand:J,setYAxisTitle:Y,setYAxisRangeData:X,setLineData:$,setBarData:se,setTmpSVGG:W,getChartThemeConfig:le,getChartConfig:ue,getXYChartData:de},renderer:{draw:e((r,i,o,s)=>{let c=s.db,l=c.getChartThemeConfig(),u=c.getChartConfig(),d=c.getXYChartData().plots[0].data.map(e=>e[1]);function f(e){return e===`top`?`text-before-edge`:`middle`}e(f,`getDominantBaseLine`);function p(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(p,`getTextAnchor`);function m(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(m,`getTextTransformation`),n.debug(`Rendering xychart chart
7
+ `+r);let h=a(i),g=h.append(`g`).attr(`class`,`main`),_=g.append(`rect`).attr(`width`,u.width).attr(`height`,u.height).attr(`class`,`background`);t(h,u.height,u.width,!0),h.attr(`viewBox`,`0 0 ${u.width} ${u.height}`),_.attr(`fill`,l.backgroundColor),c.setTmpSVGG(h.append(`g`).attr(`class`,`mermaid-tmp-group`));let v=c.getDrawableElem(),y={};function b(e){let t=g,n=``;for(let[r]of e.entries()){let i=g;r>0&&y[n]&&(i=y[n]),n+=e[r],t=y[n],t||=y[n]=i.append(`g`).attr(`class`,e[r])}return t}e(b,`getGroup`);for(let t of v){if(t.data.length===0)continue;let n=b(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),u.showDataLabel){let r=u.showDataLabelOutsideBar;if(u.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*.7<=n.width-10};e(i,`fitsHorizontally`);let a=t.data.map((e,t)=>({data:e,label:d[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),s=Math.floor(Math.min(...o)),c=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,c).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,l.dataLabelColor).attr(`font-size`,`${s}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:d[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),s=Math.floor(Math.min(...o)),c=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,c).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,l.dataLabelColor).attr(`font-size`,`${s}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>f(e.verticalPos)).attr(`text-anchor`,e=>p(e.horizontalPos)).attr(`transform`,e=>m(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth);break}}},`draw`)}};export{fe as diagram};
package/web/index.html CHANGED
@@ -10,7 +10,7 @@
10
10
  href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap"
11
11
  rel="stylesheet"
12
12
  />
13
- <script type="module" crossorigin src="/assets/index-DDcYO1IJ.js"></script>
13
+ <script type="module" crossorigin src="/assets/index-3NUCUW2s.js"></script>
14
14
  <link rel="modulepreload" crossorigin href="/assets/chunk-CilyBKbf.js">
15
15
  <link rel="modulepreload" crossorigin href="/assets/chunk-VELTKBKT-C9dVN39o.js">
16
16
  <link rel="stylesheet" crossorigin href="/assets/index-BleGLU8S.css">
@@ -1 +0,0 @@
1
- import"./index-DDcYO1IJ.js";import"./chunk-H3VCZNTA-BOGhqvxW.js";import"./chunk-FXACKDTF-Cb4xHVUz.js";import{n as e}from"./chunk-XGPFEOL4-BBab-enK.js";export{e as createArchitectureServices};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{$ as t,Dt as n,Et as r,G as i,H as a,J as o,K as s,Ot as c,St as l,Tt as u,U as d,V as f,W as p,X as m,Y as h,Z as g,_t as _,a as v,at as y,bt as b,ct as ee,dt as te,et as x,ft as S,gt as C,ht as ne,lt as re,mt as ie,nt as ae,o as oe,ot as se,pt as ce,q as le,r as w,rt as ue,st as T,tt as E,ut as D,vt as de,wt as fe,xt as O,yt as pe}from"./index-DDcYO1IJ.js";function me(e){return g(e)?ie(e):v(e)}e(me,`keys`);var k=me;function he(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}e(he,`arrayEach`);var ge=he;function _e(e,t){return e&&O(t,k(t),e)}e(_e,`baseAssign`);var ve=_e;function ye(e,t){return e&&O(t,T(t),e)}e(ye,`baseAssignIn`);var be=ye;function xe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}e(xe,`arrayFilter`);var Se=xe;function Ce(){return[]}e(Ce,`stubArray`);var we=Ce,Te=Object.prototype.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols,A=Ee?function(e){return e==null?[]:(e=Object(e),Se(Ee(e),function(t){return Te.call(e,t)}))}:we;function De(e,t){return O(e,A(e),t)}e(De,`copySymbols`);var Oe=De;function ke(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}e(ke,`arrayPush`);var j=ke,Ae=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)j(t,A(e)),e=se(e);return t}:we;function je(e,t){return O(e,Ae(e),t)}e(je,`copySymbolsIn`);var Me=je;function Ne(e,n,r){var i=n(e);return t(e)?i:j(i,r(e))}e(Ne,`baseGetAllKeys`);var Pe=Ne;function Fe(e){return Pe(e,k,A)}e(Fe,`getAllKeys`);var Ie=Fe;function Le(e){return Pe(e,T,Ae)}e(Le,`getAllKeysIn`);var Re=Le,ze=Object.prototype.hasOwnProperty;function Be(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&ze.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}e(Be,`initCloneArray`);var Ve=Be;function He(e,t){var n=t?fe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}e(He,`cloneDataView`);var Ue=He,We=/\w*$/;function Ge(e){var t=new e.constructor(e.source,We.exec(e));return t.lastIndex=e.lastIndex,t}e(Ge,`cloneRegExp`);var Ke=Ge,qe=E?E.prototype:void 0,Je=qe?qe.valueOf:void 0;function Ye(e){return Je?Object(Je.call(e)):{}}e(Ye,`cloneSymbol`);var Xe=Ye,Ze=`[object Boolean]`,Qe=`[object Date]`,$e=`[object Map]`,et=`[object Number]`,tt=`[object RegExp]`,nt=`[object Set]`,rt=`[object String]`,it=`[object Symbol]`,at=`[object ArrayBuffer]`,ot=`[object DataView]`,st=`[object Float32Array]`,ct=`[object Float64Array]`,lt=`[object Int8Array]`,ut=`[object Int16Array]`,dt=`[object Int32Array]`,ft=`[object Uint8Array]`,pt=`[object Uint8ClampedArray]`,mt=`[object Uint16Array]`,ht=`[object Uint32Array]`;function gt(e,t,n){var r=e.constructor;switch(t){case at:return fe(e);case Ze:case Qe:return new r(+e);case ot:return Ue(e,n);case st:case ct:case lt:case ut:case dt:case ft:case pt:case mt:case ht:return a(e,n);case $e:return new r;case et:case rt:return new r(e);case tt:return Ke(e);case nt:return new r;case it:return Xe(e)}}e(gt,`initCloneByTag`);var _t=gt,vt=`[object Map]`;function yt(e){return _(e)&&w(e)==vt}e(yt,`baseIsMap`);var bt=yt,xt=S&&S.isMap,St=xt?C(xt):bt,Ct=`[object Set]`;function wt(e){return _(e)&&w(e)==Ct}e(wt,`baseIsSet`);var Tt=wt,Et=S&&S.isSet,Dt=Et?C(Et):Tt,Ot=1,kt=2,At=4,jt=`[object Arguments]`,Mt=`[object Array]`,Nt=`[object Boolean]`,Pt=`[object Date]`,Ft=`[object Error]`,It=`[object Function]`,Lt=`[object GeneratorFunction]`,Rt=`[object Map]`,zt=`[object Number]`,Bt=`[object Object]`,Vt=`[object RegExp]`,Ht=`[object Set]`,Ut=`[object String]`,Wt=`[object Symbol]`,Gt=`[object WeakMap]`,Kt=`[object ArrayBuffer]`,qt=`[object DataView]`,Jt=`[object Float32Array]`,Yt=`[object Float64Array]`,Xt=`[object Int8Array]`,Zt=`[object Int16Array]`,Qt=`[object Int32Array]`,$t=`[object Uint8Array]`,en=`[object Uint8ClampedArray]`,tn=`[object Uint16Array]`,nn=`[object Uint32Array]`,M={};M[jt]=M[Mt]=M[Kt]=M[qt]=M[Nt]=M[Pt]=M[Jt]=M[Yt]=M[Xt]=M[Zt]=M[Qt]=M[Rt]=M[zt]=M[Bt]=M[Vt]=M[Ht]=M[Ut]=M[Wt]=M[$t]=M[en]=M[tn]=M[nn]=!0,M[Ft]=M[It]=M[Gt]=!1;function N(e,n,i,a,o,s){var c,l=n&Ot,u=n&kt,d=n&At;if(i&&(c=o?i(e,a,o,s):i(e)),c!==void 0)return c;if(!b(e))return e;var p=t(e);if(p){if(c=Ve(e),!l)return re(e,c)}else{var m=w(e),g=m==It||m==Lt;if(f(e))return h(e,l);if(m==Bt||m==jt||g&&!o){if(c=u||g?{}:te(e),!l)return u?Me(e,be(c,e)):Oe(e,ve(c,e))}else{if(!M[m])return o?e:{};c=_t(e,m,l)}}s||=new x;var _=s.get(e);if(_)return _;s.set(e,c),Dt(e)?e.forEach(function(t){c.add(N(t,n,i,t,e,s))}):St(e)&&e.forEach(function(t,r){c.set(r,N(t,n,i,r,e,s))});var v=p?void 0:(d?u?Re:Ie:u?T:k)(e);return ge(v||e,function(t,a){v&&(a=t,t=e[a]),r(c,a,N(t,n,i,a,e,s))}),c}e(N,`baseClone`);var rn=N,an=4;function on(e){return rn(e,an)}e(on,`clone`);var sn=on,cn=Object.prototype,ln=cn.hasOwnProperty,un=p(function(e,t){e=Object(e);var r=-1,i=t.length,a=i>2?t[2]:void 0;for(a&&n(t[0],t[1],a)&&(i=1);++r<i;)for(var o=t[r],s=T(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===void 0||ce(d,cn[u])&&!ln.call(e,u))&&(e[u]=o[u])}return e});function dn(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}e(dn,`last`);var fn=dn;function pn(e,t){return e&&y(e,t,k)}e(pn,`baseForOwn`);var P=pn;function mn(e,t){return function(n,r){if(n==null)return n;if(!g(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}e(mn,`createBaseEach`);var F=mn(P);function hn(e){return typeof e==`function`?e:D}e(hn,`castFunction`);var I=hn;function gn(e,n){return(t(e)?ge:F)(e,I(n))}e(gn,`forEach`);var _n=gn;function vn(e,t){var n=[];return F(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}e(vn,`baseFilter`);var yn=vn,bn=`__lodash_hash_undefined__`;function xn(e){return this.__data__.set(e,bn),this}e(xn,`setCacheAdd`);var Sn=xn;function Cn(e){return this.__data__.has(e)}e(Cn,`setCacheHas`);var wn=Cn;function L(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new m;++t<n;)this.add(e[t])}e(L,`SetCache`),L.prototype.add=L.prototype.push=Sn,L.prototype.has=wn;var R=L;function Tn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e(Tn,`arraySome`);var En=Tn;function Dn(e,t){return e.has(t)}e(Dn,`cacheHas`);var z=Dn,On=1,kn=2;function An(e,t,n,r,i,a){var o=n&On,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&kn?new R:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!En(t,function(e,t){if(!z(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}e(An,`equalArrays`);var jn=An;function Mn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e(Mn,`mapToArray`);var Nn=Mn;function Pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e(Pn,`setToArray`);var B=Pn,Fn=1,In=2,Ln=`[object Boolean]`,Rn=`[object Date]`,zn=`[object Error]`,Bn=`[object Map]`,Vn=`[object Number]`,Hn=`[object RegExp]`,Un=`[object Set]`,Wn=`[object String]`,Gn=`[object Symbol]`,Kn=`[object ArrayBuffer]`,qn=`[object DataView]`,Jn=E?E.prototype:void 0,V=Jn?Jn.valueOf:void 0;function Yn(e,t,n,r,i,a,o){switch(n){case qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Kn:return!(e.byteLength!=t.byteLength||!a(new u(e),new u(t)));case Ln:case Rn:case Vn:return ce(+e,+t);case zn:return e.name==t.name&&e.message==t.message;case Hn:case Wn:return e==t+``;case Bn:var s=Nn;case Un:var c=r&Fn;if(s||=B,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=In,o.set(e,t);var d=jn(s(e),s(t),r,i,a,o);return o.delete(e),d;case Gn:if(V)return V.call(e)==V.call(t)}return!1}e(Yn,`equalByTag`);var Xn=Yn,Zn=1,Qn=Object.prototype.hasOwnProperty;function $n(e,t,n,r,i,a){var o=n&Zn,s=Ie(e),c=s.length;if(c!=Ie(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Qn.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}e($n,`equalObjects`);var er=$n,tr=1,nr=`[object Arguments]`,rr=`[object Array]`,H=`[object Object]`,ir=Object.prototype.hasOwnProperty;function ar(e,n,r,i,a,o){var s=t(e),c=t(n),l=s?rr:w(e),u=c?rr:w(n);l=l==nr?H:l,u=u==nr?H:u;var d=l==H,p=u==H,m=l==u;if(m&&f(e)){if(!f(n))return!1;s=!0,d=!1}if(m&&!d)return o||=new x,s||ee(e)?jn(e,n,r,i,a,o):Xn(e,n,l,r,i,a,o);if(!(r&tr)){var h=d&&ir.call(e,`__wrapped__`),g=p&&ir.call(n,`__wrapped__`);if(h||g){var _=h?e.value():e,v=g?n.value():n;return o||=new x,a(_,v,r,i,o)}}return m?(o||=new x,er(e,n,r,i,a,o)):!1}e(ar,`baseIsEqualDeep`);var or=ar;function sr(e,t,n,r,i){return e===t?!0:e==null||t==null||!_(e)&&!_(t)?e!==e&&t!==t:or(e,t,n,r,sr,i)}e(sr,`baseIsEqual`);var cr=sr,lr=1,ur=2;function dr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new x;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?cr(u,l,lr|ur,r,d):f))return!1}}return!0}e(dr,`baseIsMatch`);var fr=dr;function pr(e){return e===e&&!b(e)}e(pr,`isStrictComparable`);var mr=pr;function hr(e){for(var t=k(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,mr(i)]}return t}e(hr,`getMatchData`);var gr=hr;function _r(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}e(_r,`matchesStrictComparable`);var vr=_r;function yr(e){var t=gr(e);return t.length==1&&t[0][2]?vr(t[0][0],t[0][1]):function(n){return n===e||fr(n,e,t)}}e(yr,`baseMatches`);var br=yr,xr=`[object Symbol]`;function Sr(e){return typeof e==`symbol`||_(e)&&c(e)==xr}e(Sr,`isSymbol`);var U=Sr,Cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wr=/^\w*$/;function Tr(e,n){if(t(e))return!1;var r=typeof e;return r==`number`||r==`symbol`||r==`boolean`||e==null||U(e)?!0:wr.test(e)||!Cr.test(e)||n!=null&&e in Object(n)}e(Tr,`isKey`);var W=Tr,Er=500;function Dr(e){var t=de(e,function(e){return n.size===Er&&n.clear(),e}),n=t.cache;return t}e(Dr,`memoizeCapped`);var Or=Dr,kr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ar=/\\(\\)?/g,jr=Or(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(kr,function(e,n,r,i){t.push(r?i.replace(Ar,`$1`):n||e)}),t});function Mr(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}e(Mr,`arrayMap`);var G=Mr,Nr=1/0,Pr=E?E.prototype:void 0,Fr=Pr?Pr.toString:void 0;function K(e){if(typeof e==`string`)return e;if(t(e))return G(e,K)+``;if(U(e))return Fr?Fr.call(e):``;var n=e+``;return n==`0`&&1/e==-Nr?`-0`:n}e(K,`baseToString`);var Ir=K;function Lr(e){return e==null?``:Ir(e)}e(Lr,`toString`);var Rr=Lr;function zr(e,n){return t(e)?e:W(e,n)?[e]:jr(Rr(e))}e(zr,`castPath`);var q=zr,Br=1/0;function Vr(e){if(typeof e==`string`||U(e))return e;var t=e+``;return t==`0`&&1/e==-Br?`-0`:t}e(Vr,`toKey`);var J=Vr;function Hr(e,t){t=q(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[J(t[n++])];return n&&n==r?e:void 0}e(Hr,`baseGet`);var Y=Hr;function Ur(e,t,n){var r=e==null?void 0:Y(e,t);return r===void 0?n:r}e(Ur,`get`);var Wr=Ur;function Gr(e,t){return e!=null&&t in Object(e)}e(Gr,`baseHasIn`);var Kr=Gr;function qr(e,n,r){n=q(n,e);for(var a=-1,o=n.length,s=!1;++a<o;){var c=J(n[a]);if(!(s=e!=null&&r(e,c)))break;e=e[c]}return s||++a!=o?s:(o=e==null?0:e.length,!!o&&l(o)&&le(c,o)&&(t(e)||i(e)))}e(qr,`hasPath`);var Jr=qr;function Yr(e,t){return e!=null&&Jr(e,t,Kr)}e(Yr,`hasIn`);var Xr=Yr,Zr=1,Qr=2;function $r(e,t){return W(e)&&mr(t)?vr(J(e),t):function(n){var r=Wr(n,e);return r===void 0&&r===t?Xr(n,e):cr(t,r,Zr|Qr)}}e($r,`baseMatchesProperty`);var ei=$r;function ti(e){return function(t){return t?.[e]}}e(ti,`baseProperty`);var ni=ti;function ri(e){return function(t){return Y(t,e)}}e(ri,`basePropertyDeep`);var ii=ri;function ai(e){return W(e)?ni(J(e)):ii(e)}e(ai,`property`);var oi=ai;function si(e){return typeof e==`function`?e:e==null?D:typeof e==`object`?t(e)?ei(e[0],e[1]):br(e):oi(e)}e(si,`baseIteratee`);var X=si;function ci(e,n){return(t(e)?Se:yn)(e,X(n,3))}e(ci,`filter`);var li=ci;function ui(e,t){var n=-1,r=g(e)?Array(e.length):[];return F(e,function(e,i,a){r[++n]=t(e,i,a)}),r}e(ui,`baseMap`);var di=ui;function fi(e,n){return(t(e)?G:di)(e,X(n,3))}e(fi,`map`);var pi=fi;function mi(e,t){return G(t,function(t){return e[t]})}e(mi,`baseValues`);var hi=mi;function gi(e){return e==null?[]:hi(e,k(e))}e(gi,`values`);var _i=gi;function vi(e){return e===void 0}e(vi,`isUndefined`);var yi=vi;function bi(e,t){var n={};return t=X(t,3),P(e,function(e,r,i){s(n,r,t(e,r,i))}),n}e(bi,`mapValues`);var xi=bi;function Si(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!U(o):n(o,s)))var s=o,c=a}return c}e(Si,`baseExtremum`);var Ci=Si;function wi(e,t){return e>t}e(wi,`baseGt`);var Ti=wi;function Ei(e){return e&&e.length?Ci(e,D,Ti):void 0}e(Ei,`max`);var Di=Ei;function Oi(e,t,n,i){if(!b(e))return e;t=q(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++a<o;){var l=J(t[a]),u=n;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):void 0,u===void 0&&(u=b(d)?d:le(t[a+1])?[]:{})}r(c,l,u),c=c[l]}return e}e(Oi,`baseSet`);var ki=Oi;function Ai(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Y(e,o);n(s,o)&&ki(a,q(o,e),s)}return a}e(Ai,`basePickBy`);var ji=Ai;function Mi(e,t){return ji(e,t,function(t,n){return Xr(e,n)})}e(Mi,`basePick`);var Ni=Mi,Pi=E?E.isConcatSpreadable:void 0;function Fi(e){return t(e)||i(e)||!!(Pi&&e&&e[Pi])}e(Fi,`isFlattenable`);var Ii=Fi;function Li(e,t,n,r,i){var a=-1,o=e.length;for(n||=Ii,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Li(s,t-1,n,r,i):j(i,s):r||(i[i.length]=s)}return i}e(Li,`baseFlatten`);var Z=Li;function Ri(e){return e!=null&&e.length?Z(e,1):[]}e(Ri,`flatten`);var zi=Ri;function Bi(e){return d(ae(e,void 0,zi),e+``)}e(Bi,`flatRest`);var Vi=Bi(function(e,t){return e==null?{}:Ni(e,t)});function Hi(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}e(Hi,`arrayReduce`);var Ui=Hi;function Wi(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}e(Wi,`baseReduce`);var Gi=Wi;function Ki(e,n,r){var i=t(e)?Ui:Gi,a=arguments.length<3;return i(e,X(n,4),r,a,F)}e(Ki,`reduce`);var qi=Ki;function Ji(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}e(Ji,`baseFindIndex`);var Yi=Ji;function Xi(e){return e!==e}e(Xi,`baseIsNaN`);var Zi=Xi;function Qi(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}e(Qi,`strictIndexOf`);var $i=Qi;function ea(e,t,n){return t===t?$i(e,t,n):Yi(e,Zi,n)}e(ea,`baseIndexOf`);var ta=ea;function na(e,t){return!!(e!=null&&e.length)&&ta(e,t,0)>-1}e(na,`arrayIncludes`);var ra=na;function ia(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}e(ia,`arrayIncludesWith`);var aa=ia;function oa(){}e(oa,`noop`);var sa=oa,ca=oe&&1/B(new oe([,-0]))[1]==1/0?function(e){return new oe(e)}:sa,la=200;function ua(e,t,n){var r=-1,i=ra,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=aa;else if(a>=la){var l=t?null:ca(e);if(l)return B(l);o=!1,i=z,c=new R}else c=t?[]:s;r:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue r;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}e(ua,`baseUniq`);var da=ua,fa=p(function(e){return da(Z(e,1,pe,!0))}),pa=/\s/;function ma(e){for(var t=e.length;t--&&pa.test(e.charAt(t)););return t}e(ma,`trimmedEndIndex`);var ha=ma,ga=/^\s+/;function _a(e){return e&&e.slice(0,ha(e)+1).replace(ga,``)}e(_a,`baseTrim`);var va=_a,ya=NaN,ba=/^[-+]0x[0-9a-f]+$/i,xa=/^0b[01]+$/i,Sa=/^0o[0-7]+$/i,Ca=parseInt;function wa(e){if(typeof e==`number`)return e;if(U(e))return ya;if(b(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=b(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=va(e);var n=xa.test(e);return n||Sa.test(e)?Ca(e.slice(2),n?2:8):ba.test(e)?ya:+e}e(wa,`toNumber`);var Ta=wa,Ea=1/0,Da=17976931348623157e292;function Oa(e){return e?(e=Ta(e),e===Ea||e===-Ea?(e<0?-1:1)*Da:e===e?e:0):e===0?e:0}e(Oa,`toFinite`);var Q=Oa;function ka(e){var t=Q(e),n=t%1;return t===t?n?t-n:t:0}e(ka,`toInteger`);var $=ka,Aa=Object.prototype.hasOwnProperty,ja=ue(function(e,t){if(o(t)||g(t)){O(t,k(t),e);return}for(var n in t)Aa.call(t,n)&&r(e,n,t[n])});function Ma(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}e(Ma,`baseSlice`);var Na=Ma,Pa=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function Fa(e){return Pa.test(e)}e(Fa,`hasUnicode`);var Ia=Fa,La=1,Ra=4;function za(e){return rn(e,La|Ra)}e(za,`cloneDeep`);var Ba=za;function Va(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}e(Va,`compact`);var Ha=Va;function Ua(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}e(Ua,`arrayAggregator`);var Wa=Ua;function Ga(e,t,n,r){return F(e,function(e,i,a){t(r,e,n(e),a)}),r}e(Ga,`baseAggregator`);var Ka=Ga;function qa(e,n){return function(r,i){var a=t(r)?Wa:Ka,o=n?n():{};return a(r,e,X(i,2),o)}}e(qa,`createAggregator`);var Ja=qa,Ya=e(function(){return ne.Date.now()},`now`),Xa=200;function Za(e,t,n,r){var i=-1,a=ra,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=G(t,C(n))),r?(a=aa,o=!1):t.length>=Xa&&(a=z,o=!1,t=new R(t));r:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue r;c.push(u)}else a(t,d,r)||c.push(u)}return c}e(Za,`baseDifference`);var Qa=Za,$a=p(function(e,t){return pe(e)?Qa(e,Z(t,1,pe,!0)):[]});function eo(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===void 0?1:$(t),Na(e,t<0?0:t,r)):[]}e(eo,`drop`);var to=eo;function no(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===void 0?1:$(t),t=r-t,Na(e,0,t<0?0:t)):[]}e(no,`dropRight`);var ro=no;function io(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}e(io,`arrayEvery`);var ao=io;function oo(e,t){var n=!0;return F(e,function(e,r,i){return n=!!t(e,r,i),n}),n}e(oo,`baseEvery`);var so=oo;function co(e,r,i){var a=t(e)?ao:so;return i&&n(e,r,i)&&(r=void 0),a(e,X(r,3))}e(co,`every`);var lo=co;function uo(t){return function(n,r,i){var a=Object(n);if(!g(n)){var o=X(r,3);n=k(n),r=e(function(e){return o(a[e],e,a)},`predicate`)}var s=t(n,r,i);return s>-1?a[o?n[s]:s]:void 0}}e(uo,`createFind`);var fo=uo,po=Math.max;function mo(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:$(n);return i<0&&(i=po(r+i,0)),Yi(e,X(t,3),i)}e(mo,`findIndex`);var ho=fo(mo);function go(e){return e&&e.length?e[0]:void 0}e(go,`head`);var _o=go;function vo(e,t){return Z(pi(e,t),1)}e(vo,`flatMap`);var yo=vo;function bo(e,t){return e==null?e:y(e,I(t),T)}e(bo,`forIn`);var xo=bo;function So(e,t){return e&&P(e,I(t))}e(So,`forOwn`);var Co=So,wo=Object.prototype.hasOwnProperty,To=Ja(function(e,t,n){wo.call(e,n)?e[n].push(t):s(e,n,[t])}),Eo=Object.prototype.hasOwnProperty;function Do(e,t){return e!=null&&Eo.call(e,t)}e(Do,`baseHas`);var Oo=Do;function ko(e,t){return e!=null&&Jr(e,t,Oo)}e(ko,`has`);var Ao=ko,jo=`[object String]`;function Mo(e){return typeof e==`string`||!t(e)&&_(e)&&c(e)==jo}e(Mo,`isString`);var No=Mo,Po=Math.max;function Fo(e,t,n,r){e=g(e)?e:_i(e),n=n&&!r?$(n):0;var i=e.length;return n<0&&(n=Po(i+n,0)),No(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ta(e,t,n)>-1}e(Fo,`includes`);var Io=Fo,Lo=Math.max;function Ro(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:$(n);return i<0&&(i=Lo(r+i,0)),ta(e,t,i)}e(Ro,`indexOf`);var zo=Ro,Bo=`[object RegExp]`;function Vo(e){return _(e)&&c(e)==Bo}e(Vo,`baseIsRegExp`);var Ho=Vo,Uo=S&&S.isRegExp,Wo=Uo?C(Uo):Ho;function Go(e,t){return e<t}e(Go,`baseLt`);var Ko=Go;function qo(e){return e&&e.length?Ci(e,D,Ko):void 0}e(qo,`min`);var Jo=qo;function Yo(e,t){return e&&e.length?Ci(e,X(t,2),Ko):void 0}e(Yo,`minBy`);var Xo=Yo,Zo=`Expected a function`;function Qo(e){if(typeof e!=`function`)throw TypeError(Zo);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}e(Qo,`negate`);var $o=Qo;function es(e,t){if(e==null)return{};var n=G(Re(e),function(e){return[e]});return t=X(t),ji(e,n,function(e,n){return t(e,n[0])})}e(es,`pickBy`);var ts=es;function ns(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}e(ns,`baseSortBy`);var rs=ns;function is(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=U(e),o=t!==void 0,s=t===null,c=t===t,l=U(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}e(is,`compareAscending`);var as=is;function os(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=as(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}e(os,`compareMultiple`);var ss=os;function cs(e,n,r){n=n.length?G(n,function(e){return t(e)?function(t){return Y(t,e.length===1?e[0]:e)}:e}):[D];var i=-1;return n=G(n,C(X)),rs(di(e,function(e,t,r){return{criteria:G(n,function(t){return t(e)}),index:++i,value:e}}),function(e,t){return ss(e,t,r)})}e(cs,`baseOrderBy`);var ls=cs,us=ni(`length`),ds=`\\ud800-\\udfff`,fs=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ps=`\\ufe0e\\ufe0f`,ms=`[`+ds+`]`,hs=`[`+fs+`]`,gs=`\\ud83c[\\udffb-\\udfff]`,_s=`(?:`+hs+`|`+gs+`)`,vs=`[^`+ds+`]`,ys=`(?:\\ud83c[\\udde6-\\uddff]){2}`,bs=`[\\ud800-\\udbff][\\udc00-\\udfff]`,xs=`\\u200d`,Ss=_s+`?`,Cs=`[`+ps+`]?`,ws=`(?:`+xs+`(?:`+[vs,ys,bs].join(`|`)+`)`+Cs+Ss+`)*`,Ts=Cs+Ss+ws,Es=`(?:`+[vs+hs+`?`,hs,ys,bs,ms].join(`|`)+`)`,Ds=RegExp(gs+`(?=`+gs+`)|`+Es+Ts,`g`);function Os(e){for(var t=Ds.lastIndex=0;Ds.test(e);)++t;return t}e(Os,`unicodeSize`);var ks=Os;function As(e){return Ia(e)?ks(e):us(e)}e(As,`stringSize`);var js=As,Ms=Math.ceil,Ns=Math.max;function Ps(e,t,n,r){for(var i=-1,a=Ns(Ms((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}e(Ps,`baseRange`);var Fs=Ps;function Is(e){return function(t,r,i){return i&&typeof i!=`number`&&n(t,r,i)&&(r=i=void 0),t=Q(t),r===void 0?(r=t,t=0):r=Q(r),i=i===void 0?t<r?1:-1:Q(i),Fs(t,r,i,e)}}e(Is,`createRange`);var Ls=Is();function Rs(e,n){return(t(e)?Se:yn)(e,$o(X(n,3)))}e(Rs,`reject`);var zs=Rs,Bs=`[object Map]`,Vs=`[object Set]`;function Hs(e){if(e==null)return 0;if(g(e))return No(e)?js(e):e.length;var t=w(e);return t==Bs||t==Vs?e.size:v(e).length}e(Hs,`size`);var Us=Hs;function Ws(e,t){var n;return F(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}e(Ws,`baseSome`);var Gs=Ws;function Ks(e,r,i){var a=t(e)?En:Gs;return i&&n(e,r,i)&&(r=void 0),a(e,X(r,3))}e(Ks,`some`);var qs=Ks,Js=p(function(e,t){if(e==null)return[];var r=t.length;return r>1&&n(e,t[0],t[1])?t=[]:r>2&&n(t[0],t[1],t[2])&&(t=[t[0]]),ls(e,Z(t,1),[])});function Ys(e){return e&&e.length?da(e):[]}e(Ys,`uniq`);var Xs=Ys;function Zs(e,t){return e&&e.length?da(e,X(t,2)):[]}e(Zs,`uniqBy`);var Qs=Zs,$s=0;function ec(e){var t=++$s;return Rr(e)+t}e(ec,`uniqueId`);var tc=ec;function nc(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}e(nc,`baseZipObject`);var rc=nc;function ic(e,t){return rc(e||[],t||[],r)}e(ic,`zipObject`);var ac=ic;export{Ao as A,Js as B,_n as C,Wo as D,Di as E,Ba as F,Us as G,No as H,sa as I,Jo as K,zo as L,qs as M,ac as N,xi as O,k as P,tc as R,xo as S,ro as T,Qs as U,Io as V,yi as W,ts as _,Ls as a,To as b,fa as c,Xo as d,zs as f,Ya as g,qi as h,Co as i,li as j,ja as k,to as l,$a as m,_o as n,pi as o,zi as p,yo as q,fn as r,ho as s,Ha as t,un as u,Vi as v,sn as w,_i as x,lo as y,Xs as z};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{Q as t,i as n,it as r}from"./index-DDcYO1IJ.js";import{C as i,P as a,W as o,c as s,h as c,j as l,x as u}from"./chunk-H3VCZNTA-BOGhqvxW.js";var d=`\0`,f=`\0`,p=``,m=class{static{e(this,`Graph`)}constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,`directed`)?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=t(void 0),this._defaultEdgeLabelFn=t(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[f]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return r(e)||(e=t(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return a(this._nodes)}sources(){var e=this;return l(this.nodes(),function(t){return n(e._in[t])})}sinks(){var e=this;return l(this.nodes(),function(t){return n(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return i(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=f,this._children[e]={},this._children[f][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var n=e(e=>this.removeEdge(this._edgeObjs[e]),`removeEdge`);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],i(this.children(t),e=>{this.setParent(e)}),delete this._children[t]),i(a(this._in[t]),n),delete this._in[t],delete this._preds[t],i(a(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(o(t))t=f;else{t+=``;for(var n=t;!o(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==f)return t}}children(e){if(o(e)&&(e=f),this._isCompound){var t=this._children[e];if(t)return a(t)}else{if(e===f)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return a(t)}successors(e){var t=this._sucs[e];if(t)return a(t)}neighbors(e){var t=this.predecessors(e);if(t)return s(t,this.successors(e))}isLeaf(e){var t;return t=this.isDirected()?this.successors(e):this.neighbors(e),t.length===0}filterNodes(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;i(this._nodes,function(e,r){t(r)&&n.setNode(r,e)}),i(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,r.edge(e))});var a={};function o(e){var t=r.parent(e);return t===void 0||n.hasNode(t)?(a[e]=t,t):t in a?a[t]:o(t)}return e(o,`findParent`),this._isCompound&&i(n.nodes(),function(e){n.setParent(e,o(e))}),n}setDefaultEdgeLabel(e){return r(e)||(e=t(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return u(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return c(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,o(n)||(n=``+n);var s=_(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return i&&(this._edgeLabels[s]=r),this;if(!o(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?r:this._defaultEdgeLabelFn(e,t,n);var c=v(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,h(this._preds[t],e),h(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?y(this._isDirected,arguments[0]):_(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?y(this._isDirected,arguments[0]):_(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?y(this._isDirected,arguments[0]):_(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],g(this._preds[t],e),g(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=u(n);return t?l(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=u(n);return t?l(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};m.prototype._nodeCount=0,m.prototype._edgeCount=0;function h(e,t){e[t]?e[t]++:e[t]=1}e(h,`incrementOrInitEntry`);function g(e,t){--e[t]||delete e[t]}e(g,`decrementOrRemoveEntry`);function _(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var s=i;i=a,a=s}return i+p+a+p+(o(r)?d:r)}e(_,`edgeArgsToId`);function v(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}e(v,`edgeArgsToObj`);function y(e,t){return _(e,t.v,t.w,t.name)}e(y,`edgeObjToId`);export{m as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{qn as t,tn as n}from"./index-DDcYO1IJ.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{Vn as t}from"./index-DDcYO1IJ.js";var n=e((e,n)=>{let r;return n===`sandbox`&&(r=t(`#i`+e)),t(n===`sandbox`?r.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`);export{n as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import"./index-DDcYO1IJ.js";import"./chunk-KSICW3F5-C2tZmXwv.js";import"./chunk-O5ABG6QK-V3sk7Bps.js";import"./chunk-TBF5ZNIQ-CXamrpH3.js";import"./chunk-RWUO3TPN-BHusg2jI.js";import{i as t,n,r,t as i}from"./chunk-PK6DOVAG-FvG7aKfZ.js";var a={parser:i,get db(){return new r},renderer:t,styles:n,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import"./index-DDcYO1IJ.js";import"./chunk-KSICW3F5-C2tZmXwv.js";import"./chunk-O5ABG6QK-V3sk7Bps.js";import"./chunk-TBF5ZNIQ-CXamrpH3.js";import"./chunk-RWUO3TPN-BHusg2jI.js";import{i as t,n,r,t as i}from"./chunk-PK6DOVAG-FvG7aKfZ.js";var a={parser:i,get db(){return new r},renderer:t,styles:n,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1,4 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{_ as t,d as n,f as r,g as i,h as a,k as o,l as s,m as c,mn as l,p as u,qn as d,u as f,v as p,x as m,y as h}from"./index-DDcYO1IJ.js";import{W as g,o as _,w as v}from"./chunk-H3VCZNTA-BOGhqvxW.js";import{t as y}from"./chunk-HN6EAY2L-CitKFy1e.js";import{t as b}from"./chunk-3YCYZ6SJ-BJZnGFjg.js";function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:S(e),edges:C(e)};return g(e.graph())||(t.value=v(e.graph())),t}e(x,`write`);function S(e){return _(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return g(n)||(i.value=n),g(r)||(i.parent=r),i})}e(S,`writeNodes`);function C(e){return _(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return g(t.name)||(r.name=t.name),g(n)||(r.value=n),r})}e(C,`writeEdges`);var w=new Map,T=new Map,E=new Map,D=e(()=>{T.clear(),E.clear(),w.clear()},`clear`),O=e((e,t)=>{let n=T.get(t)||[];return d.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),k=e((e,t)=>{let n=T.get(t)||[];return d.info(`Descendants of `,t,` is `,n),d.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(d.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),A=e((e,t,n,r)=>{d.warn(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),d.warn(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)A(i,t,n,r);else{let a=t.node(i);d.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(d.warn(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(d.debug(`Setting parent`,i,e),n.setParent(i,e)):(d.info(`In copy `,e,`root`,r,`data`,t.node(e),r),d.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);d.debug(`Copying Edges`,o),o.forEach(i=>{d.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);d.info(`Edge data`,a,r);try{k(i,r)?(d.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),d.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):d.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){d.error(e)}})}d.debug(`Removing node`,i),t.removeNode(i)})},`copy`),j=e((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)E.set(i,e),r=[...r,...j(i,t)];return r},`extractDescendants`),M=e((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),N=e((e,t,n)=>{let r=t.children(e);if(d.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=N(e,t,n),a=M(t,n,r);if(r)if(a.length>0)i=r;else return r}return i},`findNonClusterChild`),P=e(e=>!w.has(e)||!w.get(e).externalConnections?e:w.has(e)?w.get(e).id:e,`getAnchorId`),F=e((e,t)=>{if(!e||t>10){d.debug(`Opting out, no graph `);return}else d.debug(`Opting in, graph `);e.nodes().forEach(function(t){e.children(t).length>0&&(d.warn(`Cluster identified`,t,` Replacement id in edges: `,N(t,e,t)),T.set(t,j(t,e)),w.set(t,{id:N(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(d.debug(`Cluster identified`,t,T),r.forEach(e=>{O(e.v,t)^O(e.w,t)&&(d.warn(`Edge: `,e,` leaves cluster `,t),d.warn(`Descendants of XXX `,t,`: `,T.get(t)),w.get(t).externalConnections=!0)})):d.debug(`Not a cluster `,t,T)});for(let t of w.keys()){let n=w.get(t).id,r=e.parent(n);r!==t&&w.has(r)&&!w.get(r).externalConnections&&(w.get(t).id=r)}e.edges().forEach(function(t){let n=e.edge(t);d.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),d.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(d.warn(`Fix XXX`,w,`ids:`,t.v,t.w,`Translating: `,w.get(t.v),` --- `,w.get(t.w)),w.get(t.v)||w.get(t.w)){if(d.warn(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=P(t.v),i=P(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);w.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);w.get(r).externalConnections=!0,n.toCluster=t.w}d.warn(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),d.warn(`Adjusted Graph`,x(e)),I(e,0),d.trace(w)},`adjustClustersAndEdges`),I=e((e,t)=>{if(d.warn(`extractor - `,t,x(e),e.children(`D`)),t>10){d.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r){d.debug(`Done, no node has children`,e.nodes());return}d.debug(`Nodes = `,n,t);for(let r of n)if(d.debug(`Extracting node`,r,w,w.has(r)&&!w.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!w.has(r))d.debug(`Not a cluster`,r,t);else if(!w.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){d.warn(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;w.get(r)?.clusterData?.dir&&(n=w.get(r).clusterData.dir,d.warn(`Fixing dir`,w.get(r).clusterData.dir,n));let i=new y({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});d.warn(`Old graph before copy`,x(e)),A(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:w.get(r).clusterData,label:w.get(r).label,graph:i}),d.warn(`New graph after copy node: (`,r,`)`,x(i)),d.debug(`Old graph after copy`,x(e))}else d.warn(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!w.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),d.debug(w);n=e.nodes(),d.warn(`New list of nodes`,n);for(let r of n){let n=e.node(r);d.warn(` Now next level`,r,n),n?.clusterNode&&I(n.graph,t+1)}},`extractor`),L=e((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=L(e,e.children(t));n=[...n,...r]}),n},`sorter`),R=e(e=>L(e,e.children()),`sortNodesByHierarchy`),z=e(async(r,i,l,u,h,g)=>{d.warn(`Graph in recursive render:XAX`,x(i),h);let _=i.graph().rankdir;d.trace(`Dir in recursive render - dir:`,_);let v=r.insert(`g`).attr(`class`,`root`);i.nodes()?d.info(`Recursive render XXX`,i.nodes()):d.info(`No nodes found for`,i),i.edges().length>0&&d.info(`Recursive edges`,i.edge(i.edges()[0]));let y=v.insert(`g`).attr(`class`,`clusters`),S=v.insert(`g`).attr(`class`,`edgePaths`),C=v.insert(`g`).attr(`class`,`edgeLabels`),T=v.insert(`g`).attr(`class`,`nodes`);await Promise.all(i.nodes().map(async function(e){let n=i.node(e);if(h!==void 0){let t=JSON.parse(JSON.stringify(h.clusterData));d.trace(`Setting data for parent cluster XXX
2
- Node.id = `,e,`
3
- data=`,t.height,`
4
- Parent cluster`,h.height),i.setNode(h.id,t),i.parent(e)||(d.trace(`Setting parent`,e,h.id),i.setParent(e,h.id,t))}if(d.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(i.node(e))),n?.clusterNode){d.info(`Cluster identified XBX`,e,n.width,i.node(e));let{ranksep:t,nodesep:r}=i.graph();n.graph.setGraph({...n.graph.graph(),ranksep:t+25,nodesep:r});let a=await z(T,n.graph,l,u,i.node(e),g),o=a.elem;m(n,o),n.diff=a.diff||0,d.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),p(o,n)}else i.children(e).length>0?(d.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,i),d.trace(N(n.id,i)),w.set(n.id,{id:N(n.id,i),node:n})):(d.trace(`Node - the non recursive path XAX`,e,T,i.node(e),_),await t(T,i.node(e),{config:g,dir:_}))})),await e(async()=>{let e=i.edges().map(async function(e){let t=i.edge(e.v,e.w,e.name);d.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),d.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(i.edge(e))),d.info(`Fix`,w,`ids:`,e.v,e.w,`Translating: `,w.get(e.v),w.get(e.w)),await n(C,t)});await Promise.all(e)},`processEdges`)(),d.info(`Graph before layout:`,JSON.stringify(x(i))),d.info(`############################################# XXX`),d.info(`### Layout ### XXX`),d.info(`############################################# XXX`),b(i),d.info(`Graph after layout:`,JSON.stringify(x(i)));let E=0,{subGraphTitleTotalMargin:D}=o(g);return await Promise.all(R(i).map(async function(e){let t=i.node(e);if(d.info(`Position XBX => `+e+`: (`+t.x,`,`+t.y,`) width: `,t.width,` height: `,t.height),t?.clusterNode)t.y+=D,d.info(`A tainted cluster node XBX1`,e,t.id,t.width,t.height,t.x,t.y,i.parent(e)),w.get(t.id).node=t,a(t);else if(i.children(e).length>0){d.info(`A pure cluster node XBX1`,e,t.id,t.x,t.y,t.width,t.height,i.parent(e)),t.height+=D,i.node(t.parentId);let n=t?.padding/2||0,r=t?.labelBBox?.height||0,a=r-n||0;d.debug(`OffsetY`,a,`labelHeight`,r,`halfPadding`,n),await c(y,t),w.get(t.id).node=t}else{let e=i.node(t.parentId);t.y+=D/2,d.info(`A regular node XBX1 - using the padding`,t.id,`parent`,t.parentId,t.width,t.height,t.x,t.y,`offsetY`,t.offsetY,`parent`,e,e?.offsetY,t),a(t)}})),i.edges().forEach(function(e){let t=i.edge(e);d.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(t),t),t.points.forEach(e=>e.y+=D/2),f(t,s(S,t,w,l,i.node(e.v),i.node(e.w),u))}),i.nodes().forEach(function(e){let t=i.node(e);d.info(e,t.type,t.diff),t.isGroup&&(E=t.diff)}),d.warn(`Returning from recursive render XAX`,v,E),{elem:v,diff:E}},`recursiveRender`),B=e(async(e,t)=>{let n=new y({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select(`g`);r(a,e.markers,e.type,e.diagramId),h(),u(),i(),D(),e.nodes.forEach(e=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),d.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+`---`+t+`---1`,i=t+`---`+t+`---2`,a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),n.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e);o.label=``,o.arrowTypeEnd=`none`,o.id=t+`-cyclic-special-1`,s.arrowTypeStart=`none`,s.arrowTypeEnd=`none`,s.id=t+`-cyclic-special-mid`,c.label=``,a.isGroup&&(o.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,n.setEdge(t,r,o,t+`-cyclic-special-0`),n.setEdge(r,i,s,t+`-cyclic-special-1`),n.setEdge(i,t,c,t+`-cyc<lic-special-2`)}else n.setEdge(e.start,e.end,{...e},e.id)}),d.warn(`Graph at first:`,JSON.stringify(x(n))),F(n),d.warn(`Graph after XAX:`,JSON.stringify(x(n)));let o=l();await z(a,n,e.type,e.diagramId,void 0,o)},`render`);export{B as render};
@@ -1,162 +0,0 @@
1
- import{t as e}from"./chunk-VELTKBKT-C9dVN39o.js";import{$t as t,Ft as n,Ht as r,I as i,Jt as a,Lt as o,M as s,Pt as c,Rt as l,Vn as u,Wt as d,b as ee,c as f,cn as p,en as m,fn as h,hn as g,in as te,mn as _,pn as ne,qn as v,s as y,sn as b}from"./index-DDcYO1IJ.js";import{t as x}from"./chunk-KSICW3F5-C2tZmXwv.js";import{r as S}from"./chunk-O5ABG6QK-V3sk7Bps.js";import{t as C}from"./chunk-TBF5ZNIQ-CXamrpH3.js";import{t as w}from"./chunk-RWUO3TPN-BHusg2jI.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=_(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=t,this.setAccDescription=a,this.setDiagramTitle=m,this.getAccTitle=g,this.getAccDescription=te,this.getDiagramTitle=b,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return l.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,r,i,a,o,s={},l){if(!e||e.trim().length===0)return;let u;if(l!==void 0){let e;e=l.includes(`
2
- `)?l+`
3
- `:`{
4
- `+l+`
5
- }`,u=c(e,{schema:n})}let d=this.edges.find(t=>t.id===e);if(d){let e=u;e?.animate!==void 0&&(d.animate=e.animate),e?.animation!==void 0&&(d.animation=e.animation),e?.curve!==void 0&&(d.interpolate=e.curve);return}let f,p=this.vertices.get(e);if(p===void 0&&(t===void 0&&r===void 0&&i!=null&&v.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:`text`,domId:T+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,t===void 0?p.text===void 0&&(p.text=e):(this.config=_(),f=this.sanitizeText(t.text.trim()),p.labelType=t.type,f.startsWith(`"`)&&f.endsWith(`"`)&&(f=f.substring(1,f.length-1)),p.text=f),r!==void 0&&(p.type=r),i?.forEach(e=>{p.styles.push(e)}),a?.forEach(e=>{p.classes.push(e)}),o!==void 0&&(p.dir=o),p.props===void 0?p.props=s:s!==void 0&&Object.assign(p.props,s),u!==void 0){if(u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes(`_`))throw Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!ee(u.shape))throw Error(`No such shape: ${u.shape}.`);p.type=u?.shape}u?.label&&(p.text=u?.label,p.labelType=this.sanitizeNodeLabelType(u?.labelType)),u?.icon&&(p.icon=u?.icon,!u.label?.trim()&&p.text===e&&(p.text=``)),u?.form&&(p.form=u?.form),u?.pos&&(p.pos=u?.pos),u?.img&&(p.img=u?.img,!u.label?.trim()&&p.text===e&&(p.text=``)),u?.constraint&&(p.constraint=u.constraint),u.w&&(p.assetWidth=Number(u.w)),u.h&&(p.assetHeight=Number(u.h))}}addSingleLink(e,t,n,r){let i={start:e,end:t,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};v.info(`abc78 Got edge...`,i);let a=n.text;if(a!==void 0&&(i.text=this.sanitizeText(a.text.trim()),i.text.startsWith(`"`)&&i.text.endsWith(`"`)&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=this.sanitizeNodeLabelType(a.type)),n!==void 0&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length>10?10:n.length),r&&!this.edges.some(e=>e.id===r))i.id=r,i.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===i.start&&e.end===i.end);e.length===0?i.id=s(i.start,i.end,{counter:0,prefix:`L`}):i.id=s(i.start,i.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))v.info(`Pushing edge...`),this.edges.push(i);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
6
-
7
- Initialize mermaid with maxEdges set to a higher number to allow more edges.
8
- You cannot set this config via configuration inside the diagram as it is a secure config.
9
- You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,n){let r=this.isLinkData(n)?n.id.replace(`@`,``):void 0;v.info(`addLink`,e,t,r);for(let i of e)for(let a of t){let o=i===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(i,a,n,r):this.addSingleLink(i,a,n,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{e===`default`?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if(typeof e==`number`&&e>=this.edges.length)throw Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);e===`default`?this.edges.defaultStyle=t:(this.edges[e].style=t,(this.edges[e]?.style?.length??0)>0&&!this.edges[e]?.style?.some(e=>e?.startsWith(`fill`))&&this.edges[e]?.style?.push(`fill:none`))})}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);e.split(`,`).forEach(e=>{let t=this.classes.get(e);t===void 0&&(t={id:e,styles:[],textStyles:[]},this.classes.set(e,t)),n?.forEach(e=>{if(/color/.exec(e)){let n=e.replace(`fill`,`bgFill`);t.textStyles.push(n)}t.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction=`RL`),/.*\^/.exec(this.direction)&&(this.direction=`BT`),/.*>/.exec(this.direction)&&(this.direction=`LR`),/.*v/.exec(this.direction)&&(this.direction=`TB`),this.direction===`TD`&&(this.direction=`TB`)}setClass(e,t){for(let n of e.split(`,`)){let e=this.vertices.get(n);e&&e.classes.push(t);let r=this.edges.find(e=>e.id===n);r&&r.classes.push(t);let i=this.subGraphLookup.get(n);i&&i.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let n of e.split(`,`))this.tooltips.set(this.version===`gen-1`?this.lookUpDomId(n):n,t)}}setClickFun(e,t,n){if(_().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith(`"`)&&t.endsWith(`"`)&&(t=t.substr(1,t.length-2)),r[e]=t}}r.length===0&&r.push(e);let a=this.vertices.get(e);a&&(a.haveCallback=!0,this.funs.push(()=>{let n=this.lookUpDomId(e),a=document.querySelector(`[id="${n}"]`);a!==null&&a.addEventListener(`click`,()=>{i.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=i.formatUrl(t,this.config),r.linkTarget=n)}),this.setClass(e,`clickable`)}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFun(e,t,n)}),this.setClass(e,`clickable`)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=S();u(e).select(`svg`).selectAll(`g.node`).on(`mouseover`,e=>{let n=u(e.currentTarget),r=n.attr(`title`);if(r===null)return;let i=e.currentTarget?.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.text(n.attr(`title`)).style(`left`,window.scrollX+i.left+(i.right-i.left)/2+`px`).style(`top`,window.scrollY+i.bottom+`px`),t.html(o.sanitize(r)),n.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),u(e.currentTarget).classed(`hover`,!1)})}clear(e=`gen-2`){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId=``,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=_(),h()}setGen(e){this.version=e||`gen-2`}defaultStyle(){return`fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;`}addSubGraph(t,n,r){let i=t.text.trim(),a=r.text;t===r&&/\s/.exec(r.text)&&(i=void 0);let o=e(e=>{let t={boolean:{},number:{},string:{}},n=[],r;return{nodeList:e.filter(function(e){let i=typeof e;return e.stmt&&e.stmt===`dir`?(r=e.value,!1):e.trim()===``?!1:i in t?t[i].hasOwnProperty(e)?!1:t[i][e]=!0:n.includes(e)?!1:n.push(e)}),dir:r}},`uniq`)(n.flat()),s=o.nodeList,c=o.dir,l=_().flowchart??{};if(c??=l.inheritDir?this.getDirection()??_().direction??void 0:void 0,this.version===`gen-1`)for(let e=0;e<s.length;e++)s[e]=this.lookUpDomId(s[e]);i??=`subGraph`+this.subCount,a||=``,a=this.sanitizeText(a),this.subCount+=1;let u={id:i,nodes:s,title:a.trim(),classes:[],dir:c,labelType:this.sanitizeNodeLabelType(r?.type)};return v.info(`Adding`,u.id,u.nodes,u.dir),u.nodes=this.makeUniq(u,this.subGraphs).nodes,this.subGraphs.push(u),this.subGraphLookup.set(i,u),i}getPosForId(e){for(let[t,n]of this.subGraphs.entries())if(n.id===e)return t;return-1}indexNodes2(e,t){let n=this.subGraphs[t].nodes;if(this.secCount+=1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let r=0,i=1;for(;r<n.length;){let t=this.getPosForId(n[r]);if(t>=0){let n=this.indexNodes2(e,t);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2(`none`,this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1);break}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}countChar(e,t){let n=t.length,r=0;for(let i=0;i<n;++i)t[i]===e&&++r;return r}destructEndLink(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`,t.startsWith(`x`)&&(r=`double_`+r,n=n.slice(1));break;case`>`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1));break}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=this.countChar(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;if(t){if(r=this.destructStartLink(t),r.stroke!==n.stroke)return{type:`INVALID`,stroke:`INVALID`};if(r.type===`arrow_open`)r.type=n.type;else{if(r.type!==n.type)return{type:`INVALID`,stroke:`INVALID`};r.type=`double_`+r.type}return r.type===`double_arrow`&&(r.type=`double_arrow_point`),r.length=n.length,r}return n}exists(e,t){for(let n of e)if(n.nodes.includes(t))return!0;return!1}makeUniq(e,t){let n=[];return e.nodes.forEach((r,i)=>{this.exists(t,r)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return`imageSquare`;if(e.icon)return e.form===`circle`?`iconCircle`:e.form===`square`?`iconSquare`:e.form===`rounded`?`iconRounded`:`icon`;switch(e.type){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t=`none`,n=`arrow_point`;switch(e){case`arrow_point`:case`arrow_circle`:case`arrow_cross`:n=e;break;case`double_arrow_point`:case`double_arrow_circle`:case`double_arrow_cross`:t=e.replace(`double_`,``),n=t;break}return{arrowTypeStart:t,arrowTypeEnd:n}}addNodeFromVertex(e,t,n,r,i,a){let o=n.get(e.id),s=r.get(e.id)??!1,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.cssClasses=e.classes.join(` `);else{let n={id:e.id,label:e.text,labelType:e.labelType,labelStyle:``,parentId:o,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles([`default`,`node`,...e.classes]),cssClasses:`default `+e.classes.join(` `),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}getData(){let e=_(),t=[],n=[],r=this.getSubGraphs(),i=new Map,a=new Map;for(let e=r.length-1;e>=0;e--){let t=r[e];t.nodes.length>0&&a.set(t.id,!0);for(let e of t.nodes)i.set(e,t.id)}for(let n=r.length-1;n>=0;n--){let a=r[n];t.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(` `),shape:`rect`,dir:a.dir,isGroup:!0,look:e.look})}this.getVertices().forEach(n=>{this.addNodeFromVertex(n,t,i,a,e,e.look||`classic`)});let o=this.getEdges();return o.forEach((t,r)=>{let{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(t.type),c=[...o.defaultStyle??[]];t.style&&c.push(...t.style);let l={id:s(t.start,t.end,{counter:r,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??`normal`,label:t.text,labelType:t.labelType,labelpos:`c`,thickness:t.stroke,minlen:t.length,classes:t?.stroke===`invisible`?``:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:i,arrowTypeEnd:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:a,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:c,style:c,pattern:t.stroke,look:e.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(l)}),{nodes:t,edges:n,other:{},config:e}}defaultConfig(){return r.flowchart}},D={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,t,n,r){v.info(`REF0:`),v.info(`Drawing state diagram (v2)`,t);let{securityLevel:a,flowchart:o,layout:s}=_();r.db.setDiagramId(t),v.debug(`Before getData: `);let c=r.db.getData();v.debug(`Data: `,c);let l=C(t,a),u=r.db.getDirection();c.type=r.type,c.layoutAlgorithm=y(s),c.layoutAlgorithm===`dagre`&&s===`elk`&&v.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),c.direction=u,c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`point`,`circle`,`cross`],c.diagramId=t,v.debug(`REF1:`,c),await f(c,l);let d=c.config.flowchart?.diagramPadding??8;i.insertTitle(l,`flowchartTitleText`,o?.titleTopMargin||0,r.db.getDiagramTitle()),w(l,d,`flowchart`,o?.useMaxWidth||!1)},`draw`)},O=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],o=[2,2],s=[1,13],c=[1,14],l=[1,15],u=[1,16],d=[1,23],ee=[1,25],f=[1,26],p=[1,27],m=[1,50],h=[1,49],g=[1,29],te=[1,30],_=[1,31],ne=[1,32],v=[1,33],y=[1,45],b=[1,47],x=[1,43],S=[1,48],C=[1,44],w=[1,51],T=[1,46],E=[1,52],D=[1,53],O=[1,34],re=[1,35],ie=[1,36],ae=[1,37],oe=[1,38],k=[1,58],A=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],j=[1,62],M=[1,61],N=[1,63],se=[8,9,11,75,77,78],ce=[1,79],le=[1,92],ue=[1,97],de=[1,96],fe=[1,93],pe=[1,89],me=[1,95],he=[1,91],ge=[1,98],_e=[1,94],ve=[1,99],ye=[1,90],be=[8,9,10,11,40,75,77,78],P=[8,9,10,11,40,46,75,77,78],F=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],xe=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Se=[44,60,89,102,105,106,109,111,114,115,116],Ce=[1,122],we=[1,123],Te=[1,125],Ee=[1,124],De=[44,60,62,74,89,102,105,106,109,111,114,115,116],Oe=[1,134],ke=[1,148],Ae=[1,149],je=[1,150],Me=[1,151],Ne=[1,136],Pe=[1,138],Fe=[1,142],Ie=[1,143],Le=[1,144],Re=[1,145],ze=[1,146],Be=[1,147],Ve=[1,152],He=[1,153],Ue=[1,132],We=[1,133],Ge=[1,140],Ke=[1,135],qe=[1,139],Je=[1,137],Ye=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Xe=[1,155],Ze=[1,157],I=[8,9,11],L=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],R=[1,177],z=[1,173],B=[1,174],V=[1,178],H=[1,175],U=[1,176],Qe=[77,116,119],W=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],$e=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],G=[1,248],K=[1,246],q=[1,250],J=[1,244],Y=[1,245],X=[1,247],Z=[1,249],Q=[1,251],tt=[1,269],nt=[8,9,11,106],$=[8,9,10,11,60,84,105,106,109,110,111,112],rt={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:`error`,8:`SEMI`,9:`NEWLINE`,10:`SPACE`,11:`EOF`,12:`GRAPH`,13:`NODIR`,14:`DIR`,27:`subgraph`,29:`SQS`,31:`SQE`,32:`end`,34:`acc_title`,35:`acc_title_value`,36:`acc_descr`,37:`acc_descr_value`,38:`acc_descr_multiline_value`,40:`SHAPE_DATA`,44:`AMP`,46:`STYLE_SEPARATOR`,48:`DOUBLECIRCLESTART`,49:`DOUBLECIRCLEEND`,50:`PS`,51:`PE`,52:`(-`,53:`-)`,54:`STADIUMSTART`,55:`STADIUMEND`,56:`SUBROUTINESTART`,57:`SUBROUTINEEND`,58:`VERTEX_WITH_PROPS_START`,59:`NODE_STRING[field]`,60:`COLON`,61:`NODE_STRING[value]`,62:`PIPE`,63:`CYLINDERSTART`,64:`CYLINDEREND`,65:`DIAMOND_START`,66:`DIAMOND_STOP`,67:`TAGEND`,68:`TRAPSTART`,69:`TRAPEND`,70:`INVTRAPSTART`,71:`INVTRAPEND`,74:`TESTSTR`,75:`START_LINK`,77:`LINK`,78:`LINK_ID`,80:`STR`,81:`MD_STR`,84:`STYLE`,85:`LINKSTYLE`,86:`CLASSDEF`,87:`CLASS`,88:`CLICK`,89:`DOWN`,90:`UP`,93:`idString[vertex]`,94:`idString[class]`,95:`CALLBACKNAME`,96:`CALLBACKARGS`,97:`HREF`,98:`LINK_TARGET`,99:`STR[link]`,100:`STR[tooltip]`,102:`DEFAULT`,104:`INTERPOLATE`,105:`NUM`,106:`COMMA`,109:`NODE_STRING`,110:`UNIT`,111:`BRKT`,112:`PCT`,114:`MINUS`,115:`MULT`,116:`UNICODE_TEXT`,117:`TEXT`,118:`TAGSTART`,119:`EDGE_TEXT`,121:`direction_tb`,122:`direction_bt`,123:`direction_rl`,124:`direction_lr`,125:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 183:this.$=a[s];break;case 11:r.setDirection(`TB`),this.$=`TB`;break;case 12:r.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 43:this.$=a[s-1]+a[s];break;case 44:this.$=a[s];break;case 45:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 46:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 47:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 48:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 49:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:r.addVertex(a[s-5][a[s-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-4]),this.$=a[s-5].concat(a[s]);break;case 53:this.$=a[s-4].concat(a[s]);break;case 54:this.$=a[s];break;case 55:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`);break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`);break;case 58:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`);break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`);break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`);break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`);break;case 62:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],`rect`,void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`);break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`);break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`);break;case 66:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`);break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`);break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`);break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`);break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`);break;case 72:this.$=a[s],r.addVertex(a[s]);break;case 73:a[s-1].text=a[s],this.$=a[s-1];break;case 74:case 75:a[s-2].text=a[s-1],this.$=a[s-2];break;case 76:this.$=a[s];break;case 77:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 78:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1],id:a[s-3]};break;case 79:this.$={text:a[s],type:`text`};break;case 80:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 81:this.$={text:a[s],type:`string`};break;case 82:this.$={text:a[s],type:`markdown`};break;case 83:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 84:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,id:a[s-1]};break;case 85:this.$=a[s-1];break;case 86:this.$={text:a[s],type:`text`};break;case 87:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 88:this.$={text:a[s],type:`string`};break;case 89:case 104:this.$={text:a[s],type:`markdown`};break;case 101:this.$={text:a[s],type:`text`};break;case 102:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 103:this.$={text:a[s],type:`text`};break;case 105:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 106:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 107:case 115:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 108:case 116:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 109:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 110:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 111:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 113:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 114:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 117:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 118:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 119:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 120:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 121:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 122:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 123:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 124:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 125:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 126:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 127:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 128:case 130:this.$=[a[s]];break;case 129:case 131:a[s-2].push(a[s]),this.$=a[s-2];break;case 133:this.$=a[s-1]+a[s];break;case 181:this.$=a[s];break;case 182:this.$=a[s-1]+``+a[s];break;case 184:this.$=a[s-1]+``+a[s];break;case 185:this.$={stmt:`dir`,value:`TB`};break;case 186:this.$={stmt:`dir`,value:`BT`};break;case 187:this.$={stmt:`dir`,value:`RL`};break;case 188:this.$={stmt:`dir`,value:`LR`};break;case 189:this.$={stmt:`dir`,value:`TD`};break}},`anonymous`),table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},t(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:ee,36:f,38:p,42:28,43:39,44:m,45:40,47:41,60:h,84:g,85:te,86:_,87:ne,88:v,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},t(a,[2,9]),t(a,[2,10]),t(a,[2,11]),{8:[1,55],9:[1,56],10:k,15:54,18:57},t(A,[2,3]),t(A,[2,4]),t(A,[2,5]),t(A,[2,6]),t(A,[2,7]),t(A,[2,8]),{8:j,9:M,11:N,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:j,9:M,11:N,21:68},{8:j,9:M,11:N,21:69},{8:j,9:M,11:N,21:70},{8:j,9:M,11:N,21:71},{8:j,9:M,11:N,21:72},{8:j,9:M,10:[1,73],11:N,21:74},t(A,[2,36]),{35:[1,75]},{37:[1,76]},t(A,[2,39]),t(se,[2,50],{18:77,39:78,10:k,40:ce}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:le,44:ue,60:de,80:[1,87],89:fe,95:[1,84],97:[1,85],101:86,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},t(A,[2,185]),t(A,[2,186]),t(A,[2,187]),t(A,[2,188]),t(A,[2,189]),t(be,[2,51]),t(be,[2,54],{46:[1,100]}),t(P,[2,72],{113:113,29:[1,101],44:m,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:h,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),t(F,[2,181]),t(F,[2,142]),t(F,[2,143]),t(F,[2,144]),t(F,[2,145]),t(F,[2,146]),t(F,[2,147]),t(F,[2,148]),t(F,[2,149]),t(F,[2,150]),t(F,[2,151]),t(F,[2,152]),t(a,[2,12]),t(a,[2,18]),t(a,[2,19]),{9:[1,114]},t(xe,[2,26],{18:115,10:k}),t(A,[2,27]),{42:116,43:39,44:m,45:40,47:41,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},t(A,[2,40]),t(A,[2,41]),t(A,[2,42]),t(Se,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Ce,81:we,116:Te,119:Ee},{75:[1,126],77:[1,127]},t(De,[2,83]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),t(A,[2,31]),t(A,[2,32]),{10:Oe,12:ke,14:Ae,27:je,28:128,32:Me,44:Ne,60:Pe,75:Fe,80:[1,130],81:[1,131],83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:129,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},t(Ye,o,{5:154}),t(A,[2,37]),t(A,[2,38]),t(se,[2,48],{44:Xe}),t(se,[2,49],{18:156,10:k,40:Ze}),t(be,[2,44]),{44:m,47:158,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{102:[1,159],103:160,105:[1,161]},{44:m,47:162,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{44:m,47:163,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},t(I,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(I,[2,115],{120:168,10:[1,167],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,117],{10:[1,169]}),t(L,[2,183]),t(L,[2,170]),t(L,[2,171]),t(L,[2,172]),t(L,[2,173]),t(L,[2,174]),t(L,[2,175]),t(L,[2,176]),t(L,[2,177]),t(L,[2,178]),t(L,[2,179]),t(L,[2,180]),{44:m,47:170,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{30:171,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:179,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:181,50:[1,180],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:182,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:183,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:184,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{109:[1,185]},{30:186,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:187,65:[1,188],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:189,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:190,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:191,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(F,[2,182]),t(a,[2,20]),t(xe,[2,25]),t(se,[2,46],{39:192,18:193,10:k,40:ce}),t(Se,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{77:[1,197],79:198,116:Te,119:Ee},t(Qe,[2,79]),t(Qe,[2,81]),t(Qe,[2,82]),t(Qe,[2,168]),t(Qe,[2,169]),{76:199,79:121,80:Ce,81:we,116:Te,119:Ee},t(De,[2,84]),{8:j,9:M,10:Oe,11:N,12:ke,14:Ae,21:201,27:je,29:[1,200],32:Me,44:Ne,60:Pe,75:Fe,83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:202,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},t(W,[2,101]),t(W,[2,103]),t(W,[2,104]),t(W,[2,157]),t(W,[2,158]),t(W,[2,159]),t(W,[2,160]),t(W,[2,161]),t(W,[2,162]),t(W,[2,163]),t(W,[2,164]),t(W,[2,165]),t(W,[2,166]),t(W,[2,167]),t(W,[2,90]),t(W,[2,91]),t(W,[2,92]),t(W,[2,93]),t(W,[2,94]),t(W,[2,95]),t(W,[2,96]),t(W,[2,97]),t(W,[2,98]),t(W,[2,99]),t(W,[2,100]),{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:ee,36:f,38:p,42:28,43:39,44:m,45:40,47:41,60:h,84:g,85:te,86:_,87:ne,88:v,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},{10:k,18:204},{44:[1,205]},t(be,[2,43]),{10:[1,206],44:m,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{10:[1,207]},{10:[1,208],106:[1,209]},t($e,[2,128]),{10:[1,210],44:m,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{10:[1,211],44:m,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:113,114:T,115:E,116:D},{80:[1,212]},t(I,[2,109],{10:[1,213]}),t(I,[2,111],{10:[1,214]}),{80:[1,215]},t(L,[2,184]),{80:[1,216],98:[1,217]},t(be,[2,55],{113:113,44:m,60:h,89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),{31:[1,218],67:R,82:219,116:V,117:H,118:U},t(et,[2,86]),t(et,[2,88]),t(et,[2,89]),t(et,[2,153]),t(et,[2,154]),t(et,[2,155]),t(et,[2,156]),{49:[1,220],67:R,82:219,116:V,117:H,118:U},{30:221,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{51:[1,222],67:R,82:219,116:V,117:H,118:U},{53:[1,223],67:R,82:219,116:V,117:H,118:U},{55:[1,224],67:R,82:219,116:V,117:H,118:U},{57:[1,225],67:R,82:219,116:V,117:H,118:U},{60:[1,226]},{64:[1,227],67:R,82:219,116:V,117:H,118:U},{66:[1,228],67:R,82:219,116:V,117:H,118:U},{30:229,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{31:[1,230],67:R,82:219,116:V,117:H,118:U},{67:R,69:[1,231],71:[1,232],82:219,116:V,117:H,118:U},{67:R,69:[1,234],71:[1,233],82:219,116:V,117:H,118:U},t(se,[2,45],{18:156,10:k,40:Ze}),t(se,[2,47],{44:Xe}),t(Se,[2,75]),t(Se,[2,74]),{62:[1,235],67:R,82:219,116:V,117:H,118:U},t(Se,[2,77]),t(Qe,[2,80]),{77:[1,236],79:198,116:Te,119:Ee},{30:237,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(Ye,o,{5:238}),t(W,[2,102]),t(A,[2,35]),{43:239,44:m,45:40,47:41,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},{10:k,18:240},{10:G,60:K,84:q,92:241,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:252,104:[1,253],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:254,104:[1,255],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{105:[1,256]},{10:G,60:K,84:q,92:257,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{44:m,47:258,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},t(I,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(I,[2,116]),t(I,[2,118],{10:[1,262]}),t(I,[2,119]),t(P,[2,56]),t(et,[2,87]),t(P,[2,57]),{51:[1,263],67:R,82:219,116:V,117:H,118:U},t(P,[2,64]),t(P,[2,59]),t(P,[2,60]),t(P,[2,61]),{109:[1,264]},t(P,[2,63]),t(P,[2,65]),{66:[1,265],67:R,82:219,116:V,117:H,118:U},t(P,[2,67]),t(P,[2,68]),t(P,[2,70]),t(P,[2,69]),t(P,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(Se,[2,78]),{31:[1,266],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:ee,36:f,38:p,42:28,43:39,44:m,45:40,47:41,60:h,84:g,85:te,86:_,87:ne,88:v,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},t(be,[2,53]),{43:268,44:m,45:40,47:41,60:h,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D},t(I,[2,121],{106:tt}),t(nt,[2,130],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),t($,[2,132]),t($,[2,134]),t($,[2,135]),t($,[2,136]),t($,[2,137]),t($,[2,138]),t($,[2,139]),t($,[2,140]),t($,[2,141]),t(I,[2,122],{106:tt}),{10:[1,271]},t(I,[2,123],{106:tt}),{10:[1,272]},t($e,[2,129]),t(I,[2,105],{106:tt}),t(I,[2,106],{113:113,44:m,60:h,89:y,102:b,105:x,106:S,109:C,111:w,114:T,115:E,116:D}),t(I,[2,110]),t(I,[2,112],{10:[1,273]}),t(I,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:j,9:M,11:N,21:278},t(A,[2,34]),t(be,[2,52]),{10:G,60:K,84:q,105:J,107:279,108:243,109:Y,110:X,111:Z,112:Q},t($,[2,133]),{14:le,44:ue,60:de,89:fe,101:280,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{14:le,44:ue,60:de,89:fe,101:281,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{98:[1,282]},t(I,[2,120]),t(P,[2,58]),{30:283,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(P,[2,66]),t(Ye,o,{5:284}),t(nt,[2,131],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),t(I,[2,126],{120:168,10:[1,285],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,127],{120:168,10:[1,286],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,114]),{31:[1,287],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:ee,36:f,38:p,42:28,43:39,44:m,45:40,47:41,60:h,84:g,85:te,86:_,87:ne,88:v,89:y,102:b,105:x,106:S,109:C,111:w,113:42,114:T,115:E,116:D,121:O,122:re,123:ie,124:ae,125:oe},{10:G,60:K,84:q,92:289,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:290,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},t(P,[2,62]),t(A,[2,33]),t(I,[2,124],{106:tt}),t(I,[2,125],{106:tt})],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,ee=2,f=1,p=o.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(h.yy[g]=this.yy[g]);m.setInput(t,h.yy),h.yy.lexer=m,h.yy.parser=this,typeof m.yylloc>`u`&&(m.yylloc={});var te=m.yylloc;o.push(te);var _=m.options&&m.options.ranges;typeof h.yy.parseError==`function`?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(e){r.length-=2*e,a.length-=e,o.length-=e}e(ne,`popStack`);function v(){var e;return e=i.pop()||m.lex()||f,typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(v,`lex`);for(var y,b,x,S,C,w={},T,E,D,O;;){if(x=r[r.length-1],this.defaultActions[x]?S=this.defaultActions[x]:((y===null||typeof y>`u`)&&(y=v()),S=s[x]&&s[x][y]),typeof S>`u`||!S.length||!S[0]){var re=``;for(T in O=[],s[x])this.terminals_[T]&&T>ee&&O.push(`'`+this.terminals_[T]+`'`);re=m.showPosition?`Parse error on line `+(l+1)+`:
10
- `+m.showPosition()+`
11
- Expecting `+O.join(`, `)+`, got '`+(this.terminals_[y]||y)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(y==f?`end of input`:`'`+(this.terminals_[y]||y)+`'`),this.parseError(re,{text:m.match,token:this.terminals_[y]||y,line:m.yylineno,loc:te,expected:O})}if(S[0]instanceof Array&&S.length>1)throw Error(`Parse Error: multiple actions possible at state: `+x+`, token: `+y);switch(S[0]){case 1:r.push(y),a.push(m.yytext),o.push(m.yylloc),r.push(S[1]),y=null,b?(y=b,b=null):(u=m.yyleng,c=m.yytext,l=m.yylineno,te=m.yylloc,d>0&&d--);break;case 2:if(E=this.productions_[S[1]][1],w.$=a[a.length-E],w._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},_&&(w._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),C=this.performAction.apply(w,[c,u,l,h.yy,S[1],a,o].concat(p)),typeof C<`u`)return C;E&&(r=r.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),r.push(this.productions_[S[1]][0]),a.push(w.$),o.push(w._$),D=s[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0},`parse`)};rt.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(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).
12
- `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
13
- `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
14
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),34;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),36;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return this.pushState(`shapeData`),t.yytext=``,40;case 8:return this.pushState(`shapeDataStr`),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin(`callbackname`);break;case 14:this.popState();break;case 15:this.popState(),this.begin(`callbackargs`);break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return`MD_STR`;case 20:this.popState();break;case 21:this.begin(`md_string`);break;case 22:return`STR`;case 23:this.popState();break;case 24:this.pushState(`string`);break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 88;case 35:return e.lex.firstGraph()&&this.begin(`dir`),12;case 36:return e.lex.firstGraph()&&this.begin(`dir`),12;case 37:return e.lex.firstGraph()&&this.begin(`dir`),12;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;case 70:return this.pushState(`edgeText`),75;case 71:return 119;case 72:return this.popState(),77;case 73:return this.pushState(`thickEdgeText`),75;case 74:return 119;case 75:return this.popState(),77;case 76:return this.pushState(`dottedEdgeText`),75;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;case 80:return`TEXT`;case 81:return this.pushState(`ellipseText`),52;case 82:return this.popState(),55;case 83:return this.pushState(`text`),54;case 84:return this.popState(),57;case 85:return this.pushState(`text`),56;case 86:return 58;case 87:return this.pushState(`text`),67;case 88:return this.popState(),64;case 89:return this.pushState(`text`),63;case 90:return this.popState(),49;case 91:return this.pushState(`text`),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState(`trapText`),68;case 96:return this.pushState(`trapText`),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return`SEP`;case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState(`text`),62;case 110:return this.popState(),51;case 111:return this.pushState(`text`),50;case 112:return this.popState(),31;case 113:return this.pushState(`text`),29;case 114:return this.popState(),66;case 115:return this.pushState(`text`),65;case 116:return`TEXT`;case 117:return`QUOTE`;case 118:return 9;case 119:return 10;case 120:return 11}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}}})();function it(){this.yy={}}return e(it,`Parser`),it.prototype=rt,rt.Parser=it,new it})();O.parser=O;var re=O,ie=Object.assign({},re);ie.parse=e=>{let t=e.replace(/}\s*\n/g,`}
15
- `);return re.parse(t)};var ae=ie,oe=e((e,t)=>{let n=p;return d(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),k={parser:ae,get db(){return new E},renderer:D,styles:e(e=>`.label {
16
- font-family: ${e.fontFamily};
17
- color: ${e.nodeTextColor||e.textColor};
18
- }
19
- .cluster-label text {
20
- fill: ${e.titleColor};
21
- }
22
- .cluster-label span {
23
- color: ${e.titleColor};
24
- }
25
- .cluster-label span p {
26
- background-color: transparent;
27
- }
28
-
29
- .label text,span {
30
- fill: ${e.nodeTextColor||e.textColor};
31
- color: ${e.nodeTextColor||e.textColor};
32
- }
33
-
34
- .node rect,
35
- .node circle,
36
- .node ellipse,
37
- .node polygon,
38
- .node path {
39
- fill: ${e.mainBkg};
40
- stroke: ${e.nodeBorder};
41
- stroke-width: ${e.strokeWidth??1}px;
42
- }
43
- .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
44
- text-anchor: middle;
45
- }
46
- // .flowchart-label .text-outer-tspan {
47
- // text-anchor: middle;
48
- // }
49
- // .flowchart-label .text-inner-tspan {
50
- // text-anchor: start;
51
- // }
52
-
53
- .node .katex path {
54
- fill: #000;
55
- stroke: #000;
56
- stroke-width: 1px;
57
- }
58
-
59
- .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
60
- text-align: center;
61
- }
62
- .node.clickable {
63
- cursor: pointer;
64
- }
65
-
66
-
67
- .root .anchor path {
68
- fill: ${e.lineColor} !important;
69
- stroke-width: 0;
70
- stroke: ${e.lineColor};
71
- }
72
-
73
- .arrowheadPath {
74
- fill: ${e.arrowheadColor};
75
- }
76
-
77
- .edgePath .path {
78
- stroke: ${e.lineColor};
79
- stroke-width: ${e.strokeWidth??2}px;
80
- }
81
-
82
- .flowchart-link {
83
- stroke: ${e.lineColor};
84
- fill: none;
85
- }
86
-
87
- .edgeLabel {
88
- background-color: ${e.edgeLabelBackground};
89
- p {
90
- background-color: ${e.edgeLabelBackground};
91
- }
92
- rect {
93
- opacity: 0.5;
94
- background-color: ${e.edgeLabelBackground};
95
- fill: ${e.edgeLabelBackground};
96
- }
97
- text-align: center;
98
- }
99
-
100
- /* For html labels only */
101
- .labelBkg {
102
- background-color: ${oe(e.edgeLabelBackground,.5)};
103
- // background-color:
104
- }
105
-
106
- .cluster rect {
107
- fill: ${e.clusterBkg};
108
- stroke: ${e.clusterBorder};
109
- stroke-width: 1px;
110
- }
111
-
112
- .cluster text {
113
- fill: ${e.titleColor};
114
- }
115
-
116
- .cluster span {
117
- color: ${e.titleColor};
118
- }
119
- /* .cluster div {
120
- color: ${e.titleColor};
121
- } */
122
-
123
- div.mermaidTooltip {
124
- position: absolute;
125
- text-align: center;
126
- max-width: 200px;
127
- padding: 2px;
128
- font-family: ${e.fontFamily};
129
- font-size: 12px;
130
- background: ${e.tertiaryColor};
131
- border: 1px solid ${e.border2};
132
- border-radius: 2px;
133
- pointer-events: none;
134
- z-index: 100;
135
- }
136
-
137
- .flowchartTitleText {
138
- text-anchor: middle;
139
- font-size: 18px;
140
- fill: ${e.textColor};
141
- }
142
-
143
- rect.text {
144
- fill: none;
145
- stroke-width: 0;
146
- }
147
-
148
- .icon-shape, .image-shape {
149
- background-color: ${e.edgeLabelBackground};
150
- p {
151
- background-color: ${e.edgeLabelBackground};
152
- padding: 2px;
153
- }
154
- .label rect {
155
- opacity: 0.5;
156
- background-color: ${e.edgeLabelBackground};
157
- fill: ${e.edgeLabelBackground};
158
- }
159
- text-align: center;
160
- }
161
- ${x()}
162
- `,`getStyles`),init:e(e=>{e.flowchart||={},e.layout&&ne({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,ne({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},`init`)};export{k as diagram};