orbitchat 3.8.3 → 3.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/assets/{ChartRenderer-DzIRvPxY.js → ChartRenderer-DvqCLHcx.js} +14 -14
  2. package/dist/assets/MermaidRenderer-BnAK1VmJ.js +312 -0
  3. package/dist/assets/{MusicRenderer-BwnX42th.js → MusicRenderer-uOyusQ_k.js} +2 -2
  4. package/dist/assets/SVGRenderer-CVmnEkXp.js +6 -0
  5. package/dist/assets/arc-DeiHBTsx.js +1 -0
  6. package/dist/assets/architectureDiagram-3BPJPVTR-CPxmhu1p.js +36 -0
  7. package/dist/assets/{band-CquvqAHh.js → band-BEGRCkg7.js} +1 -1
  8. package/dist/assets/blockDiagram-GPEHLZMM-DQ44ZOye.js +132 -0
  9. package/dist/assets/{c4Diagram-AHTNJAMY-BjSLTiBX.js → c4Diagram-AAUBKEIU-BWHbGecr.js} +1 -1
  10. package/dist/assets/channel-CYnCpQoN.js +1 -0
  11. package/dist/assets/chunk-2J33WTMH-Cbb6qme8.js +1 -0
  12. package/dist/assets/{chunk-4BX2VUAB-CW_w7OX3.js → chunk-4BX2VUAB-C4GD5mxT.js} +1 -1
  13. package/dist/assets/chunk-55IACEB6-ftlWGUCI.js +1 -0
  14. package/dist/assets/chunk-727SXJPM-rAN9U9Nb.js +206 -0
  15. package/dist/assets/chunk-AQP2D5EJ-BCfYU2jQ.js +231 -0
  16. package/dist/assets/{chunk-FMBD7UC4-DTCbHJhW.js → chunk-FMBD7UC4-BIEsK2ai.js} +1 -1
  17. package/dist/assets/chunk-ND2GUHAM-DFkVOh1M.js +1 -0
  18. package/dist/assets/{chunk-QZHKN3VN-myOJvS-u.js → chunk-QZHKN3VN-Dc5n42ad.js} +1 -1
  19. package/dist/assets/classDiagram-4FO5ZUOK-8CtwctmZ.js +1 -0
  20. package/dist/assets/classDiagram-v2-Q7XG4LA2-8CtwctmZ.js +1 -0
  21. package/dist/assets/cose-bilkent-S5V4N54A-D9NBzYqr.js +1 -0
  22. package/dist/assets/cytoscape.esm-BHYC38rz.js +331 -0
  23. package/dist/assets/dagre-BM42HDAG-DpquA62M.js +4 -0
  24. package/dist/assets/{defaultLocale-DX6XiGOO.js → defaultLocale-CrowFXzY.js} +1 -1
  25. package/dist/assets/diagram-2AECGRRQ-CmE0W-PQ.js +43 -0
  26. package/dist/assets/diagram-5GNKFQAL-B8ELVkUx.js +10 -0
  27. package/dist/assets/diagram-KO2AKTUF-DNJxuplE.js +3 -0
  28. package/dist/assets/diagram-LMA3HP47-Du6S-Ggy.js +24 -0
  29. package/dist/assets/diagram-OG6HWLK6-CN0AHiwl.js +24 -0
  30. package/dist/assets/{erDiagram-SMLLAGMA-CZeTEE4C.js → erDiagram-TEJ5UH35-B0hUASZ-.js} +2 -2
  31. package/dist/assets/{flowDiagram-DWJPFMVM-D0cOPhM6.js → flowDiagram-I6XJVG4X-DLH20zfq.js} +4 -4
  32. package/dist/assets/ganttDiagram-6RSMTGT7-TFML6PAX.js +292 -0
  33. package/dist/assets/gitGraphDiagram-PVQCEYII-Dr52HrMU.js +106 -0
  34. package/dist/assets/graph-Dqkl27Ch.js +1 -0
  35. package/dist/assets/index-BJd-lTxr.css +1 -0
  36. package/dist/assets/index-BssxqvT7.js +650 -0
  37. package/dist/assets/{index--qPbXmBe.js → index-DD-r1zx5.js} +1 -1
  38. package/dist/assets/infoDiagram-5YYISTIA-BYOq1YTe.js +2 -0
  39. package/dist/assets/{init-Dmth1JHB.js → init-BFKUnIhM.js} +1 -1
  40. package/dist/assets/{ishikawaDiagram-UXIWVN3A-Ki90st18.js → ishikawaDiagram-YF4QCWOH-CDdNgXna.js} +6 -6
  41. package/dist/assets/{journeyDiagram-VCZTEJTY-YwSMXxeX.js → journeyDiagram-JHISSGLW-Nz0w0CTU.js} +3 -3
  42. package/dist/assets/{kanban-definition-6JOO6SKY-Vy7WFwaZ.js → kanban-definition-UN3LZRKU-BOOcw18V.js} +7 -7
  43. package/dist/assets/layout-DO9UvE1P.js +1 -0
  44. package/dist/assets/{linear-CKzVTQ0r.js → linear-BFc7NSuB.js} +1 -1
  45. package/dist/assets/mindmap-definition-RKZ34NQL-CwPQd5f4.js +96 -0
  46. package/dist/assets/ordinal-BQ3KlzSu.js +1 -0
  47. package/dist/assets/pieDiagram-4H26LBE5-BE5yRihZ.js +30 -0
  48. package/dist/assets/purify.es-DxCUJf2h.js +3 -0
  49. package/dist/assets/quadrantDiagram-W4KKPZXB-DIcSMEoD.js +7 -0
  50. package/dist/assets/{requirementDiagram-MS252O5E-eGb4gzyY.js → requirementDiagram-4Y6WPE33-BfZQFenv.js} +1 -1
  51. package/dist/assets/sankeyDiagram-5OEKKPKP-63jRPoJA.js +40 -0
  52. package/dist/assets/sequenceDiagram-3UESZ5HK-BHD-5KK6.js +162 -0
  53. package/dist/assets/stateDiagram-AJRCARHV-DRHp25zg.js +1 -0
  54. package/dist/assets/stateDiagram-v2-BHNVJYJU-_wnflwKu.js +1 -0
  55. package/dist/assets/{step-EjIQ8UIn.js → step-D_f8mI9d.js} +1 -1
  56. package/dist/assets/{time-h5EapSZu.js → time-C-HXPWjm.js} +1 -1
  57. package/dist/assets/{timeline-definition-GMOUNBTQ-BMIPAICW.js → timeline-definition-PNZ67QCA-D-WcXPpr.js} +3 -3
  58. package/dist/assets/vennDiagram-CIIHVFJN-CVE_4Odl.js +34 -0
  59. package/dist/assets/wardley-L42UT6IY-B8nauDUI.js +173 -0
  60. package/dist/assets/wardleyDiagram-YWT4CUSO-DT4kqUM4.js +78 -0
  61. package/dist/assets/{xychartDiagram-5P7HB3ND-BkCris5N.js → xychartDiagram-2RQKCTM6-C2BC9QGh.js} +3 -3
  62. package/dist/index.html +2 -2
  63. package/package.json +1 -1
  64. package/dist/assets/MermaidRenderer-CmXoyqXC.js +0 -313
  65. package/dist/assets/SVGRenderer-DhgAIuO1.js +0 -6
  66. package/dist/assets/_baseUniq-DloMpWiC.js +0 -1
  67. package/dist/assets/arc-BSnyvXPh.js +0 -1
  68. package/dist/assets/architectureDiagram-Q4EWVU46-B8KMzkFt.js +0 -36
  69. package/dist/assets/blockDiagram-DXYQGD6D-BdL0TYPu.js +0 -132
  70. package/dist/assets/channel-DubFLvZS.js +0 -1
  71. package/dist/assets/chunk-4TB4RGXK-Ck4QqP3K.js +0 -206
  72. package/dist/assets/chunk-55IACEB6-DXdYcIT2.js +0 -1
  73. package/dist/assets/chunk-EDXVE4YY-TeBR2QKO.js +0 -1
  74. package/dist/assets/chunk-OYMX7WX6-1E0LKijl.js +0 -231
  75. package/dist/assets/chunk-YZCP3GAM-CCtc1vqk.js +0 -1
  76. package/dist/assets/classDiagram-6PBFFD2Q-CsFj_YsM.js +0 -1
  77. package/dist/assets/classDiagram-v2-HSJHXN6E-CsFj_YsM.js +0 -1
  78. package/dist/assets/clone-jZcgN-_G.js +0 -1
  79. package/dist/assets/cose-bilkent-S5V4N54A-B4rzpz-f.js +0 -1
  80. package/dist/assets/cytoscape.esm-BiciSPf8.js +0 -331
  81. package/dist/assets/dagre-KV5264BT-1iL4RYvS.js +0 -4
  82. package/dist/assets/diagram-5BDNPKRD-Xo_7fok6.js +0 -10
  83. package/dist/assets/diagram-G4DWMVQ6-C52EzwbV.js +0 -24
  84. package/dist/assets/diagram-MMDJMWI5-BukTxBI5.js +0 -43
  85. package/dist/assets/diagram-TYMM5635-CkBiNxnI.js +0 -24
  86. package/dist/assets/ganttDiagram-T4ZO3ILL-CSnn6uMq.js +0 -292
  87. package/dist/assets/gitGraphDiagram-UUTBAWPF-HrICfvGm.js +0 -106
  88. package/dist/assets/graph-BBTvQ5FI.js +0 -1
  89. package/dist/assets/index-9mqVdUba.js +0 -644
  90. package/dist/assets/index-D1X8PV1O.css +0 -1
  91. package/dist/assets/infoDiagram-42DDH7IO-Dw38VYFU.js +0 -2
  92. package/dist/assets/layout-Z9EF_Ub1.js +0 -1
  93. package/dist/assets/min-CgT8voI0.js +0 -1
  94. package/dist/assets/mindmap-definition-QFDTVHPH-B3Mpl_wP.js +0 -96
  95. package/dist/assets/ordinal-DILIJJjt.js +0 -1
  96. package/dist/assets/pieDiagram-DEJITSTG-Cs2Mu6Yg.js +0 -30
  97. package/dist/assets/purify.es-BlZidd4c.js +0 -2
  98. package/dist/assets/quadrantDiagram-34T5L4WZ-CUcOgh3E.js +0 -7
  99. package/dist/assets/sankeyDiagram-XADWPNL6-CJL3aIB5.js +0 -10
  100. package/dist/assets/sequenceDiagram-FGHM5R23-DghCZsr4.js +0 -157
  101. package/dist/assets/stateDiagram-FHFEXIEX-CEYXYE9a.js +0 -1
  102. package/dist/assets/stateDiagram-v2-QKLJ7IA2-BU1in3oP.js +0 -1
  103. package/dist/assets/vennDiagram-DHZGUBPP-BI2qFIdH.js +0 -34
  104. package/dist/assets/wardley-RL74JXVD-Cn_I5L_C.js +0 -162
  105. package/dist/assets/wardleyDiagram-NUSXRM2D-CAfUhUNM.js +0 -20
@@ -1,4 +0,0 @@
1
- import{_ as X,ac as Y,ad as F,ae as _,af as H,l as i,c as V,ag as $,ah as U,$ as q,a5 as z,a0 as P,Y as K,ai as Q,aj as W,ak as Z}from"./MermaidRenderer-CmXoyqXC.js";import{i as x,G as B}from"./graph-BBTvQ5FI.js";import{l as I}from"./layout-Z9EF_Ub1.js";import{c as L}from"./clone-jZcgN-_G.js";import{m as A}from"./min-CgT8voI0.js";import"./index-9mqVdUba.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";import"./_baseUniq-DloMpWiC.js";function E(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return x(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return x(n)||(c.value=n),x(o)||(c.parent=o),c})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return x(t.name)||(o.name=t.name),x(n)||(o.value=n),o})}var f=new Map,b=new Map,J=new Map,te=X(()=>{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const v=t.edge(l.v,l.w,l.name);i.info("Edge data",v,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((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: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=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 c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",E(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,E(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const v=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",E(e)),G(r,e,v,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:v}),i.warn("New graph after copy node: (",r,")",E(v)),i.debug("Old graph after copy",E(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",E(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=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.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const w=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX
2
- Node.id = `,d,`
3
- data=`,w.height,`
4
- Parent cluster`,c.height),t.setNode(c.id,w),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,w))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:w,nodesep:m}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:w+25,nodesep:m});const N=await j(g,s.graph,n,o,t.node(d),a),S=N.elem;$(s,S),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),U(S,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await q(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const w=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,w)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(E(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(E(t)));let y=0,{subGraphTitleTotalMargin:p}=z(a);return await Promise.all(oe(t).map(async function(d){var w;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=p,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=p,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,N=((w=s==null?void 0:s.labelBBox)==null?void 0:w.height)||0,S=N-m||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",m),await K(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=p/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=p/2);const w=t.node(d.v);var m=t.node(d.w);const N=Q(v,s,f,n,w,m,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(y=s.diff)}),i.warn("Returning from recursive render XAX",u,y),{elem:u,diff:y}},"recursiveRender"),he=X(async(e,t)=>{var a,r,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");Y(o,e.markers,e.type,e.diagramId),F(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const h=g.start,y=h+"---"+h+"---1",p=h+"---"+h+"---2",d=n.node(h);n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(y,d.parentId),n.setNode(p,{domId:p,id:p,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(p,d.parentId);const s=structuredClone(g),w=structuredClone(g),m=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=h+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=h+"-cyclic-special-mid",m.label="",d.isGroup&&(s.fromCluster=h,m.toCluster=h),m.id=h+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(h,y,s,h+"-cyclic-special-0"),n.setEdge(y,p,w,h+"-cyclic-special-1"),n.setEdge(p,h,m,h+"-cyc<lic-special-2")}else n.setEdge(g.start,g.end,{...g},g.id)}),i.warn("Graph at first:",JSON.stringify(E(n))),re(n),i.warn("Graph after XAX:",JSON.stringify(E(n)));const c=V();await j(o,n,e.type,e.diagramId,void 0,c)},"render");export{he as render};
@@ -1,10 +0,0 @@
1
- import{p as x,b as C,s as f,q as y,g as B,a as T,_ as s,E as u,l as k,H as V,e as _,C as N,F as S,y as D}from"./MermaidRenderer-CmXoyqXC.js";import{p as $}from"./chunk-4BX2VUAB-CW_w7OX3.js";import{I as A}from"./chunk-QZHKN3VN-myOJvS-u.js";import{p as H}from"./wardley-RL74JXVD-Cn_I5L_C.js";import"./index-9mqVdUba.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";import"./min-CgT8voI0.js";import"./_baseUniq-DloMpWiC.js";var d=new A(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),I=s(()=>{d.reset(),D()},"clear"),X=s(()=>d.records.stack[0],"getRoot"),z=s(()=>d.records.cnt,"getCount"),E=S.treeView,L=s(()=>u(E,N().treeView),"getConfig"),R=s((e,t)=>{for(;e<=d.records.stack[d.records.stack.length-1].level;)d.records.stack.pop();const r={id:d.records.cnt++,level:e,name:t,children:[]};d.records.stack[d.records.stack.length-1].children.push(r),d.records.stack.push(r)},"addNode"),W={clear:I,addNode:R,getRoot:X,getCount:z,getConfig:L,getAccTitle:T,getAccDescription:B,getDiagramTitle:y,setAccDescription:f,setAccTitle:C,setDiagramTitle:x},w=W,F=s(e=>{$(e,w),e.nodes.map(t=>w.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await H("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,r,i,o)=>{const c=i.append("text").text(r.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:p,width:a}=c.node().getBBox(),l=p+o.paddingY*2,n=a+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+l/2),r.BBox={x:e,y:t,width:n,height:l}},"positionLabel"),b=s((e,t,r,i,o,c)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),q=s((e,t,r)=>{let i=0,o=0;const c=s((a,l,n,h)=>{const m=h*(n.rowIndent+n.paddingX);Y(m,i,l,a,n);const{height:g,width:v}=l.BBox;b(a,m-n.rowIndent,i+g/2,m,i+g/2,n.lineThickness),o=Math.max(o,m+v),i+=g},"drawNode"),p=s((a,l=0)=>{c(e,a,r,l),a.children.forEach(g=>{p(g,l+1)});const{x:n,y:h,height:m}=a.BBox;if(a.children.length){const{y:g,height:v}=a.children[a.children.length-1].BBox;b(e,n+r.paddingX,h+m,n+r.paddingX,g+v/2+r.lineThickness/2,r.lineThickness)}},"processNode");return p(t),{totalHeight:i,totalWidth:o}},"drawTree"),j=s((e,t,r,i)=>{k.debug(`Rendering treeView diagram
2
- `+e);const o=i.db,c=o.getRoot(),p=o.getConfig(),a=V(t),l=a.append("g");l.attr("class","tree-view");const{totalHeight:n,totalWidth:h}=q(l,c,p);a.attr("viewBox",`-${p.lineThickness/2} 0 ${h} ${n}`),_(a,n,h,p.useMaxWidth)},"draw"),G={draw:j},J=G,K={labelFontSize:"16px",labelColor:"black",lineColor:"black"},O=s(({treeView:e})=>{const{labelFontSize:t,labelColor:r,lineColor:i}=u(K,e);return`
3
- .treeView-node-label {
4
- font-size: ${t};
5
- fill: ${r};
6
- }
7
- .treeView-node-line {
8
- stroke: ${i};
9
- }
10
- `},"styles"),P=O,ne={db:w,renderer:J,parser:M,styles:P};export{ne as diagram};
@@ -1,24 +0,0 @@
1
- import{_ as w,I as he,C as ee,E as J,H as ue,e as pe,l as K,aQ as P,d as j,b as fe,a as me,p as ge,q as ye,g as Se,s as ve,F as xe,aR as be,y as we}from"./MermaidRenderer-CmXoyqXC.js";import{s as Ce}from"./chunk-EDXVE4YY-TeBR2QKO.js";import{p as Te}from"./chunk-4BX2VUAB-CW_w7OX3.js";import{p as Le}from"./wardley-RL74JXVD-Cn_I5L_C.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as Z}from"./ordinal-DILIJJjt.js";import"./index-9mqVdUba.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";import"./min-CgT8voI0.js";import"./_baseUniq-DloMpWiC.js";import"./init-Dmth1JHB.js";function $e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Ae(){return this.eachAfter($e)}function Fe(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ne(t,a){for(var l=this,n=[l],r,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function Me(t,a){for(var l=this,n=[l],r=[],s,d,h,m=-1;l=n.pop();)if(r.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=r.pop();)t.call(a,l,++m,this);return this}function Ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function _e(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function ke(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=De(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function De(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Pe(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Be(){return Array.from(this)}function Re(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ee(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*We(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r<s;++r)l.push(n[r]);while(l.length)}function te(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Oe)):a===void 0&&(a=Ie);for(var l=new Q(t),n,r=[l],s,d,h,m;n=r.pop();)if((d=a(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)r.push(s=d[h]=new Q(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ge)}function He(){return te(this).eachBefore(qe)}function Ie(t){return t.children}function Oe(t){return Array.isArray(t)?t[1]:null}function qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ge(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Q(t){this.data=t,this.depth=this.height=0,this.parent=null}Q.prototype=te.prototype={constructor:Q,count:Ae,each:Fe,eachAfter:Me,eachBefore:Ne,find:Ve,sum:_e,sort:ke,path:ze,ancestors:Pe,descendants:Be,leaves:Re,links:Ee,copy:He,[Symbol.iterator]:We};function Xe(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Ye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,r){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(n-a)/t.value;++h<m;)d=s[h],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Qe(t,a,l,n,r){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(r-l)/t.value;++h<m;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ue=(1+Math.sqrt(5))/2;function Ze(t,a,l,n,r,s){for(var d=[],h=a.children,m,c,u=0,b=0,i=h.length,x,S,v=a.value,p,g,M,N,z,E,V;u<i;){x=r-l,S=s-n;do p=h[b++].value;while(!p&&b<i);for(g=M=p,E=Math.max(S/x,x/S)/(v*t),V=p*p*E,z=Math.max(M/V,V/g);b<i;++b){if(p+=c=h[b].value,c<g&&(g=c),c>M&&(M=c),V=p*p*E,N=Math.max(M/V,V/g),N>z){p-=c;break}z=N}d.push(m={value:p,dice:x<S,children:h.slice(u,b)}),m.dice?je(m,l,n,r,v?n+=S*p/v:s):Qe(m,l,n,v?l+=x*p/v:r,s),v-=p,u=b}return d}const Je=function t(a){function l(n,r,s,d,h){Ze(a,n,r,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l}(Ue);function Ke(){var t=Je,a=!1,l=1,n=1,r=[0],s=q,d=q,h=q,m=q,c=q;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Ye),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,g=i.y1-x;p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),i.x0=S,i.y0=v,i.x1=p,i.y1=g,i.children&&(x=r[i.depth+1]=s(i)/2,S+=c(i)-x,v+=d(i)-x,p-=h(i)-x,g-=m(i)-x,p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),t(i,S,v,p,g))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=Xe(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(s=typeof i=="function"?i:G(+i),u):s},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(d=typeof i=="function"?i:G(+i),u):d},u.paddingRight=function(i){return arguments.length?(h=typeof i=="function"?i:G(+i),u):h},u.paddingBottom=function(i){return arguments.length?(m=typeof i=="function"?i:G(+i),u):m},u.paddingLeft=function(i){return arguments.length?(c=typeof i=="function"?i:G(+i),u):c},u}var R,ne=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=fe,this.getAccTitle=me,this.setDiagramTitle=ge,this.getDiagramTitle=ye,this.getAccDescription=Se,this.setAccDescription=ve}getNodes(){return this.nodes}getConfig(){const a=xe,l=ee();return J({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{be(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(le,"buildHierarchy");var et=w((t,a)=>{Te(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,m=tt(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),r=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),tt=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Le("treemap",t);K.debug("Treemap AST:",n);const r=(a=re.parser)==null?void 0:a.yy;if(!(r instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(n,r)}catch(l){throw K.error("Error parsing treemap:",l),l}},"parse")},at=10,B=10,X=25,nt=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),d=s.padding??at,h=r.getDiagramTitle(),m=r.getRoot(),{themeVariables:c}=ee();if(!m)return;const u=h?30:0,b=ue(a),i=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){K.error("Error creating format function:",e),p=O(",")}const g=Z().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=Z().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=Z().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),E=te(m).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),ae=Ke().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=ae.descendants().filter(e=>e.children&&e.children.length>0),W=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=P({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=j(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,$=6;let A;s.showValues!==!1&&e.value?A=C-10-30-10-$:A=C-$-6;const F=Math.max(15,A),y=o.node();if(y.getComputedTextLength()>F){const T="...";let L=f;for(;L.length>0;){if(L=f.substring(0,L.length-1),L.length===0){o.text(T),y.getComputedTextLength()>F&&o.text("");break}if(o.text(L+T),y.getComputedTextLength()<=F)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const ie=ae.leaves(),Y=z.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=j(this),f=e.x1-e.x0,C=e.y1-e.y0,$=o.node(),A=4,D=f-2*A,F=C-2*A;if(D<10||F<10){o.style("display","none");return}let y=parseInt(o.style("font-size"),10);const _=8,T=28,L=.6,k=6,H=2;for(;$.getComputedTextLength()>D&&y>_;)y--,o.style("font-size",`${y}px`);let I=Math.max(k,Math.min(T,Math.round(y*L))),U=y+H+I;for(;U>F&&y>_&&(y--,I=Math.max(k,Math.min(T,Math.round(y*L))),!(I<k&&y===_));)o.style("font-size",`${y}px`),U=y+H+I;o.style("font-size",`${y}px`),($.getComputedTextLength()>D||y<_||F<y)&&o.style("display","none")}),s.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(o.data.name)+";",C=P({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const $=j(C).select(".treemapLabel");if($.empty()||$.style("display")==="none"){f.style("display","none");return}const A=parseFloat($.style("font-size")),D=28,F=.6,y=6,_=2,T=Math.max(y,Math.min(D,Math.round(A*F)));f.style("font-size",`${T}px`);const k=(o.y1-o.y0)/2+A/2+_;f.attr("y",k);const H=o.x1-o.x0,ce=o.y1-o.y0-4,de=H-2*4;f.node().getComputedTextLength()>de||k+T>ce||T<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;Ce(b,oe,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),lt=w(function(t,a){return a.db.getClasses()},"getClasses"),rt={draw:nt,getClasses:lt},st={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},it=w(({treemap:t}={})=>{const a=he(),l=ee(),n=J(a,l.themeVariables),r=J(st,t),s=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,h=r.valueColor??n.textColor;return`
2
- .treemapNode.section {
3
- stroke: ${r.sectionStrokeColor};
4
- stroke-width: ${r.sectionStrokeWidth};
5
- fill: ${r.sectionFillColor};
6
- }
7
- .treemapNode.leaf {
8
- stroke: ${r.leafStrokeColor};
9
- stroke-width: ${r.leafStrokeWidth};
10
- fill: ${r.leafFillColor};
11
- }
12
- .treemapLabel {
13
- fill: ${d};
14
- font-size: ${r.labelFontSize};
15
- }
16
- .treemapValue {
17
- fill: ${h};
18
- font-size: ${r.valueFontSize};
19
- }
20
- .treemapTitle {
21
- fill: ${s};
22
- font-size: ${r.titleFontSize};
23
- }
24
- `},"getStyles"),ot=it,wt={parser:re,get db(){return new ne},renderer:rt,styles:ot};export{wt as diagram};
@@ -1,43 +0,0 @@
1
- import{s as k,g as I,q as R,p as E,a as F,b as _,_ as l,H as D,y as z,E as f,F as G,C,l as P,I as W,e as B}from"./MermaidRenderer-CmXoyqXC.js";import{p as H}from"./chunk-4BX2VUAB-CW_w7OX3.js";import{p as V}from"./wardley-RL74JXVD-Cn_I5L_C.js";import"./index-9mqVdUba.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";import"./min-CgT8voI0.js";import"./_baseUniq-DloMpWiC.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:x},m=structuredClone(w),j=G.radar,q=l(()=>f({...j,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),N=l(()=>m.curves,"getCurves"),U=l(()=>m.options,"getOptions"),X=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var o;return((o=s.axis)==null?void 0:o.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=l(a=>{var e,r,s,o,i;const t=a.reduce((n,c)=>(n[c.name]=c,n),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??x.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??x.ticks,max:((s=t.max)==null?void 0:s.value)??x.max,min:((o=t.min)==null?void 0:o.value)??x.min,graticule:((i=t.graticule)==null?void 0:i.value)??x.graticule}},"setOptions"),K=l(()=>{z(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:_,getAccTitle:F,setDiagramTitle:E,getDiagramTitle:R,getAccDescription:I,setAccDescription:k},Q=l(a=>{H(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:l(async a=>{const t=await V("radar",a);P.debug(t),Q(t)},"parse")},et=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=D(t),p=at(u,c),g=n.max??Math.max(...i.map(y=>Math.max(...y.entries))),h=n.min,v=Math.min(c.width,c.height)/2;rt(p,o,v,n.ticks,n.graticule),st(p,o,v,c),M(p,o,i,h,g,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),at=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,u)=>{const p=2*u*Math.PI/o-Math.PI/2,g=n*Math.cos(p),h=n*Math.sin(p);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),st=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,u)=>{if(d.entries.length!==n)return;const p=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,y=A(g,r,s,c),S=y*Math.cos(v),O=y*Math.sin(v);return{x:S,y:O}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},u={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${u.x},${u.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var nt={draw:et},ot=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
- .radarCurve-${r} {
3
- color: ${s};
4
- fill: ${s};
5
- fill-opacity: ${t.curveOpacity};
6
- stroke: ${s};
7
- stroke-width: ${t.curveStrokeWidth};
8
- }
9
- .radarLegendBox-${r} {
10
- fill: ${s};
11
- fill-opacity: ${t.curveOpacity};
12
- stroke: ${s};
13
- }
14
- `}return e},"genIndexStyles"),it=l(a=>{const t=W(),e=C(),r=f(t,e.themeVariables),s=f(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),lt=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=it(a);return`
15
- .radarTitle {
16
- font-size: ${t.fontSize};
17
- color: ${t.titleColor};
18
- dominant-baseline: hanging;
19
- text-anchor: middle;
20
- }
21
- .radarAxisLine {
22
- stroke: ${e.axisColor};
23
- stroke-width: ${e.axisStrokeWidth};
24
- }
25
- .radarAxisLabel {
26
- dominant-baseline: middle;
27
- text-anchor: middle;
28
- font-size: ${e.axisLabelFontSize}px;
29
- color: ${e.axisColor};
30
- }
31
- .radarGraticule {
32
- fill: ${e.graticuleColor};
33
- fill-opacity: ${e.graticuleOpacity};
34
- stroke: ${e.graticuleColor};
35
- stroke-width: ${e.graticuleStrokeWidth};
36
- }
37
- .radarLegendText {
38
- text-anchor: start;
39
- font-size: ${e.legendFontSize}px;
40
- dominant-baseline: hanging;
41
- }
42
- ${ot(t,e)}
43
- `},"styles"),vt={parser:tt,db:$,renderer:nt,styles:lt};export{vt as diagram};
@@ -1,24 +0,0 @@
1
- import{_ as b,E as u,H as B,e as C,l as w,b as S,a as D,p as T,q as E,g as F,s as P,F as z,C as A,y as W}from"./MermaidRenderer-CmXoyqXC.js";import{p as _}from"./chunk-4BX2VUAB-CW_w7OX3.js";import{p as N}from"./wardley-RL74JXVD-Cn_I5L_C.js";import"./index-9mqVdUba.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";import"./min-CgT8voI0.js";import"./_baseUniq-DloMpWiC.js";var L=z.packet,m,v=(m=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=u({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(m,"PacketDB"),m),M=1e4,Y=b((e,t)=>{_(e,t);let o=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??(a=o+1),a!==o+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${o+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),o=i,w.debug(`Packet block ${a} - ${o} with label ${c}`);r.length<=l+1&&t.getPacket().length<M;){const[p,s]=H({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(r)},"populate"),H=b((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const r=t*o-1,n=t*o;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),o=(r=x.parser)==null?void 0:r.yy;if(!(o instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,o)},"parse")},I=b((e,t,o,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,o,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=o*(r+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:e}={})=>{const t=u(q,e);return`
2
- .packetByte {
3
- font-size: ${t.byteFontSize};
4
- }
5
- .packetByte.start {
6
- fill: ${t.startByteColor};
7
- }
8
- .packetByte.end {
9
- fill: ${t.endByteColor};
10
- }
11
- .packetLabel {
12
- fill: ${t.labelColor};
13
- font-size: ${t.labelFontSize};
14
- }
15
- .packetTitle {
16
- fill: ${t.titleColor};
17
- font-size: ${t.titleFontSize};
18
- }
19
- .packetBlock {
20
- stroke: ${t.blockStrokeColor};
21
- stroke-width: ${t.blockStrokeWidth};
22
- fill: ${t.blockFillColor};
23
- }
24
- `},"styles"),tt={parser:x,get db(){return new v},renderer:j,styles:G};export{tt as diagram};
@@ -1,292 +0,0 @@
1
- import{g as Ne,s as Pe,q as ze,p as Ve,a as Re,b as He,_ as c,c as ft,d as bt,e as Be,at as X,l as ot,k as Ge,j as je,y as Xe,u as qe}from"./MermaidRenderer-CmXoyqXC.js";import{c as It,g as $t}from"./index-9mqVdUba.js";import{t as Ue,m as Ze,a as Qe,b as ne,c as re,d as Ke,e as Je,f as ti,g as ei,h as ii,i as ni,j as ri,k as se,l as ae,n as oe,s as ce,o as le}from"./time-h5EapSZu.js";import{l as si}from"./linear-CKzVTQ0r.js";import{R as me,r as ai,o as ke,q as ye,C as ge,u as Yt,v as oi}from"./step-EjIQ8UIn.js";import"./purify.es-BlZidd4c.js";import"./init-Dmth1JHB.js";import"./defaultLocale-DX6XiGOO.js";function ci(t){return t}var _t=1,Lt=2,zt=3,wt=4,ue=1e-6;function li(t){return"translate("+t+",0)"}function ui(t){return"translate(0,"+t+")"}function di(t){return e=>+t(e)}function fi(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function hi(){return!this.__axis}function pe(t,e){var r=[],n=null,a=null,f=6,d=6,T=3,E=typeof window<"u"&&window.devicePixelRatio>1?0:.5,A=t===_t||t===wt?-1:1,b=t===wt||t===Lt?"x":"y",F=t===_t||t===zt?li:ui;function C(D){var V=n??(e.ticks?e.ticks.apply(e,r):e.domain()),I=a??(e.tickFormat?e.tickFormat.apply(e,r):ci),S=Math.max(f,0)+T,M=e.range(),W=+M[0]+E,L=+M[M.length-1]+E,R=(e.bandwidth?fi:di)(e.copy(),E),H=D.selection?D.selection():D,$=H.selectAll(".domain").data([null]),p=H.selectAll(".tick").data(V,e).order(),h=p.exit(),u=p.enter().append("g").attr("class","tick"),x=p.select("line"),v=p.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(u),x=x.merge(u.append("line").attr("stroke","currentColor").attr(b+"2",A*f)),v=v.merge(u.append("text").attr("fill","currentColor").attr(b,A*S).attr("dy",t===_t?"0em":t===zt?"0.71em":"0.32em")),D!==H&&($=$.transition(D),p=p.transition(D),x=x.transition(D),v=v.transition(D),h=h.transition(D).attr("opacity",ue).attr("transform",function(k){return isFinite(k=R(k))?F(k+E):this.getAttribute("transform")}),u.attr("opacity",ue).attr("transform",function(k){var m=this.parentNode.__axis;return F((m&&isFinite(m=m(k))?m:R(k))+E)})),h.remove(),$.attr("d",t===wt||t===Lt?d?"M"+A*d+","+W+"H"+E+"V"+L+"H"+A*d:"M"+E+","+W+"V"+L:d?"M"+W+","+A*d+"V"+E+"H"+L+"V"+A*d:"M"+W+","+E+"H"+L),p.attr("opacity",1).attr("transform",function(k){return F(R(k)+E)}),x.attr(b+"2",A*f),v.attr(b,A*S).text(I),H.filter(hi).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Lt?"start":t===wt?"end":"middle"),H.each(function(){this.__axis=R})}return C.scale=function(D){return arguments.length?(e=D,C):e},C.ticks=function(){return r=Array.from(arguments),C},C.tickArguments=function(D){return arguments.length?(r=D==null?[]:Array.from(D),C):r.slice()},C.tickValues=function(D){return arguments.length?(n=D==null?null:Array.from(D),C):n&&n.slice()},C.tickFormat=function(D){return arguments.length?(a=D,C):a},C.tickSize=function(D){return arguments.length?(f=d=+D,C):f},C.tickSizeInner=function(D){return arguments.length?(f=+D,C):f},C.tickSizeOuter=function(D){return arguments.length?(d=+D,C):d},C.tickPadding=function(D){return arguments.length?(T=+D,C):T},C.offset=function(D){return arguments.length?(E=+D,C):E},C}function mi(t){return pe(_t,t)}function ki(t){return pe(zt,t)}const yi=Math.PI/180,gi=180/Math.PI,Ct=18,ve=.96422,xe=1,Te=.82521,be=4/29,ht=6/29,we=3*ht*ht,pi=ht*ht*ht;function _e(t){if(t instanceof et)return new et(t.l,t.a,t.b,t.opacity);if(t instanceof nt)return De(t);t instanceof me||(t=ai(t));var e=Nt(t.r),r=Nt(t.g),n=Nt(t.b),a=Ft((.2225045*e+.7168786*r+.0606169*n)/xe),f,d;return e===r&&r===n?f=d=a:(f=Ft((.4360747*e+.3850649*r+.1430804*n)/ve),d=Ft((.0139322*e+.0971045*r+.7141733*n)/Te)),new et(116*a-16,500*(f-a),200*(a-d),t.opacity)}function vi(t,e,r,n){return arguments.length===1?_e(t):new et(t,e,r,n??1)}function et(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}ke(et,vi,ye(ge,{brighter(t){return new et(this.l+Ct*(t??1),this.a,this.b,this.opacity)},darker(t){return new et(this.l-Ct*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=ve*Ot(e),t=xe*Ot(t),r=Te*Ot(r),new me(Wt(3.1338561*e-1.6168667*t-.4906146*r),Wt(-.9787684*e+1.9161415*t+.033454*r),Wt(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function Ft(t){return t>pi?Math.pow(t,1/3):t/we+be}function Ot(t){return t>ht?t*t*t:we*(t-be)}function Wt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xi(t){if(t instanceof nt)return new nt(t.h,t.c,t.l,t.opacity);if(t instanceof et||(t=_e(t)),t.a===0&&t.b===0)return new nt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*gi;return new nt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Vt(t,e,r,n){return arguments.length===1?xi(t):new nt(t,e,r,n??1)}function nt(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function De(t){if(isNaN(t.h))return new et(t.l,0,0,t.opacity);var e=t.h*yi;return new et(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ke(nt,Vt,ye(ge,{brighter(t){return new nt(this.h,this.c,this.l+Ct*(t??1),this.opacity)},darker(t){return new nt(this.h,this.c,this.l-Ct*(t??1),this.opacity)},rgb(){return De(this).rgb()}}));function Ti(t){return function(e,r){var n=t((e=Vt(e)).h,(r=Vt(r)).h),a=Yt(e.c,r.c),f=Yt(e.l,r.l),d=Yt(e.opacity,r.opacity);return function(T){return e.h=n(T),e.c=a(T),e.l=f(T),e.opacity=d(T),e+""}}}const bi=Ti(oi);var Se={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(It,function(){var r="day";return function(n,a,f){var d=function(A){return A.add(4-A.isoWeekday(),r)},T=a.prototype;T.isoWeekYear=function(){return d(this).year()},T.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),r);var b,F,C,D,V=d(this),I=(b=this.isoWeekYear(),F=this.$u,C=(F?f.utc:f)().year(b).startOf("year"),D=4-C.isoWeekday(),C.isoWeekday()>4&&(D+=7),C.add(D,r));return V.diff(I,"week")+1},T.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var E=T.startOf;T.startOf=function(A,b){var F=this.$utils(),C=!!F.u(b)||b;return F.p(A)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):E.bind(this)(A,b)}}})})(Se);var wi=Se.exports;const _i=$t(wi);var Ce={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(It,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,f=/\d\d/,d=/\d\d?/,T=/\d*[^-_:/,()\s\d]+/,E={},A=function(S){return(S=+S)+(S>68?1900:2e3)},b=function(S){return function(M){this[S]=+M}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(S){(this.zone||(this.zone={})).offset=function(M){if(!M||M==="Z")return 0;var W=M.match(/([+-]|\d\d)/g),L=60*W[1]+(+W[2]||0);return L===0?0:W[0]==="+"?-L:L}(S)}],C=function(S){var M=E[S];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(S,M){var W,L=E.meridiem;if(L){for(var R=1;R<=24;R+=1)if(S.indexOf(L(R,0,M))>-1){W=R>12;break}}else W=S===(M?"pm":"PM");return W},V={A:[T,function(S){this.afternoon=D(S,!1)}],a:[T,function(S){this.afternoon=D(S,!0)}],Q:[a,function(S){this.month=3*(S-1)+1}],S:[a,function(S){this.milliseconds=100*+S}],SS:[f,function(S){this.milliseconds=10*+S}],SSS:[/\d{3}/,function(S){this.milliseconds=+S}],s:[d,b("seconds")],ss:[d,b("seconds")],m:[d,b("minutes")],mm:[d,b("minutes")],H:[d,b("hours")],h:[d,b("hours")],HH:[d,b("hours")],hh:[d,b("hours")],D:[d,b("day")],DD:[f,b("day")],Do:[T,function(S){var M=E.ordinal,W=S.match(/\d+/);if(this.day=W[0],M)for(var L=1;L<=31;L+=1)M(L).replace(/\[|\]/g,"")===S&&(this.day=L)}],w:[d,b("week")],ww:[f,b("week")],M:[d,b("month")],MM:[f,b("month")],MMM:[T,function(S){var M=C("months"),W=(C("monthsShort")||M.map(function(L){return L.slice(0,3)})).indexOf(S)+1;if(W<1)throw new Error;this.month=W%12||W}],MMMM:[T,function(S){var M=C("months").indexOf(S)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,b("year")],YY:[f,function(S){this.year=A(S)}],YYYY:[/\d{4}/,b("year")],Z:F,ZZ:F};function I(S){var M,W;M=S,W=E&&E.formats;for(var L=(S=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(x,v,k){var m=k&&k.toUpperCase();return v||W[k]||r[k]||W[m].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(o,l,y){return l||y.slice(1)})})).match(n),R=L.length,H=0;H<R;H+=1){var $=L[H],p=V[$],h=p&&p[0],u=p&&p[1];L[H]=u?{regex:h,parser:u}:$.replace(/^\[|\]$/g,"")}return function(x){for(var v={},k=0,m=0;k<R;k+=1){var o=L[k];if(typeof o=="string")m+=o.length;else{var l=o.regex,y=o.parser,g=x.slice(m),w=l.exec(g)[0];y.call(v,w),x=x.replace(w,"")}}return function(s){var z=s.afternoon;if(z!==void 0){var i=s.hours;z?i<12&&(s.hours+=12):i===12&&(s.hours=0),delete s.afternoon}}(v),v}}return function(S,M,W){W.p.customParseFormat=!0,S&&S.parseTwoDigitYear&&(A=S.parseTwoDigitYear);var L=M.prototype,R=L.parse;L.parse=function(H){var $=H.date,p=H.utc,h=H.args;this.$u=p;var u=h[1];if(typeof u=="string"){var x=h[2]===!0,v=h[3]===!0,k=x||v,m=h[2];v&&(m=h[2]),E=this.$locale(),!x&&m&&(E=W.Ls[m]),this.$d=function(g,w,s,z){try{if(["x","X"].indexOf(w)>-1)return new Date((w==="X"?1e3:1)*g);var i=I(w)(g),_=i.year,P=i.month,N=i.day,O=i.hours,j=i.minutes,Y=i.seconds,Q=i.milliseconds,rt=i.zone,lt=i.week,yt=new Date,gt=N||(_||P?1:yt.getDate()),ut=_||yt.getFullYear(),B=0;_&&!P||(B=P>0?P-1:yt.getMonth());var Z,q=O||0,at=j||0,K=Y||0,st=Q||0;return rt?new Date(Date.UTC(ut,B,gt,q,at,K,st+60*rt.offset*1e3)):s?new Date(Date.UTC(ut,B,gt,q,at,K,st)):(Z=new Date(ut,B,gt,q,at,K,st),lt&&(Z=z(Z).week(lt).toDate()),Z)}catch{return new Date("")}}($,u,p,W),this.init(),m&&m!==!0&&(this.$L=this.locale(m).$L),k&&$!=this.format(u)&&(this.$d=new Date("")),E={}}else if(u instanceof Array)for(var o=u.length,l=1;l<=o;l+=1){h[1]=u[l-1];var y=W.apply(this,h);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}l===o&&(this.$d=new Date(""))}else R.call(this,H)}}})})(Ce);var Di=Ce.exports;const Si=$t(Di);var Me={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(It,function(){return function(r,n){var a=n.prototype,f=a.format;a.format=function(d){var T=this,E=this.$locale();if(!this.isValid())return f.bind(this)(d);var A=this.$utils(),b=(d||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((T.$M+1)/3);case"Do":return E.ordinal(T.$D);case"gggg":return T.weekYear();case"GGGG":return T.isoWeekYear();case"wo":return E.ordinal(T.week(),"W");case"w":case"ww":return A.s(T.week(),F==="w"?1:2,"0");case"W":case"WW":return A.s(T.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return A.s(String(T.$H===0?24:T.$H),F==="k"?1:2,"0");case"X":return Math.floor(T.$d.getTime()/1e3);case"x":return T.$d.getTime();case"z":return"["+T.offsetName()+"]";case"zzz":return"["+T.offsetName("long")+"]";default:return F}});return f.bind(this)(b)}}})})(Me);var Ci=Me.exports;const Mi=$t(Ci);var Ee={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(It,function(){var r,n,a=1e3,f=6e4,d=36e5,T=864e5,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A=31536e6,b=2628e6,F=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,C={years:A,months:b,days:T,hours:d,minutes:f,seconds:a,milliseconds:1,weeks:6048e5},D=function($){return $ instanceof R},V=function($,p,h){return new R($,h,p.$l)},I=function($){return n.p($)+"s"},S=function($){return $<0},M=function($){return S($)?Math.ceil($):Math.floor($)},W=function($){return Math.abs($)},L=function($,p){return $?S($)?{negative:!0,format:""+W($)+p}:{negative:!1,format:""+$+p}:{negative:!1,format:""}},R=function(){function $(h,u,x){var v=this;if(this.$d={},this.$l=x,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return V(h*C[I(u)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach(function(o){v.$d[I(o)]=h[o]}),this.calMilliseconds(),this;if(typeof h=="string"){var k=h.match(F);if(k){var m=k.slice(2).map(function(o){return o!=null?Number(o):0});return this.$d.years=m[0],this.$d.months=m[1],this.$d.weeks=m[2],this.$d.days=m[3],this.$d.hours=m[4],this.$d.minutes=m[5],this.$d.seconds=m[6],this.calMilliseconds(),this}}return this}var p=$.prototype;return p.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce(function(u,x){return u+(h.$d[x]||0)*C[x]},0)},p.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/A),h%=A,this.$d.months=M(h/b),h%=b,this.$d.days=M(h/T),h%=T,this.$d.hours=M(h/d),h%=d,this.$d.minutes=M(h/f),h%=f,this.$d.seconds=M(h/a),h%=a,this.$d.milliseconds=h},p.toISOString=function(){var h=L(this.$d.years,"Y"),u=L(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var v=L(x,"D"),k=L(this.$d.hours,"H"),m=L(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var l=L(o,"S"),y=h.negative||u.negative||v.negative||k.negative||m.negative||l.negative,g=k.format||m.format||l.format?"T":"",w=(y?"-":"")+"P"+h.format+u.format+v.format+g+k.format+m.format+l.format;return w==="P"||w==="-P"?"P0D":w},p.toJSON=function(){return this.toISOString()},p.format=function(h){var u=h||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return u.replace(E,function(v,k){return k||String(x[v])})},p.as=function(h){return this.$ms/C[I(h)]},p.get=function(h){var u=this.$ms,x=I(h);return x==="milliseconds"?u%=1e3:u=x==="weeks"?M(u/C[x]):this.$d[x],u||0},p.add=function(h,u,x){var v;return v=u?h*C[I(u)]:D(h)?h.$ms:V(h,this).$ms,V(this.$ms+v*(x?-1:1),this)},p.subtract=function(h,u){return this.add(h,u,!0)},p.locale=function(h){var u=this.clone();return u.$l=h,u},p.clone=function(){return V(this.$ms,this)},p.humanize=function(h){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},$}(),H=function($,p,h){return $.add(p.years()*h,"y").add(p.months()*h,"M").add(p.days()*h,"d").add(p.hours()*h,"h").add(p.minutes()*h,"m").add(p.seconds()*h,"s").add(p.milliseconds()*h,"ms")};return function($,p,h){r=h,n=h().$utils(),h.duration=function(v,k){var m=h.locale();return V(v,{$l:m},k)},h.isDuration=D;var u=p.prototype.add,x=p.prototype.subtract;p.prototype.add=function(v,k){return D(v)?H(this,v,1):u.bind(this)(v,k)},p.prototype.subtract=function(v,k){return D(v)?H(this,v,-1):x.bind(this)(v,k)}}})})(Ee);var Ei=Ee.exports;const Ii=$t(Ei);var Rt=function(){var t=c(function(m,o,l,y){for(l=l||{},y=m.length;y--;l[m[y]]=o);return l},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],a=[1,28],f=[1,29],d=[1,30],T=[1,31],E=[1,32],A=[1,33],b=[1,34],F=[1,9],C=[1,10],D=[1,11],V=[1,12],I=[1,13],S=[1,14],M=[1,15],W=[1,16],L=[1,19],R=[1,20],H=[1,21],$=[1,22],p=[1,23],h=[1,25],u=[1,35],x={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:c(function(o,l,y,g,w,s,z){var i=s.length-1;switch(w){case 1:return s[i-1];case 2:this.$=[];break;case 3:s[i-1].push(s[i]),this.$=s[i-1];break;case 4:case 5:this.$=s[i];break;case 6:case 7:this.$=[];break;case 8:g.setWeekday("monday");break;case 9:g.setWeekday("tuesday");break;case 10:g.setWeekday("wednesday");break;case 11:g.setWeekday("thursday");break;case 12:g.setWeekday("friday");break;case 13:g.setWeekday("saturday");break;case 14:g.setWeekday("sunday");break;case 15:g.setWeekend("friday");break;case 16:g.setWeekend("saturday");break;case 17:g.setDateFormat(s[i].substr(11)),this.$=s[i].substr(11);break;case 18:g.enableInclusiveEndDates(),this.$=s[i].substr(18);break;case 19:g.TopAxis(),this.$=s[i].substr(8);break;case 20:g.setAxisFormat(s[i].substr(11)),this.$=s[i].substr(11);break;case 21:g.setTickInterval(s[i].substr(13)),this.$=s[i].substr(13);break;case 22:g.setExcludes(s[i].substr(9)),this.$=s[i].substr(9);break;case 23:g.setIncludes(s[i].substr(9)),this.$=s[i].substr(9);break;case 24:g.setTodayMarker(s[i].substr(12)),this.$=s[i].substr(12);break;case 27:g.setDiagramTitle(s[i].substr(6)),this.$=s[i].substr(6);break;case 28:this.$=s[i].trim(),g.setAccTitle(this.$);break;case 29:case 30:this.$=s[i].trim(),g.setAccDescription(this.$);break;case 31:g.addSection(s[i].substr(8)),this.$=s[i].substr(8);break;case 33:g.addTask(s[i-1],s[i]),this.$="task";break;case 34:this.$=s[i-1],g.setClickEvent(s[i-1],s[i],null);break;case 35:this.$=s[i-2],g.setClickEvent(s[i-2],s[i-1],s[i]);break;case 36:this.$=s[i-2],g.setClickEvent(s[i-2],s[i-1],null),g.setLink(s[i-2],s[i]);break;case 37:this.$=s[i-3],g.setClickEvent(s[i-3],s[i-2],s[i-1]),g.setLink(s[i-3],s[i]);break;case 38:this.$=s[i-2],g.setClickEvent(s[i-2],s[i],null),g.setLink(s[i-2],s[i-1]);break;case 39:this.$=s[i-3],g.setClickEvent(s[i-3],s[i-1],s[i]),g.setLink(s[i-3],s[i-2]);break;case 40:this.$=s[i-1],g.setLink(s[i-1],s[i]);break;case 41:case 47:this.$=s[i-1]+" "+s[i];break;case 42:case 43:case 45:this.$=s[i-2]+" "+s[i-1]+" "+s[i];break;case 44:case 46:this.$=s[i-3]+" "+s[i-2]+" "+s[i-1]+" "+s[i];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:a,15:f,16:d,17:T,18:E,19:18,20:A,21:b,22:F,23:C,24:D,25:V,26:I,27:S,28:M,29:W,30:L,31:R,33:H,35:$,36:p,37:24,38:h,40:u},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:a,15:f,16:d,17:T,18:E,19:18,20:A,21:b,22:F,23:C,24:D,25:V,26:I,27:S,28:M,29:W,30:L,31:R,33:H,35:$,36:p,37:24,38:h,40:u},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var y=new Error(o);throw y.hash=l,y}},"parseError"),parse:c(function(o){var l=this,y=[0],g=[],w=[null],s=[],z=this.table,i="",_=0,P=0,N=2,O=1,j=s.slice.call(arguments,1),Y=Object.create(this.lexer),Q={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(Q.yy[rt]=this.yy[rt]);Y.setInput(o,Q.yy),Q.yy.lexer=Y,Q.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var lt=Y.yylloc;s.push(lt);var yt=Y.options&&Y.options.ranges;typeof Q.yy.parseError=="function"?this.parseError=Q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(U){y.length=y.length-2*U,w.length=w.length-U,s.length=s.length-U}c(gt,"popStack");function ut(){var U;return U=g.pop()||Y.lex()||O,typeof U!="number"&&(U instanceof Array&&(g=U,U=g.pop()),U=l.symbols_[U]||U),U}c(ut,"lex");for(var B,Z,q,at,K={},st,J,ie,Tt;;){if(Z=y[y.length-1],this.defaultActions[Z]?q=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=ut()),q=z[Z]&&z[Z][B]),typeof q>"u"||!q.length||!q[0]){var At="";Tt=[];for(st in z[Z])this.terminals_[st]&&st>N&&Tt.push("'"+this.terminals_[st]+"'");Y.showPosition?At="Parse error on line "+(_+1)+`:
2
- `+Y.showPosition()+`
3
- Expecting `+Tt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":At="Parse error on line "+(_+1)+": Unexpected "+(B==O?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(At,{text:Y.match,token:this.terminals_[B]||B,line:Y.yylineno,loc:lt,expected:Tt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+B);switch(q[0]){case 1:y.push(B),w.push(Y.yytext),s.push(Y.yylloc),y.push(q[1]),B=null,P=Y.yyleng,i=Y.yytext,_=Y.yylineno,lt=Y.yylloc;break;case 2:if(J=this.productions_[q[1]][1],K.$=w[w.length-J],K._$={first_line:s[s.length-(J||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(J||1)].first_column,last_column:s[s.length-1].last_column},yt&&(K._$.range=[s[s.length-(J||1)].range[0],s[s.length-1].range[1]]),at=this.performAction.apply(K,[i,P,_,Q.yy,q[1],w,s].concat(j)),typeof at<"u")return at;J&&(y=y.slice(0,-1*J*2),w=w.slice(0,-1*J),s=s.slice(0,-1*J)),y.push(this.productions_[q[1]][0]),w.push(K.$),s.push(K._$),ie=z[y[y.length-2]][y[y.length-1]],y.push(ie);break;case 3:return!0}}return!0},"parse")},v=function(){var m={EOF:1,parseError:c(function(l,y){if(this.yy.parser)this.yy.parser.parseError(l,y);else throw new Error(l)},"parseError"),setInput:c(function(o,l){return this.yy=l||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:c(function(o){var l=o.length,y=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var g=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),y.length-1&&(this.yylineno-=y.length-1);var w=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:y?(y.length===g.length?this.yylloc.first_column:0)+g[g.length-y.length].length-y[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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},"reject"),less:c(function(o){this.unput(this.match.slice(o))},"less"),pastInput:c(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
- `+l+"^"},"showPosition"),test_match:c(function(o,l){var y,g,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),g=o[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],y=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var s in w)this[s]=w[s];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,y,g;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),s=0;s<w.length;s++)if(y=this._input.match(this.rules[w[s]]),y&&(!l||y[0].length>l[0].length)){if(l=y,g=s,this.options.backtrack_lexer){if(o=this.test_match(y,w[s]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,w[g]),o!==!1?o:!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})},"next"),lex:c(function(){var l=this.next();return l||this.lex()},"lex"),begin:c(function(l){this.conditionStack.push(l)},"begin"),popState:c(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:c(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:c(function(l){this.begin(l)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(l,y,g,w){switch(g){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return m}();x.lexer=v;function k(){this.yy={}}return c(k,"Parser"),k.prototype=x,x.Parser=k,new k}();Rt.parser=Rt;var $i=Rt;X.extend(_i);X.extend(Si);X.extend(Mi);var de={friday:5,saturday:6},tt="",jt="",Xt=void 0,qt="",pt=[],vt=[],Ut=new Map,Zt=[],Mt=[],kt="",Qt="",Ie=["active","done","crit","milestone","vert"],Kt=[],dt="",xt=!1,Jt=!1,te="sunday",Et="saturday",Ht=0,Ai=c(function(){Zt=[],Mt=[],kt="",Kt=[],Dt=0,Gt=void 0,St=void 0,G=[],tt="",jt="",Qt="",Xt=void 0,qt="",pt=[],vt=[],xt=!1,Jt=!1,Ht=0,Ut=new Map,dt="",Xe(),te="sunday",Et="saturday"},"clear"),Yi=c(function(t){dt=t},"setDiagramId"),Li=c(function(t){jt=t},"setAxisFormat"),Fi=c(function(){return jt},"getAxisFormat"),Oi=c(function(t){Xt=t},"setTickInterval"),Wi=c(function(){return Xt},"getTickInterval"),Ni=c(function(t){qt=t},"setTodayMarker"),Pi=c(function(){return qt},"getTodayMarker"),zi=c(function(t){tt=t},"setDateFormat"),Vi=c(function(){xt=!0},"enableInclusiveEndDates"),Ri=c(function(){return xt},"endDatesAreInclusive"),Hi=c(function(){Jt=!0},"enableTopAxis"),Bi=c(function(){return Jt},"topAxisEnabled"),Gi=c(function(t){Qt=t},"setDisplayMode"),ji=c(function(){return Qt},"getDisplayMode"),Xi=c(function(){return tt},"getDateFormat"),qi=c(function(t){pt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Ui=c(function(){return pt},"getIncludes"),Zi=c(function(t){vt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),Qi=c(function(){return vt},"getExcludes"),Ki=c(function(){return Ut},"getLinks"),Ji=c(function(t){kt=t,Zt.push(t)},"addSection"),tn=c(function(){return Zt},"getSections"),en=c(function(){let t=fe();const e=10;let r=0;for(;!t&&r<e;)t=fe(),r++;return Mt=G,Mt},"getTasks"),$e=c(function(t,e,r,n){const a=t.format(e.trim()),f=t.format("YYYY-MM-DD");return n.includes(a)||n.includes(f)?!1:r.includes("weekends")&&(t.isoWeekday()===de[Et]||t.isoWeekday()===de[Et]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(a)||r.includes(f)},"isInvalidDate"),nn=c(function(t){te=t},"setWeekday"),rn=c(function(){return te},"getWeekday"),sn=c(function(t){Et=t},"setWeekend"),Ae=c(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let a;t.startTime instanceof Date?a=X(t.startTime):a=X(t.startTime,e,!0),a=a.add(1,"d");let f;t.endTime instanceof Date?f=X(t.endTime):f=X(t.endTime,e,!0);const[d,T]=an(a,f,e,r,n);t.endTime=d.toDate(),t.renderEndTime=T},"checkTaskDates"),an=c(function(t,e,r,n,a){let f=!1,d=null;for(;t<=e;)f||(d=e.toDate()),f=$e(t,r,n,a),f&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,d]},"fixTaskDates"),Bt=c(function(t,e,r){if(r=r.trim(),c(T=>{const E=T.trim();return E==="x"||E==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(r))return new Date(Number(r));const f=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(f!==null){let T=null;for(const A of f.groups.ids.split(" ")){let b=ct(A);b!==void 0&&(!T||b.endTime>T.endTime)&&(T=b)}if(T)return T.endTime;const E=new Date;return E.setHours(0,0,0,0),E}let d=X(r,e.trim(),!0);if(d.isValid())return d.toDate();{ot.debug("Invalid date:"+r),ot.debug("With date format:"+e.trim());const T=new Date(r);if(T===void 0||isNaN(T.getTime())||T.getFullYear()<-1e4||T.getFullYear()>1e4)throw new Error("Invalid date:"+r);return T}},"getStartDate"),Ye=c(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Le=c(function(t,e,r,n=!1){r=r.trim();const f=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(f!==null){let b=null;for(const C of f.groups.ids.split(" ")){let D=ct(C);D!==void 0&&(!b||D.startTime<b.startTime)&&(b=D)}if(b)return b.startTime;const F=new Date;return F.setHours(0,0,0,0),F}let d=X(r,e.trim(),!0);if(d.isValid())return n&&(d=d.add(1,"d")),d.toDate();let T=X(t);const[E,A]=Ye(r);if(!Number.isNaN(E)){const b=T.add(E,A);b.isValid()&&(T=b)}return T.toDate()},"getEndDate"),Dt=0,mt=c(function(t){return t===void 0?(Dt=Dt+1,"task"+Dt):t},"parseId"),on=c(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),a={};ee(n,a,Ie);for(let d=0;d<n.length;d++)n[d]=n[d].trim();let f="";switch(n.length){case 1:a.id=mt(),a.startTime=t.endTime,f=n[0];break;case 2:a.id=mt(),a.startTime=Bt(void 0,tt,n[0]),f=n[1];break;case 3:a.id=mt(n[0]),a.startTime=Bt(void 0,tt,n[1]),f=n[2];break}return f&&(a.endTime=Le(a.startTime,tt,f,xt),a.manualEndTime=X(f,"YYYY-MM-DD",!0).isValid(),Ae(a,tt,vt,pt)),a},"compileData"),cn=c(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),a={};ee(n,a,Ie);for(let f=0;f<n.length;f++)n[f]=n[f].trim();switch(n.length){case 1:a.id=mt(),a.startTime={type:"prevTaskEnd",id:t},a.endTime={data:n[0]};break;case 2:a.id=mt(),a.startTime={type:"getStartDate",startData:n[0]},a.endTime={data:n[1]};break;case 3:a.id=mt(n[0]),a.startTime={type:"getStartDate",startData:n[1]},a.endTime={data:n[2]};break}return a},"parseData"),Gt,St,G=[],Fe={},ln=c(function(t,e){const r={section:kt,type:kt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=cn(St,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=St,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,r.order=Ht,Ht++;const a=G.push(r);St=r.id,Fe[r.id]=a-1},"addTask"),ct=c(function(t){const e=Fe[t];return G[e]},"findTaskById"),un=c(function(t,e){const r={section:kt,type:kt,description:t,task:t,classes:[]},n=on(Gt,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,Gt=r,Mt.push(r)},"addTaskOrg"),fe=c(function(){const t=c(function(r){const n=G[r];let a="";switch(G[r].raw.startTime.type){case"prevTaskEnd":{const f=ct(n.prevTaskId);n.startTime=f.endTime;break}case"getStartDate":a=Bt(void 0,tt,G[r].raw.startTime.startData),a&&(G[r].startTime=a);break}return G[r].startTime&&(G[r].endTime=Le(G[r].startTime,tt,G[r].raw.endTime.data,xt),G[r].endTime&&(G[r].processed=!0,G[r].manualEndTime=X(G[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Ae(G[r],tt,vt,pt))),G[r].processed},"compileTask");let e=!0;for(const[r,n]of G.entries())t(r),e=e&&n.processed;return e},"compileTasks"),dn=c(function(t,e){let r=e;ft().securityLevel!=="loose"&&(r=je(e)),t.split(",").forEach(function(n){ct(n)!==void 0&&(We(n,()=>{window.open(r,"_self")}),Ut.set(n,r))}),Oe(t,"clickable")},"setLink"),Oe=c(function(t,e){t.split(",").forEach(function(r){let n=ct(r);n!==void 0&&n.classes.push(e)})},"setClass"),fn=c(function(t,e,r){if(ft().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let f=0;f<n.length;f++){let d=n[f].trim();d.startsWith('"')&&d.endsWith('"')&&(d=d.substr(1,d.length-2)),n[f]=d}}n.length===0&&n.push(t),ct(t)!==void 0&&We(t,()=>{qe.runFunc(e,...n)})},"setClickFun"),We=c(function(t,e){Kt.push(function(){const r=dt?`${dt}-${t}`:t,n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const r=dt?`${dt}-${t}`:t,n=document.querySelector(`[id="${r}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},"pushFun"),hn=c(function(t,e,r){t.split(",").forEach(function(n){fn(n,e,r)}),Oe(t,"clickable")},"setClickEvent"),mn=c(function(t){Kt.forEach(function(e){e(t)})},"bindFunctions"),kn={getConfig:c(()=>ft().gantt,"getConfig"),clear:Ai,setDateFormat:zi,getDateFormat:Xi,enableInclusiveEndDates:Vi,endDatesAreInclusive:Ri,enableTopAxis:Hi,topAxisEnabled:Bi,setAxisFormat:Li,getAxisFormat:Fi,setTickInterval:Oi,getTickInterval:Wi,setTodayMarker:Ni,getTodayMarker:Pi,setAccTitle:He,getAccTitle:Re,setDiagramTitle:Ve,getDiagramTitle:ze,setDiagramId:Yi,setDisplayMode:Gi,getDisplayMode:ji,setAccDescription:Pe,getAccDescription:Ne,addSection:Ji,getSections:tn,getTasks:en,addTask:ln,findTaskById:ct,addTaskOrg:un,setIncludes:qi,getIncludes:Ui,setExcludes:Zi,getExcludes:Qi,setClickEvent:hn,setLink:dn,getLinks:Ki,bindFunctions:mn,parseDuration:Ye,isInvalidDate:$e,setWeekday:nn,getWeekday:rn,setWeekend:sn};function ee(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(a){const f="^\\s*"+a+"\\s*$",d=new RegExp(f);t[0].match(d)&&(e[a]=!0,t.shift(1),n=!0)})}c(ee,"getTaskTags");X.extend(Ii);var yn=c(function(){ot.debug("Something is calling, setConf, remove the call")},"setConf"),he={monday:ri,tuesday:ni,wednesday:ii,thursday:ei,friday:ti,saturday:Je,sunday:Ke},gn=c((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((f,d)=>f.startTime-d.startTime||f.order-d.order),a=0;for(const f of n)for(let d=0;d<r.length;d++)if(f.startTime>=r[d]){r[d]=f.endTime,f.order=d+e,d>a&&(a=d);break}return a},"getMaxIntersections"),it,Pt=1e4,pn=c(function(t,e,r,n){const a=ft().gantt;n.db.setDiagramId(e);const f=ft().securityLevel;let d;f==="sandbox"&&(d=bt("#i"+e));const T=f==="sandbox"?bt(d.nodes()[0].contentDocument.body):bt("body"),E=f==="sandbox"?d.nodes()[0].contentDocument:document,A=E.getElementById(e);it=A.parentElement.offsetWidth,it===void 0&&(it=1200),a.useWidth!==void 0&&(it=a.useWidth);const b=n.db.getTasks();let F=[];for(const u of b)F.push(u.type);F=h(F);const C={};let D=2*a.topPadding;if(n.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const u={};for(const v of b)u[v.section]===void 0?u[v.section]=[v]:u[v.section].push(v);let x=0;for(const v of Object.keys(u)){const k=gn(u[v],x)+1;x+=k,D+=k*(a.barHeight+a.barGap),C[v]=k}}else{D+=b.length*(a.barHeight+a.barGap);for(const u of F)C[u]=b.filter(x=>x.type===u).length}A.setAttribute("viewBox","0 0 "+it+" "+D);const V=T.select(`[id="${e}"]`),I=Ue().domain([Ze(b,function(u){return u.startTime}),Qe(b,function(u){return u.endTime})]).rangeRound([0,it-a.leftPadding-a.rightPadding]);function S(u,x){const v=u.startTime,k=x.startTime;let m=0;return v>k?m=1:v<k&&(m=-1),m}c(S,"taskCompare"),b.sort(S),M(b,it,D),Be(V,D,it,a.useMaxWidth),V.append("text").text(n.db.getDiagramTitle()).attr("x",it/2).attr("y",a.titleTopMargin).attr("class","titleText");function M(u,x,v){const k=a.barHeight,m=k+a.barGap,o=a.topPadding,l=a.leftPadding,y=si().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(bi);L(m,o,l,x,v,u,n.db.getExcludes(),n.db.getIncludes()),H(l,o,x,v),W(u,m,o,l,k,y,x),$(m,o),p(l,o,x,v)}c(M,"makeGantt");function W(u,x,v,k,m,o,l){u.sort((i,_)=>i.vert===_.vert?0:i.vert?1:-1);const g=[...new Set(u.map(i=>i.order))].map(i=>u.find(_=>_.order===i));V.append("g").selectAll("rect").data(g).enter().append("rect").attr("x",0).attr("y",function(i,_){return _=i.order,_*x+v-2}).attr("width",function(){return l-a.rightPadding/2}).attr("height",x).attr("class",function(i){for(const[_,P]of F.entries())if(i.type===P)return"section section"+_%a.numberSectionStyles;return"section section0"}).enter();const w=V.append("g").selectAll("rect").data(u).enter(),s=n.db.getLinks();if(w.append("rect").attr("id",function(i){return e+"-"+i.id}).attr("rx",3).attr("ry",3).attr("x",function(i){return i.milestone?I(i.startTime)+k+.5*(I(i.endTime)-I(i.startTime))-.5*m:I(i.startTime)+k}).attr("y",function(i,_){return _=i.order,i.vert?a.gridLineStartPadding:_*x+v}).attr("width",function(i){return i.milestone?m:i.vert?.08*m:I(i.renderEndTime||i.endTime)-I(i.startTime)}).attr("height",function(i){return i.vert?b.length*(a.barHeight+a.barGap)+a.barHeight*2:m}).attr("transform-origin",function(i,_){return _=i.order,(I(i.startTime)+k+.5*(I(i.endTime)-I(i.startTime))).toString()+"px "+(_*x+v+.5*m).toString()+"px"}).attr("class",function(i){const _="task";let P="";i.classes.length>0&&(P=i.classes.join(" "));let N=0;for(const[j,Y]of F.entries())i.type===Y&&(N=j%a.numberSectionStyles);let O="";return i.active?i.crit?O+=" activeCrit":O=" active":i.done?i.crit?O=" doneCrit":O=" done":i.crit&&(O+=" crit"),O.length===0&&(O=" task"),i.milestone&&(O=" milestone "+O),i.vert&&(O=" vert "+O),O+=N,O+=" "+P,_+O}),w.append("text").attr("id",function(i){return e+"-"+i.id+"-text"}).text(function(i){return i.task}).attr("font-size",a.fontSize).attr("x",function(i){let _=I(i.startTime),P=I(i.renderEndTime||i.endTime);if(i.milestone&&(_+=.5*(I(i.endTime)-I(i.startTime))-.5*m,P=_+m),i.vert)return I(i.startTime)+k;const N=this.getBBox().width;return N>P-_?P+N+1.5*a.leftPadding>l?_+k-5:P+k+5:(P-_)/2+_+k}).attr("y",function(i,_){return i.vert?a.gridLineStartPadding+b.length*(a.barHeight+a.barGap)+60:(_=i.order,_*x+a.barHeight/2+(a.fontSize/2-2)+v)}).attr("text-height",m).attr("class",function(i){const _=I(i.startTime);let P=I(i.endTime);i.milestone&&(P=_+m);const N=this.getBBox().width;let O="";i.classes.length>0&&(O=i.classes.join(" "));let j=0;for(const[Q,rt]of F.entries())i.type===rt&&(j=Q%a.numberSectionStyles);let Y="";return i.active&&(i.crit?Y="activeCritText"+j:Y="activeText"+j),i.done?i.crit?Y=Y+" doneCritText"+j:Y=Y+" doneText"+j:i.crit&&(Y=Y+" critText"+j),i.milestone&&(Y+=" milestoneText"),i.vert&&(Y+=" vertText"),N>P-_?P+N+1.5*a.leftPadding>l?O+" taskTextOutsideLeft taskTextOutside"+j+" "+Y:O+" taskTextOutsideRight taskTextOutside"+j+" "+Y+" width-"+N:O+" taskText taskText"+j+" "+Y+" width-"+N}),ft().securityLevel==="sandbox"){let i;i=bt("#i"+e);const _=i.nodes()[0].contentDocument;w.filter(function(P){return s.has(P.id)}).each(function(P){var N=_.querySelector("#"+CSS.escape(e+"-"+P.id)),O=_.querySelector("#"+CSS.escape(e+"-"+P.id+"-text"));const j=N.parentNode;var Y=_.createElement("a");Y.setAttribute("xlink:href",s.get(P.id)),Y.setAttribute("target","_top"),j.appendChild(Y),Y.appendChild(N),Y.appendChild(O)})}}c(W,"drawRects");function L(u,x,v,k,m,o,l,y){if(l.length===0&&y.length===0)return;let g,w;for(const{startTime:N,endTime:O}of o)(g===void 0||N<g)&&(g=N),(w===void 0||O>w)&&(w=O);if(!g||!w)return;if(X(w).diff(X(g),"year")>5){ot.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const s=n.db.getDateFormat(),z=[];let i=null,_=X(g);for(;_.valueOf()<=w;)n.db.isInvalidDate(_,s,l,y)?i?i.end=_:i={start:_,end:_}:i&&(z.push(i),i=null),_=_.add(1,"d");V.append("g").selectAll("rect").data(z).enter().append("rect").attr("id",N=>e+"-exclude-"+N.start.format("YYYY-MM-DD")).attr("x",N=>I(N.start.startOf("day"))+v).attr("y",a.gridLineStartPadding).attr("width",N=>I(N.end.endOf("day"))-I(N.start.startOf("day"))).attr("height",m-x-a.gridLineStartPadding).attr("transform-origin",function(N,O){return(I(N.start)+v+.5*(I(N.end)-I(N.start))).toString()+"px "+(O*u+.5*m).toString()+"px"}).attr("class","exclude-range")}c(L,"drawExcludeDays");function R(u,x,v,k){if(v<=0||u>x)return 1/0;const m=x-u,o=X.duration({[k??"day"]:v}).asMilliseconds();return o<=0?1/0:Math.ceil(m/o)}c(R,"getEstimatedTickCount");function H(u,x,v,k){const m=n.db.getDateFormat(),o=n.db.getAxisFormat();let l;o?l=o:m==="D"?l="%d":l=a.axisFormat??"%Y-%m-%d";let y=ki(I).tickSize(-k+x+a.gridLineStartPadding).tickFormat(ne(l));const w=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||a.tickInterval);if(w!==null){const s=parseInt(w[1],10);if(isNaN(s)||s<=0)ot.warn(`Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`);else{const z=w[2],i=n.db.getWeekday()||a.weekday,_=I.domain(),P=_[0],N=_[1],O=R(P,N,s,z);if(O>Pt)ot.warn(`The tick interval "${s}${z}" would generate ${O} ticks, which exceeds the maximum allowed (${Pt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(z){case"millisecond":y.ticks(le.every(s));break;case"second":y.ticks(ce.every(s));break;case"minute":y.ticks(oe.every(s));break;case"hour":y.ticks(ae.every(s));break;case"day":y.ticks(se.every(s));break;case"week":y.ticks(he[i].every(s));break;case"month":y.ticks(re.every(s));break}}}if(V.append("g").attr("class","grid").attr("transform","translate("+u+", "+(k-50)+")").call(y).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||a.topAxis){let s=mi(I).tickSize(-k+x+a.gridLineStartPadding).tickFormat(ne(l));if(w!==null){const z=parseInt(w[1],10);if(isNaN(z)||z<=0)ot.warn(`Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`);else{const i=w[2],_=n.db.getWeekday()||a.weekday,P=I.domain(),N=P[0],O=P[1];if(R(N,O,z,i)<=Pt)switch(i){case"millisecond":s.ticks(le.every(z));break;case"second":s.ticks(ce.every(z));break;case"minute":s.ticks(oe.every(z));break;case"hour":s.ticks(ae.every(z));break;case"day":s.ticks(se.every(z));break;case"week":s.ticks(he[_].every(z));break;case"month":s.ticks(re.every(z));break}}}V.append("g").attr("class","grid").attr("transform","translate("+u+", "+x+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}c(H,"makeGrid");function $(u,x){let v=0;const k=Object.keys(C).map(m=>[m,C[m]]);V.append("g").selectAll("text").data(k).enter().append(function(m){const o=m[0].split(Ge.lineBreakRegex),l=-(o.length-1)/2,y=E.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("dy",l+"em");for(const[g,w]of o.entries()){const s=E.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttribute("alignment-baseline","central"),s.setAttribute("x","10"),g>0&&s.setAttribute("dy","1em"),s.textContent=w,y.appendChild(s)}return y}).attr("x",10).attr("y",function(m,o){if(o>0)for(let l=0;l<o;l++)return v+=k[o-1][1],m[1]*u/2+v*u+x;else return m[1]*u/2+x}).attr("font-size",a.sectionFontSize).attr("class",function(m){for(const[o,l]of F.entries())if(m[0]===l)return"sectionTitle sectionTitle"+o%a.numberSectionStyles;return"sectionTitle"})}c($,"vertLabels");function p(u,x,v,k){const m=n.db.getTodayMarker();if(m==="off")return;const o=V.append("g").attr("class","today"),l=new Date,y=o.append("line");y.attr("x1",I(l)+u).attr("x2",I(l)+u).attr("y1",a.titleTopMargin).attr("y2",k-a.titleTopMargin).attr("class","today"),m!==""&&y.attr("style",m.replace(/,/g,";"))}c(p,"drawToday");function h(u){const x={},v=[];for(let k=0,m=u.length;k<m;++k)Object.prototype.hasOwnProperty.call(x,u[k])||(x[u[k]]=!0,v.push(u[k]));return v}c(h,"checkUnique")},"draw"),vn={setConf:yn,draw:pn},xn=c(t=>`
7
- .mermaid-main-font {
8
- font-family: ${t.fontFamily};
9
- }
10
-
11
- .exclude-range {
12
- fill: ${t.excludeBkgColor};
13
- }
14
-
15
- .section {
16
- stroke: none;
17
- opacity: 0.2;
18
- }
19
-
20
- .section0 {
21
- fill: ${t.sectionBkgColor};
22
- }
23
-
24
- .section2 {
25
- fill: ${t.sectionBkgColor2};
26
- }
27
-
28
- .section1,
29
- .section3 {
30
- fill: ${t.altSectionBkgColor};
31
- opacity: 0.2;
32
- }
33
-
34
- .sectionTitle0 {
35
- fill: ${t.titleColor};
36
- }
37
-
38
- .sectionTitle1 {
39
- fill: ${t.titleColor};
40
- }
41
-
42
- .sectionTitle2 {
43
- fill: ${t.titleColor};
44
- }
45
-
46
- .sectionTitle3 {
47
- fill: ${t.titleColor};
48
- }
49
-
50
- .sectionTitle {
51
- text-anchor: start;
52
- font-family: ${t.fontFamily};
53
- }
54
-
55
-
56
- /* Grid and axis */
57
-
58
- .grid .tick {
59
- stroke: ${t.gridColor};
60
- opacity: 0.8;
61
- shape-rendering: crispEdges;
62
- }
63
-
64
- .grid .tick text {
65
- font-family: ${t.fontFamily};
66
- fill: ${t.textColor};
67
- }
68
-
69
- .grid path {
70
- stroke-width: 0;
71
- }
72
-
73
-
74
- /* Today line */
75
-
76
- .today {
77
- fill: none;
78
- stroke: ${t.todayLineColor};
79
- stroke-width: 2px;
80
- }
81
-
82
-
83
- /* Task styling */
84
-
85
- /* Default task */
86
-
87
- .task {
88
- stroke-width: 2;
89
- }
90
-
91
- .taskText {
92
- text-anchor: middle;
93
- font-family: ${t.fontFamily};
94
- }
95
-
96
- .taskTextOutsideRight {
97
- fill: ${t.taskTextDarkColor};
98
- text-anchor: start;
99
- font-family: ${t.fontFamily};
100
- }
101
-
102
- .taskTextOutsideLeft {
103
- fill: ${t.taskTextDarkColor};
104
- text-anchor: end;
105
- }
106
-
107
-
108
- /* Special case clickable */
109
-
110
- .task.clickable {
111
- cursor: pointer;
112
- }
113
-
114
- .taskText.clickable {
115
- cursor: pointer;
116
- fill: ${t.taskTextClickableColor} !important;
117
- font-weight: bold;
118
- }
119
-
120
- .taskTextOutsideLeft.clickable {
121
- cursor: pointer;
122
- fill: ${t.taskTextClickableColor} !important;
123
- font-weight: bold;
124
- }
125
-
126
- .taskTextOutsideRight.clickable {
127
- cursor: pointer;
128
- fill: ${t.taskTextClickableColor} !important;
129
- font-weight: bold;
130
- }
131
-
132
-
133
- /* Specific task settings for the sections*/
134
-
135
- .taskText0,
136
- .taskText1,
137
- .taskText2,
138
- .taskText3 {
139
- fill: ${t.taskTextColor};
140
- }
141
-
142
- .task0,
143
- .task1,
144
- .task2,
145
- .task3 {
146
- fill: ${t.taskBkgColor};
147
- stroke: ${t.taskBorderColor};
148
- }
149
-
150
- .taskTextOutside0,
151
- .taskTextOutside2
152
- {
153
- fill: ${t.taskTextOutsideColor};
154
- }
155
-
156
- .taskTextOutside1,
157
- .taskTextOutside3 {
158
- fill: ${t.taskTextOutsideColor};
159
- }
160
-
161
-
162
- /* Active task */
163
-
164
- .active0,
165
- .active1,
166
- .active2,
167
- .active3 {
168
- fill: ${t.activeTaskBkgColor};
169
- stroke: ${t.activeTaskBorderColor};
170
- }
171
-
172
- .activeText0,
173
- .activeText1,
174
- .activeText2,
175
- .activeText3 {
176
- fill: ${t.taskTextDarkColor} !important;
177
- }
178
-
179
-
180
- /* Completed task */
181
-
182
- .done0,
183
- .done1,
184
- .done2,
185
- .done3 {
186
- stroke: ${t.doneTaskBorderColor};
187
- fill: ${t.doneTaskBkgColor};
188
- stroke-width: 2;
189
- }
190
-
191
- .doneText0,
192
- .doneText1,
193
- .doneText2,
194
- .doneText3 {
195
- fill: ${t.taskTextDarkColor} !important;
196
- }
197
-
198
- /* Done task text displayed outside the bar sits against the diagram background,
199
- not against the done-task bar, so it must use the outside/contrast color. */
200
- .doneText0.taskTextOutsideLeft,
201
- .doneText0.taskTextOutsideRight,
202
- .doneText1.taskTextOutsideLeft,
203
- .doneText1.taskTextOutsideRight,
204
- .doneText2.taskTextOutsideLeft,
205
- .doneText2.taskTextOutsideRight,
206
- .doneText3.taskTextOutsideLeft,
207
- .doneText3.taskTextOutsideRight {
208
- fill: ${t.taskTextOutsideColor} !important;
209
- }
210
-
211
-
212
- /* Tasks on the critical line */
213
-
214
- .crit0,
215
- .crit1,
216
- .crit2,
217
- .crit3 {
218
- stroke: ${t.critBorderColor};
219
- fill: ${t.critBkgColor};
220
- stroke-width: 2;
221
- }
222
-
223
- .activeCrit0,
224
- .activeCrit1,
225
- .activeCrit2,
226
- .activeCrit3 {
227
- stroke: ${t.critBorderColor};
228
- fill: ${t.activeTaskBkgColor};
229
- stroke-width: 2;
230
- }
231
-
232
- .doneCrit0,
233
- .doneCrit1,
234
- .doneCrit2,
235
- .doneCrit3 {
236
- stroke: ${t.critBorderColor};
237
- fill: ${t.doneTaskBkgColor};
238
- stroke-width: 2;
239
- cursor: pointer;
240
- shape-rendering: crispEdges;
241
- }
242
-
243
- .milestone {
244
- transform: rotate(45deg) scale(0.8,0.8);
245
- }
246
-
247
- .milestoneText {
248
- font-style: italic;
249
- }
250
- .doneCritText0,
251
- .doneCritText1,
252
- .doneCritText2,
253
- .doneCritText3 {
254
- fill: ${t.taskTextDarkColor} !important;
255
- }
256
-
257
- /* Done-crit task text outside the bar — same reasoning as doneText above. */
258
- .doneCritText0.taskTextOutsideLeft,
259
- .doneCritText0.taskTextOutsideRight,
260
- .doneCritText1.taskTextOutsideLeft,
261
- .doneCritText1.taskTextOutsideRight,
262
- .doneCritText2.taskTextOutsideLeft,
263
- .doneCritText2.taskTextOutsideRight,
264
- .doneCritText3.taskTextOutsideLeft,
265
- .doneCritText3.taskTextOutsideRight {
266
- fill: ${t.taskTextOutsideColor} !important;
267
- }
268
-
269
- .vert {
270
- stroke: ${t.vertLineColor};
271
- }
272
-
273
- .vertText {
274
- font-size: 15px;
275
- text-anchor: middle;
276
- fill: ${t.vertLineColor} !important;
277
- }
278
-
279
- .activeCritText0,
280
- .activeCritText1,
281
- .activeCritText2,
282
- .activeCritText3 {
283
- fill: ${t.taskTextDarkColor} !important;
284
- }
285
-
286
- .titleText {
287
- text-anchor: middle;
288
- font-size: 18px;
289
- fill: ${t.titleColor||t.textColor};
290
- font-family: ${t.fontFamily};
291
- }
292
- `,"getStyles"),Tn=xn,In={parser:$i,db:kn,renderer:vn,styles:Tn};export{In as diagram};