@pi-outpost/embed 0.1.0

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 (250) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/dist/abnfDiagram-VRR7QNED-BPTALLb_.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-DlAvVtuC.js +89 -0
  5. package/dist/arc-BBnpgwVQ.js +80 -0
  6. package/dist/arc-DcUn9_NX.cjs +1 -0
  7. package/dist/architecture-TIHT7OUA-D-35jO9Y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-DDyMqjR1.js +3 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-Bh5-VPPg.cjs +36 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D7UsY5ua.js +4120 -0
  11. package/dist/array-CApNbSU9.js +6 -0
  12. package/dist/array-DZSRzHA_.cjs +1 -0
  13. package/dist/bash-BLBHkRa_.js +169 -0
  14. package/dist/bash-DHJu-DNv.cjs +1 -0
  15. package/dist/blockDiagram-677ZJIJ3-BrXgigdO.cjs +132 -0
  16. package/dist/blockDiagram-677ZJIJ3-s-fanRPN.js +3160 -0
  17. package/dist/c-4QgYfi8K.cjs +1 -0
  18. package/dist/c-Cw4FsAeJ.js +176 -0
  19. package/dist/c4Diagram-LMCZKHZV-BbZFAi_K.js +2962 -0
  20. package/dist/c4Diagram-LMCZKHZV-DFBVQ9Uo.cjs +10 -0
  21. package/dist/channel-DV0ST12Z.js +5 -0
  22. package/dist/channel-DkMGzfUR.cjs +1 -0
  23. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
  24. package/dist/chunk-2Q5K7J3B-DqJF2oYF.js +15 -0
  25. package/dist/chunk-32BRIVSS-Byu3FrKX.js +61 -0
  26. package/dist/chunk-32BRIVSS-oWSJWk-u.cjs +1 -0
  27. package/dist/chunk-52WLFC77-C9zQbcGs.js +590 -0
  28. package/dist/chunk-52WLFC77-D9PTsiCj.cjs +10 -0
  29. package/dist/chunk-5VM5RSS4-BMfgdMFU.js +5 -0
  30. package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +15 -0
  31. package/dist/chunk-7BUUIJ7U-BFUeQBoS.js +82 -0
  32. package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +1 -0
  33. package/dist/chunk-C7G6YPKG-CDjkH_UW.cjs +1 -0
  34. package/dist/chunk-C7G6YPKG-GTlyrFFt.js +67 -0
  35. package/dist/chunk-EX3LRPZG-BBldDxGh.js +2046 -0
  36. package/dist/chunk-EX3LRPZG-u-BKCEWO.cjs +231 -0
  37. package/dist/chunk-FWX5IMBZ-h3GfgkP2.js +57 -0
  38. package/dist/chunk-FWX5IMBZ-nqBth1J9.cjs +1 -0
  39. package/dist/chunk-HOUHSVGY-CgfXy94u.cjs +1 -0
  40. package/dist/chunk-HOUHSVGY-CtRCnz1G.js +277 -0
  41. package/dist/chunk-ICXQ74PX-BmEfYj-r.cjs +2 -0
  42. package/dist/chunk-ICXQ74PX-CC59NQmW.js +1366 -0
  43. package/dist/chunk-JWPE2WC7-B_J6qwQL.js +8 -0
  44. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
  45. package/dist/chunk-KEIR6QF5-BVnxrdHo.js +21388 -0
  46. package/dist/chunk-KEIR6QF5-Cy_QBNG6.cjs +161 -0
  47. package/dist/chunk-MOJQB5TN-D6YxvkUY.js +490 -0
  48. package/dist/chunk-MOJQB5TN-H2vwz-oQ.cjs +88 -0
  49. package/dist/chunk-OGEWGWER-BGdqgMza.js +32 -0
  50. package/dist/chunk-OGEWGWER-BP4o8A-v.cjs +1 -0
  51. package/dist/chunk-PUDLZKDR-C8jMDFq6.js +4142 -0
  52. package/dist/chunk-PUDLZKDR-DtzwSdxX.cjs +156 -0
  53. package/dist/chunk-Q4XR5HBZ-Bk18cMuk.js +1628 -0
  54. package/dist/chunk-Q4XR5HBZ-COrrWZzi.cjs +70 -0
  55. package/dist/chunk-RYQCIY6F-27FDzaaE.cjs +1 -0
  56. package/dist/chunk-RYQCIY6F-C-YC3QS_.js +239 -0
  57. package/dist/chunk-V7JOEXUC-BROsdKzY.js +3357 -0
  58. package/dist/chunk-V7JOEXUC-Cfrm5GQn.cjs +206 -0
  59. package/dist/chunk-VAUOI2AC-05FwamOA.js +10 -0
  60. package/dist/chunk-VAUOI2AC-CBXi4Di2.cjs +1 -0
  61. package/dist/chunk-VR4S4FIN-CSU_1xTZ.cjs +1 -0
  62. package/dist/chunk-VR4S4FIN-Ci491c8N.js +26 -0
  63. package/dist/chunk-WYO6CB5R-BTvDzbWd.cjs +127 -0
  64. package/dist/chunk-WYO6CB5R-Y9HJHB3Q.js +3739 -0
  65. package/dist/chunk-XXDRQBXY-DsVp5qjg.js +9 -0
  66. package/dist/chunk-XXDRQBXY-gWcN0uCZ.cjs +1 -0
  67. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
  68. package/dist/chunk-Y2CYZVJY-CwsV_8W4.js +12 -0
  69. package/dist/chunk-ZGVPDNZ5-CDTkXY1G.js +3736 -0
  70. package/dist/chunk-ZGVPDNZ5-COEQX4AZ.cjs +62 -0
  71. package/dist/chunk-ZIRB5QZD-BU6XQUGC.cjs +32 -0
  72. package/dist/chunk-ZIRB5QZD-Cj-y77rH.js +1146 -0
  73. package/dist/classDiagram-OUVF2IWQ-Avsu6OKn.cjs +1 -0
  74. package/dist/classDiagram-OUVF2IWQ-eC72Wwol.js +30 -0
  75. package/dist/classDiagram-v2-EOCWNBFH-Avsu6OKn.cjs +1 -0
  76. package/dist/classDiagram-v2-EOCWNBFH-DsRoQgCt.js +30 -0
  77. package/dist/core-2nR1zkKb.cjs +3 -0
  78. package/dist/core-BO2hTFeF.js +845 -0
  79. package/dist/cose-bilkent-JH36ORCC-AyWV1dUo.cjs +1 -0
  80. package/dist/cose-bilkent-JH36ORCC-BFo5zomD.js +2251 -0
  81. package/dist/cpp-BUtp-HE2.cjs +1 -0
  82. package/dist/cpp-CeyO6lBG.js +225 -0
  83. package/dist/csharp-BJu4kEpt.cjs +1 -0
  84. package/dist/csharp-Ck6Fet_o.js +260 -0
  85. package/dist/css-ClSGJRju.js +140 -0
  86. package/dist/css-DeFr0lev.cjs +1 -0
  87. package/dist/cynefin-VYW2F7L2-DHhUPDgc.cjs +1 -0
  88. package/dist/cynefin-VYW2F7L2-DwiVqvhg.js +3 -0
  89. package/dist/cynefinDiagram-TSTJHNR4-BRUl09PN.js +349 -0
  90. package/dist/cynefinDiagram-TSTJHNR4-rKPqxFde.cjs +62 -0
  91. package/dist/cytoscape.esm-ByjvpCPI.cjs +321 -0
  92. package/dist/cytoscape.esm-asYnbYTy.js +18148 -0
  93. package/dist/dagre-BBlCxSvR.cjs +1 -0
  94. package/dist/dagre-BpqwxFKp.js +1701 -0
  95. package/dist/dagre-VKFMJZFB-BsfMZfPu.cjs +4 -0
  96. package/dist/dagre-VKFMJZFB-ChTkS14y.js +328 -0
  97. package/dist/defaultLocale-u9yUoUmE.cjs +1 -0
  98. package/dist/defaultLocale-up9-vqhM.js +201 -0
  99. package/dist/diagram-FQU43EPY-BnAYoLDy.js +432 -0
  100. package/dist/diagram-FQU43EPY-CdbwLZpm.cjs +3 -0
  101. package/dist/diagram-G47NLZAW-C1ZiELQG.js +525 -0
  102. package/dist/diagram-G47NLZAW-CtWKuxkf.cjs +24 -0
  103. package/dist/diagram-NH7WQ7WH-Be0KXo6w.js +134 -0
  104. package/dist/diagram-NH7WQ7WH-CG6VWVza.cjs +24 -0
  105. package/dist/diagram-OA4YK3LP-B7avlqjG.js +300 -0
  106. package/dist/diagram-OA4YK3LP-Drq_GA6o.cjs +30 -0
  107. package/dist/diagram-WEI45ONY-CoPX6-sx.js +214 -0
  108. package/dist/diagram-WEI45ONY-SJmgVL59.cjs +41 -0
  109. package/dist/dist-D6LMt8nW.js +59 -0
  110. package/dist/dist-DNGlMOWd.cjs +1 -0
  111. package/dist/dockerfile-O4rAswfG.js +34 -0
  112. package/dist/dockerfile-YBgAWga3.cjs +1 -0
  113. package/dist/ebnfDiagram-CCIWWBDH-B-T4_JnX.js +100 -0
  114. package/dist/ebnfDiagram-CCIWWBDH-BY7L3HVQ.cjs +1 -0
  115. package/dist/erDiagram-Q63AITRT-DPgZpeaH.js +1727 -0
  116. package/dist/erDiagram-Q63AITRT-w4C1PxYd.cjs +85 -0
  117. package/dist/eventmodeling-45OFAUF4-COTtdYDJ.js +3 -0
  118. package/dist/eventmodeling-45OFAUF4-CPEyr9kU.cjs +1 -0
  119. package/dist/flowDiagram-23GEKE2U-CQxPdUX4.cjs +1 -0
  120. package/dist/flowDiagram-23GEKE2U-ClCSBl2p.js +17 -0
  121. package/dist/ganttDiagram-NO4QXBWP-BcBp028S.cjs +292 -0
  122. package/dist/ganttDiagram-NO4QXBWP-Cf12fLfa.js +3083 -0
  123. package/dist/gitGraph-TEB2WS4Q-C3qBT0GM.js +3 -0
  124. package/dist/gitGraph-TEB2WS4Q-a8KsoPmR.cjs +1 -0
  125. package/dist/gitGraphDiagram-IHSO6WYX-13ahKewT.js +729 -0
  126. package/dist/gitGraphDiagram-IHSO6WYX-BTtNkGkN.cjs +106 -0
  127. package/dist/go-D-pz-dmd.cjs +1 -0
  128. package/dist/go-rg7jg1mu.js +140 -0
  129. package/dist/graphlib-B0GbLif1.js +1267 -0
  130. package/dist/graphlib-CkkG5MuS.cjs +1 -0
  131. package/dist/info-DKCQHKI2-BEYhR6ip.cjs +1 -0
  132. package/dist/info-DKCQHKI2-BPF6-pOb.js +3 -0
  133. package/dist/infoDiagram-FWYZ7A6U-20rh0VNL.cjs +2 -0
  134. package/dist/infoDiagram-FWYZ7A6U-DcV-eSsb.js +20 -0
  135. package/dist/ini-C1q3_1-Q.js +88 -0
  136. package/dist/ini-nVcUEghj.cjs +1 -0
  137. package/dist/init-07zIhv_j.cjs +1 -0
  138. package/dist/init-CirqLVcp.js +15 -0
  139. package/dist/ishikawaDiagram-FXEZZL3T-BTaBCHIG.js +719 -0
  140. package/dist/ishikawaDiagram-FXEZZL3T-BUq5kcFI.cjs +70 -0
  141. package/dist/java-CUN_usaq.cjs +1 -0
  142. package/dist/java-HguKEfA2.js +169 -0
  143. package/dist/javascript-C8NCH8DE.js +436 -0
  144. package/dist/javascript-UZXSyUuu.cjs +1 -0
  145. package/dist/journeyDiagram-5HDEW3XC-Cl9Z4b58.js +884 -0
  146. package/dist/journeyDiagram-5HDEW3XC-XQa-rhY_.cjs +139 -0
  147. package/dist/json-Cp01TR_B.js +36 -0
  148. package/dist/json-usH_MUzR.cjs +1 -0
  149. package/dist/kanban-definition-HUTT4EX6-CtWnZ0nS.js +975 -0
  150. package/dist/kanban-definition-HUTT4EX6-DVHXUPOt.cjs +89 -0
  151. package/dist/line-Ca8dE_lT.cjs +1 -0
  152. package/dist/line-O2xx2vVQ.js +34 -0
  153. package/dist/linear-CVhyaVzf.js +289 -0
  154. package/dist/linear-Cl2-QuPP.cjs +1 -0
  155. package/dist/map-CwPlMWPw.cjs +1 -0
  156. package/dist/map-DU12fF3s.js +241 -0
  157. package/dist/markdown-CzgRofaE.js +181 -0
  158. package/dist/markdown-qeo95R0i.cjs +1 -0
  159. package/dist/mermaid-parser.core-B8DQcCaz.js +638 -0
  160. package/dist/mermaid-parser.core-Cgsz0CdK.cjs +6 -0
  161. package/dist/mermaid.core-BR-iKb2Q.js +1064 -0
  162. package/dist/mermaid.core-DQrbAA--.cjs +10 -0
  163. package/dist/mindmap-definition-LN4V7U3C-C0I9iWmq.cjs +96 -0
  164. package/dist/mindmap-definition-LN4V7U3C-lkSmRsIC.js +1008 -0
  165. package/dist/mount.d.ts +31 -0
  166. package/dist/ordinal-CCTD6_le.js +65 -0
  167. package/dist/ordinal-CUPR-p0T.cjs +1 -0
  168. package/dist/packet-7NZHBO7P-DqvBYJTR.js +3 -0
  169. package/dist/packet-7NZHBO7P-Dz0O2bgq.cjs +1 -0
  170. package/dist/path-Kklx0M1v.cjs +1 -0
  171. package/dist/path-mKa7UESy.js +85 -0
  172. package/dist/pegDiagram-2B236MQR-BgRCQTZd.js +94 -0
  173. package/dist/pegDiagram-2B236MQR-hlmRl_PA.cjs +1 -0
  174. package/dist/php-C9FOMGEA.js +294 -0
  175. package/dist/php-j6EhDZDE.cjs +2 -0
  176. package/dist/pi-outpost-embed.cjs +305 -0
  177. package/dist/pi-outpost-embed.js +40942 -0
  178. package/dist/pie-RZYD4A2V-Hi9UdoE3.cjs +1 -0
  179. package/dist/pie-RZYD4A2V-qnruo9sH.js +3 -0
  180. package/dist/pieDiagram-ENE6RG2P-BVi7ck2I.js +205 -0
  181. package/dist/pieDiagram-ENE6RG2P-Buuvrs-h.cjs +39 -0
  182. package/dist/plaintext-BYYAHR3Z.js +10 -0
  183. package/dist/plaintext-DmnjizxG.cjs +1 -0
  184. package/dist/python-BYJzTRkK.cjs +1 -0
  185. package/dist/python-DKAazMIE.js +238 -0
  186. package/dist/quadrantDiagram-ABIIQ3AL-DeU97c2B.js +2001 -0
  187. package/dist/quadrantDiagram-ABIIQ3AL-LCbC0LEt.cjs +7 -0
  188. package/dist/radar-I7S5WNFK-Dqdssa34.cjs +1 -0
  189. package/dist/radar-I7S5WNFK-np_pJCO-.js +3 -0
  190. package/dist/railroad-3IZDKUUU-NILjDQft.cjs +1 -0
  191. package/dist/railroad-3IZDKUUU-sjKBeXxB.js +3 -0
  192. package/dist/railroad-abnf-AHOZXSZD-BojH9sxV.cjs +1 -0
  193. package/dist/railroad-abnf-AHOZXSZD-x5cC_e_R.js +3 -0
  194. package/dist/railroad-ebnf-EBAXGLYW-2mlWpz38.js +3 -0
  195. package/dist/railroad-ebnf-EBAXGLYW-BKCSut1M.cjs +1 -0
  196. package/dist/railroad-peg-LSFZ7HO6-CsH-gnsp.cjs +1 -0
  197. package/dist/railroad-peg-LSFZ7HO6-D5vguo03.js +3 -0
  198. package/dist/railroadDiagram-RFXS5EU6-CMTDNjsw.cjs +1 -0
  199. package/dist/railroadDiagram-RFXS5EU6-DNSNpLmQ.js +76 -0
  200. package/dist/requirementDiagram-TGXJPOKE-CdspXMgv.js +2223 -0
  201. package/dist/requirementDiagram-TGXJPOKE-irImpO8w.cjs +84 -0
  202. package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
  203. package/dist/rolldown-runtime-mLOUI7ql.cjs +1 -0
  204. package/dist/rough.esm-C5XyeDCN.js +1352 -0
  205. package/dist/rough.esm-r0QOSzHM.cjs +1 -0
  206. package/dist/ruby-BAUeZQKZ.js +262 -0
  207. package/dist/ruby-ClR4zp-1.cjs +1 -0
  208. package/dist/rust-DiTjMjP5.js +169 -0
  209. package/dist/rust-ghVvEWhm.cjs +1 -0
  210. package/dist/sankeyDiagram-HTMAVEWB-B0ZJBVpN.cjs +40 -0
  211. package/dist/sankeyDiagram-HTMAVEWB-BQcvUCMA.js +970 -0
  212. package/dist/scss-CKxh5HRg.cjs +1 -0
  213. package/dist/scss-CckAvQOx.js +150 -0
  214. package/dist/sequenceDiagram-DBY2YBRQ-BQFP2DGs.js +4168 -0
  215. package/dist/sequenceDiagram-DBY2YBRQ-C5WukkcA.cjs +162 -0
  216. package/dist/sizeCapture-X5ZJPWSS-DKbHZNyz.js +46 -0
  217. package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +1 -0
  218. package/dist/sql-B-Rnc2C3.js +118 -0
  219. package/dist/sql-B7syKcd8.cjs +1 -0
  220. package/dist/src-CR--T_NF.cjs +1 -0
  221. package/dist/src-DJ4x3y2O.js +2142 -0
  222. package/dist/stateDiagram-2N3HPSRC-4aBQt5dk.js +220 -0
  223. package/dist/stateDiagram-2N3HPSRC-YbRd67eD.cjs +1 -0
  224. package/dist/stateDiagram-v2-6OUMAXLB-D-c6D5za.js +30 -0
  225. package/dist/stateDiagram-v2-6OUMAXLB-ciXN_270.cjs +1 -0
  226. package/dist/swimlanes-5IMT3BWC-C8zkS7yx.cjs +1 -0
  227. package/dist/swimlanes-5IMT3BWC-aKH3Xgob.js +5066 -0
  228. package/dist/swimlanesDiagram-G3AALYLV-BcgsG1in.js +31 -0
  229. package/dist/swimlanesDiagram-G3AALYLV-CBjVJdH0.cjs +8 -0
  230. package/dist/timeline-definition-FHXFAJF6-DS-X0FCl.cjs +120 -0
  231. package/dist/timeline-definition-FHXFAJF6-Lnag6wiw.js +1069 -0
  232. package/dist/treeView-QDETBFTQ-Cpg_YeQ4.cjs +1 -0
  233. package/dist/treeView-QDETBFTQ-DdpEhzZX.js +3 -0
  234. package/dist/treemap-6X3UGDF4-BeCuRpkA.js +3 -0
  235. package/dist/treemap-6X3UGDF4-CFAmnKaf.cjs +1 -0
  236. package/dist/typescript-clWeqIBY.cjs +1 -0
  237. package/dist/typescript-mdYq8uqf.js +521 -0
  238. package/dist/vennDiagram-L72KCM5P-CF7lC7jn.js +1880 -0
  239. package/dist/vennDiagram-L72KCM5P-DYZP8jT_.cjs +34 -0
  240. package/dist/wardley-OPB4EBWU-B0jnKd8x.cjs +1 -0
  241. package/dist/wardley-OPB4EBWU-DlIk2K0J.js +3 -0
  242. package/dist/wardleyDiagram-EHGQE667-CbtWlMOa.js +645 -0
  243. package/dist/wardleyDiagram-EHGQE667-Dxewrpeh.cjs +78 -0
  244. package/dist/xml-BamqaQOf.cjs +1 -0
  245. package/dist/xml-DVYfB8uY.js +166 -0
  246. package/dist/xychartDiagram-FW5EYKEG-BAnVfMdN.cjs +7 -0
  247. package/dist/xychartDiagram-FW5EYKEG-DmdGPSi6.js +2102 -0
  248. package/dist/yaml-_1BORZTQ.js +144 -0
  249. package/dist/yaml-bAgWofBg.cjs +1 -0
  250. package/package.json +72 -0
@@ -0,0 +1,719 @@
1
+ import { n as e } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
2
+ import "./src-DJ4x3y2O.js";
3
+ import { H as t, K as n, U as r, a as i, c as a, s as o, v as s, w as c, x as l, y as u } from "./chunk-WYO6CB5R-Y9HJHB3Q.js";
4
+ import { p as d } from "./chunk-ICXQ74PX-CC59NQmW.js";
5
+ import { t as f } from "./chunk-VAUOI2AC-05FwamOA.js";
6
+ import { t as p } from "./rough.esm-C5XyeDCN.js";
7
+ //#region ../node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-FXEZZL3T.mjs
8
+ var m = (function() {
9
+ var t = /* @__PURE__ */ e(function(e, t, n, r) {
10
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
11
+ return n;
12
+ }, "o"), n = [1, 4], r = [1, 14], i = [1, 12], a = [1, 13], o = [
13
+ 6,
14
+ 7,
15
+ 8
16
+ ], s = [1, 20], c = [1, 18], l = [1, 19], u = [
17
+ 6,
18
+ 7,
19
+ 11
20
+ ], d = [
21
+ 1,
22
+ 6,
23
+ 13,
24
+ 14
25
+ ], f = [1, 23], p = [1, 24], m = [
26
+ 1,
27
+ 6,
28
+ 7,
29
+ 11,
30
+ 13,
31
+ 14
32
+ ], h = {
33
+ trace: /* @__PURE__ */ e(function() {}, "trace"),
34
+ yy: {},
35
+ symbols_: {
36
+ error: 2,
37
+ start: 3,
38
+ ishikawa: 4,
39
+ spaceLines: 5,
40
+ SPACELINE: 6,
41
+ NL: 7,
42
+ ISHIKAWA: 8,
43
+ document: 9,
44
+ stop: 10,
45
+ EOF: 11,
46
+ statement: 12,
47
+ SPACELIST: 13,
48
+ TEXT: 14,
49
+ $accept: 0,
50
+ $end: 1
51
+ },
52
+ terminals_: {
53
+ 2: "error",
54
+ 6: "SPACELINE",
55
+ 7: "NL",
56
+ 8: "ISHIKAWA",
57
+ 11: "EOF",
58
+ 13: "SPACELIST",
59
+ 14: "TEXT"
60
+ },
61
+ productions_: [
62
+ 0,
63
+ [3, 1],
64
+ [3, 2],
65
+ [5, 1],
66
+ [5, 2],
67
+ [5, 2],
68
+ [4, 2],
69
+ [4, 3],
70
+ [10, 1],
71
+ [10, 1],
72
+ [10, 1],
73
+ [10, 2],
74
+ [10, 2],
75
+ [9, 3],
76
+ [9, 2],
77
+ [12, 2],
78
+ [12, 1],
79
+ [12, 1],
80
+ [12, 1]
81
+ ],
82
+ performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
83
+ var s = a.length - 1;
84
+ switch (i) {
85
+ case 6:
86
+ case 7: return r;
87
+ case 15:
88
+ r.addNode(a[s - 1].length, a[s].trim());
89
+ break;
90
+ case 16:
91
+ r.addNode(0, a[s].trim());
92
+ break;
93
+ }
94
+ }, "anonymous"),
95
+ table: [
96
+ {
97
+ 3: 1,
98
+ 4: 2,
99
+ 5: 3,
100
+ 6: [1, 5],
101
+ 8: n
102
+ },
103
+ { 1: [3] },
104
+ { 1: [2, 1] },
105
+ {
106
+ 4: 6,
107
+ 6: [1, 7],
108
+ 7: [1, 8],
109
+ 8: n
110
+ },
111
+ {
112
+ 6: r,
113
+ 7: [1, 10],
114
+ 9: 9,
115
+ 12: 11,
116
+ 13: i,
117
+ 14: a
118
+ },
119
+ t(o, [2, 3]),
120
+ { 1: [2, 2] },
121
+ t(o, [2, 4]),
122
+ t(o, [2, 5]),
123
+ {
124
+ 1: [2, 6],
125
+ 6: r,
126
+ 12: 15,
127
+ 13: i,
128
+ 14: a
129
+ },
130
+ {
131
+ 6: r,
132
+ 9: 16,
133
+ 12: 11,
134
+ 13: i,
135
+ 14: a
136
+ },
137
+ {
138
+ 6: s,
139
+ 7: c,
140
+ 10: 17,
141
+ 11: l
142
+ },
143
+ t(u, [2, 18], { 14: [1, 21] }),
144
+ t(u, [2, 16]),
145
+ t(u, [2, 17]),
146
+ {
147
+ 6: s,
148
+ 7: c,
149
+ 10: 22,
150
+ 11: l
151
+ },
152
+ {
153
+ 1: [2, 7],
154
+ 6: r,
155
+ 12: 15,
156
+ 13: i,
157
+ 14: a
158
+ },
159
+ t(d, [2, 14], {
160
+ 7: f,
161
+ 11: p
162
+ }),
163
+ t(m, [2, 8]),
164
+ t(m, [2, 9]),
165
+ t(m, [2, 10]),
166
+ t(u, [2, 15]),
167
+ t(d, [2, 13], {
168
+ 7: f,
169
+ 11: p
170
+ }),
171
+ t(m, [2, 11]),
172
+ t(m, [2, 12])
173
+ ],
174
+ defaultActions: {
175
+ 2: [2, 1],
176
+ 6: [2, 2]
177
+ },
178
+ parseError: /* @__PURE__ */ e(function(e, t) {
179
+ if (t.recoverable) this.trace(e);
180
+ else {
181
+ var n = Error(e);
182
+ throw n.hash = t, n;
183
+ }
184
+ }, "parseError"),
185
+ parse: /* @__PURE__ */ e(function(t) {
186
+ 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: {} };
187
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
188
+ h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
189
+ var v = h.yylloc;
190
+ o.push(v);
191
+ var y = h.options && h.options.ranges;
192
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
193
+ function b(e) {
194
+ r.length -= 2 * e, a.length -= e, o.length -= e;
195
+ }
196
+ e(b, "popStack");
197
+ function x() {
198
+ var e = i.pop() || h.lex() || p;
199
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
200
+ }
201
+ e(x, "lex");
202
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
203
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
204
+ var M = "";
205
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
206
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + 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, {
207
+ text: h.match,
208
+ token: this.terminals_[S] || S,
209
+ line: h.yylineno,
210
+ loc: v,
211
+ expected: j
212
+ });
213
+ }
214
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
215
+ switch (T[0]) {
216
+ case 1:
217
+ 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--);
218
+ break;
219
+ case 2:
220
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
221
+ first_line: o[o.length - (k || 1)].first_line,
222
+ last_line: o[o.length - 1].last_line,
223
+ first_column: o[o.length - (k || 1)].first_column,
224
+ last_column: o[o.length - 1].last_column
225
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
226
+ c,
227
+ u,
228
+ l,
229
+ g.yy,
230
+ T[1],
231
+ a,
232
+ o
233
+ ].concat(m)), E !== void 0) return E;
234
+ 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);
235
+ break;
236
+ case 3: return !0;
237
+ }
238
+ }
239
+ return !0;
240
+ }, "parse")
241
+ };
242
+ h.lexer = /* @__PURE__ */ (function() {
243
+ return {
244
+ EOF: 1,
245
+ parseError: /* @__PURE__ */ e(function(e, t) {
246
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
247
+ else throw Error(e);
248
+ }, "parseError"),
249
+ setInput: /* @__PURE__ */ e(function(e, t) {
250
+ 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 = {
251
+ first_line: 1,
252
+ first_column: 0,
253
+ last_line: 1,
254
+ last_column: 0
255
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
256
+ }, "setInput"),
257
+ input: /* @__PURE__ */ e(function() {
258
+ var e = this._input[0];
259
+ 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;
260
+ }, "input"),
261
+ unput: /* @__PURE__ */ e(function(e) {
262
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
263
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
264
+ var r = this.match.split(/(?:\r\n?|\n)/g);
265
+ 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);
266
+ var i = this.yylloc.range;
267
+ return this.yylloc = {
268
+ first_line: this.yylloc.first_line,
269
+ last_line: this.yylineno + 1,
270
+ first_column: this.yylloc.first_column,
271
+ 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
272
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
273
+ }, "unput"),
274
+ more: /* @__PURE__ */ e(function() {
275
+ return this._more = !0, this;
276
+ }, "more"),
277
+ reject: /* @__PURE__ */ e(function() {
278
+ if (this.options.backtrack_lexer) this._backtrack = !0;
279
+ 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).\n" + this.showPosition(), {
280
+ text: "",
281
+ token: null,
282
+ line: this.yylineno
283
+ });
284
+ return this;
285
+ }, "reject"),
286
+ less: /* @__PURE__ */ e(function(e) {
287
+ this.unput(this.match.slice(e));
288
+ }, "less"),
289
+ pastInput: /* @__PURE__ */ e(function() {
290
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
291
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
292
+ }, "pastInput"),
293
+ upcomingInput: /* @__PURE__ */ e(function() {
294
+ var e = this.match;
295
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
296
+ }, "upcomingInput"),
297
+ showPosition: /* @__PURE__ */ e(function() {
298
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
299
+ return e + this.upcomingInput() + "\n" + t + "^";
300
+ }, "showPosition"),
301
+ test_match: /* @__PURE__ */ e(function(e, t) {
302
+ var n, r, i;
303
+ if (this.options.backtrack_lexer && (i = {
304
+ yylineno: this.yylineno,
305
+ yylloc: {
306
+ first_line: this.yylloc.first_line,
307
+ last_line: this.last_line,
308
+ first_column: this.yylloc.first_column,
309
+ last_column: this.yylloc.last_column
310
+ },
311
+ yytext: this.yytext,
312
+ match: this.match,
313
+ matches: this.matches,
314
+ matched: this.matched,
315
+ yyleng: this.yyleng,
316
+ offset: this.offset,
317
+ _more: this._more,
318
+ _input: this._input,
319
+ yy: this.yy,
320
+ conditionStack: this.conditionStack.slice(0),
321
+ done: this.done
322
+ }, 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 = {
323
+ first_line: this.yylloc.last_line,
324
+ last_line: this.yylineno + 1,
325
+ first_column: this.yylloc.last_column,
326
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
327
+ }, 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;
328
+ if (this._backtrack) {
329
+ for (var a in i) this[a] = i[a];
330
+ return !1;
331
+ }
332
+ return !1;
333
+ }, "test_match"),
334
+ next: /* @__PURE__ */ e(function() {
335
+ if (this.done) return this.EOF;
336
+ this._input || (this.done = !0);
337
+ var e, t, n, r;
338
+ this._more || (this.yytext = "", this.match = "");
339
+ 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)) {
340
+ if (t = n, r = a, this.options.backtrack_lexer) {
341
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
342
+ if (this._backtrack) {
343
+ t = !1;
344
+ continue;
345
+ } else return !1;
346
+ } else if (!this.options.flex) break;
347
+ }
348
+ 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.\n" + this.showPosition(), {
349
+ text: "",
350
+ token: null,
351
+ line: this.yylineno
352
+ });
353
+ }, "next"),
354
+ lex: /* @__PURE__ */ e(function() {
355
+ return this.next() || this.lex();
356
+ }, "lex"),
357
+ begin: /* @__PURE__ */ e(function(e) {
358
+ this.conditionStack.push(e);
359
+ }, "begin"),
360
+ popState: /* @__PURE__ */ e(function() {
361
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
362
+ }, "popState"),
363
+ _currentRules: /* @__PURE__ */ e(function() {
364
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
365
+ }, "_currentRules"),
366
+ topState: /* @__PURE__ */ e(function(e) {
367
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
368
+ }, "topState"),
369
+ pushState: /* @__PURE__ */ e(function(e) {
370
+ this.begin(e);
371
+ }, "pushState"),
372
+ stateStackSize: /* @__PURE__ */ e(function() {
373
+ return this.conditionStack.length;
374
+ }, "stateStackSize"),
375
+ options: { "case-insensitive": !0 },
376
+ performAction: /* @__PURE__ */ e(function(e, t, n, r) {
377
+ switch (n) {
378
+ case 0: return 6;
379
+ case 1: return 8;
380
+ case 2: return 8;
381
+ case 3: return 6;
382
+ case 4: return 7;
383
+ case 5: return 13;
384
+ case 6: return 14;
385
+ case 7: return 11;
386
+ }
387
+ }, "anonymous"),
388
+ rules: [
389
+ /^(?:\s*%%.*)/i,
390
+ /^(?:ishikawa-beta\b)/i,
391
+ /^(?:ishikawa\b)/i,
392
+ /^(?:[\s]+[\n])/i,
393
+ /^(?:[\n]+)/i,
394
+ /^(?:[\s]+)/i,
395
+ /^(?:[^\n]+)/i,
396
+ /^(?:$)/i
397
+ ],
398
+ conditions: { INITIAL: {
399
+ rules: [
400
+ 0,
401
+ 1,
402
+ 2,
403
+ 3,
404
+ 4,
405
+ 5,
406
+ 6,
407
+ 7
408
+ ],
409
+ inclusive: !0
410
+ } }
411
+ };
412
+ })();
413
+ function g() {
414
+ this.yy = {};
415
+ }
416
+ return e(g, "Parser"), g.prototype = h, h.Parser = g, new g();
417
+ })();
418
+ m.parser = m;
419
+ var h = m, g = class {
420
+ constructor() {
421
+ this.stack = [], this.clear = this.clear.bind(this), this.addNode = this.addNode.bind(this), this.getRoot = this.getRoot.bind(this);
422
+ }
423
+ static {
424
+ e(this, "IshikawaDB");
425
+ }
426
+ clear() {
427
+ this.root = void 0, this.stack = [], this.baseLevel = void 0, i();
428
+ }
429
+ getRoot() {
430
+ return this.root;
431
+ }
432
+ addNode(e, t) {
433
+ let r = o.sanitizeText(t, l());
434
+ if (!this.root) {
435
+ this.root = {
436
+ text: r,
437
+ children: []
438
+ }, this.stack = [{
439
+ level: 0,
440
+ node: this.root
441
+ }], n(r);
442
+ return;
443
+ }
444
+ this.baseLevel ??= e;
445
+ let i = e - this.baseLevel + 1;
446
+ for (i <= 0 && (i = 1); this.stack.length > 1 && this.stack[this.stack.length - 1].level >= i;) this.stack.pop();
447
+ let a = this.stack[this.stack.length - 1].node, s = {
448
+ text: r,
449
+ children: []
450
+ };
451
+ a.children.push(s), this.stack.push({
452
+ level: i,
453
+ node: s
454
+ });
455
+ }
456
+ getAccTitle() {
457
+ return u();
458
+ }
459
+ setAccTitle(e) {
460
+ r(e);
461
+ }
462
+ getAccDescription() {
463
+ return s();
464
+ }
465
+ setAccDescription(e) {
466
+ t(e);
467
+ }
468
+ getDiagramTitle() {
469
+ return c();
470
+ }
471
+ setDiagramTitle(e) {
472
+ n(e);
473
+ }
474
+ }, _ = 14, v = 250, y = 30, b = 60, x = 5, S = 82 * Math.PI / 180, C = Math.cos(S), w = Math.sin(S), T = /* @__PURE__ */ e((e, t, n) => {
475
+ let r = e.node().getBBox(), i = r.width + t * 2, o = r.height + t * 2;
476
+ a(e, o, i, n), e.attr("viewBox", `${r.x - t} ${r.y - t} ${i} ${o}`);
477
+ }, "applyPaddedViewBox"), E = /* @__PURE__ */ e((e, t, n, r) => {
478
+ let i = r.db.getRoot();
479
+ if (!i) return;
480
+ let a = l(), { look: o, handDrawnSeed: s, themeVariables: c } = a, u = d(a.fontSize)[0] ?? _, m = o === "handDrawn", h = i.children ?? [], g = a.ishikawa?.diagramPadding ?? 20, y = a.ishikawa?.useMaxWidth ?? !1, b = f(t), x = b.append("g").attr("class", "ishikawa"), S = m ? p.svg(b.node()) : void 0, C = S ? {
481
+ roughSvg: S,
482
+ seed: s ?? 0,
483
+ lineColor: c?.lineColor ?? "#333",
484
+ fillColor: c?.mainBkg ?? "#fff"
485
+ } : void 0, w = `ishikawa-arrow-${t}`;
486
+ m || x.append("defs").append("marker").attr("id", w).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");
487
+ let E = 0, k = v, A = m ? void 0 : L(x, E, k, E, k, "ishikawa-spine");
488
+ if (O(x, E, k, i.text, u, C), !h.length) {
489
+ m && L(x, E, k, E, k, "ishikawa-spine", C), T(b, g, y);
490
+ return;
491
+ }
492
+ E -= 20;
493
+ let j = h.filter((e, t) => t % 2 == 0), N = h.filter((e, t) => t % 2 == 1), P = D(j), F = D(N), I = P.total + F.total, R = v, z = v;
494
+ if (I > 0) {
495
+ let e = v * 2, t = v * .3;
496
+ R = Math.max(t, e * (P.total / I)), z = Math.max(t, e * (F.total / I));
497
+ }
498
+ let B = u * 2;
499
+ R = Math.max(R, P.max * B), z = Math.max(z, F.max * B), k = Math.max(R, v), A && A.attr("y1", k).attr("y2", k), x.select(".ishikawa-head-group").attr("transform", `translate(0,${k})`);
500
+ let V = Math.ceil(h.length / 2);
501
+ for (let e = 0; e < V; e++) {
502
+ let t = x.append("g").attr("class", "ishikawa-pair");
503
+ for (let [n, r, i] of [[
504
+ h[e * 2],
505
+ -1,
506
+ R
507
+ ], [
508
+ h[e * 2 + 1],
509
+ 1,
510
+ z
511
+ ]]) n && M(t, n, E, k, r, i, u, C);
512
+ E = t.selectAll("text").nodes().reduce((e, t) => Math.min(e, t.getBBox().x), Infinity);
513
+ }
514
+ if (m) L(x, E, k, 0, k, "ishikawa-spine", C);
515
+ else {
516
+ A.attr("x1", E);
517
+ let e = `url(#${w})`;
518
+ x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start", e);
519
+ }
520
+ T(b, g, y);
521
+ }, "draw"), D = /* @__PURE__ */ e((t) => {
522
+ let n = /* @__PURE__ */ e((e) => e.children.reduce((e, t) => e + 1 + n(t), 0), "countDescendants");
523
+ return t.reduce((e, t) => {
524
+ let r = n(t);
525
+ return e.total += r, e.max = Math.max(e.max, r), e;
526
+ }, {
527
+ total: 0,
528
+ max: 0
529
+ });
530
+ }, "sideStats"), O = /* @__PURE__ */ e((e, t, n, r, i, a) => {
531
+ let o = Math.max(6, Math.floor(110 / (i * .6))), s = e.append("g").attr("class", "ishikawa-head-group").attr("transform", `translate(${t},${n})`), c = F(s, P(r, o), 0, 0, "ishikawa-head-label", "start", i), l = c.node().getBBox(), u = Math.max(60, l.width + 6), d = Math.max(40, l.height * 2 + 40), f = `M 0 ${-d / 2} L 0 ${d / 2} Q ${u * 2.4} 0 0 ${-d / 2} Z`;
532
+ if (a) {
533
+ let e = a.roughSvg.path(f, {
534
+ roughness: 1.5,
535
+ seed: a.seed,
536
+ fill: a.fillColor,
537
+ fillStyle: "hachure",
538
+ fillWeight: 2.5,
539
+ hachureGap: 5,
540
+ stroke: a.lineColor,
541
+ strokeWidth: 2
542
+ });
543
+ s.insert(() => e, ":first-child").attr("class", "ishikawa-head");
544
+ } else s.insert("path", ":first-child").attr("class", "ishikawa-head").attr("d", f);
545
+ c.attr("transform", `translate(${(u - l.width) / 2 - l.x + 3},${-l.y - l.height / 2})`);
546
+ }, "drawHead"), k = /* @__PURE__ */ e((t, n) => {
547
+ let r = [], i = [], a = /* @__PURE__ */ e((e, t, o) => {
548
+ let s = n === -1 ? [...e].reverse() : e;
549
+ for (let e of s) {
550
+ let n = r.length, s = e.children ?? [];
551
+ r.push({
552
+ depth: o,
553
+ text: P(e.text, 15),
554
+ parentIndex: t,
555
+ childCount: s.length
556
+ }), o % 2 == 0 ? (i.push(n), s.length && a(s, n, o + 1)) : (s.length && a(s, n, o + 1), i.push(n));
557
+ }
558
+ }, "walk");
559
+ return a(t, -1, 2), {
560
+ entries: r,
561
+ yOrder: i
562
+ };
563
+ }, "flattenTree"), A = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
564
+ let s = e.append("g").attr("class", "ishikawa-label-group"), c = F(s, t, n, r + 11 * i, "ishikawa-label cause", "middle", a).node().getBBox();
565
+ if (o) {
566
+ let e = o.roughSvg.rectangle(c.x - 20, c.y - 2, c.width + 40, c.height + 4, {
567
+ roughness: 1.5,
568
+ seed: o.seed,
569
+ fill: o.fillColor,
570
+ fillStyle: "hachure",
571
+ fillWeight: 2.5,
572
+ hachureGap: 5,
573
+ stroke: o.lineColor,
574
+ strokeWidth: 2
575
+ });
576
+ s.insert(() => e, ":first-child").attr("class", "ishikawa-label-box");
577
+ } else s.insert("rect", ":first-child").attr("class", "ishikawa-label-box").attr("x", c.x - 20).attr("y", c.y - 2).attr("width", c.width + 40).attr("height", c.height + 4);
578
+ }, "drawCauseLabel"), j = /* @__PURE__ */ e((e, t, n, r, i, a) => {
579
+ let o = Math.sqrt(r * r + i * i);
580
+ if (o === 0) return;
581
+ let s = r / o, c = i / o, l = -c * 6, u = s * 6, d = t, f = n, p = `M ${d} ${f} L ${d - s * 6 * 2 + l} ${f - c * 6 * 2 + u} L ${d - s * 6 * 2 - l} ${f - c * 6 * 2 - u} Z`, m = a.roughSvg.path(p, {
582
+ roughness: 1,
583
+ seed: a.seed,
584
+ fill: a.lineColor,
585
+ fillStyle: "solid",
586
+ stroke: a.lineColor,
587
+ strokeWidth: 1
588
+ });
589
+ e.append(() => m);
590
+ }, "drawArrowMarker"), M = /* @__PURE__ */ e((e, t, n, r, i, a, o, s) => {
591
+ let c = t.children ?? [], l = a * (c.length ? 1 : .2), u = -C * l, d = w * l * i, f = n + u, p = r + d;
592
+ if (L(e, n, r, f, p, "ishikawa-branch", s), s && j(e, n, r, n - f, r - p, s), A(e, t.text, f, p, i, o, s), !c.length) return;
593
+ let { entries: m, yOrder: h } = k(c, i), g = m.length, _ = Array(g);
594
+ for (let [e, t] of h.entries()) _[t] = r + d * ((e + 1) / (g + 1));
595
+ let v = /* @__PURE__ */ new Map();
596
+ v.set(-1, {
597
+ x0: n,
598
+ y0: r,
599
+ x1: f,
600
+ y1: p,
601
+ childCount: c.length,
602
+ childrenDrawn: 0
603
+ });
604
+ let S = -C, T = w * i, E = i < 0 ? "ishikawa-label up" : "ishikawa-label down";
605
+ for (let [t, n] of m.entries()) {
606
+ let r = _[t], i = v.get(n.parentIndex), a = e.append("g").attr("class", "ishikawa-sub-group"), c = 0, l = 0, u = 0;
607
+ if (n.depth % 2 == 0) {
608
+ let e = i.y1 - i.y0;
609
+ c = I(i.x0, i.x1, e ? (r - i.y0) / e : .5), l = r, u = c - (n.childCount > 0 ? b + n.childCount * x : y), L(a, c, r, u, r, "ishikawa-sub-branch", s), s && j(a, c, r, 1, 0, s), F(a, n.text, u, r, "ishikawa-label align", "end", o);
610
+ } else {
611
+ let e = i.childrenDrawn++;
612
+ c = I(i.x0, i.x1, (i.childCount - e) / (i.childCount + 1)), l = i.y0, u = c + S * ((r - l) / T), L(a, c, l, u, r, "ishikawa-sub-branch", s), s && j(a, c, l, c - u, l - r, s), F(a, n.text, u, r, E, "end", o);
613
+ }
614
+ n.childCount > 0 && v.set(t, {
615
+ x0: c,
616
+ y0: l,
617
+ x1: u,
618
+ y1: r,
619
+ childCount: n.childCount,
620
+ childrenDrawn: 0
621
+ });
622
+ }
623
+ }, "drawBranch"), N = /* @__PURE__ */ e((e) => e.split(/<br\s*\/?>|\n/), "splitLines"), P = /* @__PURE__ */ e((e, t) => {
624
+ if (e.length <= t) return e;
625
+ let n = [];
626
+ for (let r of e.split(/\s+/)) {
627
+ let e = n.length - 1;
628
+ e >= 0 && n[e].length + 1 + r.length <= t ? n[e] += " " + r : n.push(r);
629
+ }
630
+ return n.join("\n");
631
+ }, "wrapText"), F = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
632
+ let s = N(t), c = o * 1.05, l = e.append("text").attr("class", i).attr("text-anchor", a).attr("x", n).attr("y", r - (s.length - 1) * c / 2);
633
+ for (let [e, t] of s.entries()) l.append("tspan").attr("x", n).attr("dy", e === 0 ? 0 : c).text(t);
634
+ return l;
635
+ }, "drawMultilineText"), I = /* @__PURE__ */ e((e, t, n) => e + (t - e) * n, "lerp"), L = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
636
+ if (o) {
637
+ let s = o.roughSvg.line(t, n, r, i, {
638
+ roughness: 1.5,
639
+ seed: o.seed,
640
+ stroke: o.lineColor,
641
+ strokeWidth: 2
642
+ });
643
+ e.append(() => s).attr("class", a);
644
+ return;
645
+ }
646
+ return e.append("line").attr("class", a).attr("x1", t).attr("y1", n).attr("x2", r).attr("y2", i);
647
+ }, "drawLine"), R = {
648
+ parser: h,
649
+ get db() {
650
+ return new g();
651
+ },
652
+ renderer: { draw: E },
653
+ styles: /* @__PURE__ */ e((e) => `
654
+ .ishikawa .ishikawa-spine,
655
+ .ishikawa .ishikawa-branch,
656
+ .ishikawa .ishikawa-sub-branch {
657
+ stroke: ${e.lineColor};
658
+ stroke-width: 2;
659
+ fill: none;
660
+ }
661
+
662
+ .ishikawa .ishikawa-sub-branch {
663
+ stroke-width: 1;
664
+ }
665
+
666
+ .ishikawa .ishikawa-arrow {
667
+ fill: ${e.lineColor};
668
+ }
669
+
670
+ .ishikawa .ishikawa-head {
671
+ fill: ${e.mainBkg};
672
+ stroke: ${e.lineColor};
673
+ stroke-width: 2;
674
+ }
675
+
676
+ .ishikawa .ishikawa-label-box {
677
+ fill: ${e.mainBkg};
678
+ stroke: ${e.lineColor};
679
+ stroke-width: 2;
680
+ }
681
+
682
+ .ishikawa text {
683
+ font-family: ${e.fontFamily};
684
+ font-size: ${e.fontSize};
685
+ fill: ${e.textColor};
686
+ }
687
+
688
+ .ishikawa .ishikawa-head-label {
689
+ font-weight: 600;
690
+ text-anchor: middle;
691
+ dominant-baseline: middle;
692
+ font-size: 14px;
693
+ }
694
+
695
+ .ishikawa .ishikawa-label {
696
+ text-anchor: end;
697
+ }
698
+
699
+ .ishikawa .ishikawa-label.cause {
700
+ text-anchor: middle;
701
+ dominant-baseline: middle;
702
+ }
703
+
704
+ .ishikawa .ishikawa-label.align {
705
+ text-anchor: end;
706
+ dominant-baseline: middle;
707
+ }
708
+
709
+ .ishikawa .ishikawa-label.up {
710
+ dominant-baseline: baseline;
711
+ }
712
+
713
+ .ishikawa .ishikawa-label.down {
714
+ dominant-baseline: hanging;
715
+ }
716
+ `, "getStyles")
717
+ };
718
+ //#endregion
719
+ export { R as diagram };