@marimo-team/frontend 0.14.11-dev6 → 0.14.11-dev61
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.
- package/dist/assets/{ConnectedDataExplorerComponent-C0P31a5y.js → ConnectedDataExplorerComponent-7lwbXGG0.js} +3 -3
- package/dist/assets/{ImageComparisonComponent-DXDeGx2f.js → ImageComparisonComponent-CkBUxemu.js} +1 -1
- package/dist/assets/{VegaLite-CUqFyetE.js → VegaLite-C3kh9Rwh.js} +1 -1
- package/dist/assets/_baseEach-7OnVv2Il.js +1 -0
- package/dist/assets/_baseMap-DMbOsrOH.js +1 -0
- package/dist/assets/_baseUniq-BJ_DM-dv.js +1 -0
- package/dist/assets/{_createAggregator-SoA2y5HH.js → _createAggregator-CU14Vvah.js} +1 -1
- package/dist/assets/{any-language-editor-Bw2cdBsS.js → any-language-editor-CpGhkcTs.js} +1 -1
- package/dist/assets/architectureDiagram-NQ2NVSRB-CRGkJVLW.js +36 -0
- package/dist/assets/blockDiagram-PHRCVELO-BE73w-Yw.js +122 -0
- package/dist/assets/{c4Diagram-VJAJSXHY-BHtN7uMz.js → c4Diagram-6F6E4RAY-CLPou8i9.js} +2 -2
- package/dist/assets/channel-FMYaPnNO.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-BO5DiwLV.js → chunk-353BL4L5-ZtAMne7L.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-CbYGlbyQ.js → chunk-67H74DCK-Dv_WfmET.js} +1 -1
- package/dist/assets/chunk-6OLS64BW-Cfa5t9Qb.js +220 -0
- package/dist/assets/{chunk-XZIHB7SX-COKmet6t.js → chunk-AACKK3MU-stPID9-b.js} +1 -1
- package/dist/assets/chunk-BFAMUDN2-Bv-frm_f.js +1 -0
- package/dist/assets/chunk-E2GYISFI-BcHk8zL8.js +15 -0
- package/dist/assets/{chunk-A2AXSNBT-B07L-F60.js → chunk-QEP2MXWD-CFFGkZyS.js} +4 -3
- package/dist/assets/chunk-SKB7J2MH-BfNzBL67.js +1 -0
- package/dist/assets/{circle-play-DSXPiHO0.js → circle-play-BSIQ-D2e.js} +2 -2
- package/dist/assets/classDiagram-BGRH5UQR-TChu_ukz.js +1 -0
- package/dist/assets/classDiagram-v2-O24JOBDK-TChu_ukz.js +1 -0
- package/dist/assets/clone-CsrRoo0b.js +1 -0
- package/dist/assets/compile-_WzZ6Xe7.js +10 -0
- package/dist/assets/dagre-FFZHY6LT--rV40PGz.js +4 -0
- package/dist/assets/{data-editor-CTGVBJdC.js → data-editor-CN_toL95.js} +22 -22
- package/dist/assets/diagram-3EMPZRKU-b9b7Prbs.js +24 -0
- package/dist/assets/diagram-5UYTHUR4-BOSrPmL3.js +24 -0
- package/dist/assets/diagram-ZTM2IBQH-Du7yfttM.js +43 -0
- package/dist/assets/edit-page-DlJsuxdE.js +144 -0
- package/dist/assets/{erDiagram-Q7BY3M3F-l-V_9Yws.js → erDiagram-R3QVA2FD-IggoIyCY.js} +1 -1
- package/dist/assets/flowDiagram-PKI6S5ZS-C7VzpmMi.js +162 -0
- package/dist/assets/ganttDiagram-EK5VF46D-BZFlgsbU.js +267 -0
- package/dist/assets/gitGraphDiagram-GW3U2K7C-BPj60qfB.js +65 -0
- package/dist/assets/{graph-DpLAfWzk.js → graph-CRKCRvC1.js} +1 -1
- package/dist/assets/home-page-Cl3xR1Il.js +9 -0
- package/dist/assets/{index-kmp97oxc.js → index-4m_BjjnQ.js} +1 -1
- package/dist/assets/index-B6PuCmg7.js +1 -0
- package/dist/assets/{index-N67HDT2u.js → index-B74Wk0Yp.js} +1 -1
- package/dist/assets/{index-DZWCSqpf.js → index-BBIdi2C2.js} +1 -1
- package/dist/assets/{index-C9EPiaCd.js → index-BCXJ0h26.js} +1 -1
- package/dist/assets/index-BEQfoZiP.js +1 -0
- package/dist/assets/{index-BuqjbKw0.js → index-BU6SRUZr.js} +1 -1
- package/dist/assets/{index-Bz3Lb65G.js → index-BVdyVwBv.js} +1 -1
- package/dist/assets/index-BWxMpgjy.js +509 -0
- package/dist/assets/{index-Cs9jrmWP.js → index-BeOyqB74.js} +1 -1
- package/dist/assets/{index-Cig6xGYH.js → index-BjuX8zzE.js} +1 -1
- package/dist/assets/index-C1ebmEB1.css +1 -0
- package/dist/assets/{index-DP4HiwTU.js → index-C7tBr2Zc.js} +1 -1
- package/dist/assets/{index-C9EbJL5c.js → index-CroFZWym.js} +1 -1
- package/dist/assets/{index-DQwFB8dN.js → index-Cv1yxHiK.js} +1 -1
- package/dist/assets/{index-CmVTfWOx.js → index-D_lJDRaa.js} +1 -1
- package/dist/assets/{index-DAMc4rP9.js → index-DjGfdKlv.js} +1 -1
- package/dist/assets/{index-FYYNNs_X.js → index-DpK5PRlx.js} +1 -1
- package/dist/assets/{index-Czo055fo.js → index-DpT7h8yC.js} +1 -1
- package/dist/assets/{index-DbunLlvf.js → index-ctxcDKJ8.js} +1 -1
- package/dist/assets/{index-CxQo8Qlm.js → index-tTm-zWWH.js} +1 -1
- package/dist/assets/infoDiagram-RLU2ROGC-CvgDbBeZ.js +2 -0
- package/dist/assets/journeyDiagram-EWQZEKCU-DNncNOSL.js +139 -0
- package/dist/assets/{kanban-definition-NDS4AKOZ-Cw4Vh4wD.js → kanban-definition-ILFWEQ3N-G9lCaL8c.js} +9 -8
- package/dist/assets/{layout-DodQLUx6.js → layout-tJsnmx-y.js} +1 -1
- package/dist/assets/linear-C3Ko-1wu.js +1 -0
- package/dist/assets/links-BMvrpbZj.js +17 -0
- package/dist/assets/loro_wasm_bg-bPYKkGLG.wasm +0 -0
- package/dist/assets/mermaid-CbMjNyw1.js +152 -0
- package/dist/assets/min-f7VkzVZo.js +1 -0
- package/dist/assets/{mindmap-definition-ALO5MXBD-C0KGo_i_.js → mindmap-definition-CZNETY7S-BTORHzDP.js} +4 -4
- package/dist/assets/{pieDiagram-IB7DONF6-DCnELF9y.js → pieDiagram-NIOCPIFQ-DEG6ODWW.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-D0cP5ixt.js → quadrantDiagram-2OG54O6I-DU_zNUA-.js} +1 -1
- package/dist/assets/{react-plotly-BmDAcz3M.js → react-plotly-DnyF1IbD.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-BTksN04O.js → requirementDiagram-SO3GGRV7-B5ensK7X.js} +3 -3
- package/dist/assets/run-page-fTq5YgJD.js +1 -0
- package/dist/assets/{sankeyDiagram-QLVOVGJD-DECOJIMC.js → sankeyDiagram-4UZDY2LN-BRwNjU9R.js} +1 -1
- package/dist/assets/save-worker-B8gk1S9x.js +1 -0
- package/dist/assets/sequenceDiagram-ZIKVLSP4-WKjH7bMp.js +122 -0
- package/dist/assets/slides-component-C-n0P8uC.js +1 -0
- package/dist/assets/sortBy-XrfmjIh1.js +1 -0
- package/dist/assets/stateDiagram-XX37X6EN-flQUMsFY.js +1 -0
- package/dist/assets/stateDiagram-v2-GD6S3NHB-C492NAnZ.js +1 -0
- package/dist/assets/storage-CmxcnmF_.js +25 -0
- package/dist/assets/{terminal-MtCDBvKs.js → terminal-DPW4Jnfi.js} +1 -1
- package/dist/assets/{time-BoP93jle.js → time-CokG7OoZ.js} +1 -1
- package/dist/assets/timeline-definition-RI47OAVP-DFe6kszx.js +61 -0
- package/dist/assets/tracing-CtUepKPL.js +2 -0
- package/dist/assets/treemap-FKARHQ26-ozx129pU.js +126 -0
- package/dist/assets/vega-component--Xg9mL4d.js +1 -0
- package/dist/assets/worker-BYA2ASe8.js +1 -0
- package/dist/assets/worker-Ch6cKXnI.js +1 -0
- package/dist/assets/xychartDiagram-H2YORKM3-Dnu7AEuz.js +7 -0
- package/dist/index.html +2 -2
- package/package.json +44 -44
- package/dist/assets/_baseEach-BHb51vC7.js +0 -1
- package/dist/assets/_baseMap--rH4lBFQ.js +0 -1
- package/dist/assets/_baseUniq-CABXtSlj.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-rGoAHYH8.js +0 -36
- package/dist/assets/blockDiagram-JOT3LUYC-ZBJWq8Z_.js +0 -121
- package/dist/assets/channel-C96bdTqW.js +0 -1
- package/dist/assets/chunk-AEK57VVT-DN2-tsCz.js +0 -220
- package/dist/assets/chunk-RZ5BOZE2-DVex9AD8.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-CehC5H1T.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-CehC5H1T.js +0 -1
- package/dist/assets/clone-H0gxlZXI.js +0 -1
- package/dist/assets/compile-DEz1Y6_F.js +0 -10
- package/dist/assets/dagre-OKDRZEBW-CymbL2JX.js +0 -4
- package/dist/assets/diagram-SSKATNLV-DY5vs_Bj.js +0 -43
- package/dist/assets/diagram-VNBRO52H-ZuQiOKh8.js +0 -24
- package/dist/assets/edit-page-DcQ6ZhfW.js +0 -144
- package/dist/assets/flowDiagram-4HSFHLVR-BsHIJJTe.js +0 -161
- package/dist/assets/ganttDiagram-APWFNJXF-2gy5YbWU.js +0 -257
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-B_ELHLbw.js +0 -65
- package/dist/assets/home-page-6auHzaGk.js +0 -9
- package/dist/assets/index-8IZtaDUn.css +0 -1
- package/dist/assets/index-B-mClP__.js +0 -1
- package/dist/assets/index-DDVWq6NK.js +0 -501
- package/dist/assets/infoDiagram-PH2N3AL5-BwbaSo89.js +0 -2
- package/dist/assets/journeyDiagram-U35MCT3I-NKSvtlZA.js +0 -138
- package/dist/assets/linear-B_OPGLLI.js +0 -1
- package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
- package/dist/assets/mermaid-CVRC4Ruz.js +0 -152
- package/dist/assets/min-VmgWsmJ_.js +0 -1
- package/dist/assets/radar-MK3ICKWK-D8LhkSau.js +0 -126
- package/dist/assets/run-page-17VQxU3e.js +0 -1
- package/dist/assets/save-worker-DZnx0AG9.js +0 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-C5eDWwoH.js +0 -122
- package/dist/assets/shutdown-button-QvkERkPd.js +0 -17
- package/dist/assets/slides-component-DchvPU9C.js +0 -1
- package/dist/assets/sortBy-7ke7bFD2.js +0 -1
- package/dist/assets/stateDiagram-DGXRK772-D6Kwy963.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-Bk10XR94.js +0 -1
- package/dist/assets/storage-BeNhlsrY.js +0 -27
- package/dist/assets/timeline-definition-BDJGKUSR-T1la59d1.js +0 -61
- package/dist/assets/tracing-CCltm96L.js +0 -2
- package/dist/assets/vega-component-j1BDb2QJ.js +0 -1
- package/dist/assets/worker-BbdB3qWL.js +0 -1
- package/dist/assets/worker-CnoOKJWk.js +0 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-CoJqer7_.js +0 -7
- /package/dist/assets/{shutdown-button-C1rhMrxo.css → links-C1rhMrxo.css} +0 -0
@@ -1,14 +1,14 @@
|
|
1
|
-
import{_ as a,l as
|
1
|
+
import{g as gt}from"./chunk-E2GYISFI-BcHk8zL8.js";import{_ as a,l as Y,c as W,I as ut,$ as dt,a0 as pt,a1 as yt,T as ft,G as K,h as B,t as mt,J as bt,V as Et,W as rt,X as at}from"./mermaid-CbMjNyw1.js";import"./index-BWxMpgjy.js";import"./transform-DetRMEbJ.js";import"./timer-Bqd5yn_a.js";import"./step-BwsUM5iJ.js";var q=function(){var t=a(function(e,l,r,o){for(r=r||{},o=e.length;o--;r[e[o]]=l);return r},"o"),d=[1,4],u=[1,13],s=[1,12],f=[1,15],p=[1,16],g=[1,20],y=[1,19],D=[6,7,8],v=[1,26],N=[1,24],A=[1,25],i=[6,7,11],G=[1,31],L=[6,7,11,24],F=[1,6,13,16,17,20,23],U=[1,35],M=[1,36],w=[1,6,7,11,13,16,17,20,23],E=[1,38],I={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:a(function(e,l,r,o,h,n,j){var c=n.length-1;switch(h){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",n[c-1].id),o.addNode(n[c-2].length,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 16:o.getLogger().info("Node: ",n[c].id),o.addNode(n[c-1].length,n[c].id,n[c].descr,n[c].type);break;case 17:o.getLogger().trace("Icon: ",n[c]),o.decorateNode({icon:n[c]});break;case 18:case 23:o.decorateNode({class:n[c]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",n[c-1].id),o.addNode(0,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 21:o.getLogger().trace("Node: ",n[c].id),o.addNode(0,n[c].id,n[c].descr,n[c].type);break;case 22:o.decorateNode({icon:n[c]});break;case 27:o.getLogger().trace("node found ..",n[c-2]),this.$={id:n[c-1],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 28:this.$={id:n[c],descr:n[c],type:0};break;case 29:o.getLogger().trace("node found ..",n[c-3]),this.$={id:n[c-3],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 30:this.$=n[c-1]+n[c];break;case 31:this.$=n[c]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:u,7:[1,10],9:9,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(D,[2,3]),{1:[2,2]},t(D,[2,4]),t(D,[2,5]),{1:[2,6],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:u,9:22,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:v,7:N,10:23,11:A},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:y}),t(i,[2,19]),t(i,[2,21],{15:30,24:G}),t(i,[2,22]),t(i,[2,23]),t(L,[2,25]),t(L,[2,26]),t(L,[2,28],{20:[1,32]}),{21:[1,33]},{6:v,7:N,10:34,11:A},{1:[2,7],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(F,[2,14],{7:U,11:M}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(i,[2,16],{15:37,24:G}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:E}),t(L,[2,31]),{21:[1,39]},{22:[1,40]},t(F,[2,13],{7:U,11:M}),t(w,[2,11]),t(w,[2,12]),t(i,[2,15],{24:E}),t(L,[2,30]),{22:[1,41]},t(L,[2,27]),t(L,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(e,l){if(!l.recoverable){var r=new Error(e);throw r.hash=l,r}this.trace(e)},"parseError"),parse:a(function(e){var l=this,r=[0],o=[],h=[null],n=[],j=this.table,c="",H=0,et=0,lt=n.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(e,T.yy),T.yy.lexer=b,T.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var V=b.yylloc;n.push(V);var ht=b.options&&b.options.ranges;function nt(){var S;return typeof(S=o.pop()||b.lex()||1)!="number"&&(S instanceof Array&&(S=(o=S).pop()),S=l.symbols_[S]||S),S}typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(S){r.length=r.length-2*S,h.length=h.length-S,n.length=n.length-S},"popStack"),a(nt,"lex");for(var _,R,k,it,X,C,st,z,P={};;){if(R=r[r.length-1],this.defaultActions[R]?k=this.defaultActions[R]:(_==null&&(_=nt()),k=j[R]&&j[R][_]),k===void 0||!k.length||!k[0]){var ot="";for(X in z=[],j[R])this.terminals_[X]&&X>2&&z.push("'"+this.terminals_[X]+"'");ot=b.showPosition?"Parse error on line "+(H+1)+`:
|
2
2
|
`+b.showPosition()+`
|
3
|
-
Expecting `+
|
3
|
+
Expecting `+z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(H+1)+": Unexpected "+(_==1?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(ot,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:V,expected:z})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(k[0]){case 1:r.push(_),h.push(b.yytext),n.push(b.yylloc),r.push(k[1]),_=null,et=b.yyleng,c=b.yytext,H=b.yylineno,V=b.yylloc;break;case 2:if(C=this.productions_[k[1]][1],P.$=h[h.length-C],P._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},ht&&(P._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),(it=this.performAction.apply(P,[c,et,H,T.yy,k[1],h,n].concat(lt)))!==void 0)return it;C&&(r=r.slice(0,-1*C*2),h=h.slice(0,-1*C),n=n.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),h.push(P.$),n.push(P._$),st=j[r[r.length-2]][r[r.length-1]],r.push(st);break;case 3:return!0}}return!0},"parse")},O=function(){return{EOF:1,parseError:a(function(e,l){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,l)},"parseError"),setInput:a(function(e,l){return this.yy=l||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:a(function(e){var l=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var h=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:r?(r.length===o.length?this.yylloc.first_column:0)+o[o.length-r.length].length-r[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:a(function(e){this.unput(this.match.slice(e))},"less"),pastInput:a(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var e=this.pastInput(),l=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
5
5
|
`+l+"^"},"showPosition"),test_match:a(function(e,l){var r,o,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),(o=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in h)this[n]=h[n];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var e,l,r,o;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),n=0;n<h.length;n++)if((r=this._input.match(this.rules[h[n]]))&&(!l||r[0].length>l[0].length)){if(l=r,o=n,this.options.backtrack_lexer){if((e=this.test_match(r,h[n]))!==!1)return e;if(this._backtrack){l=!1;continue}return!1}if(!this.options.flex)break}return l?(e=this.test_match(l,h[o]))!==!1&&e:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var e=this.next();return e||this.lex()},"lex"),begin:a(function(e){this.conditionStack.push(e)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:a(function(e){this.begin(e)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(e,l,r,o){switch(r){case 0:return this.pushState("shapeData"),l.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const h=/\n\s*/g;return l.yytext=l.yytext.replace(h,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return e.getLogger().trace("Found comment",l.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",l.yytext),"NODE_DESCR";case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",l.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",l.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function $(){this.yy={}}return I.lexer=O,a($,"Parser"),$.prototype=I,I.Parser=$,new $}();q.parser=q;var
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var e=this.next();return e||this.lex()},"lex"),begin:a(function(e){this.conditionStack.push(e)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:a(function(e){this.begin(e)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(e,l,r,o){switch(r){case 0:return this.pushState("shapeData"),l.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const h=/\n\s*/g;return l.yytext=l.yytext.replace(h,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return e.getLogger().trace("Found comment",l.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",l.yytext),"NODE_DESCR";case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",l.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",l.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function $(){this.yy={}}return I.lexer=O,a($,"Parser"),$.prototype=I,I.Parser=$,new $}();q.parser=q;var _t=q,x=[],Q=[],Z=0,tt={},kt=a(()=>{x=[],Q=[],Z=0,tt={}},"clear"),St=a(t=>{if(x.length===0)return null;const d=x[0].level;let u=null;for(let s=x.length-1;s>=0;s--)if(x[s].level!==d||u||(u=x[s]),x[s].level<d)throw new Error('Items without section detected, found section ("'+x[s].label+'")');return t===(u==null?void 0:u.level)?null:u},"getSection"),ct=a(function(){return Q},"getSections"),xt=a(function(){const t=[],d=ct(),u=W();for(const s of d){const f={id:s.id,label:B(s.label??"",u),isGroup:!0,ticket:s.ticket,shape:"kanbanSection",level:s.level,look:u.look};t.push(f);const p=x.filter(g=>g.parentId===s.id);for(const g of p){const y={id:g.id,parentId:s.id,label:B(g.label??"",u),isGroup:!1,ticket:g==null?void 0:g.ticket,priority:g==null?void 0:g.priority,assigned:g==null?void 0:g.assigned,icon:g==null?void 0:g.icon,shape:"kanbanItem",level:g.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(y)}}return{nodes:t,edges:[],other:{},config:W()}},"getData"),Nt=a((t,d,u,s,f)=>{var v,N;const p=W();let g=((v=p.mindmap)==null?void 0:v.padding)??K.mindmap.padding;switch(s){case m.ROUNDED_RECT:case m.RECT:case m.HEXAGON:g*=2}const y={id:B(d,p)||"kbn"+Z++,level:t,label:B(u,p),width:((N=p.mindmap)==null?void 0:N.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(f!==void 0){let A;A=f.includes(`
|
7
7
|
`)?f+`
|
8
8
|
`:`{
|
9
9
|
`+f+`
|
10
|
-
}`;const i=
|
11
|
-
`+t);const f=s.db.getData(),p=W();p.htmlLabels=!1;const g=
|
10
|
+
}`;const i=mt(A,{schema:bt});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(y.shape=i==null?void 0:i.shape),i!=null&&i.label&&(y.label=i==null?void 0:i.label),i!=null&&i.icon&&(y.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(y.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(y.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(y.priority=i==null?void 0:i.priority)}const D=St(t);D?y.parentId=D.id||"kbn"+Z++:Q.push(y),x.push(y)},"addNode"),m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Lt={clear:kt,addNode:Nt,getSections:ct,getData:xt,nodeType:m,getType:a((t,d)=>{switch(Y.debug("In get type",t,d),t){case"[":return m.RECT;case"(":return d===")"?m.ROUNDED_RECT:m.CLOUD;case"((":return m.CIRCLE;case")":return m.CLOUD;case"))":return m.BANG;case"{{":return m.HEXAGON;default:return m.DEFAULT}},"getType"),setElementForId:a((t,d)=>{tt[t]=d},"setElementForId"),decorateNode:a(t=>{if(!t)return;const d=W(),u=x[x.length-1];t.icon&&(u.icon=B(t.icon,d)),t.class&&(u.cssClasses=B(t.class,d))},"decorateNode"),type2Str:a(t=>{switch(t){case m.DEFAULT:return"no-border";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded-rect";case m.CIRCLE:return"circle";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:a(()=>Y,"getLogger"),getElementById:a(t=>tt[t],"getElementById")},Dt={draw:a(async(t,d,u,s)=>{var L,F,U,M,w;Y.debug(`Rendering kanban diagram
|
11
|
+
`+t);const f=s.db.getData(),p=W();p.htmlLabels=!1;const g=ut(d),y=g.append("g");y.attr("class","sections");const D=g.append("g");D.attr("class","items");const v=f.nodes.filter(E=>E.isGroup);let N=0;const A=[];let i=25;for(const E of v){const I=((L=p==null?void 0:p.kanban)==null?void 0:L.sectionWidth)||200;N+=1,E.x=I*N+10*(N-1)/2,E.width=I,E.y=0,E.height=3*I,E.rx=5,E.ry=5,E.cssClasses=E.cssClasses+" section-"+N;const O=await dt(y,E);i=Math.max(i,(F=O==null?void 0:O.labelBBox)==null?void 0:F.height),A.push(O)}let G=0;for(const E of v){const I=A[G];G+=1;const O=((U=p==null?void 0:p.kanban)==null?void 0:U.sectionWidth)||200,$=3*-O/2+i;let e=$;const l=f.nodes.filter(h=>h.parentId===E.id);for(const h of l){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=E.x,h.width=O-15;const n=(await pt(D,h,{config:p})).node().getBBox();h.y=e+n.height/2,await yt(h),e=h.y+n.height/2+5}const r=I.cluster.select("rect"),o=Math.max(e-$+30,50)+(i-25);r.attr("height",o)}ft(void 0,g,((M=p.mindmap)==null?void 0:M.padding)??K.kanban.padding,((w=p.mindmap)==null?void 0:w.useMaxWidth)??K.kanban.useMaxWidth)},"draw")},It=a(t=>{let d="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)t["lineColor"+s]=t["lineColor"+s]||t["cScaleInv"+s],Et(t["lineColor"+s])?t["lineColor"+s]=rt(t["lineColor"+s],20):t["lineColor"+s]=at(t["lineColor"+s],20);const u=a((s,f)=>t.darkMode?at(s,f):rt(s,f),"adjuster");for(let s=0;s<t.THEME_COLOR_LIMIT;s++){const f=""+(17-3*s);d+=`
|
12
12
|
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
|
13
13
|
fill: ${u(t["cScale"+s],10)};
|
14
14
|
stroke: ${u(t["cScale"+s],10)};
|
@@ -54,11 +54,11 @@ Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on l
|
|
54
54
|
stroke: ${t.nodeBorder};
|
55
55
|
text-decoration: underline;
|
56
56
|
}
|
57
|
-
`}return d},"genSections"),
|
57
|
+
`}return d},"genSections"),Ot={db:Lt,renderer:Dt,parser:_t,styles:a(t=>`
|
58
58
|
.edge {
|
59
59
|
stroke-width: 3;
|
60
60
|
}
|
61
|
-
${
|
61
|
+
${It(t)}
|
62
62
|
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
63
63
|
fill: ${t.git0};
|
64
64
|
}
|
@@ -85,4 +85,5 @@ Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on l
|
|
85
85
|
dominant-baseline: middle;
|
86
86
|
text-align: center;
|
87
87
|
}
|
88
|
-
|
88
|
+
${gt()}
|
89
|
+
`,"getStyles")};export{Ot as diagram};
|
@@ -1 +1 @@
|
|
1
|
-
import{G as R}from"./graph-DpLAfWzk.js";import{b as Cn,e as on,c as h,i as I,f as S,v as M,r as Y}from"./_baseUniq-CABXtSlj.js";import{b as an,a as Sn,m as k,c as G,h as un,f as J,l as q,d as Gn}from"./min-VmgWsmJ_.js";import{co as Fn,bW as Vn,db as Bn,aC as Yn,dc as qn,d4 as zn,dd as F,de as L,M as Dn,Y as An,df as z,dg as W}from"./index-DDVWq6NK.js";import{c as dn,a as cn}from"./_baseEach-BHb51vC7.js";import{s as V}from"./sortBy-7ke7bFD2.js";function Jn(n){return Cn(n,5)}function Wn(n,t){return n>t}function D(n,t){var r={};return t=cn(t),dn(n,function(u,a,c){Bn(r,a,t(u,a,c))}),r}function T(n){return n&&n.length?an(n,Yn,Wn):void 0}function H(n,t){return n&&n.length?an(n,cn(t),Sn):void 0}var Hn=0;function K(n){var t=++Hn;return qn(n)+t}class Kn{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return sn(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&sn(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,u=r._prev;u!==r;)t.push(JSON.stringify(u,Qn)),u=u._prev;return"["+t.join(", ")+"]"}}function sn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Qn(n,t){if(n!=="_next"&&n!=="_prev")return t}var Un=Dn(1);function Xn(n,t){if(n.nodeCount()<=1)return[];var r=function(a,c){var e=new R,i=0,o=0;h(a.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),h(a.edges(),function(s){var g=e.edge(s.v,s.w)||0,v=c(s),p=g+v;e.setEdge(s.v,s.w,p),o=Math.max(o,e.node(s.v).out+=v),i=Math.max(i,e.node(s.w).in+=v)});var d=L(o+i+3).map(function(){return new Kn}),f=i+1;return h(e.nodes(),function(s){U(d,f,e.node(s))}),{graph:e,buckets:d,zeroIdx:f}}(n,t||Un),u=function(a,c,e){for(var i,o=[],d=c[c.length-1],f=c[0];a.nodeCount();){for(;i=f.dequeue();)Q(a,c,e,i);for(;i=d.dequeue();)Q(a,c,e,i);if(a.nodeCount()){for(var s=c.length-2;s>0;--s)if(i=c[s].dequeue()){o=o.concat(Q(a,c,e,i,!0));break}}}return o}(r.graph,r.buckets,r.zeroIdx);return F(k(u,function(a){return n.outEdges(a.v,a.w)}))}function Q(n,t,r,u,a){var c=a?[]:void 0;return h(n.inEdges(u.v),function(e){var i=n.edge(e),o=n.node(e.v);a&&c.push({v:e.v,w:e.w}),o.out-=i,U(t,r,o)}),h(n.outEdges(u.v),function(e){var i=n.edge(e),o=e.w,d=n.node(o);d.in-=i,U(t,r,d)}),n.removeNode(u.v),c}function U(n,t,r){r.out?r.in?n[r.out-r.in+t].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Zn(n){var t=n.graph().acyclicer==="greedy"?Xn(n,function(r){return function(u){return r.edge(u).weight}}(n)):function(r){var u=[],a={},c={};function e(i){Object.prototype.hasOwnProperty.call(c,i)||(c[i]=!0,a[i]=!0,h(r.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(a,o.w)?u.push(o):e(o.w)}),delete a[i])}return h(r.nodes(),e),u}(n);h(t,function(r){var u=n.edge(r);n.removeEdge(r),u.forwardName=r.name,u.reversed=!0,n.setEdge(r.w,r.v,u,K("rev"))})}function C(n,t,r,u){var a;do a=K(u);while(n.hasNode(a));return r.dummy=t,n.setNode(a,r),a}function fn(n){var t=new R({multigraph:n.isMultigraph()}).setGraph(n.graph());return h(n.nodes(),function(r){n.children(r).length||t.setNode(r,n.node(r))}),h(n.edges(),function(r){t.setEdge(r,n.edge(r))}),t}function hn(n,t){var r,u,a=n.x,c=n.y,e=t.x-a,i=t.y-c,o=n.width/2,d=n.height/2;if(!e&&!i)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(i)*o>Math.abs(e)*d?(i<0&&(d=-d),r=d*e/i,u=d):(e<0&&(o=-o),r=o,u=o*i/e),{x:a+r,y:c+u}}function A(n){var t=k(L(vn(n)+1),function(){return[]});return h(n.nodes(),function(r){var u=n.node(r),a=u.rank;I(a)||(t[a][u.order]=r)}),t}function gn(n,t,r,u){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=u),C(n,"border",a,t)}function vn(n){return T(k(n.nodes(),function(t){var r=n.node(t).rank;if(!I(r))return r}))}function $n(n,t){return t()}function ln(n,t,r,u,a,c){var e={width:0,height:0,rank:c,borderType:t},i=a[t][c-1],o=C(n,"border",e,r);a[t][c]=o,n.setParent(o,u),i&&n.setEdge(i,o,{weight:1})}function ne(n){var t=n.graph().rankdir.toLowerCase();t!=="bt"&&t!=="rl"||function(r){h(r.nodes(),function(u){X(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,X),Object.prototype.hasOwnProperty.call(a,"y")&&X(a)})}(n),t!=="lr"&&t!=="rl"||(function(r){h(r.nodes(),function(u){Z(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,Z),Object.prototype.hasOwnProperty.call(a,"x")&&Z(a)})}(n),pn(n))}function pn(n){h(n.nodes(),function(t){wn(n.node(t))}),h(n.edges(),function(t){wn(n.edge(t))})}function wn(n){var t=n.width;n.width=n.height,n.height=t}function X(n){n.y=-n.y}function Z(n){var t=n.x;n.x=n.y,n.y=t}function ee(n){n.graph().dummyChains=[],h(n.edges(),function(t){(function(r,u){var a=u.v,c=r.node(a).rank,e=u.w,i=r.node(e).rank,o=u.name,d=r.edge(u),f=d.labelRank;if(i!==c+1){r.removeEdge(u);var s,g,v=void 0;for(g=0,++c;c<i;++g,++c)d.points=[],s=C(r,"edge",v={width:0,height:0,edgeLabel:d,edgeObj:u,rank:c},"_d"),c===f&&(v.width=d.width,v.height=d.height,v.dummy="edge-label",v.labelpos=d.labelpos),r.setEdge(a,s,{weight:d.weight},o),g===0&&r.graph().dummyChains.push(s),a=s;r.setEdge(a,e,{weight:d.weight},o)}})(n,t)})}function $(n){var t={};h(n.sources(),function r(u){var a=n.node(u);if(Object.prototype.hasOwnProperty.call(t,u))return a.rank;t[u]=!0;var c=G(k(n.outEdges(u),function(e){return r(e.w)-n.edge(e).minlen}));return c!==Number.POSITIVE_INFINITY&&c!=null||(c=0),a.rank=c})}function B(n,t){return n.node(t.w).rank-n.node(t.v).rank-n.edge(t).minlen}function mn(n){var t,r,u=new R({directed:!1}),a=n.nodes()[0],c=n.nodeCount();for(u.setNode(a,{});re(u,n)<c;)t=te(u,n),r=u.hasNode(t.v)?B(n,t):-B(n,t),oe(u,n,r);return u}function re(n,t){return h(n.nodes(),function r(u){h(t.nodeEdges(u),function(a){var c=a.v,e=u===c?a.w:c;n.hasNode(e)||B(t,a)||(n.setNode(e,{}),n.setEdge(u,e,{}),r(e))})}),n.nodeCount()}function te(n,t){return H(t.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return B(t,r)})}function oe(n,t,r){h(n.nodes(),function(u){t.node(u).rank+=r})}function bn(n,t,r){An(t)||(t=[t]);var u=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],c={};return h(t,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);yn(n,e,r==="post",c,u,a)}),a}function yn(n,t,r,u,a,c){Object.prototype.hasOwnProperty.call(u,t)||(u[t]=!0,r||c.push(t),h(a(t),function(e){yn(n,e,r,u,a,c)}),r&&c.push(t))}function j(n){n=function(u){var a=new R().setGraph(u.graph());return h(u.nodes(),function(c){a.setNode(c,u.node(c))}),h(u.edges(),function(c){var e=a.edge(c.v,c.w)||{weight:0,minlen:1},i=u.edge(c);a.setEdge(c.v,c.w,{weight:e.weight+i.weight,minlen:Math.max(e.minlen,i.minlen)})}),a}(n),$(n);var t,r=mn(n);for(en(r),nn(r,n);t=En(r);)On(r,n,t,Nn(r,n,t))}function nn(n,t){var r=function(u,a){return bn(u,a,"post")}(n,n.nodes());r=r.slice(0,r.length-1),h(r,function(u){(function(a,c,e){var i=a.node(e),o=i.parent;a.edge(e,o).cutvalue=xn(a,c,e)})(n,t,u)})}function xn(n,t,r){var u=n.node(r).parent,a=!0,c=t.edge(r,u),e=0;return c||(a=!1,c=t.edge(u,r)),e=c.weight,h(t.nodeEdges(r),function(i){var o,d,f=i.v===r,s=f?i.w:i.v;if(s!==u){var g=f===a,v=t.edge(i).weight;if(e+=g?v:-v,o=r,d=s,n.hasEdge(o,d)){var p=n.edge(r,s).cutvalue;e+=g?-p:p}}}),e}function en(n,t){arguments.length<2&&(t=n.nodes()[0]),kn(n,{},1,t)}function kn(n,t,r,u,a){var c=r,e=n.node(u);return t[u]=!0,h(n.neighbors(u),function(i){Object.prototype.hasOwnProperty.call(t,i)||(r=kn(n,t,r,i,u))}),e.low=c,e.lim=r++,a?e.parent=a:delete e.parent,r}function En(n){return J(n.edges(),function(t){return n.edge(t).cutvalue<0})}function Nn(n,t,r){var u=r.v,a=r.w;t.hasEdge(u,a)||(u=r.w,a=r.v);var c=n.node(u),e=n.node(a),i=c,o=!1;c.lim>e.lim&&(i=e,o=!0);var d=S(t.edges(),function(f){return o===_n(n,n.node(f.v),i)&&o!==_n(n,n.node(f.w),i)});return H(d,function(f){return B(t,f)})}function On(n,t,r,u){var a=r.v,c=r.w;n.removeEdge(a,c),n.setEdge(u.v,u.w,{}),en(n),nn(n,t),function(e,i){var o=J(e.nodes(),function(f){return!i.node(f).parent}),d=function(f,s){return bn(f,s,"pre")}(e,o);d=d.slice(1),h(d,function(f){var s=e.node(f).parent,g=i.edge(f,s),v=!1;g||(g=i.edge(s,f),v=!0),i.node(f).rank=i.node(s).rank+(v?g.minlen:-g.minlen)})}(n,t)}function _n(n,t,r){return r.low<=t.lim&&t.lim<=r.lim}function ie(n){switch(n.graph().ranker){case"network-simplex":default:ue(n);break;case"tight-tree":(function(t){$(t),mn(t)})(n);break;case"longest-path":ae(n)}}new Error,j.initLowLimValues=en,j.initCutValues=nn,j.calcCutValue=xn,j.leaveEdge=En,j.enterEdge=Nn,j.exchangeEdges=On;var ae=$;function ue(n){j(n)}function de(n){var t=C(n,"root",{},"_root"),r=function(e){var i={};function o(d,f){var s=e.children(d);s&&s.length&&h(s,function(g){o(g,f+1)}),i[d]=f}return h(e.children(),function(d){o(d,1)}),i}(n),u=T(M(r))-1,a=2*u+1;n.graph().nestingRoot=t,h(n.edges(),function(e){n.edge(e).minlen*=a});var c=function(e){return Y(e.edges(),function(i,o){return i+e.edge(o).weight},0)}(n)+1;h(n.children(),function(e){In(n,t,a,c,u,r,e)}),n.graph().nodeRankFactor=a}function In(n,t,r,u,a,c,e){var i=n.children(e);if(i.length){var o=gn(n,"_bt"),d=gn(n,"_bb"),f=n.node(e);n.setParent(o,e),f.borderTop=o,n.setParent(d,e),f.borderBottom=d,h(i,function(s){In(n,t,r,u,a,c,s);var g=n.node(s),v=g.borderTop?g.borderTop:s,p=g.borderBottom?g.borderBottom:s,w=g.borderTop?u:2*u,l=v!==p?1:a-c[e]+1;n.setEdge(o,v,{weight:w,minlen:l,nestingEdge:!0}),n.setEdge(p,d,{weight:w,minlen:l,nestingEdge:!0})}),n.parent(e)||n.setEdge(t,o,{weight:0,minlen:a+c[e]})}else e!==t&&n.setEdge(t,e,{weight:0,minlen:r})}function ce(n,t,r){var u=function(c){for(var e;c.hasNode(e=K("_root")););return e}(n),a=new R({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(c){return n.node(c)});return h(n.nodes(),function(c){var e=n.node(c),i=n.parent(c);(e.rank===t||e.minRank<=t&&t<=e.maxRank)&&(a.setNode(c),a.setParent(c,i||u),h(n[r](c),function(o){var d=o.v===c?o.w:o.v,f=a.edge(d,c),s=I(f)?0:f.weight;a.setEdge(d,c,{weight:n.edge(o).weight+s})}),Object.prototype.hasOwnProperty.call(e,"minRank")&&a.setNode(c,{borderLeft:e.borderLeft[t],borderRight:e.borderRight[t]}))}),a}function se(n,t){for(var r=0,u=1;u<t.length;++u)r+=fe(n,t[u-1],t[u]);return r}function fe(n,t,r){for(var u=function(d,f){return function(s,g,v){for(var p=-1,w=s.length,l=g.length,m={};++p<w;){var b=p<l?g[p]:void 0;v(m,s[p],b)}return m}(d||[],f||[],zn)}(r,k(r,function(d,f){return f})),a=F(k(t,function(d){return V(k(n.outEdges(d),function(f){return{pos:u[f.w],weight:n.edge(f).weight}}),"pos")})),c=1;c<r.length;)c<<=1;var e=2*c-1;c-=1;var i=k(new Array(e),function(){return 0}),o=0;return h(a.forEach(function(d){var f=d.pos+c;i[f]+=d.weight;for(var s=0;f>0;)f%2&&(s+=i[f+1]),i[f=f-1>>1]+=d.weight;o+=d.weight*s})),o}function he(n,t){var r={};return h(n,function(u,a){var c=r[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:a};I(u.barycenter)||(c.barycenter=u.barycenter,c.weight=u.weight)}),h(t.edges(),function(u){var a=r[u.v],c=r[u.w];I(a)||I(c)||(c.indegree++,a.out.push(r[u.w]))}),function(u){var a=[];function c(o){return function(d){d.merged||(I(d.barycenter)||I(o.barycenter)||d.barycenter>=o.barycenter)&&function(f,s){var g=0,v=0;f.weight&&(g+=f.barycenter*f.weight,v+=f.weight),s.weight&&(g+=s.barycenter*s.weight,v+=s.weight),f.vs=s.vs.concat(f.vs),f.barycenter=g/v,f.weight=v,f.i=Math.min(s.i,f.i),s.merged=!0}(o,d)}}function e(o){return function(d){d.in.push(o),--d.indegree===0&&u.push(d)}}for(;u.length;){var i=u.pop();a.push(i),h(i.in.reverse(),c(i)),h(i.out,e(i))}return k(S(a,function(o){return!o.merged}),function(o){return z(o,["vs","i","barycenter","weight"])})}(S(r,function(u){return!u.indegree}))}function ge(n,t){var r,u=function(s,g){var v={lhs:[],rhs:[]};return h(s,function(p){g(p)?v.lhs.push(p):v.rhs.push(p)}),v}(n,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),a=u.lhs,c=V(u.rhs,function(s){return-s.i}),e=[],i=0,o=0,d=0;a.sort((r=!!t,function(s,g){return s.barycenter<g.barycenter?-1:s.barycenter>g.barycenter?1:r?g.i-s.i:s.i-g.i})),d=Pn(e,c,d),h(a,function(s){d+=s.vs.length,e.push(s.vs),i+=s.barycenter*s.weight,o+=s.weight,d=Pn(e,c,d)});var f={vs:F(e)};return o&&(f.barycenter=i/o,f.weight=o),f}function Pn(n,t,r){for(var u;t.length&&(u=q(t)).i<=r;)t.pop(),n.push(u.vs),r++;return r}function Rn(n,t,r,u){var a=n.children(t),c=n.node(t),e=c?c.borderLeft:void 0,i=c?c.borderRight:void 0,o={};e&&(a=S(a,function(p){return p!==e&&p!==i}));var d=function(p,w){return k(w,function(l){var m=p.inEdges(l);if(m.length){var b=Y(m,function(y,x){var O=p.edge(x),E=p.node(x.v);return{sum:y.sum+O.weight*E.order,weight:y.weight+O.weight}},{sum:0,weight:0});return{v:l,barycenter:b.sum/b.weight,weight:b.weight}}return{v:l}})}(n,a);h(d,function(p){if(n.children(p.v).length){var w=Rn(n,p.v,r,u);o[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&(m=w,I((l=p).barycenter)?(l.barycenter=m.barycenter,l.weight=m.weight):(l.barycenter=(l.barycenter*l.weight+m.barycenter*m.weight)/(l.weight+m.weight),l.weight+=m.weight))}var l,m});var f=he(d,r);(function(p,w){h(p,function(l){l.vs=F(l.vs.map(function(m){return w[m]?w[m].vs:m}))})})(f,o);var s=ge(f,u);if(e&&(s.vs=F([e,s.vs,i]),n.predecessors(e).length)){var g=n.node(n.predecessors(e)[0]),v=n.node(n.predecessors(i)[0]);Object.prototype.hasOwnProperty.call(s,"barycenter")||(s.barycenter=0,s.weight=0),s.barycenter=(s.barycenter*s.weight+g.order+v.order)/(s.weight+2),s.weight+=2}return s}function ve(n){var t=vn(n),r=Tn(n,L(1,t+1),"inEdges"),u=Tn(n,L(t-1,-1,-1),"outEdges"),a=function(f){var s={},g=S(f.nodes(),function(l){return!f.children(l).length}),v=T(k(g,function(l){return f.node(l).rank})),p=k(L(v+1),function(){return[]}),w=V(g,function(l){return f.node(l).rank});return h(w,function l(m){if(!un(s,m)){s[m]=!0;var b=f.node(m);p[b.rank].push(m),h(f.successors(m),l)}}),p}(n);jn(n,a);for(var c,e=Number.POSITIVE_INFINITY,i=0,o=0;o<4;++i,++o){le(i%2?r:u,i%4>=2);var d=se(n,a=A(n));d<e&&(o=0,c=Jn(a),e=d)}jn(n,c)}function Tn(n,t,r){return k(t,function(u){return ce(n,u,r)})}function le(n,t){var r=new R;h(n,function(u){var a=u.graph().root,c=Rn(u,a,r,t);h(c.vs,function(e,i){u.node(e).order=i}),function(e,i,o){var d,f={};h(o,function(s){for(var g,v,p=e.parent(s);p;){if((g=e.parent(p))?(v=f[g],f[g]=p):(v=d,d=p),v&&v!==p)return void i.setEdge(v,p);p=g}})}(u,r,c.vs)})}function jn(n,t){h(t,function(r){h(r,function(u,a){n.node(u).order=a})})}function pe(n){var t=function(r){var u={},a=0;function c(e){var i=a;h(r.children(e),c),u[e]={low:i,lim:a++}}return h(r.children(),c),u}(n);h(n.graph().dummyChains,function(r){for(var u=n.node(r),a=u.edgeObj,c=function(s,g,v,p){var w,l,m=[],b=[],y=Math.min(g[v].low,g[p].low),x=Math.max(g[v].lim,g[p].lim);w=v;do w=s.parent(w),m.push(w);while(w&&(g[w].low>y||x>g[w].lim));for(l=w,w=p;(w=s.parent(w))!==l;)b.push(w);return{path:m.concat(b.reverse()),lca:l}}(n,t,a.v,a.w),e=c.path,i=c.lca,o=0,d=e[o],f=!0;r!==a.w;){if(u=n.node(r),f){for(;(d=e[o])!==i&&n.node(d).maxRank<u.rank;)o++;d===i&&(f=!1)}if(!f){for(;o<e.length-1&&n.node(d=e[o+1]).minRank<=u.rank;)o++;d=e[o]}n.setParent(r,d),r=n.successors(r)[0]}})}function we(n,t){var r={};return Y(t,function(u,a){var c=0,e=0,i=u.length,o=q(a);return h(a,function(d,f){var s=function(v,p){if(v.node(p).dummy)return J(v.predecessors(p),function(w){return v.node(w).dummy})}(n,d),g=s?n.node(s).order:i;(s||d===o)&&(h(a.slice(e,f+1),function(v){h(n.predecessors(v),function(p){var w=n.node(p),l=w.order;!(l<c||g<l)||w.dummy&&n.node(v).dummy||Mn(r,p,v)})}),e=f+1,c=g)}),a}),r}function Mn(n,t,r){if(t>r){var u=t;t=r,r=u}var a=n[t];a||(n[t]=a={}),a[r]=!0}function me(n,t,r){if(t>r){var u=t;t=r,r=u}return!!n[t]&&Object.prototype.hasOwnProperty.call(n[t],r)}function be(n,t,r,u,a){var c={},e=function(d,f,s,g){var v=new R,p=d.graph(),w=function(l,m,b){return function(y,x,O){var E,_=y.node(x),P=y.node(O),N=0;if(N+=_.width/2,Object.prototype.hasOwnProperty.call(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":E=-_.width/2;break;case"r":E=_.width/2}if(E&&(N+=b?E:-E),E=0,N+=(_.dummy?m:l)/2,N+=(P.dummy?m:l)/2,N+=P.width/2,Object.prototype.hasOwnProperty.call(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":E=P.width/2;break;case"r":E=-P.width/2}return E&&(N+=b?E:-E),E=0,N}}(p.nodesep,p.edgesep,g);return h(f,function(l){var m;h(l,function(b){var y=s[b];if(v.setNode(y),m){var x=s[m],O=v.edge(x,y);v.setEdge(x,y,Math.max(w(d,b,m),O||0))}m=b})}),v}(n,t,r,a),i=a?"borderLeft":"borderRight";function o(d,f){for(var s=e.nodes(),g=s.pop(),v={};g;)v[g]?d(g):(v[g]=!0,s.push(g),s=s.concat(f(g))),g=s.pop()}return o(function(d){c[d]=e.inEdges(d).reduce(function(f,s){return Math.max(f,c[s.v]+e.edge(s))},0)},e.predecessors.bind(e)),o(function(d){var f=e.outEdges(d).reduce(function(g,v){return Math.min(g,c[v.w]-e.edge(v))},Number.POSITIVE_INFINITY),s=n.node(d);f!==Number.POSITIVE_INFINITY&&s.borderType!==i&&(c[d]=Math.max(c[d],f))},e.successors.bind(e)),h(u,function(d){c[d]=c[r[d]]}),c}function ye(n,t){return H(M(t),function(r){var u,a,c=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY;return a=function(i,o){var d=function(f,s){return f.node(s).width}(n,o)/2;c=Math.max(i+d,c),e=Math.min(i-d,e)},(u=r)==null||Fn(u,on(a),Vn),c-e})}function xe(n){var t,r=A(n),u=W(we(n,r),function(e,i){var o={};function d(f,s,g,v,p){var w;h(L(s,g),function(l){w=f[l],e.node(w).dummy&&h(e.predecessors(w),function(m){var b=e.node(m);b.dummy&&(b.order<v||b.order>p)&&Mn(o,m,w)})})}return Y(i,function(f,s){var g,v=-1,p=0;return h(s,function(w,l){if(e.node(w).dummy==="border"){var m=e.predecessors(w);m.length&&(g=e.node(m[0]).order,d(s,p,l,v,g),p=l,v=g)}d(s,p,s.length,g,f.length)}),s}),o}(n,r)),a={};h(["u","d"],function(e){t=e==="u"?r:M(r).reverse(),h(["l","r"],function(i){i==="r"&&(t=k(t,function(s){return M(s).reverse()}));var o=(e==="u"?n.predecessors:n.successors).bind(n),d=function(s,g,v,p){var w={},l={},m={};return h(g,function(b){h(b,function(y,x){w[y]=y,l[y]=y,m[y]=x})}),h(g,function(b){var y=-1;h(b,function(x){var O=p(x);if(O.length){O=V(O,function(Ln){return m[Ln]});for(var E=(O.length-1)/2,_=Math.floor(E),P=Math.ceil(E);_<=P;++_){var N=O[_];l[x]===x&&y<m[N]&&!me(v,x,N)&&(l[N]=x,l[x]=w[x]=w[N],y=m[N])}}})}),{root:w,align:l}}(0,t,u,o),f=be(n,t,d.root,d.align,i==="r");i==="r"&&(f=D(f,function(s){return-s})),a[e+i]=f})});var c=ye(n,a);return function(e,i){var o=M(i),d=G(o),f=T(o);h(["u","d"],function(s){h(["l","r"],function(g){var v,p=s+g,w=e[p];if(w!==i){var l=M(w);(v=g==="l"?d-G(l):f-T(l))&&(e[p]=D(w,function(m){return m+v}))}})})}(a,c),function(e,i){return D(e.ul,function(o,d){if(i)return e[i.toLowerCase()][d];var f=V(k(e,d));return(f[1]+f[2])/2})}(a,n.graph().align)}function ke(n){var t,r;(function(u){var a=A(u),c=u.graph().ranksep,e=0;h(a,function(i){var o=T(k(i,function(d){return u.node(d).height}));h(i,function(d){u.node(d).y=e+o/2}),e+=o+c})})(n=fn(n)),t=xe(n),r=function(u,a){n.node(a).x=u},t&&dn(t,on(r))}function Ee(n,t){var r=$n;r("layout",()=>{var u=r(" buildLayoutGraph",()=>function(a){var c=new R({multigraph:!0,compound:!0}),e=tn(a.graph());return c.setGraph(W({},Oe,rn(e,Ne),z(e,_e))),h(a.nodes(),function(i){var o=tn(a.node(i));c.setNode(i,Gn(rn(o,Ie),Pe)),c.setParent(i,a.parent(i))}),h(a.edges(),function(i){var o=tn(a.edge(i));c.setEdge(i,W({},Te,rn(o,Re),z(o,je)))}),c}(n));r(" runLayout",()=>function(a,c){c(" makeSpaceForEdgeLabels",()=>function(e){var i=e.graph();i.ranksep/=2,h(e.edges(),function(o){var d=e.edge(o);d.minlen*=2,d.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?d.width+=d.labeloffset:d.height+=d.labeloffset)})}(a)),c(" removeSelfEdges",()=>function(e){h(e.edges(),function(i){if(i.v===i.w){var o=e.node(i.v);o.selfEdges||(o.selfEdges=[]),o.selfEdges.push({e:i,label:e.edge(i)}),e.removeEdge(i)}})}(a)),c(" acyclic",()=>Zn(a)),c(" nestingGraph.run",()=>de(a)),c(" rank",()=>ie(fn(a))),c(" injectEdgeLabelProxies",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.width&&o.height){var d=e.node(i.v),f={rank:(e.node(i.w).rank-d.rank)/2+d.rank,e:i};C(e,"edge-proxy",f,"_ep")}})}(a)),c(" removeEmptyRanks",()=>function(e){var i=G(k(e.nodes(),function(s){return e.node(s).rank})),o=[];h(e.nodes(),function(s){var g=e.node(s).rank-i;o[g]||(o[g]=[]),o[g].push(s)});var d=0,f=e.graph().nodeRankFactor;h(o,function(s,g){I(s)&&g%f!==0?--d:d&&h(s,function(v){e.node(v).rank+=d})})}(a)),c(" nestingGraph.cleanup",()=>function(e){var i=e.graph();e.removeNode(i.nestingRoot),delete i.nestingRoot,h(e.edges(),function(o){e.edge(o).nestingEdge&&e.removeEdge(o)})}(a)),c(" normalizeRanks",()=>function(e){var i=G(k(e.nodes(),function(o){return e.node(o).rank}));h(e.nodes(),function(o){var d=e.node(o);un(d,"rank")&&(d.rank-=i)})}(a)),c(" assignRankMinMax",()=>function(e){var i=0;h(e.nodes(),function(o){var d=e.node(o);d.borderTop&&(d.minRank=e.node(d.borderTop).rank,d.maxRank=e.node(d.borderBottom).rank,i=T(i,d.maxRank))}),e.graph().maxRank=i}(a)),c(" removeEdgeLabelProxies",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);o.dummy==="edge-proxy"&&(e.edge(o.e).labelRank=o.rank,e.removeNode(i))})}(a)),c(" normalize.run",()=>ee(a)),c(" parentDummyChains",()=>pe(a)),c(" addBorderSegments",()=>function(e){h(e.children(),function i(o){var d=e.children(o),f=e.node(o);if(d.length&&h(d,i),Object.prototype.hasOwnProperty.call(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var s=f.minRank,g=f.maxRank+1;s<g;++s)ln(e,"borderLeft","_bl",o,f,s),ln(e,"borderRight","_br",o,f,s)}})}(a)),c(" order",()=>ve(a)),c(" insertSelfEdges",()=>function(e){var i=A(e);h(i,function(o){var d=0;h(o,function(f,s){var g=e.node(f);g.order=s+d,h(g.selfEdges,function(v){C(e,"selfedge",{width:v.label.width,height:v.label.height,rank:g.rank,order:s+ ++d,e:v.e,label:v.label},"_se")}),delete g.selfEdges})})}(a)),c(" adjustCoordinateSystem",()=>function(e){var i=e.graph().rankdir.toLowerCase();i!=="lr"&&i!=="rl"||pn(e)}(a)),c(" position",()=>ke(a)),c(" positionSelfEdges",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);if(o.dummy==="selfedge"){var d=e.node(o.e.v),f=d.x+d.width/2,s=d.y,g=o.x-f,v=d.height/2;e.setEdge(o.e,o.label),e.removeNode(i),o.label.points=[{x:f+2*g/3,y:s-v},{x:f+5*g/6,y:s-v},{x:f+g,y:s},{x:f+5*g/6,y:s+v},{x:f+2*g/3,y:s+v}],o.label.x=o.x,o.label.y=o.y}})}(a)),c(" removeBorderNodes",()=>function(e){h(e.nodes(),function(i){if(e.children(i).length){var o=e.node(i),d=e.node(o.borderTop),f=e.node(o.borderBottom),s=e.node(q(o.borderLeft)),g=e.node(q(o.borderRight));o.width=Math.abs(g.x-s.x),o.height=Math.abs(f.y-d.y),o.x=s.x+o.width/2,o.y=d.y+o.height/2}}),h(e.nodes(),function(i){e.node(i).dummy==="border"&&e.removeNode(i)})}(a)),c(" normalize.undo",()=>function(e){h(e.graph().dummyChains,function(i){var o,d=e.node(i),f=d.edgeLabel;for(e.setEdge(d.edgeObj,f);d.dummy;)o=e.successors(i)[0],e.removeNode(i),f.points.push({x:d.x,y:d.y}),d.dummy==="edge-label"&&(f.x=d.x,f.y=d.y,f.width=d.width,f.height=d.height),i=o,d=e.node(i)})}(a)),c(" fixupEdgeLabelCoords",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(Object.prototype.hasOwnProperty.call(o,"x"))switch(o.labelpos!=="l"&&o.labelpos!=="r"||(o.width-=o.labeloffset),o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset}})}(a)),c(" undoCoordinateSystem",()=>ne(a)),c(" translateGraph",()=>function(e){var i=Number.POSITIVE_INFINITY,o=0,d=Number.POSITIVE_INFINITY,f=0,s=e.graph(),g=s.marginx||0,v=s.marginy||0;function p(w){var l=w.x,m=w.y,b=w.width,y=w.height;i=Math.min(i,l-b/2),o=Math.max(o,l+b/2),d=Math.min(d,m-y/2),f=Math.max(f,m+y/2)}h(e.nodes(),function(w){p(e.node(w))}),h(e.edges(),function(w){var l=e.edge(w);Object.prototype.hasOwnProperty.call(l,"x")&&p(l)}),i-=g,d-=v,h(e.nodes(),function(w){var l=e.node(w);l.x-=i,l.y-=d}),h(e.edges(),function(w){var l=e.edge(w);h(l.points,function(m){m.x-=i,m.y-=d}),Object.prototype.hasOwnProperty.call(l,"x")&&(l.x-=i),Object.prototype.hasOwnProperty.call(l,"y")&&(l.y-=d)}),s.width=o-i+g,s.height=f-d+v}(a)),c(" assignNodeIntersects",()=>function(e){h(e.edges(),function(i){var o,d,f=e.edge(i),s=e.node(i.v),g=e.node(i.w);f.points?(o=f.points[0],d=f.points[f.points.length-1]):(f.points=[],o=g,d=s),f.points.unshift(hn(s,o)),f.points.push(hn(g,d))})}(a)),c(" reversePoints",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);o.reversed&&o.points.reverse()})}(a)),c(" acyclic.undo",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.reversed){e.removeEdge(i);var d=o.forwardName;delete o.reversed,delete o.forwardName,e.setEdge(i.w,i.v,o,d)}})}(a))}(u,r)),r(" updateInputGraph",()=>function(a,c){h(a.nodes(),function(e){var i=a.node(e),o=c.node(e);i&&(i.x=o.x,i.y=o.y,c.children(e).length&&(i.width=o.width,i.height=o.height))}),h(a.edges(),function(e){var i=a.edge(e),o=c.edge(e);i.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(i.x=o.x,i.y=o.y)}),a.graph().width=c.graph().width,a.graph().height=c.graph().height}(n,u))})}var Ne=["nodesep","edgesep","ranksep","marginx","marginy"],Oe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_e=["acyclicer","ranker","rankdir","align"],Ie=["width","height"],Pe={width:0,height:0},Re=["minlen","weight","width","height","labeloffset"],Te={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},je=["labelpos"];function rn(n,t){return D(z(n,t),Number)}function tn(n){var t={};return h(n,function(r,u){t[u.toLowerCase()]=r}),t}export{Ee as l};
|
1
|
+
import{G as R}from"./graph-CRKCRvC1.js";import{b as Cn,e as on,c as h,i as I,f as S,v as L,r as q}from"./_baseUniq-BJ_DM-dv.js";import{b as an,a as Sn,m as k,c as G,h as un,f as J,l as Y,d as Gn}from"./min-f7VkzVZo.js";import{cp as Fn,bX as Vn,db as Bn,aD as qn,dc as Yn,d4 as zn,dd as F,de as M,O as Dn,Z as An,df as z,dg as X}from"./index-BWxMpgjy.js";import{c as dn,a as cn}from"./_baseEach-7OnVv2Il.js";import{s as V}from"./sortBy-XrfmjIh1.js";function Jn(n){return Cn(n,5)}function Xn(n,t){return n>t}function D(n,t){var r={};return t=cn(t),dn(n,function(u,a,c){Bn(r,a,t(u,a,c))}),r}function T(n){return n&&n.length?an(n,qn,Xn):void 0}function Z(n,t){return n&&n.length?an(n,cn(t),Sn):void 0}var Zn=0;function H(n){var t=++Zn;return Yn(n)+t}class Hn{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return sn(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&sn(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,u=r._prev;u!==r;)t.push(JSON.stringify(u,Kn)),u=u._prev;return"["+t.join(", ")+"]"}}function sn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Kn(n,t){if(n!=="_next"&&n!=="_prev")return t}var Qn=Dn(1);function Un(n,t){if(n.nodeCount()<=1)return[];var r=function(a,c){var e=new R,i=0,o=0;h(a.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),h(a.edges(),function(s){var g=e.edge(s.v,s.w)||0,v=c(s),p=g+v;e.setEdge(s.v,s.w,p),o=Math.max(o,e.node(s.v).out+=v),i=Math.max(i,e.node(s.w).in+=v)});var d=M(o+i+3).map(function(){return new Hn}),f=i+1;return h(e.nodes(),function(s){Q(d,f,e.node(s))}),{graph:e,buckets:d,zeroIdx:f}}(n,t||Qn),u=function(a,c,e){for(var i,o=[],d=c[c.length-1],f=c[0];a.nodeCount();){for(;i=f.dequeue();)K(a,c,e,i);for(;i=d.dequeue();)K(a,c,e,i);if(a.nodeCount()){for(var s=c.length-2;s>0;--s)if(i=c[s].dequeue()){o=o.concat(K(a,c,e,i,!0));break}}}return o}(r.graph,r.buckets,r.zeroIdx);return F(k(u,function(a){return n.outEdges(a.v,a.w)}))}function K(n,t,r,u,a){var c=a?[]:void 0;return h(n.inEdges(u.v),function(e){var i=n.edge(e),o=n.node(e.v);a&&c.push({v:e.v,w:e.w}),o.out-=i,Q(t,r,o)}),h(n.outEdges(u.v),function(e){var i=n.edge(e),o=e.w,d=n.node(o);d.in-=i,Q(t,r,d)}),n.removeNode(u.v),c}function Q(n,t,r){r.out?r.in?n[r.out-r.in+t].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Wn(n){var t=n.graph().acyclicer==="greedy"?Un(n,function(r){return function(u){return r.edge(u).weight}}(n)):function(r){var u=[],a={},c={};function e(i){Object.prototype.hasOwnProperty.call(c,i)||(c[i]=!0,a[i]=!0,h(r.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(a,o.w)?u.push(o):e(o.w)}),delete a[i])}return h(r.nodes(),e),u}(n);h(t,function(r){var u=n.edge(r);n.removeEdge(r),u.forwardName=r.name,u.reversed=!0,n.setEdge(r.w,r.v,u,H("rev"))})}function C(n,t,r,u){var a;do a=H(u);while(n.hasNode(a));return r.dummy=t,n.setNode(a,r),a}function fn(n){var t=new R({multigraph:n.isMultigraph()}).setGraph(n.graph());return h(n.nodes(),function(r){n.children(r).length||t.setNode(r,n.node(r))}),h(n.edges(),function(r){t.setEdge(r,n.edge(r))}),t}function hn(n,t){var r,u,a=n.x,c=n.y,e=t.x-a,i=t.y-c,o=n.width/2,d=n.height/2;if(!e&&!i)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(i)*o>Math.abs(e)*d?(i<0&&(d=-d),r=d*e/i,u=d):(e<0&&(o=-o),r=o,u=o*i/e),{x:a+r,y:c+u}}function A(n){var t=k(M(vn(n)+1),function(){return[]});return h(n.nodes(),function(r){var u=n.node(r),a=u.rank;I(a)||(t[a][u.order]=r)}),t}function gn(n,t,r,u){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=u),C(n,"border",a,t)}function vn(n){return T(k(n.nodes(),function(t){var r=n.node(t).rank;if(!I(r))return r}))}function $n(n,t){return t()}function ln(n,t,r,u,a,c){var e={width:0,height:0,rank:c,borderType:t},i=a[t][c-1],o=C(n,"border",e,r);a[t][c]=o,n.setParent(o,u),i&&n.setEdge(i,o,{weight:1})}function ne(n){var t=n.graph().rankdir.toLowerCase();t!=="bt"&&t!=="rl"||function(r){h(r.nodes(),function(u){U(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,U),Object.prototype.hasOwnProperty.call(a,"y")&&U(a)})}(n),t!=="lr"&&t!=="rl"||(function(r){h(r.nodes(),function(u){W(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,W),Object.prototype.hasOwnProperty.call(a,"x")&&W(a)})}(n),pn(n))}function pn(n){h(n.nodes(),function(t){wn(n.node(t))}),h(n.edges(),function(t){wn(n.edge(t))})}function wn(n){var t=n.width;n.width=n.height,n.height=t}function U(n){n.y=-n.y}function W(n){var t=n.x;n.x=n.y,n.y=t}function ee(n){n.graph().dummyChains=[],h(n.edges(),function(t){(function(r,u){var a=u.v,c=r.node(a).rank,e=u.w,i=r.node(e).rank,o=u.name,d=r.edge(u),f=d.labelRank;if(i!==c+1){r.removeEdge(u);var s,g,v=void 0;for(g=0,++c;c<i;++g,++c)d.points=[],s=C(r,"edge",v={width:0,height:0,edgeLabel:d,edgeObj:u,rank:c},"_d"),c===f&&(v.width=d.width,v.height=d.height,v.dummy="edge-label",v.labelpos=d.labelpos),r.setEdge(a,s,{weight:d.weight},o),g===0&&r.graph().dummyChains.push(s),a=s;r.setEdge(a,e,{weight:d.weight},o)}})(n,t)})}function $(n){var t={};h(n.sources(),function r(u){var a=n.node(u);if(Object.prototype.hasOwnProperty.call(t,u))return a.rank;t[u]=!0;var c=G(k(n.outEdges(u),function(e){return r(e.w)-n.edge(e).minlen}));return c!==Number.POSITIVE_INFINITY&&c!=null||(c=0),a.rank=c})}function B(n,t){return n.node(t.w).rank-n.node(t.v).rank-n.edge(t).minlen}function mn(n){var t,r,u=new R({directed:!1}),a=n.nodes()[0],c=n.nodeCount();for(u.setNode(a,{});re(u,n)<c;)t=te(u,n),r=u.hasNode(t.v)?B(n,t):-B(n,t),oe(u,n,r);return u}function re(n,t){return h(n.nodes(),function r(u){h(t.nodeEdges(u),function(a){var c=a.v,e=u===c?a.w:c;n.hasNode(e)||B(t,a)||(n.setNode(e,{}),n.setEdge(u,e,{}),r(e))})}),n.nodeCount()}function te(n,t){return Z(t.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return B(t,r)})}function oe(n,t,r){h(n.nodes(),function(u){t.node(u).rank+=r})}function bn(n,t,r){An(t)||(t=[t]);var u=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],c={};return h(t,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);yn(n,e,r==="post",c,u,a)}),a}function yn(n,t,r,u,a,c){Object.prototype.hasOwnProperty.call(u,t)||(u[t]=!0,r||c.push(t),h(a(t),function(e){yn(n,e,r,u,a,c)}),r&&c.push(t))}function j(n){n=function(u){var a=new R().setGraph(u.graph());return h(u.nodes(),function(c){a.setNode(c,u.node(c))}),h(u.edges(),function(c){var e=a.edge(c.v,c.w)||{weight:0,minlen:1},i=u.edge(c);a.setEdge(c.v,c.w,{weight:e.weight+i.weight,minlen:Math.max(e.minlen,i.minlen)})}),a}(n),$(n);var t,r=mn(n);for(en(r),nn(r,n);t=En(r);)On(r,n,t,Nn(r,n,t))}function nn(n,t){var r=function(u,a){return bn(u,a,"post")}(n,n.nodes());r=r.slice(0,r.length-1),h(r,function(u){(function(a,c,e){var i=a.node(e),o=i.parent;a.edge(e,o).cutvalue=xn(a,c,e)})(n,t,u)})}function xn(n,t,r){var u=n.node(r).parent,a=!0,c=t.edge(r,u),e=0;return c||(a=!1,c=t.edge(u,r)),e=c.weight,h(t.nodeEdges(r),function(i){var o,d,f=i.v===r,s=f?i.w:i.v;if(s!==u){var g=f===a,v=t.edge(i).weight;if(e+=g?v:-v,o=r,d=s,n.hasEdge(o,d)){var p=n.edge(r,s).cutvalue;e+=g?-p:p}}}),e}function en(n,t){arguments.length<2&&(t=n.nodes()[0]),kn(n,{},1,t)}function kn(n,t,r,u,a){var c=r,e=n.node(u);return t[u]=!0,h(n.neighbors(u),function(i){Object.prototype.hasOwnProperty.call(t,i)||(r=kn(n,t,r,i,u))}),e.low=c,e.lim=r++,a?e.parent=a:delete e.parent,r}function En(n){return J(n.edges(),function(t){return n.edge(t).cutvalue<0})}function Nn(n,t,r){var u=r.v,a=r.w;t.hasEdge(u,a)||(u=r.w,a=r.v);var c=n.node(u),e=n.node(a),i=c,o=!1;c.lim>e.lim&&(i=e,o=!0);var d=S(t.edges(),function(f){return o===_n(n,n.node(f.v),i)&&o!==_n(n,n.node(f.w),i)});return Z(d,function(f){return B(t,f)})}function On(n,t,r,u){var a=r.v,c=r.w;n.removeEdge(a,c),n.setEdge(u.v,u.w,{}),en(n),nn(n,t),function(e,i){var o=J(e.nodes(),function(f){return!i.node(f).parent}),d=function(f,s){return bn(f,s,"pre")}(e,o);d=d.slice(1),h(d,function(f){var s=e.node(f).parent,g=i.edge(f,s),v=!1;g||(g=i.edge(s,f),v=!0),i.node(f).rank=i.node(s).rank+(v?g.minlen:-g.minlen)})}(n,t)}function _n(n,t,r){return r.low<=t.lim&&t.lim<=r.lim}function ie(n){switch(n.graph().ranker){case"network-simplex":default:ue(n);break;case"tight-tree":(function(t){$(t),mn(t)})(n);break;case"longest-path":ae(n)}}new Error,j.initLowLimValues=en,j.initCutValues=nn,j.calcCutValue=xn,j.leaveEdge=En,j.enterEdge=Nn,j.exchangeEdges=On;var ae=$;function ue(n){j(n)}function de(n){var t=C(n,"root",{},"_root"),r=function(e){var i={};function o(d,f){var s=e.children(d);s&&s.length&&h(s,function(g){o(g,f+1)}),i[d]=f}return h(e.children(),function(d){o(d,1)}),i}(n),u=T(L(r))-1,a=2*u+1;n.graph().nestingRoot=t,h(n.edges(),function(e){n.edge(e).minlen*=a});var c=function(e){return q(e.edges(),function(i,o){return i+e.edge(o).weight},0)}(n)+1;h(n.children(),function(e){In(n,t,a,c,u,r,e)}),n.graph().nodeRankFactor=a}function In(n,t,r,u,a,c,e){var i=n.children(e);if(i.length){var o=gn(n,"_bt"),d=gn(n,"_bb"),f=n.node(e);n.setParent(o,e),f.borderTop=o,n.setParent(d,e),f.borderBottom=d,h(i,function(s){In(n,t,r,u,a,c,s);var g=n.node(s),v=g.borderTop?g.borderTop:s,p=g.borderBottom?g.borderBottom:s,w=g.borderTop?u:2*u,l=v!==p?1:a-c[e]+1;n.setEdge(o,v,{weight:w,minlen:l,nestingEdge:!0}),n.setEdge(p,d,{weight:w,minlen:l,nestingEdge:!0})}),n.parent(e)||n.setEdge(t,o,{weight:0,minlen:a+c[e]})}else e!==t&&n.setEdge(t,e,{weight:0,minlen:r})}function ce(n,t,r){var u=function(c){for(var e;c.hasNode(e=H("_root")););return e}(n),a=new R({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(c){return n.node(c)});return h(n.nodes(),function(c){var e=n.node(c),i=n.parent(c);(e.rank===t||e.minRank<=t&&t<=e.maxRank)&&(a.setNode(c),a.setParent(c,i||u),h(n[r](c),function(o){var d=o.v===c?o.w:o.v,f=a.edge(d,c),s=I(f)?0:f.weight;a.setEdge(d,c,{weight:n.edge(o).weight+s})}),Object.prototype.hasOwnProperty.call(e,"minRank")&&a.setNode(c,{borderLeft:e.borderLeft[t],borderRight:e.borderRight[t]}))}),a}function se(n,t){for(var r=0,u=1;u<t.length;++u)r+=fe(n,t[u-1],t[u]);return r}function fe(n,t,r){for(var u=function(d,f){return function(s,g,v){for(var p=-1,w=s.length,l=g.length,m={};++p<w;){var b=p<l?g[p]:void 0;v(m,s[p],b)}return m}(d||[],f||[],zn)}(r,k(r,function(d,f){return f})),a=F(k(t,function(d){return V(k(n.outEdges(d),function(f){return{pos:u[f.w],weight:n.edge(f).weight}}),"pos")})),c=1;c<r.length;)c<<=1;var e=2*c-1;c-=1;var i=k(new Array(e),function(){return 0}),o=0;return h(a.forEach(function(d){var f=d.pos+c;i[f]+=d.weight;for(var s=0;f>0;)f%2&&(s+=i[f+1]),i[f=f-1>>1]+=d.weight;o+=d.weight*s})),o}function he(n,t){var r={};return h(n,function(u,a){var c=r[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:a};I(u.barycenter)||(c.barycenter=u.barycenter,c.weight=u.weight)}),h(t.edges(),function(u){var a=r[u.v],c=r[u.w];I(a)||I(c)||(c.indegree++,a.out.push(r[u.w]))}),function(u){var a=[];function c(o){return function(d){d.merged||(I(d.barycenter)||I(o.barycenter)||d.barycenter>=o.barycenter)&&function(f,s){var g=0,v=0;f.weight&&(g+=f.barycenter*f.weight,v+=f.weight),s.weight&&(g+=s.barycenter*s.weight,v+=s.weight),f.vs=s.vs.concat(f.vs),f.barycenter=g/v,f.weight=v,f.i=Math.min(s.i,f.i),s.merged=!0}(o,d)}}function e(o){return function(d){d.in.push(o),--d.indegree===0&&u.push(d)}}for(;u.length;){var i=u.pop();a.push(i),h(i.in.reverse(),c(i)),h(i.out,e(i))}return k(S(a,function(o){return!o.merged}),function(o){return z(o,["vs","i","barycenter","weight"])})}(S(r,function(u){return!u.indegree}))}function ge(n,t){var r,u=function(s,g){var v={lhs:[],rhs:[]};return h(s,function(p){g(p)?v.lhs.push(p):v.rhs.push(p)}),v}(n,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),a=u.lhs,c=V(u.rhs,function(s){return-s.i}),e=[],i=0,o=0,d=0;a.sort((r=!!t,function(s,g){return s.barycenter<g.barycenter?-1:s.barycenter>g.barycenter?1:r?g.i-s.i:s.i-g.i})),d=Pn(e,c,d),h(a,function(s){d+=s.vs.length,e.push(s.vs),i+=s.barycenter*s.weight,o+=s.weight,d=Pn(e,c,d)});var f={vs:F(e)};return o&&(f.barycenter=i/o,f.weight=o),f}function Pn(n,t,r){for(var u;t.length&&(u=Y(t)).i<=r;)t.pop(),n.push(u.vs),r++;return r}function Rn(n,t,r,u){var a=n.children(t),c=n.node(t),e=c?c.borderLeft:void 0,i=c?c.borderRight:void 0,o={};e&&(a=S(a,function(p){return p!==e&&p!==i}));var d=function(p,w){return k(w,function(l){var m=p.inEdges(l);if(m.length){var b=q(m,function(y,x){var O=p.edge(x),E=p.node(x.v);return{sum:y.sum+O.weight*E.order,weight:y.weight+O.weight}},{sum:0,weight:0});return{v:l,barycenter:b.sum/b.weight,weight:b.weight}}return{v:l}})}(n,a);h(d,function(p){if(n.children(p.v).length){var w=Rn(n,p.v,r,u);o[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&(m=w,I((l=p).barycenter)?(l.barycenter=m.barycenter,l.weight=m.weight):(l.barycenter=(l.barycenter*l.weight+m.barycenter*m.weight)/(l.weight+m.weight),l.weight+=m.weight))}var l,m});var f=he(d,r);(function(p,w){h(p,function(l){l.vs=F(l.vs.map(function(m){return w[m]?w[m].vs:m}))})})(f,o);var s=ge(f,u);if(e&&(s.vs=F([e,s.vs,i]),n.predecessors(e).length)){var g=n.node(n.predecessors(e)[0]),v=n.node(n.predecessors(i)[0]);Object.prototype.hasOwnProperty.call(s,"barycenter")||(s.barycenter=0,s.weight=0),s.barycenter=(s.barycenter*s.weight+g.order+v.order)/(s.weight+2),s.weight+=2}return s}function ve(n){var t=vn(n),r=Tn(n,M(1,t+1),"inEdges"),u=Tn(n,M(t-1,-1,-1),"outEdges"),a=function(f){var s={},g=S(f.nodes(),function(l){return!f.children(l).length}),v=T(k(g,function(l){return f.node(l).rank})),p=k(M(v+1),function(){return[]}),w=V(g,function(l){return f.node(l).rank});return h(w,function l(m){if(!un(s,m)){s[m]=!0;var b=f.node(m);p[b.rank].push(m),h(f.successors(m),l)}}),p}(n);jn(n,a);for(var c,e=Number.POSITIVE_INFINITY,i=0,o=0;o<4;++i,++o){le(i%2?r:u,i%4>=2);var d=se(n,a=A(n));d<e&&(o=0,c=Jn(a),e=d)}jn(n,c)}function Tn(n,t,r){return k(t,function(u){return ce(n,u,r)})}function le(n,t){var r=new R;h(n,function(u){var a=u.graph().root,c=Rn(u,a,r,t);h(c.vs,function(e,i){u.node(e).order=i}),function(e,i,o){var d,f={};h(o,function(s){for(var g,v,p=e.parent(s);p;){if((g=e.parent(p))?(v=f[g],f[g]=p):(v=d,d=p),v&&v!==p)return void i.setEdge(v,p);p=g}})}(u,r,c.vs)})}function jn(n,t){h(t,function(r){h(r,function(u,a){n.node(u).order=a})})}function pe(n){var t=function(r){var u={},a=0;function c(e){var i=a;h(r.children(e),c),u[e]={low:i,lim:a++}}return h(r.children(),c),u}(n);h(n.graph().dummyChains,function(r){for(var u=n.node(r),a=u.edgeObj,c=function(s,g,v,p){var w,l,m=[],b=[],y=Math.min(g[v].low,g[p].low),x=Math.max(g[v].lim,g[p].lim);w=v;do w=s.parent(w),m.push(w);while(w&&(g[w].low>y||x>g[w].lim));for(l=w,w=p;(w=s.parent(w))!==l;)b.push(w);return{path:m.concat(b.reverse()),lca:l}}(n,t,a.v,a.w),e=c.path,i=c.lca,o=0,d=e[o],f=!0;r!==a.w;){if(u=n.node(r),f){for(;(d=e[o])!==i&&n.node(d).maxRank<u.rank;)o++;d===i&&(f=!1)}if(!f){for(;o<e.length-1&&n.node(d=e[o+1]).minRank<=u.rank;)o++;d=e[o]}n.setParent(r,d),r=n.successors(r)[0]}})}function we(n,t){var r={};return q(t,function(u,a){var c=0,e=0,i=u.length,o=Y(a);return h(a,function(d,f){var s=function(v,p){if(v.node(p).dummy)return J(v.predecessors(p),function(w){return v.node(w).dummy})}(n,d),g=s?n.node(s).order:i;(s||d===o)&&(h(a.slice(e,f+1),function(v){h(n.predecessors(v),function(p){var w=n.node(p),l=w.order;!(l<c||g<l)||w.dummy&&n.node(v).dummy||Ln(r,p,v)})}),e=f+1,c=g)}),a}),r}function Ln(n,t,r){if(t>r){var u=t;t=r,r=u}var a=n[t];a||(n[t]=a={}),a[r]=!0}function me(n,t,r){if(t>r){var u=t;t=r,r=u}return!!n[t]&&Object.prototype.hasOwnProperty.call(n[t],r)}function be(n,t,r,u,a){var c={},e=function(d,f,s,g){var v=new R,p=d.graph(),w=function(l,m,b){return function(y,x,O){var E,_=y.node(x),P=y.node(O),N=0;if(N+=_.width/2,Object.prototype.hasOwnProperty.call(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":E=-_.width/2;break;case"r":E=_.width/2}if(E&&(N+=b?E:-E),E=0,N+=(_.dummy?m:l)/2,N+=(P.dummy?m:l)/2,N+=P.width/2,Object.prototype.hasOwnProperty.call(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":E=P.width/2;break;case"r":E=-P.width/2}return E&&(N+=b?E:-E),E=0,N}}(p.nodesep,p.edgesep,g);return h(f,function(l){var m;h(l,function(b){var y=s[b];if(v.setNode(y),m){var x=s[m],O=v.edge(x,y);v.setEdge(x,y,Math.max(w(d,b,m),O||0))}m=b})}),v}(n,t,r,a),i=a?"borderLeft":"borderRight";function o(d,f){for(var s=e.nodes(),g=s.pop(),v={};g;)v[g]?d(g):(v[g]=!0,s.push(g),s=s.concat(f(g))),g=s.pop()}return o(function(d){c[d]=e.inEdges(d).reduce(function(f,s){return Math.max(f,c[s.v]+e.edge(s))},0)},e.predecessors.bind(e)),o(function(d){var f=e.outEdges(d).reduce(function(g,v){return Math.min(g,c[v.w]-e.edge(v))},Number.POSITIVE_INFINITY),s=n.node(d);f!==Number.POSITIVE_INFINITY&&s.borderType!==i&&(c[d]=Math.max(c[d],f))},e.successors.bind(e)),h(u,function(d){c[d]=c[r[d]]}),c}function ye(n,t){return Z(L(t),function(r){var u,a,c=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY;return a=function(i,o){var d=function(f,s){return f.node(s).width}(n,o)/2;c=Math.max(i+d,c),e=Math.min(i-d,e)},(u=r)==null||Fn(u,on(a),Vn),c-e})}function xe(n){var t,r=A(n),u=X(we(n,r),function(e,i){var o={};function d(f,s,g,v,p){var w;h(M(s,g),function(l){w=f[l],e.node(w).dummy&&h(e.predecessors(w),function(m){var b=e.node(m);b.dummy&&(b.order<v||b.order>p)&&Ln(o,m,w)})})}return q(i,function(f,s){var g,v=-1,p=0;return h(s,function(w,l){if(e.node(w).dummy==="border"){var m=e.predecessors(w);m.length&&(g=e.node(m[0]).order,d(s,p,l,v,g),p=l,v=g)}d(s,p,s.length,g,f.length)}),s}),o}(n,r)),a={};h(["u","d"],function(e){t=e==="u"?r:L(r).reverse(),h(["l","r"],function(i){i==="r"&&(t=k(t,function(s){return L(s).reverse()}));var o=(e==="u"?n.predecessors:n.successors).bind(n),d=function(s,g,v,p){var w={},l={},m={};return h(g,function(b){h(b,function(y,x){w[y]=y,l[y]=y,m[y]=x})}),h(g,function(b){var y=-1;h(b,function(x){var O=p(x);if(O.length){O=V(O,function(Mn){return m[Mn]});for(var E=(O.length-1)/2,_=Math.floor(E),P=Math.ceil(E);_<=P;++_){var N=O[_];l[x]===x&&y<m[N]&&!me(v,x,N)&&(l[N]=x,l[x]=w[x]=w[N],y=m[N])}}})}),{root:w,align:l}}(0,t,u,o),f=be(n,t,d.root,d.align,i==="r");i==="r"&&(f=D(f,function(s){return-s})),a[e+i]=f})});var c=ye(n,a);return function(e,i){var o=L(i),d=G(o),f=T(o);h(["u","d"],function(s){h(["l","r"],function(g){var v,p=s+g,w=e[p];if(w!==i){var l=L(w);(v=g==="l"?d-G(l):f-T(l))&&(e[p]=D(w,function(m){return m+v}))}})})}(a,c),function(e,i){return D(e.ul,function(o,d){if(i)return e[i.toLowerCase()][d];var f=V(k(e,d));return(f[1]+f[2])/2})}(a,n.graph().align)}function ke(n){var t,r;(function(u){var a=A(u),c=u.graph().ranksep,e=0;h(a,function(i){var o=T(k(i,function(d){return u.node(d).height}));h(i,function(d){u.node(d).y=e+o/2}),e+=o+c})})(n=fn(n)),t=xe(n),r=function(u,a){n.node(a).x=u},t&&dn(t,on(r))}function Ee(n,t){var r=$n;r("layout",()=>{var u=r(" buildLayoutGraph",()=>function(a){var c=new R({multigraph:!0,compound:!0}),e=tn(a.graph());return c.setGraph(X({},Oe,rn(e,Ne),z(e,_e))),h(a.nodes(),function(i){var o=tn(a.node(i));c.setNode(i,Gn(rn(o,Ie),Pe)),c.setParent(i,a.parent(i))}),h(a.edges(),function(i){var o=tn(a.edge(i));c.setEdge(i,X({},Te,rn(o,Re),z(o,je)))}),c}(n));r(" runLayout",()=>function(a,c){c(" makeSpaceForEdgeLabels",()=>function(e){var i=e.graph();i.ranksep/=2,h(e.edges(),function(o){var d=e.edge(o);d.minlen*=2,d.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?d.width+=d.labeloffset:d.height+=d.labeloffset)})}(a)),c(" removeSelfEdges",()=>function(e){h(e.edges(),function(i){if(i.v===i.w){var o=e.node(i.v);o.selfEdges||(o.selfEdges=[]),o.selfEdges.push({e:i,label:e.edge(i)}),e.removeEdge(i)}})}(a)),c(" acyclic",()=>Wn(a)),c(" nestingGraph.run",()=>de(a)),c(" rank",()=>ie(fn(a))),c(" injectEdgeLabelProxies",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.width&&o.height){var d=e.node(i.v),f={rank:(e.node(i.w).rank-d.rank)/2+d.rank,e:i};C(e,"edge-proxy",f,"_ep")}})}(a)),c(" removeEmptyRanks",()=>function(e){var i=G(k(e.nodes(),function(s){return e.node(s).rank})),o=[];h(e.nodes(),function(s){var g=e.node(s).rank-i;o[g]||(o[g]=[]),o[g].push(s)});var d=0,f=e.graph().nodeRankFactor;h(o,function(s,g){I(s)&&g%f!==0?--d:d&&h(s,function(v){e.node(v).rank+=d})})}(a)),c(" nestingGraph.cleanup",()=>function(e){var i=e.graph();e.removeNode(i.nestingRoot),delete i.nestingRoot,h(e.edges(),function(o){e.edge(o).nestingEdge&&e.removeEdge(o)})}(a)),c(" normalizeRanks",()=>function(e){var i=G(k(e.nodes(),function(o){return e.node(o).rank}));h(e.nodes(),function(o){var d=e.node(o);un(d,"rank")&&(d.rank-=i)})}(a)),c(" assignRankMinMax",()=>function(e){var i=0;h(e.nodes(),function(o){var d=e.node(o);d.borderTop&&(d.minRank=e.node(d.borderTop).rank,d.maxRank=e.node(d.borderBottom).rank,i=T(i,d.maxRank))}),e.graph().maxRank=i}(a)),c(" removeEdgeLabelProxies",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);o.dummy==="edge-proxy"&&(e.edge(o.e).labelRank=o.rank,e.removeNode(i))})}(a)),c(" normalize.run",()=>ee(a)),c(" parentDummyChains",()=>pe(a)),c(" addBorderSegments",()=>function(e){h(e.children(),function i(o){var d=e.children(o),f=e.node(o);if(d.length&&h(d,i),Object.prototype.hasOwnProperty.call(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var s=f.minRank,g=f.maxRank+1;s<g;++s)ln(e,"borderLeft","_bl",o,f,s),ln(e,"borderRight","_br",o,f,s)}})}(a)),c(" order",()=>ve(a)),c(" insertSelfEdges",()=>function(e){var i=A(e);h(i,function(o){var d=0;h(o,function(f,s){var g=e.node(f);g.order=s+d,h(g.selfEdges,function(v){C(e,"selfedge",{width:v.label.width,height:v.label.height,rank:g.rank,order:s+ ++d,e:v.e,label:v.label},"_se")}),delete g.selfEdges})})}(a)),c(" adjustCoordinateSystem",()=>function(e){var i=e.graph().rankdir.toLowerCase();i!=="lr"&&i!=="rl"||pn(e)}(a)),c(" position",()=>ke(a)),c(" positionSelfEdges",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);if(o.dummy==="selfedge"){var d=e.node(o.e.v),f=d.x+d.width/2,s=d.y,g=o.x-f,v=d.height/2;e.setEdge(o.e,o.label),e.removeNode(i),o.label.points=[{x:f+2*g/3,y:s-v},{x:f+5*g/6,y:s-v},{x:f+g,y:s},{x:f+5*g/6,y:s+v},{x:f+2*g/3,y:s+v}],o.label.x=o.x,o.label.y=o.y}})}(a)),c(" removeBorderNodes",()=>function(e){h(e.nodes(),function(i){if(e.children(i).length){var o=e.node(i),d=e.node(o.borderTop),f=e.node(o.borderBottom),s=e.node(Y(o.borderLeft)),g=e.node(Y(o.borderRight));o.width=Math.abs(g.x-s.x),o.height=Math.abs(f.y-d.y),o.x=s.x+o.width/2,o.y=d.y+o.height/2}}),h(e.nodes(),function(i){e.node(i).dummy==="border"&&e.removeNode(i)})}(a)),c(" normalize.undo",()=>function(e){h(e.graph().dummyChains,function(i){var o,d=e.node(i),f=d.edgeLabel;for(e.setEdge(d.edgeObj,f);d.dummy;)o=e.successors(i)[0],e.removeNode(i),f.points.push({x:d.x,y:d.y}),d.dummy==="edge-label"&&(f.x=d.x,f.y=d.y,f.width=d.width,f.height=d.height),i=o,d=e.node(i)})}(a)),c(" fixupEdgeLabelCoords",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(Object.prototype.hasOwnProperty.call(o,"x"))switch(o.labelpos!=="l"&&o.labelpos!=="r"||(o.width-=o.labeloffset),o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset}})}(a)),c(" undoCoordinateSystem",()=>ne(a)),c(" translateGraph",()=>function(e){var i=Number.POSITIVE_INFINITY,o=0,d=Number.POSITIVE_INFINITY,f=0,s=e.graph(),g=s.marginx||0,v=s.marginy||0;function p(w){var l=w.x,m=w.y,b=w.width,y=w.height;i=Math.min(i,l-b/2),o=Math.max(o,l+b/2),d=Math.min(d,m-y/2),f=Math.max(f,m+y/2)}h(e.nodes(),function(w){p(e.node(w))}),h(e.edges(),function(w){var l=e.edge(w);Object.prototype.hasOwnProperty.call(l,"x")&&p(l)}),i-=g,d-=v,h(e.nodes(),function(w){var l=e.node(w);l.x-=i,l.y-=d}),h(e.edges(),function(w){var l=e.edge(w);h(l.points,function(m){m.x-=i,m.y-=d}),Object.prototype.hasOwnProperty.call(l,"x")&&(l.x-=i),Object.prototype.hasOwnProperty.call(l,"y")&&(l.y-=d)}),s.width=o-i+g,s.height=f-d+v}(a)),c(" assignNodeIntersects",()=>function(e){h(e.edges(),function(i){var o,d,f=e.edge(i),s=e.node(i.v),g=e.node(i.w);f.points?(o=f.points[0],d=f.points[f.points.length-1]):(f.points=[],o=g,d=s),f.points.unshift(hn(s,o)),f.points.push(hn(g,d))})}(a)),c(" reversePoints",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);o.reversed&&o.points.reverse()})}(a)),c(" acyclic.undo",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.reversed){e.removeEdge(i);var d=o.forwardName;delete o.reversed,delete o.forwardName,e.setEdge(i.w,i.v,o,d)}})}(a))}(u,r)),r(" updateInputGraph",()=>function(a,c){h(a.nodes(),function(e){var i=a.node(e),o=c.node(e);i&&(i.x=o.x,i.y=o.y,c.children(e).length&&(i.width=o.width,i.height=o.height))}),h(a.edges(),function(e){var i=a.edge(e),o=c.edge(e);i.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(i.x=o.x,i.y=o.y)}),a.graph().width=c.graph().width,a.graph().height=c.graph().height}(n,u))})}var Ne=["nodesep","edgesep","ranksep","marginx","marginy"],Oe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_e=["acyclicer","ranker","rankdir","align"],Ie=["width","height"],Pe={width:0,height:0},Re=["minlen","weight","width","height","labeloffset"],Te={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},je=["labelpos"];function rn(n,t){return D(z(n,t),Number)}function tn(n){var t={};return h(n,function(r,u){t[u.toLowerCase()]=r}),t}export{Ee as l};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{c as K,i as v,a as w,b as H,f as A}from"./timer-Bqd5yn_a.js";import{bz as d,cy as J,bI as L,cz as P,cA as Q,cB as U,cC as W,cD as X,y as Y,cE as Z,cF as _}from"./index-BWxMpgjy.js";import{i as $}from"./init-DLRA0X12.js";function k(n){return n===null?NaN:+n}function*nn(n,r){if(r===void 0)for(let t of n)t!=null&&(t=+t)>=t&&(yield t);else{let t=-1;for(let e of n)(e=r(e,++t,n))!=null&&(e=+e)>=e&&(yield e)}}const x=d(J),D=x.right,tn=x.left;function y(n,r){r||(r=[]);var t,e=n?Math.min(r.length,n.length):0,a=r.slice();return function(i){for(t=0;t<e;++t)a[t]=n[t]*(1-i)+r[t]*i;return a}}function j(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function rn(n,r){return(j(r)?y:z)(n,r)}function z(n,r){var t,e=r?r.length:0,a=n?Math.min(e,n.length):0,i=new Array(a),u=new Array(e);for(t=0;t<a;++t)i[t]=p(n[t],r[t]);for(;t<e;++t)u[t]=r[t];return function(c){for(t=0;t<a;++t)u[t]=i[t](c);return u}}function B(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function F(n,r){var t,e={},a={};for(t in n!==null&&typeof n=="object"||(n={}),r!==null&&typeof r=="object"||(r={}),r)t in n?e[t]=p(n[t],r[t]):a[t]=r[t];return function(i){for(t in e)a[t]=e[t](i);return a}}function p(n,r){var t,e=typeof r;return r==null||e==="boolean"?K(r):(e==="number"?v:e==="string"?(t=A(r))?(r=t,w):H:r instanceof A?w:r instanceof Date?B:j(r)?y:Array.isArray(r)?z:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?F:v)(n,r)}function V(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function q(n){return+n}d(k).center;var C=[0,1];function g(n){return n}function M(n,r){return(r-=n=+n)?function(e){return(e-n)/r}:(t=isNaN(r)?NaN:.5,function(){return t});var t}function en(n,r,t){var e=n[0],a=n[1],i=r[0],u=r[1];return a<e?(e=M(a,e),i=t(u,i)):(e=M(e,a),i=t(i,u)),function(c){return i(e(c))}}function an(n,r,t){var e=Math.min(n.length,r.length)-1,a=new Array(e),i=new Array(e),u=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++u<e;)a[u]=M(n[u],n[u+1]),i[u]=t(r[u],r[u+1]);return function(c){var f=D(n,c,1,e)-1;return i[f](a[f](c))}}function E(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function I(){var n,r,t,e,a,i,u=C,c=C,f=p,s=g;function h(){var o,m,N,b=Math.min(u.length,c.length);return s!==g&&(o=u[0],m=u[b-1],o>m&&(N=o,o=m,m=N),s=function(G){return Math.max(o,Math.min(m,G))}),e=b>2?an:en,a=i=null,l}function l(o){return o==null||isNaN(o=+o)?t:(a||(a=e(u.map(n),c,f)))(n(s(o)))}return l.invert=function(o){return s(r((i||(i=e(c,u.map(n),v)))(o)))},l.domain=function(o){return arguments.length?(u=Array.from(o,q),h()):u.slice()},l.range=function(o){return arguments.length?(c=Array.from(o),h()):c.slice()},l.rangeRound=function(o){return c=Array.from(o),f=V,h()},l.clamp=function(o){return arguments.length?(s=!!o||g,h()):s!==g},l.interpolate=function(o){return arguments.length?(f=o,h()):f},l.unknown=function(o){return arguments.length?(t=o,l):t},function(o,m){return n=o,r=m,h()}}function O(){return I()(g,g)}function R(n,r,t,e){var a,i=L(n,r,t);switch((e=P(e??",f")).type){case"s":var u=Math.max(Math.abs(n),Math.abs(r));return e.precision!=null||isNaN(a=W(i,u))||(e.precision=a),X(e,u);case"":case"e":case"g":case"p":case"r":e.precision!=null||isNaN(a=U(i,Math.max(Math.abs(n),Math.abs(r))))||(e.precision=a-(e.type==="e"));break;case"f":case"%":e.precision!=null||isNaN(a=Q(i))||(e.precision=a-2*(e.type==="%"))}return Y(e)}function S(n){var r=n.domain;return n.ticks=function(t){var e=r();return Z(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var a=r();return R(a[0],a[a.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e,a,i=r(),u=0,c=i.length-1,f=i[u],s=i[c],h=10;for(s<f&&(a=f,f=s,s=a,a=u,u=c,c=a);h-- >0;){if((a=_(f,s,t))===e)return i[u]=f,i[c]=s,r(i);if(a>0)f=Math.floor(f/a)*a,s=Math.ceil(s/a)*a;else{if(!(a<0))break;f=Math.ceil(f*a)/a,s=Math.floor(s*a)/a}e=a}return n},n}function T(){var n=O();return n.copy=function(){return E(n,T())},$.apply(n,arguments),S(n)}export{E as a,k as b,O as c,rn as d,B as e,y as f,V as g,q as h,p as i,S as j,g as k,T as l,D as m,nn as n,F as o,R as p,tn as q,I as t};
|