@bkm016/basalt 0.1.10 → 0.1.11
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/{chunk-0mjb3sm3.js → chunk-jymx3a77.js} +165 -152
- package/{chunk-3mqf9ped.js → chunk-zq32mwxj.js} +110 -110
- package/compiled.js +1 -1
- package/package.json +1 -1
- package/ui-test-worker.js +1 -1
- package/web/{chunk-9yfftz38.js → chunk-05mvzx00.js} +1 -1
- package/web/chunk-086dshck.js +1 -0
- package/web/chunk-0fy590s0.js +1 -0
- package/web/{chunk-se4h6wx0.js → chunk-0hvxb5d5.js} +1 -1
- package/web/chunk-0mdf1qja.js +1 -0
- package/web/{chunk-w3zgfhjb.js → chunk-0y971zgq.js} +2 -2
- package/web/{chunk-j89s11x8.js → chunk-1t38sgrk.js} +2 -2
- package/web/{chunk-z4bp6p32.js → chunk-1zfxaafq.js} +1 -1
- package/web/{chunk-g7kz8f7q.js → chunk-27812gqr.js} +5 -5
- package/web/{chunk-rag65pfs.js → chunk-2ds0a2z1.js} +3 -3
- package/web/{chunk-rh3xb76f.js → chunk-2f2agfpj.js} +11 -11
- package/web/{chunk-wtvch4ad.js → chunk-2tsxj613.js} +3 -3
- package/web/{chunk-y2rzeb4v.js → chunk-2weaa3gn.js} +2 -2
- package/web/{chunk-8h2x89tw.js → chunk-3020mmp1.js} +1 -1
- package/web/{chunk-mykrm8ba.js → chunk-30aeb767.js} +2 -2
- package/web/chunk-32zmk3f5.js +1 -0
- package/web/{chunk-rxvm70w5.js → chunk-36dc7tcg.js} +2 -2
- package/web/{chunk-j37p0b13.js → chunk-3a57m7xm.js} +3 -3
- package/web/{chunk-tt93zbn4.js → chunk-3b4wqmnh.js} +7 -7
- package/web/chunk-3d3wnh8a.js +2 -0
- package/web/{chunk-zse05v6j.js → chunk-3ftb27f3.js} +8 -8
- package/web/{chunk-de40q05r.js → chunk-47mbbmst.js} +3 -3
- package/web/chunk-48479gnx.js +1 -0
- package/web/{chunk-5v5q13hz.js → chunk-4gc663j0.js} +2 -2
- package/web/{chunk-88wd49xe.js → chunk-4rwwtfnd.js} +2 -2
- package/web/{chunk-eqndhs21.js → chunk-4wwd3pfz.js} +2 -2
- package/web/{chunk-myd6sc76.js → chunk-57pyz29y.js} +2 -2
- package/web/{chunk-32ty2xfn.js → chunk-59nk506k.js} +1 -1
- package/web/{chunk-m4fxd5d9.js → chunk-5ahx98zj.js} +8 -8
- package/web/chunk-6cjm2yr7.js +1 -0
- package/web/{chunk-frnh4zqf.js → chunk-6jb2zyp6.js} +2 -2
- package/web/{chunk-3eexx7y5.js → chunk-793m5jjh.js} +1 -1
- package/web/{chunk-p55vhns6.js → chunk-7dycbjxn.js} +4 -4
- package/web/chunk-7ycxz39p.js +1 -0
- package/web/{chunk-gw8x1g61.js → chunk-8151c970.js} +1 -1
- package/web/{chunk-jccz14ye.js → chunk-885kpj14.js} +2 -2
- package/web/{chunk-vasppf6b.js → chunk-8csw0mvf.js} +2 -2
- package/web/{chunk-x850q01z.js → chunk-8z7texmv.js} +1 -1
- package/web/{chunk-sd3xat3r.js → chunk-90fkdzx3.js} +6 -6
- package/web/chunk-94denx9h.js +39 -0
- package/web/{chunk-zms6mrqk.js → chunk-96xhmmqz.js} +6 -6
- package/web/chunk-9jy8nc4r.js +1 -0
- package/web/{chunk-dv1berk6.js → chunk-9kkzmss7.js} +3 -3
- package/web/chunk-9wr33d0t.js +1 -0
- package/web/{chunk-fmmrthpa.js → chunk-a3pye9ag.js} +3 -3
- package/web/chunk-a4tdrxdh.js +1 -0
- package/web/chunk-a9fvsyc1.js +1 -0
- package/web/chunk-apvbvg4d.js +1 -0
- package/web/{chunk-wrevb4ew.js → chunk-b3j07x0n.js} +6 -6
- package/web/{chunk-0770q5e1.js → chunk-b6sqwmq7.js} +1 -1
- package/web/chunk-bkxcc7v5.js +1 -0
- package/web/chunk-bve354k7.js +1 -0
- package/web/{chunk-nawxgz87.js → chunk-cbwvfedy.js} +8 -8
- package/web/{chunk-x5g1yy12.js → chunk-cpshsp24.js} +1 -1
- package/web/chunk-cwpxakby.js +1 -0
- package/web/chunk-d3f763n7.js +2 -0
- package/web/{chunk-grm2208k.js → chunk-d4519smc.js} +14 -14
- package/web/chunk-de29pe57.js +1 -0
- package/web/chunk-dk0fnj87.js +1 -0
- package/web/{chunk-c57f714b.js → chunk-drchr3yn.js} +2 -2
- package/web/chunk-dsbyfvwz.js +1 -0
- package/web/{chunk-xtn305fd.js → chunk-dtrh40vr.js} +1 -1
- package/web/chunk-e68jw0bg.js +1 -0
- package/web/{chunk-tfqarvdx.js → chunk-e763h2px.js} +67 -67
- package/web/{chunk-pgwf37s2.js → chunk-enryqmj7.js} +5 -5
- package/web/{chunk-jke2ev6m.js → chunk-f79ajymt.js} +2 -2
- package/web/{chunk-qq6m2my8.js → chunk-fj753yzt.js} +2 -2
- package/web/{chunk-5svqfj4g.js → chunk-g0rtcedn.js} +3 -3
- package/web/{chunk-18neka5g.js → chunk-g31dbnzm.js} +4 -4
- package/web/{chunk-1ev0n3n4.js → chunk-g4as4zzd.js} +4 -4
- package/web/{chunk-6e87m0nm.js → chunk-gten0rpx.js} +2 -2
- package/web/{chunk-sjkg40ay.js → chunk-gyhr27dm.js} +1 -1
- package/web/{chunk-js6kb05s.js → chunk-hjyev38w.js} +6 -6
- package/web/{chunk-rwfmccmh.js → chunk-hm8thq7c.js} +4 -4
- package/web/{chunk-07agqp8h.js → chunk-j4gvtszc.js} +2 -2
- package/web/chunk-jd7npyv9.js +8 -0
- package/web/chunk-jhpg2kcf.js +1 -0
- package/web/{chunk-qdzy124b.js → chunk-jqqbkdtw.js} +2 -2
- package/web/chunk-jzz5htxp.js +1 -0
- package/web/chunk-ka3q31t1.js +1 -0
- package/web/chunk-kahab58k.js +1139 -0
- package/web/{chunk-q4bst4an.js → chunk-kfbgvh0c.js} +1 -1
- package/web/chunk-krgvx75q.js +1 -0
- package/web/chunk-kxeaj44h.js +1 -0
- package/web/chunk-m1rdyvb5.js +1 -0
- package/web/{chunk-z5qn0xev.js → chunk-m24yb8md.js} +2 -2
- package/web/chunk-m7k4wr3k.js +1 -0
- package/web/chunk-mdj3r75b.js +1 -0
- package/web/{chunk-h5ckjk48.js → chunk-mpdeqzc9.js} +10 -10
- package/web/{chunk-knm82fw9.js → chunk-mykbcvqz.js} +1 -1
- package/web/{chunk-1qh7f5kr.js → chunk-n33753da.js} +1 -1
- package/web/{chunk-yppgejg7.js → chunk-nafe18y9.js} +10 -10
- package/web/chunk-nbcpbqq4.js +1 -0
- package/web/{chunk-bc3ajvfg.js → chunk-nhx8pw7p.js} +1 -1
- package/web/chunk-nkpdd9hw.js +1 -0
- package/web/{chunk-eh7wp62z.js → chunk-p1yc8hwn.js} +1 -1
- package/web/chunk-p29brxyt.js +1 -0
- package/web/chunk-p8fbes0t.js +1 -0
- package/web/chunk-pbp1p5ex.js +1 -0
- package/web/{chunk-n4yzs2q0.js → chunk-ppjw1mps.js} +4 -4
- package/web/{chunk-7tkgbbf9.js → chunk-pq56b3mq.js} +2 -2
- package/web/{chunk-vvvd3grf.js → chunk-pzg25qqe.js} +2 -2
- package/web/{chunk-t5nvgz7z.js → chunk-q65zxczs.js} +7 -7
- package/web/{chunk-g7dc4hrd.js → chunk-q8v5j963.js} +2 -2
- package/web/{chunk-zz1qkaar.js → chunk-qykt7avq.js} +2 -2
- package/web/chunk-r6q1301x.js +1 -0
- package/web/chunk-r8kghrkb.js +1 -0
- package/web/chunk-rhxn7mxg.js +1 -0
- package/web/{chunk-46jnkghq.js → chunk-rqympya7.js} +2 -2
- package/web/{chunk-k0cg4n2k.js → chunk-s0xy00v5.js} +2 -2
- package/web/chunk-svqshmpg.js +1 -0
- package/web/chunk-swzxq7r3.css +1 -0
- package/web/{chunk-905vw286.js → chunk-t18tn37m.js} +2 -2
- package/web/chunk-tbsaseer.js +1 -0
- package/web/{chunk-rbqnre6q.js → chunk-tggja45g.js} +3 -3
- package/web/chunk-tgkdyxbn.js +1 -0
- package/web/{chunk-sc63488q.js → chunk-tpdcrrf1.js} +1 -1
- package/web/chunk-v0zfnvc1.js +1 -0
- package/web/{chunk-tqze6d6b.js → chunk-v3dn9bfw.js} +1 -1
- package/web/chunk-vj31fs16.js +1 -0
- package/web/chunk-vr79r8vh.js +1 -0
- package/web/chunk-wb9tax0m.js +1 -0
- package/web/{chunk-26ecc2xh.js → chunk-wbwets5x.js} +19 -19
- package/web/chunk-x9eghjjd.js +1 -0
- package/web/{chunk-awkdw9rw.js → chunk-xbyrgyy0.js} +2 -2
- package/web/{chunk-qy1zx2yw.js → chunk-xjc5fmcr.js} +24 -24
- package/web/{chunk-qh62nkem.js → chunk-ydtrc1ay.js} +2 -2
- package/web/chunk-yrh86m0n.js +1 -0
- package/web/chunk-z3ky5ews.js +2 -0
- package/web/{chunk-ehtmb6sn.js → chunk-zdhyq3ch.js} +13 -13
- package/web/{chunk-gsw1tv96.js → chunk-zv73g4qq.js} +2 -2
- package/web/index.html +1 -1
- package/web/chunk-045d3b5d.js +0 -1
- package/web/chunk-12qf1r6m.js +0 -1
- package/web/chunk-1ex3wgms.js +0 -2
- package/web/chunk-2cz7tx8q.js +0 -1
- package/web/chunk-4am8j3k3.js +0 -1
- package/web/chunk-5qvmefq2.js +0 -1
- package/web/chunk-5z2n4z9x.css +0 -1
- package/web/chunk-6y55gk1n.js +0 -1
- package/web/chunk-7np1jp3x.js +0 -8
- package/web/chunk-7qq1ypvj.js +0 -1
- package/web/chunk-87e8d1hv.js +0 -1
- package/web/chunk-8y2526ve.js +0 -1
- package/web/chunk-918e5t4x.js +0 -2
- package/web/chunk-96m2m3e8.js +0 -1
- package/web/chunk-9f4zzqbx.js +0 -1
- package/web/chunk-a1n4468c.js +0 -1
- package/web/chunk-arnzrqnm.js +0 -1
- package/web/chunk-b46ws7rf.js +0 -1
- package/web/chunk-bwy3e58v.js +0 -1
- package/web/chunk-d5gshd1a.js +0 -1
- package/web/chunk-dp0k5vhd.js +0 -1
- package/web/chunk-et1hytyv.js +0 -1
- package/web/chunk-f7jpakwh.js +0 -1
- package/web/chunk-f9m9seam.js +0 -1
- package/web/chunk-g2erm7k0.js +0 -1
- package/web/chunk-g3kbn0t2.js +0 -1
- package/web/chunk-ght0t49g.js +0 -1
- package/web/chunk-ghwm7bdj.js +0 -2
- package/web/chunk-gx340asc.js +0 -1
- package/web/chunk-h0c42zy3.js +0 -1
- package/web/chunk-h2txs73e.js +0 -39
- package/web/chunk-h3tkacc7.js +0 -1
- package/web/chunk-je78j3vr.js +0 -1
- package/web/chunk-kxdtg9dt.js +0 -1
- package/web/chunk-m9xzt9p7.js +0 -1
- package/web/chunk-mzzaet63.js +0 -1
- package/web/chunk-ngt1j8py.js +0 -1139
- package/web/chunk-q34as3v6.js +0 -1
- package/web/chunk-qe0bgeda.js +0 -1
- package/web/chunk-sat7zyva.js +0 -1
- package/web/chunk-sk0hpa80.js +0 -1
- package/web/chunk-tj1fn8v2.js +0 -1
- package/web/chunk-tvcxrx6h.js +0 -1
- package/web/chunk-tzpnh70q.js +0 -1
- package/web/chunk-vb7g4xg6.js +0 -1
- package/web/chunk-wzfe6jtq.js +0 -1
- package/web/chunk-xh4xn1az.js +0 -1
- package/web/chunk-xk904wqv.js +0 -1
- package/web/chunk-xzwxcxb4.js +0 -1
- package/web/chunk-yekaz74b.js +0 -1
- package/web/chunk-ys2tns0p.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{t,a,K,u,d,
|
|
1
|
+
import{t,a,K,u,d,M,O,yt,l,V,tt,nt,Tt,bt,Qt}from"./chunk-e763h2px.js";import{qe}from"./chunk-m24yb8md.js";var ae=function(){var e=t(function(T,r,i,o){for(i=i||{},o=T.length;o--;i[T[o]]=r);return i},"o"),f=[1,4],m=[1,13],s=[1,12],y=[1,15],N=[1,16],S=[1,20],g=[1,19],w=[6,7,8],R=[1,26],b=[1,24],B=[1,25],x=[6,7,11],Y=[1,31],D=[6,7,11,24],W=[1,6,13,16,17,20,23],k=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],J=[1,38],F={trace:t(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:t(function(r,i,o,c,p,n,G){var h=n.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",n[h-1].id),c.addNode(n[h-2].length,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 16:c.getLogger().info("Node: ",n[h].id),c.addNode(n[h-1].length,n[h].id,n[h].descr,n[h].type);break;case 17:c.getLogger().trace("Icon: ",n[h]),c.decorateNode({icon:n[h]});break;case 18:case 23:c.decorateNode({class:n[h]});break;case 19:c.getLogger().trace("SPACELIST");break;case 20:c.getLogger().trace("Node: ",n[h-1].id),c.addNode(0,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 21:c.getLogger().trace("Node: ",n[h].id),c.addNode(0,n[h].id,n[h].descr,n[h].type);break;case 22:c.decorateNode({icon:n[h]});break;case 27:c.getLogger().trace("node found ..",n[h-2]),this.$={id:n[h-1],descr:n[h-1],type:c.getType(n[h-2],n[h])};break;case 28:this.$={id:n[h],descr:n[h],type:0};break;case 29:c.getLogger().trace("node found ..",n[h-3]),this.$={id:n[h-3],descr:n[h-1],type:c.getType(n[h-2],n[h])};break;case 30:this.$=n[h-1]+n[h];break;case 31:this.$=n[h];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:m,7:[1,10],9:9,12:11,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},e(w,[2,3]),{1:[2,2]},e(w,[2,4]),e(w,[2,5]),{1:[2,6],6:m,12:21,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:m,9:22,12:11,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:R,7:b,10:23,11:B},e(x,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:g}),e(x,[2,19]),e(x,[2,21],{15:30,24:Y}),e(x,[2,22]),e(x,[2,23]),e(D,[2,25]),e(D,[2,26]),e(D,[2,28],{20:[1,32]}),{21:[1,33]},{6:R,7:b,10:34,11:B},{1:[2,7],6:m,12:21,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},e(W,[2,14],{7:k,11:j}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(x,[2,16],{15:37,24:Y}),e(x,[2,17]),e(x,[2,18]),e(x,[2,20],{24:J}),e(D,[2,31]),{21:[1,39]},{22:[1,40]},e(W,[2,13],{7:k,11:j}),e(A,[2,11]),e(A,[2,12]),e(x,[2,15],{24:J}),e(D,[2,30]),{22:[1,41]},e(D,[2,27]),e(D,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(r,i){if(i.recoverable)this.trace(r);else{var o=Error(r);throw o.hash=i,o}},"parseError"),parse:t(function(r){var i=this,o=[0],c=[],p=[null],n=[],G=this.table,h="",q=0,he=0,ue=0,be=2,ge=1,ye=n.slice.call(arguments,1),_=Object.create(this.lexer),U={yy:{}};for(var te in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,te))U.yy[te]=this.yy[te];if(_.setInput(r,U.yy),U.yy.lexer=_,U.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var ne=_.yylloc;n.push(ne);var me=_.options&&_.options.ranges;if(typeof U.yy.parseError==="function")this.parseError=U.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(I){o.length=o.length-2*I,p.length=p.length-I,n.length=n.length-I}t(ke,"popStack");function de(){var I=c.pop()||_.lex()||ge;if(typeof I!=="number"){if(I instanceof Array)c=I,I=c.pop();I=i.symbols_[I]||I}return I}t(de,"lex");var v,ie,H,L,je,re,X={},Q,P,pe,Z;while(!0){if(H=o[o.length-1],this.defaultActions[H])L=this.defaultActions[H];else{if(v===null||typeof v>"u")v=de();L=G[H]&&G[H][v]}if(typeof L>"u"||!L.length||!L[0]){var se="";Z=[];for(Q in G[H])if(this.terminals_[Q]&&Q>be)Z.push("'"+this.terminals_[Q]+"'");if(_.showPosition)se="Parse error on line "+(q+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
|
-
Expecting `+Z.join(", ")+", got '"+(this.terminals_[
|
|
3
|
+
Expecting `+Z.join(", ")+", got '"+(this.terminals_[v]||v)+"'";else se="Parse error on line "+(q+1)+": Unexpected "+(v==ge?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(se,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:ne,expected:Z})}if(L[0]instanceof Array&&L.length>1)throw Error("Parse Error: multiple actions possible at state: "+H+", token: "+v);switch(L[0]){case 1:if(o.push(v),p.push(_.yytext),n.push(_.yylloc),o.push(L[1]),v=null,!ie){if(he=_.yyleng,h=_.yytext,q=_.yylineno,ne=_.yylloc,ue>0)ue--}else v=ie,ie=null;break;case 2:if(P=this.productions_[L[1]][1],X.$=p[p.length-P],X._$={first_line:n[n.length-(P||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(P||1)].first_column,last_column:n[n.length-1].last_column},me)X._$.range=[n[n.length-(P||1)].range[0],n[n.length-1].range[1]];if(re=this.performAction.apply(X,[h,he,q,U.yy,L[1],p,n].concat(ye)),typeof re<"u")return re;if(P)o=o.slice(0,-1*P*2),p=p.slice(0,-1*P),n=n.slice(0,-1*P);o.push(this.productions_[L[1]][0]),p.push(X.$),n.push(X._$),pe=G[o[o.length-2]][o[o.length-1]],o.push(pe);break;case 3:return!0}}return!0},"parse")},ee=function(){var T={EOF:1,parseError:t(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw Error(i)},"parseError"),setInput:t(function(r,i){if(this.yy=i||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var i=r.match(/(?:\r\n?|\n).*/g);if(i)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),r},"input"),unput:t(function(r){var i=r.length,o=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1)this.yylineno-=o.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-i];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(r){this.unput(this.match.slice(r))},"less"),pastInput:t(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var r=this.pastInput(),i=Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
5
|
`+i+"^"},"showPosition"),test_match:t(function(r,i){var o,c,p;if(this.options.backtrack_lexer){if(p={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)p.yylloc.range=this.yylloc.range.slice(0)}if(c=r[0].match(/(?:\r\n?|\n).*/g),c)this.yylineno+=c.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(o)return o;else if(this._backtrack){for(var n in p)this[n]=p[n];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,i,o,c;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var n=0;n<p.length;n++)if(o=this._input.match(this.rules[p[n]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=n,this.options.backtrack_lexer)if(r=this.test_match(o,p[n]),r!==!1)return r;else if(this._backtrack){i=!1;continue}else return!1;else if(!this.options.flex)break}if(i){if(r=this.test_match(i,p[c]),r!==!1)return r;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var i=this.next();if(i)return i;else return this.lex()},"lex"),begin:t(function(i){this.conditionStack.push(i)},"begin"),popState:t(function(){var i=this.conditionStack.length-1;if(i>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(i){if(i=this.conditionStack.length-1-Math.abs(i||0),i>=0)return this.conditionStack[i];else return"INITIAL"},"topState"),pushState:t(function(i){this.begin(i)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(i,o,c,p){var n=p;switch(c){case 0:return this.pushState("shapeData"),o.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let
|
|
7
|
-
`))
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var i=this.next();if(i)return i;else return this.lex()},"lex"),begin:t(function(i){this.conditionStack.push(i)},"begin"),popState:t(function(){var i=this.conditionStack.length-1;if(i>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(i){if(i=this.conditionStack.length-1-Math.abs(i||0),i>=0)return this.conditionStack[i];else return"INITIAL"},"topState"),pushState:t(function(i){this.begin(i)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(i,o,c,p){var n=p;switch(c){case 0:return this.pushState("shapeData"),o.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let G=/\n\s*/g;return o.yytext=o.yytext.replace(G,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return i.getLogger().trace("Found comment",o.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return i.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:i.getLogger().trace("end icon"),this.popState();break;case 16:return i.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return i.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";break;case 36:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return i.getLogger().trace("Long description:",o.yytext),21;break;case 42:return i.getLogger().trace("Long description:",o.yytext),21;break}},"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}}};return T}();F.lexer=ee;function z(){this.yy={}}return t(z,"Parser"),z.prototype=F,F.Parser=z,new z}();ae.parser=ae;var Ee=ae,C=[],ce=[],oe=0,le={},_e=t(()=>{C=[],ce=[],oe=0,le={}},"clear"),Se=t((e)=>{if(C.length===0)return null;let f=C[0].level,m=null;for(let s=C.length-1;s>=0;s--){if(C[s].level===f&&!m)m=C[s];if(C[s].level<f)throw Error('Items without section detected, found section ("'+C[s].label+'")')}if(e===m?.level)return null;return m},"getSection"),fe=t(function(){return ce},"getSections"),Ne=t(function(){let e=[],f=[],m=fe(),s=l();for(let y of m){let N={id:y.id,label:O(y.label??"",s),labelType:"markdown",isGroup:!0,ticket:y.ticket,shape:"kanbanSection",level:y.level,look:s.look};f.push(N);let S=C.filter((g)=>g.parentId===y.id);for(let g of S){let w={id:g.id,parentId:y.id,label:O(g.label??"",s),labelType:"markdown",isGroup:!1,ticket:g?.ticket,priority:g?.priority,assigned:g?.assigned,icon:g?.icon,shape:"kanbanItem",level:g.level,rx:5,ry:5,cssStyles:["text-align: left"]};f.push(w)}}return{nodes:f,edges:e,other:{},config:l()}},"getData"),xe=t((e,f,m,s,y)=>{let N=l(),S=N.mindmap?.padding??M.mindmap.padding;switch(s){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:S*=2}let g={id:O(f,N)||"kbn"+oe++,level:e,label:O(m,N),width:N.mindmap?.maxNodeWidth??M.mindmap.maxNodeWidth,padding:S,isGroup:!1};if(y!==void 0){let R;if(!y.includes(`
|
|
7
|
+
`))R=`{
|
|
8
8
|
`+y+`
|
|
9
|
-
}`;else
|
|
10
|
-
`;let b=
|
|
11
|
-
`+e);let
|
|
9
|
+
}`;else R=y+`
|
|
10
|
+
`;let b=nt(R,{schema:tt});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);if(b?.shape&&b.shape==="kanbanItem")g.shape=b?.shape;if(b?.label)g.label=b?.label;if(b?.icon)g.icon=b?.icon.toString();if(b?.assigned)g.assigned=b?.assigned.toString();if(b?.ticket)g.ticket=b?.ticket.toString();if(b?.priority)g.priority=b?.priority}let w=Se(e);if(w)g.parentId=w.id||"kbn"+oe++;else ce.push(g);C.push(g)},"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=t((e,f)=>{switch(a.debug("In get type",e,f),e){case"[":return E.RECT;case"(":return f===")"?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}},"getType"),De=t((e,f)=>{le[e]=f},"setElementForId"),Le=t((e)=>{if(!e)return;let f=l(),m=C[C.length-1];if(e.icon)m.icon=O(e.icon,f);if(e.class)m.cssClasses=O(e.class,f)},"decorateNode"),Oe=t((e)=>{switch(e){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ie=t(()=>a,"getLogger"),Ce=t((e)=>le[e],"getElementById"),we={clear:_e,addNode:xe,getSections:fe,getData:Ne,nodeType:E,getType:ve,setElementForId:De,decorateNode:Le,type2Str:Oe,getLogger:Ie,getElementById:Ce},Ae=we,Te=t(async(e,f,m,s)=>{a.debug(`Rendering kanban diagram
|
|
11
|
+
`+e);let N=s.db.getData(),S=l();S.htmlLabels=!1;let g=V(f);for(let k of N.nodes)k.domId=`${f}-${k.id}`;let w=g.append("g");w.attr("class","sections");let R=g.append("g");R.attr("class","items");let b=N.nodes.filter((k)=>k.isGroup),B=0,x=10,Y=[],D=25;for(let k of b){let j=S?.kanban?.sectionWidth||200;B=B+1,k.x=j*B+(B-1)*x/2,k.width=j,k.y=0,k.height=j*3,k.rx=5,k.ry=5,k.cssClasses=k.cssClasses+" section-"+B;let A=await Qt(w,k);D=Math.max(D,A?.labelBBox?.height),Y.push(A)}let W=0;for(let k of b){let j=Y[W];W=W+1;let A=S?.kanban?.sectionWidth||200,J=-A*3/2+D,F=J,ee=N.nodes.filter((r)=>r.parentId===k.id);for(let r of ee){if(r.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");r.x=k.x,r.width=A-1.5*x;let o=(await Tt(R,r,{config:S})).node().getBBox();r.y=F+o.height/2,await bt(r),F=r.y+o.height/2+x/2}let z=j.cluster.select("rect"),T=Math.max(F-J+3*x,50)+(D-25);z.attr("height",T)}yt(void 0,g,S.mindmap?.padding??M.kanban.padding,S.mindmap?.useMaxWidth??M.kanban.useMaxWidth)},"draw"),Re={draw:Te},Pe=t((e)=>{let f="";for(let s=0;s<e.THEME_COLOR_LIMIT;s++)if(e["lineColor"+s]=e["lineColor"+s]||e["cScaleInv"+s],K(e["lineColor"+s]))e["lineColor"+s]=u(e["lineColor"+s],20);else e["lineColor"+s]=d(e["lineColor"+s],20);let m=t((s,y)=>e.darkMode?d(s,y):u(s,y),"adjuster");for(let s=0;s<e.THEME_COLOR_LIMIT;s++){let y=""+(17-3*s);f+=`
|
|
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: ${m(e["cScale"+s],10)};
|
|
14
14
|
stroke: ${m(e["cScale"+s],10)};
|
|
@@ -85,5 +85,5 @@ Expecting `+Z.join(", ")+", got '"+(this.terminals_[D]||D)+"'";else se="Parse er
|
|
|
85
85
|
dominant-baseline: middle;
|
|
86
86
|
text-align: center;
|
|
87
87
|
}
|
|
88
|
-
${
|
|
88
|
+
${qe()}
|
|
89
89
|
`,"getStyles"),Be=Ve,it={db:Ae,renderer:Re,parser:Ee,styles:Be};export{it as diagram};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`),e=new Map,i=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){i=g;break}if(i===-1)return{text:n,lineMap:e};let c=[];for(let g=i+1;g<r.length;g++){let d=r[g];if(d.trim()===""||W.test(d)||H.test(d))continue;if(
|
|
3
|
-
`),lineMap:e}}t(j,"preprocessBoxDrawing");var b=new
|
|
1
|
+
import{pn}from"./chunk-q8v5j963.js";import{G}from"./chunk-p1yc8hwn.js";import{t,a,M,x,O,F,C,S,E,T,A,L,R,V,An,rt,U}from"./chunk-e763h2px.js";import{Q}from"./chunk-xjc5fmcr.js";var z=/[─━│┃└┗├┣]/,Y=/[└┗├┣]/,ee=/[─━]/,_=/^[\s│┃]+$/,H=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,W=/^\s*%%/,te=" ";function P(n){return n.some((r)=>z.test(r))}t(P,"isBoxDrawingFormat");function Z(n){for(let r of n){let e=Y.exec(r);if(e?.index&&e.index>0)return e.index}return 4}t(Z,"inferSegmentWidth");function q(n,r){return n.replace(/\bline\s+(\d+)\b/gi,(e,i)=>{let c=parseInt(i,10),o=r.get(c);return o?`line ${o}`:e})}t(q,"remapErrorLines");function j(n){let r=n.split(`
|
|
2
|
+
`),e=new Map,i=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){i=g;break}if(i===-1)return{text:n,lineMap:e};let c=[];for(let g=i+1;g<r.length;g++){let d=r[g];if(d.trim()===""||W.test(d)||H.test(d))continue;if(_.test(d))continue;c.push(d.replace(/\t/g," "))}if(!P(c))return{text:n,lineMap:e};let o=Z(c),s=[],l=0;for(let g=0;g<=i;g++)s.push(r[g]),l++,e.set(l,g+1);for(let g=i+1;g<r.length;g++){let d=r[g],p=d.trim(),f=g+1;if(p===""){s.push(d),l++,e.set(l,f);continue}if(W.test(d)){s.push(d),l++,e.set(l,f);continue}if(H.test(d)){s.push(d),l++,e.set(l,f);continue}if(_.test(d))continue;let h=d.replace(/\t/g," "),w=Y.exec(h);if(w?.index!==void 0){let u=w.index,v=Math.round(u/o)+1,m=u+1;while(m<h.length&&ee.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let I=h.slice(m).trimEnd();if(!I)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let K=te.repeat(v);s.push(K+I),l++,e.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(z.test(h))s.push(d),l++,e.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else s.push(d),l++,e.set(l,f)}return{text:s.join(`
|
|
3
|
+
`),lineMap:e}}t(j,"preprocessBoxDrawing");var b=new pn(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),re=t(()=>{b.reset(),C()},"clear"),ne=t(()=>b.records.stack[0],"getRoot"),ie=t(()=>b.records.cnt,"getCount"),oe=M.treeView,se=t(()=>U(oe,x().treeView),"getConfig"),ae=t((n,r,e,i,c,o)=>{while(n<=b.records.stack[b.records.stack.length-1].level)b.records.stack.pop();let s={id:b.records.cnt++,level:n,name:r,nodeType:e,icon:c,cssClass:i,description:o,children:[]};b.records.stack[b.records.stack.length-1].children.push(s),b.records.stack.push(s)},"addNode"),ce={clear:re,addNode:ae,getRoot:ne,getCount:ie,getConfig:se,getAccTitle:E,getAccDescription:A,getDiagramTitle:R,setAccDescription:T,setAccTitle:S,setDiagramTitle:L},B=ce,le=t((n)=>{G(n,B);for(let r of n.nodes){let e=typeof r.indent==="number"?r.indent:0,i=r.name,c=i.endsWith("/");if(c)i=i.slice(0,-1);let o=c?"directory":"file",s=r.classAnnotation||void 0,l=r.iconAnnotation,g=l!==void 0?l||"none":void 0,d=r.descAnnotation||void 0,p=d?O(d,x()):void 0;B.addNode(e,i,o,s,g,p)}},"populate"),de={parse:t(async(n)=>{let{text:r,lineMap:e}=j(n);try{let i=await Q("treeView",r);a.debug(i),le(i)}catch(i){if(e.size>0&&i instanceof Error)i.message=q(i.message,e);throw i}},"parse")},y={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function J(n,r){let e=r?.filenameIcons?.[n];if(e)return e;let i=n.lastIndexOf(".");if(i>0){let c=n.substring(i).toLowerCase(),o=r?.extensionIcons;return o?.[c]??o?.[c.slice(1)]}return}t(J,"detectIcon");function k(n,r){if(n.includes(":"))return n;if(n in y.icons||!r)return`${y.prefix}:${n}`;return`${r}:${n}`}t(k,"qualifyIcon");function D(n,r){if(n.icon==="none")return;if(n.icon)return k(n.icon,r.defaultIconPack);if(!r.showIcons)return;if(n.nodeType==="file"){let e=J(n.name,r);if(e==="none")return;if(e)return k(e,r.defaultIconPack)}return`${y.prefix}:${n.nodeType==="directory"?"folder":"file"}`}t(D,"getNodeIcon");An([{name:y.prefix,icons:y}]);var N=14,he=4,pe=16,fe=t(async(n,r)=>{let e=[],i=t((o)=>{let s=D(o,r);if(s)e.push({icon:s,node:o});o.children.forEach(i)},"collect");i(n);let c=await Promise.all(e.map(async({icon:o,node:s})=>({id:s.id,svg:await rt(o,{height:N,width:N})})));return new Map(c.map(({id:o,svg:s})=>[o,s]))},"resolveNodeIcons"),ge=t((n,r,e,i,c,o)=>{let s=i.append("g"),l="treeView-node-label";if(e.nodeType==="directory")l+=" treeView-node-dir";if(e.cssClass)l+=` ${e.cssClass}`;let g=N+he,d=D(e,c),p=d!==void 0;if(d)s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+c.paddingX}, ${r+c.paddingY})`).html(o.get(e.id)??"");let f=s.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,v=n+c.paddingX+(p?g:0);f.attr("x",v),f.attr("y",r+u/2);let m=v+w,I=w+c.paddingX*2+(p?g:0);if(e.BBox={x:n,y:r,width:I,height:u},e.cssClass?.split(/\s+/).includes("highlight"))s.insert("rect",":first-child").attr("x",n).attr("y",r+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:e,nodeGroup:s,labelRightEdge:m,centerY:r+u/2}},"positionLabel"),X=t((n,r,e,i,c,o)=>n.append("line").attr("x1",r).attr("y1",e).attr("x2",i).attr("y2",c).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),ue=t((n,r,e,i)=>{let c=0,o=0,s=[],l=t((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),v=ge(u,c,f,p,h,i);s.push(v);let{height:m,width:I}=f.BBox;X(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),o=Math.max(o,u+I),c+=m},"drawNode"),g=t((p,f=0)=>{l(n,p,e,f),p.children.forEach((v)=>{g(v,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:v,height:m}=p.children[p.children.length-1].BBox;X(n,h+e.paddingX,w+u,h+e.paddingX,v+m/2+e.lineThickness/2,e.lineThickness)}},"processNode");g(r);let d=s.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...s.map((h)=>h.labelRightEdge))+pe;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();o=Math.max(o,f+u.width+e.paddingX)}}for(let p of s)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=o-p.node.BBox.x+8;f.attr("width",h),o=Math.max(o,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:o}},"drawTree"),me=t(async(n,r,e,i)=>{a.debug(`Rendering treeView diagram
|
|
4
4
|
`+n);let c=i.db,o=c.getRoot(),s=c.getConfig(),l=V(r),g=l.append("g");g.attr("class","tree-view");let d=await fe(o,s),{totalHeight:p,totalWidth:f}=ue(g,o,s,d);l.attr("viewBox",`-${s.lineThickness/2} 0 ${f} ${p}`),F(l,p,f,s.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=t(({treeView:n})=>{let{labelFontSize:r,labelColor:e,lineColor:i,iconColor:c,descriptionColor:o,highlightBg:s,highlightStroke:l}=U(ve,n);return`
|
|
5
5
|
.treeView-node-label {
|
|
6
6
|
font-size: ${r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,a}from"./chunk-e763h2px.js";import{J,It,Dt}from"./chunk-ppjw1mps.js";import{G}from"./chunk-p1yc8hwn.js";import{tr,_t}from"./chunk-xjc5fmcr.js";var o=tr().Railroad.parser.LangiumParser,n=t((e)=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let r=e.elements.map(n);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{let r=e.alternatives.map(n);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:n(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:n(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:n(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),l=t((e)=>({name:e.name,definition:n(e.definition)}),"transformRule"),s=t((e)=>{if(G(e,J),e.title)J.setTitle(e.title);e.rules.map((r)=>J.addRule(l(r)))},"populateDb"),m={parse:t((e)=>{J.clear(),a.debug("[Railroad Parser] Starting Langium parse");let r=o.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new _t(r);let i=r.value;a.debug("[Railroad Parser] Parsed rules:",i.rules.length),s(i),a.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:J}},R={parser:m,db:J,renderer:Dt,styles:It};export{R as diagram};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{t,b,F,C,S,E,T,A,L,R,l,V,
|
|
1
|
+
import{t,b,F,C,S,E,T,A,L,R,l,V,Ge,m}from"./chunk-e763h2px.js";var dt=function(){var e=t(function(H,i,n,s){for(n=n||{},s=H.length;s--;n[H[s]]=i);return n},"o"),y=[1,4],r=[1,14],o=[1,12],h=[1,13],f=[6,7,8],g=[1,20],d=[1,18],x=[1,19],u=[6,7,11],_=[1,6,13,14],w=[1,23],I=[1,24],M=[1,6,7,11,13,14],Z={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(i,n,s,c,p,a,P){var v=a.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(a[v-1].length,a[v].trim());break;case 16:c.addNode(0,a[v].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:y},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:y},{6:r,7:[1,10],9:9,12:11,13:o,14:h},e(f,[2,3]),{1:[2,2]},e(f,[2,4]),e(f,[2,5]),{1:[2,6],6:r,12:15,13:o,14:h},{6:r,9:16,12:11,13:o,14:h},{6:g,7:d,10:17,11:x},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:g,7:d,10:22,11:x},{1:[2,7],6:r,12:15,13:o,14:h},e(_,[2,14],{7:w,11:I}),e(M,[2,8]),e(M,[2,9]),e(M,[2,10]),e(u,[2,15]),e(_,[2,13],{7:w,11:I}),e(M,[2,11]),e(M,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(i,n){if(n.recoverable)this.trace(i);else{var s=Error(i);throw s.hash=n,s}},"parseError"),parse:t(function(i){var n=this,s=[0],c=[],p=[null],a=[],P=this.table,v="",W=0,B=0,O=0,j=2,Y=1,rt=a.slice.call(arguments,1),k=Object.create(this.lexer),N={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))N.yy[q]=this.yy[q];if(k.setInput(i,N.yy),N.yy.lexer=k,N.yy.parser=this,typeof k.yylloc>"u")k.yylloc={};var Q=k.yylloc;a.push(Q);var lt=k.options&&k.options.ranges;if(typeof N.yy.parseError==="function")this.parseError=N.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(U){s.length=s.length-2*U,p.length=p.length-U,a.length=a.length-U}t(xt,"popStack");function yt(){var U=c.pop()||k.lex()||Y;if(typeof U!=="number"){if(U instanceof Array)c=U,U=c.pop();U=n.symbols_[U]||U}return U}t(yt,"lex");var z,ot,J,G,Vt,ht,tt={},st,K,ft,nt;while(!0){if(J=s[s.length-1],this.defaultActions[J])G=this.defaultActions[J];else{if(z===null||typeof z>"u")z=yt();G=P[J]&&P[J][z]}if(typeof G>"u"||!G.length||!G[0]){var ct="";nt=[];for(st in P[J])if(this.terminals_[st]&&st>j)nt.push("'"+this.terminals_[st]+"'");if(k.showPosition)ct="Parse error on line "+(W+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+nt.join(", ")+", got '"+(this.terminals_[z]||z)+"'";else ct="Parse error on line "+(W+1)+": Unexpected "+(z==Y?"end of input":"'"+(this.terminals_[z]||z)+"'");this.parseError(ct,{text:k.match,token:this.terminals_[z]||z,line:k.yylineno,loc:Q,expected:nt})}if(G[0]instanceof Array&&G.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+z);switch(G[0]){case 1:if(s.push(z),p.push(k.yytext),a.push(k.yylloc),s.push(G[1]),z=null,!ot){if(B=k.yyleng,v=k.yytext,W=k.yylineno,Q=k.yylloc,O>0)O--}else z=ot,ot=null;break;case 2:if(K=this.productions_[G[1]][1],tt.$=p[p.length-K],tt._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},lt)tt._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]];if(ht=this.performAction.apply(tt,[v,B,W,N.yy,G[1],p,a].concat(rt)),typeof ht<"u")return ht;if(K)s=s.slice(0,-1*K*2),p=p.slice(0,-1*K),a=a.slice(0,-1*K);s.push(this.productions_[G[1]][0]),p.push(tt.$),a.push(tt._$),ft=P[s[s.length-2]][s[s.length-1]],s.push(ft);break;case 3:return!0}}return!0},"parse")},X=function(){var H={EOF:1,parseError:t(function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw Error(n)},"parseError"),setInput:t(function(i,n){if(this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);if(n)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),i},"input"),unput:t(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1)this.yylineno-=s.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===c.length?this.yylloc.first_column:0)+c[c.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(i){this.unput(this.match.slice(i))},"less"),pastInput:t(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var i=this.pastInput(),n=Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
5
|
`+n+"^"},"showPosition"),test_match:t(function(i,n){var s,c,p;if(this.options.backtrack_lexer){if(p={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)p.yylloc.range=this.yylloc.range.slice(0)}if(c=i[0].match(/(?:\r\n?|\n).*/g),c)this.yylineno+=c.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],s=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(s)return s;else if(this._backtrack){for(var a in p)this[a]=p[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var i,n,s,c;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var a=0;a<p.length;a++)if(s=this._input.match(this.rules[p[a]]),s&&(!n||s[0].length>n[0].length)){if(n=s,c=a,this.options.backtrack_lexer)if(i=this.test_match(s,p[a]),i!==!1)return i;else if(this._backtrack){n=!1;continue}else return!1;else if(!this.options.flex)break}if(n){if(i=this.test_match(n,p[c]),i!==!1)return i;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(n,s,c,p){var a=p;switch(c){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return H}();Z.lexer=X;function D(){this.yy={}}return t(D,"Parser"),D.prototype=Z,Z.Parser=D,new D}();dt.parser=dt;var vt=dt,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,C()}getRoot(){return this.root}addNode(e,y){let r=b.sanitizeText(y,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],L(r);return}this.baseLevel??=e;let o=e-this.baseLevel+1;if(o<=0)o=1;while(this.stack.length>1&&this.stack[this.stack.length-1].level>=o)this.stack.pop();let h=this.stack[this.stack.length-1].node,f={text:r,children:[]};h.children.push(f),this.stack.push({level:o,node:f})}getAccTitle(){return E()}setAccTitle(e){S(e)}getAccDescription(){return A()}setAccDescription(e){T(e)}getDiagramTitle(){return R()}setDiagramTitle(e){L(e)}},Et=14,et=250,$t=30,At=60,It=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=t((e,y,r)=>{let o=e.node().getBBox(),h=o.width+y*2,f=o.height+y*2;F(e,f,h,r),e.attr("viewBox",`${o.x-y} ${o.y-y} ${h} ${f}`)},"applyPaddedViewBox"),Lt=t((e,y,r,o)=>{let f=o.db.getRoot();if(!f)return;let g=l(),{look:d,handDrawnSeed:x,themeVariables:u}=g,_=
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(n,s,c,p){var a=p;switch(c){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return H}();Z.lexer=X;function D(){this.yy={}}return t(D,"Parser"),D.prototype=Z,Z.Parser=D,new D}();dt.parser=dt;var vt=dt,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,C()}getRoot(){return this.root}addNode(e,y){let r=b.sanitizeText(y,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],L(r);return}this.baseLevel??=e;let o=e-this.baseLevel+1;if(o<=0)o=1;while(this.stack.length>1&&this.stack[this.stack.length-1].level>=o)this.stack.pop();let h=this.stack[this.stack.length-1].node,f={text:r,children:[]};h.children.push(f),this.stack.push({level:o,node:f})}getAccTitle(){return E()}setAccTitle(e){S(e)}getAccDescription(){return A()}setAccDescription(e){T(e)}getDiagramTitle(){return R()}setDiagramTitle(e){L(e)}},Et=14,et=250,$t=30,At=60,It=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=t((e,y,r)=>{let o=e.node().getBBox(),h=o.width+y*2,f=o.height+y*2;F(e,f,h,r),e.attr("viewBox",`${o.x-y} ${o.y-y} ${h} ${f}`)},"applyPaddedViewBox"),Lt=t((e,y,r,o)=>{let f=o.db.getRoot();if(!f)return;let g=l(),{look:d,handDrawnSeed:x,themeVariables:u}=g,_=Ge(g.fontSize)[0]??Et,w=d==="handDrawn",I=f.children??[],M=g.ishikawa?.diagramPadding??20,Z=g.ishikawa?.useMaxWidth??!1,X=V(y),D=X.append("g").attr("class","ishikawa"),H=w?m.svg(X.node()):void 0,i=H?{roughSvg:H,seed:x??0,lineColor:u?.lineColor??"#333",fillColor:u?.mainBkg??"#fff"}:void 0,n=`ishikawa-arrow-${y}`;if(!w)D.append("defs").append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let s=0,c=et,p=w?void 0:it(D,s,c,s,c,"ishikawa-spine");if(Tt(D,s,c,f.text,_,i),!I.length){if(w)it(D,s,c,s,c,"ishikawa-spine",i);kt(X,M,Z);return}s-=20;let a=I.filter((k,N)=>N%2===0),P=I.filter((k,N)=>N%2===1),v=mt(a),W=mt(P),B=v.total+W.total,O=et,j=et;if(B>0){let k=et*2,N=et*0.3;O=Math.max(N,k*(v.total/B)),j=Math.max(N,k*(W.total/B))}let Y=_*2;if(O=Math.max(O,v.max*Y),j=Math.max(j,W.max*Y),c=Math.max(O,et),p)p.attr("y1",c).attr("y2",c);D.select(".ishikawa-head-group").attr("transform",`translate(0,${c})`);let rt=Math.ceil(I.length/2);for(let k=0;k<rt;k++){let N=D.append("g").attr("class","ishikawa-pair");for(let[q,Q,lt]of[[I[k*2],-1,O],[I[k*2+1],1,j]])if(q)Bt(N,q,s,c,Q,lt,_,i);s=N.selectAll("text").nodes().reduce((q,Q)=>Math.min(q,Q.getBBox().x),1/0)}if(w)it(D,s,c,0,c,"ishikawa-spine",i);else{p.attr("x1",s);let k=`url(#${n})`;D.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",k)}kt(X,M,Z)},"draw"),mt=t((e)=>{let y=t((r)=>r.children.reduce((o,h)=>o+1+y(h),0),"countDescendants");return e.reduce((r,o)=>{let h=y(o);return r.total+=h,r.max=Math.max(r.max,h),r},{total:0,max:0})},"sideStats"),Tt=t((e,y,r,o,h,f)=>{let g=Math.max(6,Math.floor(110/(h*0.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${y},${r})`),x=at(d,_t(o,g),0,0,"ishikawa-head-label","start",h),u=x.node().getBBox(),_=Math.max(60,u.width+6),w=Math.max(40,u.height*2+40),I=`M 0 ${-w/2} L 0 ${w/2} Q ${_*2.4} 0 0 ${-w/2} Z`;if(f){let M=f.roughSvg.path(I,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>M,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",I);x.attr("transform",`translate(${(_-u.width)/2-u.x+3},${-u.y-u.height/2})`)},"drawHead"),Mt=t((e,y)=>{let r=[],o=[],h=t((f,g,d)=>{let x=y===-1?[...f].reverse():f;for(let u of x){let _=r.length,w=u.children??[];if(r.push({depth:d,text:_t(u.text,15),parentIndex:g,childCount:w.length}),d%2===0){if(o.push(_),w.length)h(w,_,d+1)}else{if(w.length)h(w,_,d+1);o.push(_)}}},"walk");return h(e,-1,2),{entries:r,yOrder:o}},"flattenTree"),Pt=t((e,y,r,o,h,f,g)=>{let d=e.append("g").attr("class","ishikawa-label-group"),u=at(d,y,r,o+11*h,"ishikawa-label cause","middle",f).node().getBBox();if(g){let _=g.roughSvg.rectangle(u.x-20,u.y-2,u.width+40,u.height+4,{roughness:1.5,seed:g.seed,fill:g.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:g.lineColor,strokeWidth:2});d.insert(()=>_,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",u.x-20).attr("y",u.y-2).attr("width",u.width+40).attr("height",u.height+4)},"drawCauseLabel"),ut=t((e,y,r,o,h,f)=>{let g=Math.sqrt(o*o+h*h);if(g===0)return;let d=o/g,x=h/g,u=6,_=-x*u,w=d*u,I=y,M=r,Z=`M ${I} ${M} L ${I-d*u*2+_} ${M-x*u*2+w} L ${I-d*u*2-_} ${M-x*u*2-w} Z`,X=f.roughSvg.path(Z,{roughness:1,seed:f.seed,fill:f.lineColor,fillStyle:"solid",stroke:f.lineColor,strokeWidth:1});e.append(()=>X)},"drawArrowMarker"),Bt=t((e,y,r,o,h,f,g,d)=>{let x=y.children??[],u=f*(x.length?1:0.2),_=-pt*u,w=gt*u*h,I=r+_,M=o+w;if(it(e,r,o,I,M,"ishikawa-branch",d),d)ut(e,r,o,r-I,o-M,d);if(Pt(e,y.text,I,M,h,g,d),!x.length)return;let{entries:Z,yOrder:X}=Mt(x,h),D=Z.length,H=Array(D);for(let[p,a]of X.entries())H[a]=o+w*((p+1)/(D+1));let i=new Map;i.set(-1,{x0:r,y0:o,x1:I,y1:M,childCount:x.length,childrenDrawn:0});let n=-pt,s=gt*h,c=h<0?"ishikawa-label up":"ishikawa-label down";for(let[p,a]of Z.entries()){let P=H[p],v=i.get(a.parentIndex),W=e.append("g").attr("class","ishikawa-sub-group"),B=0,O=0,j=0;if(a.depth%2===0){let Y=v.y1-v.y0;if(B=wt(v.x0,v.x1,Y?(P-v.y0)/Y:0.5),O=P,j=B-(a.childCount>0?At+a.childCount*It:$t),it(W,B,P,j,P,"ishikawa-sub-branch",d),d)ut(W,B,P,1,0,d);at(W,a.text,j,P,"ishikawa-label align","end",g)}else{let Y=v.childrenDrawn++;if(B=wt(v.x0,v.x1,(v.childCount-Y)/(v.childCount+1)),O=v.y0,j=B+n*((P-O)/s),it(W,B,O,j,P,"ishikawa-sub-branch",d),d)ut(W,B,O,B-j,O-P,d);at(W,a.text,j,P,c,"end",g)}if(a.childCount>0)i.set(p,{x0:B,y0:O,x1:j,y1:P,childCount:a.childCount,childrenDrawn:0})}},"drawBranch"),Nt=t((e)=>e.split(/<br\s*\/?>|\n/),"splitLines"),_t=t((e,y)=>{if(e.length<=y)return e;let r=[];for(let o of e.split(/\s+/)){let h=r.length-1;if(h>=0&&r[h].length+1+o.length<=y)r[h]+=" "+o;else r.push(o)}return r.join(`
|
|
7
7
|
`)},"wrapText"),at=t((e,y,r,o,h,f,g)=>{let d=Nt(y),x=g*1.05,u=e.append("text").attr("class",h).attr("text-anchor",f).attr("x",r).attr("y",o-(d.length-1)*x/2);for(let[_,w]of d.entries())u.append("tspan").attr("x",r).attr("dy",_===0?0:x).text(w);return u},"drawMultilineText"),wt=t((e,y,r)=>e+(y-e)*r,"lerp"),it=t((e,y,r,o,h,f,g)=>{if(g){let d=g.roughSvg.line(y,r,o,h,{roughness:1.5,seed:g.seed,stroke:g.lineColor,strokeWidth:2});e.append(()=>d).attr("class",f);return}return e.append("line").attr("class",f).attr("x1",y).attr("y1",r).attr("x2",o).attr("y2",h)},"drawLine"),Dt={draw:Lt},Ot=t((e)=>`
|
|
8
8
|
.ishikawa .ishikawa-spine,
|
|
9
9
|
.ishikawa .ishikawa-branch,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Lt}from"./chunk-ngt1j8py.js";var Z={};Lt(Z,{default:()=>St});var Q={};Lt(Q,{default:()=>Ht});var Kr=typeof global=="object"&&global&&global.Object===Object&&global,q=Kr;var Hr=typeof self=="object"&&self&&self.Object===Object&&self,qr=q||Hr||Function("return this")(),xe=qr;var $r=xe.Symbol,Oe=$r;var Tt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=Tt,G=Oe?Oe.toStringTag:void 0;function Xr(t){var e=kr.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(f){}var a=Yr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var wt=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var Pt=Qr;var Vr="[object Null]",to="[object Undefined]",Et=Oe?Oe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return Et&&Et in Object(t)?wt(t):Pt(t)}var Ke=eo;function ro(t){return t!=null&&typeof t=="object"}var Ee=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Ee(t)&&Ke(t)==oo}var dt=ao;function fo(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var Wt=fo;var io=Array.isArray,H=io;var no=1/0,It=Oe?Oe.prototype:void 0,jt=It?It.toString:void 0;function Mt(t){if(typeof t=="string")return t;if(H(t))return Wt(t,Mt)+"";if(dt(t))return jt?jt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Nt=Mt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var me=so;function po(t){return t}var ot=po;var uo="[object AsyncFunction]",mo="[object Function]",lo="[object GeneratorFunction]",xo="[object Proxy]";function ho(t){if(!me(t))return!1;var e=Ke(t);return e==mo||e==lo||e==uo||e==xo}var Gt=ho;var co=xe["__core-js_shared__"],k=co;var Dt=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Dt&&Dt in t}var Rt=go;var yo=Function.prototype,_o=yo.toString;function bo(t){if(t!=null){try{return _o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var _=bo;var vo=/[\\^$.*+?()[\]{}|]/g,Oo=/^\[object .+?Constructor\]$/,Ao=Function.prototype,To=Object.prototype,wo=Ao.toString,So=To.hasOwnProperty,Po=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(t){if(!me(t)||Rt(t))return!1;var e=Gt(t)?Po:Oo;return e.test(_(t))}var Ft=Co;function Eo(t,e){return t==null?void 0:t[e]}var Bt=Eo;function Io(t,e){var r=Bt(t,e);return Ft(r)?r:void 0}var x=Io;var Lo=x(xe,"WeakMap"),Y=Lo;function jo(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Ut=jo;function Mo(){}var zt=Mo;var No=800,Do=16,Ro=Date.now;function Fo(t){var e=0,r=0;return function(){var o=Ro(),a=Do-(o-r);if(r=o,a>0){if(++e>=No)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Kt=Fo;function Bo(t){return function(){return t}}var st=Bo;var Go=function(){try{var t=x(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),cr=Go;var Uo=!cr?ot:function(t,e){return cr(t,"toString",{configurable:!0,enumerable:!1,value:st(e),writable:!0})},qt=Uo;var zo=Kt(qt),ha=zo;function Wo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var ga=Wo;function Ko(t,e,r,o){var a=t.length,f=r+(o?1:-1);while(o?f--:++f<a)if(e(t[f],f,t))return f;return-1}var ya=Ko;function Ho(t){return t!==t}var kt=Ho;function qo(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Jt=qo;function $o(t,e,r){return e===e?Jt(t,e,r):ya(t,kt,r)}var Qt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Qt(t,e,0)>-1}var Vt=ko;var Yo=9007199254740991,Xo=/^(?:0|[1-9]\d*)$/;function Zo(t,e){var r=typeof t;return e=e==null?Yo:e,!!e&&(r=="number"||r!="symbol"&&Xo.test(t))&&(t>-1&&t%1==0&&t<e)}var yn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var Ct=Jo;var te=Math.max;function Qo(t,e,r){return e=te(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,f=te(o.length-e,0),i=Array(f);while(++a<f)i[a]=o[e+a];a=-1;var n=Array(e+1);while(++a<e)n[a]=o[a];return n[e]=r(i),Ut(t,this,n)}}var va=Qo;function Vo(t,e){return ha(va(t,e,ot),t+"")}var vn=Vo;var ta=9007199254740991;function ea(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ta}var j=ea;function ra(t){return t!=null&&j(t.length)&&!Gt(t)}var $e=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var bn=aa;function fa(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var ee=fa;var ia="[object Arguments]";function na(t){return Ee(t)&&Ke(t)==ia}var ct=na;var oe=Object.prototype,{hasOwnProperty:sa,propertyIsEnumerable:pa}=oe,ua=ct(function(){return arguments}())?ct:function(t){return Ee(t)&&sa.call(t,"callee")&&!pa.call(t,"callee")},$t=ua;function ma(){return!1}var ae=ma;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,la=fe&&fe.exports===ne,ie=la?xe.Buffer:void 0,da=ie?ie.isBuffer:void 0,ca=da||ae,St=ca;var Oa="[object Arguments]",Aa="[object Array]",Pa="[object Boolean]",Ia="[object Date]",La="[object Error]",ja="[object Function]",Ma="[object Map]",Na="[object Number]",Da="[object Object]",Ra="[object RegExp]",Fa="[object Set]",Ba="[object String]",Ga="[object WeakMap]",Ua="[object ArrayBuffer]",za="[object DataView]",Wa="[object Float32Array]",Ka="[object Float64Array]",Ha="[object Int8Array]",qa="[object Int16Array]",$a="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",u={};u[Wa]=u[Ka]=u[Ha]=u[qa]=u[$a]=u[Ya]=u[Xa]=u[Za]=u[Ja]=!0;u[Oa]=u[Aa]=u[Ua]=u[Pa]=u[za]=u[Ia]=u[La]=u[ja]=u[Ma]=u[Na]=u[Da]=u[Ra]=u[Fa]=u[Ba]=u[Ga]=!1;function Qa(t){return Ee(t)&&j(t.length)&&!!u[Ke(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var xn=Va;var pe=typeof Q=="object"&&Q&&!Q.nodeType&&Q,U=pe&&typeof J=="object"&&J&&!J.nodeType&&J,tf=U&&U.exports===pe,gt=tf&&q.process,ef=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return gt&>.binding&>.binding("util")}catch(e){}}(),Ht=ef;var ue=Ht&&Ht.isTypedArray,rf=ue?xn(ue):se,_n=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&$t(t),a=!r&&!o&&St(t),f=!r&&!o&&!a&&_n(t),i=r||o||a||f,n=i?ee(t.length,String):[],s=n.length;for(var p in t)if((e||af.call(t,p))&&!(i&&(p=="length"||a&&(p=="offset"||p=="parent")||f&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||yn(p,s))))n.push(p);return n}var ba=ff;function nf(t,e){return function(r){return t(e(r))}}var xa=nf;var sf=xa(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!bn(t))return le(t);var e=[];for(var r in Object(t))if(uf.call(t,r)&&r!="constructor")e.push(r);return e}var ur=mf;function lf(t){return $e(t)?ba(t):ur(t)}var _e=lf;var df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xf=/^\w*$/;function hf(t,e){if(H(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||dt(t))return!0;return xf.test(t)||!df.test(t)||e!=null&&t in Object(e)}var M=hf;var cf=x(Object,"create"),b=cf;function gf(){this.__data__=b?b(null):{},this.size=0}var de=gf;function yf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var he=yf;var _f="__lodash_hash_undefined__",bf=Object.prototype,vf=bf.hasOwnProperty;function Of(t){var e=this.__data__;if(b){var r=e[t];return r===_f?void 0:r}return vf.call(e,t)?e[t]:void 0}var ce=Of;var Af=Object.prototype,Tf=Af.hasOwnProperty;function wf(t){var e=this.__data__;return b?e[t]!==void 0:Tf.call(e,t)}var ge=wf;var Sf="__lodash_hash_undefined__";function Pf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Sf:e,this}var ye=Pf;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=de;N.prototype.delete=he;N.prototype.get=ce;N.prototype.has=ge;N.prototype.set=ye;var yt=N;function Cf(){this.__data__=[],this.size=0}var be=Cf;function Ef(t,e){var r=t.length;while(r--)if(Ct(t[r][0],e))return r;return-1}var O=Ef;var If=Array.prototype,Lf=If.splice;function jf(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else Lf.call(e,r,1);return--this.size,!0}var ve=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var Ae=Mf;function Nf(t){return O(this.__data__,t)>-1}var Te=Nf;function Df(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var Se=Df;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=be;D.prototype.delete=ve;D.prototype.get=Ae;D.prototype.has=Te;D.prototype.set=Se;var A=D;var Rf=x(xe,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new yt,map:new(T||A),string:new yt}}var Pe=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ce=Bf;function Gf(t,e){var r=t.__data__;return Ce(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=Gf;function Uf(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var Ie=Uf;function zf(t){return w(this,t).get(t)}var Le=zf;function Wf(t){return w(this,t).has(t)}var je=Wf;function Kf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var Me=Kf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=Pe;R.prototype.delete=Ie;R.prototype.get=Le;R.prototype.has=je;R.prototype.set=Me;var E=R;var Hf="Expected a function";function _t(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Hf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],f=r.cache;if(f.has(a))return f.get(a);var i=t.apply(this,o);return r.cache=f.set(a,i)||f,i};return r.cache=new(_t.Cache||E),r}_t.Cache=E;var Ne=_t;var qf=500;function $f(t){var e=Ne(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var De=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=De(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(kf,function(r,o,a,f){e.push(a?f.replace(Yf,"$1"):o||r)}),e}),Re=Xf;function Zf(t){return t==null?"":Nt(t)}var _a=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Re(_a(t))}var wn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||dt(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Yt=Vf;function ti(t,e){e=wn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Yt(e[r++])];return r&&r==o?t:void 0}var kn=ti;function ei(t,e,r){var o=t==null?void 0:kn(t,e);return o===void 0?r:o}var Fe=ei;function ri(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var dr=ri;var Be=Oe?Oe.isConcatSpreadable:void 0;function oi(t){return H(t)||$t(t)||!!(Be&&t&&t[Be])}var Ue=oi;function ze(t,e,r,o,a){var f=-1,i=t.length;r||(r=Ue),a||(a=[]);while(++f<i){var n=t[f];if(e>0&&r(n))if(e>1)ze(n,e-1,r,o,a);else dr(a,n);else if(!o)a[a.length]=n}return a}var pr=ze;function ai(t,e,r,o){var a=-1,f=t==null?0:t.length;if(o&&f)r=t[++a];while(++a<f)r=e(r,t[a],a,t);return r}var We=ai;function fi(){this.__data__=new A,this.size=0}var He=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var qe=ii;function ni(t){return this.__data__.get(t)}var ke=ni;function si(t){return this.__data__.has(t)}var Ye=si;var pi=200;function ui(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<pi-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Xe=ui;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=He;F.prototype.delete=qe;F.prototype.get=ke;F.prototype.has=Ye;F.prototype.set=Xe;var Zt=F;function mi(t,e){var r=-1,o=t==null?0:t.length,a=0,f=[];while(++r<o){var i=t[r];if(e(i,r,t))f[a++]=i}return f}var V=mi;function li(){return[]}var wa=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Ze=Object.getOwnPropertySymbols,hi=!Ze?wa:function(t){if(t==null)return[];return t=Object(t),V(Ze(t),function(e){return xi.call(t,e)})},mr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:dr(o,r(t))}var ka=ci;function gi(t){return ka(t,_e,mr)}var jr=gi;var yi=x(xe,"DataView"),tt=yi;var _i=x(xe,"Promise"),et=_i;var bi=x(xe,"Set"),S=bi;var Je="[object Map]",vi="[object Object]",Ve="[object Promise]",tr="[object Set]",er="[object WeakMap]",rr="[object DataView]",Oi=_(tt),Ai=_(T),Ti=_(et),wi=_(S),Si=_(Y),I=Ke;if(tt&&I(new tt(new ArrayBuffer(1)))!=rr||T&&I(new T)!=Je||et&&I(et.resolve())!=Ve||S&&I(new S)!=tr||Y&&I(new Y)!=er)I=function(t){var e=Ke(t),r=e==vi?t.constructor:void 0,o=r?_(r):"";if(o)switch(o){case Oi:return rr;case Ai:return Je;case Ti:return Ve;case wi:return tr;case Si:return er}return e};var pt=I;var Pi=xe.Uint8Array,fr=Pi;var Ci="__lodash_hash_undefined__";function Ei(t){return this.__data__.set(t,Ci),this}var or=Ei;function Ii(t){return this.__data__.has(t)}var ar=Ii;function rt(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}rt.prototype.add=rt.prototype.push=or;rt.prototype.has=ar;var at=rt;function Li(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var ir=Li;function ji(t,e){return t.has(e)}var ft=ji;var Mi=1,Ni=2;function Di(t,e,r,o,a,f){var i=r&Mi,n=t.length,s=e.length;if(n!=s&&!(i&&s>n))return!1;var p=f.get(t),d=f.get(e);if(p&&d)return p==e&&d==t;var l=-1,m=!0,y=r&Ni?new at:void 0;f.set(t,e),f.set(e,t);while(++l<n){var c=t[l],g=e[l];if(o)var v=i?o(g,c,l,e,t,f):o(c,g,l,t,e,f);if(v!==void 0){if(v)continue;m=!1;break}if(y){if(!ir(e,function(P,C){if(!ft(y,C)&&(c===P||a(c,P,r,o,f)))return y.push(C)})){m=!1;break}}else if(!(c===g||a(c,g,r,o,f))){m=!1;break}}return f.delete(t),f.delete(e),m}var it=Di;function Ri(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var nr=Ri;function Fi(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=Fi;var Bi=1,Gi=2,Ui="[object Boolean]",zi="[object Date]",Wi="[object Error]",Ki="[object Map]",Hi="[object Number]",qi="[object RegExp]",$i="[object Set]",ki="[object String]",Yi="[object Symbol]",Xi="[object ArrayBuffer]",Zi="[object DataView]",sr=Oe?Oe.prototype:void 0,bt=sr?sr.valueOf:void 0;function Ji(t,e,r,o,a,f,i){switch(r){case Zi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xi:if(t.byteLength!=e.byteLength||!f(new fr(t),new fr(e)))return!1;return!0;case Ui:case zi:case Hi:return Ct(+t,+e);case Wi:return t.name==e.name&&t.message==e.message;case qi:case ki:return t==e+"";case Ki:var n=nr;case $i:var s=o&Bi;if(n||(n=B),t.size!=e.size&&!s)return!1;var p=i.get(t);if(p)return p==e;o|=Gi,i.set(t,e);var d=it(n(t),n(e),o,a,f,i);return i.delete(t),d;case Yi:if(bt)return bt.call(t)==bt.call(e)}return!1}var lr=Ji;var Qi=1,Vi=Object.prototype,tn=Vi.hasOwnProperty;function en(t,e,r,o,a,f){var i=r&Qi,n=jr(t),s=n.length,p=jr(e),d=p.length;if(s!=d&&!i)return!1;var l=s;while(l--){var m=n[l];if(!(i?m in e:tn.call(e,m)))return!1}var y=f.get(t),c=f.get(e);if(y&&c)return y==e&&c==t;var g=!0;f.set(t,e),f.set(e,t);var v=i;while(++l<s){m=n[l];var P=t[m],C=e[m];if(o)var At=i?o(C,P,m,e,t,f):o(P,C,m,t,e,f);if(!(At===void 0?P===C||a(P,C,r,o,f):At)){g=!1;break}v||(v=m=="constructor")}if(g&&!v){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))g=!1}return f.delete(t),f.delete(e),g}var xr=en;var rn=1,_r="[object Arguments]",br="[object Array]",nt="[object Object]",on=Object.prototype,vr=on.hasOwnProperty;function an(t,e,r,o,a,f){var i=H(t),n=H(e),s=i?br:pt(t),p=n?br:pt(e);s=s==_r?nt:s,p=p==_r?nt:p;var d=s==nt,l=p==nt,m=s==p;if(m&&St(t)){if(!St(e))return!1;i=!0,d=!1}if(m&&!d)return f||(f=new Zt),i||_n(t)?it(t,e,r,o,a,f):lr(t,e,s,r,o,a,f);if(!(r&rn)){var y=d&&vr.call(t,"__wrapped__"),c=l&&vr.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return f||(f=new Zt),a(g,v,r,o,f)}}if(!m)return!1;return f||(f=new Zt),xr(t,e,r,o,a,f)}var Or=an;function Ar(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!Ee(t)&&!Ee(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var ut=Ar;var fn=1,nn=2;function sn(t,e,r,o){var a=r.length,f=a,i=!o;if(t==null)return!f;t=Object(t);while(a--){var n=r[a];if(i&&n[2]?n[1]!==t[n[0]]:!(n[0]in t))return!1}while(++a<f){n=r[a];var s=n[0],p=t[s],d=n[1];if(i&&n[2]){if(p===void 0&&!(s in t))return!1}else{var l=new Zt;if(o)var m=o(p,d,s,t,e,l);if(!(m===void 0?ut(d,p,fn|nn,o,l):m))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!me(t)}var lt=pn;function un(t){var e=_e(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,lt(a)]}return e}var wr=un;function mn(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(e[0][0],e[0][1]);return function(r){return r===t||Tr(r,t,e)}}var Sr=ln;function dn(t,e){return t!=null&&e in Object(t)}var Pr=dn;function hn(t,e,r){e=wn(e,t);var o=-1,a=e.length,f=!1;while(++o<a){var i=Yt(e[o]);if(!(f=t!=null&&r(t,i)))break;t=t[i]}if(f||++o!=a)return f;return a=t==null?0:t.length,!!a&&j(a)&&yn(i,a)&&(H(t)||$t(t))}var Ca=hn;function cn(t,e){return t!=null&&Ca(t,e,Pr)}var Sa=cn;var gn=1,On=2;function An(t,e){if(M(t)&<(e))return xt(Yt(t),e);return function(r){var o=Fe(r,t);return o===void 0&&o===e?Sa(r,t):ut(e,o,gn|On)}}var Cr=An;function Tn(t){return function(e){return e==null?void 0:e[t]}}var Ta=Tn;function Sn(t){return function(e){return kn(e,t)}}var Er=Sn;function Pn(t){return M(t)?Ta(Yt(t)):Er(t)}var Ir=Pn;function En(t){if(typeof t=="function")return t;if(t==null)return ot;if(typeof t=="object")return H(t)?Cr(t[0],t[1]):Sr(t);return Ir(t)}var Ge=En;function In(t){return function(e,r,o){var a=-1,f=Object(e),i=o(e),n=i.length;while(n--){var s=i[t?n:++a];if(r(f[s],s,f)===!1)break}return e}}var Lr=In;var Ln=Lr(),hr=Ln;function jn(t,e){return t&&hr(t,e,_e)}var gr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!$e(r))return t(r,o);var a=r.length,f=e?a:-1,i=Object(r);while(e?f--:++f<a)if(o(i[f],f,i)===!1)break;return r}}var Mr=Mn;var Nn=Mr(gr),Cn=Nn;function Dn(t){return Ee(t)&&$e(t)}var Ea=Dn;function Rn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var Nr=Rn;function Fn(t){return typeof t=="function"?t:ot}var yr=Fn;function Bn(t,e){var r=H(t)?ga:Cn;return r(t,yr(e))}var h=Bn;function Gn(t,e){var r=[];return Cn(t,function(o,a,f){if(e(o,a,f))r.push(o)}),r}var Dr=Gn;function Un(t,e){var r=H(t)?V:Dr;return r(t,Ge(e,3))}var Qe=Un;function zn(t,e){return Wt(e,function(r){return t[r]})}var Rr=zn;function Wn(t){return t==null?[]:Rr(t,_e(t))}var mt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if($e(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||St(t)||_n(t)||$t(t)))return!t.length;var e=pt(t);if(e==Kn||e==Hn)return!t.size;if(bn(t))return!ur(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var we=Xn;function Zn(t,e,r,o,a){return a(t,function(f,i,n){r=o?(o=!1,f):e(r,f,i,n)}),r}var Fr=Zn;function Jn(t,e,r){var o=H(t)?We:Fr,a=arguments.length<3;return o(t,Ge(e,4),r,a,Cn)}var Xt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?zt:function(t){return new S(t)},Br=Vn;var ts=200;function es(t,e,r){var o=-1,a=Vt,f=t.length,i=!0,n=[],s=n;if(r)i=!1,a=Nr;else if(f>=ts){var p=e?null:Br(t);if(p)return B(p);i=!1,a=ft,s=new at}else s=e?[]:n;t:while(++o<f){var d=t[o],l=e?e(d):d;if(d=r||d!==0?d:0,i&&l===l){var m=s.length;while(m--)if(s[m]===l)continue t;if(e)s.push(l);n.push(d)}else if(!a(s,l,r)){if(s!==n)s.push(l);n.push(d)}}return n}var Gr=es;var rs=vn(function(t){return Gr(pr(t,1,Ea,!0))}),vt=rs;var as="\x00",L="\x00",Ur="\x01";class re{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=st(void 0),this._defaultEdgeLabelFn=st(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!Gt(t))t=st(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return _e(this._nodes)}sources(){var t=this;return Qe(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Qe(this.nodes(),function(e){return ht(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return h(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],h(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];h(_e(this._in[t]),e),delete this._in[t],delete this._preds[t],h(_e(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(we(e))e=L;else{e+="";for(var r=e;!we(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(we(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return _e(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return _e(e)}successors(t){var e=this._sucs[t];if(e)return _e(e)}neighbors(t){var e=this.predecessors(t);if(e)return vt(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;h(this._nodes,function(f,i){if(t(i))e.setNode(i,f)}),h(this._edgeObjs,function(f){if(e.hasNode(f.v)&&e.hasNode(f.w))e.setEdge(f,r.edge(f))});var o={};function a(f){var i=r.parent(f);if(i===void 0||e.hasNode(i))return o[f]=i,i;else if(i in o)return o[i];else return a(i)}if(this._isCompound)h(e.nodes(),function(f){e.setParent(f,a(f))});return e}setDefaultEdgeLabel(t){if(!Gt(t))t=st(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return mt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Xt(t,function(a,f){if(o.length>1)r.setEdge(a,f,e);else r.setEdge(a,f);return f}),this}setEdge(){var t,e,r,o,a=!1,f=arguments[0];if(typeof f==="object"&&f!==null&&"v"in f){if(t=f.v,e=f.w,r=f.name,arguments.length===2)o=arguments[1],a=!0}else if(t=f,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!we(r))r=""+r;var i=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i)){if(a)this._edgeLabels[i]=o;return this}if(!we(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[i]=a?o:this._defaultEdgeLabelFn(t,e,r);var n=fs(this._isDirected,t,e,r);return t=n.v,e=n.w,Object.freeze(n),this._edgeObjs[i]=n,zr(this._preds[e],t),zr(this._sucs[t],e),this._in[e][i]=n,this._out[t][i]=n,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?Ot(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Wr(this._preds[e],t),Wr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=mt(r);if(!e)return o;return Qe(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=mt(r);if(!e)return o;return Qe(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}re.prototype._nodeCount=0;re.prototype._edgeCount=0;function zr(t,e){if(t[e])t[e]++;else t[e]=1}function Wr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}return a+Ur+f+Ur+(we(o)?as:o)}function fs(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}var n={v:a,w:f};if(o)n.name=o;return n}function Ot(t,e){return z(t,e.v,e.w,e.name)}
|
|
2
|
-
export{xe,Oe,
|
|
1
|
+
import{Rt}from"./chunk-kahab58k.js";var Z={};Rt(Z,{default:()=>Ct});var Q={};Rt(Q,{default:()=>Wt});var Kr=typeof global=="object"&&global&&global.Object===Object&&global,q=Kr;var Hr=typeof self=="object"&&self&&self.Object===Object&&self,qr=q||Hr||Function("return this")(),xe=qr;var $r=xe.Symbol,Oe=$r;var wt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=wt,G=Oe?Oe.toStringTag:void 0;function Xr(t){var e=kr.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(f){}var a=Yr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var St=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var Pt=Qr;var Vr="[object Null]",to="[object Undefined]",Et=Oe?Oe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return Et&&Et in Object(t)?St(t):Pt(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Ee=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Ee(t)&&Qe(t)==oo}var pt=ao;function fo(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var qt=fo;var io=Array.isArray,H=io;var no=1/0,It=Oe?Oe.prototype:void 0,Lt=It?It.toString:void 0;function jt(t){if(typeof t=="string")return t;if(H(t))return qt(t,jt)+"";if(pt(t))return Lt?Lt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Mt=jt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var me=so;function po(t){return t}var st=po;var uo="[object AsyncFunction]",mo="[object Function]",lo="[object GeneratorFunction]",xo="[object Proxy]";function ho(t){if(!me(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var Vt=ho;var co=xe["__core-js_shared__"],k=co;var Nt=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Nt&&Nt in t}var Dt=go;var yo=Function.prototype,_o=yo.toString;function bo(t){if(t!=null){try{return _o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var _=bo;var vo=/[\\^$.*+?()[\]{}|]/g,Oo=/^\[object .+?Constructor\]$/,Ao=Function.prototype,To=Object.prototype,wo=Ao.toString,So=To.hasOwnProperty,Po=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(t){if(!me(t)||Dt(t))return!1;var e=Vt(t)?Po:Oo;return e.test(_(t))}var Ft=Co;function Eo(t,e){return t==null?void 0:t[e]}var Bt=Eo;function Io(t,e){var r=Bt(t,e);return Ft(r)?r:void 0}var x=Io;var Lo=x(xe,"WeakMap"),Y=Lo;function jo(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Ut=jo;function Mo(){}var zt=Mo;var No=800,Do=16,Ro=Date.now;function Fo(t){var e=0,r=0;return function(){var o=Ro(),a=Do-(o-r);if(r=o,a>0){if(++e>=No)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Kt=Fo;function Bo(t){return function(){return t}}var lt=Bo;var Go=function(){try{var t=x(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),sr=Go;var Uo=!sr?st:function(t,e){return sr(t,"toString",{configurable:!0,enumerable:!1,value:lt(e),writable:!0})},$t=Uo;var zo=Kt($t),ma=zo;function Wo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var fa=Wo;function Ko(t,e,r,o){var a=t.length,f=r+(o?1:-1);while(o?f--:++f<a)if(e(t[f],f,t))return f;return-1}var ha=Ko;function Ho(t){return t!==t}var Xt=Ho;function qo(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Zt=qo;function $o(t,e,r){return e===e?Zt(t,e,r):ha(t,Xt,r)}var Jt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Jt(t,e,0)>-1}var Qt=ko;var Yo=9007199254740991,Xo=/^(?:0|[1-9]\d*)$/;function Zo(t,e){var r=typeof t;return e=e==null?Yo:e,!!e&&(r=="number"||r!="symbol"&&Xo.test(t))&&(t>-1&&t%1==0&&t<e)}var hn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var kt=Jo;var te=Math.max;function Qo(t,e,r){return e=te(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,f=te(o.length-e,0),i=Array(f);while(++a<f)i[a]=o[e+a];a=-1;var n=Array(e+1);while(++a<e)n[a]=o[a];return n[e]=r(i),Ut(t,this,n)}}var ga=Qo;function Vo(t,e){return ma(ga(t,e,st),t+"")}var gn=Vo;var ta=9007199254740991;function ea(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ta}var j=ea;function ra(t){return t!=null&&j(t.length)&&!Vt(t)}var $e=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var yn=aa;function ia(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var ee=ia;var na="[object Arguments]";function sa(t){return Ee(t)&&Qe(t)==na}var ct=sa;var oe=Object.prototype,{hasOwnProperty:pa,propertyIsEnumerable:ua}=oe,la=ct(function(){return arguments}())?ct:function(t){return Ee(t)&&pa.call(t,"callee")&&!ua.call(t,"callee")},Ot=la;function da(){return!1}var ae=da;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,ca=fe&&fe.exports===ne,ie=ca?xe.Buffer:void 0,Oa=ie?ie.isBuffer:void 0,Aa=Oa||ae,Ct=Aa;var Ta="[object Arguments]",Pa="[object Array]",Ea="[object Boolean]",Ia="[object Date]",La="[object Error]",ja="[object Function]",Ma="[object Map]",Na="[object Number]",Da="[object Object]",Ra="[object RegExp]",Fa="[object Set]",Ba="[object String]",Ga="[object WeakMap]",Ua="[object ArrayBuffer]",za="[object DataView]",Wa="[object Float32Array]",Ka="[object Float64Array]",Ha="[object Int8Array]",qa="[object Int16Array]",$a="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",u={};u[Wa]=u[Ka]=u[Ha]=u[qa]=u[$a]=u[Ya]=u[Xa]=u[Za]=u[Ja]=!0;u[Ta]=u[Pa]=u[Ua]=u[Ea]=u[za]=u[Ia]=u[La]=u[ja]=u[Ma]=u[Na]=u[Da]=u[Ra]=u[Fa]=u[Ba]=u[Ga]=!1;function Qa(t){return Ee(t)&&j(t.length)&&!!u[Qe(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var vn=Va;var pe=typeof Q=="object"&&Q&&!Q.nodeType&&Q,U=pe&&typeof J=="object"&&J&&!J.nodeType&&J,tf=U&&U.exports===pe,gt=tf&&q.process,ef=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return gt&>.binding&>.binding("util")}catch(e){}}(),Wt=ef;var ue=Wt&&Wt.isTypedArray,rf=ue?vn(ue):se,bn=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&Ot(t),a=!r&&!o&&Ct(t),f=!r&&!o&&!a&&bn(t),i=r||o||a||f,n=i?ee(t.length,String):[],s=n.length;for(var p in t)if((e||af.call(t,p))&&!(i&&(p=="length"||a&&(p=="offset"||p=="parent")||f&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||hn(p,s))))n.push(p);return n}var ya=ff;function nf(t,e){return function(r){return t(e(r))}}var va=nf;var sf=va(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!yn(t))return le(t);var e=[];for(var r in Object(t))if(uf.call(t,r)&&r!="constructor")e.push(r);return e}var lr=mf;function lf(t){return $e(t)?ya(t):lr(t)}var _e=lf;var df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xf=/^\w*$/;function hf(t,e){if(H(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||pt(t))return!0;return xf.test(t)||!df.test(t)||e!=null&&t in Object(e)}var M=hf;var cf=x(Object,"create"),b=cf;function gf(){this.__data__=b?b(null):{},this.size=0}var de=gf;function yf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var he=yf;var _f="__lodash_hash_undefined__",bf=Object.prototype,vf=bf.hasOwnProperty;function Of(t){var e=this.__data__;if(b){var r=e[t];return r===_f?void 0:r}return vf.call(e,t)?e[t]:void 0}var ce=Of;var Af=Object.prototype,Tf=Af.hasOwnProperty;function wf(t){var e=this.__data__;return b?e[t]!==void 0:Tf.call(e,t)}var ge=wf;var Sf="__lodash_hash_undefined__";function Pf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Sf:e,this}var ye=Pf;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=de;N.prototype.delete=he;N.prototype.get=ce;N.prototype.has=ge;N.prototype.set=ye;var yt=N;function Cf(){this.__data__=[],this.size=0}var be=Cf;function Ef(t,e){var r=t.length;while(r--)if(kt(t[r][0],e))return r;return-1}var O=Ef;var If=Array.prototype,Lf=If.splice;function jf(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else Lf.call(e,r,1);return--this.size,!0}var ve=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var Ae=Mf;function Nf(t){return O(this.__data__,t)>-1}var Te=Nf;function Df(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var Se=Df;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=be;D.prototype.delete=ve;D.prototype.get=Ae;D.prototype.has=Te;D.prototype.set=Se;var A=D;var Rf=x(xe,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new yt,map:new(T||A),string:new yt}}var Pe=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ce=Bf;function Gf(t,e){var r=t.__data__;return Ce(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=Gf;function Uf(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var Ie=Uf;function zf(t){return w(this,t).get(t)}var Le=zf;function Wf(t){return w(this,t).has(t)}var je=Wf;function Kf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var Me=Kf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=Pe;R.prototype.delete=Ie;R.prototype.get=Le;R.prototype.has=je;R.prototype.set=Me;var E=R;var Hf="Expected a function";function _t(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Hf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],f=r.cache;if(f.has(a))return f.get(a);var i=t.apply(this,o);return r.cache=f.set(a,i)||f,i};return r.cache=new(_t.Cache||E),r}_t.Cache=E;var Ne=_t;var qf=500;function $f(t){var e=Ne(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var De=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=De(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(kf,function(r,o,a,f){e.push(a?f.replace(Yf,"$1"):o||r)}),e}),Re=Xf;function Zf(t){return t==null?"":Mt(t)}var ba=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Re(ba(t))}var xn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||pt(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Gt=Vf;function ti(t,e){e=xn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Gt(e[r++])];return r&&r==o?t:void 0}var _n=ti;function ei(t,e,r){var o=t==null?void 0:_n(t,e);return o===void 0?r:o}var Fe=ei;function ri(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var cr=ri;var Be=Oe?Oe.isConcatSpreadable:void 0;function oi(t){return H(t)||Ot(t)||!!(Be&&t&&t[Be])}var Ge=oi;function Ue(t,e,r,o,a){var f=-1,i=t.length;r||(r=Ge),a||(a=[]);while(++f<i){var n=t[f];if(e>0&&r(n))if(e>1)Ue(n,e-1,r,o,a);else cr(a,n);else if(!o)a[a.length]=n}return a}var ur=Ue;function ai(t,e,r,o){var a=-1,f=t==null?0:t.length;if(o&&f)r=t[++a];while(++a<f)r=e(r,t[a],a,t);return r}var ze=ai;function fi(){this.__data__=new A,this.size=0}var We=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Ke=ii;function ni(t){return this.__data__.get(t)}var qe=ni;function si(t){return this.__data__.has(t)}var ke=si;var pi=200;function ui(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<pi-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Ye=ui;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=We;F.prototype.delete=Ke;F.prototype.get=qe;F.prototype.has=ke;F.prototype.set=Ye;var Ht=F;function mi(t,e){var r=-1,o=t==null?0:t.length,a=0,f=[];while(++r<o){var i=t[r];if(e(i,r,t))f[a++]=i}return f}var V=mi;function li(){return[]}var xa=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?xa:function(t){if(t==null)return[];return t=Object(t),V(Xe(t),function(e){return xi.call(t,e)})},dr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:cr(o,r(t))}var _a=ci;function gi(t){return _a(t,_e,dr)}var zr=gi;var yi=x(xe,"DataView"),tt=yi;var _i=x(xe,"Promise"),et=_i;var bi=x(xe,"Set"),S=bi;var Ze="[object Map]",vi="[object Object]",Ve="[object Promise]",tr="[object Set]",er="[object WeakMap]",rr="[object DataView]",Oi=_(tt),Ai=_(T),Ti=_(et),wi=_(S),Si=_(Y),I=Qe;if(tt&&I(new tt(new ArrayBuffer(1)))!=rr||T&&I(new T)!=Ze||et&&I(et.resolve())!=Ve||S&&I(new S)!=tr||Y&&I(new Y)!=er)I=function(t){var e=Qe(t),r=e==vi?t.constructor:void 0,o=r?_(r):"";if(o)switch(o){case Oi:return rr;case Ai:return Ze;case Ti:return Ve;case wi:return tr;case Si:return er}return e};var mt=I;var Pi=xe.Uint8Array,pr=Pi;var Ci="__lodash_hash_undefined__";function Ei(t){return this.__data__.set(t,Ci),this}var or=Ei;function Ii(t){return this.__data__.has(t)}var ar=Ii;function rt(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}rt.prototype.add=rt.prototype.push=or;rt.prototype.has=ar;var ot=rt;function Li(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var ir=Li;function ji(t,e){return t.has(e)}var at=ji;var Mi=1,Ni=2;function Di(t,e,r,o,a,f){var i=r&Mi,n=t.length,s=e.length;if(n!=s&&!(i&&s>n))return!1;var p=f.get(t),d=f.get(e);if(p&&d)return p==e&&d==t;var l=-1,m=!0,y=r&Ni?new ot:void 0;f.set(t,e),f.set(e,t);while(++l<n){var c=t[l],g=e[l];if(o)var v=i?o(g,c,l,e,t,f):o(c,g,l,t,e,f);if(v!==void 0){if(v)continue;m=!1;break}if(y){if(!ir(e,function(P,C){if(!at(y,C)&&(c===P||a(c,P,r,o,f)))return y.push(C)})){m=!1;break}}else if(!(c===g||a(c,g,r,o,f))){m=!1;break}}return f.delete(t),f.delete(e),m}var it=Di;function Ri(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var nr=Ri;function Fi(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=Fi;var Bi=1,Gi=2,Ui="[object Boolean]",zi="[object Date]",Wi="[object Error]",Ki="[object Map]",Hi="[object Number]",qi="[object RegExp]",$i="[object Set]",ki="[object String]",Yi="[object Symbol]",Xi="[object ArrayBuffer]",Zi="[object DataView]",xr=Oe?Oe.prototype:void 0,bt=xr?xr.valueOf:void 0;function Ji(t,e,r,o,a,f,i){switch(r){case Zi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xi:if(t.byteLength!=e.byteLength||!f(new pr(t),new pr(e)))return!1;return!0;case Ui:case zi:case Hi:return kt(+t,+e);case Wi:return t.name==e.name&&t.message==e.message;case qi:case ki:return t==e+"";case Ki:var n=nr;case $i:var s=o&Bi;if(n||(n=B),t.size!=e.size&&!s)return!1;var p=i.get(t);if(p)return p==e;o|=Gi,i.set(t,e);var d=it(n(t),n(e),o,a,f,i);return i.delete(t),d;case Yi:if(bt)return bt.call(t)==bt.call(e)}return!1}var gr=Ji;var Qi=1,Vi=Object.prototype,tn=Vi.hasOwnProperty;function en(t,e,r,o,a,f){var i=r&Qi,n=zr(t),s=n.length,p=zr(e),d=p.length;if(s!=d&&!i)return!1;var l=s;while(l--){var m=n[l];if(!(i?m in e:tn.call(e,m)))return!1}var y=f.get(t),c=f.get(e);if(y&&c)return y==e&&c==t;var g=!0;f.set(t,e),f.set(e,t);var v=i;while(++l<s){m=n[l];var P=t[m],C=e[m];if(o)var Tt=i?o(C,P,m,e,t,f):o(P,C,m,t,e,f);if(!(Tt===void 0?P===C||a(P,C,r,o,f):Tt)){g=!1;break}v||(v=m=="constructor")}if(g&&!v){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))g=!1}return f.delete(t),f.delete(e),g}var yr=en;var rn=1,_r="[object Arguments]",br="[object Array]",nt="[object Object]",on=Object.prototype,vr=on.hasOwnProperty;function an(t,e,r,o,a,f){var i=H(t),n=H(e),s=i?br:mt(t),p=n?br:mt(e);s=s==_r?nt:s,p=p==_r?nt:p;var d=s==nt,l=p==nt,m=s==p;if(m&&Ct(t)){if(!Ct(e))return!1;i=!0,d=!1}if(m&&!d)return f||(f=new Ht),i||bn(t)?it(t,e,r,o,a,f):gr(t,e,s,r,o,a,f);if(!(r&rn)){var y=d&&vr.call(t,"__wrapped__"),c=l&&vr.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return f||(f=new Ht),a(g,v,r,o,f)}}if(!m)return!1;return f||(f=new Ht),yr(t,e,r,o,a,f)}var Or=an;function Ar(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!Ee(t)&&!Ee(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var ut=Ar;var fn=1,nn=2;function sn(t,e,r,o){var a=r.length,f=a,i=!o;if(t==null)return!f;t=Object(t);while(a--){var n=r[a];if(i&&n[2]?n[1]!==t[n[0]]:!(n[0]in t))return!1}while(++a<f){n=r[a];var s=n[0],p=t[s],d=n[1];if(i&&n[2]){if(p===void 0&&!(s in t))return!1}else{var l=new Ht;if(o)var m=o(p,d,s,t,e,l);if(!(m===void 0?ut(d,p,fn|nn,o,l):m))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!me(t)}var dt=pn;function un(t){var e=_e(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,dt(a)]}return e}var wr=un;function mn(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(e[0][0],e[0][1]);return function(r){return r===t||Tr(r,t,e)}}var Sr=ln;function dn(t,e){return t!=null&&e in Object(t)}var Pr=dn;function cn(t,e,r){e=xn(e,t);var o=-1,a=e.length,f=!1;while(++o<a){var i=Gt(e[o]);if(!(f=t!=null&&r(t,i)))break;t=t[i]}if(f||++o!=a)return f;return a=t==null?0:t.length,!!a&&j(a)&&hn(i,a)&&(H(t)||Ot(t))}var wa=cn;function On(t,e){return t!=null&&wa(t,e,Pr)}var ka=On;var An=1,Tn=2;function Sn(t,e){if(M(t)&&dt(e))return xt(Gt(t),e);return function(r){var o=Fe(r,t);return o===void 0&&o===e?ka(r,t):ut(e,o,An|Tn)}}var Cr=Sn;function Pn(t){return function(e){return e==null?void 0:e[t]}}var Ca=Pn;function Cn(t){return function(e){return _n(e,t)}}var Er=Cn;function En(t){return M(t)?Ca(Gt(t)):Er(t)}var Ir=En;function In(t){if(typeof t=="function")return t;if(t==null)return st;if(typeof t=="object")return H(t)?Cr(t[0],t[1]):Sr(t);return Ir(t)}var He=In;function Ln(t){return function(e,r,o){var a=-1,f=Object(e),i=o(e),n=i.length;while(n--){var s=i[t?n:++a];if(r(f[s],s,f)===!1)break}return e}}var Lr=Ln;var jn=Lr(),mr=jn;function Mn(t,e){return t&&mr(t,e,_e)}var fr=Mn;function Nn(t,e){return function(r,o){if(r==null)return r;if(!$e(r))return t(r,o);var a=r.length,f=e?a:-1,i=Object(r);while(e?f--:++f<a)if(o(i[f],f,i)===!1)break;return r}}var jr=Nn;var Dn=jr(fr),wn=Dn;function Rn(t){return Ee(t)&&$e(t)}var Sa=Rn;function Fn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var Mr=Fn;function Bn(t){return typeof t=="function"?t:st}var hr=Bn;function Gn(t,e){var r=H(t)?fa:wn;return r(t,hr(e))}var h=Gn;function Un(t,e){var r=[];return wn(t,function(o,a,f){if(e(o,a,f))r.push(o)}),r}var Nr=Un;function zn(t,e){var r=H(t)?V:Nr;return r(t,He(e,3))}var Je=zn;function Wn(t,e){return qt(e,function(r){return t[r]})}var Dr=Wn;function Kn(t){return t==null?[]:Dr(t,_e(t))}var ft=Kn;var Hn="[object Map]",qn="[object Set]",$n=Object.prototype,kn=$n.hasOwnProperty;function Yn(t){if(t==null)return!0;if($e(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||Ct(t)||bn(t)||Ot(t)))return!t.length;var e=mt(t);if(e==Hn||e==qn)return!t.size;if(yn(t))return!lr(t).length;for(var r in t)if(kn.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var we=Xn;function Zn(t,e,r,o,a){return a(t,function(f,i,n){r=o?(o=!1,f):e(r,f,i,n)}),r}var Rr=Zn;function Jn(t,e,r){var o=H(t)?ze:Rr,a=arguments.length<3;return o(t,He(e,4),r,a,wn)}var Yt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?zt:function(t){return new S(t)},Fr=Vn;var ts=200;function es(t,e,r){var o=-1,a=Qt,f=t.length,i=!0,n=[],s=n;if(r)i=!1,a=Mr;else if(f>=ts){var p=e?null:Fr(t);if(p)return B(p);i=!1,a=at,s=new ot}else s=e?[]:n;t:while(++o<f){var d=t[o],l=e?e(d):d;if(d=r||d!==0?d:0,i&&l===l){var m=s.length;while(m--)if(s[m]===l)continue t;if(e)s.push(l);n.push(d)}else if(!a(s,l,r)){if(s!==n)s.push(l);n.push(d)}}return n}var Br=es;var rs=gn(function(t){return Br(ur(t,1,Sa,!0))}),vt=rs;var as="\x00",L="\x00",Gr="\x01";class re{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=lt(void 0),this._defaultEdgeLabelFn=lt(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!Vt(t))t=lt(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return _e(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ht(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return h(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],h(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];h(_e(this._in[t]),e),delete this._in[t],delete this._preds[t],h(_e(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(we(e))e=L;else{e+="";for(var r=e;!we(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(we(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return _e(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return _e(e)}successors(t){var e=this._sucs[t];if(e)return _e(e)}neighbors(t){var e=this.predecessors(t);if(e)return vt(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;h(this._nodes,function(f,i){if(t(i))e.setNode(i,f)}),h(this._edgeObjs,function(f){if(e.hasNode(f.v)&&e.hasNode(f.w))e.setEdge(f,r.edge(f))});var o={};function a(f){var i=r.parent(f);if(i===void 0||e.hasNode(i))return o[f]=i,i;else if(i in o)return o[i];else return a(i)}if(this._isCompound)h(e.nodes(),function(f){e.setParent(f,a(f))});return e}setDefaultEdgeLabel(t){if(!Vt(t))t=lt(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return ft(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Yt(t,function(a,f){if(o.length>1)r.setEdge(a,f,e);else r.setEdge(a,f);return f}),this}setEdge(){var t,e,r,o,a=!1,f=arguments[0];if(typeof f==="object"&&f!==null&&"v"in f){if(t=f.v,e=f.w,r=f.name,arguments.length===2)o=arguments[1],a=!0}else if(t=f,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!we(r))r=""+r;var i=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i)){if(a)this._edgeLabels[i]=o;return this}if(!we(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[i]=a?o:this._defaultEdgeLabelFn(t,e,r);var n=fs(this._isDirected,t,e,r);return t=n.v,e=n.w,Object.freeze(n),this._edgeObjs[i]=n,Ur(this._preds[e],t),Ur(this._sucs[t],e),this._in[e][i]=n,this._out[t][i]=n,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?At(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?At(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?At(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Wr(this._preds[e],t),Wr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=ft(r);if(!e)return o;return Je(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=ft(r);if(!e)return o;return Je(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}re.prototype._nodeCount=0;re.prototype._edgeCount=0;function Ur(t,e){if(t[e])t[e]++;else t[e]=1}function Wr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}return a+Gr+f+Gr+(we(o)?as:o)}function fs(t,e,r,o){var a=""+e,f=""+r;if(!t&&a>f){var i=a;a=f,f=i}var n={v:a,w:f};if(o)n.name=o;return n}function At(t,e){return z(t,e.v,e.w,e.name)}
|
|
2
|
+
export{xe,Oe,Qe,Ee,pt,qt,H,me,st,Vt,lt,sr,ma,fa,ha,hn,kt,ga,gn,$e,yn,Ot,Ct,vn,Wt,bn,ya,va,lr,_e,ba,xn,Gt,_n,cr,ur,Ht,xa,dr,_a,zr,mt,pr,wa,ka,Ca,He,mr,fr,wn,Sa,hr,h,Je,ft,we,Yt,re};
|