@bkm016/basalt 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/{chunk-x1xss1d7.js → chunk-1vd0f74z.js} +2 -2
  2. package/{chunk-v9fea96h.js → chunk-2hbfk5xd.js} +2 -2
  3. package/{chunk-5j1krv9v.js → chunk-2zp1mv3q.js} +1 -1
  4. package/{chunk-d2j735sd.js → chunk-3ct2tkr8.js} +2 -2
  5. package/{chunk-c7x1zq39.js → chunk-3x94302m.js} +1 -1
  6. package/{chunk-gzxnene8.js → chunk-4w17tzp5.js} +2 -2
  7. package/{chunk-1zdwrgd4.js → chunk-5dfbezv9.js} +1 -1
  8. package/{chunk-bxn5kmpz.js → chunk-5x1sankd.js} +24 -24
  9. package/{chunk-pmqtkqsf.js → chunk-71h08f4g.js} +1 -1
  10. package/{chunk-fm0k0qtz.js → chunk-7afmgncg.js} +2 -2
  11. package/{chunk-v258nxcz.js → chunk-7nzhdrv9.js} +1 -1
  12. package/{chunk-zmsgwr3s.js → chunk-7q51n619.js} +1 -1
  13. package/{chunk-y0m980k3.js → chunk-7tbya5b5.js} +3 -3
  14. package/{chunk-8tjad3r0.js → chunk-8wc8qdx8.js} +5 -5
  15. package/{chunk-gp7y0fja.js → chunk-9rmqgc3c.js} +9 -9
  16. package/{chunk-nbb9trwz.js → chunk-akr0a8nc.js} +2 -2
  17. package/{chunk-k506w58v.js → chunk-aky4tztg.js} +2 -2
  18. package/{chunk-8296hw9m.js → chunk-em187cy3.js} +2 -2
  19. package/{chunk-2esbgxps.js → chunk-ev6yvy5y.js} +5 -5
  20. package/{chunk-75m78j7x.js → chunk-f3xadvab.js} +2 -2
  21. package/{chunk-5c9j8qe4.js → chunk-fvn32nzj.js} +26 -26
  22. package/{chunk-bannb9xm.js → chunk-jk25nt60.js} +1 -1
  23. package/{chunk-27gntzs5.js → chunk-kp22kaez.js} +1 -1
  24. package/{chunk-6hssbcgj.js → chunk-nmca5h6m.js} +1 -1
  25. package/{chunk-d8gtbw9g.js → chunk-pjyn2s97.js} +1 -1
  26. package/{chunk-rtzqqngy.js → chunk-q7t30zz2.js} +2 -2
  27. package/{chunk-aefadsy6.js → chunk-r0scgfwx.js} +1 -1
  28. package/{chunk-hwr56pfj.js → chunk-rmj5b73e.js} +1 -1
  29. package/{chunk-1qpces5a.js → chunk-vexrrw1b.js} +2 -2
  30. package/chunk-vkpvcxjr.js +2 -0
  31. package/{chunk-3cjsd292.js → chunk-whvj83b7.js} +2 -2
  32. package/{chunk-z55bmysw.js → chunk-xh3vr5vz.js} +1 -1
  33. package/{chunk-10xzzn07.js → chunk-zggzfa7j.js} +2 -2
  34. package/compiled.js +3 -3
  35. package/package.json +1 -1
  36. package/ui-test-worker.js +13 -13
  37. package/web/{chunk-7520nrbb.js → chunk-0b47eyrf.js} +1 -1
  38. package/web/{chunk-g46f421r.js → chunk-0h0vb6gt.js} +1 -1
  39. package/web/{chunk-h18tnrf2.js → chunk-0rmkpsgp.js} +1 -1
  40. package/web/{chunk-t7bwsdbr.js → chunk-0xkyryrq.js} +1 -1
  41. package/web/{chunk-h288yd5w.js → chunk-0z0y25zf.js} +1 -1
  42. package/web/{chunk-7ba8vrfc.js → chunk-1eg9sbbt.js} +1 -1
  43. package/web/{chunk-p9hsd3rn.js → chunk-1gbd61z0.js} +1 -1
  44. package/web/{chunk-vd6y2pcm.js → chunk-2s0bmrkv.js} +1 -1
  45. package/web/{chunk-33qwz9bc.js → chunk-2z1rwr28.js} +1 -1
  46. package/web/{chunk-tse9gvyq.js → chunk-344bq59c.js} +1 -1
  47. package/web/{chunk-0z0jycs8.js → chunk-3re8y26v.js} +1 -1
  48. package/web/chunk-3t0211rw.js +1 -0
  49. package/web/{chunk-5hmfk69r.js → chunk-42e3b9hv.js} +1 -1
  50. package/web/chunk-44rmrmcn.js +1 -0
  51. package/web/{chunk-fhnypcrm.js → chunk-4bzqrwr0.js} +81 -81
  52. package/web/{chunk-j0bwwc1g.js → chunk-4d3a7xs2.js} +1 -1
  53. package/web/{chunk-y3ajqthy.js → chunk-4jmazh6x.js} +1 -1
  54. package/web/{chunk-z4x331rx.js → chunk-4re74xwm.js} +1 -1
  55. package/web/{chunk-61jahh35.js → chunk-5qtyq3ce.js} +1 -1
  56. package/web/{chunk-wmvd6j0b.js → chunk-5z4jcqct.js} +1 -1
  57. package/web/{chunk-fv60p68p.js → chunk-5z6x2n5h.js} +1 -1
  58. package/web/{chunk-sn9ecfvy.js → chunk-6cnek1xh.js} +1 -1
  59. package/web/chunk-6f5ke0x9.js +1 -0
  60. package/web/{chunk-3qjnwsph.js → chunk-6xaqxcq8.js} +1 -1
  61. package/web/chunk-7q6wvv2x.js +1 -0
  62. package/web/{chunk-cwtdnacf.js → chunk-7qsa4p8h.js} +1 -1
  63. package/web/chunk-8nja0ygy.js +1 -0
  64. package/web/{chunk-z6bpamwq.js → chunk-8y64fkpz.js} +1 -1
  65. package/web/{chunk-90xqeczk.js → chunk-92ssjk2y.js} +1 -1
  66. package/web/chunk-9ad7v7bm.js +8 -0
  67. package/web/{chunk-7yc083xj.js → chunk-9cx1be43.js} +1 -1
  68. package/web/{chunk-wdtnhpd6.js → chunk-9dzxv335.js} +1 -1
  69. package/web/{chunk-w7snhcyg.js → chunk-9t5dnjaz.js} +2 -2
  70. package/web/{chunk-7v5rxabp.js → chunk-a408enpy.js} +1 -1
  71. package/web/{chunk-hszjc2ny.js → chunk-a497tykb.js} +1 -1
  72. package/web/{chunk-n8gfjj9a.js → chunk-aqfpnhmt.js} +2 -2
  73. package/web/{chunk-axkyft9f.js → chunk-b1bgzz66.js} +1 -1
  74. package/web/{chunk-sb1cjpq8.js → chunk-b53bfkys.js} +1 -1
  75. package/web/{chunk-6parf7sy.js → chunk-b6k9w215.js} +1 -1
  76. package/web/{chunk-es28k2t7.js → chunk-bhsaj6qq.js} +1 -1
  77. package/web/chunk-cjfssg3m.js +2 -0
  78. package/web/{chunk-5qqw2e0t.js → chunk-d11v5s7w.js} +1 -1
  79. package/web/{chunk-acybsx44.js → chunk-df5zx17h.js} +1 -1
  80. package/web/chunk-e0zre35a.js +1 -0
  81. package/web/{chunk-a5sg33w2.js → chunk-e9twvs9n.js} +1 -1
  82. package/web/chunk-f2kgtyfp.js +1 -0
  83. package/web/{chunk-23c1df7e.js → chunk-f4tacm06.js} +1 -1
  84. package/web/chunk-f8bn5tzf.js +1 -0
  85. package/web/chunk-fdp9bsj7.js +1 -0
  86. package/web/{chunk-7xk0ntav.js → chunk-fh2vj0wv.js} +1 -1
  87. package/web/{chunk-sgvp8vge.js → chunk-gmzqdm7v.js} +1 -1
  88. package/web/{chunk-tx8240k4.js → chunk-hvw3gn2a.js} +1 -1
  89. package/web/{chunk-rks7ksv3.js → chunk-khxcn8tt.js} +1 -1
  90. package/web/{chunk-eqsd8zta.js → chunk-kmr7r9xj.js} +1 -1
  91. package/web/chunk-kqqmp1am.js +1 -0
  92. package/web/{chunk-mb4qx9hy.js → chunk-kwccs9f6.js} +1 -1
  93. package/web/chunk-nbgqbxcy.js +1 -0
  94. package/web/{chunk-rcx1aee5.js → chunk-ncpnpe9w.js} +1 -1
  95. package/web/{chunk-jzfd7cyh.js → chunk-ne0v8mfb.js} +1 -1
  96. package/web/{chunk-yd1ez3wd.js → chunk-ngx2cp8x.js} +1 -1
  97. package/web/{chunk-4fzj0azw.js → chunk-nvhmq4z5.js} +1 -1
  98. package/web/chunk-nxcgf7ec.js +1 -0
  99. package/web/{chunk-zmdnxn6m.js → chunk-p0kvmf28.js} +1 -1
  100. package/web/chunk-p3k7m5nr.js +1 -0
  101. package/web/{chunk-9bgey148.js → chunk-pggaffrh.js} +1 -1
  102. package/web/{chunk-5b2nw6j1.js → chunk-pjkdrgm0.js} +1 -1
  103. package/web/{chunk-97b62pvb.js → chunk-pws2seas.js} +1 -1
  104. package/web/{chunk-mwj9tpkz.js → chunk-pz9ps2jm.js} +1 -1
  105. package/web/chunk-qpmbxhh6.js +1 -0
  106. package/web/chunk-r0rctnxz.js +1 -0
  107. package/web/chunk-rn3dnqm8.js +1 -0
  108. package/web/{chunk-47q4hmfp.js → chunk-rvrf0f3h.js} +1 -1
  109. package/web/{chunk-7qxhk1kz.js → chunk-sfg2wkhe.js} +1 -1
  110. package/web/{chunk-ep37qp12.js → chunk-sspfxp5e.js} +1 -1
  111. package/web/{chunk-2hd1pe9w.js → chunk-t4c8xavd.js} +1 -1
  112. package/web/{chunk-8qgpfxkz.js → chunk-tdr6x2xc.js} +1 -1
  113. package/web/chunk-tncvg1nn.js +1 -0
  114. package/web/{chunk-9xh96b33.js → chunk-vyp0ns1f.js} +1 -1
  115. package/web/{chunk-b0a8nbj0.js → chunk-wnskxerq.js} +1 -1
  116. package/web/{chunk-vymqrpm3.js → chunk-wvdehm9y.js} +66 -66
  117. package/web/chunk-x7ahcpj7.js +1 -0
  118. package/web/chunk-y38bf0wm.js +1 -0
  119. package/web/{chunk-89fkdgbp.js → chunk-y56aaba5.js} +1 -1
  120. package/web/{chunk-24h1rfje.js → chunk-ybrf9mhz.js} +1 -1
  121. package/web/{chunk-vpa55vje.js → chunk-ye58t45p.js} +3 -3
  122. package/web/{chunk-xnq41dgs.js → chunk-yqbnps3a.js} +1 -1
  123. package/web/{chunk-jqa39f8t.js → chunk-z1h20s8c.js} +1 -1
  124. package/web/{chunk-9a3q0jsh.js → chunk-zj4q9jth.js} +1 -1
  125. package/web/{chunk-ywp4s71k.js → chunk-zj5k94dk.js} +1 -1
  126. package/web/{chunk-xvsmtetz.js → chunk-zqch0sc8.js} +1 -1
  127. package/web/{chunk-0xc2c540.js → chunk-zx8zec24.js} +1 -1
  128. package/web/index.html +1 -1
  129. package/chunk-09rj27b2.js +0 -2
  130. package/web/chunk-166qe5j6.js +0 -2
  131. package/web/chunk-1c95wfvq.js +0 -1
  132. package/web/chunk-329rtxa9.js +0 -1
  133. package/web/chunk-6gxf3vsg.js +0 -1
  134. package/web/chunk-a91vxtx4.js +0 -1
  135. package/web/chunk-agec7jj4.js +0 -1
  136. package/web/chunk-c516cghj.js +0 -1
  137. package/web/chunk-dg1vas6z.js +0 -8
  138. package/web/chunk-fc0nx23g.js +0 -1
  139. package/web/chunk-jvbbrnpa.js +0 -1
  140. package/web/chunk-ka9ak8wr.js +0 -1
  141. package/web/chunk-mnjd59jk.js +0 -1
  142. package/web/chunk-ng0nbfhh.js +0 -1
  143. package/web/chunk-nz9nxk48.js +0 -1
  144. package/web/chunk-phw908hn.js +0 -1
  145. package/web/chunk-pjmmma1k.js +0 -1
  146. package/web/chunk-q7yn4m3t.js +0 -1
  147. package/web/chunk-qnhqexe0.js +0 -1
  148. package/web/chunk-rjqj6ffe.js +0 -1
  149. package/web/chunk-sjjwte12.js +0 -1
  150. package/web/chunk-yfbxtg5p.js +0 -1
@@ -1,4 +1,4 @@
1
- import{e,Zt,r,Y,u,d,b,mt,Ea,C,s,p,V,Ge,ae,Ye}from"./chunk-vymqrpm3.js";import{bt}from"./chunk-6parf7sy.js";var ht=function(){var n=e(function(E,l,y,g){for(y=y||{},g=E.length;g--;y[E[g]]=l);return y},"o"),t=[6,11,13,14,15,17,19,20,23,24],o=[1,12],a=[1,13],i=[1,14],f=[1,15],h=[1,16],c=[1,19],_=[1,20],x={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(l,y,g,k,w,m,I){var T=m.length-1;switch(w){case 1:return m[T-1];case 3:k.setDirection("LR");break;case 4:k.setDirection("TD");break;case 5:this.$=[];break;case 6:m[T-1].push(m[T]),this.$=m[T-1];break;case 7:case 8:this.$=m[T];break;case 9:case 10:this.$=[];break;case 11:k.getCommonDb().setDiagramTitle(m[T].substr(6)),this.$=m[T].substr(6);break;case 12:this.$=m[T].trim(),k.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=m[T].trim(),k.getCommonDb().setAccDescription(this.$);break;case 15:k.addSection(m[T].substr(8)),this.$=m[T].substr(8);break;case 18:k.addTask(m[T],0,""),this.$=m[T];break;case 19:k.addEvent(m[T].substr(2)),this.$=m[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},n(t,[2,5],{5:6}),n(t,[2,2]),n(t,[2,3]),n(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:o,15:a,17:i,19:f,20:h,21:17,22:18,23:c,24:_},n(t,[2,10],{1:[2,1]}),n(t,[2,6]),{12:21,14:o,15:a,17:i,19:f,20:h,21:17,22:18,23:c,24:_},n(t,[2,8]),n(t,[2,9]),n(t,[2,11]),{16:[1,22]},{18:[1,23]},n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,17]),n(t,[2,18]),n(t,[2,19]),n(t,[2,7]),n(t,[2,12]),n(t,[2,13])],defaultActions:{},parseError:e(function(l,y){if(y.recoverable)this.trace(l);else{var g=Error(l);throw g.hash=y,g}},"parseError"),parse:e(function(l){var y=this,g=[0],k=[],w=[null],m=[],I=this.table,T="",W=0,D=0,K=0,J=2,B=1,G=m.slice.call(arguments,1),L=Object.create(this.lexer),z={yy:{}};for(var X in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,X))z.yy[X]=this.yy[X];if(L.setInput(l,z.yy),z.yy.lexer=L,z.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var Q=L.yylloc;m.push(Q);var A=L.options&&L.options.ranges;if(typeof z.yy.parseError==="function")this.parseError=z.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(U){g.length=g.length-2*U,w.length=w.length-U,m.length=m.length-U}e(N,"popStack");function M(){var U=k.pop()||L.lex()||B;if(typeof U!=="number"){if(U instanceof Array)k=U,U=k.pop();U=y.symbols_[U]||U}return U}e(M,"lex");var H,P,F,R,lt,rt,q={},nt,Z,kt,it;while(!0){if(F=g[g.length-1],this.defaultActions[F])R=this.defaultActions[F];else{if(H===null||typeof H>"u")H=M();R=I[F]&&I[F][H]}if(typeof R>"u"||!R.length||!R[0]){var ct="";it=[];for(nt in I[F])if(this.terminals_[nt]&&nt>J)it.push("'"+this.terminals_[nt]+"'");if(L.showPosition)ct="Parse error on line "+(W+1)+`:
1
+ import{e,Zt,r,Y,u,d,b,mt,Ea,C,s,p,V,Ge,ae,Ye}from"./chunk-wvdehm9y.js";import{bt}from"./chunk-b6k9w215.js";var ht=function(){var n=e(function(E,l,y,g){for(y=y||{},g=E.length;g--;y[E[g]]=l);return y},"o"),t=[6,11,13,14,15,17,19,20,23,24],o=[1,12],a=[1,13],i=[1,14],f=[1,15],h=[1,16],c=[1,19],_=[1,20],x={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(l,y,g,k,w,m,I){var T=m.length-1;switch(w){case 1:return m[T-1];case 3:k.setDirection("LR");break;case 4:k.setDirection("TD");break;case 5:this.$=[];break;case 6:m[T-1].push(m[T]),this.$=m[T-1];break;case 7:case 8:this.$=m[T];break;case 9:case 10:this.$=[];break;case 11:k.getCommonDb().setDiagramTitle(m[T].substr(6)),this.$=m[T].substr(6);break;case 12:this.$=m[T].trim(),k.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=m[T].trim(),k.getCommonDb().setAccDescription(this.$);break;case 15:k.addSection(m[T].substr(8)),this.$=m[T].substr(8);break;case 18:k.addTask(m[T],0,""),this.$=m[T];break;case 19:k.addEvent(m[T].substr(2)),this.$=m[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},n(t,[2,5],{5:6}),n(t,[2,2]),n(t,[2,3]),n(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:o,15:a,17:i,19:f,20:h,21:17,22:18,23:c,24:_},n(t,[2,10],{1:[2,1]}),n(t,[2,6]),{12:21,14:o,15:a,17:i,19:f,20:h,21:17,22:18,23:c,24:_},n(t,[2,8]),n(t,[2,9]),n(t,[2,11]),{16:[1,22]},{18:[1,23]},n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,17]),n(t,[2,18]),n(t,[2,19]),n(t,[2,7]),n(t,[2,12]),n(t,[2,13])],defaultActions:{},parseError:e(function(l,y){if(y.recoverable)this.trace(l);else{var g=Error(l);throw g.hash=y,g}},"parseError"),parse:e(function(l){var y=this,g=[0],k=[],w=[null],m=[],I=this.table,T="",W=0,D=0,K=0,J=2,B=1,G=m.slice.call(arguments,1),L=Object.create(this.lexer),z={yy:{}};for(var X in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,X))z.yy[X]=this.yy[X];if(L.setInput(l,z.yy),z.yy.lexer=L,z.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var Q=L.yylloc;m.push(Q);var A=L.options&&L.options.ranges;if(typeof z.yy.parseError==="function")this.parseError=z.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(U){g.length=g.length-2*U,w.length=w.length-U,m.length=m.length-U}e(N,"popStack");function M(){var U=k.pop()||L.lex()||B;if(typeof U!=="number"){if(U instanceof Array)k=U,U=k.pop();U=y.symbols_[U]||U}return U}e(M,"lex");var H,P,F,R,lt,rt,q={},nt,Z,kt,it;while(!0){if(F=g[g.length-1],this.defaultActions[F])R=this.defaultActions[F];else{if(H===null||typeof H>"u")H=M();R=I[F]&&I[F][H]}if(typeof R>"u"||!R.length||!R[0]){var ct="";it=[];for(nt in I[F])if(this.terminals_[nt]&&nt>J)it.push("'"+this.terminals_[nt]+"'");if(L.showPosition)ct="Parse error on line "+(W+1)+`:
2
2
  `+L.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[H]||H)+"'";else ct="Parse error on line "+(W+1)+": Unexpected "+(H==B?"end of input":"'"+(this.terminals_[H]||H)+"'");this.parseError(ct,{text:L.match,token:this.terminals_[H]||H,line:L.yylineno,loc:Q,expected:it})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+F+", token: "+H);switch(R[0]){case 1:if(g.push(H),w.push(L.yytext),m.push(L.yylloc),g.push(R[1]),H=null,!P){if(D=L.yyleng,T=L.yytext,W=L.yylineno,Q=L.yylloc,K>0)K--}else H=P,P=null;break;case 2:if(Z=this.productions_[R[1]][1],q.$=w[w.length-Z],q._$={first_line:m[m.length-(Z||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(Z||1)].first_column,last_column:m[m.length-1].last_column},A)q._$.range=[m[m.length-(Z||1)].range[0],m[m.length-1].range[1]];if(rt=this.performAction.apply(q,[T,D,W,z.yy,R[1],w,m].concat(G)),typeof rt<"u")return rt;if(Z)g=g.slice(0,-1*Z*2),w=w.slice(0,-1*Z),m=m.slice(0,-1*Z);g.push(this.productions_[R[1]][0]),w.push(q.$),m.push(q._$),kt=I[g[g.length-2]][g[g.length-1]],g.push(kt);break;case 3:return!0}}return!0},"parse")},S=function(){var E={EOF:1,parseError:e(function(y,g){if(this.yy.parser)this.yy.parser.parseError(y,g);else throw Error(y)},"parseError"),setInput:e(function(l,y){if(this.yy=y||this.yy||{},this._input=l,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];return this.offset=0,this},"setInput"),input:e(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var y=l.match(/(?:\r\n?|\n).*/g);if(y)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),l},"input"),unput:e(function(l){var y=l.length,g=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1)this.yylineno-=g.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===k.length?this.yylloc.first_column:0)+k[k.length-g.length].length-g[0].length:this.yylloc.first_column-y},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-y];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),y=Array(l.length+1).join("-");return l+this.upcomingInput()+`
@@ -0,0 +1,8 @@
1
+ import{e}from"./chunk-wvdehm9y.js";import"./chunk-rvrf0f3h.js";import{Ei,Ai}from"./chunk-hvw3gn2a.js";import"./chunk-0b47eyrf.js";import"./chunk-cjfssg3m.js";import"./chunk-bhsaj6qq.js";import"./chunk-p0kvmf28.js";var r=e((t)=>`${Ei(t)}
2
+ .swimlane.cluster:not([data-color-id]) rect {
3
+ stroke: ${t.clusterBorder} !important;
4
+ }
5
+ [data-look="neo"].cluster rect {
6
+ filter: none;
7
+ }
8
+ `,"getStyles"),o=r,D=Ai({styles:o});export{D as diagram};
@@ -1,4 +1,4 @@
1
- import{e,Zt,r,b,C,S,E,T,A,I,L,s,N,ce,ae,ie,ft,ge,ye}from"./chunk-vymqrpm3.js";import{he}from"./chunk-es28k2t7.js";import{se}from"./chunk-zmdnxn6m.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],de=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],Ee=[1,83],Z=[1,80],be=[1,84],Re=[1,85],ke=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],re=[1,106],ne=[1,107],le=[1,108],oe=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(de,[2,29]),t(de,[2,30]),t(de,[2,31]),t(de,[2,32]),t(de,[2,33]),t(de,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:re,34:ne,36:le,38:oe,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:Ee,78:121,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:re,34:ne,36:le,38:oe,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:re,34:ne,36:le,38:oe,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:160,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:161,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:162,31:re,34:ne,36:le,38:oe,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,fe,O,gt,Be,pe={},Me,z,at,Fe;while(!0){if(fe=h[h.length-1],this.defaultActions[fe])O=this.defaultActions[fe];else{if(x===null||typeof x>"u")x=nt();O=Le[fe]&&Le[fe][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[fe])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
1
+ import{e,Zt,r,b,C,S,E,T,A,I,L,s,N,ce,ae,ie,ft,ge,ye}from"./chunk-wvdehm9y.js";import{he}from"./chunk-bhsaj6qq.js";import{se}from"./chunk-p0kvmf28.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],de=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],Ee=[1,83],Z=[1,80],be=[1,84],Re=[1,85],ke=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],re=[1,106],ne=[1,107],le=[1,108],oe=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(de,[2,29]),t(de,[2,30]),t(de,[2,31]),t(de,[2,32]),t(de,[2,33]),t(de,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:re,34:ne,36:le,38:oe,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:Ee,78:121,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:re,34:ne,36:le,38:oe,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:re,34:ne,36:le,38:oe,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:160,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:161,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:162,31:re,34:ne,36:le,38:oe,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,fe,O,gt,Be,pe={},Me,z,at,Fe;while(!0){if(fe=h[h.length-1],this.defaultActions[fe])O=this.defaultActions[fe];else{if(x===null||typeof x>"u")x=nt();O=Le[fe]&&Le[fe][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[fe])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(x==rt?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[x]||x,line:_.yylineno,loc:Ue,expected:Fe})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+fe+", token: "+x);switch(O[0]){case 1:if(h.push(x),p.push(_.yytext),i.push(_.yylloc),h.push(O[1]),x=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else x=Ye,Ye=null;break;case 2:if(z=this.productions_[O[1]][1],pe.$=p[p.length-z],pe._$={first_line:i[i.length-(z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(z||1)].first_column,last_column:i[i.length-1].last_column},ut)pe._$.range=[i[i.length-(z||1)].range[0],i[i.length-1].range[1]];if(Be=this.performAction.apply(pe,[c,st,Oe,me.yy,O[1],p,i].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),i=i.slice(0,-1*z);h.push(this.productions_[O[1]][0]),p.push(pe.$),i.push(pe._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(l,o){if(this.yy=o||this.yy||{},this._input=l,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];return this.offset=0,this},"setInput"),input:e(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);if(o)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),l},"input"),unput:e(function(l){var o=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var n=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===n.length?this.yylloc.first_column:0)+n[n.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),o=Array(l.length+1).join("-");return l+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{e,r,s,R,Ct,ho,ht,Qt,Tt,Hn,Jt}from"./chunk-vymqrpm3.js";import{be,Pe,Qe,Te,ct,qt,H,me,at,Vt,it,cr,ua,da,pa,yn,wt,ma,vn,Oe,bn,$t,kt,xn,Gt,_n,fa,ha,ur,xe,ga,wn,Wt,kn,dr,pr,Ht,ya,mr,va,zr,ut,fr,ba,xa,_a,We,hr,gr,Cn,wa,yr,f,Je,dt,_e,Yt,Q}from"./chunk-7xk0ntav.js";import{sa,la,G,$n,eo,ca,lr}from"./chunk-jzfd7cyh.js";import{At}from"./chunk-fhnypcrm.js";var wr={};At(wr,{default:()=>er});var uo=/\s/;function co(t){var n=t.length;while(n--&&uo.test(t.charAt(n)));return n}var te=co;var po=/^\s+/;function lo(t){return t?t.slice(0,te(t)+1).replace(po,""):t}var ne=lo;var oe=NaN,mo=/^[-+]0x[0-9a-f]+$/i,go=/^0b[01]+$/i,vo=/^0o[0-7]+$/i,bo=parseInt;function yo(t){if(typeof t=="number")return t;if(ct(t))return oe;if(me(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=me(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=ne(t);var o=go.test(t);return o||vo.test(t)?bo(t.slice(2),o?2:8):mo.test(t)?oe:+t}var ie=yo;var ae=1/0,wo=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function _o(t){if(!t)return t===0?t:0;if(t=ie(t),t===ae||t===-ae){var n=t<0?-1:1;return n*wo}return t===t?t:0}var Y=_o;function Eo(t){var n=Y(t),o=n%1;return n===n?o?n-o:n:0}var fe=Eo;var se=Object.create,xo=function(){function t(){}return function(n){if(!me(n))return{};if(se)return se(n);t.prototype=n;var o=new t;return t.prototype=void 0,o}}(),ue=xo;function Oo(t,n){var o=-1,i=t.length;n||(n=Array(i));while(++o<i)n[o]=t[o];return n}var vr=Oo;function Lo(t,n,o){if(n=="__proto__"&&cr)cr(t,n,{configurable:!0,enumerable:!0,value:o,writable:!0});else t[n]=o}var M=Lo;var Io=Object.prototype,No=Io.hasOwnProperty;function Po(t,n,o){var i=t[n];if(!(No.call(t,n)&&wt(i,o))||o===void 0&&!(n in t))M(t,n,o)}var j=Po;function ko(t,n,o,i){var a=!o;o||(o={});var u=-1,d=n.length;while(++u<d){var c=n[u],p=i?i(o[c],t[c],c,o,t):void 0;if(p===void 0)p=t[c];if(a)M(o,c,p);else j(o,c,p)}return o}var P=ko;function Ao(t,n,o){if(!me(o))return!1;var i=typeof n;if(i=="number"?Oe(o)&&yn(n,o.length):i=="string"&&(n in o))return wt(o[n],t);return!1}var T=Ao;function Ro(t){return vn(function(n,o){var i=-1,a=o.length,u=a>1?o[a-1]:void 0,d=a>2?o[2]:void 0;if(u=t.length>3&&typeof u=="function"?(a--,u):void 0,d&&T(o[0],o[1],d))u=a<3?void 0:u,a=1;n=Object(n);while(++i<a){var c=o[i];if(c)t(n,c,i,u)}return n})}var de=Ro;function Mo(t){var n=[];if(t!=null)for(var o in Object(t))n.push(o);return n}var ce=Mo;var jo=Object.prototype,Bo=jo.hasOwnProperty;function Do(t){if(!me(t))return ce(t);var n=bn(t),o=[];for(var i in t)if(!(i=="constructor"&&(n||!Bo.call(t,i))))o.push(i);return o}var pe=Do;function Fo(t){return Oe(t)?fa(t,!0):pe(t)}var L=Fo;function Go(t){var n=t==null?0:t.length;return n?pr(t,1):[]}var S=Go;function Xo(t){return ua(ma(t,void 0,S),t+"")}var le=Xo;var Uo=ha(Object.getPrototypeOf,Object),z=Uo;var Vo="[object Object]",Yo=Function.prototype,zo=Object.prototype,he=Yo.toString,Wo=zo.hasOwnProperty,qo=he.call(Object);function Ho(t){if(!Te(t)||Qe(t)!=Vo)return!1;var n=z(t);if(n===null)return!0;var o=Wo.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&he.call(o)==qo}var ge=Ho;var Ko="\\ud800-\\udfff",Jo="\\u0300-\\u036f",Zo="\\ufe20-\\ufe2f",$o="\\u20d0-\\u20ff",Qo=Jo+Zo+$o,ri="\\ufe0e\\ufe0f",ei="\\u200d",ti=RegExp("["+ei+Ko+Qo+ri+"]");function ni(t){return ti.test(t)}var ve=ni;function oi(t,n){return t&&P(n,xe(n),t)}var ye=oi;function ii(t,n){return t&&P(n,L(n),t)}var we=ii;var Se=typeof wr=="object"&&wr&&!wr.nodeType&&wr,Ee=Se&&typeof br=="object"&&br&&!br.nodeType&&br,ai=Ee&&Ee.exports===Se,Le=ai?be.Buffer:void 0,Ie=Le?Le.allocUnsafe:void 0;function fi(t,n){if(n)return t.slice();var o=t.length,i=Ie?Ie(o):new t.constructor(o);return t.copy(i),i}var er=fi;function si(t,n){return P(t,mr(t),n)}var Ne=si;var ui=Object.getOwnPropertySymbols,di=!ui?ya:function(t){var n=[];while(t)dr(n,mr(t)),t=z(t);return n},_r=di;function ci(t,n){return P(t,_r(t),n)}var ke=ci;function pi(t){return va(t,L,_r)}var Ce=pi;var li=Object.prototype,mi=li.hasOwnProperty;function hi(t){var n=t.length,o=new t.constructor(n);if(n&&typeof t[0]=="string"&&mi.call(t,"index"))o.index=t.index,o.input=t.input;return o}var Ae=hi;function gi(t){var n=new t.constructor(t.byteLength);return new fr(n).set(new fr(t)),n}var W=gi;function vi(t,n){var o=n?W(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.byteLength)}var Re=vi;var bi=/\w*$/;function yi(t){var n=new t.constructor(t.source,bi.exec(t));return n.lastIndex=t.lastIndex,n}var Me=yi;var je=Pe?Pe.prototype:void 0,Be=je?je.valueOf:void 0;function wi(t){return Be?Object(Be.call(t)):{}}var De=wi;function _i(t,n){var o=n?W(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Er=_i;var Ei="[object Boolean]",xi="[object Date]",Oi="[object Map]",Li="[object Number]",Ii="[object RegExp]",Si="[object Set]",Ni="[object String]",Pi="[object Symbol]",ki="[object ArrayBuffer]",Ti="[object DataView]",Ci="[object Float32Array]",Ai="[object Float64Array]",Ri="[object Int8Array]",Mi="[object Int16Array]",ji="[object Int32Array]",Bi="[object Uint8Array]",Di="[object Uint8ClampedArray]",Fi="[object Uint16Array]",Gi="[object Uint32Array]";function Xi(t,n,o){var i=t.constructor;switch(n){case ki:return W(t);case Ei:case xi:return new i(+t);case Ti:return Re(t,o);case Ci:case Ai:case Ri:case Mi:case ji:case Bi:case Di:case Fi:case Gi:return Er(t,o);case Oi:return new i;case Li:case Ni:return new i(t);case Ii:return Me(t);case Si:return new i;case Pi:return De(t)}}var Fe=Xi;function Ui(t){return typeof t.constructor=="function"&&!bn(t)?ue(z(t)):{}}var xr=Ui;var Vi="[object Map]";function Yi(t){return Te(t)&&ut(t)==Vi}var Ge=Yi;var Xe=Gt&&Gt.isMap,zi=Xe?xn(Xe):Ge,Ue=zi;var Wi="[object Set]";function qi(t){return Te(t)&&ut(t)==Wi}var Ve=qi;var Ye=Gt&&Gt.isSet,Hi=Ye?xn(Ye):Ve,ze=Hi;var Zi=1,$i=2,ra=4,qe="[object Arguments]",ea="[object Array]",ta="[object Boolean]",na="[object Date]",oa="[object Error]",He="[object Function]",ia="[object GeneratorFunction]",aa="[object Map]",Ea="[object Number]",Ke="[object Object]",Oa="[object RegExp]",La="[object Set]",Ia="[object String]",Sa="[object Symbol]",Na="[object WeakMap]",Pa="[object ArrayBuffer]",ka="[object DataView]",Ta="[object Float32Array]",Ca="[object Float64Array]",Aa="[object Int8Array]",Ra="[object Int16Array]",Ma="[object Int32Array]",ja="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",Fa="[object Uint32Array]",x={};x[qe]=x[ea]=x[Pa]=x[ka]=x[ta]=x[na]=x[Ta]=x[Ca]=x[Aa]=x[Ra]=x[Ma]=x[aa]=x[Ea]=x[Ke]=x[Oa]=x[La]=x[Ia]=x[Sa]=x[ja]=x[Ba]=x[Da]=x[Fa]=!0;x[oa]=x[He]=x[Na]=!1;function Or(t,n,o,i,a,u){var d,c=n&Zi,p=n&$i,l=n&ra;if(o)d=a?o(t,i,a,u):o(t);if(d!==void 0)return d;if(!me(t))return t;var m=H(t);if(m){if(d=Ae(t),!c)return vr(t,d)}else{var h=ut(t),g=h==He||h==ia;if(kt(t))return er(t,c);if(h==Ke||h==qe||g&&!a){if(d=p||g?{}:xr(t),!c)return p?ke(t,we(d,t)):Ne(t,ye(d,t))}else{if(!x[h])return a?t:{};d=Fe(t,h,c)}}u||(u=new Ht);var b=u.get(t);if(b)return b;if(u.set(t,d),ze(t))t.forEach(function(v){d.add(Or(v,n,o,v,t,u))});else if(Ue(t))t.forEach(function(v,_){d.set(_,Or(v,n,o,_,t,u))});var w=l?p?Ce:zr:p?L:xe,y=m?void 0:w(t);return da(y||t,function(v,_){if(y)_=v,v=t[_];j(d,_,Or(v,n,o,_,t,u))}),d}var Ze=Or;var Ga=1,Xa=4;function Ua(t){return Ze(t,Ga|Xa)}var $e=Ua;var Va=function(){return be.Date.now()},Tr=Va;var rt=Object.prototype,Ya=rt.hasOwnProperty,za=vn(function(t,n){t=Object(t);var o=-1,i=n.length,a=i>2?n[2]:void 0;if(a&&T(n[0],n[1],a))i=1;while(++o<i){var u=n[o],d=L(u),c=-1,p=d.length;while(++c<p){var l=d[c],m=t[l];if(m===void 0||wt(m,rt[l])&&!Ya.call(t,l))t[l]=u[l]}}return t}),et=za;function Wa(t,n,o){if(o!==void 0&&!wt(t[n],o)||o===void 0&&!(n in t))M(t,n,o)}var tr=Wa;function qa(t,n){if(n==="constructor"&&typeof t[n]==="function")return;if(n=="__proto__")return;return t[n]}var nr=qa;function Ha(t){return P(t,L(t))}var tt=Ha;function Ka(t,n,o,i,a,u,d){var c=nr(t,o),p=nr(n,o),l=d.get(p);if(l){tr(t,o,l);return}var m=u?u(c,p,o+"",t,n,d):void 0,h=m===void 0;if(h){var g=H(p),b=!g&&kt(p),w=!g&&!b&&_n(p);if(m=p,g||b||w)if(H(c))m=c;else if(wa(c))m=vr(c);else if(b)h=!1,m=er(p,!0);else if(w)h=!1,m=Er(p,!0);else m=[];else if(ge(p)||$t(p)){if(m=c,$t(c))m=tt(c);else if(!me(c)||Vt(c))m=xr(p)}else h=!1}if(h)d.set(p,m),a(m,p,i,u,d),d.delete(p);tr(t,o,m)}var nt=Ka;function ot(t,n,o,i,a){if(t===n)return;hr(n,function(u,d){if(a||(a=new Ht),me(u))nt(t,n,d,o,ot,i,a);else{var c=i?i(nr(t,d),u,d+"",t,n,a):void 0;if(c===void 0)c=u;tr(t,d,c)}},L)}var ft=ot;function Ja(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}var U=Ja;function Za(t){return function(n,o,i){var a=Object(n);if(!Oe(n)){var u=We(o,3);n=xe(n),o=function(c){return u(a[c],c,a)}}var d=t(n,o,i);return d>-1?a[u?n[d]:d]:void 0}}var st=Za;var $a=Math.max;function Qa(t,n,o){var i=t==null?0:t.length;if(!i)return-1;var a=o==null?0:fe(o);if(a<0)a=$a(i+a,0);return pa(t,We(n,3),a)}var pt=Qa;var rf=st(pt),or=rf;function ef(t,n){var o=-1,i=Oe(t)?Array(t.length):[];return Cn(t,function(a,u,d){i[++o]=n(a,u,d)}),i}var Lr=ef;function tf(t,n){var o=H(t)?qt:Lr;return o(t,We(n,3))}var E=tf;function nf(t,n){return t==null?t:hr(t,yr(n),L)}var lt=nf;function of(t,n){return t&&gr(t,yr(n))}var mt=of;function af(t,n){return t>n}var gt=af;var ff=Object.prototype,sf=ff.hasOwnProperty;function uf(t,n){return t!=null&&sf.call(t,n)}var vt=uf;function df(t,n){return t!=null&&ba(t,n,vt)}var Ir=df;var cf="[object String]";function pf(t){return typeof t=="string"||!H(t)&&Te(t)&&Qe(t)==cf}var bt=pf;function lf(t,n){return t<n}var Sr=lf;function mf(t,n){var o={};return n=We(n,3),gr(t,function(i,a,u){M(o,a,n(i,a,u))}),o}var q=mf;function hf(t,n,o){var i=-1,a=t.length;while(++i<a){var u=t[i],d=n(u);if(d!=null&&(c===void 0?d===d&&!ct(d):o(d,c)))var c=d,p=u}return p}var K=hf;function gf(t){return t&&t.length?K(t,at,gt):void 0}var I=gf;var vf=de(function(t,n,o){ft(t,n,o)}),ir=vf;function bf(t){return t&&t.length?K(t,at,Sr):void 0}var B=bf;function yf(t,n){return t&&t.length?K(t,We(n,2),Sr):void 0}var J=yf;function wf(t,n,o,i){if(!me(t))return t;n=wn(n,t);var a=-1,u=n.length,d=u-1,c=t;while(c!=null&&++a<u){var p=Wt(n[a]),l=o;if(p==="__proto__"||p==="constructor"||p==="prototype")return t;if(a!=d){var m=c[p];if(l=i?i(m,p,c):void 0,l===void 0)l=me(m)?m:yn(n[a+1])?[]:{}}j(c,p,l),c=c[p]}return t}var yt=wf;function _f(t,n,o){var i=-1,a=n.length,u={};while(++i<a){var d=n[i],c=kn(t,d);if(o(c,d))yt(u,wn(d,t),c)}return u}var _t=_f;function Ef(t,n){var o=t.length;t.sort(n);while(o--)t[o]=t[o].value;return t}var Et=Ef;function xf(t,n){if(t!==n){var o=t!==void 0,i=t===null,a=t===t,u=ct(t),d=n!==void 0,c=n===null,p=n===n,l=ct(n);if(!c&&!l&&!u&&t>n||u&&d&&p&&!c&&!l||i&&d&&p||!o&&p||!a)return 1;if(!i&&!u&&!l&&t<n||l&&o&&a&&!i&&!u||c&&o&&a||!d&&a||!p)return-1}return 0}var xt=xf;function Of(t,n,o){var i=-1,a=t.criteria,u=n.criteria,d=a.length,c=o.length;while(++i<d){var p=xt(a[i],u[i]);if(p){if(i>=c)return p;var l=o[i];return p*(l=="desc"?-1:1)}}return t.index-n.index}var Ot=Of;function Lf(t,n,o){if(n.length)n=qt(n,function(u){if(H(u))return function(d){return kn(d,u.length===1?u[0]:u)};return u});else n=[at];var i=-1;n=qt(n,xn(We));var a=Lr(t,function(u,d,c){var p=qt(n,function(l){return l(u)});return{criteria:p,index:++i,value:u}});return Et(a,function(u,d){return Ot(u,d,o)})}var Lt=Lf;var If=_a("length"),It=If;var Nt="\\ud800-\\udfff",Sf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Pf="\\u20d0-\\u20ff",kf=Sf+Nf+Pf,Tf="\\ufe0e\\ufe0f",Cf="["+Nt+"]",Cr="["+kf+"]",Ar="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Cr+"|"+Ar+")",Pt="[^"+Nt+"]",Rt="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rf="\\u200d",jt=Af+"?",Bt="["+Tf+"]?",Mf="(?:"+Rf+"(?:"+[Pt,Rt,Mt].join("|")+")"+Bt+jt+")*",jf=Bt+jt+Mf,Bf="(?:"+[Pt+Cr+"?",Cr,Rt,Mt,Cf].join("|")+")",St=RegExp(Ar+"(?="+Ar+")|"+Bf+jf,"g");function Df(t){var n=St.lastIndex=0;while(St.test(t))++n;return n}var Dt=Df;function Ff(t){return ve(t)?Dt(t):It(t)}var Ft=Ff;function Gf(t,n){return _t(t,n,function(o,i){return xa(t,i)})}var Xt=Gf;var Xf=le(function(t,n){return t==null?{}:Xt(t,n)}),Z=Xf;var{ceil:Uf,max:Vf}=Math;function Yf(t,n,o,i){var a=-1,u=Vf(Uf((n-t)/(o||1)),0),d=Array(u);while(u--)d[i?u:++a]=t,t+=o;return d}var Ut=Yf;function zf(t){return function(n,o,i){if(i&&typeof i!="number"&&T(n,o,i))o=i=void 0;if(n=Y(n),o===void 0)o=n,n=0;else o=Y(o);return i=i===void 0?n<o?1:-1:Y(i),Ut(n,o,i,t)}}var zt=zf;var Wf=zt(),N=Wf;var qf="[object Map]",Hf="[object Set]";function Kf(t){if(t==null)return 0;if(Oe(t))return bt(t)?Ft(t):t.length;var n=ut(t);if(n==qf||n==Hf)return t.size;return ur(t).length}var Kt=Kf;var Jf=vn(function(t,n){if(t==null)return[];var o=n.length;if(o>1&&T(t,n[0],n[1]))n=[];else if(o>2&&T(n[0],n[1],n[2]))n=[n[0]];return Lt(t,pr(n,1),[])}),C=Jf;var Zf=0;function $f(t){var n=++Zf;return ga(t)+n}var rr=$f;function Qf(t,n,o){var i=-1,a=t.length,u=n.length,d={};while(++i<a){var c=i<u?n[i]:void 0;o(d,t[i],c)}return d}var Zt=Qf;function rs(t,n){return Zt(t||[],n||[],j)}var Rr=rs;class Mr{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,n=t._prev;if(n!==t)return rn(n),n}enqueue(t){var n=this._sentinel;if(t._prev&&t._next)rn(t);t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){var t=[],n=this._sentinel,o=n._prev;while(o!==n)t.push(JSON.stringify(o,es)),o=o._prev;return"["+t.join(", ")+"]"}}function rn(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function es(t,n){if(t!=="_next"&&t!=="_prev")return n}var ts=it(1);function en(t,n){if(t.nodeCount()<=1)return[];var o=os(t,n||ts),i=ns(o.graph,o.buckets,o.zeroIdx);return S(E(i,function(a){return t.outEdges(a.v,a.w)}))}function ns(t,n,o){var i=[],a=n[n.length-1],u=n[0],d;while(t.nodeCount()){while(d=u.dequeue())jr(t,n,o,d);while(d=a.dequeue())jr(t,n,o,d);if(t.nodeCount()){for(var c=n.length-2;c>0;--c)if(d=n[c].dequeue(),d){i=i.concat(jr(t,n,o,d,!0));break}}}return i}function jr(t,n,o,i,a){var u=a?[]:void 0;return f(t.inEdges(i.v),function(d){var c=t.edge(d),p=t.node(d.v);if(a)u.push({v:d.v,w:d.w});p.out-=c,Br(n,o,p)}),f(t.outEdges(i.v),function(d){var c=t.edge(d),p=d.w,l=t.node(p);l.in-=c,Br(n,o,l)}),t.removeNode(i.v),u}function os(t,n){var o=new Q,i=0,a=0;f(t.nodes(),function(c){o.setNode(c,{v:c,in:0,out:0})}),f(t.edges(),function(c){var p=o.edge(c.v,c.w)||0,l=n(c),m=p+l;o.setEdge(c.v,c.w,m),a=Math.max(a,o.node(c.v).out+=l),i=Math.max(i,o.node(c.w).in+=l)});var u=N(a+i+3).map(function(){return new Mr}),d=i+1;return f(o.nodes(),function(c){Br(u,d,o.node(c))}),{graph:o,buckets:u,zeroIdx:d}}function Br(t,n,o){if(!o.out)t[0].enqueue(o);else if(!o.in)t[t.length-1].enqueue(o);else t[o.out-o.in+n].enqueue(o)}function tn(t){var n=t.graph().acyclicer==="greedy"?en(t,o(t)):is(t);f(n,function(i){var a=t.edge(i);t.removeEdge(i),a.forwardName=i.name,a.reversed=!0,t.setEdge(i.w,i.v,a,rr("rev"))});function o(i){return function(a){return i.edge(a).weight}}}function is(t){var n=[],o={},i={};function a(u){if(Object.prototype.hasOwnProperty.call(i,u))return;i[u]=!0,o[u]=!0,f(t.outEdges(u),function(d){if(Object.prototype.hasOwnProperty.call(o,d.w))n.push(d);else a(d.w)}),delete o[u]}return f(t.nodes(),a),n}function nn(t){f(t.edges(),function(n){var o=t.edge(n);if(o.reversed){t.removeEdge(n);var i=o.forwardName;delete o.reversed,delete o.forwardName,t.setEdge(n.w,n.v,o,i)}})}function k(t,n,o,i){var a;do a=rr(i);while(t.hasNode(a));return o.dummy=n,t.setNode(a,o),a}function an(t){var n=new Q().setGraph(t.graph());return f(t.nodes(),function(o){n.setNode(o,t.node(o))}),f(t.edges(),function(o){var i=n.edge(o.v,o.w)||{weight:0,minlen:1},a=t.edge(o);n.setEdge(o.v,o.w,{weight:i.weight+a.weight,minlen:Math.max(i.minlen,a.minlen)})}),n}function Nr(t){var n=new Q({multigraph:t.isMultigraph()}).setGraph(t.graph());return f(t.nodes(),function(o){if(!t.children(o).length)n.setNode(o,t.node(o))}),f(t.edges(),function(o){n.setEdge(o,t.edge(o))}),n}function Dr(t,n){var{x:o,y:i}=t,a=n.x-o,u=n.y-i,d=t.width/2,c=t.height/2;if(!a&&!u)throw Error("Not possible to find intersection inside of the rectangle");var p,l;if(Math.abs(u)*d>Math.abs(a)*c){if(u<0)c=-c;p=c*a/u,l=c}else{if(a<0)d=-d;p=d,l=d*u/a}return{x:o+p,y:i+l}}function D(t){var n=E(N(Gr(t)+1),function(){return[]});return f(t.nodes(),function(o){var i=t.node(o),a=i.rank;if(!_e(a))n[a][i.order]=o}),n}function fn(t){var n=B(E(t.nodes(),function(o){return t.node(o).rank}));f(t.nodes(),function(o){var i=t.node(o);if(Ir(i,"rank"))i.rank-=n})}function sn(t){var n=B(E(t.nodes(),function(u){return t.node(u).rank})),o=[];f(t.nodes(),function(u){var d=t.node(u).rank-n;if(!o[d])o[d]=[];o[d].push(u)});var i=0,a=t.graph().nodeRankFactor;f(o,function(u,d){if(_e(u)&&d%a!==0)--i;else if(i)f(u,function(c){t.node(c).rank+=i})})}function Fr(t,n,o,i){var a={width:0,height:0};if(arguments.length>=4)a.rank=o,a.order=i;return k(t,"border",a,n)}function Gr(t){return I(E(t.nodes(),function(n){var o=t.node(n).rank;if(!_e(o))return o}))}function un(t,n){var o={lhs:[],rhs:[]};return f(t,function(i){if(n(i))o.lhs.push(i);else o.rhs.push(i)}),o}function dn(t,n){var o=Tr();try{return n()}finally{console.log(t+" time: "+(Tr()-o)+"ms")}}function cn(t,n){return n()}function ln(t){function n(o){var i=t.children(o),a=t.node(o);if(i.length)f(i,n);if(Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var u=a.minRank,d=a.maxRank+1;u<d;++u)pn(t,"borderLeft","_bl",o,a,u),pn(t,"borderRight","_br",o,a,u)}}f(t.children(),n)}function pn(t,n,o,i,a,u){var d={width:0,height:0,rank:u,borderType:n},c=a[n][u-1],p=k(t,"border",d,o);if(a[n][u]=p,t.setParent(p,i),c)t.setEdge(c,p,{weight:1})}function hn(t){var n=t.graph().rankdir.toLowerCase();if(n==="lr"||n==="rl")En(t)}function gn(t){var n=t.graph().rankdir.toLowerCase();if(n==="bt"||n==="rl")as(t);if(n==="lr"||n==="rl")fs(t),En(t)}function En(t){f(t.nodes(),function(n){mn(t.node(n))}),f(t.edges(),function(n){mn(t.edge(n))})}function mn(t){var n=t.width;t.width=t.height,t.height=n}function as(t){f(t.nodes(),function(n){Xr(t.node(n))}),f(t.edges(),function(n){var o=t.edge(n);if(f(o.points,Xr),Object.prototype.hasOwnProperty.call(o,"y"))Xr(o)})}function Xr(t){t.y=-t.y}function fs(t){f(t.nodes(),function(n){Ur(t.node(n))}),f(t.edges(),function(n){var o=t.edge(n);if(f(o.points,Ur),Object.prototype.hasOwnProperty.call(o,"x"))Ur(o)})}function Ur(t){var n=t.x;t.x=t.y,t.y=n}function On(t){t.graph().dummyChains=[],f(t.edges(),function(n){us(t,n)})}function us(t,n){var o=n.v,i=t.node(o).rank,a=n.w,u=t.node(a).rank,d=n.name,c=t.edge(n),p=c.labelRank;if(u===i+1)return;t.removeEdge(n);var l=void 0,m,h;for(h=0,++i;i<u;++h,++i){if(c.points=[],l={width:0,height:0,edgeLabel:c,edgeObj:n,rank:i},m=k(t,"edge",l,"_d"),i===p)l.width=c.width,l.height=c.height,l.dummy="edge-label",l.labelpos=c.labelpos;if(t.setEdge(o,m,{weight:c.weight},d),h===0)t.graph().dummyChains.push(m);o=m}t.setEdge(o,a,{weight:c.weight},d)}function Ln(t){f(t.graph().dummyChains,function(n){var o=t.node(n),i=o.edgeLabel,a;t.setEdge(o.edgeObj,i);while(o.dummy){if(a=t.successors(n)[0],t.removeNode(n),i.points.push({x:o.x,y:o.y}),o.dummy==="edge-label")i.x=o.x,i.y=o.y,i.width=o.width,i.height=o.height;n=a,o=t.node(n)}})}function ar(t){var n={};function o(i){var a=t.node(i);if(Object.prototype.hasOwnProperty.call(n,i))return a.rank;n[i]=!0;var u=B(E(t.outEdges(i),function(d){return o(d.w)-t.edge(d).minlen}));if(u===Number.POSITIVE_INFINITY||u===void 0||u===null)u=0;return a.rank=u}f(t.sources(),o)}function V(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}function Pr(t){var n=new Q({directed:!1}),o=t.nodes()[0],i=t.nodeCount();n.setNode(o,{});var a,u;while(ds(n,t)<i)a=cs(n,t),u=n.hasNode(a.v)?V(t,a):-V(t,a),ps(n,t,u);return n}function ds(t,n){function o(i){f(n.nodeEdges(i),function(a){var u=a.v,d=i===u?a.w:u;if(!t.hasNode(d)&&!V(n,a))t.setNode(d,{}),t.setEdge(i,d,{}),o(d)})}return f(t.nodes(),o),t.nodeCount()}function cs(t,n){return J(n.edges(),function(o){if(t.hasNode(o.v)!==t.hasNode(o.w))return V(n,o)})}function ps(t,n,o){f(t.nodes(),function(i){n.node(i).rank+=o})}var dh=it(1);var vh=it(1);Vr.CycleException=sr;function Vr(t){var n={},o={},i=[];function a(u){if(Object.prototype.hasOwnProperty.call(o,u))throw new sr;if(!Object.prototype.hasOwnProperty.call(n,u))o[u]=!0,n[u]=!0,f(t.predecessors(u),a),delete o[u],i.push(u)}if(f(t.sinks(),a),Kt(n)!==t.nodeCount())throw new sr;return i}function sr(){}sr.prototype=Error();function kr(t,n,o){if(!H(n))n=[n];var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],u={};return f(n,function(d){if(!t.hasNode(d))throw Error("Graph does not have node: "+d);Sn(t,d,o==="post",u,i,a)}),a}function Sn(t,n,o,i,a,u){if(!Object.prototype.hasOwnProperty.call(i,n)){if(i[n]=!0,!o)u.push(n);if(f(a(n),function(d){Sn(t,d,o,i,a,u)}),o)u.push(n)}}function Yr(t,n){return kr(t,n,"post")}function Wr(t,n){return kr(t,n,"pre")}X.initLowLimValues=Hr;X.initCutValues=qr;X.calcCutValue=Pn;X.leaveEdge=An;X.enterEdge=Rn;X.exchangeEdges=Mn;function X(t){t=an(t),ar(t);var n=Pr(t);Hr(n),qr(n,t);var o,i;while(o=An(n))i=Rn(n,t,o),Mn(n,t,o,i)}function qr(t,n){var o=Yr(t,t.nodes());o=o.slice(0,o.length-1),f(o,function(i){vs(t,n,i)})}function vs(t,n,o){var i=t.node(o),a=i.parent;t.edge(o,a).cutvalue=Pn(t,n,o)}function Pn(t,n,o){var i=t.node(o),a=i.parent,u=!0,d=n.edge(o,a),c=0;if(!d)u=!1,d=n.edge(a,o);return c=d.weight,f(n.nodeEdges(o),function(p){var l=p.v===o,m=l?p.w:p.v;if(m!==a){var h=l===u,g=n.edge(p).weight;if(c+=h?g:-g,ys(t,o,m)){var b=t.edge(o,m).cutvalue;c+=h?-b:b}}}),c}function Hr(t,n){if(arguments.length<2)n=t.nodes()[0];Tn(t,{},1,n)}function Tn(t,n,o,i,a){var u=o,d=t.node(i);if(n[i]=!0,f(t.neighbors(i),function(c){if(!Object.prototype.hasOwnProperty.call(n,c))o=Tn(t,n,o,c,i)}),d.low=u,d.lim=o++,a)d.parent=a;else delete d.parent;return o}function An(t){return or(t.edges(),function(n){return t.edge(n).cutvalue<0})}function Rn(t,n,o){var{v:i,w:a}=o;if(!n.hasEdge(i,a))i=o.w,a=o.v;var u=t.node(i),d=t.node(a),c=u,p=!1;if(u.lim>d.lim)c=d,p=!0;var l=Je(n.edges(),function(m){return p===Nn(t,t.node(m.v),c)&&p!==Nn(t,t.node(m.w),c)});return J(l,function(m){return V(n,m)})}function Mn(t,n,o,i){var{v:a,w:u}=o;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),Hr(t),qr(t,n),bs(t,n)}function bs(t,n){var o=or(t.nodes(),function(a){return!n.node(a).parent}),i=Wr(t,o);i=i.slice(1),f(i,function(a){var u=t.node(a).parent,d=n.edge(a,u),c=!1;if(!d)d=n.edge(u,a),c=!0;n.node(a).rank=n.node(u).rank+(c?d.minlen:-d.minlen)})}function ys(t,n,o){return t.hasEdge(n,o)}function Nn(t,n,o){return o.low<=n.lim&&n.lim<=o.lim}function Kr(t){switch(t.graph().ranker){case"network-simplex":jn(t);break;case"tight-tree":_s(t);break;case"longest-path":ws(t);break;default:jn(t)}}var ws=ar;function _s(t){ar(t),Pr(t)}function jn(t){X(t)}function Bn(t){var n=k(t,"root",{},"_root"),o=Es(t),i=I(dt(o))-1,a=2*i+1;t.graph().nestingRoot=n,f(t.edges(),function(d){t.edge(d).minlen*=a});var u=xs(t)+1;f(t.children(),function(d){Dn(t,n,a,u,i,o,d)}),t.graph().nodeRankFactor=a}function Dn(t,n,o,i,a,u,d){var c=t.children(d);if(!c.length){if(d!==n)t.setEdge(n,d,{weight:0,minlen:o});return}var p=Fr(t,"_bt"),l=Fr(t,"_bb"),m=t.node(d);if(t.setParent(p,d),m.borderTop=p,t.setParent(l,d),m.borderBottom=l,f(c,function(h){Dn(t,n,o,i,a,u,h);var g=t.node(h),b=g.borderTop?g.borderTop:h,w=g.borderBottom?g.borderBottom:h,y=g.borderTop?i:2*i,v=b!==w?1:a-u[d]+1;t.setEdge(p,b,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(w,l,{weight:y,minlen:v,nestingEdge:!0})}),!t.parent(d))t.setEdge(n,p,{weight:0,minlen:a+u[d]})}function Es(t){var n={};function o(i,a){var u=t.children(i);if(u&&u.length)f(u,function(d){o(d,a+1)});n[i]=a}return f(t.children(),function(i){o(i,1)}),n}function xs(t){return Yt(t.edges(),function(n,o){return n+t.edge(o).weight},0)}function Fn(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,f(t.edges(),function(o){var i=t.edge(o);if(i.nestingEdge)t.removeEdge(o)})}function Gn(t,n,o){var i={},a;f(o,function(u){var d=t.parent(u),c,p;while(d){if(c=t.parent(d),c)p=i[c],i[c]=d;else p=a,a=d;if(p&&p!==d){n.setEdge(p,d);return}d=c}})}function Xn(t,n,o){var i=Ls(t),a=new Q({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(u){return t.node(u)});return f(t.nodes(),function(u){var d=t.node(u),c=t.parent(u);if(d.rank===n||d.minRank<=n&&n<=d.maxRank){if(a.setNode(u),a.setParent(u,c||i),f(t[o](u),function(p){var l=p.v===u?p.w:p.v,m=a.edge(l,u),h=!_e(m)?m.weight:0;a.setEdge(l,u,{weight:t.edge(p).weight+h})}),Object.prototype.hasOwnProperty.call(d,"minRank"))a.setNode(u,{borderLeft:d.borderLeft[n],borderRight:d.borderRight[n]})}}),a}function Ls(t){var n;while(t.hasNode(n=rr("_root")));return n}function Un(t,n){var o=0;for(var i=1;i<n.length;++i)o+=Is(t,n[i-1],n[i]);return o}function Is(t,n,o){var i=Rr(o,E(o,function(l,m){return m})),a=S(E(n,function(l){return C(E(t.outEdges(l),function(m){return{pos:i[m.w],weight:t.edge(m).weight}}),"pos")})),u=1;while(u<o.length)u<<=1;var d=2*u-1;u-=1;var c=E(Array(d),function(){return 0}),p=0;return f(a.forEach(function(l){var m=l.pos+u;c[m]+=l.weight;var h=0;while(m>0){if(m%2)h+=c[m+1];m=m-1>>1,c[m]+=l.weight}p+=l.weight*h})),p}function Vn(t){var n={},o=Je(t.nodes(),function(c){return!t.children(c).length}),i=I(E(o,function(c){return t.node(c).rank})),a=E(N(i+1),function(){return[]});function u(c){if(Ir(n,c))return;n[c]=!0;var p=t.node(c);a[p.rank].push(c),f(t.successors(c),u)}var d=C(o,function(c){return t.node(c).rank});return f(d,u),a}function Yn(t,n){return E(n,function(o){var i=t.inEdges(o);if(!i.length)return{v:o};else{var a=Yt(i,function(u,d){var c=t.edge(d),p=t.node(d.v);return{sum:u.sum+c.weight*p.order,weight:u.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:a.sum/a.weight,weight:a.weight}}})}function zn(t,n){var o={};f(t,function(a,u){var d=o[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:u};if(!_e(a.barycenter))d.barycenter=a.barycenter,d.weight=a.weight}),f(n.edges(),function(a){var u=o[a.v],d=o[a.w];if(!_e(u)&&!_e(d))d.indegree++,u.out.push(o[a.w])});var i=Je(o,function(a){return!a.indegree});return Ss(i)}function Ss(t){var n=[];function o(u){return function(d){if(d.merged)return;if(_e(d.barycenter)||_e(u.barycenter)||d.barycenter>=u.barycenter)Ns(u,d)}}function i(u){return function(d){if(d.in.push(u),--d.indegree===0)t.push(d)}}while(t.length){var a=t.pop();n.push(a),f(a.in.reverse(),o(a)),f(a.out,i(a))}return E(Je(n,function(u){return!u.merged}),function(u){return Z(u,["vs","i","barycenter","weight"])})}function Ns(t,n){var o=0,i=0;if(t.weight)o+=t.barycenter*t.weight,i+=t.weight;if(n.weight)o+=n.barycenter*n.weight,i+=n.weight;t.vs=n.vs.concat(t.vs),t.barycenter=o/i,t.weight=i,t.i=Math.min(n.i,t.i),n.merged=!0}function qn(t,n){var o=un(t,function(m){return Object.prototype.hasOwnProperty.call(m,"barycenter")}),i=o.lhs,a=C(o.rhs,function(m){return-m.i}),u=[],d=0,c=0,p=0;i.sort(Ps(!!n)),p=Wn(u,a,p),f(i,function(m){p+=m.vs.length,u.push(m.vs),d+=m.barycenter*m.weight,c+=m.weight,p=Wn(u,a,p)});var l={vs:S(u)};if(c)l.barycenter=d/c,l.weight=c;return l}function Wn(t,n,o){var i;while(n.length&&(i=U(n)).i<=o)n.pop(),t.push(i.vs),o++;return o}function Ps(t){return function(n,o){if(n.barycenter<o.barycenter)return-1;else if(n.barycenter>o.barycenter)return 1;return!t?n.i-o.i:o.i-n.i}}function Jr(t,n,o,i){var a=t.children(n),u=t.node(n),d=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,p={};if(d)a=Je(a,function(w){return w!==d&&w!==c});var l=Yn(t,a);f(l,function(w){if(t.children(w.v).length){var y=Jr(t,w.v,o,i);if(p[w.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter"))Ts(w,y)}});var m=zn(l,o);ks(m,p);var h=qn(m,i);if(d){if(h.vs=S([d,h.vs,c]),t.predecessors(d).length){var g=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(c)[0]);if(!Object.prototype.hasOwnProperty.call(h,"barycenter"))h.barycenter=0,h.weight=0;h.barycenter=(h.barycenter*h.weight+g.order+b.order)/(h.weight+2),h.weight+=2}}return h}function ks(t,n){f(t,function(o){o.vs=S(o.vs.map(function(i){if(n[i])return n[i].vs;return i}))})}function Ts(t,n){if(!_e(t.barycenter))t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight;else t.barycenter=n.barycenter,t.weight=n.weight}function Zn(t){var n=Gr(t),o=Kn(t,N(1,n+1),"inEdges"),i=Kn(t,N(n-1,-1,-1),"outEdges"),a=Vn(t);Jn(t,a);var u=Number.POSITIVE_INFINITY,d;for(var c=0,p=0;p<4;++c,++p){Cs(c%2?o:i,c%4>=2),a=D(t);var l=Un(t,a);if(l<u)p=0,d=$e(a),u=l}Jn(t,d)}function Kn(t,n,o){return E(n,function(i){return Xn(t,i,o)})}function Cs(t,n){var o=new Q;f(t,function(i){var a=i.graph().root,u=Jr(i,a,o,n);f(u.vs,function(d,c){i.node(d).order=c}),Gn(i,o,u.vs)})}function Jn(t,n){f(n,function(o){f(o,function(i,a){t.node(i).order=a})})}function Qn(t){var n=Rs(t);f(t.graph().dummyChains,function(o){var i=t.node(o),a=i.edgeObj,u=As(t,n,a.v,a.w),{path:d,lca:c}=u,p=0,l=d[p],m=!0;while(o!==a.w){if(i=t.node(o),m){while((l=d[p])!==c&&t.node(l).maxRank<i.rank)p++;if(l===c)m=!1}if(!m){while(p<d.length-1&&t.node(l=d[p+1]).minRank<=i.rank)p++;l=d[p]}t.setParent(o,l),o=t.successors(o)[0]}})}function As(t,n,o,i){var a=[],u=[],d=Math.min(n[o].low,n[i].low),c=Math.max(n[o].lim,n[i].lim),p,l;p=o;do p=t.parent(p),a.push(p);while(p&&(n[p].low>d||c>n[p].lim));l=p,p=i;while((p=t.parent(p))!==l)u.push(p);return{path:a.concat(u.reverse()),lca:l}}function Rs(t){var n={},o=0;function i(a){var u=o;f(t.children(a),i),n[a]={low:u,lim:o++}}return f(t.children(),i),n}function Ms(t,n){var o={};function i(a,u){var d=0,c=0,p=a.length,l=U(u);return f(u,function(m,h){var g=Bs(t,m),b=g?t.node(g).order:p;if(g||m===l)f(u.slice(c,h+1),function(w){f(t.predecessors(w),function(y){var v=t.node(y),_=v.order;if((_<d||b<_)&&!(v.dummy&&t.node(w).dummy))ro(o,y,w)})}),c=h+1,d=b}),u}return Yt(n,i),o}function js(t,n){var o={};function i(u,d,c,p,l){var m;f(N(d,c),function(h){if(m=u[h],t.node(m).dummy)f(t.predecessors(m),function(g){var b=t.node(g);if(b.dummy&&(b.order<p||b.order>l))ro(o,g,m)})})}function a(u,d){var c=-1,p,l=0;return f(d,function(m,h){if(t.node(m).dummy==="border"){var g=t.predecessors(m);if(g.length)p=t.node(g[0]).order,i(d,l,h,c,p),l=h,c=p}i(d,l,d.length,p,u.length)}),d}return Yt(n,a),o}function Bs(t,n){if(t.node(n).dummy)return or(t.predecessors(n),function(o){return t.node(o).dummy})}function ro(t,n,o){if(n>o){var i=n;n=o,o=i}if(!Object.prototype.hasOwnProperty.call(t,n))Object.defineProperty(t,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=t[n];Object.defineProperty(a,o,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ds(t,n,o){if(n>o){var i=n;n=o,o=i}return!!t[n]&&Object.prototype.hasOwnProperty.call(t[n],o)}function Fs(t,n,o,i){var a={},u={},d={};return f(n,function(c){f(c,function(p,l){a[p]=p,u[p]=p,d[p]=l})}),f(n,function(c){var p=-1;f(c,function(l){var m=i(l);if(m.length){m=C(m,function(y){return d[y]});var h=(m.length-1)/2;for(var g=Math.floor(h),b=Math.ceil(h);g<=b;++g){var w=m[g];if(u[l]===l&&p<d[w]&&!Ds(o,l,w))u[w]=l,u[l]=a[l]=a[w],p=d[w]}}})}),{root:a,align:u}}function Gs(t,n,o,i,a){var u={},d=Xs(t,n,o,a),c=a?"borderLeft":"borderRight";function p(h,g){var b=d.nodes(),w=b.pop(),y={};while(w){if(y[w])h(w);else y[w]=!0,b.push(w),b=b.concat(g(w));w=b.pop()}}function l(h){u[h]=d.inEdges(h).reduce(function(g,b){return Math.max(g,u[b.v]+d.edge(b))},0)}function m(h){var g=d.outEdges(h).reduce(function(w,y){return Math.min(w,u[y.w]-d.edge(y))},Number.POSITIVE_INFINITY),b=t.node(h);if(g!==Number.POSITIVE_INFINITY&&b.borderType!==c)u[h]=Math.max(u[h],g)}return p(l,d.predecessors.bind(d)),p(m,d.successors.bind(d)),f(i,function(h){u[h]=u[o[h]]}),u}function Xs(t,n,o,i){var a=new Q,u=t.graph(),d=zs(u.nodesep,u.edgesep,i);return f(n,function(c){var p;f(c,function(l){var m=o[l];if(a.setNode(m),p){var h=o[p],g=a.edge(h,m);a.setEdge(h,m,Math.max(d(t,l,p),g||0))}p=l})}),a}function Us(t,n){return J(dt(n),function(o){var{NEGATIVE_INFINITY:i,POSITIVE_INFINITY:a}=Number;return lt(o,function(u,d){var c=Ws(t,d)/2;i=Math.max(u+c,i),a=Math.min(u-c,a)}),i-a})}function Vs(t,n){var o=dt(n),i=B(o),a=I(o);f(["u","d"],function(u){f(["l","r"],function(d){var c=u+d,p=t[c],l;if(p===n)return;var m=dt(p);if(l=d==="l"?i-B(m):a-I(m),l)t[c]=q(p,function(h){return h+l})})})}function Ys(t,n){return q(t.ul,function(o,i){if(n)return t[n.toLowerCase()][i];else{var a=C(E(t,i));return(a[1]+a[2])/2}})}function to(t){var n=D(t),o=ir(Ms(t,n),js(t,n)),i={},a;f(["u","d"],function(d){a=d==="u"?n:dt(n).reverse(),f(["l","r"],function(c){if(c==="r")a=E(a,function(h){return dt(h).reverse()});var p=(d==="u"?t.predecessors:t.successors).bind(t),l=Fs(t,a,o,p),m=Gs(t,a,l.root,l.align,c==="r");if(c==="r")m=q(m,function(h){return-h});i[d+c]=m})});var u=Us(t,i);return Vs(i,u),Ys(i,t.graph().align)}function zs(t,n,o){return function(i,a,u){var d=i.node(a),c=i.node(u),p=0,l;if(p+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":l=-d.width/2;break;case"r":l=d.width/2;break}if(l)p+=o?l:-l;if(l=0,p+=(d.dummy?n:t)/2,p+=(c.dummy?n:t)/2,p+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":l=c.width/2;break;case"r":l=-c.width/2;break}if(l)p+=o?l:-l;return l=0,p}}function Ws(t,n){return t.node(n).width}function no(t){t=Nr(t),qs(t),mt(to(t),function(n,o){t.node(o).x=n})}function qs(t){var n=D(t),o=t.graph().ranksep,i=0;f(n,function(a){var u=I(E(a,function(d){return t.node(d).height}));f(a,function(d){t.node(d).y=i+u/2}),i+=u+o})}function Qr(t,n){var o=n&&n.debugTiming?dn:cn;o("layout",()=>{var i=o(" buildLayoutGraph",()=>ou(t));o(" runLayout",()=>Hs(i,o)),o(" updateInputGraph",()=>Ks(t,i))})}function Hs(t,n){n(" makeSpaceForEdgeLabels",()=>iu(t)),n(" removeSelfEdges",()=>mu(t)),n(" acyclic",()=>tn(t)),n(" nestingGraph.run",()=>Bn(t)),n(" rank",()=>Kr(Nr(t))),n(" injectEdgeLabelProxies",()=>au(t)),n(" removeEmptyRanks",()=>sn(t)),n(" nestingGraph.cleanup",()=>Fn(t)),n(" normalizeRanks",()=>fn(t)),n(" assignRankMinMax",()=>fu(t)),n(" removeEdgeLabelProxies",()=>su(t)),n(" normalize.run",()=>On(t)),n(" parentDummyChains",()=>Qn(t)),n(" addBorderSegments",()=>ln(t)),n(" order",()=>Zn(t)),n(" insertSelfEdges",()=>hu(t)),n(" adjustCoordinateSystem",()=>hn(t)),n(" position",()=>no(t)),n(" positionSelfEdges",()=>gu(t)),n(" removeBorderNodes",()=>lu(t)),n(" normalize.undo",()=>Ln(t)),n(" fixupEdgeLabelCoords",()=>cu(t)),n(" undoCoordinateSystem",()=>gn(t)),n(" translateGraph",()=>uu(t)),n(" assignNodeIntersects",()=>du(t)),n(" reversePoints",()=>pu(t)),n(" acyclic.undo",()=>nn(t))}function Ks(t,n){f(t.nodes(),function(o){var i=t.node(o),a=n.node(o);if(i){if(i.x=a.x,i.y=a.y,n.children(o).length)i.width=a.width,i.height=a.height}}),f(t.edges(),function(o){var i=t.edge(o),a=n.edge(o);if(i.points=a.points,Object.prototype.hasOwnProperty.call(a,"x"))i.x=a.x,i.y=a.y}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}var Js=["nodesep","edgesep","ranksep","marginx","marginy"],Zs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$s=["acyclicer","ranker","rankdir","align"],Qs=["width","height"],ru={width:0,height:0},eu=["minlen","weight","width","height","labeloffset"],tu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nu=["labelpos"];function ou(t){var n=new Q({multigraph:!0,compound:!0}),o=$r(t.graph());return n.setGraph(ir({},Zs,Zr(o,Js),Z(o,$s))),f(t.nodes(),function(i){var a=$r(t.node(i));n.setNode(i,et(Zr(a,Qs),ru)),n.setParent(i,t.parent(i))}),f(t.edges(),function(i){var a=$r(t.edge(i));n.setEdge(i,ir({},tu,Zr(a,eu),Z(a,nu)))}),n}function iu(t){var n=t.graph();n.ranksep/=2,f(t.edges(),function(o){var i=t.edge(o);if(i.minlen*=2,i.labelpos.toLowerCase()!=="c")if(n.rankdir==="TB"||n.rankdir==="BT")i.width+=i.labeloffset;else i.height+=i.labeloffset})}function au(t){f(t.edges(),function(n){var o=t.edge(n);if(o.width&&o.height){var i=t.node(n.v),a=t.node(n.w),u={rank:(a.rank-i.rank)/2+i.rank,e:n};k(t,"edge-proxy",u,"_ep")}})}function fu(t){var n=0;f(t.nodes(),function(o){var i=t.node(o);if(i.borderTop)i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,n=I(n,i.maxRank)}),t.graph().maxRank=n}function su(t){f(t.nodes(),function(n){var o=t.node(n);if(o.dummy==="edge-proxy")t.edge(o.e).labelRank=o.rank,t.removeNode(n)})}function uu(t){var n=Number.POSITIVE_INFINITY,o=0,i=Number.POSITIVE_INFINITY,a=0,u=t.graph(),d=u.marginx||0,c=u.marginy||0;function p(l){var{x:m,y:h,width:g,height:b}=l;n=Math.min(n,m-g/2),o=Math.max(o,m+g/2),i=Math.min(i,h-b/2),a=Math.max(a,h+b/2)}f(t.nodes(),function(l){p(t.node(l))}),f(t.edges(),function(l){var m=t.edge(l);if(Object.prototype.hasOwnProperty.call(m,"x"))p(m)}),n-=d,i-=c,f(t.nodes(),function(l){var m=t.node(l);m.x-=n,m.y-=i}),f(t.edges(),function(l){var m=t.edge(l);if(f(m.points,function(h){h.x-=n,h.y-=i}),Object.prototype.hasOwnProperty.call(m,"x"))m.x-=n;if(Object.prototype.hasOwnProperty.call(m,"y"))m.y-=i}),u.width=o-n+d,u.height=a-i+c}function du(t){f(t.edges(),function(n){var o=t.edge(n),i=t.node(n.v),a=t.node(n.w),u,d;if(!o.points)o.points=[],u=a,d=i;else u=o.points[0],d=o.points[o.points.length-1];o.points.unshift(Dr(i,u)),o.points.push(Dr(a,d))})}function cu(t){f(t.edges(),function(n){var o=t.edge(n);if(Object.prototype.hasOwnProperty.call(o,"x")){if(o.labelpos==="l"||o.labelpos==="r")o.width-=o.labeloffset;switch(o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset;break}}})}function pu(t){f(t.edges(),function(n){var o=t.edge(n);if(o.reversed)o.points.reverse()})}function lu(t){f(t.nodes(),function(n){if(t.children(n).length){var o=t.node(n),i=t.node(o.borderTop),a=t.node(o.borderBottom),u=t.node(U(o.borderLeft)),d=t.node(U(o.borderRight));o.width=Math.abs(d.x-u.x),o.height=Math.abs(a.y-i.y),o.x=u.x+o.width/2,o.y=i.y+o.height/2}}),f(t.nodes(),function(n){if(t.node(n).dummy==="border")t.removeNode(n)})}function mu(t){f(t.edges(),function(n){if(n.v===n.w){var o=t.node(n.v);if(!o.selfEdges)o.selfEdges=[];o.selfEdges.push({e:n,label:t.edge(n)}),t.removeEdge(n)}})}function hu(t){var n=D(t);f(n,function(o){var i=0;f(o,function(a,u){var d=t.node(a);d.order=u+i,f(d.selfEdges,function(c){k(t,"selfedge",{width:c.label.width,height:c.label.height,rank:d.rank,order:u+ ++i,e:c.e,label:c.label},"_se")}),delete d.selfEdges})})}function gu(t){f(t.nodes(),function(n){var o=t.node(n);if(o.dummy==="selfedge"){var i=t.node(o.e.v),a=i.x+i.width/2,u=i.y,d=o.x-a,c=i.height/2;t.setEdge(o.e,o.label),t.removeNode(n),o.label.points=[{x:a+2*d/3,y:u-c},{x:a+5*d/6,y:u-c},{x:a+d,y:u},{x:a+5*d/6,y:u+c},{x:a+2*d/3,y:u+c}],o.label.x=o.x,o.label.y=o.y}})}function Zr(t,n){return q(Z(t,n),Number)}function $r(t){var n={};return f(t,function(o,i){n[i.toLowerCase()]=o}),n}var oo=e((t,n,o)=>Math.max(n,Math.min(o,t)),"clamp"),io=e((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vu=e((t)=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),bu=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],yu=e((t,n,o,i,a)=>{let u=[],d=new Set;if(o.forEach(({start:m,end:h})=>{if(m!==i)d.add(m);if(h!==i)d.add(h)}),d.forEach((m)=>{let h=t.node(m);if(typeof h?.x==="number"&&typeof h?.y==="number")u.push(h)}),u.length===0)o.forEach(({edge:m})=>{(m.points??[]).forEach((h)=>{if(typeof h?.x==="number"&&typeof h?.y==="number")u.push(h)})});if(u.length===0)return io(a);let c=u.reduce((m,h)=>({x:m.x+h.x/u.length,y:m.y+h.y/u.length}),{x:0,y:0}),p=c.x-n.x,l=c.y-n.y;if(Math.abs(p)>Math.abs(l))return p>0?"right":"left";if(Math.abs(l)>0)return l>0?"bottom":"top";return io(a)},"getSelfLoopSide"),wu=e((t,n="top",o=0,i=0)=>{let a=t.x,u=t.y-o,d=t.width/2,c=t.height/2,p=Math.max(36,Math.min(100,t.width*0.8)),l=oo(Math.max(i,t.width*0.35),36,p),m=oo(Math.min(t.width,t.height)*0.45,24,48);switch(n){case"bottom":{let h=u+c;return[{x:a-l/2,y:h},{x:a-l/2,y:h+m},{x:a+l/2,y:h+m},{x:a+l/2,y:h}]}case"right":{let h=a+d;return[{x:h,y:u-l/2},{x:h+m,y:u-l/2},{x:h+m,y:u+l/2},{x:h,y:u+l/2}]}case"left":{let h=a-d;return[{x:h,y:u-l/2},{x:h-m,y:u-l/2},{x:h-m,y:u+l/2},{x:h,y:u+l/2}]}case"top":default:{let h=u-c;return[{x:a-l/2,y:h},{x:a-l/2,y:h-m},{x:a+l/2,y:h-m},{x:a+l/2,y:h}]}}},"getSelfLoopPoints"),_u=e((t,n,o="top",i=0,a={})=>{let d=t.x,c=t.y-i,p=a.width??0,l=a.height??0;switch(o){case"bottom":return{x:d,y:Math.max(...n.map((m)=>m.y))+l/2+4};case"right":return{x:Math.max(...n.map((m)=>m.x))+p/2+4,y:c};case"left":return{x:Math.min(...n.map((m)=>m.x))-p/2-4,y:c};case"top":default:return{x:d,y:Math.min(...n.map((m)=>m.y))-l/2-4}}},"getSelfLoopLabelPosition"),Ki=e((t,n=0,{mergeSelfLoops:o=!0}={})=>{let i=new Map,a=[],u=t.graph()?.rankdir;return t.edges().forEach((d)=>{let c=t.edge(d);if(o&&c.selfLoop){let p=c.selfLoop.id;if(!i.has(p))i.set(p,[]);i.get(p).push({edge:c,start:d.v,end:d.w})}else a.push({edge:c,start:d.v,end:d.w})}),i.forEach((d)=>{if(d.length!==3){d.forEach((_)=>a.push(_));return}d.sort((_,A)=>_.edge.selfLoop.order-A.edge.selfLoop.order);let[c,p,l]=d,m=c.edge.originalEdge??p.edge.originalEdge??l.edge.originalEdge??p.edge,h=t.node(m.start);if(!h){d.forEach((_)=>a.push(_));return}let g={width:p.edge.width,height:p.edge.height},b=yu(t,h,d,m.start,u),w=wu(h,b,n,g.width??0),y=_u(h,w,b,n,g),v={...p.edge,...m,id:m.id,points:w,start:m.start,end:m.end,x:y.x,y:y.y,width:g.width,height:g.height,labelStyle:p.edge.labelStyle,fromCluster:c.edge.fromCluster??p.edge.fromCluster??l.edge.fromCluster,toCluster:c.edge.toCluster??p.edge.toCluster??l.edge.toCluster};delete v.selfLoop,delete v.originalEdge,a.push({edge:v,start:v.start,end:v.end})}),a},"getEdgesToRender"),fo=e(async({element:t,graph:n,diagramType:o,id:i,parentCluster:a,siteConfig:u})=>{let d=n.graph().rankdir;r.trace("Dir in recursive render - dir:",d);let{clusters:c,edgePaths:p,edgeLabels:l,nodes:m,rootGroups:h}=sa(t,{edgePathsClass:"edgePaths"});if(!n.nodes())r.info("No nodes found for",n);else r.info("Recursive render XXX",n.nodes());if(n.edges().length>0)r.info("Recursive edges",n.edge(n.edges()[0]));let g=vu(o);await Promise.all(n.nodes().map(async function(y){let v=n.node(y);if(a!==void 0){let _=JSON.parse(JSON.stringify(a.clusterData));if(r.trace(`Setting data for parent cluster XXX
1
+ import{e,r,s,R,Ct,ho,ht,Qt,Tt,Hn,Jt}from"./chunk-wvdehm9y.js";import{be,Pe,Qe,Te,ct,qt,H,me,at,Vt,it,cr,ua,da,pa,yn,wt,ma,vn,Oe,bn,$t,kt,xn,Gt,_n,fa,ha,ur,xe,ga,wn,Wt,kn,dr,pr,Ht,ya,mr,va,zr,ut,fr,ba,xa,_a,We,hr,gr,Cn,wa,yr,f,Je,dt,_e,Yt,Q}from"./chunk-fh2vj0wv.js";import{sa,la,G,$n,eo,ca,lr}from"./chunk-ne0v8mfb.js";import{At}from"./chunk-4bzqrwr0.js";var wr={};At(wr,{default:()=>er});var uo=/\s/;function co(t){var n=t.length;while(n--&&uo.test(t.charAt(n)));return n}var te=co;var po=/^\s+/;function lo(t){return t?t.slice(0,te(t)+1).replace(po,""):t}var ne=lo;var oe=NaN,mo=/^[-+]0x[0-9a-f]+$/i,go=/^0b[01]+$/i,vo=/^0o[0-7]+$/i,bo=parseInt;function yo(t){if(typeof t=="number")return t;if(ct(t))return oe;if(me(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=me(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=ne(t);var o=go.test(t);return o||vo.test(t)?bo(t.slice(2),o?2:8):mo.test(t)?oe:+t}var ie=yo;var ae=1/0,wo=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function _o(t){if(!t)return t===0?t:0;if(t=ie(t),t===ae||t===-ae){var n=t<0?-1:1;return n*wo}return t===t?t:0}var Y=_o;function Eo(t){var n=Y(t),o=n%1;return n===n?o?n-o:n:0}var fe=Eo;var se=Object.create,xo=function(){function t(){}return function(n){if(!me(n))return{};if(se)return se(n);t.prototype=n;var o=new t;return t.prototype=void 0,o}}(),ue=xo;function Oo(t,n){var o=-1,i=t.length;n||(n=Array(i));while(++o<i)n[o]=t[o];return n}var vr=Oo;function Lo(t,n,o){if(n=="__proto__"&&cr)cr(t,n,{configurable:!0,enumerable:!0,value:o,writable:!0});else t[n]=o}var M=Lo;var Io=Object.prototype,No=Io.hasOwnProperty;function Po(t,n,o){var i=t[n];if(!(No.call(t,n)&&wt(i,o))||o===void 0&&!(n in t))M(t,n,o)}var j=Po;function ko(t,n,o,i){var a=!o;o||(o={});var u=-1,d=n.length;while(++u<d){var c=n[u],p=i?i(o[c],t[c],c,o,t):void 0;if(p===void 0)p=t[c];if(a)M(o,c,p);else j(o,c,p)}return o}var P=ko;function Ao(t,n,o){if(!me(o))return!1;var i=typeof n;if(i=="number"?Oe(o)&&yn(n,o.length):i=="string"&&(n in o))return wt(o[n],t);return!1}var T=Ao;function Ro(t){return vn(function(n,o){var i=-1,a=o.length,u=a>1?o[a-1]:void 0,d=a>2?o[2]:void 0;if(u=t.length>3&&typeof u=="function"?(a--,u):void 0,d&&T(o[0],o[1],d))u=a<3?void 0:u,a=1;n=Object(n);while(++i<a){var c=o[i];if(c)t(n,c,i,u)}return n})}var de=Ro;function Mo(t){var n=[];if(t!=null)for(var o in Object(t))n.push(o);return n}var ce=Mo;var jo=Object.prototype,Bo=jo.hasOwnProperty;function Do(t){if(!me(t))return ce(t);var n=bn(t),o=[];for(var i in t)if(!(i=="constructor"&&(n||!Bo.call(t,i))))o.push(i);return o}var pe=Do;function Fo(t){return Oe(t)?fa(t,!0):pe(t)}var L=Fo;function Go(t){var n=t==null?0:t.length;return n?pr(t,1):[]}var S=Go;function Xo(t){return ua(ma(t,void 0,S),t+"")}var le=Xo;var Uo=ha(Object.getPrototypeOf,Object),z=Uo;var Vo="[object Object]",Yo=Function.prototype,zo=Object.prototype,he=Yo.toString,Wo=zo.hasOwnProperty,qo=he.call(Object);function Ho(t){if(!Te(t)||Qe(t)!=Vo)return!1;var n=z(t);if(n===null)return!0;var o=Wo.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&he.call(o)==qo}var ge=Ho;var Ko="\\ud800-\\udfff",Jo="\\u0300-\\u036f",Zo="\\ufe20-\\ufe2f",$o="\\u20d0-\\u20ff",Qo=Jo+Zo+$o,ri="\\ufe0e\\ufe0f",ei="\\u200d",ti=RegExp("["+ei+Ko+Qo+ri+"]");function ni(t){return ti.test(t)}var ve=ni;function oi(t,n){return t&&P(n,xe(n),t)}var ye=oi;function ii(t,n){return t&&P(n,L(n),t)}var we=ii;var Se=typeof wr=="object"&&wr&&!wr.nodeType&&wr,Ee=Se&&typeof br=="object"&&br&&!br.nodeType&&br,ai=Ee&&Ee.exports===Se,Le=ai?be.Buffer:void 0,Ie=Le?Le.allocUnsafe:void 0;function fi(t,n){if(n)return t.slice();var o=t.length,i=Ie?Ie(o):new t.constructor(o);return t.copy(i),i}var er=fi;function si(t,n){return P(t,mr(t),n)}var Ne=si;var ui=Object.getOwnPropertySymbols,di=!ui?ya:function(t){var n=[];while(t)dr(n,mr(t)),t=z(t);return n},_r=di;function ci(t,n){return P(t,_r(t),n)}var ke=ci;function pi(t){return va(t,L,_r)}var Ce=pi;var li=Object.prototype,mi=li.hasOwnProperty;function hi(t){var n=t.length,o=new t.constructor(n);if(n&&typeof t[0]=="string"&&mi.call(t,"index"))o.index=t.index,o.input=t.input;return o}var Ae=hi;function gi(t){var n=new t.constructor(t.byteLength);return new fr(n).set(new fr(t)),n}var W=gi;function vi(t,n){var o=n?W(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.byteLength)}var Re=vi;var bi=/\w*$/;function yi(t){var n=new t.constructor(t.source,bi.exec(t));return n.lastIndex=t.lastIndex,n}var Me=yi;var je=Pe?Pe.prototype:void 0,Be=je?je.valueOf:void 0;function wi(t){return Be?Object(Be.call(t)):{}}var De=wi;function _i(t,n){var o=n?W(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Er=_i;var Ei="[object Boolean]",xi="[object Date]",Oi="[object Map]",Li="[object Number]",Ii="[object RegExp]",Si="[object Set]",Ni="[object String]",Pi="[object Symbol]",ki="[object ArrayBuffer]",Ti="[object DataView]",Ci="[object Float32Array]",Ai="[object Float64Array]",Ri="[object Int8Array]",Mi="[object Int16Array]",ji="[object Int32Array]",Bi="[object Uint8Array]",Di="[object Uint8ClampedArray]",Fi="[object Uint16Array]",Gi="[object Uint32Array]";function Xi(t,n,o){var i=t.constructor;switch(n){case ki:return W(t);case Ei:case xi:return new i(+t);case Ti:return Re(t,o);case Ci:case Ai:case Ri:case Mi:case ji:case Bi:case Di:case Fi:case Gi:return Er(t,o);case Oi:return new i;case Li:case Ni:return new i(t);case Ii:return Me(t);case Si:return new i;case Pi:return De(t)}}var Fe=Xi;function Ui(t){return typeof t.constructor=="function"&&!bn(t)?ue(z(t)):{}}var xr=Ui;var Vi="[object Map]";function Yi(t){return Te(t)&&ut(t)==Vi}var Ge=Yi;var Xe=Gt&&Gt.isMap,zi=Xe?xn(Xe):Ge,Ue=zi;var Wi="[object Set]";function qi(t){return Te(t)&&ut(t)==Wi}var Ve=qi;var Ye=Gt&&Gt.isSet,Hi=Ye?xn(Ye):Ve,ze=Hi;var Zi=1,$i=2,ra=4,qe="[object Arguments]",ea="[object Array]",ta="[object Boolean]",na="[object Date]",oa="[object Error]",He="[object Function]",ia="[object GeneratorFunction]",aa="[object Map]",Ea="[object Number]",Ke="[object Object]",Oa="[object RegExp]",La="[object Set]",Ia="[object String]",Sa="[object Symbol]",Na="[object WeakMap]",Pa="[object ArrayBuffer]",ka="[object DataView]",Ta="[object Float32Array]",Ca="[object Float64Array]",Aa="[object Int8Array]",Ra="[object Int16Array]",Ma="[object Int32Array]",ja="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",Fa="[object Uint32Array]",x={};x[qe]=x[ea]=x[Pa]=x[ka]=x[ta]=x[na]=x[Ta]=x[Ca]=x[Aa]=x[Ra]=x[Ma]=x[aa]=x[Ea]=x[Ke]=x[Oa]=x[La]=x[Ia]=x[Sa]=x[ja]=x[Ba]=x[Da]=x[Fa]=!0;x[oa]=x[He]=x[Na]=!1;function Or(t,n,o,i,a,u){var d,c=n&Zi,p=n&$i,l=n&ra;if(o)d=a?o(t,i,a,u):o(t);if(d!==void 0)return d;if(!me(t))return t;var m=H(t);if(m){if(d=Ae(t),!c)return vr(t,d)}else{var h=ut(t),g=h==He||h==ia;if(kt(t))return er(t,c);if(h==Ke||h==qe||g&&!a){if(d=p||g?{}:xr(t),!c)return p?ke(t,we(d,t)):Ne(t,ye(d,t))}else{if(!x[h])return a?t:{};d=Fe(t,h,c)}}u||(u=new Ht);var b=u.get(t);if(b)return b;if(u.set(t,d),ze(t))t.forEach(function(v){d.add(Or(v,n,o,v,t,u))});else if(Ue(t))t.forEach(function(v,_){d.set(_,Or(v,n,o,_,t,u))});var w=l?p?Ce:zr:p?L:xe,y=m?void 0:w(t);return da(y||t,function(v,_){if(y)_=v,v=t[_];j(d,_,Or(v,n,o,_,t,u))}),d}var Ze=Or;var Ga=1,Xa=4;function Ua(t){return Ze(t,Ga|Xa)}var $e=Ua;var Va=function(){return be.Date.now()},Tr=Va;var rt=Object.prototype,Ya=rt.hasOwnProperty,za=vn(function(t,n){t=Object(t);var o=-1,i=n.length,a=i>2?n[2]:void 0;if(a&&T(n[0],n[1],a))i=1;while(++o<i){var u=n[o],d=L(u),c=-1,p=d.length;while(++c<p){var l=d[c],m=t[l];if(m===void 0||wt(m,rt[l])&&!Ya.call(t,l))t[l]=u[l]}}return t}),et=za;function Wa(t,n,o){if(o!==void 0&&!wt(t[n],o)||o===void 0&&!(n in t))M(t,n,o)}var tr=Wa;function qa(t,n){if(n==="constructor"&&typeof t[n]==="function")return;if(n=="__proto__")return;return t[n]}var nr=qa;function Ha(t){return P(t,L(t))}var tt=Ha;function Ka(t,n,o,i,a,u,d){var c=nr(t,o),p=nr(n,o),l=d.get(p);if(l){tr(t,o,l);return}var m=u?u(c,p,o+"",t,n,d):void 0,h=m===void 0;if(h){var g=H(p),b=!g&&kt(p),w=!g&&!b&&_n(p);if(m=p,g||b||w)if(H(c))m=c;else if(wa(c))m=vr(c);else if(b)h=!1,m=er(p,!0);else if(w)h=!1,m=Er(p,!0);else m=[];else if(ge(p)||$t(p)){if(m=c,$t(c))m=tt(c);else if(!me(c)||Vt(c))m=xr(p)}else h=!1}if(h)d.set(p,m),a(m,p,i,u,d),d.delete(p);tr(t,o,m)}var nt=Ka;function ot(t,n,o,i,a){if(t===n)return;hr(n,function(u,d){if(a||(a=new Ht),me(u))nt(t,n,d,o,ot,i,a);else{var c=i?i(nr(t,d),u,d+"",t,n,a):void 0;if(c===void 0)c=u;tr(t,d,c)}},L)}var ft=ot;function Ja(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}var U=Ja;function Za(t){return function(n,o,i){var a=Object(n);if(!Oe(n)){var u=We(o,3);n=xe(n),o=function(c){return u(a[c],c,a)}}var d=t(n,o,i);return d>-1?a[u?n[d]:d]:void 0}}var st=Za;var $a=Math.max;function Qa(t,n,o){var i=t==null?0:t.length;if(!i)return-1;var a=o==null?0:fe(o);if(a<0)a=$a(i+a,0);return pa(t,We(n,3),a)}var pt=Qa;var rf=st(pt),or=rf;function ef(t,n){var o=-1,i=Oe(t)?Array(t.length):[];return Cn(t,function(a,u,d){i[++o]=n(a,u,d)}),i}var Lr=ef;function tf(t,n){var o=H(t)?qt:Lr;return o(t,We(n,3))}var E=tf;function nf(t,n){return t==null?t:hr(t,yr(n),L)}var lt=nf;function of(t,n){return t&&gr(t,yr(n))}var mt=of;function af(t,n){return t>n}var gt=af;var ff=Object.prototype,sf=ff.hasOwnProperty;function uf(t,n){return t!=null&&sf.call(t,n)}var vt=uf;function df(t,n){return t!=null&&ba(t,n,vt)}var Ir=df;var cf="[object String]";function pf(t){return typeof t=="string"||!H(t)&&Te(t)&&Qe(t)==cf}var bt=pf;function lf(t,n){return t<n}var Sr=lf;function mf(t,n){var o={};return n=We(n,3),gr(t,function(i,a,u){M(o,a,n(i,a,u))}),o}var q=mf;function hf(t,n,o){var i=-1,a=t.length;while(++i<a){var u=t[i],d=n(u);if(d!=null&&(c===void 0?d===d&&!ct(d):o(d,c)))var c=d,p=u}return p}var K=hf;function gf(t){return t&&t.length?K(t,at,gt):void 0}var I=gf;var vf=de(function(t,n,o){ft(t,n,o)}),ir=vf;function bf(t){return t&&t.length?K(t,at,Sr):void 0}var B=bf;function yf(t,n){return t&&t.length?K(t,We(n,2),Sr):void 0}var J=yf;function wf(t,n,o,i){if(!me(t))return t;n=wn(n,t);var a=-1,u=n.length,d=u-1,c=t;while(c!=null&&++a<u){var p=Wt(n[a]),l=o;if(p==="__proto__"||p==="constructor"||p==="prototype")return t;if(a!=d){var m=c[p];if(l=i?i(m,p,c):void 0,l===void 0)l=me(m)?m:yn(n[a+1])?[]:{}}j(c,p,l),c=c[p]}return t}var yt=wf;function _f(t,n,o){var i=-1,a=n.length,u={};while(++i<a){var d=n[i],c=kn(t,d);if(o(c,d))yt(u,wn(d,t),c)}return u}var _t=_f;function Ef(t,n){var o=t.length;t.sort(n);while(o--)t[o]=t[o].value;return t}var Et=Ef;function xf(t,n){if(t!==n){var o=t!==void 0,i=t===null,a=t===t,u=ct(t),d=n!==void 0,c=n===null,p=n===n,l=ct(n);if(!c&&!l&&!u&&t>n||u&&d&&p&&!c&&!l||i&&d&&p||!o&&p||!a)return 1;if(!i&&!u&&!l&&t<n||l&&o&&a&&!i&&!u||c&&o&&a||!d&&a||!p)return-1}return 0}var xt=xf;function Of(t,n,o){var i=-1,a=t.criteria,u=n.criteria,d=a.length,c=o.length;while(++i<d){var p=xt(a[i],u[i]);if(p){if(i>=c)return p;var l=o[i];return p*(l=="desc"?-1:1)}}return t.index-n.index}var Ot=Of;function Lf(t,n,o){if(n.length)n=qt(n,function(u){if(H(u))return function(d){return kn(d,u.length===1?u[0]:u)};return u});else n=[at];var i=-1;n=qt(n,xn(We));var a=Lr(t,function(u,d,c){var p=qt(n,function(l){return l(u)});return{criteria:p,index:++i,value:u}});return Et(a,function(u,d){return Ot(u,d,o)})}var Lt=Lf;var If=_a("length"),It=If;var Nt="\\ud800-\\udfff",Sf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Pf="\\u20d0-\\u20ff",kf=Sf+Nf+Pf,Tf="\\ufe0e\\ufe0f",Cf="["+Nt+"]",Cr="["+kf+"]",Ar="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Cr+"|"+Ar+")",Pt="[^"+Nt+"]",Rt="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rf="\\u200d",jt=Af+"?",Bt="["+Tf+"]?",Mf="(?:"+Rf+"(?:"+[Pt,Rt,Mt].join("|")+")"+Bt+jt+")*",jf=Bt+jt+Mf,Bf="(?:"+[Pt+Cr+"?",Cr,Rt,Mt,Cf].join("|")+")",St=RegExp(Ar+"(?="+Ar+")|"+Bf+jf,"g");function Df(t){var n=St.lastIndex=0;while(St.test(t))++n;return n}var Dt=Df;function Ff(t){return ve(t)?Dt(t):It(t)}var Ft=Ff;function Gf(t,n){return _t(t,n,function(o,i){return xa(t,i)})}var Xt=Gf;var Xf=le(function(t,n){return t==null?{}:Xt(t,n)}),Z=Xf;var{ceil:Uf,max:Vf}=Math;function Yf(t,n,o,i){var a=-1,u=Vf(Uf((n-t)/(o||1)),0),d=Array(u);while(u--)d[i?u:++a]=t,t+=o;return d}var Ut=Yf;function zf(t){return function(n,o,i){if(i&&typeof i!="number"&&T(n,o,i))o=i=void 0;if(n=Y(n),o===void 0)o=n,n=0;else o=Y(o);return i=i===void 0?n<o?1:-1:Y(i),Ut(n,o,i,t)}}var zt=zf;var Wf=zt(),N=Wf;var qf="[object Map]",Hf="[object Set]";function Kf(t){if(t==null)return 0;if(Oe(t))return bt(t)?Ft(t):t.length;var n=ut(t);if(n==qf||n==Hf)return t.size;return ur(t).length}var Kt=Kf;var Jf=vn(function(t,n){if(t==null)return[];var o=n.length;if(o>1&&T(t,n[0],n[1]))n=[];else if(o>2&&T(n[0],n[1],n[2]))n=[n[0]];return Lt(t,pr(n,1),[])}),C=Jf;var Zf=0;function $f(t){var n=++Zf;return ga(t)+n}var rr=$f;function Qf(t,n,o){var i=-1,a=t.length,u=n.length,d={};while(++i<a){var c=i<u?n[i]:void 0;o(d,t[i],c)}return d}var Zt=Qf;function rs(t,n){return Zt(t||[],n||[],j)}var Rr=rs;class Mr{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,n=t._prev;if(n!==t)return rn(n),n}enqueue(t){var n=this._sentinel;if(t._prev&&t._next)rn(t);t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){var t=[],n=this._sentinel,o=n._prev;while(o!==n)t.push(JSON.stringify(o,es)),o=o._prev;return"["+t.join(", ")+"]"}}function rn(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function es(t,n){if(t!=="_next"&&t!=="_prev")return n}var ts=it(1);function en(t,n){if(t.nodeCount()<=1)return[];var o=os(t,n||ts),i=ns(o.graph,o.buckets,o.zeroIdx);return S(E(i,function(a){return t.outEdges(a.v,a.w)}))}function ns(t,n,o){var i=[],a=n[n.length-1],u=n[0],d;while(t.nodeCount()){while(d=u.dequeue())jr(t,n,o,d);while(d=a.dequeue())jr(t,n,o,d);if(t.nodeCount()){for(var c=n.length-2;c>0;--c)if(d=n[c].dequeue(),d){i=i.concat(jr(t,n,o,d,!0));break}}}return i}function jr(t,n,o,i,a){var u=a?[]:void 0;return f(t.inEdges(i.v),function(d){var c=t.edge(d),p=t.node(d.v);if(a)u.push({v:d.v,w:d.w});p.out-=c,Br(n,o,p)}),f(t.outEdges(i.v),function(d){var c=t.edge(d),p=d.w,l=t.node(p);l.in-=c,Br(n,o,l)}),t.removeNode(i.v),u}function os(t,n){var o=new Q,i=0,a=0;f(t.nodes(),function(c){o.setNode(c,{v:c,in:0,out:0})}),f(t.edges(),function(c){var p=o.edge(c.v,c.w)||0,l=n(c),m=p+l;o.setEdge(c.v,c.w,m),a=Math.max(a,o.node(c.v).out+=l),i=Math.max(i,o.node(c.w).in+=l)});var u=N(a+i+3).map(function(){return new Mr}),d=i+1;return f(o.nodes(),function(c){Br(u,d,o.node(c))}),{graph:o,buckets:u,zeroIdx:d}}function Br(t,n,o){if(!o.out)t[0].enqueue(o);else if(!o.in)t[t.length-1].enqueue(o);else t[o.out-o.in+n].enqueue(o)}function tn(t){var n=t.graph().acyclicer==="greedy"?en(t,o(t)):is(t);f(n,function(i){var a=t.edge(i);t.removeEdge(i),a.forwardName=i.name,a.reversed=!0,t.setEdge(i.w,i.v,a,rr("rev"))});function o(i){return function(a){return i.edge(a).weight}}}function is(t){var n=[],o={},i={};function a(u){if(Object.prototype.hasOwnProperty.call(i,u))return;i[u]=!0,o[u]=!0,f(t.outEdges(u),function(d){if(Object.prototype.hasOwnProperty.call(o,d.w))n.push(d);else a(d.w)}),delete o[u]}return f(t.nodes(),a),n}function nn(t){f(t.edges(),function(n){var o=t.edge(n);if(o.reversed){t.removeEdge(n);var i=o.forwardName;delete o.reversed,delete o.forwardName,t.setEdge(n.w,n.v,o,i)}})}function k(t,n,o,i){var a;do a=rr(i);while(t.hasNode(a));return o.dummy=n,t.setNode(a,o),a}function an(t){var n=new Q().setGraph(t.graph());return f(t.nodes(),function(o){n.setNode(o,t.node(o))}),f(t.edges(),function(o){var i=n.edge(o.v,o.w)||{weight:0,minlen:1},a=t.edge(o);n.setEdge(o.v,o.w,{weight:i.weight+a.weight,minlen:Math.max(i.minlen,a.minlen)})}),n}function Nr(t){var n=new Q({multigraph:t.isMultigraph()}).setGraph(t.graph());return f(t.nodes(),function(o){if(!t.children(o).length)n.setNode(o,t.node(o))}),f(t.edges(),function(o){n.setEdge(o,t.edge(o))}),n}function Dr(t,n){var{x:o,y:i}=t,a=n.x-o,u=n.y-i,d=t.width/2,c=t.height/2;if(!a&&!u)throw Error("Not possible to find intersection inside of the rectangle");var p,l;if(Math.abs(u)*d>Math.abs(a)*c){if(u<0)c=-c;p=c*a/u,l=c}else{if(a<0)d=-d;p=d,l=d*u/a}return{x:o+p,y:i+l}}function D(t){var n=E(N(Gr(t)+1),function(){return[]});return f(t.nodes(),function(o){var i=t.node(o),a=i.rank;if(!_e(a))n[a][i.order]=o}),n}function fn(t){var n=B(E(t.nodes(),function(o){return t.node(o).rank}));f(t.nodes(),function(o){var i=t.node(o);if(Ir(i,"rank"))i.rank-=n})}function sn(t){var n=B(E(t.nodes(),function(u){return t.node(u).rank})),o=[];f(t.nodes(),function(u){var d=t.node(u).rank-n;if(!o[d])o[d]=[];o[d].push(u)});var i=0,a=t.graph().nodeRankFactor;f(o,function(u,d){if(_e(u)&&d%a!==0)--i;else if(i)f(u,function(c){t.node(c).rank+=i})})}function Fr(t,n,o,i){var a={width:0,height:0};if(arguments.length>=4)a.rank=o,a.order=i;return k(t,"border",a,n)}function Gr(t){return I(E(t.nodes(),function(n){var o=t.node(n).rank;if(!_e(o))return o}))}function un(t,n){var o={lhs:[],rhs:[]};return f(t,function(i){if(n(i))o.lhs.push(i);else o.rhs.push(i)}),o}function dn(t,n){var o=Tr();try{return n()}finally{console.log(t+" time: "+(Tr()-o)+"ms")}}function cn(t,n){return n()}function ln(t){function n(o){var i=t.children(o),a=t.node(o);if(i.length)f(i,n);if(Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var u=a.minRank,d=a.maxRank+1;u<d;++u)pn(t,"borderLeft","_bl",o,a,u),pn(t,"borderRight","_br",o,a,u)}}f(t.children(),n)}function pn(t,n,o,i,a,u){var d={width:0,height:0,rank:u,borderType:n},c=a[n][u-1],p=k(t,"border",d,o);if(a[n][u]=p,t.setParent(p,i),c)t.setEdge(c,p,{weight:1})}function hn(t){var n=t.graph().rankdir.toLowerCase();if(n==="lr"||n==="rl")En(t)}function gn(t){var n=t.graph().rankdir.toLowerCase();if(n==="bt"||n==="rl")as(t);if(n==="lr"||n==="rl")fs(t),En(t)}function En(t){f(t.nodes(),function(n){mn(t.node(n))}),f(t.edges(),function(n){mn(t.edge(n))})}function mn(t){var n=t.width;t.width=t.height,t.height=n}function as(t){f(t.nodes(),function(n){Xr(t.node(n))}),f(t.edges(),function(n){var o=t.edge(n);if(f(o.points,Xr),Object.prototype.hasOwnProperty.call(o,"y"))Xr(o)})}function Xr(t){t.y=-t.y}function fs(t){f(t.nodes(),function(n){Ur(t.node(n))}),f(t.edges(),function(n){var o=t.edge(n);if(f(o.points,Ur),Object.prototype.hasOwnProperty.call(o,"x"))Ur(o)})}function Ur(t){var n=t.x;t.x=t.y,t.y=n}function On(t){t.graph().dummyChains=[],f(t.edges(),function(n){us(t,n)})}function us(t,n){var o=n.v,i=t.node(o).rank,a=n.w,u=t.node(a).rank,d=n.name,c=t.edge(n),p=c.labelRank;if(u===i+1)return;t.removeEdge(n);var l=void 0,m,h;for(h=0,++i;i<u;++h,++i){if(c.points=[],l={width:0,height:0,edgeLabel:c,edgeObj:n,rank:i},m=k(t,"edge",l,"_d"),i===p)l.width=c.width,l.height=c.height,l.dummy="edge-label",l.labelpos=c.labelpos;if(t.setEdge(o,m,{weight:c.weight},d),h===0)t.graph().dummyChains.push(m);o=m}t.setEdge(o,a,{weight:c.weight},d)}function Ln(t){f(t.graph().dummyChains,function(n){var o=t.node(n),i=o.edgeLabel,a;t.setEdge(o.edgeObj,i);while(o.dummy){if(a=t.successors(n)[0],t.removeNode(n),i.points.push({x:o.x,y:o.y}),o.dummy==="edge-label")i.x=o.x,i.y=o.y,i.width=o.width,i.height=o.height;n=a,o=t.node(n)}})}function ar(t){var n={};function o(i){var a=t.node(i);if(Object.prototype.hasOwnProperty.call(n,i))return a.rank;n[i]=!0;var u=B(E(t.outEdges(i),function(d){return o(d.w)-t.edge(d).minlen}));if(u===Number.POSITIVE_INFINITY||u===void 0||u===null)u=0;return a.rank=u}f(t.sources(),o)}function V(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}function Pr(t){var n=new Q({directed:!1}),o=t.nodes()[0],i=t.nodeCount();n.setNode(o,{});var a,u;while(ds(n,t)<i)a=cs(n,t),u=n.hasNode(a.v)?V(t,a):-V(t,a),ps(n,t,u);return n}function ds(t,n){function o(i){f(n.nodeEdges(i),function(a){var u=a.v,d=i===u?a.w:u;if(!t.hasNode(d)&&!V(n,a))t.setNode(d,{}),t.setEdge(i,d,{}),o(d)})}return f(t.nodes(),o),t.nodeCount()}function cs(t,n){return J(n.edges(),function(o){if(t.hasNode(o.v)!==t.hasNode(o.w))return V(n,o)})}function ps(t,n,o){f(t.nodes(),function(i){n.node(i).rank+=o})}var dh=it(1);var vh=it(1);Vr.CycleException=sr;function Vr(t){var n={},o={},i=[];function a(u){if(Object.prototype.hasOwnProperty.call(o,u))throw new sr;if(!Object.prototype.hasOwnProperty.call(n,u))o[u]=!0,n[u]=!0,f(t.predecessors(u),a),delete o[u],i.push(u)}if(f(t.sinks(),a),Kt(n)!==t.nodeCount())throw new sr;return i}function sr(){}sr.prototype=Error();function kr(t,n,o){if(!H(n))n=[n];var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],u={};return f(n,function(d){if(!t.hasNode(d))throw Error("Graph does not have node: "+d);Sn(t,d,o==="post",u,i,a)}),a}function Sn(t,n,o,i,a,u){if(!Object.prototype.hasOwnProperty.call(i,n)){if(i[n]=!0,!o)u.push(n);if(f(a(n),function(d){Sn(t,d,o,i,a,u)}),o)u.push(n)}}function Yr(t,n){return kr(t,n,"post")}function Wr(t,n){return kr(t,n,"pre")}X.initLowLimValues=Hr;X.initCutValues=qr;X.calcCutValue=Pn;X.leaveEdge=An;X.enterEdge=Rn;X.exchangeEdges=Mn;function X(t){t=an(t),ar(t);var n=Pr(t);Hr(n),qr(n,t);var o,i;while(o=An(n))i=Rn(n,t,o),Mn(n,t,o,i)}function qr(t,n){var o=Yr(t,t.nodes());o=o.slice(0,o.length-1),f(o,function(i){vs(t,n,i)})}function vs(t,n,o){var i=t.node(o),a=i.parent;t.edge(o,a).cutvalue=Pn(t,n,o)}function Pn(t,n,o){var i=t.node(o),a=i.parent,u=!0,d=n.edge(o,a),c=0;if(!d)u=!1,d=n.edge(a,o);return c=d.weight,f(n.nodeEdges(o),function(p){var l=p.v===o,m=l?p.w:p.v;if(m!==a){var h=l===u,g=n.edge(p).weight;if(c+=h?g:-g,ys(t,o,m)){var b=t.edge(o,m).cutvalue;c+=h?-b:b}}}),c}function Hr(t,n){if(arguments.length<2)n=t.nodes()[0];Tn(t,{},1,n)}function Tn(t,n,o,i,a){var u=o,d=t.node(i);if(n[i]=!0,f(t.neighbors(i),function(c){if(!Object.prototype.hasOwnProperty.call(n,c))o=Tn(t,n,o,c,i)}),d.low=u,d.lim=o++,a)d.parent=a;else delete d.parent;return o}function An(t){return or(t.edges(),function(n){return t.edge(n).cutvalue<0})}function Rn(t,n,o){var{v:i,w:a}=o;if(!n.hasEdge(i,a))i=o.w,a=o.v;var u=t.node(i),d=t.node(a),c=u,p=!1;if(u.lim>d.lim)c=d,p=!0;var l=Je(n.edges(),function(m){return p===Nn(t,t.node(m.v),c)&&p!==Nn(t,t.node(m.w),c)});return J(l,function(m){return V(n,m)})}function Mn(t,n,o,i){var{v:a,w:u}=o;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),Hr(t),qr(t,n),bs(t,n)}function bs(t,n){var o=or(t.nodes(),function(a){return!n.node(a).parent}),i=Wr(t,o);i=i.slice(1),f(i,function(a){var u=t.node(a).parent,d=n.edge(a,u),c=!1;if(!d)d=n.edge(u,a),c=!0;n.node(a).rank=n.node(u).rank+(c?d.minlen:-d.minlen)})}function ys(t,n,o){return t.hasEdge(n,o)}function Nn(t,n,o){return o.low<=n.lim&&n.lim<=o.lim}function Kr(t){switch(t.graph().ranker){case"network-simplex":jn(t);break;case"tight-tree":_s(t);break;case"longest-path":ws(t);break;default:jn(t)}}var ws=ar;function _s(t){ar(t),Pr(t)}function jn(t){X(t)}function Bn(t){var n=k(t,"root",{},"_root"),o=Es(t),i=I(dt(o))-1,a=2*i+1;t.graph().nestingRoot=n,f(t.edges(),function(d){t.edge(d).minlen*=a});var u=xs(t)+1;f(t.children(),function(d){Dn(t,n,a,u,i,o,d)}),t.graph().nodeRankFactor=a}function Dn(t,n,o,i,a,u,d){var c=t.children(d);if(!c.length){if(d!==n)t.setEdge(n,d,{weight:0,minlen:o});return}var p=Fr(t,"_bt"),l=Fr(t,"_bb"),m=t.node(d);if(t.setParent(p,d),m.borderTop=p,t.setParent(l,d),m.borderBottom=l,f(c,function(h){Dn(t,n,o,i,a,u,h);var g=t.node(h),b=g.borderTop?g.borderTop:h,w=g.borderBottom?g.borderBottom:h,y=g.borderTop?i:2*i,v=b!==w?1:a-u[d]+1;t.setEdge(p,b,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(w,l,{weight:y,minlen:v,nestingEdge:!0})}),!t.parent(d))t.setEdge(n,p,{weight:0,minlen:a+u[d]})}function Es(t){var n={};function o(i,a){var u=t.children(i);if(u&&u.length)f(u,function(d){o(d,a+1)});n[i]=a}return f(t.children(),function(i){o(i,1)}),n}function xs(t){return Yt(t.edges(),function(n,o){return n+t.edge(o).weight},0)}function Fn(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,f(t.edges(),function(o){var i=t.edge(o);if(i.nestingEdge)t.removeEdge(o)})}function Gn(t,n,o){var i={},a;f(o,function(u){var d=t.parent(u),c,p;while(d){if(c=t.parent(d),c)p=i[c],i[c]=d;else p=a,a=d;if(p&&p!==d){n.setEdge(p,d);return}d=c}})}function Xn(t,n,o){var i=Ls(t),a=new Q({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(u){return t.node(u)});return f(t.nodes(),function(u){var d=t.node(u),c=t.parent(u);if(d.rank===n||d.minRank<=n&&n<=d.maxRank){if(a.setNode(u),a.setParent(u,c||i),f(t[o](u),function(p){var l=p.v===u?p.w:p.v,m=a.edge(l,u),h=!_e(m)?m.weight:0;a.setEdge(l,u,{weight:t.edge(p).weight+h})}),Object.prototype.hasOwnProperty.call(d,"minRank"))a.setNode(u,{borderLeft:d.borderLeft[n],borderRight:d.borderRight[n]})}}),a}function Ls(t){var n;while(t.hasNode(n=rr("_root")));return n}function Un(t,n){var o=0;for(var i=1;i<n.length;++i)o+=Is(t,n[i-1],n[i]);return o}function Is(t,n,o){var i=Rr(o,E(o,function(l,m){return m})),a=S(E(n,function(l){return C(E(t.outEdges(l),function(m){return{pos:i[m.w],weight:t.edge(m).weight}}),"pos")})),u=1;while(u<o.length)u<<=1;var d=2*u-1;u-=1;var c=E(Array(d),function(){return 0}),p=0;return f(a.forEach(function(l){var m=l.pos+u;c[m]+=l.weight;var h=0;while(m>0){if(m%2)h+=c[m+1];m=m-1>>1,c[m]+=l.weight}p+=l.weight*h})),p}function Vn(t){var n={},o=Je(t.nodes(),function(c){return!t.children(c).length}),i=I(E(o,function(c){return t.node(c).rank})),a=E(N(i+1),function(){return[]});function u(c){if(Ir(n,c))return;n[c]=!0;var p=t.node(c);a[p.rank].push(c),f(t.successors(c),u)}var d=C(o,function(c){return t.node(c).rank});return f(d,u),a}function Yn(t,n){return E(n,function(o){var i=t.inEdges(o);if(!i.length)return{v:o};else{var a=Yt(i,function(u,d){var c=t.edge(d),p=t.node(d.v);return{sum:u.sum+c.weight*p.order,weight:u.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:a.sum/a.weight,weight:a.weight}}})}function zn(t,n){var o={};f(t,function(a,u){var d=o[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:u};if(!_e(a.barycenter))d.barycenter=a.barycenter,d.weight=a.weight}),f(n.edges(),function(a){var u=o[a.v],d=o[a.w];if(!_e(u)&&!_e(d))d.indegree++,u.out.push(o[a.w])});var i=Je(o,function(a){return!a.indegree});return Ss(i)}function Ss(t){var n=[];function o(u){return function(d){if(d.merged)return;if(_e(d.barycenter)||_e(u.barycenter)||d.barycenter>=u.barycenter)Ns(u,d)}}function i(u){return function(d){if(d.in.push(u),--d.indegree===0)t.push(d)}}while(t.length){var a=t.pop();n.push(a),f(a.in.reverse(),o(a)),f(a.out,i(a))}return E(Je(n,function(u){return!u.merged}),function(u){return Z(u,["vs","i","barycenter","weight"])})}function Ns(t,n){var o=0,i=0;if(t.weight)o+=t.barycenter*t.weight,i+=t.weight;if(n.weight)o+=n.barycenter*n.weight,i+=n.weight;t.vs=n.vs.concat(t.vs),t.barycenter=o/i,t.weight=i,t.i=Math.min(n.i,t.i),n.merged=!0}function qn(t,n){var o=un(t,function(m){return Object.prototype.hasOwnProperty.call(m,"barycenter")}),i=o.lhs,a=C(o.rhs,function(m){return-m.i}),u=[],d=0,c=0,p=0;i.sort(Ps(!!n)),p=Wn(u,a,p),f(i,function(m){p+=m.vs.length,u.push(m.vs),d+=m.barycenter*m.weight,c+=m.weight,p=Wn(u,a,p)});var l={vs:S(u)};if(c)l.barycenter=d/c,l.weight=c;return l}function Wn(t,n,o){var i;while(n.length&&(i=U(n)).i<=o)n.pop(),t.push(i.vs),o++;return o}function Ps(t){return function(n,o){if(n.barycenter<o.barycenter)return-1;else if(n.barycenter>o.barycenter)return 1;return!t?n.i-o.i:o.i-n.i}}function Jr(t,n,o,i){var a=t.children(n),u=t.node(n),d=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,p={};if(d)a=Je(a,function(w){return w!==d&&w!==c});var l=Yn(t,a);f(l,function(w){if(t.children(w.v).length){var y=Jr(t,w.v,o,i);if(p[w.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter"))Ts(w,y)}});var m=zn(l,o);ks(m,p);var h=qn(m,i);if(d){if(h.vs=S([d,h.vs,c]),t.predecessors(d).length){var g=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(c)[0]);if(!Object.prototype.hasOwnProperty.call(h,"barycenter"))h.barycenter=0,h.weight=0;h.barycenter=(h.barycenter*h.weight+g.order+b.order)/(h.weight+2),h.weight+=2}}return h}function ks(t,n){f(t,function(o){o.vs=S(o.vs.map(function(i){if(n[i])return n[i].vs;return i}))})}function Ts(t,n){if(!_e(t.barycenter))t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight;else t.barycenter=n.barycenter,t.weight=n.weight}function Zn(t){var n=Gr(t),o=Kn(t,N(1,n+1),"inEdges"),i=Kn(t,N(n-1,-1,-1),"outEdges"),a=Vn(t);Jn(t,a);var u=Number.POSITIVE_INFINITY,d;for(var c=0,p=0;p<4;++c,++p){Cs(c%2?o:i,c%4>=2),a=D(t);var l=Un(t,a);if(l<u)p=0,d=$e(a),u=l}Jn(t,d)}function Kn(t,n,o){return E(n,function(i){return Xn(t,i,o)})}function Cs(t,n){var o=new Q;f(t,function(i){var a=i.graph().root,u=Jr(i,a,o,n);f(u.vs,function(d,c){i.node(d).order=c}),Gn(i,o,u.vs)})}function Jn(t,n){f(n,function(o){f(o,function(i,a){t.node(i).order=a})})}function Qn(t){var n=Rs(t);f(t.graph().dummyChains,function(o){var i=t.node(o),a=i.edgeObj,u=As(t,n,a.v,a.w),{path:d,lca:c}=u,p=0,l=d[p],m=!0;while(o!==a.w){if(i=t.node(o),m){while((l=d[p])!==c&&t.node(l).maxRank<i.rank)p++;if(l===c)m=!1}if(!m){while(p<d.length-1&&t.node(l=d[p+1]).minRank<=i.rank)p++;l=d[p]}t.setParent(o,l),o=t.successors(o)[0]}})}function As(t,n,o,i){var a=[],u=[],d=Math.min(n[o].low,n[i].low),c=Math.max(n[o].lim,n[i].lim),p,l;p=o;do p=t.parent(p),a.push(p);while(p&&(n[p].low>d||c>n[p].lim));l=p,p=i;while((p=t.parent(p))!==l)u.push(p);return{path:a.concat(u.reverse()),lca:l}}function Rs(t){var n={},o=0;function i(a){var u=o;f(t.children(a),i),n[a]={low:u,lim:o++}}return f(t.children(),i),n}function Ms(t,n){var o={};function i(a,u){var d=0,c=0,p=a.length,l=U(u);return f(u,function(m,h){var g=Bs(t,m),b=g?t.node(g).order:p;if(g||m===l)f(u.slice(c,h+1),function(w){f(t.predecessors(w),function(y){var v=t.node(y),_=v.order;if((_<d||b<_)&&!(v.dummy&&t.node(w).dummy))ro(o,y,w)})}),c=h+1,d=b}),u}return Yt(n,i),o}function js(t,n){var o={};function i(u,d,c,p,l){var m;f(N(d,c),function(h){if(m=u[h],t.node(m).dummy)f(t.predecessors(m),function(g){var b=t.node(g);if(b.dummy&&(b.order<p||b.order>l))ro(o,g,m)})})}function a(u,d){var c=-1,p,l=0;return f(d,function(m,h){if(t.node(m).dummy==="border"){var g=t.predecessors(m);if(g.length)p=t.node(g[0]).order,i(d,l,h,c,p),l=h,c=p}i(d,l,d.length,p,u.length)}),d}return Yt(n,a),o}function Bs(t,n){if(t.node(n).dummy)return or(t.predecessors(n),function(o){return t.node(o).dummy})}function ro(t,n,o){if(n>o){var i=n;n=o,o=i}if(!Object.prototype.hasOwnProperty.call(t,n))Object.defineProperty(t,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=t[n];Object.defineProperty(a,o,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ds(t,n,o){if(n>o){var i=n;n=o,o=i}return!!t[n]&&Object.prototype.hasOwnProperty.call(t[n],o)}function Fs(t,n,o,i){var a={},u={},d={};return f(n,function(c){f(c,function(p,l){a[p]=p,u[p]=p,d[p]=l})}),f(n,function(c){var p=-1;f(c,function(l){var m=i(l);if(m.length){m=C(m,function(y){return d[y]});var h=(m.length-1)/2;for(var g=Math.floor(h),b=Math.ceil(h);g<=b;++g){var w=m[g];if(u[l]===l&&p<d[w]&&!Ds(o,l,w))u[w]=l,u[l]=a[l]=a[w],p=d[w]}}})}),{root:a,align:u}}function Gs(t,n,o,i,a){var u={},d=Xs(t,n,o,a),c=a?"borderLeft":"borderRight";function p(h,g){var b=d.nodes(),w=b.pop(),y={};while(w){if(y[w])h(w);else y[w]=!0,b.push(w),b=b.concat(g(w));w=b.pop()}}function l(h){u[h]=d.inEdges(h).reduce(function(g,b){return Math.max(g,u[b.v]+d.edge(b))},0)}function m(h){var g=d.outEdges(h).reduce(function(w,y){return Math.min(w,u[y.w]-d.edge(y))},Number.POSITIVE_INFINITY),b=t.node(h);if(g!==Number.POSITIVE_INFINITY&&b.borderType!==c)u[h]=Math.max(u[h],g)}return p(l,d.predecessors.bind(d)),p(m,d.successors.bind(d)),f(i,function(h){u[h]=u[o[h]]}),u}function Xs(t,n,o,i){var a=new Q,u=t.graph(),d=zs(u.nodesep,u.edgesep,i);return f(n,function(c){var p;f(c,function(l){var m=o[l];if(a.setNode(m),p){var h=o[p],g=a.edge(h,m);a.setEdge(h,m,Math.max(d(t,l,p),g||0))}p=l})}),a}function Us(t,n){return J(dt(n),function(o){var{NEGATIVE_INFINITY:i,POSITIVE_INFINITY:a}=Number;return lt(o,function(u,d){var c=Ws(t,d)/2;i=Math.max(u+c,i),a=Math.min(u-c,a)}),i-a})}function Vs(t,n){var o=dt(n),i=B(o),a=I(o);f(["u","d"],function(u){f(["l","r"],function(d){var c=u+d,p=t[c],l;if(p===n)return;var m=dt(p);if(l=d==="l"?i-B(m):a-I(m),l)t[c]=q(p,function(h){return h+l})})})}function Ys(t,n){return q(t.ul,function(o,i){if(n)return t[n.toLowerCase()][i];else{var a=C(E(t,i));return(a[1]+a[2])/2}})}function to(t){var n=D(t),o=ir(Ms(t,n),js(t,n)),i={},a;f(["u","d"],function(d){a=d==="u"?n:dt(n).reverse(),f(["l","r"],function(c){if(c==="r")a=E(a,function(h){return dt(h).reverse()});var p=(d==="u"?t.predecessors:t.successors).bind(t),l=Fs(t,a,o,p),m=Gs(t,a,l.root,l.align,c==="r");if(c==="r")m=q(m,function(h){return-h});i[d+c]=m})});var u=Us(t,i);return Vs(i,u),Ys(i,t.graph().align)}function zs(t,n,o){return function(i,a,u){var d=i.node(a),c=i.node(u),p=0,l;if(p+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":l=-d.width/2;break;case"r":l=d.width/2;break}if(l)p+=o?l:-l;if(l=0,p+=(d.dummy?n:t)/2,p+=(c.dummy?n:t)/2,p+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":l=c.width/2;break;case"r":l=-c.width/2;break}if(l)p+=o?l:-l;return l=0,p}}function Ws(t,n){return t.node(n).width}function no(t){t=Nr(t),qs(t),mt(to(t),function(n,o){t.node(o).x=n})}function qs(t){var n=D(t),o=t.graph().ranksep,i=0;f(n,function(a){var u=I(E(a,function(d){return t.node(d).height}));f(a,function(d){t.node(d).y=i+u/2}),i+=u+o})}function Qr(t,n){var o=n&&n.debugTiming?dn:cn;o("layout",()=>{var i=o(" buildLayoutGraph",()=>ou(t));o(" runLayout",()=>Hs(i,o)),o(" updateInputGraph",()=>Ks(t,i))})}function Hs(t,n){n(" makeSpaceForEdgeLabels",()=>iu(t)),n(" removeSelfEdges",()=>mu(t)),n(" acyclic",()=>tn(t)),n(" nestingGraph.run",()=>Bn(t)),n(" rank",()=>Kr(Nr(t))),n(" injectEdgeLabelProxies",()=>au(t)),n(" removeEmptyRanks",()=>sn(t)),n(" nestingGraph.cleanup",()=>Fn(t)),n(" normalizeRanks",()=>fn(t)),n(" assignRankMinMax",()=>fu(t)),n(" removeEdgeLabelProxies",()=>su(t)),n(" normalize.run",()=>On(t)),n(" parentDummyChains",()=>Qn(t)),n(" addBorderSegments",()=>ln(t)),n(" order",()=>Zn(t)),n(" insertSelfEdges",()=>hu(t)),n(" adjustCoordinateSystem",()=>hn(t)),n(" position",()=>no(t)),n(" positionSelfEdges",()=>gu(t)),n(" removeBorderNodes",()=>lu(t)),n(" normalize.undo",()=>Ln(t)),n(" fixupEdgeLabelCoords",()=>cu(t)),n(" undoCoordinateSystem",()=>gn(t)),n(" translateGraph",()=>uu(t)),n(" assignNodeIntersects",()=>du(t)),n(" reversePoints",()=>pu(t)),n(" acyclic.undo",()=>nn(t))}function Ks(t,n){f(t.nodes(),function(o){var i=t.node(o),a=n.node(o);if(i){if(i.x=a.x,i.y=a.y,n.children(o).length)i.width=a.width,i.height=a.height}}),f(t.edges(),function(o){var i=t.edge(o),a=n.edge(o);if(i.points=a.points,Object.prototype.hasOwnProperty.call(a,"x"))i.x=a.x,i.y=a.y}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}var Js=["nodesep","edgesep","ranksep","marginx","marginy"],Zs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$s=["acyclicer","ranker","rankdir","align"],Qs=["width","height"],ru={width:0,height:0},eu=["minlen","weight","width","height","labeloffset"],tu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},nu=["labelpos"];function ou(t){var n=new Q({multigraph:!0,compound:!0}),o=$r(t.graph());return n.setGraph(ir({},Zs,Zr(o,Js),Z(o,$s))),f(t.nodes(),function(i){var a=$r(t.node(i));n.setNode(i,et(Zr(a,Qs),ru)),n.setParent(i,t.parent(i))}),f(t.edges(),function(i){var a=$r(t.edge(i));n.setEdge(i,ir({},tu,Zr(a,eu),Z(a,nu)))}),n}function iu(t){var n=t.graph();n.ranksep/=2,f(t.edges(),function(o){var i=t.edge(o);if(i.minlen*=2,i.labelpos.toLowerCase()!=="c")if(n.rankdir==="TB"||n.rankdir==="BT")i.width+=i.labeloffset;else i.height+=i.labeloffset})}function au(t){f(t.edges(),function(n){var o=t.edge(n);if(o.width&&o.height){var i=t.node(n.v),a=t.node(n.w),u={rank:(a.rank-i.rank)/2+i.rank,e:n};k(t,"edge-proxy",u,"_ep")}})}function fu(t){var n=0;f(t.nodes(),function(o){var i=t.node(o);if(i.borderTop)i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,n=I(n,i.maxRank)}),t.graph().maxRank=n}function su(t){f(t.nodes(),function(n){var o=t.node(n);if(o.dummy==="edge-proxy")t.edge(o.e).labelRank=o.rank,t.removeNode(n)})}function uu(t){var n=Number.POSITIVE_INFINITY,o=0,i=Number.POSITIVE_INFINITY,a=0,u=t.graph(),d=u.marginx||0,c=u.marginy||0;function p(l){var{x:m,y:h,width:g,height:b}=l;n=Math.min(n,m-g/2),o=Math.max(o,m+g/2),i=Math.min(i,h-b/2),a=Math.max(a,h+b/2)}f(t.nodes(),function(l){p(t.node(l))}),f(t.edges(),function(l){var m=t.edge(l);if(Object.prototype.hasOwnProperty.call(m,"x"))p(m)}),n-=d,i-=c,f(t.nodes(),function(l){var m=t.node(l);m.x-=n,m.y-=i}),f(t.edges(),function(l){var m=t.edge(l);if(f(m.points,function(h){h.x-=n,h.y-=i}),Object.prototype.hasOwnProperty.call(m,"x"))m.x-=n;if(Object.prototype.hasOwnProperty.call(m,"y"))m.y-=i}),u.width=o-n+d,u.height=a-i+c}function du(t){f(t.edges(),function(n){var o=t.edge(n),i=t.node(n.v),a=t.node(n.w),u,d;if(!o.points)o.points=[],u=a,d=i;else u=o.points[0],d=o.points[o.points.length-1];o.points.unshift(Dr(i,u)),o.points.push(Dr(a,d))})}function cu(t){f(t.edges(),function(n){var o=t.edge(n);if(Object.prototype.hasOwnProperty.call(o,"x")){if(o.labelpos==="l"||o.labelpos==="r")o.width-=o.labeloffset;switch(o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset;break}}})}function pu(t){f(t.edges(),function(n){var o=t.edge(n);if(o.reversed)o.points.reverse()})}function lu(t){f(t.nodes(),function(n){if(t.children(n).length){var o=t.node(n),i=t.node(o.borderTop),a=t.node(o.borderBottom),u=t.node(U(o.borderLeft)),d=t.node(U(o.borderRight));o.width=Math.abs(d.x-u.x),o.height=Math.abs(a.y-i.y),o.x=u.x+o.width/2,o.y=i.y+o.height/2}}),f(t.nodes(),function(n){if(t.node(n).dummy==="border")t.removeNode(n)})}function mu(t){f(t.edges(),function(n){if(n.v===n.w){var o=t.node(n.v);if(!o.selfEdges)o.selfEdges=[];o.selfEdges.push({e:n,label:t.edge(n)}),t.removeEdge(n)}})}function hu(t){var n=D(t);f(n,function(o){var i=0;f(o,function(a,u){var d=t.node(a);d.order=u+i,f(d.selfEdges,function(c){k(t,"selfedge",{width:c.label.width,height:c.label.height,rank:d.rank,order:u+ ++i,e:c.e,label:c.label},"_se")}),delete d.selfEdges})})}function gu(t){f(t.nodes(),function(n){var o=t.node(n);if(o.dummy==="selfedge"){var i=t.node(o.e.v),a=i.x+i.width/2,u=i.y,d=o.x-a,c=i.height/2;t.setEdge(o.e,o.label),t.removeNode(n),o.label.points=[{x:a+2*d/3,y:u-c},{x:a+5*d/6,y:u-c},{x:a+d,y:u},{x:a+5*d/6,y:u+c},{x:a+2*d/3,y:u+c}],o.label.x=o.x,o.label.y=o.y}})}function Zr(t,n){return q(Z(t,n),Number)}function $r(t){var n={};return f(t,function(o,i){n[i.toLowerCase()]=o}),n}var oo=e((t,n,o)=>Math.max(n,Math.min(o,t)),"clamp"),io=e((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vu=e((t)=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram"||t==="er"||t==="classDiagram","shouldMergeSelfLoopSegments"),bu=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],yu=e((t,n,o,i,a)=>{let u=[],d=new Set;if(o.forEach(({start:m,end:h})=>{if(m!==i)d.add(m);if(h!==i)d.add(h)}),d.forEach((m)=>{let h=t.node(m);if(typeof h?.x==="number"&&typeof h?.y==="number")u.push(h)}),u.length===0)o.forEach(({edge:m})=>{(m.points??[]).forEach((h)=>{if(typeof h?.x==="number"&&typeof h?.y==="number")u.push(h)})});if(u.length===0)return io(a);let c=u.reduce((m,h)=>({x:m.x+h.x/u.length,y:m.y+h.y/u.length}),{x:0,y:0}),p=c.x-n.x,l=c.y-n.y;if(Math.abs(p)>Math.abs(l))return p>0?"right":"left";if(Math.abs(l)>0)return l>0?"bottom":"top";return io(a)},"getSelfLoopSide"),wu=e((t,n="top",o=0,i=0)=>{let a=t.x,u=t.y-o,d=t.width/2,c=t.height/2,p=Math.max(36,Math.min(100,t.width*0.8)),l=oo(Math.max(i,t.width*0.35),36,p),m=oo(Math.min(t.width,t.height)*0.45,24,48);switch(n){case"bottom":{let h=u+c;return[{x:a-l/2,y:h},{x:a-l/2,y:h+m},{x:a+l/2,y:h+m},{x:a+l/2,y:h}]}case"right":{let h=a+d;return[{x:h,y:u-l/2},{x:h+m,y:u-l/2},{x:h+m,y:u+l/2},{x:h,y:u+l/2}]}case"left":{let h=a-d;return[{x:h,y:u-l/2},{x:h-m,y:u-l/2},{x:h-m,y:u+l/2},{x:h,y:u+l/2}]}case"top":default:{let h=u-c;return[{x:a-l/2,y:h},{x:a-l/2,y:h-m},{x:a+l/2,y:h-m},{x:a+l/2,y:h}]}}},"getSelfLoopPoints"),_u=e((t,n,o="top",i=0,a={})=>{let d=t.x,c=t.y-i,p=a.width??0,l=a.height??0;switch(o){case"bottom":return{x:d,y:Math.max(...n.map((m)=>m.y))+l/2+4};case"right":return{x:Math.max(...n.map((m)=>m.x))+p/2+4,y:c};case"left":return{x:Math.min(...n.map((m)=>m.x))-p/2-4,y:c};case"top":default:return{x:d,y:Math.min(...n.map((m)=>m.y))-l/2-4}}},"getSelfLoopLabelPosition"),Ki=e((t,n=0,{mergeSelfLoops:o=!0}={})=>{let i=new Map,a=[],u=t.graph()?.rankdir;return t.edges().forEach((d)=>{let c=t.edge(d);if(o&&c.selfLoop){let p=c.selfLoop.id;if(!i.has(p))i.set(p,[]);i.get(p).push({edge:c,start:d.v,end:d.w})}else a.push({edge:c,start:d.v,end:d.w})}),i.forEach((d)=>{if(d.length!==3){d.forEach((_)=>a.push(_));return}d.sort((_,A)=>_.edge.selfLoop.order-A.edge.selfLoop.order);let[c,p,l]=d,m=c.edge.originalEdge??p.edge.originalEdge??l.edge.originalEdge??p.edge,h=t.node(m.start);if(!h){d.forEach((_)=>a.push(_));return}let g={width:p.edge.width,height:p.edge.height},b=yu(t,h,d,m.start,u),w=wu(h,b,n,g.width??0),y=_u(h,w,b,n,g),v={...p.edge,...m,id:m.id,points:w,start:m.start,end:m.end,x:y.x,y:y.y,width:g.width,height:g.height,labelStyle:p.edge.labelStyle,fromCluster:c.edge.fromCluster??p.edge.fromCluster??l.edge.fromCluster,toCluster:c.edge.toCluster??p.edge.toCluster??l.edge.toCluster};delete v.selfLoop,delete v.originalEdge,a.push({edge:v,start:v.start,end:v.end})}),a},"getEdgesToRender"),fo=e(async({element:t,graph:n,diagramType:o,id:i,parentCluster:a,siteConfig:u})=>{let d=n.graph().rankdir;r.trace("Dir in recursive render - dir:",d);let{clusters:c,edgePaths:p,edgeLabels:l,nodes:m,rootGroups:h}=sa(t,{edgePathsClass:"edgePaths"});if(!n.nodes())r.info("No nodes found for",n);else r.info("Recursive render XXX",n.nodes());if(n.edges().length>0)r.info("Recursive edges",n.edge(n.edges()[0]));let g=vu(o);await Promise.all(n.nodes().map(async function(y){let v=n.node(y);if(a!==void 0){let _=JSON.parse(JSON.stringify(a.clusterData));if(r.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,y,`
3
3
  data=`,_.height,`
4
4
  Parent cluster`,a.height),n.setNode(a.id,_),!n.parent(y))r.trace("Setting parent",y,a.id),n.setParent(y,a.id,_)}if(r.info("(Insert) Node XXX"+y+": "+JSON.stringify(n.node(y))),v?.clusterNode){r.info("Cluster identified XBX",y,v.width,n.node(y));let{ranksep:_,nodesep:A}=n.graph();v.graph.setGraph({...v.graph.graph(),ranksep:_+25,nodesep:A});let re=await Lu({element:m,graph:v.graph,diagramType:o,id:i,parentCluster:n.node(y),siteConfig:u}),ee=re.elem;R(v,ee),v.diff=re.diff||0,r.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),ho(ee,v)}else if(n.children(y).length>0)r.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",n),r.trace($n(v.id,n)),G.set(v.id,{id:$n(v.id,n),node:v});else r.trace("Node - the non recursive path XAX",y,m,n.node(y),d),await la(m,n.node(y),{config:u,dir:d})})),await e(async()=>{let y=n.edges().map(async function(v){let _=n.edge(v.v,v.w,v.name);if(r.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),r.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(n.edge(v))),r.info("Fix",G,"ids:",v.v,v.w,"Translating: ",G.get(v.v),G.get(v.w)),g&&_.selfLoop){if(_.selfLoop.order!==1)return;let A={..._.originalEdge,..._,id:_.selfLoop.id,startLabelLeft:_.originalEdge?.startLabelLeft??_.startLabelLeft,startLabelRight:_.originalEdge?.startLabelRight??_.startLabelRight,endLabelLeft:_.originalEdge?.endLabelLeft??_.endLabelLeft,endLabelRight:_.originalEdge?.endLabelRight??_.endLabelRight};await Tt(l,A),_.width=A.width,_.height=A.height,_.labelStyle=A.labelStyle;return}await Tt(l,_)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:w}=Ct(u);return{elem:h,graph:n,groups:{clusters:c,edgePaths:p,edgeLabels:l,nodes:m,rootGroups:h},diagramType:o,id:i,mergeSelfLoops:g,subGraphTitleTotalMargin:w}},"measureDagreGraph"),so=e((t)=>{r.info("############################################# XXX"),r.info("### Layout ### XXX"),r.info("############################################# XXX"),Qr(t)},"runDagreGraphLayout"),Eu=e((t,n,o)=>{let i=t.node(n);if(!i)return;let a={...i};if(i?.clusterNode)a.y=(i.y??0)+o;else if(t.children(n).length>0)a.height=(i.height??0)+o;else a.y=(i.y??0)+o/2;return a},"normalizeDagreNode"),ao=e((t,n)=>{bu.forEach((o)=>{if(n[o]!==void 0)t[o]=n[o]})},"applyDagreNodeLayout"),xu=e((t,n,o,i)=>({...t,start:t.start??n,end:t.end??o,points:(t.points??[]).map((a)=>({...a,y:typeof a.y==="number"?a.y+i:a.y}))}),"normalizeDagreEdge"),Co=e((t,n)=>{let{graph:o,mergeSelfLoops:i,subGraphTitleTotalMargin:a=0}=n,u=new Map(t.nodes.map((c)=>[c.id,c]));ca(o).forEach((c)=>{let p=Eu(o,c,a);if(!p)return;ao(o.node(c),p);let l=u.get(c);if(l)ao(l,p)});let d=a/2;return t.edges=Ki(o,d,{mergeSelfLoops:i}).map(({edge:c,start:p,end:l})=>xu(c,p,l,d)),t},"applyDagreLayoutResult"),Ou=e(async({elem:t,graph:n,groups:{clusters:o,edgePaths:i},diagramType:a,id:u,mergeSelfLoops:d,subGraphTitleTotalMargin:c})=>{let p=0;await Promise.all(ca(n).map(async function(h){let g=n.node(h);if(r.info("Position XBX => "+h+": ("+g.x,","+g.y,") width: ",g.width," height: ",g.height),g?.clusterNode)g.y+=c,r.info("A tainted cluster node XBX1",h,g.id,g.width,g.height,g.x,g.y,n.parent(h)),G.get(g.id).node=g,ht(g);else if(n.children(h).length>0){r.info("A pure cluster node XBX1",h,g.id,g.x,g.y,g.width,g.height,n.parent(h)),g.height+=c,n.node(g.parentId);let b=g?.padding/2||0,w=g?.labelBBox?.height||0,y=w-b||0;r.debug("OffsetY",y,"labelHeight",w,"halfPadding",b),await Qt(o,g),G.get(g.id).node=g}else{let b=n.node(g.parentId);g.y+=c/2,r.info("A regular node XBX1 - using the padding",g.id,"parent",g.parentId,g.width,g.height,g.x,g.y,"offsetY",g.offsetY,"parent",b,b?.offsetY,g),ht(g)}}));let l=c/2;return Ki(n,l,{mergeSelfLoops:d}).forEach(function({edge:h,start:g,end:b}){r.info("Edge "+g+" -> "+b+": "+JSON.stringify(h),h),h.points.forEach((_)=>_.y+=l);let w=n.node(g),y=n.node(b),v=Jt(i,h,G,a,w,y,u);Hn(h,v)}),n.nodes().forEach(function(h){let g=n.node(h);if(r.info(h,g.type,g.diff),g.isGroup)p=g.diff}),r.warn("Returning from recursive render XAX",t,p),{elem:t,diff:p}},"paintDagreLayoutCore"),Lu=e(async(t)=>{let n=await fo(t);return so(n.graph),await Ou(n)},"renderDagreSubgraph"),Qi=e((t)=>{let n=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach((o)=>{if(n.setNode(o.id,{...o}),o.parentId)n.setParent(o.id,o.parentId)}),r.debug("Edges:",t.edges),t.edges.forEach((o)=>{if(o.start===o.end){let i=o.start,a=i+"---"+i+"---1",u=i+"---"+i+"---2",d=n.node(i);n.setNode(a,{domId:a,id:a,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(a,d.parentId),n.setNode(u,{domId:u,id:u,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(u,d.parentId);let c=structuredClone(o),p=structuredClone(o),l=structuredClone(o),m=structuredClone(o);if(p.originalEdge=c,p.selfLoop={id:c.id,order:0},l.originalEdge=c,l.selfLoop={id:c.id,order:1},m.originalEdge=c,m.selfLoop={id:c.id,order:2},p.label="",p.arrowTypeEnd="none",p.endLabelLeft="",p.endLabelRight="",p.startLabelLeft="",p.id=i+"-cyclic-special-1",l.startLabelRight="",l.startLabelLeft="",l.endLabelLeft="",l.endLabelRight="",l.arrowTypeStart="none",l.arrowTypeEnd="none",l.id=i+"-cyclic-special-mid",m.label="",m.startLabelRight="",m.startLabelLeft="",m.arrowTypeStart="none",d.isGroup)p.fromCluster=i,m.toCluster=i;m.id=i+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(i,a,p,i+"-cyclic-special-0"),n.setEdge(a,u,l,i+"-cyclic-special-1"),n.setEdge(u,i,m,i+"-cyclic-special-2")}else n.setEdge(o.start,o.end,{...o},o.id)}),eo(n),{graph:n}},"prepareLayoutForDagre"),So=e(async(t,{element:n,preparedLayout:o})=>{let i=o??Qi(t),a=s(),u=await fo({element:n,graph:i.graph,diagramType:t.type,id:t.diagramId,parentCluster:void 0,siteConfig:a});return i.measuredLayout=u,u},"measureDagreLayout"),To=e((t,n)=>{let o=n.preparedLayout?.measuredLayout;if(!o)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return so(o.graph),Co(t,o),o},"runDagreLayoutCore"),Iu=e((t,{measure:n})=>ca(n.graph).map((o)=>n.graph.node(o)).filter(Boolean),"getDagrePaintNodes"),Su=e((t,n,{measure:o})=>t?o.graph.node(t):void 0,"getDagreEdgeNode"),Ji=lr({prepareLayout:Qi,measureLayout:So,runLayoutCore:To,paintOptions:{clusterDb:G,getNodes:Iu,getEdgeNode:Su,skipNode:e((t,{measure:n})=>!n.graph.hasNode(t.id),"skipNode"),isCluster:e((t,{measure:n})=>n.graph.hasNode(t.id)&&(n.graph.children(t.id)??[]).length>0,"isCluster")}});export{Ki,Co,Qi,So,To,Ji};
@@ -1,5 +1,5 @@
1
- import{x,o,ee,a,t,_}from"./chunk-fhnypcrm.js";import{e,r,Ur,Le,Li,Ii,Sn,br,Ca,to,ne,Xt,D,Ri,rn,pt,Sa,no,ro,ao,Di,Ni,b,io,jr,ke,B,Ta,so,qr,Aa,p,V,et,tt,In,ln,Rr,Hr,Ka,mo,Ja,ji,U,N,fo,zt,ei,Wi}from"./chunk-vymqrpm3.js";import{Fr}from"./chunk-9xh96b33.js";function ze(i){let n=i?.constructor;return i===(typeof n==="function"?n.prototype:Object.prototype)}function De(i){if(i==null)return!0;if(Ka(i)){if(typeof i.splice!=="function"&&typeof i!=="string"&&!Rr(i)&&!ln(i)&&!Hr(i))return!1;return i.length===0}if(typeof i==="object"||typeof i==="function"){if(i instanceof Map||i instanceof Set)return i.size===0;let n=Object.keys(i);if(ze(i))return n.filter((s)=>s!=="constructor").length===0;return n.length===0}return!0}var Q="comm",le="rule",me="decl";var Fe="@media",Oe="@import";var Be="@supports";var Pe="@namespace",ie="@keyframes";var fe="@layer",Ne="@scope";var Ve=Math.abs,q=String.fromCharCode;function ue(i){return i.trim()}function se(i,n,s){return i.replace(n,s)}function H(i,n){return i.charCodeAt(n)|0}function W(i,n,s){return i.slice(n,s)}function R(i){return i.length}function pe(i){return i.length}function Z(i,n){return n.push(i),i}var ge=1,J=1,Ge=0,F=0,T=0,te="";function ve(i,n,s,d,c,l,f,m){return{value:i,root:n,parent:s,type:d,props:c,children:l,line:ge,column:J,length:f,return:"",siblings:m}}function He(){return T}function Ue(){if(T=F>0?H(te,--F):0,J--,T===10)J=1,ge--;return T}function O(){if(T=F<Ge?H(te,F++):0,J++,T===10)J=1,ge++;return T}function j(){return H(te,F)}function de(){return F}function he(i,n){return W(te,i,n)}function re(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function We(i){return ge=J=1,Ge=R(te=i),F=0,[]}function je(i){return te="",i}function ye(i){return ue(he(F-1,Me(i===91?i+2:i===40?i+1:i)))}function Ye(i){while(T=j())if(T<33)O();else break;return re(i)>2||re(T)>3?"":" "}function qe(i,n){while(--n&&O())if(T<48||T>102||T>57&&T<65||T>70&&T<97)break;return he(i,de()+(n<6&&j()==32&&O()==32))}function Me(i){while(O())switch(T){case i:return F;case 34:case 39:if(i!==34&&i!==39)Me(T);break;case 40:if(i===41)Me(i);break;case 92:O();break}return F}function Xe(i,n){while(O())if(i+T===57)break;else if(i+T===84&&j()===47)break;return"/*"+he(n,F-1)+"*"+q(i===47?i:O())}function Ke(i){while(!re(j()))O();return he(i,F)}function Je(i){return je(we("",null,null,null,[""],i=We(i),0,[0],i))}function we(i,n,s,d,c,l,f,m,u){var h=0,y=0,w=f,v=0,C=0,A=0,k=1,E=1,M=1,I=0,S=0,P="",K=c,G=l,z=d,g=P;while(E)switch(A=S,S=O()){case 40:if(A!=108&&H(g,w-1)==58)I++,g+="(";else g+=ye(S);break;case 41:I--,g+=")";break;case 34:case 39:case 91:g+=ye(S);break;case 9:case 10:case 13:case 32:if(I>0){g+=q(S);break}g+=Ye(A);break;case 92:g+=qe(de()-1,7);continue;case 47:switch(j()){case 42:case 47:if(Z(bt(Xe(O(),de()),n,s,u),u),(re(A||1)==5||re(j()||1)==5)&&R(g)&&W(g,-1,void 0)!==" ")g+=" ";break;default:g+="/"}break;case 123*k:m[h++]=R(g)*M;case 125*k:case 59:case 0:if(I>0&&S){g+=q(S);break}switch(S){case 0:case 125:E=0;case 59+y:if(M==-1)g=se(g,/\f/g,"");if(C>0&&(R(g)-w||k===0))Z(C>32?Ze(g+";",d,s,w-1,u):Ze(se(g," ","")+";",d,s,w-2,u),u);break;case 59:g+=";";default:if(Z(z=Qe(g,n,s,h,y,c,m,P,K=[],G=[],w,l),l),S===123)if(y===0)we(g,n,z,z,K,l,w,m,G);else{switch(v){case 99:if(H(g,3)===110)break;case 108:if(H(g,2)===97)break;default:y=0;case 100:case 109:case 115:}if(y)we(i,z,z,d&&Z(Qe(i,z,z,0,0,c,m,P,c,K=[],w,G),G),c,G,w,m,d?K:G);else we(g,z,z,z,[""],G,0,m,G)}}h=y=C=0,k=M=1,P=g="",w=f;break;case 58:w=1+R(g),C=A;default:if(k<1){if(S==123)--k;else if(S==125&&k++==0&&Ue()==125)continue}switch(g+=q(S),S*k){case 38:M=y>0?1:(g+="\f",-1);break;case 44:if(I>0)break;m[h++]=(R(g)-1)*M,M=1;break;case 64:if(j()===45)g+=ye(O());v=j(),y=w=R(P=g+=Ke(de())),S++;break;case 45:if(A===45&&R(g)==2)k=0}}return l}function Qe(i,n,s,d,c,l,f,m,u,h,y,w){var v=c-1,C=c===0?l:[""],A=pe(C);for(var k=0,E=0,M=0;k<d;++k)for(var I=0,S=W(i,v+1,v=Ve(E=f[k])),P=i;I<A;++I)if(P=ue(E>0?C[I]+" "+S:se(S,/&\f/g,C[I])))u[M++]=P;return ve(i,n,s,c===0?le:m,u,h,y,w)}function bt(i,n,s,d){return ve(i,n,s,Q,q(He()),W(i,2,-2),0,d)}function Ze(i,n,s,d,c){return ve(i,n,s,me,W(i,0,d),W(i,d+1,-1),d,c)}function xe(i,n){var s="";for(var d=0;d<i.length;d++)s+=n(i[d],d,i,n)||"";return s}function er(i,n,s,d){switch(i.type){case fe:if(i.children.length)break;case Oe:case Pe:case me:return i.return=i.return||i.value;case Q:return"";case ie:return i.return=i.value+"{"+xe(i.children,d)+"}";case le:if(!R(i.value=i.props.join(",")))return""}return R(s=xe(i.children,d))?i.return=i.value+"{"+s+"}":""}function rr(i){var n=pe(i);return function(s,d,c,l){var f="";for(var m=0;m<n;m++)f+=i[m](s,d,c,l)||"";return f}}var nr="c4",St=e((i)=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),Et=e(async()=>{let{diagram:i}=await (x("24h1rfje"),import("./chunk-24h1rfje.js"));return{id:nr,diagram:i}},"loader"),Tt={id:nr,detector:St,loader:Et},Ct=Tt,sr="flowchart-v2",kt=e((i)=>/^\s*(graph|flowchart)/.test(i),"detector"),Dt=e(async()=>{let{diagram:i}=await (x("c516cghj"),import("./chunk-c516cghj.js"));return{id:sr,diagram:i}},"loader"),Mt={id:sr,detector:kt,loader:Dt},_t=Mt,dr="agentflow",Lt=e((i)=>/^\s*agentflow-beta\b/.test(i),"detector"),At=e(async()=>{let{diagram:i}=await (x("wmvd6j0b"),import("./chunk-wmvd6j0b.js"));return{id:dr,diagram:i}},"loader"),It={id:dr,detector:Lt,loader:At},Rt=It,cr="swimlane",$t=e((i)=>/^\s*swimlane-beta\b/.test(i),"detector"),Ft=e(async()=>{let{diagram:i}=await (x("dg1vas6z"),import("./chunk-dg1vas6z.js"));return{id:cr,diagram:i}},"loader"),Ot={id:cr,detector:$t,loader:Ft},Bt=Ot,lr="er",Pt=e((i)=>/^\s*erDiagram/.test(i),"detector"),Nt=e(async()=>{let{diagram:i}=await (x("rcx1aee5"),import("./chunk-rcx1aee5.js"));return{id:lr,diagram:i}},"loader"),Vt={id:lr,detector:Pt,loader:Nt},Gt=Vt,mr="gitGraph",Ht=e((i)=>/^\s*gitGraph/.test(i),"detector"),Ut=e(async()=>{let{diagram:i}=await (x("rks7ksv3"),import("./chunk-rks7ksv3.js"));return{id:mr,diagram:i}},"loader"),Wt={id:mr,detector:Ht,loader:Ut},jt=Wt,fr="gantt",Yt=e((i)=>/^\s*gantt/.test(i),"detector"),qt=e(async()=>{let{diagram:i}=await (x("61jahh35"),import("./chunk-61jahh35.js"));return{id:fr,diagram:i}},"loader"),Kt={id:fr,detector:Yt,loader:qt},Qt=Kt,ur="info",Zt=e((i)=>/^\s*info/.test(i),"detector"),Jt=e(async()=>{let{diagram:i}=await (x("33qwz9bc"),import("./chunk-33qwz9bc.js"));return{id:ur,diagram:i}},"loader"),ea={id:ur,detector:Zt,loader:Jt},pr="pie",ra=e((i)=>/^\s*pie/.test(i),"detector"),ta=e(async()=>{let{diagram:i}=await (x("vd6y2pcm"),import("./chunk-vd6y2pcm.js"));return{id:pr,diagram:i}},"loader"),aa={id:pr,detector:ra,loader:ta},gr="quadrantChart",oa=e((i)=>/^\s*quadrantChart/.test(i),"detector"),ia=e(async()=>{let{diagram:i}=await (x("4fzj0azw"),import("./chunk-4fzj0azw.js"));return{id:gr,diagram:i}},"loader"),na={id:gr,detector:oa,loader:ia},sa=na,vr="xychart",da=e((i)=>/^\s*xychart(-beta)?/.test(i),"detector"),ca=e(async()=>{let{diagram:i}=await (x("b0a8nbj0"),import("./chunk-b0a8nbj0.js"));return{id:vr,diagram:i}},"loader"),la={id:vr,detector:da,loader:ca},ma=la,hr="requirement",fa=e((i)=>/^\s*requirement(Diagram)?/.test(i),"detector"),ua=e(async()=>{let{diagram:i}=await (x("7yc083xj"),import("./chunk-7yc083xj.js"));return{id:hr,diagram:i}},"loader"),pa={id:hr,detector:fa,loader:ua},ga=pa,yr="sequence",va=e((i)=>/^\s*sequenceDiagram/.test(i),"detector"),ha=e(async()=>{let{diagram:i}=await (x("9bgey148"),import("./chunk-9bgey148.js"));return{id:yr,diagram:i}},"loader"),ya={id:yr,detector:va,loader:ha},wa=ya,wr="classDiagram",xa=e((i)=>/^\s*classDiagram/.test(i),"detector"),ba=e(async()=>{let{diagram:i}=await (x("0xc2c540"),import("./chunk-0xc2c540.js"));return{id:wr,diagram:i}},"loader"),Ea={id:wr,detector:xa,loader:ba},ka=Ea,xr="stateDiagram",Da=e((i)=>/^\s*stateDiagram/.test(i),"detector"),Ma=e(async()=>{let{diagram:i}=await (x("mb4qx9hy"),import("./chunk-mb4qx9hy.js"));return{id:xr,diagram:i}},"loader"),_a={id:xr,detector:Da,loader:Ma},La=_a,Sr="journey",Ia=e((i)=>/^\s*journey/.test(i),"detector"),Ra=e(async()=>{let{diagram:i}=await (x("5qqw2e0t"),import("./chunk-5qqw2e0t.js"));return{id:Sr,diagram:i}},"loader"),$a={id:Sr,detector:Ia,loader:Ra},za=$a,be=4,ce=75,Fa=e((i)=>{let n=[];for(let c of i.split(/\s+/)){let l=[...c];while(l.length>ce)n.push(l.slice(0,ce).join("")),l=l.slice(ce);if(l.length>0)n.push(l.join(""))}let s=[],d="";for(let c of n){let l=d?`${d} ${c}`:c;if([...l].length>ce)s.push(d),d=c;else d=l}if(d)s.push(d);if(s.length>be){s.length=be;let c=s[be-1]??"";s[be-1]=`${[...c].slice(0,ce-3).join("")}...`}return s},"wrapErrorMessage"),Oa=e((i,n,s,d)=>{r.debug(`rendering svg for syntax error
2
- `);let c=V(n),l=c.append("g"),f=Fa(d?.db.getErrorMessage?.()??""),m=f.length>0?500+f.length*56:512;c.attr("viewBox",`0 0 2412 ${m}`),B(c,100,m,!0),l.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),l.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),l.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),l.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),l.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),l.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),l.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),l.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${s}`),f.forEach((u,h)=>{l.append("text").attr("class","error-text").attr("x",1440).attr("y",510+h*56).attr("font-size","42px").style("text-anchor","middle").text(u)})},"draw"),Er={draw:Oa},Ba=Er,_e,Pa={clear(){_e=void 0},setErrorMessage(i){_e=i},getErrorMessage(){return _e}},Na={db:Pa,renderer:Er,parser:{parse:e(()=>{return},"parse")}},Va=Na,Tr="flowchart-elk",Ga=e((i,n={})=>{if(/^\s*flowchart-elk/.test(i))return n.layout="elk",!0;return!1},"detector"),Ha=e(async()=>{let{diagram:i}=await (x("c516cghj"),import("./chunk-c516cghj.js"));return{id:Tr,diagram:i}},"loader"),Ua={id:Tr,detector:Ga,loader:Ha},Wa=Ua,Cr="timeline",ja=e((i)=>/^\s*timeline/.test(i),"detector"),Ya=e(async()=>{let{diagram:i}=await (x("90xqeczk"),import("./chunk-90xqeczk.js"));return{id:Cr,diagram:i}},"loader"),qa={id:Cr,detector:ja,loader:Ya},Xa=qa,kr="mindmap",Qa=e((i)=>/^\s*mindmap/.test(i),"detector"),Za=e(async()=>{let{diagram:i}=await (x("7qxhk1kz"),import("./chunk-7qxhk1kz.js"));return{id:kr,diagram:i}},"loader"),eo={id:kr,detector:Qa,loader:Za},oo=eo,Dr="kanban",co=e((i)=>/^\s*kanban/.test(i),"detector"),lo=e(async()=>{let{diagram:i}=await (x("5hmfk69r"),import("./chunk-5hmfk69r.js"));return{id:Dr,diagram:i}},"loader"),uo={id:Dr,detector:co,loader:lo},po=uo,Mr="sankey",go=e((i)=>/^\s*sankey(-beta)?/.test(i),"detector"),vo=e(async()=>{let{diagram:i}=await (x("ywp4s71k"),import("./chunk-ywp4s71k.js"));return{id:Mr,diagram:i}},"loader"),ho={id:Mr,detector:go,loader:vo},yo=ho,_r="packet",wo=e((i)=>/^\s*packet(-beta)?/.test(i),"detector"),xo=e(async()=>{let{diagram:i}=await (x("z6bpamwq"),import("./chunk-z6bpamwq.js"));return{id:_r,diagram:i}},"loader"),bo={id:_r,detector:wo,loader:xo},Lr="radar",So=e((i)=>/^\s*radar-beta/.test(i),"detector"),Eo=e(async()=>{let{diagram:i}=await (x("mwj9tpkz"),import("./chunk-mwj9tpkz.js"));return{id:Lr,diagram:i}},"loader"),To={id:Lr,detector:So,loader:Eo},Ar="block",Co=e((i)=>/^\s*block(-beta)?/.test(i),"detector"),ko=e(async()=>{let{diagram:i}=await (x("z4x331rx"),import("./chunk-z4x331rx.js"));return{id:Ar,diagram:i}},"loader"),Do={id:Ar,detector:Co,loader:ko},Mo=Do,Ir="treeView",_o=e((i)=>/^\s*treeView-beta/.test(i),"detector"),Lo=e(async()=>{let{diagram:i}=await (x("xvsmtetz"),import("./chunk-xvsmtetz.js"));return{id:Ir,diagram:i}},"loader"),Ao={id:Ir,detector:_o,loader:Lo},Io=Ao,$r="architecture",Ro=e((i)=>/^\s*architecture/.test(i),"detector"),$o=e(async()=>{let{diagram:i}=await (x("9a3q0jsh"),import("./chunk-9a3q0jsh.js"));return{id:$r,diagram:i}},"loader"),zo={id:$r,detector:Ro,loader:$o},Fo=zo,zr="eventmodeling",Oo=e((i)=>/^\s*eventmodeling/.test(i),"detector"),Bo=e(async()=>{let{diagram:i}=await (x("a5sg33w2"),import("./chunk-a5sg33w2.js"));return{id:zr,diagram:i}},"loader"),Po={id:zr,detector:Oo,loader:Bo},No=Po,Or="ishikawa",Vo=e((i)=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),Go=e(async()=>{let{diagram:i}=await (x("hszjc2ny"),import("./chunk-hszjc2ny.js"));return{id:Or,diagram:i}},"loader"),Ho={id:Or,detector:Vo,loader:Go},Br="venn",Uo=e((i)=>/^\s*venn-beta/.test(i),"detector"),Wo=e(async()=>{let{diagram:i}=await (x("2hd1pe9w"),import("./chunk-2hd1pe9w.js"));return{id:Br,diagram:i}},"loader"),jo={id:Br,detector:Uo,loader:Wo},Yo=jo,Pr="treemap",qo=e((i)=>/^\s*treemap/.test(i),"detector"),Xo=e(async()=>{let{diagram:i}=await (x("sb1cjpq8"),import("./chunk-sb1cjpq8.js"));return{id:Pr,diagram:i}},"loader"),Ko={id:Pr,detector:qo,loader:Xo},Nr="usecase",Qo=e((i)=>/^\s*usecase-beta(?:\s|$)/.test(i),"detector"),Zo=e(async()=>{let{diagram:i}=await (x("y3ajqthy"),import("./chunk-y3ajqthy.js"));return{id:Nr,diagram:i}},"loader"),Jo={id:Nr,detector:Qo,loader:Zo},Vr="wardley",ri=e((i)=>/^\s*wardley-beta/i.test(i),"detector"),ti=e(async()=>{let{diagram:i}=await (x("jqa39f8t"),import("./chunk-jqa39f8t.js"));return{id:Vr,diagram:i}},"loader"),ai={id:Vr,detector:ri,loader:ti},oi=ai,Gr="cynefin",ii=e((i)=>/^\s*cynefin-beta(?:[\s:]|$)/.test(i),"detector"),ni=e(async()=>{let{diagram:i}=await (x("sn9ecfvy"),import("./chunk-sn9ecfvy.js"));return{id:Gr,diagram:i}},"loader"),si={id:Gr,detector:ii,loader:ni},Wr="railroad",di=e((i)=>/^\s*railroad-beta/i.test(i),"detector"),ci=e(async()=>{let{diagram:i}=await (x("sgvp8vge"),import("./chunk-sgvp8vge.js"));return{id:Wr,diagram:i}},"loader"),li={id:Wr,detector:di,loader:ci},Yr="railroadEbnf",mi=e((i)=>/^\s*railroad-ebnf-beta/i.test(i),"detector"),fi=e(async()=>{let{diagram:i}=await (x("3qjnwsph"),import("./chunk-3qjnwsph.js"));return{id:Yr,diagram:i}},"loader"),ui={id:Yr,detector:mi,loader:fi},Xr="railroadAbnf",pi=e((i)=>/^\s*railroad-abnf-beta/i.test(i),"detector"),gi=e(async()=>{let{diagram:i}=await (x("fv60p68p"),import("./chunk-fv60p68p.js"));return{id:Xr,diagram:i}},"loader"),vi={id:Xr,detector:pi,loader:gi},Kr="railroadPeg",hi=e((i)=>/^\s*railroad-peg-beta/i.test(i),"detector"),yi=e(async()=>{let{diagram:i}=await (x("t7bwsdbr"),import("./chunk-t7bwsdbr.js"));return{id:Kr,diagram:i}},"loader"),wi={id:Kr,detector:hi,loader:yi},tr=!1,Te=e(()=>{if(tr)return;tr=!0,qr("error",Va,(i)=>i.toLowerCase().trim()==="error"),qr("---",{db:{clear:e(()=>{},"clear")},styles:{},renderer:{draw:e(()=>{},"draw")},parser:{parse:e(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:e(()=>null,"init")},(i)=>i.toLowerCase().trimStart().startsWith("---")),Ca(Wa,oo,Fo),Ca(Rt,Ct,po,ka,Gt,Qt,ea,aa,ga,wa,Bt,_t,Xa,jt,La,za,sa,yo,bo,ma,Mo,No,Io,To,Ho,Ko,li,ui,vi,wi,Yo,oi,si,Jo)},"addDiagrams"),xi=e(async()=>{r.debug("Loading registered diagrams");let n=(await Promise.allSettled(Object.entries(Sn).map(async([s,{detector:d,loader:c}])=>{if(!c)return;try{Aa(s)}catch{try{let{diagram:l,id:f}=await c();qr(f,l,d)}catch(l){throw r.error(`Failed to load external diagram with key ${s}. Removing from detectors.`),delete Sn[s],l}}}))).filter((s)=>s.status==="rejected");if(n.length>0){r.error(`Failed to load ${n.length} external diagrams`);for(let s of n)r.error(s);throw Error(`Failed to load ${n.length} external diagrams`)}},"loadRegisteredDiagrams"),bi="graphics-document document";function Qr(i,n){if(i.attr("role",bi),n!=="")i.attr("aria-roledescription",n)}e(Qr,"setA11yDiagramInfo");function Zr(i,n,s,d){if(i.insert===void 0)return;if(s){let c=`chart-desc-${d}`;i.attr("aria-describedby",c),i.insert("desc",":first-child").attr("id",c).text(s)}if(n){let c=`chart-title-${d}`;i.attr("aria-labelledby",c),i.insert("title",":first-child").attr("id",c).text(n)}}e(Zr,"addSVGa11yTitleDescription");var Se=class i{constructor(n,s,d,c,l){this.type=n,this.text=s,this.db=d,this.parser=c,this.renderer=l}static{e(this,"Diagram")}static async fromText(n,s={}){let d=typeof n==="string"?{raw:n,cleaned:n}:n,c=b(),l=br(d.cleaned,c);try{Aa(l)}catch{let v=to(l);if(!v)throw new Ii(`Diagram ${l} not found.`);let{id:C,diagram:A}=await v();qr(C,A)}let{db:f,parser:m,renderer:u,init:h}=Aa(l);if(m.parser)m.parser.yy=f;if(f.clear?.(),h?.(c),s.title)f.setDiagramTitle?.(s.title);let y=d.cleaned;if(f.preserveCommentsWhenParsing&&d.withComments){let v=c.maxTextSize??D.maxTextSize;if(d.withComments.length>v)r.warn(`Comment-preserving source exceeds maxTextSize (${d.withComments.length} > ${v}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`);else y=d.withComments}let w=fo(y)+`
1
+ import{x,o,ee,a,t,_}from"./chunk-4bzqrwr0.js";import{e,r,Ur,Le,Li,Ii,Sn,br,Ca,to,ne,Xt,D,Ri,rn,pt,Sa,no,ro,ao,Di,Ni,b,io,jr,ke,B,Ta,so,qr,Aa,p,V,et,tt,In,ln,Rr,Hr,Ka,mo,Ja,ji,U,N,fo,zt,ei,Wi}from"./chunk-wvdehm9y.js";import{Fr}from"./chunk-vyp0ns1f.js";function ze(i){let n=i?.constructor;return i===(typeof n==="function"?n.prototype:Object.prototype)}function De(i){if(i==null)return!0;if(Ka(i)){if(typeof i.splice!=="function"&&typeof i!=="string"&&!Rr(i)&&!ln(i)&&!Hr(i))return!1;return i.length===0}if(typeof i==="object"||typeof i==="function"){if(i instanceof Map||i instanceof Set)return i.size===0;let n=Object.keys(i);if(ze(i))return n.filter((s)=>s!=="constructor").length===0;return n.length===0}return!0}var Q="comm",le="rule",me="decl";var Fe="@media",Oe="@import";var Be="@supports";var Pe="@namespace",ie="@keyframes";var fe="@layer",Ne="@scope";var Ve=Math.abs,q=String.fromCharCode;function ue(i){return i.trim()}function se(i,n,s){return i.replace(n,s)}function H(i,n){return i.charCodeAt(n)|0}function W(i,n,s){return i.slice(n,s)}function R(i){return i.length}function pe(i){return i.length}function Z(i,n){return n.push(i),i}var ge=1,J=1,Ge=0,F=0,T=0,te="";function ve(i,n,s,d,c,l,f,m){return{value:i,root:n,parent:s,type:d,props:c,children:l,line:ge,column:J,length:f,return:"",siblings:m}}function He(){return T}function Ue(){if(T=F>0?H(te,--F):0,J--,T===10)J=1,ge--;return T}function O(){if(T=F<Ge?H(te,F++):0,J++,T===10)J=1,ge++;return T}function j(){return H(te,F)}function de(){return F}function he(i,n){return W(te,i,n)}function re(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function We(i){return ge=J=1,Ge=R(te=i),F=0,[]}function je(i){return te="",i}function ye(i){return ue(he(F-1,Me(i===91?i+2:i===40?i+1:i)))}function Ye(i){while(T=j())if(T<33)O();else break;return re(i)>2||re(T)>3?"":" "}function qe(i,n){while(--n&&O())if(T<48||T>102||T>57&&T<65||T>70&&T<97)break;return he(i,de()+(n<6&&j()==32&&O()==32))}function Me(i){while(O())switch(T){case i:return F;case 34:case 39:if(i!==34&&i!==39)Me(T);break;case 40:if(i===41)Me(i);break;case 92:O();break}return F}function Xe(i,n){while(O())if(i+T===57)break;else if(i+T===84&&j()===47)break;return"/*"+he(n,F-1)+"*"+q(i===47?i:O())}function Ke(i){while(!re(j()))O();return he(i,F)}function Je(i){return je(we("",null,null,null,[""],i=We(i),0,[0],i))}function we(i,n,s,d,c,l,f,m,u){var h=0,y=0,w=f,v=0,C=0,A=0,k=1,E=1,M=1,I=0,S=0,P="",K=c,G=l,z=d,g=P;while(E)switch(A=S,S=O()){case 40:if(A!=108&&H(g,w-1)==58)I++,g+="(";else g+=ye(S);break;case 41:I--,g+=")";break;case 34:case 39:case 91:g+=ye(S);break;case 9:case 10:case 13:case 32:if(I>0){g+=q(S);break}g+=Ye(A);break;case 92:g+=qe(de()-1,7);continue;case 47:switch(j()){case 42:case 47:if(Z(bt(Xe(O(),de()),n,s,u),u),(re(A||1)==5||re(j()||1)==5)&&R(g)&&W(g,-1,void 0)!==" ")g+=" ";break;default:g+="/"}break;case 123*k:m[h++]=R(g)*M;case 125*k:case 59:case 0:if(I>0&&S){g+=q(S);break}switch(S){case 0:case 125:E=0;case 59+y:if(M==-1)g=se(g,/\f/g,"");if(C>0&&(R(g)-w||k===0))Z(C>32?Ze(g+";",d,s,w-1,u):Ze(se(g," ","")+";",d,s,w-2,u),u);break;case 59:g+=";";default:if(Z(z=Qe(g,n,s,h,y,c,m,P,K=[],G=[],w,l),l),S===123)if(y===0)we(g,n,z,z,K,l,w,m,G);else{switch(v){case 99:if(H(g,3)===110)break;case 108:if(H(g,2)===97)break;default:y=0;case 100:case 109:case 115:}if(y)we(i,z,z,d&&Z(Qe(i,z,z,0,0,c,m,P,c,K=[],w,G),G),c,G,w,m,d?K:G);else we(g,z,z,z,[""],G,0,m,G)}}h=y=C=0,k=M=1,P=g="",w=f;break;case 58:w=1+R(g),C=A;default:if(k<1){if(S==123)--k;else if(S==125&&k++==0&&Ue()==125)continue}switch(g+=q(S),S*k){case 38:M=y>0?1:(g+="\f",-1);break;case 44:if(I>0)break;m[h++]=(R(g)-1)*M,M=1;break;case 64:if(j()===45)g+=ye(O());v=j(),y=w=R(P=g+=Ke(de())),S++;break;case 45:if(A===45&&R(g)==2)k=0}}return l}function Qe(i,n,s,d,c,l,f,m,u,h,y,w){var v=c-1,C=c===0?l:[""],A=pe(C);for(var k=0,E=0,M=0;k<d;++k)for(var I=0,S=W(i,v+1,v=Ve(E=f[k])),P=i;I<A;++I)if(P=ue(E>0?C[I]+" "+S:se(S,/&\f/g,C[I])))u[M++]=P;return ve(i,n,s,c===0?le:m,u,h,y,w)}function bt(i,n,s,d){return ve(i,n,s,Q,q(He()),W(i,2,-2),0,d)}function Ze(i,n,s,d,c){return ve(i,n,s,me,W(i,0,d),W(i,d+1,-1),d,c)}function xe(i,n){var s="";for(var d=0;d<i.length;d++)s+=n(i[d],d,i,n)||"";return s}function er(i,n,s,d){switch(i.type){case fe:if(i.children.length)break;case Oe:case Pe:case me:return i.return=i.return||i.value;case Q:return"";case ie:return i.return=i.value+"{"+xe(i.children,d)+"}";case le:if(!R(i.value=i.props.join(",")))return""}return R(s=xe(i.children,d))?i.return=i.value+"{"+s+"}":""}function rr(i){var n=pe(i);return function(s,d,c,l){var f="";for(var m=0;m<n;m++)f+=i[m](s,d,c,l)||"";return f}}var nr="c4",St=e((i)=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),Et=e(async()=>{let{diagram:i}=await (x("ybrf9mhz"),import("./chunk-ybrf9mhz.js"));return{id:nr,diagram:i}},"loader"),Tt={id:nr,detector:St,loader:Et},Ct=Tt,sr="flowchart-v2",kt=e((i)=>/^\s*(graph|flowchart)/.test(i),"detector"),Dt=e(async()=>{let{diagram:i}=await (x("tncvg1nn"),import("./chunk-tncvg1nn.js"));return{id:sr,diagram:i}},"loader"),Mt={id:sr,detector:kt,loader:Dt},_t=Mt,dr="agentflow",Lt=e((i)=>/^\s*agentflow-beta\b/.test(i),"detector"),At=e(async()=>{let{diagram:i}=await (x("5z4jcqct"),import("./chunk-5z4jcqct.js"));return{id:dr,diagram:i}},"loader"),It={id:dr,detector:Lt,loader:At},Rt=It,cr="swimlane",$t=e((i)=>/^\s*swimlane-beta\b/.test(i),"detector"),Ft=e(async()=>{let{diagram:i}=await (x("9ad7v7bm"),import("./chunk-9ad7v7bm.js"));return{id:cr,diagram:i}},"loader"),Ot={id:cr,detector:$t,loader:Ft},Bt=Ot,lr="er",Pt=e((i)=>/^\s*erDiagram/.test(i),"detector"),Nt=e(async()=>{let{diagram:i}=await (x("ncpnpe9w"),import("./chunk-ncpnpe9w.js"));return{id:lr,diagram:i}},"loader"),Vt={id:lr,detector:Pt,loader:Nt},Gt=Vt,mr="gitGraph",Ht=e((i)=>/^\s*gitGraph/.test(i),"detector"),Ut=e(async()=>{let{diagram:i}=await (x("khxcn8tt"),import("./chunk-khxcn8tt.js"));return{id:mr,diagram:i}},"loader"),Wt={id:mr,detector:Ht,loader:Ut},jt=Wt,fr="gantt",Yt=e((i)=>/^\s*gantt/.test(i),"detector"),qt=e(async()=>{let{diagram:i}=await (x("5qtyq3ce"),import("./chunk-5qtyq3ce.js"));return{id:fr,diagram:i}},"loader"),Kt={id:fr,detector:Yt,loader:qt},Qt=Kt,ur="info",Zt=e((i)=>/^\s*info/.test(i),"detector"),Jt=e(async()=>{let{diagram:i}=await (x("2z1rwr28"),import("./chunk-2z1rwr28.js"));return{id:ur,diagram:i}},"loader"),ea={id:ur,detector:Zt,loader:Jt},pr="pie",ra=e((i)=>/^\s*pie/.test(i),"detector"),ta=e(async()=>{let{diagram:i}=await (x("2s0bmrkv"),import("./chunk-2s0bmrkv.js"));return{id:pr,diagram:i}},"loader"),aa={id:pr,detector:ra,loader:ta},gr="quadrantChart",oa=e((i)=>/^\s*quadrantChart/.test(i),"detector"),ia=e(async()=>{let{diagram:i}=await (x("nvhmq4z5"),import("./chunk-nvhmq4z5.js"));return{id:gr,diagram:i}},"loader"),na={id:gr,detector:oa,loader:ia},sa=na,vr="xychart",da=e((i)=>/^\s*xychart(-beta)?/.test(i),"detector"),ca=e(async()=>{let{diagram:i}=await (x("wnskxerq"),import("./chunk-wnskxerq.js"));return{id:vr,diagram:i}},"loader"),la={id:vr,detector:da,loader:ca},ma=la,hr="requirement",fa=e((i)=>/^\s*requirement(Diagram)?/.test(i),"detector"),ua=e(async()=>{let{diagram:i}=await (x("9cx1be43"),import("./chunk-9cx1be43.js"));return{id:hr,diagram:i}},"loader"),pa={id:hr,detector:fa,loader:ua},ga=pa,yr="sequence",va=e((i)=>/^\s*sequenceDiagram/.test(i),"detector"),ha=e(async()=>{let{diagram:i}=await (x("pggaffrh"),import("./chunk-pggaffrh.js"));return{id:yr,diagram:i}},"loader"),ya={id:yr,detector:va,loader:ha},wa=ya,wr="classDiagram",xa=e((i)=>/^\s*classDiagram/.test(i),"detector"),ba=e(async()=>{let{diagram:i}=await (x("zx8zec24"),import("./chunk-zx8zec24.js"));return{id:wr,diagram:i}},"loader"),Ea={id:wr,detector:xa,loader:ba},ka=Ea,xr="stateDiagram",Da=e((i)=>/^\s*stateDiagram/.test(i),"detector"),Ma=e(async()=>{let{diagram:i}=await (x("kwccs9f6"),import("./chunk-kwccs9f6.js"));return{id:xr,diagram:i}},"loader"),_a={id:xr,detector:Da,loader:Ma},La=_a,Sr="journey",Ia=e((i)=>/^\s*journey/.test(i),"detector"),Ra=e(async()=>{let{diagram:i}=await (x("d11v5s7w"),import("./chunk-d11v5s7w.js"));return{id:Sr,diagram:i}},"loader"),$a={id:Sr,detector:Ia,loader:Ra},za=$a,be=4,ce=75,Fa=e((i)=>{let n=[];for(let c of i.split(/\s+/)){let l=[...c];while(l.length>ce)n.push(l.slice(0,ce).join("")),l=l.slice(ce);if(l.length>0)n.push(l.join(""))}let s=[],d="";for(let c of n){let l=d?`${d} ${c}`:c;if([...l].length>ce)s.push(d),d=c;else d=l}if(d)s.push(d);if(s.length>be){s.length=be;let c=s[be-1]??"";s[be-1]=`${[...c].slice(0,ce-3).join("")}...`}return s},"wrapErrorMessage"),Oa=e((i,n,s,d)=>{r.debug(`rendering svg for syntax error
2
+ `);let c=V(n),l=c.append("g"),f=Fa(d?.db.getErrorMessage?.()??""),m=f.length>0?500+f.length*56:512;c.attr("viewBox",`0 0 2412 ${m}`),B(c,100,m,!0),l.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),l.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),l.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),l.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),l.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),l.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),l.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),l.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${s}`),f.forEach((u,h)=>{l.append("text").attr("class","error-text").attr("x",1440).attr("y",510+h*56).attr("font-size","42px").style("text-anchor","middle").text(u)})},"draw"),Er={draw:Oa},Ba=Er,_e,Pa={clear(){_e=void 0},setErrorMessage(i){_e=i},getErrorMessage(){return _e}},Na={db:Pa,renderer:Er,parser:{parse:e(()=>{return},"parse")}},Va=Na,Tr="flowchart-elk",Ga=e((i,n={})=>{if(/^\s*flowchart-elk/.test(i))return n.layout="elk",!0;return!1},"detector"),Ha=e(async()=>{let{diagram:i}=await (x("tncvg1nn"),import("./chunk-tncvg1nn.js"));return{id:Tr,diagram:i}},"loader"),Ua={id:Tr,detector:Ga,loader:Ha},Wa=Ua,Cr="timeline",ja=e((i)=>/^\s*timeline/.test(i),"detector"),Ya=e(async()=>{let{diagram:i}=await (x("92ssjk2y"),import("./chunk-92ssjk2y.js"));return{id:Cr,diagram:i}},"loader"),qa={id:Cr,detector:ja,loader:Ya},Xa=qa,kr="mindmap",Qa=e((i)=>/^\s*mindmap/.test(i),"detector"),Za=e(async()=>{let{diagram:i}=await (x("sfg2wkhe"),import("./chunk-sfg2wkhe.js"));return{id:kr,diagram:i}},"loader"),eo={id:kr,detector:Qa,loader:Za},oo=eo,Dr="kanban",co=e((i)=>/^\s*kanban/.test(i),"detector"),lo=e(async()=>{let{diagram:i}=await (x("42e3b9hv"),import("./chunk-42e3b9hv.js"));return{id:Dr,diagram:i}},"loader"),uo={id:Dr,detector:co,loader:lo},po=uo,Mr="sankey",go=e((i)=>/^\s*sankey(-beta)?/.test(i),"detector"),vo=e(async()=>{let{diagram:i}=await (x("zj5k94dk"),import("./chunk-zj5k94dk.js"));return{id:Mr,diagram:i}},"loader"),ho={id:Mr,detector:go,loader:vo},yo=ho,_r="packet",wo=e((i)=>/^\s*packet(-beta)?/.test(i),"detector"),xo=e(async()=>{let{diagram:i}=await (x("8y64fkpz"),import("./chunk-8y64fkpz.js"));return{id:_r,diagram:i}},"loader"),bo={id:_r,detector:wo,loader:xo},Lr="radar",So=e((i)=>/^\s*radar-beta/.test(i),"detector"),Eo=e(async()=>{let{diagram:i}=await (x("pz9ps2jm"),import("./chunk-pz9ps2jm.js"));return{id:Lr,diagram:i}},"loader"),To={id:Lr,detector:So,loader:Eo},Ar="block",Co=e((i)=>/^\s*block(-beta)?/.test(i),"detector"),ko=e(async()=>{let{diagram:i}=await (x("4re74xwm"),import("./chunk-4re74xwm.js"));return{id:Ar,diagram:i}},"loader"),Do={id:Ar,detector:Co,loader:ko},Mo=Do,Ir="treeView",_o=e((i)=>/^\s*treeView-beta/.test(i),"detector"),Lo=e(async()=>{let{diagram:i}=await (x("zqch0sc8"),import("./chunk-zqch0sc8.js"));return{id:Ir,diagram:i}},"loader"),Ao={id:Ir,detector:_o,loader:Lo},Io=Ao,$r="architecture",Ro=e((i)=>/^\s*architecture/.test(i),"detector"),$o=e(async()=>{let{diagram:i}=await (x("zj4q9jth"),import("./chunk-zj4q9jth.js"));return{id:$r,diagram:i}},"loader"),zo={id:$r,detector:Ro,loader:$o},Fo=zo,zr="eventmodeling",Oo=e((i)=>/^\s*eventmodeling/.test(i),"detector"),Bo=e(async()=>{let{diagram:i}=await (x("e9twvs9n"),import("./chunk-e9twvs9n.js"));return{id:zr,diagram:i}},"loader"),Po={id:zr,detector:Oo,loader:Bo},No=Po,Or="ishikawa",Vo=e((i)=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),Go=e(async()=>{let{diagram:i}=await (x("a497tykb"),import("./chunk-a497tykb.js"));return{id:Or,diagram:i}},"loader"),Ho={id:Or,detector:Vo,loader:Go},Br="venn",Uo=e((i)=>/^\s*venn-beta/.test(i),"detector"),Wo=e(async()=>{let{diagram:i}=await (x("t4c8xavd"),import("./chunk-t4c8xavd.js"));return{id:Br,diagram:i}},"loader"),jo={id:Br,detector:Uo,loader:Wo},Yo=jo,Pr="treemap",qo=e((i)=>/^\s*treemap/.test(i),"detector"),Xo=e(async()=>{let{diagram:i}=await (x("b53bfkys"),import("./chunk-b53bfkys.js"));return{id:Pr,diagram:i}},"loader"),Ko={id:Pr,detector:qo,loader:Xo},Nr="usecase",Qo=e((i)=>/^\s*usecase-beta(?:\s|$)/.test(i),"detector"),Zo=e(async()=>{let{diagram:i}=await (x("4jmazh6x"),import("./chunk-4jmazh6x.js"));return{id:Nr,diagram:i}},"loader"),Jo={id:Nr,detector:Qo,loader:Zo},Vr="wardley",ri=e((i)=>/^\s*wardley-beta/i.test(i),"detector"),ti=e(async()=>{let{diagram:i}=await (x("z1h20s8c"),import("./chunk-z1h20s8c.js"));return{id:Vr,diagram:i}},"loader"),ai={id:Vr,detector:ri,loader:ti},oi=ai,Gr="cynefin",ii=e((i)=>/^\s*cynefin-beta(?:[\s:]|$)/.test(i),"detector"),ni=e(async()=>{let{diagram:i}=await (x("6cnek1xh"),import("./chunk-6cnek1xh.js"));return{id:Gr,diagram:i}},"loader"),si={id:Gr,detector:ii,loader:ni},Wr="railroad",di=e((i)=>/^\s*railroad-beta/i.test(i),"detector"),ci=e(async()=>{let{diagram:i}=await (x("gmzqdm7v"),import("./chunk-gmzqdm7v.js"));return{id:Wr,diagram:i}},"loader"),li={id:Wr,detector:di,loader:ci},Yr="railroadEbnf",mi=e((i)=>/^\s*railroad-ebnf-beta/i.test(i),"detector"),fi=e(async()=>{let{diagram:i}=await (x("6xaqxcq8"),import("./chunk-6xaqxcq8.js"));return{id:Yr,diagram:i}},"loader"),ui={id:Yr,detector:mi,loader:fi},Xr="railroadAbnf",pi=e((i)=>/^\s*railroad-abnf-beta/i.test(i),"detector"),gi=e(async()=>{let{diagram:i}=await (x("5z6x2n5h"),import("./chunk-5z6x2n5h.js"));return{id:Xr,diagram:i}},"loader"),vi={id:Xr,detector:pi,loader:gi},Kr="railroadPeg",hi=e((i)=>/^\s*railroad-peg-beta/i.test(i),"detector"),yi=e(async()=>{let{diagram:i}=await (x("0xkyryrq"),import("./chunk-0xkyryrq.js"));return{id:Kr,diagram:i}},"loader"),wi={id:Kr,detector:hi,loader:yi},tr=!1,Te=e(()=>{if(tr)return;tr=!0,qr("error",Va,(i)=>i.toLowerCase().trim()==="error"),qr("---",{db:{clear:e(()=>{},"clear")},styles:{},renderer:{draw:e(()=>{},"draw")},parser:{parse:e(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:e(()=>null,"init")},(i)=>i.toLowerCase().trimStart().startsWith("---")),Ca(Wa,oo,Fo),Ca(Rt,Ct,po,ka,Gt,Qt,ea,aa,ga,wa,Bt,_t,Xa,jt,La,za,sa,yo,bo,ma,Mo,No,Io,To,Ho,Ko,li,ui,vi,wi,Yo,oi,si,Jo)},"addDiagrams"),xi=e(async()=>{r.debug("Loading registered diagrams");let n=(await Promise.allSettled(Object.entries(Sn).map(async([s,{detector:d,loader:c}])=>{if(!c)return;try{Aa(s)}catch{try{let{diagram:l,id:f}=await c();qr(f,l,d)}catch(l){throw r.error(`Failed to load external diagram with key ${s}. Removing from detectors.`),delete Sn[s],l}}}))).filter((s)=>s.status==="rejected");if(n.length>0){r.error(`Failed to load ${n.length} external diagrams`);for(let s of n)r.error(s);throw Error(`Failed to load ${n.length} external diagrams`)}},"loadRegisteredDiagrams"),bi="graphics-document document";function Qr(i,n){if(i.attr("role",bi),n!=="")i.attr("aria-roledescription",n)}e(Qr,"setA11yDiagramInfo");function Zr(i,n,s,d){if(i.insert===void 0)return;if(s){let c=`chart-desc-${d}`;i.attr("aria-describedby",c),i.insert("desc",":first-child").attr("id",c).text(s)}if(n){let c=`chart-title-${d}`;i.attr("aria-labelledby",c),i.insert("title",":first-child").attr("id",c).text(n)}}e(Zr,"addSVGa11yTitleDescription");var Se=class i{constructor(n,s,d,c,l){this.type=n,this.text=s,this.db=d,this.parser=c,this.renderer=l}static{e(this,"Diagram")}static async fromText(n,s={}){let d=typeof n==="string"?{raw:n,cleaned:n}:n,c=b(),l=br(d.cleaned,c);try{Aa(l)}catch{let v=to(l);if(!v)throw new Ii(`Diagram ${l} not found.`);let{id:C,diagram:A}=await v();qr(C,A)}let{db:f,parser:m,renderer:u,init:h}=Aa(l);if(m.parser)m.parser.yy=f;if(f.clear?.(),h?.(c),s.title)f.setDiagramTitle?.(s.title);let y=d.cleaned;if(f.preserveCommentsWhenParsing&&d.withComments){let v=c.maxTextSize??D.maxTextSize;if(d.withComments.length>v)r.warn(`Comment-preserving source exceeds maxTextSize (${d.withComments.length} > ${v}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`);else y=d.withComments}let w=fo(y)+`
3
3
  `;if(d.frontmatterLineOffset)f.setFrontmatterLineOffset?.(d.frontmatterLineOffset);return await m.parse(w),new i(l,w,f,m,u)}async render(n,s){await this.renderer.draw(this.text,n,s,this)}getParser(){return this.parser}getType(){return this.type}},ar=[],Si=e(()=>{ar.forEach((i)=>{i()}),ar=[]},"attachFunctions"),Ei=e((i)=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Jr(i){let n=Li(i);if(!n)return{text:i,metadata:{}};let s=n.indent,d=s?n.body.split(`
4
4
  `).map((f)=>f.startsWith(s)?f.slice(s.length):f).join(`
5
5
  `):n.body,c=tt(d,{schema:et})??{};c=typeof c==="object"&&!Array.isArray(c)?c:{};let l={};if(c.displayMode)l.displayMode=c.displayMode.toString();if(c.title)l.title=c.title.toString();if(c.config)l.config=c.config;return{text:i.slice(n.length),metadata:l}}e(Jr,"extractFrontMatter");var Ti=e((i)=>i.replace(/\r\n?/g,`
@@ -1 +1 @@
1
- import{h,o,i,a,v,t,n,_,gt,te,de}from"./chunk-fhnypcrm.js";var H={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function O({skill:s,issue:x,connection:y}){let{Button:P,CopyButton:f,style:w,useTheme:S}=_();S();let[m,L]=a(),[j,g]=a(),[I,D]=a(0);return o(()=>{let c=!0;g(void 0),L(void 0);let p=new URLSearchParams;if(s.projectID)p.set("projectID",s.projectID);if(s.location)p.set("location",s.location);let b=p.toString()?`?${p.toString()}`:"";return Promise.all([y.request(`/api/skills/${encodeURIComponent(s.name)}/content${b}`),y.request(`/api/skills/${encodeURIComponent(s.name)}/files${b}`)]).then(([u,N])=>{if(c)L({text:u.text,files:N.files})}).catch((u)=>{if(c)g(u instanceof Error?u.message:"读取失败")}),()=>{c=!1}},[y,s.name,s.projectID,s.location,I]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[t("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:s.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[H[s.scope],s.projectName?` · ${s.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[t("code",{className:w("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:s.location}),t(f,{text:s.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[t("li",{children:"启用状态按名称生效,影响所有同名技能的新会话可用性。"}),s.disableModelInvocation&&t("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),s.platforms&&n("li",{children:["平台限制:",s.platforms.join("、")]}),s.disabled&&t("li",{children:"已禁用:不会提供给新会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),s.commands?.length?n("div",{children:[t("h3",{className:"font-medium",children:"bin 命令"}),t("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:s.commands.map((c)=>t("li",{className:"break-all",children:c},c))})]}):null,j?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",j]}),t(P,{className:"h-10",onClick:()=>D(I+1),children:"重试"})]}):!m?t("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(v,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h3",{className:"font-medium",children:"SKILL.md 原文"}),t(f,{text:m.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[m.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(m.text.length/4).toLocaleString()," ","tokens(估算)"]}),t("pre",{className:w("surface.subtle",w("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:m.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",m.files.length,m.files.length===200?"(最多显示 200 个)":""]}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:m.files.map((c)=>t("li",{className:"break-all",children:c},c))})]})]})]})}var J="size-4 cursor-pointer rounded border-line text-accent accent-accent focus-visible:outline-2 focus-visible:outline-accent";function ae({connection:s}){let{Button:x,Input:y,Dialog:P,style:f,useTheme:w}=_();w();let[S,m]=a([]),[L,j]=a([]),[g,I]=a(),[D,c]=a(""),[p,b]=a(),[u,N]=a(!0),[q,B]=a(),[z,A]=a(),d=i(0),k=i(!1),C=h(async(e=!1)=>{let l=++d.current;k.current=!0,N(!0);try{if(e)await s.request("/api/skills/rescan",{method:"POST"});let[r,T]=await Promise.all([s.request("/api/skills?all=true"),s.request("/api/skills/settings")]);if(l!==d.current)return;m(r.skills),j(r.issues),I(T),A(new Date),B(void 0)}catch(r){if(l===d.current)B(r instanceof Error?r.message:"读取失败")}finally{if(l===d.current)k.current=!1,N(!1)}},[s]);o(()=>(C(),()=>{d.current++}),[C]);async function K(e){if(k.current)return;k.current=!0;let l=++d.current;N(!0);try{let r=await s.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(l!==d.current)return;I(r),await C()}catch(r){if(l!==d.current)return;B(r instanceof Error?r.message:"保存设置失败"),k.current=!1,N(!1)}}let W=D.trim().toLocaleLowerCase(),E=S.filter((e)=>`${e.name} ${e.description??""}`.toLocaleLowerCase().includes(W)),R=(e)=>L.find((l)=>l.kind==="overridden"&&(l.path==="<built-in>"?e.scope==="builtin":l.path.replace(/\\/g,"/")===`${e.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[t("h2",{className:f("settings.groupTitle"),children:"技能"}),t("p",{"aria-live":"polite",className:f("settings.groupDesc"),children:z&&`找到 ${S.length} 个 · ${z.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n(x,{variant:"ghost",disabled:u,onClick:()=>C(!0),className:"h-9 px-2.5 text-xs",children:[t(te,{className:`size-3.5 ${u?"animate-spin":""}`}),t("span",{className:"ml-1",children:"重新扫描"})]})]}),q&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",q]}),t(x,{disabled:u,onClick:()=>C(),children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[t(de,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),t(y,{type:"search","aria-label":"搜索技能",placeholder:"搜索技能",value:D,onChange:(e)=>c(e.target.value),className:"h-10 min-w-0 pl-9"})]}),t("div",{className:f("settings.groupBox"),children:u&&!S.length?t("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((e)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[t("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),t("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},e))}):E.length===0?t("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):t("ul",{className:"divide-y divide-line",children:E.map((e)=>{let l=R(e),r=e.disabled;return n("li",{className:`flex min-w-0 items-center justify-between gap-3 px-4 py-2.5 transition-colors hover:bg-raised/40 ${r?"opacity-55":""}`,children:[n("button",{type:"button",className:"group flex min-h-12 min-w-0 flex-1 cursor-pointer items-center gap-3 py-1 text-left focus-visible:outline-2 focus-visible:outline-accent","aria-label":`查看技能 ${e.name}`,onClick:()=>b(e),children:[n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t("span",{className:"truncate text-sm font-medium text-ink",title:e.name,children:e.name}),l&&n("span",{className:"flex shrink-0 items-center gap-1 text-xs text-warning",children:[t(gt,{className:"size-3.5"}),"被覆盖"]})]}),e.description&&t("span",{className:"mt-0.5 block truncate text-xs text-dim",title:e.description,children:e.description})]}),t("span",{className:f("control.badge","shrink-0 text-[11px] text-dim"),children:e.scope==="project"?"项目":e.scope==="builtin"?"built-in":"全局"})]}),t("span",{className:"relative flex size-10 shrink-0 items-center justify-center",children:t("input",{type:"checkbox","aria-label":`启用技能 ${e.name}`,className:J,disabled:u,checked:!r,onChange:(T)=>{if(!g)return;let U=g.disabled??[],M=T.target.checked?U.filter((F)=>F!==e.name):[...U,e.name];K({...g,disabled:M})}})})]},`${e.scope}:${e.projectID??""}:${e.name}`)})})})]}),t(P,{open:Boolean(p),onOpenChange:(e)=>{if(!e)b(void 0)},title:p?.name??"",size:"lg",footer:t("div",{className:"flex w-full justify-end",children:t(x,{variant:"primary",onClick:()=>b(void 0),children:"关闭"})}),children:p&&t(O,{skill:p,issue:R(p),connection:s})})]})}export{ae as SkillsSection};
1
+ import{h,o,i,a,v,t,n,_,gt,te,de}from"./chunk-4bzqrwr0.js";var H={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function O({skill:s,issue:x,connection:y}){let{Button:P,CopyButton:f,style:w,useTheme:S}=_();S();let[m,L]=a(),[j,g]=a(),[I,D]=a(0);return o(()=>{let c=!0;g(void 0),L(void 0);let p=new URLSearchParams;if(s.projectID)p.set("projectID",s.projectID);if(s.location)p.set("location",s.location);let b=p.toString()?`?${p.toString()}`:"";return Promise.all([y.request(`/api/skills/${encodeURIComponent(s.name)}/content${b}`),y.request(`/api/skills/${encodeURIComponent(s.name)}/files${b}`)]).then(([u,N])=>{if(c)L({text:u.text,files:N.files})}).catch((u)=>{if(c)g(u instanceof Error?u.message:"读取失败")}),()=>{c=!1}},[y,s.name,s.projectID,s.location,I]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[t("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:s.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[H[s.scope],s.projectName?` · ${s.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[t("code",{className:w("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:s.location}),t(f,{text:s.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[t("li",{children:"启用状态按名称生效,影响所有同名技能的新会话可用性。"}),s.disableModelInvocation&&t("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),s.platforms&&n("li",{children:["平台限制:",s.platforms.join("、")]}),s.disabled&&t("li",{children:"已禁用:不会提供给新会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),s.commands?.length?n("div",{children:[t("h3",{className:"font-medium",children:"bin 命令"}),t("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:s.commands.map((c)=>t("li",{className:"break-all",children:c},c))})]}):null,j?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",j]}),t(P,{className:"h-10",onClick:()=>D(I+1),children:"重试"})]}):!m?t("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(v,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h3",{className:"font-medium",children:"SKILL.md 原文"}),t(f,{text:m.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[m.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(m.text.length/4).toLocaleString()," ","tokens(估算)"]}),t("pre",{className:w("surface.subtle",w("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:m.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",m.files.length,m.files.length===200?"(最多显示 200 个)":""]}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:m.files.map((c)=>t("li",{className:"break-all",children:c},c))})]})]})]})}var J="size-4 cursor-pointer rounded border-line text-accent accent-accent focus-visible:outline-2 focus-visible:outline-accent";function ae({connection:s}){let{Button:x,Input:y,Dialog:P,style:f,useTheme:w}=_();w();let[S,m]=a([]),[L,j]=a([]),[g,I]=a(),[D,c]=a(""),[p,b]=a(),[u,N]=a(!0),[q,B]=a(),[z,A]=a(),d=i(0),k=i(!1),C=h(async(e=!1)=>{let l=++d.current;k.current=!0,N(!0);try{if(e)await s.request("/api/skills/rescan",{method:"POST"});let[r,T]=await Promise.all([s.request("/api/skills?all=true"),s.request("/api/skills/settings")]);if(l!==d.current)return;m(r.skills),j(r.issues),I(T),A(new Date),B(void 0)}catch(r){if(l===d.current)B(r instanceof Error?r.message:"读取失败")}finally{if(l===d.current)k.current=!1,N(!1)}},[s]);o(()=>(C(),()=>{d.current++}),[C]);async function K(e){if(k.current)return;k.current=!0;let l=++d.current;N(!0);try{let r=await s.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(l!==d.current)return;I(r),await C()}catch(r){if(l!==d.current)return;B(r instanceof Error?r.message:"保存设置失败"),k.current=!1,N(!1)}}let W=D.trim().toLocaleLowerCase(),E=S.filter((e)=>`${e.name} ${e.description??""}`.toLocaleLowerCase().includes(W)),R=(e)=>L.find((l)=>l.kind==="overridden"&&(l.path==="<built-in>"?e.scope==="builtin":l.path.replace(/\\/g,"/")===`${e.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[t("h2",{className:f("settings.groupTitle"),children:"技能"}),t("p",{"aria-live":"polite",className:f("settings.groupDesc"),children:z&&`找到 ${S.length} 个 · ${z.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n(x,{variant:"ghost",disabled:u,onClick:()=>C(!0),className:"h-9 px-2.5 text-xs",children:[t(te,{className:`size-3.5 ${u?"animate-spin":""}`}),t("span",{className:"ml-1",children:"重新扫描"})]})]}),q&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",q]}),t(x,{disabled:u,onClick:()=>C(),children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[t(de,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),t(y,{type:"search","aria-label":"搜索技能",placeholder:"搜索技能",value:D,onChange:(e)=>c(e.target.value),className:"h-10 min-w-0 pl-9"})]}),t("div",{className:f("settings.groupBox"),children:u&&!S.length?t("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((e)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[t("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),t("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},e))}):E.length===0?t("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):t("ul",{className:"divide-y divide-line",children:E.map((e)=>{let l=R(e),r=e.disabled;return n("li",{className:`flex min-w-0 items-center justify-between gap-3 px-4 py-2.5 transition-colors hover:bg-raised/40 ${r?"opacity-55":""}`,children:[n("button",{type:"button",className:"group flex min-h-12 min-w-0 flex-1 cursor-pointer items-center gap-3 py-1 text-left focus-visible:outline-2 focus-visible:outline-accent","aria-label":`查看技能 ${e.name}`,onClick:()=>b(e),children:[n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t("span",{className:"truncate text-sm font-medium text-ink",title:e.name,children:e.name}),l&&n("span",{className:"flex shrink-0 items-center gap-1 text-xs text-warning",children:[t(gt,{className:"size-3.5"}),"被覆盖"]})]}),e.description&&t("span",{className:"mt-0.5 block truncate text-xs text-dim",title:e.description,children:e.description})]}),t("span",{className:f("control.badge","shrink-0 text-[11px] text-dim"),children:e.scope==="project"?"项目":e.scope==="builtin"?"built-in":"全局"})]}),t("span",{className:"relative flex size-10 shrink-0 items-center justify-center",children:t("input",{type:"checkbox","aria-label":`启用技能 ${e.name}`,className:J,disabled:u,checked:!r,onChange:(T)=>{if(!g)return;let U=g.disabled??[],M=T.target.checked?U.filter((F)=>F!==e.name):[...U,e.name];K({...g,disabled:M})}})})]},`${e.scope}:${e.projectID??""}:${e.name}`)})})})]}),t(P,{open:Boolean(p),onOpenChange:(e)=>{if(!e)b(void 0)},title:p?.name??"",size:"lg",footer:t("div",{className:"flex w-full justify-end",children:t(x,{variant:"primary",onClick:()=>b(void 0),children:"关闭"})}),children:p&&t(O,{skill:p,issue:R(p),connection:s})})]})}export{ae as SkillsSection};
@@ -1,4 +1,4 @@
1
- import{e,y,B,C,S,E,T,A,I,L,s,V,Ge,m}from"./chunk-vymqrpm3.js";var dt=function(){var t=e(function(H,i,a,n){for(a=a||{},n=H.length;n--;a[H[n]]=i);return a},"o"),f=[1,4],l=[1,14],o=[1,12],h=[1,13],p=[6,7,8],k=[1,20],d=[1,18],x=[1,19],u=[6,7,11],_=[1,6,13,14],b=[1,23],M=[1,24],P=[1,6,7,11,13,14],Z={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(i,a,n,c,g,r,N){var v=r.length-1;switch(g){case 6:case 7:return c;case 15:c.addNode(r[v-1].length,r[v].trim());break;case 16:c.addNode(0,r[v].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:l,7:[1,10],9:9,12:11,13:o,14:h},t(p,[2,3]),{1:[2,2]},t(p,[2,4]),t(p,[2,5]),{1:[2,6],6:l,12:15,13:o,14:h},{6:l,9:16,12:11,13:o,14:h},{6:k,7:d,10:17,11:x},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:k,7:d,10:22,11:x},{1:[2,7],6:l,12:15,13:o,14:h},t(_,[2,14],{7:b,11:M}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(u,[2,15]),t(_,[2,13],{7:b,11:M}),t(P,[2,11]),t(P,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(i,a){if(a.recoverable)this.trace(i);else{var n=Error(i);throw n.hash=a,n}},"parseError"),parse:e(function(i){var a=this,n=[0],c=[],g=[null],r=[],N=this.table,v="",F=0,D=0,W=0,j=2,Y=1,rt=r.slice.call(arguments,1),w=Object.create(this.lexer),O={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))O.yy[q]=this.yy[q];if(w.setInput(i,O.yy),O.yy.lexer=w,O.yy.parser=this,typeof w.yylloc>"u")w.yylloc={};var Q=w.yylloc;r.push(Q);var lt=w.options&&w.options.ranges;if(typeof O.yy.parseError==="function")this.parseError=O.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(U){n.length=n.length-2*U,g.length=g.length-U,r.length=r.length-U}e(xt,"popStack");function yt(){var U=c.pop()||w.lex()||Y;if(typeof U!=="number"){if(U instanceof Array)c=U,U=c.pop();U=a.symbols_[U]||U}return U}e(yt,"lex");var z,ot,J,G,Vt,ht,tt={},st,K,ft,nt;while(!0){if(J=n[n.length-1],this.defaultActions[J])G=this.defaultActions[J];else{if(z===null||typeof z>"u")z=yt();G=N[J]&&N[J][z]}if(typeof G>"u"||!G.length||!G[0]){var ct="";nt=[];for(st in N[J])if(this.terminals_[st]&&st>j)nt.push("'"+this.terminals_[st]+"'");if(w.showPosition)ct="Parse error on line "+(F+1)+`:
1
+ import{e,y,B,C,S,E,T,A,I,L,s,V,Ge,m}from"./chunk-wvdehm9y.js";var dt=function(){var t=e(function(H,i,a,n){for(a=a||{},n=H.length;n--;a[H[n]]=i);return a},"o"),f=[1,4],l=[1,14],o=[1,12],h=[1,13],p=[6,7,8],k=[1,20],d=[1,18],x=[1,19],u=[6,7,11],_=[1,6,13,14],b=[1,23],M=[1,24],P=[1,6,7,11,13,14],Z={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(i,a,n,c,g,r,N){var v=r.length-1;switch(g){case 6:case 7:return c;case 15:c.addNode(r[v-1].length,r[v].trim());break;case 16:c.addNode(0,r[v].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:l,7:[1,10],9:9,12:11,13:o,14:h},t(p,[2,3]),{1:[2,2]},t(p,[2,4]),t(p,[2,5]),{1:[2,6],6:l,12:15,13:o,14:h},{6:l,9:16,12:11,13:o,14:h},{6:k,7:d,10:17,11:x},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:k,7:d,10:22,11:x},{1:[2,7],6:l,12:15,13:o,14:h},t(_,[2,14],{7:b,11:M}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(u,[2,15]),t(_,[2,13],{7:b,11:M}),t(P,[2,11]),t(P,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(i,a){if(a.recoverable)this.trace(i);else{var n=Error(i);throw n.hash=a,n}},"parseError"),parse:e(function(i){var a=this,n=[0],c=[],g=[null],r=[],N=this.table,v="",F=0,D=0,W=0,j=2,Y=1,rt=r.slice.call(arguments,1),w=Object.create(this.lexer),O={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))O.yy[q]=this.yy[q];if(w.setInput(i,O.yy),O.yy.lexer=w,O.yy.parser=this,typeof w.yylloc>"u")w.yylloc={};var Q=w.yylloc;r.push(Q);var lt=w.options&&w.options.ranges;if(typeof O.yy.parseError==="function")this.parseError=O.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(U){n.length=n.length-2*U,g.length=g.length-U,r.length=r.length-U}e(xt,"popStack");function yt(){var U=c.pop()||w.lex()||Y;if(typeof U!=="number"){if(U instanceof Array)c=U,U=c.pop();U=a.symbols_[U]||U}return U}e(yt,"lex");var z,ot,J,G,Vt,ht,tt={},st,K,ft,nt;while(!0){if(J=n[n.length-1],this.defaultActions[J])G=this.defaultActions[J];else{if(z===null||typeof z>"u")z=yt();G=N[J]&&N[J][z]}if(typeof G>"u"||!G.length||!G[0]){var ct="";nt=[];for(st in N[J])if(this.terminals_[st]&&st>j)nt.push("'"+this.terminals_[st]+"'");if(w.showPosition)ct="Parse error on line "+(F+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+nt.join(", ")+", got '"+(this.terminals_[z]||z)+"'";else ct="Parse error on line "+(F+1)+": Unexpected "+(z==Y?"end of input":"'"+(this.terminals_[z]||z)+"'");this.parseError(ct,{text:w.match,token:this.terminals_[z]||z,line:w.yylineno,loc:Q,expected:nt})}if(G[0]instanceof Array&&G.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+z);switch(G[0]){case 1:if(n.push(z),g.push(w.yytext),r.push(w.yylloc),n.push(G[1]),z=null,!ot){if(D=w.yyleng,v=w.yytext,F=w.yylineno,Q=w.yylloc,W>0)W--}else z=ot,ot=null;break;case 2:if(K=this.productions_[G[1]][1],tt.$=g[g.length-K],tt._$={first_line:r[r.length-(K||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(K||1)].first_column,last_column:r[r.length-1].last_column},lt)tt._$.range=[r[r.length-(K||1)].range[0],r[r.length-1].range[1]];if(ht=this.performAction.apply(tt,[v,D,F,O.yy,G[1],g,r].concat(rt)),typeof ht<"u")return ht;if(K)n=n.slice(0,-1*K*2),g=g.slice(0,-1*K),r=r.slice(0,-1*K);n.push(this.productions_[G[1]][0]),g.push(tt.$),r.push(tt._$),ft=N[n[n.length-2]][n[n.length-1]],n.push(ft);break;case 3:return!0}}return!0},"parse")},X=function(){var H={EOF:1,parseError:e(function(a,n){if(this.yy.parser)this.yy.parser.parseError(a,n);else throw Error(a)},"parseError"),setInput:e(function(i,a){if(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];return this.offset=0,this},"setInput"),input:e(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);if(a)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),i},"input"),unput:e(function(i){var a=i.length,n=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 c=this.match.split(/(?:\r\n?|\n)/g);if(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 g=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===c.length?this.yylloc.first_column:0)+c[c.length-n.length].length-n[0].length:this.yylloc.first_column-a},this.options.ranges)this.yylloc.range=[g[0],g[0]+this.yyleng-a];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(i){this.unput(this.match.slice(i))},"less"),pastInput:e(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:e(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var i=this.pastInput(),a=Array(i.length+1).join("-");return i+this.upcomingInput()+`