@leanspec/ui-components 0.2.21 → 0.2.23

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 (171) hide show
  1. package/dist/{_baseUniq-KSDS6tgF.js → _baseUniq-C4bkXOdh.js} +2 -2
  2. package/dist/{_baseUniq-ifpVq4u5.cjs → _baseUniq-NOqaX5H-.cjs} +1 -1
  3. package/dist/{arc-C-X5Xt_b.js → arc-DFohBtPV.js} +1 -1
  4. package/dist/{arc-CutFaiCL.cjs → arc-tyrH719b.cjs} +1 -1
  5. package/dist/{architecture-U656AL7Q-BB1A66AM.js → architecture-U656AL7Q-BBwC7kfZ.js} +1 -1
  6. package/dist/{architecture-U656AL7Q-DOVRDeZr.cjs → architecture-U656AL7Q-SovojSOj.cjs} +1 -1
  7. package/dist/architectureDiagram-VXUJARFQ-C4hhcqJd.cjs +36 -0
  8. package/dist/{architectureDiagram-VXUJARFQ-Bal8NTn4.js → architectureDiagram-VXUJARFQ-_R9_zrc5.js} +1272 -1279
  9. package/dist/{blockDiagram-VD42YOAC-B2gTo5wW.js → blockDiagram-VD42YOAC-CiyHYW6w.js} +911 -920
  10. package/dist/blockDiagram-VD42YOAC-DDU7DL-t.cjs +122 -0
  11. package/dist/c4Diagram-YG6GDRKO-B2Hnd24N.cjs +10 -0
  12. package/dist/{c4Diagram-YG6GDRKO-dIf_vNCY.js → c4Diagram-YG6GDRKO-D9NuNc3r.js} +162 -163
  13. package/dist/channel-CCjQuxFu.cjs +1 -0
  14. package/dist/{channel-klR7o7JB.js → channel-mhjF1lKa.js} +1 -1
  15. package/dist/chunk-4BX2VUAB-8sPjSRf4.cjs +1 -0
  16. package/dist/chunk-4BX2VUAB-D4Zhvat9.js +8 -0
  17. package/dist/{chunk-55IACEB6-C88Xx0rU.cjs → chunk-55IACEB6-BuOA2zgr.cjs} +1 -1
  18. package/dist/{chunk-55IACEB6-Dd3NjClm.js → chunk-55IACEB6-C_MzxCLx.js} +1 -1
  19. package/dist/{chunk-B4BG7PRW-BTU_nPVE.cjs → chunk-B4BG7PRW-C0iFhfj1.cjs} +6 -6
  20. package/dist/{chunk-B4BG7PRW-DLUrgkJI.js → chunk-B4BG7PRW-Q8H7OQ1o.js} +247 -248
  21. package/dist/chunk-DI55MBZ5-DFTfH1ih.cjs +220 -0
  22. package/dist/{chunk-DI55MBZ5-BwHLqSW9.js → chunk-DI55MBZ5-qwPYmgAw.js} +440 -452
  23. package/dist/{chunk-FMBD7UC4-CedTj9g2.cjs → chunk-FMBD7UC4-CPX03hX9.cjs} +1 -1
  24. package/dist/{chunk-FMBD7UC4-6dsbMKM7.js → chunk-FMBD7UC4-DhXvRHU3.js} +1 -1
  25. package/dist/chunk-QN33PNHL-BL0nCK1x.cjs +1 -0
  26. package/dist/chunk-QN33PNHL-CLwAcvO2.js +19 -0
  27. package/dist/{chunk-QZHKN3VN-CVAEdzef.js → chunk-QZHKN3VN-3tLb49S_.js} +1 -1
  28. package/dist/{chunk-QZHKN3VN-CU1cLvn7.cjs → chunk-QZHKN3VN-NXe7XoPI.cjs} +1 -1
  29. package/dist/{chunk-TZMSLE5B-Dy6zxWyY.cjs → chunk-TZMSLE5B-DG9JqGDb.cjs} +1 -1
  30. package/dist/{chunk-TZMSLE5B-Cc8_PJIq.js → chunk-TZMSLE5B-DfaYobmr.js} +1 -1
  31. package/dist/{classDiagram-2ON5EDUG-CJQWUYqu.cjs → classDiagram-2ON5EDUG-CV-RQXaH.cjs} +1 -1
  32. package/dist/{classDiagram-v2-WZHVMYZB-D7bjndmT.js → classDiagram-2ON5EDUG-xB0RyXwt.js} +2 -2
  33. package/dist/{classDiagram-v2-WZHVMYZB-CJQWUYqu.cjs → classDiagram-v2-WZHVMYZB-CV-RQXaH.cjs} +1 -1
  34. package/dist/{classDiagram-2ON5EDUG-D7bjndmT.js → classDiagram-v2-WZHVMYZB-xB0RyXwt.js} +2 -2
  35. package/dist/clone-Db2amhxD.cjs +1 -0
  36. package/dist/{clone-7srXemyd.js → clone-DqT6If4_.js} +1 -1
  37. package/dist/{code-block-37QAKDTI-MRm4xHKr.js → code-block-37QAKDTI-CWOOD74I.js} +1 -1
  38. package/dist/{code-block-37QAKDTI-BAYBliUK.cjs → code-block-37QAKDTI-uxfAy-E5.cjs} +1 -1
  39. package/dist/components/graph/dependency-graph.d.ts.map +1 -1
  40. package/dist/components/hierarchy/hierarchy-tree.d.ts +24 -0
  41. package/dist/components/hierarchy/hierarchy-tree.d.ts.map +1 -0
  42. package/dist/components/hierarchy/index.d.ts +2 -0
  43. package/dist/components/hierarchy/index.d.ts.map +1 -0
  44. package/dist/components/index.d.ts +1 -0
  45. package/dist/components/index.d.ts.map +1 -1
  46. package/dist/components/layout/index.d.ts +1 -1
  47. package/dist/components/layout/index.d.ts.map +1 -1
  48. package/dist/components/layout/loading-skeletons.d.ts +39 -0
  49. package/dist/components/layout/loading-skeletons.d.ts.map +1 -1
  50. package/dist/components/spec/spec-card.d.ts +1 -1
  51. package/dist/components/spec/spec-card.d.ts.map +1 -1
  52. package/dist/components/ui/index.d.ts +3 -3
  53. package/dist/components/ui/index.d.ts.map +1 -1
  54. package/dist/{cose-bilkent-S5V4N54A-0O3dLIoy.js → cose-bilkent-S5V4N54A-DBS7wwrE.js} +281 -281
  55. package/dist/cose-bilkent-S5V4N54A-SbkkFEUD.cjs +1 -0
  56. package/dist/cytoscape.esm-CNUX3VTg.cjs +321 -0
  57. package/dist/{cytoscape.esm-CjI2IsL8.js → cytoscape.esm-Cvf3sx9F.js} +18 -49
  58. package/dist/dagre-6UL2VRFP-Lv6cE2gX.js +443 -0
  59. package/dist/dagre-6UL2VRFP-PalD6t9U.cjs +4 -0
  60. package/dist/{diagram-PSM6KHXK-s2xYLlND.js → diagram-PSM6KHXK-8QKT-Vki.js} +17 -19
  61. package/dist/diagram-PSM6KHXK-v8YbZXb0.cjs +24 -0
  62. package/dist/{diagram-QEK2KX5R-D700jvoY.js → diagram-QEK2KX5R-Bqh-tlSV.js} +10 -14
  63. package/dist/diagram-QEK2KX5R-BzjP3pVl.cjs +43 -0
  64. package/dist/{diagram-S2PKOQOG-BkgBSa1Q.js → diagram-S2PKOQOG-Csj0p-s-.js} +22 -23
  65. package/dist/diagram-S2PKOQOG-IkbiPUJ8.cjs +24 -0
  66. package/dist/{erDiagram-Q2GNP2WA-DKKIPwgH.cjs → erDiagram-Q2GNP2WA-BkUigWGJ.cjs} +3 -3
  67. package/dist/{erDiagram-Q2GNP2WA-CXv6THpi.js → erDiagram-Q2GNP2WA-sDpapMNP.js} +73 -74
  68. package/dist/{flowDiagram-NV44I4VS-Dsrv00Gy.js → flowDiagram-NV44I4VS-CitCGiJE.js} +438 -445
  69. package/dist/flowDiagram-NV44I4VS-CkSnWJRl.cjs +162 -0
  70. package/dist/{ganttDiagram-JELNMOA3-BuwyOUxF.cjs → ganttDiagram-JELNMOA3-7lQJBEfz.cjs} +1 -1
  71. package/dist/{ganttDiagram-JELNMOA3-CqVYbgbk.js → ganttDiagram-JELNMOA3-DAaUYzNs.js} +2 -2
  72. package/dist/{gitGraph-F6HP7TQM-BtoBLEOj.cjs → gitGraph-F6HP7TQM-BOxOUe-M.cjs} +1 -1
  73. package/dist/{gitGraph-F6HP7TQM-q5owfB75.js → gitGraph-F6HP7TQM-C2AsvVF3.js} +1 -1
  74. package/dist/gitGraphDiagram-NY62KEGX-ZRyPj0Wi.cjs +65 -0
  75. package/dist/gitGraphDiagram-NY62KEGX-lj732X3H.js +699 -0
  76. package/dist/{graph-rt_wscbL.js → graph-Bg_3T7Ud.js} +2 -2
  77. package/dist/{graph-CxpBbnBw.cjs → graph-Cu_dYuuO.cjs} +1 -1
  78. package/dist/hooks/index.d.ts +1 -0
  79. package/dist/hooks/index.d.ts.map +1 -1
  80. package/dist/hooks/use-spec-sync.d.ts +13 -0
  81. package/dist/hooks/use-spec-sync.d.ts.map +1 -0
  82. package/dist/index-Dy6CZ8M8.cjs +2103 -0
  83. package/dist/{index-BsdeQX2F.js → index-sw7mRKux.js} +32343 -31696
  84. package/dist/index.cjs +1 -1
  85. package/dist/index.js +525 -503
  86. package/dist/{info-NVLQJR56-Ctx23Jwq.cjs → info-NVLQJR56-CVPwWxmd.cjs} +1 -1
  87. package/dist/info-NVLQJR56-CkwixcJh.js +5 -0
  88. package/dist/{infoDiagram-WHAUD3N6-ICmXrgfx.cjs → infoDiagram-WHAUD3N6-BMwDBsqy.cjs} +1 -1
  89. package/dist/{infoDiagram-WHAUD3N6-Fq8ToFQ6.js → infoDiagram-WHAUD3N6-BbjOpAi3.js} +2 -2
  90. package/dist/{journeyDiagram-XKPGCS4Q-BzZgPZwu.js → journeyDiagram-XKPGCS4Q-Cx34P8cj.js} +4 -4
  91. package/dist/{journeyDiagram-XKPGCS4Q-BkYLuV5M.cjs → journeyDiagram-XKPGCS4Q-owe1muzO.cjs} +1 -1
  92. package/dist/kanban-definition-3W4ZIXB7-BG76XYj7.cjs +89 -0
  93. package/dist/kanban-definition-3W4ZIXB7-BP3ykzKL.js +719 -0
  94. package/dist/{layout-CeChnsru.cjs → layout-BM-_iYaN.cjs} +1 -1
  95. package/dist/{layout-CX9neEHw.js → layout-Bft_7Aja.js} +4 -4
  96. package/dist/lib/hierarchy.d.ts +18 -0
  97. package/dist/lib/hierarchy.d.ts.map +1 -0
  98. package/dist/lib/index.d.ts +1 -0
  99. package/dist/lib/index.d.ts.map +1 -1
  100. package/dist/{linear-CkUVga7d.js → linear-BDIyMYXP.js} +1 -1
  101. package/dist/{linear-DLfe3Is-.cjs → linear-DTAQTaEQ.cjs} +1 -1
  102. package/dist/{mermaid-4DMBBIKO-DK6bOe0l.cjs → mermaid-4DMBBIKO-B7O_d629.cjs} +1 -1
  103. package/dist/mermaid-4DMBBIKO-hCNdiULh.js +4 -0
  104. package/dist/{mermaid-parser.core-B7VTdQ1C.js → mermaid-parser.core-BQu7eTx9.js} +2740 -2756
  105. package/dist/mermaid-parser.core-DYuBLIYw.cjs +128 -0
  106. package/dist/{min-C_bmS8M7.cjs → min-B_0S1fKc.cjs} +1 -1
  107. package/dist/{min-Ar5ebLd-.js → min-g4o2CnuX.js} +2 -2
  108. package/dist/mindmap-definition-VGOIOE7T-CkItDrx9.cjs +68 -0
  109. package/dist/{mindmap-definition-VGOIOE7T-DeGZNL21.js → mindmap-definition-VGOIOE7T-CteUNe1z.js} +166 -169
  110. package/dist/{ordinal-DfAQgscy.js → ordinal-B6-f3MAq.js} +1 -1
  111. package/dist/{packet-BFZMPI3H-DFZzoAsC.js → packet-BFZMPI3H-85mavqoW.js} +1 -1
  112. package/dist/{packet-BFZMPI3H-BVRarKKV.cjs → packet-BFZMPI3H-Dvo7vnhK.cjs} +1 -1
  113. package/dist/{pie-7BOR55EZ-0edBRKAY.cjs → pie-7BOR55EZ-CSQSin36.cjs} +1 -1
  114. package/dist/pie-7BOR55EZ-DEUNQ2Gx.js +5 -0
  115. package/dist/{pieDiagram-ADFJNKIX-Ceq-kf3C.cjs → pieDiagram-ADFJNKIX-BHhXUCfj.cjs} +2 -2
  116. package/dist/{pieDiagram-ADFJNKIX-C_V2NX6O.js → pieDiagram-ADFJNKIX-COS6mtim.js} +21 -21
  117. package/dist/quadrantDiagram-AYHSOK5B-D_HlZ7yZ.cjs +7 -0
  118. package/dist/{quadrantDiagram-AYHSOK5B-B8fSnYQi.js → quadrantDiagram-AYHSOK5B-DmRa7VCS.js} +227 -229
  119. package/dist/{radar-NHE76QYJ-gAJ22qc7.cjs → radar-NHE76QYJ-BcVzBWDr.cjs} +1 -1
  120. package/dist/radar-NHE76QYJ-CdgX_Cpr.js +5 -0
  121. package/dist/{requirementDiagram-UZGBJVZJ-D6BE-Q1l.cjs → requirementDiagram-UZGBJVZJ-BHFRZggR.cjs} +7 -7
  122. package/dist/{requirementDiagram-UZGBJVZJ-MnXD59Yw.js → requirementDiagram-UZGBJVZJ-CcQIz-20.js} +186 -188
  123. package/dist/{sankeyDiagram-TZEHDZUN-Dx8_KSIc.cjs → sankeyDiagram-TZEHDZUN-CSkEJj9g.cjs} +5 -5
  124. package/dist/{sankeyDiagram-TZEHDZUN-Dfyu7oJ6.js → sankeyDiagram-TZEHDZUN-CpcshR0Z.js} +186 -186
  125. package/dist/{sequenceDiagram-WL72ISMW-D2pgAoWi.js → sequenceDiagram-WL72ISMW-B1iDbV8x.js} +213 -220
  126. package/dist/{sequenceDiagram-WL72ISMW-CUYHrDfm.cjs → sequenceDiagram-WL72ISMW-DscxgBA5.cjs} +16 -16
  127. package/dist/{stateDiagram-FKZM4ZOC-DYV-na53.js → stateDiagram-FKZM4ZOC-DIutB6RS.js} +4 -4
  128. package/dist/{stateDiagram-FKZM4ZOC-CtYt1Ixa.cjs → stateDiagram-FKZM4ZOC-c19kgfCN.cjs} +1 -1
  129. package/dist/{stateDiagram-v2-4FDKWEC3-Kp4sxr9o.js → stateDiagram-v2-4FDKWEC3-BKEaZomO.js} +2 -2
  130. package/dist/{stateDiagram-v2-4FDKWEC3-CeSnHO3T.cjs → stateDiagram-v2-4FDKWEC3-CCn-Iy_C.cjs} +1 -1
  131. package/dist/timeline-definition-IT6M3QCI-CfRSUfqZ.cjs +61 -0
  132. package/dist/{timeline-definition-IT6M3QCI-621ePKJ0.js → timeline-definition-IT6M3QCI-D1yY4TSO.js} +211 -215
  133. package/dist/{treemap-KMMF4GRG-DSNryTu7.cjs → treemap-KMMF4GRG-Cn6nuBab.cjs} +1 -1
  134. package/dist/{treemap-KMMF4GRG-l6HrdCLC.js → treemap-KMMF4GRG-KtkxYt13.js} +1 -1
  135. package/dist/types/specs.d.ts +2 -0
  136. package/dist/types/specs.d.ts.map +1 -1
  137. package/dist/ui-components.css +1 -1
  138. package/dist/{xychartDiagram-PRI3JC2R-C2_xziD5.cjs → xychartDiagram-PRI3JC2R-OeJ2-Nwx.cjs} +1 -1
  139. package/dist/{xychartDiagram-PRI3JC2R-CkfCv2o_.js → xychartDiagram-PRI3JC2R-a_g9ptTp.js} +3 -3
  140. package/package.json +5 -2
  141. package/dist/architectureDiagram-VXUJARFQ-WCtQIdet.cjs +0 -36
  142. package/dist/blockDiagram-VD42YOAC-CGdaLv7H.cjs +0 -122
  143. package/dist/c4Diagram-YG6GDRKO-DfRXyZHM.cjs +0 -10
  144. package/dist/channel-CMrUjUoZ.cjs +0 -1
  145. package/dist/chunk-4BX2VUAB-BQgzc1Sm.js +0 -9
  146. package/dist/chunk-4BX2VUAB-CO5acanJ.cjs +0 -1
  147. package/dist/chunk-DI55MBZ5-lVvJu2kr.cjs +0 -220
  148. package/dist/chunk-QN33PNHL-DHNejhbC.js +0 -20
  149. package/dist/chunk-QN33PNHL-Dr9ghdFD.cjs +0 -1
  150. package/dist/clone-Chgndk5P.cjs +0 -1
  151. package/dist/cose-bilkent-S5V4N54A-CPai-c_a.cjs +0 -1
  152. package/dist/cytoscape.esm-o9WRfNPd.cjs +0 -331
  153. package/dist/dagre-6UL2VRFP-BqaZre9N.js +0 -446
  154. package/dist/dagre-6UL2VRFP-CeIiJJG5.cjs +0 -4
  155. package/dist/diagram-PSM6KHXK-oD045yZG.cjs +0 -24
  156. package/dist/diagram-QEK2KX5R-VH7_rcp0.cjs +0 -43
  157. package/dist/diagram-S2PKOQOG-CjDpLVdl.cjs +0 -24
  158. package/dist/flowDiagram-NV44I4VS-U52jVnrS.cjs +0 -162
  159. package/dist/gitGraphDiagram-NY62KEGX-DH1I05Ix.cjs +0 -65
  160. package/dist/gitGraphDiagram-NY62KEGX-DOanbk62.js +0 -712
  161. package/dist/index-Cg8ByiK0.cjs +0 -2153
  162. package/dist/info-NVLQJR56-hH82KARZ.js +0 -5
  163. package/dist/kanban-definition-3W4ZIXB7-BV7UYL3n.cjs +0 -89
  164. package/dist/kanban-definition-3W4ZIXB7-CrmrjRAg.js +0 -721
  165. package/dist/mermaid-4DMBBIKO-wnX9ATcq.js +0 -4
  166. package/dist/mermaid-parser.core-DvlzR6J2.cjs +0 -128
  167. package/dist/mindmap-definition-VGOIOE7T-BBqv9TKM.cjs +0 -68
  168. package/dist/pie-7BOR55EZ-zLMdfI8h.js +0 -5
  169. package/dist/quadrantDiagram-AYHSOK5B-BButfYaS.cjs +0 -7
  170. package/dist/radar-NHE76QYJ-DeqJwy76.js +0 -5
  171. package/dist/timeline-definition-IT6M3QCI-4fRZfQpb.cjs +0 -61
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-Cg8ByiK0.cjs"),_t=require("./ordinal-CagbB1m8.cjs");function mt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const kt=mt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function dt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function et(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function xt(t){return t.target.depth}function vt(t){return t.depth}function bt(t,e){return e-1-t.height}function gt(t,e){return t.sourceLinks.length?t.depth:e-1}function St(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,xt)-1:0}function H(t){return function(){return t}}function lt(t,e){return X(t.source,e.source)||t.index-e.index}function ct(t,e){return X(t.target,e.target)||t.index-e.index}function X(t,e){return t.y0-e.y0}function nt(t){return t.value}function wt(t){return t.index}function Lt(t){return t.nodes}function Et(t){return t.links}function ut(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function ht({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function At(){let t=0,e=0,i=1,a=1,h=24,g=8,_,k=wt,r=gt,o,l,x=Lt,v=Et,d=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),I(n),w(n),ht(n),n}b.update=function(n){return ht(n),n},b.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:H(n),b):k},b.nodeAlign=function(n){return arguments.length?(r=typeof n=="function"?n:H(n),b):r},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(g=_=+n,b):g},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:H(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:H(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(d=+n,b):d};function M({nodes:n,links:y}){for(const[c,s]of n.entries())s.index=c,s.sourceLinks=[],s.targetLinks=[];const u=new Map(n.map((c,s)=>[k(c,s,n),c]));for(const[c,s]of y.entries()){s.index=c;let{source:m,target:S}=s;typeof m!="object"&&(m=s.source=ut(u,m)),typeof S!="object"&&(S=s.target=ut(u,S)),m.sourceLinks.push(s),S.targetLinks.push(s)}if(l!=null)for(const{sourceLinks:c,targetLinks:s}of n)c.sort(l),s.sort(l)}function T({nodes:n}){for(const y of n)y.value=y.fixedValue===void 0?Math.max(et(y.sourceLinks,nt),et(y.targetLinks,nt)):y.fixedValue}function N({nodes:n}){const y=n.length;let u=new Set(n),c=new Set,s=0;for(;u.size;){for(const m of u){m.depth=s;for(const{target:S}of m.sourceLinks)c.add(S)}if(++s>y)throw new Error("circular link");u=c,c=new Set}}function I({nodes:n}){const y=n.length;let u=new Set(n),c=new Set,s=0;for(;u.size;){for(const m of u){m.height=s;for(const{source:S}of m.targetLinks)c.add(S)}if(++s>y)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const y=at(n,s=>s.depth)+1,u=(i-t-h)/(y-1),c=new Array(y);for(const s of n){const m=Math.max(0,Math.min(y-1,Math.floor(r.call(null,s,y))));s.layer=m,s.x0=t+m*u,s.x1=s.x0+h,c[m]?c[m].push(s):c[m]=[s]}if(o)for(const s of c)s.sort(o);return c}function R(n){const y=dt(n,u=>(a-e-(u.length-1)*_)/et(u,nt));for(const u of n){let c=e;for(const s of u){s.y0=c,s.y1=c+s.value*y,c=s.y1+_;for(const m of s.sourceLinks)m.width=m.value*y}c=(a-c+_)/(u.length+1);for(let s=0;s<u.length;++s){const m=u[s];m.y0+=c*(s+1),m.y1+=c*(s+1)}A(u)}}function w(n){const y=$(n);_=Math.min(g,(a-e)/(at(y,u=>u.length)-1)),R(y);for(let u=0;u<d;++u){const c=Math.pow(.99,u),s=Math.max(1-c,(u+1)/d);B(y,c,s),C(y,c,s)}}function C(n,y,u){for(let c=1,s=n.length;c<s;++c){const m=n[c];for(const S of m){let L=0,F=0;for(const{source:q,value:tt}of S.targetLinks){let Y=tt*(S.layer-q.layer);L+=j(q,S)*Y,F+=Y}if(!(F>0))continue;let G=(L/F-S.y0)*y;S.y0+=G,S.y1+=G,E(S)}o===void 0&&m.sort(X),O(m,u)}}function B(n,y,u){for(let c=n.length,s=c-2;s>=0;--s){const m=n[s];for(const S of m){let L=0,F=0;for(const{target:q,value:tt}of S.sourceLinks){let Y=tt*(q.layer-S.layer);L+=P(S,q)*Y,F+=Y}if(!(F>0))continue;let G=(L/F-S.y0)*y;S.y0+=G,S.y1+=G,E(S)}o===void 0&&m.sort(X),O(m,u)}}function O(n,y){const u=n.length>>1,c=n[u];p(n,c.y0-_,u-1,y),D(n,c.y1+_,u+1,y),p(n,a,n.length-1,y),D(n,e,0,y)}function D(n,y,u,c){for(;u<n.length;++u){const s=n[u],m=(y-s.y0)*c;m>1e-6&&(s.y0+=m,s.y1+=m),y=s.y1+_}}function p(n,y,u,c){for(;u>=0;--u){const s=n[u],m=(s.y1-y)*c;m>1e-6&&(s.y0-=m,s.y1-=m),y=s.y0-_}}function E({sourceLinks:n,targetLinks:y}){if(l===void 0){for(const{source:{sourceLinks:u}}of y)u.sort(ct);for(const{target:{targetLinks:u}}of n)u.sort(lt)}}function A(n){if(l===void 0)for(const{sourceLinks:y,targetLinks:u}of n)y.sort(ct),u.sort(lt)}function j(n,y){let u=n.y0-(n.sourceLinks.length-1)*_/2;for(const{target:c,width:s}of n.sourceLinks){if(c===y)break;u+=s+_}for(const{source:c,width:s}of y.targetLinks){if(c===n)break;u-=s}return u}function P(n,y){let u=y.y0-(y.targetLinks.length-1)*_/2;for(const{source:c,width:s}of y.targetLinks){if(c===n)break;u+=s+_}for(const{target:c,width:s}of n.sourceLinks){if(c===y)break;u-=s}return u}return b}var it=Math.PI,rt=2*it,V=1e-6,Tt=rt-V;function st(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new st}st.prototype=pt.prototype={constructor:st,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,g){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+g)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var g=this._x1,_=this._y1,k=i-t,r=a-e,o=g-t,l=_-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>V)if(!(Math.abs(l*k-r*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-g,d=a-_,b=k*k+r*r,M=v*v+d*d,T=Math.sqrt(b),N=Math.sqrt(x),I=h*Math.tan((it-Math.acos((b+x-M)/(2*T*N)))/2),$=I/N,R=I/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*d)+","+(this._x1=t+R*k)+","+(this._y1=e+R*r)}},arc:function(t,e,i,a,h,g){t=+t,e=+e,i=+i,g=!!g;var _=i*Math.cos(a),k=i*Math.sin(a),r=t+_,o=e+k,l=1^g,x=g?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+r+","+o:(Math.abs(this._x1-r)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+r+","+o),i&&(x<0&&(x=x%rt+rt),x>Tt?this._+="A"+i+","+i+",0,1,"+l+","+(t-_)+","+(e-k)+"A"+i+","+i+",0,1,"+l+","+(this._x1=r)+","+(this._y1=o):x>V&&(this._+="A"+i+","+i+",0,"+ +(x>=it)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Mt(t){return t[0]}function Nt(t){return t[1]}var Pt=Array.prototype.slice;function Ct(t){return t.source}function It(t){return t.target}function Ot(t){var e=Ct,i=It,a=Mt,h=Nt,g=null;function _(){var k,r=Pt.call(arguments),o=e.apply(this,r),l=i.apply(this,r);if(g||(g=k=pt()),t(g,+a.apply(this,(r[0]=o,r)),+h.apply(this,r),+a.apply(this,(r[0]=l,r)),+h.apply(this,r)),k)return g=null,k+""||null}return _.source=function(k){return arguments.length?(e=k,_):e},_.target=function(k){return arguments.length?(i=k,_):i},_.x=function(k){return arguments.length?(a=typeof k=="function"?k:ft(+k),_):a},_.y=function(k){return arguments.length?(h=typeof k=="function"?k:ft(+k),_):h},_.context=function(k){return arguments.length?(g=k??null,_):g},_}function Dt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function $t(){return Ot(Dt)}function jt(t){return[t.source.x1,t.y0]}function zt(t){return[t.target.x0,t.y1]}function Bt(){return $t().source(jt).target(zt)}var ot=(function(){var t=f.__name(function(k,r,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=r);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:f.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:f.__name(function(r,o,l,x,v,d,b){var M=d.length-1;switch(v){case 7:const T=x.findOrCreateNode(d[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(d[M-2].trim().replaceAll('""','"')),I=parseFloat(d[M].trim());x.addLink(T,N,I);break;case 8:case 9:case 11:this.$=d[M];break;case 10:this.$=d[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:f.__name(function(r,o){if(o.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=o,l}},"parseError"),parse:f.__name(function(r){var o=this,l=[0],x=[],v=[null],d=[],b=this.table,M="",T=0,N=0,I=2,$=1,R=d.slice.call(arguments,1),w=Object.create(this.lexer),C={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(C.yy[B]=this.yy[B]);w.setInput(r,C.yy),C.yy.lexer=w,C.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var O=w.yylloc;d.push(O);var D=w.options&&w.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function p(L){l.length=l.length-2*L,v.length=v.length-L,d.length=d.length-L}f.__name(p,"popStack");function E(){var L;return L=x.pop()||w.lex()||$,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}f.__name(E,"lex");for(var A,j,P,n,y={},u,c,s,m;;){if(j=l[l.length-1],this.defaultActions[j]?P=this.defaultActions[j]:((A===null||typeof A>"u")&&(A=E()),P=b[j]&&b[j][A]),typeof P>"u"||!P.length||!P[0]){var S="";m=[];for(u in b[j])this.terminals_[u]&&u>I&&m.push("'"+this.terminals_[u]+"'");w.showPosition?S="Parse error on line "+(T+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-Dy6CZ8M8.cjs"),_t=require("./ordinal-CagbB1m8.cjs");function mt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const kt=mt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function dt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function et(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function xt(t){return t.target.depth}function vt(t){return t.depth}function bt(t,e){return e-1-t.height}function gt(t,e){return t.sourceLinks.length?t.depth:e-1}function St(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,xt)-1:0}function H(t){return function(){return t}}function lt(t,e){return X(t.source,e.source)||t.index-e.index}function ct(t,e){return X(t.target,e.target)||t.index-e.index}function X(t,e){return t.y0-e.y0}function nt(t){return t.value}function wt(t){return t.index}function Lt(t){return t.nodes}function Et(t){return t.links}function ut(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function ht({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function At(){let t=0,e=0,i=1,a=1,h=24,b=8,p,m=wt,r=gt,o,l,k=Lt,x=Et,d=6;function v(){const n={nodes:k.apply(null,arguments),links:x.apply(null,arguments)};return M(n),T(n),N(n),I(n),w(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(m=typeof n=="function"?n:H(n),v):m},v.nodeAlign=function(n){return arguments.length?(r=typeof n=="function"?n:H(n),v):r},v.nodeSort=function(n){return arguments.length?(o=n,v):o},v.nodeWidth=function(n){return arguments.length?(h=+n,v):h},v.nodePadding=function(n){return arguments.length?(b=p=+n,v):b},v.nodes=function(n){return arguments.length?(k=typeof n=="function"?n:H(n),v):k},v.links=function(n){return arguments.length?(x=typeof n=="function"?n:H(n),v):x},v.linkSort=function(n){return arguments.length?(l=n,v):l},v.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],v):[i-t,a-e]},v.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],v):[[t,e],[i,a]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function M({nodes:n,links:y}){for(const[c,s]of n.entries())s.index=c,s.sourceLinks=[],s.targetLinks=[];const u=new Map(n.map((c,s)=>[m(c,s,n),c]));for(const[c,s]of y.entries()){s.index=c;let{source:_,target:S}=s;typeof _!="object"&&(_=s.source=ut(u,_)),typeof S!="object"&&(S=s.target=ut(u,S)),_.sourceLinks.push(s),S.targetLinks.push(s)}if(l!=null)for(const{sourceLinks:c,targetLinks:s}of n)c.sort(l),s.sort(l)}function T({nodes:n}){for(const y of n)y.value=y.fixedValue===void 0?Math.max(et(y.sourceLinks,nt),et(y.targetLinks,nt)):y.fixedValue}function N({nodes:n}){const y=n.length;let u=new Set(n),c=new Set,s=0;for(;u.size;){for(const _ of u){_.depth=s;for(const{target:S}of _.sourceLinks)c.add(S)}if(++s>y)throw new Error("circular link");u=c,c=new Set}}function I({nodes:n}){const y=n.length;let u=new Set(n),c=new Set,s=0;for(;u.size;){for(const _ of u){_.height=s;for(const{source:S}of _.targetLinks)c.add(S)}if(++s>y)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const y=at(n,s=>s.depth)+1,u=(i-t-h)/(y-1),c=new Array(y);for(const s of n){const _=Math.max(0,Math.min(y-1,Math.floor(r.call(null,s,y))));s.layer=_,s.x0=t+_*u,s.x1=s.x0+h,c[_]?c[_].push(s):c[_]=[s]}if(o)for(const s of c)s.sort(o);return c}function R(n){const y=dt(n,u=>(a-e-(u.length-1)*p)/et(u,nt));for(const u of n){let c=e;for(const s of u){s.y0=c,s.y1=c+s.value*y,c=s.y1+p;for(const _ of s.sourceLinks)_.width=_.value*y}c=(a-c+p)/(u.length+1);for(let s=0;s<u.length;++s){const _=u[s];_.y0+=c*(s+1),_.y1+=c*(s+1)}A(u)}}function w(n){const y=$(n);p=Math.min(b,(a-e)/(at(y,u=>u.length)-1)),R(y);for(let u=0;u<d;++u){const c=Math.pow(.99,u),s=Math.max(1-c,(u+1)/d);B(y,c,s),C(y,c,s)}}function C(n,y,u){for(let c=1,s=n.length;c<s;++c){const _=n[c];for(const S of _){let L=0,F=0;for(const{source:q,value:tt}of S.targetLinks){let Y=tt*(S.layer-q.layer);L+=j(q,S)*Y,F+=Y}if(!(F>0))continue;let G=(L/F-S.y0)*y;S.y0+=G,S.y1+=G,E(S)}o===void 0&&_.sort(X),O(_,u)}}function B(n,y,u){for(let c=n.length,s=c-2;s>=0;--s){const _=n[s];for(const S of _){let L=0,F=0;for(const{target:q,value:tt}of S.sourceLinks){let Y=tt*(q.layer-S.layer);L+=P(S,q)*Y,F+=Y}if(!(F>0))continue;let G=(L/F-S.y0)*y;S.y0+=G,S.y1+=G,E(S)}o===void 0&&_.sort(X),O(_,u)}}function O(n,y){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,y),D(n,c.y1+p,u+1,y),g(n,a,n.length-1,y),D(n,e,0,y)}function D(n,y,u,c){for(;u<n.length;++u){const s=n[u],_=(y-s.y0)*c;_>1e-6&&(s.y0+=_,s.y1+=_),y=s.y1+p}}function g(n,y,u,c){for(;u>=0;--u){const s=n[u],_=(s.y1-y)*c;_>1e-6&&(s.y0-=_,s.y1-=_),y=s.y0-p}}function E({sourceLinks:n,targetLinks:y}){if(l===void 0){for(const{source:{sourceLinks:u}}of y)u.sort(ct);for(const{target:{targetLinks:u}}of n)u.sort(lt)}}function A(n){if(l===void 0)for(const{sourceLinks:y,targetLinks:u}of n)y.sort(ct),u.sort(lt)}function j(n,y){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:s}of n.sourceLinks){if(c===y)break;u+=s+p}for(const{source:c,width:s}of y.targetLinks){if(c===n)break;u-=s}return u}function P(n,y){let u=y.y0-(y.targetLinks.length-1)*p/2;for(const{source:c,width:s}of y.targetLinks){if(c===n)break;u+=s+p}for(const{target:c,width:s}of n.sourceLinks){if(c===y)break;u-=s}return u}return v}var it=Math.PI,rt=2*it,V=1e-6,Tt=rt-V;function st(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new st}st.prototype=pt.prototype={constructor:st,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,b){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,m=i-t,r=a-e,o=b-t,l=p-e,k=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(k>V)if(!(Math.abs(l*m-r*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var x=i-b,d=a-p,v=m*m+r*r,M=x*x+d*d,T=Math.sqrt(v),N=Math.sqrt(k),I=h*Math.tan((it-Math.acos((v+k-M)/(2*T*N)))/2),$=I/N,R=I/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*d)+","+(this._x1=t+R*m)+","+(this._y1=e+R*r)}},arc:function(t,e,i,a,h,b){t=+t,e=+e,i=+i,b=!!b;var p=i*Math.cos(a),m=i*Math.sin(a),r=t+p,o=e+m,l=1^b,k=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+r+","+o:(Math.abs(this._x1-r)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+r+","+o),i&&(k<0&&(k=k%rt+rt),k>Tt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-m)+"A"+i+","+i+",0,1,"+l+","+(this._x1=r)+","+(this._y1=o):k>V&&(this._+="A"+i+","+i+",0,"+ +(k>=it)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Mt(t){return t[0]}function Nt(t){return t[1]}var Pt=Array.prototype.slice;function Ct(t){return t.source}function It(t){return t.target}function Ot(t){var e=Ct,i=It,a=Mt,h=Nt,b=null;function p(){var m,r=Pt.call(arguments),o=e.apply(this,r),l=i.apply(this,r);if(b||(b=m=pt()),t(b,+a.apply(this,(r[0]=o,r)),+h.apply(this,r),+a.apply(this,(r[0]=l,r)),+h.apply(this,r)),m)return b=null,m+""||null}return p.source=function(m){return arguments.length?(e=m,p):e},p.target=function(m){return arguments.length?(i=m,p):i},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:ft(+m),p):a},p.y=function(m){return arguments.length?(h=typeof m=="function"?m:ft(+m),p):h},p.context=function(m){return arguments.length?(b=m??null,p):b},p}function Dt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function $t(){return Ot(Dt)}function jt(t){return[t.source.x1,t.y0]}function zt(t){return[t.target.x0,t.y1]}function Bt(){return $t().source(jt).target(zt)}var ot=(function(){var t=f.__name(function(m,r,o,l){for(o=o||{},l=m.length;l--;o[m[l]]=r);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:f.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:f.__name(function(r,o,l,k,x,d,v){var M=d.length-1;switch(x){case 7:const T=k.findOrCreateNode(d[M-4].trim().replaceAll('""','"')),N=k.findOrCreateNode(d[M-2].trim().replaceAll('""','"')),I=parseFloat(d[M].trim());k.addLink(T,N,I);break;case 8:case 9:case 11:this.$=d[M];break;case 10:this.$=d[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:f.__name(function(r,o){if(o.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=o,l}},"parseError"),parse:f.__name(function(r){var o=this,l=[0],k=[],x=[null],d=[],v=this.table,M="",T=0,N=0,I=2,$=1,R=d.slice.call(arguments,1),w=Object.create(this.lexer),C={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(C.yy[B]=this.yy[B]);w.setInput(r,C.yy),C.yy.lexer=w,C.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var O=w.yylloc;d.push(O);var D=w.options&&w.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,x.length=x.length-L,d.length=d.length-L}f.__name(g,"popStack");function E(){var L;return L=k.pop()||w.lex()||$,typeof L!="number"&&(L instanceof Array&&(k=L,L=k.pop()),L=o.symbols_[L]||L),L}f.__name(E,"lex");for(var A,j,P,n,y={},u,c,s,_;;){if(j=l[l.length-1],this.defaultActions[j]?P=this.defaultActions[j]:((A===null||typeof A>"u")&&(A=E()),P=v[j]&&v[j][A]),typeof P>"u"||!P.length||!P[0]){var S="";_=[];for(u in v[j])this.terminals_[u]&&u>I&&_.push("'"+this.terminals_[u]+"'");w.showPosition?S="Parse error on line "+(T+1)+`:
2
2
  `+w.showPosition()+`
3
- Expecting `+m.join(", ")+", got '"+(this.terminals_[A]||A)+"'":S="Parse error on line "+(T+1)+": Unexpected "+(A==$?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(S,{text:w.match,token:this.terminals_[A]||A,line:w.yylineno,loc:O,expected:m})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+A);switch(P[0]){case 1:l.push(A),v.push(w.yytext),d.push(w.yylloc),l.push(P[1]),A=null,N=w.yyleng,M=w.yytext,T=w.yylineno,O=w.yylloc;break;case 2:if(c=this.productions_[P[1]][1],y.$=v[v.length-c],y._$={first_line:d[d.length-(c||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(c||1)].first_column,last_column:d[d.length-1].last_column},D&&(y._$.range=[d[d.length-(c||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(y,[M,N,T,C.yy,P[1],v,d].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),v=v.slice(0,-1*c),d=d.slice(0,-1*c)),l.push(this.productions_[P[1]][0]),v.push(y.$),d.push(y._$),s=b[l[l.length-2]][l[l.length-1]],l.push(s);break;case 3:return!0}}return!0},"parse")},g=(function(){var k={EOF:1,parseError:f.__name(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:f.__name(function(r,o){return this.yy=o||this.yy||{},this._input=r,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:f.__name(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var o=r.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:f.__name(function(r){var o=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=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),l.length-1&&(this.yylineno-=l.length-1);var v=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:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:f.__name(function(){return this._more=!0,this},"more"),reject:f.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+_.join(", ")+", got '"+(this.terminals_[A]||A)+"'":S="Parse error on line "+(T+1)+": Unexpected "+(A==$?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(S,{text:w.match,token:this.terminals_[A]||A,line:w.yylineno,loc:O,expected:_})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+A);switch(P[0]){case 1:l.push(A),x.push(w.yytext),d.push(w.yylloc),l.push(P[1]),A=null,N=w.yyleng,M=w.yytext,T=w.yylineno,O=w.yylloc;break;case 2:if(c=this.productions_[P[1]][1],y.$=x[x.length-c],y._$={first_line:d[d.length-(c||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(c||1)].first_column,last_column:d[d.length-1].last_column},D&&(y._$.range=[d[d.length-(c||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(y,[M,N,T,C.yy,P[1],x,d].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),x=x.slice(0,-1*c),d=d.slice(0,-1*c)),l.push(this.productions_[P[1]][0]),x.push(y.$),d.push(y._$),s=v[l[l.length-2]][l[l.length-1]],l.push(s);break;case 3:return!0}}return!0},"parse")},b=(function(){var m={EOF:1,parseError:f.__name(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:f.__name(function(r,o){return this.yy=o||this.yy||{},this._input=r,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:f.__name(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var o=r.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:f.__name(function(r){var o=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var k=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),l.length-1&&(this.yylineno-=l.length-1);var x=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:l?(l.length===k.length?this.yylloc.first_column:0)+k[k.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:f.__name(function(){return this._more=!0,this},"more"),reject:f.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f.__name(function(r){this.unput(this.match.slice(r))},"less"),pastInput:f.__name(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f.__name(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f.__name(function(){var r=this.pastInput(),o=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
- `+o+"^"},"showPosition"),test_match:f.__name(function(r,o){var l,x,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),x=r[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var d in v)this[d]=v[d];return!1}return!1},"test_match"),next:f.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,o,l,x;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),d=0;d<v.length;d++)if(l=this._input.match(this.rules[v[d]]),l&&(!o||l[0].length>o[0].length)){if(o=l,x=d,this.options.backtrack_lexer){if(r=this.test_match(l,v[d]),r!==!1)return r;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(r=this.test_match(o,v[x]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f.__name(function(){var o=this.next();return o||this.lex()},"lex"),begin:f.__name(function(o){this.conditionStack.push(o)},"begin"),popState:f.__name(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f.__name(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:f.__name(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:f.__name(function(o){this.begin(o)},"pushState"),stateStackSize:f.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f.__name(function(o,l,x,v){switch(x){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return k})();h.lexer=g;function _(){this.yy={}}return f.__name(_,"Parser"),_.prototype=h,h.Parser=_,new _})();ot.parser=ot;var Q=ot,Z=[],J=[],K=new Map,Rt=f.__name(()=>{Z=[],J=[],K=new Map,f.clear()},"clear"),W,Ft=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},f.__name(W,"SankeyLink"),W),Vt=f.__name((t,e,i)=>{Z.push(new Ft(t,e,i))},"addLink"),U,Wt=(U=class{constructor(e){this.ID=e}},f.__name(U,"SankeyNode"),U),Ut=f.__name(t=>{t=f.common_default.sanitizeText(t,f.getConfig2());let e=K.get(t);return e===void 0&&(e=new Wt(t),K.set(t,e),J.push(e)),e},"findOrCreateNode"),Gt=f.__name(()=>J,"getNodes"),qt=f.__name(()=>Z,"getLinks"),Yt=f.__name(()=>({nodes:J.map(t=>({id:t.ID})),links:Z.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Ht={nodesMap:K,getConfig:f.__name(()=>f.getConfig2().sankey,"getConfig"),getNodes:Gt,getLinks:qt,getGraph:Yt,addLink:Vt,findOrCreateNode:Ut,getAccTitle:f.getAccTitle,setAccTitle:f.setAccTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription,getDiagramTitle:f.getDiagramTitle,setDiagramTitle:f.setDiagramTitle,clear:Rt},z,yt=(z=class{static next(e){return new z(e+ ++z.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},f.__name(z,"Uid"),z.count=0,z),Xt={left:vt,right:bt,center:St,justify:gt},Qt=f.__name(function(t,e,i,a){const{securityLevel:h,sankey:g}=f.getConfig2(),_=f.defaultConfig2.sankey;let k;h==="sandbox"&&(k=f.select("#i"+e));const r=h==="sandbox"?f.select(k.nodes()[0].contentDocument.body):f.select("body"),o=h==="sandbox"?r.select(`[id="${e}"]`):f.select(`[id="${e}"]`),l=(g==null?void 0:g.width)??_.width,x=(g==null?void 0:g.height)??_.width,v=(g==null?void 0:g.useMaxWidth)??_.useMaxWidth,d=(g==null?void 0:g.nodeAlignment)??_.nodeAlignment,b=(g==null?void 0:g.prefix)??_.prefix,M=(g==null?void 0:g.suffix)??_.suffix,T=(g==null?void 0:g.showValues)??_.showValues,N=a.db.getGraph(),I=Xt[d];At().nodeId(p=>p.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(I).extent([[0,0],[l,x]])(N);const w=_t.ordinal(kt);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",p=>(p.uid=yt.next("node-")).id).attr("transform",function(p){return"translate("+p.x0+","+p.y0+")"}).attr("x",p=>p.x0).attr("y",p=>p.y0).append("rect").attr("height",p=>p.y1-p.y0).attr("width",p=>p.x1-p.x0).attr("fill",p=>w(p.id));const C=f.__name(({id:p,value:E})=>T?`${p}
7
- ${b}${Math.round(E*100)/100}${M}`:p,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",p=>p.x0<l/2?p.x1+6:p.x0-6).attr("y",p=>(p.y1+p.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",p=>p.x0<l/2?"start":"end").text(C);const B=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(N.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),O=(g==null?void 0:g.linkColor)??"gradient";if(O==="gradient"){const p=B.append("linearGradient").attr("id",E=>(E.uid=yt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);p.append("stop").attr("offset","0%").attr("stop-color",E=>w(E.source.id)),p.append("stop").attr("offset","100%").attr("stop-color",E=>w(E.target.id))}let D;switch(O){case"gradient":D=f.__name(p=>p.uid,"coloring");break;case"source":D=f.__name(p=>w(p.source.id),"coloring");break;case"target":D=f.__name(p=>w(p.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Bt()).attr("stroke",D).attr("stroke-width",p=>Math.max(1,p.width)),f.setupGraphViewbox(void 0,o,0,v)},"draw"),Kt={draw:Qt},Zt=f.__name(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
5
+ `+o+"^"},"showPosition"),test_match:f.__name(function(r,o){var l,k,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),k=r[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var d in x)this[d]=x[d];return!1}return!1},"test_match"),next:f.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,o,l,k;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),d=0;d<x.length;d++)if(l=this._input.match(this.rules[x[d]]),l&&(!o||l[0].length>o[0].length)){if(o=l,k=d,this.options.backtrack_lexer){if(r=this.test_match(l,x[d]),r!==!1)return r;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(r=this.test_match(o,x[k]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f.__name(function(){var o=this.next();return o||this.lex()},"lex"),begin:f.__name(function(o){this.conditionStack.push(o)},"begin"),popState:f.__name(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f.__name(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:f.__name(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:f.__name(function(o){this.begin(o)},"pushState"),stateStackSize:f.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f.__name(function(o,l,k,x){switch(k){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return m})();h.lexer=b;function p(){this.yy={}}return f.__name(p,"Parser"),p.prototype=h,h.Parser=p,new p})();ot.parser=ot;var Q=ot,Z=[],J=[],K=new Map,Rt=f.__name(()=>{Z=[],J=[],K=new Map,f.clear()},"clear"),W,Ft=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},f.__name(W,"SankeyLink"),W),Vt=f.__name((t,e,i)=>{Z.push(new Ft(t,e,i))},"addLink"),U,Wt=(U=class{constructor(e){this.ID=e}},f.__name(U,"SankeyNode"),U),Ut=f.__name(t=>{t=f.common_default.sanitizeText(t,f.getConfig2());let e=K.get(t);return e===void 0&&(e=new Wt(t),K.set(t,e),J.push(e)),e},"findOrCreateNode"),Gt=f.__name(()=>J,"getNodes"),qt=f.__name(()=>Z,"getLinks"),Yt=f.__name(()=>({nodes:J.map(t=>({id:t.ID})),links:Z.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Ht={nodesMap:K,getConfig:f.__name(()=>f.getConfig2().sankey,"getConfig"),getNodes:Gt,getLinks:qt,getGraph:Yt,addLink:Vt,findOrCreateNode:Ut,getAccTitle:f.getAccTitle,setAccTitle:f.setAccTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription,getDiagramTitle:f.getDiagramTitle,setDiagramTitle:f.setDiagramTitle,clear:Rt},z,yt=(z=class{static next(e){return new z(e+ ++z.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},f.__name(z,"Uid"),z.count=0,z),Xt={left:vt,right:bt,center:St,justify:gt},Qt=f.__name(function(t,e,i,a){const{securityLevel:h,sankey:b}=f.getConfig2(),p=f.defaultConfig2.sankey;let m;h==="sandbox"&&(m=f.select("#i"+e));const r=h==="sandbox"?f.select(m.nodes()[0].contentDocument.body):f.select("body"),o=h==="sandbox"?r.select(`[id="${e}"]`):f.select(`[id="${e}"]`),l=b?.width??p.width,k=b?.height??p.width,x=b?.useMaxWidth??p.useMaxWidth,d=b?.nodeAlignment??p.nodeAlignment,v=b?.prefix??p.prefix,M=b?.suffix??p.suffix,T=b?.showValues??p.showValues,N=a.db.getGraph(),I=Xt[d];At().nodeId(g=>g.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(I).extent([[0,0],[l,k]])(N);const w=_t.ordinal(kt);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",g=>(g.uid=yt.next("node-")).id).attr("transform",function(g){return"translate("+g.x0+","+g.y0+")"}).attr("x",g=>g.x0).attr("y",g=>g.y0).append("rect").attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill",g=>w(g.id));const C=f.__name(({id:g,value:E})=>T?`${g}
7
+ ${v}${Math.round(E*100)/100}${M}`:g,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",g=>g.x0<l/2?g.x1+6:g.x0-6).attr("y",g=>(g.y1+g.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",g=>g.x0<l/2?"start":"end").text(C);const B=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(N.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),O=b?.linkColor??"gradient";if(O==="gradient"){const g=B.append("linearGradient").attr("id",E=>(E.uid=yt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);g.append("stop").attr("offset","0%").attr("stop-color",E=>w(E.source.id)),g.append("stop").attr("offset","100%").attr("stop-color",E=>w(E.target.id))}let D;switch(O){case"gradient":D=f.__name(g=>g.uid,"coloring");break;case"source":D=f.__name(g=>w(g.source.id),"coloring");break;case"target":D=f.__name(g=>w(g.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Bt()).attr("stroke",D).attr("stroke-width",g=>Math.max(1,g.width)),f.setupGraphViewbox(void 0,o,0,x)},"draw"),Kt={draw:Qt},Zt=f.__name(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
8
  `).trim(),"prepareTextForParsing"),Jt=f.__name(t=>`.label {
9
9
  font-family: ${t.fontFamily};
10
10
  }`,"getStyles"),te=Jt,ee=Q.parse.bind(Q);Q.parse=t=>ee(Zt(t));var ne={styles:te,parser:Q,db:Ht,renderer:Kt};exports.diagram=ne;