@gingkoo/base-server 0.0.2-alpha.22 → 0.0.2-alpha.24

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 (97) hide show
  1. package/dist/base-assets/js/{arc-ad03e00d.js → arc-bf1ddebf.js} +1 -1
  2. package/dist/base-assets/js/{blockDiagram-9f4a6865-44930637.js → blockDiagram-9f4a6865-776cef2b.js} +1 -1
  3. package/dist/base-assets/js/blockDiagram-9f4a6865-776cef2b.js.gz +0 -0
  4. package/dist/base-assets/js/{c4Diagram-ae766693-71fadb19.js → c4Diagram-ae766693-0e279651.js} +1 -1
  5. package/dist/base-assets/js/c4Diagram-ae766693-0e279651.js.gz +0 -0
  6. package/dist/base-assets/js/channel-809a40dd.js +1 -0
  7. package/dist/base-assets/js/{classDiagram-fb54d2a0-20af34ab.js → classDiagram-fb54d2a0-76c4ec6d.js} +1 -1
  8. package/dist/base-assets/js/{classDiagram-v2-a2b738ad-186b03ab.js → classDiagram-v2-a2b738ad-5905f9d2.js} +1 -1
  9. package/dist/base-assets/js/clone-e58974ba.js +1 -0
  10. package/dist/base-assets/js/{createText-ca0c5216-f97b0cb9.js → createText-ca0c5216-a15b6830.js} +1 -1
  11. package/dist/base-assets/js/{edges-066a5561-6ad78f8d.js → edges-066a5561-c93652c0.js} +1 -1
  12. package/dist/base-assets/js/edges-066a5561-c93652c0.js.gz +0 -0
  13. package/dist/base-assets/js/{erDiagram-09d1c15f-247748c9.js → erDiagram-09d1c15f-c08d8e3a.js} +1 -1
  14. package/dist/base-assets/js/erDiagram-09d1c15f-c08d8e3a.js.gz +0 -0
  15. package/dist/base-assets/js/{flowDb-c1833063-1565d196.js → flowDb-c1833063-664a3008.js} +1 -1
  16. package/dist/base-assets/js/flowDb-c1833063-664a3008.js.gz +0 -0
  17. package/dist/base-assets/js/{flowDiagram-b222e15a-b026451e.js → flowDiagram-b222e15a-113a08a8.js} +1 -1
  18. package/dist/base-assets/js/flowDiagram-b222e15a-113a08a8.js.gz +0 -0
  19. package/dist/base-assets/js/flowDiagram-v2-13329dc7-350669d0.js +1 -0
  20. package/dist/base-assets/js/{flowchart-elk-definition-ae0efee6-624231d5.js → flowchart-elk-definition-ae0efee6-9721be04.js} +1 -1
  21. package/dist/base-assets/js/flowchart-elk-definition-ae0efee6-9721be04.js.gz +0 -0
  22. package/dist/base-assets/js/{ganttDiagram-b62c793e-8c29401c.js → ganttDiagram-b62c793e-1362bae1.js} +1 -1
  23. package/dist/base-assets/js/ganttDiagram-b62c793e-1362bae1.js.gz +0 -0
  24. package/dist/base-assets/js/{gitGraphDiagram-942e62fe-78c2bba0.js → gitGraphDiagram-942e62fe-47ae3186.js} +1 -1
  25. package/dist/base-assets/js/gitGraphDiagram-942e62fe-47ae3186.js.gz +0 -0
  26. package/dist/base-assets/js/{graph-8c5cea72.js → graph-ee552267.js} +1 -1
  27. package/dist/base-assets/js/graph-ee552267.js.gz +0 -0
  28. package/dist/base-assets/js/{index-01f381cb-3df3598a.js → index-01f381cb-43f74d07.js} +1 -1
  29. package/dist/base-assets/js/index-01f381cb-43f74d07.js.gz +0 -0
  30. package/dist/base-assets/js/{index-17b5f431.js → index-0d406b53.js} +3 -3
  31. package/dist/base-assets/js/index-0d406b53.js.gz +0 -0
  32. package/dist/base-assets/js/{infoDiagram-94cd232f-9e60dc87.js → infoDiagram-94cd232f-35b0b7bb.js} +1 -1
  33. package/dist/base-assets/js/{journeyDiagram-6625b456-ade67579.js → journeyDiagram-6625b456-fb9de618.js} +1 -1
  34. package/dist/base-assets/js/journeyDiagram-6625b456-fb9de618.js.gz +0 -0
  35. package/dist/base-assets/js/{layout-2cab2e94.js → layout-e292fff8.js} +1 -1
  36. package/dist/base-assets/js/layout-e292fff8.js.gz +0 -0
  37. package/dist/base-assets/js/{line-55cc6230.js → line-8a48680c.js} +1 -1
  38. package/dist/base-assets/js/{linear-565bf704.js → linear-85868ac5.js} +1 -1
  39. package/dist/base-assets/js/{mermaid.core-9d0b1a24.js → mermaid.core-66f36223.js} +3 -3
  40. package/dist/base-assets/js/mermaid.core-66f36223.js.gz +0 -0
  41. package/dist/base-assets/js/{mindmap-definition-307c710a-7af9d322.js → mindmap-definition-307c710a-c6adceb0.js} +1 -1
  42. package/dist/base-assets/js/mindmap-definition-307c710a-c6adceb0.js.gz +0 -0
  43. package/dist/base-assets/js/{pieDiagram-bb1d19e5-19419c7d.js → pieDiagram-bb1d19e5-e526dc7a.js} +1 -1
  44. package/dist/base-assets/js/pieDiagram-bb1d19e5-e526dc7a.js.gz +0 -0
  45. package/dist/base-assets/js/{quadrantDiagram-c759a472-10f4941d.js → quadrantDiagram-c759a472-dcc88c06.js} +1 -1
  46. package/dist/base-assets/js/quadrantDiagram-c759a472-dcc88c06.js.gz +0 -0
  47. package/dist/base-assets/js/{react-cropper.es-c32fb7b8.js → react-cropper.es-ba59dbb1.js} +1 -1
  48. package/dist/base-assets/js/react-cropper.es-ba59dbb1.js.gz +0 -0
  49. package/dist/base-assets/js/{requirementDiagram-87253d64-b56f8713.js → requirementDiagram-87253d64-e9a27a97.js} +1 -1
  50. package/dist/base-assets/js/requirementDiagram-87253d64-e9a27a97.js.gz +0 -0
  51. package/dist/base-assets/js/{sankeyDiagram-707fac0f-7b4bd397.js → sankeyDiagram-707fac0f-a0629add.js} +1 -1
  52. package/dist/base-assets/js/sankeyDiagram-707fac0f-a0629add.js.gz +0 -0
  53. package/dist/base-assets/js/{sequenceDiagram-6894f283-9fd79776.js → sequenceDiagram-6894f283-6c923367.js} +1 -1
  54. package/dist/base-assets/js/sequenceDiagram-6894f283-6c923367.js.gz +0 -0
  55. package/dist/base-assets/js/{stateDiagram-5dee940d-6f3cc3e7.js → stateDiagram-5dee940d-23652b07.js} +1 -1
  56. package/dist/base-assets/js/{stateDiagram-v2-1992cada-17754e12.js → stateDiagram-v2-1992cada-f675789b.js} +1 -1
  57. package/dist/base-assets/js/{styles-0784dbeb-4908d31b.js → styles-0784dbeb-0e212720.js} +1 -1
  58. package/dist/base-assets/js/styles-0784dbeb-0e212720.js.gz +0 -0
  59. package/dist/base-assets/js/{styles-483fbfea-7de3f338.js → styles-483fbfea-7cb1d62e.js} +1 -1
  60. package/dist/base-assets/js/{styles-b83b31c9-a8b9e7e5.js → styles-b83b31c9-ddb8a8a8.js} +1 -1
  61. package/dist/base-assets/js/styles-b83b31c9-ddb8a8a8.js.gz +0 -0
  62. package/dist/base-assets/js/{svgDrawCommon-5e1cfd1d-a430bfa1.js → svgDrawCommon-5e1cfd1d-4327d5e4.js} +1 -1
  63. package/dist/base-assets/js/{timeline-definition-bf702344-142680a7.js → timeline-definition-bf702344-d7bd1c93.js} +1 -1
  64. package/dist/base-assets/js/timeline-definition-bf702344-d7bd1c93.js.gz +0 -0
  65. package/dist/base-assets/js/{xychartDiagram-f11f50a6-ee649e12.js → xychartDiagram-f11f50a6-5bca8ec2.js} +1 -1
  66. package/dist/base-assets/js/xychartDiagram-f11f50a6-5bca8ec2.js.gz +0 -0
  67. package/dist/index.html +1 -1
  68. package/package.json +2 -2
  69. package/dist/base-assets/js/blockDiagram-9f4a6865-44930637.js.gz +0 -0
  70. package/dist/base-assets/js/c4Diagram-ae766693-71fadb19.js.gz +0 -0
  71. package/dist/base-assets/js/channel-64ac0461.js +0 -1
  72. package/dist/base-assets/js/clone-7c3e254b.js +0 -1
  73. package/dist/base-assets/js/edges-066a5561-6ad78f8d.js.gz +0 -0
  74. package/dist/base-assets/js/erDiagram-09d1c15f-247748c9.js.gz +0 -0
  75. package/dist/base-assets/js/flowDb-c1833063-1565d196.js.gz +0 -0
  76. package/dist/base-assets/js/flowDiagram-b222e15a-b026451e.js.gz +0 -0
  77. package/dist/base-assets/js/flowDiagram-v2-13329dc7-f4b9b482.js +0 -1
  78. package/dist/base-assets/js/flowchart-elk-definition-ae0efee6-624231d5.js.gz +0 -0
  79. package/dist/base-assets/js/ganttDiagram-b62c793e-8c29401c.js.gz +0 -0
  80. package/dist/base-assets/js/gitGraphDiagram-942e62fe-78c2bba0.js.gz +0 -0
  81. package/dist/base-assets/js/graph-8c5cea72.js.gz +0 -0
  82. package/dist/base-assets/js/index-01f381cb-3df3598a.js.gz +0 -0
  83. package/dist/base-assets/js/index-17b5f431.js.gz +0 -0
  84. package/dist/base-assets/js/journeyDiagram-6625b456-ade67579.js.gz +0 -0
  85. package/dist/base-assets/js/layout-2cab2e94.js.gz +0 -0
  86. package/dist/base-assets/js/mermaid.core-9d0b1a24.js.gz +0 -0
  87. package/dist/base-assets/js/mindmap-definition-307c710a-7af9d322.js.gz +0 -0
  88. package/dist/base-assets/js/pieDiagram-bb1d19e5-19419c7d.js.gz +0 -0
  89. package/dist/base-assets/js/quadrantDiagram-c759a472-10f4941d.js.gz +0 -0
  90. package/dist/base-assets/js/react-cropper.es-c32fb7b8.js.gz +0 -0
  91. package/dist/base-assets/js/requirementDiagram-87253d64-b56f8713.js.gz +0 -0
  92. package/dist/base-assets/js/sankeyDiagram-707fac0f-7b4bd397.js.gz +0 -0
  93. package/dist/base-assets/js/sequenceDiagram-6894f283-9fd79776.js.gz +0 -0
  94. package/dist/base-assets/js/styles-0784dbeb-4908d31b.js.gz +0 -0
  95. package/dist/base-assets/js/styles-b83b31c9-a8b9e7e5.js.gz +0 -0
  96. package/dist/base-assets/js/timeline-definition-bf702344-142680a7.js.gz +0 -0
  97. package/dist/base-assets/js/xychartDiagram-f11f50a6-ee649e12.js.gz +0 -0
@@ -1,4 +1,4 @@
1
- import{l as Y,$ as D,i as M}from"./mermaid.core-9d0b1a24.js";import"./index-17b5f431.js";var $=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
1
+ import{l as Y,$ as D,i as M}from"./mermaid.core-66f36223.js";import"./index-0d406b53.js";var $=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
2
2
  `+o.showPosition()+`
3
3
  Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(v+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,v=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,v,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{c as A,x as yt,y as ft,s as dt,g as pt,b as gt,a as mt,A as xt,h as W,i as kt}from"./mermaid.core-9d0b1a24.js";import{d as _t,f as bt,b as vt,g as it}from"./svgDrawCommon-5e1cfd1d-a430bfa1.js";import"./index-17b5f431.js";import{a as Q}from"./arc-ad03e00d.js";import"./path-bf96448e.js";var G=function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],l=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(s,r,a,u,d,o,w){var k=o.length-1;switch(d){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],o=[],w=this.table,k="",R=0,Z=0,lt=2,J=1,ct=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;o.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,O,I={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var q="";B=[];for(N in w[E])this.terminals_[N]&&N>lt&&B.push("'"+this.terminals_[N]+"'");x.showPosition?q="Parse error on line "+(R+1)+`:
1
+ import{c as A,x as yt,y as ft,s as dt,g as pt,b as gt,a as mt,A as xt,h as W,i as kt}from"./mermaid.core-66f36223.js";import{d as _t,f as bt,b as vt,g as it}from"./svgDrawCommon-5e1cfd1d-4327d5e4.js";import"./index-0d406b53.js";import{a as Q}from"./arc-bf1ddebf.js";import"./path-bf96448e.js";var G=function(){var t=function(p,s,r,a){for(r=r||{},a=p.length;a--;r[p[a]]=s);return r},e=[6,8,10,11,12,14,16,17,18],i=[1,9],l=[1,10],n=[1,11],h=[1,12],c=[1,13],f=[1,14],y={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(s,r,a,u,d,o,w){var k=o.length-1;switch(d){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:l,14:n,16:h,17:c,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(s,r){if(r.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=r,a}},parse:function(s){var r=this,a=[0],u=[],d=[null],o=[],w=this.table,k="",R=0,Z=0,lt=2,J=1,ct=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(S.yy[z]=this.yy[z]);x.setInput(s,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var Y=x.yylloc;o.push(Y);var ht=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(){var T;return T=u.pop()||x.lex()||J,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=r.symbols_[T]||T),T}for(var _,E,b,O,I={},N,$,K,B;;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=ut()),b=w[E]&&w[E][_]),typeof b>"u"||!b.length||!b[0]){var q="";B=[];for(N in w[E])this.terminals_[N]&&N>lt&&B.push("'"+this.terminals_[N]+"'");x.showPosition?q="Parse error on line "+(R+1)+`:
2
2
  `+x.showPosition()+`
3
3
  Expecting `+B.join(", ")+", got '"+(this.terminals_[_]||_)+"'":q="Parse error on line "+(R+1)+": Unexpected "+(_==J?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(q,{text:x.match,token:this.terminals_[_]||_,line:x.yylineno,loc:Y,expected:B})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:a.push(_),d.push(x.yytext),o.push(x.yylloc),a.push(b[1]),_=null,Z=x.yyleng,k=x.yytext,R=x.yylineno,Y=x.yylloc;break;case 2:if($=this.productions_[b[1]][1],I.$=d[d.length-$],I._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},ht&&(I._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),O=this.performAction.apply(I,[k,Z,R,S.yy,b[1],d,o].concat(ct)),typeof O<"u")return O;$&&(a=a.slice(0,-1*$*2),d=d.slice(0,-1*$),o=o.slice(0,-1*$)),a.push(this.productions_[b[1]][0]),d.push(I.$),o.push(I._$),K=w[a[a.length-2]][a[a.length-1]],a.push(K);break;case 3:return!0}}return!0}},m=function(){var p={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput:function(s,r){return this.yy=r||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var r=s.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var r=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===u.length?this.yylloc.first_column:0)+u[u.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),r=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{b as bn,a as qn,c as Wn,G as x,h as w,f as T,v as y,r as B}from"./graph-8c5cea72.js";import{$ as Xn,a0 as Un,a1 as zn,U as gn,a2 as S,s as xn,a3 as Hn,i as Jn,M,q as Kn,a4 as Zn,a5 as En,a6 as kn,a7 as Qn,a8 as U,a9 as J,C as an,aa as yn,ab as jn,ac as ne,I as Nn,ad as Ln,O as V,a as _n,B as ee,ae as re,af as ie,ag as te,ah as m,n as s,W as ae,ai as on,Y as g,l as z}from"./index-17b5f431.js";var un=1/0,oe=17976931348623157e292;function P(n){if(!n)return n===0?n:0;if(n=Xn(n),n===un||n===-un){var e=n<0?-1:1;return e*oe}return n===n?n:0}function ue(n){var e=P(n),r=e%1;return e===e?r?e-r:e:0}function L(n){var e=n==null?0:n.length;return e?bn(n,1):[]}function de(n){return Un(zn(n,void 0,L),n+"")}var fe=1,se=4;function ce(n){return qn(n,fe|se)}var Cn=Object.prototype,he=Cn.hasOwnProperty,le=gn(function(n,e){n=Object(n);var r=-1,i=e.length,t=i>2?e[2]:void 0;for(t&&S(e[0],e[1],t)&&(i=1);++r<i;)for(var o=e[r],a=xn(o),u=-1,d=a.length;++u<d;){var f=a[u],c=n[f];(c===void 0||Hn(c,Cn[f])&&!he.call(n,f))&&(n[f]=o[f])}return n});const ve=le;function F(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}function pe(n){return function(e,r,i){var t=Object(e);if(!Jn(e)){var o=M(r);e=Kn(e),r=function(u){return o(t[u],u,t)}}var a=n(e,r,i);return a>-1?t[o?e[a]:a]:void 0}}var we=Math.max;function me(n,e,r){var i=n==null?0:n.length;if(!i)return-1;var t=r==null?0:ue(r);return t<0&&(t=we(i+t,0)),Wn(n,M(e),t)}var be=pe(me);const K=be;function ge(n,e){return n==null?n:Zn(n,En(e),xn)}function xe(n,e){return n&&kn(n,En(e))}function Ee(n,e){return n>e}function In(n,e){return n<e}function G(n,e){var r={};return e=M(e),kn(n,function(i,t,o){Qn(r,t,e(i,t,o))}),r}function Z(n,e,r){for(var i=-1,t=n.length;++i<t;){var o=n[i],a=e(o);if(a!=null&&(u===void 0?a===a&&!U(a):r(a,u)))var u=a,d=o}return d}function E(n){return n&&n.length?Z(n,J,Ee):void 0}function I(n){return n&&n.length?Z(n,J,In):void 0}function Q(n,e){return n&&n.length?Z(n,M(e),In):void 0}function ke(n,e,r,i){if(!an(n))return n;e=yn(e,n);for(var t=-1,o=e.length,a=o-1,u=n;u!=null&&++t<o;){var d=jn(e[t]),f=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return n;if(t!=a){var c=u[d];f=i?i(c,d,u):void 0,f===void 0&&(f=an(c)?c:ne(e[t+1])?[]:{})}Nn(u,d,f),u=u[d]}return n}function ye(n,e,r){for(var i=-1,t=e.length,o={};++i<t;){var a=e[i],u=Ln(n,a);r(u,a)&&ke(o,yn(a,n),u)}return o}function Ne(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}function Le(n,e){if(n!==e){var r=n!==void 0,i=n===null,t=n===n,o=U(n),a=e!==void 0,u=e===null,d=e===e,f=U(e);if(!u&&!f&&!o&&n>e||o&&a&&d&&!u&&!f||i&&a&&d||!r&&d||!t)return 1;if(!i&&!o&&!f&&n<e||f&&r&&t&&!i&&!o||u&&r&&t||!a&&t||!d)return-1}return 0}function _e(n,e,r){for(var i=-1,t=n.criteria,o=e.criteria,a=t.length,u=r.length;++i<a;){var d=Le(t[i],o[i]);if(d){if(i>=u)return d;var f=r[i];return d*(f=="desc"?-1:1)}}return n.index-e.index}function Ce(n,e,r){e.length?e=V(e,function(o){return _n(o)?function(a){return Ln(a,o.length===1?o[0]:o)}:o}):e=[J];var i=-1;e=V(e,ee(M));var t=re(n,function(o,a,u){var d=V(e,function(f){return f(o)});return{criteria:d,index:++i,value:o}});return Ne(t,function(o,a){return _e(o,a,r)})}function Ie(n,e){return ye(n,e,function(r,i){return ie(n,i)})}var Re=de(function(n,e){return n==null?{}:Ie(n,e)});const A=Re;var Te=Math.ceil,Me=Math.max;function Oe(n,e,r,i){for(var t=-1,o=Me(Te((e-n)/(r||1)),0),a=Array(o);o--;)a[i?o:++t]=n,n+=r;return a}function Pe(n){return function(e,r,i){return i&&typeof i!="number"&&S(e,r,i)&&(r=i=void 0),e=P(e),r===void 0?(r=e,e=0):r=P(r),i=i===void 0?e<r?1:-1:P(i),Oe(e,r,i,n)}}var Se=Pe();const N=Se;var Fe=gn(function(n,e){if(n==null)return[];var r=e.length;return r>1&&S(n,e[0],e[1])?e=[]:r>2&&S(e[0],e[1],e[2])&&(e=[e[0]]),Ce(n,bn(e,1),[])});const O=Fe;var Ae=0;function j(n){var e=++Ae;return te(n)+e}function Be(n,e,r){for(var i=-1,t=n.length,o=e.length,a={};++i<t;){var u=i<o?e[i]:void 0;r(a,n[i],u)}return a}function Ge(n,e){return Be(n||[],e||[],Nn)}class Ye{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return dn(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&dn(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,i=r._prev;i!==r;)e.push(JSON.stringify(i,Ve)),i=i._prev;return"["+e.join(", ")+"]"}}function dn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Ve(n,e){if(n!=="_next"&&n!=="_prev")return e}var $e=ae(1);function De(n,e){if(n.nodeCount()<=1)return[];var r=We(n,e||$e),i=qe(r.graph,r.buckets,r.zeroIdx);return L(m(i,function(t){return n.outEdges(t.v,t.w)}))}function qe(n,e,r){for(var i=[],t=e[e.length-1],o=e[0],a;n.nodeCount();){for(;a=o.dequeue();)$(n,e,r,a);for(;a=t.dequeue();)$(n,e,r,a);if(n.nodeCount()){for(var u=e.length-2;u>0;--u)if(a=e[u].dequeue(),a){i=i.concat($(n,e,r,a,!0));break}}}return i}function $(n,e,r,i,t){var o=t?[]:void 0;return s(n.inEdges(i.v),function(a){var u=n.edge(a),d=n.node(a.v);t&&o.push({v:a.v,w:a.w}),d.out-=u,H(e,r,d)}),s(n.outEdges(i.v),function(a){var u=n.edge(a),d=a.w,f=n.node(d);f.in-=u,H(e,r,f)}),n.removeNode(i.v),o}function We(n,e){var r=new x,i=0,t=0;s(n.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),s(n.edges(),function(u){var d=r.edge(u.v,u.w)||0,f=e(u),c=d+f;r.setEdge(u.v,u.w,c),t=Math.max(t,r.node(u.v).out+=f),i=Math.max(i,r.node(u.w).in+=f)});var o=N(t+i+3).map(function(){return new Ye}),a=i+1;return s(r.nodes(),function(u){H(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function H(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Xe(n){var e=n.graph().acyclicer==="greedy"?De(n,r(n)):Ue(n);s(e,function(i){var t=n.edge(i);n.removeEdge(i),t.forwardName=i.name,t.reversed=!0,n.setEdge(i.w,i.v,t,j("rev"))});function r(i){return function(t){return i.edge(t).weight}}}function Ue(n){var e=[],r={},i={};function t(o){w(i,o)||(i[o]=!0,r[o]=!0,s(n.outEdges(o),function(a){w(r,a.w)?e.push(a):t(a.w)}),delete r[o])}return s(n.nodes(),t),e}function ze(n){s(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var i=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,i)}})}function _(n,e,r,i){var t;do t=j(i);while(n.hasNode(t));return r.dummy=e,n.setNode(t,r),t}function He(n){var e=new x().setGraph(n.graph());return s(n.nodes(),function(r){e.setNode(r,n.node(r))}),s(n.edges(),function(r){var i=e.edge(r.v,r.w)||{weight:0,minlen:1},t=n.edge(r);e.setEdge(r.v,r.w,{weight:i.weight+t.weight,minlen:Math.max(i.minlen,t.minlen)})}),e}function Rn(n){var e=new x({multigraph:n.isMultigraph()}).setGraph(n.graph());return s(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),s(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function fn(n,e){var r=n.x,i=n.y,t=e.x-r,o=e.y-i,a=n.width/2,u=n.height/2;if(!t&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,f;return Math.abs(o)*a>Math.abs(t)*u?(o<0&&(u=-u),d=u*t/o,f=u):(t<0&&(a=-a),d=a,f=a*o/t),{x:r+d,y:i+f}}function Y(n){var e=m(N(Tn(n)+1),function(){return[]});return s(n.nodes(),function(r){var i=n.node(r),t=i.rank;g(t)||(e[t][i.order]=r)}),e}function Je(n){var e=I(m(n.nodes(),function(r){return n.node(r).rank}));s(n.nodes(),function(r){var i=n.node(r);w(i,"rank")&&(i.rank-=e)})}function Ke(n){var e=I(m(n.nodes(),function(o){return n.node(o).rank})),r=[];s(n.nodes(),function(o){var a=n.node(o).rank-e;r[a]||(r[a]=[]),r[a].push(o)});var i=0,t=n.graph().nodeRankFactor;s(r,function(o,a){g(o)&&a%t!==0?--i:i&&s(o,function(u){n.node(u).rank+=i})})}function sn(n,e,r,i){var t={width:0,height:0};return arguments.length>=4&&(t.rank=r,t.order=i),_(n,"border",t,e)}function Tn(n){return E(m(n.nodes(),function(e){var r=n.node(e).rank;if(!g(r))return r}))}function Ze(n,e){var r={lhs:[],rhs:[]};return s(n,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function Qe(n,e){var r=on();try{return e()}finally{n+""+(on()-r)}}function je(n,e){return e()}function nr(n){function e(r){var i=n.children(r),t=n.node(r);if(i.length&&s(i,e),w(t,"minRank")){t.borderLeft=[],t.borderRight=[];for(var o=t.minRank,a=t.maxRank+1;o<a;++o)cn(n,"borderLeft","_bl",r,t,o),cn(n,"borderRight","_br",r,t,o)}}s(n.children(),e)}function cn(n,e,r,i,t,o){var a={width:0,height:0,rank:o,borderType:e},u=t[e][o-1],d=_(n,"border",a,r);t[e][o]=d,n.setParent(d,i),u&&n.setEdge(u,d,{weight:1})}function er(n){var e=n.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Mn(n)}function rr(n){var e=n.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&ir(n),(e==="lr"||e==="rl")&&(tr(n),Mn(n))}function Mn(n){s(n.nodes(),function(e){hn(n.node(e))}),s(n.edges(),function(e){hn(n.edge(e))})}function hn(n){var e=n.width;n.width=n.height,n.height=e}function ir(n){s(n.nodes(),function(e){D(n.node(e))}),s(n.edges(),function(e){var r=n.edge(e);s(r.points,D),w(r,"y")&&D(r)})}function D(n){n.y=-n.y}function tr(n){s(n.nodes(),function(e){q(n.node(e))}),s(n.edges(),function(e){var r=n.edge(e);s(r.points,q),w(r,"x")&&q(r)})}function q(n){var e=n.x;n.x=n.y,n.y=e}function ar(n){n.graph().dummyChains=[],s(n.edges(),function(e){or(n,e)})}function or(n,e){var r=e.v,i=n.node(r).rank,t=e.w,o=n.node(t).rank,a=e.name,u=n.edge(e),d=u.labelRank;if(o!==i+1){n.removeEdge(e);var f,c,h;for(h=0,++i;i<o;++h,++i)u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:e,rank:i},f=_(n,"edge",c,"_d"),i===d&&(c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos),n.setEdge(r,f,{weight:u.weight},a),h===0&&n.graph().dummyChains.push(f),r=f;n.setEdge(r,t,{weight:u.weight},a)}}function ur(n){s(n.graph().dummyChains,function(e){var r=n.node(e),i=r.edgeLabel,t;for(n.setEdge(r.edgeObj,i);r.dummy;)t=n.successors(e)[0],n.removeNode(e),i.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=t,r=n.node(e)})}function nn(n){var e={};function r(i){var t=n.node(i);if(w(e,i))return t.rank;e[i]=!0;var o=I(m(n.outEdges(i),function(a){return r(a.w)-n.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),t.rank=o}s(n.sources(),r)}function R(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function On(n){var e=new x({directed:!1}),r=n.nodes()[0],i=n.nodeCount();e.setNode(r,{});for(var t,o;dr(e,n)<i;)t=fr(e,n),o=e.hasNode(t.v)?R(n,t):-R(n,t),sr(e,n,o);return e}function dr(n,e){function r(i){s(e.nodeEdges(i),function(t){var o=t.v,a=i===o?t.w:o;!n.hasNode(a)&&!R(e,t)&&(n.setNode(a,{}),n.setEdge(i,a,{}),r(a))})}return s(n.nodes(),r),n.nodeCount()}function fr(n,e){return Q(e.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return R(e,r)})}function sr(n,e,r){s(n.nodes(),function(i){e.node(i).rank+=r})}function cr(){}cr.prototype=new Error;function Pn(n,e,r){_n(e)||(e=[e]);var i=(n.isDirected()?n.successors:n.neighbors).bind(n),t=[],o={};return s(e,function(a){if(!n.hasNode(a))throw new Error("Graph does not have node: "+a);Sn(n,a,r==="post",o,i,t)}),t}function Sn(n,e,r,i,t,o){w(i,e)||(i[e]=!0,r||o.push(e),s(t(e),function(a){Sn(n,a,r,i,t,o)}),r&&o.push(e))}function hr(n,e){return Pn(n,e,"post")}function lr(n,e){return Pn(n,e,"pre")}k.initLowLimValues=rn;k.initCutValues=en;k.calcCutValue=Fn;k.leaveEdge=Bn;k.enterEdge=Gn;k.exchangeEdges=Yn;function k(n){n=He(n),nn(n);var e=On(n);rn(e),en(e,n);for(var r,i;r=Bn(e);)i=Gn(e,n,r),Yn(e,n,r,i)}function en(n,e){var r=hr(n,n.nodes());r=r.slice(0,r.length-1),s(r,function(i){vr(n,e,i)})}function vr(n,e,r){var i=n.node(r),t=i.parent;n.edge(r,t).cutvalue=Fn(n,e,r)}function Fn(n,e,r){var i=n.node(r),t=i.parent,o=!0,a=e.edge(r,t),u=0;return a||(o=!1,a=e.edge(t,r)),u=a.weight,s(e.nodeEdges(r),function(d){var f=d.v===r,c=f?d.w:d.v;if(c!==t){var h=f===o,l=e.edge(d).weight;if(u+=h?l:-l,wr(n,r,c)){var v=n.edge(r,c).cutvalue;u+=h?-v:v}}}),u}function rn(n,e){arguments.length<2&&(e=n.nodes()[0]),An(n,{},1,e)}function An(n,e,r,i,t){var o=r,a=n.node(i);return e[i]=!0,s(n.neighbors(i),function(u){w(e,u)||(r=An(n,e,r,u,i))}),a.low=o,a.lim=r++,t?a.parent=t:delete a.parent,r}function Bn(n){return K(n.edges(),function(e){return n.edge(e).cutvalue<0})}function Gn(n,e,r){var i=r.v,t=r.w;e.hasEdge(i,t)||(i=r.w,t=r.v);var o=n.node(i),a=n.node(t),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var f=T(e.edges(),function(c){return d===ln(n,n.node(c.v),u)&&d!==ln(n,n.node(c.w),u)});return Q(f,function(c){return R(e,c)})}function Yn(n,e,r,i){var t=r.v,o=r.w;n.removeEdge(t,o),n.setEdge(i.v,i.w,{}),rn(n),en(n,e),pr(n,e)}function pr(n,e){var r=K(n.nodes(),function(t){return!e.node(t).parent}),i=lr(n,r);i=i.slice(1),s(i,function(t){var o=n.node(t).parent,a=e.edge(t,o),u=!1;a||(a=e.edge(o,t),u=!0),e.node(t).rank=e.node(o).rank+(u?a.minlen:-a.minlen)})}function wr(n,e,r){return n.hasEdge(e,r)}function ln(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function mr(n){switch(n.graph().ranker){case"network-simplex":vn(n);break;case"tight-tree":gr(n);break;case"longest-path":br(n);break;default:vn(n)}}var br=nn;function gr(n){nn(n),On(n)}function vn(n){k(n)}function xr(n){var e=_(n,"root",{},"_root"),r=Er(n),i=E(y(r))-1,t=2*i+1;n.graph().nestingRoot=e,s(n.edges(),function(a){n.edge(a).minlen*=t});var o=kr(n)+1;s(n.children(),function(a){Vn(n,e,t,o,i,r,a)}),n.graph().nodeRankFactor=t}function Vn(n,e,r,i,t,o,a){var u=n.children(a);if(!u.length){a!==e&&n.setEdge(e,a,{weight:0,minlen:r});return}var d=sn(n,"_bt"),f=sn(n,"_bb"),c=n.node(a);n.setParent(d,a),c.borderTop=d,n.setParent(f,a),c.borderBottom=f,s(u,function(h){Vn(n,e,r,i,t,o,h);var l=n.node(h),v=l.borderTop?l.borderTop:h,p=l.borderBottom?l.borderBottom:h,b=l.borderTop?i:2*i,C=v!==p?1:t-o[a]+1;n.setEdge(d,v,{weight:b,minlen:C,nestingEdge:!0}),n.setEdge(p,f,{weight:b,minlen:C,nestingEdge:!0})}),n.parent(a)||n.setEdge(e,d,{weight:0,minlen:t+o[a]})}function Er(n){var e={};function r(i,t){var o=n.children(i);o&&o.length&&s(o,function(a){r(a,t+1)}),e[i]=t}return s(n.children(),function(i){r(i,1)}),e}function kr(n){return B(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function yr(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,s(n.edges(),function(r){var i=n.edge(r);i.nestingEdge&&n.removeEdge(r)})}function Nr(n,e,r){var i={},t;s(r,function(o){for(var a=n.parent(o),u,d;a;){if(u=n.parent(a),u?(d=i[u],i[u]=a):(d=t,t=a),d&&d!==a){e.setEdge(d,a);return}a=u}})}function Lr(n,e,r){var i=_r(n),t=new x({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(o){return n.node(o)});return s(n.nodes(),function(o){var a=n.node(o),u=n.parent(o);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(t.setNode(o),t.setParent(o,u||i),s(n[r](o),function(d){var f=d.v===o?d.w:d.v,c=t.edge(f,o),h=g(c)?0:c.weight;t.setEdge(f,o,{weight:n.edge(d).weight+h})}),w(a,"minRank")&&t.setNode(o,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),t}function _r(n){for(var e;n.hasNode(e=j("_root")););return e}function Cr(n,e){for(var r=0,i=1;i<e.length;++i)r+=Ir(n,e[i-1],e[i]);return r}function Ir(n,e,r){for(var i=Ge(r,m(r,function(f,c){return c})),t=L(m(e,function(f){return O(m(n.outEdges(f),function(c){return{pos:i[c.w],weight:n.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=m(new Array(a),function(){return 0}),d=0;return s(t.forEach(function(f){var c=f.pos+o;u[c]+=f.weight;for(var h=0;c>0;)c%2&&(h+=u[c+1]),c=c-1>>1,u[c]+=f.weight;d+=f.weight*h})),d}function Rr(n){var e={},r=T(n.nodes(),function(u){return!n.children(u).length}),i=E(m(r,function(u){return n.node(u).rank})),t=m(N(i+1),function(){return[]});function o(u){if(!w(e,u)){e[u]=!0;var d=n.node(u);t[d.rank].push(u),s(n.successors(u),o)}}var a=O(r,function(u){return n.node(u).rank});return s(a,o),t}function Tr(n,e){return m(e,function(r){var i=n.inEdges(r);if(i.length){var t=B(i,function(o,a){var u=n.edge(a),d=n.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:t.sum/t.weight,weight:t.weight}}else return{v:r}})}function Mr(n,e){var r={};s(n,function(t,o){var a=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:o};g(t.barycenter)||(a.barycenter=t.barycenter,a.weight=t.weight)}),s(e.edges(),function(t){var o=r[t.v],a=r[t.w];!g(o)&&!g(a)&&(a.indegree++,o.out.push(r[t.w]))});var i=T(r,function(t){return!t.indegree});return Or(i)}function Or(n){var e=[];function r(o){return function(a){a.merged||(g(a.barycenter)||g(o.barycenter)||a.barycenter>=o.barycenter)&&Pr(o,a)}}function i(o){return function(a){a.in.push(o),--a.indegree===0&&n.push(a)}}for(;n.length;){var t=n.pop();e.push(t),s(t.in.reverse(),r(t)),s(t.out,i(t))}return m(T(e,function(o){return!o.merged}),function(o){return A(o,["vs","i","barycenter","weight"])})}function Pr(n,e){var r=0,i=0;n.weight&&(r+=n.barycenter*n.weight,i+=n.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/i,n.weight=i,n.i=Math.min(e.i,n.i),e.merged=!0}function Sr(n,e){var r=Ze(n,function(c){return w(c,"barycenter")}),i=r.lhs,t=O(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;i.sort(Fr(!!e)),d=pn(o,t,d),s(i,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=pn(o,t,d)});var f={vs:L(o)};return u&&(f.barycenter=a/u,f.weight=u),f}function pn(n,e,r){for(var i;e.length&&(i=F(e)).i<=r;)e.pop(),n.push(i.vs),r++;return r}function Fr(n){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:n?r.i-e.i:e.i-r.i}}function $n(n,e,r,i){var t=n.children(e),o=n.node(e),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(t=T(t,function(p){return p!==a&&p!==u}));var f=Tr(n,t);s(f,function(p){if(n.children(p.v).length){var b=$n(n,p.v,r,i);d[p.v]=b,w(b,"barycenter")&&Br(p,b)}});var c=Mr(f,r);Ar(c,d);var h=Sr(c,i);if(a&&(h.vs=L([a,h.vs,u]),n.predecessors(a).length)){var l=n.node(n.predecessors(a)[0]),v=n.node(n.predecessors(u)[0]);w(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h}function Ar(n,e){s(n,function(r){r.vs=L(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function Br(n,e){g(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function Gr(n){var e=Tn(n),r=wn(n,N(1,e+1),"inEdges"),i=wn(n,N(e-1,-1,-1),"outEdges"),t=Rr(n);mn(n,t);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Yr(u%2?r:i,u%4>=2),t=Y(n);var f=Cr(n,t);f<o&&(d=0,a=ce(t),o=f)}mn(n,a)}function wn(n,e,r){return m(e,function(i){return Lr(n,i,r)})}function Yr(n,e){var r=new x;s(n,function(i){var t=i.graph().root,o=$n(i,t,r,e);s(o.vs,function(a,u){i.node(a).order=u}),Nr(i,r,o.vs)})}function mn(n,e){s(e,function(r){s(r,function(i,t){n.node(i).order=t})})}function Vr(n){var e=Dr(n);s(n.graph().dummyChains,function(r){for(var i=n.node(r),t=i.edgeObj,o=$r(n,e,t.v,t.w),a=o.path,u=o.lca,d=0,f=a[d],c=!0;r!==t.w;){if(i=n.node(r),c){for(;(f=a[d])!==u&&n.node(f).maxRank<i.rank;)d++;f===u&&(c=!1)}if(!c){for(;d<a.length-1&&n.node(f=a[d+1]).minRank<=i.rank;)d++;f=a[d]}n.setParent(r,f),r=n.successors(r)[0]}})}function $r(n,e,r,i){var t=[],o=[],a=Math.min(e[r].low,e[i].low),u=Math.max(e[r].lim,e[i].lim),d,f;d=r;do d=n.parent(d),t.push(d);while(d&&(e[d].low>a||u>e[d].lim));for(f=d,d=i;(d=n.parent(d))!==f;)o.push(d);return{path:t.concat(o.reverse()),lca:f}}function Dr(n){var e={},r=0;function i(t){var o=r;s(n.children(t),i),e[t]={low:o,lim:r++}}return s(n.children(),i),e}function qr(n,e){var r={};function i(t,o){var a=0,u=0,d=t.length,f=F(o);return s(o,function(c,h){var l=Xr(n,c),v=l?n.node(l).order:d;(l||c===f)&&(s(o.slice(u,h+1),function(p){s(n.predecessors(p),function(b){var C=n.node(b),tn=C.order;(tn<a||v<tn)&&!(C.dummy&&n.node(p).dummy)&&Dn(r,b,p)})}),u=h+1,a=v)}),o}return B(e,i),r}function Wr(n,e){var r={};function i(o,a,u,d,f){var c;s(N(a,u),function(h){c=o[h],n.node(c).dummy&&s(n.predecessors(c),function(l){var v=n.node(l);v.dummy&&(v.order<d||v.order>f)&&Dn(r,l,c)})})}function t(o,a){var u=-1,d,f=0;return s(a,function(c,h){if(n.node(c).dummy==="border"){var l=n.predecessors(c);l.length&&(d=n.node(l[0]).order,i(a,f,h,u,d),f=h,u=d)}i(a,f,a.length,d,o.length)}),a}return B(e,t),r}function Xr(n,e){if(n.node(e).dummy)return K(n.predecessors(e),function(r){return n.node(r).dummy})}function Dn(n,e,r){if(e>r){var i=e;e=r,r=i}var t=n[e];t||(n[e]=t={}),t[r]=!0}function Ur(n,e,r){if(e>r){var i=e;e=r,r=i}return w(n[e],r)}function zr(n,e,r,i){var t={},o={},a={};return s(e,function(u){s(u,function(d,f){t[d]=d,o[d]=d,a[d]=f})}),s(e,function(u){var d=-1;s(u,function(f){var c=i(f);if(c.length){c=O(c,function(b){return a[b]});for(var h=(c.length-1)/2,l=Math.floor(h),v=Math.ceil(h);l<=v;++l){var p=c[l];o[f]===f&&d<a[p]&&!Ur(r,f,p)&&(o[p]=f,o[f]=t[f]=t[p],d=a[p])}}})}),{root:t,align:o}}function Hr(n,e,r,i,t){var o={},a=Jr(n,e,r,t),u=t?"borderLeft":"borderRight";function d(h,l){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?h(p):(b[p]=!0,v.push(p),v=v.concat(l(p))),p=v.pop()}function f(h){o[h]=a.inEdges(h).reduce(function(l,v){return Math.max(l,o[v.v]+a.edge(v))},0)}function c(h){var l=a.outEdges(h).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=n.node(h);l!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[h]=Math.max(o[h],l))}return d(f,a.predecessors.bind(a)),d(c,a.successors.bind(a)),s(i,function(h){o[h]=o[r[h]]}),o}function Jr(n,e,r,i){var t=new x,o=n.graph(),a=ni(o.nodesep,o.edgesep,i);return s(e,function(u){var d;s(u,function(f){var c=r[f];if(t.setNode(c),d){var h=r[d],l=t.edge(h,c);t.setEdge(h,c,Math.max(a(n,f,d),l||0))}d=f})}),t}function Kr(n,e){return Q(y(e),function(r){var i=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY;return ge(r,function(o,a){var u=ei(n,a)/2;i=Math.max(o+u,i),t=Math.min(o-u,t)}),i-t})}function Zr(n,e){var r=y(e),i=I(r),t=E(r);s(["u","d"],function(o){s(["l","r"],function(a){var u=o+a,d=n[u],f;if(d!==e){var c=y(d);f=a==="l"?i-I(c):t-E(c),f&&(n[u]=G(d,function(h){return h+f}))}})})}function Qr(n,e){return G(n.ul,function(r,i){if(e)return n[e.toLowerCase()][i];var t=O(m(n,i));return(t[1]+t[2])/2})}function jr(n){var e=Y(n),r=z(qr(n,e),Wr(n,e)),i={},t;s(["u","d"],function(a){t=a==="u"?e:y(e).reverse(),s(["l","r"],function(u){u==="r"&&(t=m(t,function(h){return y(h).reverse()}));var d=(a==="u"?n.predecessors:n.successors).bind(n),f=zr(n,t,r,d),c=Hr(n,t,f.root,f.align,u==="r");u==="r"&&(c=G(c,function(h){return-h})),i[a+u]=c})});var o=Kr(n,i);return Zr(i,o),Qr(i,n.graph().align)}function ni(n,e,r){return function(i,t,o){var a=i.node(t),u=i.node(o),d=0,f;if(d+=a.width/2,w(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":f=-a.width/2;break;case"r":f=a.width/2;break}if(f&&(d+=r?f:-f),f=0,d+=(a.dummy?e:n)/2,d+=(u.dummy?e:n)/2,d+=u.width/2,w(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":f=u.width/2;break;case"r":f=-u.width/2;break}return f&&(d+=r?f:-f),f=0,d}}function ei(n,e){return n.node(e).width}function ri(n){n=Rn(n),ii(n),xe(jr(n),function(e,r){n.node(r).x=e})}function ii(n){var e=Y(n),r=n.graph().ranksep,i=0;s(e,function(t){var o=E(m(t,function(a){return n.node(a).height}));s(t,function(a){n.node(a).y=i+o/2}),i+=o+r})}function Ri(n,e){var r=e&&e.debugTiming?Qe:je;r("layout",function(){var i=r(" buildLayoutGraph",function(){return vi(n)});r(" runLayout",function(){ti(i,r)}),r(" updateInputGraph",function(){ai(n,i)})})}function ti(n,e){e(" makeSpaceForEdgeLabels",function(){pi(n)}),e(" removeSelfEdges",function(){Ni(n)}),e(" acyclic",function(){Xe(n)}),e(" nestingGraph.run",function(){xr(n)}),e(" rank",function(){mr(Rn(n))}),e(" injectEdgeLabelProxies",function(){wi(n)}),e(" removeEmptyRanks",function(){Ke(n)}),e(" nestingGraph.cleanup",function(){yr(n)}),e(" normalizeRanks",function(){Je(n)}),e(" assignRankMinMax",function(){mi(n)}),e(" removeEdgeLabelProxies",function(){bi(n)}),e(" normalize.run",function(){ar(n)}),e(" parentDummyChains",function(){Vr(n)}),e(" addBorderSegments",function(){nr(n)}),e(" order",function(){Gr(n)}),e(" insertSelfEdges",function(){Li(n)}),e(" adjustCoordinateSystem",function(){er(n)}),e(" position",function(){ri(n)}),e(" positionSelfEdges",function(){_i(n)}),e(" removeBorderNodes",function(){yi(n)}),e(" normalize.undo",function(){ur(n)}),e(" fixupEdgeLabelCoords",function(){Ei(n)}),e(" undoCoordinateSystem",function(){rr(n)}),e(" translateGraph",function(){gi(n)}),e(" assignNodeIntersects",function(){xi(n)}),e(" reversePoints",function(){ki(n)}),e(" acyclic.undo",function(){ze(n)})}function ai(n,e){s(n.nodes(),function(r){var i=n.node(r),t=e.node(r);i&&(i.x=t.x,i.y=t.y,e.children(r).length&&(i.width=t.width,i.height=t.height))}),s(n.edges(),function(r){var i=n.edge(r),t=e.edge(r);i.points=t.points,w(t,"x")&&(i.x=t.x,i.y=t.y)}),n.graph().width=e.graph().width,n.graph().height=e.graph().height}var oi=["nodesep","edgesep","ranksep","marginx","marginy"],ui={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},di=["acyclicer","ranker","rankdir","align"],fi=["width","height"],si={width:0,height:0},ci=["minlen","weight","width","height","labeloffset"],hi={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},li=["labelpos"];function vi(n){var e=new x({multigraph:!0,compound:!0}),r=X(n.graph());return e.setGraph(z({},ui,W(r,oi),A(r,di))),s(n.nodes(),function(i){var t=X(n.node(i));e.setNode(i,ve(W(t,fi),si)),e.setParent(i,n.parent(i))}),s(n.edges(),function(i){var t=X(n.edge(i));e.setEdge(i,z({},hi,W(t,ci),A(t,li)))}),e}function pi(n){var e=n.graph();e.ranksep/=2,s(n.edges(),function(r){var i=n.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function wi(n){s(n.edges(),function(e){var r=n.edge(e);if(r.width&&r.height){var i=n.node(e.v),t=n.node(e.w),o={rank:(t.rank-i.rank)/2+i.rank,e};_(n,"edge-proxy",o,"_ep")}})}function mi(n){var e=0;s(n.nodes(),function(r){var i=n.node(r);i.borderTop&&(i.minRank=n.node(i.borderTop).rank,i.maxRank=n.node(i.borderBottom).rank,e=E(e,i.maxRank))}),n.graph().maxRank=e}function bi(n){s(n.nodes(),function(e){var r=n.node(e);r.dummy==="edge-proxy"&&(n.edge(r.e).labelRank=r.rank,n.removeNode(e))})}function gi(n){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,t=0,o=n.graph(),a=o.marginx||0,u=o.marginy||0;function d(f){var c=f.x,h=f.y,l=f.width,v=f.height;e=Math.min(e,c-l/2),r=Math.max(r,c+l/2),i=Math.min(i,h-v/2),t=Math.max(t,h+v/2)}s(n.nodes(),function(f){d(n.node(f))}),s(n.edges(),function(f){var c=n.edge(f);w(c,"x")&&d(c)}),e-=a,i-=u,s(n.nodes(),function(f){var c=n.node(f);c.x-=e,c.y-=i}),s(n.edges(),function(f){var c=n.edge(f);s(c.points,function(h){h.x-=e,h.y-=i}),w(c,"x")&&(c.x-=e),w(c,"y")&&(c.y-=i)}),o.width=r-e+a,o.height=t-i+u}function xi(n){s(n.edges(),function(e){var r=n.edge(e),i=n.node(e.v),t=n.node(e.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=t,a=i),r.points.unshift(fn(i,o)),r.points.push(fn(t,a))})}function Ei(n){s(n.edges(),function(e){var r=n.edge(e);if(w(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function ki(n){s(n.edges(),function(e){var r=n.edge(e);r.reversed&&r.points.reverse()})}function yi(n){s(n.nodes(),function(e){if(n.children(e).length){var r=n.node(e),i=n.node(r.borderTop),t=n.node(r.borderBottom),o=n.node(F(r.borderLeft)),a=n.node(F(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(t.y-i.y),r.x=o.x+r.width/2,r.y=i.y+r.height/2}}),s(n.nodes(),function(e){n.node(e).dummy==="border"&&n.removeNode(e)})}function Ni(n){s(n.edges(),function(e){if(e.v===e.w){var r=n.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:n.edge(e)}),n.removeEdge(e)}})}function Li(n){var e=Y(n);s(e,function(r){var i=0;s(r,function(t,o){var a=n.node(t);a.order=o+i,s(a.selfEdges,function(u){_(n,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++i,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function _i(n){s(n.nodes(),function(e){var r=n.node(e);if(r.dummy==="selfedge"){var i=n.node(r.e.v),t=i.x+i.width/2,o=i.y,a=r.x-t,u=i.height/2;n.setEdge(r.e,r.label),n.removeNode(e),r.label.points=[{x:t+2*a/3,y:o-u},{x:t+5*a/6,y:o-u},{x:t+a,y:o},{x:t+5*a/6,y:o+u},{x:t+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function W(n,e){return G(A(n,e),Number)}function X(n){var e={};return s(n,function(r,i){e[i.toLowerCase()]=r}),e}export{ve as d,Ri as l,A as p,N as r,j as u};
1
+ import{b as bn,a as qn,c as Wn,G as x,h as w,f as T,v as y,r as B}from"./graph-ee552267.js";import{$ as Xn,a0 as Un,a1 as zn,U as gn,a2 as S,s as xn,a3 as Hn,i as Jn,M,q as Kn,a4 as Zn,a5 as En,a6 as kn,a7 as Qn,a8 as U,a9 as J,C as an,aa as yn,ab as jn,ac as ne,I as Nn,ad as Ln,O as V,a as _n,B as ee,ae as re,af as ie,ag as te,ah as m,n as s,W as ae,ai as on,Y as g,l as z}from"./index-0d406b53.js";var un=1/0,oe=17976931348623157e292;function P(n){if(!n)return n===0?n:0;if(n=Xn(n),n===un||n===-un){var e=n<0?-1:1;return e*oe}return n===n?n:0}function ue(n){var e=P(n),r=e%1;return e===e?r?e-r:e:0}function L(n){var e=n==null?0:n.length;return e?bn(n,1):[]}function de(n){return Un(zn(n,void 0,L),n+"")}var fe=1,se=4;function ce(n){return qn(n,fe|se)}var Cn=Object.prototype,he=Cn.hasOwnProperty,le=gn(function(n,e){n=Object(n);var r=-1,i=e.length,t=i>2?e[2]:void 0;for(t&&S(e[0],e[1],t)&&(i=1);++r<i;)for(var o=e[r],a=xn(o),u=-1,d=a.length;++u<d;){var f=a[u],c=n[f];(c===void 0||Hn(c,Cn[f])&&!he.call(n,f))&&(n[f]=o[f])}return n});const ve=le;function F(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}function pe(n){return function(e,r,i){var t=Object(e);if(!Jn(e)){var o=M(r);e=Kn(e),r=function(u){return o(t[u],u,t)}}var a=n(e,r,i);return a>-1?t[o?e[a]:a]:void 0}}var we=Math.max;function me(n,e,r){var i=n==null?0:n.length;if(!i)return-1;var t=r==null?0:ue(r);return t<0&&(t=we(i+t,0)),Wn(n,M(e),t)}var be=pe(me);const K=be;function ge(n,e){return n==null?n:Zn(n,En(e),xn)}function xe(n,e){return n&&kn(n,En(e))}function Ee(n,e){return n>e}function In(n,e){return n<e}function G(n,e){var r={};return e=M(e),kn(n,function(i,t,o){Qn(r,t,e(i,t,o))}),r}function Z(n,e,r){for(var i=-1,t=n.length;++i<t;){var o=n[i],a=e(o);if(a!=null&&(u===void 0?a===a&&!U(a):r(a,u)))var u=a,d=o}return d}function E(n){return n&&n.length?Z(n,J,Ee):void 0}function I(n){return n&&n.length?Z(n,J,In):void 0}function Q(n,e){return n&&n.length?Z(n,M(e),In):void 0}function ke(n,e,r,i){if(!an(n))return n;e=yn(e,n);for(var t=-1,o=e.length,a=o-1,u=n;u!=null&&++t<o;){var d=jn(e[t]),f=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return n;if(t!=a){var c=u[d];f=i?i(c,d,u):void 0,f===void 0&&(f=an(c)?c:ne(e[t+1])?[]:{})}Nn(u,d,f),u=u[d]}return n}function ye(n,e,r){for(var i=-1,t=e.length,o={};++i<t;){var a=e[i],u=Ln(n,a);r(u,a)&&ke(o,yn(a,n),u)}return o}function Ne(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}function Le(n,e){if(n!==e){var r=n!==void 0,i=n===null,t=n===n,o=U(n),a=e!==void 0,u=e===null,d=e===e,f=U(e);if(!u&&!f&&!o&&n>e||o&&a&&d&&!u&&!f||i&&a&&d||!r&&d||!t)return 1;if(!i&&!o&&!f&&n<e||f&&r&&t&&!i&&!o||u&&r&&t||!a&&t||!d)return-1}return 0}function _e(n,e,r){for(var i=-1,t=n.criteria,o=e.criteria,a=t.length,u=r.length;++i<a;){var d=Le(t[i],o[i]);if(d){if(i>=u)return d;var f=r[i];return d*(f=="desc"?-1:1)}}return n.index-e.index}function Ce(n,e,r){e.length?e=V(e,function(o){return _n(o)?function(a){return Ln(a,o.length===1?o[0]:o)}:o}):e=[J];var i=-1;e=V(e,ee(M));var t=re(n,function(o,a,u){var d=V(e,function(f){return f(o)});return{criteria:d,index:++i,value:o}});return Ne(t,function(o,a){return _e(o,a,r)})}function Ie(n,e){return ye(n,e,function(r,i){return ie(n,i)})}var Re=de(function(n,e){return n==null?{}:Ie(n,e)});const A=Re;var Te=Math.ceil,Me=Math.max;function Oe(n,e,r,i){for(var t=-1,o=Me(Te((e-n)/(r||1)),0),a=Array(o);o--;)a[i?o:++t]=n,n+=r;return a}function Pe(n){return function(e,r,i){return i&&typeof i!="number"&&S(e,r,i)&&(r=i=void 0),e=P(e),r===void 0?(r=e,e=0):r=P(r),i=i===void 0?e<r?1:-1:P(i),Oe(e,r,i,n)}}var Se=Pe();const N=Se;var Fe=gn(function(n,e){if(n==null)return[];var r=e.length;return r>1&&S(n,e[0],e[1])?e=[]:r>2&&S(e[0],e[1],e[2])&&(e=[e[0]]),Ce(n,bn(e,1),[])});const O=Fe;var Ae=0;function j(n){var e=++Ae;return te(n)+e}function Be(n,e,r){for(var i=-1,t=n.length,o=e.length,a={};++i<t;){var u=i<o?e[i]:void 0;r(a,n[i],u)}return a}function Ge(n,e){return Be(n||[],e||[],Nn)}class Ye{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return dn(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&dn(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,i=r._prev;i!==r;)e.push(JSON.stringify(i,Ve)),i=i._prev;return"["+e.join(", ")+"]"}}function dn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Ve(n,e){if(n!=="_next"&&n!=="_prev")return e}var $e=ae(1);function De(n,e){if(n.nodeCount()<=1)return[];var r=We(n,e||$e),i=qe(r.graph,r.buckets,r.zeroIdx);return L(m(i,function(t){return n.outEdges(t.v,t.w)}))}function qe(n,e,r){for(var i=[],t=e[e.length-1],o=e[0],a;n.nodeCount();){for(;a=o.dequeue();)$(n,e,r,a);for(;a=t.dequeue();)$(n,e,r,a);if(n.nodeCount()){for(var u=e.length-2;u>0;--u)if(a=e[u].dequeue(),a){i=i.concat($(n,e,r,a,!0));break}}}return i}function $(n,e,r,i,t){var o=t?[]:void 0;return s(n.inEdges(i.v),function(a){var u=n.edge(a),d=n.node(a.v);t&&o.push({v:a.v,w:a.w}),d.out-=u,H(e,r,d)}),s(n.outEdges(i.v),function(a){var u=n.edge(a),d=a.w,f=n.node(d);f.in-=u,H(e,r,f)}),n.removeNode(i.v),o}function We(n,e){var r=new x,i=0,t=0;s(n.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),s(n.edges(),function(u){var d=r.edge(u.v,u.w)||0,f=e(u),c=d+f;r.setEdge(u.v,u.w,c),t=Math.max(t,r.node(u.v).out+=f),i=Math.max(i,r.node(u.w).in+=f)});var o=N(t+i+3).map(function(){return new Ye}),a=i+1;return s(r.nodes(),function(u){H(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function H(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Xe(n){var e=n.graph().acyclicer==="greedy"?De(n,r(n)):Ue(n);s(e,function(i){var t=n.edge(i);n.removeEdge(i),t.forwardName=i.name,t.reversed=!0,n.setEdge(i.w,i.v,t,j("rev"))});function r(i){return function(t){return i.edge(t).weight}}}function Ue(n){var e=[],r={},i={};function t(o){w(i,o)||(i[o]=!0,r[o]=!0,s(n.outEdges(o),function(a){w(r,a.w)?e.push(a):t(a.w)}),delete r[o])}return s(n.nodes(),t),e}function ze(n){s(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var i=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,i)}})}function _(n,e,r,i){var t;do t=j(i);while(n.hasNode(t));return r.dummy=e,n.setNode(t,r),t}function He(n){var e=new x().setGraph(n.graph());return s(n.nodes(),function(r){e.setNode(r,n.node(r))}),s(n.edges(),function(r){var i=e.edge(r.v,r.w)||{weight:0,minlen:1},t=n.edge(r);e.setEdge(r.v,r.w,{weight:i.weight+t.weight,minlen:Math.max(i.minlen,t.minlen)})}),e}function Rn(n){var e=new x({multigraph:n.isMultigraph()}).setGraph(n.graph());return s(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),s(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function fn(n,e){var r=n.x,i=n.y,t=e.x-r,o=e.y-i,a=n.width/2,u=n.height/2;if(!t&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,f;return Math.abs(o)*a>Math.abs(t)*u?(o<0&&(u=-u),d=u*t/o,f=u):(t<0&&(a=-a),d=a,f=a*o/t),{x:r+d,y:i+f}}function Y(n){var e=m(N(Tn(n)+1),function(){return[]});return s(n.nodes(),function(r){var i=n.node(r),t=i.rank;g(t)||(e[t][i.order]=r)}),e}function Je(n){var e=I(m(n.nodes(),function(r){return n.node(r).rank}));s(n.nodes(),function(r){var i=n.node(r);w(i,"rank")&&(i.rank-=e)})}function Ke(n){var e=I(m(n.nodes(),function(o){return n.node(o).rank})),r=[];s(n.nodes(),function(o){var a=n.node(o).rank-e;r[a]||(r[a]=[]),r[a].push(o)});var i=0,t=n.graph().nodeRankFactor;s(r,function(o,a){g(o)&&a%t!==0?--i:i&&s(o,function(u){n.node(u).rank+=i})})}function sn(n,e,r,i){var t={width:0,height:0};return arguments.length>=4&&(t.rank=r,t.order=i),_(n,"border",t,e)}function Tn(n){return E(m(n.nodes(),function(e){var r=n.node(e).rank;if(!g(r))return r}))}function Ze(n,e){var r={lhs:[],rhs:[]};return s(n,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function Qe(n,e){var r=on();try{return e()}finally{n+""+(on()-r)}}function je(n,e){return e()}function nr(n){function e(r){var i=n.children(r),t=n.node(r);if(i.length&&s(i,e),w(t,"minRank")){t.borderLeft=[],t.borderRight=[];for(var o=t.minRank,a=t.maxRank+1;o<a;++o)cn(n,"borderLeft","_bl",r,t,o),cn(n,"borderRight","_br",r,t,o)}}s(n.children(),e)}function cn(n,e,r,i,t,o){var a={width:0,height:0,rank:o,borderType:e},u=t[e][o-1],d=_(n,"border",a,r);t[e][o]=d,n.setParent(d,i),u&&n.setEdge(u,d,{weight:1})}function er(n){var e=n.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Mn(n)}function rr(n){var e=n.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&ir(n),(e==="lr"||e==="rl")&&(tr(n),Mn(n))}function Mn(n){s(n.nodes(),function(e){hn(n.node(e))}),s(n.edges(),function(e){hn(n.edge(e))})}function hn(n){var e=n.width;n.width=n.height,n.height=e}function ir(n){s(n.nodes(),function(e){D(n.node(e))}),s(n.edges(),function(e){var r=n.edge(e);s(r.points,D),w(r,"y")&&D(r)})}function D(n){n.y=-n.y}function tr(n){s(n.nodes(),function(e){q(n.node(e))}),s(n.edges(),function(e){var r=n.edge(e);s(r.points,q),w(r,"x")&&q(r)})}function q(n){var e=n.x;n.x=n.y,n.y=e}function ar(n){n.graph().dummyChains=[],s(n.edges(),function(e){or(n,e)})}function or(n,e){var r=e.v,i=n.node(r).rank,t=e.w,o=n.node(t).rank,a=e.name,u=n.edge(e),d=u.labelRank;if(o!==i+1){n.removeEdge(e);var f,c,h;for(h=0,++i;i<o;++h,++i)u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:e,rank:i},f=_(n,"edge",c,"_d"),i===d&&(c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos),n.setEdge(r,f,{weight:u.weight},a),h===0&&n.graph().dummyChains.push(f),r=f;n.setEdge(r,t,{weight:u.weight},a)}}function ur(n){s(n.graph().dummyChains,function(e){var r=n.node(e),i=r.edgeLabel,t;for(n.setEdge(r.edgeObj,i);r.dummy;)t=n.successors(e)[0],n.removeNode(e),i.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=t,r=n.node(e)})}function nn(n){var e={};function r(i){var t=n.node(i);if(w(e,i))return t.rank;e[i]=!0;var o=I(m(n.outEdges(i),function(a){return r(a.w)-n.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),t.rank=o}s(n.sources(),r)}function R(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function On(n){var e=new x({directed:!1}),r=n.nodes()[0],i=n.nodeCount();e.setNode(r,{});for(var t,o;dr(e,n)<i;)t=fr(e,n),o=e.hasNode(t.v)?R(n,t):-R(n,t),sr(e,n,o);return e}function dr(n,e){function r(i){s(e.nodeEdges(i),function(t){var o=t.v,a=i===o?t.w:o;!n.hasNode(a)&&!R(e,t)&&(n.setNode(a,{}),n.setEdge(i,a,{}),r(a))})}return s(n.nodes(),r),n.nodeCount()}function fr(n,e){return Q(e.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return R(e,r)})}function sr(n,e,r){s(n.nodes(),function(i){e.node(i).rank+=r})}function cr(){}cr.prototype=new Error;function Pn(n,e,r){_n(e)||(e=[e]);var i=(n.isDirected()?n.successors:n.neighbors).bind(n),t=[],o={};return s(e,function(a){if(!n.hasNode(a))throw new Error("Graph does not have node: "+a);Sn(n,a,r==="post",o,i,t)}),t}function Sn(n,e,r,i,t,o){w(i,e)||(i[e]=!0,r||o.push(e),s(t(e),function(a){Sn(n,a,r,i,t,o)}),r&&o.push(e))}function hr(n,e){return Pn(n,e,"post")}function lr(n,e){return Pn(n,e,"pre")}k.initLowLimValues=rn;k.initCutValues=en;k.calcCutValue=Fn;k.leaveEdge=Bn;k.enterEdge=Gn;k.exchangeEdges=Yn;function k(n){n=He(n),nn(n);var e=On(n);rn(e),en(e,n);for(var r,i;r=Bn(e);)i=Gn(e,n,r),Yn(e,n,r,i)}function en(n,e){var r=hr(n,n.nodes());r=r.slice(0,r.length-1),s(r,function(i){vr(n,e,i)})}function vr(n,e,r){var i=n.node(r),t=i.parent;n.edge(r,t).cutvalue=Fn(n,e,r)}function Fn(n,e,r){var i=n.node(r),t=i.parent,o=!0,a=e.edge(r,t),u=0;return a||(o=!1,a=e.edge(t,r)),u=a.weight,s(e.nodeEdges(r),function(d){var f=d.v===r,c=f?d.w:d.v;if(c!==t){var h=f===o,l=e.edge(d).weight;if(u+=h?l:-l,wr(n,r,c)){var v=n.edge(r,c).cutvalue;u+=h?-v:v}}}),u}function rn(n,e){arguments.length<2&&(e=n.nodes()[0]),An(n,{},1,e)}function An(n,e,r,i,t){var o=r,a=n.node(i);return e[i]=!0,s(n.neighbors(i),function(u){w(e,u)||(r=An(n,e,r,u,i))}),a.low=o,a.lim=r++,t?a.parent=t:delete a.parent,r}function Bn(n){return K(n.edges(),function(e){return n.edge(e).cutvalue<0})}function Gn(n,e,r){var i=r.v,t=r.w;e.hasEdge(i,t)||(i=r.w,t=r.v);var o=n.node(i),a=n.node(t),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var f=T(e.edges(),function(c){return d===ln(n,n.node(c.v),u)&&d!==ln(n,n.node(c.w),u)});return Q(f,function(c){return R(e,c)})}function Yn(n,e,r,i){var t=r.v,o=r.w;n.removeEdge(t,o),n.setEdge(i.v,i.w,{}),rn(n),en(n,e),pr(n,e)}function pr(n,e){var r=K(n.nodes(),function(t){return!e.node(t).parent}),i=lr(n,r);i=i.slice(1),s(i,function(t){var o=n.node(t).parent,a=e.edge(t,o),u=!1;a||(a=e.edge(o,t),u=!0),e.node(t).rank=e.node(o).rank+(u?a.minlen:-a.minlen)})}function wr(n,e,r){return n.hasEdge(e,r)}function ln(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function mr(n){switch(n.graph().ranker){case"network-simplex":vn(n);break;case"tight-tree":gr(n);break;case"longest-path":br(n);break;default:vn(n)}}var br=nn;function gr(n){nn(n),On(n)}function vn(n){k(n)}function xr(n){var e=_(n,"root",{},"_root"),r=Er(n),i=E(y(r))-1,t=2*i+1;n.graph().nestingRoot=e,s(n.edges(),function(a){n.edge(a).minlen*=t});var o=kr(n)+1;s(n.children(),function(a){Vn(n,e,t,o,i,r,a)}),n.graph().nodeRankFactor=t}function Vn(n,e,r,i,t,o,a){var u=n.children(a);if(!u.length){a!==e&&n.setEdge(e,a,{weight:0,minlen:r});return}var d=sn(n,"_bt"),f=sn(n,"_bb"),c=n.node(a);n.setParent(d,a),c.borderTop=d,n.setParent(f,a),c.borderBottom=f,s(u,function(h){Vn(n,e,r,i,t,o,h);var l=n.node(h),v=l.borderTop?l.borderTop:h,p=l.borderBottom?l.borderBottom:h,b=l.borderTop?i:2*i,C=v!==p?1:t-o[a]+1;n.setEdge(d,v,{weight:b,minlen:C,nestingEdge:!0}),n.setEdge(p,f,{weight:b,minlen:C,nestingEdge:!0})}),n.parent(a)||n.setEdge(e,d,{weight:0,minlen:t+o[a]})}function Er(n){var e={};function r(i,t){var o=n.children(i);o&&o.length&&s(o,function(a){r(a,t+1)}),e[i]=t}return s(n.children(),function(i){r(i,1)}),e}function kr(n){return B(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function yr(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,s(n.edges(),function(r){var i=n.edge(r);i.nestingEdge&&n.removeEdge(r)})}function Nr(n,e,r){var i={},t;s(r,function(o){for(var a=n.parent(o),u,d;a;){if(u=n.parent(a),u?(d=i[u],i[u]=a):(d=t,t=a),d&&d!==a){e.setEdge(d,a);return}a=u}})}function Lr(n,e,r){var i=_r(n),t=new x({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(o){return n.node(o)});return s(n.nodes(),function(o){var a=n.node(o),u=n.parent(o);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(t.setNode(o),t.setParent(o,u||i),s(n[r](o),function(d){var f=d.v===o?d.w:d.v,c=t.edge(f,o),h=g(c)?0:c.weight;t.setEdge(f,o,{weight:n.edge(d).weight+h})}),w(a,"minRank")&&t.setNode(o,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),t}function _r(n){for(var e;n.hasNode(e=j("_root")););return e}function Cr(n,e){for(var r=0,i=1;i<e.length;++i)r+=Ir(n,e[i-1],e[i]);return r}function Ir(n,e,r){for(var i=Ge(r,m(r,function(f,c){return c})),t=L(m(e,function(f){return O(m(n.outEdges(f),function(c){return{pos:i[c.w],weight:n.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=m(new Array(a),function(){return 0}),d=0;return s(t.forEach(function(f){var c=f.pos+o;u[c]+=f.weight;for(var h=0;c>0;)c%2&&(h+=u[c+1]),c=c-1>>1,u[c]+=f.weight;d+=f.weight*h})),d}function Rr(n){var e={},r=T(n.nodes(),function(u){return!n.children(u).length}),i=E(m(r,function(u){return n.node(u).rank})),t=m(N(i+1),function(){return[]});function o(u){if(!w(e,u)){e[u]=!0;var d=n.node(u);t[d.rank].push(u),s(n.successors(u),o)}}var a=O(r,function(u){return n.node(u).rank});return s(a,o),t}function Tr(n,e){return m(e,function(r){var i=n.inEdges(r);if(i.length){var t=B(i,function(o,a){var u=n.edge(a),d=n.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:t.sum/t.weight,weight:t.weight}}else return{v:r}})}function Mr(n,e){var r={};s(n,function(t,o){var a=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:o};g(t.barycenter)||(a.barycenter=t.barycenter,a.weight=t.weight)}),s(e.edges(),function(t){var o=r[t.v],a=r[t.w];!g(o)&&!g(a)&&(a.indegree++,o.out.push(r[t.w]))});var i=T(r,function(t){return!t.indegree});return Or(i)}function Or(n){var e=[];function r(o){return function(a){a.merged||(g(a.barycenter)||g(o.barycenter)||a.barycenter>=o.barycenter)&&Pr(o,a)}}function i(o){return function(a){a.in.push(o),--a.indegree===0&&n.push(a)}}for(;n.length;){var t=n.pop();e.push(t),s(t.in.reverse(),r(t)),s(t.out,i(t))}return m(T(e,function(o){return!o.merged}),function(o){return A(o,["vs","i","barycenter","weight"])})}function Pr(n,e){var r=0,i=0;n.weight&&(r+=n.barycenter*n.weight,i+=n.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/i,n.weight=i,n.i=Math.min(e.i,n.i),e.merged=!0}function Sr(n,e){var r=Ze(n,function(c){return w(c,"barycenter")}),i=r.lhs,t=O(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;i.sort(Fr(!!e)),d=pn(o,t,d),s(i,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=pn(o,t,d)});var f={vs:L(o)};return u&&(f.barycenter=a/u,f.weight=u),f}function pn(n,e,r){for(var i;e.length&&(i=F(e)).i<=r;)e.pop(),n.push(i.vs),r++;return r}function Fr(n){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:n?r.i-e.i:e.i-r.i}}function $n(n,e,r,i){var t=n.children(e),o=n.node(e),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(t=T(t,function(p){return p!==a&&p!==u}));var f=Tr(n,t);s(f,function(p){if(n.children(p.v).length){var b=$n(n,p.v,r,i);d[p.v]=b,w(b,"barycenter")&&Br(p,b)}});var c=Mr(f,r);Ar(c,d);var h=Sr(c,i);if(a&&(h.vs=L([a,h.vs,u]),n.predecessors(a).length)){var l=n.node(n.predecessors(a)[0]),v=n.node(n.predecessors(u)[0]);w(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h}function Ar(n,e){s(n,function(r){r.vs=L(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function Br(n,e){g(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function Gr(n){var e=Tn(n),r=wn(n,N(1,e+1),"inEdges"),i=wn(n,N(e-1,-1,-1),"outEdges"),t=Rr(n);mn(n,t);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Yr(u%2?r:i,u%4>=2),t=Y(n);var f=Cr(n,t);f<o&&(d=0,a=ce(t),o=f)}mn(n,a)}function wn(n,e,r){return m(e,function(i){return Lr(n,i,r)})}function Yr(n,e){var r=new x;s(n,function(i){var t=i.graph().root,o=$n(i,t,r,e);s(o.vs,function(a,u){i.node(a).order=u}),Nr(i,r,o.vs)})}function mn(n,e){s(e,function(r){s(r,function(i,t){n.node(i).order=t})})}function Vr(n){var e=Dr(n);s(n.graph().dummyChains,function(r){for(var i=n.node(r),t=i.edgeObj,o=$r(n,e,t.v,t.w),a=o.path,u=o.lca,d=0,f=a[d],c=!0;r!==t.w;){if(i=n.node(r),c){for(;(f=a[d])!==u&&n.node(f).maxRank<i.rank;)d++;f===u&&(c=!1)}if(!c){for(;d<a.length-1&&n.node(f=a[d+1]).minRank<=i.rank;)d++;f=a[d]}n.setParent(r,f),r=n.successors(r)[0]}})}function $r(n,e,r,i){var t=[],o=[],a=Math.min(e[r].low,e[i].low),u=Math.max(e[r].lim,e[i].lim),d,f;d=r;do d=n.parent(d),t.push(d);while(d&&(e[d].low>a||u>e[d].lim));for(f=d,d=i;(d=n.parent(d))!==f;)o.push(d);return{path:t.concat(o.reverse()),lca:f}}function Dr(n){var e={},r=0;function i(t){var o=r;s(n.children(t),i),e[t]={low:o,lim:r++}}return s(n.children(),i),e}function qr(n,e){var r={};function i(t,o){var a=0,u=0,d=t.length,f=F(o);return s(o,function(c,h){var l=Xr(n,c),v=l?n.node(l).order:d;(l||c===f)&&(s(o.slice(u,h+1),function(p){s(n.predecessors(p),function(b){var C=n.node(b),tn=C.order;(tn<a||v<tn)&&!(C.dummy&&n.node(p).dummy)&&Dn(r,b,p)})}),u=h+1,a=v)}),o}return B(e,i),r}function Wr(n,e){var r={};function i(o,a,u,d,f){var c;s(N(a,u),function(h){c=o[h],n.node(c).dummy&&s(n.predecessors(c),function(l){var v=n.node(l);v.dummy&&(v.order<d||v.order>f)&&Dn(r,l,c)})})}function t(o,a){var u=-1,d,f=0;return s(a,function(c,h){if(n.node(c).dummy==="border"){var l=n.predecessors(c);l.length&&(d=n.node(l[0]).order,i(a,f,h,u,d),f=h,u=d)}i(a,f,a.length,d,o.length)}),a}return B(e,t),r}function Xr(n,e){if(n.node(e).dummy)return K(n.predecessors(e),function(r){return n.node(r).dummy})}function Dn(n,e,r){if(e>r){var i=e;e=r,r=i}var t=n[e];t||(n[e]=t={}),t[r]=!0}function Ur(n,e,r){if(e>r){var i=e;e=r,r=i}return w(n[e],r)}function zr(n,e,r,i){var t={},o={},a={};return s(e,function(u){s(u,function(d,f){t[d]=d,o[d]=d,a[d]=f})}),s(e,function(u){var d=-1;s(u,function(f){var c=i(f);if(c.length){c=O(c,function(b){return a[b]});for(var h=(c.length-1)/2,l=Math.floor(h),v=Math.ceil(h);l<=v;++l){var p=c[l];o[f]===f&&d<a[p]&&!Ur(r,f,p)&&(o[p]=f,o[f]=t[f]=t[p],d=a[p])}}})}),{root:t,align:o}}function Hr(n,e,r,i,t){var o={},a=Jr(n,e,r,t),u=t?"borderLeft":"borderRight";function d(h,l){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?h(p):(b[p]=!0,v.push(p),v=v.concat(l(p))),p=v.pop()}function f(h){o[h]=a.inEdges(h).reduce(function(l,v){return Math.max(l,o[v.v]+a.edge(v))},0)}function c(h){var l=a.outEdges(h).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=n.node(h);l!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[h]=Math.max(o[h],l))}return d(f,a.predecessors.bind(a)),d(c,a.successors.bind(a)),s(i,function(h){o[h]=o[r[h]]}),o}function Jr(n,e,r,i){var t=new x,o=n.graph(),a=ni(o.nodesep,o.edgesep,i);return s(e,function(u){var d;s(u,function(f){var c=r[f];if(t.setNode(c),d){var h=r[d],l=t.edge(h,c);t.setEdge(h,c,Math.max(a(n,f,d),l||0))}d=f})}),t}function Kr(n,e){return Q(y(e),function(r){var i=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY;return ge(r,function(o,a){var u=ei(n,a)/2;i=Math.max(o+u,i),t=Math.min(o-u,t)}),i-t})}function Zr(n,e){var r=y(e),i=I(r),t=E(r);s(["u","d"],function(o){s(["l","r"],function(a){var u=o+a,d=n[u],f;if(d!==e){var c=y(d);f=a==="l"?i-I(c):t-E(c),f&&(n[u]=G(d,function(h){return h+f}))}})})}function Qr(n,e){return G(n.ul,function(r,i){if(e)return n[e.toLowerCase()][i];var t=O(m(n,i));return(t[1]+t[2])/2})}function jr(n){var e=Y(n),r=z(qr(n,e),Wr(n,e)),i={},t;s(["u","d"],function(a){t=a==="u"?e:y(e).reverse(),s(["l","r"],function(u){u==="r"&&(t=m(t,function(h){return y(h).reverse()}));var d=(a==="u"?n.predecessors:n.successors).bind(n),f=zr(n,t,r,d),c=Hr(n,t,f.root,f.align,u==="r");u==="r"&&(c=G(c,function(h){return-h})),i[a+u]=c})});var o=Kr(n,i);return Zr(i,o),Qr(i,n.graph().align)}function ni(n,e,r){return function(i,t,o){var a=i.node(t),u=i.node(o),d=0,f;if(d+=a.width/2,w(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":f=-a.width/2;break;case"r":f=a.width/2;break}if(f&&(d+=r?f:-f),f=0,d+=(a.dummy?e:n)/2,d+=(u.dummy?e:n)/2,d+=u.width/2,w(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":f=u.width/2;break;case"r":f=-u.width/2;break}return f&&(d+=r?f:-f),f=0,d}}function ei(n,e){return n.node(e).width}function ri(n){n=Rn(n),ii(n),xe(jr(n),function(e,r){n.node(r).x=e})}function ii(n){var e=Y(n),r=n.graph().ranksep,i=0;s(e,function(t){var o=E(m(t,function(a){return n.node(a).height}));s(t,function(a){n.node(a).y=i+o/2}),i+=o+r})}function Ri(n,e){var r=e&&e.debugTiming?Qe:je;r("layout",function(){var i=r(" buildLayoutGraph",function(){return vi(n)});r(" runLayout",function(){ti(i,r)}),r(" updateInputGraph",function(){ai(n,i)})})}function ti(n,e){e(" makeSpaceForEdgeLabels",function(){pi(n)}),e(" removeSelfEdges",function(){Ni(n)}),e(" acyclic",function(){Xe(n)}),e(" nestingGraph.run",function(){xr(n)}),e(" rank",function(){mr(Rn(n))}),e(" injectEdgeLabelProxies",function(){wi(n)}),e(" removeEmptyRanks",function(){Ke(n)}),e(" nestingGraph.cleanup",function(){yr(n)}),e(" normalizeRanks",function(){Je(n)}),e(" assignRankMinMax",function(){mi(n)}),e(" removeEdgeLabelProxies",function(){bi(n)}),e(" normalize.run",function(){ar(n)}),e(" parentDummyChains",function(){Vr(n)}),e(" addBorderSegments",function(){nr(n)}),e(" order",function(){Gr(n)}),e(" insertSelfEdges",function(){Li(n)}),e(" adjustCoordinateSystem",function(){er(n)}),e(" position",function(){ri(n)}),e(" positionSelfEdges",function(){_i(n)}),e(" removeBorderNodes",function(){yi(n)}),e(" normalize.undo",function(){ur(n)}),e(" fixupEdgeLabelCoords",function(){Ei(n)}),e(" undoCoordinateSystem",function(){rr(n)}),e(" translateGraph",function(){gi(n)}),e(" assignNodeIntersects",function(){xi(n)}),e(" reversePoints",function(){ki(n)}),e(" acyclic.undo",function(){ze(n)})}function ai(n,e){s(n.nodes(),function(r){var i=n.node(r),t=e.node(r);i&&(i.x=t.x,i.y=t.y,e.children(r).length&&(i.width=t.width,i.height=t.height))}),s(n.edges(),function(r){var i=n.edge(r),t=e.edge(r);i.points=t.points,w(t,"x")&&(i.x=t.x,i.y=t.y)}),n.graph().width=e.graph().width,n.graph().height=e.graph().height}var oi=["nodesep","edgesep","ranksep","marginx","marginy"],ui={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},di=["acyclicer","ranker","rankdir","align"],fi=["width","height"],si={width:0,height:0},ci=["minlen","weight","width","height","labeloffset"],hi={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},li=["labelpos"];function vi(n){var e=new x({multigraph:!0,compound:!0}),r=X(n.graph());return e.setGraph(z({},ui,W(r,oi),A(r,di))),s(n.nodes(),function(i){var t=X(n.node(i));e.setNode(i,ve(W(t,fi),si)),e.setParent(i,n.parent(i))}),s(n.edges(),function(i){var t=X(n.edge(i));e.setEdge(i,z({},hi,W(t,ci),A(t,li)))}),e}function pi(n){var e=n.graph();e.ranksep/=2,s(n.edges(),function(r){var i=n.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function wi(n){s(n.edges(),function(e){var r=n.edge(e);if(r.width&&r.height){var i=n.node(e.v),t=n.node(e.w),o={rank:(t.rank-i.rank)/2+i.rank,e};_(n,"edge-proxy",o,"_ep")}})}function mi(n){var e=0;s(n.nodes(),function(r){var i=n.node(r);i.borderTop&&(i.minRank=n.node(i.borderTop).rank,i.maxRank=n.node(i.borderBottom).rank,e=E(e,i.maxRank))}),n.graph().maxRank=e}function bi(n){s(n.nodes(),function(e){var r=n.node(e);r.dummy==="edge-proxy"&&(n.edge(r.e).labelRank=r.rank,n.removeNode(e))})}function gi(n){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,t=0,o=n.graph(),a=o.marginx||0,u=o.marginy||0;function d(f){var c=f.x,h=f.y,l=f.width,v=f.height;e=Math.min(e,c-l/2),r=Math.max(r,c+l/2),i=Math.min(i,h-v/2),t=Math.max(t,h+v/2)}s(n.nodes(),function(f){d(n.node(f))}),s(n.edges(),function(f){var c=n.edge(f);w(c,"x")&&d(c)}),e-=a,i-=u,s(n.nodes(),function(f){var c=n.node(f);c.x-=e,c.y-=i}),s(n.edges(),function(f){var c=n.edge(f);s(c.points,function(h){h.x-=e,h.y-=i}),w(c,"x")&&(c.x-=e),w(c,"y")&&(c.y-=i)}),o.width=r-e+a,o.height=t-i+u}function xi(n){s(n.edges(),function(e){var r=n.edge(e),i=n.node(e.v),t=n.node(e.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=t,a=i),r.points.unshift(fn(i,o)),r.points.push(fn(t,a))})}function Ei(n){s(n.edges(),function(e){var r=n.edge(e);if(w(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function ki(n){s(n.edges(),function(e){var r=n.edge(e);r.reversed&&r.points.reverse()})}function yi(n){s(n.nodes(),function(e){if(n.children(e).length){var r=n.node(e),i=n.node(r.borderTop),t=n.node(r.borderBottom),o=n.node(F(r.borderLeft)),a=n.node(F(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(t.y-i.y),r.x=o.x+r.width/2,r.y=i.y+r.height/2}}),s(n.nodes(),function(e){n.node(e).dummy==="border"&&n.removeNode(e)})}function Ni(n){s(n.edges(),function(e){if(e.v===e.w){var r=n.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:n.edge(e)}),n.removeEdge(e)}})}function Li(n){var e=Y(n);s(e,function(r){var i=0;s(r,function(t,o){var a=n.node(t);a.order=o+i,s(a.selfEdges,function(u){_(n,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++i,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function _i(n){s(n.nodes(),function(e){var r=n.node(e);if(r.dummy==="selfedge"){var i=n.node(r.e.v),t=i.x+i.width/2,o=i.y,a=r.x-t,u=i.height/2;n.setEdge(r.e,r.label),n.removeNode(e),r.label.points=[{x:t+2*a/3,y:o-u},{x:t+5*a/6,y:o-u},{x:t+a,y:o},{x:t+5*a/6,y:o+u},{x:t+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function W(n,e){return G(A(n,e),Number)}function X(n){var e={};return s(n,function(r,i){e[i.toLowerCase()]=r}),e}export{ve as d,Ri as l,A as p,N as r,j as u};
@@ -1 +1 @@
1
- import{a as h}from"./array-2b6dd58e.js";import{w as d,c as o}from"./path-bf96448e.js";import{o as v}from"./mermaid.core-9d0b1a24.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,p,c=!1,a;for(i==null&&(r=l(a=m())),f=0;f<=g;++f)!(f<g&&s(p=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(p,f,n),+u(p,f,n));if(a)return r=null,a+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};
1
+ import{a as h}from"./array-2b6dd58e.js";import{w as d,c as o}from"./path-bf96448e.js";import{o as v}from"./mermaid.core-66f36223.js";function w(t){return t[0]}function b(t){return t[1]}function P(t,u){var s=o(!0),i=null,l=v,r=null,m=d(e);t=typeof t=="function"?t:t===void 0?w:o(t),u=typeof u=="function"?u:u===void 0?b:o(u);function e(n){var f,g=(n=h(n)).length,p,c=!1,a;for(i==null&&(r=l(a=m())),f=0;f<=g;++f)!(f<g&&s(p=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(p,f,n),+u(p,f,n));if(a)return r=null,a+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{P as l};
@@ -1 +1 @@
1
- import{V as un,W as I,X as Y,Y as Z,Z as fn}from"./mermaid.core-9d0b1a24.js";import{i as cn}from"./init-58dc887a.js";function F(n,t){return n==null||t==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<0?o=h+1:l=h}while(o<l)}return o}function f(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<=0?o=h+1:l=h}while(o<l)}return o}function a(u,c,o=0,l=u.length){const h=i(u,c,o,l-1);return h>o&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/o<n&&++u,c/o>t&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*o<n&&++u,c*o>t&&--c),c<u&&.5<=e&&e<2?R(n,t,e*2):[u,c,o]}function wn(n,t,e){if(t=+t,n=+n,e=+e,!(e>0))return[];if(n===t)return[n];const r=t<n,[i,f,a]=r?R(t,n,e):R(n,t,e);if(!(f>=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o<u;++o)c[o]=(f-o)/-a;else for(let o=0;o<u;++o)c[o]=(f-o)*a;else if(a<0)for(let o=0;o<u;++o)c[o]=(i+o)/-a;else for(let o=0;o<u;++o)c[o]=(i+o)*a;return c}function L(n,t,e){return t=+t,n=+n,e=+e,R(n,t,e)[2]}function Nn(n,t,e){t=+t,n=+n,e=+e;const r=t<n,i=r?L(t,n,e):L(n,t,e);return(r?-1:1)*(i<0?1/-i:i)}function kn(n,t){t||(t=[]);var e=n?Math.min(t.length,n.length):0,r=t.slice(),i;return function(f){for(i=0;i<e;++i)r[i]=n[i]*(1-f)+t[i]*f;return r}}function xn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function An(n,t){var e=t?t.length:0,r=n?Math.min(e,n.length):0,i=new Array(r),f=new Array(e),a;for(a=0;a<r;++a)i[a]=C(n[a],t[a]);for(;a<e;++a)f[a]=t[a];return function(u){for(a=0;a<r;++a)f[a]=i[a](u);return f}}function vn(n,t){var e=new Date;return n=+n,t=+t,function(r){return e.setTime(n*(1-r)+t*r),e}}function Sn(n,t){var e={},r={},i;(n===null||typeof n!="object")&&(n={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in n?e[i]=C(n[i],t[i]):r[i]=t[i];return function(f){for(i in e)r[i]=e[i](f);return r}}function C(n,t){var e=typeof t,r;return t==null||e==="boolean"?un(t):(e==="number"?I:e==="string"?(r=Y(t))?(t=r,Z):fn:t instanceof Y?Z:t instanceof Date?vn:xn(t)?kn:Array.isArray(t)?An:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sn:I)(n,t)}function bn(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}function jn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new V({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=V.prototype;function V(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}V.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e<t;++e)switch(n[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+n[e])break n;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function U(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const W={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>U(n*100,t),r:U,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function H(n){return n}var J=Array.prototype.map,K=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?H:Pn(J.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?H:zn(J.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"\u2212":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,X=h.trim,d=h.type;d==="n"?(T=!0,d="g"):W[d]||(w===void 0&&(w=12),X=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",B=W[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function G(m){var N=en,g=on,x,O,j;if(d==="c")g=B(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:B(Math.abs(m),w),X&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?K[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,O=m.length;++x<O;)if(j=m.charCodeAt(x),48>j||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z<b?new Array(b-z+1).join(s):"";switch(T&&k&&(m=t(M+m,M.length?b-g.length:1/0),M=""),p){case"<":m=N+m+g+M;break;case"=":m=N+M+m+g;break;case"^":m=M.slice(0,z=M.length>>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return G.toString=function(){return h+""},G}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=K[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var Q=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Vn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Xn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i<r?(r=q(i,r),f=e(a,f)):(r=q(r,i),f=e(f,a)),function(u){return f(r(u))}}function Bn(n,t,e){var r=Math.min(n.length,t.length)-1,i=new Array(r),f=new Array(r),a=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=q(n[a],n[a+1]),f[a]=e(t[a],t[a+1]);return function(u){var c=gn(n,u,1,r)-1;return f[c](i[c](u))}}function Gn(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function On(){var n=Q,t=Q,e=C,r,i,f,a=A,u,c,o;function l(){var s=Math.min(n.length,t.length);return a!==A&&(a=Vn(n[0],n[s-1])),u=s>2?Bn:Xn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Yn(){return On()(A,A)}function Zn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r==null?",f":r),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Un(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e==null?10:e)},n.tickFormat=function(e,r){var i=t();return Zn(i[0],i[i.length-1],e==null?10:e,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u<a&&(o=a,a=u,u=o,o=i,i=f,f=o);l-- >0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Wn(){var n=Yn();return n.copy=function(){return Gn(n,Wn())},cn.apply(n,arguments),Un(n)}export{Gn as a,_ as b,Yn as c,Wn as l,Nn as t};
1
+ import{V as un,W as I,X as Y,Y as Z,Z as fn}from"./mermaid.core-66f36223.js";import{i as cn}from"./init-58dc887a.js";function F(n,t){return n==null||t==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<0?o=h+1:l=h}while(o<l)}return o}function f(u,c,o=0,l=u.length){if(o<l){if(t(c,c)!==0)return l;do{const h=o+l>>>1;e(u[h],c)<=0?o=h+1:l=h}while(o<l)}return o}function a(u,c,o=0,l=u.length){const h=i(u,c,o,l-1);return h>o&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/o<n&&++u,c/o>t&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*o<n&&++u,c*o>t&&--c),c<u&&.5<=e&&e<2?R(n,t,e*2):[u,c,o]}function wn(n,t,e){if(t=+t,n=+n,e=+e,!(e>0))return[];if(n===t)return[n];const r=t<n,[i,f,a]=r?R(t,n,e):R(n,t,e);if(!(f>=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o<u;++o)c[o]=(f-o)/-a;else for(let o=0;o<u;++o)c[o]=(f-o)*a;else if(a<0)for(let o=0;o<u;++o)c[o]=(i+o)/-a;else for(let o=0;o<u;++o)c[o]=(i+o)*a;return c}function L(n,t,e){return t=+t,n=+n,e=+e,R(n,t,e)[2]}function Nn(n,t,e){t=+t,n=+n,e=+e;const r=t<n,i=r?L(t,n,e):L(n,t,e);return(r?-1:1)*(i<0?1/-i:i)}function kn(n,t){t||(t=[]);var e=n?Math.min(t.length,n.length):0,r=t.slice(),i;return function(f){for(i=0;i<e;++i)r[i]=n[i]*(1-f)+t[i]*f;return r}}function xn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function An(n,t){var e=t?t.length:0,r=n?Math.min(e,n.length):0,i=new Array(r),f=new Array(e),a;for(a=0;a<r;++a)i[a]=C(n[a],t[a]);for(;a<e;++a)f[a]=t[a];return function(u){for(a=0;a<r;++a)f[a]=i[a](u);return f}}function vn(n,t){var e=new Date;return n=+n,t=+t,function(r){return e.setTime(n*(1-r)+t*r),e}}function Sn(n,t){var e={},r={},i;(n===null||typeof n!="object")&&(n={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in n?e[i]=C(n[i],t[i]):r[i]=t[i];return function(f){for(i in e)r[i]=e[i](f);return r}}function C(n,t){var e=typeof t,r;return t==null||e==="boolean"?un(t):(e==="number"?I:e==="string"?(r=Y(t))?(t=r,Z):fn:t instanceof Y?Z:t instanceof Date?vn:xn(t)?kn:Array.isArray(t)?An:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sn:I)(n,t)}function bn(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}function jn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new V({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=V.prototype;function V(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}V.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e<t;++e)switch(n[e]){case".":r=i=e;break;case"0":r===0&&(r=e),i=e;break;default:if(!+n[e])break n;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function U(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const W={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>U(n*100,t),r:U,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function H(n){return n}var J=Array.prototype.map,K=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?H:Pn(J.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?H:zn(J.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"\u2212":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,X=h.trim,d=h.type;d==="n"?(T=!0,d="g"):W[d]||(w===void 0&&(w=12),X=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",B=W[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function G(m){var N=en,g=on,x,O,j;if(d==="c")g=B(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:B(Math.abs(m),w),X&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?K[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,O=m.length;++x<O;)if(j=m.charCodeAt(x),48>j||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z<b?new Array(b-z+1).join(s):"";switch(T&&k&&(m=t(M+m,M.length?b-g.length:1/0),M=""),p){case"<":m=N+m+g+M;break;case"=":m=N+M+m+g;break;case"^":m=M.slice(0,z=M.length>>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return G.toString=function(){return h+""},G}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=K[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var Q=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Vn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Xn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i<r?(r=q(i,r),f=e(a,f)):(r=q(r,i),f=e(f,a)),function(u){return f(r(u))}}function Bn(n,t,e){var r=Math.min(n.length,t.length)-1,i=new Array(r),f=new Array(r),a=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=q(n[a],n[a+1]),f[a]=e(t[a],t[a+1]);return function(u){var c=gn(n,u,1,r)-1;return f[c](i[c](u))}}function Gn(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function On(){var n=Q,t=Q,e=C,r,i,f,a=A,u,c,o;function l(){var s=Math.min(n.length,t.length);return a!==A&&(a=Vn(n[0],n[s-1])),u=s>2?Bn:Xn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Yn(){return On()(A,A)}function Zn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r==null?",f":r),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Un(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e==null?10:e)},n.tickFormat=function(e,r){var i=t();return Zn(i[0],i[i.length-1],e==null?10:e,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u<a&&(o=a,a=u,u=o,o=i,i=f,f=o);l-- >0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Wn(){var n=Yn();return n.copy=function(){return Gn(n,Wn())},cn.apply(n,arguments),Un(n)}export{Gn as a,_ as b,Yn as c,Wn as l,Nn as t};