@flowfuse/node-red-dashboard 1.14.0 → 1.14.1-7dcc7ab-202407251122.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/package.json +1 -1
  2. package/dist/apple-touch-icon.png +0 -0
  3. package/dist/assets/array-BKyUJesY.js +0 -1
  4. package/dist/assets/c4Diagram-c0b17d02-BRLOYJ4t.js +0 -10
  5. package/dist/assets/classDiagram-a8cc8886-DW35lqXB.js +0 -1
  6. package/dist/assets/classDiagram-v2-802a48d3-D-xXDKFo.js +0 -2
  7. package/dist/assets/createText-3b1f58a4-BcbhKj6L.js +0 -7
  8. package/dist/assets/edges-0005682e-CaHlt-yO.js +0 -4
  9. package/dist/assets/erDiagram-dedf2781-CXQ2SqGW.js +0 -51
  10. package/dist/assets/flowDb-ff651a22-CqrIgjhK.js +0 -6
  11. package/dist/assets/flowDiagram-d6f8fe3a-BgqXJCcC.js +0 -4
  12. package/dist/assets/flowDiagram-v2-58f49b84-q-TkECv-.js +0 -1
  13. package/dist/assets/flowchart-elk-definition-56584a6c-DlNKqRrE.js +0 -139
  14. package/dist/assets/ganttDiagram-088dbd90-DrDqQR9P.js +0 -266
  15. package/dist/assets/gitGraphDiagram-e0ffc2d1-D0quK6ew.js +0 -70
  16. package/dist/assets/index-B42PdJQG.css +0 -13
  17. package/dist/assets/index-CFcJr8Yf.js +0 -239
  18. package/dist/assets/index-f58d48f9-DXacpd1g.js +0 -1
  19. package/dist/assets/infoDiagram-64895a6e-RuTD-RyR.js +0 -7
  20. package/dist/assets/init-Gi6I4Gst.js +0 -1
  21. package/dist/assets/journeyDiagram-adaa34f8-BA_vgin-.js +0 -139
  22. package/dist/assets/layout-Ciu5m7ED.js +0 -1
  23. package/dist/assets/line-C1YstNRq.js +0 -1
  24. package/dist/assets/linear-BjV-9OB5.js +0 -1
  25. package/dist/assets/logo-DIAzbBuw.png +0 -0
  26. package/dist/assets/materialdesignicons-webfont-B7mPwVP_.ttf +0 -0
  27. package/dist/assets/materialdesignicons-webfont-CSr8KVlo.eot +0 -0
  28. package/dist/assets/materialdesignicons-webfont-Dp5v-WZN.woff2 +0 -0
  29. package/dist/assets/materialdesignicons-webfont-PXm3-2wK.woff +0 -0
  30. package/dist/assets/mindmap-definition-57868176-CaCTgyB5.js +0 -109
  31. package/dist/assets/ordinal-BENe2yWM.js +0 -1
  32. package/dist/assets/pieDiagram-3fca7ce7-BwO3fNyk.js +0 -35
  33. package/dist/assets/quadrantDiagram-0ca4be02-OKyNOxC-.js +0 -7
  34. package/dist/assets/requirementDiagram-e13af0f0-sHJbp0z1.js +0 -52
  35. package/dist/assets/sankeyDiagram-a7f8e230-Dcb4o8o3.js +0 -8
  36. package/dist/assets/sequenceDiagram-84aa38e3-De6ATnhy.js +0 -122
  37. package/dist/assets/stateDiagram-9a586ac6-CDFyCkeH.js +0 -1
  38. package/dist/assets/stateDiagram-v2-96f2b9df-CYGuSM0b.js +0 -1
  39. package/dist/assets/styles-1b0c237a-CqSqB9pl.js +0 -110
  40. package/dist/assets/styles-622362e4-caW6cDO9.js +0 -160
  41. package/dist/assets/styles-a1a6e33f--P_kOjzp.js +0 -207
  42. package/dist/assets/svgDraw-70101091-z6z9A0ym.js +0 -2
  43. package/dist/assets/svgDrawCommon-42e92da3-DfsNif7e.js +0 -1
  44. package/dist/assets/timeline-definition-1a90b03d-CKf3KD1J.js +0 -61
  45. package/dist/assets/workbox-window.prod.es5-Ck4lWPv4.js +0 -2
  46. package/dist/favicon.ico +0 -0
  47. package/dist/favicon.svg +0 -482
  48. package/dist/index.html +0 -22
  49. package/dist/logo-512x512.png +0 -0
  50. package/dist/logo.svg +0 -482
  51. package/dist/manifest.webmanifest +0 -1
  52. package/dist/maskable-icon-512x512.png +0 -0
  53. package/dist/pwa-192x192.png +0 -0
  54. package/dist/pwa-512x512.png +0 -0
  55. package/dist/pwa-64x64.png +0 -0
  56. package/dist/sw.js +0 -2
@@ -1 +0,0 @@
1
- import{b as k,i as v,m as D,G,l as j}from"./layout-Ciu5m7ED.js";import{i as A,u as M,s as _,a as H,b as V,p as B,c as q,d as U,e as W,f as Y,g as O,h as X}from"./edges-0005682e-CaHlt-yO.js";import{l as i,q as N,c as E,h as L}from"./index-CFcJr8Yf.js";import{c as z}from"./createText-3b1f58a4-BcbhKj6L.js";var K=4;function Q(e){return k(e,K)}function y(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Z(e),edges:I(e)};return v(e.graph())||(t.value=Q(e.graph())),t}function Z(e){return D(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return v(n)||(s.value=n),v(r)||(s.parent=r),s})}function I(e){return D(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return v(t.name)||(r.name=t.name),v(n)||(r.value=n),r})}let f={},x={},T={};const tt=()=>{x={},T={},f={}},S=(e,t)=>(i.trace("In isDecendant",t," ",e," = ",x[t].includes(e)),!!x[t].includes(e)),et=(e,t)=>(i.info("Decendants of ",t," is ",x[t]),i.info("Edge is ",e),e.v===t||e.w===t?!1:x[t]?x[t].includes(e.v)||S(e.v,t)||S(e.w,t)||x[t].includes(e.w):(i.debug("Tilt, ",t,",not in decendants"),!1)),J=(e,t,n,r)=>{i.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)J(a,t,n,r);else{const h=t.node(a);i.info("cp ",a," to ",r," with parent ",e),n.setNode(a,h),r!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==r&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",r,"data",t.node(e),r),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==r,"node!==clusterId",a!==e));const l=t.edges(a);i.debug("Copying Edges",l),l.forEach(d=>{i.info("Edge",d);const w=t.edge(d.v,d.w,d.name);i.info("Edge data",w,r);try{et(d,r)?(i.info("Copying as ",d.v,d.w,w,d.name),n.setEdge(d.v,d.w,w,d.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",a),t.removeNode(a)})},p=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)T[s]=e,r=[...r,...p(s,t)];return r},m=(e,t)=>{i.trace("Searching",e);const n=t.children(e);if(i.trace("Searching children of id ",e,n),n.length<1)return i.trace("This is a valid node",e),e;for(const r of n){const s=m(r,t);if(s)return i.trace("Found replacement for",e," => ",s),s}},b=e=>!f[e]||!f[e].externalConnections?e:f[e]?f[e].id:e,nt=(e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",m(n,e)),x[n]=p(n,e),f[n]={id:m(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.debug("Cluster identified",n,x),s.forEach(a=>{if(a.v!==n&&a.w!==n){const h=S(a.v,n),l=S(a.w,n);h^l&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Decendants of XXX ",n,": ",x[n]),f[n].externalConnections=!0)}})):i.debug("Not a cluster ",n,x)}),e.edges().forEach(function(n){const r=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f[n.v]," --- ",f[n.w]),f[n.v]&&f[n.w]&&f[n.v]===f[n.w]){i.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=b(n.v),a=b(n.w),e.removeEdge(n.v,n.w,n.name);const h=n.w+"---"+n.v;e.setNode(h,{domId:h,id:h,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const l=JSON.parse(JSON.stringify(r)),d=JSON.parse(JSON.stringify(r));l.label="",l.arrowTypeEnd="none",d.label="",l.fromCluster=n.v,d.toCluster=n.v,e.setEdge(s,h,l,n.name+"-cyclic-special"),e.setEdge(h,a,d,n.name+"-cyclic-special")}else(f[n.v]||f[n.w])&&(i.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=b(n.v),a=b(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v&&(r.fromCluster=n.v),a!==n.w&&(r.toCluster=n.w),i.warn("Fix Replacing with XXX",s,a,n.name),e.setEdge(s,a,r,n.name))}),i.warn("Adjusted Graph",y(e)),R(e,0),i.trace(f)},R=(e,t)=>{if(i.warn("extractor - ",t,y(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const a=e.children(s);r=r||a.length>0}if(!r){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const s of n)if(i.debug("Extracting node",s,f,f[s]&&!f[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!f[s])i.debug("Not a cluster",s,t);else if(!f[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.warn("Cluster without external connections, without a parent and with children",s,t);let h=e.graph().rankdir==="TB"?"LR":"TB";f[s]&&f[s].clusterData&&f[s].clusterData.dir&&(h=f[s].clusterData.dir,i.warn("Fixing dir",f[s].clusterData.dir,h));const l=new G({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",y(e)),J(s,e,l,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:f[s].clusterData,labelText:f[s].labelText,graph:l}),i.warn("New graph after copy node: (",s,")",y(l)),i.debug("Old graph after copy",y(e))}else i.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!f[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const s of n){const a=e.node(s);i.warn(" Now next level",s,a),a.clusterNode&&R(a.graph,t+1)}},P=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),a=P(e,s);n=[...n,...a]}),n},it=e=>P(e,e.children()),st=(e,t)=>{i.info("Creating subgraph rect for ",t.id,t);const n=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=n.insert("rect",":first-child"),s=N(E().flowchart.htmlLabels),a=n.insert("g").attr("class","cluster-label"),h=t.labelType==="markdown"?z(a,t.labelText,{style:t.labelStyle,useHtmlLabels:s}):a.node().appendChild(O(t.labelText,t.labelStyle,void 0,!0));let l=h.getBBox();if(N(E().flowchart.htmlLabels)){const o=h.children[0],u=L(h);l=o.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}const d=0*t.padding,w=d/2,g=t.width<=l.width+d?l.width+d:t.width;t.width<=l.width+d?t.diff=(l.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-g/2).attr("y",t.y-t.height/2-w).attr("width",g).attr("height",t.height+d),s?a.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2)+")"):a.attr("transform","translate("+t.x+", "+(t.y-t.height/2)+")");const c=r.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(o){return X(t,o)},n},rt=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,a=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const h=r.node().getBBox();return t.width=h.width,t.height=h.height,t.intersect=function(l){return X(t,l)},n},at=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),h=s.node().appendChild(O(t.labelText,t.labelStyle,void 0,!0));let l=h.getBBox();if(N(E().flowchart.htmlLabels)){const o=h.children[0],u=L(h);l=o.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}l=h.getBBox();const d=0*t.padding,w=d/2,g=t.width<=l.width+t.padding?l.width+t.padding:t.width;t.width<=l.width+t.padding?t.diff=(l.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-g/2-w).attr("y",t.y-t.height/2-w).attr("width",g+d).attr("height",t.height+d),a.attr("class","inner").attr("x",t.x-g/2-w).attr("y",t.y-t.height/2-w+l.height-1).attr("width",g+d).attr("height",t.height+d-l.height-3),s.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2-t.padding/3+(N(E().flowchart.htmlLabels)?5:3))+")");const c=r.node().getBBox();return t.height=c.height,t.intersect=function(o){return X(t,o)},n},ct=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,a=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const h=r.node().getBBox();return t.width=h.width,t.height=h.height,t.diff=-t.padding/2,t.intersect=function(l){return X(t,l)},n},ot={rect:st,roundedWithTitle:at,noteGroup:rt,divider:ct};let F={};const lt=(e,t)=>{i.trace("Inserting cluster");const n=t.shape||"rect";F[t.id]=ot[n](e,t)},ft=()=>{F={}},$=async(e,t,n,r)=>{i.info("Graph in recursive render: XXX",y(t),r);const s=t.graph().rankdir;i.trace("Dir in recursive render - dir:",s);const a=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.trace("Recursive edges",t.edge(t.edges()[0]));const h=a.insert("g").attr("class","clusters"),l=a.insert("g").attr("class","edgePaths"),d=a.insert("g").attr("class","edgeLabels"),w=a.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(c){const o=t.node(c);if(r!==void 0){const u=JSON.parse(JSON.stringify(r.clusterData));i.info("Setting data for cluster XXX (",c,") ",u,r),t.setNode(r.id,u),t.parent(c)||(i.trace("Setting parent",c,r.id),t.setParent(c,r.id,u))}if(i.info("(Insert) Node XXX"+c+": "+JSON.stringify(t.node(c))),o&&o.clusterNode){i.info("Cluster identified",c,o.width,t.node(c));const u=await $(w,o.graph,n,t.node(c)),C=u.elem;M(o,C),o.diff=u.diff||0,i.info("Node bounds (abc123)",c,o,o.width,o.x,o.y),_(C,o),i.warn("Recursive render complete ",C,o)}else t.children(c).length>0?(i.info("Cluster - the non recursive path XXX",c,o.id,o,t),i.info(m(o.id,t)),f[o.id]={id:m(o.id,t),node:o}):(i.info("Node - the non recursive path",c,o.id,o),await H(w,t.node(c),s))})),t.edges().forEach(function(c){const o=t.edge(c.v,c.w,c.name);i.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c)),i.info("Edge "+c.v+" -> "+c.w+": ",c," ",JSON.stringify(t.edge(c))),i.info("Fix",f,"ids:",c.v,c.w,"Translateing: ",f[c.v],f[c.w]),V(d,o)}),t.edges().forEach(function(c){i.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c))}),i.info("#############################################"),i.info("### Layout ###"),i.info("#############################################"),i.info(t),j(t),i.info("Graph after layout:",y(t));let g=0;return it(t).forEach(function(c){const o=t.node(c);i.info("Position "+c+": "+JSON.stringify(t.node(c))),i.info("Position "+c+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o&&o.clusterNode?B(o):t.children(c).length>0?(lt(h,o),f[o.id].node=o):B(o)}),t.edges().forEach(function(c){const o=t.edge(c);i.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(o),o);const u=q(l,c,o,f,n,t);U(o,u)}),t.nodes().forEach(function(c){const o=t.node(c);i.info(c,o.type,o.diff),o.type==="group"&&(g=o.diff)}),{elem:a,diff:g}},gt=async(e,t,n,r,s)=>{A(e,n,r,s),W(),Y(),ft(),tt(),i.warn("Graph at first:",y(t)),nt(t),i.warn("Graph after:",y(t)),await $(e,t,r)};export{gt as r};
@@ -1,7 +0,0 @@
1
- import{l as Y,X as D,i as M}from"./index-CFcJr8Yf.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`:
2
- `+o.showPosition()+`
3
- Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(v+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,v=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,v,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
5
- `+e+"^"},test_match:function(t,e){var n,s,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,s;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;i<r.length;i++)if(n=this._input.match(this.rules[r[i]]),n&&(!e||n[0].length>e[0].length)){if(e=n,s=i,this.options.backtrack_lexer){if(t=this.test_match(n,r[i]),t!==!1)return t;if(this._backtrack){e=!1;continue}else return!1}else if(!this.options.flex)break}return e?(t=this.test_match(e,r[s]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,n,s,r){switch(s){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return u}();m.lexer=k;function x(){this.yy={}}return x.prototype=m,m.Parser=x,new x}();O.parser=O;const X=O,j={info:!1};let $=j.info;const B=a=>{$=a},V=()=>$,q=()=>{$=j.info},C={clear:q,setInfo:B,getInfo:V},G=(a,f,m)=>{Y.debug(`rendering info diagram
7
- `+a);const k=D(f);M(k,100,400,!0),k.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${m}`)},H={draw:G},K={parser:X,db:C,renderer:H};export{K as diagram};
@@ -1 +0,0 @@
1
- function t(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{t as i};
@@ -1,139 +0,0 @@
1
- import{c as V,D as gt,E as mt,s as xt,g as _t,b as kt,a as bt,m as vt,F as wt,h as H,i as Tt,a2 as it}from"./index-CFcJr8Yf.js";import{d as $t,f as St,a as Mt,g as lt}from"./svgDrawCommon-42e92da3-DfsNif7e.js";var Z=function(){var t=function(_,n,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=n);return a},e=[1,2],s=[1,5],r=[6,9,11,17,18,20,22,23,24,26],i=[1,15],o=[1,16],c=[1,17],y=[1,18],u=[1,19],x=[1,20],g=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(n,a,h,p,m,l,R){var k=l.length-1;switch(m){case 1:return l[k-1];case 3:this.$=[];break;case 4:l[k-1].push(l[k]),this.$=l[k-1];break;case 5:case 6:this.$=l[k];break;case 7:case 8:this.$=[];break;case 11:p.setDiagramTitle(l[k].substr(6)),this.$=l[k].substr(6);break;case 12:this.$=l[k].trim(),p.setAccTitle(this.$);break;case 13:case 14:this.$=l[k].trim(),p.setAccDescription(this.$);break;case 15:p.addSection(l[k].substr(8)),this.$=l[k].substr(8);break;case 16:p.addTask(l[k-1],l[k]),this.$="task";break;case 18:p.parseDirective("%%{","open_directive");break;case 19:p.parseDirective(l[k],"type_directive");break;case 20:l[k]=l[k].trim().replace(/'/g,'"'),p.parseDirective(l[k],"arg_directive");break;case 21:p.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:s},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:s},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:o,20:c,22:y,23:u,24:x,26:s},{1:[2,2]},{14:22,15:[1,23],29:g},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:i,18:o,20:c,22:y,23:u,24:x,26:s},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(f,[2,9]),{14:32,29:g},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(n,a){if(a.recoverable)this.trace(n);else{var h=new Error(n);throw h.hash=a,h}},parse:function(n){var a=this,h=[0],p=[],m=[null],l=[],R=this.table,k="",z=0,Q=0,yt=2,tt=1,dt=l.slice.call(arguments,1),v=Object.create(this.lexer),I={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(I.yy[D]=this.yy[D]);v.setInput(n,I.yy),I.yy.lexer=v,I.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var W=v.yylloc;l.push(W);var pt=v.options&&v.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(){var E;return E=p.pop()||v.lex()||tt,typeof E!="number"&&(E instanceof Array&&(p=E,E=p.pop()),E=a.symbols_[E]||E),E}for(var w,A,$,X,F={},Y,M,et,O;;){if(A=h[h.length-1],this.defaultActions[A]?$=this.defaultActions[A]:((w===null||typeof w>"u")&&(w=ft()),$=R[A]&&R[A][w]),typeof $>"u"||!$.length||!$[0]){var G="";O=[];for(Y in R[A])this.terminals_[Y]&&Y>yt&&O.push("'"+this.terminals_[Y]+"'");v.showPosition?G="Parse error on line "+(z+1)+`:
2
- `+v.showPosition()+`
3
- Expecting `+O.join(", ")+", got '"+(this.terminals_[w]||w)+"'":G="Parse error on line "+(z+1)+": Unexpected "+(w==tt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(G,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:W,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+w);switch($[0]){case 1:h.push(w),m.push(v.yytext),l.push(v.yylloc),h.push($[1]),w=null,Q=v.yyleng,k=v.yytext,z=v.yylineno,W=v.yylloc;break;case 2:if(M=this.productions_[$[1]][1],F.$=m[m.length-M],F._$={first_line:l[l.length-(M||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(M||1)].first_column,last_column:l[l.length-1].last_column},pt&&(F._$.range=[l[l.length-(M||1)].range[0],l[l.length-1].range[1]]),X=this.performAction.apply(F,[k,Q,z,I.yy,$[1],m,l].concat(dt)),typeof X<"u")return X;M&&(h=h.slice(0,-1*M*2),m=m.slice(0,-1*M),l=l.slice(0,-1*M)),h.push(this.productions_[$[1]][0]),m.push(F.$),l.push(F._$),et=R[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0}},T=function(){var _={EOF:1,parseError:function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},setInput:function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var a=n.length,h=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
- `+a+"^"},test_match:function(n,a){var h,p,m;if(this.options.backtrack_lexer&&(m={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&&(m.yylloc.range=this.yylloc.range.slice(0))),p=n[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var l in m)this[l]=m[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,h,p;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),l=0;l<m.length;l++)if(h=this._input.match(this.rules[m[l]]),h&&(!a||h[0].length>a[0].length)){if(a=h,p=l,this.options.backtrack_lexer){if(n=this.test_match(h,m[l]),n!==!1)return n;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(n=this.test_match(a,m[p]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return a||this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},pushState:function(a){this.begin(a)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(a,h,p,m){switch(p){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return _}();d.lexer=T;function b(){this.yy={}}return b.prototype=d,d.Parser=b,new b}();Z.parser=Z;const Et=Z;let L="";const J=[],N=[],B=[],Pt=function(t,e,s){vt.parseDirective(this,t,e,s)},It=function(){J.length=0,N.length=0,L="",B.length=0,wt()},At=function(t){L=t,J.push(t)},Ct=function(){return J},Vt=function(){let t=st();const e=100;let s=0;for(;!t&&s<e;)t=st(),s++;return N.push(...B),N},Ft=function(){const t=[];return N.forEach(s=>{s.people&&t.push(...s.people)}),[...new Set(t)].sort()},Lt=function(t,e){const s=e.substr(1).split(":");let r=0,i=[];s.length===1?(r=Number(s[0]),i=[]):(r=Number(s[0]),i=s[1].split(","));const o=i.map(y=>y.trim()),c={section:L,type:L,people:o,task:t,score:r};B.push(c)},Rt=function(t){const e={section:L,type:L,description:t,task:t,classes:[]};N.push(e)},st=function(){const t=function(s){return B[s].processed};let e=!0;for(const[s,r]of B.entries())t(s),e=e&&r.processed;return e},Nt=function(){return Ft()},nt={parseDirective:Pt,getConfig:()=>V().journey,clear:It,setDiagramTitle:gt,getDiagramTitle:mt,setAccTitle:xt,getAccTitle:_t,setAccDescription:kt,getAccDescription:bt,addSection:At,getSections:Ct,getTasks:Vt,addTask:Lt,addTaskOrg:Rt,getActors:Nt},Bt=t=>`.label {
7
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
8
- font-family: var(--mermaid-font-family);
9
- color: ${t.textColor};
10
- }
11
- .mouth {
12
- stroke: #666;
13
- }
14
-
15
- line {
16
- stroke: ${t.textColor}
17
- }
18
-
19
- .legend {
20
- fill: ${t.textColor};
21
- }
22
-
23
- .label text {
24
- fill: #333;
25
- }
26
- .label {
27
- color: ${t.textColor}
28
- }
29
-
30
- .face {
31
- ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
32
- stroke: #999;
33
- }
34
-
35
- .node rect,
36
- .node circle,
37
- .node ellipse,
38
- .node polygon,
39
- .node path {
40
- fill: ${t.mainBkg};
41
- stroke: ${t.nodeBorder};
42
- stroke-width: 1px;
43
- }
44
-
45
- .node .label {
46
- text-align: center;
47
- }
48
- .node.clickable {
49
- cursor: pointer;
50
- }
51
-
52
- .arrowheadPath {
53
- fill: ${t.arrowheadColor};
54
- }
55
-
56
- .edgePath .path {
57
- stroke: ${t.lineColor};
58
- stroke-width: 1.5px;
59
- }
60
-
61
- .flowchart-link {
62
- stroke: ${t.lineColor};
63
- fill: none;
64
- }
65
-
66
- .edgeLabel {
67
- background-color: ${t.edgeLabelBackground};
68
- rect {
69
- opacity: 0.5;
70
- }
71
- text-align: center;
72
- }
73
-
74
- .cluster rect {
75
- }
76
-
77
- .cluster text {
78
- fill: ${t.titleColor};
79
- }
80
-
81
- div.mermaidTooltip {
82
- position: absolute;
83
- text-align: center;
84
- max-width: 200px;
85
- padding: 2px;
86
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
87
- font-family: var(--mermaid-font-family);
88
- font-size: 12px;
89
- background: ${t.tertiaryColor};
90
- border: 1px solid ${t.border2};
91
- border-radius: 2px;
92
- pointer-events: none;
93
- z-index: 100;
94
- }
95
-
96
- .task-type-0, .section-type-0 {
97
- ${t.fillType0?`fill: ${t.fillType0}`:""};
98
- }
99
- .task-type-1, .section-type-1 {
100
- ${t.fillType0?`fill: ${t.fillType1}`:""};
101
- }
102
- .task-type-2, .section-type-2 {
103
- ${t.fillType0?`fill: ${t.fillType2}`:""};
104
- }
105
- .task-type-3, .section-type-3 {
106
- ${t.fillType0?`fill: ${t.fillType3}`:""};
107
- }
108
- .task-type-4, .section-type-4 {
109
- ${t.fillType0?`fill: ${t.fillType4}`:""};
110
- }
111
- .task-type-5, .section-type-5 {
112
- ${t.fillType0?`fill: ${t.fillType5}`:""};
113
- }
114
- .task-type-6, .section-type-6 {
115
- ${t.fillType0?`fill: ${t.fillType6}`:""};
116
- }
117
- .task-type-7, .section-type-7 {
118
- ${t.fillType0?`fill: ${t.fillType7}`:""};
119
- }
120
-
121
- .actor-0 {
122
- ${t.actor0?`fill: ${t.actor0}`:""};
123
- }
124
- .actor-1 {
125
- ${t.actor1?`fill: ${t.actor1}`:""};
126
- }
127
- .actor-2 {
128
- ${t.actor2?`fill: ${t.actor2}`:""};
129
- }
130
- .actor-3 {
131
- ${t.actor3?`fill: ${t.actor3}`:""};
132
- }
133
- .actor-4 {
134
- ${t.actor4?`fill: ${t.actor4}`:""};
135
- }
136
- .actor-5 {
137
- ${t.actor5?`fill: ${t.actor5}`:""};
138
- }
139
- `,jt=Bt,K=function(t,e){return $t(t,e)},zt=function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function o(u){const x=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function c(u){const x=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function y(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?o(i):e.score<3?c(i):y(i),r},ot=function(t,e){const s=t.append("circle");return s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0&&s.attr("class",s.class),e.title!==void 0&&s.append("title").text(e.title),s},ht=function(t,e){return St(t,e)},Yt=function(t,e){function s(i,o,c,y,u){return i+","+o+" "+(i+c)+","+o+" "+(i+c)+","+(o+y-u)+" "+(i+c-u*1.2)+","+(o+y)+" "+i+","+(o+y)}const r=t.append("polygon");r.attr("points",s(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ht(t,e)},Ot=function(t,e,s){const r=t.append("g"),i=lt();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=s.width*e.taskCount+s.diagramMarginX*(e.taskCount-1),i.height=s.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,K(r,i),ut(s)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},s,e.colour)};let rt=-1;const qt=function(t,e,s){const r=e.x+s.width/2,i=t.append("g");rt++;const o=300+5*30;i.append("line").attr("id","task"+rt).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",o).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),zt(i,{cx:r,cy:300+(5-e.score)*30,score:e.score});const c=lt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=s.width,c.height=s.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,K(i,c);let y=e.x+14;e.people.forEach(u=>{const x=e.actors[u].color,g={cx:y,cy:e.y,r:7,fill:x,stroke:"#000",title:u,pos:e.actors[u].position};ot(i,g),y+=10}),ut(s)(e.task,i,c.x,c.y,c.width,c.height,{class:"task"},s,e.colour)},Dt=function(t,e){Mt(t,e)},ut=function(){function t(i,o,c,y,u,x,g,f){const d=o.append("text").attr("x",c+u/2).attr("y",y+x/2+5).style("font-color",f).style("text-anchor","middle").text(i);r(d,g)}function e(i,o,c,y,u,x,g,f,d){const{taskFontSize:T,taskFontFamily:b}=f,_=i.split(/<br\s*\/?>/gi);for(let n=0;n<_.length;n++){const a=n*T-T*(_.length-1)/2,h=o.append("text").attr("x",c+u/2).attr("y",y).attr("fill",d).style("text-anchor","middle").style("font-size",T).style("font-family",b);h.append("tspan").attr("x",c+u/2).attr("dy",a).text(_[n]),h.attr("y",y+x/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(h,g)}}function s(i,o,c,y,u,x,g,f){const d=o.append("switch"),b=d.append("foreignObject").attr("x",c).attr("y",y).attr("width",u).attr("height",x).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,d,c,y,u,x,g,f),r(b,g)}function r(i,o){for(const c in o)c in o&&i.attr(c,o[c])}return function(i){return i.textPlacement==="fo"?s:i.textPlacement==="old"?t:e}}(),Wt=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},j={drawRect:K,drawCircle:ot,drawSection:Ot,drawText:ht,drawLabel:Yt,drawTask:qt,drawBackgroundRect:Dt,initGraphics:Wt},Xt=function(t){Object.keys(t).forEach(function(s){q[s]=t[s]})},P={};function Gt(t){const e=V().journey;let s=60;Object.keys(P).forEach(r=>{const i=P[r].color,o={cx:20,cy:s,r:7,fill:i,stroke:"#000",pos:P[r].position};j.drawCircle(t,o);const c={x:40,y:s+7,fill:"#666",text:r,textMargin:e.boxTextMargin|5};j.drawText(t,c),s+=20})}const q=V().journey,C=q.leftMargin,Ht=function(t,e,s,r){const i=V().journey,o=V().securityLevel;let c;o==="sandbox"&&(c=H("#i"+e));const y=o==="sandbox"?H(c.nodes()[0].contentDocument.body):H("body");S.init();const u=y.select("#"+e);j.initGraphics(u);const x=r.db.getTasks(),g=r.db.getDiagramTitle(),f=r.db.getActors();for(const a in P)delete P[a];let d=0;f.forEach(a=>{P[a]={color:i.actorColours[d%i.actorColours.length],position:d},d++}),Gt(u),S.insert(0,0,C,Object.keys(P).length*50),Ut(u,x,0);const T=S.getBounds();g&&u.append("text").text(g).attr("x",C).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const b=T.stopy-T.starty+2*i.diagramMarginY,_=C+T.stopx+2*i.diagramMarginX;Tt(u,b,_,i.useMaxWidth),u.append("line").attr("x1",C).attr("y1",i.height*4).attr("x2",_-C-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const n=g?70:0;u.attr("viewBox",`${T.startx} -25 ${_} ${b+n}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",b+n+25)},S={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,s,r){t[e]===void 0?t[e]=s:t[e]=r(s,t[e])},updateBounds:function(t,e,s,r){const i=V().journey,o=this;let c=0;function y(u){return function(g){c++;const f=o.sequenceItems.length-c+1;o.updateVal(g,"starty",e-f*i.boxMargin,Math.min),o.updateVal(g,"stopy",r+f*i.boxMargin,Math.max),o.updateVal(S.data,"startx",t-f*i.boxMargin,Math.min),o.updateVal(S.data,"stopx",s+f*i.boxMargin,Math.max),u!=="activation"&&(o.updateVal(g,"startx",t-f*i.boxMargin,Math.min),o.updateVal(g,"stopx",s+f*i.boxMargin,Math.max),o.updateVal(S.data,"starty",e-f*i.boxMargin,Math.min),o.updateVal(S.data,"stopy",r+f*i.boxMargin,Math.max))}}this.sequenceItems.forEach(y())},insert:function(t,e,s,r){const i=Math.min(t,s),o=Math.max(t,s),c=Math.min(e,r),y=Math.max(e,r);this.updateVal(S.data,"startx",i,Math.min),this.updateVal(S.data,"starty",c,Math.min),this.updateVal(S.data,"stopx",o,Math.max),this.updateVal(S.data,"stopy",y,Math.max),this.updateBounds(i,c,o,y)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},U=q.sectionFills,at=q.sectionColours,Ut=function(t,e,s){const r=V().journey;let i="";const o=r.height*2+r.diagramMarginY,c=s+o;let y=0,u="#CCC",x="black",g=0;for(const[f,d]of e.entries()){if(i!==d.section){u=U[y%U.length],g=y%U.length,x=at[y%at.length];let b=0;const _=d.section;for(let a=f;a<e.length&&e[a].section==_;a++)b=b+1;const n={x:f*r.taskMargin+f*r.width+C,y:50,text:d.section,fill:u,num:g,colour:x,taskCount:b};j.drawSection(t,n,r),i=d.section,y++}const T=d.people.reduce((b,_)=>(P[_]&&(b[_]=P[_]),b),{});d.x=f*r.taskMargin+f*r.width+C,d.y=c,d.width=r.diagramMarginX,d.height=r.diagramMarginY,d.colour=x,d.fill=u,d.num=g,d.actors=T,j.drawTask(t,d,r),S.insert(d.x,d.y,d.x+d.width+r.taskMargin,300+5*30)}},ct={setConf:Xt,draw:Ht},Kt={parser:Et,db:nt,renderer:ct,styles:jt,init:t=>{ct.setConf(t.journey),nt.clear()}};export{Kt as diagram};
@@ -1 +0,0 @@
1
- import{a9 as q,aa as fr,ab as O,ac as x,ad as F,ae as fn,af as dr,ag as cr,ah as hr,ai as Te,aj as lr,ak as vr,al as dn,am as X,an as gr,ao as Le,ap as pr,aq as H,ar as an,as as Cn,at as br,au as Ln,av as wr,aw as mr,ax as U,ay as In,az as _r,aA as Ae,aB as Kn,aC as Er,aD as yr,aE as Ne,aF as V,aG as Oe,aH as xr,aI as Pn,aJ as on,aK as Tr,aL as bn,aM as Lr,aN as B,z as Xn,aO as Vn,aP as An}from"./index-CFcJr8Yf.js";var Ar="[object Symbol]";function $(n){return typeof n=="symbol"||q(n)&&fr(n)==Ar}function R(n,e){for(var r=-1,t=n==null?0:n.length,i=Array(t);++r<t;)i[r]=e(n[r],r,n);return i}var Nr=1/0,Zn=O?O.prototype:void 0,Jn=Zn?Zn.toString:void 0;function Ce(n){if(typeof n=="string")return n;if(x(n))return R(n,Ce)+"";if($(n))return Jn?Jn.call(n):"";var e=n+"";return e=="0"&&1/n==-Nr?"-0":e}var Or=/\s/;function Cr(n){for(var e=n.length;e--&&Or.test(n.charAt(e)););return e}var Ir=/^\s+/;function Pr(n){return n&&n.slice(0,Cr(n)+1).replace(Ir,"")}var Qn=NaN,$r=/^[-+]0x[0-9a-f]+$/i,Sr=/^0b[01]+$/i,Mr=/^0o[0-7]+$/i,Rr=parseInt;function Fr(n){if(typeof n=="number")return n;if($(n))return Qn;if(F(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=F(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Pr(n);var r=Sr.test(n);return r||Mr.test(n)?Rr(n.slice(2),r?2:8):$r.test(n)?Qn:+n}var zn=1/0,Dr=17976931348623157e292;function rn(n){if(!n)return n===0?n:0;if(n=Fr(n),n===zn||n===-zn){var e=n<0?-1:1;return e*Dr}return n===n?n:0}function Gr(n){var e=rn(n),r=e%1;return e===e?r?e-r:e:0}function kr(){}function Ie(n,e){for(var r=-1,t=n==null?0:n.length;++r<t&&e(n[r],r,n)!==!1;);return n}function Pe(n,e,r,t){for(var i=n.length,a=r+(t?1:-1);t?a--:++a<i;)if(e(n[a],a,n))return a;return-1}function Br(n){return n!==n}function Yr(n,e,r){for(var t=r-1,i=n.length;++t<i;)if(n[t]===e)return t;return-1}function Ur(n,e,r){return e===e?Yr(n,e,r):Pe(n,Br,r)}function qr(n,e){var r=n==null?0:n.length;return!!r&&Ur(n,e,0)>-1}function T(n){return fn(n)?dr(n):cr(n)}var Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jr=/^\w*$/;function $n(n,e){if(x(n))return!1;var r=typeof n;return r=="number"||r=="symbol"||r=="boolean"||n==null||$(n)?!0:jr.test(n)||!Hr.test(n)||e!=null&&n in Object(e)}var Wr=500;function Kr(n){var e=hr(n,function(t){return r.size===Wr&&r.clear(),t}),r=e.cache;return e}var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vr=/\\(\\)?/g,Zr=Kr(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Xr,function(r,t,i,a){e.push(i?a.replace(Vr,"$1"):t||r)}),e});function $e(n){return n==null?"":Ce(n)}function cn(n,e){return x(n)?n:$n(n,e)?[n]:Zr($e(n))}var Jr=1/0;function Z(n){if(typeof n=="string"||$(n))return n;var e=n+"";return e=="0"&&1/n==-Jr?"-0":e}function hn(n,e){e=cn(e,n);for(var r=0,t=e.length;n!=null&&r<t;)n=n[Z(e[r++])];return r&&r==t?n:void 0}function Qr(n,e,r){var t=n==null?void 0:hn(n,e);return t===void 0?r:t}function Sn(n,e){for(var r=-1,t=e.length,i=n.length;++r<t;)n[i+r]=e[r];return n}var ne=O?O.isConcatSpreadable:void 0;function zr(n){return x(n)||Te(n)||!!(ne&&n&&n[ne])}function ln(n,e,r,t,i){var a=-1,o=n.length;for(r||(r=zr),i||(i=[]);++a<o;){var u=n[a];e>0&&r(u)?e>1?ln(u,e-1,r,t,i):Sn(i,u):t||(i[i.length]=u)}return i}function G(n){var e=n==null?0:n.length;return e?ln(n,1):[]}function nt(n){return lr(vr(n,void 0,G),n+"")}function et(n,e,r,t){var i=-1,a=n==null?0:n.length;for(t&&a&&(r=n[++i]);++i<a;)r=e(r,n[i],i,n);return r}function rt(n,e){return n&&dn(e,T(e),n)}function tt(n,e){return n&&dn(e,X(e),n)}function Se(n,e){for(var r=-1,t=n==null?0:n.length,i=0,a=[];++r<t;){var o=n[r];e(o,r,n)&&(a[i++]=o)}return a}function Me(){return[]}var it=Object.prototype,at=it.propertyIsEnumerable,ee=Object.getOwnPropertySymbols,Mn=ee?function(n){return n==null?[]:(n=Object(n),Se(ee(n),function(e){return at.call(n,e)}))}:Me;function ot(n,e){return dn(n,Mn(n),e)}var ut=Object.getOwnPropertySymbols,Re=ut?function(n){for(var e=[];n;)Sn(e,Mn(n)),n=gr(n);return e}:Me;function st(n,e){return dn(n,Re(n),e)}function Fe(n,e,r){var t=e(n);return x(n)?t:Sn(t,r(n))}function Nn(n){return Fe(n,T,Mn)}function ft(n){return Fe(n,X,Re)}var dt=Object.prototype,ct=dt.hasOwnProperty;function ht(n){var e=n.length,r=new n.constructor(e);return e&&typeof n[0]=="string"&&ct.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function lt(n,e){var r=e?Le(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}var vt=/\w*$/;function gt(n){var e=new n.constructor(n.source,vt.exec(n));return e.lastIndex=n.lastIndex,e}var re=O?O.prototype:void 0,te=re?re.valueOf:void 0;function pt(n){return te?Object(te.call(n)):{}}var bt="[object Boolean]",wt="[object Date]",mt="[object Map]",_t="[object Number]",Et="[object RegExp]",yt="[object Set]",xt="[object String]",Tt="[object Symbol]",Lt="[object ArrayBuffer]",At="[object DataView]",Nt="[object Float32Array]",Ot="[object Float64Array]",Ct="[object Int8Array]",It="[object Int16Array]",Pt="[object Int32Array]",$t="[object Uint8Array]",St="[object Uint8ClampedArray]",Mt="[object Uint16Array]",Rt="[object Uint32Array]";function Ft(n,e,r){var t=n.constructor;switch(e){case Lt:return Le(n);case bt:case wt:return new t(+n);case At:return lt(n,r);case Nt:case Ot:case Ct:case It:case Pt:case $t:case St:case Mt:case Rt:return pr(n,r);case mt:return new t;case _t:case xt:return new t(n);case Et:return gt(n);case yt:return new t;case Tt:return pt(n)}}var Dt="[object Map]";function Gt(n){return q(n)&&H(n)==Dt}var ie=an&&an.isMap,kt=ie?Cn(ie):Gt,Bt="[object Set]";function Yt(n){return q(n)&&H(n)==Bt}var ae=an&&an.isSet,Ut=ae?Cn(ae):Yt,qt=1,Ht=2,jt=4,De="[object Arguments]",Wt="[object Array]",Kt="[object Boolean]",Xt="[object Date]",Vt="[object Error]",Ge="[object Function]",Zt="[object GeneratorFunction]",Jt="[object Map]",Qt="[object Number]",ke="[object Object]",zt="[object RegExp]",ni="[object Set]",ei="[object String]",ri="[object Symbol]",ti="[object WeakMap]",ii="[object ArrayBuffer]",ai="[object DataView]",oi="[object Float32Array]",ui="[object Float64Array]",si="[object Int8Array]",fi="[object Int16Array]",di="[object Int32Array]",ci="[object Uint8Array]",hi="[object Uint8ClampedArray]",li="[object Uint16Array]",vi="[object Uint32Array]",w={};w[De]=w[Wt]=w[ii]=w[ai]=w[Kt]=w[Xt]=w[oi]=w[ui]=w[si]=w[fi]=w[di]=w[Jt]=w[Qt]=w[ke]=w[zt]=w[ni]=w[ei]=w[ri]=w[ci]=w[hi]=w[li]=w[vi]=!0;w[Vt]=w[Ge]=w[ti]=!1;function tn(n,e,r,t,i,a){var o,u=e&qt,s=e&Ht,f=e&jt;if(r&&(o=i?r(n,t,i,a):r(n)),o!==void 0)return o;if(!F(n))return n;var d=x(n);if(d){if(o=ht(n),!u)return br(n,o)}else{var h=H(n),l=h==Ge||h==Zt;if(Ln(n))return wr(n,u);if(h==ke||h==De||l&&!i){if(o=s||l?{}:mr(n),!u)return s?st(n,tt(o,n)):ot(n,rt(o,n))}else{if(!w[h])return i?n:{};o=Ft(n,h,u)}}a||(a=new U);var g=a.get(n);if(g)return g;a.set(n,o),Ut(n)?n.forEach(function(m){o.add(tn(m,e,r,m,n,a))}):kt(n)&&n.forEach(function(m,_){o.set(_,tn(m,e,r,_,n,a))});var v=f?s?ft:Nn:s?X:T,p=d?void 0:v(n);return Ie(p||n,function(m,_){p&&(_=m,m=n[_]),In(o,_,tn(m,e,r,_,n,a))}),o}var gi=1,pi=4;function bi(n){return tn(n,gi|pi)}var wi="__lodash_hash_undefined__";function mi(n){return this.__data__.set(n,wi),this}function _i(n){return this.__data__.has(n)}function j(n){var e=-1,r=n==null?0:n.length;for(this.__data__=new _r;++e<r;)this.add(n[e])}j.prototype.add=j.prototype.push=mi;j.prototype.has=_i;function Ei(n,e){for(var r=-1,t=n==null?0:n.length;++r<t;)if(e(n[r],r,n))return!0;return!1}function Be(n,e){return n.has(e)}var yi=1,xi=2;function Ye(n,e,r,t,i,a){var o=r&yi,u=n.length,s=e.length;if(u!=s&&!(o&&s>u))return!1;var f=a.get(n),d=a.get(e);if(f&&d)return f==e&&d==n;var h=-1,l=!0,g=r&xi?new j:void 0;for(a.set(n,e),a.set(e,n);++h<u;){var v=n[h],p=e[h];if(t)var m=o?t(p,v,h,e,n,a):t(v,p,h,n,e,a);if(m!==void 0){if(m)continue;l=!1;break}if(g){if(!Ei(e,function(_,I){if(!Be(g,I)&&(v===_||i(v,_,r,t,a)))return g.push(I)})){l=!1;break}}else if(!(v===p||i(v,p,r,t,a))){l=!1;break}}return a.delete(n),a.delete(e),l}function Ti(n){var e=-1,r=Array(n.size);return n.forEach(function(t,i){r[++e]=[i,t]}),r}function Rn(n){var e=-1,r=Array(n.size);return n.forEach(function(t){r[++e]=t}),r}var Li=1,Ai=2,Ni="[object Boolean]",Oi="[object Date]",Ci="[object Error]",Ii="[object Map]",Pi="[object Number]",$i="[object RegExp]",Si="[object Set]",Mi="[object String]",Ri="[object Symbol]",Fi="[object ArrayBuffer]",Di="[object DataView]",oe=O?O.prototype:void 0,wn=oe?oe.valueOf:void 0;function Gi(n,e,r,t,i,a,o){switch(r){case Di:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case Fi:return!(n.byteLength!=e.byteLength||!a(new Kn(n),new Kn(e)));case Ni:case Oi:case Pi:return Ae(+n,+e);case Ci:return n.name==e.name&&n.message==e.message;case $i:case Mi:return n==e+"";case Ii:var u=Ti;case Si:var s=t&Li;if(u||(u=Rn),n.size!=e.size&&!s)return!1;var f=o.get(n);if(f)return f==e;t|=Ai,o.set(n,e);var d=Ye(u(n),u(e),t,i,a,o);return o.delete(n),d;case Ri:if(wn)return wn.call(n)==wn.call(e)}return!1}var ki=1,Bi=Object.prototype,Yi=Bi.hasOwnProperty;function Ui(n,e,r,t,i,a){var o=r&ki,u=Nn(n),s=u.length,f=Nn(e),d=f.length;if(s!=d&&!o)return!1;for(var h=s;h--;){var l=u[h];if(!(o?l in e:Yi.call(e,l)))return!1}var g=a.get(n),v=a.get(e);if(g&&v)return g==e&&v==n;var p=!0;a.set(n,e),a.set(e,n);for(var m=o;++h<s;){l=u[h];var _=n[l],I=e[l];if(t)var Wn=o?t(I,_,l,e,n,a):t(_,I,l,n,e,a);if(!(Wn===void 0?_===I||i(_,I,r,t,a):Wn)){p=!1;break}m||(m=l=="constructor")}if(p&&!m){var z=n.constructor,nn=e.constructor;z!=nn&&"constructor"in n&&"constructor"in e&&!(typeof z=="function"&&z instanceof z&&typeof nn=="function"&&nn instanceof nn)&&(p=!1)}return a.delete(n),a.delete(e),p}var qi=1,ue="[object Arguments]",se="[object Array]",en="[object Object]",Hi=Object.prototype,fe=Hi.hasOwnProperty;function ji(n,e,r,t,i,a){var o=x(n),u=x(e),s=o?se:H(n),f=u?se:H(e);s=s==ue?en:s,f=f==ue?en:f;var d=s==en,h=f==en,l=s==f;if(l&&Ln(n)){if(!Ln(e))return!1;o=!0,d=!1}if(l&&!d)return a||(a=new U),o||Er(n)?Ye(n,e,r,t,i,a):Gi(n,e,s,r,t,i,a);if(!(r&qi)){var g=d&&fe.call(n,"__wrapped__"),v=h&&fe.call(e,"__wrapped__");if(g||v){var p=g?n.value():n,m=v?e.value():e;return a||(a=new U),i(p,m,r,t,a)}}return l?(a||(a=new U),Ui(n,e,r,t,i,a)):!1}function Fn(n,e,r,t,i){return n===e?!0:n==null||e==null||!q(n)&&!q(e)?n!==n&&e!==e:ji(n,e,r,t,Fn,i)}var Wi=1,Ki=2;function Xi(n,e,r,t){var i=r.length,a=i,o=!t;if(n==null)return!a;for(n=Object(n);i--;){var u=r[i];if(o&&u[2]?u[1]!==n[u[0]]:!(u[0]in n))return!1}for(;++i<a;){u=r[i];var s=u[0],f=n[s],d=u[1];if(o&&u[2]){if(f===void 0&&!(s in n))return!1}else{var h=new U;if(t)var l=t(f,d,s,n,e,h);if(!(l===void 0?Fn(d,f,Wi|Ki,t,h):l))return!1}}return!0}function Ue(n){return n===n&&!F(n)}function Vi(n){for(var e=T(n),r=e.length;r--;){var t=e[r],i=n[t];e[r]=[t,i,Ue(i)]}return e}function qe(n,e){return function(r){return r==null?!1:r[n]===e&&(e!==void 0||n in Object(r))}}function Zi(n){var e=Vi(n);return e.length==1&&e[0][2]?qe(e[0][0],e[0][1]):function(r){return r===n||Xi(r,n,e)}}function Ji(n,e){return n!=null&&e in Object(n)}function He(n,e,r){e=cn(e,n);for(var t=-1,i=e.length,a=!1;++t<i;){var o=Z(e[t]);if(!(a=n!=null&&r(n,o)))break;n=n[o]}return a||++t!=i?a:(i=n==null?0:n.length,!!i&&yr(i)&&Ne(o,i)&&(x(n)||Te(n)))}function je(n,e){return n!=null&&He(n,e,Ji)}var Qi=1,zi=2;function na(n,e){return $n(n)&&Ue(e)?qe(Z(n),e):function(r){var t=Qr(r,n);return t===void 0&&t===e?je(r,n):Fn(e,t,Qi|zi)}}function ea(n){return function(e){return e==null?void 0:e[n]}}function ra(n){return function(e){return hn(e,n)}}function ta(n){return $n(n)?ea(Z(n)):ra(n)}function C(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?x(n)?na(n[0],n[1]):Zi(n):ta(n)}function Dn(n,e){return n&&Oe(n,e,T)}function ia(n,e){return function(r,t){if(r==null)return r;if(!fn(r))return n(r,t);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&t(o[a],a,o)!==!1;);return r}}var aa=ia(Dn);const vn=aa;var de=function(){return xr.Date.now()},We=Object.prototype,oa=We.hasOwnProperty,ua=Pn(function(n,e){n=Object(n);var r=-1,t=e.length,i=t>2?e[2]:void 0;for(i&&on(e[0],e[1],i)&&(t=1);++r<t;)for(var a=e[r],o=X(a),u=-1,s=o.length;++u<s;){var f=o[u],d=n[f];(d===void 0||Ae(d,We[f])&&!oa.call(n,f))&&(n[f]=a[f])}return n});const sa=ua;function fa(n,e,r){for(var t=-1,i=n==null?0:n.length;++t<i;)if(r(e,n[t]))return!0;return!1}function un(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}function Gn(n){return typeof n=="function"?n:V}function c(n,e){var r=x(n)?Ie:vn;return r(n,Gn(e))}function da(n,e){var r=[];return vn(n,function(t,i,a){e(t,i,a)&&r.push(t)}),r}function A(n,e){var r=x(n)?Se:da;return r(n,C(e))}function ca(n){return function(e,r,t){var i=Object(e);if(!fn(e)){var a=C(r);e=T(e),r=function(u){return a(i[u],u,i)}}var o=n(e,r,t);return o>-1?i[a?e[o]:o]:void 0}}var ha=Math.max;function la(n,e,r){var t=n==null?0:n.length;if(!t)return-1;var i=r==null?0:Gr(r);return i<0&&(i=ha(t+i,0)),Pe(n,C(e),i)}var kn=ca(la);function Ke(n,e){var r=-1,t=fn(n)?Array(n.length):[];return vn(n,function(i,a,o){t[++r]=e(i,a,o)}),t}function E(n,e){var r=x(n)?R:Ke;return r(n,C(e))}function va(n,e){return n==null?n:Oe(n,Gn(e),X)}function ga(n,e){return n&&Dn(n,Gn(e))}function pa(n,e){return n>e}var ba=Object.prototype,wa=ba.hasOwnProperty;function ma(n,e){return n!=null&&wa.call(n,e)}function b(n,e){return n!=null&&He(n,e,ma)}function _a(n,e){return R(e,function(r){return n[r]})}function N(n){return n==null?[]:_a(n,T(n))}function y(n){return n===void 0}function Xe(n,e){return n<e}function gn(n,e){var r={};return e=C(e),Dn(n,function(t,i,a){Tr(r,i,e(t,i,a))}),r}function Bn(n,e,r){for(var t=-1,i=n.length;++t<i;){var a=n[t],o=e(a);if(o!=null&&(u===void 0?o===o&&!$(o):r(o,u)))var u=o,s=a}return s}function S(n){return n&&n.length?Bn(n,V,pa):void 0}function W(n){return n&&n.length?Bn(n,V,Xe):void 0}function Yn(n,e){return n&&n.length?Bn(n,C(e),Xe):void 0}function Ea(n,e,r,t){if(!F(n))return n;e=cn(e,n);for(var i=-1,a=e.length,o=a-1,u=n;u!=null&&++i<a;){var s=Z(e[i]),f=r;if(s==="__proto__"||s==="constructor"||s==="prototype")return n;if(i!=o){var d=u[s];f=t?t(d,s,u):void 0,f===void 0&&(f=F(d)?d:Ne(e[i+1])?[]:{})}In(u,s,f),u=u[s]}return n}function ya(n,e,r){for(var t=-1,i=e.length,a={};++t<i;){var o=e[t],u=hn(n,o);r(u,o)&&Ea(a,cn(o,n),u)}return a}function xa(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}function Ta(n,e){if(n!==e){var r=n!==void 0,t=n===null,i=n===n,a=$(n),o=e!==void 0,u=e===null,s=e===e,f=$(e);if(!u&&!f&&!a&&n>e||a&&o&&s&&!u&&!f||t&&o&&s||!r&&s||!i)return 1;if(!t&&!a&&!f&&n<e||f&&r&&i&&!t&&!a||u&&r&&i||!o&&i||!s)return-1}return 0}function La(n,e,r){for(var t=-1,i=n.criteria,a=e.criteria,o=i.length,u=r.length;++t<o;){var s=Ta(i[t],a[t]);if(s){if(t>=u)return s;var f=r[t];return s*(f=="desc"?-1:1)}}return n.index-e.index}function Aa(n,e,r){e.length?e=R(e,function(a){return x(a)?function(o){return hn(o,a.length===1?a[0]:a)}:a}):e=[V];var t=-1;e=R(e,Cn(C));var i=Ke(n,function(a,o,u){var s=R(e,function(f){return f(a)});return{criteria:s,index:++t,value:a}});return xa(i,function(a,o){return La(a,o,r)})}function Na(n,e){return ya(n,e,function(r,t){return je(n,t)})}var sn=nt(function(n,e){return n==null?{}:Na(n,e)}),Oa=Math.ceil,Ca=Math.max;function Ia(n,e,r,t){for(var i=-1,a=Ca(Oa((e-n)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=n,n+=r;return o}function Pa(n){return function(e,r,t){return t&&typeof t!="number"&&on(e,r,t)&&(r=t=void 0),e=rn(e),r===void 0?(r=e,e=0):r=rn(r),t=t===void 0?e<r?1:-1:rn(t),Ia(e,r,t,n)}}var D=Pa();function $a(n,e,r,t,i){return i(n,function(a,o,u){r=t?(t=!1,a):e(r,a,o,u)}),r}function J(n,e,r){var t=x(n)?et:$a,i=arguments.length<3;return t(n,C(e),r,i,vn)}var Q=Pn(function(n,e){if(n==null)return[];var r=e.length;return r>1&&on(n,e[0],e[1])?e=[]:r>2&&on(e[0],e[1],e[2])&&(e=[e[0]]),Aa(n,ln(e,1),[])}),Sa=1/0,Ma=bn&&1/Rn(new bn([,-0]))[1]==Sa?function(n){return new bn(n)}:kr,Ra=200;function Fa(n,e,r){var t=-1,i=qr,a=n.length,o=!0,u=[],s=u;if(r)o=!1,i=fa;else if(a>=Ra){var f=e?null:Ma(n);if(f)return Rn(f);o=!1,i=Be,s=new j}else s=e?[]:u;n:for(;++t<a;){var d=n[t],h=e?e(d):d;if(d=r||d!==0?d:0,o&&h===h){for(var l=s.length;l--;)if(s[l]===h)continue n;e&&s.push(h),u.push(d)}else i(s,h,r)||(s!==u&&s.push(h),u.push(d))}return u}var Da=Pn(function(n){return Fa(ln(n,1,Lr,!0))}),Ga=0;function Un(n){var e=++Ga;return $e(n)+e}function ka(n,e,r){for(var t=-1,i=n.length,a=e.length,o={};++t<i;){var u=t<a?e[t]:void 0;r(o,n[t],u)}return o}function Ba(n,e){return ka(n||[],e||[],In)}var Ya="\0",P="\0",ce="";class L{constructor(e={}){this._isDirected=b(e,"directed")?e.directed:!0,this._isMultigraph=b(e,"multigraph")?e.multigraph:!1,this._isCompound=b(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=B(void 0),this._defaultEdgeLabelFn=B(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[P]={}),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(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return Xn(e)||(e=B(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return T(this._nodes)}sources(){var e=this;return A(this.nodes(),function(r){return Vn(e._in[r])})}sinks(){var e=this;return A(this.nodes(),function(r){return Vn(e._out[r])})}setNodes(e,r){var t=arguments,i=this;return c(e,function(a){t.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return b(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=P,this._children[e]={},this._children[P][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return b(this._nodes,e)}removeNode(e){var r=this;if(b(this._nodes,e)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),c(T(this._in[e]),t),delete this._in[e],delete this._preds[e],c(T(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(y(r))r=P;else{r+="";for(var t=r;!y(t);t=this.parent(t))if(t===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==P)return r}}children(e){if(y(e)&&(e=P),this._isCompound){var r=this._children[e];if(r)return T(r)}else{if(e===P)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return T(r)}successors(e){var r=this._sucs[e];if(r)return T(r)}neighbors(e){var r=this.predecessors(e);if(r)return Da(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;c(this._nodes,function(o,u){e(u)&&r.setNode(u,o)}),c(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var u=t.parent(o);return u===void 0||r.hasNode(u)?(i[o]=u,u):u in i?i[u]:a(u)}return this._isCompound&&c(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return Xn(e)||(e=B(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return N(this._edgeObjs)}setPath(e,r){var t=this,i=arguments;return J(e,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var e,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,y(t)||(t=""+t);var u=Y(this._isDirected,e,r,t);if(b(this._edgeLabels,u))return a&&(this._edgeLabels[u]=i),this;if(!y(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[u]=a?i:this._defaultEdgeLabelFn(e,r,t);var s=Ua(this._isDirected,e,r,t);return e=s.v,r=s.w,Object.freeze(s),this._edgeObjs[u]=s,he(this._preds[r],e),he(this._sucs[e],r),this._in[r][u]=s,this._out[e][u]=s,this._edgeCount++,this}edge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return this._edgeLabels[i]}hasEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t);return b(this._edgeLabels,i)}removeEdge(e,r,t){var i=arguments.length===1?mn(this._isDirected,arguments[0]):Y(this._isDirected,e,r,t),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],le(this._preds[r],e),le(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var t=this._in[e];if(t){var i=N(t);return r?A(i,function(a){return a.v===r}):i}}outEdges(e,r){var t=this._out[e];if(t){var i=N(t);return r?A(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var t=this.inEdges(e,r);if(t)return t.concat(this.outEdges(e,r))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function he(n,e){n[e]?n[e]++:n[e]=1}function le(n,e){--n[e]||delete n[e]}function Y(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}return i+ce+a+ce+(y(t)?Ya:t)}function Ua(n,e,r,t){var i=""+e,a=""+r;if(!n&&i>a){var o=i;i=a,a=o}var u={v:i,w:a};return t&&(u.name=t),u}function mn(n,e){return Y(n,e.v,e.w,e.name)}class qa{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return ve(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&ve(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,t=r._prev;t!==r;)e.push(JSON.stringify(t,Ha)),t=t._prev;return"["+e.join(", ")+"]"}}function ve(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Ha(n,e){if(n!=="_next"&&n!=="_prev")return e}var ja=B(1);function Wa(n,e){if(n.nodeCount()<=1)return[];var r=Xa(n,e||ja),t=Ka(r.graph,r.buckets,r.zeroIdx);return G(E(t,function(i){return n.outEdges(i.v,i.w)}))}function Ka(n,e,r){for(var t=[],i=e[e.length-1],a=e[0],o;n.nodeCount();){for(;o=a.dequeue();)_n(n,e,r,o);for(;o=i.dequeue();)_n(n,e,r,o);if(n.nodeCount()){for(var u=e.length-2;u>0;--u)if(o=e[u].dequeue(),o){t=t.concat(_n(n,e,r,o,!0));break}}}return t}function _n(n,e,r,t,i){var a=i?[]:void 0;return c(n.inEdges(t.v),function(o){var u=n.edge(o),s=n.node(o.v);i&&a.push({v:o.v,w:o.w}),s.out-=u,On(e,r,s)}),c(n.outEdges(t.v),function(o){var u=n.edge(o),s=o.w,f=n.node(s);f.in-=u,On(e,r,f)}),n.removeNode(t.v),a}function Xa(n,e){var r=new L,t=0,i=0;c(n.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(n.edges(),function(u){var s=r.edge(u.v,u.w)||0,f=e(u),d=s+f;r.setEdge(u.v,u.w,d),i=Math.max(i,r.node(u.v).out+=f),t=Math.max(t,r.node(u.w).in+=f)});var a=D(i+t+3).map(function(){return new qa}),o=t+1;return c(r.nodes(),function(u){On(a,o,r.node(u))}),{graph:r,buckets:a,zeroIdx:o}}function On(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Va(n){var e=n.graph().acyclicer==="greedy"?Wa(n,r(n)):Za(n);c(e,function(t){var i=n.edge(t);n.removeEdge(t),i.forwardName=t.name,i.reversed=!0,n.setEdge(t.w,t.v,i,Un("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Za(n){var e=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,c(n.outEdges(a),function(o){b(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return c(n.nodes(),i),e}function Ja(n){c(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}})}function k(n,e,r,t){var i;do i=Un(t);while(n.hasNode(i));return r.dummy=e,n.setNode(i,r),i}function Qa(n){var e=new L().setGraph(n.graph());return c(n.nodes(),function(r){e.setNode(r,n.node(r))}),c(n.edges(),function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},i=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),e}function Ve(n){var e=new L({multigraph:n.isMultigraph()}).setGraph(n.graph());return c(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),c(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function ge(n,e){var r=n.x,t=n.y,i=e.x-r,a=e.y-t,o=n.width/2,u=n.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,f;return Math.abs(a)*o>Math.abs(i)*u?(a<0&&(u=-u),s=u*i/a,f=u):(i<0&&(o=-o),s=o,f=o*a/i),{x:r+s,y:t+f}}function pn(n){var e=E(D(Ze(n)+1),function(){return[]});return c(n.nodes(),function(r){var t=n.node(r),i=t.rank;y(i)||(e[i][t.order]=r)}),e}function za(n){var e=W(E(n.nodes(),function(r){return n.node(r).rank}));c(n.nodes(),function(r){var t=n.node(r);b(t,"rank")&&(t.rank-=e)})}function no(n){var e=W(E(n.nodes(),function(a){return n.node(a).rank})),r=[];c(n.nodes(),function(a){var o=n.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=n.graph().nodeRankFactor;c(r,function(a,o){y(a)&&o%i!==0?--t:t&&c(a,function(u){n.node(u).rank+=t})})}function pe(n,e,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),k(n,"border",i,e)}function Ze(n){return S(E(n.nodes(),function(e){var r=n.node(e).rank;if(!y(r))return r}))}function eo(n,e){var r={lhs:[],rhs:[]};return c(n,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}function ro(n,e){var r=de();try{return e()}finally{console.log(n+" time: "+(de()-r)+"ms")}}function to(n,e){return e()}function io(n){function e(r){var t=n.children(r),i=n.node(r);if(t.length&&c(t,e),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)be(n,"borderLeft","_bl",r,i,a),be(n,"borderRight","_br",r,i,a)}}c(n.children(),e)}function be(n,e,r,t,i,a){var o={width:0,height:0,rank:a,borderType:e},u=i[e][a-1],s=k(n,"border",o,r);i[e][a]=s,n.setParent(s,t),u&&n.setEdge(u,s,{weight:1})}function ao(n){var e=n.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Je(n)}function oo(n){var e=n.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&uo(n),(e==="lr"||e==="rl")&&(so(n),Je(n))}function Je(n){c(n.nodes(),function(e){we(n.node(e))}),c(n.edges(),function(e){we(n.edge(e))})}function we(n){var e=n.width;n.width=n.height,n.height=e}function uo(n){c(n.nodes(),function(e){En(n.node(e))}),c(n.edges(),function(e){var r=n.edge(e);c(r.points,En),b(r,"y")&&En(r)})}function En(n){n.y=-n.y}function so(n){c(n.nodes(),function(e){yn(n.node(e))}),c(n.edges(),function(e){var r=n.edge(e);c(r.points,yn),b(r,"x")&&yn(r)})}function yn(n){var e=n.x;n.x=n.y,n.y=e}function fo(n){n.graph().dummyChains=[],c(n.edges(),function(e){co(n,e)})}function co(n,e){var r=e.v,t=n.node(r).rank,i=e.w,a=n.node(i).rank,o=e.name,u=n.edge(e),s=u.labelRank;if(a!==t+1){n.removeEdge(e);var f,d,h;for(h=0,++t;t<a;++h,++t)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:e,rank:t},f=k(n,"edge",d,"_d"),t===s&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),n.setEdge(r,f,{weight:u.weight},o),h===0&&n.graph().dummyChains.push(f),r=f;n.setEdge(r,i,{weight:u.weight},o)}}function ho(n){c(n.graph().dummyChains,function(e){var r=n.node(e),t=r.edgeLabel,i;for(n.setEdge(r.edgeObj,t);r.dummy;)i=n.successors(e)[0],n.removeNode(e),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),e=i,r=n.node(e)})}function qn(n){var e={};function r(t){var i=n.node(t);if(b(e,t))return i.rank;e[t]=!0;var a=W(E(n.outEdges(t),function(o){return r(o.w)-n.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}c(n.sources(),r)}function K(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function Qe(n){var e=new L({directed:!1}),r=n.nodes()[0],t=n.nodeCount();e.setNode(r,{});for(var i,a;lo(e,n)<t;)i=vo(e,n),a=e.hasNode(i.v)?K(n,i):-K(n,i),go(e,n,a);return e}function lo(n,e){function r(t){c(e.nodeEdges(t),function(i){var a=i.v,o=t===a?i.w:a;!n.hasNode(o)&&!K(e,i)&&(n.setNode(o,{}),n.setEdge(t,o,{}),r(o))})}return c(n.nodes(),r),n.nodeCount()}function vo(n,e){return Yn(e.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return K(e,r)})}function go(n,e,r){c(n.nodes(),function(t){e.node(t).rank+=r})}function po(){}po.prototype=new Error;function ze(n,e,r){x(e)||(e=[e]);var t=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],a={};return c(e,function(o){if(!n.hasNode(o))throw new Error("Graph does not have node: "+o);nr(n,o,r==="post",a,t,i)}),i}function nr(n,e,r,t,i,a){b(t,e)||(t[e]=!0,r||a.push(e),c(i(e),function(o){nr(n,o,r,t,i,a)}),r&&a.push(e))}function bo(n,e){return ze(n,e,"post")}function wo(n,e){return ze(n,e,"pre")}M.initLowLimValues=jn;M.initCutValues=Hn;M.calcCutValue=er;M.leaveEdge=tr;M.enterEdge=ir;M.exchangeEdges=ar;function M(n){n=Qa(n),qn(n);var e=Qe(n);jn(e),Hn(e,n);for(var r,t;r=tr(e);)t=ir(e,n,r),ar(e,n,r,t)}function Hn(n,e){var r=bo(n,n.nodes());r=r.slice(0,r.length-1),c(r,function(t){mo(n,e,t)})}function mo(n,e,r){var t=n.node(r),i=t.parent;n.edge(r,i).cutvalue=er(n,e,r)}function er(n,e,r){var t=n.node(r),i=t.parent,a=!0,o=e.edge(r,i),u=0;return o||(a=!1,o=e.edge(i,r)),u=o.weight,c(e.nodeEdges(r),function(s){var f=s.v===r,d=f?s.w:s.v;if(d!==i){var h=f===a,l=e.edge(s).weight;if(u+=h?l:-l,Eo(n,r,d)){var g=n.edge(r,d).cutvalue;u+=h?-g:g}}}),u}function jn(n,e){arguments.length<2&&(e=n.nodes()[0]),rr(n,{},1,e)}function rr(n,e,r,t,i){var a=r,o=n.node(t);return e[t]=!0,c(n.neighbors(t),function(u){b(e,u)||(r=rr(n,e,r,u,t))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function tr(n){return kn(n.edges(),function(e){return n.edge(e).cutvalue<0})}function ir(n,e,r){var t=r.v,i=r.w;e.hasEdge(t,i)||(t=r.w,i=r.v);var a=n.node(t),o=n.node(i),u=a,s=!1;a.lim>o.lim&&(u=o,s=!0);var f=A(e.edges(),function(d){return s===me(n,n.node(d.v),u)&&s!==me(n,n.node(d.w),u)});return Yn(f,function(d){return K(e,d)})}function ar(n,e,r,t){var i=r.v,a=r.w;n.removeEdge(i,a),n.setEdge(t.v,t.w,{}),jn(n),Hn(n,e),_o(n,e)}function _o(n,e){var r=kn(n.nodes(),function(i){return!e.node(i).parent}),t=wo(n,r);t=t.slice(1),c(t,function(i){var a=n.node(i).parent,o=e.edge(i,a),u=!1;o||(o=e.edge(a,i),u=!0),e.node(i).rank=e.node(a).rank+(u?o.minlen:-o.minlen)})}function Eo(n,e,r){return n.hasEdge(e,r)}function me(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function yo(n){switch(n.graph().ranker){case"network-simplex":_e(n);break;case"tight-tree":To(n);break;case"longest-path":xo(n);break;default:_e(n)}}var xo=qn;function To(n){qn(n),Qe(n)}function _e(n){M(n)}function Lo(n){var e=k(n,"root",{},"_root"),r=Ao(n),t=S(N(r))-1,i=2*t+1;n.graph().nestingRoot=e,c(n.edges(),function(o){n.edge(o).minlen*=i});var a=No(n)+1;c(n.children(),function(o){or(n,e,i,a,t,r,o)}),n.graph().nodeRankFactor=i}function or(n,e,r,t,i,a,o){var u=n.children(o);if(!u.length){o!==e&&n.setEdge(e,o,{weight:0,minlen:r});return}var s=pe(n,"_bt"),f=pe(n,"_bb"),d=n.node(o);n.setParent(s,o),d.borderTop=s,n.setParent(f,o),d.borderBottom=f,c(u,function(h){or(n,e,r,t,i,a,h);var l=n.node(h),g=l.borderTop?l.borderTop:h,v=l.borderBottom?l.borderBottom:h,p=l.borderTop?t:2*t,m=g!==v?1:i-a[o]+1;n.setEdge(s,g,{weight:p,minlen:m,nestingEdge:!0}),n.setEdge(v,f,{weight:p,minlen:m,nestingEdge:!0})}),n.parent(o)||n.setEdge(e,s,{weight:0,minlen:i+a[o]})}function Ao(n){var e={};function r(t,i){var a=n.children(t);a&&a.length&&c(a,function(o){r(o,i+1)}),e[t]=i}return c(n.children(),function(t){r(t,1)}),e}function No(n){return J(n.edges(),function(e,r){return e+n.edge(r).weight},0)}function Oo(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,c(n.edges(),function(r){var t=n.edge(r);t.nestingEdge&&n.removeEdge(r)})}function Co(n,e,r){var t={},i;c(r,function(a){for(var o=n.parent(a),u,s;o;){if(u=n.parent(o),u?(s=t[u],t[u]=o):(s=i,i=o),s&&s!==o){e.setEdge(s,o);return}o=u}})}function Io(n,e,r){var t=Po(n),i=new L({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return n.node(a)});return c(n.nodes(),function(a){var o=n.node(a),u=n.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,u||t),c(n[r](a),function(s){var f=s.v===a?s.w:s.v,d=i.edge(f,a),h=y(d)?0:d.weight;i.setEdge(f,a,{weight:n.edge(s).weight+h})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function Po(n){for(var e;n.hasNode(e=Un("_root")););return e}function $o(n,e){for(var r=0,t=1;t<e.length;++t)r+=So(n,e[t-1],e[t]);return r}function So(n,e,r){for(var t=Ba(r,E(r,function(f,d){return d})),i=G(E(e,function(f){return Q(E(n.outEdges(f),function(d){return{pos:t[d.w],weight:n.edge(d).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var o=2*a-1;a-=1;var u=E(new Array(o),function(){return 0}),s=0;return c(i.forEach(function(f){var d=f.pos+a;u[d]+=f.weight;for(var h=0;d>0;)d%2&&(h+=u[d+1]),d=d-1>>1,u[d]+=f.weight;s+=f.weight*h})),s}function Mo(n){var e={},r=A(n.nodes(),function(u){return!n.children(u).length}),t=S(E(r,function(u){return n.node(u).rank})),i=E(D(t+1),function(){return[]});function a(u){if(!b(e,u)){e[u]=!0;var s=n.node(u);i[s.rank].push(u),c(n.successors(u),a)}}var o=Q(r,function(u){return n.node(u).rank});return c(o,a),i}function Ro(n,e){return E(e,function(r){var t=n.inEdges(r);if(t.length){var i=J(t,function(a,o){var u=n.edge(o),s=n.node(o.v);return{sum:a.sum+u.weight*s.order,weight:a.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Fo(n,e){var r={};c(n,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};y(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),c(e.edges(),function(i){var a=r[i.v],o=r[i.w];!y(a)&&!y(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=A(r,function(i){return!i.indegree});return Do(t)}function Do(n){var e=[];function r(a){return function(o){o.merged||(y(o.barycenter)||y(a.barycenter)||o.barycenter>=a.barycenter)&&Go(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&n.push(o)}}for(;n.length;){var i=n.pop();e.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return E(A(e,function(a){return!a.merged}),function(a){return sn(a,["vs","i","barycenter","weight"])})}function Go(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}function ko(n,e){var r=eo(n,function(d){return b(d,"barycenter")}),t=r.lhs,i=Q(r.rhs,function(d){return-d.i}),a=[],o=0,u=0,s=0;t.sort(Bo(!!e)),s=Ee(a,i,s),c(t,function(d){s+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,u+=d.weight,s=Ee(a,i,s)});var f={vs:G(a)};return u&&(f.barycenter=o/u,f.weight=u),f}function Ee(n,e,r){for(var t;e.length&&(t=un(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function Bo(n){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:n?r.i-e.i:e.i-r.i}}function ur(n,e,r,t){var i=n.children(e),a=n.node(e),o=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,s={};o&&(i=A(i,function(v){return v!==o&&v!==u}));var f=Ro(n,i);c(f,function(v){if(n.children(v.v).length){var p=ur(n,v.v,r,t);s[v.v]=p,b(p,"barycenter")&&Uo(v,p)}});var d=Fo(f,r);Yo(d,s);var h=ko(d,t);if(o&&(h.vs=G([o,h.vs,u]),n.predecessors(o).length)){var l=n.node(n.predecessors(o)[0]),g=n.node(n.predecessors(u)[0]);b(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+g.order)/(h.weight+2),h.weight+=2}return h}function Yo(n,e){c(n,function(r){r.vs=G(r.vs.map(function(t){return e[t]?e[t].vs:t}))})}function Uo(n,e){y(n.barycenter)?(n.barycenter=e.barycenter,n.weight=e.weight):(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight)}function qo(n){var e=Ze(n),r=ye(n,D(1,e+1),"inEdges"),t=ye(n,D(e-1,-1,-1),"outEdges"),i=Mo(n);xe(n,i);for(var a=Number.POSITIVE_INFINITY,o,u=0,s=0;s<4;++u,++s){Ho(u%2?r:t,u%4>=2),i=pn(n);var f=$o(n,i);f<a&&(s=0,o=bi(i),a=f)}xe(n,o)}function ye(n,e,r){return E(e,function(t){return Io(n,t,r)})}function Ho(n,e){var r=new L;c(n,function(t){var i=t.graph().root,a=ur(t,i,r,e);c(a.vs,function(o,u){t.node(o).order=u}),Co(t,r,a.vs)})}function xe(n,e){c(e,function(r){c(r,function(t,i){n.node(t).order=i})})}function jo(n){var e=Ko(n);c(n.graph().dummyChains,function(r){for(var t=n.node(r),i=t.edgeObj,a=Wo(n,e,i.v,i.w),o=a.path,u=a.lca,s=0,f=o[s],d=!0;r!==i.w;){if(t=n.node(r),d){for(;(f=o[s])!==u&&n.node(f).maxRank<t.rank;)s++;f===u&&(d=!1)}if(!d){for(;s<o.length-1&&n.node(f=o[s+1]).minRank<=t.rank;)s++;f=o[s]}n.setParent(r,f),r=n.successors(r)[0]}})}function Wo(n,e,r,t){var i=[],a=[],o=Math.min(e[r].low,e[t].low),u=Math.max(e[r].lim,e[t].lim),s,f;s=r;do s=n.parent(s),i.push(s);while(s&&(e[s].low>o||u>e[s].lim));for(f=s,s=t;(s=n.parent(s))!==f;)a.push(s);return{path:i.concat(a.reverse()),lca:f}}function Ko(n){var e={},r=0;function t(i){var a=r;c(n.children(i),t),e[i]={low:a,lim:r++}}return c(n.children(),t),e}function Xo(n,e){var r={};function t(i,a){var o=0,u=0,s=i.length,f=un(a);return c(a,function(d,h){var l=Zo(n,d),g=l?n.node(l).order:s;(l||d===f)&&(c(a.slice(u,h+1),function(v){c(n.predecessors(v),function(p){var m=n.node(p),_=m.order;(_<o||g<_)&&!(m.dummy&&n.node(v).dummy)&&sr(r,p,v)})}),u=h+1,o=g)}),a}return J(e,t),r}function Vo(n,e){var r={};function t(a,o,u,s,f){var d;c(D(o,u),function(h){d=a[h],n.node(d).dummy&&c(n.predecessors(d),function(l){var g=n.node(l);g.dummy&&(g.order<s||g.order>f)&&sr(r,l,d)})})}function i(a,o){var u=-1,s,f=0;return c(o,function(d,h){if(n.node(d).dummy==="border"){var l=n.predecessors(d);l.length&&(s=n.node(l[0]).order,t(o,f,h,u,s),f=h,u=s)}t(o,f,o.length,s,a.length)}),o}return J(e,i),r}function Zo(n,e){if(n.node(e).dummy)return kn(n.predecessors(e),function(r){return n.node(r).dummy})}function sr(n,e,r){if(e>r){var t=e;e=r,r=t}var i=n[e];i||(n[e]=i={}),i[r]=!0}function Jo(n,e,r){if(e>r){var t=e;e=r,r=t}return b(n[e],r)}function Qo(n,e,r,t){var i={},a={},o={};return c(e,function(u){c(u,function(s,f){i[s]=s,a[s]=s,o[s]=f})}),c(e,function(u){var s=-1;c(u,function(f){var d=t(f);if(d.length){d=Q(d,function(p){return o[p]});for(var h=(d.length-1)/2,l=Math.floor(h),g=Math.ceil(h);l<=g;++l){var v=d[l];a[f]===f&&s<o[v]&&!Jo(r,f,v)&&(a[v]=f,a[f]=i[f]=i[v],s=o[v])}}})}),{root:i,align:a}}function zo(n,e,r,t,i){var a={},o=nu(n,e,r,i),u=i?"borderLeft":"borderRight";function s(h,l){for(var g=o.nodes(),v=g.pop(),p={};v;)p[v]?h(v):(p[v]=!0,g.push(v),g=g.concat(l(v))),v=g.pop()}function f(h){a[h]=o.inEdges(h).reduce(function(l,g){return Math.max(l,a[g.v]+o.edge(g))},0)}function d(h){var l=o.outEdges(h).reduce(function(v,p){return Math.min(v,a[p.w]-o.edge(p))},Number.POSITIVE_INFINITY),g=n.node(h);l!==Number.POSITIVE_INFINITY&&g.borderType!==u&&(a[h]=Math.max(a[h],l))}return s(f,o.predecessors.bind(o)),s(d,o.successors.bind(o)),c(t,function(h){a[h]=a[r[h]]}),a}function nu(n,e,r,t){var i=new L,a=n.graph(),o=au(a.nodesep,a.edgesep,t);return c(e,function(u){var s;c(u,function(f){var d=r[f];if(i.setNode(d),s){var h=r[s],l=i.edge(h,d);i.setEdge(h,d,Math.max(o(n,f,s),l||0))}s=f})}),i}function eu(n,e){return Yn(N(e),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return va(r,function(a,o){var u=ou(n,o)/2;t=Math.max(a+u,t),i=Math.min(a-u,i)}),t-i})}function ru(n,e){var r=N(e),t=W(r),i=S(r);c(["u","d"],function(a){c(["l","r"],function(o){var u=a+o,s=n[u],f;if(s!==e){var d=N(s);f=o==="l"?t-W(d):i-S(d),f&&(n[u]=gn(s,function(h){return h+f}))}})})}function tu(n,e){return gn(n.ul,function(r,t){if(e)return n[e.toLowerCase()][t];var i=Q(E(n,t));return(i[1]+i[2])/2})}function iu(n){var e=pn(n),r=An(Xo(n,e),Vo(n,e)),t={},i;c(["u","d"],function(o){i=o==="u"?e:N(e).reverse(),c(["l","r"],function(u){u==="r"&&(i=E(i,function(h){return N(h).reverse()}));var s=(o==="u"?n.predecessors:n.successors).bind(n),f=Qo(n,i,r,s),d=zo(n,i,f.root,f.align,u==="r");u==="r"&&(d=gn(d,function(h){return-h})),t[o+u]=d})});var a=eu(n,t);return ru(t,a),tu(t,n.graph().align)}function au(n,e,r){return function(t,i,a){var o=t.node(i),u=t.node(a),s=0,f;if(s+=o.width/2,b(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":f=-o.width/2;break;case"r":f=o.width/2;break}if(f&&(s+=r?f:-f),f=0,s+=(o.dummy?e:n)/2,s+=(u.dummy?e:n)/2,s+=u.width/2,b(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":f=u.width/2;break;case"r":f=-u.width/2;break}return f&&(s+=r?f:-f),f=0,s}}function ou(n,e){return n.node(e).width}function uu(n){n=Ve(n),su(n),ga(iu(n),function(e,r){n.node(r).x=e})}function su(n){var e=pn(n),r=n.graph().ranksep,t=0;c(e,function(i){var a=S(E(i,function(o){return n.node(o).height}));c(i,function(o){n.node(o).y=t+a/2}),t+=a+r})}function Su(n,e){var r=e&&e.debugTiming?ro:to;r("layout",function(){var t=r(" buildLayoutGraph",function(){return mu(n)});r(" runLayout",function(){fu(t,r)}),r(" updateInputGraph",function(){du(n,t)})})}function fu(n,e){e(" makeSpaceForEdgeLabels",function(){_u(n)}),e(" removeSelfEdges",function(){Cu(n)}),e(" acyclic",function(){Va(n)}),e(" nestingGraph.run",function(){Lo(n)}),e(" rank",function(){yo(Ve(n))}),e(" injectEdgeLabelProxies",function(){Eu(n)}),e(" removeEmptyRanks",function(){no(n)}),e(" nestingGraph.cleanup",function(){Oo(n)}),e(" normalizeRanks",function(){za(n)}),e(" assignRankMinMax",function(){yu(n)}),e(" removeEdgeLabelProxies",function(){xu(n)}),e(" normalize.run",function(){fo(n)}),e(" parentDummyChains",function(){jo(n)}),e(" addBorderSegments",function(){io(n)}),e(" order",function(){qo(n)}),e(" insertSelfEdges",function(){Iu(n)}),e(" adjustCoordinateSystem",function(){ao(n)}),e(" position",function(){uu(n)}),e(" positionSelfEdges",function(){Pu(n)}),e(" removeBorderNodes",function(){Ou(n)}),e(" normalize.undo",function(){ho(n)}),e(" fixupEdgeLabelCoords",function(){Au(n)}),e(" undoCoordinateSystem",function(){oo(n)}),e(" translateGraph",function(){Tu(n)}),e(" assignNodeIntersects",function(){Lu(n)}),e(" reversePoints",function(){Nu(n)}),e(" acyclic.undo",function(){Ja(n)})}function du(n,e){c(n.nodes(),function(r){var t=n.node(r),i=e.node(r);t&&(t.x=i.x,t.y=i.y,e.children(r).length&&(t.width=i.width,t.height=i.height))}),c(n.edges(),function(r){var t=n.edge(r),i=e.edge(r);t.points=i.points,b(i,"x")&&(t.x=i.x,t.y=i.y)}),n.graph().width=e.graph().width,n.graph().height=e.graph().height}var cu=["nodesep","edgesep","ranksep","marginx","marginy"],hu={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},lu=["acyclicer","ranker","rankdir","align"],vu=["width","height"],gu={width:0,height:0},pu=["minlen","weight","width","height","labeloffset"],bu={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},wu=["labelpos"];function mu(n){var e=new L({multigraph:!0,compound:!0}),r=Tn(n.graph());return e.setGraph(An({},hu,xn(r,cu),sn(r,lu))),c(n.nodes(),function(t){var i=Tn(n.node(t));e.setNode(t,sa(xn(i,vu),gu)),e.setParent(t,n.parent(t))}),c(n.edges(),function(t){var i=Tn(n.edge(t));e.setEdge(t,An({},bu,xn(i,pu),sn(i,wu)))}),e}function _u(n){var e=n.graph();e.ranksep/=2,c(n.edges(),function(r){var t=n.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Eu(n){c(n.edges(),function(e){var r=n.edge(e);if(r.width&&r.height){var t=n.node(e.v),i=n.node(e.w),a={rank:(i.rank-t.rank)/2+t.rank,e};k(n,"edge-proxy",a,"_ep")}})}function yu(n){var e=0;c(n.nodes(),function(r){var t=n.node(r);t.borderTop&&(t.minRank=n.node(t.borderTop).rank,t.maxRank=n.node(t.borderBottom).rank,e=S(e,t.maxRank))}),n.graph().maxRank=e}function xu(n){c(n.nodes(),function(e){var r=n.node(e);r.dummy==="edge-proxy"&&(n.edge(r.e).labelRank=r.rank,n.removeNode(e))})}function Tu(n){var e=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,a=n.graph(),o=a.marginx||0,u=a.marginy||0;function s(f){var d=f.x,h=f.y,l=f.width,g=f.height;e=Math.min(e,d-l/2),r=Math.max(r,d+l/2),t=Math.min(t,h-g/2),i=Math.max(i,h+g/2)}c(n.nodes(),function(f){s(n.node(f))}),c(n.edges(),function(f){var d=n.edge(f);b(d,"x")&&s(d)}),e-=o,t-=u,c(n.nodes(),function(f){var d=n.node(f);d.x-=e,d.y-=t}),c(n.edges(),function(f){var d=n.edge(f);c(d.points,function(h){h.x-=e,h.y-=t}),b(d,"x")&&(d.x-=e),b(d,"y")&&(d.y-=t)}),a.width=r-e+o,a.height=i-t+u}function Lu(n){c(n.edges(),function(e){var r=n.edge(e),t=n.node(e.v),i=n.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=t),r.points.unshift(ge(t,a)),r.points.push(ge(i,o))})}function Au(n){c(n.edges(),function(e){var r=n.edge(e);if(b(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Nu(n){c(n.edges(),function(e){var r=n.edge(e);r.reversed&&r.points.reverse()})}function Ou(n){c(n.nodes(),function(e){if(n.children(e).length){var r=n.node(e),t=n.node(r.borderTop),i=n.node(r.borderBottom),a=n.node(un(r.borderLeft)),o=n.node(un(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-t.y),r.x=a.x+r.width/2,r.y=t.y+r.height/2}}),c(n.nodes(),function(e){n.node(e).dummy==="border"&&n.removeNode(e)})}function Cu(n){c(n.edges(),function(e){if(e.v===e.w){var r=n.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:n.edge(e)}),n.removeEdge(e)}})}function Iu(n){var e=pn(n);c(e,function(r){var t=0;c(r,function(i,a){var o=n.node(i);o.order=a+t,c(o.selfEdges,function(u){k(n,"selfedge",{width:u.label.width,height:u.label.height,rank:o.rank,order:a+ ++t,e:u.e,label:u.label},"_se")}),delete o.selfEdges})})}function Pu(n){c(n.nodes(),function(e){var r=n.node(e);if(r.dummy==="selfedge"){var t=n.node(r.e.v),i=t.x+t.width/2,a=t.y,o=r.x-i,u=t.height/2;n.setEdge(r.e,r.label),n.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-u},{x:i+5*o/6,y:a-u},{x:i+o,y:a},{x:i+5*o/6,y:a+u},{x:i+2*o/3,y:a+u}],r.label.x=r.x,r.label.y=r.y}})}function xn(n,e){return gn(sn(n,e),Number)}function Tn(n){var e={};return c(n,function(r,t){e[t.toLowerCase()]=r}),e}export{L as G,tn as b,sa as d,c as f,b as h,y as i,Su as l,E as m,sn as p,D as r,Un as u};
@@ -1 +0,0 @@
1
- import{a as m}from"./array-BKyUJesY.js";import{aT as d,Y as o,o as v}from"./index-CFcJr8Yf.js";function b(t){return t[0]}function w(t){return t[1]}function L(t,u){var s=o(!0),i=null,l=v,r=null,h=d(e);t=typeof t=="function"?t:t===void 0?b:o(t),u=typeof u=="function"?u:u===void 0?w:o(u);function e(n){var f,p=(n=m(n)).length,a,c=!1,g;for(i==null&&(r=l(g=h())),f=0;f<=p;++f)!(f<p&&s(a=n[f],f,n))===c&&((c=!c)?r.lineStart():r.lineEnd()),c&&r.point(+t(a,f,n),+u(a,f,n));if(g)return r=null,g+""||null}return e.x=function(n){return arguments.length?(t=typeof n=="function"?n:o(+n),e):t},e.y=function(n){return arguments.length?(u=typeof n=="function"?n:o(+n),e):u},e.defined=function(n){return arguments.length?(s=typeof n=="function"?n:o(!!n),e):s},e.curve=function(n){return arguments.length?(l=n,i!=null&&(r=l(i)),e):l},e.context=function(n){return arguments.length?(n==null?i=r=null:r=l(i=n),e):i},e}export{L as l};
@@ -1 +0,0 @@
1
- import{a4 as rn,a5 as en}from"./index-CFcJr8Yf.js";import{i as an}from"./init-Gi6I4Gst.js";function F(n,t){return n==null||t==null?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function on(n,t){return n==null||t==null?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function K(n){let t,e,r;n.length!==2?(t=F,e=(o,c)=>F(n(o),c),r=(o,c)=>n(o)-c):(t=n===F||n===on?n:un,e=n,r=n);function a(o,c,i=0,l=o.length){if(i<l){if(t(c,c)!==0)return l;do{const h=i+l>>>1;e(o[h],c)<0?i=h+1:l=h}while(i<l)}return i}function f(o,c,i=0,l=o.length){if(i<l){if(t(c,c)!==0)return l;do{const h=i+l>>>1;e(o[h],c)<=0?i=h+1:l=h}while(i<l)}return i}function u(o,c,i=0,l=o.length){const h=a(o,c,i,l-1);return h>i&&r(o[h-1],c)>-r(o[h],c)?h-1:h}return{left:a,center:u,right:f}}function un(){return 0}function fn(n){return n===null?NaN:+n}const cn=K(F),hn=cn.right;K(fn).center;const mn=Math.sqrt(50),sn=Math.sqrt(10),ln=Math.sqrt(2);function E(n,t,e){const r=(t-n)/Math.max(0,e),a=Math.floor(Math.log10(r)),f=r/Math.pow(10,a),u=f>=mn?10:f>=sn?5:f>=ln?2:1;let o,c,i;return a<0?(i=Math.pow(10,-a)/u,o=Math.round(n*i),c=Math.round(t*i),o/i<n&&++o,c/i>t&&--c,i=-i):(i=Math.pow(10,a)*u,o=Math.round(n/i),c=Math.round(t/i),o*i<n&&++o,c*i>t&&--c),c<o&&.5<=e&&e<2?E(n,t,e*2):[o,c,i]}function dn(n,t,e){if(t=+t,n=+n,e=+e,!(e>0))return[];if(n===t)return[n];const r=t<n,[a,f,u]=r?E(t,n,e):E(n,t,e);if(!(f>=a))return[];const o=f-a+1,c=new Array(o);if(r)if(u<0)for(let i=0;i<o;++i)c[i]=(f-i)/-u;else for(let i=0;i<o;++i)c[i]=(f-i)*u;else if(u<0)for(let i=0;i<o;++i)c[i]=(a+i)/-u;else for(let i=0;i<o;++i)c[i]=(a+i)*u;return c}function T(n,t,e){return t=+t,n=+n,e=+e,E(n,t,e)[2]}function gn(n,t,e){t=+t,n=+n,e=+e;const r=t<n,a=r?T(t,n,e):T(n,t,e);return(r?-1:1)*(a<0?1/-a:a)}function Mn(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}function yn(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function R(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function S(n){return n=R(Math.abs(n)),n?n[1]:NaN}function pn(n,t){return function(e,r){for(var a=e.length,f=[],u=0,o=n[0],c=0;a>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),f.push(e.substring(a-=o,a+o)),!((c+=o+1)>r));)o=n[u=(u+1)%n.length];return f.reverse().join(t)}}function wn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var bn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function I(n){if(!(t=bn.exec(n)))throw new Error("invalid format: "+n);var t;return new C({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}I.prototype=C.prototype;function C(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}C.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Nn(n){n:for(var t=n.length,e=1,r=-1,a;e<t;++e)switch(n[e]){case".":r=a=e;break;case"0":r===0&&(r=e),a=e;break;default:if(!+n[e])break n;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(a+1):n}var Q;function kn(n,t){var e=R(n,t);if(!e)return n+"";var r=e[0],a=e[1],f=a-(Q=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=r.length;return f===u?r:f>u?r+new Array(f-u+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+R(n,Math.max(0,t+f-1))[0]}function O(n,t){var e=R(n,t);if(!e)return n+"";var r=e[0],a=e[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const U={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:yn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>O(n*100,t),r:O,s:kn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function Y(n){return n}var Z=Array.prototype.map,H=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xn(n){var t=n.grouping===void 0||n.thousands===void 0?Y:pn(Z.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",a=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?Y:wn(Z.call(n.numerals,String)),u=n.percent===void 0?"%":n.percent+"",o=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function i(h){h=I(h);var s=h.fill,p=h.align,M=h.sign,A=h.symbol,N=h.zero,v=h.width,L=h.comma,w=h.precision,D=h.trim,d=h.type;d==="n"?(L=!0,d="g"):U[d]||(w===void 0&&(w=12),D=!0,d="g"),(N||s==="0"&&p==="=")&&(N=!0,s="0",p="=");var _=A==="$"?e:A==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",nn=A==="$"?r:/[%p]/.test(d)?u:"",G=U[d],tn=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function X(m){var b=_,g=nn,k,B,P;if(d==="c")g=G(m)+g,m="";else{m=+m;var z=m<0||1/m<0;if(m=isNaN(m)?c:G(Math.abs(m),w),D&&(m=Nn(m)),z&&+m==0&&M!=="+"&&(z=!1),b=(z?M==="("?M:o:M==="-"||M==="("?"":M)+b,g=(d==="s"?H[8+Q/3]:"")+g+(z&&M==="("?")":""),tn){for(k=-1,B=m.length;++k<B;)if(P=m.charCodeAt(k),48>P||P>57){g=(P===46?a+m.slice(k+1):m.slice(k))+g,m=m.slice(0,k);break}}}L&&!N&&(m=t(m,1/0));var j=b.length+m.length+g.length,y=j<v?new Array(v-j+1).join(s):"";switch(L&&N&&(m=t(y+m,y.length?v-g.length:1/0),y=""),p){case"<":m=b+m+g+y;break;case"=":m=b+y+m+g;break;case"^":m=y.slice(0,j=y.length>>1)+b+m+g+y.slice(j);break;default:m=y+b+m+g;break}return f(m)}return X.toString=function(){return h+""},X}function l(h,s){var p=i((h=I(h),h.type="f",h)),M=Math.max(-8,Math.min(8,Math.floor(S(s)/3)))*3,A=Math.pow(10,-M),N=H[8+M/3];return function(v){return p(A*v)+N}}return{format:i,formatPrefix:l}}var $,V,W;Sn({thousands:",",grouping:[3],currency:["$",""]});function Sn(n){return $=xn(n),V=$.format,W=$.formatPrefix,$}function An(n){return Math.max(0,-S(Math.abs(n)))}function vn(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(t)/3)))*3-S(Math.abs(n)))}function Pn(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,S(t)-S(n))+1}function zn(n){return function(){return n}}function jn(n){return+n}var J=[0,1];function x(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:zn(isNaN(t)?NaN:.5)}function $n(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Fn(n,t,e){var r=n[0],a=n[1],f=t[0],u=t[1];return a<r?(r=q(a,r),f=e(u,f)):(r=q(r,a),f=e(f,u)),function(o){return f(r(o))}}function En(n,t,e){var r=Math.min(n.length,t.length)-1,a=new Array(r),f=new Array(r),u=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++u<r;)a[u]=q(n[u],n[u+1]),f[u]=e(t[u],t[u+1]);return function(o){var c=hn(n,o,1,r)-1;return f[c](a[c](o))}}function Rn(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function In(){var n=J,t=J,e=en,r,a,f,u=x,o,c,i;function l(){var s=Math.min(n.length,t.length);return u!==x&&(u=$n(n[0],n[s-1])),o=s>2?En:Fn,c=i=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(r),t,e)))(r(u(s)))}return h.invert=function(s){return u(a((i||(i=o(t,n.map(r),rn)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,jn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=Mn,l()},h.clamp=function(s){return arguments.length?(u=s?!0:x,l()):u!==x},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,a=p,l()}}function Ln(){return In()(x,x)}function Tn(n,t,e,r){var a=gn(n,t,e),f;switch(r=I(r??",f"),r.type){case"s":{var u=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=vn(a,u))&&(r.precision=f),W(r,u)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Pn(a,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=An(a))&&(r.precision=f-(r.type==="%")*2);break}}return V(r)}function qn(n){var t=n.domain;return n.ticks=function(e){var r=t();return dn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var a=t();return Tn(a[0],a[a.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),a=0,f=r.length-1,u=r[a],o=r[f],c,i,l=10;for(o<u&&(i=u,u=o,o=i,i=a,a=f,f=i);l-- >0;){if(i=T(u,o,e),i===c)return r[a]=u,r[f]=o,t(r);if(i>0)u=Math.floor(u/i)*i,o=Math.ceil(o/i)*i;else if(i<0)u=Math.ceil(u*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function Cn(){var n=Ln();return n.copy=function(){return Rn(n,Cn())},an.apply(n,arguments),qn(n)}export{Rn as a,K as b,Ln as c,Cn as l,gn as t};
Binary file