aitu-app 0.5.21 → 0.5.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +3 -3
  2. package/assets/{ChatMessagesArea-CAnmzKeA.js → ChatMessagesArea-DtzEt9y0.js} +3 -3
  3. package/assets/{Serializer-DPCLjt6U.js → Serializer-rTHzSF0Y.js} +1 -1
  4. package/assets/{ToolboxDrawer-D-ZDs49h.js → ToolboxDrawer-D0dL1xDI.js} +1 -1
  5. package/assets/{_baseUniq-CHS3E5If.js → _baseUniq-CJcN2wXt.js} +1 -1
  6. package/assets/{advancedFormat-Chr195ZY.js → advancedFormat-D3noAem-.js} +1 -1
  7. package/assets/{ai-analyze-D3V-tpIV.js → ai-analyze-DSNdzApa.js} +1 -1
  8. package/assets/{arc-lNLKXIKC.js → arc-DCMdqNJq.js} +1 -1
  9. package/assets/{architectureDiagram-VXUJARFQ-CCzBT9XK.js → architectureDiagram-VXUJARFQ-CNLyKX9W.js} +1 -1
  10. package/assets/{batch-image-generation-CgR-a8Ii.js → batch-image-generation-BEr8WnyA.js} +1 -1
  11. package/assets/{blockDiagram-38ab4fdb-CbcE_DRD.js → blockDiagram-38ab4fdb-BfuatLv6.js} +1 -1
  12. package/assets/{blockDiagram-VD42YOAC-CgcfCyW1.js → blockDiagram-VD42YOAC-Lc7hzFMW.js} +1 -1
  13. package/assets/{c4Diagram-3d4e48cf-DqzYo_xg.js → c4Diagram-3d4e48cf-CLYmRF8m.js} +1 -1
  14. package/assets/{c4Diagram-YG6GDRKO-BTZAWhX1.js → c4Diagram-YG6GDRKO-DFgYCXSR.js} +1 -1
  15. package/assets/channel-x6LKWmtX.js +1 -0
  16. package/assets/{chunk-4BX2VUAB-DH-I_3Sl.js → chunk-4BX2VUAB-ZP_vY4vZ.js} +1 -1
  17. package/assets/{chunk-55IACEB6-BJKBSn0v.js → chunk-55IACEB6-B5HoA7RC.js} +1 -1
  18. package/assets/{chunk-B4BG7PRW-BIhB4ChZ.js → chunk-B4BG7PRW-DYumBzJl.js} +1 -1
  19. package/assets/{chunk-DI55MBZ5-NlFLhYIc.js → chunk-DI55MBZ5-8cmxakR4.js} +1 -1
  20. package/assets/{chunk-FMBD7UC4-QVfOPBEJ.js → chunk-FMBD7UC4-CAoW1kf1.js} +1 -1
  21. package/assets/{chunk-QN33PNHL-C_DotWZ6.js → chunk-QN33PNHL-DT5Dd0sR.js} +1 -1
  22. package/assets/{chunk-QZHKN3VN-Ei6ogyMg.js → chunk-QZHKN3VN-CZH2zyPP.js} +1 -1
  23. package/assets/{chunk-TZMSLE5B-CKPTgIMs.js → chunk-TZMSLE5B-BX3lW2Ds.js} +1 -1
  24. package/assets/classDiagram-2ON5EDUG-xDDBDhvH.js +1 -0
  25. package/assets/{classDiagram-70f12bd4-DeAD0Lw4.js → classDiagram-70f12bd4-H_Ao4SWS.js} +1 -1
  26. package/assets/classDiagram-v2-WZHVMYZB-xDDBDhvH.js +1 -0
  27. package/assets/{classDiagram-v2-f2320105-DR43MMrr.js → classDiagram-v2-f2320105-wpOcN7Cp.js} +1 -1
  28. package/assets/clone-BliL8GTL.js +1 -0
  29. package/assets/{cose-bilkent-S5V4N54A-CE31mcuy.js → cose-bilkent-S5V4N54A-BpodmnGt.js} +1 -1
  30. package/assets/{createText-2e5e7dd3-DuyGuD-n.js → createText-2e5e7dd3-DevXK6aG.js} +1 -1
  31. package/assets/{cytoscape-cose-bilkent-DTqUuT3l.js → cytoscape-cose-bilkent-CfL2kyJn.js} +1 -1
  32. package/assets/{dagre-6UL2VRFP-CuJmVGl3.js → dagre-6UL2VRFP-DxcT4smm.js} +1 -1
  33. package/assets/{diagram-PSM6KHXK-D5Y5dlL9.js → diagram-PSM6KHXK-15LgvIqL.js} +1 -1
  34. package/assets/{diagram-QEK2KX5R-DOWAGxHq.js → diagram-QEK2KX5R-Cq44VPiw.js} +1 -1
  35. package/assets/{diagram-S2PKOQOG-ykMhl6fc.js → diagram-S2PKOQOG-DjR4N2-I.js} +1 -1
  36. package/assets/{edges-e0da2a9e-BpsZLv9t.js → edges-e0da2a9e-4-cJcCOg.js} +1 -1
  37. package/assets/{erDiagram-9861fffd-rZLPDBgy.js → erDiagram-9861fffd-CAhGmEfN.js} +1 -1
  38. package/assets/{erDiagram-Q2GNP2WA-zRo1erex.js → erDiagram-Q2GNP2WA-Bv6twqgU.js} +1 -1
  39. package/assets/{flowDb-956e92f1-f4MK2XS7.js → flowDb-956e92f1-7HzSxpZE.js} +1 -1
  40. package/assets/{flowDiagram-66a62f08-_6Eo5sZi.js → flowDiagram-66a62f08-Di0dNdDw.js} +1 -1
  41. package/assets/{flowDiagram-NV44I4VS-CFCClCRc.js → flowDiagram-NV44I4VS-jjJtsD7c.js} +1 -1
  42. package/assets/flowDiagram-v2-96b9c2cf-C7Z70T_R.js +1 -0
  43. package/assets/{flowchart-elk-definition-4a651766-t4QJuK_b.js → flowchart-elk-definition-4a651766-K2hM47DX.js} +1 -1
  44. package/assets/{ganttDiagram-JELNMOA3-DIX2ad-2.js → ganttDiagram-JELNMOA3-DcSqTXib.js} +1 -1
  45. package/assets/{ganttDiagram-c361ad54-dX5QjWrh.js → ganttDiagram-c361ad54-CH7Glt3P.js} +1 -1
  46. package/assets/{gitGraphDiagram-72cf32ee-BBZSqS6J.js → gitGraphDiagram-72cf32ee-BnEB0GU4.js} +1 -1
  47. package/assets/{gitGraphDiagram-NY62KEGX-C-FRyLSQ.js → gitGraphDiagram-NY62KEGX-O0TpP5xG.js} +1 -1
  48. package/assets/{graph-BpCqwwyJ.js → graph-BZ_Ixkdn.js} +1 -1
  49. package/assets/{graph-dwf5l9kJ.js → graph-DHfOf9vz.js} +1 -1
  50. package/assets/{grid-image-DRAUp_wj.js → grid-image-jIEBt3FV.js} +1 -1
  51. package/assets/{has-BBSmRLAB.js → has-C78hNt79.js} +1 -1
  52. package/assets/{hasIn-CGUnHN5L.js → hasIn-DNHU2Dgx.js} +1 -1
  53. package/assets/{index-3862675e-BmuXVGGA.js → index-3862675e-CQkaubhC.js} +1 -1
  54. package/assets/{index-DNIlXgAo.js → index-BNXtnhmh.js} +1 -1
  55. package/assets/{index-Ds1UcDjn.js → index-C6f1jS5T.js} +8 -8
  56. package/assets/{index-CISxTBJ3.js → index-CiiU0LMF.js} +1 -1
  57. package/assets/{index-DEjUAZUe.js → index-D1NStEds.js} +1 -1
  58. package/assets/{index-DvbaH1wH.js → index-DGb8pRqW.js} +1 -1
  59. package/assets/{index-DCs3C-gs.js → index-JhVJEcm-.js} +1 -1
  60. package/assets/{index-_FyCDKGq.js → index-QG8-KVAs.js} +4 -4
  61. package/assets/{index-eOV7y-oZ.js → index-sRDAAYLb.js} +1 -1
  62. package/assets/{infoDiagram-WHAUD3N6-Cw6LtQsv.js → infoDiagram-WHAUD3N6-CZKQnKde.js} +1 -1
  63. package/assets/{infoDiagram-f8f76790-suYKggbB.js → infoDiagram-f8f76790-Cq8UHTek.js} +1 -1
  64. package/assets/{inspiration-board-8CO8xK39.js → inspiration-board-CXBpTN2S.js} +1 -1
  65. package/assets/{isEmpty-BZ44SF3F.js → isEmpty-Bg6e-LN7.js} +1 -1
  66. package/assets/{journeyDiagram-49397b02-DLzRdow3.js → journeyDiagram-49397b02-u4P4ZPSo.js} +1 -1
  67. package/assets/{journeyDiagram-XKPGCS4Q-CcD6LNVi.js → journeyDiagram-XKPGCS4Q-DppWgwdD.js} +1 -1
  68. package/assets/{kanban-definition-3W4ZIXB7-DWA3YqY9.js → kanban-definition-3W4ZIXB7-Cu9Oq__U.js} +1 -1
  69. package/assets/{layout-D8KZ21ze.js → layout-Oya54E8b.js} +1 -1
  70. package/assets/{layout-jxFX0Ar3.js → layout-PukuJPWh.js} +1 -1
  71. package/assets/{line-B3fXWiyE.js → line-CCnY_Zjv.js} +1 -1
  72. package/assets/{linear-DsVcoO9v.js → linear-FgTbCOcj.js} +1 -1
  73. package/assets/{mermaid.core-ruaJ9d8x.js → mermaid.core-Bb0rcjVt.js} +4 -4
  74. package/assets/{min-B6fh4WRE.js → min-BYNXcs16.js} +1 -1
  75. package/assets/{mindmap-definition-VGOIOE7T-BzeNa7DW.js → mindmap-definition-VGOIOE7T-euTygwOP.js} +1 -1
  76. package/assets/{mindmap-definition-fc14e90a-C3sElkm0.js → mindmap-definition-fc14e90a-DMA7ROII.js} +1 -1
  77. package/assets/{photo-wall-splitter-C1GbxYBl.js → photo-wall-splitter-CAWxP47k.js} +1 -1
  78. package/assets/{pick-DUB8w7iE.js → pick-D_sga9lq.js} +1 -1
  79. package/assets/{pie-DAYMJpRO.js → pie-BWVaG8mI.js} +1 -1
  80. package/assets/{pieDiagram-8a3498a8-CZI3pF7g.js → pieDiagram-8a3498a8-JQ1MpLiZ.js} +1 -1
  81. package/assets/{pieDiagram-ADFJNKIX-BqonG77Q.js → pieDiagram-ADFJNKIX-BOGQkDt6.js} +1 -1
  82. package/assets/{quadrantDiagram-120e2f19-Q2bVMK-T.js → quadrantDiagram-120e2f19-kJzxW0Br.js} +1 -1
  83. package/assets/{quadrantDiagram-AYHSOK5B-yJZRIs-Q.js → quadrantDiagram-AYHSOK5B-UxkYiRF3.js} +1 -1
  84. package/assets/{requirementDiagram-UZGBJVZJ-3kaAkLjO.js → requirementDiagram-UZGBJVZJ-Bk95peTm.js} +1 -1
  85. package/assets/{requirementDiagram-deff3bca-DHOhXBYo.js → requirementDiagram-deff3bca-DwSHfS3q.js} +1 -1
  86. package/assets/{sankeyDiagram-04a897e0-3UqYNZg9.js → sankeyDiagram-04a897e0-Dee_8vG5.js} +1 -1
  87. package/assets/{sankeyDiagram-TZEHDZUN-Ce844Tbc.js → sankeyDiagram-TZEHDZUN-Dn-BrNQI.js} +1 -1
  88. package/assets/{sequenceDiagram-704730f1-CBXqjnXl.js → sequenceDiagram-704730f1-CK2_u2M2.js} +1 -1
  89. package/assets/{sequenceDiagram-WL72ISMW-DBN2cRGt.js → sequenceDiagram-WL72ISMW-PtdIXaXk.js} +1 -1
  90. package/assets/{settings-dialog-aU8BHcuS.js → settings-dialog-C4eZxway.js} +1 -1
  91. package/assets/{stateDiagram-587899a1-BGKPA37n.js → stateDiagram-587899a1-vSvTWjnf.js} +1 -1
  92. package/assets/{stateDiagram-FKZM4ZOC-Czg5Opf0.js → stateDiagram-FKZM4ZOC-DGbpdRXP.js} +1 -1
  93. package/assets/stateDiagram-v2-4FDKWEC3-C-2flGWR.js +1 -0
  94. package/assets/{stateDiagram-v2-d93cdb3a-DWU3UljE.js → stateDiagram-v2-d93cdb3a-BrPmXu5B.js} +1 -1
  95. package/assets/{styles-6aaf32cf-BVLDN8CD.js → styles-6aaf32cf-Cf3g-0g3.js} +1 -1
  96. package/assets/{styles-9a916d00-vSy8MhZp.js → styles-9a916d00--ZEFIk8R.js} +1 -1
  97. package/assets/{styles-c10674c1-dzTvI8BU.js → styles-c10674c1-DHwZqsJA.js} +1 -1
  98. package/assets/{svgDrawCommon-08f97a94-dptVwf62.js → svgDrawCommon-08f97a94-n9d3mPea.js} +1 -1
  99. package/assets/{timeline-definition-85554ec2-jKiT0ZaE.js → timeline-definition-85554ec2-H_sXtfLT.js} +1 -1
  100. package/assets/{timeline-definition-IT6M3QCI-B2NoE4jH.js → timeline-definition-IT6M3QCI-C-H3Ftyt.js} +1 -1
  101. package/assets/{treemap-KMMF4GRG-1nrNbz-r.js → treemap-KMMF4GRG-Cu1-wgRV.js} +1 -1
  102. package/assets/{ttd-dialog-WN-s4x87.js → ttd-dialog-TQYw_Nae.js} +5 -5
  103. package/assets/{union-B2D_ldts.js → union-DP4CDhaw.js} +1 -1
  104. package/assets/{upload-Crej215t.js → upload-DdSOuK5h.js} +1 -1
  105. package/assets/{video-recovery-service-Zb_336FQ.js → video-recovery-service-CZXUWRm1.js} +1 -1
  106. package/assets/{xychartDiagram-PRI3JC2R-UPkX0dfi.js → xychartDiagram-PRI3JC2R-CpjoxcIY.js} +1 -1
  107. package/assets/{xychartDiagram-e933f94c-BXYMaBZh.js → xychartDiagram-e933f94c-CTuQj9cZ.js} +1 -1
  108. package/assets/{zipObject-bwVIVuzi.js → zipObject-BF7eTaCR.js} +1 -1
  109. package/package.json +1 -1
  110. package/sw.js +7 -7
  111. package/version.json +2 -2
  112. package/assets/channel-Bew-Iahk.js +0 -1
  113. package/assets/classDiagram-2ON5EDUG-DIttp4Yk.js +0 -1
  114. package/assets/classDiagram-v2-WZHVMYZB-DIttp4Yk.js +0 -1
  115. package/assets/clone-Y0952eQY.js +0 -1
  116. package/assets/flowDiagram-v2-96b9c2cf-Dn2WmcvX.js +0 -1
  117. package/assets/stateDiagram-v2-4FDKWEC3-4Ev4KuVZ.js +0 -1
@@ -1,2 +1,2 @@
1
- import{_ as t,l as o,G as s,d as p,H as n}from"./mermaid.core-ruaJ9d8x.js";import{p as m}from"./treemap-KMMF4GRG-1nrNbz-r.js";import"./index-Ds1UcDjn.js";import"./Serializer-DPCLjt6U.js";import"./line-B3fXWiyE.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./isEmpty-BZ44SF3F.js";import"./min-B6fh4WRE.js";import"./_baseUniq-CHS3E5If.js";import"./hasIn-CGUnHN5L.js";var g={parse:t(async r=>{const a=await m("info",r);o.debug(a)},"parse")},d={version:n.version+""},v=t(()=>d.version,"getVersion"),c={getVersion:v},l=t((r,a,i)=>{o.debug(`rendering info diagram
1
+ import{_ as t,l as o,G as s,d as p,H as n}from"./mermaid.core-Bb0rcjVt.js";import{p as m}from"./treemap-KMMF4GRG-Cu1-wgRV.js";import"./index-C6f1jS5T.js";import"./Serializer-rTHzSF0Y.js";import"./line-CCnY_Zjv.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./isEmpty-Bg6e-LN7.js";import"./min-BYNXcs16.js";import"./_baseUniq-CJcN2wXt.js";import"./hasIn-DNHU2Dgx.js";var g={parse:t(async r=>{const a=await m("info",r);o.debug(a)},"parse")},d={version:n.version+""},v=t(()=>d.version,"getVersion"),c={getVersion:v},l=t((r,a,i)=>{o.debug(`rendering info diagram
2
2
  `+r);const e=s(a);p(e,100,400,!0),e.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw"),f={draw:l},h={parser:g,db:c,renderer:f};export{h as diagram};
@@ -1,4 +1,4 @@
1
- import{l as Y,z as D,d as M}from"./index-_FyCDKGq.js";import"./Serializer-DPCLjt6U.js";import"./index-Ds1UcDjn.js";import"./isEmpty-BZ44SF3F.js";var O=(function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
1
+ import{l as Y,z as D,d as M}from"./index-QG8-KVAs.js";import"./Serializer-rTHzSF0Y.js";import"./index-C6f1jS5T.js";import"./isEmpty-Bg6e-LN7.js";var O=(function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
2
2
  `+o.showPosition()+`
3
3
  Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(v+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,v=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,v,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=(function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{f as l,t as d,c as T,g as k,d as y,h}from"./index-Ds1UcDjn.js";function f(){var e;return k.get().imageModelName||((e=y[0])==null?void 0:e.id)||"gemini-2.5-flash-image-vip"}function M(t,e){const r=h.zh;return r(t,e)}function A(t,e){const{theme:r,imageCount:u=l.imageCount,imageSize:c="16x9",referenceImages:s,model:g}=t;if(!r||typeof r!="string")return{success:!1,error:"缺少必填参数 theme(主题描述)",type:"error"};const i=Math.min(Math.max(1,u),16),m=M(r,i),o=g||f(),n=s==null?void 0:s.map((a,I)=>({type:"url",url:a,name:`reference-${I+1}`}));try{let a;if(e!=null&&e.retryTaskId){if(d.retryTask(e.retryTaskId),a=d.getTask(e.retryTaskId),!a)throw new Error(`重试任务不存在: ${e.retryTaskId}`)}else a=d.createTask({prompt:m,size:c,model:o,uploadedImages:n&&n.length>0?n:void 0,isInspirationBoard:!0,inspirationBoardImageCount:i,inspirationBoardLayoutStyle:"inspiration-board",originalTheme:r,batchId:e==null?void 0:e.batchId,globalIndex:(e==null?void 0:e.globalIndex)||1,autoInsertToCanvas:!0},T.IMAGE);return{success:!0,data:{taskId:a.id,theme:r,imageCount:i,prompt:m.substring(0,100)+"..."},type:"image",taskId:a.id,task:a}}catch(a){return console.error("[InspirationBoard] Failed to create task:",a),{success:!1,error:a.message||"创建灵感图任务失败",type:"error"}}}export{A as createInspirationBoardTask};
1
+ import{f as l,t as d,c as T,g as k,d as y,h}from"./index-C6f1jS5T.js";function f(){var e;return k.get().imageModelName||((e=y[0])==null?void 0:e.id)||"gemini-2.5-flash-image-vip"}function M(t,e){const r=h.zh;return r(t,e)}function A(t,e){const{theme:r,imageCount:u=l.imageCount,imageSize:c="16x9",referenceImages:s,model:g}=t;if(!r||typeof r!="string")return{success:!1,error:"缺少必填参数 theme(主题描述)",type:"error"};const i=Math.min(Math.max(1,u),16),m=M(r,i),o=g||f(),n=s==null?void 0:s.map((a,I)=>({type:"url",url:a,name:`reference-${I+1}`}));try{let a;if(e!=null&&e.retryTaskId){if(d.retryTask(e.retryTaskId),a=d.getTask(e.retryTaskId),!a)throw new Error(`重试任务不存在: ${e.retryTaskId}`)}else a=d.createTask({prompt:m,size:c,model:o,uploadedImages:n&&n.length>0?n:void 0,isInspirationBoard:!0,inspirationBoardImageCount:i,inspirationBoardLayoutStyle:"inspiration-board",originalTheme:r,batchId:e==null?void 0:e.batchId,globalIndex:(e==null?void 0:e.globalIndex)||1,autoInsertToCanvas:!0},T.IMAGE);return{success:!0,data:{taskId:a.id,theme:r,imageCount:i,prompt:m.substring(0,100)+"..."},type:"image",taskId:a.id,task:a}}catch(a){return console.error("[InspirationBoard] Failed to create task:",a),{success:!1,error:a.message||"创建灵感图任务失败",type:"error"}}}export{A as createInspirationBoardTask};
@@ -1 +1 @@
1
- import{m as i,n as o,o as e,p as n,q as p,s as a,v as f,w as y}from"./index-Ds1UcDjn.js";var g="[object Map]",c="[object Set]",m=Object.prototype,b=m.hasOwnProperty;function j(r){if(r==null)return!0;if(i(r)&&(o(r)||typeof r=="string"||typeof r.splice=="function"||e(r)||n(r)||p(r)))return!r.length;var t=a(r);if(t==g||t==c)return!r.size;if(f(r))return!y(r).length;for(var s in r)if(b.call(r,s))return!1;return!0}export{j as i};
1
+ import{m as i,n as o,o as e,p as n,q as p,s as a,v as f,w as y}from"./index-C6f1jS5T.js";var g="[object Map]",c="[object Set]",m=Object.prototype,b=m.hasOwnProperty;function j(r){if(r==null)return!0;if(i(r)&&(o(r)||typeof r=="string"||typeof r.splice=="function"||e(r)||n(r)||p(r)))return!r.length;var t=a(r);if(t==g||t==c)return!r.size;if(f(r))return!y(r).length;for(var s in r)if(b.call(r,s))return!1;return!0}export{j as i};
@@ -1,4 +1,4 @@
1
- import{a as yt,s as ft,b as dt,c as pt,n as gt,o as mt,g as I,d as xt,q as kt}from"./index-_FyCDKGq.js";import{s as H}from"./Serializer-DPCLjt6U.js";import{a as _t,g as it,f as bt,d as vt}from"./svgDrawCommon-08f97a94-dptVwf62.js";import{d as Q}from"./arc-lNLKXIKC.js";import"./index-Ds1UcDjn.js";import"./isEmpty-BZ44SF3F.js";import"./path-CbwjOpE9.js";var X=(function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],l=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(s,r,a,u,d,o,w){var k=o.length-1;switch(d){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],o=[],w=this.table,k="",R=0,Z=0,lt=2,J=1,ct=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;o.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,q,A={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var O="";B=[];for(N in w[E])this.terminals_[N]&&N>lt&&B.push("'"+this.terminals_[N]+"'");x.showPosition?O="Parse error on line "+(R+1)+`:
1
+ import{a as yt,s as ft,b as dt,c as pt,n as gt,o as mt,g as I,d as xt,q as kt}from"./index-QG8-KVAs.js";import{s as H}from"./Serializer-rTHzSF0Y.js";import{a as _t,g as it,f as bt,d as vt}from"./svgDrawCommon-08f97a94-n9d3mPea.js";import{d as Q}from"./arc-DCMdqNJq.js";import"./index-C6f1jS5T.js";import"./isEmpty-Bg6e-LN7.js";import"./path-CbwjOpE9.js";var X=(function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],l=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(s,r,a,u,d,o,w){var k=o.length-1;switch(d){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],o=[],w=this.table,k="",R=0,Z=0,lt=2,J=1,ct=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;o.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,q,A={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var O="";B=[];for(N in w[E])this.terminals_[N]&&N>lt&&B.push("'"+this.terminals_[N]+"'");x.showPosition?O="Parse error on line "+(R+1)+`:
2
2
  `+x.showPosition()+`
3
3
  Expecting `+B.join(", ")+", got '"+(this.terminals_[_]||_)+"'":O="Parse error on line "+(R+1)+": Unexpected "+(_==J?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(O,{text:x.match,token:this.terminals_[_]||_,line:x.yylineno,loc:Y,expected:B})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:a.push(_),d.push(x.yytext),o.push(x.yylloc),a.push(b[1]),_=null,Z=x.yyleng,k=x.yytext,R=x.yylineno,Y=x.yylloc;break;case 2:if($=this.productions_[b[1]][1],A.$=d[d.length-$],A._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},ht&&(A._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(A,[k,Z,R,S.yy,b[1],d,o].concat(ct)),typeof q<"u")return q;$&&(a=a.slice(0,-1*$*2),d=d.slice(0,-1*$),o=o.slice(0,-1*$)),a.push(this.productions_[b[1]][0]),d.push(A.$),o.push(A._$),K=w[a[a.length-2]][a[a.length-1]],a.push(K);break;case 3:return!0}}return!0}},m=(function(){var p={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput:function(s,r){return this.yy=r||this.yy||{},this._input=s,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},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var r=s.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var r=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var u=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),a.length-1&&(this.yylineno-=a.length-1);var d=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:a?(a.length===u.length?this.yylloc.first_column:0)+u[u.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),r=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{a as gt,g as lt,f as mt,d as xt}from"./chunk-TZMSLE5B-CKPTgIMs.js";import{g as kt}from"./chunk-FMBD7UC4-QVfOPBEJ.js";import{_ as n,g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,c as R,d as $t,y as Mt}from"./mermaid.core-ruaJ9d8x.js";import{s as X}from"./Serializer-DPCLjt6U.js";import{d as et}from"./arc-lNLKXIKC.js";import"./index-Ds1UcDjn.js";import"./line-B3fXWiyE.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./isEmpty-BZ44SF3F.js";var U=(function(){var t=n(function(h,i,a,l){for(a=a||{},l=h.length;l--;a[h[l]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],s=[1,9],c=[1,10],r=[1,11],f=[1,12],u=[1,13],y=[1,14],g={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:n(function(i,a,l,d,p,o,b){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:d.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:n(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:n(function(i){var a=this,l=[0],d=[],p=[null],o=[],b=this.table,k="",C=0,K=0,dt=2,Q=1,yt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(i,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,p.length=p.length-w,o.length=o.length-w}n(pt,"popStack");function D(){var w;return w=d.pop()||_.lex()||Q,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=a.symbols_[w]||w),w}n(D,"lex");for(var v,A,T,q,F={},N,M,tt,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((v===null||typeof v>"u")&&(v=D()),T=b[A]&&b[A][v]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in b[A])this.terminals_[N]&&N>dt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
1
+ import{a as gt,g as lt,f as mt,d as xt}from"./chunk-TZMSLE5B-BX3lW2Ds.js";import{g as kt}from"./chunk-FMBD7UC4-CAoW1kf1.js";import{_ as n,g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,c as R,d as $t,y as Mt}from"./mermaid.core-Bb0rcjVt.js";import{s as X}from"./Serializer-rTHzSF0Y.js";import{d as et}from"./arc-DCMdqNJq.js";import"./index-C6f1jS5T.js";import"./line-CCnY_Zjv.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./isEmpty-Bg6e-LN7.js";var U=(function(){var t=n(function(h,i,a,l){for(a=a||{},l=h.length;l--;a[h[l]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],s=[1,9],c=[1,10],r=[1,11],f=[1,12],u=[1,13],y=[1,14],g={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:n(function(i,a,l,d,p,o,b){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:d.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:n(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:n(function(i){var a=this,l=[0],d=[],p=[null],o=[],b=this.table,k="",C=0,K=0,dt=2,Q=1,yt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(i,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,p.length=p.length-w,o.length=o.length-w}n(pt,"popStack");function D(){var w;return w=d.pop()||_.lex()||Q,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=a.symbols_[w]||w),w}n(D,"lex");for(var v,A,T,q,F={},N,M,tt,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((v===null||typeof v>"u")&&(v=D()),T=b[A]&&b[A][v]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in b[A])this.terminals_[N]&&N>dt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+z.join(", ")+", got '"+(this.terminals_[v]||v)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(v==Q?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+v);switch(T[0]){case 1:l.push(v),p.push(_.yytext),o.push(_.yylloc),l.push(T[1]),v=null,K=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=p[p.length-M],F._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},ft&&(F._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(F,[k,K,C,I.yy,T[1],p,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),p.push(F.$),o.push(F._$),tt=b[l[l.length-2]][l[l.length-1]],l.push(tt);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:n(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:n(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:n(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:n(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var d=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 p=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===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(i){this.unput(this.match.slice(i))},"less"),pastInput:n(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{_ as c,l as te,c as W,G as fe,V as ye,W as be,X as me,S as Ee,E as Y,h as F,t as _e,J as ke}from"./mermaid.core-ruaJ9d8x.js";import{g as Se}from"./chunk-FMBD7UC4-QVfOPBEJ.js";import{q as Ne,r as le,u as ce}from"./Serializer-DPCLjt6U.js";import"./index-Ds1UcDjn.js";import"./line-B3fXWiyE.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./isEmpty-BZ44SF3F.js";var $=(function(){var t=c(function(E,s,n,a){for(n=n||{},a=E.length;a--;n[E[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],_=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,G={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`:
1
+ import{_ as c,l as te,c as W,G as fe,V as ye,W as be,X as me,S as Ee,E as Y,h as F,t as _e,J as ke}from"./mermaid.core-Bb0rcjVt.js";import{g as Se}from"./chunk-FMBD7UC4-CAoW1kf1.js";import{q as Ne,r as le,u as ce}from"./Serializer-rTHzSF0Y.js";import"./index-C6f1jS5T.js";import"./line-CCnY_Zjv.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./isEmpty-Bg6e-LN7.js";var $=(function(){var t=c(function(E,s,n,a){for(n=n||{},a=E.length;a--;n[E[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],_=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,G={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+K.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:q,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+k);switch(v[0]){case 1:a.push(k),u.push(b.yytext),e.push(b.yylloc),a.push(v[1]),k=null,ie=b.yyleng,l=b.yytext,z=b.yylineno,q=b.yylloc;break;case 2:if(I=this.productions_[v[1]][1],G.$=u[u.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(G,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(G.$),e.push(G._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},m=(function(){var E={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,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:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=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),a.length-1&&(this.yylineno-=a.length-1);var u=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:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{G as k}from"./graph-dwf5l9kJ.js";import{a as f,f as C,r as O}from"./_baseUniq-CHS3E5If.js";import{m as w,d as _}from"./min-B6fh4WRE.js";import{r as y,u as q,m as x,a as W,f as z,z as xe,s as T,b as F,c as Ee,e as ye,d as Ne}from"./zipObject-bwVIVuzi.js";import{bZ as S,x as Le,A as g,n as Ie,b_ as M,b$ as _e,bq as j}from"./index-Ds1UcDjn.js";import{h as m}from"./has-BBSmRLAB.js";import{v as N}from"./union-B2D_ldts.js";import{p as P}from"./pick-DUB8w7iE.js";class Re{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return Z(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&Z(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Ce)),t=t._prev;return"["+n.join(", ")+"]"}}function Z(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ce(e,n){if(e!=="_next"&&e!=="_prev")return n}var Te=Le(1);function Se(e,n){if(e.nodeCount()<=1)return[];var r=Pe(e,n||Te),t=Me(r.graph,r.buckets,r.zeroIdx);return S(w(t,function(i){return e.outEdges(i.v,i.w)}))}function Me(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)A(e,n,r,a);for(;a=i.dequeue();)A(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat(A(e,n,r,a,!0));break}}}return t}function A(e,n,r,t,i){var o=i?[]:void 0;return f(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,$(n,r,d)}),f(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,s=e.node(d);s.in-=u,$(n,r,s)}),e.removeNode(t.v),o}function Pe(e,n){var r=new k,t=0,i=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var o=y(i+t+3).map(function(){return new Re}),a=t+1;return f(r.nodes(),function(u){$(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function $(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Oe(e){var n=e.graph().acyclicer==="greedy"?Se(e,r(e)):Fe(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,q("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Fe(e){var n=[],r={},t={};function i(o){m(t,o)||(t[o]=!0,r[o]=!0,f(e.outEdges(o),function(a){m(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return f(e.nodes(),i),n}function Ve(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function L(e,n,r,t){var i;do i=q(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function Ae(e){var n=new k().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function ue(e){var n=new k({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function K(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,s=u):(i<0&&(a=-a),d=a,s=a*o/i),{x:r+d,y:t+s}}function V(e){var n=w(y(de(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;g(i)||(n[i][t.order]=r)}),n}function Be(e){var n=_(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);m(t,"rank")&&(t.rank-=n)})}function Ye(e){var n=_(w(e.nodes(),function(o){return e.node(o).rank})),r=[];f(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;f(r,function(o,a){g(o)&&a%i!==0?--t:t&&f(o,function(u){e.node(u).rank+=t})})}function Q(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),L(e,"border",i,n)}function de(e){return x(w(e.nodes(),function(n){var r=e.node(n).rank;if(!g(r))return r}))}function De(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ge(e,n){return n()}function je(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),m(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)ee(e,"borderLeft","_bl",r,i,o),ee(e,"borderRight","_br",r,i,o)}}f(e.children(),n)}function ee(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],d=L(e,"border",a,r);i[n][o]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function $e(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&se(e)}function qe(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&We(e),(n==="lr"||n==="rl")&&(ze(e),se(e))}function se(e){f(e.nodes(),function(n){ne(e.node(n))}),f(e.edges(),function(n){ne(e.edge(n))})}function ne(e){var n=e.width;e.width=e.height,e.height=n}function We(e){f(e.nodes(),function(n){B(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,B),m(r,"y")&&B(r)})}function B(e){e.y=-e.y}function ze(e){f(e.nodes(),function(n){Y(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,Y),m(r,"x")&&Y(r)})}function Y(e){var n=e.x;e.x=e.y,e.y=n}function Xe(e){e.graph().dummyChains=[],f(e.edges(),function(n){Ue(e,n)})}function Ue(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(o!==t+1){e.removeEdge(n);var s,c,h;for(h=0,++t;t<o;++h,++t)u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},s=L(e,"edge",c,"_d"),t===d&&(c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos),e.setEdge(r,s,{weight:u.weight},a),h===0&&e.graph().dummyChains.push(s),r=s;e.setEdge(r,i,{weight:u.weight},a)}}function He(e){f(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function X(e){var n={};function r(t){var i=e.node(t);if(m(n,t))return i.rank;n[t]=!0;var o=_(w(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}f(e.sources(),r)}function R(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function fe(e){var n=new k({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;Je(n,e)<t;)i=Ze(n,e),o=n.hasNode(i.v)?R(e,i):-R(e,i),Ke(n,e,o);return n}function Je(e,n){function r(t){f(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!R(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return f(e.nodes(),r),e.nodeCount()}function Ze(e,n){return W(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return R(n,r)})}function Ke(e,n,r){f(e.nodes(),function(t){n.node(t).rank+=r})}function Qe(){}Qe.prototype=new Error;function ce(e,n,r){Ie(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return f(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);he(e,a,r==="post",o,t,i)}),i}function he(e,n,r,t,i,o){m(t,n)||(t[n]=!0,r||o.push(n),f(i(n),function(a){he(e,a,r,t,i,o)}),r&&o.push(n))}function en(e,n){return ce(e,n,"post")}function nn(e,n){return ce(e,n,"pre")}E.initLowLimValues=H;E.initCutValues=U;E.calcCutValue=le;E.leaveEdge=pe;E.enterEdge=me;E.exchangeEdges=we;function E(e){e=Ae(e),X(e);var n=fe(e);H(n),U(n,e);for(var r,t;r=pe(n);)t=me(n,e,r),we(n,e,r,t)}function U(e,n){var r=en(e,e.nodes());r=r.slice(0,r.length-1),f(r,function(t){rn(e,n,t)})}function rn(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=le(e,n,r)}function le(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,f(n.nodeEdges(r),function(d){var s=d.v===r,c=s?d.w:d.v;if(c!==i){var h=s===o,l=n.edge(d).weight;if(u+=h?l:-l,an(e,r,c)){var v=e.edge(r,c).cutvalue;u+=h?-v:v}}}),u}function H(e,n){arguments.length<2&&(n=e.nodes()[0]),ve(e,{},1,n)}function ve(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,f(e.neighbors(t),function(u){m(n,u)||(r=ve(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function pe(e){return z(e.edges(),function(n){return e.edge(n).cutvalue<0})}function me(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var s=C(n.edges(),function(c){return d===re(e,e.node(c.v),u)&&d!==re(e,e.node(c.w),u)});return W(s,function(c){return R(n,c)})}function we(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),H(e),U(e,n),tn(e,n)}function tn(e,n){var r=z(e.nodes(),function(i){return!n.node(i).parent}),t=nn(e,r);t=t.slice(1),f(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function an(e,n,r){return e.hasEdge(n,r)}function re(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function on(e){switch(e.graph().ranker){case"network-simplex":te(e);break;case"tight-tree":dn(e);break;case"longest-path":un(e);break;default:te(e)}}var un=X;function dn(e){X(e),fe(e)}function te(e){E(e)}function sn(e){var n=L(e,"root",{},"_root"),r=fn(e),t=x(N(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(a){e.edge(a).minlen*=i});var o=cn(e)+1;f(e.children(),function(a){be(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function be(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=Q(e,"_bt"),s=Q(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(s,a),c.borderBottom=s,f(u,function(h){be(e,n,r,t,i,o,h);var l=e.node(h),v=l.borderTop?l.borderTop:h,p=l.borderBottom?l.borderBottom:h,b=l.borderTop?t:2*t,I=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:I,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:I,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function fn(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&f(o,function(a){r(a,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function cn(e){return O(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function hn(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function ln(e,n,r){var t={},i;f(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function vn(e,n,r){var t=pn(e),i=new k({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return f(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),f(e[r](o),function(d){var s=d.v===o?d.w:d.v,c=i.edge(s,o),h=g(c)?0:c.weight;i.setEdge(s,o,{weight:e.edge(d).weight+h})}),m(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function pn(e){for(var n;e.hasNode(n=q("_root")););return n}function mn(e,n){for(var r=0,t=1;t<n.length;++t)r+=wn(e,n[t-1],n[t]);return r}function wn(e,n,r){for(var t=xe(r,w(r,function(s,c){return c})),i=S(w(n,function(s){return T(w(e.outEdges(s),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=w(new Array(a),function(){return 0}),d=0;return f(i.forEach(function(s){var c=s.pos+o;u[c]+=s.weight;for(var h=0;c>0;)c%2&&(h+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*h})),d}function bn(e){var n={},r=C(e.nodes(),function(u){return!e.children(u).length}),t=x(w(r,function(u){return e.node(u).rank})),i=w(y(t+1),function(){return[]});function o(u){if(!m(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),f(e.successors(u),o)}}var a=T(r,function(u){return e.node(u).rank});return f(a,o),i}function gn(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=O(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function kn(e,n){var r={};f(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};g(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),f(n.edges(),function(i){var o=r[i.v],a=r[i.w];!g(o)&&!g(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=C(r,function(i){return!i.indegree});return xn(t)}function xn(e){var n=[];function r(o){return function(a){a.merged||(g(a.barycenter)||g(o.barycenter)||a.barycenter>=o.barycenter)&&En(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return w(C(n,function(o){return!o.merged}),function(o){return P(o,["vs","i","barycenter","weight"])})}function En(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function yn(e,n){var r=De(e,function(c){return m(c,"barycenter")}),t=r.lhs,i=T(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort(Nn(!!n)),d=ie(o,i,d),f(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ie(o,i,d)});var s={vs:S(o)};return u&&(s.barycenter=a/u,s.weight=u),s}function ie(e,n,r){for(var t;n.length&&(t=M(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Nn(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function ge(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=C(i,function(p){return p!==a&&p!==u}));var s=gn(e,i);f(s,function(p){if(e.children(p.v).length){var b=ge(e,p.v,r,t);d[p.v]=b,m(b,"barycenter")&&In(p,b)}});var c=kn(s,r);Ln(c,d);var h=yn(c,t);if(a&&(h.vs=S([a,h.vs,u]),e.predecessors(a).length)){var l=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);m(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h}function Ln(e,n){f(e,function(r){r.vs=S(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function In(e,n){g(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function _n(e){var n=de(e),r=ae(e,y(1,n+1),"inEdges"),t=ae(e,y(n-1,-1,-1),"outEdges"),i=bn(e);oe(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Rn(u%2?r:t,u%4>=2),i=V(e);var s=mn(e,i);s<o&&(d=0,a=_e(i),o=s)}oe(e,a)}function ae(e,n,r){return w(n,function(t){return vn(e,t,r)})}function Rn(e,n){var r=new k;f(e,function(t){var i=t.graph().root,o=ge(t,i,r,n);f(o.vs,function(a,u){t.node(a).order=u}),ln(t,r,o.vs)})}function oe(e,n){f(n,function(r){f(r,function(t,i){e.node(t).order=i})})}function Cn(e){var n=Sn(e);f(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=Tn(e,n,i.v,i.w),a=o.path,u=o.lca,d=0,s=a[d],c=!0;r!==i.w;){if(t=e.node(r),c){for(;(s=a[d])!==u&&e.node(s).maxRank<t.rank;)d++;s===u&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(s=a[d+1]).minRank<=t.rank;)d++;s=a[d]}e.setParent(r,s),r=e.successors(r)[0]}})}function Tn(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),d,s;d=r;do d=e.parent(d),i.push(d);while(d&&(n[d].low>a||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)o.push(d);return{path:i.concat(o.reverse()),lca:s}}function Sn(e){var n={},r=0;function t(i){var o=r;f(e.children(i),t),n[i]={low:o,lim:r++}}return f(e.children(),t),n}function Mn(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,s=M(o);return f(o,function(c,h){var l=On(e,c),v=l?e.node(l).order:d;(l||c===s)&&(f(o.slice(u,h+1),function(p){f(e.predecessors(p),function(b){var I=e.node(b),J=I.order;(J<a||v<J)&&!(I.dummy&&e.node(p).dummy)&&ke(r,b,p)})}),u=h+1,a=v)}),o}return O(n,t),r}function Pn(e,n){var r={};function t(o,a,u,d,s){var c;f(y(a,u),function(h){c=o[h],e.node(c).dummy&&f(e.predecessors(c),function(l){var v=e.node(l);v.dummy&&(v.order<d||v.order>s)&&ke(r,l,c)})})}function i(o,a){var u=-1,d,s=0;return f(a,function(c,h){if(e.node(c).dummy==="border"){var l=e.predecessors(c);l.length&&(d=e.node(l[0]).order,t(a,s,h,u,d),s=h,u=d)}t(a,s,a.length,d,o.length)}),a}return O(n,i),r}function On(e,n){if(e.node(n).dummy)return z(e.predecessors(n),function(r){return e.node(r).dummy})}function ke(e,n,r){if(n>r){var t=n;n=r,r=t}var i=e[n];i||(e[n]=i={}),i[r]=!0}function Fn(e,n,r){if(n>r){var t=n;n=r,r=t}return m(e[n],r)}function Vn(e,n,r,t){var i={},o={},a={};return f(n,function(u){f(u,function(d,s){i[d]=d,o[d]=d,a[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=T(c,function(b){return a[b]});for(var h=(c.length-1)/2,l=Math.floor(h),v=Math.ceil(h);l<=v;++l){var p=c[l];o[s]===s&&d<a[p]&&!Fn(r,s,p)&&(o[p]=s,o[s]=i[s]=i[p],d=a[p])}}})}),{root:i,align:o}}function An(e,n,r,t,i){var o={},a=Bn(e,n,r,i),u=i?"borderLeft":"borderRight";function d(h,l){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?h(p):(b[p]=!0,v.push(p),v=v.concat(l(p))),p=v.pop()}function s(h){o[h]=a.inEdges(h).reduce(function(l,v){return Math.max(l,o[v.v]+a.edge(v))},0)}function c(h){var l=a.outEdges(h).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=e.node(h);l!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[h]=Math.max(o[h],l))}return d(s,a.predecessors.bind(a)),d(c,a.successors.bind(a)),f(t,function(h){o[h]=o[r[h]]}),o}function Bn(e,n,r,t){var i=new k,o=e.graph(),a=$n(o.nodesep,o.edgesep,t);return f(n,function(u){var d;f(u,function(s){var c=r[s];if(i.setNode(c),d){var h=r[d],l=i.edge(h,c);i.setEdge(h,c,Math.max(a(e,s,d),l||0))}d=s})}),i}function Yn(e,n){return W(N(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ee(r,function(o,a){var u=qn(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function Dn(e,n){var r=N(n),t=_(r),i=x(r);f(["u","d"],function(o){f(["l","r"],function(a){var u=o+a,d=e[u],s;if(d!==n){var c=N(d);s=a==="l"?t-_(c):i-x(c),s&&(e[u]=F(d,function(h){return h+s}))}})})}function Gn(e,n){return F(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=T(w(e,t));return(i[1]+i[2])/2})}function jn(e){var n=V(e),r=j(Mn(e,n),Pn(e,n)),t={},i;f(["u","d"],function(a){i=a==="u"?n:N(n).reverse(),f(["l","r"],function(u){u==="r"&&(i=w(i,function(h){return N(h).reverse()}));var d=(a==="u"?e.predecessors:e.successors).bind(e),s=Vn(e,i,r,d),c=An(e,i,s.root,s.align,u==="r");u==="r"&&(c=F(c,function(h){return-h})),t[a+u]=c})});var o=Yn(e,t);return Dn(t,o),Gn(t,e.graph().align)}function $n(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),d=0,s;if(d+=a.width/2,m(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2;break}if(s&&(d+=r?s:-s),s=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,m(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2;break}return s&&(d+=r?s:-s),s=0,d}}function qn(e,n){return e.node(n).width}function Wn(e){e=ue(e),zn(e),ye(jn(e),function(n,r){e.node(r).x=n})}function zn(e){var n=V(e),r=e.graph().ranksep,t=0;f(n,function(i){var o=x(w(i,function(a){return e.node(a).height}));f(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function Nr(e,n){var r=Ge;r("layout",function(){var t=r(" buildLayoutGraph",function(){return tr(e)});r(" runLayout",function(){Xn(t,r)}),r(" updateInputGraph",function(){Un(e,t)})})}function Xn(e,n){n(" makeSpaceForEdgeLabels",function(){ir(e)}),n(" removeSelfEdges",function(){lr(e)}),n(" acyclic",function(){Oe(e)}),n(" nestingGraph.run",function(){sn(e)}),n(" rank",function(){on(ue(e))}),n(" injectEdgeLabelProxies",function(){ar(e)}),n(" removeEmptyRanks",function(){Ye(e)}),n(" nestingGraph.cleanup",function(){hn(e)}),n(" normalizeRanks",function(){Be(e)}),n(" assignRankMinMax",function(){or(e)}),n(" removeEdgeLabelProxies",function(){ur(e)}),n(" normalize.run",function(){Xe(e)}),n(" parentDummyChains",function(){Cn(e)}),n(" addBorderSegments",function(){je(e)}),n(" order",function(){_n(e)}),n(" insertSelfEdges",function(){vr(e)}),n(" adjustCoordinateSystem",function(){$e(e)}),n(" position",function(){Wn(e)}),n(" positionSelfEdges",function(){pr(e)}),n(" removeBorderNodes",function(){hr(e)}),n(" normalize.undo",function(){He(e)}),n(" fixupEdgeLabelCoords",function(){fr(e)}),n(" undoCoordinateSystem",function(){qe(e)}),n(" translateGraph",function(){dr(e)}),n(" assignNodeIntersects",function(){sr(e)}),n(" reversePoints",function(){cr(e)}),n(" acyclic.undo",function(){Ve(e)})}function Un(e,n){f(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),f(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,m(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Hn=["nodesep","edgesep","ranksep","marginx","marginy"],Jn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Zn=["acyclicer","ranker","rankdir","align"],Kn=["width","height"],Qn={width:0,height:0},er=["minlen","weight","width","height","labeloffset"],nr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rr=["labelpos"];function tr(e){var n=new k({multigraph:!0,compound:!0}),r=G(e.graph());return n.setGraph(j({},Jn,D(r,Hn),P(r,Zn))),f(e.nodes(),function(t){var i=G(e.node(t));n.setNode(t,Ne(D(i,Kn),Qn)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var i=G(e.edge(t));n.setEdge(t,j({},nr,D(i,er),P(i,rr)))}),n}function ir(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function ar(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};L(e,"edge-proxy",o,"_ep")}})}function or(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=x(n,t.maxRank))}),e.graph().maxRank=n}function ur(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function dr(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(s){var c=s.x,h=s.y,l=s.width,v=s.height;n=Math.min(n,c-l/2),r=Math.max(r,c+l/2),t=Math.min(t,h-v/2),i=Math.max(i,h+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);m(c,"x")&&d(c)}),n-=a,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(h){h.x-=n,h.y-=t}),m(c,"x")&&(c.x-=n),m(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function sr(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(K(t,o)),r.points.push(K(i,a))})}function fr(e){f(e.edges(),function(n){var r=e.edge(n);if(m(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function cr(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function hr(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(M(r.borderLeft)),a=e.node(M(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function lr(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function vr(e){var n=V(e);f(n,function(r){var t=0;f(r,function(i,o){var a=e.node(i);a.order=o+t,f(a.selfEdges,function(u){L(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function pr(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function D(e,n){return F(P(e,n),Number)}function G(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Nr as l};
1
+ import{G as k}from"./graph-DHfOf9vz.js";import{a as f,f as C,r as O}from"./_baseUniq-CJcN2wXt.js";import{m as w,d as _}from"./min-BYNXcs16.js";import{r as y,u as q,m as x,a as W,f as z,z as xe,s as T,b as F,c as Ee,e as ye,d as Ne}from"./zipObject-BF7eTaCR.js";import{bZ as S,x as Le,A as g,n as Ie,b_ as M,b$ as _e,bq as j}from"./index-C6f1jS5T.js";import{h as m}from"./has-C78hNt79.js";import{v as N}from"./union-DP4CDhaw.js";import{p as P}from"./pick-D_sga9lq.js";class Re{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return Z(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&Z(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Ce)),t=t._prev;return"["+n.join(", ")+"]"}}function Z(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ce(e,n){if(e!=="_next"&&e!=="_prev")return n}var Te=Le(1);function Se(e,n){if(e.nodeCount()<=1)return[];var r=Pe(e,n||Te),t=Me(r.graph,r.buckets,r.zeroIdx);return S(w(t,function(i){return e.outEdges(i.v,i.w)}))}function Me(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)A(e,n,r,a);for(;a=i.dequeue();)A(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat(A(e,n,r,a,!0));break}}}return t}function A(e,n,r,t,i){var o=i?[]:void 0;return f(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,$(n,r,d)}),f(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,s=e.node(d);s.in-=u,$(n,r,s)}),e.removeNode(t.v),o}function Pe(e,n){var r=new k,t=0,i=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var o=y(i+t+3).map(function(){return new Re}),a=t+1;return f(r.nodes(),function(u){$(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function $(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Oe(e){var n=e.graph().acyclicer==="greedy"?Se(e,r(e)):Fe(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,q("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Fe(e){var n=[],r={},t={};function i(o){m(t,o)||(t[o]=!0,r[o]=!0,f(e.outEdges(o),function(a){m(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return f(e.nodes(),i),n}function Ve(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function L(e,n,r,t){var i;do i=q(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function Ae(e){var n=new k().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function ue(e){var n=new k({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function K(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,s=u):(i<0&&(a=-a),d=a,s=a*o/i),{x:r+d,y:t+s}}function V(e){var n=w(y(de(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;g(i)||(n[i][t.order]=r)}),n}function Be(e){var n=_(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);m(t,"rank")&&(t.rank-=n)})}function Ye(e){var n=_(w(e.nodes(),function(o){return e.node(o).rank})),r=[];f(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;f(r,function(o,a){g(o)&&a%i!==0?--t:t&&f(o,function(u){e.node(u).rank+=t})})}function Q(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),L(e,"border",i,n)}function de(e){return x(w(e.nodes(),function(n){var r=e.node(n).rank;if(!g(r))return r}))}function De(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ge(e,n){return n()}function je(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),m(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)ee(e,"borderLeft","_bl",r,i,o),ee(e,"borderRight","_br",r,i,o)}}f(e.children(),n)}function ee(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],d=L(e,"border",a,r);i[n][o]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function $e(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&se(e)}function qe(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&We(e),(n==="lr"||n==="rl")&&(ze(e),se(e))}function se(e){f(e.nodes(),function(n){ne(e.node(n))}),f(e.edges(),function(n){ne(e.edge(n))})}function ne(e){var n=e.width;e.width=e.height,e.height=n}function We(e){f(e.nodes(),function(n){B(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,B),m(r,"y")&&B(r)})}function B(e){e.y=-e.y}function ze(e){f(e.nodes(),function(n){Y(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,Y),m(r,"x")&&Y(r)})}function Y(e){var n=e.x;e.x=e.y,e.y=n}function Xe(e){e.graph().dummyChains=[],f(e.edges(),function(n){Ue(e,n)})}function Ue(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(o!==t+1){e.removeEdge(n);var s,c,h;for(h=0,++t;t<o;++h,++t)u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},s=L(e,"edge",c,"_d"),t===d&&(c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos),e.setEdge(r,s,{weight:u.weight},a),h===0&&e.graph().dummyChains.push(s),r=s;e.setEdge(r,i,{weight:u.weight},a)}}function He(e){f(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function X(e){var n={};function r(t){var i=e.node(t);if(m(n,t))return i.rank;n[t]=!0;var o=_(w(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}f(e.sources(),r)}function R(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function fe(e){var n=new k({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;Je(n,e)<t;)i=Ze(n,e),o=n.hasNode(i.v)?R(e,i):-R(e,i),Ke(n,e,o);return n}function Je(e,n){function r(t){f(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!R(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return f(e.nodes(),r),e.nodeCount()}function Ze(e,n){return W(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return R(n,r)})}function Ke(e,n,r){f(e.nodes(),function(t){n.node(t).rank+=r})}function Qe(){}Qe.prototype=new Error;function ce(e,n,r){Ie(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return f(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);he(e,a,r==="post",o,t,i)}),i}function he(e,n,r,t,i,o){m(t,n)||(t[n]=!0,r||o.push(n),f(i(n),function(a){he(e,a,r,t,i,o)}),r&&o.push(n))}function en(e,n){return ce(e,n,"post")}function nn(e,n){return ce(e,n,"pre")}E.initLowLimValues=H;E.initCutValues=U;E.calcCutValue=le;E.leaveEdge=pe;E.enterEdge=me;E.exchangeEdges=we;function E(e){e=Ae(e),X(e);var n=fe(e);H(n),U(n,e);for(var r,t;r=pe(n);)t=me(n,e,r),we(n,e,r,t)}function U(e,n){var r=en(e,e.nodes());r=r.slice(0,r.length-1),f(r,function(t){rn(e,n,t)})}function rn(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=le(e,n,r)}function le(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,f(n.nodeEdges(r),function(d){var s=d.v===r,c=s?d.w:d.v;if(c!==i){var h=s===o,l=n.edge(d).weight;if(u+=h?l:-l,an(e,r,c)){var v=e.edge(r,c).cutvalue;u+=h?-v:v}}}),u}function H(e,n){arguments.length<2&&(n=e.nodes()[0]),ve(e,{},1,n)}function ve(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,f(e.neighbors(t),function(u){m(n,u)||(r=ve(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function pe(e){return z(e.edges(),function(n){return e.edge(n).cutvalue<0})}function me(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var s=C(n.edges(),function(c){return d===re(e,e.node(c.v),u)&&d!==re(e,e.node(c.w),u)});return W(s,function(c){return R(n,c)})}function we(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),H(e),U(e,n),tn(e,n)}function tn(e,n){var r=z(e.nodes(),function(i){return!n.node(i).parent}),t=nn(e,r);t=t.slice(1),f(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function an(e,n,r){return e.hasEdge(n,r)}function re(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function on(e){switch(e.graph().ranker){case"network-simplex":te(e);break;case"tight-tree":dn(e);break;case"longest-path":un(e);break;default:te(e)}}var un=X;function dn(e){X(e),fe(e)}function te(e){E(e)}function sn(e){var n=L(e,"root",{},"_root"),r=fn(e),t=x(N(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(a){e.edge(a).minlen*=i});var o=cn(e)+1;f(e.children(),function(a){be(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function be(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=Q(e,"_bt"),s=Q(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(s,a),c.borderBottom=s,f(u,function(h){be(e,n,r,t,i,o,h);var l=e.node(h),v=l.borderTop?l.borderTop:h,p=l.borderBottom?l.borderBottom:h,b=l.borderTop?t:2*t,I=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:I,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:I,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function fn(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&f(o,function(a){r(a,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function cn(e){return O(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function hn(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function ln(e,n,r){var t={},i;f(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function vn(e,n,r){var t=pn(e),i=new k({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return f(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),f(e[r](o),function(d){var s=d.v===o?d.w:d.v,c=i.edge(s,o),h=g(c)?0:c.weight;i.setEdge(s,o,{weight:e.edge(d).weight+h})}),m(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function pn(e){for(var n;e.hasNode(n=q("_root")););return n}function mn(e,n){for(var r=0,t=1;t<n.length;++t)r+=wn(e,n[t-1],n[t]);return r}function wn(e,n,r){for(var t=xe(r,w(r,function(s,c){return c})),i=S(w(n,function(s){return T(w(e.outEdges(s),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=w(new Array(a),function(){return 0}),d=0;return f(i.forEach(function(s){var c=s.pos+o;u[c]+=s.weight;for(var h=0;c>0;)c%2&&(h+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*h})),d}function bn(e){var n={},r=C(e.nodes(),function(u){return!e.children(u).length}),t=x(w(r,function(u){return e.node(u).rank})),i=w(y(t+1),function(){return[]});function o(u){if(!m(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),f(e.successors(u),o)}}var a=T(r,function(u){return e.node(u).rank});return f(a,o),i}function gn(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=O(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function kn(e,n){var r={};f(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};g(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),f(n.edges(),function(i){var o=r[i.v],a=r[i.w];!g(o)&&!g(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=C(r,function(i){return!i.indegree});return xn(t)}function xn(e){var n=[];function r(o){return function(a){a.merged||(g(a.barycenter)||g(o.barycenter)||a.barycenter>=o.barycenter)&&En(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return w(C(n,function(o){return!o.merged}),function(o){return P(o,["vs","i","barycenter","weight"])})}function En(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function yn(e,n){var r=De(e,function(c){return m(c,"barycenter")}),t=r.lhs,i=T(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort(Nn(!!n)),d=ie(o,i,d),f(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ie(o,i,d)});var s={vs:S(o)};return u&&(s.barycenter=a/u,s.weight=u),s}function ie(e,n,r){for(var t;n.length&&(t=M(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Nn(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function ge(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=C(i,function(p){return p!==a&&p!==u}));var s=gn(e,i);f(s,function(p){if(e.children(p.v).length){var b=ge(e,p.v,r,t);d[p.v]=b,m(b,"barycenter")&&In(p,b)}});var c=kn(s,r);Ln(c,d);var h=yn(c,t);if(a&&(h.vs=S([a,h.vs,u]),e.predecessors(a).length)){var l=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);m(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h}function Ln(e,n){f(e,function(r){r.vs=S(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function In(e,n){g(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function _n(e){var n=de(e),r=ae(e,y(1,n+1),"inEdges"),t=ae(e,y(n-1,-1,-1),"outEdges"),i=bn(e);oe(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Rn(u%2?r:t,u%4>=2),i=V(e);var s=mn(e,i);s<o&&(d=0,a=_e(i),o=s)}oe(e,a)}function ae(e,n,r){return w(n,function(t){return vn(e,t,r)})}function Rn(e,n){var r=new k;f(e,function(t){var i=t.graph().root,o=ge(t,i,r,n);f(o.vs,function(a,u){t.node(a).order=u}),ln(t,r,o.vs)})}function oe(e,n){f(n,function(r){f(r,function(t,i){e.node(t).order=i})})}function Cn(e){var n=Sn(e);f(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=Tn(e,n,i.v,i.w),a=o.path,u=o.lca,d=0,s=a[d],c=!0;r!==i.w;){if(t=e.node(r),c){for(;(s=a[d])!==u&&e.node(s).maxRank<t.rank;)d++;s===u&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(s=a[d+1]).minRank<=t.rank;)d++;s=a[d]}e.setParent(r,s),r=e.successors(r)[0]}})}function Tn(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),d,s;d=r;do d=e.parent(d),i.push(d);while(d&&(n[d].low>a||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)o.push(d);return{path:i.concat(o.reverse()),lca:s}}function Sn(e){var n={},r=0;function t(i){var o=r;f(e.children(i),t),n[i]={low:o,lim:r++}}return f(e.children(),t),n}function Mn(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,s=M(o);return f(o,function(c,h){var l=On(e,c),v=l?e.node(l).order:d;(l||c===s)&&(f(o.slice(u,h+1),function(p){f(e.predecessors(p),function(b){var I=e.node(b),J=I.order;(J<a||v<J)&&!(I.dummy&&e.node(p).dummy)&&ke(r,b,p)})}),u=h+1,a=v)}),o}return O(n,t),r}function Pn(e,n){var r={};function t(o,a,u,d,s){var c;f(y(a,u),function(h){c=o[h],e.node(c).dummy&&f(e.predecessors(c),function(l){var v=e.node(l);v.dummy&&(v.order<d||v.order>s)&&ke(r,l,c)})})}function i(o,a){var u=-1,d,s=0;return f(a,function(c,h){if(e.node(c).dummy==="border"){var l=e.predecessors(c);l.length&&(d=e.node(l[0]).order,t(a,s,h,u,d),s=h,u=d)}t(a,s,a.length,d,o.length)}),a}return O(n,i),r}function On(e,n){if(e.node(n).dummy)return z(e.predecessors(n),function(r){return e.node(r).dummy})}function ke(e,n,r){if(n>r){var t=n;n=r,r=t}var i=e[n];i||(e[n]=i={}),i[r]=!0}function Fn(e,n,r){if(n>r){var t=n;n=r,r=t}return m(e[n],r)}function Vn(e,n,r,t){var i={},o={},a={};return f(n,function(u){f(u,function(d,s){i[d]=d,o[d]=d,a[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=T(c,function(b){return a[b]});for(var h=(c.length-1)/2,l=Math.floor(h),v=Math.ceil(h);l<=v;++l){var p=c[l];o[s]===s&&d<a[p]&&!Fn(r,s,p)&&(o[p]=s,o[s]=i[s]=i[p],d=a[p])}}})}),{root:i,align:o}}function An(e,n,r,t,i){var o={},a=Bn(e,n,r,i),u=i?"borderLeft":"borderRight";function d(h,l){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?h(p):(b[p]=!0,v.push(p),v=v.concat(l(p))),p=v.pop()}function s(h){o[h]=a.inEdges(h).reduce(function(l,v){return Math.max(l,o[v.v]+a.edge(v))},0)}function c(h){var l=a.outEdges(h).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=e.node(h);l!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[h]=Math.max(o[h],l))}return d(s,a.predecessors.bind(a)),d(c,a.successors.bind(a)),f(t,function(h){o[h]=o[r[h]]}),o}function Bn(e,n,r,t){var i=new k,o=e.graph(),a=$n(o.nodesep,o.edgesep,t);return f(n,function(u){var d;f(u,function(s){var c=r[s];if(i.setNode(c),d){var h=r[d],l=i.edge(h,c);i.setEdge(h,c,Math.max(a(e,s,d),l||0))}d=s})}),i}function Yn(e,n){return W(N(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ee(r,function(o,a){var u=qn(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function Dn(e,n){var r=N(n),t=_(r),i=x(r);f(["u","d"],function(o){f(["l","r"],function(a){var u=o+a,d=e[u],s;if(d!==n){var c=N(d);s=a==="l"?t-_(c):i-x(c),s&&(e[u]=F(d,function(h){return h+s}))}})})}function Gn(e,n){return F(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=T(w(e,t));return(i[1]+i[2])/2})}function jn(e){var n=V(e),r=j(Mn(e,n),Pn(e,n)),t={},i;f(["u","d"],function(a){i=a==="u"?n:N(n).reverse(),f(["l","r"],function(u){u==="r"&&(i=w(i,function(h){return N(h).reverse()}));var d=(a==="u"?e.predecessors:e.successors).bind(e),s=Vn(e,i,r,d),c=An(e,i,s.root,s.align,u==="r");u==="r"&&(c=F(c,function(h){return-h})),t[a+u]=c})});var o=Yn(e,t);return Dn(t,o),Gn(t,e.graph().align)}function $n(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),d=0,s;if(d+=a.width/2,m(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2;break}if(s&&(d+=r?s:-s),s=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,m(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2;break}return s&&(d+=r?s:-s),s=0,d}}function qn(e,n){return e.node(n).width}function Wn(e){e=ue(e),zn(e),ye(jn(e),function(n,r){e.node(r).x=n})}function zn(e){var n=V(e),r=e.graph().ranksep,t=0;f(n,function(i){var o=x(w(i,function(a){return e.node(a).height}));f(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function Nr(e,n){var r=Ge;r("layout",function(){var t=r(" buildLayoutGraph",function(){return tr(e)});r(" runLayout",function(){Xn(t,r)}),r(" updateInputGraph",function(){Un(e,t)})})}function Xn(e,n){n(" makeSpaceForEdgeLabels",function(){ir(e)}),n(" removeSelfEdges",function(){lr(e)}),n(" acyclic",function(){Oe(e)}),n(" nestingGraph.run",function(){sn(e)}),n(" rank",function(){on(ue(e))}),n(" injectEdgeLabelProxies",function(){ar(e)}),n(" removeEmptyRanks",function(){Ye(e)}),n(" nestingGraph.cleanup",function(){hn(e)}),n(" normalizeRanks",function(){Be(e)}),n(" assignRankMinMax",function(){or(e)}),n(" removeEdgeLabelProxies",function(){ur(e)}),n(" normalize.run",function(){Xe(e)}),n(" parentDummyChains",function(){Cn(e)}),n(" addBorderSegments",function(){je(e)}),n(" order",function(){_n(e)}),n(" insertSelfEdges",function(){vr(e)}),n(" adjustCoordinateSystem",function(){$e(e)}),n(" position",function(){Wn(e)}),n(" positionSelfEdges",function(){pr(e)}),n(" removeBorderNodes",function(){hr(e)}),n(" normalize.undo",function(){He(e)}),n(" fixupEdgeLabelCoords",function(){fr(e)}),n(" undoCoordinateSystem",function(){qe(e)}),n(" translateGraph",function(){dr(e)}),n(" assignNodeIntersects",function(){sr(e)}),n(" reversePoints",function(){cr(e)}),n(" acyclic.undo",function(){Ve(e)})}function Un(e,n){f(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),f(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,m(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Hn=["nodesep","edgesep","ranksep","marginx","marginy"],Jn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Zn=["acyclicer","ranker","rankdir","align"],Kn=["width","height"],Qn={width:0,height:0},er=["minlen","weight","width","height","labeloffset"],nr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rr=["labelpos"];function tr(e){var n=new k({multigraph:!0,compound:!0}),r=G(e.graph());return n.setGraph(j({},Jn,D(r,Hn),P(r,Zn))),f(e.nodes(),function(t){var i=G(e.node(t));n.setNode(t,Ne(D(i,Kn),Qn)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var i=G(e.edge(t));n.setEdge(t,j({},nr,D(i,er),P(i,rr)))}),n}function ir(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function ar(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};L(e,"edge-proxy",o,"_ep")}})}function or(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=x(n,t.maxRank))}),e.graph().maxRank=n}function ur(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function dr(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(s){var c=s.x,h=s.y,l=s.width,v=s.height;n=Math.min(n,c-l/2),r=Math.max(r,c+l/2),t=Math.min(t,h-v/2),i=Math.max(i,h+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);m(c,"x")&&d(c)}),n-=a,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(h){h.x-=n,h.y-=t}),m(c,"x")&&(c.x-=n),m(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function sr(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(K(t,o)),r.points.push(K(i,a))})}function fr(e){f(e.edges(),function(n){var r=e.edge(n);if(m(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function cr(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function hr(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(M(r.borderLeft)),a=e.node(M(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function lr(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function vr(e){var n=V(e);f(n,function(r){var t=0;f(r,function(i,o){var a=e.node(i);a.order=o+t,f(a.selfEdges,function(u){L(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function pr(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function D(e,n){return F(P(e,n),Number)}function G(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Nr as l};
@@ -1 +1 @@
1
- import{G as y}from"./graph-BpCqwwyJ.js";import{a as f,f as P,r as j}from"./_baseUniq-CHS3E5If.js";import{m as w,d as L}from"./min-B6fh4WRE.js";import{r as x,u as $,m as g,a as q,f as W,z as ke,s as _,c as xe,b as S,e as Ee,d as Oe}from"./zipObject-bwVIVuzi.js";import{bZ as R,x as Ne,A as b,n as Le,b_ as C,b$ as Ie,bq as D}from"./index-Ds1UcDjn.js";import{h as ie}from"./has-BBSmRLAB.js";import{v as E}from"./union-B2D_ldts.js";import{p as T}from"./pick-DUB8w7iE.js";class Pe{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return J(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&J(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,_e)),t=t._prev;return"["+n.join(", ")+"]"}}function J(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function _e(e,n){if(e!=="_next"&&e!=="_prev")return n}var Re=Ne(1);function Ce(e,n){if(e.nodeCount()<=1)return[];var r=je(e,n||Re),t=Te(r.graph,r.buckets,r.zeroIdx);return R(w(t,function(a){return e.outEdges(a.v,a.w)}))}function Te(e,n,r){for(var t=[],a=n[n.length-1],i=n[0],o;e.nodeCount();){for(;o=i.dequeue();)F(e,n,r,o);for(;o=a.dequeue();)F(e,n,r,o);if(e.nodeCount()){for(var d=n.length-2;d>0;--d)if(o=n[d].dequeue(),o){t=t.concat(F(e,n,r,o,!0));break}}}return t}function F(e,n,r,t,a){var i=a?[]:void 0;return f(e.inEdges(t.v),function(o){var d=e.edge(o),u=e.node(o.v);a&&i.push({v:o.v,w:o.w}),u.out-=d,G(n,r,u)}),f(e.outEdges(t.v),function(o){var d=e.edge(o),u=o.w,s=e.node(u);s.in-=d,G(n,r,s)}),e.removeNode(t.v),i}function je(e,n){var r=new y,t=0,a=0;f(e.nodes(),function(d){r.setNode(d,{v:d,in:0,out:0})}),f(e.edges(),function(d){var u=r.edge(d.v,d.w)||0,s=n(d),c=u+s;r.setEdge(d.v,d.w,c),a=Math.max(a,r.node(d.v).out+=s),t=Math.max(t,r.node(d.w).in+=s)});var i=x(a+t+3).map(function(){return new Pe}),o=t+1;return f(r.nodes(),function(d){G(i,o,r.node(d))}),{graph:r,buckets:i,zeroIdx:o}}function G(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Se(e){var n=e.graph().acyclicer==="greedy"?Ce(e,r(e)):Me(e);f(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,$("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function Me(e){var n=[],r={},t={};function a(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,f(e.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?n.push(o):a(o.w)}),delete r[i])}return f(e.nodes(),a),n}function Fe(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function O(e,n,r,t){var a;do a=$(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function Ve(e){var n=new y().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function de(e){var n=new y({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Z(e,n){var r=e.x,t=e.y,a=n.x-r,i=n.y-t,o=e.width/2,d=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var u,s;return Math.abs(i)*o>Math.abs(a)*d?(i<0&&(d=-d),u=d*a/i,s=d):(a<0&&(o=-o),u=o,s=o*i/a),{x:r+u,y:t+s}}function M(e){var n=w(x(ue(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),a=t.rank;b(a)||(n[a][t.order]=r)}),n}function Ae(e){var n=L(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);ie(t,"rank")&&(t.rank-=n)})}function Be(e){var n=L(w(e.nodes(),function(i){return e.node(i).rank})),r=[];f(e.nodes(),function(i){var o=e.node(i).rank-n;r[o]||(r[o]=[]),r[o].push(i)});var t=0,a=e.graph().nodeRankFactor;f(r,function(i,o){b(i)&&o%a!==0?--t:t&&f(i,function(d){e.node(d).rank+=t})})}function K(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),O(e,"border",a,n)}function ue(e){return g(w(e.nodes(),function(n){var r=e.node(n).rank;if(!b(r))return r}))}function Ye(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function De(e,n){return n()}function Ge(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;i<o;++i)Q(e,"borderLeft","_bl",r,a,i),Q(e,"borderRight","_br",r,a,i)}}f(e.children(),n)}function Q(e,n,r,t,a,i){var o={width:0,height:0,rank:i,borderType:n},d=a[n][i-1],u=O(e,"border",o,r);a[n][i]=u,e.setParent(u,t),d&&e.setEdge(d,u,{weight:1})}function $e(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&se(e)}function qe(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&We(e),(n==="lr"||n==="rl")&&(ze(e),se(e))}function se(e){f(e.nodes(),function(n){ee(e.node(n))}),f(e.edges(),function(n){ee(e.edge(n))})}function ee(e){var n=e.width;e.width=e.height,e.height=n}function We(e){f(e.nodes(),function(n){V(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,V),Object.prototype.hasOwnProperty.call(r,"y")&&V(r)})}function V(e){e.y=-e.y}function ze(e){f(e.nodes(),function(n){A(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,A),Object.prototype.hasOwnProperty.call(r,"x")&&A(r)})}function A(e){var n=e.x;e.x=e.y,e.y=n}function Xe(e){e.graph().dummyChains=[],f(e.edges(),function(n){Ue(e,n)})}function Ue(e,n){var r=n.v,t=e.node(r).rank,a=n.w,i=e.node(a).rank,o=n.name,d=e.edge(n),u=d.labelRank;if(i!==t+1){e.removeEdge(n);var s=void 0,c,l;for(l=0,++t;t<i;++l,++t)d.points=[],s={width:0,height:0,edgeLabel:d,edgeObj:n,rank:t},c=O(e,"edge",s,"_d"),t===u&&(s.width=d.width,s.height=d.height,s.dummy="edge-label",s.labelpos=d.labelpos),e.setEdge(r,c,{weight:d.weight},o),l===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,a,{weight:d.weight},o)}}function He(e){f(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,a;for(e.setEdge(r.edgeObj,t);r.dummy;)a=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=a,r=e.node(n)})}function z(e){var n={};function r(t){var a=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return a.rank;n[t]=!0;var i=L(w(e.outEdges(t),function(o){return r(o.w)-e.edge(o).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}f(e.sources(),r)}function I(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function fe(e){var n=new y({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var a,i;Je(n,e)<t;)a=Ze(n,e),i=n.hasNode(a.v)?I(e,a):-I(e,a),Ke(n,e,i);return n}function Je(e,n){function r(t){f(n.nodeEdges(t),function(a){var i=a.v,o=t===i?a.w:i;!e.hasNode(o)&&!I(n,a)&&(e.setNode(o,{}),e.setEdge(t,o,{}),r(o))})}return f(e.nodes(),r),e.nodeCount()}function Ze(e,n){return q(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return I(n,r)})}function Ke(e,n,r){f(e.nodes(),function(t){n.node(t).rank+=r})}function Qe(){}Qe.prototype=new Error;function ce(e,n,r){Le(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],i={};return f(n,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);le(e,o,r==="post",i,t,a)}),a}function le(e,n,r,t,a,i){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||i.push(n),f(a(n),function(o){le(e,o,r,t,a,i)}),r&&i.push(n))}function en(e,n){return ce(e,n,"post")}function nn(e,n){return ce(e,n,"pre")}k.initLowLimValues=U;k.initCutValues=X;k.calcCutValue=he;k.leaveEdge=pe;k.enterEdge=we;k.exchangeEdges=me;function k(e){e=Ve(e),z(e);var n=fe(e);U(n),X(n,e);for(var r,t;r=pe(n);)t=we(n,e,r),me(n,e,r,t)}function X(e,n){var r=en(e,e.nodes());r=r.slice(0,r.length-1),f(r,function(t){rn(e,n,t)})}function rn(e,n,r){var t=e.node(r),a=t.parent;e.edge(r,a).cutvalue=he(e,n,r)}function he(e,n,r){var t=e.node(r),a=t.parent,i=!0,o=n.edge(r,a),d=0;return o||(i=!1,o=n.edge(a,r)),d=o.weight,f(n.nodeEdges(r),function(u){var s=u.v===r,c=s?u.w:u.v;if(c!==a){var l=s===i,h=n.edge(u).weight;if(d+=l?h:-h,an(e,r,c)){var v=e.edge(r,c).cutvalue;d+=l?-v:v}}}),d}function U(e,n){arguments.length<2&&(n=e.nodes()[0]),ve(e,{},1,n)}function ve(e,n,r,t,a){var i=r,o=e.node(t);return n[t]=!0,f(e.neighbors(t),function(d){Object.prototype.hasOwnProperty.call(n,d)||(r=ve(e,n,r,d,t))}),o.low=i,o.lim=r++,a?o.parent=a:delete o.parent,r}function pe(e){return W(e.edges(),function(n){return e.edge(n).cutvalue<0})}function we(e,n,r){var t=r.v,a=r.w;n.hasEdge(t,a)||(t=r.w,a=r.v);var i=e.node(t),o=e.node(a),d=i,u=!1;i.lim>o.lim&&(d=o,u=!0);var s=P(n.edges(),function(c){return u===ne(e,e.node(c.v),d)&&u!==ne(e,e.node(c.w),d)});return q(s,function(c){return I(n,c)})}function me(e,n,r,t){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(t.v,t.w,{}),U(e),X(e,n),tn(e,n)}function tn(e,n){var r=W(e.nodes(),function(a){return!n.node(a).parent}),t=nn(e,r);t=t.slice(1),f(t,function(a){var i=e.node(a).parent,o=n.edge(a,i),d=!1;o||(o=n.edge(i,a),d=!0),n.node(a).rank=n.node(i).rank+(d?o.minlen:-o.minlen)})}function an(e,n,r){return e.hasEdge(n,r)}function ne(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function on(e){switch(e.graph().ranker){case"network-simplex":re(e);break;case"tight-tree":un(e);break;case"longest-path":dn(e);break;default:re(e)}}var dn=z;function un(e){z(e),fe(e)}function re(e){k(e)}function sn(e){var n=O(e,"root",{},"_root"),r=fn(e),t=g(E(r))-1,a=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(o){e.edge(o).minlen*=a});var i=cn(e)+1;f(e.children(),function(o){be(e,n,a,i,t,r,o)}),e.graph().nodeRankFactor=a}function be(e,n,r,t,a,i,o){var d=e.children(o);if(!d.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var u=K(e,"_bt"),s=K(e,"_bb"),c=e.node(o);e.setParent(u,o),c.borderTop=u,e.setParent(s,o),c.borderBottom=s,f(d,function(l){be(e,n,r,t,a,i,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,m=h.borderTop?t:2*t,N=v!==p?1:a-i[o]+1;e.setEdge(u,v,{weight:m,minlen:N,nestingEdge:!0}),e.setEdge(p,s,{weight:m,minlen:N,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,u,{weight:0,minlen:a+i[o]})}function fn(e){var n={};function r(t,a){var i=e.children(t);i&&i.length&&f(i,function(o){r(o,a+1)}),n[t]=a}return f(e.children(),function(t){r(t,1)}),n}function cn(e){return j(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function ln(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function hn(e,n,r){var t={},a;f(r,function(i){for(var o=e.parent(i),d,u;o;){if(d=e.parent(o),d?(u=t[d],t[d]=o):(u=a,a=o),u&&u!==o){n.setEdge(u,o);return}o=d}})}function vn(e,n,r){var t=pn(e),a=new y({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(i){return e.node(i)});return f(e.nodes(),function(i){var o=e.node(i),d=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,d||t),f(e[r](i),function(u){var s=u.v===i?u.w:u.v,c=a.edge(s,i),l=b(c)?0:c.weight;a.setEdge(s,i,{weight:e.edge(u).weight+l})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}function pn(e){for(var n;e.hasNode(n=$("_root")););return n}function wn(e,n){for(var r=0,t=1;t<n.length;++t)r+=mn(e,n[t-1],n[t]);return r}function mn(e,n,r){for(var t=ke(r,w(r,function(s,c){return c})),a=R(w(n,function(s){return _(w(e.outEdges(s),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var o=2*i-1;i-=1;var d=w(new Array(o),function(){return 0}),u=0;return f(a.forEach(function(s){var c=s.pos+i;d[c]+=s.weight;for(var l=0;c>0;)c%2&&(l+=d[c+1]),c=c-1>>1,d[c]+=s.weight;u+=s.weight*l})),u}function bn(e){var n={},r=P(e.nodes(),function(d){return!e.children(d).length}),t=g(w(r,function(d){return e.node(d).rank})),a=w(x(t+1),function(){return[]});function i(d){if(!ie(n,d)){n[d]=!0;var u=e.node(d);a[u.rank].push(d),f(e.successors(d),i)}}var o=_(r,function(d){return e.node(d).rank});return f(o,i),a}function yn(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var a=j(t,function(i,o){var d=e.edge(o),u=e.node(o.v);return{sum:i.sum+d.weight*u.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function gn(e,n){var r={};f(e,function(a,i){var o=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};b(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),f(n.edges(),function(a){var i=r[a.v],o=r[a.w];!b(i)&&!b(o)&&(o.indegree++,i.out.push(r[a.w]))});var t=P(r,function(a){return!a.indegree});return kn(t)}function kn(e){var n=[];function r(i){return function(o){o.merged||(b(o.barycenter)||b(i.barycenter)||o.barycenter>=i.barycenter)&&xn(i,o)}}function t(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){var a=e.pop();n.push(a),f(a.in.reverse(),r(a)),f(a.out,t(a))}return w(P(n,function(i){return!i.merged}),function(i){return T(i,["vs","i","barycenter","weight"])})}function xn(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function En(e,n){var r=Ye(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,a=_(r.rhs,function(c){return-c.i}),i=[],o=0,d=0,u=0;t.sort(On(!!n)),u=te(i,a,u),f(t,function(c){u+=c.vs.length,i.push(c.vs),o+=c.barycenter*c.weight,d+=c.weight,u=te(i,a,u)});var s={vs:R(i)};return d&&(s.barycenter=o/d,s.weight=d),s}function te(e,n,r){for(var t;n.length&&(t=C(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function On(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function ye(e,n,r,t){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,d=i?i.borderRight:void 0,u={};o&&(a=P(a,function(p){return p!==o&&p!==d}));var s=yn(e,a);f(s,function(p){if(e.children(p.v).length){var m=ye(e,p.v,r,t);u[p.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&Ln(p,m)}});var c=gn(s,r);Nn(c,u);var l=En(c,t);if(o&&(l.vs=R([o,l.vs,d]),e.predecessors(o).length)){var h=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(d)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function Nn(e,n){f(e,function(r){r.vs=R(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Ln(e,n){b(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function In(e){var n=ue(e),r=ae(e,x(1,n+1),"inEdges"),t=ae(e,x(n-1,-1,-1),"outEdges"),a=bn(e);oe(e,a);for(var i=Number.POSITIVE_INFINITY,o,d=0,u=0;u<4;++d,++u){Pn(d%2?r:t,d%4>=2),a=M(e);var s=wn(e,a);s<i&&(u=0,o=Ie(a),i=s)}oe(e,o)}function ae(e,n,r){return w(n,function(t){return vn(e,t,r)})}function Pn(e,n){var r=new y;f(e,function(t){var a=t.graph().root,i=ye(t,a,r,n);f(i.vs,function(o,d){t.node(o).order=d}),hn(t,r,i.vs)})}function oe(e,n){f(n,function(r){f(r,function(t,a){e.node(t).order=a})})}function _n(e){var n=Cn(e);f(e.graph().dummyChains,function(r){for(var t=e.node(r),a=t.edgeObj,i=Rn(e,n,a.v,a.w),o=i.path,d=i.lca,u=0,s=o[u],c=!0;r!==a.w;){if(t=e.node(r),c){for(;(s=o[u])!==d&&e.node(s).maxRank<t.rank;)u++;s===d&&(c=!1)}if(!c){for(;u<o.length-1&&e.node(s=o[u+1]).minRank<=t.rank;)u++;s=o[u]}e.setParent(r,s),r=e.successors(r)[0]}})}function Rn(e,n,r,t){var a=[],i=[],o=Math.min(n[r].low,n[t].low),d=Math.max(n[r].lim,n[t].lim),u,s;u=r;do u=e.parent(u),a.push(u);while(u&&(n[u].low>o||d>n[u].lim));for(s=u,u=t;(u=e.parent(u))!==s;)i.push(u);return{path:a.concat(i.reverse()),lca:s}}function Cn(e){var n={},r=0;function t(a){var i=r;f(e.children(a),t),n[a]={low:i,lim:r++}}return f(e.children(),t),n}function Tn(e,n){var r={};function t(a,i){var o=0,d=0,u=a.length,s=C(i);return f(i,function(c,l){var h=Sn(e,c),v=h?e.node(h).order:u;(h||c===s)&&(f(i.slice(d,l+1),function(p){f(e.predecessors(p),function(m){var N=e.node(m),H=N.order;(H<o||v<H)&&!(N.dummy&&e.node(p).dummy)&&ge(r,m,p)})}),d=l+1,o=v)}),i}return j(n,t),r}function jn(e,n){var r={};function t(i,o,d,u,s){var c;f(x(o,d),function(l){c=i[l],e.node(c).dummy&&f(e.predecessors(c),function(h){var v=e.node(h);v.dummy&&(v.order<u||v.order>s)&&ge(r,h,c)})})}function a(i,o){var d=-1,u,s=0;return f(o,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(u=e.node(h[0]).order,t(o,s,l,d,u),s=l,d=u)}t(o,s,o.length,u,i.length)}),o}return j(n,a),r}function Sn(e,n){if(e.node(n).dummy)return W(e.predecessors(n),function(r){return e.node(r).dummy})}function ge(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=e[n];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Mn(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Fn(e,n,r,t){var a={},i={},o={};return f(n,function(d){f(d,function(u,s){a[u]=u,i[u]=u,o[u]=s})}),f(n,function(d){var u=-1;f(d,function(s){var c=t(s);if(c.length){c=_(c,function(m){return o[m]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];i[s]===s&&u<o[p]&&!Mn(r,s,p)&&(i[p]=s,i[s]=a[s]=a[p],u=o[p])}}})}),{root:a,align:i}}function Vn(e,n,r,t,a){var i={},o=An(e,n,r,a),d=a?"borderLeft":"borderRight";function u(l,h){for(var v=o.nodes(),p=v.pop(),m={};p;)m[p]?l(p):(m[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function s(l){i[l]=o.inEdges(l).reduce(function(h,v){return Math.max(h,i[v.v]+o.edge(v))},0)}function c(l){var h=o.outEdges(l).reduce(function(p,m){return Math.min(p,i[m.w]-o.edge(m))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==d&&(i[l]=Math.max(i[l],h))}return u(s,o.predecessors.bind(o)),u(c,o.successors.bind(o)),f(t,function(l){i[l]=i[r[l]]}),i}function An(e,n,r,t){var a=new y,i=e.graph(),o=$n(i.nodesep,i.edgesep,t);return f(n,function(d){var u;f(d,function(s){var c=r[s];if(a.setNode(c),u){var l=r[u],h=a.edge(l,c);a.setEdge(l,c,Math.max(o(e,s,u),h||0))}u=s})}),a}function Bn(e,n){return q(E(n),function(r){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return xe(r,function(i,o){var d=qn(e,o)/2;t=Math.max(i+d,t),a=Math.min(i-d,a)}),t-a})}function Yn(e,n){var r=E(n),t=L(r),a=g(r);f(["u","d"],function(i){f(["l","r"],function(o){var d=i+o,u=e[d],s;if(u!==n){var c=E(u);s=o==="l"?t-L(c):a-g(c),s&&(e[d]=S(u,function(l){return l+s}))}})})}function Dn(e,n){return S(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var a=_(w(e,t));return(a[1]+a[2])/2})}function Gn(e){var n=M(e),r=D(Tn(e,n),jn(e,n)),t={},a;f(["u","d"],function(o){a=o==="u"?n:E(n).reverse(),f(["l","r"],function(d){d==="r"&&(a=w(a,function(l){return E(l).reverse()}));var u=(o==="u"?e.predecessors:e.successors).bind(e),s=Fn(e,a,r,u),c=Vn(e,a,s.root,s.align,d==="r");d==="r"&&(c=S(c,function(l){return-l})),t[o+d]=c})});var i=Bn(e,t);return Yn(t,i),Dn(t,e.graph().align)}function $n(e,n,r){return function(t,a,i){var o=t.node(a),d=t.node(i),u=0,s;if(u+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":s=-o.width/2;break;case"r":s=o.width/2;break}if(s&&(u+=r?s:-s),s=0,u+=(o.dummy?n:e)/2,u+=(d.dummy?n:e)/2,u+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":s=d.width/2;break;case"r":s=-d.width/2;break}return s&&(u+=r?s:-s),s=0,u}}function qn(e,n){return e.node(n).width}function Wn(e){e=de(e),zn(e),Ee(Gn(e),function(n,r){e.node(r).x=n})}function zn(e){var n=M(e),r=e.graph().ranksep,t=0;f(n,function(a){var i=g(w(a,function(o){return e.node(o).height}));f(a,function(o){e.node(o).y=t+i/2}),t+=i+r})}function Or(e,n){var r=De;r("layout",()=>{var t=r(" buildLayoutGraph",()=>tr(e));r(" runLayout",()=>Xn(t,r)),r(" updateInputGraph",()=>Un(e,t))})}function Xn(e,n){n(" makeSpaceForEdgeLabels",()=>ar(e)),n(" removeSelfEdges",()=>hr(e)),n(" acyclic",()=>Se(e)),n(" nestingGraph.run",()=>sn(e)),n(" rank",()=>on(de(e))),n(" injectEdgeLabelProxies",()=>or(e)),n(" removeEmptyRanks",()=>Be(e)),n(" nestingGraph.cleanup",()=>ln(e)),n(" normalizeRanks",()=>Ae(e)),n(" assignRankMinMax",()=>ir(e)),n(" removeEdgeLabelProxies",()=>dr(e)),n(" normalize.run",()=>Xe(e)),n(" parentDummyChains",()=>_n(e)),n(" addBorderSegments",()=>Ge(e)),n(" order",()=>In(e)),n(" insertSelfEdges",()=>vr(e)),n(" adjustCoordinateSystem",()=>$e(e)),n(" position",()=>Wn(e)),n(" positionSelfEdges",()=>pr(e)),n(" removeBorderNodes",()=>lr(e)),n(" normalize.undo",()=>He(e)),n(" fixupEdgeLabelCoords",()=>fr(e)),n(" undoCoordinateSystem",()=>qe(e)),n(" translateGraph",()=>ur(e)),n(" assignNodeIntersects",()=>sr(e)),n(" reversePoints",()=>cr(e)),n(" acyclic.undo",()=>Fe(e))}function Un(e,n){f(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),f(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Hn=["nodesep","edgesep","ranksep","marginx","marginy"],Jn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Zn=["acyclicer","ranker","rankdir","align"],Kn=["width","height"],Qn={width:0,height:0},er=["minlen","weight","width","height","labeloffset"],nr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rr=["labelpos"];function tr(e){var n=new y({multigraph:!0,compound:!0}),r=Y(e.graph());return n.setGraph(D({},Jn,B(r,Hn),T(r,Zn))),f(e.nodes(),function(t){var a=Y(e.node(t));n.setNode(t,Oe(B(a,Kn),Qn)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var a=Y(e.edge(t));n.setEdge(t,D({},nr,B(a,er),T(a,rr)))}),n}function ar(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function or(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-t.rank)/2+t.rank,e:n};O(e,"edge-proxy",i,"_ep")}})}function ir(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=g(n,t.maxRank))}),e.graph().maxRank=n}function dr(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function ur(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,d=i.marginy||0;function u(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),a=Math.max(a,l+v/2)}f(e.nodes(),function(s){u(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&u(c)}),n-=o,t-=d,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),i.width=r-n+o,i.height=a-t+d}function sr(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),i,o;r.points?(i=r.points[0],o=r.points[r.points.length-1]):(r.points=[],i=a,o=t),r.points.unshift(Z(t,i)),r.points.push(Z(a,o))})}function fr(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function cr(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function lr(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(C(r.borderLeft)),o=e.node(C(r.borderRight));r.width=Math.abs(o.x-i.x),r.height=Math.abs(a.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function hr(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function vr(e){var n=M(e);f(n,function(r){var t=0;f(r,function(a,i){var o=e.node(a);o.order=i+t,f(o.selfEdges,function(d){O(e,"selfedge",{width:d.label.width,height:d.label.height,rank:o.rank,order:i+ ++t,e:d.e,label:d.label},"_se")}),delete o.selfEdges})})}function pr(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,i=t.y,o=r.x-a,d=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*o/3,y:i-d},{x:a+5*o/6,y:i-d},{x:a+o,y:i},{x:a+5*o/6,y:i+d},{x:a+2*o/3,y:i+d}],r.label.x=r.x,r.label.y=r.y}})}function B(e,n){return S(T(e,n),Number)}function Y(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Or as l};
1
+ import{G as y}from"./graph-BZ_Ixkdn.js";import{a as f,f as P,r as j}from"./_baseUniq-CJcN2wXt.js";import{m as w,d as L}from"./min-BYNXcs16.js";import{r as x,u as $,m as g,a as q,f as W,z as ke,s as _,c as xe,b as S,e as Ee,d as Oe}from"./zipObject-BF7eTaCR.js";import{bZ as R,x as Ne,A as b,n as Le,b_ as C,b$ as Ie,bq as D}from"./index-C6f1jS5T.js";import{h as ie}from"./has-C78hNt79.js";import{v as E}from"./union-DP4CDhaw.js";import{p as T}from"./pick-D_sga9lq.js";class Pe{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return J(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&J(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,_e)),t=t._prev;return"["+n.join(", ")+"]"}}function J(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function _e(e,n){if(e!=="_next"&&e!=="_prev")return n}var Re=Ne(1);function Ce(e,n){if(e.nodeCount()<=1)return[];var r=je(e,n||Re),t=Te(r.graph,r.buckets,r.zeroIdx);return R(w(t,function(a){return e.outEdges(a.v,a.w)}))}function Te(e,n,r){for(var t=[],a=n[n.length-1],i=n[0],o;e.nodeCount();){for(;o=i.dequeue();)F(e,n,r,o);for(;o=a.dequeue();)F(e,n,r,o);if(e.nodeCount()){for(var d=n.length-2;d>0;--d)if(o=n[d].dequeue(),o){t=t.concat(F(e,n,r,o,!0));break}}}return t}function F(e,n,r,t,a){var i=a?[]:void 0;return f(e.inEdges(t.v),function(o){var d=e.edge(o),u=e.node(o.v);a&&i.push({v:o.v,w:o.w}),u.out-=d,G(n,r,u)}),f(e.outEdges(t.v),function(o){var d=e.edge(o),u=o.w,s=e.node(u);s.in-=d,G(n,r,s)}),e.removeNode(t.v),i}function je(e,n){var r=new y,t=0,a=0;f(e.nodes(),function(d){r.setNode(d,{v:d,in:0,out:0})}),f(e.edges(),function(d){var u=r.edge(d.v,d.w)||0,s=n(d),c=u+s;r.setEdge(d.v,d.w,c),a=Math.max(a,r.node(d.v).out+=s),t=Math.max(t,r.node(d.w).in+=s)});var i=x(a+t+3).map(function(){return new Pe}),o=t+1;return f(r.nodes(),function(d){G(i,o,r.node(d))}),{graph:r,buckets:i,zeroIdx:o}}function G(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Se(e){var n=e.graph().acyclicer==="greedy"?Ce(e,r(e)):Me(e);f(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,$("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function Me(e){var n=[],r={},t={};function a(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,f(e.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?n.push(o):a(o.w)}),delete r[i])}return f(e.nodes(),a),n}function Fe(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function O(e,n,r,t){var a;do a=$(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function Ve(e){var n=new y().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function de(e){var n=new y({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Z(e,n){var r=e.x,t=e.y,a=n.x-r,i=n.y-t,o=e.width/2,d=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var u,s;return Math.abs(i)*o>Math.abs(a)*d?(i<0&&(d=-d),u=d*a/i,s=d):(a<0&&(o=-o),u=o,s=o*i/a),{x:r+u,y:t+s}}function M(e){var n=w(x(ue(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),a=t.rank;b(a)||(n[a][t.order]=r)}),n}function Ae(e){var n=L(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);ie(t,"rank")&&(t.rank-=n)})}function Be(e){var n=L(w(e.nodes(),function(i){return e.node(i).rank})),r=[];f(e.nodes(),function(i){var o=e.node(i).rank-n;r[o]||(r[o]=[]),r[o].push(i)});var t=0,a=e.graph().nodeRankFactor;f(r,function(i,o){b(i)&&o%a!==0?--t:t&&f(i,function(d){e.node(d).rank+=t})})}function K(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),O(e,"border",a,n)}function ue(e){return g(w(e.nodes(),function(n){var r=e.node(n).rank;if(!b(r))return r}))}function Ye(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function De(e,n){return n()}function Ge(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;i<o;++i)Q(e,"borderLeft","_bl",r,a,i),Q(e,"borderRight","_br",r,a,i)}}f(e.children(),n)}function Q(e,n,r,t,a,i){var o={width:0,height:0,rank:i,borderType:n},d=a[n][i-1],u=O(e,"border",o,r);a[n][i]=u,e.setParent(u,t),d&&e.setEdge(d,u,{weight:1})}function $e(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&se(e)}function qe(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&We(e),(n==="lr"||n==="rl")&&(ze(e),se(e))}function se(e){f(e.nodes(),function(n){ee(e.node(n))}),f(e.edges(),function(n){ee(e.edge(n))})}function ee(e){var n=e.width;e.width=e.height,e.height=n}function We(e){f(e.nodes(),function(n){V(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,V),Object.prototype.hasOwnProperty.call(r,"y")&&V(r)})}function V(e){e.y=-e.y}function ze(e){f(e.nodes(),function(n){A(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,A),Object.prototype.hasOwnProperty.call(r,"x")&&A(r)})}function A(e){var n=e.x;e.x=e.y,e.y=n}function Xe(e){e.graph().dummyChains=[],f(e.edges(),function(n){Ue(e,n)})}function Ue(e,n){var r=n.v,t=e.node(r).rank,a=n.w,i=e.node(a).rank,o=n.name,d=e.edge(n),u=d.labelRank;if(i!==t+1){e.removeEdge(n);var s=void 0,c,l;for(l=0,++t;t<i;++l,++t)d.points=[],s={width:0,height:0,edgeLabel:d,edgeObj:n,rank:t},c=O(e,"edge",s,"_d"),t===u&&(s.width=d.width,s.height=d.height,s.dummy="edge-label",s.labelpos=d.labelpos),e.setEdge(r,c,{weight:d.weight},o),l===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,a,{weight:d.weight},o)}}function He(e){f(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,a;for(e.setEdge(r.edgeObj,t);r.dummy;)a=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=a,r=e.node(n)})}function z(e){var n={};function r(t){var a=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return a.rank;n[t]=!0;var i=L(w(e.outEdges(t),function(o){return r(o.w)-e.edge(o).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}f(e.sources(),r)}function I(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function fe(e){var n=new y({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var a,i;Je(n,e)<t;)a=Ze(n,e),i=n.hasNode(a.v)?I(e,a):-I(e,a),Ke(n,e,i);return n}function Je(e,n){function r(t){f(n.nodeEdges(t),function(a){var i=a.v,o=t===i?a.w:i;!e.hasNode(o)&&!I(n,a)&&(e.setNode(o,{}),e.setEdge(t,o,{}),r(o))})}return f(e.nodes(),r),e.nodeCount()}function Ze(e,n){return q(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return I(n,r)})}function Ke(e,n,r){f(e.nodes(),function(t){n.node(t).rank+=r})}function Qe(){}Qe.prototype=new Error;function ce(e,n,r){Le(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],i={};return f(n,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);le(e,o,r==="post",i,t,a)}),a}function le(e,n,r,t,a,i){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||i.push(n),f(a(n),function(o){le(e,o,r,t,a,i)}),r&&i.push(n))}function en(e,n){return ce(e,n,"post")}function nn(e,n){return ce(e,n,"pre")}k.initLowLimValues=U;k.initCutValues=X;k.calcCutValue=he;k.leaveEdge=pe;k.enterEdge=we;k.exchangeEdges=me;function k(e){e=Ve(e),z(e);var n=fe(e);U(n),X(n,e);for(var r,t;r=pe(n);)t=we(n,e,r),me(n,e,r,t)}function X(e,n){var r=en(e,e.nodes());r=r.slice(0,r.length-1),f(r,function(t){rn(e,n,t)})}function rn(e,n,r){var t=e.node(r),a=t.parent;e.edge(r,a).cutvalue=he(e,n,r)}function he(e,n,r){var t=e.node(r),a=t.parent,i=!0,o=n.edge(r,a),d=0;return o||(i=!1,o=n.edge(a,r)),d=o.weight,f(n.nodeEdges(r),function(u){var s=u.v===r,c=s?u.w:u.v;if(c!==a){var l=s===i,h=n.edge(u).weight;if(d+=l?h:-h,an(e,r,c)){var v=e.edge(r,c).cutvalue;d+=l?-v:v}}}),d}function U(e,n){arguments.length<2&&(n=e.nodes()[0]),ve(e,{},1,n)}function ve(e,n,r,t,a){var i=r,o=e.node(t);return n[t]=!0,f(e.neighbors(t),function(d){Object.prototype.hasOwnProperty.call(n,d)||(r=ve(e,n,r,d,t))}),o.low=i,o.lim=r++,a?o.parent=a:delete o.parent,r}function pe(e){return W(e.edges(),function(n){return e.edge(n).cutvalue<0})}function we(e,n,r){var t=r.v,a=r.w;n.hasEdge(t,a)||(t=r.w,a=r.v);var i=e.node(t),o=e.node(a),d=i,u=!1;i.lim>o.lim&&(d=o,u=!0);var s=P(n.edges(),function(c){return u===ne(e,e.node(c.v),d)&&u!==ne(e,e.node(c.w),d)});return q(s,function(c){return I(n,c)})}function me(e,n,r,t){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(t.v,t.w,{}),U(e),X(e,n),tn(e,n)}function tn(e,n){var r=W(e.nodes(),function(a){return!n.node(a).parent}),t=nn(e,r);t=t.slice(1),f(t,function(a){var i=e.node(a).parent,o=n.edge(a,i),d=!1;o||(o=n.edge(i,a),d=!0),n.node(a).rank=n.node(i).rank+(d?o.minlen:-o.minlen)})}function an(e,n,r){return e.hasEdge(n,r)}function ne(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function on(e){switch(e.graph().ranker){case"network-simplex":re(e);break;case"tight-tree":un(e);break;case"longest-path":dn(e);break;default:re(e)}}var dn=z;function un(e){z(e),fe(e)}function re(e){k(e)}function sn(e){var n=O(e,"root",{},"_root"),r=fn(e),t=g(E(r))-1,a=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(o){e.edge(o).minlen*=a});var i=cn(e)+1;f(e.children(),function(o){be(e,n,a,i,t,r,o)}),e.graph().nodeRankFactor=a}function be(e,n,r,t,a,i,o){var d=e.children(o);if(!d.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var u=K(e,"_bt"),s=K(e,"_bb"),c=e.node(o);e.setParent(u,o),c.borderTop=u,e.setParent(s,o),c.borderBottom=s,f(d,function(l){be(e,n,r,t,a,i,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,m=h.borderTop?t:2*t,N=v!==p?1:a-i[o]+1;e.setEdge(u,v,{weight:m,minlen:N,nestingEdge:!0}),e.setEdge(p,s,{weight:m,minlen:N,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,u,{weight:0,minlen:a+i[o]})}function fn(e){var n={};function r(t,a){var i=e.children(t);i&&i.length&&f(i,function(o){r(o,a+1)}),n[t]=a}return f(e.children(),function(t){r(t,1)}),n}function cn(e){return j(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function ln(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function hn(e,n,r){var t={},a;f(r,function(i){for(var o=e.parent(i),d,u;o;){if(d=e.parent(o),d?(u=t[d],t[d]=o):(u=a,a=o),u&&u!==o){n.setEdge(u,o);return}o=d}})}function vn(e,n,r){var t=pn(e),a=new y({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(i){return e.node(i)});return f(e.nodes(),function(i){var o=e.node(i),d=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,d||t),f(e[r](i),function(u){var s=u.v===i?u.w:u.v,c=a.edge(s,i),l=b(c)?0:c.weight;a.setEdge(s,i,{weight:e.edge(u).weight+l})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}function pn(e){for(var n;e.hasNode(n=$("_root")););return n}function wn(e,n){for(var r=0,t=1;t<n.length;++t)r+=mn(e,n[t-1],n[t]);return r}function mn(e,n,r){for(var t=ke(r,w(r,function(s,c){return c})),a=R(w(n,function(s){return _(w(e.outEdges(s),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var o=2*i-1;i-=1;var d=w(new Array(o),function(){return 0}),u=0;return f(a.forEach(function(s){var c=s.pos+i;d[c]+=s.weight;for(var l=0;c>0;)c%2&&(l+=d[c+1]),c=c-1>>1,d[c]+=s.weight;u+=s.weight*l})),u}function bn(e){var n={},r=P(e.nodes(),function(d){return!e.children(d).length}),t=g(w(r,function(d){return e.node(d).rank})),a=w(x(t+1),function(){return[]});function i(d){if(!ie(n,d)){n[d]=!0;var u=e.node(d);a[u.rank].push(d),f(e.successors(d),i)}}var o=_(r,function(d){return e.node(d).rank});return f(o,i),a}function yn(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var a=j(t,function(i,o){var d=e.edge(o),u=e.node(o.v);return{sum:i.sum+d.weight*u.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function gn(e,n){var r={};f(e,function(a,i){var o=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};b(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),f(n.edges(),function(a){var i=r[a.v],o=r[a.w];!b(i)&&!b(o)&&(o.indegree++,i.out.push(r[a.w]))});var t=P(r,function(a){return!a.indegree});return kn(t)}function kn(e){var n=[];function r(i){return function(o){o.merged||(b(o.barycenter)||b(i.barycenter)||o.barycenter>=i.barycenter)&&xn(i,o)}}function t(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){var a=e.pop();n.push(a),f(a.in.reverse(),r(a)),f(a.out,t(a))}return w(P(n,function(i){return!i.merged}),function(i){return T(i,["vs","i","barycenter","weight"])})}function xn(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function En(e,n){var r=Ye(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,a=_(r.rhs,function(c){return-c.i}),i=[],o=0,d=0,u=0;t.sort(On(!!n)),u=te(i,a,u),f(t,function(c){u+=c.vs.length,i.push(c.vs),o+=c.barycenter*c.weight,d+=c.weight,u=te(i,a,u)});var s={vs:R(i)};return d&&(s.barycenter=o/d,s.weight=d),s}function te(e,n,r){for(var t;n.length&&(t=C(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function On(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function ye(e,n,r,t){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,d=i?i.borderRight:void 0,u={};o&&(a=P(a,function(p){return p!==o&&p!==d}));var s=yn(e,a);f(s,function(p){if(e.children(p.v).length){var m=ye(e,p.v,r,t);u[p.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&Ln(p,m)}});var c=gn(s,r);Nn(c,u);var l=En(c,t);if(o&&(l.vs=R([o,l.vs,d]),e.predecessors(o).length)){var h=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(d)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function Nn(e,n){f(e,function(r){r.vs=R(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Ln(e,n){b(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function In(e){var n=ue(e),r=ae(e,x(1,n+1),"inEdges"),t=ae(e,x(n-1,-1,-1),"outEdges"),a=bn(e);oe(e,a);for(var i=Number.POSITIVE_INFINITY,o,d=0,u=0;u<4;++d,++u){Pn(d%2?r:t,d%4>=2),a=M(e);var s=wn(e,a);s<i&&(u=0,o=Ie(a),i=s)}oe(e,o)}function ae(e,n,r){return w(n,function(t){return vn(e,t,r)})}function Pn(e,n){var r=new y;f(e,function(t){var a=t.graph().root,i=ye(t,a,r,n);f(i.vs,function(o,d){t.node(o).order=d}),hn(t,r,i.vs)})}function oe(e,n){f(n,function(r){f(r,function(t,a){e.node(t).order=a})})}function _n(e){var n=Cn(e);f(e.graph().dummyChains,function(r){for(var t=e.node(r),a=t.edgeObj,i=Rn(e,n,a.v,a.w),o=i.path,d=i.lca,u=0,s=o[u],c=!0;r!==a.w;){if(t=e.node(r),c){for(;(s=o[u])!==d&&e.node(s).maxRank<t.rank;)u++;s===d&&(c=!1)}if(!c){for(;u<o.length-1&&e.node(s=o[u+1]).minRank<=t.rank;)u++;s=o[u]}e.setParent(r,s),r=e.successors(r)[0]}})}function Rn(e,n,r,t){var a=[],i=[],o=Math.min(n[r].low,n[t].low),d=Math.max(n[r].lim,n[t].lim),u,s;u=r;do u=e.parent(u),a.push(u);while(u&&(n[u].low>o||d>n[u].lim));for(s=u,u=t;(u=e.parent(u))!==s;)i.push(u);return{path:a.concat(i.reverse()),lca:s}}function Cn(e){var n={},r=0;function t(a){var i=r;f(e.children(a),t),n[a]={low:i,lim:r++}}return f(e.children(),t),n}function Tn(e,n){var r={};function t(a,i){var o=0,d=0,u=a.length,s=C(i);return f(i,function(c,l){var h=Sn(e,c),v=h?e.node(h).order:u;(h||c===s)&&(f(i.slice(d,l+1),function(p){f(e.predecessors(p),function(m){var N=e.node(m),H=N.order;(H<o||v<H)&&!(N.dummy&&e.node(p).dummy)&&ge(r,m,p)})}),d=l+1,o=v)}),i}return j(n,t),r}function jn(e,n){var r={};function t(i,o,d,u,s){var c;f(x(o,d),function(l){c=i[l],e.node(c).dummy&&f(e.predecessors(c),function(h){var v=e.node(h);v.dummy&&(v.order<u||v.order>s)&&ge(r,h,c)})})}function a(i,o){var d=-1,u,s=0;return f(o,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(u=e.node(h[0]).order,t(o,s,l,d,u),s=l,d=u)}t(o,s,o.length,u,i.length)}),o}return j(n,a),r}function Sn(e,n){if(e.node(n).dummy)return W(e.predecessors(n),function(r){return e.node(r).dummy})}function ge(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=e[n];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Mn(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Fn(e,n,r,t){var a={},i={},o={};return f(n,function(d){f(d,function(u,s){a[u]=u,i[u]=u,o[u]=s})}),f(n,function(d){var u=-1;f(d,function(s){var c=t(s);if(c.length){c=_(c,function(m){return o[m]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];i[s]===s&&u<o[p]&&!Mn(r,s,p)&&(i[p]=s,i[s]=a[s]=a[p],u=o[p])}}})}),{root:a,align:i}}function Vn(e,n,r,t,a){var i={},o=An(e,n,r,a),d=a?"borderLeft":"borderRight";function u(l,h){for(var v=o.nodes(),p=v.pop(),m={};p;)m[p]?l(p):(m[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function s(l){i[l]=o.inEdges(l).reduce(function(h,v){return Math.max(h,i[v.v]+o.edge(v))},0)}function c(l){var h=o.outEdges(l).reduce(function(p,m){return Math.min(p,i[m.w]-o.edge(m))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==d&&(i[l]=Math.max(i[l],h))}return u(s,o.predecessors.bind(o)),u(c,o.successors.bind(o)),f(t,function(l){i[l]=i[r[l]]}),i}function An(e,n,r,t){var a=new y,i=e.graph(),o=$n(i.nodesep,i.edgesep,t);return f(n,function(d){var u;f(d,function(s){var c=r[s];if(a.setNode(c),u){var l=r[u],h=a.edge(l,c);a.setEdge(l,c,Math.max(o(e,s,u),h||0))}u=s})}),a}function Bn(e,n){return q(E(n),function(r){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return xe(r,function(i,o){var d=qn(e,o)/2;t=Math.max(i+d,t),a=Math.min(i-d,a)}),t-a})}function Yn(e,n){var r=E(n),t=L(r),a=g(r);f(["u","d"],function(i){f(["l","r"],function(o){var d=i+o,u=e[d],s;if(u!==n){var c=E(u);s=o==="l"?t-L(c):a-g(c),s&&(e[d]=S(u,function(l){return l+s}))}})})}function Dn(e,n){return S(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var a=_(w(e,t));return(a[1]+a[2])/2})}function Gn(e){var n=M(e),r=D(Tn(e,n),jn(e,n)),t={},a;f(["u","d"],function(o){a=o==="u"?n:E(n).reverse(),f(["l","r"],function(d){d==="r"&&(a=w(a,function(l){return E(l).reverse()}));var u=(o==="u"?e.predecessors:e.successors).bind(e),s=Fn(e,a,r,u),c=Vn(e,a,s.root,s.align,d==="r");d==="r"&&(c=S(c,function(l){return-l})),t[o+d]=c})});var i=Bn(e,t);return Yn(t,i),Dn(t,e.graph().align)}function $n(e,n,r){return function(t,a,i){var o=t.node(a),d=t.node(i),u=0,s;if(u+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":s=-o.width/2;break;case"r":s=o.width/2;break}if(s&&(u+=r?s:-s),s=0,u+=(o.dummy?n:e)/2,u+=(d.dummy?n:e)/2,u+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":s=d.width/2;break;case"r":s=-d.width/2;break}return s&&(u+=r?s:-s),s=0,u}}function qn(e,n){return e.node(n).width}function Wn(e){e=de(e),zn(e),Ee(Gn(e),function(n,r){e.node(r).x=n})}function zn(e){var n=M(e),r=e.graph().ranksep,t=0;f(n,function(a){var i=g(w(a,function(o){return e.node(o).height}));f(a,function(o){e.node(o).y=t+i/2}),t+=i+r})}function Or(e,n){var r=De;r("layout",()=>{var t=r(" buildLayoutGraph",()=>tr(e));r(" runLayout",()=>Xn(t,r)),r(" updateInputGraph",()=>Un(e,t))})}function Xn(e,n){n(" makeSpaceForEdgeLabels",()=>ar(e)),n(" removeSelfEdges",()=>hr(e)),n(" acyclic",()=>Se(e)),n(" nestingGraph.run",()=>sn(e)),n(" rank",()=>on(de(e))),n(" injectEdgeLabelProxies",()=>or(e)),n(" removeEmptyRanks",()=>Be(e)),n(" nestingGraph.cleanup",()=>ln(e)),n(" normalizeRanks",()=>Ae(e)),n(" assignRankMinMax",()=>ir(e)),n(" removeEdgeLabelProxies",()=>dr(e)),n(" normalize.run",()=>Xe(e)),n(" parentDummyChains",()=>_n(e)),n(" addBorderSegments",()=>Ge(e)),n(" order",()=>In(e)),n(" insertSelfEdges",()=>vr(e)),n(" adjustCoordinateSystem",()=>$e(e)),n(" position",()=>Wn(e)),n(" positionSelfEdges",()=>pr(e)),n(" removeBorderNodes",()=>lr(e)),n(" normalize.undo",()=>He(e)),n(" fixupEdgeLabelCoords",()=>fr(e)),n(" undoCoordinateSystem",()=>qe(e)),n(" translateGraph",()=>ur(e)),n(" assignNodeIntersects",()=>sr(e)),n(" reversePoints",()=>cr(e)),n(" acyclic.undo",()=>Fe(e))}function Un(e,n){f(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),f(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Hn=["nodesep","edgesep","ranksep","marginx","marginy"],Jn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Zn=["acyclicer","ranker","rankdir","align"],Kn=["width","height"],Qn={width:0,height:0},er=["minlen","weight","width","height","labeloffset"],nr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rr=["labelpos"];function tr(e){var n=new y({multigraph:!0,compound:!0}),r=Y(e.graph());return n.setGraph(D({},Jn,B(r,Hn),T(r,Zn))),f(e.nodes(),function(t){var a=Y(e.node(t));n.setNode(t,Oe(B(a,Kn),Qn)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var a=Y(e.edge(t));n.setEdge(t,D({},nr,B(a,er),T(a,rr)))}),n}function ar(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function or(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-t.rank)/2+t.rank,e:n};O(e,"edge-proxy",i,"_ep")}})}function ir(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=g(n,t.maxRank))}),e.graph().maxRank=n}function dr(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function ur(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,d=i.marginy||0;function u(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),a=Math.max(a,l+v/2)}f(e.nodes(),function(s){u(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&u(c)}),n-=o,t-=d,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),i.width=r-n+o,i.height=a-t+d}function sr(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),i,o;r.points?(i=r.points[0],o=r.points[r.points.length-1]):(r.points=[],i=a,o=t),r.points.unshift(Z(t,i)),r.points.push(Z(a,o))})}function fr(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function cr(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function lr(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(C(r.borderLeft)),o=e.node(C(r.borderRight));r.width=Math.abs(o.x-i.x),r.height=Math.abs(a.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function hr(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function vr(e){var n=M(e);f(n,function(r){var t=0;f(r,function(a,i){var o=e.node(a);o.order=i+t,f(o.selfEdges,function(d){O(e,"selfedge",{width:d.label.width,height:d.label.height,rank:o.rank,order:i+ ++t,e:d.e,label:d.label},"_se")}),delete o.selfEdges})})}function pr(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,i=t.y,o=r.x-a,d=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*o/3,y:i-d},{x:a+5*o/6,y:i-d},{x:a+o,y:i},{x:a+5*o/6,y:i+d},{x:a+2*o/3,y:i+d}],r.label.x=r.x,r.label.y=r.y}})}function B(e,n){return S(T(e,n),Number)}function Y(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Or as l};
@@ -1 +1 @@
1
- import{a as h}from"./array-BKyUJesY.js";import{w as d,c as o}from"./path-CbwjOpE9.js";import{o as v}from"./Serializer-DPCLjt6U.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,p,c=!1,a;for(i==null&&(r=l(a=m())),f=0;f<=g;++f)!(f<g&&s(p=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(p,f,n),+u(p,f,n));if(a)return r=null,a+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};
1
+ import{a as h}from"./array-BKyUJesY.js";import{w as d,c as o}from"./path-CbwjOpE9.js";import{o as v}from"./Serializer-rTHzSF0Y.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,p,c=!1,a;for(i==null&&(r=l(a=m())),f=0;f<=g;++f)!(f<g&&s(p=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(p,f,n),+u(p,f,n));if(a)return r=null,a+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};
@@ -1 +1 @@
1
- import{y as j,z as p,A as w,B as D,D as k}from"./Serializer-DPCLjt6U.js";import{i as q}from"./init-Gi6I4Gst.js";import{e as g,f as z,a as B,b as F}from"./defaultLocale-Bu4YK2AB.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=d(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=d(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function d(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=k(r))?(r=e,w):D:r instanceof k?w:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=N(u,e),f=t(a,f)):(e=N(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=N(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=d,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=z(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),B(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return F(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},q.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t};
1
+ import{y as j,z as p,A as w,B as D,D as k}from"./Serializer-rTHzSF0Y.js";import{i as q}from"./init-Gi6I4Gst.js";import{e as g,f as z,a as B,b as F}from"./defaultLocale-Bu4YK2AB.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=d(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=d(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function d(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=k(r))?(r=e,w):D:r instanceof k?w:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=N(u,e),f=t(a,f)):(e=N(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=N(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=d,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=z(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),B(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return F(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},q.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t};