@juki-team/base-ui 1.5.16 → 1.5.22

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 (209) hide show
  1. package/dist/esm/ArrowForwardIcon-B_e3QWhU.js +1 -0
  2. package/dist/esm/BarChart-iS9A5dpq.js +1 -0
  3. package/dist/esm/{CartesianChart-cNl_tqN9.js → CartesianChart-DRkVAUTl.js} +6 -6
  4. package/dist/esm/ChangePasswordModal-DWcV41bD.js +1 -0
  5. package/dist/esm/CodeEditor-BIbu4VxL.js +1 -0
  6. package/dist/esm/CodeViewer-BUV-dalv.js +1 -0
  7. package/dist/esm/Collapse-paq7oWgG.js +1 -0
  8. package/dist/esm/{DataGrid-Bu-7Atkf.js → DataGrid-D3ZzYM2h.js} +1 -1
  9. package/dist/esm/DataViewer-CMI27AMZ.js +1 -0
  10. package/dist/esm/DrawerView-WQzHX5l-.js +1 -0
  11. package/dist/esm/ExcalidrawButton-Dkt-wFZK.js +1 -0
  12. package/dist/esm/GraphvizViewer-CYGvah6j.js +1 -0
  13. package/dist/esm/ImageLoaderCropper-DIEHTOiU.js +1 -0
  14. package/dist/esm/InputCellPhoneNumber-DgviNp4t.js +1 -0
  15. package/dist/esm/InputColor-BSBlv1oE.js +14 -0
  16. package/dist/esm/LineChart-BdYnYefg.js +1 -0
  17. package/dist/esm/LoaderLayer-CWElgcGs.js +1 -0
  18. package/dist/esm/MdMath-KE8c-hVy.js +1 -0
  19. package/dist/esm/MdMathEditor-DbH_jI7Y.js +28 -0
  20. package/dist/esm/{Popover-C0pozkRR.js → Popover-BLy0OI8L.js} +1 -1
  21. package/dist/esm/ReplyIcon-D3OGXdpv.js +1 -0
  22. package/dist/esm/SettingsIcon-W2HrGsHn.js +1 -0
  23. package/dist/esm/SlideDeck-o1krblz8.js +1 -0
  24. package/dist/esm/TableEyeIcon-cEB6wzrG.js +1 -0
  25. package/dist/esm/TableOfContents-DPsfG1VD.js +1 -0
  26. package/dist/esm/Tooltip-BI0Xe-XW.js +1 -0
  27. package/dist/esm/UserCodeEditor-CcaAG5g_.js +61 -0
  28. package/dist/esm/VirtualizedRowsFixed-VrMhZ4XD.js +1 -0
  29. package/dist/esm/WorksheetAsSlides-kPK5Z2vF.js +1 -0
  30. package/dist/esm/WorksheetBodies-CxDz0Rxa.js +1 -0
  31. package/dist/esm/WorksheetContents-Dxo5Xc3Y.js +1 -0
  32. package/dist/esm/WorksheetEditor-CvFYzeZC.js +1 -0
  33. package/dist/esm/WorksheetNode-DgQD3PMR.js +1 -0
  34. package/dist/esm/WorksheetViewer-DR45PXUH.js +1 -0
  35. package/dist/esm/abnfDiagram-WEYOIA3C-2vvvjt5F.js +1 -0
  36. package/dist/esm/{arc-CVDK40Ip.js → arc-C-pwTbE4.js} +1 -1
  37. package/dist/esm/architectureDiagram-ZHVYKT53-Njrg16Bb.js +1 -0
  38. package/dist/esm/blockDiagram-RJAE7QA3-OuYPx21T.js +1 -0
  39. package/dist/esm/c4Diagram-XDPPPE54-C4-sgPqw.js +1 -0
  40. package/dist/esm/channel-3HQcLN5a.js +1 -0
  41. package/dist/esm/{chunk-2E7WHVMD-CDFgC3vV.js → chunk-2E7WHVMD-BeozrAac.js} +1 -1
  42. package/dist/esm/{chunk-2Q5K7J3B-kc9wbXRi.js → chunk-2Q5K7J3B-4_3njuk_.js} +1 -1
  43. package/dist/esm/{chunk-4EMNKR2T-BOCYiV20.js → chunk-4EMNKR2T-DwE6V67-.js} +1 -1
  44. package/dist/esm/{chunk-55XCU76K-B9fq0Aas.js → chunk-55XCU76K-CpG64yyk.js} +1 -1
  45. package/dist/esm/{chunk-5VM5RSS4-BiSpRiw9.js → chunk-5VM5RSS4-CkeQhgn7.js} +1 -1
  46. package/dist/esm/{chunk-JWPE2WC7-fUi3mFpq.js → chunk-JWPE2WC7-CVtFylX6.js} +1 -1
  47. package/dist/esm/{chunk-NQOKRVIF-9yhnn9l0.js → chunk-NQOKRVIF-CYlkwWmJ.js} +1 -1
  48. package/dist/esm/{chunk-VQ5W62QI-k74sEYFL.js → chunk-VQ5W62QI-Be8I4VMn.js} +1 -1
  49. package/dist/esm/{chunk-XXDRQBXY-DJJHL2aw.js → chunk-XXDRQBXY-0jU-YNFU.js} +1 -1
  50. package/dist/esm/{chunk-ZCHMQSOR-DZxET8Hs.js → chunk-ZCHMQSOR-Cwl9AHIQ.js} +1 -1
  51. package/dist/esm/classDiagram-v2-4MYWR3UA-CgLXcYDZ.js +1 -0
  52. package/dist/esm/commons-C-9EFvh4.js +1 -0
  53. package/dist/esm/constants.js +1 -1
  54. package/dist/esm/cose-bilkent-JH36ORCC-BUYPdwFO.js +1 -0
  55. package/dist/esm/cynefinDiagram-WF24UDRP-DFlv0vTF.js +1 -0
  56. package/dist/esm/dagre-NK4GIZVX-D3hfxWjC.js +1 -0
  57. package/dist/esm/diagram-CBK3MWTC-Dz3S8vtv.js +1 -0
  58. package/dist/esm/diagram-I5XIIV2D-CWQZNyHk.js +1 -0
  59. package/dist/esm/diagram-ODIL2UCW-RwcoAn2X.js +1 -0
  60. package/dist/esm/diagram-PFBEJUXE-BQ65i8Sl.js +1 -0
  61. package/dist/esm/diagram-RJA3I4VV-D3wAXEKx.js +1 -0
  62. package/dist/esm/diagram-TYUNFSNR-CQpNNmke.js +1 -0
  63. package/dist/esm/ebnfDiagram-V4P3TTPT-x6yeSo0p.js +1 -0
  64. package/dist/esm/elk-QONTBCTQ-BKyCSI5O.js +1 -0
  65. package/dist/esm/enums.js +1 -1
  66. package/dist/esm/erDiagram-KYQIGQAA-C9n_JA_w.js +1 -0
  67. package/dist/esm/{floating-ui.dom-DGDCR4EF.js → floating-ui.dom-DpXpy_9C.js} +1 -1
  68. package/dist/esm/flowDiagram-IUGLLWBU-BS8vlVHT.js +1 -0
  69. package/dist/esm/ganttDiagram-R7GPNTJY-CKebGhU7.js +1 -0
  70. package/dist/esm/gitGraphDiagram-PDYL7XHY-Bvp1UcgM.js +1 -0
  71. package/dist/esm/helpers.js +1 -1
  72. package/dist/esm/index-B--41Rgp.js +1 -0
  73. package/dist/esm/{index-mLZqgXD7.js → index-BBCZJE-R.js} +1 -1
  74. package/dist/esm/index-BlaxEeMl.js +1 -0
  75. package/dist/esm/index-BwpxQGdp.js +1 -0
  76. package/dist/esm/{index-DWLuqDsD.js → index-C2_E6s4y.js} +1 -1
  77. package/dist/esm/{index-CffiBbeH.js → index-CB1wz24Q.js} +1 -1
  78. package/dist/esm/{index-CmWQEzQl.js → index-CWCIYdOV.js} +1 -1
  79. package/dist/esm/{index-DBWowQHL.js → index-C_OMDe9Q.js} +1 -1
  80. package/dist/esm/{index-nNMK7HvL.js → index-CqbF_7wB.js} +1 -1
  81. package/dist/esm/{index-CHgqN-d9.js → index-D2XW0y_s.js} +1 -1
  82. package/dist/esm/{index-BDQ8194g.js → index-D5f1dQka.js} +1 -1
  83. package/dist/esm/{index-CJtYjUlf.js → index-DBdTqY1b.js} +1 -1
  84. package/dist/esm/{index-CHVYA2P8.js → index-Dn0pnDCC.js} +1 -1
  85. package/dist/esm/index-DpobNvg5.js +1 -0
  86. package/dist/esm/index-Zvckkvpn.js +1 -0
  87. package/dist/esm/{index-BS7YTgMe.js → index-kHWDzZEv.js} +1 -1
  88. package/dist/esm/infoDiagram-MVDRKAX5-DrROCapb.js +1 -0
  89. package/dist/esm/ishikawaDiagram-HPEHV2GE-BGSVKWhg.js +1 -0
  90. package/dist/esm/journeyDiagram-BOSHW7O7-ogVQbHp2.js +1 -0
  91. package/dist/esm/kanban-definition-FNSA4HC5-lQM4fHQE.js +1 -0
  92. package/dist/esm/{linear-CIPQsvV7.js → linear-BCwRtKK9.js} +1 -1
  93. package/dist/esm/main.js +1 -1
  94. package/dist/esm/mermaid.core-CvFWfSA0.js +5 -0
  95. package/dist/esm/mindmap-definition-6OY57UG3-D8l0C3RA.js +1 -0
  96. package/dist/esm/pegDiagram-ECIUJNBX-D8xo2dyF.js +1 -0
  97. package/dist/esm/pieDiagram-GNMPY74T-gHG-R83G.js +1 -0
  98. package/dist/esm/quadrantDiagram-D57K4MC3-DDHGqMWG.js +1 -0
  99. package/dist/esm/railroadDiagram-Y72NRBL7-BNcAWVzf.js +1 -0
  100. package/dist/esm/requirementDiagram-EQYSW5RA-D0TQZTve.js +1 -0
  101. package/dist/esm/sankeyDiagram-SY24JHO5-BgXxfdaz.js +1 -0
  102. package/dist/esm/sequenceDiagram-BLEHNHQU-BoejQXUR.js +1 -0
  103. package/dist/esm/server.js +1 -1
  104. package/dist/esm/settings-DzQM72QE.js +1 -0
  105. package/dist/esm/settings.js +1 -1
  106. package/dist/esm/sizeCapture-INFHLROL-sNhkxZSt.js +1 -0
  107. package/dist/esm/stateDiagram-v2-A6IESKWZ-sy3VIzCQ.js +1 -0
  108. package/dist/esm/swimlanes-B3ENRKFQ-BMvTnJVa.js +1 -0
  109. package/dist/esm/swimlanesDiagram-AYQRV4AK-CBA7l1Zm.js +1 -0
  110. package/dist/esm/{throttle-tEKq3i9o.js → throttle-DvoLRXRs.js} +1 -1
  111. package/dist/esm/{time-DP3lbwAd.js → time-2Ms6XNBq.js} +1 -1
  112. package/dist/esm/timeline-definition-JXYKGLGB-B9uS-p90.js +1 -0
  113. package/dist/esm/{types-C6dLWyzP.js → types-CdWZmDRI.js} +1 -1
  114. package/dist/esm/usecaseDiagram-WPOLBNNX-55ERmenj.js +1 -0
  115. package/dist/esm/vennDiagram-Q3Y3IDCW-M46hCRun.js +1 -0
  116. package/dist/esm/wardleyDiagram-IVAIDKWA-DiF93Bmd.js +1 -0
  117. package/dist/esm/websocket-KESFarc3.js +1 -0
  118. package/dist/esm/worksheet-CKlbZOJI.js +1 -0
  119. package/dist/esm/worksheet-Tio8jHyw.js +1 -0
  120. package/dist/esm/xychartDiagram-4URNHDU4-epgUCY99.js +1 -0
  121. package/dist/module-types/src/components/helpers/websocket.d.ts +0 -8
  122. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/codemirror/types.d.ts +7 -1
  123. package/dist/module-types/src/components/types/index.d.ts +5 -0
  124. package/dist/module-types/src/enums/index.d.ts +1 -1
  125. package/dist/module-types/src/stores/websocket/topicChannels.d.ts +1 -1
  126. package/package.json +2 -2
  127. package/src/styles/components/atoms/_menu.scss +25 -13
  128. package/dist/esm/ArrowForwardIcon-BIC54sbk.js +0 -1
  129. package/dist/esm/BarChart-54h6GU3p.js +0 -1
  130. package/dist/esm/ChangePasswordModal-DGIG264-.js +0 -1
  131. package/dist/esm/CodeEditor-C5-1AgZR.js +0 -1
  132. package/dist/esm/CodeViewer-CQrzGpJT.js +0 -1
  133. package/dist/esm/Collapse-Cx9QTKZD.js +0 -1
  134. package/dist/esm/DataViewer-Cv0iOPJ_.js +0 -1
  135. package/dist/esm/DrawerView-Cbw3l2O7.js +0 -1
  136. package/dist/esm/ExcalidrawButton-zJFah1nC.js +0 -1
  137. package/dist/esm/GraphvizViewer-DsTGulG0.js +0 -1
  138. package/dist/esm/ImageLoaderCropper-Bk1LxSbD.js +0 -1
  139. package/dist/esm/InputCellPhoneNumber-BaFBGcAe.js +0 -1
  140. package/dist/esm/InputColor-DhUlWGSD.js +0 -14
  141. package/dist/esm/LineChart-BQ1UY4l8.js +0 -1
  142. package/dist/esm/LoaderLayer-aKmuHFys.js +0 -1
  143. package/dist/esm/MdMath-DvH_O_A3.js +0 -1
  144. package/dist/esm/MdMathEditor-4-bjr11C.js +0 -29
  145. package/dist/esm/ReplyIcon-DFPc1kie.js +0 -1
  146. package/dist/esm/SettingsIcon-P_1rE3U0.js +0 -1
  147. package/dist/esm/SlideDeck-0cxhxG3b.js +0 -1
  148. package/dist/esm/TableEyeIcon-5qDbI7lU.js +0 -1
  149. package/dist/esm/TableOfContents-DG7lfEl8.js +0 -1
  150. package/dist/esm/Tooltip-OI-qyixa.js +0 -1
  151. package/dist/esm/UserCodeEditor-XI5CMxYI.js +0 -61
  152. package/dist/esm/VirtualizedRowsFixed-DH6WrMq1.js +0 -1
  153. package/dist/esm/WorksheetAsSlides-vK1Nqrlr.js +0 -1
  154. package/dist/esm/WorksheetBodies-AupmhX--.js +0 -1
  155. package/dist/esm/WorksheetContents-RcU2Wigz.js +0 -1
  156. package/dist/esm/WorksheetEditor-BExsBWi8.js +0 -1
  157. package/dist/esm/WorksheetNode-BTU0R61c.js +0 -1
  158. package/dist/esm/WorksheetViewer-Bn_SoOic.js +0 -1
  159. package/dist/esm/abnfDiagram-WEYOIA3C-Dpw6XMB5.js +0 -1
  160. package/dist/esm/architectureDiagram-ZHVYKT53-CwRCJS-f.js +0 -1
  161. package/dist/esm/blockDiagram-RJAE7QA3-BsveJL2h.js +0 -1
  162. package/dist/esm/c4Diagram-XDPPPE54-DT_YwSdM.js +0 -1
  163. package/dist/esm/channel-DfU2WyO4.js +0 -1
  164. package/dist/esm/classDiagram-v2-4MYWR3UA-Ccw8sMnD.js +0 -1
  165. package/dist/esm/commons-Bam9oxAR.js +0 -1
  166. package/dist/esm/cose-bilkent-JH36ORCC-iT9n9qMD.js +0 -1
  167. package/dist/esm/cynefinDiagram-WF24UDRP-COkkadSX.js +0 -1
  168. package/dist/esm/dagre-NK4GIZVX-B2jYnU0Q.js +0 -1
  169. package/dist/esm/diagram-CBK3MWTC-DzCzOobH.js +0 -1
  170. package/dist/esm/diagram-I5XIIV2D-ChGPyzwT.js +0 -1
  171. package/dist/esm/diagram-ODIL2UCW-_jTs4ZGf.js +0 -1
  172. package/dist/esm/diagram-PFBEJUXE-C66lVsSz.js +0 -1
  173. package/dist/esm/diagram-RJA3I4VV-QELSA6fF.js +0 -1
  174. package/dist/esm/diagram-TYUNFSNR-Be-cdxPq.js +0 -1
  175. package/dist/esm/ebnfDiagram-V4P3TTPT-Cr1EANnv.js +0 -1
  176. package/dist/esm/elk-QONTBCTQ-CqfCbAWo.js +0 -1
  177. package/dist/esm/erDiagram-KYQIGQAA-DMgweTFG.js +0 -1
  178. package/dist/esm/flowDiagram-IUGLLWBU-B4pY13UK.js +0 -1
  179. package/dist/esm/ganttDiagram-R7GPNTJY-YkRR1QZl.js +0 -1
  180. package/dist/esm/gitGraphDiagram-PDYL7XHY-BuhZy85T.js +0 -1
  181. package/dist/esm/index-CTKRTL8i.js +0 -1
  182. package/dist/esm/index-DU7OAICx.js +0 -1
  183. package/dist/esm/index-c3o5xJQl.js +0 -1
  184. package/dist/esm/index-w_leOmyv.js +0 -1
  185. package/dist/esm/infoDiagram-MVDRKAX5-CfqZ5lu9.js +0 -1
  186. package/dist/esm/ishikawaDiagram-HPEHV2GE-fwZw1vDt.js +0 -1
  187. package/dist/esm/journeyDiagram-BOSHW7O7-CJ0qr25S.js +0 -1
  188. package/dist/esm/kanban-definition-FNSA4HC5-D467uQkY.js +0 -1
  189. package/dist/esm/mermaid.core-QEjDbduh.js +0 -5
  190. package/dist/esm/mindmap-definition-6OY57UG3-BLQmSwVy.js +0 -1
  191. package/dist/esm/pegDiagram-ECIUJNBX-BD9B5ipu.js +0 -1
  192. package/dist/esm/pieDiagram-GNMPY74T-ALgTthPz.js +0 -1
  193. package/dist/esm/quadrantDiagram-D57K4MC3-DvM56mui.js +0 -1
  194. package/dist/esm/railroadDiagram-Y72NRBL7-Bbmv8kBV.js +0 -1
  195. package/dist/esm/requirementDiagram-EQYSW5RA-B2-FtMv8.js +0 -1
  196. package/dist/esm/sankeyDiagram-SY24JHO5-a4Tjq4bh.js +0 -1
  197. package/dist/esm/sequenceDiagram-BLEHNHQU-D51n1e3_.js +0 -1
  198. package/dist/esm/settings-Cd8fftVp.js +0 -1
  199. package/dist/esm/sizeCapture-INFHLROL-EvtR_ZF3.js +0 -1
  200. package/dist/esm/stateDiagram-v2-A6IESKWZ-Dy_vLRVL.js +0 -1
  201. package/dist/esm/swimlanes-B3ENRKFQ-0pqT2-Jw.js +0 -1
  202. package/dist/esm/swimlanesDiagram-AYQRV4AK-COayinaD.js +0 -1
  203. package/dist/esm/timeline-definition-JXYKGLGB-DFhOynr-.js +0 -1
  204. package/dist/esm/usecaseDiagram-WPOLBNNX-MTVBbHK8.js +0 -1
  205. package/dist/esm/vennDiagram-Q3Y3IDCW-CgaIfPfv.js +0 -1
  206. package/dist/esm/wardleyDiagram-IVAIDKWA-CEQzSAI4.js +0 -1
  207. package/dist/esm/websocket-BppBoZUJ.js +0 -1
  208. package/dist/esm/worksheet-CQgex79V.js +0 -1
  209. package/dist/esm/xychartDiagram-4URNHDU4-BQJJ7mH2.js +0 -1
@@ -1 +0,0 @@
1
- import{_ as t,l as r,T as e,d as s}from"./mermaid.core-QEjDbduh.js";import{p as a}from"./cynefin-EF2NZ3EQ-CaJSaYBh.js";import"./index-w_leOmyv.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-Bam9oxAR.js";import"./settings-Cd8fftVp.js";import"./constants.js";import"./LoaderLayer-aKmuHFys.js";import"./websocket-BppBoZUJ.js";import"./index-c3o5xJQl.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var o="12.2.0",i={parser:{parse:t(async t=>{const e=await a("info",t);r.debug(e)},"parse")},db:{getVersion:t(()=>o,"getVersion")},renderer:{draw:t((t,a,o)=>{r.debug("rendering info diagram\n"+t);const i=e(a);s(i,100,400,!0);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw")}};export{i as diagram};
@@ -1 +0,0 @@
1
- import{_ as t,c as i,ab as e,T as n,at as s,C as a,m as r,v as o,a as h,b as l,g as c,s as u,x as d,d as y}from"./mermaid.core-QEjDbduh.js";import"./index-w_leOmyv.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-Bam9oxAR.js";import"./settings-Cd8fftVp.js";import"./constants.js";import"./LoaderLayer-aKmuHFys.js";import"./websocket-BppBoZUJ.js";import"./index-c3o5xJQl.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var p=function(){var i=t(function(t,i,e,n){for(e=e||{},n=t.length;n--;e[t[n]]=i);return e},"o"),e=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],o=[1,20],h=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(t,i,e,n,s,a,r){var o=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[o-1].length,a[o].trim());break;case 16:n.addNode(0,a[o].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:s,14:a},i(r,[2,3]),{1:[2,2]},i(r,[2,4]),i(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:o,7:h,10:17,11:l},i(c,[2,18],{14:[1,21]}),i(c,[2,16]),i(c,[2,17]),{6:o,7:h,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},i(u,[2,14],{7:d,11:y}),i(p,[2,8]),i(p,[2,9]),i(p,[2,10]),i(c,[2,15]),i(u,[2,13],{7:d,11:y}),i(p,[2,11]),i(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:t(function(i){var e=this,n=[0],s=[],a=[null],r=[],o=this.table,h="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(i,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),t(m,"lex");for(var k,w,x,b,_,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==k&&(k=m()),x=o[w]&&o[w][k]),void 0===x||!x.length||!x[0]){var E="";for(_ in $=[],o[w])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[k]||k,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+k);switch(x[0]){case 1:n.push(k),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),k=null,c=d.yyleng,h=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[h,c,l,y.yy,x[1],a,r].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:t(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:t(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:t(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var n=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),e.length-1&&(this.yylineno-=e.length-1);var s=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:e?(e.length===n.length?this.yylloc.first_column:0)+n[n.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:t(function(t,i){var e,n,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,i,e,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((e=this._input.match(this.rules[s[a]]))&&(!i||e[0].length>i[0].length)){if(i=e,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,i,e,n){switch(e){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function m(){this.yy={}}return g.lexer=f,t(m,"Parser"),m.prototype=g,g.Parser=m,new m}();p.parser=p;var g=p,f=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,a()}getRoot(){return this.root}addNode(t,e){const n=r.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??=t;let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return h()}setAccTitle(t){l(t)}getAccDescription(){return c()}setAccDescription(t){u(t)}getDiagramTitle(){return d()}setDiagramTitle(t){o(t)}},m=250,k=82*Math.PI/180,w=Math.cos(k),x=Math.sin(k),b=t((t,i,e)=>{const n=t.node().getBBox(),s=n.width+2*i,a=n.height+2*i;y(t,a,s,e),t.attr("viewBox",`${n.x-i} ${n.y-i} ${s} ${a}`)},"applyPaddedViewBox"),_=t((t,a,r,o)=>{const h=o.db.getRoot();if(!h)return;const l=i(),{look:c,handDrawnSeed:u,themeVariables:d}=l,y=e(l.fontSize)[0]??14,p="handDrawn"===c,g=h.children??[],f=l.ishikawa?.diagramPadding??20,k=l.ishikawa?.useMaxWidth??!1,w=n(a),x=w.append("g").attr("class","ishikawa"),_=p?s.svg(w.node()):void 0,$=_?{roughSvg:_,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,I=`ishikawa-arrow-${a}`;p||x.append("defs").append("marker").attr("id",I).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let E=0,C=m;const L=p?void 0:P(x,E,C,E,C,"ishikawa-spine");if(S(x,E,C,h.text,y,$),!g.length)return p&&P(x,E,C,E,C,"ishikawa-spine",$),void b(w,f,k);E-=20;const M=g.filter((t,i)=>i%2==0),j=g.filter((t,i)=>i%2==1),T=v(M),B=v(j),N=T.total+B.total;let O=m,D=m;if(N>0){const t=500,i=75;O=Math.max(i,t*(T.total/N)),D=Math.max(i,t*(B.total/N))}const W=2*y;O=Math.max(O,T.max*W),D=Math.max(D,B.max*W),C=Math.max(O,m),L&&L.attr("y1",C).attr("y2",C),x.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const z=Math.ceil(g.length/2);for(let t=0;t<z;t++){const i=x.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[g[2*t],-1,O],[g[2*t+1],1,D]])e&&A(i,e,E,C,n,s,y,$);E=i.selectAll("text").nodes().reduce((t,i)=>Math.min(t,i.getBBox().x),1/0)}if(p)P(x,E,C,0,C,"ishikawa-spine",$);else{L.attr("x1",E);const t=`url(#${I})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}b(w,f,k)},"draw"),v=t(i=>{const e=t(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return i.reduce((t,i)=>{const n=e(i);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),S=t((t,i,e,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),o=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${i},${e})`),h=M(o,L(n,r),0,0,"ishikawa-head-label","start",s),l=h.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);h.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),$=t((i,e)=>{const n=[],s=[],a=t((t,i,r)=>{const o=-1===e?[...t].reverse():t;for(const t of o){const e=n.length,o=t.children??[];n.push({depth:r,text:L(t.text,15),parentIndex:i,childCount:o.length}),r%2==0?(s.push(e),o.length&&a(o,e,r+1)):(o.length&&a(o,e,r+1),s.push(e))}},"walk");return a(i,-1,2),{entries:n,yOrder:s}},"flattenTree"),I=t((t,i,e,n,s,a,r)=>{const o=t.append("g").attr("class","ishikawa-label-group"),h=M(o,i,e,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),E=t((t,i,e,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const o=n/r,h=s/r,l=6*-h,c=6*o,u=`M ${i} ${e} L ${i-6*o*2+l} ${e-6*h*2+c} L ${i-6*o*2-l} ${e-6*h*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),A=t((t,i,e,n,s,a,r,o)=>{const h=i.children??[],l=a*(h.length?1:.2),c=x*l*s,u=e+-w*l,d=n+c;if(P(t,e,n,u,d,"ishikawa-branch",o),o&&E(t,e,n,e-u,n-d,o),I(t,i.text,u,d,s,r,o),!h.length)return;const{entries:y,yOrder:p}=$(h,s),g=y.length,f=new Array(g);for(const[t,i]of p.entries())f[i]=n+c*((t+1)/(g+1));const m=new Map;m.set(-1,{x0:e,y0:n,x1:u,y1:d,childCount:h.length,childrenDrawn:0});const k=-w,b=x*s,_=s<0?"ishikawa-label up":"ishikawa-label down";for(const[i,e]of y.entries()){const n=f[i],s=m.get(e.parentIndex),a=t.append("g").attr("class","ishikawa-sub-group");let h=0,l=0,c=0;if(e.depth%2==0){const t=s.y1-s.y0;h=j(s.x0,s.x1,t?(n-s.y0)/t:.5),l=n,c=h-(e.childCount>0?60+5*e.childCount:30),P(a,h,n,c,n,"ishikawa-sub-branch",o),o&&E(a,h,n,1,0,o),M(a,e.text,c,n,"ishikawa-label align","end",r)}else{const t=s.childrenDrawn++;h=j(s.x0,s.x1,(s.childCount-t)/(s.childCount+1)),l=s.y0,c=h+k*((n-l)/b),P(a,h,l,c,n,"ishikawa-sub-branch",o),o&&E(a,h,l,h-c,l-n,o),M(a,e.text,c,n,_,"end",r)}e.childCount>0&&m.set(i,{x0:h,y0:l,x1:c,y1:n,childCount:e.childCount,childrenDrawn:0})}},"drawBranch"),C=t(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),L=t((t,i)=>{if(t.length<=i)return t;const e=[];for(const n of t.split(/\s+/)){const t=e.length-1;t>=0&&e[t].length+1+n.length<=i?e[t]+=" "+n:e.push(n)}return e.join("\n")},"wrapText"),M=t((t,i,e,n,s,a,r)=>{const o=C(i),h=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",e).attr("y",n-(o.length-1)*h/2);for(const[t,i]of o.entries())l.append("tspan").attr("x",e).attr("dy",0===t?0:h).text(i);return l},"drawMultilineText"),j=t((t,i,e)=>t+(i-t)*e,"lerp"),P=t((t,i,e,n,s,a,r)=>{if(r){const o=r.roughSvg.line(i,e,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>o).attr("class",a)}return t.append("line").attr("class",a).attr("x1",i).attr("y1",e).attr("x2",n).attr("y2",s)},"drawLine"),T={draw:_},B=t(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),N={parser:g,get db(){return new f},renderer:T,styles:B};export{N as diagram};
@@ -1 +0,0 @@
1
- import{g as t}from"./chunk-5VM5RSS4-BiSpRiw9.js";import{a as e,b as n,h as i,d as s}from"./chunk-55XCU76K-B9fq0Aas.js";import{g as r,s as a,a as o,b as l,x as c,v as h,_ as u,c as p,k as y,d,C as f}from"./mermaid.core-QEjDbduh.js";import{d as g}from"./arc-CVDK40Ip.js";import"./index-w_leOmyv.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-Bam9oxAR.js";import"./settings-Cd8fftVp.js";import"./constants.js";import"./LoaderLayer-aKmuHFys.js";import"./websocket-BppBoZUJ.js";import"./index-c3o5xJQl.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var m=function(){var t=u(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:u(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:u(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:u(function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),u(m,"lex");for(var x,k,b,_,w,v,$,M,T={};;){if(k=n[n.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==x&&(x=m()),b=a[k]&&a[k][x]),void 0===b||!b.length||!b[0]){var S="";for(w in M=[],a[k])this.terminals_[w]&&w>2&&M.push("'"+this.terminals_[w]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:M})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(b[0]){case 1:n.push(x),s.push(p.yytext),r.push(p.yylloc),n.push(b[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[b[1]][1],T.$=s[s.length-v],T._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},g&&(T._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(T,[o,c,l,y.yy,b[1],s,r].concat(h))))return _;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[b[1]][0]),s.push(T.$),r.push(T._$),$=a[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},c=function(){return{EOF:1,parseError:u(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:u(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:u(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:u(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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 s=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===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:u(function(t){this.unput(this.match.slice(t))},"less"),pastInput:u(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:u(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var t=this.next();return t||this.lex()},"lex"),begin:u(function(t){this.conditionStack.push(t)},"begin"),popState:u(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(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:u(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:u(function(t){this.begin(t)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function h(){this.yy={}}return l.lexer=c,u(h,"Parser"),h.prototype=l,l.Parser=h,new h}();m.parser=m;var x=m,k="",b=[],_=[],w=[],v=u(function(){b.length=0,_.length=0,k="",w.length=0,f()},"clear"),$=u(function(t){k=t,b.push(t)},"addSection"),M=u(function(){return b},"getSections"),T=u(function(){let t=E();let e=0;for(;!t&&e<100;)t=E(),e++;return _.push(...w),_},"getTasks"),S=u(function(){const t=[];_.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),j=u(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),C=u(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};_.push(e)},"addTaskOrg"),E=u(function(){const t=u(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),A=u(function(){return S()},"getActors"),I={getConfig:u(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:h,getDiagramTitle:c,setAccTitle:l,getAccTitle:o,setAccDescription:a,getAccDescription:r,addSection:$,getSections:M,getTasks:T,addTask:j,addTaskOrg:C,getActors:A},P=u(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePaths .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),F=u(function(t,e){return s(t,e)},"drawRect"),V=u(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function r(t){const i=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){const i=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),u(r,"smile"),u(a,"sad"),u(o,"ambivalent"),e.score>3?r(s):e.score<3?a(s):o(s),i},"drawFace"),B=u(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),L=u(function(t,e){return i(t,e)},"drawText"),R=u(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}u(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)},"drawLabel"),O=u(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,F(s,r),Y(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),D=-1,N=u(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");D++;a.append("line").attr("id",s+"-task"+D).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),V(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,F(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};B(a,i),l+=10}),Y(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=u(function(t,n){e(t,n)},"drawBackgroundRect"),Y=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){const l=t*h-h*(p.length-1)/2,y=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);y.append("tspan").attr("x",n+r/2).attr("dy",l).text(p[t]),y.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return u(t,"byText"),u(e,"byTspan"),u(n,"byFo"),u(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),W={drawRect:F,drawCircle:B,drawSection:O,drawText:L,drawLabel:R,drawTask:N,drawBackgroundRect:z,initGraphics:u(function(t,e){D=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},X=u(function(t){Object.keys(t).forEach(function(e){H[e]=t[e]})},"setConf"),q={},G=0;function U(t){const e=p().journey,n=e.maxLabelWidth;G=0;let i=60;Object.keys(q).forEach(s=>{const r=q[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:q[s].position};W.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=W.drawText(t,r).node().getBoundingClientRect().width;a>G&&a>e.leftMargin-a&&(G=a)}),i+=Math.max(20,20*c.length)})}u(U,"drawActorLegend");var H=p().journey,K=0,Z=u(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");J.init();const u=h.select("#"+e);W.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const t in q)delete q[t];let x=0;m.forEach(t=>{q[t]={color:H.actorColours[x%H.actorColours.length],position:x},x++}),U(u),K=H.leftMargin+G,J.insert(0,0,K,50*Object.keys(q).length),et(u,f,0,e);const k=J.getBounds();g&&u.append("text").text(g).attr("x",K).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const b=k.stopy-k.starty+2*H.diagramMarginY,_=K+k.stopx+2*H.diagramMarginX;d(u,b,_,H.useMaxWidth),u.append("line").attr("x1",K).attr("y1",4*H.height).attr("x2",_-K-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${_} ${b+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",b+w+25)},"draw"),J={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:u(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:u(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:u(function(t,e,n,i){const s=p().journey,r=this;let a=0;function o(o){return u(function(l){a++;const c=r.sequenceItems.length-a+1;r.updateVal(l,"starty",e-c*s.boxMargin,Math.min),r.updateVal(l,"stopy",i+c*s.boxMargin,Math.max),r.updateVal(J.data,"startx",t-c*s.boxMargin,Math.min),r.updateVal(J.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==o&&(r.updateVal(l,"startx",t-c*s.boxMargin,Math.min),r.updateVal(l,"stopx",n+c*s.boxMargin,Math.max),r.updateVal(J.data,"starty",e-c*s.boxMargin,Math.min),r.updateVal(J.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}u(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:u(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(J.data,"startx",s,Math.min),this.updateVal(J.data,"starty",a,Math.min),this.updateVal(J.data,"stopx",r,Math.max),this.updateVal(J.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:u(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:u(function(){return this.verticalPos},"getVerticalPos"),getBounds:u(function(){return this.data},"getBounds")},Q=H.sectionFills,tt=H.sectionColours,et=u(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[n,u]of e.entries()){if(r!==u.section){l=Q[o%Q.length],h=o%Q.length,c=tt[o%tt.length];let i=0;const a=u.section;for(let t=n;t<e.length&&e[t].section==a;t++)i+=1;const p={x:n*s.taskMargin+n*s.width+K,y:50,text:u.section,fill:l,num:h,colour:c,taskCount:i};W.drawSection(t,p,s),r=u.section,o++}const p=u.people.reduce((t,e)=>(q[e]&&(t[e]=q[e]),t),{});u.x=n*s.taskMargin+n*s.width+K,u.y=a,u.width=s.diagramMarginX,u.height=s.diagramMarginY,u.colour=c,u.fill=l,u.num=h,u.actors=p,W.drawTask(t,u,s,i),J.insert(u.x,u.y,u.x+u.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:X,draw:Z},it={parser:x,db:I,renderer:nt,styles:P,init:u(t=>{nt.setConf(t.journey),I.clear()},"init")};export{it as diagram};
@@ -1 +0,0 @@
1
- import{_ as t,l as e,c as n,T as i,an as s,ao as r,ap as o,ak as a,R as c,j as l,y as h,J as u,ah as g,ai as d,aj as p}from"./mermaid.core-QEjDbduh.js";import{g as y}from"./chunk-5VM5RSS4-BiSpRiw9.js";import"./index-w_leOmyv.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-Bam9oxAR.js";import"./settings-Cd8fftVp.js";import"./constants.js";import"./LoaderLayer-aKmuHFys.js";import"./websocket-BppBoZUJ.js";import"./index-c3o5xJQl.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var m=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],m=[1,6,13,16,17,20,23],f=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(m,[2,14],{7:f,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:f,11:b}),e(_,[2,11]),e(_,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,c="",l=0,h=0,u=o.slice.call(arguments,1),g=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);g.setInput(e,d.yy),d.yy.lexer=g,d.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;o.push(y);var m=g.options&&g.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(f,"lex");for(var b,_,k,E,S,N,x,L,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=f()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var I="";for(S in L=[],a[_])this.terminals_[S]&&S>2&&L.push("'"+this.terminals_[S]+"'");I=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:y,expected:L})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(g.yytext),o.push(g.yylloc),i.push(k[1]),b=null,h=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc;break;case 2:if(N=this.productions_[k[1]][1],D.$=r[r.length-N],D._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},m&&(D._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[c,h,l,d.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),x=a[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:t(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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 s=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===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();m.parser=m;var f=m,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),N=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let t=b.length-1;t>=0;t--)if(b[t].level!==e||n||(n=b[t]),b[t].level<e)throw new Error('Items without section detected, found section ("'+b[t].label+'")');return t===n?.level?null:n},"getSection"),x=t(function(){return _},"getSections"),L=t(function(){const t=[],e=x(),i=n();for(const n of e){const e={id:n.id,label:l(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const e of s){const s={id:e.id,parentId:n.id,label:l(e.label??"",i),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{const o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case I.ROUNDED_RECT:case I.RECT:case I.HEXAGON:a*=2}const g={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(g.shape=e?.shape),e?.label&&(g.label=e?.label),e?.icon&&(g.icon=e?.icon.toString()),e?.assigned&&(g.assigned=e?.assigned.toString()),e?.ticket&&(g.ticket=e?.ticket.toString()),e?.priority&&(g.priority=e?.priority)}const d=N(t);d?g.parentId=d.id||"kbn"+k++:_.push(g),b.push(g)},"addNode"),I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:D,getSections:x,getData:L,nodeType:I,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return I.RECT;case"(":return")"===n?I.ROUNDED_RECT:I.CLOUD;case"((":return I.CIRCLE;case")":return I.CLOUD;case"))":return I.BANG;case"{{":return I.HEXAGON;default:return I.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=l(t.icon,e)),t.class&&(i.cssClasses=l(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case I.DEFAULT:return"no-border";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded-rect";case I.CIRCLE:return"circle";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},v={draw:t(async(t,l,h,u)=>{e.debug("Rendering kanban diagram\n"+t);const g=u.db.getData(),d=n();d.htmlLabels=!1;const p=i(l);for(const t of g.nodes)t.domId=`${l}-${t.id}`;const y=p.append("g");y.attr("class","sections");const m=p.append("g");m.attr("class","items");const f=g.nodes.filter(t=>t.isGroup);let b=0;const _=[];let k=25;for(const t of f){const e=d?.kanban?.sectionWidth||200;b+=1,t.x=e*b+10*(b-1)/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+b;const n=await s(y,t);k=Math.max(k,n?.labelBBox?.height),_.push(n)}let E=0;for(const t of f){const e=_[E];E+=1;const n=d?.kanban?.sectionWidth||200,i=3*-n/2+k;let s=i;const a=g.nodes.filter(e=>e.parentId===t.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=n-15;const i=(await r(m,e,{config:d})).node().getBBox();e.y=s+i.height/2,await o(e),s=e.y+i.height/2+5}const c=e.cluster.select("rect"),l=Math.max(s-i+30,50)+(k-25);c.attr("height",l)}a(void 0,p,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],g(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):d(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:O,renderer:v,parser:f,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};