@bigduu/lotus 2026.6.4 → 2026.6.5

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 (63) hide show
  1. package/dist/assets/{App-DGiMC-bc.js → App-CniE_U1E.js} +9 -9
  2. package/dist/assets/{MetricsService-BwJoJM1I.js → MetricsService-IjMATLVA.js} +1 -1
  3. package/dist/assets/{SubAgentsPanel-B7tWf8Y_.js → SubAgentsPanel-DqDHY5qg.js} +1 -1
  4. package/dist/assets/{architectureDiagram-3BPJPVTR-BebuBU7Q.js → architectureDiagram-3BPJPVTR-C7BxoVQN.js} +1 -1
  5. package/dist/assets/{blockDiagram-GPEHLZMM-COwJ0V9U.js → blockDiagram-GPEHLZMM-D3ugWWuN.js} +1 -1
  6. package/dist/assets/{c4Diagram-AAUBKEIU-Dzi1f7rv.js → c4Diagram-AAUBKEIU-DnReHW7Q.js} +1 -1
  7. package/dist/assets/{chunk-2J33WTMH-gGTSUslI.js → chunk-2J33WTMH-DUDFatLY.js} +1 -1
  8. package/dist/assets/{chunk-4BX2VUAB-Ba2pD5h_.js → chunk-4BX2VUAB-DF0FUXoV.js} +1 -1
  9. package/dist/assets/{chunk-55IACEB6-Bgc2fQut.js → chunk-55IACEB6-BN93Fcaq.js} +1 -1
  10. package/dist/assets/{chunk-727SXJPM-BbDzQZvf.js → chunk-727SXJPM-DOZ1cdYR.js} +1 -1
  11. package/dist/assets/{chunk-AQP2D5EJ-CNJIXQcJ.js → chunk-AQP2D5EJ-BewtTDQ7.js} +1 -1
  12. package/dist/assets/{chunk-FMBD7UC4-DxIxh6Ds.js → chunk-FMBD7UC4-tUDpDD2M.js} +1 -1
  13. package/dist/assets/{chunk-ND2GUHAM-s08Pzboe.js → chunk-ND2GUHAM-CoqI5beh.js} +1 -1
  14. package/dist/assets/{chunk-QZHKN3VN-BAzhPVsB.js → chunk-QZHKN3VN-mQJtPwti.js} +1 -1
  15. package/dist/assets/classDiagram-4FO5ZUOK-BxdS4zho.js +1 -0
  16. package/dist/assets/classDiagram-v2-Q7XG4LA2-BxdS4zho.js +1 -0
  17. package/dist/assets/{cose-bilkent-S5V4N54A-_w_xFpmi.js → cose-bilkent-S5V4N54A-D9j4sbxB.js} +1 -1
  18. package/dist/assets/{dagre-BM42HDAG-DBuvyGu5.js → dagre-BM42HDAG-Cuf0F8jg.js} +1 -1
  19. package/dist/assets/{diagram-2AECGRRQ-DBhlnTP6.js → diagram-2AECGRRQ-C4nlWCyH.js} +1 -1
  20. package/dist/assets/{diagram-5GNKFQAL-CfeEom2U.js → diagram-5GNKFQAL-DNv01R7K.js} +1 -1
  21. package/dist/assets/{diagram-KO2AKTUF-BdVfrz_2.js → diagram-KO2AKTUF-w8QWGjwj.js} +1 -1
  22. package/dist/assets/{diagram-LMA3HP47-CTH2TNUy.js → diagram-LMA3HP47-D2zerT45.js} +1 -1
  23. package/dist/assets/{diagram-OG6HWLK6-BQM5_eCb.js → diagram-OG6HWLK6-D4IaZt6w.js} +1 -1
  24. package/dist/assets/{erDiagram-TEJ5UH35-B-21iS1U.js → erDiagram-TEJ5UH35-BE_v4wba.js} +1 -1
  25. package/dist/assets/{flowDiagram-I6XJVG4X-Pvjq-IGZ.js → flowDiagram-I6XJVG4X-H1x34qkx.js} +1 -1
  26. package/dist/assets/{ganttDiagram-6RSMTGT7-CsT06Nub.js → ganttDiagram-6RSMTGT7-C_MQhNSh.js} +1 -1
  27. package/dist/assets/{gitGraphDiagram-PVQCEYII-CHvUQAnK.js → gitGraphDiagram-PVQCEYII-J4vbBKbe.js} +1 -1
  28. package/dist/assets/{index-Czh1rLTB.js → index-B6Wtq5ij.js} +1 -1
  29. package/dist/assets/{index-WsBNH02d.js → index-BtgBZ406.js} +1 -1
  30. package/dist/assets/{index-DUN61Z32.js → index-C0SPlGJa.js} +1 -1
  31. package/dist/assets/{index-DsVVUUnV.js → index-CAqVl_mr.js} +1 -1
  32. package/dist/assets/{index-CWR9aGNs.js → index-DFCIrXAv.js} +1 -1
  33. package/dist/assets/{index-BLvTnbVM.js → index-DLFurbGO.js} +1 -1
  34. package/dist/assets/{index-CGPDORYG.js → index-DS5W71XQ.js} +1 -1
  35. package/dist/assets/{index-DlPD5pVw.js → index-DzQRDtjO.js} +1 -1
  36. package/dist/assets/{index-qH5MzXB_.js → index-LE9DgWWR.js} +1 -1
  37. package/dist/assets/{index-DtdE5mvd.js → index-Tnb6z7YB.js} +3 -3
  38. package/dist/assets/{index-B2KftsrY.js → index-ZqRmVHVQ.js} +1 -1
  39. package/dist/assets/{infoDiagram-5YYISTIA-DVnYFnCA.js → infoDiagram-5YYISTIA-h192nXGV.js} +1 -1
  40. package/dist/assets/{ishikawaDiagram-YF4QCWOH-BilctuFn.js → ishikawaDiagram-YF4QCWOH-BxI12gkX.js} +1 -1
  41. package/dist/assets/{journeyDiagram-JHISSGLW-BvpNGUEX.js → journeyDiagram-JHISSGLW-DCO5Rl_2.js} +1 -1
  42. package/dist/assets/{kanban-definition-UN3LZRKU-Dq1kXZPB.js → kanban-definition-UN3LZRKU-ZnRHcGmD.js} +1 -1
  43. package/dist/assets/{main-BNHHYyvu.js → main-Ee10mQ7B.js} +3 -3
  44. package/dist/assets/{mindmap-definition-RKZ34NQL-BM5Yg_Wt.js → mindmap-definition-RKZ34NQL-CNrdccXV.js} +1 -1
  45. package/dist/assets/{pieDiagram-4H26LBE5-CxzR0EiZ.js → pieDiagram-4H26LBE5-CbeY-r9Q.js} +1 -1
  46. package/dist/assets/{quadrantDiagram-W4KKPZXB-C6qm5TrW.js → quadrantDiagram-W4KKPZXB-CmIV5OV3.js} +1 -1
  47. package/dist/assets/{requirementDiagram-4Y6WPE33-Bfok6_yJ.js → requirementDiagram-4Y6WPE33-DLUn445K.js} +1 -1
  48. package/dist/assets/{sankeyDiagram-5OEKKPKP-CO-kBES5.js → sankeyDiagram-5OEKKPKP-DMHvtkNI.js} +1 -1
  49. package/dist/assets/{sequenceDiagram-3UESZ5HK-BA68KNvF.js → sequenceDiagram-3UESZ5HK-BCQQacRT.js} +1 -1
  50. package/dist/assets/{stateDiagram-AJRCARHV-CPFv6QjH.js → stateDiagram-AJRCARHV-DsR-QFgp.js} +1 -1
  51. package/dist/assets/{stateDiagram-v2-BHNVJYJU-C6FuGkH6.js → stateDiagram-v2-BHNVJYJU-DED_TFzZ.js} +1 -1
  52. package/dist/assets/{timeline-definition-PNZ67QCA-DqkH57r5.js → timeline-definition-PNZ67QCA-DzaI8x_B.js} +1 -1
  53. package/dist/assets/{vendor-charts-C2gnH3Bq.js → vendor-charts-vIAeXmxC.js} +1 -1
  54. package/dist/assets/{vendor-mermaid-EqIWbuOm.js → vendor-mermaid-Db4IqfC2.js} +3 -3
  55. package/dist/assets/{vendor-pdf-BerqhPFN.js → vendor-pdf-BFLLcV6C.js} +3 -3
  56. package/dist/assets/{vennDiagram-CIIHVFJN-CakMDBwB.js → vennDiagram-CIIHVFJN-DzyEl3d2.js} +1 -1
  57. package/dist/assets/{wardley-L42UT6IY-B1oAtJIM.js → wardley-L42UT6IY-BYuEE8FJ.js} +1 -1
  58. package/dist/assets/{wardleyDiagram-YWT4CUSO-CxG6z1Fg.js → wardleyDiagram-YWT4CUSO-ChlBJ9ij.js} +1 -1
  59. package/dist/assets/{xychartDiagram-2RQKCTM6-BCpc7XLL.js → xychartDiagram-2RQKCTM6-YuVbM3u9.js} +1 -1
  60. package/dist/index.html +2 -2
  61. package/package.json +1 -1
  62. package/dist/assets/classDiagram-4FO5ZUOK-DXcpWQD1.js +0 -1
  63. package/dist/assets/classDiagram-v2-Q7XG4LA2-DXcpWQD1.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a8 as u,aJ as re,aA as O,aC as I,aF as oe,ac as ie,bb as P,ab as G,q as B,bc as ce,bd as de,be as L,aa as _,a7 as pe,a6 as he,ao as ue,ap as me,a5 as fe,a4 as ge,aD as ye,bf as Se,av as xe}from"./vendor-mermaid-EqIWbuOm.js";import{s as be}from"./chunk-2J33WTMH-gGTSUslI.js";import{p as ve}from"./chunk-4BX2VUAB-Ba2pD5h_.js";import{p as Ce}from"./wardley-L42UT6IY-B1oAtJIM.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var F,U=(F=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=pe,this.getAccTitle=he,this.setDiagramTitle=ue,this.getDiagramTitle=me,this.getAccDescription=fe,this.setAccDescription=ge}getNodes(){return this.nodes}getConfig(){const n=ye,o=O();return I({...n.treemap,...o.treemap??{}})}addNode(n,o){this.nodes.push(n),this.levels.set(n,o),o===0&&(this.outerNodes.push(n),this.root??(this.root=n))}getRoot(){return{name:"",children:this.outerNodes}}addClass(n,o){const l=this.classes.get(n)??{id:n,styles:[],textStyles:[]},r=o.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{Se(s)&&(l!=null&&l.textStyles?l.textStyles.push(s):l.textStyles=[s]),l!=null&&l.styles?l.styles.push(s):l.styles=[s]}),this.classes.set(n,l)}getClasses(){return this.classes}getStylesForClass(n){var o;return((o=this.classes.get(n))==null?void 0:o.styles)??[]}clear(){xe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},u(F,"TreeMapDB"),F);function K(d){if(!d.length)return[];const n=[],o=[];return d.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l==null?void 0:l.classSelector,l!=null&&l.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);o.length>0&&o[o.length-1].level>=l.level;)o.pop();if(o.length===0)n.push(r);else{const s=o[o.length-1].node;s.children?s.children.push(r):s.children=[r]}l.type!=="Leaf"&&o.push({node:r,level:l.level})}),n}u(K,"buildHierarchy");var we=u((d,n)=>{ve(d,n);const o=[];for(const s of d.TreemapRows??[])s.$type==="ClassDefStatement"&&n.addClass(s.className??"",s.styleText??"");for(const s of d.TreemapRows??[]){const p=s.item;if(!p)continue;const h=s.indent?parseInt(s.indent):0,k=Te(p),a=p.classSelector?n.getStylesForClass(p.classSelector):[],z=a.length>0?a:void 0,b={level:h,name:k,type:p.$type,value:p.value,classSelector:p.classSelector,cssCompiledStyles:z};o.push(b)}const l=K(o),r=u((s,p)=>{for(const h of s)n.addNode(h,p),h.children&&h.children.length>0&&r(h.children,p+1)},"addNodesRecursively");r(l,0)},"populate"),Te=u(d=>d.name?String(d.name):"","getItemName"),Q={parser:{yy:void 0},parse:u(async d=>{var n;try{const l=await Ce("treemap",d);G.debug("Treemap AST:",l);const r=(n=Q.parser)==null?void 0:n.yy;if(!(r instanceof U))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.");we(l,r)}catch(o){throw G.error("Error parsing treemap:",o),o}},"parse")},Le=10,$=10,M=25,$e=u((d,n,o,l)=>{const r=l.db,s=r.getConfig(),p=s.padding??Le,h=r.getDiagramTitle(),k=r.getRoot(),{themeVariables:a}=O();if(!k)return;const z=h?30:0,b=oe(n),X=s.nodeWidth?s.nodeWidth*$:960,Y=s.nodeHeight?s.nodeHeight*$:500,H=X,j=Y+z;b.attr("viewBox",`0 0 ${H} ${j}`),ie(b,j,H,s.useMaxWidth);let v;try{const e=s.valueFormat||",";if(e==="$0,0")v=u(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),i=t?t[0]:"";v=u(m=>"$"+P(","+i)(m),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);v=u(i=>"$"+P(t||"")(i),"valueFormat")}else v=P(e)}catch(e){G.error("Error creating format function:",e),v=P(",")}const A=B().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),Z=B().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),W=B().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&b.append("text").attr("x",H/2).attr("y",z/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const q=b.append("g").attr("transform",`translate(0, ${z})`).attr("class","treemapContainer"),ee=ce(k).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=de().size([X,Y]).paddingTop(e=>e.children&&e.children.length>0?M+$:0).paddingInner(p).paddingLeft(e=>e.children&&e.children.length>0?$:0).paddingRight(e=>e.children&&e.children.length>0?$:0).paddingBottom(e=>e.children&&e.children.length>0?$:0).round(!0)(ee),te=J.descendants().filter(e=>e.children&&e.children.length>0),N=q.selectAll(".treemapSection").data(te).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),N.append("clipPath").attr("id",(e,t)=>`clip-section-${n}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>A(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>Z(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),N.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/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 t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),i=e.data.name;t.text(i);const m=e.x1-e.x0,y=6;let S;s.showValues!==!1&&e.value?S=m-10-30-10-y:S=m-y-6;const x=Math.max(15,S),c=t.node();if(c.getComputedTextLength()>x){const f="...";let g=i;for(;g.length>0;){if(g=i.substring(0,g.length-1),g.length===0){t.text(f),c.getComputedTextLength()>x&&t.text("");break}if(t.text(g+f),c.getComputedTextLength()<=x)break}}}),s.showValues!==!1&&N.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?v(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")});const ae=J.leaves(),E=q.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${n}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.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 t="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+W(e.data.name)+";",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${n}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),i=e.x1-e.x0,m=e.y1-e.y0,y=t.node(),S=4,T=i-2*S,x=m-2*S;if(T<10||x<10){t.style("display","none");return}let c=parseInt(t.style("font-size"),10);const C=8,f=28,g=.6,w=6,V=2;for(;y.getComputedTextLength()>T&&c>C;)c--,t.style("font-size",`${c}px`);let D=Math.max(w,Math.min(f,Math.round(c*g))),R=c+V+D;for(;R>x&&c>C&&(c--,D=Math.max(w,Math.min(f,Math.round(c*g))),!(D<w&&c===C));)t.style("font-size",`${c}px`),R=c+V+D;t.style("font-size",`${c}px`),(y.getComputedTextLength()>T||c<C||x<c)&&t.style("display","none")}),s.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const i="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+W(t.data.name)+";",m=L({cssCompiledStyles:t.data.cssCompiledStyles});return i+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${n}-${i})`).text(t=>t.value?v(t.value):"").each(function(t){const i=_(this),m=this.parentNode;if(!m){i.style("display","none");return}const y=_(m).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){i.style("display","none");return}const S=parseFloat(y.style("font-size")),T=28,x=.6,c=6,C=2,f=Math.max(c,Math.min(T,Math.round(S*x)));i.style("font-size",`${f}px`);const w=(t.y1-t.y0)/2+S/2+C;i.attr("y",w);const V=t.x1-t.x0,se=t.y1-t.y0-4,ne=V-2*4;i.node().getComputedTextLength()>ne||w+f>se||f<c?i.style("display","none"):i.style("display",null)});const le=s.diagramPadding??8;be(b,le,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),Fe=u(function(d,n){return n.db.getClasses()},"getClasses"),ze={draw:$e,getClasses:Fe},Ae={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Ne=u(({treemap:d}={})=>{const n=re(),o=O(),l=I(n,o.themeVariables),r=I(Ae,d),s=r.titleColor??l.titleColor,p=r.labelColor??l.textColor,h=r.valueColor??l.textColor;return`
1
+ import{a8 as u,aJ as re,aA as O,aC as I,aF as oe,ac as ie,bb as P,ab as G,q as B,bc as ce,bd as de,be as L,aa as _,a7 as pe,a6 as he,ao as ue,ap as me,a5 as fe,a4 as ge,aD as ye,bf as Se,av as xe}from"./vendor-mermaid-Db4IqfC2.js";import{s as be}from"./chunk-2J33WTMH-DUDFatLY.js";import{p as ve}from"./chunk-4BX2VUAB-DF0FUXoV.js";import{p as Ce}from"./wardley-L42UT6IY-BYuEE8FJ.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var F,U=(F=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=pe,this.getAccTitle=he,this.setDiagramTitle=ue,this.getDiagramTitle=me,this.getAccDescription=fe,this.setAccDescription=ge}getNodes(){return this.nodes}getConfig(){const n=ye,o=O();return I({...n.treemap,...o.treemap??{}})}addNode(n,o){this.nodes.push(n),this.levels.set(n,o),o===0&&(this.outerNodes.push(n),this.root??(this.root=n))}getRoot(){return{name:"",children:this.outerNodes}}addClass(n,o){const l=this.classes.get(n)??{id:n,styles:[],textStyles:[]},r=o.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{Se(s)&&(l!=null&&l.textStyles?l.textStyles.push(s):l.textStyles=[s]),l!=null&&l.styles?l.styles.push(s):l.styles=[s]}),this.classes.set(n,l)}getClasses(){return this.classes}getStylesForClass(n){var o;return((o=this.classes.get(n))==null?void 0:o.styles)??[]}clear(){xe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},u(F,"TreeMapDB"),F);function K(d){if(!d.length)return[];const n=[],o=[];return d.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l==null?void 0:l.classSelector,l!=null&&l.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);o.length>0&&o[o.length-1].level>=l.level;)o.pop();if(o.length===0)n.push(r);else{const s=o[o.length-1].node;s.children?s.children.push(r):s.children=[r]}l.type!=="Leaf"&&o.push({node:r,level:l.level})}),n}u(K,"buildHierarchy");var we=u((d,n)=>{ve(d,n);const o=[];for(const s of d.TreemapRows??[])s.$type==="ClassDefStatement"&&n.addClass(s.className??"",s.styleText??"");for(const s of d.TreemapRows??[]){const p=s.item;if(!p)continue;const h=s.indent?parseInt(s.indent):0,k=Te(p),a=p.classSelector?n.getStylesForClass(p.classSelector):[],z=a.length>0?a:void 0,b={level:h,name:k,type:p.$type,value:p.value,classSelector:p.classSelector,cssCompiledStyles:z};o.push(b)}const l=K(o),r=u((s,p)=>{for(const h of s)n.addNode(h,p),h.children&&h.children.length>0&&r(h.children,p+1)},"addNodesRecursively");r(l,0)},"populate"),Te=u(d=>d.name?String(d.name):"","getItemName"),Q={parser:{yy:void 0},parse:u(async d=>{var n;try{const l=await Ce("treemap",d);G.debug("Treemap AST:",l);const r=(n=Q.parser)==null?void 0:n.yy;if(!(r instanceof U))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.");we(l,r)}catch(o){throw G.error("Error parsing treemap:",o),o}},"parse")},Le=10,$=10,M=25,$e=u((d,n,o,l)=>{const r=l.db,s=r.getConfig(),p=s.padding??Le,h=r.getDiagramTitle(),k=r.getRoot(),{themeVariables:a}=O();if(!k)return;const z=h?30:0,b=oe(n),X=s.nodeWidth?s.nodeWidth*$:960,Y=s.nodeHeight?s.nodeHeight*$:500,H=X,j=Y+z;b.attr("viewBox",`0 0 ${H} ${j}`),ie(b,j,H,s.useMaxWidth);let v;try{const e=s.valueFormat||",";if(e==="$0,0")v=u(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),i=t?t[0]:"";v=u(m=>"$"+P(","+i)(m),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);v=u(i=>"$"+P(t||"")(i),"valueFormat")}else v=P(e)}catch(e){G.error("Error creating format function:",e),v=P(",")}const A=B().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),Z=B().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),W=B().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&b.append("text").attr("x",H/2).attr("y",z/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const q=b.append("g").attr("transform",`translate(0, ${z})`).attr("class","treemapContainer"),ee=ce(k).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=de().size([X,Y]).paddingTop(e=>e.children&&e.children.length>0?M+$:0).paddingInner(p).paddingLeft(e=>e.children&&e.children.length>0?$:0).paddingRight(e=>e.children&&e.children.length>0?$:0).paddingBottom(e=>e.children&&e.children.length>0?$:0).round(!0)(ee),te=J.descendants().filter(e=>e.children&&e.children.length>0),N=q.selectAll(".treemapSection").data(te).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),N.append("clipPath").attr("id",(e,t)=>`clip-section-${n}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>A(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>Z(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),N.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/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 t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),i=e.data.name;t.text(i);const m=e.x1-e.x0,y=6;let S;s.showValues!==!1&&e.value?S=m-10-30-10-y:S=m-y-6;const x=Math.max(15,S),c=t.node();if(c.getComputedTextLength()>x){const f="...";let g=i;for(;g.length>0;){if(g=i.substring(0,g.length-1),g.length===0){t.text(f),c.getComputedTextLength()>x&&t.text("");break}if(t.text(g+f),c.getComputedTextLength()<=x)break}}}),s.showValues!==!1&&N.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?v(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")});const ae=J.leaves(),E=q.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${n}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.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 t="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+W(e.data.name)+";",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${n}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),i=e.x1-e.x0,m=e.y1-e.y0,y=t.node(),S=4,T=i-2*S,x=m-2*S;if(T<10||x<10){t.style("display","none");return}let c=parseInt(t.style("font-size"),10);const C=8,f=28,g=.6,w=6,V=2;for(;y.getComputedTextLength()>T&&c>C;)c--,t.style("font-size",`${c}px`);let D=Math.max(w,Math.min(f,Math.round(c*g))),R=c+V+D;for(;R>x&&c>C&&(c--,D=Math.max(w,Math.min(f,Math.round(c*g))),!(D<w&&c===C));)t.style("font-size",`${c}px`),R=c+V+D;t.style("font-size",`${c}px`),(y.getComputedTextLength()>T||c<C||x<c)&&t.style("display","none")}),s.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const i="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+W(t.data.name)+";",m=L({cssCompiledStyles:t.data.cssCompiledStyles});return i+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${n}-${i})`).text(t=>t.value?v(t.value):"").each(function(t){const i=_(this),m=this.parentNode;if(!m){i.style("display","none");return}const y=_(m).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){i.style("display","none");return}const S=parseFloat(y.style("font-size")),T=28,x=.6,c=6,C=2,f=Math.max(c,Math.min(T,Math.round(S*x)));i.style("font-size",`${f}px`);const w=(t.y1-t.y0)/2+S/2+C;i.attr("y",w);const V=t.x1-t.x0,se=t.y1-t.y0-4,ne=V-2*4;i.node().getComputedTextLength()>ne||w+f>se||f<c?i.style("display","none"):i.style("display",null)});const le=s.diagramPadding??8;be(b,le,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),Fe=u(function(d,n){return n.db.getClasses()},"getClasses"),ze={draw:$e,getClasses:Fe},Ae={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Ne=u(({treemap:d}={})=>{const n=re(),o=O(),l=I(n,o.themeVariables),r=I(Ae,d),s=r.titleColor??l.titleColor,p=r.labelColor??l.textColor,h=r.valueColor??l.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${r.sectionStrokeColor};
4
4
  stroke-width: ${r.sectionStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{g as Bt}from"./chunk-55IACEB6-Bgc2fQut.js";import{s as Ft}from"./chunk-2J33WTMH-gGTSUslI.js";import{a8 as p,a7 as Yt,a6 as Pt,a4 as zt,a5 as Gt,ao as Kt,ap as Ut,a9 as rt,ab as V,av as Zt,at as jt,ax as Wt,ay as Qt,az as Xt,al as Ht,am as qt,aa as Jt,an as $t}from"./vendor-mermaid-EqIWbuOm.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var gt=function(){var s=p(function(I,n,a,l){for(a=a||{},l=I.length;l--;a[I[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],f=[1,23],d=[1,24],k=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],R=[1,18],S=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,70,71],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],H=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],bt=[65,66,67,68,69],mt=[1,84],kt=[1,83],Et=[1,81],Tt=[1,82],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],q=[1,92],J=[1,91],$=[1,90],Z=[19,58],Ot=[1,101],Nt=[1,100],ut=[19,58,60,62],dt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,y,t,j){var e=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 67:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 79:case 80:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 66:case 69:this.$=t[e];break;case 68:t[e-2].push(t[e]),this.$=t[e-2];break;case 70:this.$=t[e].replace(/"/g,"");break;case 71:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:at,66:ct,67:ot,68:lt,69:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:T,48:D,50:R,51:S,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:R,51:S,52:x},{64:57,70:[1,58],71:[1,59]},s(P,[2,72]),s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(H,[2,37]),s(H,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{63:35,12:72,17:[1,73],42:A,65:at,66:ct,67:ot,68:lt,69:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:at,66:ct,67:ot,68:lt,69:ht},s(bt,[2,77]),s(bt,[2,78]),{6:mt,10:kt,39:80,42:Et,47:Tt},{40:[1,85],41:[1,86]},s(St,[2,43],{46:87,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:mt,10:kt,39:88,42:Et,47:Tt},{14:89,40:q,50:J,72:$},{16:93,40:O,41:N},{11:94,40:T,48:D,50:R,51:S,52:x},{18:95,19:[1,96],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:97,57:98,59:99,61:Ot,62:Nt}),s([19,58,61,62],[2,66]),s(i,[2,22],{15:[1,103],17:[1,102]}),s([40,48,50,51,52],[2,71]),s(i,[2,36]),{13:z,41:G,45:104,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(H,[2,39]),s(H,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,79]),s(i,[2,80]),s(i,[2,81]),{13:[1,105],42:A},{13:[1,107],15:[1,106]},{19:[1,108]},s(i,[2,15]),s(Z,[2,62],{57:109,60:[1,110],62:Nt}),s(Z,[2,63]),s(ut,[2,67]),s(Z,[2,70]),s(ut,[2,69]),{18:111,19:[1,112],53:53,54:54,58:Y},{16:113,40:O,41:N},s(St,[2,44],{46:87,13:z,41:G,48:K,49:U}),{14:114,40:q,50:J,72:$},{16:115,40:O,41:N},{14:116,40:q,50:J,72:$},s(i,[2,13]),s(Z,[2,64]),{59:117,61:Ot},{19:[1,118]},s(i,[2,20]),s(i,[2,23],{17:[1,119],42:A}),s(i,[2,11]),{13:[1,120],42:A},s(i,[2,10]),s(ut,[2,68]),s(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:Y},{14:123,40:q,50:J,72:$},{19:[1,124]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],y=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var yt=_.yylloc;t.push(yt);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,y.length=y.length-b,t.length=t.length-b}p(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(Rt,"lex");for(var g,v,m,ft,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
1
+ import{g as Bt}from"./chunk-55IACEB6-BN93Fcaq.js";import{s as Ft}from"./chunk-2J33WTMH-DUDFatLY.js";import{a8 as p,a7 as Yt,a6 as Pt,a4 as zt,a5 as Gt,ao as Kt,ap as Ut,a9 as rt,ab as V,av as Zt,at as jt,ax as Wt,ay as Qt,az as Xt,al as Ht,am as qt,aa as Jt,an as $t}from"./vendor-mermaid-Db4IqfC2.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var gt=function(){var s=p(function(I,n,a,l){for(a=a||{},l=I.length;l--;a[I[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],f=[1,23],d=[1,24],k=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],R=[1,18],S=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,70,71],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],H=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],bt=[65,66,67,68,69],mt=[1,84],kt=[1,83],Et=[1,81],Tt=[1,82],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],q=[1,92],J=[1,91],$=[1,90],Z=[19,58],Ot=[1,101],Nt=[1,100],ut=[19,58,60,62],dt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,y,t,j){var e=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 67:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 79:case 80:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 66:case 69:this.$=t[e];break;case 68:t[e-2].push(t[e]),this.$=t[e-2];break;case 70:this.$=t[e].replace(/"/g,"");break;case 71:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:at,66:ct,67:ot,68:lt,69:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:T,48:D,50:R,51:S,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:R,51:S,52:x},{64:57,70:[1,58],71:[1,59]},s(P,[2,72]),s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(H,[2,37]),s(H,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{63:35,12:72,17:[1,73],42:A,65:at,66:ct,67:ot,68:lt,69:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:at,66:ct,67:ot,68:lt,69:ht},s(bt,[2,77]),s(bt,[2,78]),{6:mt,10:kt,39:80,42:Et,47:Tt},{40:[1,85],41:[1,86]},s(St,[2,43],{46:87,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:mt,10:kt,39:88,42:Et,47:Tt},{14:89,40:q,50:J,72:$},{16:93,40:O,41:N},{11:94,40:T,48:D,50:R,51:S,52:x},{18:95,19:[1,96],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:97,57:98,59:99,61:Ot,62:Nt}),s([19,58,61,62],[2,66]),s(i,[2,22],{15:[1,103],17:[1,102]}),s([40,48,50,51,52],[2,71]),s(i,[2,36]),{13:z,41:G,45:104,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(H,[2,39]),s(H,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,79]),s(i,[2,80]),s(i,[2,81]),{13:[1,105],42:A},{13:[1,107],15:[1,106]},{19:[1,108]},s(i,[2,15]),s(Z,[2,62],{57:109,60:[1,110],62:Nt}),s(Z,[2,63]),s(ut,[2,67]),s(Z,[2,70]),s(ut,[2,69]),{18:111,19:[1,112],53:53,54:54,58:Y},{16:113,40:O,41:N},s(St,[2,44],{46:87,13:z,41:G,48:K,49:U}),{14:114,40:q,50:J,72:$},{16:115,40:O,41:N},{14:116,40:q,50:J,72:$},s(i,[2,13]),s(Z,[2,64]),{59:117,61:Ot},{19:[1,118]},s(i,[2,20]),s(i,[2,23],{17:[1,119],42:A}),s(i,[2,11]),{13:[1,120],42:A},s(i,[2,10]),s(ut,[2,68]),s(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:Y},{14:123,40:q,50:J,72:$},{19:[1,124]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],y=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var yt=_.yylloc;t.push(yt);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,y.length=y.length-b,t.length=t.length-b}p(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(Rt,"lex");for(var g,v,m,ft,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==It?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:yt,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(m[0]){case 1:l.push(g),y.push(_.yytext),t.push(_.yylloc),l.push(m[1]),g=null,At=_.yyleng,e=_.yytext,et=_.yylineno,yt=_.yylloc;break;case 2:if(E=this.productions_[m[1]][1],w.$=y[y.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},Vt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),ft=this.performAction.apply(w,[e,At,et,C.yy,m[1],y,t].concat(wt)),typeof ft<"u")return ft;E&&(l=l.slice(0,-1*E*2),y=y.slice(0,-1*E),t=t.slice(0,-1*E)),l.push(this.productions_[m[1]][0]),y.push(w.$),t.push(w._$),xt=j[l[l.length-2]][l[l.length-1]],l.push(xt);break;case 3:return!0}}return!0},"parse")},Dt=function(){var I={EOF:1,parseError:p(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:p(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var a=n.length,l=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=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),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===r.length?this.yylloc.first_column:0)+r[r.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as Ht}from"./chunk-FMBD7UC4-DxIxh6Ds.js";import{a8 as m,ak as Mt,ab as J,a9 as g1,al as Xt,am as Qt,an as rt,a7 as Jt,a4 as Zt,ao as $t,a6 as te,a5 as ee,ap as se,ai as ie,aq as re,ar as ae,as as ne,at as st,aa as it,au as ue,av as le,aw as oe,ax as ce,ay as he}from"./vendor-mermaid-EqIWbuOm.js";import{c as de}from"./chunk-ND2GUHAM-s08Pzboe.js";import{g as pe}from"./chunk-55IACEB6-Bgc2fQut.js";import{s as fe}from"./chunk-2J33WTMH-gGTSUslI.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var ge="flowchart-",w1,be=(w1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Jt,this.setAccDescription=Zt,this.setDiagramTitle=$t,this.getAccTitle=te,this.getAccDescription=ee,this.getDiagramTitle=se,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return ie.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,a,u,o,p,c={},k){var K,E;if(!i||i.trim().length===0)return;let r;if(k!==void 0){let f;k.includes(`
1
+ import{g as Ht}from"./chunk-FMBD7UC4-tUDpDD2M.js";import{a8 as m,ak as Mt,ab as J,a9 as g1,al as Xt,am as Qt,an as rt,a7 as Jt,a4 as Zt,ao as $t,a6 as te,a5 as ee,ap as se,ai as ie,aq as re,ar as ae,as as ne,at as st,aa as it,au as ue,av as le,aw as oe,ax as ce,ay as he}from"./vendor-mermaid-Db4IqfC2.js";import{c as de}from"./chunk-ND2GUHAM-CoqI5beh.js";import{g as pe}from"./chunk-55IACEB6-BN93Fcaq.js";import{s as fe}from"./chunk-2J33WTMH-DUDFatLY.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var ge="flowchart-",w1,be=(w1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Jt,this.setAccDescription=Zt,this.setDiagramTitle=$t,this.getAccTitle=te,this.getAccDescription=ee,this.getDiagramTitle=se,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return ie.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,a,u,o,p,c={},k){var K,E;if(!i||i.trim().length===0)return;let r;if(k!==void 0){let f;k.includes(`
2
2
  `)?f=k+`
3
3
  `:f=`{
4
4
  `+k+`
@@ -1,4 +1,4 @@
1
- import{a5 as ue,a4 as de,ap as fe,ao as he,a6 as me,a7 as ke,a8 as c,a9 as nt,aa as mt,G as ye,bq as ge,br as ve,ac as pe,o as Te,bs as xe,ab as et,bt as be,bu as Nt,bv as Bt,bw as we,bx as _e,by as De,bz as Ce,bA as Se,bB as Ee,bC as Ie,bD as zt,bE as qt,bF as Ht,bG as jt,bH as Gt,bI as Me,ai as Ae,ag as Fe,av as $e,an as Le}from"./vendor-mermaid-EqIWbuOm.js";import{d as P,at as Oe,au as We}from"./vendor-antd-BV9fXfUG.js";import{g as Qt}from"./vendor-i18n-Dm-c3D_C.js";var kt={exports:{}},Ye=kt.exports,Xt;function Re(){return Xt||(Xt=1,function(t,r){(function(n,i){t.exports=i()})(Ye,function(){var n="day";return function(i,a,k){var T=function(A){return A.add(4-A.isoWeekday(),n)},C=a.prototype;C.isoWeekYear=function(){return T(this).year()},C.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),n);var D,$,L,O,W=T(this),_=(D=this.isoWeekYear(),$=this.$u,L=($?k.utc:k)().year(D).startOf("year"),O=4-L.isoWeekday(),L.isoWeekday()>4&&(O+=7),L.add(O,n));return W.diff(_,"week")+1},C.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var Y=C.startOf;C.startOf=function(A,D){var $=this.$utils(),L=!!$.u(D)||D;return $.p(A)==="isoweek"?L?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(A,D)}}})}(kt)),kt.exports}var Pe=Re();const Ve=Qt(Pe);var yt={exports:{}},Ne=yt.exports,Ut;function Be(){return Ut||(Ut=1,function(t,r){(function(n,i){t.exports=i()})(Ne,function(){var n,i,a=1e3,k=6e4,T=36e5,C=864e5,Y=/\[([^\]]+)]|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,D=2628e6,$=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,L={years:A,months:D,days:C,hours:T,minutes:k,seconds:a,milliseconds:1,weeks:6048e5},O=function(I){return I instanceof G},W=function(I,p,f){return new G(I,f,p.$l)},_=function(I){return i.p(I)+"s"},J=function(I){return I<0},B=function(I){return J(I)?Math.ceil(I):Math.floor(I)},Q=function(I){return Math.abs(I)},q=function(I,p){return I?J(I)?{negative:!0,format:""+Q(I)+p}:{negative:!1,format:""+I+p}:{negative:!1,format:""}},G=function(){function I(f,u,y){var g=this;if(this.$d={},this.$l=y,f===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return W(f*L[_(u)],this);if(typeof f=="number")return this.$ms=f,this.parseFromMilliseconds(),this;if(typeof f=="object")return Object.keys(f).forEach(function(o){g.$d[_(o)]=f[o]}),this.calMilliseconds(),this;if(typeof f=="string"){var v=f.match($);if(v){var m=v.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=I.prototype;return p.calMilliseconds=function(){var f=this;this.$ms=Object.keys(this.$d).reduce(function(u,y){return u+(f.$d[y]||0)*L[y]},0)},p.parseFromMilliseconds=function(){var f=this.$ms;this.$d.years=B(f/A),f%=A,this.$d.months=B(f/D),f%=D,this.$d.days=B(f/C),f%=C,this.$d.hours=B(f/T),f%=T,this.$d.minutes=B(f/k),f%=k,this.$d.seconds=B(f/a),f%=a,this.$d.milliseconds=f},p.toISOString=function(){var f=q(this.$d.years,"Y"),u=q(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var g=q(y,"D"),v=q(this.$d.hours,"H"),m=q(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=q(o,"S"),h=f.negative||u.negative||g.negative||v.negative||m.negative||l.negative,d=v.format||m.format||l.format?"T":"",x=(h?"-":"")+"P"+f.format+u.format+g.format+d+v.format+m.format+l.format;return x==="P"||x==="-P"?"P0D":x},p.toJSON=function(){return this.toISOString()},p.format=function(f){var u=f||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return u.replace(Y,function(g,v){return v||String(y[g])})},p.as=function(f){return this.$ms/L[_(f)]},p.get=function(f){var u=this.$ms,y=_(f);return y==="milliseconds"?u%=1e3:u=y==="weeks"?B(u/L[y]):this.$d[y],u||0},p.add=function(f,u,y){var g;return g=u?f*L[_(u)]:O(f)?f.$ms:W(f,this).$ms,W(this.$ms+g*(y?-1:1),this)},p.subtract=function(f,u){return this.add(f,u,!0)},p.locale=function(f){var u=this.clone();return u.$l=f,u},p.clone=function(){return W(this.$ms,this)},p.humanize=function(f){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!f)},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")},I}(),Z=function(I,p,f){return I.add(p.years()*f,"y").add(p.months()*f,"M").add(p.days()*f,"d").add(p.hours()*f,"h").add(p.minutes()*f,"m").add(p.seconds()*f,"s").add(p.milliseconds()*f,"ms")};return function(I,p,f){n=f,i=f().$utils(),f.duration=function(g,v){var m=f.locale();return W(g,{$l:m},v)},f.isDuration=O;var u=p.prototype.add,y=p.prototype.subtract;p.prototype.add=function(g,v){return O(g)?Z(this,g,1):u.bind(this)(g,v)},p.prototype.subtract=function(g,v){return O(g)?Z(this,g,-1):y.bind(this)(g,v)}}})}(yt)),yt.exports}var ze=Be();const qe=Qt(ze);var Dt=function(){var t=c(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),r=[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],n=[1,26],i=[1,27],a=[1,28],k=[1,29],T=[1,30],C=[1,31],Y=[1,32],A=[1,33],D=[1,34],$=[1,9],L=[1,10],O=[1,11],W=[1,12],_=[1,13],J=[1,14],B=[1,15],Q=[1,16],q=[1,19],G=[1,20],Z=[1,21],I=[1,22],p=[1,23],f=[1,25],u=[1,35],y={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,h,d,x,s,F){var e=s.length-1;switch(x){case 1:return s[e-1];case 2:this.$=[];break;case 3:s[e-1].push(s[e]),this.$=s[e-1];break;case 4:case 5:this.$=s[e];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=s[e].substr(18);break;case 19:d.TopAxis(),this.$=s[e].substr(8);break;case 20:d.setAxisFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 21:d.setTickInterval(s[e].substr(13)),this.$=s[e].substr(13);break;case 22:d.setExcludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 23:d.setIncludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 24:d.setTodayMarker(s[e].substr(12)),this.$=s[e].substr(12);break;case 27:d.setDiagramTitle(s[e].substr(6)),this.$=s[e].substr(6);break;case 28:this.$=s[e].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=s[e].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(s[e].substr(8)),this.$=s[e].substr(8);break;case 33:d.addTask(s[e-1],s[e]),this.$="task";break;case 34:this.$=s[e-1],d.setClickEvent(s[e-1],s[e],null);break;case 35:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],s[e]);break;case 36:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],null),d.setLink(s[e-2],s[e]);break;case 37:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-2],s[e-1]),d.setLink(s[e-3],s[e]);break;case 38:this.$=s[e-2],d.setClickEvent(s[e-2],s[e],null),d.setLink(s[e-2],s[e-1]);break;case 39:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-1],s[e]),d.setLink(s[e-3],s[e-2]);break;case 40:this.$=s[e-1],d.setLink(s[e-1],s[e]);break;case 41:case 47:this.$=s[e-1]+" "+s[e];break;case 42:case 43:case 45:this.$=s[e-2]+" "+s[e-1]+" "+s[e];break;case 44:case 46:this.$=s[e-3]+" "+s[e-2]+" "+s[e-1]+" "+s[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:B,29:Q,30:q,31:G,33:Z,35:I,36:p,37:24,38:f,40:u},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:B,29:Q,30:q,31:G,33:Z,35:I,36:p,37:24,38:f,40:u},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:c(function(o){var l=this,h=[0],d=[],x=[null],s=[],F=this.table,e="",b=0,M=0,E=2,S=1,V=s.slice.call(arguments,1),w=Object.create(this.lexer),X={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(X.yy[ct]=this.yy[ct]);w.setInput(o,X.yy),X.yy.lexer=w,X.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var xt=w.yylloc;s.push(xt);var ce=w.options&&w.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(z){h.length=h.length-2*z,x.length=x.length-z,s.length=s.length-z}c(le,"popStack");function Pt(){var z;return z=d.pop()||w.lex()||S,typeof z!="number"&&(z instanceof Array&&(d=z,z=d.pop()),z=l.symbols_[z]||z),z}c(Pt,"lex");for(var N,tt,H,bt,it={},ft,U,Vt,ht;;){if(tt=h[h.length-1],this.defaultActions[tt]?H=this.defaultActions[tt]:((N===null||typeof N>"u")&&(N=Pt()),H=F[tt]&&F[tt][N]),typeof H>"u"||!H.length||!H[0]){var wt="";ht=[];for(ft in F[tt])this.terminals_[ft]&&ft>E&&ht.push("'"+this.terminals_[ft]+"'");w.showPosition?wt="Parse error on line "+(b+1)+`:
1
+ import{a5 as ue,a4 as de,ap as fe,ao as he,a6 as me,a7 as ke,a8 as c,a9 as nt,aa as mt,G as ye,bq as ge,br as ve,ac as pe,o as Te,bs as xe,ab as et,bt as be,bu as Nt,bv as Bt,bw as we,bx as _e,by as De,bz as Ce,bA as Se,bB as Ee,bC as Ie,bD as zt,bE as qt,bF as Ht,bG as jt,bH as Gt,bI as Me,ai as Ae,ag as Fe,av as $e,an as Le}from"./vendor-mermaid-Db4IqfC2.js";import{d as P,at as Oe,au as We}from"./vendor-antd-BV9fXfUG.js";import{g as Qt}from"./vendor-i18n-Dm-c3D_C.js";var kt={exports:{}},Ye=kt.exports,Xt;function Re(){return Xt||(Xt=1,function(t,r){(function(n,i){t.exports=i()})(Ye,function(){var n="day";return function(i,a,k){var T=function(A){return A.add(4-A.isoWeekday(),n)},C=a.prototype;C.isoWeekYear=function(){return T(this).year()},C.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),n);var D,$,L,O,W=T(this),_=(D=this.isoWeekYear(),$=this.$u,L=($?k.utc:k)().year(D).startOf("year"),O=4-L.isoWeekday(),L.isoWeekday()>4&&(O+=7),L.add(O,n));return W.diff(_,"week")+1},C.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var Y=C.startOf;C.startOf=function(A,D){var $=this.$utils(),L=!!$.u(D)||D;return $.p(A)==="isoweek"?L?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(A,D)}}})}(kt)),kt.exports}var Pe=Re();const Ve=Qt(Pe);var yt={exports:{}},Ne=yt.exports,Ut;function Be(){return Ut||(Ut=1,function(t,r){(function(n,i){t.exports=i()})(Ne,function(){var n,i,a=1e3,k=6e4,T=36e5,C=864e5,Y=/\[([^\]]+)]|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,D=2628e6,$=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,L={years:A,months:D,days:C,hours:T,minutes:k,seconds:a,milliseconds:1,weeks:6048e5},O=function(I){return I instanceof G},W=function(I,p,f){return new G(I,f,p.$l)},_=function(I){return i.p(I)+"s"},J=function(I){return I<0},B=function(I){return J(I)?Math.ceil(I):Math.floor(I)},Q=function(I){return Math.abs(I)},q=function(I,p){return I?J(I)?{negative:!0,format:""+Q(I)+p}:{negative:!1,format:""+I+p}:{negative:!1,format:""}},G=function(){function I(f,u,y){var g=this;if(this.$d={},this.$l=y,f===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return W(f*L[_(u)],this);if(typeof f=="number")return this.$ms=f,this.parseFromMilliseconds(),this;if(typeof f=="object")return Object.keys(f).forEach(function(o){g.$d[_(o)]=f[o]}),this.calMilliseconds(),this;if(typeof f=="string"){var v=f.match($);if(v){var m=v.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=I.prototype;return p.calMilliseconds=function(){var f=this;this.$ms=Object.keys(this.$d).reduce(function(u,y){return u+(f.$d[y]||0)*L[y]},0)},p.parseFromMilliseconds=function(){var f=this.$ms;this.$d.years=B(f/A),f%=A,this.$d.months=B(f/D),f%=D,this.$d.days=B(f/C),f%=C,this.$d.hours=B(f/T),f%=T,this.$d.minutes=B(f/k),f%=k,this.$d.seconds=B(f/a),f%=a,this.$d.milliseconds=f},p.toISOString=function(){var f=q(this.$d.years,"Y"),u=q(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var g=q(y,"D"),v=q(this.$d.hours,"H"),m=q(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=q(o,"S"),h=f.negative||u.negative||g.negative||v.negative||m.negative||l.negative,d=v.format||m.format||l.format?"T":"",x=(h?"-":"")+"P"+f.format+u.format+g.format+d+v.format+m.format+l.format;return x==="P"||x==="-P"?"P0D":x},p.toJSON=function(){return this.toISOString()},p.format=function(f){var u=f||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return u.replace(Y,function(g,v){return v||String(y[g])})},p.as=function(f){return this.$ms/L[_(f)]},p.get=function(f){var u=this.$ms,y=_(f);return y==="milliseconds"?u%=1e3:u=y==="weeks"?B(u/L[y]):this.$d[y],u||0},p.add=function(f,u,y){var g;return g=u?f*L[_(u)]:O(f)?f.$ms:W(f,this).$ms,W(this.$ms+g*(y?-1:1),this)},p.subtract=function(f,u){return this.add(f,u,!0)},p.locale=function(f){var u=this.clone();return u.$l=f,u},p.clone=function(){return W(this.$ms,this)},p.humanize=function(f){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!f)},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")},I}(),Z=function(I,p,f){return I.add(p.years()*f,"y").add(p.months()*f,"M").add(p.days()*f,"d").add(p.hours()*f,"h").add(p.minutes()*f,"m").add(p.seconds()*f,"s").add(p.milliseconds()*f,"ms")};return function(I,p,f){n=f,i=f().$utils(),f.duration=function(g,v){var m=f.locale();return W(g,{$l:m},v)},f.isDuration=O;var u=p.prototype.add,y=p.prototype.subtract;p.prototype.add=function(g,v){return O(g)?Z(this,g,1):u.bind(this)(g,v)},p.prototype.subtract=function(g,v){return O(g)?Z(this,g,-1):y.bind(this)(g,v)}}})}(yt)),yt.exports}var ze=Be();const qe=Qt(ze);var Dt=function(){var t=c(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),r=[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],n=[1,26],i=[1,27],a=[1,28],k=[1,29],T=[1,30],C=[1,31],Y=[1,32],A=[1,33],D=[1,34],$=[1,9],L=[1,10],O=[1,11],W=[1,12],_=[1,13],J=[1,14],B=[1,15],Q=[1,16],q=[1,19],G=[1,20],Z=[1,21],I=[1,22],p=[1,23],f=[1,25],u=[1,35],y={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,h,d,x,s,F){var e=s.length-1;switch(x){case 1:return s[e-1];case 2:this.$=[];break;case 3:s[e-1].push(s[e]),this.$=s[e-1];break;case 4:case 5:this.$=s[e];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=s[e].substr(18);break;case 19:d.TopAxis(),this.$=s[e].substr(8);break;case 20:d.setAxisFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 21:d.setTickInterval(s[e].substr(13)),this.$=s[e].substr(13);break;case 22:d.setExcludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 23:d.setIncludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 24:d.setTodayMarker(s[e].substr(12)),this.$=s[e].substr(12);break;case 27:d.setDiagramTitle(s[e].substr(6)),this.$=s[e].substr(6);break;case 28:this.$=s[e].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=s[e].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(s[e].substr(8)),this.$=s[e].substr(8);break;case 33:d.addTask(s[e-1],s[e]),this.$="task";break;case 34:this.$=s[e-1],d.setClickEvent(s[e-1],s[e],null);break;case 35:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],s[e]);break;case 36:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],null),d.setLink(s[e-2],s[e]);break;case 37:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-2],s[e-1]),d.setLink(s[e-3],s[e]);break;case 38:this.$=s[e-2],d.setClickEvent(s[e-2],s[e],null),d.setLink(s[e-2],s[e-1]);break;case 39:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-1],s[e]),d.setLink(s[e-3],s[e-2]);break;case 40:this.$=s[e-1],d.setLink(s[e-1],s[e]);break;case 41:case 47:this.$=s[e-1]+" "+s[e];break;case 42:case 43:case 45:this.$=s[e-2]+" "+s[e-1]+" "+s[e];break;case 44:case 46:this.$=s[e-3]+" "+s[e-2]+" "+s[e-1]+" "+s[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:B,29:Q,30:q,31:G,33:Z,35:I,36:p,37:24,38:f,40:u},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:B,29:Q,30:q,31:G,33:Z,35:I,36:p,37:24,38:f,40:u},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:c(function(o){var l=this,h=[0],d=[],x=[null],s=[],F=this.table,e="",b=0,M=0,E=2,S=1,V=s.slice.call(arguments,1),w=Object.create(this.lexer),X={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(X.yy[ct]=this.yy[ct]);w.setInput(o,X.yy),X.yy.lexer=w,X.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var xt=w.yylloc;s.push(xt);var ce=w.options&&w.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(z){h.length=h.length-2*z,x.length=x.length-z,s.length=s.length-z}c(le,"popStack");function Pt(){var z;return z=d.pop()||w.lex()||S,typeof z!="number"&&(z instanceof Array&&(d=z,z=d.pop()),z=l.symbols_[z]||z),z}c(Pt,"lex");for(var N,tt,H,bt,it={},ft,U,Vt,ht;;){if(tt=h[h.length-1],this.defaultActions[tt]?H=this.defaultActions[tt]:((N===null||typeof N>"u")&&(N=Pt()),H=F[tt]&&F[tt][N]),typeof H>"u"||!H.length||!H[0]){var wt="";ht=[];for(ft in F[tt])this.terminals_[ft]&&ft>E&&ht.push("'"+this.terminals_[ft]+"'");w.showPosition?wt="Parse error on line "+(b+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+ht.join(", ")+", got '"+(this.terminals_[N]||N)+"'":wt="Parse error on line "+(b+1)+": Unexpected "+(N==S?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(wt,{text:w.match,token:this.terminals_[N]||N,line:w.yylineno,loc:xt,expected:ht})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+tt+", token: "+N);switch(H[0]){case 1:h.push(N),x.push(w.yytext),s.push(w.yylloc),h.push(H[1]),N=null,M=w.yyleng,e=w.yytext,b=w.yylineno,xt=w.yylloc;break;case 2:if(U=this.productions_[H[1]][1],it.$=x[x.length-U],it._$={first_line:s[s.length-(U||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(U||1)].first_column,last_column:s[s.length-1].last_column},ce&&(it._$.range=[s[s.length-(U||1)].range[0],s[s.length-1].range[1]]),bt=this.performAction.apply(it,[e,M,b,X.yy,H[1],x,s].concat(V)),typeof bt<"u")return bt;U&&(h=h.slice(0,-1*U*2),x=x.slice(0,-1*U),s=s.slice(0,-1*U)),h.push(this.productions_[H[1]][0]),x.push(it.$),s.push(it._$),Vt=F[h[h.length-2]][h[h.length-1]],h.push(Vt);break;case 3:return!0}}return!0},"parse")},g=function(){var m={EOF:1,parseError:c(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);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,h=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 d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[x[0],x[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
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()+`
@@ -1,4 +1,4 @@
1
- import{p as he}from"./chunk-4BX2VUAB-Ba2pD5h_.js";import{I as $e}from"./chunk-QZHKN3VN-BAzhPVsB.js";import{ap as fe,ao as ge,a4 as ue,a5 as ye,a6 as xe,a7 as me,a8 as $,aA as Q,ab as k,aa as pe,a9 as z,an as be,aB as we,av as ke,ai as L,aC as ve,aD as Ee,aE as Ce}from"./vendor-mermaid-EqIWbuOm.js";import{p as Be}from"./wardley-L42UT6IY-B1oAtJIM.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),ke()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),Pe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:We,getDirection:qe,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
1
+ import{p as he}from"./chunk-4BX2VUAB-DF0FUXoV.js";import{I as $e}from"./chunk-QZHKN3VN-mQJtPwti.js";import{ap as fe,ao as ge,a4 as ue,a5 as ye,a6 as xe,a7 as me,a8 as $,aA as Q,ab as k,aa as pe,a9 as z,an as be,aB as we,av as ke,ai as L,aC as ve,aD as Ee,aE as Ce}from"./vendor-mermaid-Db4IqfC2.js";import{p as Be}from"./wardley-L42UT6IY-BYuEE8FJ.js";import"./vendor-antd-BV9fXfUG.js";import"./vendor-i18n-Dm-c3D_C.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),ke()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),Pe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:We,getDirection:qe,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
2
2
  ${o-n/2-M/2},${u+I}
3
3
  ${o-n/2-M/2},${u-I}
4
4
  ${t.posWithOffset-n/2-M},${u-x-I}
@@ -1,4 +1,4 @@
1
- import{j as s}from"./vendor-markdown-CR3QKQo2.js";import{R as ye,u as ve,a as r}from"./vendor-i18n-Dm-c3D_C.js";import{u as j,b as xe,h as Ee,j as he,k as T,r as qe,l as Ce,m as Se,s as Re,a as Y,n as L,C as A}from"./App-DGiMC-bc.js";import{X as we,l as ke,N as Z,x as be,af as je,ag as F,j as ee,$ as Te,t as De}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-EqIWbuOm.js";import"./main-BNHHYyvu.js";const a={questionCard:"qd-questionCard",questionHeader:"qd-questionHeader",headerLeft:"qd-headerLeft",questionIcon:"qd-questionIcon",questionText:"qd-questionText",collapseBtn:"qd-collapseBtn",questionBody:"qd-questionBody",optionsGroup:"qd-optionsGroup",optionItem:"qd-optionItem",customHint:"qd-customHint",questionFooter:"qd-questionFooter"},{Text:D}=ke,{useToken:Ne}=De,Be=n=>{const f=(n||"").replace(/\\r\\n/g,`
1
+ import{j as s}from"./vendor-markdown-CR3QKQo2.js";import{R as ye,u as ve,a as r}from"./vendor-i18n-Dm-c3D_C.js";import{u as j,b as xe,h as Ee,j as he,k as T,r as qe,l as Ce,m as Se,s as Re,a as Y,n as L,C as A}from"./App-CniE_U1E.js";import{X as we,l as ke,N as Z,x as be,af as je,ag as F,j as ee,$ as Te,t as De}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-Db4IqfC2.js";import"./main-Ee10mQ7B.js";const a={questionCard:"qd-questionCard",questionHeader:"qd-questionHeader",headerLeft:"qd-headerLeft",questionIcon:"qd-questionIcon",questionText:"qd-questionText",collapseBtn:"qd-collapseBtn",questionBody:"qd-questionBody",optionsGroup:"qd-optionsGroup",optionItem:"qd-optionItem",customHint:"qd-customHint",questionFooter:"qd-questionFooter"},{Text:D}=ke,{useToken:Ne}=De,Be=n=>{const f=(n||"").replace(/\\r\\n/g,`
2
2
  `).replace(/\\n/g,`
3
3
  `).replace(/\r\n?/g,`
4
4
  `).trim();return f?f.includes(`
@@ -1 +1 @@
1
- var te=Object.defineProperty;var se=(i,t,s)=>t in i?te(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var D=(i,t,s)=>se(i,typeof t!="symbol"?t+"":t,s);import{j as e}from"./vendor-markdown-CR3QKQo2.js";import{u as C,a as o,i as U}from"./vendor-i18n-Dm-c3D_C.js";import{N as L,D as ae}from"./App-DGiMC-bc.js";import{X as O,t as J,l as V,a2 as N,j as k,N as T,aw as Z,ax as re,ay as ie,az as Y,G as ne,W as Q,Q as W,z as B,U as E,F as M,aA as K,aB as ce,p as oe,H as le,A as $,a3 as de,aC as he}from"./vendor-antd-BV9fXfUG.js";import"./main-BNHHYyvu.js";import"./vendor-mermaid-EqIWbuOm.js";const pe=({visible:i,onClose:t,onSelect:s})=>{const{t:c}=C(),{message:r}=O.useApp(),{token:a}=J.useToken(),{Text:n}=V,[u,j]=o.useState(!1),[l,m]=o.useState(""),[g,b]=o.useState(),[v,w]=o.useState([]),[I,f]=o.useState([]);o.useEffect(()=>{i&&y()},[i]);const y=async d=>{j(!0);try{const p=await L.browseFolder(d);m(p.current_path),b(p.parent_path),w(p.folders)}catch(p){console.error(c("chat.folderBrowser.readFolderError"),p),r.error(c("chat.folderBrowser.readFolderError"))}finally{j(!1)}},x=d=>{f([...I,l]),y(d.path)},z=()=>{g&&(f(I.slice(0,-1)),y(g))},R=()=>{f([]),y()},P=()=>{s(l),t()},S=()=>{if(!l)return[];const d=l.split(/[/\\]/).filter(Boolean);return l.startsWith("/")&&d.unshift("/"),d},_=d=>{const F=S().slice(0,d+1).join("/"),H=(l.startsWith("/"),F);y(H)};return e.jsx(N,{title:c("chat.folderBrowser.title"),open:i,onCancel:t,width:700,footer:null,children:e.jsxs(k,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsxs(k,{children:[e.jsx(T,{icon:e.jsx(Z,{}),onClick:R,size:"small",children:c("common.home")}),e.jsx(T,{icon:e.jsx(re,{}),onClick:z,disabled:!g,size:"small",children:c("common.parentDirectory")}),e.jsx(T,{type:"primary",icon:e.jsx(ie,{}),onClick:P,size:"small",children:c("chat.folderBrowser.selectCurrent")})]}),e.jsx(Y,{children:S().map((d,p)=>e.jsx(Y.Item,{children:e.jsx(T,{type:"link",size:"small",onClick:()=>_(p),style:{padding:0},children:d==="/"?e.jsx(Z,{}):d})},S().slice(0,p+1).join("/")))}),e.jsxs(ne,{size:"small",styles:{body:{padding:a.paddingXS}},children:[e.jsx(n,{type:"secondary",style:{fontSize:12},children:c("common.currentPath")})," ",e.jsx(n,{code:!0,children:l})]}),e.jsx(Q,{spinning:u,children:v.length===0&&!u?e.jsx(W,{image:W.PRESENTED_IMAGE_SIMPLE,description:e.jsx(n,{type:"secondary",children:c("chat.folderBrowser.emptyFolder")})}):e.jsx(B,{dataSource:v,style:{maxHeight:400,overflowY:"auto"},renderItem:d=>e.jsx(B.Item,{style:{padding:0},children:e.jsx(T,{type:"text",icon:e.jsx(E,{}),onClick:()=>x(d),style:{width:"100%",textAlign:"left",padding:`${a.paddingXS}px ${a.paddingSM}px`},children:d.name})})})}),e.jsx(n,{type:"secondary",style:{fontSize:12},children:c("chat.folderBrowser.tip")})]})})};class ue{constructor(t={}){D(this,"cache",new Map);D(this,"pendingValidations",new Map);D(this,"options");this.options={debounceMs:t.debounceMs??300,cacheTimeoutMs:t.cacheTimeoutMs??5*60*1e3,maxRetries:t.maxRetries??3}}async validateWorkspace(t){if(!t||t.trim().length===0)return{path:"",is_valid:!1,error_message:U.t("chat.workspace.errorEnterPath")};const s=t.trim(),c=this.getCachedResult(s);if(c)return c;const r=this.pendingValidations.get(s);if(r)return r;const a=this.performValidation(s);this.pendingValidations.set(s,a);try{const n=await a;return this.setCachedResult(s,n),n}finally{this.pendingValidations.delete(s)}}validateWorkspaceDebounced(t,s){const r=setTimeout(async()=>{try{const a=await this.validateWorkspace(t);s(a)}catch(a){const n={path:t,is_valid:!1,error_message:a instanceof Error?a.message:U.t("chat.workspace.checkDescription")};s(n)}},this.options.debounceMs);return()=>{clearTimeout(r)}}clearCache(){this.cache.clear()}getCachedResult(t){const s=this.cache.get(t);return s?Date.now()-s.timestamp>this.options.cacheTimeoutMs?(this.cache.delete(t),null):s.result:null}setCachedResult(t,s){this.cache.set(t,{result:s,timestamp:Date.now()})}async performValidation(t,s=0){try{return await ae.post("workspace/validate",{path:t})}catch(c){if(s<this.options.maxRetries&&this.isRetryableError(c))return await this.delay(Math.pow(2,s)*1e3),this.performValidation(t,s+1);throw c}}isRetryableError(t){return t instanceof Error?t.message.includes("Failed to fetch")||t.message.includes("HTTP error! status: 5"):!1}delay(t){return new Promise(s=>setTimeout(s,t))}async validateMultiplePaths(t){const c=[];for(let r=0;r<t.length;r+=5){const a=t.slice(r,r+5),n=await Promise.all(a.map(u=>this.validateWorkspace(u)));c.push(...n),r+5<t.length&&await this.delay(100)}return c}}const ge=new ue,me=({value:i="",onChange:t,showRecentWorkspaces:s,showSuggestions:c,onValidationChange:r})=>{const{message:a}=O.useApp(),{t:n}=C(),[u,j]=o.useState(i),[l,m]=o.useState({isValidating:!1,result:null}),[g,b]=o.useState([]),[v,w]=o.useState(!1),[I,f]=o.useState([]),[y,x]=o.useState(!1),[z,R]=o.useState(!1),P=o.useRef(null),S=o.useRef(null);o.useEffect(()=>{j(i)},[i]);const _=o.useCallback(async()=>{x(!0);try{const h=await L.getRecentWorkspaces();b(h.slice(0,5))}catch(h){console.error("Failed to load recent workspaces:",h),b([])}finally{x(!1)}},[]),d=o.useCallback(async()=>{R(!0);try{const h=await L.getPathSuggestions();f(h.suggestions.slice(0,8))}catch(h){console.error("Failed to load suggestions:",h),f([])}finally{R(!1)}},[]);o.useEffect(()=>{s&&_(),c&&d();const h=P.current,A=S.current;return()=>{h&&h.abort(),A&&A()}},[s,c,_,d]);const p=o.useCallback(h=>{j(h),t&&t(h),P.current&&P.current.abort(),S.current&&S.current(),h.trim()?(m({isValidating:!0,result:null}),S.current=ge.validateWorkspaceDebounced(h.trim(),A=>{m({isValidating:!1,result:A}),r&&r(A)})):(m({isValidating:!1,result:null}),r&&r(null))},[t,r]),F=o.useCallback(()=>{w(!0)},[]),H=o.useCallback(h=>{p(h),a.success(n("chat.workspace.folderSelected"))},[p,a,n]),ee=o.useCallback(h=>{p(h)},[p]);return{path:u,validationStatus:l,recentWorkspaces:g,suggestions:I,isLoadingRecent:y,isLoadingSuggestions:z,folderBrowserVisible:v,setFolderBrowserVisible:w,handlePathChange:p,handleBrowseClick:F,handleFolderSelect:H,handleWorkspaceSelect:ee}},{Text:X}=V,xe=({show:i,isLoading:t,recentWorkspaces:s,onSelect:c,token:r})=>{const{t:a}=C();return i?e.jsxs(M,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(k,{style:{paddingInline:r.paddingSM},children:[e.jsx(K,{}),e.jsx(X,{strong:!0,children:a("chat.workspace.recentTitle")})]}),t?e.jsx(M,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Q,{size:"small"})}):s.length===0?e.jsx(W,{description:a("chat.workspace.noRecentWorkspaces"),image:W.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(B,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:n=>e.jsx(B.Item,{style:{padding:0},children:e.jsx(T,{type:"text",onClick:()=>c(n.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(M,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(k,{children:[e.jsx(E,{style:{color:r.colorWarning}}),e.jsx(X,{strong:!0,children:n.workspace_name||n.path.split("/").pop()||a("chat.workspace.defaultWorkspaceName")})]}),e.jsx(X,{type:"secondary",ellipsis:{tooltip:n.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:n.path})]})})})})]}):null},{Text:G}=V,fe=(i,t)=>{switch(i.suggestion_type){case"home":return e.jsx(Z,{style:{color:t.colorPrimary}});case"documents":case"desktop":case"downloads":return e.jsx(E,{style:{color:t.colorSuccess}});case"recent":return e.jsx(K,{style:{color:t.colorWarning}});default:return e.jsx(E,{})}},ye=({show:i,isLoading:t,suggestions:s,onSelect:c,token:r})=>{const{t:a}=C();return i?e.jsxs(M,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(k,{style:{paddingInline:r.paddingSM},children:[e.jsx(E,{}),e.jsx(G,{strong:!0,children:a("chat.workspace.suggestedTitle")})]}),t?e.jsx(M,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Q,{size:"small"})}):s.length===0?e.jsx(W,{description:a("chat.workspace.noSuggestions"),image:W.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(B,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:n=>e.jsx(B.Item,{style:{padding:0},children:e.jsx(T,{type:"text",onClick:()=>c(n.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(M,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(k,{children:[fe(n,r),e.jsx(G,{strong:!0,children:n.name})]}),e.jsx(G,{type:"secondary",ellipsis:{tooltip:n.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:n.path})]})})})})]}):null},je=({isValidating:i,result:t,token:s})=>i?e.jsx(ce,{style:{color:s.colorPrimary}}):t?t.is_valid?e.jsx(oe,{style:{color:s.colorSuccess}}):e.jsx(le,{style:{color:s.colorError}}):null,{Text:q}=V,we=({result:i,token:t})=>{const{t:s}=C();return i?e.jsx("div",{style:{marginTop:t.marginXS},children:i.is_valid?e.jsx($,{type:"success",message:e.jsxs(k,{children:[e.jsx("span",{children:s("chat.workspace.validWorkspace")}),i.workspace_name&&e.jsxs(q,{type:"secondary",children:["(",i.workspace_name,")"]}),i.file_count!==void 0&&e.jsx(q,{type:"secondary",children:s("chat.workspace.fileCount",{count:i.file_count})})]}),showIcon:!0}):e.jsx($,{type:"error",message:i.error_message||s("validation.invalidPath"),showIcon:!0})}):null},{Text:Se}=V,ke=({value:i="",onChange:t,placeholder:s,disabled:c=!1,allowBrowse:r=!0,showRecentWorkspaces:a=!0,showSuggestions:n=!0,onValidationChange:u,className:j,style:l})=>{const{t:m}=C(),{token:g}=J.useToken(),b=s??m("chat.workspace.placeholder"),{path:v,validationStatus:w,recentWorkspaces:I,suggestions:f,isLoadingRecent:y,isLoadingSuggestions:x,folderBrowserVisible:z,setFolderBrowserVisible:R,handlePathChange:P,handleBrowseClick:S,handleFolderSelect:_,handleWorkspaceSelect:d}=me({value:i,onChange:t,showRecentWorkspaces:a,showSuggestions:n,onValidationChange:u});return e.jsxs("div",{className:j,style:l,children:[e.jsx(de,{value:v,onChange:p=>P(p.target.value),placeholder:b,disabled:c,size:"middle",style:{width:"100%"},suffix:e.jsx(je,{isValidating:w.isValidating,result:w.result,token:g}),addonBefore:e.jsxs(k,{children:[e.jsx(E,{}),e.jsx(Se,{children:m("chat.workspace.label")})]}),addonAfter:r?e.jsx(T,{"aria-label":m("chat.workspace.browseFolder"),title:m("chat.workspace.browseFolder"),icon:e.jsx(E,{}),onClick:S,disabled:c,type:"text",size:"middle",style:{display:"inline-flex",alignItems:"center"}}):void 0}),e.jsx(we,{result:w.result,token:g}),(a||n)&&e.jsxs(e.Fragment,{children:[e.jsx(he,{style:{margin:"16px 0 12px 0"}}),e.jsx(xe,{show:a,isLoading:y,recentWorkspaces:I,onSelect:d,token:g}),e.jsx(ye,{show:n,isLoading:x,suggestions:f,onSelect:d,token:g})]}),e.jsx(pe,{visible:z,onClose:()=>R(!1),onSelect:_})]})},{Title:be}=V,_e=({open:i,initialPath:t="",loading:s=!1,onSubmit:c,onCancel:r})=>{const{t:a}=C(),{message:n}=O.useApp(),[u,j]=o.useState(t),[l,m]=o.useState(null),[g,b]=o.useState(!1);o.useEffect(()=>{i&&(j(t),m(null))},[i,t]);const v=x=>{j(x)},w=x=>{m(x)},I=async()=>{if(!u.trim()){n.error(a("chat.workspace.errorEnterPath"));return}l&&!l.is_valid?N.confirm({title:a("chat.workspace.invalidTitle"),content:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.issuesDetected")}),e.jsx("p",{children:l.error_message||a("chat.workspace.invalidTitle")}),e.jsx("p",{children:a("chat.workspace.confirmSaveInvalid")})]}),okText:a("common.saveAnyway"),cancelText:a("common.cancel"),onOk:()=>f()}):f()},f=async()=>{b(!0);try{l!=null&&l.is_valid&&await L.addRecentWorkspace(u.trim(),{workspace_name:l.workspace_name}),c(u.trim())}catch(x){console.error("Failed to save workspace path:",x),n.error(a("chat.workspace.errorSaveFailed"))}finally{b(!1)}},y=!u.trim()||s||g;return e.jsx(N,{open:i,title:e.jsx(k,{children:e.jsx(be,{level:4,style:{margin:0},children:a("chat.workspace.modalTitle")})}),okText:a("common.save"),cancelText:a("common.cancel"),onOk:I,onCancel:r,okButtonProps:{disabled:y,loading:g||s},width:600,destroyOnClose:!0,children:e.jsxs(k,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsx($,{message:a("chat.workspace.descriptionTitle"),description:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.descriptionP1")}),e.jsx("p",{children:a("chat.workspace.descriptionP2")})]}),type:"info",showIcon:!0}),e.jsx(ke,{value:u,onChange:v,onValidationChange:w,placeholder:a("chat.workspace.placeholder"),disabled:g,allowBrowse:!0,showRecentWorkspaces:!0,showSuggestions:!0}),l&&!l.is_valid&&e.jsx($,{message:a("chat.workspace.checkTitle"),description:l.error_message||a("chat.workspace.checkDescription"),type:"warning",showIcon:!0})]})})};export{_e as default};
1
+ var te=Object.defineProperty;var se=(i,t,s)=>t in i?te(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var D=(i,t,s)=>se(i,typeof t!="symbol"?t+"":t,s);import{j as e}from"./vendor-markdown-CR3QKQo2.js";import{u as C,a as o,i as U}from"./vendor-i18n-Dm-c3D_C.js";import{N as L,D as ae}from"./App-CniE_U1E.js";import{X as O,t as J,l as V,a2 as N,j as k,N as T,aw as Z,ax as re,ay as ie,az as Y,G as ne,W as Q,Q as W,z as B,U as E,F as M,aA as K,aB as ce,p as oe,H as le,A as $,a3 as de,aC as he}from"./vendor-antd-BV9fXfUG.js";import"./main-Ee10mQ7B.js";import"./vendor-mermaid-Db4IqfC2.js";const pe=({visible:i,onClose:t,onSelect:s})=>{const{t:c}=C(),{message:r}=O.useApp(),{token:a}=J.useToken(),{Text:n}=V,[u,j]=o.useState(!1),[l,m]=o.useState(""),[g,b]=o.useState(),[v,w]=o.useState([]),[I,f]=o.useState([]);o.useEffect(()=>{i&&y()},[i]);const y=async d=>{j(!0);try{const p=await L.browseFolder(d);m(p.current_path),b(p.parent_path),w(p.folders)}catch(p){console.error(c("chat.folderBrowser.readFolderError"),p),r.error(c("chat.folderBrowser.readFolderError"))}finally{j(!1)}},x=d=>{f([...I,l]),y(d.path)},z=()=>{g&&(f(I.slice(0,-1)),y(g))},R=()=>{f([]),y()},P=()=>{s(l),t()},S=()=>{if(!l)return[];const d=l.split(/[/\\]/).filter(Boolean);return l.startsWith("/")&&d.unshift("/"),d},_=d=>{const F=S().slice(0,d+1).join("/"),H=(l.startsWith("/"),F);y(H)};return e.jsx(N,{title:c("chat.folderBrowser.title"),open:i,onCancel:t,width:700,footer:null,children:e.jsxs(k,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsxs(k,{children:[e.jsx(T,{icon:e.jsx(Z,{}),onClick:R,size:"small",children:c("common.home")}),e.jsx(T,{icon:e.jsx(re,{}),onClick:z,disabled:!g,size:"small",children:c("common.parentDirectory")}),e.jsx(T,{type:"primary",icon:e.jsx(ie,{}),onClick:P,size:"small",children:c("chat.folderBrowser.selectCurrent")})]}),e.jsx(Y,{children:S().map((d,p)=>e.jsx(Y.Item,{children:e.jsx(T,{type:"link",size:"small",onClick:()=>_(p),style:{padding:0},children:d==="/"?e.jsx(Z,{}):d})},S().slice(0,p+1).join("/")))}),e.jsxs(ne,{size:"small",styles:{body:{padding:a.paddingXS}},children:[e.jsx(n,{type:"secondary",style:{fontSize:12},children:c("common.currentPath")})," ",e.jsx(n,{code:!0,children:l})]}),e.jsx(Q,{spinning:u,children:v.length===0&&!u?e.jsx(W,{image:W.PRESENTED_IMAGE_SIMPLE,description:e.jsx(n,{type:"secondary",children:c("chat.folderBrowser.emptyFolder")})}):e.jsx(B,{dataSource:v,style:{maxHeight:400,overflowY:"auto"},renderItem:d=>e.jsx(B.Item,{style:{padding:0},children:e.jsx(T,{type:"text",icon:e.jsx(E,{}),onClick:()=>x(d),style:{width:"100%",textAlign:"left",padding:`${a.paddingXS}px ${a.paddingSM}px`},children:d.name})})})}),e.jsx(n,{type:"secondary",style:{fontSize:12},children:c("chat.folderBrowser.tip")})]})})};class ue{constructor(t={}){D(this,"cache",new Map);D(this,"pendingValidations",new Map);D(this,"options");this.options={debounceMs:t.debounceMs??300,cacheTimeoutMs:t.cacheTimeoutMs??5*60*1e3,maxRetries:t.maxRetries??3}}async validateWorkspace(t){if(!t||t.trim().length===0)return{path:"",is_valid:!1,error_message:U.t("chat.workspace.errorEnterPath")};const s=t.trim(),c=this.getCachedResult(s);if(c)return c;const r=this.pendingValidations.get(s);if(r)return r;const a=this.performValidation(s);this.pendingValidations.set(s,a);try{const n=await a;return this.setCachedResult(s,n),n}finally{this.pendingValidations.delete(s)}}validateWorkspaceDebounced(t,s){const r=setTimeout(async()=>{try{const a=await this.validateWorkspace(t);s(a)}catch(a){const n={path:t,is_valid:!1,error_message:a instanceof Error?a.message:U.t("chat.workspace.checkDescription")};s(n)}},this.options.debounceMs);return()=>{clearTimeout(r)}}clearCache(){this.cache.clear()}getCachedResult(t){const s=this.cache.get(t);return s?Date.now()-s.timestamp>this.options.cacheTimeoutMs?(this.cache.delete(t),null):s.result:null}setCachedResult(t,s){this.cache.set(t,{result:s,timestamp:Date.now()})}async performValidation(t,s=0){try{return await ae.post("workspace/validate",{path:t})}catch(c){if(s<this.options.maxRetries&&this.isRetryableError(c))return await this.delay(Math.pow(2,s)*1e3),this.performValidation(t,s+1);throw c}}isRetryableError(t){return t instanceof Error?t.message.includes("Failed to fetch")||t.message.includes("HTTP error! status: 5"):!1}delay(t){return new Promise(s=>setTimeout(s,t))}async validateMultiplePaths(t){const c=[];for(let r=0;r<t.length;r+=5){const a=t.slice(r,r+5),n=await Promise.all(a.map(u=>this.validateWorkspace(u)));c.push(...n),r+5<t.length&&await this.delay(100)}return c}}const ge=new ue,me=({value:i="",onChange:t,showRecentWorkspaces:s,showSuggestions:c,onValidationChange:r})=>{const{message:a}=O.useApp(),{t:n}=C(),[u,j]=o.useState(i),[l,m]=o.useState({isValidating:!1,result:null}),[g,b]=o.useState([]),[v,w]=o.useState(!1),[I,f]=o.useState([]),[y,x]=o.useState(!1),[z,R]=o.useState(!1),P=o.useRef(null),S=o.useRef(null);o.useEffect(()=>{j(i)},[i]);const _=o.useCallback(async()=>{x(!0);try{const h=await L.getRecentWorkspaces();b(h.slice(0,5))}catch(h){console.error("Failed to load recent workspaces:",h),b([])}finally{x(!1)}},[]),d=o.useCallback(async()=>{R(!0);try{const h=await L.getPathSuggestions();f(h.suggestions.slice(0,8))}catch(h){console.error("Failed to load suggestions:",h),f([])}finally{R(!1)}},[]);o.useEffect(()=>{s&&_(),c&&d();const h=P.current,A=S.current;return()=>{h&&h.abort(),A&&A()}},[s,c,_,d]);const p=o.useCallback(h=>{j(h),t&&t(h),P.current&&P.current.abort(),S.current&&S.current(),h.trim()?(m({isValidating:!0,result:null}),S.current=ge.validateWorkspaceDebounced(h.trim(),A=>{m({isValidating:!1,result:A}),r&&r(A)})):(m({isValidating:!1,result:null}),r&&r(null))},[t,r]),F=o.useCallback(()=>{w(!0)},[]),H=o.useCallback(h=>{p(h),a.success(n("chat.workspace.folderSelected"))},[p,a,n]),ee=o.useCallback(h=>{p(h)},[p]);return{path:u,validationStatus:l,recentWorkspaces:g,suggestions:I,isLoadingRecent:y,isLoadingSuggestions:z,folderBrowserVisible:v,setFolderBrowserVisible:w,handlePathChange:p,handleBrowseClick:F,handleFolderSelect:H,handleWorkspaceSelect:ee}},{Text:X}=V,xe=({show:i,isLoading:t,recentWorkspaces:s,onSelect:c,token:r})=>{const{t:a}=C();return i?e.jsxs(M,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(k,{style:{paddingInline:r.paddingSM},children:[e.jsx(K,{}),e.jsx(X,{strong:!0,children:a("chat.workspace.recentTitle")})]}),t?e.jsx(M,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Q,{size:"small"})}):s.length===0?e.jsx(W,{description:a("chat.workspace.noRecentWorkspaces"),image:W.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(B,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:n=>e.jsx(B.Item,{style:{padding:0},children:e.jsx(T,{type:"text",onClick:()=>c(n.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(M,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(k,{children:[e.jsx(E,{style:{color:r.colorWarning}}),e.jsx(X,{strong:!0,children:n.workspace_name||n.path.split("/").pop()||a("chat.workspace.defaultWorkspaceName")})]}),e.jsx(X,{type:"secondary",ellipsis:{tooltip:n.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:n.path})]})})})})]}):null},{Text:G}=V,fe=(i,t)=>{switch(i.suggestion_type){case"home":return e.jsx(Z,{style:{color:t.colorPrimary}});case"documents":case"desktop":case"downloads":return e.jsx(E,{style:{color:t.colorSuccess}});case"recent":return e.jsx(K,{style:{color:t.colorWarning}});default:return e.jsx(E,{})}},ye=({show:i,isLoading:t,suggestions:s,onSelect:c,token:r})=>{const{t:a}=C();return i?e.jsxs(M,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(k,{style:{paddingInline:r.paddingSM},children:[e.jsx(E,{}),e.jsx(G,{strong:!0,children:a("chat.workspace.suggestedTitle")})]}),t?e.jsx(M,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Q,{size:"small"})}):s.length===0?e.jsx(W,{description:a("chat.workspace.noSuggestions"),image:W.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(B,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:n=>e.jsx(B.Item,{style:{padding:0},children:e.jsx(T,{type:"text",onClick:()=>c(n.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(M,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(k,{children:[fe(n,r),e.jsx(G,{strong:!0,children:n.name})]}),e.jsx(G,{type:"secondary",ellipsis:{tooltip:n.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:n.path})]})})})})]}):null},je=({isValidating:i,result:t,token:s})=>i?e.jsx(ce,{style:{color:s.colorPrimary}}):t?t.is_valid?e.jsx(oe,{style:{color:s.colorSuccess}}):e.jsx(le,{style:{color:s.colorError}}):null,{Text:q}=V,we=({result:i,token:t})=>{const{t:s}=C();return i?e.jsx("div",{style:{marginTop:t.marginXS},children:i.is_valid?e.jsx($,{type:"success",message:e.jsxs(k,{children:[e.jsx("span",{children:s("chat.workspace.validWorkspace")}),i.workspace_name&&e.jsxs(q,{type:"secondary",children:["(",i.workspace_name,")"]}),i.file_count!==void 0&&e.jsx(q,{type:"secondary",children:s("chat.workspace.fileCount",{count:i.file_count})})]}),showIcon:!0}):e.jsx($,{type:"error",message:i.error_message||s("validation.invalidPath"),showIcon:!0})}):null},{Text:Se}=V,ke=({value:i="",onChange:t,placeholder:s,disabled:c=!1,allowBrowse:r=!0,showRecentWorkspaces:a=!0,showSuggestions:n=!0,onValidationChange:u,className:j,style:l})=>{const{t:m}=C(),{token:g}=J.useToken(),b=s??m("chat.workspace.placeholder"),{path:v,validationStatus:w,recentWorkspaces:I,suggestions:f,isLoadingRecent:y,isLoadingSuggestions:x,folderBrowserVisible:z,setFolderBrowserVisible:R,handlePathChange:P,handleBrowseClick:S,handleFolderSelect:_,handleWorkspaceSelect:d}=me({value:i,onChange:t,showRecentWorkspaces:a,showSuggestions:n,onValidationChange:u});return e.jsxs("div",{className:j,style:l,children:[e.jsx(de,{value:v,onChange:p=>P(p.target.value),placeholder:b,disabled:c,size:"middle",style:{width:"100%"},suffix:e.jsx(je,{isValidating:w.isValidating,result:w.result,token:g}),addonBefore:e.jsxs(k,{children:[e.jsx(E,{}),e.jsx(Se,{children:m("chat.workspace.label")})]}),addonAfter:r?e.jsx(T,{"aria-label":m("chat.workspace.browseFolder"),title:m("chat.workspace.browseFolder"),icon:e.jsx(E,{}),onClick:S,disabled:c,type:"text",size:"middle",style:{display:"inline-flex",alignItems:"center"}}):void 0}),e.jsx(we,{result:w.result,token:g}),(a||n)&&e.jsxs(e.Fragment,{children:[e.jsx(he,{style:{margin:"16px 0 12px 0"}}),e.jsx(xe,{show:a,isLoading:y,recentWorkspaces:I,onSelect:d,token:g}),e.jsx(ye,{show:n,isLoading:x,suggestions:f,onSelect:d,token:g})]}),e.jsx(pe,{visible:z,onClose:()=>R(!1),onSelect:_})]})},{Title:be}=V,_e=({open:i,initialPath:t="",loading:s=!1,onSubmit:c,onCancel:r})=>{const{t:a}=C(),{message:n}=O.useApp(),[u,j]=o.useState(t),[l,m]=o.useState(null),[g,b]=o.useState(!1);o.useEffect(()=>{i&&(j(t),m(null))},[i,t]);const v=x=>{j(x)},w=x=>{m(x)},I=async()=>{if(!u.trim()){n.error(a("chat.workspace.errorEnterPath"));return}l&&!l.is_valid?N.confirm({title:a("chat.workspace.invalidTitle"),content:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.issuesDetected")}),e.jsx("p",{children:l.error_message||a("chat.workspace.invalidTitle")}),e.jsx("p",{children:a("chat.workspace.confirmSaveInvalid")})]}),okText:a("common.saveAnyway"),cancelText:a("common.cancel"),onOk:()=>f()}):f()},f=async()=>{b(!0);try{l!=null&&l.is_valid&&await L.addRecentWorkspace(u.trim(),{workspace_name:l.workspace_name}),c(u.trim())}catch(x){console.error("Failed to save workspace path:",x),n.error(a("chat.workspace.errorSaveFailed"))}finally{b(!1)}},y=!u.trim()||s||g;return e.jsx(N,{open:i,title:e.jsx(k,{children:e.jsx(be,{level:4,style:{margin:0},children:a("chat.workspace.modalTitle")})}),okText:a("common.save"),cancelText:a("common.cancel"),onOk:I,onCancel:r,okButtonProps:{disabled:y,loading:g||s},width:600,destroyOnClose:!0,children:e.jsxs(k,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsx($,{message:a("chat.workspace.descriptionTitle"),description:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.descriptionP1")}),e.jsx("p",{children:a("chat.workspace.descriptionP2")})]}),type:"info",showIcon:!0}),e.jsx(ke,{value:u,onChange:v,onValidationChange:w,placeholder:a("chat.workspace.placeholder"),disabled:g,allowBrowse:!0,showRecentWorkspaces:!0,showSuggestions:!0}),l&&!l.is_valid&&e.jsx($,{message:a("chat.workspace.checkTitle"),description:l.error_message||a("chat.workspace.checkDescription"),type:"warning",showIcon:!0})]})})};export{_e as default};
@@ -1 +1 @@
1
- import{j as a}from"./vendor-markdown-CR3QKQo2.js";import{w as $,x as v,y as B}from"./App-DGiMC-bc.js";import{a as l,u as E}from"./vendor-i18n-Dm-c3D_C.js";import{W as T,t as M,o as L,an as D,ao as K,ae as F,U as z}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-EqIWbuOm.js";import"./main-BNHHYyvu.js";const X=({visible:p,searchText:k,onSelect:j,onCancel:g,onAutoComplete:f})=>{const[o,i]=l.useState([]),[c,R]=l.useState([]),[d,u]=l.useState(0),[N,I]=l.useState(!1),S=l.useRef(null),h=l.useRef(null);l.useEffect(()=>{if(!p)return;const s=$.getInstance();(async()=>{I(!0);try{const r=await s.listCommands();v("[CommandSelector]","[CommandSelector] Fetched commands:",r),i(r),u(0)}catch(r){console.error("[CommandSelector] Failed to fetch commands:",r),i([])}finally{I(!1)}})()},[p]),l.useEffect(()=>{const s=o.filter(e=>{var x,y,b,C,w;const r=k.toLowerCase(),n=(e.displayName??"").toLowerCase();return e.name.toLowerCase().includes(r)||n.includes(r)||e.description.toLowerCase().includes(r)||e.type==="mcp"&&[(x=e.metadata)==null?void 0:x.serverId,(y=e.metadata)==null?void 0:y.serverName,(b=e.metadata)==null?void 0:b.originalName].filter(m=>typeof m=="string").some(m=>m.toLowerCase().includes(r))||(((C=e.category)==null?void 0:C.toLowerCase().includes(r))??!1)||(((w=e.tags)==null?void 0:w.some(m=>m.toLowerCase().includes(r)))??!1)});R(s),u(0)},[o,k]),l.useEffect(()=>{if(!h.current||!S.current)return;const s=S.current,e=h.current,r=s.getBoundingClientRect(),n=e.getBoundingClientRect();n.top<r.top?e.scrollIntoView({block:"start",behavior:"smooth"}):n.bottom>r.bottom&&e.scrollIntoView({block:"end",behavior:"smooth"})},[d,c]);const t=l.useCallback(async s=>{try{j({name:s.name,type:s.type,id:s.id})}catch(e){console.error(`[CommandSelector] Failed to select command '${s.name}':`,e)}},[j]);return l.useEffect(()=>{const s=e=>{if(p)switch(e.key){case"ArrowDown":case"n":if(e.key==="n"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r<c.length-1?r+1:0);break;case"ArrowUp":case"p":if(e.key==="p"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r>0?r-1:c.length-1);break;case"Enter":e.preventDefault(),e.stopPropagation(),c[d]&&t(c[d]);break;case" ":case"Tab":e.preventDefault(),e.stopPropagation(),c[d]&&f&&f(c[d].name);break;case"Escape":e.preventDefault(),e.stopPropagation(),g();break}};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[p,c,d,g,f,t]),{containerRef:S,selectedItemRef:h,filteredCommands:c,selectedIndex:d,setSelectedIndex:u,isLoading:N,handleCommandSelect:t}},{useToken:P}=M,A={workflow:{color:"blue",icon:a.jsx(z,{}),labelKey:"chat.commandSelector.types.workflow"},skill:{color:"green",icon:a.jsx(F,{}),labelKey:"chat.commandSelector.types.skill"},mcp:{color:"purple",icon:a.jsx(K,{}),labelKey:"chat.commandSelector.types.mcp"},goal:{color:"gold",icon:a.jsx(D,{}),labelKey:"chat.commandSelector.types.goal"}},Q=({visible:p,onSelect:k,onCancel:j,searchText:g,onAutoComplete:f})=>{const{token:o}=P(),{t:i}=E(),{containerRef:c,selectedItemRef:R,filteredCommands:d,selectedIndex:u,setSelectedIndex:N,isLoading:I,handleCommandSelect:S}=X({visible:p,searchText:g,onSelect:k,onCancel:j,onAutoComplete:f});if(!p)return null;if(I)return a.jsxs("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center"},children:[a.jsx(T,{size:"small"})," ",i("chat.commandSelector.loading")]});if(d.length===0)return a.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center",color:o.colorTextSecondary},children:g?i("chat.commandSelector.emptyWithSearch",{search:g}):i("chat.commandSelector.empty")});const h=(t,s)=>{var b,C,w;const e=A[t.type],r=s===u,n=t.type==="mcp"?B(t.name):null,x=t.type==="mcp"?((b=t.metadata)==null?void 0:b.originalName)||(n==null?void 0:n.toolName)||t.displayName||t.name:null,y=t.type==="mcp"&&(((C=t.metadata)==null?void 0:C.serverName)||((w=t.metadata)==null?void 0:w.serverId)||(n==null?void 0:n.serverId))||null;return a.jsxs("div",{ref:r?R:null,className:`command-selector-item ${r?"selected":""}`,onClick:()=>S(t),onMouseEnter:()=>N(s),children:[a.jsxs("div",{className:"command-selector-item-header",children:[a.jsxs("div",{className:"command-selector-item-name",style:{color:o.colorPrimary},children:["/",t.type==="mcp"&&x?x:t.name]}),a.jsxs("div",{style:{display:"flex",gap:o.marginXS},children:[t.type==="mcp"&&y&&a.jsx(L,{color:"processing",children:y}),a.jsxs(L,{color:e.color,children:[e.icon," ",i(e.labelKey)]})]})]}),a.jsx("div",{className:"command-selector-item-description",style:{color:o.colorTextSecondary},children:t.description}),t.type==="mcp"&&y&&a.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.server")," ",y]}),t.category&&a.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.category")," ",t.category]}),t.tags&&t.tags.length>0&&a.jsx("div",{className:"command-selector-item-tags",children:t.tags.slice(0,3).map(m=>a.jsx(L,{children:m},m))})]},t.id)};return a.jsxs("div",{ref:c,className:"command-selector-container",style:{background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary},children:[a.jsx("div",{style:{padding:`${o.paddingXXS}px ${o.paddingSM}px`,borderBottom:`1px solid ${o.colorBorderSecondary}`,background:o.colorFillQuaternary,fontSize:o.fontSizeSM,color:o.colorTextTertiary},children:i("chat.commandSelector.navigationHint")}),d.map((t,s)=>h(t,s))]})};export{Q as default};
1
+ import{j as a}from"./vendor-markdown-CR3QKQo2.js";import{w as $,x as v,y as B}from"./App-CniE_U1E.js";import{a as l,u as E}from"./vendor-i18n-Dm-c3D_C.js";import{W as T,t as M,o as L,an as D,ao as K,ae as F,U as z}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-Db4IqfC2.js";import"./main-Ee10mQ7B.js";const X=({visible:p,searchText:k,onSelect:j,onCancel:g,onAutoComplete:f})=>{const[o,i]=l.useState([]),[c,R]=l.useState([]),[d,u]=l.useState(0),[N,I]=l.useState(!1),S=l.useRef(null),h=l.useRef(null);l.useEffect(()=>{if(!p)return;const s=$.getInstance();(async()=>{I(!0);try{const r=await s.listCommands();v("[CommandSelector]","[CommandSelector] Fetched commands:",r),i(r),u(0)}catch(r){console.error("[CommandSelector] Failed to fetch commands:",r),i([])}finally{I(!1)}})()},[p]),l.useEffect(()=>{const s=o.filter(e=>{var x,y,b,C,w;const r=k.toLowerCase(),n=(e.displayName??"").toLowerCase();return e.name.toLowerCase().includes(r)||n.includes(r)||e.description.toLowerCase().includes(r)||e.type==="mcp"&&[(x=e.metadata)==null?void 0:x.serverId,(y=e.metadata)==null?void 0:y.serverName,(b=e.metadata)==null?void 0:b.originalName].filter(m=>typeof m=="string").some(m=>m.toLowerCase().includes(r))||(((C=e.category)==null?void 0:C.toLowerCase().includes(r))??!1)||(((w=e.tags)==null?void 0:w.some(m=>m.toLowerCase().includes(r)))??!1)});R(s),u(0)},[o,k]),l.useEffect(()=>{if(!h.current||!S.current)return;const s=S.current,e=h.current,r=s.getBoundingClientRect(),n=e.getBoundingClientRect();n.top<r.top?e.scrollIntoView({block:"start",behavior:"smooth"}):n.bottom>r.bottom&&e.scrollIntoView({block:"end",behavior:"smooth"})},[d,c]);const t=l.useCallback(async s=>{try{j({name:s.name,type:s.type,id:s.id})}catch(e){console.error(`[CommandSelector] Failed to select command '${s.name}':`,e)}},[j]);return l.useEffect(()=>{const s=e=>{if(p)switch(e.key){case"ArrowDown":case"n":if(e.key==="n"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r<c.length-1?r+1:0);break;case"ArrowUp":case"p":if(e.key==="p"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r>0?r-1:c.length-1);break;case"Enter":e.preventDefault(),e.stopPropagation(),c[d]&&t(c[d]);break;case" ":case"Tab":e.preventDefault(),e.stopPropagation(),c[d]&&f&&f(c[d].name);break;case"Escape":e.preventDefault(),e.stopPropagation(),g();break}};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[p,c,d,g,f,t]),{containerRef:S,selectedItemRef:h,filteredCommands:c,selectedIndex:d,setSelectedIndex:u,isLoading:N,handleCommandSelect:t}},{useToken:P}=M,A={workflow:{color:"blue",icon:a.jsx(z,{}),labelKey:"chat.commandSelector.types.workflow"},skill:{color:"green",icon:a.jsx(F,{}),labelKey:"chat.commandSelector.types.skill"},mcp:{color:"purple",icon:a.jsx(K,{}),labelKey:"chat.commandSelector.types.mcp"},goal:{color:"gold",icon:a.jsx(D,{}),labelKey:"chat.commandSelector.types.goal"}},Q=({visible:p,onSelect:k,onCancel:j,searchText:g,onAutoComplete:f})=>{const{token:o}=P(),{t:i}=E(),{containerRef:c,selectedItemRef:R,filteredCommands:d,selectedIndex:u,setSelectedIndex:N,isLoading:I,handleCommandSelect:S}=X({visible:p,searchText:g,onSelect:k,onCancel:j,onAutoComplete:f});if(!p)return null;if(I)return a.jsxs("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center"},children:[a.jsx(T,{size:"small"})," ",i("chat.commandSelector.loading")]});if(d.length===0)return a.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center",color:o.colorTextSecondary},children:g?i("chat.commandSelector.emptyWithSearch",{search:g}):i("chat.commandSelector.empty")});const h=(t,s)=>{var b,C,w;const e=A[t.type],r=s===u,n=t.type==="mcp"?B(t.name):null,x=t.type==="mcp"?((b=t.metadata)==null?void 0:b.originalName)||(n==null?void 0:n.toolName)||t.displayName||t.name:null,y=t.type==="mcp"&&(((C=t.metadata)==null?void 0:C.serverName)||((w=t.metadata)==null?void 0:w.serverId)||(n==null?void 0:n.serverId))||null;return a.jsxs("div",{ref:r?R:null,className:`command-selector-item ${r?"selected":""}`,onClick:()=>S(t),onMouseEnter:()=>N(s),children:[a.jsxs("div",{className:"command-selector-item-header",children:[a.jsxs("div",{className:"command-selector-item-name",style:{color:o.colorPrimary},children:["/",t.type==="mcp"&&x?x:t.name]}),a.jsxs("div",{style:{display:"flex",gap:o.marginXS},children:[t.type==="mcp"&&y&&a.jsx(L,{color:"processing",children:y}),a.jsxs(L,{color:e.color,children:[e.icon," ",i(e.labelKey)]})]})]}),a.jsx("div",{className:"command-selector-item-description",style:{color:o.colorTextSecondary},children:t.description}),t.type==="mcp"&&y&&a.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.server")," ",y]}),t.category&&a.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.category")," ",t.category]}),t.tags&&t.tags.length>0&&a.jsx("div",{className:"command-selector-item-tags",children:t.tags.slice(0,3).map(m=>a.jsx(L,{children:m},m))})]},t.id)};return a.jsxs("div",{ref:c,className:"command-selector-container",style:{background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary},children:[a.jsx("div",{style:{padding:`${o.paddingXXS}px ${o.paddingSM}px`,borderBottom:`1px solid ${o.colorBorderSecondary}`,background:o.colorFillQuaternary,fontSize:o.fontSizeSM,color:o.colorTextTertiary},children:i("chat.commandSelector.navigationHint")}),d.map((t,s)=>h(t,s))]})};export{Q as default};
@@ -1 +1 @@
1
- import{j as s}from"./vendor-markdown-CR3QKQo2.js";import{u as g,a as c,i as m}from"./vendor-i18n-Dm-c3D_C.js";import{u as p,s as y,E as T}from"./App-DGiMC-bc.js";import{t as v,ad as S,ae as w,v as R,I as k,U as A,aa as I,o as b,w as M}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-EqIWbuOm.js";import"./main-BNHHYyvu.js";const C=5,D=5,$=5,E=o=>{if(!o)return"";try{const n=Date.now()-new Date(o).getTime();if(n<0)return"";const t=Math.floor(n/1e3);if(t<60)return m.t("chat.home.justNow");const l=Math.floor(t/60);if(l<60)return m.t("chat.home.minutesAgo",{count:l});const a=Math.floor(l/60);if(a<24)return m.t("chat.home.hoursAgo",{count:a});const r=Math.floor(a/24);return r<30?m.t("chat.home.daysAgo",{count:r}):new Date(o).toLocaleDateString()}catch{return""}},P=(o,n)=>n?"is-running":o.lastRunStatus==="error"?"is-error":o.pinned?"is-pinned":"is-idle",x=({chat:o,onOpen:n,textSecondary:t})=>{const{t:l}=g(),a=p(y(o.id)),r=o.config.workspacePath?o.config.workspacePath.split("/").pop()||o.config.workspacePath:null;return s.jsxs("button",{type:"button",className:"lotus-home-session-item",onClick:()=>n(o.id),children:[s.jsx("span",{className:`lotus-home-session-status ${P(o,a)}`}),s.jsxs("span",{className:"lotus-home-session-content",children:[s.jsx("span",{className:"lotus-home-session-title",children:o.title}),s.jsxs("span",{className:"lotus-home-session-meta",style:{color:t},children:[s.jsx("span",{children:E(o.updatedAt)}),r?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"lotus-home-session-meta-sep"}),s.jsxs("span",{children:[s.jsx(A,{style:{marginRight:3}}),r]})]}):null,o.messageCount!=null?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"lotus-home-session-meta-sep"}),s.jsxs("span",{children:[s.jsx(I,{style:{marginRight:3}}),o.messageCount]})]}):null]})]}),a?s.jsx(b,{color:"green",bordered:!1,style:{margin:0,fontSize:11},children:l("chat.home.running")}):null,s.jsx(M,{className:"lotus-home-session-arrow"})]})},U=({onOpenSession:o})=>{const{t:n}=g(),{token:t}=v.useToken(),l=p(e=>e.chats),a=c.useCallback(e=>y(e)(p.getState()),[]),r=c.useMemo(()=>l.filter(e=>a(e.id)).slice(0,D),[l,a]),d=c.useMemo(()=>l.filter(e=>e.pinned&&!a(e.id)).slice(0,$),[l,a]),j=c.useMemo(()=>{const e=new Set(r.map(i=>i.id)),f=new Set(d.map(i=>i.id));return l.filter(i=>i.kind!=="child"&&!e.has(i.id)&&!f.has(i.id)).sort((i,h)=>{const N=i.updatedAt?new Date(i.updatedAt).getTime():i.createdAt;return(h.updatedAt?new Date(h.updatedAt).getTime():h.createdAt)-N}).slice(0,C)},[l,r,d]),u=c.useCallback(e=>{o(e)},[o]);return s.jsx("div",{className:"lotus-home-dashboard",children:s.jsxs("div",{className:"lotus-home-dashboard-inner",children:[s.jsxs("div",{className:"lotus-home-header",children:[s.jsx("span",{className:"lotus-home-header-icon",style:{background:`${t.colorPrimary}15`,color:t.colorPrimary},children:s.jsx(S,{})}),s.jsxs("div",{className:"lotus-home-header-text",children:[s.jsx("h2",{style:{color:t.colorText},children:n("home.title","Welcome to Bodhi")}),s.jsx("p",{style:{color:t.colorTextSecondary},children:n("home.subtitle","Here's an overview of your workspace.")})]})]}),s.jsx("div",{className:"lotus-home-launcher-shell","data-tour-id":"task-templates",children:s.jsx(T,{embedded:!0,layoutMode:"staggered"})}),s.jsxs("div",{className:"lotus-home-secondary-sections",children:[r.length>0?s.jsxs("div",{className:"lotus-home-section",children:[s.jsxs("div",{className:"lotus-home-section-title",style:{color:t.colorTextSecondary},children:[s.jsx(w,{className:"lotus-home-section-icon",style:{color:t.colorSuccess}}),s.jsx("span",{children:n("home.sections.running","Running Now")})]}),s.jsx("div",{className:"lotus-home-session-list",children:r.map(e=>s.jsx(x,{chat:e,onOpen:u,textSecondary:t.colorTextTertiary},e.id))})]}):null,d.length>0?s.jsxs("div",{className:"lotus-home-section",children:[s.jsxs("div",{className:"lotus-home-section-title",style:{color:t.colorTextSecondary},children:[s.jsx(R,{className:"lotus-home-section-icon",style:{color:"var(--lotus-gold)"}}),s.jsx("span",{children:n("home.sections.pinned","Pinned")})]}),s.jsx("div",{className:"lotus-home-session-list",children:d.map(e=>s.jsx(x,{chat:e,onOpen:u,textSecondary:t.colorTextTertiary},e.id))})]}):null,j.length>0?s.jsxs("div",{className:"lotus-home-section",children:[s.jsxs("div",{className:"lotus-home-section-title",style:{color:t.colorTextSecondary},children:[s.jsx(k,{className:"lotus-home-section-icon"}),s.jsx("span",{children:n("home.sections.recent","Recent Sessions")})]}),s.jsx("div",{className:"lotus-home-session-list",children:j.map(e=>s.jsx(x,{chat:e,onOpen:u,textSecondary:t.colorTextTertiary},e.id))})]}):null,l.length===0?s.jsx("div",{className:"lotus-home-empty-hint",style:{color:t.colorTextTertiary},children:n("home.empty","No sessions yet. Create one to get started!")}):null]})]})})};export{U as HomeDashboard,U as default};
1
+ import{j as s}from"./vendor-markdown-CR3QKQo2.js";import{u as g,a as c,i as m}from"./vendor-i18n-Dm-c3D_C.js";import{u as p,s as y,E as T}from"./App-CniE_U1E.js";import{t as v,ad as S,ae as w,v as R,I as k,U as A,aa as I,o as b,w as M}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-Db4IqfC2.js";import"./main-Ee10mQ7B.js";const C=5,D=5,$=5,E=o=>{if(!o)return"";try{const n=Date.now()-new Date(o).getTime();if(n<0)return"";const t=Math.floor(n/1e3);if(t<60)return m.t("chat.home.justNow");const l=Math.floor(t/60);if(l<60)return m.t("chat.home.minutesAgo",{count:l});const a=Math.floor(l/60);if(a<24)return m.t("chat.home.hoursAgo",{count:a});const r=Math.floor(a/24);return r<30?m.t("chat.home.daysAgo",{count:r}):new Date(o).toLocaleDateString()}catch{return""}},P=(o,n)=>n?"is-running":o.lastRunStatus==="error"?"is-error":o.pinned?"is-pinned":"is-idle",x=({chat:o,onOpen:n,textSecondary:t})=>{const{t:l}=g(),a=p(y(o.id)),r=o.config.workspacePath?o.config.workspacePath.split("/").pop()||o.config.workspacePath:null;return s.jsxs("button",{type:"button",className:"lotus-home-session-item",onClick:()=>n(o.id),children:[s.jsx("span",{className:`lotus-home-session-status ${P(o,a)}`}),s.jsxs("span",{className:"lotus-home-session-content",children:[s.jsx("span",{className:"lotus-home-session-title",children:o.title}),s.jsxs("span",{className:"lotus-home-session-meta",style:{color:t},children:[s.jsx("span",{children:E(o.updatedAt)}),r?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"lotus-home-session-meta-sep"}),s.jsxs("span",{children:[s.jsx(A,{style:{marginRight:3}}),r]})]}):null,o.messageCount!=null?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"lotus-home-session-meta-sep"}),s.jsxs("span",{children:[s.jsx(I,{style:{marginRight:3}}),o.messageCount]})]}):null]})]}),a?s.jsx(b,{color:"green",bordered:!1,style:{margin:0,fontSize:11},children:l("chat.home.running")}):null,s.jsx(M,{className:"lotus-home-session-arrow"})]})},U=({onOpenSession:o})=>{const{t:n}=g(),{token:t}=v.useToken(),l=p(e=>e.chats),a=c.useCallback(e=>y(e)(p.getState()),[]),r=c.useMemo(()=>l.filter(e=>a(e.id)).slice(0,D),[l,a]),d=c.useMemo(()=>l.filter(e=>e.pinned&&!a(e.id)).slice(0,$),[l,a]),j=c.useMemo(()=>{const e=new Set(r.map(i=>i.id)),f=new Set(d.map(i=>i.id));return l.filter(i=>i.kind!=="child"&&!e.has(i.id)&&!f.has(i.id)).sort((i,h)=>{const N=i.updatedAt?new Date(i.updatedAt).getTime():i.createdAt;return(h.updatedAt?new Date(h.updatedAt).getTime():h.createdAt)-N}).slice(0,C)},[l,r,d]),u=c.useCallback(e=>{o(e)},[o]);return s.jsx("div",{className:"lotus-home-dashboard",children:s.jsxs("div",{className:"lotus-home-dashboard-inner",children:[s.jsxs("div",{className:"lotus-home-header",children:[s.jsx("span",{className:"lotus-home-header-icon",style:{background:`${t.colorPrimary}15`,color:t.colorPrimary},children:s.jsx(S,{})}),s.jsxs("div",{className:"lotus-home-header-text",children:[s.jsx("h2",{style:{color:t.colorText},children:n("home.title","Welcome to Bodhi")}),s.jsx("p",{style:{color:t.colorTextSecondary},children:n("home.subtitle","Here's an overview of your workspace.")})]})]}),s.jsx("div",{className:"lotus-home-launcher-shell","data-tour-id":"task-templates",children:s.jsx(T,{embedded:!0,layoutMode:"staggered"})}),s.jsxs("div",{className:"lotus-home-secondary-sections",children:[r.length>0?s.jsxs("div",{className:"lotus-home-section",children:[s.jsxs("div",{className:"lotus-home-section-title",style:{color:t.colorTextSecondary},children:[s.jsx(w,{className:"lotus-home-section-icon",style:{color:t.colorSuccess}}),s.jsx("span",{children:n("home.sections.running","Running Now")})]}),s.jsx("div",{className:"lotus-home-session-list",children:r.map(e=>s.jsx(x,{chat:e,onOpen:u,textSecondary:t.colorTextTertiary},e.id))})]}):null,d.length>0?s.jsxs("div",{className:"lotus-home-section",children:[s.jsxs("div",{className:"lotus-home-section-title",style:{color:t.colorTextSecondary},children:[s.jsx(R,{className:"lotus-home-section-icon",style:{color:"var(--lotus-gold)"}}),s.jsx("span",{children:n("home.sections.pinned","Pinned")})]}),s.jsx("div",{className:"lotus-home-session-list",children:d.map(e=>s.jsx(x,{chat:e,onOpen:u,textSecondary:t.colorTextTertiary},e.id))})]}):null,j.length>0?s.jsxs("div",{className:"lotus-home-section",children:[s.jsxs("div",{className:"lotus-home-section-title",style:{color:t.colorTextSecondary},children:[s.jsx(k,{className:"lotus-home-section-icon"}),s.jsx("span",{children:n("home.sections.recent","Recent Sessions")})]}),s.jsx("div",{className:"lotus-home-session-list",children:j.map(e=>s.jsx(x,{chat:e,onOpen:u,textSecondary:t.colorTextTertiary},e.id))})]}):null,l.length===0?s.jsx("div",{className:"lotus-home-empty-hint",style:{color:t.colorTextTertiary},children:n("home.empty","No sessions yet. Create one to get started!")}):null]})]})})};export{U as HomeDashboard,U as default};
@@ -1 +1 @@
1
- import{j as o}from"./vendor-markdown-CR3QKQo2.js";import{u as G,R as N,a as P}from"./vendor-i18n-Dm-c3D_C.js";import{u as y,I as w}from"./App-DGiMC-bc.js";import{t as O,j as h,k as Q,l as J,n as v,o as f,B as U,p as F,q as I,u as V,v as Y,w as Z,x as oo,y as X,A as so,P as eo,z as E,D as to,E as no,F as ro,G as lo,H as io,I as ao}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-EqIWbuOm.js";import"./main-BNHHYyvu.js";const{Text:p}=J,co=a=>({pending:{icon:o.jsx(ao,{}),color:a.colorTextTertiary,textKey:"components.todoList.status.pending",tagColor:"default"},in_progress:{icon:o.jsx(v,{spin:!0}),color:a.colorPrimary,textKey:"components.todoList.status.inProgress",tagColor:"processing"},completed:{icon:o.jsx(F,{}),color:a.colorSuccess,textKey:"components.todoList.status.completed",tagColor:"success"},blocked:{icon:o.jsx(io,{}),color:a.colorError,textKey:"components.todoList.status.blocked",tagColor:"error"}}),fo=({sessionId:a,initialCollapsed:K=!0,compact:t=!1})=>{const{t:n}=G(),{token:e}=O.useToken(),A=N.useMemo(()=>co(e),[e]),g=y(s=>s.chats.find(c=>c.id===a)),j=(g==null?void 0:g.kind)==="child"&&(g.parentSessionId||g.rootSessionId)||a,l=y(s=>s.taskLists[j]),H=y(s=>s.activeItems[j]),x=y(s=>s.evaluationStates[j]),[r,R]=P.useState(K),[i,W]=P.useState(!1),m=(x==null?void 0:x.isEvaluating)||!1,S=(x==null?void 0:x.reasoning)||null,T=l?{session_id:l.session_id,title:l.title,items:l.items,progress:{completed:l.items.filter(s=>s.status==="completed").length,total:l.items.length,percentage:l.items.length>0?Math.round(l.items.filter(s=>s.status==="completed").length/l.items.length*100):0}}:null;if(!T)return null;const C=()=>{i||R(!r)},D=s=>{s.stopPropagation(),W(!i),i||R(!1)},{title:M,items:q,progress:d}=T,L=d.percentage===100,_=o.jsxs(h,{onClick:C,style:{cursor:"pointer",width:"100%"},size:t?6:8,children:[o.jsx(Q,{style:{color:e.colorPrimary}}),o.jsx(p,{strong:!0,style:{fontSize:t?14:15},children:M||n("components.todoList.title")}),m&&(t?o.jsx(w,{nowrap:!0,items:[o.jsxs(o.Fragment,{children:[o.jsx(v,{spin:!0,style:{color:e.colorPrimary,marginRight:4}}),n("components.todoList.evaluating")]})]}):o.jsx(f,{icon:o.jsx(v,{spin:!0}),color:"processing",children:n("components.todoList.evaluating")})),!r&&d.total>0&&o.jsx(U,{count:`${d.completed}/${d.total}`,style:{backgroundColor:L?e.colorSuccess:e.colorPrimary}})]}),k=o.jsxs(h,{size:t?6:8,children:[d.total>0&&r&&o.jsxs(p,{type:"secondary",style:{fontSize:t?12:13},children:[d.completed,"/",d.total,L&&o.jsx(F,{style:{color:e.colorSuccess,marginLeft:4}})]}),o.jsx(I,{title:n(i?"components.todoList.unpin":"components.todoList.pin"),children:o.jsx("span",{onClick:D,style:{cursor:"pointer",color:i?e.colorPrimary:e.colorTextSecondary,fontSize:t?14:16},children:i?o.jsx(V,{}):o.jsx(Y,{})})}),!i&&o.jsx("span",{onClick:C,style:{cursor:"pointer",color:e.colorTextSecondary,fontSize:12,transform:r?"rotate(-90deg)":void 0,transition:"transform 0.2s"},children:r?o.jsx(Z,{}):o.jsx(oo,{})})]}),b=r?null:o.jsxs(o.Fragment,{children:[S?t?o.jsxs(p,{type:"secondary",style:{display:"block",marginBottom:e.marginXS,fontSize:12,paddingLeft:e.paddingXS,borderLeft:`2px solid ${e.colorPrimaryBorder}`,lineHeight:1.45},children:[o.jsx(X,{style:{marginRight:6}}),S]}):o.jsx(so,{icon:o.jsx(X,{}),message:n("components.todoList.llmEvaluation"),description:S,type:"info",showIcon:!0,style:{marginBottom:16}}):null,d.total>0&&o.jsx("div",{style:{marginBottom:t?e.marginXS:16},children:o.jsx(eo,{percent:d.percentage,size:"small",status:L?"success":"active",format:s=>o.jsxs(p,{type:"secondary",children:[s,"%"]})})}),o.jsx(E,{size:"small",split:!1,dataSource:q,renderItem:s=>{var z,B;const c=A[s.status],u=H===s.id,$=n(c.textKey);return o.jsx(E.Item,{style:{padding:t?"6px 0":"12px 0",borderLeft:u?`3px solid ${e.colorPrimary}`:"3px solid transparent",paddingLeft:u?t?8:12:t?10:15,backgroundColor:t?"transparent":u?e.colorPrimaryBg:"transparent",borderRadius:t?0:4,marginBottom:t?0:4},children:o.jsx("div",{style:{width:"100%"},children:o.jsxs(h,{align:"start",style:{width:"100%"},size:t?6:8,children:[o.jsx(I,{title:$,children:o.jsx("span",{style:{color:c.color,fontSize:t?14:16},children:c.icon})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsx(p,{style:{textDecoration:s.status==="completed"?"line-through":"none",color:s.status==="completed"?e.colorTextSecondary:e.colorText,fontWeight:u?500:400,fontSize:t?13:void 0},children:s.description}),o.jsx("div",{style:{marginTop:t?3:4},children:t?o.jsx(w,{block:!0,items:[o.jsx("span",{style:{color:c.color},children:$}),s.tool_calls_count!==void 0&&s.tool_calls_count>0?`${s.tool_calls_count} ${n("components.todoList.tools")}`:null,((z=s.depends_on)==null?void 0:z.length)>0?`${s.depends_on.length} ${n("components.todoList.dependencies")}`:null]}):o.jsxs(h,{size:t?6:8,wrap:!0,children:[o.jsx(f,{color:c.tagColor,children:$}),s.tool_calls_count!==void 0&&s.tool_calls_count>0&&o.jsxs(f,{icon:o.jsx(to,{}),color:"processing",children:[s.tool_calls_count," ",n("components.todoList.tools")]}),((B=s.depends_on)==null?void 0:B.length)>0&&o.jsx(I,{title:n("components.todoList.dependsOn",{deps:s.depends_on.join(", ")}),children:o.jsxs(f,{icon:o.jsx(no,{}),children:[s.depends_on.length," ",n("components.todoList.dependencies")]})})]})}),s.status==="completed"&&s.summary&&o.jsx(p,{type:"secondary",style:t?{display:"block",marginTop:4,fontSize:12,paddingLeft:e.paddingXS,borderLeft:`2px solid ${e.colorSuccessBorder}`,color:e.colorSuccess,lineHeight:1.45}:{display:"block",marginTop:6,fontSize:12,padding:"4px 8px",backgroundColor:e.colorSuccessBg,borderRadius:4,color:e.colorSuccess},children:s.summary}),s.notes&&o.jsx(p,{type:"secondary",style:t?{display:"block",marginTop:4,fontSize:12,paddingLeft:e.paddingXS,borderLeft:`2px solid ${e.colorBorderSecondary}`,lineHeight:1.45}:{display:"block",marginTop:6,fontSize:12,padding:"4px 8px",backgroundColor:e.colorFillQuaternary,borderRadius:4},children:s.notes})]})]})})})}})]});return t?o.jsxs("section",{"data-testid":"todo-list-panel",style:{width:"100%",minWidth:0,marginBottom:e.marginXS,overflow:"hidden",opacity:r&&!i?.9:1},children:[o.jsxs(ro,{align:"center",justify:"space-between",gap:e.marginXS,style:{padding:`${e.paddingXXS??2}px 0 ${e.paddingXS}px`,borderBottom:r?void 0:`1px solid ${m?e.colorPrimaryBorder:e.colorBorderSecondary}`},children:[o.jsx("div",{style:{flex:1,minWidth:0},children:_}),o.jsx("div",{style:{flex:"0 0 auto"},children:k})]}),b?o.jsx("div",{style:{padding:`0 0 ${e.paddingXS}px`},children:b}):null]}):o.jsx(lo,{size:"small",className:"lotus-settings-card",style:{marginBottom:16,borderRadius:8,boxShadow:m?`0 0 0 2px ${e.colorPrimaryBorder}`:"0 2px 8px rgba(0, 0, 0, 0.06)",opacity:r&&!i?.9:1},styles:{body:{padding:r?"12px 16px":16}},title:_,extra:k,children:b})};export{fo as TodoList,fo as default};
1
+ import{j as o}from"./vendor-markdown-CR3QKQo2.js";import{u as G,R as N,a as P}from"./vendor-i18n-Dm-c3D_C.js";import{u as y,I as w}from"./App-CniE_U1E.js";import{t as O,j as h,k as Q,l as J,n as v,o as f,B as U,p as F,q as I,u as V,v as Y,w as Z,x as oo,y as X,A as so,P as eo,z as E,D as to,E as no,F as ro,G as lo,H as io,I as ao}from"./vendor-antd-BV9fXfUG.js";import"./vendor-mermaid-Db4IqfC2.js";import"./main-Ee10mQ7B.js";const{Text:p}=J,co=a=>({pending:{icon:o.jsx(ao,{}),color:a.colorTextTertiary,textKey:"components.todoList.status.pending",tagColor:"default"},in_progress:{icon:o.jsx(v,{spin:!0}),color:a.colorPrimary,textKey:"components.todoList.status.inProgress",tagColor:"processing"},completed:{icon:o.jsx(F,{}),color:a.colorSuccess,textKey:"components.todoList.status.completed",tagColor:"success"},blocked:{icon:o.jsx(io,{}),color:a.colorError,textKey:"components.todoList.status.blocked",tagColor:"error"}}),fo=({sessionId:a,initialCollapsed:K=!0,compact:t=!1})=>{const{t:n}=G(),{token:e}=O.useToken(),A=N.useMemo(()=>co(e),[e]),g=y(s=>s.chats.find(c=>c.id===a)),j=(g==null?void 0:g.kind)==="child"&&(g.parentSessionId||g.rootSessionId)||a,l=y(s=>s.taskLists[j]),H=y(s=>s.activeItems[j]),x=y(s=>s.evaluationStates[j]),[r,R]=P.useState(K),[i,W]=P.useState(!1),m=(x==null?void 0:x.isEvaluating)||!1,S=(x==null?void 0:x.reasoning)||null,T=l?{session_id:l.session_id,title:l.title,items:l.items,progress:{completed:l.items.filter(s=>s.status==="completed").length,total:l.items.length,percentage:l.items.length>0?Math.round(l.items.filter(s=>s.status==="completed").length/l.items.length*100):0}}:null;if(!T)return null;const C=()=>{i||R(!r)},D=s=>{s.stopPropagation(),W(!i),i||R(!1)},{title:M,items:q,progress:d}=T,L=d.percentage===100,_=o.jsxs(h,{onClick:C,style:{cursor:"pointer",width:"100%"},size:t?6:8,children:[o.jsx(Q,{style:{color:e.colorPrimary}}),o.jsx(p,{strong:!0,style:{fontSize:t?14:15},children:M||n("components.todoList.title")}),m&&(t?o.jsx(w,{nowrap:!0,items:[o.jsxs(o.Fragment,{children:[o.jsx(v,{spin:!0,style:{color:e.colorPrimary,marginRight:4}}),n("components.todoList.evaluating")]})]}):o.jsx(f,{icon:o.jsx(v,{spin:!0}),color:"processing",children:n("components.todoList.evaluating")})),!r&&d.total>0&&o.jsx(U,{count:`${d.completed}/${d.total}`,style:{backgroundColor:L?e.colorSuccess:e.colorPrimary}})]}),k=o.jsxs(h,{size:t?6:8,children:[d.total>0&&r&&o.jsxs(p,{type:"secondary",style:{fontSize:t?12:13},children:[d.completed,"/",d.total,L&&o.jsx(F,{style:{color:e.colorSuccess,marginLeft:4}})]}),o.jsx(I,{title:n(i?"components.todoList.unpin":"components.todoList.pin"),children:o.jsx("span",{onClick:D,style:{cursor:"pointer",color:i?e.colorPrimary:e.colorTextSecondary,fontSize:t?14:16},children:i?o.jsx(V,{}):o.jsx(Y,{})})}),!i&&o.jsx("span",{onClick:C,style:{cursor:"pointer",color:e.colorTextSecondary,fontSize:12,transform:r?"rotate(-90deg)":void 0,transition:"transform 0.2s"},children:r?o.jsx(Z,{}):o.jsx(oo,{})})]}),b=r?null:o.jsxs(o.Fragment,{children:[S?t?o.jsxs(p,{type:"secondary",style:{display:"block",marginBottom:e.marginXS,fontSize:12,paddingLeft:e.paddingXS,borderLeft:`2px solid ${e.colorPrimaryBorder}`,lineHeight:1.45},children:[o.jsx(X,{style:{marginRight:6}}),S]}):o.jsx(so,{icon:o.jsx(X,{}),message:n("components.todoList.llmEvaluation"),description:S,type:"info",showIcon:!0,style:{marginBottom:16}}):null,d.total>0&&o.jsx("div",{style:{marginBottom:t?e.marginXS:16},children:o.jsx(eo,{percent:d.percentage,size:"small",status:L?"success":"active",format:s=>o.jsxs(p,{type:"secondary",children:[s,"%"]})})}),o.jsx(E,{size:"small",split:!1,dataSource:q,renderItem:s=>{var z,B;const c=A[s.status],u=H===s.id,$=n(c.textKey);return o.jsx(E.Item,{style:{padding:t?"6px 0":"12px 0",borderLeft:u?`3px solid ${e.colorPrimary}`:"3px solid transparent",paddingLeft:u?t?8:12:t?10:15,backgroundColor:t?"transparent":u?e.colorPrimaryBg:"transparent",borderRadius:t?0:4,marginBottom:t?0:4},children:o.jsx("div",{style:{width:"100%"},children:o.jsxs(h,{align:"start",style:{width:"100%"},size:t?6:8,children:[o.jsx(I,{title:$,children:o.jsx("span",{style:{color:c.color,fontSize:t?14:16},children:c.icon})}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsx(p,{style:{textDecoration:s.status==="completed"?"line-through":"none",color:s.status==="completed"?e.colorTextSecondary:e.colorText,fontWeight:u?500:400,fontSize:t?13:void 0},children:s.description}),o.jsx("div",{style:{marginTop:t?3:4},children:t?o.jsx(w,{block:!0,items:[o.jsx("span",{style:{color:c.color},children:$}),s.tool_calls_count!==void 0&&s.tool_calls_count>0?`${s.tool_calls_count} ${n("components.todoList.tools")}`:null,((z=s.depends_on)==null?void 0:z.length)>0?`${s.depends_on.length} ${n("components.todoList.dependencies")}`:null]}):o.jsxs(h,{size:t?6:8,wrap:!0,children:[o.jsx(f,{color:c.tagColor,children:$}),s.tool_calls_count!==void 0&&s.tool_calls_count>0&&o.jsxs(f,{icon:o.jsx(to,{}),color:"processing",children:[s.tool_calls_count," ",n("components.todoList.tools")]}),((B=s.depends_on)==null?void 0:B.length)>0&&o.jsx(I,{title:n("components.todoList.dependsOn",{deps:s.depends_on.join(", ")}),children:o.jsxs(f,{icon:o.jsx(no,{}),children:[s.depends_on.length," ",n("components.todoList.dependencies")]})})]})}),s.status==="completed"&&s.summary&&o.jsx(p,{type:"secondary",style:t?{display:"block",marginTop:4,fontSize:12,paddingLeft:e.paddingXS,borderLeft:`2px solid ${e.colorSuccessBorder}`,color:e.colorSuccess,lineHeight:1.45}:{display:"block",marginTop:6,fontSize:12,padding:"4px 8px",backgroundColor:e.colorSuccessBg,borderRadius:4,color:e.colorSuccess},children:s.summary}),s.notes&&o.jsx(p,{type:"secondary",style:t?{display:"block",marginTop:4,fontSize:12,paddingLeft:e.paddingXS,borderLeft:`2px solid ${e.colorBorderSecondary}`,lineHeight:1.45}:{display:"block",marginTop:6,fontSize:12,padding:"4px 8px",backgroundColor:e.colorFillQuaternary,borderRadius:4},children:s.notes})]})]})})})}})]});return t?o.jsxs("section",{"data-testid":"todo-list-panel",style:{width:"100%",minWidth:0,marginBottom:e.marginXS,overflow:"hidden",opacity:r&&!i?.9:1},children:[o.jsxs(ro,{align:"center",justify:"space-between",gap:e.marginXS,style:{padding:`${e.paddingXXS??2}px 0 ${e.paddingXS}px`,borderBottom:r?void 0:`1px solid ${m?e.colorPrimaryBorder:e.colorBorderSecondary}`},children:[o.jsx("div",{style:{flex:1,minWidth:0},children:_}),o.jsx("div",{style:{flex:"0 0 auto"},children:k})]}),b?o.jsx("div",{style:{padding:`0 0 ${e.paddingXS}px`},children:b}):null]}):o.jsx(lo,{size:"small",className:"lotus-settings-card",style:{marginBottom:16,borderRadius:8,boxShadow:m?`0 0 0 2px ${e.colorPrimaryBorder}`:"0 2px 8px rgba(0, 0, 0, 0.06)",opacity:r&&!i?.9:1},styles:{body:{padding:r?"12px 16px":16}},title:_,extra:k,children:b})};export{fo as TodoList,fo as default};